@plenustech/design-system 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +209 -0
- package/dist/design-system.css +1 -0
- package/dist/folha.d.ts +7 -0
- package/dist/plenus-design-system.cjs +2 -0
- package/dist/plenus-design-system.cjs.map +1 -0
- package/dist/plenus-design-system.es.js +5853 -0
- package/dist/plenus-design-system.es.js.map +1 -0
- package/dist/reset.css +79 -0
- package/dist/types/components/actions/Button/Button.d.ts +9 -0
- package/dist/types/components/actions/Button/index.d.ts +2 -0
- package/dist/types/components/charts/ChartArea/ChartArea.d.ts +35 -0
- package/dist/types/components/charts/ChartArea/index.d.ts +2 -0
- package/dist/types/components/charts/ChartBar/ChartBar.d.ts +31 -0
- package/dist/types/components/charts/ChartBar/index.d.ts +2 -0
- package/dist/types/components/charts/ChartCombo/ChartCombo.d.ts +44 -0
- package/dist/types/components/charts/ChartCombo/index.d.ts +2 -0
- package/dist/types/components/charts/ChartDonut/ChartDonut.d.ts +31 -0
- package/dist/types/components/charts/ChartDonut/index.d.ts +2 -0
- package/dist/types/components/charts/ChartLine/ChartLine.d.ts +34 -0
- package/dist/types/components/charts/ChartLine/index.d.ts +2 -0
- package/dist/types/components/charts/ChartPie/ChartPie.d.ts +27 -0
- package/dist/types/components/charts/ChartPie/index.d.ts +2 -0
- package/dist/types/components/charts/ChartRadial/ChartRadial.d.ts +32 -0
- package/dist/types/components/charts/ChartRadial/index.d.ts +2 -0
- package/dist/types/components/charts/ChartSankey/ChartSankey.d.ts +41 -0
- package/dist/types/components/charts/ChartSankey/index.d.ts +2 -0
- package/dist/types/components/charts/ChartScatter/ChartScatter.d.ts +37 -0
- package/dist/types/components/charts/ChartScatter/index.d.ts +2 -0
- package/dist/types/components/charts/ChartSunburst/ChartSunburst.d.ts +27 -0
- package/dist/types/components/charts/ChartSunburst/index.d.ts +2 -0
- package/dist/types/components/charts/ChartTooltip/ChartTooltip.d.ts +41 -0
- package/dist/types/components/charts/ChartTooltip/index.d.ts +2 -0
- package/dist/types/components/charts/ChartTreemap/ChartTreemap.d.ts +30 -0
- package/dist/types/components/charts/ChartTreemap/index.d.ts +2 -0
- package/dist/types/components/charts/ChartWaterfall/ChartWaterfall.d.ts +24 -0
- package/dist/types/components/charts/ChartWaterfall/index.d.ts +2 -0
- package/dist/types/components/charts/core/Axis.d.ts +18 -0
- package/dist/types/components/charts/core/BandCursor.d.ts +15 -0
- package/dist/types/components/charts/core/CartesianFrame.d.ts +41 -0
- package/dist/types/components/charts/core/ChartFrame.d.ts +31 -0
- package/dist/types/components/charts/core/ChartLegend.d.ts +24 -0
- package/dist/types/components/charts/core/Grid.d.ts +12 -0
- package/dist/types/components/charts/core/arcs.d.ts +27 -0
- package/dist/types/components/charts/core/cartesianLayout.d.ts +70 -0
- package/dist/types/components/charts/core/centerText.d.ts +14 -0
- package/dist/types/components/charts/core/index.d.ts +36 -0
- package/dist/types/components/charts/core/measureText.d.ts +25 -0
- package/dist/types/components/charts/core/shapes.d.ts +26 -0
- package/dist/types/components/charts/core/slices.d.ts +18 -0
- package/dist/types/components/charts/core/spacing.d.ts +39 -0
- package/dist/types/components/charts/core/useChartMetrics.d.ts +19 -0
- package/dist/types/components/charts/core/useHoveredBand.d.ts +9 -0
- package/dist/types/components/charts/core/useSeriesToggle.d.ts +16 -0
- package/dist/types/components/charts/core/useSliceRing.d.ts +31 -0
- package/dist/types/components/charts/core/useTweenedNumbers.d.ts +14 -0
- package/dist/types/components/charts/palette/index.d.ts +3 -0
- package/dist/types/components/charts/palette/palette.d.ts +17 -0
- package/dist/types/components/charts/palette/seriesColor.d.ts +24 -0
- package/dist/types/components/charts/scales/index.d.ts +2 -0
- package/dist/types/components/charts/scales/scales.d.ts +57 -0
- package/dist/types/components/data-display/Accordion/Accordion.d.ts +20 -0
- package/dist/types/components/data-display/Accordion/index.d.ts +2 -0
- package/dist/types/components/data-display/Avatar/Avatar.d.ts +8 -0
- package/dist/types/components/data-display/Avatar/index.d.ts +2 -0
- package/dist/types/components/data-display/Badge/Badge.d.ts +8 -0
- package/dist/types/components/data-display/Badge/index.d.ts +2 -0
- package/dist/types/components/data-display/Card/Card.d.ts +29 -0
- package/dist/types/components/data-display/Card/index.d.ts +2 -0
- package/dist/types/components/data-display/List/List.d.ts +40 -0
- package/dist/types/components/data-display/List/ListingOptions.d.ts +20 -0
- package/dist/types/components/data-display/List/index.d.ts +2 -0
- package/dist/types/components/data-display/List/useListing.d.ts +35 -0
- package/dist/types/components/data-display/List/useVirtualWindow.d.ts +25 -0
- package/dist/types/components/data-display/Table/Table.d.ts +78 -0
- package/dist/types/components/data-display/Table/index.d.ts +2 -0
- package/dist/types/components/feedback/Alert/Alert.d.ts +8 -0
- package/dist/types/components/feedback/Alert/index.d.ts +2 -0
- package/dist/types/components/feedback/Progress/Progress.d.ts +10 -0
- package/dist/types/components/feedback/Progress/index.d.ts +2 -0
- package/dist/types/components/feedback/Spinner/Spinner.d.ts +7 -0
- package/dist/types/components/feedback/Spinner/index.d.ts +2 -0
- package/dist/types/components/forms/Checkbox/Checkbox.d.ts +8 -0
- package/dist/types/components/forms/Checkbox/index.d.ts +2 -0
- package/dist/types/components/forms/ComboBox/ComboBox.d.ts +29 -0
- package/dist/types/components/forms/ComboBox/index.d.ts +2 -0
- package/dist/types/components/forms/DatePicker/Calendar.d.ts +9 -0
- package/dist/types/components/forms/DatePicker/DatePicker.d.ts +29 -0
- package/dist/types/components/forms/DatePicker/index.d.ts +2 -0
- package/dist/types/components/forms/DateTimePicker/DateTimePicker.d.ts +33 -0
- package/dist/types/components/forms/DateTimePicker/index.d.ts +2 -0
- package/dist/types/components/forms/Field/Field.d.ts +19 -0
- package/dist/types/components/forms/Field/index.d.ts +2 -0
- package/dist/types/components/forms/InputCurrency/InputCurrency.d.ts +9 -0
- package/dist/types/components/forms/InputCurrency/index.d.ts +2 -0
- package/dist/types/components/forms/InputNumber/InputNumber.d.ts +8 -0
- package/dist/types/components/forms/InputNumber/index.d.ts +2 -0
- package/dist/types/components/forms/InputPassword/InputPassword.d.ts +13 -0
- package/dist/types/components/forms/InputPassword/index.d.ts +2 -0
- package/dist/types/components/forms/InputText/InputText.d.ts +10 -0
- package/dist/types/components/forms/InputText/index.d.ts +2 -0
- package/dist/types/components/forms/Label/Label.d.ts +5 -0
- package/dist/types/components/forms/Label/index.d.ts +2 -0
- package/dist/types/components/forms/RadioGroup/Radio.d.ts +6 -0
- package/dist/types/components/forms/RadioGroup/RadioGroup.d.ts +25 -0
- package/dist/types/components/forms/RadioGroup/index.d.ts +4 -0
- package/dist/types/components/forms/Select/Select.d.ts +26 -0
- package/dist/types/components/forms/Select/index.d.ts +2 -0
- package/dist/types/components/forms/Switch/Switch.d.ts +7 -0
- package/dist/types/components/forms/Switch/index.d.ts +2 -0
- package/dist/types/components/forms/Textarea/Textarea.d.ts +10 -0
- package/dist/types/components/forms/Textarea/index.d.ts +2 -0
- package/dist/types/components/forms/TimePicker/TimePicker.d.ts +28 -0
- package/dist/types/components/forms/TimePicker/TimeSlots.d.ts +22 -0
- package/dist/types/components/forms/TimePicker/index.d.ts +2 -0
- package/dist/types/components/icons/Icon.d.ts +23 -0
- package/dist/types/components/icons/icons.d.ts +12 -0
- package/dist/types/components/icons/index.d.ts +2 -0
- package/dist/types/components/navigation/Breadcrumb/Breadcrumb.d.ts +17 -0
- package/dist/types/components/navigation/Breadcrumb/index.d.ts +2 -0
- package/dist/types/components/navigation/Pagination/Pagination.d.ts +11 -0
- package/dist/types/components/navigation/Pagination/index.d.ts +2 -0
- package/dist/types/components/navigation/Tabs/Tabs.d.ts +17 -0
- package/dist/types/components/navigation/Tabs/index.d.ts +2 -0
- package/dist/types/components/overlays/Dialog/Dialog.d.ts +13 -0
- package/dist/types/components/overlays/Dialog/index.d.ts +2 -0
- package/dist/types/components/overlays/Menu/Menu.d.ts +13 -0
- package/dist/types/components/overlays/Menu/index.d.ts +2 -0
- package/dist/types/components/overlays/Popover/Popover.d.ts +13 -0
- package/dist/types/components/overlays/Popover/index.d.ts +2 -0
- package/dist/types/components/overlays/Tooltip/Tooltip.d.ts +9 -0
- package/dist/types/components/overlays/Tooltip/index.d.ts +2 -0
- package/dist/types/hooks/useCalendar/calendar.d.ts +16 -0
- package/dist/types/hooks/useCalendar/index.d.ts +3 -0
- package/dist/types/hooks/useCalendar/useCalendar.d.ts +21 -0
- package/dist/types/hooks/useCharacterCount/index.d.ts +1 -0
- package/dist/types/hooks/useCharacterCount/useCharacterCount.d.ts +7 -0
- package/dist/types/hooks/useFormReset.d.ts +6 -0
- package/dist/types/hooks/useSelection/index.d.ts +3 -0
- package/dist/types/hooks/useSelection/selection.d.ts +25 -0
- package/dist/types/hooks/useSelection/useSelection.d.ts +26 -0
- package/dist/types/index.d.ts +97 -0
- package/dist/types/utils/formatters/formatarData.d.ts +10 -0
- package/dist/types/utils/formatters/formatarEntradaData.d.ts +5 -0
- package/dist/types/utils/formatters/formatarEntradaDecimal.d.ts +1 -0
- package/dist/types/utils/formatters/formatarEntradaMonetaria.d.ts +1 -0
- package/dist/types/utils/formatters/formatarNumero.d.ts +27 -0
- package/dist/types/utils/formatters/index.d.ts +7 -0
- package/dist/types/utils/mergeRefs.d.ts +7 -0
- package/dist/types/utils/textSearch/index.d.ts +1 -0
- package/dist/types/utils/textSearch/textSearch.d.ts +2 -0
- package/package.json +86 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("react"),Ut=require("d3-scale"),fn=require("d3-array"),it=require("d3-shape"),jt=require("d3-sankey"),Ht=require("d3-hierarchy"),Oe=require("react-dom"),xe=require("@react-aria/overlays"),Z=require("@internationalized/date"),bn=require("@react-aria/focus");function ke({children:e,label:t,size:n="1em",...s}){const r=t??s["aria-label"];return o.jsx("svg",{"aria-hidden":r?void 0:!0,"aria-label":r,fill:"currentColor",focusable:"false",height:n,role:r?"img":void 0,viewBox:"0 0 16 16",width:n,xmlns:"http://www.w3.org/2000/svg",...s,children:e})}function Ts(e){return o.jsx(ke,{...e,children:o.jsx("path",{fillRule:"evenodd",d:"M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1"})})}function es(e){return o.jsx(ke,{...e,children:o.jsx("path",{fillRule:"evenodd",d:"M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5"})})}function yn(e){return o.jsx(ke,{...e,children:o.jsx("path",{d:"M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V5h16V4H0V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5"})})}function ts(e){return o.jsx(ke,{...e,children:o.jsx("path",{fillRule:"evenodd",d:"M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708"})})}function xn(e){return o.jsx(ke,{...e,children:o.jsx("path",{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"})})}function Gt(e){return o.jsx(ke,{...e,children:o.jsx("path",{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"})})}function Fs(e){return o.jsx(ke,{...e,children:o.jsx("path",{fillRule:"evenodd",d:"M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708z"})})}function ns(e){return o.jsx(ke,{...e,children:o.jsx("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71z"})})}function ss(e){return o.jsx(ke,{...e,children:o.jsx("path",{d:"M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z"})})}function os(e){return o.jsxs(ke,{...e,children:[o.jsx("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"}),o.jsx("path",{d:"M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8"})]})}function as(e){return o.jsxs(ke,{...e,children:[o.jsx("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"}),o.jsx("path",{d:"M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4"})]})}const Bs="_spinner_nob8y_1",Ps="_sm_nob8y_10",Ks="_md_nob8y_15",zs="_lg_nob8y_21",An={spinner:Bs,"pl-spin":"_pl-spin_nob8y_1",sm:Ps,md:Ks,lg:zs};function rs({className:e,label:t,size:n="md",...s}){const r=[An.spinner,An[n],e].filter(Boolean).join(" ");return t?o.jsx("span",{...s,className:r,role:"status","aria-label":t}):o.jsx("span",{...s,className:r,"aria-hidden":"true"})}const Hs="_button_orr35_1",qs="_primary_orr35_37",Vs="_secondary_orr35_47",Us="_soft_orr35_59",Gs="_ghost_orr35_70",Ws="_danger_orr35_81",Xs="_sm_orr35_91",Ys="_md_orr35_96",Qs="_lg_orr35_100",sn={button:Hs,primary:qs,secondary:Vs,soft:Us,ghost:Gs,danger:Ws,sm:Xs,md:Ys,lg:Qs},Ze=i.forwardRef(({children:e,className:t,disabled:n=!1,loading:s=!1,onClick:r,size:a="md",type:l="button",variant:c="primary",...u},d)=>{const m=[sn.button,sn[c],sn[a],t].filter(Boolean).join(" ");function g(h){if(s){h.preventDefault();return}r==null||r(h)}return o.jsxs("button",{...u,ref:d,className:m,disabled:n,"aria-disabled":s||void 0,"aria-busy":s||void 0,onClick:g,type:l,children:[s&&o.jsx(rs,{size:a==="lg"?"md":"sm"}),e]})}),Zs="_label_1uf9d_1",Js="_required_1uf9d_12",In={label:Zs,required:Js};function ls({children:e,className:t,required:n=!1,...s}){const r=[In.label,t].filter(Boolean).join(" ");return o.jsxs("label",{...s,className:r,children:[e,n&&o.jsx("span",{className:In.required,"aria-hidden":"true",children:"*"})]})}const eo="_field_n7q1m_1",to="_hint_n7q1m_8",no="_errorMessage_n7q1m_9",so="_characterCount_n7q1m_10",Ct={field:eo,hint:to,errorMessage:no,characterCount:so};function ze({"aria-describedby":e,className:t,characterCount:n=0,children:s,error:r,hint:a,id:l,label:c,maxLength:u,required:d=!1,showCharacterCount:m=!1,...g}){const h=i.useId(),p=l??`field-${h}`,_=`${p}-message`,f=`${p}-character-count`,x=[e,r||a?_:void 0,m?f:void 0].filter(Boolean).join(" ")||void 0;return o.jsxs("div",{...g,className:[Ct.field,t].filter(Boolean).join(" "),children:[c&&o.jsx(ls,{htmlFor:p,required:d,children:c}),s({id:p,describedBy:x,invalid:!!r}),(r||a)&&o.jsx("span",{className:r?Ct.errorMessage:Ct.hint,id:_,children:r||a}),m&&o.jsx("span",{className:Ct.characterCount,id:f,children:u?`${n}/${u}`:n})]})}function Lt(e){return String(e??"").length}function is(e,t){const n=i.useRef(null),[s,r]=i.useState(()=>Lt(t));return i.useEffect(()=>{var c;const a=(c=n.current)==null?void 0:c.form;if(!a)return;function l(){r(Lt(t))}return a.addEventListener("reset",l),()=>a.removeEventListener("reset",l)},[t]),{ref:n,count:e===void 0?s:Lt(e),updateCount(a){e===void 0&&r(Lt(a))}}}function Ue(...e){return t=>{for(const n of e)typeof n=="function"?n(t):n&&(n.current=t)}}const oo="_input_1rs88_1",ao="_error_1rs88_20",ro="_sm_1rs88_38",lo="_md_1rs88_44",on={input:oo,error:ao,sm:ro,md:lo};function vn({"aria-describedby":e,"aria-invalid":t,className:n,error:s,hint:r,id:a,label:l,maxLength:c,required:u=!1,size:d="md",showCharacterCount:m=!1,defaultValue:g,onChange:h,value:p,ref:_,...f}){const{ref:x,count:M,updateCount:y}=is(p,g),b=[on.input,on[d],s&&on.error,n].filter(Boolean).join(" ");function D($){y($.target.value),h==null||h($)}return o.jsx(ze,{"aria-describedby":e,characterCount:M,error:s,hint:r,id:a,label:l,maxLength:c,required:u,showCharacterCount:m,children:({id:$,describedBy:k,invalid:C})=>o.jsx("input",{...f,defaultValue:g,id:$,ref:Ue(x,_),"aria-describedby":k,"aria-invalid":C||t,className:b,maxLength:c,onChange:D,required:u,value:p})})}function cs(e){const t=i.useRef(null),n=i.useRef(e);return n.current=e,i.useEffect(()=>{var a;const s=(a=t.current)==null?void 0:a.closest("form");if(!s)return;const r=()=>n.current();return s.addEventListener("reset",r),()=>s.removeEventListener("reset",r)},[]),t}const lt=",",io=3;function co(e){if(e.includes(lt))return e.replace(/\./g,"");const t=e.split(".");return t.length!==2||t[1].replace(/\D/g,"").length===io?e.replace(/\./g,""):t.join(lt)}function uo(e,t){return Number.isFinite(e)?new Intl.NumberFormat("en-US",{maximumFractionDigits:Math.max(t,0),useGrouping:!1}).format(e).replace(".",lt):""}function Be(e,t=0){const n=typeof e=="number"?uo(e,t):co(e),s=n.trimStart().startsWith("-")?"-":"",r=n.replace(/[^\d,]/g,""),[a="",...l]=r.split(lt),c=a.replace(/\D/g,"");if(t<=0)return`${s}${c}`;if(!r.includes(lt))return`${s}${c}`;const u=l.join("").replace(/\D/g,"").slice(0,t);return`${s}${c}${lt}${u}`}function fo(e,t="BRL",n=2){const s=Be(e,n),r=s.startsWith("-")?"-":"",[a="",l=""]=s.replace("-","").split(","),u=(a||"0").replace(/\B(?=(\d{3})+(?!\d))/g,"."),d=t==="BRL"?"R$":t;return n<=0?`${r}${d} ${u}`:`${r}${d} ${u},${l.padEnd(n,"0")}`}const mo={numerico:{day:"2-digit",month:"2-digit",year:"numeric"},curto:{day:"2-digit",month:"short",year:"numeric"},longo:{day:"2-digit",month:"long",year:"numeric"}},ho=/^\d{4}-\d{2}-\d{2}$/;function us(e){if(e instanceof Date)return e;if(ho.test(e)){const[t,n,s]=e.split("-").map(Number);return new Date(t,n-1,s)}return new Date(e)}function _o(e,{localidade:t="pt-BR",formato:n="numerico"}={}){const s=us(e);return Number.isNaN(s.getTime())?"":new Intl.DateTimeFormat(t,mo[n]).format(s)}function po(e,{localidade:t="pt-BR",segundos:n=!1}={}){const s=typeof e=="string"&&/^\d{2}:\d{2}/.test(e)?new Date(`1970-01-01T${e}`):us(e);return Number.isNaN(s.getTime())?"":new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",second:n?"2-digit":void 0,hourCycle:"h23"}).format(s)}function jn(e){return e===void 0?{}:{maximumFractionDigits:e,minimumFractionDigits:e}}function ds(e){return e?{compactDisplay:"short",notation:"compact"}:{}}function je(e,{casasDecimais:t,compacto:n,localidade:s="pt-BR"}={}){return Number.isFinite(e)?new Intl.NumberFormat(s,{...ds(n),...jn(t)}).format(e):""}function go(e,{casasDecimais:t,compacto:n,localidade:s="pt-BR",moeda:r="BRL"}={}){return Number.isFinite(e)?new Intl.NumberFormat(s,{currency:r,style:"currency",...ds(n),...jn(t)}).format(e):""}function fs(e,{casasDecimais:t=0,localidade:n="pt-BR"}={}){return Number.isFinite(e)?new Intl.NumberFormat(n,{style:"percent",...jn(t)}).format(e):""}const bo=/^\s*(\d{1,4})[/\-.](\d{1,2})[/\-.](\d{1,4})\s*$/;function yo(e){const t=e.match(bo);if(!t)return;const[,n,s,r]=t,[a,l,c]=n.length===4?[r,s,n]:[n,s,r];if(c.length===4)return a.padStart(2,"0")+l.padStart(2,"0")+c}function mn(e){const t=(yo(e)??e.replace(/\D/g,"")).slice(0,8);return t.length<=2?t:t.length<=4?t.slice(0,2)+"/"+t.slice(2):t.slice(0,2)+"/"+t.slice(2,4)+"/"+t.slice(4)}function ms(e){const t=e.trim().split(/[/\-.\s]+/).filter(Boolean);if(t.length!==3)return;const[n,s,r]=t.map(Number);if(![n,s,r].every(Number.isInteger)||r<1e3||s<1||s>12||n<1)return;const a=new Z.CalendarDate(r,s,n);return a.day===n&&a.month===s?a:void 0}function xo({decimalScale:e=0,defaultValue:t="",onKeyDown:n,onValueChange:s,value:r,...a}){const[l,c]=i.useState(()=>Be(t,e)),u=cs(()=>c(Be(t,e))),d=r===void 0?l:Be(r,e);function m(h){const p=Be(h.target.value,e);c(p),s==null||s(p)}function g(h){e===0&&(h.key===","||h.key===".")&&h.preventDefault(),n==null||n(h)}return o.jsx(vn,{...a,ref:Ue(u,a.ref),inputMode:e>0?"decimal":"numeric",onChange:m,onKeyDown:g,pattern:e>0?void 0:"-?[0-9]*",type:"text",value:d})}const vo="_control_jfj5j_1",jo="_input_jfj5j_7",$o="_error_jfj5j_26",Mo="_sm_jfj5j_44",No="_md_jfj5j_51",wo="_toggle_jfj5j_67",_t={control:vo,input:jo,error:$o,sm:Mo,md:No,toggle:wo};function Do({"aria-describedby":e,"aria-invalid":t,allowCopy:n=!1,className:s,defaultValue:r,disabled:a=!1,error:l,hint:c,id:u,label:d,maxLength:m,onChange:g,onCopy:h,onCut:p,onBlur:_,onValidationChange:f,required:x=!1,showToggle:M=!0,size:y="md",validate:b,validateOnBlur:D=!0,value:$,ref:k,...C}){const[H,S]=i.useState(!1),[z,w]=i.useState(!1),[A,R]=i.useState(),E=i.useRef(null),F=l??A,T=[_t.input,_t[y],F&&_t.error,s].filter(Boolean).join(" ");i.useEffect(()=>{var v;const N=(v=E.current)==null?void 0:v.form;if(!N)return;function I(){S(!1)}return N.addEventListener("submit",I),()=>N.removeEventListener("submit",I)},[]);function O(N){const I=b==null?void 0:b(N);R(I),f==null||f(I)}function K(N){b&&(z||!D)&&O(N.target.value),g==null||g(N)}function L(N){w(!0),b&&D&&O(N.target.value),_==null||_(N)}function P(N){h==null||h(N),n||N.preventDefault()}function j(N){p==null||p(N),n||N.preventDefault()}return o.jsx(ze,{"aria-describedby":e,error:F,hint:c,id:u,label:d,maxLength:m,required:x,children:({id:N,describedBy:I,invalid:v})=>o.jsxs("div",{className:_t.control,children:[o.jsx("input",{...C,autoComplete:C.autoComplete??"current-password",className:T,defaultValue:r,disabled:a,id:N,ref:Ue(E,k),"aria-describedby":I,"aria-invalid":v||t,maxLength:m,onChange:K,onCopy:P,onCut:j,onBlur:L,required:x,type:H?"text":"password",value:$}),M&&o.jsx("button",{className:_t.toggle,type:"button","aria-label":H?"Ocultar senha":"Mostrar senha","aria-pressed":H,disabled:a,onClick:()=>S(B=>!B),children:H?"Ocultar":"Mostrar"})]})})}function ko({currency:e="BRL",defaultValue:t="",decimalScale:n=2,onBlur:s,onFocus:r,onValueChange:a,value:l,...c}){const[u,d]=i.useState(()=>Be(t,n)),[m,g]=i.useState(!1),h=cs(()=>d(Be(t,n))),p=l===void 0?u:Be(l,n),_=m||!p?p:fo(p,e,n);function f(y){const b=Be(y.target.value,n);d(b),a==null||a(b)}function x(y){g(!0),r==null||r(y)}function M(y){g(!1),s==null||s(y)}return o.jsx(vn,{...c,ref:Ue(h,c.ref),inputMode:"decimal",onBlur:M,onChange:f,onFocus:x,type:"text",value:_})}const Ro="_textarea_1kzgu_1",Co="_error_1kzgu_20",Lo="_sm_1kzgu_39",Ao="_md_1kzgu_45",an={textarea:Ro,error:Co,sm:Lo,md:Ao};function Io({"aria-describedby":e,"aria-invalid":t,className:n,error:s,hint:r,id:a,label:l,maxLength:c,required:u=!1,rows:d=4,size:m="md",showCharacterCount:g=!1,defaultValue:h,onChange:p,value:_,ref:f,...x}){const{ref:M,count:y,updateCount:b}=is(_,h),D=[an.textarea,an[m],s&&an.error,n].filter(Boolean).join(" ");function $(k){b(k.target.value),p==null||p(k)}return o.jsx(ze,{"aria-describedby":e,characterCount:y,error:s,hint:r,id:a,label:l,maxLength:c,required:u,showCharacterCount:g,children:({id:k,describedBy:C,invalid:H})=>o.jsx("textarea",{...x,defaultValue:h,id:k,ref:Ue(M,f),"aria-describedby":C,"aria-invalid":H||t,className:D,maxLength:c,onChange:$,required:u,rows:d,value:_})})}const Oo="_field_1m5ai_1",So="_control_1m5ai_8",Eo="_input_1m5ai_15",To="_error_1m5ai_36",Fo="_text_1m5ai_74",Bo="_hint_1m5ai_81",Po="_errorMessage_1m5ai_82",Ge={field:Oo,control:So,input:Eo,error:To,text:Fo,hint:Bo,errorMessage:Po};function hs({"aria-describedby":e,className:t,error:n,hint:s,id:r,indeterminate:a=!1,label:l,ref:c,...u}){const d=i.useId(),m=r??`checkbox-${d}`,g=`${m}-message`,h=[e,n||s?g:void 0].filter(Boolean).join(" ")||void 0,p=[Ge.input,n&&Ge.error,t].filter(Boolean).join(" "),_=i.useCallback(f=>{f&&(f.indeterminate=a)},[a]);return o.jsxs("div",{className:Ge.field,children:[o.jsxs("label",{className:Ge.control,htmlFor:m,children:[o.jsx("input",{...u,ref:Ue(_,c),className:p,id:m,"aria-describedby":h,"aria-invalid":n?!0:void 0,type:"checkbox"}),o.jsx("span",{className:Ge.text,children:l})]}),(n||s)&&o.jsx("span",{className:n?Ge.errorMessage:Ge.hint,id:g,children:n||s})]})}const Ko="_group_x2ar9_1",zo="_legend_x2ar9_11",Ho="_required_x2ar9_20",qo="_options_x2ar9_25",Vo="_control_x2ar9_31",Uo="_input_x2ar9_38",Go="_error_x2ar9_59",Wo="_text_x2ar9_89",Xo="_hint_x2ar9_96",Yo="_errorMessage_x2ar9_97",Ae={group:Ko,legend:zo,required:Ho,options:qo,control:Vo,input:Uo,error:Go,text:Wo,hint:Xo,errorMessage:Yo},_s=i.createContext(null);function Qo(){const e=i.useContext(_s);if(!e)throw new Error("Radio precisa ser renderizado dentro de RadioGroup.");return e}function Zo({children:e,className:t,defaultValue:n,disabled:s=!1,error:r,hint:a,label:l,name:c,onValueChange:u,required:d=!1,value:m,...g}){const h=i.useId(),p=c??`radio-group-${h}`,_=`${p}-message`,f=r||a?_:void 0;return o.jsx(_s.Provider,{value:{defaultValue:n,disabled:s,invalid:!!r,name:p,onValueChange:u,value:m},children:o.jsxs("fieldset",{...g,className:[Ae.group,t].filter(Boolean).join(" "),role:"radiogroup","aria-describedby":f,"aria-required":d||void 0,children:[o.jsxs("legend",{className:Ae.legend,children:[l,d&&o.jsx("span",{className:Ae.required,"aria-hidden":"true",children:"*"})]}),o.jsx("div",{className:Ae.options,children:e}),(r||a)&&o.jsx("span",{className:r?Ae.errorMessage:Ae.hint,id:_,children:r||a})]})})}function Jo({className:e,disabled:t,id:n,label:s,onChange:r,ref:a,value:l,...c}){const u=Qo(),d=i.useId(),m=n??`radio-${d}`,g=u.value!==void 0,h=[Ae.input,u.invalid&&Ae.error,e].filter(Boolean).join(" ");return o.jsxs("label",{className:Ae.control,htmlFor:m,children:[o.jsx("input",{...c,className:h,id:m,checked:g?u.value===l:void 0,defaultChecked:g?void 0:u.defaultValue===l,disabled:t??u.disabled,name:u.name,onChange:p=>{var _;(_=u.onValueChange)==null||_.call(u,l),r==null||r(p)},ref:a,type:"radio",value:l}),o.jsx("span",{className:Ae.text,children:s})]})}const ea="_field_qjpma_1",ta="_control_qjpma_8",na="_input_qjpma_15",sa="_error_qjpma_56",oa="_text_qjpma_79",aa="_hint_qjpma_86",ra="_errorMessage_qjpma_87",We={field:ea,control:ta,input:na,error:sa,text:oa,hint:aa,errorMessage:ra};function la({"aria-describedby":e,className:t,error:n,hint:s,id:r,label:a,ref:l,...c}){const u=i.useId(),d=r??`switch-${u}`,m=`${d}-message`,g=[e,n||s?m:void 0].filter(Boolean).join(" ")||void 0,h=[We.input,n&&We.error,t].filter(Boolean).join(" ");return o.jsxs("div",{className:We.field,children:[o.jsxs("label",{className:We.control,htmlFor:d,children:[o.jsx("input",{...c,ref:l,className:h,id:d,"aria-describedby":g,"aria-invalid":n?!0:void 0,role:"switch",type:"checkbox"}),o.jsx("span",{className:We.text,children:a})]}),(n||s)&&o.jsx("span",{className:n?We.errorMessage:We.hint,id:m,children:n||s})]})}const ia="_alert_1iezv_1",ca="_title_1iezv_16",ua="_body_1iezv_20",da="_info_1iezv_24",fa="_success_1iezv_30",ma="_warning_1iezv_36",ha="_danger_1iezv_42",At={alert:ia,title:ca,body:ua,info:da,success:fa,warning:ma,danger:ha};function _a({children:e,className:t,title:n,tone:s="info",...r}){const a=[At.alert,At[s],t].filter(Boolean).join(" "),l=s==="danger"||s==="warning";return o.jsxs("div",{role:l?"alert":"status",...r,className:a,children:[n&&o.jsx("strong",{className:At.title,children:n}),e&&o.jsx("div",{className:At.body,children:e})]})}const pa="_progress_1cfl0_1",ga="_track_1cfl0_8",ba="_fill_1cfl0_15",ya="_indeterminate_1cfl0_22",xa="_value_1cfl0_30",va="_sm_1cfl0_40",ja="_md_1cfl0_44",nt={progress:pa,track:ga,fill:ba,indeterminate:ya,"pl-indeterminate":"_pl-indeterminate_1cfl0_1",value:xa,sm:va,md:ja};function $a({className:e,label:t,max:n=100,showValue:s=!1,size:r="md",value:a,...l}){const c=a===void 0,u=c?0:Math.min(Math.max(a,0),n),d=n>0?u/n*100:0,m=[nt.progress,nt[r],e].filter(Boolean).join(" ");return o.jsxs("div",{className:m,children:[o.jsx("div",{...l,className:nt.track,role:"progressbar","aria-label":t,"aria-valuemin":0,"aria-valuemax":n,"aria-valuenow":c?void 0:u,children:o.jsx("div",{className:c?nt.indeterminate:nt.fill,style:c?void 0:{width:`${d}%`}})}),s&&!c&&o.jsxs("span",{className:nt.value,children:[Math.round(d),"%"]})]})}const Ma="_popover_12zpc_1",Na={popover:Ma};function wa({open:e,...t}){return e?Oe.createPortal(o.jsx(Da,{...t}),document.body):null}function Da({"aria-label":e,"aria-labelledby":t,children:n,offset:s=8,onClose:r,placement:a="bottom start",triggerRef:l}){const c=i.useRef(null),{overlayProps:u}=xe.useOverlay({isOpen:!0,onClose:r,isDismissable:!0,shouldCloseOnBlur:!1},c),{overlayProps:d}=xe.useOverlayPosition({targetRef:l,overlayRef:c,placement:a,offset:s,isOpen:!0});return o.jsx(bn.FocusScope,{contain:!0,restoreFocus:!0,autoFocus:!0,children:o.jsx("div",{...u,ref:c,className:Na.popover,style:d.style,role:"dialog","aria-label":e,"aria-labelledby":t,children:n})})}const ka=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});function ps(e,t){return ka.compare(e,t)===0}function Ra(e,t){const n=e.normalize("NFC"),s=t.normalize("NFC");return ps(n.slice(0,s.length),s)}function Ca(e,t){const n=e.normalize("NFC"),s=t.normalize("NFC");if(!s)return!0;for(let r=0;r+s.length<=n.length;r+=1)if(ps(n.slice(r,r+s.length),s))return!0;return!1}function Mt(e,t){return t===void 0?-1:e.findIndex(n=>n.key===t)}function La(e){var t;return(t=e.find(n=>!n.disabled))==null?void 0:t.key}function Aa(e){for(let t=e.length-1;t>=0;t-=1)if(!e[t].disabled)return e[t].key}function Ia(e,t){for(let n=Mt(e,t)+1;n<e.length;n+=1)if(!e[n].disabled)return e[n].key}function On(e,t){const n=Mt(e,t);for(let s=(n<0?e.length:n)-1;s>=0;s-=1)if(!e[s].disabled)return e[s].key}function Oa(e,t,n){const s=t.trim();if(!s||e.length===0)return;const r=Mt(e,n);for(let a=1;a<=e.length;a+=1){const l=e[(r+a+e.length)%e.length];if(!l.disabled&&Ra(l.textValue??l.key,s))return l.key}}function gs(e,t,n,{allowEmpty:s=!1}={}){if(n==="none")return e;if(n==="single"){const a=s&&e.selectedKeys.has(t);return{focusedKey:t,selectedKeys:a?new Set:new Set([t])}}const r=new Set(e.selectedKeys);return r.has(t)?r.delete(t):r.add(t),{anchorKey:t,focusedKey:t,selectedKeys:r}}function Sn(e,t,n){const s=e.anchorKey??e.focusedKey??t,r=Mt(n,s),a=Mt(n,t);if(r<0||a<0)return gs(e,t,"multiple");const[l,c]=r<=a?[r,a]:[a,r],u=new Set(e.selectedKeys);for(let d=l;d<=c;d+=1)n[d].disabled||u.add(n[d].key);return{anchorKey:s,focusedKey:t,selectedKeys:u}}function bs(e,t){const n=t.filter(r=>!r.disabled),s=n.filter(r=>e.selectedKeys.has(r.key)).length;return s===0?"none":s===n.length?"all":"partial"}function Sa(e,t){const n=t.filter(a=>!a.disabled),s=new Set(e.selectedKeys),r=bs(e,t)!=="all";return n.forEach(a=>r?s.add(a.key):s.delete(a.key)),{...e,selectedKeys:s}}function Ea(e){return{focusedKey:e.focusedKey,selectedKeys:new Set}}function wt({allowEmpty:e=!1,defaultSelectedKeys:t,items:n,mode:s="single",onSelectionChange:r,selectedKeys:a,typeaheadDelay:l=500}){const[c,u]=i.useState(()=>({selectedKeys:new Set(t??[])})),d=i.useMemo(()=>a===void 0?void 0:new Set(a),[a]),m=d?{focusedKey:c.focusedKey,selectedKeys:d}:c,g=i.useMemo(()=>new Map(n.map(b=>[b.key,b])),[n]),h=i.useRef(new Map),p=i.useMemo(()=>{const b=[...m.selectedKeys].map(D=>g.get(D)??h.current.get(D)??{key:D});return h.current=new Map(b.map(D=>[D.key,D])),b},[g,m.selectedKeys]),_=i.useRef(""),f=i.useRef(void 0);i.useEffect(()=>()=>clearTimeout(f.current),[]);const x=i.useCallback(b=>{u(D=>D.focusedKey===b?D:{...D,focusedKey:b})},[]),M=i.useCallback(b=>{u(D=>({...b,selectedKeys:d?D.selectedKeys:b.selectedKeys})),r==null||r(b.selectedKeys)},[d,r]);function y(b,D){if(b!==void 0){if(D&&s==="multiple"){M(Sn(m,b,n));return}x(b)}}return{...m,selectedItems:p,clear:()=>M(Ea(m)),focus:x,focusFirst:b=>y(La(n),b),focusLast:b=>y(Aa(n),b),focusNext:b=>y(Ia(n,m.focusedKey)??m.focusedKey,b),focusPrevious:b=>y(On(n,m.focusedKey)??m.focusedKey,b),select:b=>M(gs(m,b,s,{allowEmpty:e})),selectRange:b=>M(Sn(m,b,n)),status:bs(m,n),toggleAll:()=>M(Sa(m,n)),search:b=>{_.current+=b,clearTimeout(f.current),f.current=setTimeout(()=>{_.current=""},l);const D=_.current.length>1?On(n,m.focusedKey):m.focusedKey,$=Oa(n,_.current,D);$&&x($)}}}const Ta="_tabs_gs9uk_1",Fa="_horizontal_gs9uk_7",Ba="_list_gs9uk_11",Pa="_active_gs9uk_17",Ka="_vertical_gs9uk_23",za="_tab_gs9uk_1",Ha="_panel_gs9uk_45",st={tabs:Ta,horizontal:Fa,list:Ba,active:Pa,vertical:Ka,tab:za,panel:Ha};function qa({className:e,defaultSelectedKey:t,items:n,label:s,onSelectionChange:r,orientation:a="horizontal",selectedKey:l,...c}){var M;const u=`tabs-${i.useId()}`,d=i.useRef(new Map),m=i.useMemo(()=>n.map(y=>({key:y.key,disabled:y.disabled,textValue:y.label})),[n]),g=(M=m.find(y=>!y.disabled))==null?void 0:M.key,h=wt({items:m,mode:"single",defaultSelectedKeys:l===void 0?[t??g??""]:void 0,selectedKeys:l===void 0?void 0:[l],onSelectionChange:y=>{const[b]=y;b!==void 0&&(r==null||r(b))}}),[p]=h.selectedKeys,_=n.find(y=>y.key===p);i.useEffect(()=>{var y;h.focusedKey&&((y=d.current.get(h.focusedKey))==null||y.focus())},[h.focusedKey]);function f(y){y&&h.select(y)}function x(y){var k,C;const b=h.focusedKey??p,D=a==="vertical"?"ArrowDown":"ArrowRight",$=a==="vertical"?"ArrowUp":"ArrowLeft";y.key===D?(y.preventDefault(),f(En(m,b,1))):y.key===$?(y.preventDefault(),f(En(m,b,-1))):y.key==="Home"?(y.preventDefault(),f((k=m.find(H=>!H.disabled))==null?void 0:k.key)):y.key==="End"&&(y.preventDefault(),f((C=[...m].reverse().find(H=>!H.disabled))==null?void 0:C.key))}return o.jsxs("div",{...c,className:[st.tabs,st[a],e].filter(Boolean).join(" "),children:[o.jsx("div",{className:st.list,role:"tablist","aria-label":s,"aria-orientation":a,onKeyDown:x,children:n.map(y=>o.jsx("button",{ref:b=>{b?d.current.set(y.key,b):d.current.delete(y.key)},className:[st.tab,p===y.key&&st.active].filter(Boolean).join(" "),type:"button",role:"tab",id:`${u}-${y.key}`,"aria-controls":p===y.key?`${u}-${y.key}-panel`:void 0,"aria-selected":p===y.key,disabled:y.disabled,tabIndex:p===y.key?0:-1,onClick:()=>h.select(y.key),children:y.label},y.key))}),_&&o.jsx("div",{className:st.panel,role:"tabpanel",id:`${u}-${_.key}-panel`,"aria-labelledby":`${u}-${_.key}`,tabIndex:0,children:_.content})]})}function En(e,t,n){const s=e.length,r=e.findIndex(a=>a.key===t);for(let a=1;a<=s;a+=1){const l=e[(r+n*a+s*s)%s];if(!l.disabled)return l.key}return t}const Va="_list_hggu8_1",Ua="_item_hggu8_11",Ga="_link_hggu8_20",Wa="_current_hggu8_32",Xa="_separator_hggu8_38",pt={list:Va,item:Ua,link:Ga,current:Wa,separator:Xa};function Ya({as:e="a",className:t,items:n,label:s="Trilha de navegacao",...r}){return o.jsx("nav",{...r,"aria-label":s,className:t,children:o.jsx("ol",{className:pt.list,children:n.map((a,l)=>{const c=l===n.length-1;return o.jsxs("li",{className:pt.item,children:[c||!a.href?o.jsx("span",{className:pt.current,"aria-current":c?"page":void 0,children:a.label}):o.jsx(e,{className:pt.link,href:a.href,...a.linkProps,children:a.label}),!c&&o.jsx(Gt,{className:pt.separator,size:12})]},`${a.label}-${l}`)})})})}const Qa="_pagination_1n2yq_1",Za="_list_1n2yq_7",Ja="_page_1n2yq_16",er="_step_1n2yq_17",tr="_current_1n2yq_35",nr="_gap_1n2yq_53",Xe={pagination:Qa,list:Za,page:Ja,step:er,current:tr,gap:nr};function sr({className:e,label:t="Paginacao",onPageChange:n,page:s,pageCount:r,siblings:a=1,...l}){if(r<=1)return null;const c=Math.min(Math.max(s,1),r),u=or(c,r,a);return o.jsxs("nav",{...l,"aria-label":t,className:[Xe.pagination,e].filter(Boolean).join(" "),children:[o.jsx("button",{className:Xe.step,type:"button","aria-label":"Pagina anterior",disabled:c===1,onClick:()=>n(c-1),children:o.jsx(xn,{size:14})}),o.jsx("ol",{className:Xe.list,children:u.map((d,m)=>d===null?o.jsx("li",{className:Xe.gap,"aria-hidden":"true",children:"…"},`gap-${m}`):o.jsx("li",{children:o.jsx("button",{className:[Xe.page,d===c&&Xe.current].filter(Boolean).join(" "),type:"button","aria-label":`Pagina ${d}`,"aria-current":d===c?"page":void 0,onClick:()=>n(d),children:d})},d))}),o.jsx("button",{className:Xe.step,type:"button","aria-label":"Proxima pagina",disabled:c===r,onClick:()=>n(c+1),children:o.jsx(Gt,{size:14})})]})}function or(e,t,n){const s=n*2+5;if(t<=s)return Array.from({length:t},(c,u)=>u+1);const r=Math.max(2,e-n),a=Math.min(t-1,e+n),l=[1];r>2&&l.push(null);for(let c=r;c<=a;c+=1)l.push(c);return a<t-1&&l.push(null),t>1&&l.push(t),l}const ar="_accordion_11w1x_1",rr="_divided_11w1x_7",lr="_item_11w1x_13",ir="_trigger_11w1x_17",cr="_panel_11w1x_21",ur="_heading_11w1x_25",dr="_icon_11w1x_50",fr="_label_11w1x_59",mr="_iconLeft_11w1x_63",Re={accordion:ar,divided:rr,item:lr,trigger:ir,panel:cr,heading:ur,icon:dr,label:fr,iconLeft:mr};function hr({className:e,defaultExpandedKeys:t,expandedKeys:n,items:s,multiple:r=!1,onExpandedChange:a,iconPosition:l="right",divider:c=!0,...u}){const d=`accordion-${i.useId()}`,m=i.useRef(new Map),g=i.useMemo(()=>s.map(_=>({key:_.key,disabled:_.disabled,textValue:_.label})),[s]),h=wt({allowEmpty:!0,items:g,mode:r?"multiple":"single",defaultSelectedKeys:n===void 0?t:void 0,selectedKeys:n,onSelectionChange:_=>a==null?void 0:a([..._])});function p(_,f){var M,y,b;let x;_.key==="ArrowDown"?x=Tn(g,f,1):_.key==="ArrowUp"?x=Tn(g,f,-1):_.key==="Home"?x=(M=g.find(D=>!D.disabled))==null?void 0:M.key:_.key==="End"&&(x=(y=[...g].reverse().find(D=>!D.disabled))==null?void 0:y.key),x&&(_.preventDefault(),(b=m.current.get(x))==null||b.focus())}return o.jsx("div",{...u,className:[Re.accordion,c&&Re.divided,e].filter(Boolean).join(" "),children:s.map(_=>{const f=h.selectedKeys.has(_.key);return o.jsxs("div",{className:Re.item,children:[o.jsx("h3",{className:Re.heading,children:o.jsxs("button",{ref:x=>{x?m.current.set(_.key,x):m.current.delete(_.key)},className:[Re.trigger,l==="left"&&Re.iconLeft].filter(Boolean).join(" "),type:"button",id:`${d}-${_.key}`,"aria-controls":`${d}-${_.key}-panel`,"aria-expanded":f,disabled:_.disabled,onClick:()=>h.select(_.key),onKeyDown:x=>p(x,_.key),children:[o.jsx("span",{className:Re.label,children:_.label}),f?o.jsx(os,{className:Re.icon,size:20}):o.jsx(as,{className:Re.icon,size:20})]})}),o.jsx("div",{className:Re.panel,id:`${d}-${_.key}-panel`,role:"region","aria-labelledby":`${d}-${_.key}`,hidden:!f,children:_.content})]},_.key)})})}function Tn(e,t,n){const s=e.length,r=e.findIndex(a=>a.key===t);for(let a=1;a<=s;a+=1){const l=e[(r+n*a+s*s)%s];if(!l.disabled)return l.key}return t}const Fn=6,_r=24;function pr(e,t){const n=i.useRef(null),[s,r]=i.useState(0),[a,l]=i.useState(0),c=i.useCallback(x=>{if(!x)return;const M=x.nextElementSibling,y=M?M.offsetTop-x.offsetTop:x.offsetHeight;y>0&&r(b=>b===y?b:y)},[]),u=i.useCallback(x=>{n.current=x},[]),d=i.useCallback(()=>{var x;l(((x=n.current)==null?void 0:x.scrollTop)??0)},[]),m=t!==void 0&&s>0&&e*s>t,g=t!==void 0&&s===0,h=i.useCallback(x=>{const M=n.current;if(!M||x<0)return;const y=x*s,b=y+s;y<M.scrollTop?M.scrollTop=y:b>M.scrollTop+M.clientHeight&&(M.scrollTop=b-M.clientHeight)},[s]);if(!m)return{active:m,attachScroll:u,measureItem:c,onScroll:d,padding:{before:0,after:0},scrollToIndex:h,start:0,end:g?Math.min(e,_r):e};const p=Math.ceil(t/s),_=Math.max(0,Math.floor(a/s)-Fn),f=Math.min(e,_+p+Fn*2);return{active:m,attachScroll:u,measureItem:c,onScroll:d,padding:{before:_*s,after:(e-f)*s},scrollToIndex:h,start:_,end:f}}const gr="_list_dgig6_1",br="_search_dgig6_12",yr="_options_dgig6_35",xr="_spacer_dgig6_53",vr="_option_dgig6_35",jr="_disabled_dgig6_71",$r="_focused_dgig6_76",Mr="_box_dgig6_87",Nr="_checked_dgig6_96",wr="_group_dgig6_102",Dr="_status_dgig6_112",kr="_empty_dgig6_113",be={list:gr,search:br,options:yr,spacer:xr,option:vr,disabled:jr,focused:$r,box:Mr,checked:Nr,group:wr,status:Dr,empty:kr};function $t(e,t){return e+"-option-"+t}function Wt({baseId:e,className:t,elementRef:n,empty:s,height:r,holdsFocus:a=!0,label:l,listing:c,loading:u=!1,loadingMessage:d="Carregando",onKeyDown:m,onSelect:g,style:h,tabIndex:p=0}){const{detached:_,focusedKey:f,isSelected:x,select:M,selectionMode:y,visible:b}=c,D=b.findIndex(O=>O.value===f);function $(O,K){O.disabled||(M(O,K),g==null||g(O))}const{active:k,attachScroll:C,measureItem:H,onScroll:S,padding:z,scrollToIndex:w,start:A,end:R}=pr(b.length,r),E=i.useCallback(O=>{C(O),n&&(n.current=O)},[C,n]);i.useEffect(()=>{var K,L;const O=b.findIndex(P=>P.value===f);f===void 0||O<0||(k?w(O):(L=(K=document.getElementById($t(e,O)))==null?void 0:K.scrollIntoView)==null||L.call(K,{block:"nearest"}))},[k,e,f,w,b]);const F=b.slice(A,R);if(y==="none")return o.jsxs("ul",{"aria-busy":u||void 0,className:[be.options,t].filter(Boolean).join(" "),id:e+"-options",onScroll:S,ref:E,style:{height:r,...h},children:[u&&o.jsx("li",{className:be.status,children:d}),o.jsx("li",{"aria-hidden":"true",className:be.spacer,style:{height:z.before}}),F.map((O,K)=>o.jsx("li",{className:be.option,ref:K===0?H:void 0,children:O.label},O.value)),o.jsx("li",{"aria-hidden":"true",className:be.spacer,style:{height:z.after}}),!u&&b.length===0&&s]});function T(O,K,L){const P=x(O.value);return o.jsxs("div",{"aria-disabled":O.disabled||void 0,"aria-posinset":K>0?K:void 0,"aria-selected":P,"aria-setsize":K>0?b.length:void 0,className:[be.option,f===O.value&&be.focused,O.disabled&&be.disabled].filter(Boolean).join(" "),id:K>0?$t(e,K-1):void 0,onClick:j=>$(O,j.shiftKey),onMouseDown:j=>j.preventDefault(),ref:L?H:void 0,role:"option",children:[y==="multiple"&&o.jsx("span",{"aria-hidden":"true",className:[be.box,P&&be.checked].filter(Boolean).join(" ")}),O.label]},O.value)}return o.jsxs("div",{"aria-activedescendant":a&&D>=0?$t(e,D):void 0,"aria-busy":u||void 0,"aria-label":l,"aria-multiselectable":y==="multiple"||void 0,className:[be.options,t].filter(Boolean).join(" "),id:e+"-options",onKeyDown:m,onScroll:S,ref:E,role:"listbox",style:{height:r,...h},tabIndex:a?p:void 0,children:[u&&o.jsx("p",{className:be.status,children:d}),_.length>0&&o.jsx("div",{"aria-label":"Selecionados",className:be.group,role:"group",children:_.map(O=>T(O,0,!1))}),o.jsx("div",{"aria-hidden":"true",className:be.spacer,style:{height:z.before}}),F.map((O,K)=>T(O,A+K+1,K===0)),o.jsx("div",{"aria-hidden":"true",className:be.spacer,style:{height:z.after}}),!u&&b.length===0&&s]})}function Rr(e){return{value:e.key,label:e.textValue??e.key}}function Xt({defaultValue:e,items:t,onSearch:n,onSelectionChange:s,selectionMode:r="none",value:a}){const[l,c]=i.useState(""),u=i.useMemo(()=>n||!l?t:t.filter(f=>Ca(f.label,l)),[t,n,l]),d=i.useMemo(()=>u.map(f=>({key:f.value,disabled:f.disabled,textValue:f.label})),[u]),m=i.useRef(new Map);for(const f of t)m.current.set(f.value,f);const g=wt({items:d,mode:r,defaultSelectedKeys:e==null?void 0:e.map(f=>f.value),selectedKeys:a==null?void 0:a.map(f=>f.value),onSelectionChange:f=>s==null?void 0:s([...f].map(x=>m.current.get(x)).filter(x=>x!==void 0))}),h=a??g.selectedItems.map(Rr),p=i.useMemo(()=>{if(!l||r!=="multiple")return[];const f=new Set(u.map(x=>x.value));return h.filter(x=>!f.has(x.value))},[h,r,l,u]);function _(f){if(r==="none")return;const x=f.shiftKey;if(f.key==="ArrowDown")f.preventDefault(),g.focusedKey===void 0?g.focusFirst(x):g.focusNext(x);else if(f.key==="ArrowUp")f.preventDefault(),g.focusPrevious(x);else if(f.key==="Home")f.preventDefault(),g.focusFirst(x);else if(f.key==="End")f.preventDefault(),g.focusLast(x);else if(f.key==="Enter"||f.key===" "){const M=u.find(y=>y.value===g.focusedKey);M&&!M.disabled&&(f.preventDefault(),g.select(M.value))}}return{detached:p,focus:g.focus,focusFirst:g.focusFirst,focusLast:g.focusLast,focusedKey:g.focusedKey,handleKeyDown:_,isSelected:f=>h.some(x=>x.value===f),filter:f=>{c(f),g.focus(void 0),n==null||n(f)},typeahead:g.search,select:(f,x)=>{if(!f.disabled){if(x&&r==="multiple"){g.selectRange(f.value);return}g.select(f.value)}},selected:h,selectionMode:r,status:g.status,toggleAll:g.toggleAll,term:l,visible:u}}const Cr="_trigger_14fm6_1",Lr="_error_14fm6_21",Ar="_sm_14fm6_51",Ir="_md_14fm6_57",Or="_value_14fm6_61",Sr="_placeholder_14fm6_67",Er="_chevron_14fm6_71",Tr="_panel_14fm6_76",Ye={trigger:Cr,error:Lr,sm:Ar,md:Ir,value:Or,placeholder:Sr,chevron:Er,panel:Tr};function Fr({defaultValue:e,name:t,disabled:n=!1,error:s,hint:r,id:a,label:l,onValueChange:c,options:u,placeholder:d="Selecione",required:m=!1,size:g="md",value:h}){const p=i.useRef(null),[_,f]=i.useState(!1),x=Xt({items:u,selectionMode:"single",defaultValue:e===void 0?void 0:u.filter($=>$.value===e),value:h===void 0?void 0:u.filter($=>$.value===h),onSelectionChange:$=>{const[k]=$;k&&(c==null||c(k.value))}}),[M]=x.selected;function y(){var $;f(!1),($=p.current)==null||$.focus()}function b(){var $;n||(x.focus((M==null?void 0:M.value)??(($=u.find(k=>!k.disabled))==null?void 0:$.value)),f(!0))}function D($){["ArrowDown","ArrowUp","Enter"," "].includes($.key)&&($.preventDefault(),b())}return o.jsx(ze,{error:s,hint:r,id:a,label:l,required:m,children:({id:$,describedBy:k,invalid:C})=>o.jsxs(o.Fragment,{children:[t!==void 0&&o.jsx("input",{name:t,type:"hidden",value:(M==null?void 0:M.value)??""}),o.jsxs("button",{ref:p,className:[Ye.trigger,Ye[g],s&&Ye.error].filter(Boolean).join(" "),type:"button",id:$,role:"combobox","aria-describedby":k,"aria-invalid":C||void 0,"aria-haspopup":"listbox","aria-expanded":_,"aria-required":m||void 0,disabled:n,onClick:()=>_?y():b(),onKeyDown:D,children:[o.jsx("span",{className:M?Ye.value:Ye.placeholder,children:(M==null?void 0:M.label)??d}),o.jsx(ts,{className:Ye.chevron,size:14})]}),_&&Oe.createPortal(o.jsx(Br,{label:l??d,listing:x,onClose:y,triggerRef:p}),document.body)]})})}function Br({label:e,listing:t,onClose:n,triggerRef:s}){var p;const r=i.useRef(null),a=i.useRef(null),l=i.useRef("listbox-"+Math.random().toString(36).slice(2,9)).current,{overlayProps:c}=xe.useOverlay({isOpen:!0,onClose:n,isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:_=>{var f;return!((f=s.current)!=null&&f.contains(_))}},r),{overlayProps:u}=xe.useOverlayPosition({targetRef:s,overlayRef:r,placement:"bottom start",offset:6,containerPadding:8,isOpen:!0}),[d,m]=i.useState(),g=Math.min(Number((p=u.style)==null?void 0:p.maxHeight)||280,280);i.useLayoutEffect(()=>{var _;m((_=s.current)==null?void 0:_.offsetWidth)},[s]),i.useEffect(()=>{var _;(_=a.current)==null||_.focus()},[]);function h(_){if(_.key==="Escape"||_.key==="Tab"){n();return}if(_.key==="Enter"||_.key===" "){_.preventDefault();const f=t.visible.find(x=>x.value===t.focusedKey);f&&!f.disabled&&(t.select(f),n());return}if(_.key.length===1&&!_.metaKey&&!_.ctrlKey){t.typeahead(_.key);return}t.handleKeyDown(_)}return o.jsx("div",{...c,ref:r,className:Ye.panel,style:{...u.style,width:d,maxHeight:g},children:o.jsx(Wt,{baseId:l,elementRef:a,label:e,listing:t,onKeyDown:_=>{var f;h(_),(f=c.onKeyDown)==null||f.call(c,_)},onSelect:n,tabIndex:-1})})}const Pr="_input_1u88z_1",Kr="_error_1u88z_17",zr="_sm_1u88z_47",Hr="_md_1u88z_53",qr="_panel_1u88z_57",Vr="_empty_1u88z_69",gt={input:Pr,error:Kr,sm:zr,md:Hr,panel:qr,empty:Vr};function Ur({defaultValue:e,name:t,disabled:n=!1,emptyMessage:s="Nenhum resultado",error:r,hint:a,id:l,label:c,loading:u=!1,onSearch:d,onValueChange:m,options:g,placeholder:h,required:p=!1,size:_="md",value:f}){var K;const x=i.useRef(null),M=i.useRef(null),y=`combobox-${i.useId()}`,[b,D]=i.useState(!1),[$,k]=i.useState(!1),C=Xt({items:g,selectionMode:"single",defaultValue:e===void 0?void 0:g.filter(L=>L.value===e),value:f===void 0?void 0:g.filter(L=>L.value===f),onSearch:d,onSelectionChange:L=>{const[P]=L;P&&(m==null||m(P.value))}}),[H]=C.selected,S=$?C.term:(H==null?void 0:H.label)??"",z=C.visible.findIndex(L=>L.value===C.focusedKey),{overlayProps:w}=xe.useOverlayPosition({targetRef:x,overlayRef:M,placement:"bottom start",offset:6,containerPadding:8,isOpen:b}),[A,R]=i.useState(),E=Math.min(Number((K=w.style)==null?void 0:K.maxHeight)||280,280);i.useLayoutEffect(()=>{var L;R((L=x.current)==null?void 0:L.offsetWidth)},[b]);function F(){k(!1),C.filter("")}function T(){D(!1),F()}function O(L){if(L.key==="ArrowDown"&&!b){L.preventDefault(),D(!0),C.focusFirst();return}if(L.key==="Escape"){T();return}if(L.key==="Enter"){const P=C.visible.find(j=>j.value===C.focusedKey);b&&P&&!P.disabled&&(L.preventDefault(),C.select(P),T());return}C.handleKeyDown(L)}return o.jsx(ze,{error:r,hint:a,id:l,label:c,required:p,children:({id:L,describedBy:P,invalid:j})=>o.jsxs(o.Fragment,{children:[t!==void 0&&o.jsx("input",{name:t,type:"hidden",value:(H==null?void 0:H.value)??""}),o.jsx("input",{ref:x,className:[gt.input,gt[_],r&>.error].filter(Boolean).join(" "),id:L,type:"text",role:"combobox",autoComplete:"off","aria-describedby":P,"aria-invalid":j||void 0,"aria-expanded":b,"aria-autocomplete":"list","aria-controls":b?y+"-options":void 0,"aria-activedescendant":b&&z>=0?$t(y,z):void 0,"aria-required":p||void 0,disabled:n,placeholder:h,value:S,onBlur:()=>D(!1),onChange:N=>{k(!0),D(!0),C.filter(N.target.value)},onClick:()=>D(!0),onKeyDown:O}),b&&Oe.createPortal(o.jsx("div",{ref:M,className:gt.panel,style:{...w.style,width:A,maxHeight:E},children:o.jsx(Wt,{baseId:y,empty:o.jsx("p",{className:gt.empty,children:s}),holdsFocus:!1,label:c??h??"Opcoes",listing:C,loading:u,onSelect:T})}),document.body)]})})}const Gr="_menu_opb5f_1",Wr="_item_opb5f_20",Bn={menu:Gr,item:Wr};function Pn(e,t){return n=>{e==null||e(n),t(n)}}function Xr({children:e,items:t,label:n}){const s=i.useRef(null),[r,a]=i.useState(!1),[l,c]=i.useState("first"),u=i.useRef(!1);function d(p){c(p),a(!0)}function m(){u.current=!0,a(!1)}i.useEffect(()=>{var p;!r&&u.current&&(u.current=!1,(p=s.current)==null||p.focus())},[r]);const g=e.props,h=i.cloneElement(e,{ref:Ue(s,e.ref),"aria-haspopup":"menu","aria-expanded":r,onClick:Pn(g.onClick,()=>r?m():d("first")),onKeyDown:Pn(g.onKeyDown,p=>{(p.key==="ArrowDown"||p.key==="ArrowUp")&&(p.preventDefault(),d(p.key==="ArrowDown"?"first":"last"))})});return o.jsxs(o.Fragment,{children:[h,r&&Oe.createPortal(o.jsx(bn.FocusScope,{contain:!0,children:o.jsx(Yr,{items:t,label:n,openedWith:l,onClose:m,triggerRef:s})}),document.body)]})}function Yr({items:e,label:t,onClose:n,openedWith:s,triggerRef:r}){var D;const a=i.useRef(null),l=i.useRef(new Map),c=i.useMemo(()=>e.map($=>({key:$.key,disabled:$.disabled,textValue:$.label})),[e]),u=wt({items:c,mode:"none"}),{focusedKey:d,focusFirst:m,focusLast:g,focusNext:h,focusPrevious:p,search:_}=u,{overlayProps:f}=xe.useOverlay({isOpen:!0,onClose:n,isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:$=>{var k;return!((k=r.current)!=null&&k.contains($))}},a),{overlayProps:x}=xe.useOverlayPosition({targetRef:r,overlayRef:a,placement:"bottom start",offset:6,containerPadding:8,isOpen:!0}),M=Math.min(Number((D=x.style)==null?void 0:D.maxHeight)||360,360);i.useEffect(()=>{s==="last"?g():m()},[]),i.useEffect(()=>{var $;d&&(($=l.current.get(d))==null||$.focus())},[d]);function y($){var k;$.disabled||((k=$.onSelect)==null||k.call($),n())}function b($){$.key==="ArrowDown"?($.preventDefault(),h()):$.key==="ArrowUp"?($.preventDefault(),p()):$.key==="Home"?($.preventDefault(),m()):$.key==="End"?($.preventDefault(),g()):$.key==="Escape"||$.key==="Tab"?n():$.key.length===1&&!$.metaKey&&!$.ctrlKey&&_($.key)}return o.jsx("div",{...f,"data-react-aria-top-layer":"true",ref:a,className:Bn.menu,style:{...x.style,maxHeight:M},role:"menu","aria-label":t,onKeyDown:$=>{var k;b($),(k=f.onKeyDown)==null||k.call(f,$)},children:e.map($=>o.jsx("button",{ref:k=>{k?l.current.set($.key,k):l.current.delete($.key)},className:Bn.item,type:"button",role:"menuitem",disabled:$.disabled,tabIndex:d===$.key?0:-1,onClick:()=>y($),children:$.label},$.key))})}const Qr="_tooltip_1gje7_1",Zr={tooltip:Qr};function bt(e,t){return n=>{e==null||e(n),t(n)}}function ys({children:e,content:t,delay:n=500,placement:s="top"}){const r=i.useRef(null),[a,l]=i.useState(!1),c=i.useRef(void 0),u=`tooltip-${i.useId()}`,d=i.useCallback(()=>{clearTimeout(c.current),l(!1)},[]);i.useEffect(()=>()=>clearTimeout(c.current),[]);const m=e.props,g=i.cloneElement(e,{ref:Ue(r,e.ref),"aria-describedby":a?[m["aria-describedby"],u].filter(Boolean).join(" "):m["aria-describedby"],onMouseEnter:bt(m.onMouseEnter,()=>{clearTimeout(c.current),c.current=setTimeout(()=>l(!0),n)}),onMouseLeave:bt(m.onMouseLeave,d),onFocus:bt(m.onFocus,()=>l(!0)),onBlur:bt(m.onBlur,d),onKeyDown:bt(m.onKeyDown,h=>{h.key==="Escape"&&d()})});return o.jsxs(o.Fragment,{children:[g,a&&Oe.createPortal(o.jsx(Jr,{content:t,id:u,placement:s,triggerRef:r}),document.body)]})}function Jr({content:e,id:t,placement:n,triggerRef:s}){const r=i.useRef(null),{overlayProps:a}=xe.useOverlayPosition({targetRef:s,overlayRef:r,placement:n,offset:6,isOpen:!0});return o.jsx("div",{ref:r,className:Zr.tooltip,"data-react-aria-top-layer":"true",id:t,role:"tooltip",style:a.style,children:e})}const el="_underlay_1jlsv_1",tl="_dialog_1jlsv_12",nl="_sm_1jlsv_29",sl="_md_1jlsv_33",ol="_lg_1jlsv_37",al="_header_1jlsv_41",rl="_title_1jlsv_48",ll="_close_1jlsv_57",il="_description_1jlsv_78",cl="_body_1jlsv_86",ul="_footer_1jlsv_93",Ee={underlay:el,dialog:tl,sm:nl,md:sl,lg:ol,header:al,title:rl,close:ll,description:il,body:cl,footer:ul};function dl({open:e,...t}){return e?Oe.createPortal(o.jsx(fl,{...t}),document.body):null}function fl({children:e,description:t,dismissable:n=!0,footer:s,onClose:r,size:a="md",title:l}){const c=i.useRef(null),u=i.useId(),d=`${u}-title`,m=`${u}-description`,{overlayProps:g,underlayProps:h}=xe.useOverlay({isOpen:!0,onClose:r,isDismissable:n,isKeyboardDismissDisabled:!n},c);return xe.usePreventScroll(),i.useEffect(()=>c.current?xe.ariaHideOutside([c.current]):void 0,[]),o.jsx("div",{...h,className:Ee.underlay,children:o.jsx(bn.FocusScope,{contain:!0,restoreFocus:!0,autoFocus:!0,children:o.jsxs("div",{...g,ref:c,className:[Ee.dialog,Ee[a]].join(" "),role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":t?m:void 0,children:[o.jsxs("header",{className:Ee.header,children:[o.jsx("h2",{className:Ee.title,id:d,children:l}),n&&o.jsx("button",{className:Ee.close,type:"button","aria-label":"Fechar",onClick:r,children:o.jsx(ss,{size:16})})]}),t&&o.jsx("p",{className:Ee.description,id:m,children:t}),e&&o.jsx("div",{className:Ee.body,children:e}),s&&o.jsx("div",{className:Ee.footer,children:s})]})})})}const ml="_badge_1oren_1",hl="_dot_1oren_18",_l="_ok_1oren_26",pl="_warn_1oren_31",gl="_info_1oren_36",bl="_danger_1oren_41",yl="_primary_1oren_46",xl="_outline_1oren_51",It={badge:ml,dot:hl,ok:_l,warn:pl,info:gl,danger:bl,primary:yl,outline:xl};function vl({children:e,className:t,dot:n=!1,outline:s=!1,tone:r="neutral",...a}){const l=[It.badge,It[r],s&&It.outline,t].filter(Boolean).join(" ");return o.jsxs("span",{...a,className:l,children:[n&&o.jsx("span",{className:It.dot,"aria-hidden":"true"}),e]})}const jl="_avatar_dggqt_1",$l="_sm_dggqt_14",Ml="_md_dggqt_20",Nl="_lg_dggqt_26",Kn={avatar:jl,sm:$l,md:Ml,lg:Nl};function wl(e){return e.trim().split(/\s+/).filter(Boolean).slice(0,2).map(n=>n[0]).join("").toUpperCase()||"?"}function Dl({className:e,name:t,onError:n,size:s="md",src:r,...a}){const[l,c]=i.useState(!1),u=[Kn.avatar,Kn[s],e].filter(Boolean).join(" "),d=!!r&&!l;i.useEffect(()=>{c(!1)},[r]);function m(g){c(!0),n==null||n(g)}return d?o.jsx("img",{...a,className:u,src:r,alt:t,onError:m}):o.jsx("span",{...a,className:u,role:"img","aria-label":t,children:wl(t)})}const xs=i.createContext(void 0);function Yt(e){const t=i.useContext(xs);if(!t)throw new Error(e+" deve ser usado dentro de List.");return t}function Dt({children:e,className:t,defaultValue:n,items:s,label:r,loading:a=!1,loadingMessage:l="Carregando",onSearch:c,onSelectionChange:u,selectionMode:d="none",value:m,...g}){const h=i.useId(),[p,_]=i.useState(!1),f=Xt({defaultValue:n,items:s,onSearch:c,onSelectionChange:u,selectionMode:d,value:m}),x={baseId:h,claimFocus:i.useCallback(()=>_(!0),[]),label:r,listing:f,loading:a,loadingMessage:l,searchPresent:p};return o.jsx("div",{...g,className:[be.list,t].filter(Boolean).join(" "),children:o.jsx(xs.Provider,{value:x,children:e})})}function kl({placeholder:e="Buscar"}){const{baseId:t,claimFocus:n,label:s,listing:r}=Yt("List.Search");i.useEffect(n,[n]);const a=r.visible.findIndex(l=>l.value===r.focusedKey);return o.jsx("input",{"aria-activedescendant":a>=0?$t(t,a):void 0,"aria-controls":t+"-options","aria-label":s?"Buscar em "+s:e,autoComplete:"off",className:be.search,onChange:l=>r.filter(l.target.value),onKeyDown:r.handleKeyDown,placeholder:e,type:"search",value:r.term})}function Rl({height:e}){const{baseId:t,label:n,listing:s,loading:r,loadingMessage:a,searchPresent:l}=Yt("List.Options");return o.jsx(Wt,{baseId:t,height:e,label:n,holdsFocus:!l,listing:s,loading:r,loadingMessage:a,onKeyDown:l?void 0:s.handleKeyDown})}function Cl({label:e="Selecionar todos"}){const{listing:t}=Yt("List.SelectAll");return t.selectionMode!=="multiple"?null:o.jsx(hs,{checked:t.status==="all",indeterminate:t.status==="partial",label:e,onChange:()=>t.toggleAll()})}function Ll({children:e}){const{listing:t,loading:n}=Yt("List.Empty");return n||t.visible.length>0?null:o.jsx("p",{className:be.empty,children:e})}Dt.Search=kl;Dt.SelectAll=Cl;Dt.Options=Rl;Dt.Empty=Ll;const Al="_card_11evu_1",Il="_header_11evu_21",Ol="_headline_11evu_37",Sl="_titleRow_11evu_51",El="_title_11evu_51",Tl="_description_11evu_81",Fl="_trailing_11evu_97",Bl="_body_11evu_111",Pl="_bodyFlush_11evu_119",Kl="_footer_11evu_127",Ie={card:Al,header:Il,headline:Ol,titleRow:Sl,title:El,description:Tl,trailing:Fl,body:Bl,bodyFlush:Pl,footer:Kl},vs=i.createContext(void 0);function zl(e){const t=i.useContext(vs);if(!t)throw new Error(e+" deve ser usado dentro de Card.");return t}function Qt({children:e,className:t,...n}){const s=i.useId(),[r,a]=i.useState(!1),l=s+"-title",c={registerTitle:i.useCallback(()=>a(!0),[]),titleId:l};return o.jsx("section",{...n,"aria-labelledby":r?l:void 0,className:[Ie.card,t].filter(Boolean).join(" "),children:o.jsx(vs.Provider,{value:c,children:e})})}function Hl({badge:e,description:t,headingLevel:n=3,title:s,trailing:r}){const{registerTitle:a,titleId:l}=zl("Card.Header"),c="h"+n;return i.useEffect(a,[a]),o.jsxs("header",{className:Ie.header,children:[o.jsxs("div",{className:Ie.headline,children:[o.jsxs("div",{className:Ie.titleRow,children:[o.jsx(c,{className:Ie.title,id:l,children:s}),e]}),t&&o.jsx("p",{className:Ie.description,children:t})]}),r&&o.jsx("div",{className:Ie.trailing,children:r})]})}function ql({children:e,flush:t=!1}){return o.jsx("div",{className:t?Ie.bodyFlush:Ie.body,children:e})}function Vl({children:e}){return o.jsx("footer",{className:Ie.footer,children:e})}Qt.Header=Hl;Qt.Body=ql;Qt.Footer=Vl;const Ul="_scroll_l0epy_1",Gl="_table_l0epy_6",Wl="_sm_l0epy_16",Xl="_md_l0epy_21",Yl="_head_l0epy_26",Ql="_column_l0epy_30",Zl="_sortable_l0epy_41",Jl="_sortButton_l0epy_45",ei="_sortIcon_l0epy_69",ti="_sortDescending_l0epy_81",ni="_help_l0epy_85",si="_row_l0epy_102",oi="_divider_l0epy_106",ai="_cell_l0epy_106",ri="_striped_l0epy_110",li="_numeric_l0epy_124",ii="_start_l0epy_132",ci="_center_l0epy_136",ui="_end_l0epy_140",di="_empty_l0epy_144",fi="_status_l0epy_145",mi="_sticky_l0epy_158",hi="_lead_l0epy_202",_i="_control_l0epy_208",pi="_toggle_l0epy_219",gi="_selected_l0epy_224",ne={scroll:Ul,table:Gl,sm:Wl,md:Xl,head:Yl,column:Ql,sortable:Zl,sortButton:Jl,sortIcon:ei,sortDescending:ti,help:ni,row:si,divider:oi,cell:ai,striped:ri,numeric:li,start:ii,center:ci,end:ui,empty:di,status:fi,sticky:mi,lead:hi,control:_i,toggle:pi,selected:gi},js=i.createContext(void 0);function Zt(e){const t=i.useContext(js);if(!t)throw new Error(e+" deve ser usado dentro de Table.");return t}function dt({children:e,className:t,defaultSort:n,divider:s=!0,highlightSelectedRow:r=!0,label:a,loading:l=!1,loadingMessage:c="Carregando",onSelectionChange:u,onSortChange:d,rows:m=[],selectedIds:g,selectionControl:h,selectionMode:p="none",size:_="md",sort:f,stickyHeader:x=!1,striped:M=!1,...y}){const b=i.useId(),[D,$]=i.useState(n),k=i.useMemo(()=>new Map,[]),C=f??D;function H(R){const E={column:R,direction:(C==null?void 0:C.column)===R&&C.direction==="ascending"?"descending":"ascending"};f===void 0&&$(E),d==null||d(E)}const S=i.useMemo(()=>m.map(R=>({key:R.id,disabled:R.disabled})),[m]),z=wt({items:S,mode:p,selectedKeys:g,onSelectionChange:R=>u==null?void 0:u([...R])}),w={baseId:b,countColumns:()=>Math.max(k.size,1),loading:l,registerColumn:R=>(k.has(R)||k.set(R,k.size),k.get(R)),requestSort:H,selection:{control:h??(p==="single"?"radio":"checkbox"),highlight:r,isSelected:R=>z.selectedKeys.has(R),mode:p,status:z.status,toggle:(R,E)=>{if(E&&p==="multiple"){z.selectRange(R);return}z.select(R)},toggleAll:z.toggleAll},size:_,sort:C},A=[ne.table,ne[_],s&&ne.divider,M&&ne.striped,x&&ne.sticky].filter(Boolean).join(" ");return o.jsxs("div",{...y,className:[ne.scroll,t].filter(Boolean).join(" "),children:[o.jsx("table",{"aria-busy":l||void 0,"aria-label":a,className:A,children:o.jsx(js.Provider,{value:w,children:e})}),l&&o.jsx("p",{className:ne.status,role:"status",children:c})]})}function bi({children:e}){const{registerColumn:t,selection:n}=Zt("Table.Header");return n.mode!=="none"&&t("__selecao__"),o.jsx("thead",{className:ne.head,children:o.jsxs("tr",{children:[n.mode==="multiple"&&o.jsx("th",{className:[ne.column,ne.lead].join(" "),scope:"col",children:o.jsx("input",{"aria-label":"Selecionar todas as linhas",checked:n.status==="all",className:ne.control,onChange:n.toggleAll,ref:s=>{s&&(s.indeterminate=n.status==="partial")},type:"checkbox"})}),n.mode==="single"&&o.jsx("th",{className:[ne.column,ne.lead].join(" "),scope:"col"}),e]})})}function yi({align:e,children:t,help:n,hideBelow:s,id:r,numeric:a=!1,sortable:l=!1,width:c}){const{registerColumn:u,requestSort:d,sort:m}=Zt("Table.Column");u(r);const g=(m==null?void 0:m.column)===r?m.direction:void 0,h=o.jsxs(o.Fragment,{children:[t,n&&o.jsx(ys,{content:n,children:o.jsx("span",{"aria-label":n,className:ne.help,role:"img",tabIndex:0,children:"?"})}),l&&o.jsx(es,{className:[ne.sortIcon,g==="descending"&&ne.sortDescending].filter(Boolean).join(" "),size:12})]});return o.jsx("th",{"aria-sort":l?g??"none":void 0,className:[ne.column,ne[e??(a?"end":"start")],l&&ne.sortable].filter(Boolean).join(" "),"data-hide-below":s,scope:"col",style:{width:c},children:l?o.jsx("button",{className:ne.sortButton,onClick:()=>d(r),type:"button",children:h}):h})}function xi({children:e,empty:t,items:n}){const{countColumns:s,loading:r}=Zt("Table.Body");return n.length===0&&!r&&t!==void 0?o.jsx("tbody",{children:o.jsx("tr",{children:o.jsx("td",{className:ne.empty,colSpan:s(),children:t})})}):o.jsx("tbody",{children:n.map(e)})}function vi({children:e,disabled:t=!1,id:n,label:s}){const{baseId:r,selection:a}=Zt("Table.Row"),l=a.mode!=="none"&&a.isSelected(n);return o.jsxs("tr",{"aria-selected":a.mode==="none"?void 0:l,className:[ne.row,l&&a.highlight&&ne.selected].filter(Boolean).join(" "),children:[a.mode!=="none"&&o.jsx("td",{className:[ne.cell,ne.lead].join(" "),children:o.jsx("input",{"aria-label":s??"Selecionar linha",checked:l,className:[ne.control,a.control==="toggle"&&ne.toggle].filter(Boolean).join(" "),disabled:t,name:a.control==="radio"?`${r}-selecao`:void 0,onChange:()=>{},onClick:c=>a.toggle(n,c.shiftKey),type:a.control==="radio"?"radio":"checkbox"})}),e]})}function ji({align:e,children:t,hideBelow:n,numeric:s=!1}){return o.jsx("td",{className:[ne.cell,ne[e??(s?"end":"start")],s&&ne.numeric].filter(Boolean).join(" "),"data-hide-below":n,children:t})}dt.Header=bi;dt.Column=yi;dt.Body=xi;dt.Row=vi;dt.Cell=ji;function Jt(e,{isDateUnavailable:t,max:n,min:s}){return s&&e.compare(s)<0||n&&e.compare(n)>0?!0:(t==null?void 0:t(e))??!1}function $i(e,t,n={}){const s=Z.startOfMonth(e),r=Z.startOfWeek(s,t),a=[];for(let l=0;l<Z.getWeeksInMonth(e,t);l+=1){const c=[];for(let u=0;u<7;u+=1){const d=r.add({days:l*7+u});c.push({date:d,outside:!Z.isSameMonth(d,e),unavailable:Jt(d,n)})}a.push(c)}return a}function we(e,{max:t,min:n}){return n&&e.compare(n)<0?n:t&&e.compare(t)>0?t:e}function Mi(e,t,n,s){switch(t){case"ArrowLeft":return we(e.subtract({days:1}),s);case"ArrowRight":return we(e.add({days:1}),s);case"ArrowUp":return we(e.subtract({weeks:1}),s);case"ArrowDown":return we(e.add({weeks:1}),s);case"Home":return we(Z.startOfMonth(e),s);case"End":return we(Z.endOfMonth(e),s);case"PageUp":return we(n?e.subtract({years:1}):e.subtract({months:1}),s);case"PageDown":return we(n?e.add({years:1}):e.add({months:1}),s);default:return}}function zn(e,t){return!!(e&&t&&Z.isSameDay(e,t))}function Ni({isDateUnavailable:e,locale:t="pt-BR",max:n,min:s,onSelect:r,value:a}={}){const l={isDateUnavailable:e,max:n,min:s},c=i.useMemo(()=>Z.today(Z.getLocalTimeZone()),[]),[u,d]=i.useState(()=>we(a??c,l)),m=a??u,[g,h]=i.useState(()=>Z.startOfMonth(m)),[p,_]=i.useState(a);a&&(!p||a.compare(p)!==0)&&(_(a),h(Z.startOfMonth(a)),d(we(a,l)));const f=i.useMemo(()=>$i(g,t,l),[t,g,n,s,e]);function x(y){d(y),(y.compare(Z.startOfMonth(g))<0||y.compare(Z.startOfMonth(g).add({months:1}))>=0)&&h(Z.startOfMonth(y))}function M(y){Jt(y,l)||(x(y),r==null||r(y))}return{focus:x,focusedDate:u,goToMonth:y=>{const b=Z.startOfMonth(g.add({months:y}));h(b),d(we(b.set({day:Math.min(u.day,Z.endOfMonth(b).day)}),l))},handleKeyDown:y=>{if(y.key==="Enter"||y.key===" "){y.preventDefault(),M(u);return}const b=Mi(u,y.key,y.shiftKey,l);b&&(y.preventDefault(),x(b))},isSelected:y=>zn(y,a),isToday:y=>zn(y,c),select:M,visibleMonth:g,weeks:f}}const wi="_field_3kuuv_1",Di="_error_3kuuv_10",ki="_sm_3kuuv_24",Ri="_input_3kuuv_24",Ci="_md_3kuuv_28",Li="_trigger_3kuuv_51",Ai="_panel_3kuuv_76",Ii="_calendar_3kuuv_85",Oi="_calendarHeader_3kuuv_91",Si="_month_3kuuv_98",Ei="_navigate_3kuuv_106",Ti="_grid_3kuuv_129",Fi="_weekday_3kuuv_137",Bi="_dayCell_3kuuv_147",Pi="_day_3kuuv_147",Ki="_outside_3kuuv_173",zi="_selectedDay_3kuuv_183",Hi="_focusedDay_3kuuv_190",qi="_footer_3kuuv_195",Vi="_actions_3kuuv_205",me={field:wi,error:Di,sm:ki,input:Ri,md:Ci,trigger:Li,panel:Ai,calendar:Ii,calendarHeader:Oi,month:Si,navigate:Ei,grid:Ti,weekday:Fi,dayCell:Bi,day:Pi,outside:Ki,selectedDay:zi,focusedDay:Hi,footer:qi,actions:Vi};function $s({autoFocus:e=!1,locale:t="pt-BR",onSelect:n,value:s,...r}){const a=Ni({...r,locale:t,onSelect:n,value:s}),l=Z.getLocalTimeZone(),c=i.useMemo(()=>new Intl.DateTimeFormat(t,{month:"long",year:"numeric"}),[t]),u=i.useMemo(()=>new Intl.DateTimeFormat(t,{dateStyle:"long"}),[t]),d=i.useMemo(()=>{const g=new Intl.DateTimeFormat(t,{weekday:"short"}),h=new Intl.DateTimeFormat(t,{weekday:"long"});return a.weeks[0].map(p=>{const _=p.date.toDate(l);return{curto:g.format(_).replace(".",""),longo:h.format(_)}})},[a.weeks,l,t]),m=c.format(a.visibleMonth.toDate(l));return o.jsxs("div",{className:me.calendar,children:[o.jsxs("div",{className:me.calendarHeader,children:[o.jsx("button",{"aria-label":"Mês anterior",className:me.navigate,onClick:()=>a.goToMonth(-1),type:"button",children:o.jsx(xn,{size:14})}),o.jsx("span",{"aria-live":"polite",className:me.month,children:m}),o.jsx("button",{"aria-label":"Próximo mês",className:me.navigate,onClick:()=>a.goToMonth(1),type:"button",children:o.jsx(Gt,{size:14})})]}),o.jsxs("table",{"aria-label":m,className:me.grid,onKeyDown:a.handleKeyDown,role:"grid",tabIndex:0,ref:g=>{e&&(g==null||g.focus())},children:[o.jsx("thead",{children:o.jsx("tr",{children:d.map(g=>o.jsx("th",{abbr:g.longo,className:me.weekday,scope:"col",children:g.curto},g.longo))})}),o.jsx("tbody",{children:a.weeks.map(g=>o.jsx("tr",{children:g.map(h=>{const p=a.isSelected(h.date),_=h.date.compare(a.focusedDate)===0;return o.jsx("td",{className:me.dayCell,children:o.jsx("button",{"aria-current":a.isToday(h.date)?"date":void 0,"aria-label":u.format(h.date.toDate(l)),"aria-pressed":p,className:[me.day,h.outside&&me.outside,p&&me.selectedDay,_&&me.focusedDay].filter(Boolean).join(" "),disabled:h.unavailable,onClick:()=>a.select(h.date),tabIndex:-1,type:"button",children:h.date.day})},h.date.toString())})},g[0].date.toString()))})]})]})}function Ui({defaultValue:e,name:t,disabled:n=!1,error:s,hint:r,id:a,isDateUnavailable:l,label:c,locale:u="pt-BR",max:d,min:m,onValueChange:g,placeholder:h="dd/mm/aaaa",required:p=!1,size:_="md",value:f}){const x=i.useRef(null),M=i.useRef(null),y=i.useRef(null),[b,D]=i.useState(!1),[$,k]=i.useState(e),C=f===void 0?$:f??void 0,[H,S]=i.useState(()=>C?mn(C.toString().split("-").reverse().join("")):""),[z,w]=i.useState(!1),[A,R]=i.useState(C);i.useEffect(()=>{b&&R(C)},[b]);const E=z?H:C?[String(C.day).padStart(2,"0"),String(C.month).padStart(2,"0"),C.year].join("/"):"";function F(j){f===void 0&&k(j),g==null||g(j)}function T(j=!0){var N;D(!1),j&&((N=y.current)==null||N.focus())}function O(j){const N=mn(j);w(!0),S(N);const I=ms(N),v=I&&!Jt(I,{isDateUnavailable:l,max:d,min:m})?I:void 0;F(v)}function K(j){j.key==="ArrowDown"&&!b&&(j.preventDefault(),D(!0))}const{overlayProps:L}=xe.useOverlay({isOpen:b,onClose:()=>T(!1),isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:j=>{var N;return!((N=x.current)!=null&&N.contains(j))}},M),{overlayProps:P}=xe.useOverlayPosition({targetRef:x,overlayRef:M,placement:"bottom start",offset:6,containerPadding:8,isOpen:b});return o.jsx(ze,{error:s,hint:r,id:a,label:c,required:p,children:({id:j,describedBy:N,invalid:I})=>o.jsxs(o.Fragment,{children:[t!==void 0&&o.jsx("input",{name:t,type:"hidden",value:(C==null?void 0:C.toString())??""}),o.jsxs("div",{className:[me.field,me[_],s&&me.error].filter(Boolean).join(" "),ref:x,children:[o.jsx("input",{"aria-describedby":N,"aria-invalid":I||void 0,"aria-required":p||void 0,autoComplete:"off",className:me.input,disabled:n,id:j,inputMode:"numeric",onBlur:()=>w(!1),onChange:v=>O(v.target.value),onKeyDown:K,placeholder:h,type:"text",value:E}),o.jsx("button",{"aria-expanded":b,"aria-haspopup":"dialog","aria-label":"Abrir calendário",className:me.trigger,disabled:n,onClick:()=>b?T():D(!0),ref:y,type:"button",children:o.jsx(yn,{size:15})})]}),b&&Oe.createPortal(o.jsxs("div",{...L,"aria-label":c?"Calendário de "+c:"Calendário",className:me.panel,onKeyDown:v=>{var B;v.key==="Escape"&&T(),(B=L.onKeyDown)==null||B.call(L,v)},ref:M,role:"dialog",style:P.style,children:[o.jsx($s,{autoFocus:!0,isDateUnavailable:l,locale:u,max:d,min:m,onSelect:R,value:A}),o.jsxs("div",{className:me.footer,children:[o.jsx(Ze,{onClick:()=>R(Z.today(Z.getLocalTimeZone())),size:"sm",variant:"ghost",type:"button",children:"Hoje"}),o.jsxs("div",{className:me.actions,children:[o.jsx(Ze,{onClick:()=>T(),size:"sm",variant:"secondary",type:"button",children:"Cancelar"}),o.jsx(Ze,{onClick:()=>{F(A),w(!1),T()},size:"sm",type:"button",children:"Aplicar"})]})]})]}),document.body)]})})}const Gi="_field_1p60x_1",Wi="_error_1p60x_19",Xi="_input_1p60x_47",Yi="_sm_1p60x_69",Qi="_md_1p60x_77",Zi="_trigger_1p60x_101",Ji="_panel_1p60x_151",ec="_slots_1p60x_171",tc="_slotInput_1p60x_185",nc="_slotList_1p60x_223",Fe={field:Gi,error:Wi,input:Xi,sm:Yi,md:Qi,trigger:Zi,panel:Ji,slots:ec,slotInput:tc,slotList:nc},Hn=e=>String(e).padStart(2,"0");function Qe(e){return e?Hn(e.hour)+":"+Hn(e.minute):""}function Ms(e){const t=e.replace(/\D/g,"").slice(0,4);return t.length<=2?t:t.slice(0,2)+":"+t.slice(2)}function hn(e){if(!/^\d{2}:\d{2}$/.test(e))return;const[t,n]=e.split(":").map(Number);return t>23||n>59?void 0:new Z.Time(t,n)}function sc(e,t=new Z.Time(0,0),n=new Z.Time(23,59)){if(e<=0)return[];const s=t.hour*60+t.minute,r=n.hour*60+n.minute,a=[];for(let l=s;l<=r;l+=e)a.push(new Z.Time(Math.floor(l/60),l%60));return a}function Ns({baseId:e,label:t="Horário",max:n,min:s,onChange:r,step:a=30,value:l}){const[c,u]=i.useState(()=>Qe(l)),[d,m]=i.useState(!1),g=i.useMemo(()=>sc(a,s,n).map(f=>({value:Qe(f),label:Qe(f)})),[n,s,a]),h=Qe(l),p=Xt({items:g,selectionMode:"single",value:l?[{value:h,label:h}]:[],onSelectionChange:([f])=>{const x=f&&hn(f.value);x&&(m(!1),r(x))}});function _(f){const x=Ms(f);m(!0),u(x);const M=hn(x);M&&r(M)}return o.jsxs("div",{className:Fe.slots,children:[o.jsx("input",{"aria-label":t+" em horas e minutos",autoComplete:"off",className:Fe.slotInput,inputMode:"numeric",onBlur:()=>m(!1),onChange:f=>_(f.target.value),placeholder:"hh:mm",type:"text",value:d?c:h}),o.jsx(Wt,{baseId:e,className:Fe.slotList,holdsFocus:!0,label:t,listing:p,onKeyDown:p.handleKeyDown})]})}function oc({defaultValue:e,name:t,disabled:n=!1,error:s,hint:r,id:a,label:l,max:c,min:u,step:d=30,onValueChange:m,placeholder:g="hh:mm",required:h=!1,size:p="md",value:_}){const f=i.useRef(null),x=i.useRef(null),M=`hora-${i.useId()}`,y=i.useRef(null),[b,D]=i.useState(!1),[$,k]=i.useState(e),[C,H]=i.useState(()=>Qe(e)),[S,z]=i.useState(!1),w=_===void 0?$:_??void 0,A=S?C:Qe(w);function R(L){_===void 0&&k(L),m==null||m(L)}function E(L=!0){var P;D(!1),L&&((P=y.current)==null||P.focus())}function F(L){const P=Ms(L);z(!0),H(P);const j=hn(P);j?R(j):P===""&&R(void 0)}function T(L){L.key==="ArrowDown"&&!b&&(L.preventDefault(),D(!0))}const{overlayProps:O}=xe.useOverlay({isOpen:b,onClose:()=>E(!1),isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:L=>{var P;return!((P=f.current)!=null&&P.contains(L))}},x),{overlayProps:K}=xe.useOverlayPosition({targetRef:f,overlayRef:x,placement:"bottom start",offset:6,containerPadding:8,isOpen:b});return o.jsx(ze,{error:s,hint:r,id:a,label:l,required:h,children:({id:L,describedBy:P,invalid:j})=>o.jsxs(o.Fragment,{children:[t!==void 0&&o.jsx("input",{name:t,type:"hidden",value:w?Qe(w):""}),o.jsxs("div",{className:[Fe.field,Fe[p],s&&Fe.error].filter(Boolean).join(" "),ref:f,children:[o.jsx("input",{"aria-describedby":P,"aria-invalid":j||void 0,"aria-required":h||void 0,autoComplete:"off",className:Fe.input,disabled:n,id:L,inputMode:"numeric",onBlur:()=>z(!1),onChange:N=>F(N.target.value),onKeyDown:T,placeholder:g,type:"text",value:A}),o.jsx("button",{"aria-expanded":b,"aria-haspopup":"dialog","aria-label":"Abrir seletor de hora",className:Fe.trigger,disabled:n,onClick:()=>b?E():D(!0),ref:y,type:"button",children:o.jsx(ns,{size:15})})]}),b&&Oe.createPortal(o.jsx("div",{...O,"aria-label":l?"Horas de "+l:"Horas",className:Fe.panel,onKeyDown:N=>{var I;N.key==="Escape"&&E(),(I=O.onKeyDown)==null||I.call(O,N)},ref:x,role:"dialog",style:K.style,children:o.jsx(Ns,{baseId:a??M,max:c,min:u,onChange:N=>{R(N),z(!1),E()},step:d,value:w})}),document.body)]})})}const ac="_field_pv9z2_1",rc="_error_pv9z2_19",lc="_input_pv9z2_47",ic="_sm_pv9z2_69",cc="_md_pv9z2_77",uc="_trigger_pv9z2_101",dc="_panel_pv9z2_151",fc="_columns_pv9z2_173",mc="_footer_pv9z2_195",hc="_actions_pv9z2_215",Te={field:ac,error:rc,input:lc,sm:ic,md:cc,trigger:uc,panel:dc,columns:fc,footer:mc,actions:hc},Ot=e=>String(e).padStart(2,"0");function _c(e){const t=e.replace(/\D/g,"").slice(0,12),n=mn(t.slice(0,8));if(t.length<=8)return n;const s=t.slice(8);return n+" "+(s.length<=2?s:s.slice(0,2)+":"+s.slice(2))}function pc(e){const[t,n=""]=e.trim().split(/\s+/),s=ms(t);if(!s)return;if(n==="")return new Z.CalendarDateTime(s.year,s.month,s.day,0,0);if(!/^\d{2}:\d{2}$/.test(n))return;const[r,a]=n.split(":").map(Number);if(!(r>23||a>59))return new Z.CalendarDateTime(s.year,s.month,s.day,r,a)}function qn(e){return e?[Ot(e.day),Ot(e.month),e.year].join("/")+" "+Ot(e.hour)+":"+Ot(e.minute):""}function gc({defaultValue:e,name:t,disabled:n=!1,error:s,hint:r,id:a,isDateUnavailable:l,label:c,locale:u="pt-BR",max:d,min:m,step:g=30,onValueChange:h,placeholder:p="dd/mm/aaaa hh:mm",required:_=!1,size:f="md",value:x}){const M=i.useRef(null),y=i.useRef(null),b=i.useRef(null),[D,$]=i.useState(!1),[k,C]=i.useState(e),[H,S]=i.useState(()=>qn(e)),[z,w]=i.useState(!1),A=x===void 0?k:x??void 0,[R,E]=i.useState(A);i.useEffect(()=>{D&&E(A)},[D]);const F=z?H:qn(A);function T(v){x===void 0&&C(v),h==null||h(v)}function O(v){E(new Z.CalendarDateTime(v.year,v.month,v.day,(R==null?void 0:R.hour)??0,(R==null?void 0:R.minute)??0))}function K(v){const B=R??Z.today(Z.getLocalTimeZone());E(new Z.CalendarDateTime(B.year,B.month,B.day,v.hour,v.minute))}function L(v=!0){var B;$(!1),v&&((B=b.current)==null||B.focus())}function P(v){const B=_c(v);w(!0),S(B);const V=pc(B),q=V&&Z.toCalendarDate(V);T(q&&!Jt(q,{isDateUnavailable:l,max:d,min:m})?V:void 0)}function j(v){v.key==="ArrowDown"&&!D&&(v.preventDefault(),$(!0))}const{overlayProps:N}=xe.useOverlay({isOpen:D,onClose:()=>L(!1),isDismissable:!0,shouldCloseOnBlur:!1,shouldCloseOnInteractOutside:v=>{var B;return!((B=M.current)!=null&&B.contains(v))}},y),{overlayProps:I}=xe.useOverlayPosition({targetRef:M,overlayRef:y,placement:"bottom start",offset:6,containerPadding:8,isOpen:D});return o.jsx(ze,{error:s,hint:r,id:a,label:c,required:_,children:({id:v,describedBy:B,invalid:V})=>o.jsxs(o.Fragment,{children:[t!==void 0&&o.jsx("input",{name:t,type:"hidden",value:(A==null?void 0:A.toString())??""}),o.jsxs("div",{className:[Te.field,Te[f],s&&Te.error].filter(Boolean).join(" "),ref:M,children:[o.jsx("input",{"aria-describedby":B,"aria-invalid":V||void 0,"aria-required":_||void 0,autoComplete:"off",className:Te.input,disabled:n,id:v,inputMode:"numeric",onBlur:()=>w(!1),onChange:q=>P(q.target.value),onKeyDown:j,placeholder:p,type:"text",value:F}),o.jsx("button",{"aria-expanded":D,"aria-haspopup":"dialog","aria-label":"Abrir calendário",className:Te.trigger,disabled:n,onClick:()=>D?L():$(!0),ref:b,type:"button",children:o.jsx(yn,{size:15})})]}),D&&Oe.createPortal(o.jsxs("div",{...N,"aria-label":c?"Calendário de "+c:"Calendário",className:Te.panel,onKeyDown:q=>{var X;q.key==="Escape"&&L(),(X=N.onKeyDown)==null||X.call(N,q)},ref:y,role:"dialog",style:I.style,children:[o.jsxs("div",{className:Te.columns,children:[o.jsx($s,{autoFocus:!0,isDateUnavailable:l,locale:u,max:d,min:m,onSelect:O,value:R&&new Z.CalendarDate(R.year,R.month,R.day)}),o.jsx(Ns,{baseId:(a??"datetime")+"-hora",onChange:K,step:g,value:R&&new Z.Time(R.hour,R.minute)})]}),o.jsxs("div",{className:Te.footer,children:[o.jsx(Ze,{onClick:()=>E(Z.toCalendarDateTime(Z.now(Z.getLocalTimeZone())).set({second:0,millisecond:0})),size:"sm",variant:"ghost",type:"button",children:"Agora"}),o.jsxs("div",{className:Te.actions,children:[o.jsx(Ze,{onClick:()=>L(),size:"sm",variant:"secondary",type:"button",children:"Cancelar"}),o.jsx(Ze,{onClick:()=>{T(R),w(!1),L()},size:"sm",type:"button",children:"Aplicar"})]})]})]}),document.body)]})})}const bc="_figure_gr8jr_1",yc="_title_gr8jr_9",xc="_body_gr8jr_20",vc="_plot_gr8jr_29",jc="_plotFill_gr8jr_37",$c="_bodyColumn_gr8jr_42",Mc="_bodyRow_gr8jr_46",Nc="_canvas_gr8jr_51",wc="_empty_gr8jr_58",Dc="_axisLine_gr8jr_67",kc="_axisLabel_gr8jr_72",Rc="_gutter_gr8jr_80",Cc="_dynamicAxis_gr8jr_87",Lc="_slideRight_gr8jr_101",Ac="_slideLeft_gr8jr_105",Ic="_slideUp_gr8jr_109",Oc="_gridLine_gr8jr_113",Sc="_gridBaseline_gr8jr_118",Ec="_cursor_gr8jr_159",Tc="_legend_gr8jr_164",Fc="_legendLeft_gr8jr_175",Bc="_legendCenter_gr8jr_179",Pc="_legendRight_gr8jr_183",Kc="_legendSide_gr8jr_187",zc="_legendItem_gr8jr_196",Hc="_legendButton_gr8jr_197",qc="_legendOff_gr8jr_245",Vc="_swatch_gr8jr_249",Uc="_swatchDot_gr8jr_269",Gc="_legendLabel_gr8jr_274",Wc="_legendValue_gr8jr_281",ee={figure:bc,title:yc,body:xc,plot:vc,plotFill:jc,bodyColumn:$c,bodyRow:Mc,canvas:Nc,empty:wc,axisLine:Dc,axisLabel:kc,gutter:Rc,dynamicAxis:Cc,slideRight:Lc,slideLeft:Ac,slideUp:Ic,gridLine:Oc,gridBaseline:Sc,cursor:Ec,legend:Tc,legendLeft:Fc,legendCenter:Bc,legendRight:Pc,legendSide:Kc,legendItem:zc,legendButton:Hc,legendOff:qc,swatch:Vc,swatchDot:Uc,legendLabel:Gc,legendValue:Wc};function $n({offset:e,orientation:t="vertical",plot:n,size:s}){const r=t==="vertical";return o.jsx("rect",{className:ee.cursor,height:r?n.height:s,width:r?s:n.width,x:r?e:0,y:r?0:e})}const re=8,rn=12,_n=.24;function kt(e){return e.lineHeight+re/2}const Vn=2,ws={offset:0,thickness:0};function Ds(e,t){const n=t.reduce((r,a)=>r+a,0),s=Math.max((e-Vn*Math.max(n-1,0))/Math.max(n,1),0);return t.map((r,a)=>({offset:t.slice(0,a).reduce((l,c)=>l+(s+Vn)*c,0),thickness:s*r}))}function en(e,t){return Math.max(Math.min(e,t)-re*2,0)}const Xc={bottom:"middle",left:"end",right:"start"};function Yc({hideLine:e=!1,labelRotation:t=0,length:n,orientation:s,ticks:r}){const a=s==="bottom",l=s==="left"?-re:re;return o.jsxs("g",{"aria-hidden":"true",className:ee.axis,children:[!e&&o.jsx("line",{className:ee.axisLine,x1:0,x2:a?n:0,y1:0,y2:a?0:n}),r.map((c,u)=>o.jsx("text",{className:ee.axisLabel,dominantBaseline:a?"hanging":"middle",textAnchor:a&&t!==0?"end":Xc[s],transform:a&&t!==0?`rotate(${-t} ${c.position} ${re})`:void 0,x:a?c.position:l,y:a?re:c.position,children:c.label},u))]})}function Qc({baseline:e,length:t,lines:n,orientation:s}){const r=s==="horizontal";return o.jsx("g",{"aria-hidden":"true",children:n.map((a,l)=>o.jsx("line",{className:a===e?ee.gridBaseline:ee.gridLine,x1:r?0:a,x2:r?t:a,y1:r?a:0,y2:r?a:t},l))})}const ln={family:"sans-serif",headingFamily:"sans-serif",lineHeight:16,size:12},Zc=.58;function Un(e){if(!e||typeof getComputedStyle!="function")return ln;const t=getComputedStyle(e),n=t.getPropertyValue("--pl-font-body").trim()||t.fontFamily||ln.family,s=t.getPropertyValue("--pl-font-heading").trim()||n,r=Number.parseFloat(t.getPropertyValue("--pl-type-caption-size"))||ln.size,a=Number.parseFloat(t.getPropertyValue("--pl-type-caption-line-height"));return{family:n,headingFamily:s,lineHeight:a||r*1.34,size:r}}let St;function Jc(){if(St===void 0)try{St=document.createElement("canvas").getContext("2d")}catch{St=null}return St}function Je(e,t){const n=e.length*t.size*Zc,s=Jc();return s?(s.font=`${t.size}px ${t.family}`,s.measureText(e).width||n):n}function ft(e,t){return e.reduce((n,s)=>Math.max(n,Je(s,t)),0)}function ct(e,t,n){if(n<=0)return"";if(Je(e,t)<=n)return e;let s=e.length;for(;s>0&&Je(`${e.slice(0,s)}…`,t)>n;)s-=1;return s>0?`${e.slice(0,s)}…`:""}function Pe(e,{includeZero:t=!0}={}){const n=e.filter(Number.isFinite);if(n.length===0)return{min:0,max:0};const[s=0,r=0]=fn.extent(n);return{min:t?Math.min(s,0):s,max:t?Math.max(r,0):r}}function ks(e){const t=[0];let n=0;for(const s of e)n+=Number.isFinite(s)?s:0,t.push(n);return t}function ut(e){return e.length===0?{min:0,max:0}:{min:fn.min(e,t=>t.min)??0,max:fn.max(e,t=>t.max)??0}}function eu({min:e,max:t}){return e===t?[e,e+1]:[e,t]}function ye({clamp:e=!1,domain:t,nice:n=!0,range:s}){const r=Ut.scaleLinear().domain(eu(t)).range(s).clamp(e);return n?r.nice():r}function Mn({domain:e,padding:t=.2,range:n}){return Ut.scaleBand().domain([...e]).range(n).paddingInner(t).paddingOuter(t/2)}function Rs({domain:e,padding:t=.5,range:n}){return Ut.scalePoint().domain([...e]).range(n).padding(t)}function tu(e,t){return Ut.scaleSqrt().domain([0,e>0?e:1]).range(t)}function Ke(e,t,n){return e.ticks(Math.max(2,Math.min(10,Math.floor(t/64))))}function $e(e,t){return{fillHeight:e==="fill",value:e==="fill"?t:e}}function Gn(e,t,n){return e==="hidden"?0:ft(t,n)+re}function nu(e,t,n){return e.length===0||n<=0||ft(e,t)+re<=n?0:n*Math.SQRT1_2>=t.lineHeight?45:90}function su(e,t,n,s){if(s==="hidden")return 0;if(n===0)return t.lineHeight+re;const r=n*Math.PI/180;return ft(e,t)*Math.sin(r)+t.lineHeight*Math.cos(r)+re}function mt({bottomLabels:e,font:t,height:n,labelAngle:s,leftLabels:r,rightLabels:a,topRoom:l,width:c,xAxis:u,yAxis:d,yAxisRight:m}){const g=u==="hidden"?0:ft(e,t)/2,h=Math.max(Gn(d,r,t),rn),p=Math.max(Gn(m,a,t),rn),_=Math.max(c-h-p,0),f=s==="auto"?nu(e,t,_/Math.max(e.length,1)):s,x=f===0?g:0,M={bottom:su(e,t,f,u),left:Math.max(h,x),right:Math.max(p,x),top:Math.max(l,rn)};return{margins:M,plot:{width:Math.max(c-M.left-M.right,0),height:Math.max(n-M.top-M.bottom,0)},rotation:f}}function Ve(e,t,n){const s=ye({domain:e,range:[t,0]});return Ke(s,t).map(n)}const Nn=Math.PI*2;function ou(e,{endAngle:t=Nn,padAngle:n=0,startAngle:s=0}={}){return it.pie().sort(null).sortValues(null).value(r=>Math.max(r,0)).startAngle(s).endAngle(t).padAngle(n)([...e]).map(({endAngle:r,startAngle:a})=>({endAngle:r,startAngle:a}))}function Nt({cornerRadius:e=0,endAngle:t,innerRadius:n,outerRadius:s,padAngle:r=0,startAngle:a}){return it.arc().cornerRadius(e).innerRadius(n).outerRadius(s).padAngle(r).startAngle(a).endAngle(t)({cornerRadius:e,endAngle:t,innerRadius:n,outerRadius:s,padAngle:r,startAngle:a})??""}function au({endAngle:e,innerRadius:t,outerRadius:n,startAngle:s}){const r=(t+n)/2,a=(s+e)/2-Math.PI/2;return[Math.cos(a)*r,Math.sin(a)*r]}function Wn(e,t){const n=(e.startAngle+e.endAngle)/2-Math.PI/2;return[Math.cos(n)*t,Math.sin(n)*t]}const cn=[{display:!0,lineHeight:44,size:36},{display:!0,lineHeight:32,size:24},{display:!1,lineHeight:24,size:16}];function Cs(e,t,n,s){const r=Math.max(s-re*2,0),a=cn.find(c=>Je(e,{...n,family:c.display?n.headingFamily:n.family,size:c.size})<=r)??cn[cn.length-1],l=a.display?n.headingFamily:n.family;return{family:l,label:ct(t,n,r),lineHeight:a.lineHeight,size:a.size,value:ct(e,{...n,family:l,size:a.size},r)}}const ru={left:ee.legendLeft,center:ee.legendCenter,right:ee.legendRight};function lu({align:e="center",entries:t,onToggle:n,position:s,swatch:r="square"}){const a=s==="left"||s==="right";return o.jsx("ul",{className:`${ee.legend} ${a?ee.legendSide:ru[e]}`,children:t.map(l=>{const c=o.jsxs(o.Fragment,{children:[o.jsx("span",{"aria-hidden":"true",className:`${ee.swatch} ${r==="dot"?ee.swatchDot:""}`,style:l.hidden?void 0:{background:l.color}}),o.jsx("span",{className:ee.legendLabel,children:l.label}),l.value!==void 0&&o.jsx("span",{className:ee.legendValue,children:l.value})]});return o.jsx("li",{className:ee.legendItem,children:n?o.jsx("button",{"aria-pressed":!l.hidden,className:`${ee.legendButton} ${l.hidden?ee.legendOff:""}`,onClick:()=>n(l.label),type:"button",children:c}):c},l.label)})})}function et({children:e,centerOrigin:t=!1,containerRef:n,empty:s,emptyMessage:r,fillHeight:a,height:l,legend:c,legendAlign:u,legendPosition:d,minLegendEntries:m=1,onToggleSeries:g,swatch:h="square",title:p,width:_}){const f=i.useId(),x=d==="left"||d==="right",M=d!=="none"&&c!==void 0&&c.length>=m&&o.jsx(lu,{align:u,entries:c,onToggle:g,position:d,swatch:h});return o.jsxs("figure",{className:ee.figure,children:[o.jsx("figcaption",{className:ee.title,id:f,children:p}),o.jsxs("div",{className:`${ee.body} ${x?ee.bodyRow:ee.bodyColumn}`,children:[(d==="top"||d==="left")&&M,o.jsx("div",{className:`${ee.plot} ${a?ee.plotFill:""}`,ref:n,style:a?void 0:{minHeight:l},children:s?o.jsx("p",{className:ee.empty,children:r}):_===0||l===0?null:o.jsx("svg",{"aria-labelledby":f,className:ee.canvas,height:l,role:"img",viewBox:`0 0 ${_} ${l}`,width:_,children:t?o.jsx("g",{transform:`translate(${_/2} ${l/2})`,children:e}):e})}),(d==="bottom"||d==="right")&&M]})]})}const iu={bottom:ee.slideUp,left:ee.slideRight,right:ee.slideLeft};function un({axis:e,gutter:t,length:n,orientation:s}){const r=e.visibility??"visible";if(r==="hidden")return null;const a=r==="onHover",l=o.jsx(Yc,{hideLine:e.hideLine,labelRotation:e.labelRotation,length:n,orientation:s,ticks:e.ticks});return a?o.jsxs("g",{className:`${ee.dynamicAxis} ${iu[s]}`,children:[o.jsx("rect",{className:ee.gutter,height:t.height,width:t.width,x:t.x,y:t.y}),l]}):l}function ht({children:e,containerRef:t,empty:n,emptyMessage:s,fillHeight:r,grid:a,height:l,legend:c,legendAlign:u,legendPosition:d,margins:m,onToggleSeries:g,plot:h,title:p,width:_,xAxis:f,yAxis:x,yAxisRight:M}){return o.jsx(et,{containerRef:t,empty:n,emptyMessage:s,fillHeight:r,height:l,legend:c,legendAlign:u,legendPosition:d,minLegendEntries:2,onToggleSeries:g,title:p,width:_,children:o.jsxs("g",{transform:`translate(${m.left} ${m.top})`,children:[a==null?void 0:a.map(y=>o.jsx(Qc,{baseline:y.baseline,length:y.orientation==="horizontal"?h.width:h.height,lines:y.lines,orientation:y.orientation},y.orientation)),e,o.jsx("g",{transform:`translate(0 ${h.height})`,children:o.jsx(un,{axis:f,gutter:{height:m.bottom,width:h.width,x:0,y:0},length:h.width,orientation:"bottom"})}),o.jsx(un,{axis:x,gutter:{height:h.height,width:m.left,x:-m.left,y:0},length:h.height,orientation:"left"}),M&&o.jsx("g",{transform:`translate(${h.width} 0)`,children:o.jsx(un,{axis:M,gutter:{height:h.height,width:m.right,x:0,y:0},length:h.height,orientation:"right"})})]})})}function Ls(e){return e==="smooth"?it.curveMonotoneX:it.curveLinear}function wn(e,t){return it.line().defined(n=>n!==null&&Number.isFinite(n.x)&&Number.isFinite(n.y)).x(n=>(n==null?void 0:n.x)??0).y(n=>(n==null?void 0:n.y)??0).curve(Ls(t))(e)??""}function cu(e,t){return it.area().defined(n=>n!==null&&Number.isFinite(n.y0)&&Number.isFinite(n.y1)).x(n=>(n==null?void 0:n.x)??0).y0(n=>(n==null?void 0:n.y0)??0).y1(n=>(n==null?void 0:n.y1)??0).curve(Ls(t))(e)??""}function Dn(e,t,n,s,r){const a=Math.max(Math.min(n,s)/2,0),[l,c,u,d]=r.map(h=>Math.max(Math.min(h,a),0)),m=e+n,g=t+s;return[`M${e+l},${t}`,`L${m-c},${t}`,c?`Q${m},${t} ${m},${t+c}`:"",`L${m},${g-u}`,u?`Q${m},${g} ${m-u},${g}`:"",`L${e+d},${g}`,d?`Q${e},${g} ${e},${g-d}`:"",`L${e},${t+l}`,l?`Q${e},${t} ${e+l},${t}`:"","Z"].filter(Boolean).join("")}function uu(e,{label:t,threshold:n}){const s=e.reduce((u,d)=>u+Math.max(d.value,0),0);if(n<=0||s<=0)return e;const r=u=>Math.max(u.value,0)/s<n,a=e.filter(r);if(a.length<2)return e;const l={intent:"neutral",label:t,value:a.reduce((u,d)=>u+Math.max(d.value,0),0)};let c=!1;return e.flatMap(u=>r(u)?c?[]:(c=!0,[l]):[u])}const pn=5;function du(e){return!e||typeof getComputedStyle!="function"?pn:Number.parseFloat(getComputedStyle(e).getPropertyValue("--pl-radius-sm"))||pn}function Me(){const[e,t]=i.useState(()=>({font:Un(null),height:0,radius:pn,width:0})),n=i.useRef(null),s=i.useCallback(()=>{const a=n.current,l=(a==null?void 0:a.clientWidth)??0,c=(a==null?void 0:a.clientHeight)??0,u=Un(a),d=du(a);t(m=>m.width===l&&m.height===c&&m.radius===d&&m.font.family===u.family&&m.font.size===u.size&&m.font.lineHeight===u.lineHeight?m:{font:u,height:c,radius:d,width:l})},[]),r=i.useCallback(a=>{n.current=a,s()},[s]);return i.useEffect(()=>{const a=n.current;if(!a||typeof ResizeObserver>"u")return;const l=new ResizeObserver(s);return l.observe(a),()=>l.disconnect()},[s]),{font:e.font,height:e.height,radius:e.radius,ref:r,width:e.width}}function kn(e){const[t,n]=i.useState(null);return{hover:s=>{n(s),e==null||e(s)},hovered:t}}function He({defaultHiddenSeries:e=[],hiddenSeries:t,onHiddenSeriesChange:n}){const[s,r]=i.useState(e),a=t??s,l=i.useCallback(c=>{const u=a.includes(c)?a.filter(d=>d!==c):[...a,c];t===void 0&&r(u),n==null||n(u)},[t,a,n]);return{isHidden:i.useCallback(c=>a.includes(c),[a]),toggle:l}}const qt=6;function Vt(e){return Array.from({length:Math.max(e,0)},(t,n)=>`var(--pl-chart-series-${n%qt+1})`)}const fu={"#49619c":1,"#f26b35":2,"#6e2a92":3};function As(e,t){if(t<=0)return[];const n=fu[e.trim().toLowerCase()],s=Vt(qt).filter((r,a)=>n===void 0||a+1!==n);return[e,...Array.from({length:t-1},(r,a)=>s[a%s.length])]}const Kt={positive:"var(--pl-chart-positive)",negative:"var(--pl-chart-negative)",warning:"var(--pl-chart-warning)",neutral:"var(--pl-chart-neutral)"};function Ne(e,{accent:t}={}){const n=e.filter(a=>!a.color&&!a.intent).length,s=t?As(t,n):Vt(n);let r=0;return e.map(a=>{if(a.color)return a.color;if(a.intent)return Kt[a.intent];const l=s[r]??Vt(qt)[r%qt];return r+=1,l})}const mu=320;function hu(){return typeof matchMedia=="function"&&!matchMedia("(prefers-reduced-motion: reduce)").matches}function _u(e){return 1-(1-e)**3}function De(e,{duration:t=mu,from:n}={}){const[s,r]=i.useState(n??e),a=i.useRef(n??e),l=e.join(",");return i.useEffect(()=>{const c=a.current,u=h=>{a.current=h,r(h)};if(c.length!==e.length||t<=0||!hu()){u(e);return}const d=performance.now();let m=0;const g=()=>{const h=Math.min((performance.now()-d)/t,1),p=_u(h);u(c.map((_,f)=>_+(e[f]-_)*p)),h<1&&(m=requestAnimationFrame(g))};return m=requestAnimationFrame(g),()=>cancelAnimationFrame(m)},[l,t]),s}function Is({accent:e,defaultHiddenSlices:t,hiddenSlices:n,onHiddenSlicesChange:s,onHoverSlice:r,otherLabel:a,slices:l,smallSliceThreshold:c}){const{isHidden:u,toggle:d}=He({defaultHiddenSeries:t,hiddenSeries:n,onHiddenSeriesChange:s}),[m,g]=i.useState(null),h=i.useMemo(()=>uu(l,{label:a,threshold:c}),[a,l,c]),p=i.useMemo(()=>Ne(h,{accent:e}),[e,h]),_=h.map(b=>u(b.label)||!Number.isFinite(b.value)?0:Math.max(b.value,0)),f=_.reduce((b,D)=>b+D,0),x=i.useMemo(()=>ou(_).flatMap(b=>[b.startAngle,b.endAngle]),[_.join()]),M=De(x,{from:x.map(()=>0)});return{angles:h.map((b,D)=>({startAngle:M[D*2]??0,endAngle:M[D*2+1]??0})),colors:p,focus:b=>{g(b),r==null||r(b===null?null:h[b]??null)},focused:m,isHidden:u,ratioOf:b=>f>0?(_[b]??0)/f:0,slices:h,toggle:d,total:f,values:_}}const pu="_bar_72sfu_3",gu="_series_72sfu_7 _series_gr8jr_208",bu="_seriesOff_72sfu_11 _seriesOff_gr8jr_212",yu="_valueLabel_72sfu_15 _valueLabel_gr8jr_123",Et={bar:pu,series:gu,seriesOff:bu,valueLabel:yu};function xu({accent:e,categories:t,defaultHiddenSeries:n,emptyMessage:s="Sem dados no período",formatValue:r=je,height:a=260,hiddenSeries:l,labelAngle:c="auto",legend:u="bottom",legendAlign:d,onHiddenSeriesChange:m,onHoverCategory:g,orientation:h="vertical",series:p,showDataLabels:_=!1,stacked:f=!1,title:x,xAxis:M="visible",yAxis:y="visible",yAxisRight:b="hidden"}){const{font:D,height:$,radius:k,ref:C,width:H}=Me(),{fillHeight:S,value:z}=$e(a,$),{isHidden:w,toggle:A}=He({defaultHiddenSeries:n,hiddenSeries:l,onHiddenSeriesChange:m}),{hover:R,hovered:E}=kn(g),F=h==="vertical",T=i.useMemo(()=>Ne(p,{accent:e}),[e,p]),O=De(p.map(W=>w(W.label)?0:1)),K=W=>O[W]??0,L=i.useMemo(()=>{const W=p.filter(ae=>!w(ae.label));return f?Pe(t.flatMap((ae,ve)=>ks(W.map(de=>de.values[ve]??0)))):ut(W.map(ae=>Pe([...ae.values])))},[t,w,p,f]),P=!F&&(u==="left"||u==="right")?"bottom":u,j=Ve(L,F?z:H,r),{margins:N,plot:I,rotation:v}=mt({bottomLabels:F?t:j,font:D,height:z,labelAngle:c,leftLabels:F?j:t,rightLabels:F?j:t,topRoom:_&&F?kt(D):0,width:H,xAxis:M,yAxis:y,yAxisRight:b}),B=F?I.width:I.height,V=F?I.height:I.width,q=F?V:0,X=F?0:V,le=i.useMemo(()=>Mn({domain:t,range:[0,B]}),[t,B]),te=i.useMemo(()=>ye({domain:L,range:[q,X]}),[L,X,q]),[ie,Y]=De(te.domain()),Q=i.useMemo(()=>ye({domain:{min:ie,max:Y},nice:!1,range:[q,X]}),[X,q,Y,ie]),he=Ke(te,V),U=le.bandwidth(),J=Ds(U,O);function oe(W){return J[W]??ws}function fe(W){return f?U:oe(W).thickness}function pe(W){return f?0:oe(W).offset}function qe(W,ae){const ve=p[W].values[ae];return(Number.isFinite(ve)?ve:0)*(f?K(W):1)}function tt(W,ae){if(!f)return[k,k,k,k];const ve=p.map((ue,ce)=>ce).filter(ue=>qe(ue,ae)!==0),de=ve[0]===W,se=ve.at(-1)===W;return F?[se?k:0,se?k:0,de?k:0,de?k:0]:[de?k:0,se?k:0,se?k:0,de?k:0]}const tn=t.map(W=>({label:W,position:(le(W)??0)+U/2})),Rt=he.map(W=>({label:r(W),position:Q(W)})),G={labelRotation:v,ticks:tn},ge={hideLine:!0,ticks:Rt};return o.jsxs(ht,{containerRef:C,empty:p.length===0||t.length===0,emptyMessage:s,fillHeight:S,grid:[{baseline:Q(0),lines:he.map(W=>Q(W)),orientation:F?"horizontal":"vertical"}],height:z,legend:p.map((W,ae)=>({color:T[ae],hidden:w(W.label),label:W.label})),legendAlign:d,legendPosition:P,margins:N,onToggleSeries:A,plot:I,title:x,width:H,xAxis:{...F?G:ge,visibility:M},yAxis:{...F?ge:G,visibility:y},yAxisRight:{...F?ge:G,hideLine:!0,visibility:b},children:[E!==null&&o.jsx($n,{offset:le(t[E])??0,orientation:h,plot:I,size:U}),p.map((W,ae)=>{const ve=w(W.label);return o.jsxs("g",{"aria-hidden":ve||void 0,className:`${Et.series} ${ve?Et.seriesOff:""}`,children:[t.map((de,se)=>{const ue=le(de)??0,ce=f?p.slice(0,ae).reduce((Ss,df,Es)=>Ss+qe(Es,se),0):0,Se=Q(ce),nn=Q(ce+qe(ae,se)),Rn=Math.abs(nn-Se),Cn=fe(ae),Ln=pe(ae);return o.jsx("path",{"aria-label":`${W.label}, ${de}: ${r(W.values[se]??0)}`,className:Et.bar,d:Dn(F?ue+Ln:Math.min(Se,nn),F?Math.min(Se,nn):ue+Ln,F?Cn:Rn,F?Rn:Cn,tt(ae,se)),fill:T[ae],onMouseEnter:()=>R(se),onMouseLeave:()=>R(null)},de)}),_&&!f&&t.map((de,se)=>{const ue=W.values[se]??0,ce=Q(ue),Se=(le(de)??0)+pe(ae)+fe(ae)/2;return o.jsx("text",{className:Et.valueLabel,dominantBaseline:F?"auto":"middle",textAnchor:F?"middle":"start",x:F?Se:ce+6,y:F?ce-6:Se,children:r(ue)},de)})]},W.label)})]})}const vu="_line_1r7tk_1 _line_gr8jr_131",ju="_dot_1r7tk_5 _dot_gr8jr_139",$u="_dotVisible_1r7tk_9 _dotVisible_gr8jr_144",Mu="_valueLabel_1r7tk_13 _valueLabel_gr8jr_123",Nu="_series_1r7tk_17 _series_gr8jr_208",wu="_seriesOff_1r7tk_21 _seriesOff_gr8jr_212",ot={line:vu,dot:ju,dotVisible:$u,valueLabel:Mu,series:Nu,seriesOff:wu};function Du(e,t){return e[t]!==null&&!e[t-1]&&!e[t+1]}function ku({accent:e,categories:t,curve:n="smooth",defaultHiddenSeries:s,emptyMessage:r="Sem dados no período",formatValue:a=je,height:l=260,includeZero:c=!0,hiddenSeries:u,labelAngle:d="auto",legend:m="bottom",legendAlign:g,onHiddenSeriesChange:h,series:p,showDataLabels:_=!1,showDots:f=!1,title:x,xAxis:M="visible",yAxis:y="visible",yAxisRight:b="hidden"}){const{font:D,height:$,ref:k,width:C}=Me(),{fillHeight:H,value:S}=$e(l,$),{isHidden:z,toggle:w}=He({defaultHiddenSeries:s,hiddenSeries:u,onHiddenSeriesChange:h}),A=i.useMemo(()=>Ne(p,{accent:e}),[e,p]),R=i.useMemo(()=>ut(p.filter(q=>!z(q.label)).map(q=>Pe(q.values.filter(X=>X!==null),{includeZero:c}))),[c,z,p]),E=Ve(R,S,a),{margins:F,plot:T,rotation:O}=mt({bottomLabels:t,font:D,height:S,labelAngle:d,leftLabels:E,rightLabels:E,topRoom:_?kt(D):0,width:C,xAxis:M,yAxis:y,yAxisRight:b}),K=i.useMemo(()=>Rs({domain:t,padding:0,range:[0,T.width]}),[t,T.width]),L=i.useMemo(()=>ye({domain:R,range:[T.height,0]}),[R,T.height]),[P,j]=De(L.domain()),N=i.useMemo(()=>ye({domain:{min:P,max:j},nice:!1,range:[T.height,0]}),[j,P,T.height]),I=Ke(L,T.height),v=p.map(q=>t.map((X,le)=>{const te=q.values[le];return te==null||!Number.isFinite(te)?null:{x:K(X)??0,y:N(te)}})),B=t.map(q=>({label:q,position:K(q)??0})),V=I.map(q=>({label:a(q),position:N(q)}));return o.jsx(ht,{containerRef:k,empty:p.length===0||t.length===0,emptyMessage:r,fillHeight:H,grid:[{baseline:N(0),lines:I.map(q=>N(q)),orientation:"horizontal"}],height:S,legend:p.map((q,X)=>({color:A[X],hidden:z(q.label),label:q.label})),legendAlign:g,legendPosition:m,margins:F,onToggleSeries:w,plot:T,title:x,width:C,xAxis:{labelRotation:O,ticks:B,visibility:M},yAxis:{hideLine:!0,ticks:V,visibility:y},yAxisRight:{hideLine:!0,ticks:V,visibility:b},children:p.map((q,X)=>{const le=z(q.label);return o.jsxs("g",{"aria-hidden":le||void 0,className:`${ot.series} ${le?ot.seriesOff:""}`,children:[o.jsx("path",{className:ot.line,d:wn(v[X],n),fill:"none",stroke:A[X]}),v[X].map((te,ie)=>te===null?null:o.jsx("circle",{"aria-label":`${q.label}, ${t[ie]}: ${a(q.values[ie]??0)}`,className:f||Du(v[X],ie)?ot.dotVisible:ot.dot,cx:te.x,cy:te.y,fill:A[X],r:4},t[ie])),_&&v[X].map((te,ie)=>te===null?null:o.jsx("text",{className:ot.valueLabel,textAnchor:"middle",x:te.x,y:te.y-10,children:a(q.values[ie]??0)},t[ie]))]},q.label)})})}const Ru="_area_1qxb1_3",Cu="_tooltip_1qxb1_8",Lu="_title_1qxb1_19",Au="_subtitle_1qxb1_28",Iu="_grid_1qxb1_37",Ou="_label_1qxb1_44",Su="_swatch_1qxb1_58",Eu="_value_1qxb1_67",Tu="_computed_1qxb1_79 _value_1qxb1_67",Fu="_emphasis_1qxb1_85",Bu="_rule_1qxb1_91",Pu="_totalLabel_1qxb1_97",Ku="_totalValue_1qxb1_102",_e={area:Ru,tooltip:Cu,title:Lu,subtitle:Au,grid:Iu,label:Ou,swatch:Su,value:Eu,computed:Tu,emphasis:Fu,rule:Bu,totalLabel:Pu,totalValue:Ku},at=16,Tt=8;function gn(e){return e.reduce((t,n)=>t+n,0)}function zu(e,t){return typeof e=="function"?e(t):e==="average"?t.length===0?0:gn(t)/t.length:gn(t)}function Hu({x:e,y:t},n,s){const r=e+at+n<=window.innerWidth-Tt,a=t+at+s<=window.innerHeight-Tt;return{x:r?e+at:Math.max(e-at-n,Tt),y:a?t+at:Math.max(t-at-s,Tt)}}function qu({children:e,columns:t,computed:n,rows:s,showTotal:r=!1,subtitle:a,title:l,totalLabel:c="Total"}){const[u,d]=i.useState(null),m=u!==null&&s.length>0;i.useEffect(()=>{if(!m)return;const h=()=>d(null);return window.addEventListener("scroll",h,!0),window.addEventListener("resize",h),window.addEventListener("keydown",h),()=>{window.removeEventListener("scroll",h,!0),window.removeEventListener("resize",h),window.removeEventListener("keydown",h)}},[m]);const g=h=>d({x:h.clientX,y:h.clientY});return o.jsxs("div",{className:_e.area,onPointerLeave:()=>d(null),onPointerMove:g,children:[e,m&&Oe.createPortal(o.jsx(Vu,{columns:t,computed:n,ponteiro:u,rows:s,showTotal:r,subtitle:a,title:l,totalLabel:c}),document.body)]})}function Vu({columns:e,computed:t,ponteiro:n,rows:s,showTotal:r,subtitle:a,title:l,totalLabel:c}){const u=i.useRef(null),[d,m]=i.useState({altura:0,largura:0});i.useLayoutEffect(()=>{const $=u.current;if(!$)return;const{height:k,width:C}=$.getBoundingClientRect();(k!==d.altura||C!==d.largura)&&m({altura:k,largura:C})});const g=s.reduce(($,k)=>Math.max($,k.values.length),0),h=e??Array.from({length:g},()=>({})),p=t==="none"||h.length===0?void 0:t??{},_=(p==null?void 0:p.column)??h.length-1,f=gn(s.map($=>$.values[_]??0)),x=(p==null?void 0:p.compute)??(($,k)=>k===0?0:$/k),M=(p==null?void 0:p.format)??($=>fs($,{casasDecimais:2})),{x:y,y:b}=Hu(n,d.largura,d.altura),D=`1fr ${"auto ".repeat(h.length+(p?1:0))}`.trim();return o.jsxs("div",{"aria-hidden":"true",className:_e.tooltip,ref:u,style:{left:y,top:b},children:[l!==void 0&&o.jsx("p",{className:_e.title,children:l}),a!==void 0&&o.jsx("p",{className:_e.subtitle,children:a}),o.jsxs("div",{className:_e.grid,style:{gridTemplateColumns:D},children:[s.map($=>o.jsxs(i.Fragment,{children:[o.jsxs("span",{className:`${_e.label} ${$.emphasis?_e.emphasis:""}`,children:[$.color!==void 0&&o.jsx("span",{className:_e.swatch,style:{background:$.color}}),$.label]}),h.map((k,C)=>o.jsx("span",{className:`${_e.value} ${$.emphasis?_e.emphasis:""}`,children:(k.format??String)($.values[C]??0)},C)),p&&o.jsx("span",{className:`${_e.computed} ${$.emphasis?_e.emphasis:""}`,children:M(x($.values[_]??0,f))})]},$.label)),r&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:_e.rule}),o.jsx("span",{className:`${_e.label} ${_e.totalLabel}`,children:c}),h.map(($,k)=>o.jsx("span",{className:`${_e.value} ${_e.totalValue}`,children:$.total==="none"?"":($.format??String)(zu($.total??"sum",s.map(C=>C.values[k]??0)))},k)),p&&o.jsx("span",{className:`${_e.computed} ${_e.totalValue}`,children:M(x(f,f))})]})]})]})}const Uu="_bar_ycvom_1",Gu="_line_ycvom_5 _line_gr8jr_131",Wu="_dot_ycvom_9 _dot_gr8jr_139",Xu="_dotVisible_ycvom_13 _dotVisible_gr8jr_144",Yu="_valueLabel_ycvom_17 _valueLabel_gr8jr_123",Qu="_series_ycvom_21 _series_gr8jr_208",Zu="_seriesOff_ycvom_25 _seriesOff_gr8jr_212",Ce={bar:Uu,line:Gu,dot:Wu,dotVisible:Xu,valueLabel:Yu,series:Qu,seriesOff:Zu};function Ju(e,t){return e[t]!==null&&!e[t-1]&&!e[t+1]}function zt(e){return e.axis??"left"}function Xn(e,t,n){return ut(e.filter(s=>zt(s)===t&&!n(s.label)).map(s=>Pe(s.values.filter(r=>r!==null))))}function ed({accent:e,categories:t,curve:n="smooth",defaultHiddenSeries:s,emptyMessage:r="Sem dados no período",formatRightValue:a,formatValue:l=je,height:c=260,hiddenSeries:u,labelAngle:d="auto",legend:m="bottom",legendAlign:g,onHiddenSeriesChange:h,onHoverCategory:p,series:_,showDataLabels:f=!1,showDots:x=!1,title:M,xAxis:y="visible",yAxis:b="visible",yAxisRight:D}){const{font:$,height:k,radius:C,ref:H,width:S}=Me(),{fillHeight:z,value:w}=$e(c,k),{isHidden:A,toggle:R}=He({defaultHiddenSeries:s,hiddenSeries:u,onHiddenSeriesChange:h}),{hover:E,hovered:F}=kn(p),T=a??l,O=_.some(G=>zt(G)==="right"),K=i.useMemo(()=>Ne(_,{accent:e}),[e,_]),L=De(_.map(G=>A(G.label)?0:1)),P=i.useMemo(()=>Xn(_,"left",A),[A,_]),j=i.useMemo(()=>O?Xn(_,"right",A):P,[P,A,_,O]),N=D??(O?"visible":"hidden"),{margins:I,plot:v,rotation:B}=mt({bottomLabels:t,font:$,height:w,labelAngle:d,leftLabels:Ve(P,w,l),rightLabels:Ve(j,w,T),topRoom:f?kt($):0,width:S,xAxis:y,yAxis:b,yAxisRight:N}),V=i.useMemo(()=>Mn({domain:t,range:[0,v.width]}),[t,v.width]),q=i.useMemo(()=>ye({domain:P,range:[v.height,0]}),[P,v.height]),X=i.useMemo(()=>ye({domain:j,range:[v.height,0]}),[j,v.height]),[le,te,ie,Y]=De([...q.domain(),...X.domain()]),Q=i.useMemo(()=>ye({domain:{min:le,max:te},nice:!1,range:[v.height,0]}),[te,le,v.height]),he=i.useMemo(()=>ye({domain:{min:ie,max:Y},nice:!1,range:[v.height,0]}),[Y,ie,v.height]),U=G=>zt(G)==="right"?he:Q,J=G=>zt(G)==="right"?T:l,oe=Ke(q,v.height),fe=Ke(X,v.height),pe=V.bandwidth(),qe=Ds(pe,_.map((G,ge)=>G.kind==="bar"?L[ge]??0:0)),tt=G=>qe[G]??ws,tn=t.map(G=>({label:G,position:(V(G)??0)+pe/2})),Rt=(G,ge,W)=>G.map(ae=>({label:W(ae),position:ge(ae)}));return o.jsxs(ht,{containerRef:H,empty:_.length===0||t.length===0,emptyMessage:r,fillHeight:z,grid:[{baseline:Q(0),lines:oe.map(G=>Q(G)),orientation:"horizontal"}],height:w,legend:_.map((G,ge)=>({color:K[ge],hidden:A(G.label),label:G.label})),legendAlign:g,legendPosition:m,margins:I,onToggleSeries:R,plot:v,title:M,width:S,xAxis:{labelRotation:B,ticks:tn,visibility:y},yAxis:{hideLine:!0,ticks:Rt(oe,Q,l),visibility:b},yAxisRight:{hideLine:!0,ticks:Rt(fe,he,T),visibility:N},children:[F!==null&&o.jsx($n,{offset:V(t[F])??0,plot:v,size:pe}),_.map((G,ge)=>{if(G.kind!=="bar")return null;const W=A(G.label),ae=U(G),ve=J(G),de=ae(0);return o.jsxs("g",{"aria-hidden":W||void 0,className:`${Ce.series} ${W?Ce.seriesOff:""}`,children:[t.map((se,ue)=>{const ce=G.values[ue];if(ce==null||!Number.isFinite(ce))return null;const Se=ae(ce);return o.jsx("path",{"aria-label":`${G.label}, ${se}: ${ve(ce)}`,className:Ce.bar,d:Dn((V(se)??0)+tt(ge).offset,Math.min(de,Se),tt(ge).thickness,Math.abs(Se-de),[C,C,C,C]),fill:K[ge],onMouseEnter:()=>E(ue),onMouseLeave:()=>E(null)},se)}),f&&t.map((se,ue)=>{const ce=G.values[ue];return ce==null||!Number.isFinite(ce)?null:o.jsx("text",{className:Ce.valueLabel,textAnchor:"middle",x:(V(se)??0)+tt(ge).offset+tt(ge).thickness/2,y:ae(ce)-6,children:ve(ce)},se)})]},G.label)}),_.map((G,ge)=>{if(G.kind!=="line")return null;const W=A(G.label),ae=U(G),ve=J(G),de=t.map((se,ue)=>{const ce=G.values[ue];return ce==null||!Number.isFinite(ce)?null:{x:(V(se)??0)+pe/2,y:ae(ce)}});return o.jsxs("g",{"aria-hidden":W||void 0,className:`${Ce.series} ${W?Ce.seriesOff:""}`,children:[o.jsx("path",{className:Ce.line,d:wn(de,n),fill:"none",stroke:K[ge]}),de.map((se,ue)=>se===null?null:o.jsx("circle",{"aria-label":`${G.label}, ${t[ue]}: ${ve(G.values[ue]??0)}`,className:x||Ju(de,ue)?Ce.dotVisible:Ce.dot,cx:se.x,cy:se.y,fill:K[ge],r:4},t[ue])),f&&de.map((se,ue)=>se===null?null:o.jsx("text",{className:Ce.valueLabel,textAnchor:"middle",x:se.x,y:se.y-10,children:ve(G.values[ue]??0)},t[ue]))]},G.label)})]})}const td="_outline_1lab2_1 _line_gr8jr_131",nd="_dot_1lab2_5 _dot_gr8jr_139",sd="_dotVisible_1lab2_9 _dotVisible_gr8jr_144",od="_valueLabel_1lab2_13 _valueLabel_gr8jr_123",ad="_series_1lab2_17 _series_gr8jr_208",rd="_seriesOff_1lab2_21 _seriesOff_gr8jr_212",rt={outline:td,dot:nd,dotVisible:sd,valueLabel:od,series:ad,seriesOff:rd};function ld(e,t){return e[t]!==null&&!e[t-1]&&!e[t+1]}function id(e,t,n,s){return e.slice(0,t).reduce((r,a,l)=>r+(a.values[n]??0)*s(l),0)}function cd({accent:e,categories:t,curve:n="smooth",defaultHiddenSeries:s,emptyMessage:r="Sem dados no período",formatValue:a=je,height:l=260,includeZero:c=!0,hiddenSeries:u,labelAngle:d="auto",legend:m="bottom",legendAlign:g,onHiddenSeriesChange:h,series:p,showDataLabels:_=!1,showDots:f=!1,stacked:x=!1,title:M,xAxis:y="visible",yAxis:b="visible",yAxisRight:D="hidden"}){const $=i.useId(),{font:k,height:C,ref:H,width:S}=Me(),{fillHeight:z,value:w}=$e(l,C),{isHidden:A,toggle:R}=He({defaultHiddenSeries:s,hiddenSeries:u,onHiddenSeriesChange:h}),E=i.useMemo(()=>Ne(p,{accent:e}),[e,p]),F=De(p.map(Y=>A(Y.label)?0:1)),T=Y=>F[Y]??0,O=i.useMemo(()=>{const Y=Q=>A(p[Q].label)?0:1;return x?Pe(t.flatMap((Q,he)=>ks(p.map((U,J)=>(U.values[he]??0)*Y(J))))):ut(p.filter(Q=>!A(Q.label)).map(Q=>Pe(Q.values.filter(he=>he!==null),{includeZero:c})))},[t,c,A,p,x]),K=Ve(O,w,a),{margins:L,plot:P,rotation:j}=mt({bottomLabels:t,font:k,height:w,labelAngle:d,leftLabels:K,rightLabels:K,topRoom:_?kt(k):0,width:S,xAxis:y,yAxis:b,yAxisRight:D}),N=i.useMemo(()=>Rs({domain:t,padding:0,range:[0,P.width]}),[t,P.width]),I=i.useMemo(()=>ye({domain:O,range:[P.height,0]}),[O,P.height]),[v,B]=De(I.domain()),V=i.useMemo(()=>ye({domain:{min:v,max:B},nice:!1,range:[P.height,0]}),[B,v,P.height]),q=Ke(I,P.height),X=V(0),le=p.map((Y,Q)=>t.map((he,U)=>{const J=Y.values[U];if(J==null||!Number.isFinite(J))return null;const oe=x?id(p,Q,U,T):0,fe=x?J*T(Q):J;return{x:N(he)??0,y0:x?V(oe):X,y1:V(oe+fe)}})),te=t.map(Y=>({label:Y,position:N(Y)??0})),ie=q.map(Y=>({label:a(Y),position:V(Y)}));return o.jsxs(ht,{containerRef:H,empty:p.length===0||t.length===0,emptyMessage:r,grid:[{baseline:X,lines:q.map(Y=>V(Y)),orientation:"horizontal"}],fillHeight:z,height:w,legend:p.map((Y,Q)=>({color:E[Q],hidden:A(Y.label),label:Y.label})),legendAlign:g,legendPosition:m,margins:L,onToggleSeries:R,plot:P,title:M,width:S,xAxis:{labelRotation:j,ticks:te,visibility:y},yAxis:{hideLine:!0,ticks:ie,visibility:b},yAxisRight:{hideLine:!0,ticks:ie,visibility:D},children:[!x&&o.jsx("defs",{children:p.map((Y,Q)=>o.jsxs("linearGradient",{id:`${$}-${Q}`,x1:"0",x2:"0",y1:"0",y2:"1",children:[o.jsx("stop",{offset:"5%",stopColor:E[Q],stopOpacity:.6}),o.jsx("stop",{offset:"95%",stopColor:E[Q],stopOpacity:.05})]},Y.label))}),p.map((Y,Q)=>{const he=le[Q],U=he.map(oe=>oe===null?null:{x:oe.x,y:oe.y1}),J=A(Y.label);return o.jsxs("g",{"aria-hidden":J||void 0,className:`${rt.series} ${J?rt.seriesOff:""}`,children:[o.jsx("path",{d:cu(he,n),fill:x?E[Q]:`url(#${$}-${Q})`}),o.jsx("path",{className:rt.outline,d:wn(U,n),fill:"none",stroke:E[Q]}),t.map((oe,fe)=>{const pe=he[fe];return pe===null?null:o.jsx("circle",{"aria-label":`${Y.label}, ${oe}: ${a(Y.values[fe]??0)}`,className:f||ld(he,fe)?rt.dotVisible:rt.dot,cx:pe.x,cy:pe.y1,fill:E[Q],r:4},oe)}),_&&t.map((oe,fe)=>{const pe=he[fe];return pe===null?null:o.jsx("text",{className:rt.valueLabel,textAnchor:"middle",x:pe.x,y:pe.y1-10,children:a(Y.values[fe]??0)},oe)})]},Y.label)})]})}const ud="_bubble_okzta_1",dd="_guide_okzta_11",fd="_series_okzta_23 _series_gr8jr_208",md="_seriesOff_okzta_27 _seriesOff_gr8jr_212",yt={bubble:ud,guide:dd,series:fd,seriesOff:md},hd=5,_d=[4,18];function pd({accent:e,defaultHiddenSeries:t,emptyMessage:n="Sem dados no período",formatX:s=M=>String(M),formatY:r=M=>String(M),formatZ:a=M=>String(M),height:l=280,includeZero:c=!0,hiddenSeries:u,legend:d="bottom",legendAlign:m,onHiddenSeriesChange:g,series:h,title:p,xAxis:_="visible",yAxis:f="visible",yAxisRight:x="hidden"}){const{font:M,height:y,ref:b,width:D}=Me(),{fillHeight:$,value:k}=$e(l,y),{isHidden:C,toggle:H}=He({defaultHiddenSeries:t,hiddenSeries:u,onHiddenSeriesChange:g}),[S,z]=i.useState(null),w=i.useMemo(()=>Ne(h,{accent:e}),[e,h]),A=i.useMemo(()=>h.filter(U=>!C(U.label)),[C,h]),R=i.useMemo(()=>ut(A.map(U=>Pe(U.points.map(J=>J.x),{includeZero:c}))),[c,A]),E=i.useMemo(()=>ut(A.map(U=>Pe(U.points.map(J=>J.y),{includeZero:c}))),[c,A]),F=i.useMemo(()=>h.reduce((U,J)=>J.points.reduce((oe,fe)=>Math.max(oe,fe.z??0),U),0),[h]),T=Ve(E,k,r),O=Ve(R,D,s),{margins:K,plot:L,rotation:P}=mt({bottomLabels:O,font:M,height:k,labelAngle:"auto",leftLabels:T,rightLabels:T,topRoom:0,width:D,xAxis:_,yAxis:f,yAxisRight:x}),j=i.useMemo(()=>ye({domain:R,range:[0,L.width]}),[R,L.width]),N=i.useMemo(()=>ye({domain:E,range:[L.height,0]}),[E,L.height]),[I,v,B,V]=De([...j.domain(),...N.domain()]),q=i.useMemo(()=>ye({domain:{min:I,max:v},nice:!1,range:[0,L.width]}),[v,I,L.width]),X=i.useMemo(()=>ye({domain:{min:B,max:V},nice:!1,range:[L.height,0]}),[V,B,L.height]),le=i.useMemo(()=>tu(F,_d),[F]),te=Ke(j,L.width),ie=Ke(N,L.height),Y=te.map(U=>({label:s(U),position:q(U)})),Q=ie.map(U=>({label:r(U),position:X(U)}));function he(U,J){const oe=J.label?`${U.label}, ${J.label}`:U.label,fe=`${s(J.x)} × ${r(J.y)}`;return J.z===void 0?`${oe}: ${fe}`:`${oe}: ${fe} (${a(J.z)})`}return o.jsxs(ht,{containerRef:b,empty:h.every(U=>U.points.length===0),emptyMessage:n,grid:[{lines:ie.map(U=>X(U)),orientation:"horizontal"},{lines:te.map(U=>q(U)),orientation:"vertical"}],fillHeight:$,height:k,legend:h.map((U,J)=>({color:w[J],hidden:C(U.label),label:U.label})),legendAlign:m,legendPosition:d,margins:K,onToggleSeries:H,plot:L,title:p,width:D,xAxis:{hideLine:!0,labelRotation:P,ticks:Y,visibility:_},yAxis:{hideLine:!0,ticks:Q,visibility:f},yAxisRight:{hideLine:!0,ticks:Q,visibility:x},children:[S&&o.jsxs("g",{"aria-hidden":"true",children:[o.jsx("line",{className:yt.guide,x1:S.x,x2:S.x,y1:S.y,y2:L.height}),o.jsx("line",{className:yt.guide,x1:0,x2:S.x,y1:S.y,y2:S.y})]}),h.map((U,J)=>o.jsx("g",{"aria-hidden":C(U.label)||void 0,className:`${yt.series} ${C(U.label)?yt.seriesOff:""}`,children:U.points.map((oe,fe)=>{const pe=q(oe.x),qe=X(oe.y);return o.jsx("circle",{"aria-label":he(U,oe),className:yt.bubble,cx:pe,cy:qe,fill:w[J],onMouseEnter:()=>z({x:pe,y:qe}),onMouseLeave:()=>z(null),r:oe.z===void 0?hd:le(oe.z)},fe)})},U.label))]})}const gd="_slice_1c5i5_3",bd="_sliceLabel_1c5i5_13",Yn={slice:gd,sliceLabel:bd};function yd({accent:e,defaultHiddenSlices:t,emptyMessage:n="Sem dados no período",formatPercent:s=y=>`${Math.round(y*100)}%`,formatValue:r=je,height:a=260,hiddenSlices:l,legend:c="bottom",legendAlign:u,onHiddenSlicesChange:d,onHoverSlice:m,otherLabel:g="Outros",showDataLabels:h=!1,showLegendValues:p=!1,sliceRadius:_,slices:f,smallSliceThreshold:x=.02,title:M}){const{font:y,height:b,radius:D,ref:$,width:k}=Me(),{fillHeight:C,value:H}=$e(a,b),S=Is({accent:e,defaultHiddenSlices:t,hiddenSlices:l,onHiddenSlicesChange:d,onHoverSlice:m,otherLabel:g,slices:f,smallSliceThreshold:x}),z=en(k,H)/2,w=_??D;return o.jsxs(et,{centerOrigin:!0,containerRef:$,empty:S.slices.length===0||f.every(A=>Math.max(A.value,0)===0),emptyMessage:n,fillHeight:C,height:H,legend:S.slices.map((A,R)=>({color:S.colors[R],hidden:S.isHidden(A.label),label:A.label,value:p?s(S.ratioOf(R)):void 0})),legendAlign:u,legendPosition:c,onToggleSeries:S.toggle,swatch:"dot",title:M,width:k,children:[S.slices.map((A,R)=>o.jsx("path",{"aria-label":`${A.label}: ${r(Math.max(A.value,0))} (${s(S.ratioOf(R))})`,className:Yn.slice,d:Nt({...S.angles[R],cornerRadius:w,innerRadius:0,outerRadius:z}),fill:S.colors[R],onMouseEnter:()=>S.focus(R),onMouseLeave:()=>S.focus(null)},A.label)),h&&S.slices.map((A,R)=>{const E=s(S.ratioOf(R)),[F,T]=au({...S.angles[R],innerRadius:0,outerRadius:z}),O=S.angles[R].endAngle-S.angles[R].startAngle,K=O>=Math.PI?z:2*(z/2)*Math.sin(O/2);return S.isHidden(A.label)||Je(E,y)>K?null:o.jsx("text",{className:Yn.sliceLabel,dominantBaseline:"middle",textAnchor:"middle",x:F,y:T,children:E},A.label)})]})}const xd="_slice_1gir8_3",vd="_center_1gir8_13",jd="_centerValue_1gir8_17",$d="_centerLabel_1gir8_22",Ft={slice:xd,center:vd,centerValue:jd,centerLabel:$d};function Md({accent:e,centerLabel:t="Total",defaultHiddenSlices:n,emptyMessage:s="Sem dados no período",formatPercent:r=D=>`${Math.round(D*100)}%`,formatValue:a=je,height:l=260,hiddenSlices:c,legend:u="right",legendAlign:d,onHiddenSlicesChange:m,onHoverSlice:g,otherLabel:h="Outros",showCenter:p=!0,showLegendValues:_=!0,sliceRadius:f,slices:x,smallSliceThreshold:M=.02,thickness:y=.38,title:b}){const{font:D,height:$,radius:k,ref:C,width:H}=Me(),{fillHeight:S,value:z}=$e(l,$),w=Is({accent:e,defaultHiddenSlices:n,hiddenSlices:c,onHiddenSlicesChange:m,onHoverSlice:g,otherLabel:h,slices:x,smallSliceThreshold:M}),R=en(H,z)/2,E=R*(1-y),F=f??k,T=w.focused===null?void 0:w.slices[w.focused],O=Cs(a(T?Math.max(T.value,0):w.total),T?T.label:t,D,E*2);return o.jsxs(et,{centerOrigin:!0,containerRef:C,empty:w.slices.length===0||x.every(K=>Math.max(K.value,0)===0),emptyMessage:s,fillHeight:S,height:z,legend:w.slices.map((K,L)=>({color:w.colors[L],hidden:w.isHidden(K.label),label:K.label,value:_?r(w.ratioOf(L)):void 0})),legendAlign:d,legendPosition:u,onToggleSeries:w.toggle,swatch:"dot",title:b,width:H,children:[w.slices.map((K,L)=>o.jsx("path",{"aria-label":`${K.label}: ${a(Math.max(K.value,0))} (${r(w.ratioOf(L))})`,className:Ft.slice,d:Nt({...w.angles[L],cornerRadius:F,innerRadius:E,outerRadius:R}),fill:w.colors[L],onMouseEnter:()=>w.focus(L),onMouseLeave:()=>w.focus(null)},K.label)),p&&o.jsxs("g",{className:Ft.center,children:[o.jsx("text",{className:Ft.centerValue,dy:O.size*.1,style:{fontFamily:O.family,fontSize:O.size},textAnchor:"middle",children:O.value}),o.jsx("text",{className:Ft.centerLabel,dy:O.lineHeight*.62,textAnchor:"middle",children:O.label})]})]})}const Nd="_track_1rbw6_3",wd="_fill_1rbw6_7",Dd="_center_1rbw6_15",kd="_centerValue_1rbw6_19",Rd="_centerLabel_1rbw6_24",xt={track:Nd,fill:wd,center:Dd,centerValue:kd,centerLabel:Rd},Qn=6,Zn=8;function Jn(e){return e*Math.PI/180}function Cd({accent:e,centerLabel:t,defaultHiddenTracks:n,emptyMessage:s="Sem dados no período",endAngle:r=360,formatValue:a=je,height:l=260,hiddenTracks:c,legend:u="bottom",legendAlign:d,onHiddenTracksChange:m,showCenter:g=!0,startAngle:h=0,thickness:p=16,trackRadius:_,title:f,tracks:x}){const{font:M,height:y,radius:b,ref:D,width:$}=Me(),{fillHeight:k,value:C}=$e(l,y),{isHidden:H,toggle:S}=He({defaultHiddenSeries:n,hiddenSeries:c,onHiddenSeriesChange:m}),z=i.useMemo(()=>Ne(x,{accent:e}),[e,x]),w=x.reduce((I,v)=>Math.max(I,v.value),0),A=x.map(I=>{const v=I.max??w;return H(I.label)||v<=0?0:Math.min(Math.max(I.value,0)/v,1)}),R=De(A,{from:A.map(()=>0)}),E=Jn(h),F=Math.min(Jn(r)-E,Nn),T=en($,C)/2,O=Math.min(p,Math.max((T-Zn)/Math.max(x.length,1)-Qn,1)),K=I=>T-I*(O+Qn),L=Math.max(K(Math.max(x.length-1,0))-O,Zn),P=_??b,j=x.find(I=>!H(I.label))??x[0],N=j?Cs(a(j.value),t??j.label,M,L*2):void 0;return o.jsxs(et,{centerOrigin:!0,containerRef:D,empty:x.length===0,emptyMessage:s,fillHeight:k,height:C,legend:x.map((I,v)=>({color:z[v],hidden:H(I.label),label:I.label,value:a(I.value)})),legendAlign:d,legendPosition:x.length>1?u:"none",onToggleSeries:S,swatch:"dot",title:f,width:$,children:[x.map((I,v)=>{const B=K(v),V=B-O,q=R[v]??0,X=E+F*q;return o.jsxs("g",{children:[o.jsx("path",{"aria-label":`${I.label}: ${a(I.value)}`,className:xt.track,d:Nt({cornerRadius:P,endAngle:E+F,innerRadius:V,outerRadius:B,startAngle:E})}),q>0&&o.jsx("path",{className:xt.fill,d:Nt({cornerRadius:P,endAngle:X,innerRadius:V,outerRadius:B,startAngle:E}),fill:z[v]})]},I.label)}),g&&N&&o.jsxs("g",{className:xt.center,children:[o.jsx("text",{className:xt.centerValue,dy:N.size*.1,style:{fontFamily:N.family,fontSize:N.size},textAnchor:"middle",children:N.value}),o.jsx("text",{className:xt.centerLabel,dy:N.lineHeight*.62,textAnchor:"middle",children:N.label})]})]})}const Ld="_bar_1fyqf_1",Ad="_connector_1fyqf_6",Id="_valueLabel_1fyqf_12 _valueLabel_gr8jr_123",dn={bar:Ld,connector:Ad,valueLabel:Id};function Od(e){let t=0;return e.map(n=>{const s=n.total?0:t,r=s+n.value;return t=r,{inicio:s,fim:r}})}function Sd(e){return e.intent?e.intent:e.total?"neutral":e.value<0?"negative":"positive"}function Ed(e,t){return e===0?t(0):`${e<0?"-":"+"}${t(Math.abs(e))}`}function Td({emptyMessage:e="Sem dados no período",formatValue:t=je,height:n=280,labelAngle:s="auto",onHoverStep:r,showDataLabels:a=!0,steps:l,title:c,xAxis:u="visible",yAxis:d="visible",yAxisRight:m="hidden"}){const{font:g,height:h,radius:p,ref:_,width:f}=Me(),{fillHeight:x,value:M}=$e(n,h),{hover:y,hovered:b}=kn(r),D=i.useMemo(()=>Od(l),[l]),$=i.useMemo(()=>Ne(l.map(j=>({color:j.color,intent:Sd(j)}))),[l]),k=i.useMemo(()=>Pe(D.flatMap(j=>[j.inicio,j.fim])),[D]),C=Ve(k,M,t),{margins:H,plot:S,rotation:z}=mt({bottomLabels:l.map(j=>j.label),font:g,height:M,labelAngle:s,leftLabels:C,rightLabels:C,topRoom:a?kt(g):0,width:f,xAxis:u,yAxis:d,yAxisRight:m}),w=i.useMemo(()=>Mn({domain:l.map((j,N)=>String(N)),range:[0,S.width]}),[S.width,l]),A=j=>w(String(j))??0,R=i.useMemo(()=>ye({domain:k,range:[S.height,0]}),[k,S.height]),[E,F]=De(R.domain()),T=i.useMemo(()=>ye({domain:{min:E,max:F},nice:!1,range:[S.height,0]}),[F,E,S.height]),O=Ke(R,S.height),K=l.map((j,N)=>({label:j.label,position:A(N)+w.bandwidth()/2})),L=O.map(j=>({label:t(j),position:T(j)}));function P(j){return j.total?t(j.value):Ed(j.value,t)}return o.jsxs(ht,{containerRef:_,empty:l.length===0,emptyMessage:e,grid:[{baseline:T(0),lines:O.map(j=>T(j)),orientation:"horizontal"}],fillHeight:x,height:M,legendPosition:"none",margins:H,plot:S,title:c,width:f,xAxis:{labelRotation:z,ticks:K,visibility:u},yAxis:{hideLine:!0,ticks:L,visibility:d},yAxisRight:{hideLine:!0,ticks:L,visibility:m},children:[b!==null&&o.jsx($n,{offset:A(b),plot:S,size:w.bandwidth()}),o.jsx("g",{"aria-hidden":"true",children:D.slice(0,-1).map((j,N)=>{const I=T(j.fim);return o.jsx("line",{className:dn.connector,x1:A(N)+w.bandwidth(),x2:A(N+1),y1:I,y2:I},N)})}),l.map((j,N)=>{const{fim:I,inicio:v}=D[N],B=Math.min(T(v),T(I)),V=Math.abs(T(I)-T(v));return o.jsx("path",{"aria-label":`${j.label}: ${P(j)}`,className:dn.bar,d:Dn(A(N),B,w.bandwidth(),V,[p,p,p,p]),fill:$[N],onMouseEnter:()=>y(N),onMouseLeave:()=>y(null)},N)}),a&&l.map((j,N)=>{const{fim:I,inicio:v}=D[N],B=Math.min(T(v),T(I));return o.jsx("text",{className:dn.valueLabel,textAnchor:"middle",x:A(N)+w.bandwidth()/2,y:B-6,children:P(j)},N)})]})}const Fd="_cell_1f86e_1",Bd="_tile_1f86e_5",Pd="_label_1f86e_16",Kd="_value_1f86e_24",Bt={cell:Fd,tile:Bd,label:Pd,value:Kd};function zd({accent:e,defaultHiddenGroups:t,emptyMessage:n="Sem dados no período",formatValue:s=je,gap:r=5,height:a=280,hiddenGroups:l,intentLabels:c,legend:u="bottom",legendAlign:d,nodes:m,onHiddenGroupsChange:g,showDataLabels:h=!0,title:p}){const{font:_,height:f,ref:x,width:M}=Me(),{fillHeight:y,value:b}=$e(a,f),{isHidden:D,toggle:$}=He({defaultHiddenSeries:t,hiddenSeries:l,onHiddenSeriesChange:g}),k=i.useMemo(()=>Ne(m,{accent:e}),[e,m]),C=m.filter(w=>!D(w.label)),H=i.useMemo(()=>{if(M===0||b===0)return[];const w=Ht.hierarchy({children:C,label:""}).sum(R=>Math.max(R.value??0,0)).sort((R,E)=>(E.value??0)-(R.value??0));return Ht.treemap().size([M,b]).paddingInner(r).round(!0)(w).leaves()},[b,r,C,M]);function S(w){var E;const A=w.data;if(A.color)return A.color;if(A.intent)return Kt[A.intent];const R=(E=w.ancestors().find(F=>F.depth===1))==null?void 0:E.data;return k[m.findIndex(F=>F.label===(R==null?void 0:R.label))]??Kt.neutral}const z=c?Object.entries(c).map(([w,A])=>({color:Kt[w],label:A})):m.map((w,A)=>({color:k[A],hidden:D(w.label),label:w.label}));return o.jsx(et,{containerRef:x,empty:m.length===0,emptyMessage:n,fillHeight:y,height:b,legend:z,legendAlign:d,legendPosition:u,onToggleSeries:c?void 0:$,title:p,width:M,children:H.map(w=>{const A=w.x1-w.x0,R=w.y1-w.y0,E=A-re*2,F=h&&E>0&&R>=_.lineHeight+re,T=F&&R>=_.lineHeight*2+re;return o.jsxs("g",{className:Bt.cell,children:[o.jsx("rect",{"aria-label":`${w.data.label}: ${s(w.value??0)}`,className:Bt.tile,fill:S(w),height:R,width:A,x:w.x0,y:w.y0}),F&&o.jsx("text",{className:Bt.label,x:w.x0+re,y:w.y0+re+_.lineHeight*.6,children:ct(w.data.label,_,E)}),T&&o.jsx("text",{className:Bt.value,x:w.x0+re,y:w.y0+re+_.lineHeight*1.6,children:ct(s(w.value??0),_,E)})]},`${w.data.label}-${w.x0}-${w.y0}`)})})}const Hd="_arc_fgn0g_1",qd="_arcDim_fgn0g_9",Vd="_leader_fgn0g_13",Ud="_connector_fgn0g_17",Gd="_label_fgn0g_23",vt={arc:Hd,arcDim:qd,leader:Vd,connector:Ud,label:Gd},Wd=.18,Pt=14;function Os(e,t=1,n=new Map){return e.forEach(s=>{var r;n.set(t,[...n.get(t)??[],s.label]),(r=s.children)!=null&&r.length&&Os(s.children,t+1,n)}),n}function Xd(e,t){if(t<=1)return e;const n=Math.min((t-1)*22,66);return`color-mix(in oklab, ${e} ${100-n}%, var(--pl-color-surface))`}function Yd({accent:e,defaultHiddenGroups:t,emptyMessage:n="Sem dados no período",formatPercent:s=f=>`${Math.round(f*100)}%`,formatValue:r=je,height:a=320,hiddenGroups:l,legend:c="bottom",legendAlign:u,nodes:d,onHiddenGroupsChange:m,ringGap:g=2,showLabels:h=!0,sliceRadius:p,title:_}){const{font:f,height:x,radius:M,ref:y,width:b}=Me(),{fillHeight:D,value:$}=$e(a,x),{isHidden:k,toggle:C}=He({defaultHiddenSeries:t,hiddenSeries:l,onHiddenSeriesChange:m}),[H,S]=i.useState(null),z=i.useMemo(()=>Ne(d,{accent:e}),[e,d]),w=i.useMemo(()=>d.filter(v=>!k(v.label)),[k,d]),A=i.useMemo(()=>{const v=Os(w),B=Math.max(0,...v.keys());return v.get(B)??[]},[w]),R=h?Math.min(ft(A,f),b*_n):0,E=h?Pt*2+re+R:0,T=en(Math.max(b-E*2,0),$)/2,O=i.useMemo(()=>{if(T<=0)return[];const v=Ht.hierarchy({children:w,label:""}).sum(V=>Math.max(V.value??0,0)).sort((V,q)=>(q.value??0)-(V.value??0));return Ht.partition().size([Nn,T])(v).descendants().filter(V=>V.depth>0)},[T,w]),K=O.reduce((v,B)=>Math.max(v,B.depth),0),L=O.filter(v=>v.depth===1).reduce((v,B)=>v+(B.value??0),0);function P(v){return v.ancestors().map(B=>B.data.label).join("/")}const j=H&&O.includes(H)?H:null;function N(v){return j===null||j.ancestors().includes(v)}function I(v){var q;const B=(q=v.ancestors().find(X=>X.depth===1))==null?void 0:q.data,V=(B==null?void 0:B.color)??z[d.findIndex(X=>X.label===(B==null?void 0:B.label))];return Xd(V??"var(--pl-chart-neutral)",v.depth)}return o.jsxs(et,{centerOrigin:!0,containerRef:y,empty:d.length===0,emptyMessage:n,fillHeight:D,height:$,legend:d.map((v,B)=>({color:z[B],hidden:k(v.label),label:v.label})),legendAlign:u,legendPosition:c,onToggleSeries:C,swatch:"dot",title:_,width:b,children:[O.map(v=>o.jsx("path",{"aria-label":`${v.data.label}: ${r(v.value??0)} (${s(L>0?(v.value??0)/L:0)})`,className:`${vt.arc} ${N(v)?"":vt.arcDim}`,d:Nt({cornerRadius:p??M,endAngle:v.x1,innerRadius:v.y0+(v.depth>1?g:0),outerRadius:v.y1,startAngle:v.x0}),fill:I(v),onMouseEnter:()=>S(v),onMouseLeave:()=>S(null)},P(v))),h&&O.filter(v=>v.depth===K&&v.x1-v.x0>=Wd).map(v=>{const B={endAngle:v.x1,startAngle:v.x0},[V,q]=Wn(B,v.y1),[X,le]=Wn(B,v.y1+Pt),te=X>=0,ie=X+(te?Pt:-Pt);return o.jsxs("g",{className:vt.leader,children:[o.jsx("polyline",{className:vt.connector,points:`${V},${q} ${X},${le} ${ie},${le}`}),o.jsx("text",{className:vt.label,dominantBaseline:"middle",textAnchor:te?"start":"end",x:ie+(te?re:-re),y:le,children:ct(v.data.label,f,R)})]},`rotulo-${P(v)}`)})]})}const Qd="_links_1wqmi_1",Zd="_link_1wqmi_1",Jd="_linkOn_1wqmi_18",ef="_linkDim_1wqmi_22",tf="_node_1wqmi_26",nf="_label_1wqmi_30",sf="_flowValue_1wqmi_37",of="_sobreFluxo_1wqmi_47",Le={links:Qd,link:Zd,linkOn:Jd,linkDim:ef,node:tf,label:nf,flowValue:sf,sobreFluxo:of};function af(e,t){return e.x0<t.x1&&t.x0<e.x1&&e.y0<t.y1&&t.y0<e.y1}const rf={center:jt.sankeyCenter,justify:jt.sankeyJustify,left:jt.sankeyLeft,right:jt.sankeyRight};function lf(e){const t=e.source.x1,n=e.target.x0,s=(t+n)/2;return`M${t},${e.y0}C${s},${e.y0} ${s},${e.y1} ${n},${e.y1}`}function cf(e){const t=new Map;for(const a of e)t.set(a.source,[...t.get(a.source)??[],a.target]);const n=new Set,s=new Set;function r(a){if(s.has(a))return!0;if(n.has(a))return!1;s.add(a);const l=(t.get(a)??[]).some(r);return s.delete(a),n.add(a),l}return[...t.keys()].some(r)}function uf({accent:e,cyclicMessage:t="O fluxo volta sobre si mesmo e não pode ser desenhado",emptyMessage:n="Sem dados no período",flowColor:s="source",flowValuePosition:r="end",flows:a,formatValue:l=je,height:c=320,nodeAlign:u="justify",nodes:d,nodePadding:m=12,nodeWidth:g=12,showFlowValues:h=!1,showLabels:p=!0,title:_}){const{font:f,height:x,ref:M,width:y}=Me(),{fillHeight:b,value:D}=$e(c,x),[$,k]=i.useState(null),C=i.useMemo(()=>{const j=(d??[]).map(N=>N.label);return a.forEach(({source:N,target:I})=>{[N,I].forEach(v=>{j.includes(v)||j.push(v)})}),j.map(N=>(d==null?void 0:d.find(I=>I.label===N))??{label:N})},[a,d]),H=i.useMemo(()=>Ne(C,{accent:e}),[e,C]),S=i.useMemo(()=>{const j=new Set(a.map(N=>N.source));return C.map(N=>N.label).filter(N=>!j.has(N))},[C,a]),z=p?Math.min(ft(S,f),y*_n)+re:0,w=i.useMemo(()=>cf(a),[a]),A=i.useMemo(()=>a.reduce((j,N)=>j+(Number.isFinite(N.value)?Math.max(N.value,0):0),0),[a]),R=i.useMemo(()=>{const j=y-z;return j<=0||D<=0||a.length===0||w||A<=0?{links:[],nodes:[]}:jt.sankey().nodeId(v=>v.label).nodeAlign(rf[u]).nodeWidth(g).nodePadding(m).extent([[0,2],[j,D-2]])({links:a.map(v=>({...v,value:Number.isFinite(v.value)?Math.max(v.value,0):0})),nodes:C.map(v=>({label:v.label}))})},[D,z,w,C,a,u,m,g,A,y]),E=j=>H[j]??"var(--pl-chart-neutral)";function F(j){return s==="neutral"?"var(--pl-chart-neutral)":E(s==="target"?j.target.index:j.source.index)}function T(j){return $===null?Le.link:`${Le.link} ${$===j?Le.linkOn:Le.linkDim}`}const O=(()=>{const j=[...new Set(R.nodes.map(I=>I.x0))].sort((I,v)=>I-v);if(j.length<2)return y*_n;const N=Math.min(...j.slice(1).map((I,v)=>I-j[v]));return Math.max(N-g-re,0)})();function K(j){const N=S.includes(j.label),I=ct(j.label,f,(N?z:O)-re),v=j.x1+re,B=(j.y0+j.y1)/2;return{caixa:{x0:v,x1:v+Je(I,f),y0:B-f.lineHeight/2,y1:B+f.lineHeight/2},texto:I,x:v,y:B}}const L=p?R.nodes.map(K):[];function P(j){const N=l(j.value),I=Je(N,f),v=j.source.x1,B=j.target.x0,V=(j.y0+j.y1)/2,q={end:{anchor:"end",x:B-re},middle:{anchor:"middle",x:(v+B)/2},start:{anchor:"start",x:v+re}},{anchor:X,x:le}=q[r],te={end:I,middle:I/2,start:0}[r],ie={x0:le-te,x1:le-te+I,y0:V-f.lineHeight/2,y1:V+f.lineHeight/2};if(!L.some(Y=>af(ie,Y.caixa)))return{anchor:X,texto:N,x:le,y:V}}return o.jsxs(et,{containerRef:M,empty:a.length===0||w||A<=0,emptyMessage:w?t:n,fillHeight:b,height:D,legendPosition:"none",title:_,width:y,children:[o.jsx("g",{className:Le.links,children:R.links.map((j,N)=>o.jsx("path",{"aria-label":`${j.source.label} → ${j.target.label}: ${l(j.value)}`,className:T(N),d:lf(j),onMouseEnter:()=>k(N),onMouseLeave:()=>k(null),stroke:F(j),strokeWidth:Math.max(j.width,1)},`${j.source.label}-${j.target.label}`))}),R.nodes.map(j=>o.jsx("rect",{"aria-label":j.label,className:Le.node,fill:E(j.index),height:Math.max(j.y1-j.y0,1),width:j.x1-j.x0,x:j.x0,y:j.y0},j.label)),h&&R.links.map(j=>{const N=P(j);return N?o.jsx("text",{className:`${Le.flowValue} ${Le.sobreFluxo}`,dominantBaseline:"middle",textAnchor:N.anchor,x:N.x,y:N.y,children:N.texto},`valor-${j.source.label}-${j.target.label}`):null}),L.map((j,N)=>o.jsx("text",{className:`${Le.label} ${S.includes(R.nodes[N].label)?"":Le.sobreFluxo}`,dominantBaseline:"middle",textAnchor:"start",x:j.x,y:j.y,children:j.texto},`rotulo-${R.nodes[N].label}`))]})}exports.Accordion=hr;exports.Alert=_a;exports.Avatar=Dl;exports.Badge=vl;exports.Breadcrumb=Ya;exports.Button=Ze;exports.Card=Qt;exports.ChartArea=cd;exports.ChartBar=xu;exports.ChartCombo=ed;exports.ChartDonut=Md;exports.ChartLine=ku;exports.ChartPie=yd;exports.ChartRadial=Cd;exports.ChartSankey=uf;exports.ChartScatter=pd;exports.ChartSunburst=Yd;exports.ChartTooltip=qu;exports.ChartTreemap=zd;exports.ChartWaterfall=Td;exports.Checkbox=hs;exports.ComboBox=Ur;exports.DatePicker=Ui;exports.DateTimePicker=gc;exports.Dialog=dl;exports.Field=ze;exports.IconArrowDown=Ts;exports.IconArrowUp=es;exports.IconCalendar=yn;exports.IconChevronDown=ts;exports.IconChevronLeft=xn;exports.IconChevronRight=Gt;exports.IconChevronUp=Fs;exports.IconClock=ns;exports.IconClose=ss;exports.IconMinusCircle=os;exports.IconPlusCircle=as;exports.InputCurrency=ko;exports.InputNumber=xo;exports.InputPassword=Do;exports.InputText=vn;exports.Label=ls;exports.List=Dt;exports.Menu=Xr;exports.Pagination=sr;exports.Popover=wa;exports.Progress=$a;exports.Radio=Jo;exports.RadioGroup=Zo;exports.Select=Fr;exports.Spinner=rs;exports.Switch=la;exports.Table=dt;exports.Tabs=qa;exports.Textarea=Io;exports.TimePicker=oc;exports.Tooltip=ys;exports.formatarData=_o;exports.formatarHora=po;exports.formatarMoeda=go;exports.formatarNumero=je;exports.formatarPercentual=fs;exports.paletteWithAccent=As;exports.resolveSeriesColors=Ne;exports.seriesColors=Vt;
|
|
2
|
+
//# sourceMappingURL=plenus-design-system.cjs.map
|