tempest-react-sdk 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const oe=require("./sw.cjs"),o=require("react/jsx-runtime"),l=require("react"),Nt=require("@tanstack/react-query"),L=require("react-router-dom"),Ae=require("react-dom"),re=require("react-hook-form"),_t=require("zustand"),tt=require("zustand/middleware"),qn=require("dexie");function w(...e){const t=[];for(const n of e)if(!(n==null||n===!1||n===!0)){if(typeof n=="string")n&&t.push(n);else if(typeof n=="number"||typeof n=="bigint")t.push(String(n));else if(Array.isArray(n)){const s=w(...n);s&&t.push(s)}}return t.join(" ")}const Gn="tempest_accordion_LVhhv",Kn="tempest_item_7ryVk",Jn="tempest_header_WaTdJ",Qn="tempest_trigger_9BYFY",Vn="tempest_chevron_i-HVZ",Yn="tempest_open_98jLY",Zn="tempest_panel_Wx50w",ye={accordion:Gn,item:Kn,header:Jn,trigger:Qn,chevron:Vn,open:Yn,panel:Zn};function Xn({items:e,multiple:t=!1,value:n,defaultValue:s=[],onChange:r,className:a}){const i=l.useId(),c=n!==void 0,[u,d]=l.useState(s),p=c?n:u,f=l.useCallback(m=>{const h=p.includes(m),_=t?h?p.filter(b=>b!==m):[...p,m]:h?[]:[m];c||d(_),r?.(_)},[p,t,c,r]);return o.jsx("div",{className:w(ye.accordion,a),children:e.map(m=>{const h=p.includes(m.id),_=`${i}-${m.id}-panel`,b=`${i}-${m.id}-trigger`;return o.jsxs("div",{className:w(ye.item,h&&ye.open),children:[o.jsx("h3",{className:ye.header,children:o.jsxs("button",{type:"button",id:b,className:ye.trigger,"aria-expanded":h,"aria-controls":_,disabled:m.disabled,onClick:()=>f(m.id),children:[o.jsx("span",{children:m.title}),o.jsx(es,{className:ye.chevron})]})}),h&&o.jsx("div",{id:_,role:"region","aria-labelledby":b,className:ye.panel,children:m.children})]},m.id)})})}function es({className:e}){return o.jsx("svg",{className:e,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:o.jsx("path",{d:"M6 9l6 6 6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}const ts="tempest_alert_7cYyI",ns="tempest_content_UXnmZ",ss="tempest_title_abGgF",rs="tempest_description_pXPvw",os="tempest_icon_Zg6SB",as="tempest_close_narep",is="tempest_neutral_J7MH1",cs="tempest_solid_s-oW5",ls="tempest_outline_v7w9b",us="tempest_info_9r3r1",ds="tempest_success_1bzoB",ps="tempest_warning_q-j1Q",ms="tempest_danger_CiZkW",ie={alert:ts,content:ns,title:ss,description:rs,icon:os,close:as,neutral:is,solid:cs,outline:ls,info:us,success:ds,warning:ps,danger:ms};function fs({variant:e="info",appearance:t="soft",title:n,description:s,icon:r,onClose:a,closeLabel:i="Dismiss",className:c,children:u,...d}){return o.jsxs("div",{role:"alert",className:w(ie.alert,ie[e],t==="solid"&&ie.solid,t==="outline"&&ie.outline,c),...d,children:[r&&o.jsx("span",{className:ie.icon,children:r}),o.jsxs("div",{className:ie.content,children:[n&&o.jsx("p",{className:ie.title,children:n}),s&&o.jsx("p",{className:ie.description,children:s}),u]}),a&&o.jsx("button",{type:"button",className:ie.close,onClick:a,"aria-label":i,children:o.jsx(hs,{})})]})}function hs(){return o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:o.jsx("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}const nt={xs:480,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},_s=["xs","sm","md","lg","xl","2xl"];function gs(e){let t="xs";for(const n of _s)e>=nt[n]&&(t=n);return t}function Ee(){const[e,t]=l.useState(()=>typeof window>"u"?0:window.innerWidth);l.useEffect(()=>{if(typeof window>"u")return;const a=()=>t(window.innerWidth);return a(),window.addEventListener("resize",a,{passive:!0}),()=>window.removeEventListener("resize",a)},[]);const n=gs(e),s=a=>e>=nt[a],r=a=>e<nt[a];return{current:n,width:e,above:s,below:r,isMobile:r("md"),isTablet:s("md")&&r("lg"),isDesktop:s("lg")}}const bs="tempest_shell_-xp0O",ys="tempest_navbar_liTKV",ws="tempest_row_PE41P",vs="tempest_sidebar_wyx-V",xs="tempest_main_O3GFv",js="tempest_footer_IFW4q",$s="tempest_bottomNav_pKJ1v",we={shell:bs,navbar:ys,row:ws,sidebar:vs,main:xs,footer:js,bottomNav:$s};function ks({navbar:e,sidebar:t,bottomNav:n,footer:s,sidebarBreakpoint:r="md",className:a,children:i,...c}){const d=Ee().above(r);return o.jsxs("div",{className:w(we.shell,a),...c,children:[e&&o.jsx("div",{className:we.navbar,children:e}),o.jsxs("div",{className:we.row,children:[t&&d&&o.jsx("div",{className:we.sidebar,children:t}),o.jsx("main",{className:we.main,children:i})]}),s&&o.jsx("div",{className:we.footer,children:s}),n&&!d&&o.jsx("div",{className:we.bottomNav,children:n})]})}const Ns="tempest_aspect_GnAJt",Ss={aspect:Ns};function Cs({ratio:e=16/9,className:t,style:n,children:s,...r}){const a={aspectRatio:String(e),...n};return o.jsx("div",{className:w(Ss.aspect,t),style:a,...r,children:s})}const Es="tempest_avatar_3xMuZ",Ts="tempest_image_ieqGp",Rs="tempest_xs_oSaLL",Ls="tempest_sm_sZ2bk",Ms="tempest_md_Fdkbz",Is="tempest_lg_pTTUA",Ds="tempest_xl_mW58F",Ps="tempest_status_ISBnL",As="tempest_dot_Wgfo-",Os="tempest_online_-aWoW",Fs="tempest_offline_-StX3",Bs="tempest_busy_TbwuF",Te={avatar:Es,image:Ts,xs:Rs,sm:Ls,md:Ms,lg:Is,xl:Ds,status:Ps,dot:As,online:Os,offline:Fs,busy:Bs};function zs(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"?":t.length===1?t[0].slice(0,2):`${t[0].charAt(0)}${t[t.length-1].charAt(0)}`}function Ws({src:e,alt:t,name:n="",size:s="md",status:r,className:a,onClick:i}){const[c,u]=l.useState(!1),d=l.useMemo(()=>zs(n),[n]),p=e&&!c,f=i?"button":void 0,m=i?0:void 0;return o.jsxs("span",{className:w(Te.avatar,Te[s],r&&Te.status,a),role:f,tabIndex:m,onClick:i,onKeyDown:i?h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),i())}:void 0,children:[p?o.jsx("img",{src:e,alt:t??n,className:Te.image,onError:()=>u(!0)}):o.jsx("span",{"aria-label":t??n,children:d}),r&&o.jsx("span",{className:w(Te.dot,Te[r]),"aria-hidden":!0})]})}const Us="tempest_badge_RsuMz",Hs="tempest_sm_LYsCn",qs="tempest_md_4Or8q",Gs="tempest_lg_Bseje",Ks="tempest_square_l63D-",Js="tempest_neutral_lulSm",Qs="tempest_solid_0Leug",Vs="tempest_outline_x06HL",Ys="tempest_success_u9JiS",Zs="tempest_warning_nsGp-",Xs="tempest_danger_PD2hz",er="tempest_info_na6DQ",tr="tempest_primary_S0WCS",nr="tempest_dot_i0c-G",ve={badge:Us,sm:Hs,md:qs,lg:Gs,square:Ks,neutral:Js,solid:Qs,outline:Vs,success:Ys,warning:Zs,danger:Xs,info:er,primary:tr,dot:nr};function sr({variant:e="neutral",appearance:t="soft",size:n="md",shape:s="pill",dot:r=!1,className:a,children:i,...c}){return o.jsxs("span",{className:w(ve.badge,ve[e],t==="solid"&&ve.solid,t==="outline"&&ve.outline,ve[n],s==="square"&&ve.square,a),...c,children:[r&&o.jsx("span",{className:ve.dot,"aria-hidden":!0}),i]})}const rr="tempest_banner_oyoWE",or="tempest_info_s2q0P",ar="tempest_success_uLYQ3",ir="tempest_warning_9rua8",cr="tempest_danger_Uzb-6",lr="tempest_icon_vzKmx",ur="tempest_body_-Qm4K",dr="tempest_title_AeTHT",pr="tempest_description_nbyf-",mr="tempest_action_47P8e",fr="tempest_close_Iy2oN",_e={banner:rr,info:or,success:ar,warning:ir,danger:cr,icon:lr,body:ur,title:dr,description:pr,action:mr,close:fr};function hr({variant:e="info",icon:t,title:n,action:s,dismissible:r=!1,onDismiss:a,className:i,children:c,...u}){const[d,p]=l.useState(!0);return d?o.jsxs("div",{className:w(_e.banner,_e[e],i),role:"status",...u,children:[t&&o.jsx("span",{className:_e.icon,children:t}),o.jsxs("div",{className:_e.body,children:[n&&o.jsx("p",{className:_e.title,children:n}),c&&o.jsx("p",{className:_e.description,children:c})]}),s&&o.jsx("div",{className:_e.action,children:s}),r&&o.jsx("button",{type:"button",className:_e.close,"aria-label":"Fechar",onClick:()=>{p(!1),a?.()},children:"×"})]}):null}const _r="tempest_bar_kp35Q",gr="tempest_item_XfDIW",br="tempest_active_sK54f",yr="tempest_iconWrap_yJ20b",wr="tempest_icon_TAjtI",vr="tempest_badge_-c3Do",xr="tempest_label_qJj3L",xe={bar:_r,item:gr,active:br,iconWrap:yr,icon:wr,badge:vr,label:xr};function jr({items:e,value:t,onChange:n,showLabels:s=!0,className:r,...a}){return o.jsx("nav",{className:w(xe.bar,r),"aria-label":"Navegação principal",...a,children:e.map(i=>{const c=i.key===t;return o.jsxs("button",{type:"button",className:w(xe.item,c&&xe.active),"aria-current":c?"page":void 0,disabled:i.disabled,onClick:()=>n(i.key),children:[o.jsxs("span",{className:xe.iconWrap,children:[i.icon&&o.jsx("span",{className:xe.icon,children:i.icon}),i.badge!==void 0&&o.jsx("span",{className:xe.badge,children:i.badge})]}),s&&o.jsx("span",{className:xe.label,children:i.label})]},i.key)})})}const $r="tempest_root_qXce2",kr="tempest_backdrop_WLqh0",Nr="tempest_sheet_Okz1P",Sr="tempest_handle_GWCoK",Cr="tempest_handleBar_XPPiI",Er="tempest_title_i5Vuc",Tr="tempest_body_bgDhJ",je={root:$r,backdrop:kr,sheet:Nr,handle:Sr,handleBar:Cr,title:Er,body:Tr};function Rr({open:e,onClose:t,title:n,showHandle:s=!0,dismissOnBackdrop:r=!0,dismissOnEsc:a=!0,className:i,children:c,...u}){return l.useEffect(()=>{if(!e||!a)return;const d=p=>{p.key==="Escape"&&t()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[e,a,t]),l.useEffect(()=>{if(!e)return;const d=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=d}},[e]),!e||typeof document>"u"?null:Ae.createPortal(o.jsxs("div",{className:je.root,role:"dialog","aria-modal":"true",children:[o.jsx("div",{className:je.backdrop,onClick:()=>r&&t(),"aria-hidden":"true"}),o.jsxs("div",{className:w(je.sheet,i),...u,children:[s&&o.jsx("button",{type:"button",className:je.handle,"aria-label":"Arrastar para fechar",onClick:t,children:o.jsx("span",{className:je.handleBar})}),n&&o.jsx("div",{className:je.title,children:n}),o.jsx("div",{className:je.body,children:c})]})]}),document.body)}const Lr="tempest_nav_H4g6P",Mr="tempest_item_O4g3P",Ir="tempest_link_7WM67",Dr="tempest_current_JdlcS",Pr="tempest_separator_zGWyJ",Oe={nav:Lr,item:Mr,link:Ir,current:Dr,separator:Pr};function Ar({items:e,separator:t="/",className:n}){return o.jsx("nav",{"aria-label":"breadcrumb",className:w(Oe.nav,n),children:e.map((s,r)=>{const a=r===e.length-1,i=!a&&(s.href||s.onClick);return o.jsxs(l.Fragment,{children:[o.jsx("span",{className:Oe.item,children:i?o.jsx("a",{href:s.href,onClick:c=>{s.onClick&&(c.preventDefault(),s.onClick())},className:Oe.link,children:s.label}):o.jsx("span",{"aria-current":a?"page":void 0,className:a?Oe.current:void 0,children:s.label})}),!a&&o.jsx("span",{className:Oe.separator,"aria-hidden":!0,children:t})]},r)})})}const Or="tempest_button_2ZuB7",Fr="tempest_primary_s1sM6",Br="tempest_secondary_R0waJ",zr="tempest_danger_V4fX8",Wr="tempest_success_w6qB6",Ur="tempest_ghost_1KINV",Hr="tempest_soft_c3kzm",qr="tempest_outline_F5jq-",Gr="tempest_link_Zt5hw",Kr="tempest_xs_cF6m0",Jr="tempest_sm_NhG0g",Qr="tempest_md_hH4h3",Vr="tempest_lg_2plQf",Yr="tempest_xl_nx4V0",Zr="tempest_iconOnly_WCpTS",Xr="tempest_pill_lx8lt",eo="tempest_fullWidth_36oJT",to="tempest_loading_EQAt2",no="tempest_hiddenText_hIiJ2",so="tempest_spinner_ZExvW",ro="tempest_tempest-spin_UOSVC",ce={button:Or,primary:Fr,secondary:Br,danger:zr,success:Wr,ghost:Ur,soft:Hr,outline:qr,link:Gr,xs:Kr,sm:Jr,md:Qr,lg:Vr,xl:Yr,iconOnly:Zr,pill:Xr,fullWidth:eo,loading:to,hiddenText:no,spinner:so,tempestSpin:ro};function st({variant:e="primary",size:t="md",loading:n=!1,fullWidth:s=!1,iconOnly:r=!1,pill:a=!1,leftIcon:i,rightIcon:c,disabled:u,className:d,children:p,...f}){return o.jsxs("button",{className:w(ce.button,ce[e],ce[t],r&&ce.iconOnly,a&&ce.pill,n&&ce.loading,s&&ce.fullWidth,d),disabled:u||n,...f,children:[n&&o.jsx("span",{className:ce.spinner,"aria-hidden":!0,children:o.jsx(oo,{})}),o.jsxs("span",{className:w(n&&ce.hiddenText),children:[i,p,c]})]})}function oo(){return o.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}const ao="tempest_card_Cb1o4",io="tempest_flat_LRpce",co="tempest_raised_WmIqk",lo="tempest_elevated_5VEDw",uo="tempest_interactive_B8Tah",po="tempest_padded_oOxwN",mo="tempest_flush_aiDZi",fo="tempest_header_PTXf2",ho="tempest_title_mSgoo",_o="tempest_body_W441Z",go="tempest_footer_Mu-JC",Q={card:ao,flat:io,raised:co,elevated:lo,interactive:uo,padded:po,flush:mo,header:fo,title:ho,body:_o,footer:go};function bo({title:e,actions:t,footer:n,flush:s=!1,interactive:r=!1,elevation:a="default",className:i,children:c,...u}){const d=!!(e||t);return o.jsxs("div",{className:w(Q.card,a==="flat"&&Q.flat,a==="raised"&&Q.raised,a==="elevated"&&Q.elevated,r&&Q.interactive,!d&&!s&&Q.padded,s&&Q.flush,i),tabIndex:r?u.tabIndex??0:u.tabIndex,...u,children:[d&&o.jsxs("header",{className:Q.header,children:[typeof e=="string"?o.jsx("h3",{className:Q.title,children:e}):e,t]}),d?o.jsx("div",{className:Q.body,children:c}):c,n&&o.jsx("footer",{className:Q.footer,children:n})]})}const yo="tempest_center_Pu1Pf",wo="tempest_both_53GWn",vo="tempest_horizontal_94-Bt",xo="tempest_vertical_Q7Kyg",St={center:yo,both:wo,horizontal:vo,vertical:xo};function jo({axis:e="both",minHeight:t,fullWidth:n=!0,className:s,style:r,children:a,...i}){const c={...t!==void 0?{minHeight:typeof t=="number"?`${t}px`:t}:null,...n?{width:"100%"}:null,...r};return o.jsx("div",{className:w(St.center,St[e],s),style:c,...i,children:a})}const $o="tempest_wrapper_rpthW",ko="tempest_disabled_x7-eg",No="tempest_input_2kt-h",So="tempest_box_OCPee",Co="tempest_labelWrap_Ktbp0",Eo="tempest_label_cwRtI",To="tempest_description_rMhG1",$e={wrapper:$o,disabled:ko,input:No,box:So,labelWrap:Co,label:Eo,description:To},Ro=l.forwardRef(function({label:t,description:n,indeterminate:s,disabled:r,wrapperClassName:a,className:i,...c},u){const d=l.useRef(null);l.useEffect(()=>{d.current&&(d.current.indeterminate=!!s)},[s]);function p(f){d.current=f,typeof u=="function"?u(f):u&&(u.current=f)}return o.jsxs("label",{className:w($e.wrapper,r&&$e.disabled,a),children:[o.jsx("input",{ref:p,type:"checkbox",disabled:r,className:w($e.input,i),...c}),o.jsx("span",{className:$e.box,"aria-hidden":!0,children:s?o.jsx(Mo,{}):o.jsx(Lo,{})}),(t||n)&&o.jsxs("span",{className:$e.labelWrap,children:[t&&o.jsx("span",{className:$e.label,children:t}),n&&o.jsx("span",{className:$e.description,children:n})]})]})});function Lo(){return o.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M5 12l5 5L20 7",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})})}function Mo(){return o.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M5 12h14",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})})}const Io="tempest_wrapper_KR4-F",Do="tempest_label_Mz-wX",Po="tempest_field_iIBJw",Ao="tempest_error_O9n-9",Oo="tempest_chip_GEwrc",Fo="tempest_remove_JYDIq",Bo="tempest_input_frJmk",zo="tempest_helper_Yts53",Wo="tempest_errorText_llJGq",le={wrapper:Io,label:Do,field:Po,error:Ao,chip:Oo,remove:Fo,input:Bo,helper:zo,errorText:Wo};function Uo({value:e,onChange:t,label:n,placeholder:s="Adicionar e pressionar Enter…",helperText:r,error:a,commitKeys:i=["Enter",",","Tab"],normalize:c=!0,className:u}){const[d,p]=l.useState(""),f=l.useRef(null);function m(){const b=c?d.trim().toLowerCase():d.trim();if(b){if(e.includes(b)){p("");return}t([...e,b]),p("")}}function h(b){if(i.includes(b.key)){b.preventDefault(),m();return}b.key==="Backspace"&&!d&&e.length>0&&t(e.slice(0,-1))}function _(b){const y=e.slice();y.splice(b,1),t(y)}return o.jsxs("div",{className:w(le.wrapper,a&&le.error,u),children:[n&&o.jsx("label",{className:le.label,children:n}),o.jsxs("div",{className:le.field,onClick:()=>f.current?.focus(),children:[e.map((b,y)=>o.jsxs("span",{className:le.chip,children:[b,o.jsx("button",{type:"button",className:le.remove,"aria-label":`Remover ${b}`,onClick:()=>_(y),children:"×"})]},`${b}-${y}`)),o.jsx("input",{ref:f,className:le.input,value:d,placeholder:e.length===0?s:"",onChange:b=>p(b.target.value),onKeyDown:h,onBlur:m})]}),a?o.jsx("span",{className:le.errorText,children:a}):r?o.jsx("span",{className:le.helper,children:r}):null]})}const Ho="tempest_wrapper_TNvle",qo="tempest_label_KVkZO",Go="tempest_field_BenH0",Ko="tempest_input_-HTv1",Jo="tempest_caret_jRplQ",Qo="tempest_menu_zPQG3",Vo="tempest_option_vhhn5",Yo="tempest_active_XCgtX",Zo="tempest_selected_T6nm2",Xo="tempest_empty_Ahw5K",ea="tempest_helper_OzB7V",ta="tempest_errorText_X18sQ",na="tempest_error_bnVuM",B={wrapper:Ho,label:qo,field:Go,input:Ko,caret:Jo,menu:Qo,option:Vo,active:Yo,selected:Zo,empty:Xo,helper:ea,errorText:ta,error:na};function sa(e,t){return t?e.label.toLowerCase().includes(t.toLowerCase()):!0}function ra({options:e,value:t,onChange:n,label:s,placeholder:r="Selecione",helperText:a,error:i,disabled:c,filter:u=sa,emptyMessage:d="Nenhuma opção encontrada",className:p}){const f=l.useId(),m=l.useRef(null),h=l.useRef(null),[_,b]=l.useState(!1),[y,g]=l.useState(""),[v,x]=l.useState(0),N=l.useMemo(()=>e.find($=>$.value===t)?.label??"",[e,t]),T=l.useMemo(()=>e.filter($=>u($,y)),[e,u,y]),M=l.useCallback(()=>{b(!1),g(""),x(0)},[]),P=l.useCallback($=>{$.disabled||(n($.value),M())},[n,M]);l.useEffect(()=>{if(!_)return;const $=S=>{m.current&&!m.current.contains(S.target)&&M()};return window.addEventListener("mousedown",$),()=>window.removeEventListener("mousedown",$)},[_,M]);const j=$=>{if($.key==="ArrowDown")$.preventDefault(),b(!0),x(S=>Math.min(T.length-1,S+1));else if($.key==="ArrowUp")$.preventDefault(),x(S=>Math.max(0,S-1));else if($.key==="Enter"){$.preventDefault();const S=T[v];S&&P(S)}else $.key==="Escape"&&M()};return o.jsxs("div",{ref:m,className:w(B.wrapper,i&&B.error,p),children:[s&&o.jsx("label",{htmlFor:f,className:B.label,children:s}),o.jsxs("div",{className:B.field,children:[o.jsx("input",{id:f,ref:h,type:"text",role:"combobox","aria-expanded":_,"aria-controls":`${f}-listbox`,"aria-autocomplete":"list",className:B.input,placeholder:r,disabled:c,value:_?y:N,onFocus:()=>b(!0),onChange:$=>{g($.target.value),b(!0),x(0)},onKeyDown:j}),o.jsx("span",{className:B.caret,"aria-hidden":!0,children:"▾"})]}),_&&o.jsx("ul",{id:`${f}-listbox`,role:"listbox",className:B.menu,children:T.length===0?o.jsx("li",{className:B.empty,children:d}):T.map(($,S)=>o.jsx("li",{role:"option","aria-selected":$.value===t,className:w(B.option,S===v&&B.active,$.value===t&&B.selected),onMouseEnter:()=>x(S),onMouseDown:I=>{I.preventDefault(),P($)},children:$.label},$.value))}),i?o.jsx("span",{className:B.errorText,children:i}):a?o.jsx("span",{className:B.helper,children:a}):null]})}const oa="tempest_overlay_dd9h1",aa="tempest_tempest-fade-in_DvgSp",ia="tempest_dialog_ptM-K",ca="tempest_tempest-modal-in_UoxQC",la="tempest_sm_K5k3W",ua="tempest_md_gvyR7",da="tempest_lg_BgB1a",pa="tempest_xl_MR-68",ma="tempest_size2xl_-PH9e",fa="tempest_size3xl_iqDwN",ha="tempest_fullscreen_o84Xi",_a="tempest_fullscreenOnMobile_0bDwe",ga="tempest_body_lVhql",ba="tempest_header_ILG9i",ya="tempest_footer_rro2w",wa="tempest_title_A5OeE",va="tempest_close_-ER1C",G={overlay:oa,tempestFadeIn:aa,dialog:ia,tempestModalIn:ca,sm:la,md:ua,lg:da,xl:pa,size2Xl:ma,size3Xl:fa,fullscreen:ha,fullscreenOnMobile:_a,body:ga,header:ba,footer:ya,title:wa,close:va};function Vt({open:e,onClose:t,title:n,children:s,footer:r,size:a="md",closeOnBackdrop:i=!0,closeOnEsc:c=!0,className:u,hideCloseButton:d=!1,fullscreen:p=!1,fullscreenOnMobile:f=!1}){return l.useEffect(()=>{if(!e)return;const m=document.body.style.overflow;document.body.style.overflow="hidden";const h=_=>{c&&_.key==="Escape"&&t()};return window.addEventListener("keydown",h),()=>{document.body.style.overflow=m,window.removeEventListener("keydown",h)}},[e,c,t]),!e||typeof document>"u"?null:Ae.createPortal(o.jsx("div",{className:G.overlay,role:"presentation",onClick:()=>{i&&t()},children:o.jsxs("div",{role:"dialog","aria-modal":"true",className:w(G.dialog,xa(a),p&&G.fullscreen,f&&G.fullscreenOnMobile,u),onClick:m=>m.stopPropagation(),children:[(n||!d)&&o.jsxs("header",{className:G.header,children:[o.jsx("h3",{className:G.title,children:n}),!d&&o.jsx("button",{type:"button",className:G.close,"aria-label":"Fechar",onClick:t,children:o.jsx(ja,{})})]}),o.jsx("div",{className:G.body,children:s}),r&&o.jsx("footer",{className:G.footer,children:r})]})}),document.body)}function xa(e){return e==="2xl"?G.size2xl:e==="3xl"?G.size3xl:G[e]}function ja(){return o.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M6 6l12 12M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}function $a({open:e,title:t,description:n,confirmLabel:s="Confirmar",cancelLabel:r="Cancelar",variant:a="primary",loading:i=!1,onConfirm:c,onCancel:u}){return o.jsx(Vt,{open:e,onClose:u,title:t,size:"sm",footer:o.jsxs(o.Fragment,{children:[o.jsx(st,{variant:"secondary",onClick:u,disabled:i,children:r}),o.jsx(st,{variant:a,loading:i,onClick:()=>{c()},children:s})]}),children:n})}const ka="tempest_wrapper_iHNUs",Na="tempest_label_-OEBL",Sa="tempest_required_CTss-",Ca="tempest_field_65yGJ",Ea="tempest_input_WjT81",Ta="tempest_sizeSm_cgds6",Ra="tempest_sizeMd_EPFGy",La="tempest_sizeLg_5Cq8k",Ma="tempest_hasLeftIcon_xYO-v",Ia="tempest_hasRightIcon_C7uyr",Da="tempest_iconLeft_KrUhI",Pa="tempest_iconRight_Ssr47",Aa="tempest_error_VLISa",Oa="tempest_helper_7Vc-s",Fa="tempest_errorText_xz4xS",A={wrapper:ka,label:Na,required:Sa,field:Ca,input:Ea,sizeSm:Ta,sizeMd:Ra,sizeLg:La,hasLeftIcon:Ma,hasRightIcon:Ia,iconLeft:Da,iconRight:Pa,error:Aa,helper:Oa,errorText:Fa},ot=l.forwardRef(function({label:t,helperText:n,error:s,leftIcon:r,rightIcon:a,wrapperClassName:i,className:c,id:u,required:d,size:p="md",...f},m){const h=l.useId(),_=u??h,b=s?`${_}-error`:n?`${_}-helper`:void 0,y=p==="sm"?A.sizeSm:p==="lg"?A.sizeLg:A.sizeMd;return o.jsxs("div",{className:w(A.wrapper,s&&A.error,i),children:[t&&o.jsxs("label",{htmlFor:_,className:A.label,children:[t,d&&o.jsx("span",{className:A.required,children:"*"})]}),o.jsxs("div",{className:A.field,children:[r&&o.jsx("span",{className:A.iconLeft,children:r}),o.jsx("input",{ref:m,id:_,"aria-invalid":!!s,"aria-describedby":b,required:d,className:w(A.input,y,r&&A.hasLeftIcon,a&&A.hasRightIcon,c),...f}),a&&o.jsx("span",{className:A.iconRight,children:a})]}),s?o.jsx("span",{id:`${_}-error`,className:A.errorText,children:s}):n?o.jsx("span",{id:`${_}-helper`,className:A.helper,children:n}):null]})}),Ba=l.forwardRef(function({value:t,onChange:n,mode:s="date",...r},a){return o.jsx(ot,{...r,ref:a,type:s,value:t,onChange:i=>n(i.target.value)})}),za="tempest_divider_KSGsi",Wa="tempest_horizontal_pZ05Y",Ua="tempest_bare_elDbS",Ha="tempest_vertical_p-jD4",qa="tempest_dashed_JWxCU",Ga="tempest_alignStart_QAIi1",Ka="tempest_alignEnd_eZDwa",U={divider:za,horizontal:Wa,bare:Ua,vertical:Ha,dashed:qa,alignStart:Ga,alignEnd:Ka};function Ja({orientation:e="horizontal",variant:t="solid",label:n,align:s="center",className:r,...a}){return e==="vertical"?o.jsx("span",{role:"separator","aria-orientation":"vertical",className:w(U.divider,U.vertical,t==="dashed"&&U.dashed,r),...a}):n?o.jsx("div",{role:"separator","aria-orientation":"horizontal",className:w(U.divider,U.horizontal,t==="dashed"&&U.dashed,s==="start"&&U.alignStart,s==="end"&&U.alignEnd,r),...a,children:n}):o.jsx("hr",{className:w(U.divider,U.horizontal,U.bare,t==="dashed"&&U.dashed,r)})}const Qa="tempest_overlay_hcG1G",Va="tempest_tempest-drawer-overlay_XFbxY",Ya="tempest_panel_wUX0N",Za="tempest_right_-oX-6",Xa="tempest_tempest-drawer-in-right_pWYHv",ei="tempest_left_xi3nD",ti="tempest_tempest-drawer-in-left_o7JSb",ni="tempest_top_7rGCn",si="tempest_tempest-drawer-in-top_kn6AF",ri="tempest_bottom_zd-25",oi="tempest_tempest-drawer-in-bottom_0x3u7",ai="tempest_handle_5B-TB",ii="tempest_handleTop_7aMf-",ci="tempest_header_sYoP1",li="tempest_title_LqUOu",ui="tempest_close_tYPhU",di="tempest_body_aV9FG",pi="tempest_footer_AuvUP",ne={overlay:Qa,tempestDrawerOverlay:Va,panel:Ya,right:Za,tempestDrawerInRight:Xa,left:ei,tempestDrawerInLeft:ti,top:ni,tempestDrawerInTop:si,bottom:ri,tempestDrawerInBottom:oi,handle:ai,handleTop:ii,header:ci,title:li,close:ui,body:di,footer:pi};function mi({open:e,onClose:t,placement:n="right",title:s,children:r,footer:a,closeOnBackdrop:i=!0,closeOnEsc:c=!0,hideCloseButton:u=!1,className:d,mobilePlacement:p,showHandle:f=!1}){const{isMobile:m}=Ee(),h=m&&p?p:n;return l.useEffect(()=>{if(!e)return;const _=document.body.style.overflow;document.body.style.overflow="hidden";const b=y=>{c&&y.key==="Escape"&&t()};return window.addEventListener("keydown",b),()=>{document.body.style.overflow=_,window.removeEventListener("keydown",b)}},[e,c,t]),!e||typeof document>"u"?null:Ae.createPortal(o.jsxs(o.Fragment,{children:[o.jsx("div",{className:ne.overlay,onClick:()=>{i&&t()}}),o.jsxs("aside",{role:"dialog","aria-modal":"true",className:w(ne.panel,ne[h],d),children:[f&&(h==="bottom"||h==="top")&&o.jsx("div",{className:w(ne.handle,h==="top"&&ne.handleTop),"aria-hidden":!0}),(s||!u)&&o.jsxs("header",{className:ne.header,children:[o.jsx("h3",{className:ne.title,children:s}),!u&&o.jsx("button",{type:"button","aria-label":"Fechar",className:ne.close,onClick:t,children:o.jsx(fi,{})})]}),o.jsx("div",{className:ne.body,children:r}),a&&o.jsx("footer",{className:ne.footer,children:a})]})]}),document.body)}function fi(){return o.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M6 6l12 12M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}const hi="tempest_root_5ZetV",_i="tempest_menu_-RiRW",gi="tempest_bottomStart_z60h9",bi="tempest_bottomEnd_b1tmU",yi="tempest_topStart_A0em2",wi="tempest_topEnd_cFA5-",vi="tempest_item_T-QPZ",xi="tempest_active_WNqoX",ji="tempest_danger_C0jN3",$i="tempest_separator_RimQa",ki="tempest_label_6yP76",ee={root:hi,menu:_i,bottomStart:gi,bottomEnd:bi,topStart:yi,topEnd:wi,item:vi,active:xi,danger:ji,separator:$i,label:ki};function Ni(e){switch(e){case"bottom-end":return ee.bottomEnd;case"top-start":return ee.topStart;case"top-end":return ee.topEnd;default:return ee.bottomStart}}function Si({trigger:e,items:t,placement:n="bottom-start",className:s}){const[r,a]=l.useState(!1),[i,c]=l.useState(-1),u=l.useId(),d=l.useRef(null),p=l.useRef([]),f=t.map((y,g)=>y.type==="item"&&!y.disabled?g:-1).filter(y=>y!==-1),m=l.useCallback(()=>{a(!1),c(-1)},[]);l.useEffect(()=>{if(!r)return;const y=v=>{if(v.key==="Escape"){m();return}if(v.key==="ArrowDown"){v.preventDefault();const x=f.indexOf(i),N=f[(x+1)%f.length]??-1;c(N),p.current[N]?.focus()}if(v.key==="ArrowUp"){v.preventDefault();const x=f.indexOf(i),N=f[(x-1+f.length)%f.length]??-1;c(N),p.current[N]?.focus()}},g=v=>{d.current&&!d.current.contains(v.target)&&m()};return window.addEventListener("keydown",y),window.addEventListener("mousedown",g),()=>{window.removeEventListener("keydown",y),window.removeEventListener("mousedown",g)}},[r,i,f,m]);const h=y=>{e.props.onClick?.(y),a(g=>!g)},_={...e,props:{...e.props,onClick:h,"aria-expanded":r,"aria-controls":u,"aria-haspopup":"menu"}},b=y=>{y.onSelect(),m()};return o.jsxs("span",{ref:d,className:ee.root,children:[_,r&&o.jsx("ul",{id:u,role:"menu",className:w(ee.menu,Ni(n),s),children:t.map((y,g)=>y.type==="separator"?o.jsx("li",{role:"separator",className:ee.separator,"aria-hidden":!0},y.id):y.type==="label"?o.jsx("li",{role:"presentation",className:ee.label,children:y.label},y.id):o.jsx("li",{role:"none",children:o.jsxs("button",{ref:v=>{p.current[g]=v},type:"button",role:"menuitem",className:w(ee.item,y.danger&&ee.danger,i===g&&ee.active),disabled:y.disabled,onClick:()=>b(y),onMouseEnter:()=>c(g),children:[y.icon&&o.jsx("span",{"aria-hidden":!0,children:y.icon}),y.label]})},y.id))})]})}const Ci="tempest_wrapper_gzyTd",Ei="tempest_icon_qVCyh",Ti="tempest_title_xPfUf",Ri="tempest_description_oWwH1",Li="tempest_action_dqxw1",Fe={wrapper:Ci,icon:Ei,title:Ti,description:Ri,action:Li};function Mi({icon:e,title:t,description:n,action:s,className:r}){return o.jsxs("div",{className:w(Fe.wrapper,r),children:[e&&o.jsx("div",{className:Fe.icon,children:e}),o.jsx("h4",{className:Fe.title,children:t}),n&&o.jsx("p",{className:Fe.description,children:n}),s&&o.jsx("div",{className:Fe.action,children:s})]})}const Ii="tempest_wrapper_luRyF",Di="tempest_icon_dEdBl",Pi="tempest_title_StutD",Ai="tempest_description_A2XCb",Oi="tempest_action_vm1LC",Be={wrapper:Ii,icon:Di,title:Pi,description:Ai,action:Oi};function Fi({title:e="Algo deu errado",description:t="Não foi possível carregar essas informações.",onRetry:n,retryLabel:s="Tentar novamente",icon:r,className:a}){return o.jsxs("div",{className:w(Be.wrapper,a),children:[o.jsx("div",{className:Be.icon,children:r??o.jsx(Bi,{})}),o.jsx("h4",{className:Be.title,children:e}),t&&o.jsx("p",{className:Be.description,children:t}),n&&o.jsx("div",{className:Be.action,children:o.jsx(st,{variant:"secondary",onClick:n,children:s})})]})}function Bi(){return o.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M12 9v4m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}const zi="tempest_wrapper_E0qHs",Wi="tempest_label_lbMkx",Ui="tempest_dropzone_jqua0",Hi="tempest_active_CG9Uk",qi="tempest_disabled_WNUUl",Gi="tempest_icon_i9fGH",Ki="tempest_title_bTVFl",Ji="tempest_subtitle_S54OV",Qi="tempest_files_WljYm",Vi="tempest_file_Lp-dR",Yi="tempest_fileMeta_LTnN2",Zi="tempest_remove_jskra",Xi="tempest_hidden_ReEq6",z={wrapper:zi,label:Wi,dropzone:Ui,active:Hi,disabled:qi,icon:Gi,title:Ki,subtitle:Ji,files:Qi,file:Vi,fileMeta:Yi,remove:Zi,hidden:Xi};function ec(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function tc(e,t){if(!t)return!0;const n=t.split(",").map(a=>a.trim().toLowerCase()),s=e.name.toLowerCase(),r=e.type.toLowerCase();return n.some(a=>a.startsWith(".")?s.endsWith(a):a.endsWith("/*")?r.startsWith(a.replace("/*","/")):r===a)}function nc({value:e,onChange:t,label:n,accept:s,multiple:r=!1,maxSize:a,onReject:i,disabled:c,title:u="Arraste arquivos aqui ou clique para selecionar",subtitle:d,className:p}){const[f,m]=l.useState(!1),h=l.useRef(null);function _(g){const v=[],x=[];for(const T of Array.from(g)){if(!tc(T,s)){x.push({file:T,reason:"type"});continue}if(a&&T.size>a){x.push({file:T,reason:"size"});continue}v.push(T)}if(x.length>0&&i?.(x),v.length===0)return;const N=r?[...e,...v]:v.slice(0,1);t(N)}function b(g){g.preventDefault(),m(!1),!c&&g.dataTransfer?.files&&_(g.dataTransfer.files)}function y(g){const v=e.slice();v.splice(g,1),t(v)}return o.jsxs("div",{className:w(z.wrapper,p),children:[n&&o.jsx("label",{className:z.label,children:n}),o.jsxs("div",{className:w(z.dropzone,f&&z.active,c&&z.disabled),role:"button",tabIndex:c?-1:0,onClick:()=>!c&&h.current?.click(),onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),h.current?.click())},onDragEnter:g=>{g.preventDefault(),c||m(!0)},onDragOver:g=>g.preventDefault(),onDragLeave:()=>m(!1),onDrop:b,children:[o.jsx("div",{className:z.icon,"aria-hidden":!0,children:o.jsx(sc,{})}),o.jsx("p",{className:z.title,children:u}),d&&o.jsx("p",{className:z.subtitle,children:d}),o.jsx("input",{ref:h,type:"file",accept:s,multiple:r,disabled:c,className:z.hidden,onChange:g=>{g.target.files&&_(g.target.files),g.target.value=""}})]}),e.length>0&&o.jsx("ul",{className:z.files,children:e.map((g,v)=>o.jsxs("li",{className:z.file,children:[o.jsxs("div",{children:[o.jsx("div",{children:g.name}),o.jsx("div",{className:z.fileMeta,children:ec(g.size)})]}),o.jsx("button",{type:"button","aria-label":`Remover ${g.name}`,className:z.remove,onClick:()=>y(v),children:"×"})]},`${g.name}-${v}`))})]})}function sc(){return o.jsx("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M12 16V4m0 0l-4 4m4-4l4 4M4 20h16",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}const rc="tempest_form_jNBDR",oc="tempest_stack_O1Hl-",ac="tempest_inline_LBQAv",ic="tempest_grid_-B86T",cc="tempest_section_HGqw3",lc="tempest_sectionHeader_ji9hQ",uc="tempest_sectionTitle_GTPwe",dc="tempest_sectionDescription_KjW7k",pc="tempest_sectionBody_Vp2wz",mc="tempest_row_1EkVR",fc="tempest_actions_hK95I",hc="tempest_start_gXnm3",_c="tempest_center_mKkz4",gc="tempest_end_O3yDQ",bc="tempest_between_tte2z",te={form:rc,stack:oc,inline:ac,grid:ic,section:cc,sectionHeader:lc,sectionTitle:uc,sectionDescription:dc,sectionBody:pc,row:mc,actions:fc,start:hc,center:_c,end:gc,between:bc};function at(e,t){return e===void 0?`${t*4}px`:typeof e=="number"?`${e*4}px`:e}function Yt(e){return e===void 0?"repeat(2, minmax(0, 1fr))":typeof e=="number"?`repeat(${e}, minmax(0, 1fr))`:e}const yc=l.forwardRef(function({layout:t="stack",columns:n,gap:s,className:r,style:a,children:i,...c},u){const d={gap:at(s,4),...t==="grid"?{gridTemplateColumns:Yt(n)}:null,...a};return o.jsx("form",{ref:u,className:w(te.form,te[t],r),style:d,...c,children:i})});function wc({title:e,description:t,layout:n="stack",columns:s,gap:r,className:a,style:i,children:c,...u}){const d={gap:at(r,4),...n==="grid"?{gridTemplateColumns:Yt(s)}:null};return o.jsxs("section",{className:w(te.section,a),style:i,...u,children:[(e||t)&&o.jsxs("header",{className:te.sectionHeader,children:[e&&o.jsx("h3",{className:te.sectionTitle,children:e}),t&&o.jsx("p",{className:te.sectionDescription,children:t})]}),o.jsx("div",{className:w(te.sectionBody,te[n]),style:d,children:c})]})}function vc({gap:e,className:t,style:n,children:s,...r}){const a={gap:at(e,3),...n};return o.jsx("div",{className:w(te.row,t),style:a,...r,children:s})}function xc({align:e="end",gap:t,className:n,style:s,children:r,...a}){const i={gap:at(t,2),...s};return o.jsx("div",{className:w(te.actions,te[e],n),style:i,...a,children:r})}const jc="tempest_container_fJfOt",$c="tempest_sm_k8D4-",kc="tempest_md_EnpYy",Nc="tempest_lg_UU-Ig",Sc="tempest_xl_2TEWj",Cc="tempest_full_l8bvG",Ec="tempest_stack_sxR8u",Tc="tempest_vertical_2TMf5",Rc="tempest_horizontal_r7-c-",Lc="tempest_center_EDSAh",Mc="tempest_start_ucQ-K",Ic="tempest_end_pnKlF",Dc="tempest_stretch_pX6l7",Pc="tempest_justifyStart_lHYsS",Ac="tempest_justifyCenter_JH2m6",Oc="tempest_justifyEnd_EBisT",Fc="tempest_justifyBetween_mAJwT",Bc="tempest_wrap_-xxOh",zc="tempest_grid_o-JIX",K={container:jc,sm:$c,md:kc,lg:Nc,xl:Sc,full:Cc,stack:Ec,vertical:Tc,horizontal:Rc,center:Lc,start:Mc,end:Ic,stretch:Dc,justifyStart:Pc,justifyCenter:Ac,justifyEnd:Oc,justifyBetween:Fc,wrap:Bc,grid:zc};function Wc({size:e="lg",className:t,children:n,...s}){return o.jsx("div",{className:w(K.container,K[e],t),...s,children:n})}function Uc(e){return typeof e=="object"&&e!==null&&("mobile"in e||"tablet"in e||"desktop"in e)}function rt(e,t){if(e!==void 0)return Uc(e)?t==="desktop"?e.desktop??e.tablet??e.mobile:t==="tablet"?e.tablet??e.mobile??e.desktop:e.mobile??e.tablet??e.desktop:e}function Zt(e){if(e!==void 0)return typeof e=="number"?`${e*4}px`:e}function Xt(e,t){return e?"mobile":t?"tablet":"desktop"}function Hc({direction:e="vertical",gap:t=2,align:n,justify:s,wrap:r=!1,className:a,style:i,children:c,...u}){const{isMobile:d,isTablet:p}=Ee(),f=Xt(d,p),m=rt(e,f)??"vertical",_={gap:Zt(rt(t,f)),...i},b=s==="between"?K.justifyBetween:s==="center"?K.justifyCenter:s==="end"?K.justifyEnd:s==="start"?K.justifyStart:void 0;return o.jsx("div",{className:w(K.stack,m==="vertical"?K.vertical:K.horizontal,n&&K[n],b,r&&K.wrap,a),style:_,...u,children:c})}function qc(e){if(e!==void 0)return typeof e=="number"?`repeat(${e}, minmax(0, 1fr))`:e}function Gc({columns:e=2,gap:t=4,className:n,style:s,children:r,...a}){const{isMobile:i,isTablet:c}=Ee(),u=Xt(i,c),d=qc(rt(e,u)),p=Zt(rt(t,u));return o.jsx("div",{className:w(K.grid,n),style:{gridTemplateColumns:d,gap:p,...s},...a,children:r})}const Kc="tempest_kbd_jgbYx",Jc="tempest_sm_9WPWA",Qc="tempest_md_BePC0",Vc="tempest_lg_cBKum",Ct={kbd:Kc,sm:Jc,md:Qc,lg:Vc};function Yc({size:e="md",className:t,children:n,...s}){return o.jsx("kbd",{className:w(Ct.kbd,Ct[e],t),...s,children:n})}const Zc="tempest_navbar_Ey25T",Xc="tempest_surface_xyKhM",el="tempest_primary_w3ft-",tl="tempest_transparent_N1vMR",nl="tempest_bordered_HD49R",sl="tempest_sticky_0XsOs",rl="tempest_logo_O9j3q",ol="tempest_nav_0oisE",al="tempest_actions_8BNWJ",ke={navbar:Zc,surface:Xc,primary:el,transparent:tl,bordered:nl,sticky:sl,logo:rl,nav:ol,actions:al};function il({logo:e,nav:t,actions:n,sticky:s=!0,tone:r="surface",bordered:a=!0,className:i,...c}){return o.jsxs("header",{className:w(ke.navbar,ke[r],s&&ke.sticky,a&&ke.bordered,i),...c,children:[e&&o.jsx("div",{className:ke.logo,children:e}),t&&o.jsx("nav",{className:ke.nav,children:t}),n&&o.jsx("div",{className:ke.actions,children:n})]})}const cl="tempest_page_THNNc",ll="tempest_padded_bzjoF",ul="tempest_header_PZEzk",dl="tempest_headerText_qYXFI",pl="tempest_eyebrow_651RV",ml="tempest_title_2oGnT",fl="tempest_description_YzmWl",hl="tempest_actions_-rB3U",_l="tempest_toolbar_sA7sD",gl="tempest_content_RCB4b",bl="tempest_footer_540pQ",V={page:cl,padded:ll,header:ul,headerText:dl,eyebrow:pl,title:ml,description:fl,actions:hl,toolbar:_l,content:gl,footer:bl};function yl({title:e,eyebrow:t,description:n,actions:s,toolbar:r,footer:a,padded:i=!0,className:c,children:u,...d}){const p=e||t||n||s;return o.jsxs("main",{className:w(V.page,i&&V.padded,c),...d,children:[p&&o.jsxs("header",{className:V.header,children:[o.jsxs("div",{className:V.headerText,children:[t&&o.jsx("div",{className:V.eyebrow,children:t}),e&&o.jsx("h1",{className:V.title,children:e}),n&&o.jsx("p",{className:V.description,children:n})]}),s&&o.jsx("div",{className:V.actions,children:s})]}),r&&o.jsx("div",{className:V.toolbar,children:r}),o.jsx("div",{className:V.content,children:u}),a&&o.jsx("footer",{className:V.footer,children:a})]})}const wl="tempest_wrapper_cRGQm",vl="tempest_controls_fdL-y",xl="tempest_page_WjG0l",jl="tempest_active_1kqsJ",$l="tempest_ellipsis_V294k",kl="tempest_sizeSelect_ZayTo",Nl="tempest_numeric_ztI0I",Sl="tempest_summary_ZTggV",Y={wrapper:wl,controls:vl,page:xl,active:jl,ellipsis:$l,sizeSelect:kl,numeric:Nl,summary:Sl};function Cl(e,t,n){const s=n+4;if(t<=s)return Array.from({length:t},(c,u)=>u+1);const r=Math.max(2,e-Math.floor(n/2)),a=Math.min(t-1,r+n-1),i=[1];r>2&&i.push("...");for(let c=r;c<=a;c++)i.push(c);return a<t-1&&i.push("..."),i.push(t),i}function en({page:e,totalPages:t,onPageChange:n,pageSize:s,onPageSizeChange:r,pageSizeOptions:a=[10,25,50,100],totalItems:i,siblingCount:c=3,className:u}){const d=l.useMemo(()=>Cl(e,t,c),[e,t,c]);return t<=1&&!r?null:o.jsxs("div",{className:w(Y.wrapper,u),children:[o.jsx("div",{className:Y.summary,children:typeof i=="number"?`${i} resultado${i===1?"":"s"}`:`Página ${e} de ${t}`}),o.jsxs("div",{className:Y.controls,children:[o.jsx("button",{type:"button",className:Y.page,onClick:()=>n(Math.max(1,e-1)),disabled:e<=1,"aria-label":"Página anterior",children:"‹"}),d.map((p,f)=>p==="..."?o.jsx("span",{className:w(Y.ellipsis,Y.numeric),children:"…"},`ellipsis-${f}`):o.jsx("button",{type:"button",className:w(Y.page,Y.numeric,p===e&&Y.active),onClick:()=>n(p),"aria-current":p===e?"page":void 0,children:p},p)),o.jsx("button",{type:"button",className:Y.page,onClick:()=>n(Math.min(t,e+1)),disabled:e>=t,"aria-label":"Próxima página",children:"›"}),r&&o.jsx("select",{className:Y.sizeSelect,value:s,onChange:p=>r(Number(p.target.value)),"aria-label":"Itens por página",children:a.map(p=>o.jsxs("option",{value:p,children:[p," / página"]},p))})]})]})}const El="tempest_wrapper_zEU-L",Tl="tempest_label_ps3gD",Rl="tempest_field_7taZG",Ll="tempest_input_FWEvb",Ml="tempest_sm_3-CZz",Il="tempest_md_ReV0O",Dl="tempest_lg_DiTiB",Pl="tempest_toggle_WNeX9",Al="tempest_error_QdIFf",Ol="tempest_helper_mBUna",Fl="tempest_errorText_73Uvv",Bl="tempest_strength_i6RaQ",zl="tempest_strengthBar_PAPHR",Wl="tempest_strengthLabel_u9QHS",Ul="tempest_level0_n6tWv",Hl="tempest_level1_FOI93",ql="tempest_level2_q5Wii",Gl="tempest_level3_BpB53",Kl="tempest_level4_vyQ3x",W={wrapper:El,label:Tl,field:Rl,input:Ll,sm:Ml,md:Il,lg:Dl,toggle:Pl,error:Al,helper:Ol,errorText:Fl,strength:Bl,strengthBar:zl,strengthLabel:Wl,level0:Ul,level1:Hl,level2:ql,level3:Gl,level4:Kl},Jl=["Muito fraca","Fraca","Razoável","Forte","Excelente"];function tn(e){if(!e)return 0;let t=0;return e.length>=8&&(t+=1),e.length>=12&&(t+=1),/[a-z]/.test(e)&&/[A-Z]/.test(e)&&(t+=1),/[0-9]/.test(e)&&(t+=1),/[^A-Za-z0-9]/.test(e)&&(t+=1),Math.min(4,t)}const Ql=l.forwardRef(function({label:t,helperText:n,error:s,size:r="md",showStrength:a=!1,strength:i,strengthLabels:c=Jl,toggleLabels:u={show:"Mostrar senha",hide:"Esconder senha"},className:d,value:p,defaultValue:f,...m},h){const[_,b]=l.useState(!1),y=String(p??f??""),g=i??tn(y);return o.jsxs("div",{className:w(W.wrapper,W[r],s&&W.error,d),children:[t&&o.jsx("label",{className:W.label,children:t}),o.jsxs("div",{className:W.field,children:[o.jsx("input",{ref:h,...m,value:p,defaultValue:f,type:_?"text":"password","aria-invalid":!!s,className:W.input}),o.jsx("button",{type:"button",className:W.toggle,"aria-label":_?u.hide:u.show,"aria-pressed":_,onClick:()=>b(v=>!v),children:_?"🙈":"👁"})]}),a&&o.jsxs("div",{className:w(W.strength,W[`level${g}`]),"aria-label":c[g],children:[o.jsx("div",{className:W.strengthBar,children:o.jsx("span",{style:{width:`${g/4*100}%`}})}),o.jsx("span",{className:W.strengthLabel,children:c[g]})]}),s?o.jsx("span",{className:W.errorText,children:s}):n?o.jsx("span",{className:W.helper,children:n}):null]})}),Vl="tempest_wrapper_3WAh7",Yl="tempest_label_Hk01i",Zl="tempest_cells_URO3v",Xl="tempest_cell_fxLzs",eu="tempest_sm_SQM-s",tu="tempest_md_aHCGl",nu="tempest_lg_JpI4A",su="tempest_error_Kou0o",ru="tempest_helper_W04iL",ou="tempest_errorText_h4svq",ge={wrapper:Vl,label:Yl,cells:Zl,cell:Xl,sm:eu,md:tu,lg:nu,error:su,helper:ru,errorText:ou},au=/[0-9]/,iu=/[A-Za-z0-9]/,cu=l.forwardRef(function({length:t=6,type:n="numeric",size:s="md",value:r,defaultValue:a,onChange:i,onComplete:c,masked:u=!1,label:d,helperText:p,error:f,disabled:m=!1,autoFocus:h=!1,id:_,className:b},y){const g=l.useId(),v=_??g,x=r!==void 0,[N,T]=l.useState(a??""),M=x?r??"":N,P=Array.from({length:t},(R,E)=>M[E]??""),j=l.useRef([]),$=n==="numeric"?au:iu;l.useEffect(()=>{h&&j.current[0]?.focus()},[h]);const S=R=>{const E=R.slice(0,t);x||T(E),i?.(E),E.length===t&&c?.(E)},I=R=>{const E=Math.max(0,Math.min(t-1,R));j.current[E]?.focus(),j.current[E]?.select()},k=R=>E=>{const F=E.target.value.slice(-1);if(F&&!$.test(F))return;const Ke=P.slice();Ke[R]=F,S(Ke.join("")),F&&I(R+1)},C=R=>E=>{if(E.key==="Backspace"){if(!P[R]&&R>0){E.preventDefault();const F=P.slice();F[R-1]="",S(F.join("")),I(R-1)}}else E.key==="ArrowLeft"?(E.preventDefault(),I(R-1)):E.key==="ArrowRight"&&(E.preventDefault(),I(R+1))},ae=R=>{const E=R.clipboardData.getData("text").split("").filter(F=>$.test(F)).join("");E&&(R.preventDefault(),S(E),I(Math.min(t-1,E.length)))};return o.jsxs("div",{ref:y,className:w(ge.wrapper,f&&ge.error,b),id:v,children:[d&&o.jsx("label",{className:ge.label,children:d}),o.jsx("div",{className:w(ge.cells,ge[s]),role:"group","aria-label":d,children:P.map((R,E)=>o.jsx("input",{ref:F=>{j.current[E]=F},type:u?"password":"text",inputMode:n==="numeric"?"numeric":"text",autoComplete:E===0?"one-time-code":"off",maxLength:1,value:R,disabled:m,className:ge.cell,"aria-label":`Dígito ${E+1}`,"aria-invalid":!!f,onChange:k(E),onKeyDown:C(E),onPaste:ae},E))}),f?o.jsx("span",{className:ge.errorText,children:f}):p?o.jsx("span",{className:ge.helper,children:p}):null]})}),lu="tempest_root_vEMon",uu="tempest_popover_E9K9X",du="tempest_tempest-popover-in_W8miP",pu="tempest_top_TYlrh",mu="tempest_bottom_wGs70",fu="tempest_left_h7fCr",hu="tempest_right_--bJW",ct={root:lu,popover:uu,tempestPopoverIn:du,top:pu,bottom:mu,left:fu,right:hu};function _u({trigger:e,children:t,placement:n="bottom",open:s,onOpenChange:r,defaultOpen:a=!1,closeOnEsc:i=!0,closeOnOutsideClick:c=!0,className:u}){const d=s!==void 0,[p,f]=l.useState(a),m=d?s:p,h=l.useId(),_=l.useRef(null),b=l.useCallback(v=>{d||f(v),r?.(v)},[d,r]);l.useEffect(()=>{if(!m)return;const v=N=>{i&&N.key==="Escape"&&b(!1)},x=N=>{c&&_.current&&!_.current.contains(N.target)&&b(!1)};return window.addEventListener("keydown",v),window.addEventListener("mousedown",x),()=>{window.removeEventListener("keydown",v),window.removeEventListener("mousedown",x)}},[m,i,c,b]);const y=v=>{e.props.onClick?.(v),b(!m)},g={...e,props:{...e.props,onClick:y,"aria-expanded":m,"aria-controls":h}};return o.jsxs("span",{ref:_,className:ct.root,children:[g,m&&o.jsx("div",{id:h,role:"dialog",className:w(ct.popover,ct[n],u),children:t})]})}const gu="tempest_wrapper_BQek1",bu="tempest_bar_uC-0x",yu="tempest_fill_vmg7x",wu="tempest_success_gWJ8U",vu="tempest_warning_DGkPO",xu="tempest_danger_gfwHh",ju="tempest_indeterminate_HojUj",$u="tempest_tempest-progress-loop_0nEdF",ku="tempest_label_qqHJM",Re={wrapper:gu,bar:bu,fill:yu,success:wu,warning:vu,danger:xu,indeterminate:ju,tempestProgressLoop:$u,label:ku};function Nu({value:e=0,max:t=100,variant:n="primary",indeterminate:s=!1,showLabel:r=!1,label:a,className:i}){const c=s?0:Math.max(0,Math.min(100,e/t*100));return o.jsxs("div",{className:w(Re.wrapper,i),children:[(r||a)&&o.jsxs("div",{className:Re.label,children:[a&&o.jsx("span",{children:a}),r&&!s&&o.jsxs("span",{children:[Math.round(c),"%"]})]}),o.jsx("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":s?void 0:e,className:w(Re.bar,s&&Re.indeterminate),children:o.jsx("div",{className:w(Re.fill,n!=="primary"&&Re[n]),style:{width:s?void 0:`${c}%`}})})]})}const Su="tempest_wrapper_P-gFm",Cu="tempest_disabled_0-cna",Eu="tempest_input_7R8ZN",Tu="tempest_dot_P7ejP",Ru="tempest_labelWrap_iQ1HR",Lu="tempest_label_vAFIP",Mu="tempest_description_bEB8u",Iu="tempest_group_oi329",Du="tempest_horizontal_1Ovgu",he={wrapper:Su,disabled:Cu,input:Eu,dot:Tu,labelWrap:Ru,label:Lu,description:Mu,group:Iu,horizontal:Du},nn=l.createContext(null),Pu=l.forwardRef(function({label:t,description:n,value:s,disabled:r,name:a,checked:i,onChange:c,wrapperClassName:u,className:d,...p},f){const m=l.useContext(nn),h=m?.name??a,_=m?.disabled??r,b=m?m.value===s:i;function y(g){m&&m.onChange?.(s),c?.(g)}return o.jsxs("label",{className:w(he.wrapper,_&&he.disabled,u),children:[o.jsx("input",{ref:f,type:"radio",name:h,value:s,checked:b,disabled:_,onChange:y,className:w(he.input,d),...p}),o.jsx("span",{className:he.dot,"aria-hidden":!0}),(t||n)&&o.jsxs("span",{className:he.labelWrap,children:[t&&o.jsx("span",{className:he.label,children:t}),n&&o.jsx("span",{className:he.description,children:n})]})]})});function Au({value:e,defaultValue:t,onChange:n,name:s,disabled:r,horizontal:a=!1,className:i,children:c}){const u=l.useId(),d=s??u,[p,f]=l.useState(t),m=e!==void 0,h=m?e:p;function _(b){m||f(b),n?.(b)}return o.jsx(nn.Provider,{value:{name:d,value:h,onChange:_,disabled:r},children:o.jsx("div",{role:"radiogroup",className:w(he.group,a&&he.horizontal,i),children:c})})}const Ou="tempest_wrapper_o1aOo",Fu="tempest_label_jaBOA",Bu="tempest_value_GKfOu",zu="tempest_field_YxCzt",Wu="tempest_track_j-2iy",Uu="tempest_fill_1pbqj",Hu="tempest_input_1MASw",qu="tempest_helper_uqxKu",ue={wrapper:Ou,label:Fu,value:Bu,field:zu,track:Wu,fill:Uu,input:Hu,helper:qu};function Gu({value:e,onChange:t,min:n=0,max:s=100,step:r=1,label:a,helperText:i,disabled:c=!1,formatValue:u,className:d}){const[p,f]=e,m=s-n,h=l.useMemo(()=>(p-n)/m*100,[p,n,m]),_=l.useMemo(()=>(f-n)/m*100,[f,n,m]),b=u?.(e)??`${p} – ${f}`,y=l.useCallback(v=>{const x=Math.min(Number(v.target.value),f);t([x,f])},[f,t]),g=l.useCallback(v=>{const x=Math.max(Number(v.target.value),p);t([p,x])},[p,t]);return o.jsxs("div",{className:w(ue.wrapper,d),children:[a&&o.jsxs("div",{className:ue.label,children:[o.jsx("span",{children:a}),o.jsx("span",{className:ue.value,children:b})]}),o.jsxs("div",{className:ue.field,children:[o.jsx("div",{className:ue.track}),o.jsx("div",{className:ue.fill,style:{left:`${h}%`,right:`${100-_}%`}}),o.jsx("input",{type:"range",className:ue.input,min:n,max:s,step:r,value:p,onChange:y,disabled:c,"aria-label":a?`${a} (mínimo)`:"Mínimo"}),o.jsx("input",{type:"range",className:ue.input,min:n,max:s,step:r,value:f,onChange:g,disabled:c,"aria-label":a?`${a} (máximo)`:"Máximo"})]}),i&&o.jsx("span",{className:ue.helper,children:i})]})}const Ku="tempest_wrapper_K9Mqa",Ju="tempest_star_goIGS",Qu="tempest_filled_mMs-d",Vu="tempest_disabled_tyUlQ",Yu="tempest_readonly_bnKLN",Zu="tempest_sm_K7-y9",Xu="tempest_md_ex2Tb",ed="tempest_lg_TstLJ",Le={wrapper:Ku,star:Ju,filled:Qu,disabled:Vu,readonly:Yu,sm:Zu,md:Xu,lg:ed};function td({value:e,max:t=5,onChange:n,size:s="md",readonly:r=!1,disabled:a=!1,label:i="Avaliação",className:c}){const[u,d]=l.useState(0),p=u>0?u:e,f=m=>{r||a||n?.(m)};return o.jsx("span",{role:"radiogroup","aria-label":i,className:w(Le.wrapper,Le[s],a&&Le.disabled,r&&Le.readonly,c),onMouseLeave:()=>d(0),children:Array.from({length:t},(m,h)=>{const _=h+1,b=_<=p;return o.jsx("button",{type:"button",role:"radio","aria-checked":e===_,"aria-label":`${_} ${_===1?"estrela":"estrelas"}`,className:w(Le.star,b&&Le.filled),disabled:a,onMouseEnter:()=>!r&&!a&&d(_),onClick:()=>f(_),children:o.jsx(nd,{filled:b})},_)})})}function nd({filled:e}){return o.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:e?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round","aria-hidden":!0,children:o.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.56 5.82 22 7 14.14 2 9.27l6.91-1.01L12 2z"})})}function sn(e,t,n,s,r){return s?(Array.isArray(s)?s:[s]).includes(e):!(t&&!r.above(t)||n&&!r.below(n))}function sd({above:e,below:t,only:n,children:s}){const r=Ee();return sn(r.current,e,t,n,r)?s:null}function rd({above:e,below:t,only:n,children:s}){const r=Ee();return sn(r.current,e,t,n,r)?null:s}const od="tempest_safe_iqDFY",ad="tempest_inline_V9eMG",id="tempest_top_Xse9E",cd="tempest_right_GZm9b",ld="tempest_bottom_kkyD7",ud="tempest_left_Z4Q72",Me={safe:od,inline:ad,top:id,right:cd,bottom:ld,left:ud},dd=["top","right","bottom","left"];function pd({edges:e=dd,inline:t=!1,className:n,children:s,...r}){return o.jsx("div",{className:w(Me.safe,t&&Me.inline,e.includes("top")&&Me.top,e.includes("right")&&Me.right,e.includes("bottom")&&Me.bottom,e.includes("left")&&Me.left,n),"data-edges":e.join(" "),...r,children:s})}const md="tempest_wrapper_dKXJJ",fd="tempest_input_m0lPc",hd="tempest_iconLeft_030-U",_d="tempest_clear_nb6lG",Je={wrapper:md,input:fd,iconLeft:hd,clear:_d},rn=l.forwardRef(function({value:t,onChange:n,onClear:s,wrapperClassName:r,placeholder:a="Buscar...",className:i,...c},u){function d(){n(""),s?.()}return o.jsxs("div",{className:w(Je.wrapper,r),children:[o.jsx("span",{className:Je.iconLeft,"aria-hidden":!0,children:o.jsx(gd,{})}),o.jsx("input",{ref:u,type:"search",value:t,onChange:p=>n(p.target.value),placeholder:a,className:w(Je.input,i),...c}),t&&o.jsx("button",{type:"button",className:Je.clear,"aria-label":"Limpar busca",onClick:d,children:o.jsx(bd,{})})]})});function gd(){return o.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:[o.jsx("circle",{cx:"11",cy:"11",r:"7",stroke:"currentColor",strokeWidth:"2"}),o.jsx("path",{d:"M20 20l-3.5-3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function bd(){return o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M6 6l12 12M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}const yd="tempest_group_mYyFC",wd="tempest_fullWidth_unSMm",vd="tempest_segment_cu-EL",xd="tempest_sm_CfD41",jd="tempest_md_2ixuM",$d="tempest_lg_2Kt7-",kd="tempest_active_GmyKg",Nd="tempest_icon_9h6GK",Sd="tempest_label_mS17q",Ne={group:yd,fullWidth:wd,segment:vd,sm:xd,md:jd,lg:$d,active:kd,icon:Nd,label:Sd};function Cd({options:e,value:t,onChange:n,size:s="md",fullWidth:r=!1,className:a,"aria-label":i,...c}){return o.jsx("div",{role:"radiogroup","aria-label":i,className:w(Ne.group,Ne[s],r&&Ne.fullWidth,a),...c,children:e.map(u=>{const d=u.value===t;return o.jsxs("button",{type:"button",role:"radio","aria-checked":d,disabled:u.disabled,className:w(Ne.segment,d&&Ne.active),onClick:()=>n(u.value),children:[u.icon&&o.jsx("span",{className:Ne.icon,children:u.icon}),o.jsx("span",{className:Ne.label,children:u.label})]},u.value)})})}const Ed="tempest_wrapper_KS2K3",Td="tempest_label_Lmgos",Rd="tempest_required_PvDVJ",Ld="tempest_field_h-wBy",Md="tempest_select_cjdcr",Id="tempest_caret_MdCao",Dd="tempest_error_sw9MU",Pd="tempest_helper_frosK",Ad="tempest_errorText_-zd6i",de={wrapper:Ed,label:Td,required:Rd,field:Ld,select:Md,caret:Id,error:Dd,helper:Pd,errorText:Ad},Od=l.forwardRef(function({label:t,helperText:n,error:s,options:r,placeholder:a,wrapperClassName:i,className:c,children:u,id:d,required:p,...f},m){const h=l.useId(),_=d??h;return o.jsxs("div",{className:w(de.wrapper,s&&de.error,i),children:[t&&o.jsxs("label",{htmlFor:_,className:de.label,children:[t,p&&o.jsx("span",{className:de.required,children:"*"})]}),o.jsxs("div",{className:de.field,children:[o.jsxs("select",{ref:m,id:_,"aria-invalid":!!s,required:p,className:w(de.select,c),...f,children:[a&&o.jsx("option",{value:"",disabled:!0,hidden:!0,children:a}),r?.map(b=>o.jsx("option",{value:b.value,disabled:b.disabled,children:b.label},b.value)),u]}),o.jsx("span",{className:de.caret,"aria-hidden":!0,children:o.jsx(Fd,{})})]}),s?o.jsx("span",{className:de.errorText,children:s}):n?o.jsx("span",{className:de.helper,children:n}):null]})});function Fd(){return o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M6 9l6 6 6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}const Bd="tempest_sidebar_UB1qz",zd="tempest_header_zupoS",Wd="tempest_nav_aLYuL",Ud="tempest_item_IAjHb",Hd="tempest_collapsed_ZbZYA",qd="tempest_active_BgcFy",Gd="tempest_icon_UQswn",Kd="tempest_label_TPvJ9",Jd="tempest_badge_xwEZv",Qd="tempest_footer_TyRyi",se={sidebar:Bd,header:zd,nav:Wd,item:Ud,collapsed:Hd,active:qd,icon:Gd,label:Kd,badge:Jd,footer:Qd};function Vd({header:e,items:t,value:n,onChange:s,footer:r,collapsed:a=!1,width:i=240,collapsedWidth:c=64,className:u,style:d,...p}){const f=typeof(a?c:i)=="number"?`${a?c:i}px`:a?c:i;return o.jsxs("aside",{className:w(se.sidebar,a&&se.collapsed,u),style:{width:f,...d},...p,children:[e&&o.jsx("div",{className:se.header,children:e}),o.jsx("nav",{className:se.nav,"aria-label":"Navegação lateral",children:t.map(m=>{const h=m.key===n;return o.jsxs("button",{type:"button",className:w(se.item,h&&se.active),"aria-current":h?"page":void 0,disabled:m.disabled,onClick:()=>s?.(m.key),title:a&&typeof m.label=="string"?m.label:void 0,children:[m.icon&&o.jsx("span",{className:se.icon,children:m.icon}),!a&&o.jsx("span",{className:se.label,children:m.label}),!a&&m.badge!==void 0&&o.jsx("span",{className:se.badge,children:m.badge})]},m.key)})}),r&&o.jsx("div",{className:se.footer,children:r})]})}const Yd="tempest_skeleton_CB4uF",Zd="tempest_text_-A8IF",Xd="tempest_circle_DYcl8",lt={skeleton:Yd,text:Zd,circle:Xd};function ep({variant:e="rect",width:t,height:n,className:s,style:r}){return o.jsx("span",{"aria-hidden":!0,className:w(lt.skeleton,e==="text"&&lt.text,e==="circle"&&lt.circle,s),style:{width:t,height:n,...r}})}const tp="tempest_spacer_okdOd",np="tempest_both_85qSF",sp="tempest_x_QiU2B",rp="tempest_y_hTtCp",Et={spacer:tp,both:np,x:sp,y:rp};function op({axis:e="both",className:t,...n}){return o.jsx("div",{className:w(Et.spacer,Et[e],t),...n})}const ap="tempest_spinner_GpFZS",ip="tempest_tempest-spinner_wKVCY",cp="tempest_xs_p8BFI",lp="tempest_sm_3sIoD",up="tempest_md_M2sPj",dp="tempest_lg_IxTw2",pp="tempest_xl_cgwqq",Tt={spinner:ap,tempestSpinner:ip,xs:cp,sm:lp,md:up,lg:dp,xl:pp};function mp({size:e="md",className:t,label:n="Carregando"}){return o.jsx("span",{role:"status","aria-label":n,className:w(Tt.spinner,Tt[e],t)})}const fp="tempest_stat_zoo9y",hp="tempest_header_3UQqq",_p="tempest_icon_zUG3e",gp="tempest_label_lIH47",bp="tempest_row_Ifyts",yp="tempest_value_JBWnr",wp="tempest_delta_mRVrE",vp="tempest_up_7qgUO",xp="tempest_down_3Rq2Z",jp="tempest_flat_R5pZT",$p="tempest_hint_YkTF8",Z={stat:fp,header:hp,icon:_p,label:gp,row:bp,value:yp,delta:wp,up:vp,down:xp,flat:jp,hint:$p};function kp(e){if(typeof e!="string")return;const t=e.trim();if(t.startsWith("+"))return"up";if(t.startsWith("-")||t.startsWith("−"))return"down"}function Np({label:e,value:t,delta:n,trend:s,hint:r,icon:a,className:i,...c}){const u=s??kp(n);return o.jsxs("div",{className:w(Z.stat,i),...c,children:[o.jsxs("div",{className:Z.header,children:[a&&o.jsx("span",{className:Z.icon,children:a}),o.jsx("span",{className:Z.label,children:e})]}),o.jsxs("div",{className:Z.row,children:[o.jsx("span",{className:Z.value,children:t}),n!==void 0&&o.jsx("span",{className:w(Z.delta,u==="up"&&Z.up,u==="down"&&Z.down,u==="flat"&&Z.flat),children:n})]}),r&&o.jsx("p",{className:Z.hint,children:r})]})}const Sp="tempest_stepper_w3qjQ",Cp="tempest_vertical_d4mOs",Ep="tempest_step_s2nqL",Tp="tempest_dot_d1bSL",Rp="tempest_completed_gcFHM",Lp="tempest_active_kL-CH",Mp="tempest_label_8irAI",Ip="tempest_connector_lyeWp",pe={stepper:Sp,vertical:Cp,step:Ep,dot:Tp,completed:Rp,active:Lp,label:Mp,connector:Ip};function Dp({steps:e,current:t,orientation:n="horizontal",className:s}){return o.jsx("ol",{className:w(pe.stepper,n==="vertical"&&pe.vertical,s),children:e.map((r,a)=>{const i=a<t,c=a===t;return o.jsxs(l.Fragment,{children:[o.jsxs("li",{className:w(pe.step,i&&pe.completed,c&&pe.active),"aria-current":c?"step":void 0,children:[o.jsx("span",{className:pe.dot,children:i?"✓":a+1}),o.jsx("span",{className:pe.label,children:r.label})]}),a<e.length-1&&o.jsx("span",{className:w(pe.connector,i&&pe.completed),"aria-hidden":!0})]},a)})})}function gt(e,t,n){if(Number.isNaN(e))return e;if(t>n){const s=t;t=n,n=s}return e<t?t:e>n?n:e}function Pp(e,t=1){if(e===0)return"0 B";const n=["B","KB","MB","GB","TB"],s=1024,r=Math.min(Math.floor(Math.log(Math.abs(e))/Math.log(s)),n.length-1),a=e/s**r,i=r===0?0:Math.max(0,t);return`${parseFloat(a.toFixed(i)).toString()} ${n[r]}`}function Ap(e,t="en-US"){return new Intl.NumberFormat(t,{notation:"compact",maximumFractionDigits:1}).format(e)}const Op="tempest_wrapper_JNjXK",Fp="tempest_label_9XKNm",Bp="tempest_row_cOARX",zp="tempest_sm_RzVSU",Wp="tempest_md_pezRm",Up="tempest_lg_kYbIN",Hp="tempest_disabled_vqmo2",qp="tempest_btn_xuHhj",Gp="tempest_value_NEatO",be={wrapper:Op,label:Fp,row:Bp,sm:zp,md:Wp,lg:Up,disabled:Hp,btn:qp,value:Gp},Kp=l.forwardRef(function({value:t,onChange:n,min:s=0,max:r=Number.POSITIVE_INFINITY,step:a=1,size:i="md",disabled:c=!1,label:u,format:d,labels:p={decrement:"Diminuir",increment:"Aumentar"},className:f},m){const h=()=>{c||n(gt(t-a,s,r))},_=()=>{c||n(gt(t+a,s,r))},b=d?d(t):String(t),y=!c&&t>s,g=!c&&t<r;return o.jsxs("div",{ref:m,className:w(be.wrapper,f),children:[u&&o.jsx("label",{className:be.label,children:u}),o.jsxs("div",{className:w(be.row,be[i],c&&be.disabled),children:[o.jsx("button",{type:"button",className:be.btn,"aria-label":p.decrement,onClick:h,disabled:!y,children:"−"}),o.jsx("span",{className:be.value,role:"status","aria-live":"polite",children:b}),o.jsx("button",{type:"button",className:be.btn,"aria-label":p.increment,onClick:_,disabled:!g,children:"+"})]})]})}),Jp="tempest_wrapper_kudO9",Qp="tempest_disabled_2aZ0V",Vp="tempest_input_5BPNu",Yp="tempest_track_7ObdZ",Zp="tempest_thumb_-FTeK",Xp="tempest_label_LrH7V",Ie={wrapper:Jp,disabled:Qp,input:Vp,track:Yp,thumb:Zp,label:Xp},em=l.forwardRef(function({label:t,disabled:n,wrapperClassName:s,className:r,...a},i){return o.jsxs("label",{className:w(Ie.wrapper,n&&Ie.disabled,s),children:[o.jsx("input",{ref:i,type:"checkbox",role:"switch",disabled:n,className:w(Ie.input,r),...a}),o.jsx("span",{className:Ie.track,"aria-hidden":!0,children:o.jsx("span",{className:Ie.thumb})}),t&&o.jsx("span",{className:Ie.label,children:t})]})}),tm="tempest_tag_16VPH",nm="tempest_sm_pzyd5",sm="tempest_md_GL6tQ",rm="tempest_lg_8tgXU",om="tempest_neutral_jAd-x",am="tempest_primary_AXKlN",im="tempest_success_56lz4",cm="tempest_warning_UK7SC",lm="tempest_danger_kJ-yx",um="tempest_info_hmHE-",dm="tempest_label_ZBPfO",pm="tempest_remove_UEwgr",ze={tag:tm,sm:nm,md:sm,lg:rm,neutral:om,primary:am,success:im,warning:cm,danger:lm,info:um,label:dm,remove:pm};function mm({variant:e="neutral",size:t="md",onRemove:n,removeLabel:s="Remover",className:r,children:a,...i}){return o.jsxs("span",{className:w(ze.tag,ze[e],ze[t],r),...i,children:[o.jsx("span",{className:ze.label,children:a}),n&&o.jsx("button",{type:"button",className:ze.remove,"aria-label":s,onClick:n,children:"×"})]})}const fm="tempest_scroll_unrJp",hm="tempest_table_Dkosn",_m="tempest_th_PNuEx",gm="tempest_td_jv9tA",bm="tempest_tr_7UG8J",ym="tempest_clickable_B6Si-",wm="tempest_alignRight_9hY0G",vm="tempest_alignCenter_YiUQy",xm="tempest_emptyRow_kdMiv",jm="tempest_priorityTablet_3alUt",$m="tempest_priorityDesktop_3f8Fq",km="tempest_stackable_heix7",Nm="tempest_stackableHead_mKGcA",Sm="tempest_stackableRow_qPNqc",D={scroll:fm,table:hm,th:_m,td:gm,tr:bm,clickable:ym,alignRight:wm,alignCenter:vm,emptyRow:xm,priorityTablet:jm,priorityDesktop:$m,stackable:km,stackableHead:Nm,stackableRow:Sm};function Rt(e){if(e==="tablet")return D.priorityTablet;if(e==="desktop")return D.priorityDesktop}function on({columns:e,data:t,rowKey:n,onRowClick:s,emptyMessage:r="Nenhum registro encontrado.",className:a,stackOnMobile:i=!1}){return o.jsx("div",{className:w(D.scroll,i&&D.stackable,a),children:o.jsxs("table",{className:D.table,children:[o.jsx("thead",{className:w(i&&D.stackableHead),children:o.jsx("tr",{children:e.map(c=>o.jsx("th",{className:w(D.th,c.align==="right"&&D.alignRight,c.align==="center"&&D.alignCenter,Rt(c.priority)),style:{width:c.width},children:c.header},c.key))})}),o.jsx("tbody",{children:t.length===0?o.jsx("tr",{children:o.jsx("td",{className:D.emptyRow,colSpan:e.length,children:r})}):t.map((c,u)=>o.jsx("tr",{className:w(D.tr,s&&D.clickable,i&&D.stackableRow),onClick:s?()=>s(c):void 0,children:e.map(d=>{const p=d.render?d.render(c,u):c[d.key];return o.jsx("td",{className:w(D.td,d.align==="right"&&D.alignRight,d.align==="center"&&D.alignCenter,Rt(d.priority),d.className),"data-label":typeof d.header=="string"?d.header:void 0,children:p},d.key)})},n(c,u)))})]})})}const Cm="tempest_tablist_WR6ag",Em="tempest_tab_IdDYc",Tm="tempest_active_PTNtG",Rm="tempest_panel_08i9c",Lm="tempest_pill_lGuqn",We={tablist:Cm,tab:Em,active:Tm,panel:Rm,pill:Lm};function Mm({items:e,defaultId:t,activeId:n,onChange:s,variant:r="underline",className:a}){const i=e.find(h=>!h.disabled),[c,u]=l.useState(t??i?.id),d=n!==void 0,p=d?n:c,f=e.find(h=>h.id===p)??i;function m(h){d||u(h),s?.(h)}return o.jsxs("div",{className:a,children:[o.jsx("div",{role:"tablist",className:w(We.tablist,r==="pill"&&We.pill),children:e.map(h=>{const _=h.id===f?.id;return o.jsx("button",{type:"button",role:"tab","aria-selected":_,"aria-controls":`panel-${h.id}`,id:`tab-${h.id}`,disabled:h.disabled,className:w(We.tab,_&&We.active),onClick:()=>m(h.id),children:h.label},h.id)})}),f&&o.jsx("div",{role:"tabpanel",id:`panel-${f.id}`,"aria-labelledby":`tab-${f.id}`,className:We.panel,children:f.content})]})}const Im="tempest_wrapper_C0gfg",Dm="tempest_label_cWLXP",Pm="tempest_required_rDZXE",Am="tempest_textarea_Z-y6g",Om="tempest_error_NWC9f",Fm="tempest_helper_gedut",Bm="tempest_errorText_ey07q",Se={wrapper:Im,label:Dm,required:Pm,textarea:Am,error:Om,helper:Fm,errorText:Bm},zm=l.forwardRef(function({label:t,helperText:n,error:s,wrapperClassName:r,className:a,id:i,required:c,...u},d){const p=l.useId(),f=i??p;return o.jsxs("div",{className:w(Se.wrapper,s&&Se.error,r),children:[t&&o.jsxs("label",{htmlFor:f,className:Se.label,children:[t,c&&o.jsx("span",{className:Se.required,children:"*"})]}),o.jsx("textarea",{ref:d,id:f,"aria-invalid":!!s,required:c,className:w(Se.textarea,a),...u}),s?o.jsx("span",{className:Se.errorText,children:s}):n?o.jsx("span",{className:Se.helper,children:n}):null]})}),Wm="tempest_timeline_utrkA",Um="tempest_item_T5xdQ",Hm="tempest_markerColumn_BMe4d",qm="tempest_marker_kmPV-",Gm="tempest_marker-primary_s9BNB",Km="tempest_marker-success_areMM",Jm="tempest_marker-warning_rRrS8",Qm="tempest_marker-danger_3GEBk",Vm="tempest_marker-neutral_M2mnw",Ym="tempest_line_CwY-N",Zm="tempest_body_KpMJ6",Xm="tempest_row_AX2ti",ef="tempest_title_DxfAX",tf="tempest_meta_GU0ih",nf="tempest_description_f9sxV",H={timeline:Wm,item:Um,markerColumn:Hm,marker:qm,markerPrimary:Gm,markerSuccess:Km,markerWarning:Jm,markerDanger:Qm,markerNeutral:Vm,line:Ym,body:Zm,row:Xm,title:ef,meta:tf,description:nf};function sf({items:e,connector:t=!0,className:n,...s}){return o.jsx("ol",{className:w(H.timeline,t&&H.connector,n),...s,children:e.map((r,a)=>{const i=a===e.length-1;return o.jsxs("li",{className:H.item,children:[o.jsxs("div",{className:H.markerColumn,children:[o.jsx("span",{className:w(H.marker,H[`marker-${r.marker??"primary"}`]),"aria-hidden":"true",children:r.icon}),t&&!i&&o.jsx("span",{className:H.line,"aria-hidden":"true"})]}),o.jsxs("div",{className:H.body,children:[o.jsxs("div",{className:H.row,children:[o.jsx("span",{className:H.title,children:r.title}),r.meta&&o.jsx("span",{className:H.meta,children:r.meta})]}),r.description&&o.jsx("p",{className:H.description,children:r.description})]})]},r.id)})})}const rf="tempest_trigger_Dmc5E",of="tempest_bubble_TPGHB",af="tempest_tempest-tooltip-in_csYeZ",cf="tempest_top_m2tnn",lf="tempest_bottom_9Twz4",uf="tempest_left_UPdrG",df="tempest_right_CV--T",ut={trigger:rf,bubble:of,tempestTooltipIn:af,top:cf,bottom:lf,left:uf,right:df};function pf({content:e,placement:t="top",children:n,disabled:s=!1,openDelay:r=150}){const[a,i]=l.useState(!1),c=l.useId();let u=null;function d(){s||(u&&clearTimeout(u),u=setTimeout(()=>i(!0),r))}function p(){u&&(clearTimeout(u),u=null),i(!1)}const f=l.cloneElement(n,{onMouseEnter:d,onMouseLeave:p,onFocus:d,onBlur:p,"aria-describedby":a?c:void 0});return o.jsxs("span",{className:ut.trigger,children:[f,a&&o.jsx("span",{id:c,role:"tooltip",className:w(ut.bubble,ut[t]),children:e})]})}const mf="tempest_container_x4-Qm",ff="tempest_positionTopRight_gbUCQ",hf="tempest_positionTopLeft_Z-tMJ",_f="tempest_positionTopCenter_A4Ze4",gf="tempest_positionBottomRight_MGo19",bf="tempest_positionBottomLeft_DpiNe",yf="tempest_positionBottomCenter_XUdok",wf="tempest_toast_FLdHz",vf="tempest_tempest-toast-in_E2d-A",xf="tempest_success_Oy694",jf="tempest_warning_84GC8",$f="tempest_error_hrQAA",kf="tempest_info_eq5bQ",Nf="tempest_title_-H6R2",Sf="tempest_description_-QwfC",Cf="tempest_close_i10-s",J={container:mf,positionTopRight:ff,positionTopLeft:hf,positionTopCenter:_f,positionBottomRight:gf,positionBottomLeft:bf,positionBottomCenter:yf,toast:wf,tempestToastIn:vf,success:xf,warning:jf,error:$f,info:kf,title:Nf,description:Sf,close:Cf},an=l.createContext(null);function Ef(){const e=l.useContext(an);if(!e)throw new Error("useToast must be used inside a <ToastProvider>");return e}function Tf({children:e,defaultDuration:t=4e3,position:n="top-right"}){const[s,r]=l.useState([]),a=l.useRef(0),i=l.useCallback(d=>{r(p=>p.filter(f=>f.id!==d))},[]),c=l.useCallback(d=>{const p=d.id??`toast-${++a.current}`,f={id:p,title:d.title,description:d.description,variant:d.variant??"info",duration:d.duration??t};return r(m=>[...m,f]),p},[t]),u=l.useMemo(()=>({show:c,dismiss:i,success:(d,p)=>c({...p,description:d,variant:"success"}),error:(d,p)=>c({...p,description:d,variant:"error"}),warning:(d,p)=>c({...p,description:d,variant:"warning"}),info:(d,p)=>c({...p,description:d,variant:"info"})}),[c,i]);return o.jsxs(an.Provider,{value:u,children:[e,o.jsx(Lf,{toasts:s,onDismiss:i,position:n})]})}function Rf(e){switch(e){case"top-left":return J.positionTopLeft;case"top-center":return J.positionTopCenter;case"bottom-right":return J.positionBottomRight;case"bottom-left":return J.positionBottomLeft;case"bottom-center":return J.positionBottomCenter;default:return J.positionTopRight}}function Lf({toasts:e,onDismiss:t,position:n}){return typeof document>"u"?null:Ae.createPortal(o.jsx("div",{className:w(J.container,Rf(n)),"aria-live":"polite","aria-atomic":"true",children:e.map(s=>o.jsx(Mf,{toast:s,onDismiss:t},s.id))}),document.body)}function Mf({toast:e,onDismiss:t}){return l.useEffect(()=>{if(!e.duration)return;const n=setTimeout(()=>t(e.id),e.duration);return()=>clearTimeout(n)},[e.id,e.duration,t]),o.jsxs("div",{className:w(J.toast,J[e.variant]),role:"status",children:[o.jsxs("div",{children:[e.title&&o.jsx("p",{className:J.title,children:e.title}),e.description&&o.jsx("p",{className:J.description,children:e.description})]}),o.jsx("button",{type:"button",className:J.close,"aria-label":"Fechar notificação",onClick:()=>t(e.id),children:o.jsx(If,{})})]})}function If(){return o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M6 6l12 12M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}const Df="tempest_scroll_8Giwl",Pf="tempest_spacer_P3Pvl",Af="tempest_row_Ff0VU",dt={scroll:Df,spacer:Pf,row:Af};function Of({items:e,itemHeight:t,renderItem:n,height:s,overscan:r=4,getKey:a,className:i,style:c}){const u=l.useRef(null),[d,p]=l.useState(0),[f,m]=l.useState(0);l.useEffect(()=>{const g=u.current;if(!g||(m(g.clientHeight),typeof ResizeObserver>"u"))return;const v=new ResizeObserver(()=>m(g.clientHeight));return v.observe(g),()=>v.disconnect()},[]);const h=e.length*t,_=Math.max(0,Math.floor(d/t)-r),b=Math.ceil(f/t)+r*2,y=Math.min(e.length,_+b);return o.jsx("div",{ref:u,className:w(dt.scroll,i),style:{height:s,...c},onScroll:g=>p(g.target.scrollTop),role:"list",children:o.jsx("div",{className:dt.spacer,style:{height:h},children:e.slice(_,y).map((g,v)=>{const x=_+v,N=a?a(g,x):x;return o.jsx("div",{role:"listitem",className:dt.row,style:{top:x*t,height:t},children:n(g,x)},N)})})})}const Ff="tempest_button_58f9i",Bf="tempest_copied_WkLgR",Lt={button:Ff,copied:Bf};function zf({value:e,timeout:t=2e3,children:n,onCopied:s,className:r,onClick:a,...i}){const[c,u]=l.useState(!1),d=l.useRef(null);l.useEffect(()=>()=>{d.current!==null&&clearTimeout(d.current)},[]);const p=l.useCallback(async f=>{a?.(f);try{await navigator.clipboard.writeText(e),u(!0),s?.(),d.current!==null&&clearTimeout(d.current),d.current=setTimeout(()=>u(!1),t)}catch{}},[e,t,s,a]);return o.jsx("button",{type:"button",className:w(Lt.button,c&&Lt.copied,r),"data-copied":c||void 0,onClick:p,...i,children:n??(c?"Copied":"Copy")})}const Wf={justNow:"agora há pouco",secondsAgo:e=>`${e} s atrás`,minutesAgo:e=>`${e} min atrás`,hoursAgo:e=>e===1?"1 hora atrás":`${e} horas atrás`,daysAgo:e=>e===1?"ontem":`${e} dias atrás`,weeksAgo:e=>e===1?"semana passada":`${e} semanas atrás`,monthsAgo:e=>e===1?"mês passado":`${e} meses atrás`,yearsAgo:e=>e===1?"ano passado":`${e} anos atrás`,inSeconds:e=>`em ${e} s`,inMinutes:e=>`em ${e} min`,inHours:e=>`em ${e} h`,inDays:e=>`em ${e} ${e===1?"dia":"dias"}`,inWeeks:e=>`em ${e} ${e===1?"semana":"semanas"}`,inMonths:e=>`em ${e} ${e===1?"mês":"meses"}`,inYears:e=>`em ${e} ${e===1?"ano":"anos"}`},Uf={justNow:"just now",secondsAgo:e=>`${e}s ago`,minutesAgo:e=>`${e}m ago`,hoursAgo:e=>`${e}h ago`,daysAgo:e=>e===1?"yesterday":`${e} days ago`,weeksAgo:e=>`${e}w ago`,monthsAgo:e=>`${e}mo ago`,yearsAgo:e=>`${e}y ago`,inSeconds:e=>`in ${e}s`,inMinutes:e=>`in ${e}m`,inHours:e=>`in ${e}h`,inDays:e=>`in ${e}d`,inWeeks:e=>`in ${e}w`,inMonths:e=>`in ${e}mo`,inYears:e=>`in ${e}y`},Hf={"pt-BR":Wf,en:Uf},bt=1e3,yt=60*bt,wt=60*yt,qe=24*wt,Mt=7*qe,It=30*qe,Dt=365*qe;function cn(e,t={}){const{locale:n="pt-BR",now:s=Date.now()}=t,r=Hf[n],a=e instanceof Date?e.getTime():new Date(e).getTime(),c=(typeof s=="number"?s:s.getTime())-a,u=c>=0,d=Math.abs(c);if(d<30*bt)return r.justNow;if(d<yt){const f=Math.round(d/bt);return u?r.secondsAgo(f):r.inSeconds(f)}if(d<wt){const f=Math.round(d/yt);return u?r.minutesAgo(f):r.inMinutes(f)}if(d<qe){const f=Math.round(d/wt);return u?r.hoursAgo(f):r.inHours(f)}if(d<Mt){const f=Math.round(d/qe);return u?r.daysAgo(f):r.inDays(f)}if(d<It){const f=Math.round(d/Mt);return u?r.weeksAgo(f):r.inWeeks(f)}if(d<Dt){const f=Math.round(d/It);return u?r.monthsAgo(f):r.inMonths(f)}const p=Math.round(d/Dt);return u?r.yearsAgo(p):r.inYears(p)}function qf({date:e,locale:t="pt",...n}){const s=e instanceof Date?e:new Date(e),r=Number.isNaN(s.getTime())?void 0:s.toISOString(),a=cn(e,{locale:t==="pt"?"pt-BR":"en"});return o.jsx("time",{dateTime:r,...n,children:a})}function Gf({cents:e,currency:t="BRL",locale:n="pt-BR",...s}){const r=new Intl.NumberFormat(n,{style:"currency",currency:t}).format(e/100);return o.jsx("span",{...s,children:r})}const Kf="tempest_clamp_r43C-",Jf={clamp:Kf};function Qf({lines:e=1,className:t,style:n,children:s,...r}){const a={...n,"--tempest-clamp-lines":e};return o.jsx("div",{className:w(Jf.clamp,t),style:a,...r,children:s})}const Vf="tempest_hidden_k7p-e",Yf={hidden:Vf};function Zf({as:e="span",className:t,children:n,...s}){return l.createElement(e,{className:w(Yf.hidden,t),...s},n)}function ln({children:e,container:t}){const[n,s]=l.useState(!1);return l.useEffect(()=>(s(!0),()=>s(!1)),[]),!n||typeof document>"u"?null:Ae.createPortal(e,t??document.body)}function Xf({onOutside:e,children:t,...n}){const s=l.useRef(null),r=l.useRef(e);return r.current=e,l.useEffect(()=>{if(typeof document>"u")return;function a(i){const c=s.current,u=i.target;c&&u&&!c.contains(u)&&r.current(i)}return document.addEventListener("mousedown",a),document.addEventListener("touchstart",a),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("touchstart",a)}},[]),o.jsx("div",{ref:s,...n,children:t})}function eh({condition:e,wrapper:t,children:n}){return e?t(n):o.jsx(o.Fragment,{children:n})}function th({each:e,children:t,fallback:n=null}){return e.length===0?o.jsx(o.Fragment,{children:n}):o.jsx(o.Fragment,{children:e.map((s,r)=>o.jsx(l.Fragment,{children:t(s,r)},r))})}const nh="tempest_errorText_LU3jn",sh={errorText:nh};function rh({children:e,className:t,...n}){return e==null||e===!1||e===""?null:o.jsx("p",{role:"alert",className:w(sh.errorText,t),...n,children:e})}const oh="tempest_image_Zq9Zs",ah={image:oh};function ih({src:e,fallback:t,alt:n,lazy:s=!0,className:r,onError:a,...i}){const[c,u]=l.useState(e),[d,p]=l.useState(!1);return o.jsx("img",{src:c,alt:n,loading:s?"lazy":"eager",className:w(ah.image,r),onError:f=>{t&&!d&&c!==t&&(p(!0),u(t)),a?.(f)},...i})}const ch="tempest_list_bAP4Q",lh="tempest_item_oRy5T",Pt={list:ch,item:lh};function uh({items:e,renderItem:t,keyExtractor:n,empty:s,className:r,...a}){return e.length===0?o.jsx(o.Fragment,{children:s??null}):o.jsx("ul",{className:w(Pt.list,r),...a,children:e.map((i,c)=>o.jsx("li",{className:Pt.item,children:t(i,c)},n?n(i,c):c))})}const dh="tempest_list_fwIXq",ph="tempest_term_QkQNZ",mh="tempest_description_e1bNN",pt={list:dh,term:ph,description:mh};function fh({items:e,className:t,...n}){return o.jsx("dl",{className:w(pt.list,t),...n,children:e.map((s,r)=>o.jsxs(l.Fragment,{children:[o.jsx("dt",{className:pt.term,children:s.term}),o.jsx("dd",{className:pt.description,children:s.description})]},r))})}const hh="tempest_toggle_kmzmH",_h="tempest_outline_aFbzy",gh="tempest_pressed_hX319",bh="tempest_sm_JTqaB",yh="tempest_md_QfS4K",wh="tempest_lg_ajzsM",Qe={toggle:hh,outline:_h,pressed:gh,sm:bh,md:yh,lg:wh},vh=l.forwardRef(function({pressed:t,defaultPressed:n=!1,onPressedChange:s,size:r="md",variant:a="default",className:i,disabled:c,onClick:u,children:d,...p},f){const m=t!==void 0,[h,_]=l.useState(n),b=m?t:h,y=l.useCallback(g=>{if(u?.(g),g.defaultPrevented)return;const v=!b;m||_(v),s?.(v)},[b,m,u,s]);return o.jsx("button",{ref:f,type:"button","aria-pressed":b,disabled:c,"data-state":b?"on":"off",className:w(Qe.toggle,Qe[r],Qe[a],b&&Qe.pressed,i),onClick:y,...p,children:d})}),xh="tempest_group_XZCDJ",jh="tempest_item_B-27E",$h="tempest_selected_OHPVQ",vt={group:xh,item:jh,selected:$h},un=l.createContext(null);function kh(){const e=l.useContext(un);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e}function At(e){return e===void 0?[]:Array.isArray(e)?e:[e]}function Nh({type:e="single",value:t,defaultValue:n,onValueChange:s,className:r,children:a,...i}){const c=t!==void 0,[u,d]=l.useState(()=>At(n)),p=c?At(t):u,f=l.useCallback(_=>{c||d(_),s?.(e==="single"?_[0]??"":_)},[c,s,e]),m=l.useCallback(_=>{const b=p.includes(_);f(e==="single"?b?[]:[_]:b?p.filter(y=>y!==_):[...p,_])},[p,e,f]),h=l.useMemo(()=>({type:e,isSelected:_=>p.includes(_),toggle:m}),[e,p,m]);return o.jsx(un.Provider,{value:h,children:o.jsx("div",{role:"group",className:w(vt.group,r),...i,children:a})})}function Sh({value:e,disabled:t,className:n,children:s,...r}){const{isSelected:a,toggle:i}=kh(),c=a(e);return o.jsx("button",{type:"button",role:"button","aria-pressed":c,disabled:t,"data-state":c?"on":"off",className:w(vt.item,c&&vt.selected,n),onClick:()=>i(e),...r,children:s})}const Ch="tempest_label_RaRvM",Eh="tempest_asterisk_1CgE8",Ot={label:Ch,asterisk:Eh},Th=l.forwardRef(function({required:t=!1,className:n,children:s,...r},a){return o.jsxs("label",{ref:a,className:w(Ot.label,n),...r,children:[s,t&&o.jsx("span",{className:Ot.asterisk,"aria-hidden":!0,children:"*"})]})}),Rh="tempest_collapsible_8jmKP",Lh="tempest_trigger_ers75",Mh="tempest_content_XmUZL",Ve={collapsible:Rh,trigger:Lh,content:Mh};function Ih({open:e,defaultOpen:t=!1,onOpenChange:n,trigger:s,className:r,children:a,...i}){const c=l.useId(),u=`${c}-content`,d=`${c}-trigger`,p=e!==void 0,[f,m]=l.useState(t),h=p?e:f,_=l.useCallback(()=>{const b=!h;p||m(b),n?.(b)},[h,p,n]);return o.jsxs("div",{className:w(Ve.collapsible,h&&Ve.open,r),...i,children:[o.jsx("button",{type:"button",id:d,className:Ve.trigger,"aria-expanded":h,"aria-controls":u,onClick:_,children:s}),o.jsx("div",{id:u,role:"region","aria-labelledby":d,hidden:!h,className:Ve.content,children:a})]})}const Dh="tempest_root_OxRHj",Ph="tempest_menu_MDn4t",Ah="tempest_item_PoiMY",Oh="tempest_active_ATcDu",Fh="tempest_danger_COgly",Bh="tempest_separator_omuCz",De={root:Dh,menu:Ph,item:Ah,active:Oh,danger:Fh,separator:Bh};function Ft(e){return"separator"in e&&e.separator===!0}function zh({items:e,children:t,className:n}){const[s,r]=l.useState(!1),[a,i]=l.useState({x:0,y:0}),[c,u]=l.useState(-1),d=l.useId(),p=l.useRef(null),f=l.useRef([]),m=e.map((y,g)=>!Ft(y)&&!y.disabled?g:-1).filter(y=>y!==-1),h=l.useCallback(()=>{r(!1),u(-1)},[]),_=y=>{y.preventDefault(),i({x:y.clientX,y:y.clientY}),u(-1),r(!0)};l.useEffect(()=>{if(!s)return;const y=v=>{if(v.key==="Escape"){h();return}if(v.key==="ArrowDown"){v.preventDefault();const x=m.indexOf(c),N=m[(x+1)%m.length]??-1;u(N),f.current[N]?.focus()}if(v.key==="ArrowUp"){v.preventDefault();const x=m.indexOf(c),N=m[(x-1+m.length)%m.length]??-1;u(N),f.current[N]?.focus()}},g=v=>{p.current&&!p.current.contains(v.target)&&h()};return window.addEventListener("keydown",y),window.addEventListener("mousedown",g),()=>{window.removeEventListener("keydown",y),window.removeEventListener("mousedown",g)}},[s,c,m,h]);const b=y=>{y.onSelect?.(),h()};return o.jsxs(o.Fragment,{children:[o.jsx("span",{className:De.root,onContextMenu:_,children:t}),s&&o.jsx(ln,{children:o.jsx("ul",{ref:p,id:d,role:"menu",className:w(De.menu,n),style:{top:a.y,left:a.x},children:e.map((y,g)=>Ft(y)?o.jsx("li",{role:"separator",className:De.separator,"aria-hidden":!0},`separator-${g}`):o.jsx("li",{role:"none",children:o.jsx("button",{ref:v=>{f.current[g]=v},type:"button",role:"menuitem",className:w(De.item,y.danger&&De.danger,c===g&&De.active),disabled:y.disabled,onClick:()=>b(y),onMouseEnter:()=>u(g),children:y.label})},`item-${g}`))})})]})}const Wh="tempest_root_2KoZA",Uh="tempest_trigger_OXsnr",Hh="tempest_card_CoGx4",qh="tempest_tempest-hover-card-in_jD85J",Gh="tempest_top_AVcQ0",Kh="tempest_bottom_2rLAA",Jh="tempest_left_tqGPt",Qh="tempest_right_9Fe6S",Ye={root:Wh,trigger:Uh,card:Hh,tempestHoverCardIn:qh,top:Gh,bottom:Kh,left:Jh,right:Qh};function Vh({trigger:e,children:t,openDelay:n=300,closeDelay:s=150,placement:r="bottom",className:a,...i}){const[c,u]=l.useState(!1),d=l.useId(),p=l.useRef(null),f=l.useCallback(()=>{p.current!==null&&(clearTimeout(p.current),p.current=null)},[]),m=l.useCallback(()=>{f(),p.current=setTimeout(()=>u(!0),n)},[f,n]),h=l.useCallback(()=>{f(),p.current=setTimeout(()=>u(!1),s)},[f,s]);return l.useEffect(()=>f,[f]),o.jsxs("span",{className:Ye.root,onMouseEnter:m,onMouseLeave:h,onFocus:m,onBlur:h,children:[o.jsx("span",{"aria-describedby":c?d:void 0,className:Ye.trigger,children:e}),c&&o.jsx("div",{id:d,role:"dialog",className:w(Ye.card,Ye[r],a),...i,children:t})]})}const Yh=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");function dn(e,t){l.useEffect(()=>{if(!t)return;const n=e.current;if(!n)return;const s=document.activeElement;function r(){return Array.from(n?.querySelectorAll(Yh)??[]).filter(c=>{if(c.hasAttribute("aria-hidden"))return!1;const u=typeof window<"u"?window.getComputedStyle(c):null;return!(u&&(u.display==="none"||u.visibility==="hidden"))})}function a(c){if(c.key!=="Tab")return;const u=r();if(u.length===0){c.preventDefault();return}const d=u[0],p=u[u.length-1],f=document.activeElement;c.shiftKey?(f===d||!f||!n?.contains(f))&&(c.preventDefault(),p.focus()):f===p&&(c.preventDefault(),d.focus())}return r()[0]?.focus(),document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a),s?.focus?.()}},[e,t])}const Zh="tempest_overlay_drnPW",Xh="tempest_dialog_lPl6k",e_="tempest_inputRow_KxWoQ",t_="tempest_searchIcon_8PULr",n_="tempest_input_D3HQr",s_="tempest_list_5UzZU",r_="tempest_group_vLaWy",o_="tempest_groupHeading_d01fo",a_="tempest_groupList_QFMjK",i_="tempest_option_doqib",c_="tempest_active_LdCIJ",l_="tempest_icon_CyCCx",u_="tempest_label_QePT-",d_="tempest_empty_al68D",O={overlay:Zh,dialog:Xh,inputRow:e_,searchIcon:t_,input:n_,list:s_,group:r_,groupHeading:o_,groupList:a_,option:i_,active:c_,icon:l_,label:u_,empty:d_};function p_(e,t){return t===""||e.label.toLowerCase().includes(t)?!0:(e.keywords??[]).some(n=>n.toLowerCase().includes(t))}function Bt(e){const t=[],n=new Map;for(const s of e){const r=n.get(s.group);r===void 0?(n.set(s.group,t.length),t.push({name:s.group,items:[s]})):t[r].items.push(s)}return t}function m_({open:e,onOpenChange:t,items:n,placeholder:s="Type a command…",emptyMessage:r="No results",className:a}){const i=l.useRef(null),[c,u]=l.useState(""),[d,p]=l.useState(0),f="tempest-command-list";dn(i,e);const m=l.useMemo(()=>{const g=c.trim().toLowerCase(),v=n.filter(x=>p_(x,g));return Bt(v).flatMap(x=>x.items)},[n,c]),h=l.useMemo(()=>Bt(m),[m]);if(l.useEffect(()=>{e&&(u(""),p(0))},[e]),l.useEffect(()=>{p(g=>m.length===0?0:Math.min(g,m.length-1))},[m.length]),!e||typeof document>"u")return null;function _(g){g.onSelect(),t(!1)}function b(g){if(g.key==="Escape"){g.preventDefault(),t(!1);return}if(g.key==="ArrowDown"){if(g.preventDefault(),m.length===0)return;p(v=>(v+1)%m.length);return}if(g.key==="ArrowUp"){if(g.preventDefault(),m.length===0)return;p(v=>(v-1+m.length)%m.length);return}if(g.key==="Enter"){g.preventDefault();const v=m[d];v&&_(v)}}let y=-1;return Ae.createPortal(o.jsx("div",{className:O.overlay,role:"presentation",onClick:()=>t(!1),children:o.jsxs("div",{ref:i,role:"dialog","aria-modal":"true","aria-label":"Command palette",className:w(O.dialog,a),onClick:g=>g.stopPropagation(),children:[o.jsxs("div",{className:O.inputRow,children:[o.jsx(f_,{}),o.jsx("input",{type:"text",role:"combobox","aria-expanded":"true","aria-controls":f,"aria-autocomplete":"list",autoFocus:!0,className:O.input,placeholder:s,value:c,onChange:g=>u(g.target.value),onKeyDown:b})]}),o.jsx("ul",{id:f,role:"listbox",className:O.list,children:m.length===0?o.jsx("li",{className:O.empty,children:r}):h.map(g=>o.jsxs("li",{className:O.group,children:[g.name&&o.jsx("div",{className:O.groupHeading,children:g.name}),o.jsx("ul",{role:"presentation",className:O.groupList,children:g.items.map(v=>{y+=1;const x=y===d,N=y;return o.jsxs("li",{role:"option","aria-selected":x,className:w(O.option,x&&O.active),onMouseMove:()=>p(N),onClick:()=>_(v),children:[v.icon&&o.jsx("span",{className:O.icon,children:v.icon}),o.jsx("span",{className:O.label,children:v.label})]},v.id)})})]},g.name??"__ungrouped__"))})]})}),document.body)}function f_(){return o.jsxs("svg",{className:O.searchIcon,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[o.jsx("circle",{cx:"11",cy:"11",r:"7",stroke:"currentColor",strokeWidth:"2"}),o.jsx("path",{d:"M20 20l-3.5-3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}const h_="tempest_root_cWKqF",__={root:h_},g_=l.forwardRef(function({maxHeight:t,orientation:n="vertical",className:s,style:r,children:a,...i},c){const u={overflowX:n==="vertical"?"hidden":"auto",overflowY:n==="horizontal"?"hidden":"auto",...t!==void 0?{maxHeight:t}:{},...r};return o.jsx("div",{ref:c,className:w(__.root,s),style:u,...i,children:a})}),b_="tempest_root_-Xerf",y_="tempest_horizontal_3QOMV",w_="tempest_vertical_6A7lb",v_="tempest_pane_x6yUG",x_="tempest_divider_fhaTB",j_="tempest_handle_eCe1B",Ce={root:b_,horizontal:y_,vertical:w_,pane:v_,divider:x_,handle:j_},Ze=2;function mt(e,t,n){return Math.min(n,Math.max(t,e))}function $_({direction:e="horizontal",defaultSize:t=50,min:n=10,max:s=90,children:r,className:a,...i}){const[c,u]=l.useState(()=>mt(t,n,s)),d=l.useRef(null),[p,f]=r,m=e==="horizontal",h=l.useCallback((y,g)=>{const v=d.current;if(!v)return;const x=v.getBoundingClientRect(),N=m?x.width:x.height;if(N<=0)return;const M=(m?y-x.left:g-x.top)/N*100;u(mt(M,n,s))},[m,n,s]),_=l.useCallback(y=>{y.preventDefault(),y.currentTarget.setPointerCapture(y.pointerId);const v=N=>{h(N.clientX,N.clientY)},x=()=>{window.removeEventListener("pointermove",v),window.removeEventListener("pointerup",x)};window.addEventListener("pointermove",v),window.addEventListener("pointerup",x)},[h]),b=l.useCallback(y=>{let g=0;if(m?y.key==="ArrowRight"?g=Ze:y.key==="ArrowLeft"&&(g=-Ze):y.key==="ArrowDown"?g=Ze:y.key==="ArrowUp"&&(g=-Ze),y.key==="Home"){y.preventDefault(),u(n);return}if(y.key==="End"){y.preventDefault(),u(s);return}g!==0&&(y.preventDefault(),u(v=>mt(v+g,n,s)))},[m,n,s]);return o.jsxs("div",{ref:d,className:w(Ce.root,m?Ce.horizontal:Ce.vertical,a),...i,children:[o.jsx("div",{className:Ce.pane,style:{flexBasis:`${c}%`},children:p}),o.jsx("div",{role:"separator","aria-orientation":m?"vertical":"horizontal","aria-valuenow":Math.round(c),"aria-valuemin":n,"aria-valuemax":s,tabIndex:0,className:Ce.divider,onPointerDown:_,onKeyDown:b,children:o.jsx("span",{className:Ce.handle,"aria-hidden":"true"})}),o.jsx("div",{className:Ce.pane,style:{flexBasis:`${100-c}%`},children:f})]})}const k_="tempest_root_ObO-Z",N_="tempest_header_5nSJG",S_="tempest_title_Jd3Xb",C_="tempest_nav_4h58I",E_="tempest_weekdays_YzRfx",T_="tempest_grid_nbaFm",R_="tempest_weekday_k-7Vr",L_="tempest_day_ao-IC",M_="tempest_outside_HkC-6",I_="tempest_today_p18-m",D_="tempest_selected_C9bTY",q={root:k_,header:N_,title:S_,nav:C_,weekdays:E_,grid:T_,weekday:R_,day:L_,outside:M_,today:I_,selected:D_},P_=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A_=["January","February","March","April","May","June","July","August","September","October","November","December"],pn=42;function Pe(e,t,n){return new Date(e,t,n)}function et(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function zt(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Wt(e,t,n){const s=et(e).getTime();return!!(t&&s<et(t).getTime()||n&&s>et(n).getTime())}function O_(e,t){const n=e.getFullYear(),s=e.getMonth(),i=(Pe(n,s,1).getDay()-t+7)%7,c=Pe(n,s,1-i),u=[];for(let d=0;d<pn;d+=1)u.push(Pe(c.getFullYear(),c.getMonth(),c.getDate()+d));return u}function F_({value:e,defaultValue:t,onChange:n,month:s,onMonthChange:r,minDate:a,maxDate:i,weekStartsOn:c=0,className:u,...d}){const p=e!==void 0,[f,m]=l.useState(t),h=p?e:f,_=s!==void 0,[b,y]=l.useState(()=>{const k=s??e??t??new Date;return Pe(k.getFullYear(),k.getMonth(),1)}),g=_?Pe(s.getFullYear(),s.getMonth(),1):b,[v,x]=l.useState(null),N=l.useRef(null),T=l.useMemo(()=>et(new Date),[]),M=l.useMemo(()=>O_(g,c),[g,c]),P=l.useMemo(()=>Array.from({length:7},(k,C)=>P_[(C+c)%7]),[c]),j=l.useCallback(k=>{const C=Pe(g.getFullYear(),g.getMonth()+k,1);r&&r(C),_||y(C)},[g,r,_]),$=l.useCallback(k=>{Wt(k,a,i)||(n&&n(k),p||m(k))},[a,i,n,p]),S=l.useCallback(k=>{const C=Math.max(0,Math.min(pn-1,k));x(C);const ae=N.current;if(!ae)return;ae.querySelectorAll("button[data-day]")[C]?.focus()},[]),I=l.useCallback((k,C)=>{switch(k.key){case"ArrowLeft":k.preventDefault(),S(C-1);break;case"ArrowRight":k.preventDefault(),S(C+1);break;case"ArrowUp":k.preventDefault(),S(C-7);break;case"ArrowDown":k.preventDefault(),S(C+7);break;case"Enter":case" ":k.preventDefault(),$(M[C]);break}},[S,$,M]);return o.jsxs("div",{className:w(q.root,u),...d,children:[o.jsxs("div",{className:q.header,children:[o.jsx("button",{type:"button",className:q.nav,"aria-label":"Previous month",onClick:()=>j(-1),children:"‹"}),o.jsxs("span",{className:q.title,"aria-live":"polite",children:[A_[g.getMonth()]," ",g.getFullYear()]}),o.jsx("button",{type:"button",className:q.nav,"aria-label":"Next month",onClick:()=>j(1),children:"›"})]}),o.jsx("div",{className:q.weekdays,role:"row",children:P.map(k=>o.jsx("span",{className:q.weekday,role:"columnheader",children:k},k))}),o.jsx("div",{className:q.grid,role:"grid",ref:N,children:M.map((k,C)=>{const ae=k.getMonth()===g.getMonth(),R=h?zt(k,h):!1,E=zt(k,T),F=Wt(k,a,i),Ke=v===null?ae&&k.getDate()===1:v===C;return o.jsx("button",{type:"button","data-day":!0,role:"gridcell",className:w(q.day,!ae&&q.outside,R&&q.selected,E&&q.today),"aria-pressed":R,"aria-selected":R,"aria-current":E?"date":void 0,disabled:F,tabIndex:Ke?0:-1,onClick:()=>$(k),onKeyDown:Hn=>I(Hn,C),children:k.getDate()},C)})})]})}const B_="tempest_root_Nosqs",z_="tempest_list_v9FNC",W_="tempest_item_9RzZ7",U_="tempest_link_67ULr",H_="tempest_trigger_2gBDu",q_="tempest_panel_N2ujp",G_="tempest_subItem_LjtO7",me={root:B_,list:z_,item:W_,link:U_,trigger:H_,panel:q_,subItem:G_};function K_({items:e,className:t,...n}){const[s,r]=l.useState(-1),[a,i]=l.useState(-1),c=l.useId(),u=l.useRef(null),d=l.useCallback(()=>{r(-1),i(-1)},[]),p=s!==-1?s:a;l.useEffect(()=>{if(p===-1)return;const m=_=>{_.key==="Escape"&&d()},h=_=>{u.current&&!u.current.contains(_.target)&&d()};return window.addEventListener("keydown",m),window.addEventListener("mousedown",h),()=>{window.removeEventListener("keydown",m),window.removeEventListener("mousedown",h)}},[p,d]);const f=(m,h)=>{const _=()=>{m.onSelect?.(),d()};return m.href?o.jsx("a",{href:m.href,role:h==="menuitem"?"menuitem":void 0,className:me.link,onClick:_,children:m.label}):o.jsx("button",{type:"button",role:h==="menuitem"?"menuitem":void 0,className:me.link,onClick:_,children:m.label})};return o.jsx("nav",{ref:u,className:w(me.root,t),...n,children:o.jsx("ul",{className:me.list,children:e.map((m,h)=>{if(!(!!m.children&&m.children.length>0))return o.jsx("li",{className:me.item,children:f(m,"none")},h);const b=p===h,y=`${c}-panel-${h}`;return o.jsxs("li",{className:me.item,onMouseEnter:()=>i(h),onMouseLeave:()=>i(g=>g===h?-1:g),children:[o.jsx("button",{type:"button",className:me.trigger,"aria-haspopup":"menu","aria-expanded":b,"aria-controls":y,onClick:()=>r(g=>g===h?-1:h),onFocus:()=>i(h),children:m.label}),b&&o.jsx("ul",{id:y,role:"menu",className:me.panel,children:m.children.map((g,v)=>o.jsx("li",{role:"none",className:me.subItem,children:f(g,"menuitem")},v))})]},h)})})})}const J_="tempest_root_PGUO2",Q_="tempest_menu_hEVLT",V_="tempest_trigger_ZlZBx",Y_="tempest_triggerOpen_Hpfbu",Z_="tempest_panel_6ta6u",X_="tempest_item_wM-61",eg="tempest_itemLabel_wXfB2",tg="tempest_shortcut_qNlmN",ng="tempest_separator_LfK3t",fe={root:J_,menu:Q_,trigger:V_,triggerOpen:Y_,panel:Z_,item:X_,itemLabel:eg,shortcut:tg,separator:ng};function sg(e){return"separator"in e}function rg({menus:e,className:t,...n}){const[s,r]=l.useState(-1),a=l.useId(),i=l.useRef(null),c=l.useRef([]),u=l.useCallback(()=>{r(-1)},[]);return l.useEffect(()=>{if(s===-1)return;const d=f=>{if(f.key==="Escape"){u(),c.current[s]?.focus();return}if(f.key==="ArrowRight"){f.preventDefault();const m=(s+1)%e.length;r(m),c.current[m]?.focus()}if(f.key==="ArrowLeft"){f.preventDefault();const m=(s-1+e.length)%e.length;r(m),c.current[m]?.focus()}},p=f=>{i.current&&!i.current.contains(f.target)&&u()};return window.addEventListener("keydown",d),window.addEventListener("mousedown",p),()=>{window.removeEventListener("keydown",d),window.removeEventListener("mousedown",p)}},[s,e.length,u]),o.jsx("div",{ref:i,role:"menubar",className:w(fe.root,t),...n,children:e.map((d,p)=>{const f=s===p,m=`${a}-panel-${p}`;return o.jsxs("div",{className:fe.menu,children:[o.jsx("button",{ref:h=>{c.current[p]=h},type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":f,"aria-controls":f?m:void 0,className:w(fe.trigger,f&&fe.triggerOpen),onClick:()=>r(h=>h===p?-1:p),children:d.label}),f&&o.jsx("ul",{id:m,role:"menu",className:fe.panel,children:d.items.map((h,_)=>sg(h)?o.jsx("li",{role:"separator",className:fe.separator,"aria-hidden":!0},_):o.jsx("li",{role:"none",children:o.jsxs("button",{type:"button",role:"menuitem",className:fe.item,disabled:h.disabled,onClick:()=>{h.onSelect?.(),u()},children:[o.jsx("span",{className:fe.itemLabel,children:h.label}),h.shortcut&&o.jsx("span",{className:fe.shortcut,children:h.shortcut})]})},_))})]},p)})})}const og="tempest_root_-w3-j",ag="tempest_viewport_n0hzM",ig="tempest_track_5PA8h",cg="tempest_slide_fhfjg",lg="tempest_arrow_S92Lt",ug="tempest_prev_X8whU",dg="tempest_next_jBRSz",pg="tempest_dots_fL3Hr",mg="tempest_dot_vEB56",fg="tempest_dotActive_OSSUg",X={root:og,viewport:ag,track:ig,slide:cg,arrow:lg,prev:ug,next:dg,dots:pg,dot:mg,dotActive:fg};function hg({children:e,loop:t=!1,showArrows:n=!0,showDots:s=!0,index:r,defaultIndex:a=0,onIndexChange:i,className:c,...u}){const d=e.length,p=r!==void 0,[f,m]=l.useState(a),h=p?r:f,_=l.useCallback(v=>{let x=v;x<0?x=t?d-1:0:x>=d&&(x=t?0:d-1),x!==h&&(p||m(x),i?.(x))},[d,t,h,p,i]),b=h<=0,y=h>=d-1,g=v=>{v.key==="ArrowRight"?(v.preventDefault(),_(h+1)):v.key==="ArrowLeft"&&(v.preventDefault(),_(h-1))};return o.jsxs("div",{role:"region","aria-roledescription":"carousel",tabIndex:0,className:w(X.root,c),onKeyDown:g,...u,children:[o.jsx("div",{className:X.viewport,children:o.jsx("div",{className:X.track,style:{transform:`translateX(-${h*100}%)`},children:e.map((v,x)=>o.jsx("div",{role:"group","aria-roledescription":"slide","aria-label":`${x+1} of ${d}`,"aria-hidden":x!==h,className:X.slide,children:v},x))})}),n&&d>1&&o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",className:w(X.arrow,X.prev),"aria-label":"Previous slide",disabled:!t&&b,onClick:()=>_(h-1),children:"‹"}),o.jsx("button",{type:"button",className:w(X.arrow,X.next),"aria-label":"Next slide",disabled:!t&&y,onClick:()=>_(h+1),children:"›"})]}),s&&d>1&&o.jsx("div",{className:X.dots,role:"tablist","aria-label":"Slides",children:e.map((v,x)=>o.jsx("button",{type:"button",role:"tab","aria-label":`Go to slide ${x+1}`,"aria-selected":x===h,className:w(X.dot,x===h&&X.dotActive),onClick:()=>_(x)},x))})]})}function _g(e,t=300){const[n,s]=l.useState(e);return l.useEffect(()=>{const r=setTimeout(()=>s(e),t);return()=>clearTimeout(r)},[e,t]),n}function mn(e=1,t=50){const[n,s]=l.useState(e),[r,a]=l.useState(t),i=l.useCallback(()=>s(1),[]);return{page:n,size:r,setPage:s,setSize:a,reset:i}}function gg(e,t,n){return l.useMemo(()=>{const s=t.trim().toLowerCase();return s?typeof n=="function"?e.filter(r=>n(r,s)):e.filter(r=>n.some(a=>{const i=r[a];return i!=null&&String(i).toLowerCase().includes(s)})):e},[e,t,n])}function bg(e){const[t,n]=l.useState(()=>typeof window>"u"?!1:window.matchMedia(e).matches);return l.useEffect(()=>{if(typeof window>"u")return;const s=window.matchMedia(e),r=a=>n(a.matches);return n(s.matches),s.addEventListener("change",r),()=>s.removeEventListener("change",r)},[e]),t}function yg(e,t,n,s){const r=l.useRef(t);r.current=t,l.useEffect(()=>{const a=n===void 0?typeof window>"u"?null:window:"current"in n?n.current??null:n;if(!a?.addEventListener)return;const i=c=>r.current(c);return a.addEventListener(e,i,s),()=>a.removeEventListener(e,i,s)},[e,n,s])}const wg=JSON.stringify,vg=e=>JSON.parse(e);function xg(e,t,n={}){const s=n.serialize??wg,r=n.deserialize??vg,a=l.useCallback(()=>{if(typeof window>"u")return t;try{const p=window.localStorage.getItem(e);return p===null?t:r(p)}catch{return t}},[e,t,r]),[i,c]=l.useState(a);l.useEffect(()=>{c(a())},[a]);const u=l.useCallback(p=>{c(f=>{const m=typeof p=="function"?p(f):p;try{typeof window<"u"&&window.localStorage.setItem(e,s(m))}catch{}return m})},[e,s]),d=l.useCallback(()=>{try{typeof window<"u"&&window.localStorage.removeItem(e)}catch{}c(t)},[e,t]);return l.useEffect(()=>{if(typeof window>"u")return;const p=f=>{if(f.key===e){if(f.newValue===null){c(t);return}try{c(r(f.newValue))}catch{}}};return window.addEventListener("storage",p),()=>window.removeEventListener("storage",p)},[e,t,r]),[i,u,d]}function jg(e=!1){const[t,n]=l.useState(e),s=l.useCallback(()=>n(c=>!c),[]),r=l.useCallback(()=>n(!0),[]),a=l.useCallback(()=>n(!1),[]),i=l.useCallback(c=>n(c),[]);return[t,{toggle:s,setTrue:r,setFalse:a,set:i}]}function $g(e,t=[],n={}){const{immediate:s=!1}=n,[r,a]=l.useState({status:"idle",data:void 0,error:void 0}),i=l.useRef(e);i.current=e;const c=l.useRef(0),u=l.useRef(!0);l.useEffect(()=>(u.current=!0,()=>{u.current=!1}),[]);const d=l.useCallback(async()=>{const f=++c.current;a(m=>({...m,status:"pending",error:void 0}));try{const m=await i.current();return u.current&&c.current===f&&a({status:"success",data:m,error:void 0}),m}catch(m){throw u.current&&c.current===f&&a({status:"error",data:void 0,error:m}),m}},[]),p=l.useCallback(()=>{c.current++,a({status:"idle",data:void 0,error:void 0})},[]);return l.useEffect(()=>{s&&d().catch(()=>{})},[s,...t]),{status:r.status,data:r.data,error:r.error,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",run:d,reset:p}}function kg(){const[e,t]=l.useState(()=>typeof navigator>"u"?!0:navigator.onLine);return l.useEffect(()=>{if(typeof window>"u")return;const n=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",n),window.addEventListener("offline",s),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}},[]),e}function Ng(){const[e,t]=l.useState(()=>typeof document>"u"?"visible":document.visibilityState);return l.useEffect(()=>{if(typeof document>"u")return;const n=()=>t(document.visibilityState);return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)},[]),e}function Sg(e,t={}){const[n,s]=l.useState(null),{once:r=!1,root:a,rootMargin:i,threshold:c}=t;return l.useEffect(()=>{const u=e.current;if(!u||typeof IntersectionObserver>"u")return;const d=new IntersectionObserver(([p])=>{p&&(s(p),r&&p.isIntersecting&&d.unobserve(u))},{root:a,rootMargin:i,threshold:c});return d.observe(u),()=>d.disconnect()},[e,r,a,i,c]),n}function Cg(e){const[t,n]=l.useState(null);return l.useEffect(()=>{const s=e.current;if(!s||typeof ResizeObserver>"u")return;const r=new ResizeObserver(a=>{const i=a[0];if(!i)return;const c=i.contentRect;n({width:c.width,height:c.height})});return r.observe(s),()=>r.disconnect()},[e]),t}function Eg(e={}){const{resetAfter:t=1500}=e,[n,s]=l.useState(!1),r=l.useRef(null),a=l.useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null),s(!1)},[]);l.useEffect(()=>()=>a(),[a]);const i=l.useCallback(async c=>{try{if(typeof navigator<"u"&&navigator.clipboard?.writeText)await navigator.clipboard.writeText(c);else if(typeof document<"u"){const u=document.createElement("textarea");u.value=c,u.style.position="fixed",u.style.opacity="0",document.body.appendChild(u),u.select(),document.execCommand("copy"),document.body.removeChild(u)}else return!1;return s(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>s(!1),t),!0}catch{return!1}},[t]);return{copied:n,copy:i,reset:a}}function Tg(e,t){if(e.key.toLowerCase()!==t.key.toLowerCase())return!1;const n=!!t.ctrl,s=!!t.meta,r=!!t.shift,a=!!t.alt;if(t.mod){if(!e.ctrlKey&&!e.metaKey)return!1}else if(e.ctrlKey!==n||e.metaKey!==s)return!1;return!(e.shiftKey!==r||e.altKey!==a)}function Rg(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName.toLowerCase();return t==="input"||t==="textarea"||t==="select"?!0:e.isContentEditable}function Lg(e,t,n={}){const{disabled:s=!1,ignoreInput:r=!0}=n;l.useEffect(()=>{if(s||typeof window>"u")return;const a=i=>{r&&Rg(i.target)||Tg(i,e)&&t(i)};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[s,r,e.key,e.ctrl,e.meta,e.shift,e.alt,e.mod,t])}function Mg(){const[e,t]=l.useState(null),[n,s]=l.useState(!1);l.useEffect(()=>{if(typeof window>"u")return;const a=c=>{c.preventDefault(),t(c)},i=()=>{t(null),s(!0)};return window.addEventListener("beforeinstallprompt",a),window.addEventListener("appinstalled",i),()=>{window.removeEventListener("beforeinstallprompt",a),window.removeEventListener("appinstalled",i)}},[]);const r=l.useCallback(async()=>{if(!e)return"unsupported";await e.prompt();const a=await e.userChoice;return t(null),a.outcome==="accepted"&&s(!0),a.outcome},[e]);return{installable:!!e,installed:n,prompt:r}}const Ut=["mousemove","mousedown","keydown","touchstart","wheel","scroll"];function Ig(e=6e4){const[t,n]=l.useState(!1);return l.useEffect(()=>{if(typeof window>"u")return;let s=setTimeout(()=>n(!0),e);function r(){n(!1),clearTimeout(s),s=setTimeout(()=>n(!0),e)}for(const a of Ut)window.addEventListener(a,r,{passive:!0});return()=>{clearTimeout(s);for(const a of Ut)window.removeEventListener(a,r)}},[e]),t}function Dg(e={}){const{watch:t=!1,disabled:n=!1,...s}=e,[r,a]=l.useState({loading:!n,error:null,coords:null,timestamp:null});return l.useEffect(()=>{if(n||typeof navigator>"u"||!navigator.geolocation){a(u=>({...u,loading:!1}));return}const i=u=>{a({loading:!1,error:null,coords:u.coords,timestamp:u.timestamp})},c=u=>{a(d=>({...d,loading:!1,error:u}))};if(t){const u=navigator.geolocation.watchPosition(i,c,s);return()=>navigator.geolocation.clearWatch(u)}navigator.geolocation.getCurrentPosition(i,c,s)},[n,t,s.enableHighAccuracy,s.maximumAge,s.timeout]),r}function Pg(e){l.useEffect(()=>{if(!e||typeof document>"u")return;const t=document.body,n=t.style.overflow;return t.style.overflow="hidden",()=>{t.style.overflow=n}},[e])}function Ag(e){const t=l.useRef(e);return t.current=e,l.useCallback((...n)=>t.current(...n),[])}function xt(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||typeof t!="object"||e===null||t===null||Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((r,a)=>xt(r,t[a]));const n=Object.keys(e),s=Object.keys(t);return n.length!==s.length?!1:n.every(r=>xt(e[r],t[r]))}function Og(e){const t=l.useRef(e);return xt(t.current,e)||(t.current=e),t.current}function Fg(e){const t=l.useRef(void 0);return l.useEffect(()=>{t.current=e},[e]),t.current}function Bg(e,t){const n=l.useRef(e);n.current=e,l.useEffect(()=>{if(t===null)return;const s=setInterval(()=>n.current(),t);return()=>clearInterval(s)},[t])}function zg(e,t){const n=l.useRef(e);n.current=e,l.useEffect(()=>{if(t===null)return;const s=setTimeout(()=>n.current(),t);return()=>clearTimeout(s)},[t])}function Wg(e,t){const[n,s]=l.useState(e),r=l.useRef(0),a=l.useRef(null);return l.useEffect(()=>{const i=Date.now(),c=i-r.current;return c>=t?(r.current=i,s(e)):(a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{r.current=Date.now(),s(e)},t-c)),()=>{a.current&&clearTimeout(a.current)}},[e,t]),n}function Ug(){const[e,t]=l.useState(()=>typeof window>"u"?{width:0,height:0}:{width:window.innerWidth,height:window.innerHeight});return l.useEffect(()=>{if(typeof window>"u")return;const n=()=>t({width:window.innerWidth,height:window.innerHeight});return n(),window.addEventListener("resize",n,{passive:!0}),()=>window.removeEventListener("resize",n)},[]),e}function Hg(e){const[t,n]=l.useState(!1);return l.useEffect(()=>{const s=e.current;if(!s)return;const r=()=>n(!0),a=()=>n(!1);return s.addEventListener("mouseenter",r),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",r),s.removeEventListener("mouseleave",a)}},[e]),t}function qg(e,t,n={}){const{delay:s=500,moveThreshold:r=10}=n,a=l.useRef(t);a.current=t,l.useEffect(()=>{const i=e.current;if(!i)return;let c=null,u=0,d=0;const p=()=>{c&&(clearTimeout(c),c=null)},f=h=>{u=h.clientX,d=h.clientY,p(),c=setTimeout(()=>{c=null,a.current()},s)},m=h=>{if(c===null)return;const _=h.clientX-u,b=h.clientY-d;Math.hypot(_,b)>r&&p()};return i.addEventListener("pointerdown",f),i.addEventListener("pointermove",m),i.addEventListener("pointerup",p),i.addEventListener("pointercancel",p),i.addEventListener("pointerleave",p),()=>{p(),i.removeEventListener("pointerdown",f),i.removeEventListener("pointermove",m),i.removeEventListener("pointerup",p),i.removeEventListener("pointercancel",p),i.removeEventListener("pointerleave",p)}},[e,s,r])}const Gg="tempest_wrapper_iB6ka",Kg="tempest_search_2y-yM",Jg="tempest_sortButton_9p6w4",Qg="tempest_sortIndicator_bZMlH",Xe={wrapper:Gg,search:Kg,sortButton:Jg,sortIndicator:Qg};function Vg(e,t){return e==null&&t==null?0:e==null?-1:t==null?1:typeof e=="number"&&typeof t=="number"?e-t:e instanceof Date&&t instanceof Date?e.getTime()-t.getTime():typeof e=="boolean"&&typeof t=="boolean"?Number(e)-Number(t):String(e).localeCompare(String(t),void 0,{numeric:!0})}function Yg({data:e,columns:t,pageSize:n=10,searchable:s=!1,searchKeys:r,initialSort:a,rowKey:i=(p,f)=>f,emptyMessage:c,className:u,...d}){const[p,f]=l.useState(""),[m,h]=l.useState(a??null),{page:_,setPage:b}=mn(1,n),y=l.useMemo(()=>r&&r.length>0?r:t.filter(j=>{const $=e.find(I=>I[j.key]!=null),S=$?$[j.key]:void 0;return typeof S=="string"||typeof S=="number"}).map(j=>j.key),[r,t,e]),g=l.useMemo(()=>{const j=p.trim().toLowerCase();return!j||!s?e:e.filter($=>y.some(S=>{const I=$[S];return I!=null&&String(I).toLowerCase().includes(j)}))},[e,p,s,y]),v=l.useMemo(()=>{if(!m)return g;const j=m.direction==="asc"?1:-1;return[...g].sort(($,S)=>Vg($[m.key],S[m.key])*j)},[g,m]),x=Math.max(1,Math.ceil(v.length/n));l.useEffect(()=>{_>x&&b(x)},[_,x,b]);const N=Math.min(_,x),T=l.useMemo(()=>{const j=(N-1)*n;return v.slice(j,j+n)},[v,N,n]);function M(j){h($=>!$||$.key!==j?{key:j,direction:"asc"}:$.direction==="asc"?{key:j,direction:"desc"}:null)}const P=l.useMemo(()=>t.map(j=>{const S=m?.key===j.key?m?.direction==="asc"?" ▲":" ▼":"",I=j.sortable?o.jsxs("button",{type:"button",className:Xe.sortButton,onClick:()=>M(j.key),"aria-label":`Ordenar por ${typeof j.header=="string"?j.header:String(j.key)}`,children:[j.header,o.jsx("span",{className:Xe.sortIndicator,"aria-hidden":!0,children:S})]}):j.header;return{key:String(j.key),header:I,align:j.align,priority:j.priority,width:j.width,render:j.render?k=>j.render(k):k=>k[j.key]??null}}),[t,m]);return o.jsxs("div",{className:w(Xe.wrapper,u),...d,children:[s&&o.jsx(rn,{value:p,onChange:j=>{f(j),b(1)},wrapperClassName:Xe.search}),o.jsx(on,{columns:P,data:T,rowKey:(j,$)=>i(j,(N-1)*n+$),emptyMessage:c}),x>1&&o.jsx(en,{page:N,totalPages:x,onPageChange:b,totalItems:v.length})]})}function Zg(e,t,n){const s=new URL(t,e.endsWith("/")?e:`${e}/`);if(n)for(const[r,a]of Object.entries(n))a!=null&&s.searchParams.set(r,String(a));return s.toString()}function Xg(e){return typeof FormData<"u"&&e instanceof FormData}async function Ht(e){let t=null;try{t=await e.clone().json()}catch{try{t=await e.text()}catch{t=null}}const n=(typeof t=="object"&&t!==null?t.detail??t.message:void 0)??`Erro ${e.status}`;return{status:e.status,detail:String(n),body:t}}function eb(e){const t=e.fetcher??globalThis.fetch.bind(globalThis);function n(){const i=e.getToken?.();return i?{Authorization:`Bearer ${i}`}:{}}async function s(i,c){const{body:u,params:d,headers:p,...f}=c,m=Xg(u),h={...m?{}:{"Content-Type":"application/json"},...e.headers,...n(),...p},_={...f,headers:h,credentials:e.withCredentials?"include":f.credentials,body:u==null?void 0:m?u:JSON.stringify(u)};return t(Zg(e.baseURL,i,d),_)}async function r(i,c={}){let u=await s(i,c);if(u.status===401)if(e.refresh)try{await e.refresh(),u=await s(i,c)}catch{throw await e.onUnauthorized?.(u),await Ht(u)}else await e.onUnauthorized?.(u);if(!u.ok)throw await Ht(u);return u.status===204?void 0:(u.headers.get("content-type")??"").includes("application/json")?await u.json():await u.text()}async function a(i,c,u="POST"){return r(i,{method:u,body:c})}return{request:r,get:(i,c)=>r(i,{...c,method:"GET"}),post:(i,c)=>r(i,{...c,method:"POST"}),put:(i,c)=>r(i,{...c,method:"PUT"}),patch:(i,c)=>r(i,{...c,method:"PATCH"}),delete:(i,c)=>r(i,{...c,method:"DELETE"}),upload:a}}function tb(e,t,n){const s=e.safeParse(t);if(s.success)return s.data;if(typeof process<"u"&&(process.env?.NODE_ENV==="development"||process.env?.NODE_ENV==="test")){const a=s.error.issues.map(i=>` - ${i.path.join(".")||"<root>"}: ${i.message}`).join(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const oe=require("./sw.cjs"),o=require("react/jsx-runtime"),l=require("react"),He=require("@tanstack/react-query"),I=require("react-router-dom"),De=require("react-dom"),re=require("react-hook-form"),yt=require("zustand"),st=require("zustand/middleware"),Xn=require("dexie");function v(...e){const t=[];for(const n of e)if(!(n==null||n===!1||n===!0)){if(typeof n=="string")n&&t.push(n);else if(typeof n=="number"||typeof n=="bigint")t.push(String(n));else if(Array.isArray(n)){const s=v(...n);s&&t.push(s)}}return t.join(" ")}const Yn="tempest_accordion_LVhhv",Zn="tempest_item_7ryVk",es="tempest_header_WaTdJ",ts="tempest_trigger_9BYFY",ns="tempest_chevron_i-HVZ",ss="tempest_open_98jLY",rs="tempest_panel_Wx50w",ye={accordion:Yn,item:Zn,header:es,trigger:ts,chevron:ns,open:ss,panel:rs};function os({items:e,multiple:t=!1,value:n,defaultValue:s=[],onChange:r,className:a}){const i=l.useId(),c=n!==void 0,[u,d]=l.useState(s),p=c?n:u,f=l.useCallback(m=>{const h=p.includes(m),_=t?h?p.filter(b=>b!==m):[...p,m]:h?[]:[m];c||d(_),r?.(_)},[p,t,c,r]);return o.jsx("div",{className:v(ye.accordion,a),children:e.map(m=>{const h=p.includes(m.id),_=`${i}-${m.id}-panel`,b=`${i}-${m.id}-trigger`;return o.jsxs("div",{className:v(ye.item,h&&ye.open),children:[o.jsx("h3",{className:ye.header,children:o.jsxs("button",{type:"button",id:b,className:ye.trigger,"aria-expanded":h,"aria-controls":_,disabled:m.disabled,onClick:()=>f(m.id),children:[o.jsx("span",{children:m.title}),o.jsx(as,{className:ye.chevron})]})}),h&&o.jsx("div",{id:_,role:"region","aria-labelledby":b,className:ye.panel,children:m.children})]},m.id)})})}function as({className:e}){return o.jsx("svg",{className:e,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:o.jsx("path",{d:"M6 9l6 6 6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}const is="tempest_alert_7cYyI",cs="tempest_content_UXnmZ",ls="tempest_title_abGgF",us="tempest_description_pXPvw",ds="tempest_icon_Zg6SB",ps="tempest_close_narep",ms="tempest_neutral_J7MH1",fs="tempest_solid_s-oW5",hs="tempest_outline_v7w9b",_s="tempest_info_9r3r1",gs="tempest_success_1bzoB",bs="tempest_warning_q-j1Q",ys="tempest_danger_CiZkW",ie={alert:is,content:cs,title:ls,description:us,icon:ds,close:ps,neutral:ms,solid:fs,outline:hs,info:_s,success:gs,warning:bs,danger:ys};function ws({variant:e="info",appearance:t="soft",title:n,description:s,icon:r,onClose:a,closeLabel:i="Dismiss",className:c,children:u,...d}){return o.jsxs("div",{role:"alert",className:v(ie.alert,ie[e],t==="solid"&&ie.solid,t==="outline"&&ie.outline,c),...d,children:[r&&o.jsx("span",{className:ie.icon,children:r}),o.jsxs("div",{className:ie.content,children:[n&&o.jsx("p",{className:ie.title,children:n}),s&&o.jsx("p",{className:ie.description,children:s}),u]}),a&&o.jsx("button",{type:"button",className:ie.close,onClick:a,"aria-label":i,children:o.jsx(vs,{})})]})}function vs(){return o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:o.jsx("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}const rt={xs:480,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},xs=["xs","sm","md","lg","xl","2xl"];function js(e){let t="xs";for(const n of xs)e>=rt[n]&&(t=n);return t}function Ee(){const[e,t]=l.useState(()=>typeof window>"u"?0:window.innerWidth);l.useEffect(()=>{if(typeof window>"u")return;const a=()=>t(window.innerWidth);return a(),window.addEventListener("resize",a,{passive:!0}),()=>window.removeEventListener("resize",a)},[]);const n=js(e),s=a=>e>=rt[a],r=a=>e<rt[a];return{current:n,width:e,above:s,below:r,isMobile:r("md"),isTablet:s("md")&&r("lg"),isDesktop:s("lg")}}const $s="tempest_shell_-xp0O",ks="tempest_navbar_liTKV",Ns="tempest_row_PE41P",Ss="tempest_sidebar_wyx-V",Cs="tempest_main_O3GFv",Es="tempest_footer_IFW4q",Ts="tempest_bottomNav_pKJ1v",we={shell:$s,navbar:ks,row:Ns,sidebar:Ss,main:Cs,footer:Es,bottomNav:Ts};function Rs({navbar:e,sidebar:t,bottomNav:n,footer:s,sidebarBreakpoint:r="md",className:a,children:i,...c}){const d=Ee().above(r);return o.jsxs("div",{className:v(we.shell,a),...c,children:[e&&o.jsx("div",{className:we.navbar,children:e}),o.jsxs("div",{className:we.row,children:[t&&d&&o.jsx("div",{className:we.sidebar,children:t}),o.jsx("main",{className:we.main,children:i})]}),s&&o.jsx("div",{className:we.footer,children:s}),n&&!d&&o.jsx("div",{className:we.bottomNav,children:n})]})}const Ls="tempest_aspect_GnAJt",Is={aspect:Ls};function Ms({ratio:e=16/9,className:t,style:n,children:s,...r}){const a={aspectRatio:String(e),...n};return o.jsx("div",{className:v(Is.aspect,t),style:a,...r,children:s})}const Ps="tempest_avatar_3xMuZ",As="tempest_image_ieqGp",Ds="tempest_xs_oSaLL",Os="tempest_sm_sZ2bk",Fs="tempest_md_Fdkbz",Bs="tempest_lg_pTTUA",zs="tempest_xl_mW58F",Ws="tempest_status_ISBnL",qs="tempest_dot_Wgfo-",Us="tempest_online_-aWoW",Hs="tempest_offline_-StX3",Ks="tempest_busy_TbwuF",Te={avatar:Ps,image:As,xs:Ds,sm:Os,md:Fs,lg:Bs,xl:zs,status:Ws,dot:qs,online:Us,offline:Hs,busy:Ks};function Gs(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"?":t.length===1?t[0].slice(0,2):`${t[0].charAt(0)}${t[t.length-1].charAt(0)}`}function Js({src:e,alt:t,name:n="",size:s="md",status:r,className:a,onClick:i}){const[c,u]=l.useState(!1),d=l.useMemo(()=>Gs(n),[n]),p=e&&!c,f=i?"button":void 0,m=i?0:void 0;return o.jsxs("span",{className:v(Te.avatar,Te[s],r&&Te.status,a),role:f,tabIndex:m,onClick:i,onKeyDown:i?h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),i())}:void 0,children:[p?o.jsx("img",{src:e,alt:t??n,className:Te.image,onError:()=>u(!0)}):o.jsx("span",{"aria-label":t??n,children:d}),r&&o.jsx("span",{className:v(Te.dot,Te[r]),"aria-hidden":!0})]})}const Qs="tempest_badge_RsuMz",Vs="tempest_sm_LYsCn",Xs="tempest_md_4Or8q",Ys="tempest_lg_Bseje",Zs="tempest_square_l63D-",er="tempest_neutral_lulSm",tr="tempest_solid_0Leug",nr="tempest_outline_x06HL",sr="tempest_success_u9JiS",rr="tempest_warning_nsGp-",or="tempest_danger_PD2hz",ar="tempest_info_na6DQ",ir="tempest_primary_S0WCS",cr="tempest_dot_i0c-G",ve={badge:Qs,sm:Vs,md:Xs,lg:Ys,square:Zs,neutral:er,solid:tr,outline:nr,success:sr,warning:rr,danger:or,info:ar,primary:ir,dot:cr};function lr({variant:e="neutral",appearance:t="soft",size:n="md",shape:s="pill",dot:r=!1,className:a,children:i,...c}){return o.jsxs("span",{className:v(ve.badge,ve[e],t==="solid"&&ve.solid,t==="outline"&&ve.outline,ve[n],s==="square"&&ve.square,a),...c,children:[r&&o.jsx("span",{className:ve.dot,"aria-hidden":!0}),i]})}const ur="tempest_banner_oyoWE",dr="tempest_info_s2q0P",pr="tempest_success_uLYQ3",mr="tempest_warning_9rua8",fr="tempest_danger_Uzb-6",hr="tempest_icon_vzKmx",_r="tempest_body_-Qm4K",gr="tempest_title_AeTHT",br="tempest_description_nbyf-",yr="tempest_action_47P8e",wr="tempest_close_Iy2oN",_e={banner:ur,info:dr,success:pr,warning:mr,danger:fr,icon:hr,body:_r,title:gr,description:br,action:yr,close:wr};function vr({variant:e="info",icon:t,title:n,action:s,dismissible:r=!1,onDismiss:a,className:i,children:c,...u}){const[d,p]=l.useState(!0);return d?o.jsxs("div",{className:v(_e.banner,_e[e],i),role:"status",...u,children:[t&&o.jsx("span",{className:_e.icon,children:t}),o.jsxs("div",{className:_e.body,children:[n&&o.jsx("p",{className:_e.title,children:n}),c&&o.jsx("p",{className:_e.description,children:c})]}),s&&o.jsx("div",{className:_e.action,children:s}),r&&o.jsx("button",{type:"button",className:_e.close,"aria-label":"Fechar",onClick:()=>{p(!1),a?.()},children:"×"})]}):null}const xr="tempest_bar_kp35Q",jr="tempest_item_XfDIW",$r="tempest_active_sK54f",kr="tempest_iconWrap_yJ20b",Nr="tempest_icon_TAjtI",Sr="tempest_badge_-c3Do",Cr="tempest_label_qJj3L",xe={bar:xr,item:jr,active:$r,iconWrap:kr,icon:Nr,badge:Sr,label:Cr};function Er({items:e,value:t,onChange:n,showLabels:s=!0,className:r,...a}){return o.jsx("nav",{className:v(xe.bar,r),"aria-label":"Navegação principal",...a,children:e.map(i=>{const c=i.key===t;return o.jsxs("button",{type:"button",className:v(xe.item,c&&xe.active),"aria-current":c?"page":void 0,disabled:i.disabled,onClick:()=>n(i.key),children:[o.jsxs("span",{className:xe.iconWrap,children:[i.icon&&o.jsx("span",{className:xe.icon,children:i.icon}),i.badge!==void 0&&o.jsx("span",{className:xe.badge,children:i.badge})]}),s&&o.jsx("span",{className:xe.label,children:i.label})]},i.key)})})}const Tr="tempest_root_qXce2",Rr="tempest_backdrop_WLqh0",Lr="tempest_sheet_Okz1P",Ir="tempest_handle_GWCoK",Mr="tempest_handleBar_XPPiI",Pr="tempest_title_i5Vuc",Ar="tempest_body_bgDhJ",je={root:Tr,backdrop:Rr,sheet:Lr,handle:Ir,handleBar:Mr,title:Pr,body:Ar};function Dr({open:e,onClose:t,title:n,showHandle:s=!0,dismissOnBackdrop:r=!0,dismissOnEsc:a=!0,className:i,children:c,...u}){return l.useEffect(()=>{if(!e||!a)return;const d=p=>{p.key==="Escape"&&t()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[e,a,t]),l.useEffect(()=>{if(!e)return;const d=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=d}},[e]),!e||typeof document>"u"?null:De.createPortal(o.jsxs("div",{className:je.root,role:"dialog","aria-modal":"true",children:[o.jsx("div",{className:je.backdrop,onClick:()=>r&&t(),"aria-hidden":"true"}),o.jsxs("div",{className:v(je.sheet,i),...u,children:[s&&o.jsx("button",{type:"button",className:je.handle,"aria-label":"Arrastar para fechar",onClick:t,children:o.jsx("span",{className:je.handleBar})}),n&&o.jsx("div",{className:je.title,children:n}),o.jsx("div",{className:je.body,children:c})]})]}),document.body)}const Or="tempest_nav_H4g6P",Fr="tempest_item_O4g3P",Br="tempest_link_7WM67",zr="tempest_current_JdlcS",Wr="tempest_separator_zGWyJ",Oe={nav:Or,item:Fr,link:Br,current:zr,separator:Wr};function qr({items:e,separator:t="/",className:n}){return o.jsx("nav",{"aria-label":"breadcrumb",className:v(Oe.nav,n),children:e.map((s,r)=>{const a=r===e.length-1,i=!a&&(s.href||s.onClick);return o.jsxs(l.Fragment,{children:[o.jsx("span",{className:Oe.item,children:i?o.jsx("a",{href:s.href,onClick:c=>{s.onClick&&(c.preventDefault(),s.onClick())},className:Oe.link,children:s.label}):o.jsx("span",{"aria-current":a?"page":void 0,className:a?Oe.current:void 0,children:s.label})}),!a&&o.jsx("span",{className:Oe.separator,"aria-hidden":!0,children:t})]},r)})})}const Ur="tempest_button_2ZuB7",Hr="tempest_primary_s1sM6",Kr="tempest_secondary_R0waJ",Gr="tempest_danger_V4fX8",Jr="tempest_success_w6qB6",Qr="tempest_ghost_1KINV",Vr="tempest_soft_c3kzm",Xr="tempest_outline_F5jq-",Yr="tempest_link_Zt5hw",Zr="tempest_xs_cF6m0",eo="tempest_sm_NhG0g",to="tempest_md_hH4h3",no="tempest_lg_2plQf",so="tempest_xl_nx4V0",ro="tempest_iconOnly_WCpTS",oo="tempest_pill_lx8lt",ao="tempest_fullWidth_36oJT",io="tempest_loading_EQAt2",co="tempest_hiddenText_hIiJ2",lo="tempest_spinner_ZExvW",uo="tempest_tempest-spin_UOSVC",ce={button:Ur,primary:Hr,secondary:Kr,danger:Gr,success:Jr,ghost:Qr,soft:Vr,outline:Xr,link:Yr,xs:Zr,sm:eo,md:to,lg:no,xl:so,iconOnly:ro,pill:oo,fullWidth:ao,loading:io,hiddenText:co,spinner:lo,tempestSpin:uo};function ot({variant:e="primary",size:t="md",loading:n=!1,fullWidth:s=!1,iconOnly:r=!1,pill:a=!1,leftIcon:i,rightIcon:c,disabled:u,className:d,children:p,...f}){return o.jsxs("button",{className:v(ce.button,ce[e],ce[t],r&&ce.iconOnly,a&&ce.pill,n&&ce.loading,s&&ce.fullWidth,d),disabled:u||n,...f,children:[n&&o.jsx("span",{className:ce.spinner,"aria-hidden":!0,children:o.jsx(po,{})}),o.jsxs("span",{className:v(n&&ce.hiddenText),children:[i,p,c]})]})}function po(){return o.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}const mo="tempest_card_Cb1o4",fo="tempest_flat_LRpce",ho="tempest_raised_WmIqk",_o="tempest_elevated_5VEDw",go="tempest_interactive_B8Tah",bo="tempest_padded_oOxwN",yo="tempest_flush_aiDZi",wo="tempest_header_PTXf2",vo="tempest_title_mSgoo",xo="tempest_body_W441Z",jo="tempest_footer_Mu-JC",Q={card:mo,flat:fo,raised:ho,elevated:_o,interactive:go,padded:bo,flush:yo,header:wo,title:vo,body:xo,footer:jo};function $o({title:e,actions:t,footer:n,flush:s=!1,interactive:r=!1,elevation:a="default",className:i,children:c,...u}){const d=!!(e||t);return o.jsxs("div",{className:v(Q.card,a==="flat"&&Q.flat,a==="raised"&&Q.raised,a==="elevated"&&Q.elevated,r&&Q.interactive,!d&&!s&&Q.padded,s&&Q.flush,i),tabIndex:r?u.tabIndex??0:u.tabIndex,...u,children:[d&&o.jsxs("header",{className:Q.header,children:[typeof e=="string"?o.jsx("h3",{className:Q.title,children:e}):e,t]}),d?o.jsx("div",{className:Q.body,children:c}):c,n&&o.jsx("footer",{className:Q.footer,children:n})]})}const ko="tempest_center_Pu1Pf",No="tempest_both_53GWn",So="tempest_horizontal_94-Bt",Co="tempest_vertical_Q7Kyg",Rt={center:ko,both:No,horizontal:So,vertical:Co};function Eo({axis:e="both",minHeight:t,fullWidth:n=!0,className:s,style:r,children:a,...i}){const c={...t!==void 0?{minHeight:typeof t=="number"?`${t}px`:t}:null,...n?{width:"100%"}:null,...r};return o.jsx("div",{className:v(Rt.center,Rt[e],s),style:c,...i,children:a})}const To="tempest_wrapper_rpthW",Ro="tempest_disabled_x7-eg",Lo="tempest_input_2kt-h",Io="tempest_box_OCPee",Mo="tempest_labelWrap_Ktbp0",Po="tempest_label_cwRtI",Ao="tempest_description_rMhG1",$e={wrapper:To,disabled:Ro,input:Lo,box:Io,labelWrap:Mo,label:Po,description:Ao},Do=l.forwardRef(function({label:t,description:n,indeterminate:s,disabled:r,wrapperClassName:a,className:i,...c},u){const d=l.useRef(null);l.useEffect(()=>{d.current&&(d.current.indeterminate=!!s)},[s]);function p(f){d.current=f,typeof u=="function"?u(f):u&&(u.current=f)}return o.jsxs("label",{className:v($e.wrapper,r&&$e.disabled,a),children:[o.jsx("input",{ref:p,type:"checkbox",disabled:r,className:v($e.input,i),...c}),o.jsx("span",{className:$e.box,"aria-hidden":!0,children:s?o.jsx(Fo,{}):o.jsx(Oo,{})}),(t||n)&&o.jsxs("span",{className:$e.labelWrap,children:[t&&o.jsx("span",{className:$e.label,children:t}),n&&o.jsx("span",{className:$e.description,children:n})]})]})});function Oo(){return o.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M5 12l5 5L20 7",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})})}function Fo(){return o.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M5 12h14",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})})}const Bo="tempest_wrapper_KR4-F",zo="tempest_label_Mz-wX",Wo="tempest_field_iIBJw",qo="tempest_error_O9n-9",Uo="tempest_chip_GEwrc",Ho="tempest_remove_JYDIq",Ko="tempest_input_frJmk",Go="tempest_helper_Yts53",Jo="tempest_errorText_llJGq",le={wrapper:Bo,label:zo,field:Wo,error:qo,chip:Uo,remove:Ho,input:Ko,helper:Go,errorText:Jo};function Qo({value:e,onChange:t,label:n,placeholder:s="Adicionar e pressionar Enter…",helperText:r,error:a,commitKeys:i=["Enter",",","Tab"],normalize:c=!0,className:u}){const[d,p]=l.useState(""),f=l.useRef(null);function m(){const b=c?d.trim().toLowerCase():d.trim();if(b){if(e.includes(b)){p("");return}t([...e,b]),p("")}}function h(b){if(i.includes(b.key)){b.preventDefault(),m();return}b.key==="Backspace"&&!d&&e.length>0&&t(e.slice(0,-1))}function _(b){const y=e.slice();y.splice(b,1),t(y)}return o.jsxs("div",{className:v(le.wrapper,a&&le.error,u),children:[n&&o.jsx("label",{className:le.label,children:n}),o.jsxs("div",{className:le.field,onClick:()=>f.current?.focus(),children:[e.map((b,y)=>o.jsxs("span",{className:le.chip,children:[b,o.jsx("button",{type:"button",className:le.remove,"aria-label":`Remover ${b}`,onClick:()=>_(y),children:"×"})]},`${b}-${y}`)),o.jsx("input",{ref:f,className:le.input,value:d,placeholder:e.length===0?s:"",onChange:b=>p(b.target.value),onKeyDown:h,onBlur:m})]}),a?o.jsx("span",{className:le.errorText,children:a}):r?o.jsx("span",{className:le.helper,children:r}):null]})}const Vo="tempest_wrapper_TNvle",Xo="tempest_label_KVkZO",Yo="tempest_field_BenH0",Zo="tempest_input_-HTv1",ea="tempest_caret_jRplQ",ta="tempest_menu_zPQG3",na="tempest_option_vhhn5",sa="tempest_active_XCgtX",ra="tempest_selected_T6nm2",oa="tempest_empty_Ahw5K",aa="tempest_helper_OzB7V",ia="tempest_errorText_X18sQ",ca="tempest_error_bnVuM",B={wrapper:Vo,label:Xo,field:Yo,input:Zo,caret:ea,menu:ta,option:na,active:sa,selected:ra,empty:oa,helper:aa,errorText:ia,error:ca};function la(e,t){return t?e.label.toLowerCase().includes(t.toLowerCase()):!0}function ua({options:e,value:t,onChange:n,label:s,placeholder:r="Selecione",helperText:a,error:i,disabled:c,filter:u=la,emptyMessage:d="Nenhuma opção encontrada",className:p}){const f=l.useId(),m=l.useRef(null),h=l.useRef(null),[_,b]=l.useState(!1),[y,g]=l.useState(""),[w,x]=l.useState(0),k=l.useMemo(()=>e.find(j=>j.value===t)?.label??"",[e,t]),T=l.useMemo(()=>e.filter(j=>u(j,y)),[e,u,y]),M=l.useCallback(()=>{b(!1),g(""),x(0)},[]),P=l.useCallback(j=>{j.disabled||(n(j.value),M())},[n,M]);l.useEffect(()=>{if(!_)return;const j=S=>{m.current&&!m.current.contains(S.target)&&M()};return window.addEventListener("mousedown",j),()=>window.removeEventListener("mousedown",j)},[_,M]);const $=j=>{if(j.key==="ArrowDown")j.preventDefault(),b(!0),x(S=>Math.min(T.length-1,S+1));else if(j.key==="ArrowUp")j.preventDefault(),x(S=>Math.max(0,S-1));else if(j.key==="Enter"){j.preventDefault();const S=T[w];S&&P(S)}else j.key==="Escape"&&M()};return o.jsxs("div",{ref:m,className:v(B.wrapper,i&&B.error,p),children:[s&&o.jsx("label",{htmlFor:f,className:B.label,children:s}),o.jsxs("div",{className:B.field,children:[o.jsx("input",{id:f,ref:h,type:"text",role:"combobox","aria-expanded":_,"aria-controls":`${f}-listbox`,"aria-autocomplete":"list",className:B.input,placeholder:r,disabled:c,value:_?y:k,onFocus:()=>b(!0),onChange:j=>{g(j.target.value),b(!0),x(0)},onKeyDown:$}),o.jsx("span",{className:B.caret,"aria-hidden":!0,children:"▾"})]}),_&&o.jsx("ul",{id:`${f}-listbox`,role:"listbox",className:B.menu,children:T.length===0?o.jsx("li",{className:B.empty,children:d}):T.map((j,S)=>o.jsx("li",{role:"option","aria-selected":j.value===t,className:v(B.option,S===w&&B.active,j.value===t&&B.selected),onMouseEnter:()=>x(S),onMouseDown:L=>{L.preventDefault(),P(j)},children:j.label},j.value))}),i?o.jsx("span",{className:B.errorText,children:i}):a?o.jsx("span",{className:B.helper,children:a}):null]})}const da="tempest_overlay_dd9h1",pa="tempest_tempest-fade-in_DvgSp",ma="tempest_dialog_ptM-K",fa="tempest_tempest-modal-in_UoxQC",ha="tempest_sm_K5k3W",_a="tempest_md_gvyR7",ga="tempest_lg_BgB1a",ba="tempest_xl_MR-68",ya="tempest_size2xl_-PH9e",wa="tempest_size3xl_iqDwN",va="tempest_fullscreen_o84Xi",xa="tempest_fullscreenOnMobile_0bDwe",ja="tempest_body_lVhql",$a="tempest_header_ILG9i",ka="tempest_footer_rro2w",Na="tempest_title_A5OeE",Sa="tempest_close_-ER1C",K={overlay:da,tempestFadeIn:pa,dialog:ma,tempestModalIn:fa,sm:ha,md:_a,lg:ga,xl:ba,size2Xl:ya,size3Xl:wa,fullscreen:va,fullscreenOnMobile:xa,body:ja,header:$a,footer:ka,title:Na,close:Sa};function en({open:e,onClose:t,title:n,children:s,footer:r,size:a="md",closeOnBackdrop:i=!0,closeOnEsc:c=!0,className:u,hideCloseButton:d=!1,fullscreen:p=!1,fullscreenOnMobile:f=!1}){return l.useEffect(()=>{if(!e)return;const m=document.body.style.overflow;document.body.style.overflow="hidden";const h=_=>{c&&_.key==="Escape"&&t()};return window.addEventListener("keydown",h),()=>{document.body.style.overflow=m,window.removeEventListener("keydown",h)}},[e,c,t]),!e||typeof document>"u"?null:De.createPortal(o.jsx("div",{className:K.overlay,role:"presentation",onClick:()=>{i&&t()},children:o.jsxs("div",{role:"dialog","aria-modal":"true",className:v(K.dialog,Ca(a),p&&K.fullscreen,f&&K.fullscreenOnMobile,u),onClick:m=>m.stopPropagation(),children:[(n||!d)&&o.jsxs("header",{className:K.header,children:[o.jsx("h3",{className:K.title,children:n}),!d&&o.jsx("button",{type:"button",className:K.close,"aria-label":"Fechar",onClick:t,children:o.jsx(Ea,{})})]}),o.jsx("div",{className:K.body,children:s}),r&&o.jsx("footer",{className:K.footer,children:r})]})}),document.body)}function Ca(e){return e==="2xl"?K.size2xl:e==="3xl"?K.size3xl:K[e]}function Ea(){return o.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M6 6l12 12M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}function Ta({open:e,title:t,description:n,confirmLabel:s="Confirmar",cancelLabel:r="Cancelar",variant:a="primary",loading:i=!1,onConfirm:c,onCancel:u}){return o.jsx(en,{open:e,onClose:u,title:t,size:"sm",footer:o.jsxs(o.Fragment,{children:[o.jsx(ot,{variant:"secondary",onClick:u,disabled:i,children:r}),o.jsx(ot,{variant:a,loading:i,onClick:()=>{c()},children:s})]}),children:n})}const Ra="tempest_wrapper_iHNUs",La="tempest_label_-OEBL",Ia="tempest_required_CTss-",Ma="tempest_field_65yGJ",Pa="tempest_input_WjT81",Aa="tempest_sizeSm_cgds6",Da="tempest_sizeMd_EPFGy",Oa="tempest_sizeLg_5Cq8k",Fa="tempest_hasLeftIcon_xYO-v",Ba="tempest_hasRightIcon_C7uyr",za="tempest_iconLeft_KrUhI",Wa="tempest_iconRight_Ssr47",qa="tempest_error_VLISa",Ua="tempest_helper_7Vc-s",Ha="tempest_errorText_xz4xS",D={wrapper:Ra,label:La,required:Ia,field:Ma,input:Pa,sizeSm:Aa,sizeMd:Da,sizeLg:Oa,hasLeftIcon:Fa,hasRightIcon:Ba,iconLeft:za,iconRight:Wa,error:qa,helper:Ua,errorText:Ha},ct=l.forwardRef(function({label:t,helperText:n,error:s,leftIcon:r,rightIcon:a,wrapperClassName:i,className:c,id:u,required:d,size:p="md",...f},m){const h=l.useId(),_=u??h,b=s?`${_}-error`:n?`${_}-helper`:void 0,y=p==="sm"?D.sizeSm:p==="lg"?D.sizeLg:D.sizeMd;return o.jsxs("div",{className:v(D.wrapper,s&&D.error,i),children:[t&&o.jsxs("label",{htmlFor:_,className:D.label,children:[t,d&&o.jsx("span",{className:D.required,children:"*"})]}),o.jsxs("div",{className:D.field,children:[r&&o.jsx("span",{className:D.iconLeft,children:r}),o.jsx("input",{ref:m,id:_,"aria-invalid":!!s,"aria-describedby":b,required:d,className:v(D.input,y,r&&D.hasLeftIcon,a&&D.hasRightIcon,c),...f}),a&&o.jsx("span",{className:D.iconRight,children:a})]}),s?o.jsx("span",{id:`${_}-error`,className:D.errorText,children:s}):n?o.jsx("span",{id:`${_}-helper`,className:D.helper,children:n}):null]})}),Ka=l.forwardRef(function({value:t,onChange:n,mode:s="date",...r},a){return o.jsx(ct,{...r,ref:a,type:s,value:t,onChange:i=>n(i.target.value)})}),Ga="tempest_divider_KSGsi",Ja="tempest_horizontal_pZ05Y",Qa="tempest_bare_elDbS",Va="tempest_vertical_p-jD4",Xa="tempest_dashed_JWxCU",Ya="tempest_alignStart_QAIi1",Za="tempest_alignEnd_eZDwa",q={divider:Ga,horizontal:Ja,bare:Qa,vertical:Va,dashed:Xa,alignStart:Ya,alignEnd:Za};function ei({orientation:e="horizontal",variant:t="solid",label:n,align:s="center",className:r,...a}){return e==="vertical"?o.jsx("span",{role:"separator","aria-orientation":"vertical",className:v(q.divider,q.vertical,t==="dashed"&&q.dashed,r),...a}):n?o.jsx("div",{role:"separator","aria-orientation":"horizontal",className:v(q.divider,q.horizontal,t==="dashed"&&q.dashed,s==="start"&&q.alignStart,s==="end"&&q.alignEnd,r),...a,children:n}):o.jsx("hr",{className:v(q.divider,q.horizontal,q.bare,t==="dashed"&&q.dashed,r)})}const ti="tempest_overlay_hcG1G",ni="tempest_tempest-drawer-overlay_XFbxY",si="tempest_panel_wUX0N",ri="tempest_right_-oX-6",oi="tempest_tempest-drawer-in-right_pWYHv",ai="tempest_left_xi3nD",ii="tempest_tempest-drawer-in-left_o7JSb",ci="tempest_top_7rGCn",li="tempest_tempest-drawer-in-top_kn6AF",ui="tempest_bottom_zd-25",di="tempest_tempest-drawer-in-bottom_0x3u7",pi="tempest_handle_5B-TB",mi="tempest_handleTop_7aMf-",fi="tempest_header_sYoP1",hi="tempest_title_LqUOu",_i="tempest_close_tYPhU",gi="tempest_body_aV9FG",bi="tempest_footer_AuvUP",ne={overlay:ti,tempestDrawerOverlay:ni,panel:si,right:ri,tempestDrawerInRight:oi,left:ai,tempestDrawerInLeft:ii,top:ci,tempestDrawerInTop:li,bottom:ui,tempestDrawerInBottom:di,handle:pi,handleTop:mi,header:fi,title:hi,close:_i,body:gi,footer:bi};function yi({open:e,onClose:t,placement:n="right",title:s,children:r,footer:a,closeOnBackdrop:i=!0,closeOnEsc:c=!0,hideCloseButton:u=!1,className:d,mobilePlacement:p,showHandle:f=!1}){const{isMobile:m}=Ee(),h=m&&p?p:n;return l.useEffect(()=>{if(!e)return;const _=document.body.style.overflow;document.body.style.overflow="hidden";const b=y=>{c&&y.key==="Escape"&&t()};return window.addEventListener("keydown",b),()=>{document.body.style.overflow=_,window.removeEventListener("keydown",b)}},[e,c,t]),!e||typeof document>"u"?null:De.createPortal(o.jsxs(o.Fragment,{children:[o.jsx("div",{className:ne.overlay,onClick:()=>{i&&t()}}),o.jsxs("aside",{role:"dialog","aria-modal":"true",className:v(ne.panel,ne[h],d),children:[f&&(h==="bottom"||h==="top")&&o.jsx("div",{className:v(ne.handle,h==="top"&&ne.handleTop),"aria-hidden":!0}),(s||!u)&&o.jsxs("header",{className:ne.header,children:[o.jsx("h3",{className:ne.title,children:s}),!u&&o.jsx("button",{type:"button","aria-label":"Fechar",className:ne.close,onClick:t,children:o.jsx(wi,{})})]}),o.jsx("div",{className:ne.body,children:r}),a&&o.jsx("footer",{className:ne.footer,children:a})]})]}),document.body)}function wi(){return o.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M6 6l12 12M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}const vi="tempest_root_5ZetV",xi="tempest_menu_-RiRW",ji="tempest_bottomStart_z60h9",$i="tempest_bottomEnd_b1tmU",ki="tempest_topStart_A0em2",Ni="tempest_topEnd_cFA5-",Si="tempest_item_T-QPZ",Ci="tempest_active_WNqoX",Ei="tempest_danger_C0jN3",Ti="tempest_separator_RimQa",Ri="tempest_label_6yP76",ee={root:vi,menu:xi,bottomStart:ji,bottomEnd:$i,topStart:ki,topEnd:Ni,item:Si,active:Ci,danger:Ei,separator:Ti,label:Ri};function Li(e){switch(e){case"bottom-end":return ee.bottomEnd;case"top-start":return ee.topStart;case"top-end":return ee.topEnd;default:return ee.bottomStart}}function Ii({trigger:e,items:t,placement:n="bottom-start",className:s}){const[r,a]=l.useState(!1),[i,c]=l.useState(-1),u=l.useId(),d=l.useRef(null),p=l.useRef([]),f=t.map((y,g)=>y.type==="item"&&!y.disabled?g:-1).filter(y=>y!==-1),m=l.useCallback(()=>{a(!1),c(-1)},[]);l.useEffect(()=>{if(!r)return;const y=w=>{if(w.key==="Escape"){m();return}if(w.key==="ArrowDown"){w.preventDefault();const x=f.indexOf(i),k=f[(x+1)%f.length]??-1;c(k),p.current[k]?.focus()}if(w.key==="ArrowUp"){w.preventDefault();const x=f.indexOf(i),k=f[(x-1+f.length)%f.length]??-1;c(k),p.current[k]?.focus()}},g=w=>{d.current&&!d.current.contains(w.target)&&m()};return window.addEventListener("keydown",y),window.addEventListener("mousedown",g),()=>{window.removeEventListener("keydown",y),window.removeEventListener("mousedown",g)}},[r,i,f,m]);const h=y=>{e.props.onClick?.(y),a(g=>!g)},_={...e,props:{...e.props,onClick:h,"aria-expanded":r,"aria-controls":u,"aria-haspopup":"menu"}},b=y=>{y.onSelect(),m()};return o.jsxs("span",{ref:d,className:ee.root,children:[_,r&&o.jsx("ul",{id:u,role:"menu",className:v(ee.menu,Li(n),s),children:t.map((y,g)=>y.type==="separator"?o.jsx("li",{role:"separator",className:ee.separator,"aria-hidden":!0},y.id):y.type==="label"?o.jsx("li",{role:"presentation",className:ee.label,children:y.label},y.id):o.jsx("li",{role:"none",children:o.jsxs("button",{ref:w=>{p.current[g]=w},type:"button",role:"menuitem",className:v(ee.item,y.danger&&ee.danger,i===g&&ee.active),disabled:y.disabled,onClick:()=>b(y),onMouseEnter:()=>c(g),children:[y.icon&&o.jsx("span",{"aria-hidden":!0,children:y.icon}),y.label]})},y.id))})]})}const Mi="tempest_wrapper_gzyTd",Pi="tempest_icon_qVCyh",Ai="tempest_title_xPfUf",Di="tempest_description_oWwH1",Oi="tempest_action_dqxw1",Fe={wrapper:Mi,icon:Pi,title:Ai,description:Di,action:Oi};function Fi({icon:e,title:t,description:n,action:s,className:r}){return o.jsxs("div",{className:v(Fe.wrapper,r),children:[e&&o.jsx("div",{className:Fe.icon,children:e}),o.jsx("h4",{className:Fe.title,children:t}),n&&o.jsx("p",{className:Fe.description,children:n}),s&&o.jsx("div",{className:Fe.action,children:s})]})}const Bi="tempest_wrapper_luRyF",zi="tempest_icon_dEdBl",Wi="tempest_title_StutD",qi="tempest_description_A2XCb",Ui="tempest_action_vm1LC",Be={wrapper:Bi,icon:zi,title:Wi,description:qi,action:Ui};function Hi({title:e="Algo deu errado",description:t="Não foi possível carregar essas informações.",onRetry:n,retryLabel:s="Tentar novamente",icon:r,className:a}){return o.jsxs("div",{className:v(Be.wrapper,a),children:[o.jsx("div",{className:Be.icon,children:r??o.jsx(Ki,{})}),o.jsx("h4",{className:Be.title,children:e}),t&&o.jsx("p",{className:Be.description,children:t}),n&&o.jsx("div",{className:Be.action,children:o.jsx(ot,{variant:"secondary",onClick:n,children:s})})]})}function Ki(){return o.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M12 9v4m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}const Gi="tempest_wrapper_E0qHs",Ji="tempest_label_lbMkx",Qi="tempest_dropzone_jqua0",Vi="tempest_active_CG9Uk",Xi="tempest_disabled_WNUUl",Yi="tempest_icon_i9fGH",Zi="tempest_title_bTVFl",ec="tempest_subtitle_S54OV",tc="tempest_files_WljYm",nc="tempest_file_Lp-dR",sc="tempest_fileMeta_LTnN2",rc="tempest_remove_jskra",oc="tempest_hidden_ReEq6",z={wrapper:Gi,label:Ji,dropzone:Qi,active:Vi,disabled:Xi,icon:Yi,title:Zi,subtitle:ec,files:tc,file:nc,fileMeta:sc,remove:rc,hidden:oc};function ac(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function ic(e,t){if(!t)return!0;const n=t.split(",").map(a=>a.trim().toLowerCase()),s=e.name.toLowerCase(),r=e.type.toLowerCase();return n.some(a=>a.startsWith(".")?s.endsWith(a):a.endsWith("/*")?r.startsWith(a.replace("/*","/")):r===a)}function cc({value:e,onChange:t,label:n,accept:s,multiple:r=!1,maxSize:a,onReject:i,disabled:c,title:u="Arraste arquivos aqui ou clique para selecionar",subtitle:d,className:p}){const[f,m]=l.useState(!1),h=l.useRef(null);function _(g){const w=[],x=[];for(const T of Array.from(g)){if(!ic(T,s)){x.push({file:T,reason:"type"});continue}if(a&&T.size>a){x.push({file:T,reason:"size"});continue}w.push(T)}if(x.length>0&&i?.(x),w.length===0)return;const k=r?[...e,...w]:w.slice(0,1);t(k)}function b(g){g.preventDefault(),m(!1),!c&&g.dataTransfer?.files&&_(g.dataTransfer.files)}function y(g){const w=e.slice();w.splice(g,1),t(w)}return o.jsxs("div",{className:v(z.wrapper,p),children:[n&&o.jsx("label",{className:z.label,children:n}),o.jsxs("div",{className:v(z.dropzone,f&&z.active,c&&z.disabled),role:"button",tabIndex:c?-1:0,onClick:()=>!c&&h.current?.click(),onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),h.current?.click())},onDragEnter:g=>{g.preventDefault(),c||m(!0)},onDragOver:g=>g.preventDefault(),onDragLeave:()=>m(!1),onDrop:b,children:[o.jsx("div",{className:z.icon,"aria-hidden":!0,children:o.jsx(lc,{})}),o.jsx("p",{className:z.title,children:u}),d&&o.jsx("p",{className:z.subtitle,children:d}),o.jsx("input",{ref:h,type:"file",accept:s,multiple:r,disabled:c,className:z.hidden,onChange:g=>{g.target.files&&_(g.target.files),g.target.value=""}})]}),e.length>0&&o.jsx("ul",{className:z.files,children:e.map((g,w)=>o.jsxs("li",{className:z.file,children:[o.jsxs("div",{children:[o.jsx("div",{children:g.name}),o.jsx("div",{className:z.fileMeta,children:ac(g.size)})]}),o.jsx("button",{type:"button","aria-label":`Remover ${g.name}`,className:z.remove,onClick:()=>y(w),children:"×"})]},`${g.name}-${w}`))})]})}function lc(){return o.jsx("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M12 16V4m0 0l-4 4m4-4l4 4M4 20h16",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}const uc="tempest_form_jNBDR",dc="tempest_stack_O1Hl-",pc="tempest_inline_LBQAv",mc="tempest_grid_-B86T",fc="tempest_section_HGqw3",hc="tempest_sectionHeader_ji9hQ",_c="tempest_sectionTitle_GTPwe",gc="tempest_sectionDescription_KjW7k",bc="tempest_sectionBody_Vp2wz",yc="tempest_row_1EkVR",wc="tempest_actions_hK95I",vc="tempest_start_gXnm3",xc="tempest_center_mKkz4",jc="tempest_end_O3yDQ",$c="tempest_between_tte2z",te={form:uc,stack:dc,inline:pc,grid:mc,section:fc,sectionHeader:hc,sectionTitle:_c,sectionDescription:gc,sectionBody:bc,row:yc,actions:wc,start:vc,center:xc,end:jc,between:$c};function lt(e,t){return e===void 0?`${t*4}px`:typeof e=="number"?`${e*4}px`:e}function tn(e){return e===void 0?"repeat(2, minmax(0, 1fr))":typeof e=="number"?`repeat(${e}, minmax(0, 1fr))`:e}const kc=l.forwardRef(function({layout:t="stack",columns:n,gap:s,className:r,style:a,children:i,...c},u){const d={gap:lt(s,4),...t==="grid"?{gridTemplateColumns:tn(n)}:null,...a};return o.jsx("form",{ref:u,className:v(te.form,te[t],r),style:d,...c,children:i})});function Nc({title:e,description:t,layout:n="stack",columns:s,gap:r,className:a,style:i,children:c,...u}){const d={gap:lt(r,4),...n==="grid"?{gridTemplateColumns:tn(s)}:null};return o.jsxs("section",{className:v(te.section,a),style:i,...u,children:[(e||t)&&o.jsxs("header",{className:te.sectionHeader,children:[e&&o.jsx("h3",{className:te.sectionTitle,children:e}),t&&o.jsx("p",{className:te.sectionDescription,children:t})]}),o.jsx("div",{className:v(te.sectionBody,te[n]),style:d,children:c})]})}function Sc({gap:e,className:t,style:n,children:s,...r}){const a={gap:lt(e,3),...n};return o.jsx("div",{className:v(te.row,t),style:a,...r,children:s})}function Cc({align:e="end",gap:t,className:n,style:s,children:r,...a}){const i={gap:lt(t,2),...s};return o.jsx("div",{className:v(te.actions,te[e],n),style:i,...a,children:r})}const Ec="tempest_container_fJfOt",Tc="tempest_sm_k8D4-",Rc="tempest_md_EnpYy",Lc="tempest_lg_UU-Ig",Ic="tempest_xl_2TEWj",Mc="tempest_full_l8bvG",Pc="tempest_stack_sxR8u",Ac="tempest_vertical_2TMf5",Dc="tempest_horizontal_r7-c-",Oc="tempest_center_EDSAh",Fc="tempest_start_ucQ-K",Bc="tempest_end_pnKlF",zc="tempest_stretch_pX6l7",Wc="tempest_justifyStart_lHYsS",qc="tempest_justifyCenter_JH2m6",Uc="tempest_justifyEnd_EBisT",Hc="tempest_justifyBetween_mAJwT",Kc="tempest_wrap_-xxOh",Gc="tempest_grid_o-JIX",G={container:Ec,sm:Tc,md:Rc,lg:Lc,xl:Ic,full:Mc,stack:Pc,vertical:Ac,horizontal:Dc,center:Oc,start:Fc,end:Bc,stretch:zc,justifyStart:Wc,justifyCenter:qc,justifyEnd:Uc,justifyBetween:Hc,wrap:Kc,grid:Gc};function Jc({size:e="lg",className:t,children:n,...s}){return o.jsx("div",{className:v(G.container,G[e],t),...s,children:n})}function Qc(e){return typeof e=="object"&&e!==null&&("mobile"in e||"tablet"in e||"desktop"in e)}function at(e,t){if(e!==void 0)return Qc(e)?t==="desktop"?e.desktop??e.tablet??e.mobile:t==="tablet"?e.tablet??e.mobile??e.desktop:e.mobile??e.tablet??e.desktop:e}function nn(e){if(e!==void 0)return typeof e=="number"?`${e*4}px`:e}function sn(e,t){return e?"mobile":t?"tablet":"desktop"}function Vc({direction:e="vertical",gap:t=2,align:n,justify:s,wrap:r=!1,className:a,style:i,children:c,...u}){const{isMobile:d,isTablet:p}=Ee(),f=sn(d,p),m=at(e,f)??"vertical",_={gap:nn(at(t,f)),...i},b=s==="between"?G.justifyBetween:s==="center"?G.justifyCenter:s==="end"?G.justifyEnd:s==="start"?G.justifyStart:void 0;return o.jsx("div",{className:v(G.stack,m==="vertical"?G.vertical:G.horizontal,n&&G[n],b,r&&G.wrap,a),style:_,...u,children:c})}function Xc(e){if(e!==void 0)return typeof e=="number"?`repeat(${e}, minmax(0, 1fr))`:e}function Yc({columns:e=2,gap:t=4,className:n,style:s,children:r,...a}){const{isMobile:i,isTablet:c}=Ee(),u=sn(i,c),d=Xc(at(e,u)),p=nn(at(t,u));return o.jsx("div",{className:v(G.grid,n),style:{gridTemplateColumns:d,gap:p,...s},...a,children:r})}const Zc="tempest_kbd_jgbYx",el="tempest_sm_9WPWA",tl="tempest_md_BePC0",nl="tempest_lg_cBKum",Lt={kbd:Zc,sm:el,md:tl,lg:nl};function sl({size:e="md",className:t,children:n,...s}){return o.jsx("kbd",{className:v(Lt.kbd,Lt[e],t),...s,children:n})}const rl="tempest_navbar_Ey25T",ol="tempest_surface_xyKhM",al="tempest_primary_w3ft-",il="tempest_transparent_N1vMR",cl="tempest_bordered_HD49R",ll="tempest_sticky_0XsOs",ul="tempest_logo_O9j3q",dl="tempest_nav_0oisE",pl="tempest_actions_8BNWJ",ke={navbar:rl,surface:ol,primary:al,transparent:il,bordered:cl,sticky:ll,logo:ul,nav:dl,actions:pl};function ml({logo:e,nav:t,actions:n,sticky:s=!0,tone:r="surface",bordered:a=!0,className:i,...c}){return o.jsxs("header",{className:v(ke.navbar,ke[r],s&&ke.sticky,a&&ke.bordered,i),...c,children:[e&&o.jsx("div",{className:ke.logo,children:e}),t&&o.jsx("nav",{className:ke.nav,children:t}),n&&o.jsx("div",{className:ke.actions,children:n})]})}const fl="tempest_page_THNNc",hl="tempest_padded_bzjoF",_l="tempest_header_PZEzk",gl="tempest_headerText_qYXFI",bl="tempest_eyebrow_651RV",yl="tempest_title_2oGnT",wl="tempest_description_YzmWl",vl="tempest_actions_-rB3U",xl="tempest_toolbar_sA7sD",jl="tempest_content_RCB4b",$l="tempest_footer_540pQ",V={page:fl,padded:hl,header:_l,headerText:gl,eyebrow:bl,title:yl,description:wl,actions:vl,toolbar:xl,content:jl,footer:$l};function kl({title:e,eyebrow:t,description:n,actions:s,toolbar:r,footer:a,padded:i=!0,className:c,children:u,...d}){const p=e||t||n||s;return o.jsxs("main",{className:v(V.page,i&&V.padded,c),...d,children:[p&&o.jsxs("header",{className:V.header,children:[o.jsxs("div",{className:V.headerText,children:[t&&o.jsx("div",{className:V.eyebrow,children:t}),e&&o.jsx("h1",{className:V.title,children:e}),n&&o.jsx("p",{className:V.description,children:n})]}),s&&o.jsx("div",{className:V.actions,children:s})]}),r&&o.jsx("div",{className:V.toolbar,children:r}),o.jsx("div",{className:V.content,children:u}),a&&o.jsx("footer",{className:V.footer,children:a})]})}const Nl="tempest_wrapper_cRGQm",Sl="tempest_controls_fdL-y",Cl="tempest_page_WjG0l",El="tempest_active_1kqsJ",Tl="tempest_ellipsis_V294k",Rl="tempest_sizeSelect_ZayTo",Ll="tempest_numeric_ztI0I",Il="tempest_summary_ZTggV",X={wrapper:Nl,controls:Sl,page:Cl,active:El,ellipsis:Tl,sizeSelect:Rl,numeric:Ll,summary:Il};function Ml(e,t,n){const s=n+4;if(t<=s)return Array.from({length:t},(c,u)=>u+1);const r=Math.max(2,e-Math.floor(n/2)),a=Math.min(t-1,r+n-1),i=[1];r>2&&i.push("...");for(let c=r;c<=a;c++)i.push(c);return a<t-1&&i.push("..."),i.push(t),i}function rn({page:e,totalPages:t,onPageChange:n,pageSize:s,onPageSizeChange:r,pageSizeOptions:a=[10,25,50,100],totalItems:i,siblingCount:c=3,className:u}){const d=l.useMemo(()=>Ml(e,t,c),[e,t,c]);return t<=1&&!r?null:o.jsxs("div",{className:v(X.wrapper,u),children:[o.jsx("div",{className:X.summary,children:typeof i=="number"?`${i} resultado${i===1?"":"s"}`:`Página ${e} de ${t}`}),o.jsxs("div",{className:X.controls,children:[o.jsx("button",{type:"button",className:X.page,onClick:()=>n(Math.max(1,e-1)),disabled:e<=1,"aria-label":"Página anterior",children:"‹"}),d.map((p,f)=>p==="..."?o.jsx("span",{className:v(X.ellipsis,X.numeric),children:"…"},`ellipsis-${f}`):o.jsx("button",{type:"button",className:v(X.page,X.numeric,p===e&&X.active),onClick:()=>n(p),"aria-current":p===e?"page":void 0,children:p},p)),o.jsx("button",{type:"button",className:X.page,onClick:()=>n(Math.min(t,e+1)),disabled:e>=t,"aria-label":"Próxima página",children:"›"}),r&&o.jsx("select",{className:X.sizeSelect,value:s,onChange:p=>r(Number(p.target.value)),"aria-label":"Itens por página",children:a.map(p=>o.jsxs("option",{value:p,children:[p," / página"]},p))})]})]})}const Pl="tempest_wrapper_zEU-L",Al="tempest_label_ps3gD",Dl="tempest_field_7taZG",Ol="tempest_input_FWEvb",Fl="tempest_sm_3-CZz",Bl="tempest_md_ReV0O",zl="tempest_lg_DiTiB",Wl="tempest_toggle_WNeX9",ql="tempest_error_QdIFf",Ul="tempest_helper_mBUna",Hl="tempest_errorText_73Uvv",Kl="tempest_strength_i6RaQ",Gl="tempest_strengthBar_PAPHR",Jl="tempest_strengthLabel_u9QHS",Ql="tempest_level0_n6tWv",Vl="tempest_level1_FOI93",Xl="tempest_level2_q5Wii",Yl="tempest_level3_BpB53",Zl="tempest_level4_vyQ3x",W={wrapper:Pl,label:Al,field:Dl,input:Ol,sm:Fl,md:Bl,lg:zl,toggle:Wl,error:ql,helper:Ul,errorText:Hl,strength:Kl,strengthBar:Gl,strengthLabel:Jl,level0:Ql,level1:Vl,level2:Xl,level3:Yl,level4:Zl},eu=["Muito fraca","Fraca","Razoável","Forte","Excelente"];function on(e){if(!e)return 0;let t=0;return e.length>=8&&(t+=1),e.length>=12&&(t+=1),/[a-z]/.test(e)&&/[A-Z]/.test(e)&&(t+=1),/[0-9]/.test(e)&&(t+=1),/[^A-Za-z0-9]/.test(e)&&(t+=1),Math.min(4,t)}const tu=l.forwardRef(function({label:t,helperText:n,error:s,size:r="md",showStrength:a=!1,strength:i,strengthLabels:c=eu,toggleLabels:u={show:"Mostrar senha",hide:"Esconder senha"},className:d,value:p,defaultValue:f,...m},h){const[_,b]=l.useState(!1),y=String(p??f??""),g=i??on(y);return o.jsxs("div",{className:v(W.wrapper,W[r],s&&W.error,d),children:[t&&o.jsx("label",{className:W.label,children:t}),o.jsxs("div",{className:W.field,children:[o.jsx("input",{ref:h,...m,value:p,defaultValue:f,type:_?"text":"password","aria-invalid":!!s,className:W.input}),o.jsx("button",{type:"button",className:W.toggle,"aria-label":_?u.hide:u.show,"aria-pressed":_,onClick:()=>b(w=>!w),children:_?"🙈":"👁"})]}),a&&o.jsxs("div",{className:v(W.strength,W[`level${g}`]),"aria-label":c[g],children:[o.jsx("div",{className:W.strengthBar,children:o.jsx("span",{style:{width:`${g/4*100}%`}})}),o.jsx("span",{className:W.strengthLabel,children:c[g]})]}),s?o.jsx("span",{className:W.errorText,children:s}):n?o.jsx("span",{className:W.helper,children:n}):null]})}),nu="tempest_wrapper_3WAh7",su="tempest_label_Hk01i",ru="tempest_cells_URO3v",ou="tempest_cell_fxLzs",au="tempest_sm_SQM-s",iu="tempest_md_aHCGl",cu="tempest_lg_JpI4A",lu="tempest_error_Kou0o",uu="tempest_helper_W04iL",du="tempest_errorText_h4svq",ge={wrapper:nu,label:su,cells:ru,cell:ou,sm:au,md:iu,lg:cu,error:lu,helper:uu,errorText:du},pu=/[0-9]/,mu=/[A-Za-z0-9]/,fu=l.forwardRef(function({length:t=6,type:n="numeric",size:s="md",value:r,defaultValue:a,onChange:i,onComplete:c,masked:u=!1,label:d,helperText:p,error:f,disabled:m=!1,autoFocus:h=!1,id:_,className:b},y){const g=l.useId(),w=_??g,x=r!==void 0,[k,T]=l.useState(a??""),M=x?r??"":k,P=Array.from({length:t},(R,E)=>M[E]??""),$=l.useRef([]),j=n==="numeric"?pu:mu;l.useEffect(()=>{h&&$.current[0]?.focus()},[h]);const S=R=>{const E=R.slice(0,t);x||T(E),i?.(E),E.length===t&&c?.(E)},L=R=>{const E=Math.max(0,Math.min(t-1,R));$.current[E]?.focus(),$.current[E]?.select()},N=R=>E=>{const F=E.target.value.slice(-1);if(F&&!j.test(F))return;const Je=P.slice();Je[R]=F,S(Je.join("")),F&&L(R+1)},C=R=>E=>{if(E.key==="Backspace"){if(!P[R]&&R>0){E.preventDefault();const F=P.slice();F[R-1]="",S(F.join("")),L(R-1)}}else E.key==="ArrowLeft"?(E.preventDefault(),L(R-1)):E.key==="ArrowRight"&&(E.preventDefault(),L(R+1))},ae=R=>{const E=R.clipboardData.getData("text").split("").filter(F=>j.test(F)).join("");E&&(R.preventDefault(),S(E),L(Math.min(t-1,E.length)))};return o.jsxs("div",{ref:y,className:v(ge.wrapper,f&&ge.error,b),id:w,children:[d&&o.jsx("label",{className:ge.label,children:d}),o.jsx("div",{className:v(ge.cells,ge[s]),role:"group","aria-label":d,children:P.map((R,E)=>o.jsx("input",{ref:F=>{$.current[E]=F},type:u?"password":"text",inputMode:n==="numeric"?"numeric":"text",autoComplete:E===0?"one-time-code":"off",maxLength:1,value:R,disabled:m,className:ge.cell,"aria-label":`Dígito ${E+1}`,"aria-invalid":!!f,onChange:N(E),onKeyDown:C(E),onPaste:ae},E))}),f?o.jsx("span",{className:ge.errorText,children:f}):p?o.jsx("span",{className:ge.helper,children:p}):null]})}),hu="tempest_root_vEMon",_u="tempest_popover_E9K9X",gu="tempest_tempest-popover-in_W8miP",bu="tempest_top_TYlrh",yu="tempest_bottom_wGs70",wu="tempest_left_h7fCr",vu="tempest_right_--bJW",dt={root:hu,popover:_u,tempestPopoverIn:gu,top:bu,bottom:yu,left:wu,right:vu};function xu({trigger:e,children:t,placement:n="bottom",open:s,onOpenChange:r,defaultOpen:a=!1,closeOnEsc:i=!0,closeOnOutsideClick:c=!0,className:u}){const d=s!==void 0,[p,f]=l.useState(a),m=d?s:p,h=l.useId(),_=l.useRef(null),b=l.useCallback(w=>{d||f(w),r?.(w)},[d,r]);l.useEffect(()=>{if(!m)return;const w=k=>{i&&k.key==="Escape"&&b(!1)},x=k=>{c&&_.current&&!_.current.contains(k.target)&&b(!1)};return window.addEventListener("keydown",w),window.addEventListener("mousedown",x),()=>{window.removeEventListener("keydown",w),window.removeEventListener("mousedown",x)}},[m,i,c,b]);const y=w=>{e.props.onClick?.(w),b(!m)},g={...e,props:{...e.props,onClick:y,"aria-expanded":m,"aria-controls":h}};return o.jsxs("span",{ref:_,className:dt.root,children:[g,m&&o.jsx("div",{id:h,role:"dialog",className:v(dt.popover,dt[n],u),children:t})]})}const ju="tempest_wrapper_BQek1",$u="tempest_bar_uC-0x",ku="tempest_fill_vmg7x",Nu="tempest_success_gWJ8U",Su="tempest_warning_DGkPO",Cu="tempest_danger_gfwHh",Eu="tempest_indeterminate_HojUj",Tu="tempest_tempest-progress-loop_0nEdF",Ru="tempest_label_qqHJM",Re={wrapper:ju,bar:$u,fill:ku,success:Nu,warning:Su,danger:Cu,indeterminate:Eu,tempestProgressLoop:Tu,label:Ru};function Lu({value:e=0,max:t=100,variant:n="primary",indeterminate:s=!1,showLabel:r=!1,label:a,className:i}){const c=s?0:Math.max(0,Math.min(100,e/t*100));return o.jsxs("div",{className:v(Re.wrapper,i),children:[(r||a)&&o.jsxs("div",{className:Re.label,children:[a&&o.jsx("span",{children:a}),r&&!s&&o.jsxs("span",{children:[Math.round(c),"%"]})]}),o.jsx("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":s?void 0:e,className:v(Re.bar,s&&Re.indeterminate),children:o.jsx("div",{className:v(Re.fill,n!=="primary"&&Re[n]),style:{width:s?void 0:`${c}%`}})})]})}const Iu="tempest_wrapper_P-gFm",Mu="tempest_disabled_0-cna",Pu="tempest_input_7R8ZN",Au="tempest_dot_P7ejP",Du="tempest_labelWrap_iQ1HR",Ou="tempest_label_vAFIP",Fu="tempest_description_bEB8u",Bu="tempest_group_oi329",zu="tempest_horizontal_1Ovgu",he={wrapper:Iu,disabled:Mu,input:Pu,dot:Au,labelWrap:Du,label:Ou,description:Fu,group:Bu,horizontal:zu},an=l.createContext(null),Wu=l.forwardRef(function({label:t,description:n,value:s,disabled:r,name:a,checked:i,onChange:c,wrapperClassName:u,className:d,...p},f){const m=l.useContext(an),h=m?.name??a,_=m?.disabled??r,b=m?m.value===s:i;function y(g){m&&m.onChange?.(s),c?.(g)}return o.jsxs("label",{className:v(he.wrapper,_&&he.disabled,u),children:[o.jsx("input",{ref:f,type:"radio",name:h,value:s,checked:b,disabled:_,onChange:y,className:v(he.input,d),...p}),o.jsx("span",{className:he.dot,"aria-hidden":!0}),(t||n)&&o.jsxs("span",{className:he.labelWrap,children:[t&&o.jsx("span",{className:he.label,children:t}),n&&o.jsx("span",{className:he.description,children:n})]})]})});function qu({value:e,defaultValue:t,onChange:n,name:s,disabled:r,horizontal:a=!1,className:i,children:c}){const u=l.useId(),d=s??u,[p,f]=l.useState(t),m=e!==void 0,h=m?e:p;function _(b){m||f(b),n?.(b)}return o.jsx(an.Provider,{value:{name:d,value:h,onChange:_,disabled:r},children:o.jsx("div",{role:"radiogroup",className:v(he.group,a&&he.horizontal,i),children:c})})}const Uu="tempest_wrapper_o1aOo",Hu="tempest_label_jaBOA",Ku="tempest_value_GKfOu",Gu="tempest_field_YxCzt",Ju="tempest_track_j-2iy",Qu="tempest_fill_1pbqj",Vu="tempest_input_1MASw",Xu="tempest_helper_uqxKu",ue={wrapper:Uu,label:Hu,value:Ku,field:Gu,track:Ju,fill:Qu,input:Vu,helper:Xu};function Yu({value:e,onChange:t,min:n=0,max:s=100,step:r=1,label:a,helperText:i,disabled:c=!1,formatValue:u,className:d}){const[p,f]=e,m=s-n,h=l.useMemo(()=>(p-n)/m*100,[p,n,m]),_=l.useMemo(()=>(f-n)/m*100,[f,n,m]),b=u?.(e)??`${p} – ${f}`,y=l.useCallback(w=>{const x=Math.min(Number(w.target.value),f);t([x,f])},[f,t]),g=l.useCallback(w=>{const x=Math.max(Number(w.target.value),p);t([p,x])},[p,t]);return o.jsxs("div",{className:v(ue.wrapper,d),children:[a&&o.jsxs("div",{className:ue.label,children:[o.jsx("span",{children:a}),o.jsx("span",{className:ue.value,children:b})]}),o.jsxs("div",{className:ue.field,children:[o.jsx("div",{className:ue.track}),o.jsx("div",{className:ue.fill,style:{left:`${h}%`,right:`${100-_}%`}}),o.jsx("input",{type:"range",className:ue.input,min:n,max:s,step:r,value:p,onChange:y,disabled:c,"aria-label":a?`${a} (mínimo)`:"Mínimo"}),o.jsx("input",{type:"range",className:ue.input,min:n,max:s,step:r,value:f,onChange:g,disabled:c,"aria-label":a?`${a} (máximo)`:"Máximo"})]}),i&&o.jsx("span",{className:ue.helper,children:i})]})}const Zu="tempest_wrapper_K9Mqa",ed="tempest_star_goIGS",td="tempest_filled_mMs-d",nd="tempest_disabled_tyUlQ",sd="tempest_readonly_bnKLN",rd="tempest_sm_K7-y9",od="tempest_md_ex2Tb",ad="tempest_lg_TstLJ",Le={wrapper:Zu,star:ed,filled:td,disabled:nd,readonly:sd,sm:rd,md:od,lg:ad};function id({value:e,max:t=5,onChange:n,size:s="md",readonly:r=!1,disabled:a=!1,label:i="Avaliação",className:c}){const[u,d]=l.useState(0),p=u>0?u:e,f=m=>{r||a||n?.(m)};return o.jsx("span",{role:"radiogroup","aria-label":i,className:v(Le.wrapper,Le[s],a&&Le.disabled,r&&Le.readonly,c),onMouseLeave:()=>d(0),children:Array.from({length:t},(m,h)=>{const _=h+1,b=_<=p;return o.jsx("button",{type:"button",role:"radio","aria-checked":e===_,"aria-label":`${_} ${_===1?"estrela":"estrelas"}`,className:v(Le.star,b&&Le.filled),disabled:a,onMouseEnter:()=>!r&&!a&&d(_),onClick:()=>f(_),children:o.jsx(cd,{filled:b})},_)})})}function cd({filled:e}){return o.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:e?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round","aria-hidden":!0,children:o.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.56 5.82 22 7 14.14 2 9.27l6.91-1.01L12 2z"})})}function cn(e,t,n,s,r){return s?(Array.isArray(s)?s:[s]).includes(e):!(t&&!r.above(t)||n&&!r.below(n))}function ld({above:e,below:t,only:n,children:s}){const r=Ee();return cn(r.current,e,t,n,r)?s:null}function ud({above:e,below:t,only:n,children:s}){const r=Ee();return cn(r.current,e,t,n,r)?null:s}const dd="tempest_safe_iqDFY",pd="tempest_inline_V9eMG",md="tempest_top_Xse9E",fd="tempest_right_GZm9b",hd="tempest_bottom_kkyD7",_d="tempest_left_Z4Q72",Ie={safe:dd,inline:pd,top:md,right:fd,bottom:hd,left:_d},gd=["top","right","bottom","left"];function bd({edges:e=gd,inline:t=!1,className:n,children:s,...r}){return o.jsx("div",{className:v(Ie.safe,t&&Ie.inline,e.includes("top")&&Ie.top,e.includes("right")&&Ie.right,e.includes("bottom")&&Ie.bottom,e.includes("left")&&Ie.left,n),"data-edges":e.join(" "),...r,children:s})}const yd="tempest_wrapper_dKXJJ",wd="tempest_input_m0lPc",vd="tempest_iconLeft_030-U",xd="tempest_clear_nb6lG",Qe={wrapper:yd,input:wd,iconLeft:vd,clear:xd},ln=l.forwardRef(function({value:t,onChange:n,onClear:s,wrapperClassName:r,placeholder:a="Buscar...",className:i,...c},u){function d(){n(""),s?.()}return o.jsxs("div",{className:v(Qe.wrapper,r),children:[o.jsx("span",{className:Qe.iconLeft,"aria-hidden":!0,children:o.jsx(jd,{})}),o.jsx("input",{ref:u,type:"search",value:t,onChange:p=>n(p.target.value),placeholder:a,className:v(Qe.input,i),...c}),t&&o.jsx("button",{type:"button",className:Qe.clear,"aria-label":"Limpar busca",onClick:d,children:o.jsx($d,{})})]})});function jd(){return o.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:[o.jsx("circle",{cx:"11",cy:"11",r:"7",stroke:"currentColor",strokeWidth:"2"}),o.jsx("path",{d:"M20 20l-3.5-3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function $d(){return o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M6 6l12 12M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}const kd="tempest_group_mYyFC",Nd="tempest_fullWidth_unSMm",Sd="tempest_segment_cu-EL",Cd="tempest_sm_CfD41",Ed="tempest_md_2ixuM",Td="tempest_lg_2Kt7-",Rd="tempest_active_GmyKg",Ld="tempest_icon_9h6GK",Id="tempest_label_mS17q",Ne={group:kd,fullWidth:Nd,segment:Sd,sm:Cd,md:Ed,lg:Td,active:Rd,icon:Ld,label:Id};function Md({options:e,value:t,onChange:n,size:s="md",fullWidth:r=!1,className:a,"aria-label":i,...c}){return o.jsx("div",{role:"radiogroup","aria-label":i,className:v(Ne.group,Ne[s],r&&Ne.fullWidth,a),...c,children:e.map(u=>{const d=u.value===t;return o.jsxs("button",{type:"button",role:"radio","aria-checked":d,disabled:u.disabled,className:v(Ne.segment,d&&Ne.active),onClick:()=>n(u.value),children:[u.icon&&o.jsx("span",{className:Ne.icon,children:u.icon}),o.jsx("span",{className:Ne.label,children:u.label})]},u.value)})})}const Pd="tempest_wrapper_KS2K3",Ad="tempest_label_Lmgos",Dd="tempest_required_PvDVJ",Od="tempest_field_h-wBy",Fd="tempest_select_cjdcr",Bd="tempest_caret_MdCao",zd="tempest_error_sw9MU",Wd="tempest_helper_frosK",qd="tempest_errorText_-zd6i",de={wrapper:Pd,label:Ad,required:Dd,field:Od,select:Fd,caret:Bd,error:zd,helper:Wd,errorText:qd},Ud=l.forwardRef(function({label:t,helperText:n,error:s,options:r,placeholder:a,wrapperClassName:i,className:c,children:u,id:d,required:p,...f},m){const h=l.useId(),_=d??h;return o.jsxs("div",{className:v(de.wrapper,s&&de.error,i),children:[t&&o.jsxs("label",{htmlFor:_,className:de.label,children:[t,p&&o.jsx("span",{className:de.required,children:"*"})]}),o.jsxs("div",{className:de.field,children:[o.jsxs("select",{ref:m,id:_,"aria-invalid":!!s,required:p,className:v(de.select,c),...f,children:[a&&o.jsx("option",{value:"",disabled:!0,hidden:!0,children:a}),r?.map(b=>o.jsx("option",{value:b.value,disabled:b.disabled,children:b.label},b.value)),u]}),o.jsx("span",{className:de.caret,"aria-hidden":!0,children:o.jsx(Hd,{})})]}),s?o.jsx("span",{className:de.errorText,children:s}):n?o.jsx("span",{className:de.helper,children:n}):null]})});function Hd(){return o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M6 9l6 6 6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}const Kd="tempest_sidebar_UB1qz",Gd="tempest_header_zupoS",Jd="tempest_nav_aLYuL",Qd="tempest_item_IAjHb",Vd="tempest_collapsed_ZbZYA",Xd="tempest_active_BgcFy",Yd="tempest_icon_UQswn",Zd="tempest_label_TPvJ9",ep="tempest_badge_xwEZv",tp="tempest_footer_TyRyi",se={sidebar:Kd,header:Gd,nav:Jd,item:Qd,collapsed:Vd,active:Xd,icon:Yd,label:Zd,badge:ep,footer:tp};function np({header:e,items:t,value:n,onChange:s,footer:r,collapsed:a=!1,width:i=240,collapsedWidth:c=64,className:u,style:d,...p}){const f=typeof(a?c:i)=="number"?`${a?c:i}px`:a?c:i;return o.jsxs("aside",{className:v(se.sidebar,a&&se.collapsed,u),style:{width:f,...d},...p,children:[e&&o.jsx("div",{className:se.header,children:e}),o.jsx("nav",{className:se.nav,"aria-label":"Navegação lateral",children:t.map(m=>{const h=m.key===n;return o.jsxs("button",{type:"button",className:v(se.item,h&&se.active),"aria-current":h?"page":void 0,disabled:m.disabled,onClick:()=>s?.(m.key),title:a&&typeof m.label=="string"?m.label:void 0,children:[m.icon&&o.jsx("span",{className:se.icon,children:m.icon}),!a&&o.jsx("span",{className:se.label,children:m.label}),!a&&m.badge!==void 0&&o.jsx("span",{className:se.badge,children:m.badge})]},m.key)})}),r&&o.jsx("div",{className:se.footer,children:r})]})}const sp="tempest_skeleton_CB4uF",rp="tempest_text_-A8IF",op="tempest_circle_DYcl8",pt={skeleton:sp,text:rp,circle:op};function ap({variant:e="rect",width:t,height:n,className:s,style:r}){return o.jsx("span",{"aria-hidden":!0,className:v(pt.skeleton,e==="text"&&pt.text,e==="circle"&&pt.circle,s),style:{width:t,height:n,...r}})}const ip="tempest_spacer_okdOd",cp="tempest_both_85qSF",lp="tempest_x_QiU2B",up="tempest_y_hTtCp",It={spacer:ip,both:cp,x:lp,y:up};function dp({axis:e="both",className:t,...n}){return o.jsx("div",{className:v(It.spacer,It[e],t),...n})}const pp="tempest_spinner_GpFZS",mp="tempest_tempest-spinner_wKVCY",fp="tempest_xs_p8BFI",hp="tempest_sm_3sIoD",_p="tempest_md_M2sPj",gp="tempest_lg_IxTw2",bp="tempest_xl_cgwqq",Mt={spinner:pp,tempestSpinner:mp,xs:fp,sm:hp,md:_p,lg:gp,xl:bp};function yp({size:e="md",className:t,label:n="Carregando"}){return o.jsx("span",{role:"status","aria-label":n,className:v(Mt.spinner,Mt[e],t)})}const wp="tempest_stat_zoo9y",vp="tempest_header_3UQqq",xp="tempest_icon_zUG3e",jp="tempest_label_lIH47",$p="tempest_row_Ifyts",kp="tempest_value_JBWnr",Np="tempest_delta_mRVrE",Sp="tempest_up_7qgUO",Cp="tempest_down_3Rq2Z",Ep="tempest_flat_R5pZT",Tp="tempest_hint_YkTF8",Y={stat:wp,header:vp,icon:xp,label:jp,row:$p,value:kp,delta:Np,up:Sp,down:Cp,flat:Ep,hint:Tp};function Rp(e){if(typeof e!="string")return;const t=e.trim();if(t.startsWith("+"))return"up";if(t.startsWith("-")||t.startsWith("−"))return"down"}function Lp({label:e,value:t,delta:n,trend:s,hint:r,icon:a,className:i,...c}){const u=s??Rp(n);return o.jsxs("div",{className:v(Y.stat,i),...c,children:[o.jsxs("div",{className:Y.header,children:[a&&o.jsx("span",{className:Y.icon,children:a}),o.jsx("span",{className:Y.label,children:e})]}),o.jsxs("div",{className:Y.row,children:[o.jsx("span",{className:Y.value,children:t}),n!==void 0&&o.jsx("span",{className:v(Y.delta,u==="up"&&Y.up,u==="down"&&Y.down,u==="flat"&&Y.flat),children:n})]}),r&&o.jsx("p",{className:Y.hint,children:r})]})}const Ip="tempest_stepper_w3qjQ",Mp="tempest_vertical_d4mOs",Pp="tempest_step_s2nqL",Ap="tempest_dot_d1bSL",Dp="tempest_completed_gcFHM",Op="tempest_active_kL-CH",Fp="tempest_label_8irAI",Bp="tempest_connector_lyeWp",pe={stepper:Ip,vertical:Mp,step:Pp,dot:Ap,completed:Dp,active:Op,label:Fp,connector:Bp};function zp({steps:e,current:t,orientation:n="horizontal",className:s}){return o.jsx("ol",{className:v(pe.stepper,n==="vertical"&&pe.vertical,s),children:e.map((r,a)=>{const i=a<t,c=a===t;return o.jsxs(l.Fragment,{children:[o.jsxs("li",{className:v(pe.step,i&&pe.completed,c&&pe.active),"aria-current":c?"step":void 0,children:[o.jsx("span",{className:pe.dot,children:i?"✓":a+1}),o.jsx("span",{className:pe.label,children:r.label})]}),a<e.length-1&&o.jsx("span",{className:v(pe.connector,i&&pe.completed),"aria-hidden":!0})]},a)})})}function wt(e,t,n){if(Number.isNaN(e))return e;if(t>n){const s=t;t=n,n=s}return e<t?t:e>n?n:e}function Wp(e,t=1){if(e===0)return"0 B";const n=["B","KB","MB","GB","TB"],s=1024,r=Math.min(Math.floor(Math.log(Math.abs(e))/Math.log(s)),n.length-1),a=e/s**r,i=r===0?0:Math.max(0,t);return`${parseFloat(a.toFixed(i)).toString()} ${n[r]}`}function qp(e,t="en-US"){return new Intl.NumberFormat(t,{notation:"compact",maximumFractionDigits:1}).format(e)}const Up="tempest_wrapper_JNjXK",Hp="tempest_label_9XKNm",Kp="tempest_row_cOARX",Gp="tempest_sm_RzVSU",Jp="tempest_md_pezRm",Qp="tempest_lg_kYbIN",Vp="tempest_disabled_vqmo2",Xp="tempest_btn_xuHhj",Yp="tempest_value_NEatO",be={wrapper:Up,label:Hp,row:Kp,sm:Gp,md:Jp,lg:Qp,disabled:Vp,btn:Xp,value:Yp},Zp=l.forwardRef(function({value:t,onChange:n,min:s=0,max:r=Number.POSITIVE_INFINITY,step:a=1,size:i="md",disabled:c=!1,label:u,format:d,labels:p={decrement:"Diminuir",increment:"Aumentar"},className:f},m){const h=()=>{c||n(wt(t-a,s,r))},_=()=>{c||n(wt(t+a,s,r))},b=d?d(t):String(t),y=!c&&t>s,g=!c&&t<r;return o.jsxs("div",{ref:m,className:v(be.wrapper,f),children:[u&&o.jsx("label",{className:be.label,children:u}),o.jsxs("div",{className:v(be.row,be[i],c&&be.disabled),children:[o.jsx("button",{type:"button",className:be.btn,"aria-label":p.decrement,onClick:h,disabled:!y,children:"−"}),o.jsx("span",{className:be.value,role:"status","aria-live":"polite",children:b}),o.jsx("button",{type:"button",className:be.btn,"aria-label":p.increment,onClick:_,disabled:!g,children:"+"})]})]})}),em="tempest_wrapper_kudO9",tm="tempest_disabled_2aZ0V",nm="tempest_input_5BPNu",sm="tempest_track_7ObdZ",rm="tempest_thumb_-FTeK",om="tempest_label_LrH7V",Me={wrapper:em,disabled:tm,input:nm,track:sm,thumb:rm,label:om},am=l.forwardRef(function({label:t,disabled:n,wrapperClassName:s,className:r,...a},i){return o.jsxs("label",{className:v(Me.wrapper,n&&Me.disabled,s),children:[o.jsx("input",{ref:i,type:"checkbox",role:"switch",disabled:n,className:v(Me.input,r),...a}),o.jsx("span",{className:Me.track,"aria-hidden":!0,children:o.jsx("span",{className:Me.thumb})}),t&&o.jsx("span",{className:Me.label,children:t})]})}),im="tempest_tag_16VPH",cm="tempest_sm_pzyd5",lm="tempest_md_GL6tQ",um="tempest_lg_8tgXU",dm="tempest_neutral_jAd-x",pm="tempest_primary_AXKlN",mm="tempest_success_56lz4",fm="tempest_warning_UK7SC",hm="tempest_danger_kJ-yx",_m="tempest_info_hmHE-",gm="tempest_label_ZBPfO",bm="tempest_remove_UEwgr",ze={tag:im,sm:cm,md:lm,lg:um,neutral:dm,primary:pm,success:mm,warning:fm,danger:hm,info:_m,label:gm,remove:bm};function ym({variant:e="neutral",size:t="md",onRemove:n,removeLabel:s="Remover",className:r,children:a,...i}){return o.jsxs("span",{className:v(ze.tag,ze[e],ze[t],r),...i,children:[o.jsx("span",{className:ze.label,children:a}),n&&o.jsx("button",{type:"button",className:ze.remove,"aria-label":s,onClick:n,children:"×"})]})}const wm="tempest_scroll_unrJp",vm="tempest_table_Dkosn",xm="tempest_th_PNuEx",jm="tempest_td_jv9tA",$m="tempest_tr_7UG8J",km="tempest_clickable_B6Si-",Nm="tempest_alignRight_9hY0G",Sm="tempest_alignCenter_YiUQy",Cm="tempest_emptyRow_kdMiv",Em="tempest_priorityTablet_3alUt",Tm="tempest_priorityDesktop_3f8Fq",Rm="tempest_stackable_heix7",Lm="tempest_stackableHead_mKGcA",Im="tempest_stackableRow_qPNqc",A={scroll:wm,table:vm,th:xm,td:jm,tr:$m,clickable:km,alignRight:Nm,alignCenter:Sm,emptyRow:Cm,priorityTablet:Em,priorityDesktop:Tm,stackable:Rm,stackableHead:Lm,stackableRow:Im};function Pt(e){if(e==="tablet")return A.priorityTablet;if(e==="desktop")return A.priorityDesktop}function un({columns:e,data:t,rowKey:n,onRowClick:s,emptyMessage:r="Nenhum registro encontrado.",className:a,stackOnMobile:i=!1}){return o.jsx("div",{className:v(A.scroll,i&&A.stackable,a),children:o.jsxs("table",{className:A.table,children:[o.jsx("thead",{className:v(i&&A.stackableHead),children:o.jsx("tr",{children:e.map(c=>o.jsx("th",{className:v(A.th,c.align==="right"&&A.alignRight,c.align==="center"&&A.alignCenter,Pt(c.priority)),style:{width:c.width},children:c.header},c.key))})}),o.jsx("tbody",{children:t.length===0?o.jsx("tr",{children:o.jsx("td",{className:A.emptyRow,colSpan:e.length,children:r})}):t.map((c,u)=>o.jsx("tr",{className:v(A.tr,s&&A.clickable,i&&A.stackableRow),onClick:s?()=>s(c):void 0,children:e.map(d=>{const p=d.render?d.render(c,u):c[d.key];return o.jsx("td",{className:v(A.td,d.align==="right"&&A.alignRight,d.align==="center"&&A.alignCenter,Pt(d.priority),d.className),"data-label":typeof d.header=="string"?d.header:void 0,children:p},d.key)})},n(c,u)))})]})})}const Mm="tempest_tablist_WR6ag",Pm="tempest_tab_IdDYc",Am="tempest_active_PTNtG",Dm="tempest_panel_08i9c",Om="tempest_pill_lGuqn",We={tablist:Mm,tab:Pm,active:Am,panel:Dm,pill:Om};function Fm({items:e,defaultId:t,activeId:n,onChange:s,variant:r="underline",className:a}){const i=e.find(h=>!h.disabled),[c,u]=l.useState(t??i?.id),d=n!==void 0,p=d?n:c,f=e.find(h=>h.id===p)??i;function m(h){d||u(h),s?.(h)}return o.jsxs("div",{className:a,children:[o.jsx("div",{role:"tablist",className:v(We.tablist,r==="pill"&&We.pill),children:e.map(h=>{const _=h.id===f?.id;return o.jsx("button",{type:"button",role:"tab","aria-selected":_,"aria-controls":`panel-${h.id}`,id:`tab-${h.id}`,disabled:h.disabled,className:v(We.tab,_&&We.active),onClick:()=>m(h.id),children:h.label},h.id)})}),f&&o.jsx("div",{role:"tabpanel",id:`panel-${f.id}`,"aria-labelledby":`tab-${f.id}`,className:We.panel,children:f.content})]})}const Bm="tempest_wrapper_C0gfg",zm="tempest_label_cWLXP",Wm="tempest_required_rDZXE",qm="tempest_textarea_Z-y6g",Um="tempest_error_NWC9f",Hm="tempest_helper_gedut",Km="tempest_errorText_ey07q",Se={wrapper:Bm,label:zm,required:Wm,textarea:qm,error:Um,helper:Hm,errorText:Km},Gm=l.forwardRef(function({label:t,helperText:n,error:s,wrapperClassName:r,className:a,id:i,required:c,...u},d){const p=l.useId(),f=i??p;return o.jsxs("div",{className:v(Se.wrapper,s&&Se.error,r),children:[t&&o.jsxs("label",{htmlFor:f,className:Se.label,children:[t,c&&o.jsx("span",{className:Se.required,children:"*"})]}),o.jsx("textarea",{ref:d,id:f,"aria-invalid":!!s,required:c,className:v(Se.textarea,a),...u}),s?o.jsx("span",{className:Se.errorText,children:s}):n?o.jsx("span",{className:Se.helper,children:n}):null]})}),Jm="tempest_timeline_utrkA",Qm="tempest_item_T5xdQ",Vm="tempest_markerColumn_BMe4d",Xm="tempest_marker_kmPV-",Ym="tempest_marker-primary_s9BNB",Zm="tempest_marker-success_areMM",ef="tempest_marker-warning_rRrS8",tf="tempest_marker-danger_3GEBk",nf="tempest_marker-neutral_M2mnw",sf="tempest_line_CwY-N",rf="tempest_body_KpMJ6",of="tempest_row_AX2ti",af="tempest_title_DxfAX",cf="tempest_meta_GU0ih",lf="tempest_description_f9sxV",U={timeline:Jm,item:Qm,markerColumn:Vm,marker:Xm,markerPrimary:Ym,markerSuccess:Zm,markerWarning:ef,markerDanger:tf,markerNeutral:nf,line:sf,body:rf,row:of,title:af,meta:cf,description:lf};function uf({items:e,connector:t=!0,className:n,...s}){return o.jsx("ol",{className:v(U.timeline,t&&U.connector,n),...s,children:e.map((r,a)=>{const i=a===e.length-1;return o.jsxs("li",{className:U.item,children:[o.jsxs("div",{className:U.markerColumn,children:[o.jsx("span",{className:v(U.marker,U[`marker-${r.marker??"primary"}`]),"aria-hidden":"true",children:r.icon}),t&&!i&&o.jsx("span",{className:U.line,"aria-hidden":"true"})]}),o.jsxs("div",{className:U.body,children:[o.jsxs("div",{className:U.row,children:[o.jsx("span",{className:U.title,children:r.title}),r.meta&&o.jsx("span",{className:U.meta,children:r.meta})]}),r.description&&o.jsx("p",{className:U.description,children:r.description})]})]},r.id)})})}const df="tempest_trigger_Dmc5E",pf="tempest_bubble_TPGHB",mf="tempest_tempest-tooltip-in_csYeZ",ff="tempest_top_m2tnn",hf="tempest_bottom_9Twz4",_f="tempest_left_UPdrG",gf="tempest_right_CV--T",mt={trigger:df,bubble:pf,tempestTooltipIn:mf,top:ff,bottom:hf,left:_f,right:gf};function bf({content:e,placement:t="top",children:n,disabled:s=!1,openDelay:r=150}){const[a,i]=l.useState(!1),c=l.useId();let u=null;function d(){s||(u&&clearTimeout(u),u=setTimeout(()=>i(!0),r))}function p(){u&&(clearTimeout(u),u=null),i(!1)}const f=l.cloneElement(n,{onMouseEnter:d,onMouseLeave:p,onFocus:d,onBlur:p,"aria-describedby":a?c:void 0});return o.jsxs("span",{className:mt.trigger,children:[f,a&&o.jsx("span",{id:c,role:"tooltip",className:v(mt.bubble,mt[t]),children:e})]})}const yf="tempest_container_x4-Qm",wf="tempest_positionTopRight_gbUCQ",vf="tempest_positionTopLeft_Z-tMJ",xf="tempest_positionTopCenter_A4Ze4",jf="tempest_positionBottomRight_MGo19",$f="tempest_positionBottomLeft_DpiNe",kf="tempest_positionBottomCenter_XUdok",Nf="tempest_toast_FLdHz",Sf="tempest_tempest-toast-in_E2d-A",Cf="tempest_success_Oy694",Ef="tempest_warning_84GC8",Tf="tempest_error_hrQAA",Rf="tempest_info_eq5bQ",Lf="tempest_title_-H6R2",If="tempest_description_-QwfC",Mf="tempest_close_i10-s",J={container:yf,positionTopRight:wf,positionTopLeft:vf,positionTopCenter:xf,positionBottomRight:jf,positionBottomLeft:$f,positionBottomCenter:kf,toast:Nf,tempestToastIn:Sf,success:Cf,warning:Ef,error:Tf,info:Rf,title:Lf,description:If,close:Mf},dn=l.createContext(null);function Pf(){const e=l.useContext(dn);if(!e)throw new Error("useToast must be used inside a <ToastProvider>");return e}function Af({children:e,defaultDuration:t=4e3,position:n="top-right"}){const[s,r]=l.useState([]),a=l.useRef(0),i=l.useCallback(d=>{r(p=>p.filter(f=>f.id!==d))},[]),c=l.useCallback(d=>{const p=d.id??`toast-${++a.current}`,f={id:p,title:d.title,description:d.description,variant:d.variant??"info",duration:d.duration??t};return r(m=>[...m,f]),p},[t]),u=l.useMemo(()=>({show:c,dismiss:i,success:(d,p)=>c({...p,description:d,variant:"success"}),error:(d,p)=>c({...p,description:d,variant:"error"}),warning:(d,p)=>c({...p,description:d,variant:"warning"}),info:(d,p)=>c({...p,description:d,variant:"info"})}),[c,i]);return o.jsxs(dn.Provider,{value:u,children:[e,o.jsx(Of,{toasts:s,onDismiss:i,position:n})]})}function Df(e){switch(e){case"top-left":return J.positionTopLeft;case"top-center":return J.positionTopCenter;case"bottom-right":return J.positionBottomRight;case"bottom-left":return J.positionBottomLeft;case"bottom-center":return J.positionBottomCenter;default:return J.positionTopRight}}function Of({toasts:e,onDismiss:t,position:n}){return typeof document>"u"?null:De.createPortal(o.jsx("div",{className:v(J.container,Df(n)),"aria-live":"polite","aria-atomic":"true",children:e.map(s=>o.jsx(Ff,{toast:s,onDismiss:t},s.id))}),document.body)}function Ff({toast:e,onDismiss:t}){return l.useEffect(()=>{if(!e.duration)return;const n=setTimeout(()=>t(e.id),e.duration);return()=>clearTimeout(n)},[e.id,e.duration,t]),o.jsxs("div",{className:v(J.toast,J[e.variant]),role:"status",children:[o.jsxs("div",{children:[e.title&&o.jsx("p",{className:J.title,children:e.title}),e.description&&o.jsx("p",{className:J.description,children:e.description})]}),o.jsx("button",{type:"button",className:J.close,"aria-label":"Fechar notificação",onClick:()=>t(e.id),children:o.jsx(Bf,{})})]})}function Bf(){return o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M6 6l12 12M6 18L18 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}const zf="tempest_scroll_8Giwl",Wf="tempest_spacer_P3Pvl",qf="tempest_row_Ff0VU",ft={scroll:zf,spacer:Wf,row:qf};function Uf({items:e,itemHeight:t,renderItem:n,height:s,overscan:r=4,getKey:a,className:i,style:c}){const u=l.useRef(null),[d,p]=l.useState(0),[f,m]=l.useState(0);l.useEffect(()=>{const g=u.current;if(!g||(m(g.clientHeight),typeof ResizeObserver>"u"))return;const w=new ResizeObserver(()=>m(g.clientHeight));return w.observe(g),()=>w.disconnect()},[]);const h=e.length*t,_=Math.max(0,Math.floor(d/t)-r),b=Math.ceil(f/t)+r*2,y=Math.min(e.length,_+b);return o.jsx("div",{ref:u,className:v(ft.scroll,i),style:{height:s,...c},onScroll:g=>p(g.target.scrollTop),role:"list",children:o.jsx("div",{className:ft.spacer,style:{height:h},children:e.slice(_,y).map((g,w)=>{const x=_+w,k=a?a(g,x):x;return o.jsx("div",{role:"listitem",className:ft.row,style:{top:x*t,height:t},children:n(g,x)},k)})})})}const Hf="tempest_button_58f9i",Kf="tempest_copied_WkLgR",At={button:Hf,copied:Kf};function Gf({value:e,timeout:t=2e3,children:n,onCopied:s,className:r,onClick:a,...i}){const[c,u]=l.useState(!1),d=l.useRef(null);l.useEffect(()=>()=>{d.current!==null&&clearTimeout(d.current)},[]);const p=l.useCallback(async f=>{a?.(f);try{await navigator.clipboard.writeText(e),u(!0),s?.(),d.current!==null&&clearTimeout(d.current),d.current=setTimeout(()=>u(!1),t)}catch{}},[e,t,s,a]);return o.jsx("button",{type:"button",className:v(At.button,c&&At.copied,r),"data-copied":c||void 0,onClick:p,...i,children:n??(c?"Copied":"Copy")})}const Jf={justNow:"agora há pouco",secondsAgo:e=>`${e} s atrás`,minutesAgo:e=>`${e} min atrás`,hoursAgo:e=>e===1?"1 hora atrás":`${e} horas atrás`,daysAgo:e=>e===1?"ontem":`${e} dias atrás`,weeksAgo:e=>e===1?"semana passada":`${e} semanas atrás`,monthsAgo:e=>e===1?"mês passado":`${e} meses atrás`,yearsAgo:e=>e===1?"ano passado":`${e} anos atrás`,inSeconds:e=>`em ${e} s`,inMinutes:e=>`em ${e} min`,inHours:e=>`em ${e} h`,inDays:e=>`em ${e} ${e===1?"dia":"dias"}`,inWeeks:e=>`em ${e} ${e===1?"semana":"semanas"}`,inMonths:e=>`em ${e} ${e===1?"mês":"meses"}`,inYears:e=>`em ${e} ${e===1?"ano":"anos"}`},Qf={justNow:"just now",secondsAgo:e=>`${e}s ago`,minutesAgo:e=>`${e}m ago`,hoursAgo:e=>`${e}h ago`,daysAgo:e=>e===1?"yesterday":`${e} days ago`,weeksAgo:e=>`${e}w ago`,monthsAgo:e=>`${e}mo ago`,yearsAgo:e=>`${e}y ago`,inSeconds:e=>`in ${e}s`,inMinutes:e=>`in ${e}m`,inHours:e=>`in ${e}h`,inDays:e=>`in ${e}d`,inWeeks:e=>`in ${e}w`,inMonths:e=>`in ${e}mo`,inYears:e=>`in ${e}y`},Vf={"pt-BR":Jf,en:Qf},vt=1e3,xt=60*vt,jt=60*xt,Ke=24*jt,Dt=7*Ke,Ot=30*Ke,Ft=365*Ke;function pn(e,t={}){const{locale:n="pt-BR",now:s=Date.now()}=t,r=Vf[n],a=e instanceof Date?e.getTime():new Date(e).getTime(),c=(typeof s=="number"?s:s.getTime())-a,u=c>=0,d=Math.abs(c);if(d<30*vt)return r.justNow;if(d<xt){const f=Math.round(d/vt);return u?r.secondsAgo(f):r.inSeconds(f)}if(d<jt){const f=Math.round(d/xt);return u?r.minutesAgo(f):r.inMinutes(f)}if(d<Ke){const f=Math.round(d/jt);return u?r.hoursAgo(f):r.inHours(f)}if(d<Dt){const f=Math.round(d/Ke);return u?r.daysAgo(f):r.inDays(f)}if(d<Ot){const f=Math.round(d/Dt);return u?r.weeksAgo(f):r.inWeeks(f)}if(d<Ft){const f=Math.round(d/Ot);return u?r.monthsAgo(f):r.inMonths(f)}const p=Math.round(d/Ft);return u?r.yearsAgo(p):r.inYears(p)}function Xf({date:e,locale:t="pt",...n}){const s=e instanceof Date?e:new Date(e),r=Number.isNaN(s.getTime())?void 0:s.toISOString(),a=pn(e,{locale:t==="pt"?"pt-BR":"en"});return o.jsx("time",{dateTime:r,...n,children:a})}function Yf({cents:e,currency:t="BRL",locale:n="pt-BR",...s}){const r=new Intl.NumberFormat(n,{style:"currency",currency:t}).format(e/100);return o.jsx("span",{...s,children:r})}const Zf="tempest_clamp_r43C-",eh={clamp:Zf};function th({lines:e=1,className:t,style:n,children:s,...r}){const a={...n,"--tempest-clamp-lines":e};return o.jsx("div",{className:v(eh.clamp,t),style:a,...r,children:s})}const nh="tempest_hidden_k7p-e",sh={hidden:nh};function rh({as:e="span",className:t,children:n,...s}){return l.createElement(e,{className:v(sh.hidden,t),...s},n)}function mn({children:e,container:t}){const[n,s]=l.useState(!1);return l.useEffect(()=>(s(!0),()=>s(!1)),[]),!n||typeof document>"u"?null:De.createPortal(e,t??document.body)}function oh({onOutside:e,children:t,...n}){const s=l.useRef(null),r=l.useRef(e);return r.current=e,l.useEffect(()=>{if(typeof document>"u")return;function a(i){const c=s.current,u=i.target;c&&u&&!c.contains(u)&&r.current(i)}return document.addEventListener("mousedown",a),document.addEventListener("touchstart",a),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("touchstart",a)}},[]),o.jsx("div",{ref:s,...n,children:t})}function ah({condition:e,wrapper:t,children:n}){return e?t(n):o.jsx(o.Fragment,{children:n})}function ih({each:e,children:t,fallback:n=null}){return e.length===0?o.jsx(o.Fragment,{children:n}):o.jsx(o.Fragment,{children:e.map((s,r)=>o.jsx(l.Fragment,{children:t(s,r)},r))})}const ch="tempest_errorText_LU3jn",lh={errorText:ch};function uh({children:e,className:t,...n}){return e==null||e===!1||e===""?null:o.jsx("p",{role:"alert",className:v(lh.errorText,t),...n,children:e})}const dh="tempest_image_Zq9Zs",ph={image:dh};function mh({src:e,fallback:t,alt:n,lazy:s=!0,className:r,onError:a,...i}){const[c,u]=l.useState(e),[d,p]=l.useState(!1);return o.jsx("img",{src:c,alt:n,loading:s?"lazy":"eager",className:v(ph.image,r),onError:f=>{t&&!d&&c!==t&&(p(!0),u(t)),a?.(f)},...i})}const fh="tempest_list_bAP4Q",hh="tempest_item_oRy5T",Bt={list:fh,item:hh};function _h({items:e,renderItem:t,keyExtractor:n,empty:s,className:r,...a}){return e.length===0?o.jsx(o.Fragment,{children:s??null}):o.jsx("ul",{className:v(Bt.list,r),...a,children:e.map((i,c)=>o.jsx("li",{className:Bt.item,children:t(i,c)},n?n(i,c):c))})}const gh="tempest_list_fwIXq",bh="tempest_term_QkQNZ",yh="tempest_description_e1bNN",ht={list:gh,term:bh,description:yh};function wh({items:e,className:t,...n}){return o.jsx("dl",{className:v(ht.list,t),...n,children:e.map((s,r)=>o.jsxs(l.Fragment,{children:[o.jsx("dt",{className:ht.term,children:s.term}),o.jsx("dd",{className:ht.description,children:s.description})]},r))})}const vh="tempest_toggle_kmzmH",xh="tempest_outline_aFbzy",jh="tempest_pressed_hX319",$h="tempest_sm_JTqaB",kh="tempest_md_QfS4K",Nh="tempest_lg_ajzsM",Ve={toggle:vh,outline:xh,pressed:jh,sm:$h,md:kh,lg:Nh},Sh=l.forwardRef(function({pressed:t,defaultPressed:n=!1,onPressedChange:s,size:r="md",variant:a="default",className:i,disabled:c,onClick:u,children:d,...p},f){const m=t!==void 0,[h,_]=l.useState(n),b=m?t:h,y=l.useCallback(g=>{if(u?.(g),g.defaultPrevented)return;const w=!b;m||_(w),s?.(w)},[b,m,u,s]);return o.jsx("button",{ref:f,type:"button","aria-pressed":b,disabled:c,"data-state":b?"on":"off",className:v(Ve.toggle,Ve[r],Ve[a],b&&Ve.pressed,i),onClick:y,...p,children:d})}),Ch="tempest_group_XZCDJ",Eh="tempest_item_B-27E",Th="tempest_selected_OHPVQ",$t={group:Ch,item:Eh,selected:Th},fn=l.createContext(null);function Rh(){const e=l.useContext(fn);if(!e)throw new Error("ToggleGroupItem must be used within a ToggleGroup");return e}function zt(e){return e===void 0?[]:Array.isArray(e)?e:[e]}function Lh({type:e="single",value:t,defaultValue:n,onValueChange:s,className:r,children:a,...i}){const c=t!==void 0,[u,d]=l.useState(()=>zt(n)),p=c?zt(t):u,f=l.useCallback(_=>{c||d(_),s?.(e==="single"?_[0]??"":_)},[c,s,e]),m=l.useCallback(_=>{const b=p.includes(_);f(e==="single"?b?[]:[_]:b?p.filter(y=>y!==_):[...p,_])},[p,e,f]),h=l.useMemo(()=>({type:e,isSelected:_=>p.includes(_),toggle:m}),[e,p,m]);return o.jsx(fn.Provider,{value:h,children:o.jsx("div",{role:"group",className:v($t.group,r),...i,children:a})})}function Ih({value:e,disabled:t,className:n,children:s,...r}){const{isSelected:a,toggle:i}=Rh(),c=a(e);return o.jsx("button",{type:"button",role:"button","aria-pressed":c,disabled:t,"data-state":c?"on":"off",className:v($t.item,c&&$t.selected,n),onClick:()=>i(e),...r,children:s})}const Mh="tempest_label_RaRvM",Ph="tempest_asterisk_1CgE8",Wt={label:Mh,asterisk:Ph},Ah=l.forwardRef(function({required:t=!1,className:n,children:s,...r},a){return o.jsxs("label",{ref:a,className:v(Wt.label,n),...r,children:[s,t&&o.jsx("span",{className:Wt.asterisk,"aria-hidden":!0,children:"*"})]})}),Dh="tempest_collapsible_8jmKP",Oh="tempest_trigger_ers75",Fh="tempest_content_XmUZL",Xe={collapsible:Dh,trigger:Oh,content:Fh};function Bh({open:e,defaultOpen:t=!1,onOpenChange:n,trigger:s,className:r,children:a,...i}){const c=l.useId(),u=`${c}-content`,d=`${c}-trigger`,p=e!==void 0,[f,m]=l.useState(t),h=p?e:f,_=l.useCallback(()=>{const b=!h;p||m(b),n?.(b)},[h,p,n]);return o.jsxs("div",{className:v(Xe.collapsible,h&&Xe.open,r),...i,children:[o.jsx("button",{type:"button",id:d,className:Xe.trigger,"aria-expanded":h,"aria-controls":u,onClick:_,children:s}),o.jsx("div",{id:u,role:"region","aria-labelledby":d,hidden:!h,className:Xe.content,children:a})]})}const zh="tempest_root_OxRHj",Wh="tempest_menu_MDn4t",qh="tempest_item_PoiMY",Uh="tempest_active_ATcDu",Hh="tempest_danger_COgly",Kh="tempest_separator_omuCz",Pe={root:zh,menu:Wh,item:qh,active:Uh,danger:Hh,separator:Kh};function qt(e){return"separator"in e&&e.separator===!0}function Gh({items:e,children:t,className:n}){const[s,r]=l.useState(!1),[a,i]=l.useState({x:0,y:0}),[c,u]=l.useState(-1),d=l.useId(),p=l.useRef(null),f=l.useRef([]),m=e.map((y,g)=>!qt(y)&&!y.disabled?g:-1).filter(y=>y!==-1),h=l.useCallback(()=>{r(!1),u(-1)},[]),_=y=>{y.preventDefault(),i({x:y.clientX,y:y.clientY}),u(-1),r(!0)};l.useEffect(()=>{if(!s)return;const y=w=>{if(w.key==="Escape"){h();return}if(w.key==="ArrowDown"){w.preventDefault();const x=m.indexOf(c),k=m[(x+1)%m.length]??-1;u(k),f.current[k]?.focus()}if(w.key==="ArrowUp"){w.preventDefault();const x=m.indexOf(c),k=m[(x-1+m.length)%m.length]??-1;u(k),f.current[k]?.focus()}},g=w=>{p.current&&!p.current.contains(w.target)&&h()};return window.addEventListener("keydown",y),window.addEventListener("mousedown",g),()=>{window.removeEventListener("keydown",y),window.removeEventListener("mousedown",g)}},[s,c,m,h]);const b=y=>{y.onSelect?.(),h()};return o.jsxs(o.Fragment,{children:[o.jsx("span",{className:Pe.root,onContextMenu:_,children:t}),s&&o.jsx(mn,{children:o.jsx("ul",{ref:p,id:d,role:"menu",className:v(Pe.menu,n),style:{top:a.y,left:a.x},children:e.map((y,g)=>qt(y)?o.jsx("li",{role:"separator",className:Pe.separator,"aria-hidden":!0},`separator-${g}`):o.jsx("li",{role:"none",children:o.jsx("button",{ref:w=>{f.current[g]=w},type:"button",role:"menuitem",className:v(Pe.item,y.danger&&Pe.danger,c===g&&Pe.active),disabled:y.disabled,onClick:()=>b(y),onMouseEnter:()=>u(g),children:y.label})},`item-${g}`))})})]})}const Jh="tempest_root_2KoZA",Qh="tempest_trigger_OXsnr",Vh="tempest_card_CoGx4",Xh="tempest_tempest-hover-card-in_jD85J",Yh="tempest_top_AVcQ0",Zh="tempest_bottom_2rLAA",e_="tempest_left_tqGPt",t_="tempest_right_9Fe6S",Ye={root:Jh,trigger:Qh,card:Vh,tempestHoverCardIn:Xh,top:Yh,bottom:Zh,left:e_,right:t_};function n_({trigger:e,children:t,openDelay:n=300,closeDelay:s=150,placement:r="bottom",className:a,...i}){const[c,u]=l.useState(!1),d=l.useId(),p=l.useRef(null),f=l.useCallback(()=>{p.current!==null&&(clearTimeout(p.current),p.current=null)},[]),m=l.useCallback(()=>{f(),p.current=setTimeout(()=>u(!0),n)},[f,n]),h=l.useCallback(()=>{f(),p.current=setTimeout(()=>u(!1),s)},[f,s]);return l.useEffect(()=>f,[f]),o.jsxs("span",{className:Ye.root,onMouseEnter:m,onMouseLeave:h,onFocus:m,onBlur:h,children:[o.jsx("span",{"aria-describedby":c?d:void 0,className:Ye.trigger,children:e}),c&&o.jsx("div",{id:d,role:"dialog",className:v(Ye.card,Ye[r],a),...i,children:t})]})}const s_=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");function hn(e,t){l.useEffect(()=>{if(!t)return;const n=e.current;if(!n)return;const s=document.activeElement;function r(){return Array.from(n?.querySelectorAll(s_)??[]).filter(c=>{if(c.hasAttribute("aria-hidden"))return!1;const u=typeof window<"u"?window.getComputedStyle(c):null;return!(u&&(u.display==="none"||u.visibility==="hidden"))})}function a(c){if(c.key!=="Tab")return;const u=r();if(u.length===0){c.preventDefault();return}const d=u[0],p=u[u.length-1],f=document.activeElement;c.shiftKey?(f===d||!f||!n?.contains(f))&&(c.preventDefault(),p.focus()):f===p&&(c.preventDefault(),d.focus())}return r()[0]?.focus(),document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a),s?.focus?.()}},[e,t])}const r_="tempest_overlay_drnPW",o_="tempest_dialog_lPl6k",a_="tempest_inputRow_KxWoQ",i_="tempest_searchIcon_8PULr",c_="tempest_input_D3HQr",l_="tempest_list_5UzZU",u_="tempest_group_vLaWy",d_="tempest_groupHeading_d01fo",p_="tempest_groupList_QFMjK",m_="tempest_option_doqib",f_="tempest_active_LdCIJ",h_="tempest_icon_CyCCx",__="tempest_label_QePT-",g_="tempest_empty_al68D",O={overlay:r_,dialog:o_,inputRow:a_,searchIcon:i_,input:c_,list:l_,group:u_,groupHeading:d_,groupList:p_,option:m_,active:f_,icon:h_,label:__,empty:g_};function b_(e,t){return t===""||e.label.toLowerCase().includes(t)?!0:(e.keywords??[]).some(n=>n.toLowerCase().includes(t))}function Ut(e){const t=[],n=new Map;for(const s of e){const r=n.get(s.group);r===void 0?(n.set(s.group,t.length),t.push({name:s.group,items:[s]})):t[r].items.push(s)}return t}function y_({open:e,onOpenChange:t,items:n,placeholder:s="Type a command…",emptyMessage:r="No results",className:a}){const i=l.useRef(null),[c,u]=l.useState(""),[d,p]=l.useState(0),f="tempest-command-list";hn(i,e);const m=l.useMemo(()=>{const g=c.trim().toLowerCase(),w=n.filter(x=>b_(x,g));return Ut(w).flatMap(x=>x.items)},[n,c]),h=l.useMemo(()=>Ut(m),[m]);if(l.useEffect(()=>{e&&(u(""),p(0))},[e]),l.useEffect(()=>{p(g=>m.length===0?0:Math.min(g,m.length-1))},[m.length]),!e||typeof document>"u")return null;function _(g){g.onSelect(),t(!1)}function b(g){if(g.key==="Escape"){g.preventDefault(),t(!1);return}if(g.key==="ArrowDown"){if(g.preventDefault(),m.length===0)return;p(w=>(w+1)%m.length);return}if(g.key==="ArrowUp"){if(g.preventDefault(),m.length===0)return;p(w=>(w-1+m.length)%m.length);return}if(g.key==="Enter"){g.preventDefault();const w=m[d];w&&_(w)}}let y=-1;return De.createPortal(o.jsx("div",{className:O.overlay,role:"presentation",onClick:()=>t(!1),children:o.jsxs("div",{ref:i,role:"dialog","aria-modal":"true","aria-label":"Command palette",className:v(O.dialog,a),onClick:g=>g.stopPropagation(),children:[o.jsxs("div",{className:O.inputRow,children:[o.jsx(w_,{}),o.jsx("input",{type:"text",role:"combobox","aria-expanded":"true","aria-controls":f,"aria-autocomplete":"list",autoFocus:!0,className:O.input,placeholder:s,value:c,onChange:g=>u(g.target.value),onKeyDown:b})]}),o.jsx("ul",{id:f,role:"listbox",className:O.list,children:m.length===0?o.jsx("li",{className:O.empty,children:r}):h.map(g=>o.jsxs("li",{className:O.group,children:[g.name&&o.jsx("div",{className:O.groupHeading,children:g.name}),o.jsx("ul",{role:"presentation",className:O.groupList,children:g.items.map(w=>{y+=1;const x=y===d,k=y;return o.jsxs("li",{role:"option","aria-selected":x,className:v(O.option,x&&O.active),onMouseMove:()=>p(k),onClick:()=>_(w),children:[w.icon&&o.jsx("span",{className:O.icon,children:w.icon}),o.jsx("span",{className:O.label,children:w.label})]},w.id)})})]},g.name??"__ungrouped__"))})]})}),document.body)}function w_(){return o.jsxs("svg",{className:O.searchIcon,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[o.jsx("circle",{cx:"11",cy:"11",r:"7",stroke:"currentColor",strokeWidth:"2"}),o.jsx("path",{d:"M20 20l-3.5-3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}const v_="tempest_root_cWKqF",x_={root:v_},j_=l.forwardRef(function({maxHeight:t,orientation:n="vertical",className:s,style:r,children:a,...i},c){const u={overflowX:n==="vertical"?"hidden":"auto",overflowY:n==="horizontal"?"hidden":"auto",...t!==void 0?{maxHeight:t}:{},...r};return o.jsx("div",{ref:c,className:v(x_.root,s),style:u,...i,children:a})}),$_="tempest_root_-Xerf",k_="tempest_horizontal_3QOMV",N_="tempest_vertical_6A7lb",S_="tempest_pane_x6yUG",C_="tempest_divider_fhaTB",E_="tempest_handle_eCe1B",Ce={root:$_,horizontal:k_,vertical:N_,pane:S_,divider:C_,handle:E_},Ze=2;function _t(e,t,n){return Math.min(n,Math.max(t,e))}function T_({direction:e="horizontal",defaultSize:t=50,min:n=10,max:s=90,children:r,className:a,...i}){const[c,u]=l.useState(()=>_t(t,n,s)),d=l.useRef(null),[p,f]=r,m=e==="horizontal",h=l.useCallback((y,g)=>{const w=d.current;if(!w)return;const x=w.getBoundingClientRect(),k=m?x.width:x.height;if(k<=0)return;const M=(m?y-x.left:g-x.top)/k*100;u(_t(M,n,s))},[m,n,s]),_=l.useCallback(y=>{y.preventDefault(),y.currentTarget.setPointerCapture(y.pointerId);const w=k=>{h(k.clientX,k.clientY)},x=()=>{window.removeEventListener("pointermove",w),window.removeEventListener("pointerup",x)};window.addEventListener("pointermove",w),window.addEventListener("pointerup",x)},[h]),b=l.useCallback(y=>{let g=0;if(m?y.key==="ArrowRight"?g=Ze:y.key==="ArrowLeft"&&(g=-Ze):y.key==="ArrowDown"?g=Ze:y.key==="ArrowUp"&&(g=-Ze),y.key==="Home"){y.preventDefault(),u(n);return}if(y.key==="End"){y.preventDefault(),u(s);return}g!==0&&(y.preventDefault(),u(w=>_t(w+g,n,s)))},[m,n,s]);return o.jsxs("div",{ref:d,className:v(Ce.root,m?Ce.horizontal:Ce.vertical,a),...i,children:[o.jsx("div",{className:Ce.pane,style:{flexBasis:`${c}%`},children:p}),o.jsx("div",{role:"separator","aria-orientation":m?"vertical":"horizontal","aria-valuenow":Math.round(c),"aria-valuemin":n,"aria-valuemax":s,tabIndex:0,className:Ce.divider,onPointerDown:_,onKeyDown:b,children:o.jsx("span",{className:Ce.handle,"aria-hidden":"true"})}),o.jsx("div",{className:Ce.pane,style:{flexBasis:`${100-c}%`},children:f})]})}const R_="tempest_root_ObO-Z",L_="tempest_header_5nSJG",I_="tempest_title_Jd3Xb",M_="tempest_nav_4h58I",P_="tempest_weekdays_YzRfx",A_="tempest_grid_nbaFm",D_="tempest_weekday_k-7Vr",O_="tempest_day_ao-IC",F_="tempest_outside_HkC-6",B_="tempest_today_p18-m",z_="tempest_selected_C9bTY",H={root:R_,header:L_,title:I_,nav:M_,weekdays:P_,grid:A_,weekday:D_,day:O_,outside:F_,today:B_,selected:z_},W_=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],q_=["January","February","March","April","May","June","July","August","September","October","November","December"],_n=42;function Ae(e,t,n){return new Date(e,t,n)}function tt(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function Ht(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Kt(e,t,n){const s=tt(e).getTime();return!!(t&&s<tt(t).getTime()||n&&s>tt(n).getTime())}function U_(e,t){const n=e.getFullYear(),s=e.getMonth(),i=(Ae(n,s,1).getDay()-t+7)%7,c=Ae(n,s,1-i),u=[];for(let d=0;d<_n;d+=1)u.push(Ae(c.getFullYear(),c.getMonth(),c.getDate()+d));return u}function H_({value:e,defaultValue:t,onChange:n,month:s,onMonthChange:r,minDate:a,maxDate:i,weekStartsOn:c=0,className:u,...d}){const p=e!==void 0,[f,m]=l.useState(t),h=p?e:f,_=s!==void 0,[b,y]=l.useState(()=>{const N=s??e??t??new Date;return Ae(N.getFullYear(),N.getMonth(),1)}),g=_?Ae(s.getFullYear(),s.getMonth(),1):b,[w,x]=l.useState(null),k=l.useRef(null),T=l.useMemo(()=>tt(new Date),[]),M=l.useMemo(()=>U_(g,c),[g,c]),P=l.useMemo(()=>Array.from({length:7},(N,C)=>W_[(C+c)%7]),[c]),$=l.useCallback(N=>{const C=Ae(g.getFullYear(),g.getMonth()+N,1);r&&r(C),_||y(C)},[g,r,_]),j=l.useCallback(N=>{Kt(N,a,i)||(n&&n(N),p||m(N))},[a,i,n,p]),S=l.useCallback(N=>{const C=Math.max(0,Math.min(_n-1,N));x(C);const ae=k.current;if(!ae)return;ae.querySelectorAll("button[data-day]")[C]?.focus()},[]),L=l.useCallback((N,C)=>{switch(N.key){case"ArrowLeft":N.preventDefault(),S(C-1);break;case"ArrowRight":N.preventDefault(),S(C+1);break;case"ArrowUp":N.preventDefault(),S(C-7);break;case"ArrowDown":N.preventDefault(),S(C+7);break;case"Enter":case" ":N.preventDefault(),j(M[C]);break}},[S,j,M]);return o.jsxs("div",{className:v(H.root,u),...d,children:[o.jsxs("div",{className:H.header,children:[o.jsx("button",{type:"button",className:H.nav,"aria-label":"Previous month",onClick:()=>$(-1),children:"‹"}),o.jsxs("span",{className:H.title,"aria-live":"polite",children:[q_[g.getMonth()]," ",g.getFullYear()]}),o.jsx("button",{type:"button",className:H.nav,"aria-label":"Next month",onClick:()=>$(1),children:"›"})]}),o.jsx("div",{className:H.weekdays,role:"row",children:P.map(N=>o.jsx("span",{className:H.weekday,role:"columnheader",children:N},N))}),o.jsx("div",{className:H.grid,role:"grid",ref:k,children:M.map((N,C)=>{const ae=N.getMonth()===g.getMonth(),R=h?Ht(N,h):!1,E=Ht(N,T),F=Kt(N,a,i),Je=w===null?ae&&N.getDate()===1:w===C;return o.jsx("button",{type:"button","data-day":!0,role:"gridcell",className:v(H.day,!ae&&H.outside,R&&H.selected,E&&H.today),"aria-pressed":R,"aria-selected":R,"aria-current":E?"date":void 0,disabled:F,tabIndex:Je?0:-1,onClick:()=>j(N),onKeyDown:Vn=>L(Vn,C),children:N.getDate()},C)})})]})}const K_="tempest_root_Nosqs",G_="tempest_list_v9FNC",J_="tempest_item_9RzZ7",Q_="tempest_link_67ULr",V_="tempest_trigger_2gBDu",X_="tempest_panel_N2ujp",Y_="tempest_subItem_LjtO7",me={root:K_,list:G_,item:J_,link:Q_,trigger:V_,panel:X_,subItem:Y_};function Z_({items:e,className:t,...n}){const[s,r]=l.useState(-1),[a,i]=l.useState(-1),c=l.useId(),u=l.useRef(null),d=l.useCallback(()=>{r(-1),i(-1)},[]),p=s!==-1?s:a;l.useEffect(()=>{if(p===-1)return;const m=_=>{_.key==="Escape"&&d()},h=_=>{u.current&&!u.current.contains(_.target)&&d()};return window.addEventListener("keydown",m),window.addEventListener("mousedown",h),()=>{window.removeEventListener("keydown",m),window.removeEventListener("mousedown",h)}},[p,d]);const f=(m,h)=>{const _=()=>{m.onSelect?.(),d()};return m.href?o.jsx("a",{href:m.href,role:h==="menuitem"?"menuitem":void 0,className:me.link,onClick:_,children:m.label}):o.jsx("button",{type:"button",role:h==="menuitem"?"menuitem":void 0,className:me.link,onClick:_,children:m.label})};return o.jsx("nav",{ref:u,className:v(me.root,t),...n,children:o.jsx("ul",{className:me.list,children:e.map((m,h)=>{if(!(!!m.children&&m.children.length>0))return o.jsx("li",{className:me.item,children:f(m,"none")},h);const b=p===h,y=`${c}-panel-${h}`;return o.jsxs("li",{className:me.item,onMouseEnter:()=>i(h),onMouseLeave:()=>i(g=>g===h?-1:g),children:[o.jsx("button",{type:"button",className:me.trigger,"aria-haspopup":"menu","aria-expanded":b,"aria-controls":y,onClick:()=>r(g=>g===h?-1:h),onFocus:()=>i(h),children:m.label}),b&&o.jsx("ul",{id:y,role:"menu",className:me.panel,children:m.children.map((g,w)=>o.jsx("li",{role:"none",className:me.subItem,children:f(g,"menuitem")},w))})]},h)})})})}const eg="tempest_root_PGUO2",tg="tempest_menu_hEVLT",ng="tempest_trigger_ZlZBx",sg="tempest_triggerOpen_Hpfbu",rg="tempest_panel_6ta6u",og="tempest_item_wM-61",ag="tempest_itemLabel_wXfB2",ig="tempest_shortcut_qNlmN",cg="tempest_separator_LfK3t",fe={root:eg,menu:tg,trigger:ng,triggerOpen:sg,panel:rg,item:og,itemLabel:ag,shortcut:ig,separator:cg};function lg(e){return"separator"in e}function ug({menus:e,className:t,...n}){const[s,r]=l.useState(-1),a=l.useId(),i=l.useRef(null),c=l.useRef([]),u=l.useCallback(()=>{r(-1)},[]);return l.useEffect(()=>{if(s===-1)return;const d=f=>{if(f.key==="Escape"){u(),c.current[s]?.focus();return}if(f.key==="ArrowRight"){f.preventDefault();const m=(s+1)%e.length;r(m),c.current[m]?.focus()}if(f.key==="ArrowLeft"){f.preventDefault();const m=(s-1+e.length)%e.length;r(m),c.current[m]?.focus()}},p=f=>{i.current&&!i.current.contains(f.target)&&u()};return window.addEventListener("keydown",d),window.addEventListener("mousedown",p),()=>{window.removeEventListener("keydown",d),window.removeEventListener("mousedown",p)}},[s,e.length,u]),o.jsx("div",{ref:i,role:"menubar",className:v(fe.root,t),...n,children:e.map((d,p)=>{const f=s===p,m=`${a}-panel-${p}`;return o.jsxs("div",{className:fe.menu,children:[o.jsx("button",{ref:h=>{c.current[p]=h},type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":f,"aria-controls":f?m:void 0,className:v(fe.trigger,f&&fe.triggerOpen),onClick:()=>r(h=>h===p?-1:p),children:d.label}),f&&o.jsx("ul",{id:m,role:"menu",className:fe.panel,children:d.items.map((h,_)=>lg(h)?o.jsx("li",{role:"separator",className:fe.separator,"aria-hidden":!0},_):o.jsx("li",{role:"none",children:o.jsxs("button",{type:"button",role:"menuitem",className:fe.item,disabled:h.disabled,onClick:()=>{h.onSelect?.(),u()},children:[o.jsx("span",{className:fe.itemLabel,children:h.label}),h.shortcut&&o.jsx("span",{className:fe.shortcut,children:h.shortcut})]})},_))})]},p)})})}const dg="tempest_root_-w3-j",pg="tempest_viewport_n0hzM",mg="tempest_track_5PA8h",fg="tempest_slide_fhfjg",hg="tempest_arrow_S92Lt",_g="tempest_prev_X8whU",gg="tempest_next_jBRSz",bg="tempest_dots_fL3Hr",yg="tempest_dot_vEB56",wg="tempest_dotActive_OSSUg",Z={root:dg,viewport:pg,track:mg,slide:fg,arrow:hg,prev:_g,next:gg,dots:bg,dot:yg,dotActive:wg};function vg({children:e,loop:t=!1,showArrows:n=!0,showDots:s=!0,index:r,defaultIndex:a=0,onIndexChange:i,className:c,...u}){const d=e.length,p=r!==void 0,[f,m]=l.useState(a),h=p?r:f,_=l.useCallback(w=>{let x=w;x<0?x=t?d-1:0:x>=d&&(x=t?0:d-1),x!==h&&(p||m(x),i?.(x))},[d,t,h,p,i]),b=h<=0,y=h>=d-1,g=w=>{w.key==="ArrowRight"?(w.preventDefault(),_(h+1)):w.key==="ArrowLeft"&&(w.preventDefault(),_(h-1))};return o.jsxs("div",{role:"region","aria-roledescription":"carousel",tabIndex:0,className:v(Z.root,c),onKeyDown:g,...u,children:[o.jsx("div",{className:Z.viewport,children:o.jsx("div",{className:Z.track,style:{transform:`translateX(-${h*100}%)`},children:e.map((w,x)=>o.jsx("div",{role:"group","aria-roledescription":"slide","aria-label":`${x+1} of ${d}`,"aria-hidden":x!==h,className:Z.slide,children:w},x))})}),n&&d>1&&o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",className:v(Z.arrow,Z.prev),"aria-label":"Previous slide",disabled:!t&&b,onClick:()=>_(h-1),children:"‹"}),o.jsx("button",{type:"button",className:v(Z.arrow,Z.next),"aria-label":"Next slide",disabled:!t&&y,onClick:()=>_(h+1),children:"›"})]}),s&&d>1&&o.jsx("div",{className:Z.dots,role:"tablist","aria-label":"Slides",children:e.map((w,x)=>o.jsx("button",{type:"button",role:"tab","aria-label":`Go to slide ${x+1}`,"aria-selected":x===h,className:v(Z.dot,x===h&&Z.dotActive),onClick:()=>_(x)},x))})]})}function xg(e,t=300){const[n,s]=l.useState(e);return l.useEffect(()=>{const r=setTimeout(()=>s(e),t);return()=>clearTimeout(r)},[e,t]),n}function gn(e=1,t=50){const[n,s]=l.useState(e),[r,a]=l.useState(t),i=l.useCallback(()=>s(1),[]);return{page:n,size:r,setPage:s,setSize:a,reset:i}}function jg(e,t,n){return l.useMemo(()=>{const s=t.trim().toLowerCase();return s?typeof n=="function"?e.filter(r=>n(r,s)):e.filter(r=>n.some(a=>{const i=r[a];return i!=null&&String(i).toLowerCase().includes(s)})):e},[e,t,n])}function $g(e){const[t,n]=l.useState(()=>typeof window>"u"?!1:window.matchMedia(e).matches);return l.useEffect(()=>{if(typeof window>"u")return;const s=window.matchMedia(e),r=a=>n(a.matches);return n(s.matches),s.addEventListener("change",r),()=>s.removeEventListener("change",r)},[e]),t}function kg(e,t,n,s){const r=l.useRef(t);r.current=t,l.useEffect(()=>{const a=n===void 0?typeof window>"u"?null:window:"current"in n?n.current??null:n;if(!a?.addEventListener)return;const i=c=>r.current(c);return a.addEventListener(e,i,s),()=>a.removeEventListener(e,i,s)},[e,n,s])}const Ng=JSON.stringify,Sg=e=>JSON.parse(e);function Cg(e,t,n={}){const s=n.serialize??Ng,r=n.deserialize??Sg,a=l.useCallback(()=>{if(typeof window>"u")return t;try{const p=window.localStorage.getItem(e);return p===null?t:r(p)}catch{return t}},[e,t,r]),[i,c]=l.useState(a);l.useEffect(()=>{c(a())},[a]);const u=l.useCallback(p=>{c(f=>{const m=typeof p=="function"?p(f):p;try{typeof window<"u"&&window.localStorage.setItem(e,s(m))}catch{}return m})},[e,s]),d=l.useCallback(()=>{try{typeof window<"u"&&window.localStorage.removeItem(e)}catch{}c(t)},[e,t]);return l.useEffect(()=>{if(typeof window>"u")return;const p=f=>{if(f.key===e){if(f.newValue===null){c(t);return}try{c(r(f.newValue))}catch{}}};return window.addEventListener("storage",p),()=>window.removeEventListener("storage",p)},[e,t,r]),[i,u,d]}function Eg(e=!1){const[t,n]=l.useState(e),s=l.useCallback(()=>n(c=>!c),[]),r=l.useCallback(()=>n(!0),[]),a=l.useCallback(()=>n(!1),[]),i=l.useCallback(c=>n(c),[]);return[t,{toggle:s,setTrue:r,setFalse:a,set:i}]}function Tg(e,t=[],n={}){const{immediate:s=!1}=n,[r,a]=l.useState({status:"idle",data:void 0,error:void 0}),i=l.useRef(e);i.current=e;const c=l.useRef(0),u=l.useRef(!0);l.useEffect(()=>(u.current=!0,()=>{u.current=!1}),[]);const d=l.useCallback(async()=>{const f=++c.current;a(m=>({...m,status:"pending",error:void 0}));try{const m=await i.current();return u.current&&c.current===f&&a({status:"success",data:m,error:void 0}),m}catch(m){throw u.current&&c.current===f&&a({status:"error",data:void 0,error:m}),m}},[]),p=l.useCallback(()=>{c.current++,a({status:"idle",data:void 0,error:void 0})},[]);return l.useEffect(()=>{s&&d().catch(()=>{})},[s,...t]),{status:r.status,data:r.data,error:r.error,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",run:d,reset:p}}function Rg(){const[e,t]=l.useState(()=>typeof navigator>"u"?!0:navigator.onLine);return l.useEffect(()=>{if(typeof window>"u")return;const n=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",n),window.addEventListener("offline",s),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}},[]),e}function Lg(){const[e,t]=l.useState(()=>typeof document>"u"?"visible":document.visibilityState);return l.useEffect(()=>{if(typeof document>"u")return;const n=()=>t(document.visibilityState);return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)},[]),e}function Ig(e,t={}){const[n,s]=l.useState(null),{once:r=!1,root:a,rootMargin:i,threshold:c}=t;return l.useEffect(()=>{const u=e.current;if(!u||typeof IntersectionObserver>"u")return;const d=new IntersectionObserver(([p])=>{p&&(s(p),r&&p.isIntersecting&&d.unobserve(u))},{root:a,rootMargin:i,threshold:c});return d.observe(u),()=>d.disconnect()},[e,r,a,i,c]),n}function Mg(e){const[t,n]=l.useState(null);return l.useEffect(()=>{const s=e.current;if(!s||typeof ResizeObserver>"u")return;const r=new ResizeObserver(a=>{const i=a[0];if(!i)return;const c=i.contentRect;n({width:c.width,height:c.height})});return r.observe(s),()=>r.disconnect()},[e]),t}function Pg(e={}){const{resetAfter:t=1500}=e,[n,s]=l.useState(!1),r=l.useRef(null),a=l.useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null),s(!1)},[]);l.useEffect(()=>()=>a(),[a]);const i=l.useCallback(async c=>{try{if(typeof navigator<"u"&&navigator.clipboard?.writeText)await navigator.clipboard.writeText(c);else if(typeof document<"u"){const u=document.createElement("textarea");u.value=c,u.style.position="fixed",u.style.opacity="0",document.body.appendChild(u),u.select(),document.execCommand("copy"),document.body.removeChild(u)}else return!1;return s(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>s(!1),t),!0}catch{return!1}},[t]);return{copied:n,copy:i,reset:a}}function Ag(e,t){if(e.key.toLowerCase()!==t.key.toLowerCase())return!1;const n=!!t.ctrl,s=!!t.meta,r=!!t.shift,a=!!t.alt;if(t.mod){if(!e.ctrlKey&&!e.metaKey)return!1}else if(e.ctrlKey!==n||e.metaKey!==s)return!1;return!(e.shiftKey!==r||e.altKey!==a)}function Dg(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName.toLowerCase();return t==="input"||t==="textarea"||t==="select"?!0:e.isContentEditable}function Og(e,t,n={}){const{disabled:s=!1,ignoreInput:r=!0}=n;l.useEffect(()=>{if(s||typeof window>"u")return;const a=i=>{r&&Dg(i.target)||Ag(i,e)&&t(i)};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[s,r,e.key,e.ctrl,e.meta,e.shift,e.alt,e.mod,t])}function Fg(){const[e,t]=l.useState(null),[n,s]=l.useState(!1);l.useEffect(()=>{if(typeof window>"u")return;const a=c=>{c.preventDefault(),t(c)},i=()=>{t(null),s(!0)};return window.addEventListener("beforeinstallprompt",a),window.addEventListener("appinstalled",i),()=>{window.removeEventListener("beforeinstallprompt",a),window.removeEventListener("appinstalled",i)}},[]);const r=l.useCallback(async()=>{if(!e)return"unsupported";await e.prompt();const a=await e.userChoice;return t(null),a.outcome==="accepted"&&s(!0),a.outcome},[e]);return{installable:!!e,installed:n,prompt:r}}const Gt=["mousemove","mousedown","keydown","touchstart","wheel","scroll"];function Bg(e=6e4){const[t,n]=l.useState(!1);return l.useEffect(()=>{if(typeof window>"u")return;let s=setTimeout(()=>n(!0),e);function r(){n(!1),clearTimeout(s),s=setTimeout(()=>n(!0),e)}for(const a of Gt)window.addEventListener(a,r,{passive:!0});return()=>{clearTimeout(s);for(const a of Gt)window.removeEventListener(a,r)}},[e]),t}function zg(e={}){const{watch:t=!1,disabled:n=!1,...s}=e,[r,a]=l.useState({loading:!n,error:null,coords:null,timestamp:null});return l.useEffect(()=>{if(n||typeof navigator>"u"||!navigator.geolocation){a(u=>({...u,loading:!1}));return}const i=u=>{a({loading:!1,error:null,coords:u.coords,timestamp:u.timestamp})},c=u=>{a(d=>({...d,loading:!1,error:u}))};if(t){const u=navigator.geolocation.watchPosition(i,c,s);return()=>navigator.geolocation.clearWatch(u)}navigator.geolocation.getCurrentPosition(i,c,s)},[n,t,s.enableHighAccuracy,s.maximumAge,s.timeout]),r}function Wg(e){l.useEffect(()=>{if(!e||typeof document>"u")return;const t=document.body,n=t.style.overflow;return t.style.overflow="hidden",()=>{t.style.overflow=n}},[e])}function qg(e){const t=l.useRef(e);return t.current=e,l.useCallback((...n)=>t.current(...n),[])}function kt(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||typeof t!="object"||e===null||t===null||Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((r,a)=>kt(r,t[a]));const n=Object.keys(e),s=Object.keys(t);return n.length!==s.length?!1:n.every(r=>kt(e[r],t[r]))}function Ug(e){const t=l.useRef(e);return kt(t.current,e)||(t.current=e),t.current}function Hg(e){const t=l.useRef(void 0);return l.useEffect(()=>{t.current=e},[e]),t.current}function Kg(e,t){const n=l.useRef(e);n.current=e,l.useEffect(()=>{if(t===null)return;const s=setInterval(()=>n.current(),t);return()=>clearInterval(s)},[t])}function Gg(e,t){const n=l.useRef(e);n.current=e,l.useEffect(()=>{if(t===null)return;const s=setTimeout(()=>n.current(),t);return()=>clearTimeout(s)},[t])}function Jg(e,t){const[n,s]=l.useState(e),r=l.useRef(0),a=l.useRef(null);return l.useEffect(()=>{const i=Date.now(),c=i-r.current;return c>=t?(r.current=i,s(e)):(a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{r.current=Date.now(),s(e)},t-c)),()=>{a.current&&clearTimeout(a.current)}},[e,t]),n}function Qg(){const[e,t]=l.useState(()=>typeof window>"u"?{width:0,height:0}:{width:window.innerWidth,height:window.innerHeight});return l.useEffect(()=>{if(typeof window>"u")return;const n=()=>t({width:window.innerWidth,height:window.innerHeight});return n(),window.addEventListener("resize",n,{passive:!0}),()=>window.removeEventListener("resize",n)},[]),e}function Vg(e){const[t,n]=l.useState(!1);return l.useEffect(()=>{const s=e.current;if(!s)return;const r=()=>n(!0),a=()=>n(!1);return s.addEventListener("mouseenter",r),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",r),s.removeEventListener("mouseleave",a)}},[e]),t}function Xg(e,t,n={}){const{delay:s=500,moveThreshold:r=10}=n,a=l.useRef(t);a.current=t,l.useEffect(()=>{const i=e.current;if(!i)return;let c=null,u=0,d=0;const p=()=>{c&&(clearTimeout(c),c=null)},f=h=>{u=h.clientX,d=h.clientY,p(),c=setTimeout(()=>{c=null,a.current()},s)},m=h=>{if(c===null)return;const _=h.clientX-u,b=h.clientY-d;Math.hypot(_,b)>r&&p()};return i.addEventListener("pointerdown",f),i.addEventListener("pointermove",m),i.addEventListener("pointerup",p),i.addEventListener("pointercancel",p),i.addEventListener("pointerleave",p),()=>{p(),i.removeEventListener("pointerdown",f),i.removeEventListener("pointermove",m),i.removeEventListener("pointerup",p),i.removeEventListener("pointercancel",p),i.removeEventListener("pointerleave",p)}},[e,s,r])}const Yg="tempest_wrapper_iB6ka",Zg="tempest_search_2y-yM",eb="tempest_sortButton_9p6w4",tb="tempest_sortIndicator_bZMlH",et={wrapper:Yg,search:Zg,sortButton:eb,sortIndicator:tb};function nb(e,t){return e==null&&t==null?0:e==null?-1:t==null?1:typeof e=="number"&&typeof t=="number"?e-t:e instanceof Date&&t instanceof Date?e.getTime()-t.getTime():typeof e=="boolean"&&typeof t=="boolean"?Number(e)-Number(t):String(e).localeCompare(String(t),void 0,{numeric:!0})}function sb({data:e,columns:t,pageSize:n=10,searchable:s=!1,searchKeys:r,initialSort:a,rowKey:i=(p,f)=>f,emptyMessage:c,className:u,...d}){const[p,f]=l.useState(""),[m,h]=l.useState(a??null),{page:_,setPage:b}=gn(1,n),y=l.useMemo(()=>r&&r.length>0?r:t.filter($=>{const j=e.find(L=>L[$.key]!=null),S=j?j[$.key]:void 0;return typeof S=="string"||typeof S=="number"}).map($=>$.key),[r,t,e]),g=l.useMemo(()=>{const $=p.trim().toLowerCase();return!$||!s?e:e.filter(j=>y.some(S=>{const L=j[S];return L!=null&&String(L).toLowerCase().includes($)}))},[e,p,s,y]),w=l.useMemo(()=>{if(!m)return g;const $=m.direction==="asc"?1:-1;return[...g].sort((j,S)=>nb(j[m.key],S[m.key])*$)},[g,m]),x=Math.max(1,Math.ceil(w.length/n));l.useEffect(()=>{_>x&&b(x)},[_,x,b]);const k=Math.min(_,x),T=l.useMemo(()=>{const $=(k-1)*n;return w.slice($,$+n)},[w,k,n]);function M($){h(j=>!j||j.key!==$?{key:$,direction:"asc"}:j.direction==="asc"?{key:$,direction:"desc"}:null)}const P=l.useMemo(()=>t.map($=>{const S=m?.key===$.key?m?.direction==="asc"?" ▲":" ▼":"",L=$.sortable?o.jsxs("button",{type:"button",className:et.sortButton,onClick:()=>M($.key),"aria-label":`Ordenar por ${typeof $.header=="string"?$.header:String($.key)}`,children:[$.header,o.jsx("span",{className:et.sortIndicator,"aria-hidden":!0,children:S})]}):$.header;return{key:String($.key),header:L,align:$.align,priority:$.priority,width:$.width,render:$.render?N=>$.render(N):N=>N[$.key]??null}}),[t,m]);return o.jsxs("div",{className:v(et.wrapper,u),...d,children:[s&&o.jsx(ln,{value:p,onChange:$=>{f($),b(1)},wrapperClassName:et.search}),o.jsx(un,{columns:P,data:T,rowKey:($,j)=>i($,(k-1)*n+j),emptyMessage:c}),x>1&&o.jsx(rn,{page:k,totalPages:x,onPageChange:b,totalItems:w.length})]})}function rb(e){return new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(e)}function ob(e){const t=typeof e=="string"?new Date(e):e;return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat("pt-BR").format(t)}function ab(e){const t=typeof e=="string"?new Date(e):e;return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat("pt-BR",{dateStyle:"short",timeStyle:"short"}).format(t)}function bn(e){const t=e.replace(/\D/g,"").slice(0,11);return t.length<=10?t.replace(/(\d{2})(\d)/,"($1) $2").replace(/(\d{4})(\d)/,"$1-$2"):t.replace(/(\d{2})(\d)/,"($1) $2").replace(/(\d{5})(\d)/,"$1-$2")}function yn(e){return e.replace(/\D/g,"").slice(0,11).replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})$/,"$1-$2")}function ib(e){return new Intl.NumberFormat("pt-BR",{style:"percent",minimumFractionDigits:1,maximumFractionDigits:1}).format(e)}const cb={get(e,t){if(typeof window>"u")return t;try{const n=window.localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}},set(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,JSON.stringify(t))}catch{}},remove(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(e)}catch{}}};function lb(e){return e.normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function ub(e,t,n="…"){if(e.length<=t)return e;const s=Math.max(0,t-n.length);return e.slice(0,s).trimEnd()+n}function db(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function pb(e){const t=e.replace(/[^a-zA-Z0-9]+/g," ").trim().split(/\s+/).filter(Boolean);return t.length===0?"":t.map((n,s)=>{const r=n.toLowerCase();return s===0?r:r.charAt(0).toUpperCase()+r.slice(1)}).join("")}function mb(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase()}function fb(e,t,n){return e===1?t:n??`${t}s`}function hb(e,t){const n={};for(const s of e){const r=t(s);(n[r]??=[]).push(s)}return n}function _b(e,t){const n=new Set,s=[];for(const r of e){const a=t(r);n.has(a)||(n.add(a),s.push(r))}return s}function gb(e,t){if(t<1)throw new RangeError(`chunk size must be >= 1, received ${t}`);const n=[];for(let s=0;s<e.length;s+=t)n.push(e.slice(s,s+t));return n}function bb(e,t,n=1){const s=[];if(n===0)return s;if(n>0)for(let r=e;r<t;r+=n)s.push(r);else for(let r=e;r>t;r+=n)s.push(r);return s}function qe(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function yb(e,t){const n={};for(const s of t)Object.prototype.hasOwnProperty.call(e,s)&&(n[s]=e[s]);return n}function wb(e,t){const n=new Set(t),s={};for(const r of Object.keys(e))n.has(r)||(s[r]=e[r]);return s}function wn(e,t){if(!qe(e)||!qe(t))return t===void 0?e:t;const n={...e};for(const s of Object.keys(t)){const r=t[s],a=n[s];qe(a)&&qe(r)?n[s]=wn(a,r):n[s]=r}return n}function vb(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:e instanceof Map||e instanceof Set?e.size===0:qe(e)?Object.keys(e).length===0:!1}function xb(e){return e!=null}function jb(e){return typeof e=="string"}function $b(e){return typeof e=="number"&&!Number.isNaN(e)}function kb(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Nb(e,t){throw new Error(t??`Unexpected value: ${String(e)}`)}function Sb(e,t){let n;const s=(...r)=>{n!==void 0&&clearTimeout(n),n=setTimeout(()=>{n=void 0,e(...r)},t)};return s.cancel=()=>{n!==void 0&&(clearTimeout(n),n=void 0)},s}function Cb(e,t){let n,s,r=0;const a=c=>{r=Date.now(),e(...c)},i=(...c)=>{const u=Date.now(),d=t-(u-r);d<=0?(n!==void 0&&(clearTimeout(n),n=void 0),a(c)):(s=c,n===void 0&&(n=setTimeout(()=>{if(n=void 0,s!==void 0){const p=s;s=void 0,a(p)}},d)))};return i.cancel=()=>{n!==void 0&&(clearTimeout(n),n=void 0),s=void 0,r=0},i}function Eb(e){let t=!1,n;return(...s)=>(t||(t=!0,n=e(...s)),n)}function Tb(e){let t=!1,n,s;const r=a=>{if(!t||a.length!==n.length)return!1;for(let i=0;i<a.length;i++)if(!Object.is(a[i],n[i]))return!1;return!0};return(...a)=>(r(a)||(n=a,s=e(...a),t=!0),s)}function Rb(e){return new Promise(t=>setTimeout(t,e))}function Lb(e,t,n){return new Promise((s,r)=>{const a=setTimeout(()=>{const i=new Error(n??`Operation timed out after ${t}ms`);i.name="TimeoutError",r(i)},t);e.then(i=>{clearTimeout(a),s(i)},i=>{clearTimeout(a),r(i)})})}function St(e){let t;if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")t=crypto.randomUUID();else{const n=Date.now().toString(36),s=Math.random().toString(36).slice(2,10);t=`${n}-${s}`}return e?`${e}-${t}`:t}class it extends Error{status;detail;code;requestId;body;constructor(t){super(t.detail),this.name="TempestApiError",this.status=t.status,this.detail=t.detail,this.code=t.code,this.requestId=t.requestId,this.body=t.body}}function Ib(e){return typeof e=="object"&&e!==null&&typeof e.status=="number"&&typeof e.detail=="string"}function Ct(e,t,n,s){const r=typeof t=="object"&&t!==null?t:null,a=r?.detail??r?.message??`Erro ${e}`,i=typeof r?.code=="string"?r.code:void 0,c=typeof r?.details=="object"&&r.details!==null?r.details:null,u=(typeof c?.request_id=="string"?c.request_id:void 0)??n?.get("X-Request-ID")??s??void 0;return{status:e,detail:String(a),code:i,requestId:u??void 0,retryAfter:Mb(n?.get("Retry-After")),body:t}}function Mb(e){if(!e)return;const t=e.trim();if(/^\d+$/.test(t))return Number(t);const n=Date.parse(t);if(!Number.isNaN(n))return Math.max(0,Math.round((n-Date.now())/1e3))}function Pb(e,t,n){const s=new URL(t,e.endsWith("/")?e:`${e}/`);if(n)for(const[r,a]of Object.entries(n))a!=null&&s.searchParams.set(r,String(a));return s.toString()}function Ab(e){return typeof FormData<"u"&&e instanceof FormData}async function Jt(e,t){let n=null;try{n=await e.clone().json()}catch{try{n=await e.text()}catch{n=null}}return new it(Ct(e.status,n,e.headers,t))}function nt(e){const t=e.fetcher??globalThis.fetch.bind(globalThis);function n(){const i=e.getToken?.();return i?{Authorization:`Bearer ${i}`}:{}}async function s(i,c,u){const{body:d,params:p,headers:f,...m}=c,h=Ab(d),_={...h?{}:{"Content-Type":"application/json"},...u?{"X-Request-ID":u}:{},...e.headers,...n(),...f},b={...m,headers:_,credentials:e.withCredentials?"include":m.credentials,body:d==null?void 0:h?d:JSON.stringify(d)};return t(Pb(e.baseURL,i,p),b)}async function r(i,c={}){const u=e.requestId?e.requestId():St();let d=await s(i,c,u);if(d.status===401)if(e.refresh)try{await e.refresh(),d=await s(i,c,u)}catch{throw await e.onUnauthorized?.(d),await Jt(d,u)}else await e.onUnauthorized?.(d);if(!d.ok)throw await Jt(d,u);return d.status===204?void 0:(d.headers.get("content-type")??"").includes("application/json")?await d.json():await d.text()}async function a(i,c,u="POST"){return r(i,{method:u,body:c})}return{request:r,get:(i,c)=>r(i,{...c,method:"GET"}),post:(i,c)=>r(i,{...c,method:"POST"}),put:(i,c)=>r(i,{...c,method:"PUT"}),patch:(i,c)=>r(i,{...c,method:"PATCH"}),delete:(i,c)=>r(i,{...c,method:"DELETE"}),upload:a}}function Db(e,t,n){const s=e.safeParse(t);if(s.success)return s.data;if(typeof process<"u"&&(process.env?.NODE_ENV==="development"||process.env?.NODE_ENV==="test")){const a=s.error.issues.map(i=>` - ${i.path.join(".")||"<root>"}: ${i.message}`).join(`
2
2
  `);throw new Error(`[parseResponse] Contract drift on ${n}:
3
3
  ${a}
4
4
 
5
- Raw payload: ${JSON.stringify(t,null,2)}`)}throw new Error(`Resposta inválida do servidor (${n}).`)}function nb(e){if(!e)return null;try{return JSON.parse(e)}catch{return e}}function sb(e){const{url:t,body:n,method:s="POST",headers:r={},getToken:a,withCredentials:i=!1,onProgress:c,signal:u,parser:d=JSON.parse}=e;return new Promise((p,f)=>{if(u?.aborted){f(new DOMException("Aborted","AbortError"));return}const m=new XMLHttpRequest;m.open(s,t),m.withCredentials=i;const h=a?.(),_={...r};h&&!("Authorization"in _)&&(_.Authorization=`Bearer ${h}`);for(const[y,g]of Object.entries(_))m.setRequestHeader(y,g);c&&(m.upload.onprogress=y=>{c({loaded:y.loaded,total:y.total,fraction:y.lengthComputable?y.loaded/y.total:null,lengthComputable:y.lengthComputable})});function b(){m.abort()}u?.addEventListener("abort",b),m.onload=()=>{u?.removeEventListener("abort",b);const y=m.status>=200&&m.status<300,g=m.getResponseHeader("content-type")??"";if(!y){const v=nb(m.responseText),x=(typeof v=="object"&&v!==null?v.detail??v.message:void 0)??`Erro ${m.status}`,N={status:m.status,detail:String(x),body:v};f(N);return}if(m.status===204||!m.responseText){p(void 0);return}if(g.includes("application/json"))try{p(d(m.responseText))}catch(v){f(v)}else p(m.responseText)},m.onerror=()=>{u?.removeEventListener("abort",b),f({status:0,detail:"Falha de rede no upload."})},m.onabort=()=>{u?.removeEventListener("abort",b),f(new DOMException("Aborted","AbortError"))},m.send(n)})}function rb(e,t){return new Promise((n,s)=>{if(t?.aborted){s(new DOMException("Aborted","AbortError"));return}const r=setTimeout(n,e);t?.addEventListener("abort",()=>{clearTimeout(r),s(new DOMException("Aborted","AbortError"))},{once:!0})})}async function ob(e,t={}){const{retries:n=3,initialDelay:s=300,maxDelay:r=1e4,shouldRetry:a=()=>!0,onRetry:i,signal:c}=t;let u=0,d;for(;u<n;){if(c?.aborted)throw new DOMException("Aborted","AbortError");try{return await e()}catch(p){if(d=p,u+=1,u>=n||!a(p,u))throw p;const f=Math.min(s*2**(u-1),r);i?.({attempt:u,delay:f,error:p}),await rb(f,c)}}throw d}function ab(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16;return(e==="x"?Math.floor(t):Math.floor(t)&3|8).toString(16)})}function ib(e,t){const{interval:n,disabled:s=!1,stopWhen:r,onError:a}=t,[i,c]=l.useState(null),[u,d]=l.useState(null),[p,f]=l.useState(!s),m=l.useRef(s),h=l.useRef(!1),_=l.useRef(null);async function b(){if(!(m.current||h.current)){h.current=!0;try{const y=await e();if(m.current)return;c(y),d(null),r?.(y)&&(m.current=!0)}catch(y){m.current||(d(y),a?.(y))}finally{h.current=!1,f(!1),m.current||(_.current=setTimeout(b,n))}}}return l.useEffect(()=>{if(m.current=s,s){_.current&&clearTimeout(_.current);return}return f(!0),b(),()=>{m.current=!0,_.current&&clearTimeout(_.current)}},[n,s]),{data:i,error:u,loading:p,stop:()=>{m.current=!0,_.current&&clearTimeout(_.current)},start:()=>{m.current&&(m.current=!1,b())}}}function cb(e={}){const t=e.name??"tempest-auth",n=e.storage==="session"?()=>sessionStorage:()=>localStorage;return _t.create()(tt.persist(s=>({user:e.initialUser??null,token:e.initialToken??null,isAuthenticated:!!e.initialToken,setSession:({user:r,token:a})=>s({user:r,token:a,isAuthenticated:!0}),setUser:r=>s({user:r}),setToken:r=>s({token:r,isAuthenticated:!!r}),logout:()=>s({user:null,token:null,isAuthenticated:!1})}),{name:t,storage:tt.createJSONStorage(n),partialize:s=>({user:s.user,token:s.token}),onRehydrateStorage:()=>s=>{s&&(s.isAuthenticated=!!s.token)}}))}function lb({isAuthenticated:e,children:t,fallback:n}){return o.jsx(o.Fragment,{children:e?t:n})}function qt(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.length%4===0?"":"=".repeat(4-t.length%4);return typeof atob<"u"?atob(t+n):Buffer.from(t+n,"base64").toString("binary")}function fn(e){const t=e.split(".");if(t.length!==3)throw new Error("Invalid JWT: must contain three segments.");const[n,s,r]=t;try{return{header:JSON.parse(qt(n)),payload:JSON.parse(qt(s)),signature:r}}catch{throw new Error("Invalid JWT: header or payload is not valid JSON.")}}function ub(e,t=0){try{const{payload:n}=fn(e);if(typeof n.exp!="number")return!0;const s=Math.floor(Date.now()/1e3);return n.exp<=s+t}catch{return!0}}function hn(e,t={}){const{retries:n=3,initialDelay:s=400,reloadOnFinalFailure:r=!0}=t;async function a(i=1){try{return await e()}catch(c){if(i>=n)throw r&&typeof window<"u"&&window.location.reload(),c;return await new Promise(u=>setTimeout(u,s*2**(i-1))),a(i+1)}}return l.lazy(a)}function db(e){let t=null;return()=>t||(t=(async()=>{try{await e()}finally{t=null}})(),t)}function pb({component:e,onSuccess:t,onError:n,locale:s,theme:r,text:a,shape:i,size:c,disableOneTap:u,width:d,className:p,style:f}){return o.jsx("div",{className:p,style:f,children:e({onSuccess:m=>{if(!m.credential){n?.({provider:"google",message:"Google returned no credential",raw:m});return}return t({idToken:m.credential,provider:"google",raw:m})},onError:()=>{n?.({provider:"google",message:"Google login failed"})},locale:s,theme:r,text:a,shape:i,size:c,useOneTap:!u,width:d})})}function mb(e){const{exchange:t,onSuccess:n,onError:s}=e,[r,a]=l.useState(null),[i,c]=l.useState(null),[u,d]=l.useState("pending"),p=l.useRef(!1);return l.useEffect(()=>{if(p.current)return;p.current=!0;let f=!1;return t().then(m=>{if(!f)return a(m),d("success"),n?.(m)}).catch(m=>{f||(c(m),d("error"),s?.(m))}),()=>{f=!0}},[t,n,s]),{loading:u==="pending",data:r,error:i,status:u}}const _n={SHORT:30*1e3,DEFAULT:300*1e3,LONG:1800*1e3,INFINITE:1/0},gn={SHORT:300*1e3,DEFAULT:1800*1e3,LONG:3600*1e3},fb={REALTIME:5*1e3,FAST:30*1e3,DEFAULT:60*1e3,SLOW:300*1e3};function hb(e,t){const n={all:[e]};for(const[s,r]of Object.entries(t))typeof r=="function"?n[s]=(...a)=>[e,...r(...a)]:n[s]=[e,...r];return n}function bn({children:e,client:t,defaultOptions:n}){const[s]=l.useState(()=>t??new Nt.QueryClient({defaultOptions:{queries:{staleTime:_n.DEFAULT,gcTime:gn.DEFAULT,retry:1,refetchOnWindowFocus:!1,...n?.queries??{}},mutations:{retry:0,...n?.mutations??{}}}}));return o.jsx(Nt.QueryClientProvider,{client:s,children:e})}function yn({when:e,redirectTo:t="/",replace:n=!0,children:s}){return o.jsx(o.Fragment,{children:e?s:o.jsx(L.Navigate,{to:t,replace:n})})}function _b(e){return e}const Gt=new WeakMap;function gb(e){let t=Gt.get(e);return t||(t=hn(e.lazy),Gt.set(e,t)),t}function bb({guard:e,redirectTo:t,children:n}){const s=typeof e=="function"?e():e;return o.jsx(yn,{when:s,redirectTo:t,children:n})}function wn(e){return e.map((t,n)=>{let s=t.element;if(t.lazy){const r=gb(t);s=o.jsx(r,{})}return t.guard!==void 0&&(s=o.jsx(bb,{guard:t.guard,redirectTo:t.redirectTo,children:s})),t.index?o.jsx(L.Route,{index:!0,element:s},`index-${n}`):o.jsx(L.Route,{path:t.path,element:s,caseSensitive:t.caseSensitive,children:t.children?wn(t.children):null},t.path??`route-${n}`)})}const yb={browser:L.BrowserRouter,hash:L.HashRouter,memory:L.MemoryRouter};function wb({routes:e,router:t="browser",basename:n,initialEntries:s,fallback:r=null}){const a=l.useMemo(()=>wn(e),[e]),i=yb[t],c=t==="memory"?{basename:n,initialEntries:s}:{basename:n};return o.jsx(i,{...c,children:o.jsx(l.Suspense,{fallback:r,children:o.jsx(L.Routes,{children:a})})})}function vb(e,t={}){if(!t.persist)return _t.create()(e);const{name:n,storage:s="local",partialize:r,version:a,migrate:i}=t.persist,c=s==="session"?()=>sessionStorage:()=>localStorage;return _t.create()(tt.persist(e,{name:n,storage:tt.createJSONStorage(c),...r?{partialize:r}:{},...a!==void 0?{version:a}:{},...i?{migrate:i}:{}}))}function xb(e){const t=e;t.use={};for(const n of Object.keys(e.getState()))t.use[n]=()=>e(s=>s[n]);return t}const vn=l.createContext(null);function Kt(e){return e==="dark"||e==="light"?e:typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function jb(e){if(!e||typeof window>"u")return null;try{const t=window.localStorage.getItem(e);return t==="light"||t==="dark"||t==="system"?t:null}catch{return null}}function xn({children:e,defaultTheme:t="system",storageKey:n="tempest-theme",target:s,attribute:r="data-tempest-theme"}){const[a,i]=l.useState(()=>jb(n)??t),[c,u]=l.useState(()=>Kt(a)),d=l.useRef(s);d.current=s,l.useEffect(()=>{const h=d.current?.()??document.documentElement;if(!h)return;const _=Kt(a);h.setAttribute(r,_),u(_)},[a,r]),l.useEffect(()=>{if(a!=="system"||typeof window>"u")return;const h=window.matchMedia("(prefers-color-scheme: dark)"),_=()=>{const b=d.current?.()??document.documentElement,y=h.matches?"dark":"light";b?.setAttribute(r,y),u(y)};return h.addEventListener("change",_),()=>h.removeEventListener("change",_)},[a,r]);const p=l.useCallback(h=>{if(i(h),n&&typeof window<"u")try{window.localStorage.setItem(n,h)}catch{}},[n]),f=l.useCallback(()=>{p(c==="dark"?"light":"dark")},[c,p]),m=l.useMemo(()=>({theme:a,resolvedTheme:c,setTheme:p,toggle:f}),[a,c,p,f]);return o.jsx(vn.Provider,{value:m,children:e})}function $b(){const e=l.useContext(vn);if(!e)throw new Error("useTheme must be used inside a <ThemeProvider>");return e}function Jt(e,t){return t?e.replace(/\{(\w+)\}/g,(n,s)=>{const r=t[s];return r===void 0?`{${s}}`:String(r)}):e}function ft(e,t,n,s){const r=e[t]?.[s];if(r!==void 0)return r;if(n){const a=e[n]?.[s];if(a!==void 0)return a}return null}function $t(e){const{locale:t,fallbackLocale:n=null,messages:s}=e;function r(u,d){const p=ft(s,t,n,u);return p===null?u:Jt(p,d)}function a(u,d,p){const m=ft(s,t,n,`${u}${d===1?"_one":"_other"}`)??ft(s,t,n,u);return m===null?u:Jt(m,{count:d,...p??{}})}function i(u,d){return new Intl.NumberFormat(t,d).format(u)}function c(u,d){const p=typeof u=="string"?new Date(u):u;return Number.isNaN(p.getTime())?"":new Intl.DateTimeFormat(t,d).format(p)}return{locale:t,fallbackLocale:n,t:r,plural:a,formatNumber:i,formatDate:c,withLocale:u=>$t({locale:u,fallbackLocale:n??void 0,messages:s})}}const jn=l.createContext(null);function kb(e,t){if(!e||typeof window>"u")return null;try{const n=window.localStorage.getItem(e);return n&&t.includes(n)?n:null}catch{return null}}function $n({children:e,locale:t,fallbackLocale:n,messages:s,storageKey:r="tempest-locale"}){const a=l.useMemo(()=>Object.keys(s),[s]),[i,c]=l.useState(()=>kb(r,a)??t);l.useEffect(()=>{typeof document<"u"&&document.documentElement.setAttribute("lang",i)},[i]);const u=l.useCallback(p=>{if(c(p),r&&typeof window<"u")try{window.localStorage.setItem(r,p)}catch{}},[r]),d=l.useMemo(()=>({...$t({locale:i,fallbackLocale:n,messages:s}),setLocale:u,availableLocales:a}),[i,n,s,u,a]);return o.jsx(jn.Provider,{value:d,children:e})}function kn(){const e=l.useContext(jn);if(!e)throw new Error("useI18n must be used inside an <I18nProvider>");return e}function Nb(){return kn().t}function Sb(e=[],t=[]){if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!0;return!1}class Nn extends l.Component{state={error:null};static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,n){this.props.onError?.(t,n)}componentDidUpdate(t){this.state.error&&Sb(t.resetKeys,this.props.resetKeys)&&this.reset()}reset=()=>{this.setState({error:null})};render(){const{error:t}=this.state;if(!t)return this.props.children;const{fallback:n}=this.props;return typeof n=="function"?n({error:t,reset:this.reset}):n}}function Cb({children:e,query:t,theme:n,i18n:s,errorBoundary:r}){let a=e;return s&&(a=o.jsx($n,{...s,children:a})),n!==!1&&(a=o.jsx(xn,{...n||{},children:a})),t!==!1&&(a=o.jsx(bn,{...t||{},children:a})),r&&(a=o.jsx(Nn,{...r,children:a})),o.jsx(o.Fragment,{children:a})}function Eb(e){try{return JSON.parse(e)}catch{return e}}function Sn(e,t={}){const{withCredentials:n=!1,namedEvents:s=[],heartbeatEvents:r=["ping"],maxRetries:a=10,initialBackoff:i=1e3,maxBackoff:c=3e4,parser:u=Eb,onOpen:d,onMessage:p,onError:f,onStatusChange:m}=t;let h=null,_=null,b=0,y="idle",g=!1;function v(j){y!==j&&(y=j,m?.(j))}function x(j,$){r.includes(j)||p?.({event:j,data:u($.data),id:$.lastEventId||void 0,raw:$})}function N(){if(g)return;if(b>=a){v("error");return}const j=Math.min(i*2**b,c);b+=1,_=setTimeout(T,j)}function T(){if(g)return;h&&h.close(),v("connecting");const j=new EventSource(e,{withCredentials:n});h=j,j.onopen=()=>{b=0,v("open"),d?.()},j.onmessage=$=>x("message",$);for(const $ of s)j.addEventListener($,S=>x($,S));for(const $ of r)j.addEventListener($,()=>{});j.onerror=$=>{f?.($),j.close(),h=null,v("closed"),N()}}function M(){g=!0,_&&(clearTimeout(_),_=null),b=0,h&&(h.close(),h=null),v("closed")}function P(){_&&(clearTimeout(_),_=null),b=0,g=!1,T()}return T(),{close:M,reconnect:P,get status(){return y}}}function Tb(e,t={}){const{enabled:n=!0,onMessage:s,...r}=t,[a,i]=l.useState("idle"),[c,u]=l.useState(null),d=l.useRef(null),p=l.useRef(s);return p.current=s,l.useEffect(()=>{if(!n||!e){i("idle");return}const f=Sn(e,{...r,onStatusChange:i,onMessage:m=>{u(m),p.current?.(m)}});return d.current=f.reconnect,()=>{f.close(),d.current=null}},[e,n]),{status:a,lastMessage:c,reconnect:()=>d.current?.()}}function Cn(e){const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),s=window.atob(n),r=new ArrayBuffer(s.length),a=new Uint8Array(r);for(let i=0;i<s.length;i++)a[i]=s.charCodeAt(i);return a}function He(){return typeof window<"u"&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window}class jt extends Error{constructor(){super("Web Push não suportado neste navegador."),this.name="WebPushUnsupportedError"}}class En extends Error{constructor(){super("Permissão de notificação negada pelo usuário."),this.name="WebPushPermissionDeniedError"}}class Tn{config;constructor(t){this.config=t}static isSupported(){return He()}async registration(){if(!He())throw new jt;return this.config.getRegistration?await this.config.getRegistration():await navigator.serviceWorker.ready}permission(){return typeof Notification>"u"?"unsupported":Notification.permission}async requestPermission(){if(typeof Notification>"u")throw new jt;return Notification.requestPermission()}async getSubscription(){return(await this.registration()).pushManager.getSubscription()}async isSubscribed(){return He()?await this.getSubscription()!==null:!1}async subscribe(){if(await this.requestPermission()!=="granted")throw new En;const n=await this.registration(),s=await n.pushManager.getSubscription();if(s)return await this.config.onSubscribe(s.toJSON()),s;const r=await n.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:Cn(this.config.vapidPublicKey)});return await this.config.onSubscribe(r.toJSON()),r}async unsubscribe(){const t=await this.getSubscription();return t?(this.config.onUnsubscribe&&await this.config.onUnsubscribe(t.toJSON()),t.unsubscribe()):!1}}function Rb(e){const t=l.useRef(e);t.current=e;const n=l.useMemo(()=>new Tn({vapidPublicKey:e.vapidPublicKey,onSubscribe:b=>t.current.onSubscribe(b),onUnsubscribe:b=>t.current.onUnsubscribe?.(b),getRegistration:e.getRegistration}),[e.vapidPublicKey,e.getRegistration]),[s]=l.useState(()=>He()),[r,a]=l.useState(()=>n.permission()),[i,c]=l.useState(!1),[u,d]=l.useState(!1),[p,f]=l.useState(null),m=l.useCallback(async()=>{if(s){a(n.permission());try{const b=await n.isSubscribed();c(b)}catch(b){f(b instanceof Error?b:new Error(String(b)))}}},[n,s]);l.useEffect(()=>{m()},[m]);const h=l.useCallback(async()=>{if(s){d(!0),f(null);try{await n.subscribe(),c(!0),a(n.permission())}catch(b){throw f(b instanceof Error?b:new Error(String(b))),b}finally{d(!1)}}},[n,s]),_=l.useCallback(async()=>{if(s){d(!0),f(null);try{await n.unsubscribe(),c(!1)}catch(b){throw f(b instanceof Error?b:new Error(String(b))),b}finally{d(!1)}}},[n,s]);return{supported:s,permission:r,subscribed:i,loading:u,error:p,subscribe:h,unsubscribe:_,refresh:m}}function kt(){let e=null;async function t(s,{volume:r=1,loop:a=!1,autoplay:i=!0,stopPrevious:c=!1,onEnded:u,onError:d}={}){try{c&&e&&(e.pause(),e.currentTime=0);const p=new Audio(s);return p.volume=Math.max(0,Math.min(1,r)),p.loop=a,p.preload="auto",u&&(p.onended=u),d&&(p.onerror=f=>d(f)),e=p,i&&await p.play(),p}catch(p){return d?.(p),null}}function n(){e&&(e.pause(),e.currentTime=0)}return{play:t,stop:n,current:()=>e}}let ht=null;function Rn(){return ht||(ht=kt()),ht}async function Lb(e,t){return Rn().play(e,t)}function Mb(){Rn().stop()}function Ib(){const e=l.useRef(null),[t,n]=l.useState(!1);e.current||(e.current=kt()),l.useEffect(()=>()=>{e.current?.stop()},[]);const s=l.useCallback(async(a,i)=>{await e.current.play(a,i)&&n(!0)},[]),r=l.useCallback(()=>{e.current?.stop()},[]);return{play:s,stop:r,unlocked:t}}class Db extends qn{store;constructor(t,n,s,r){super(t),this.version(n).stores({[s]:r}),this.store=this.table(s)}}function Pb(e){const{databaseName:t,version:n,tableName:s,indexes:r,keyPath:a="id",ownerField:i}=e,c=new Db(t,n,s,r),u=c.store;function d(f,m){return!i||!m?f:{...f,[i]:m}}async function p(f,m={}){const{orderBy:h=a,reverse:_=!1,limit:b,offset:y,filter:g}=m;let v=i&&f?u.where(i).equals(f):u.toCollection();g&&(v=v.filter(g));let x=h===a?await v.toArray():await v.sortBy(h);return _&&(x=x.reverse()),y&&(x=x.slice(y)),typeof b=="number"&&(x=x.slice(0,b)),x}return{put:(f,m)=>u.put(d(f,m)),bulkPut:(f,m)=>u.bulkPut(f.map(h=>d(h,m))),get:f=>u.get(f),list:p,update:(f,m)=>u.update(f,m),updateMany:async(f,m)=>{const h=m;return i&&f?u.where(i).equals(f).modify(h):u.toCollection().modify(h)},delete:f=>u.delete(f),clear:async f=>{if(i&&f){await u.where(i).equals(f).delete();return}await u.clear()},count:f=>i&&f?u.where(i).equals(f).count():u.count(),raw:u,db:c}}function Ab(){const[,e]=l.useState(null);return l.useCallback(t=>{e(()=>{throw t instanceof Error?t:new Error(String(t))})},[])}function Ob({name:e,label:t,helperText:n,required:s,control:r,children:a}){const i=re.useFormContext(),c=r??i?.control;if(!c)throw new Error("FormField requires either a `control` prop or a <FormProvider> in the tree.");return o.jsx(re.Controller,{name:e,control:c,render:({field:u,fieldState:d})=>{if(!l.isValidElement(a))return a;const p=d.error?.message;return l.cloneElement(a,{name:u.name,value:u.value,onChange:u.onChange,onBlur:u.onBlur,ref:u.ref,label:t,helperText:p?void 0:n,error:p,required:s,"aria-invalid":!!p})}})}function Fb(e,t){const n=e.safeParse(t);if(n.success)return{success:!0,data:n.data,errors:{}};const s={};for(const r of n.error.issues){const a=r.path.length===0?"_root":r.path.join(".");a in s||(s[a]=r.message)}return{success:!1,errors:s}}function Ln(e){return async(t,n,s)=>{const r=e.safeParse(t);if(r.success)return{values:r.data,errors:{}};const a={},i=s.criteriaMode??"firstError";for(const c of r.error.issues){const u=c.path.length===0?"_root":c.path.join(".");i==="firstError"&&a[u]||(a[u]={type:c.code,message:c.message})}return{values:{},errors:a}}}function Bb(e,t={}){return re.useForm({...t,resolver:Ln(e)})}function Ge(e){return e.replace(/\D/g,"")}function zb(e){const t=Ge(e);if(t.length!==11||/^(\d)\1+$/.test(t))return!1;const n=t.split("").map(Number);let s=0;for(let a=0;a<9;a++)s+=n[a]*(10-a);let r=s*10%11;if(r===10&&(r=0),r!==n[9])return!1;s=0;for(let a=0;a<10;a++)s+=n[a]*(11-a);return r=s*10%11,r===10&&(r=0),r===n[10]}function Wb(e){const t=Ge(e);if(t.length!==14||/^(\d)\1+$/.test(t))return!1;const n=t.split("").map(Number),s=[5,4,3,2,9,8,7,6,5,4,3,2],r=[6,5,4,3,2,9,8,7,6,5,4,3,2];let a=0;for(let c=0;c<12;c++)a+=n[c]*s[c];let i=a%11;if(i=i<2?0:11-i,i!==n[12])return!1;a=0;for(let c=0;c<13;c++)a+=n[c]*r[c];return i=a%11,i=i<2?0:11-i,i===n[13]}function Mn(e){return Ge(e).slice(0,8).replace(/(\d{5})(\d)/,"$1-$2")}function In(e){return Ge(e).slice(0,14).replace(/(\d{2})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1/$2").replace(/(\d{4})(\d)/,"$1-$2")}function Ub(e){return Ge(e)}function Hb(e){return new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(e)}function qb(e){const t=typeof e=="string"?new Date(e):e;return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat("pt-BR").format(t)}function Gb(e){const t=typeof e=="string"?new Date(e):e;return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat("pt-BR",{dateStyle:"short",timeStyle:"short"}).format(t)}function Dn(e){const t=e.replace(/\D/g,"").slice(0,11);return t.length<=10?t.replace(/(\d{2})(\d)/,"($1) $2").replace(/(\d{4})(\d)/,"$1-$2"):t.replace(/(\d{2})(\d)/,"($1) $2").replace(/(\d{5})(\d)/,"$1-$2")}function Pn(e){return e.replace(/\D/g,"").slice(0,11).replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})$/,"$1-$2")}function Kb(e){return new Intl.NumberFormat("pt-BR",{style:"percent",minimumFractionDigits:1,maximumFractionDigits:1}).format(e)}function it(e,t="numeric"){return l.forwardRef(function({value:s,onChange:r,...a},i){return o.jsx(ot,{...a,ref:i,value:e(s??""),inputMode:t,onChange:c=>r(e(c.target.value))})})}const Jb=it(Pn),Qb=it(In),Vb=it(Dn,"tel"),Yb=it(Mn);function Zb(e,t,n){return new Intl.NumberFormat(t,{style:"currency",currency:n}).format(e/100)}function Xb(e){const t=e.replace(/\D/g,"");return t?Number.parseInt(t,10):0}const ey=l.forwardRef(function({value:t,onChange:n,currency:s="BRL",locale:r="pt-BR",...a},i){return o.jsx(ot,{...a,ref:i,type:"text",inputMode:"numeric",value:Zb(t||0,r,s),onChange:c=>n(Xb(c.target.value))})});function ty(){const[e,t]=l.useState(!1),[n,s]=l.useState(null),[r,a]=l.useState(null),i=l.useCallback(async u=>{const d=u.replace(/\D/g,"");if(d.length!==8)return s("CEP inválido."),null;t(!0),s(null);try{const f=await(await fetch(`https://viacep.com.br/ws/${d}/json/`)).json();return"erro"in f&&f.erro?(s("CEP não encontrado."),a(null),null):(a(f),f)}catch(p){return s(p instanceof Error?p.message:String(p)),null}finally{t(!1)}},[]),c=l.useCallback(()=>{t(!1),s(null),a(null)},[]);return{loading:e,error:n,data:r,lookup:i,reset:c}}function ny(e){try{return JSON.parse(e)}catch{return e}}function An(e,t={}){const{protocols:n,maxRetries:s=10,initialBackoff:r=1e3,maxBackoff:a=3e4,pingInterval:i=0,pingPayload:c=JSON.stringify({type:"ping"}),parser:u=ny,onOpen:d,onMessage:p,onClose:f,onError:m,onStatusChange:h}=t;let _=null,b=null,y=null,g=0,v="idle",x=!1;function N(k){v!==k&&(v=k,h?.(k))}function T(){y&&(clearInterval(y),y=null)}function M(){!i||i<=0||(T(),y=setInterval(()=>{_?.readyState===WebSocket.OPEN&&_.send(c)},i))}function P(){if(x)return;if(g>=s){N("error");return}const k=Math.min(r*2**g,a);g+=1,b=setTimeout(j,k)}function j(){if(x)return;_&&(_.onopen=null,_.onmessage=null,_.onclose=null,_.onerror=null,_.close()),N("connecting");const k=new WebSocket(e,n);_=k,k.onopen=C=>{g=0,N("open"),M(),d?.(C)},k.onmessage=C=>{const ae=typeof C.data=="string"?C.data:"";p?.({data:u(ae),raw:C})},k.onerror=C=>{m?.(C)},k.onclose=C=>{T(),f?.(C),_=null,N("closed"),!x&&!C.wasClean&&P()}}function $(k){return _?.readyState!==WebSocket.OPEN?!1:(_.send(k),!0)}function S(k,C){x=!0,b&&(clearTimeout(b),b=null),T(),g=0,_&&(N("closing"),_.close(k,C),_=null),N("closed")}function I(){b&&(clearTimeout(b),b=null),g=0,x=!1,j()}return j(),{send:$,close:S,reconnect:I,get status(){return v}}}function sy(e,t={}){const{enabled:n=!0,onMessage:s,...r}=t,[a,i]=l.useState("idle"),[c,u]=l.useState(null),d=l.useRef(null),p=l.useRef(s);p.current=s,l.useEffect(()=>{if(!n||!e){i("idle");return}const h=An(e,{...r,onStatusChange:i,onMessage:_=>{u(_),p.current?.(_)}});return d.current=h,()=>{h.close(),d.current=null}},[e,n]);const f=l.useCallback(h=>d.current?.send(h)??!1,[]),m=l.useCallback(()=>{d.current?.reconnect()},[]);return{status:a,lastMessage:c,send:f,reconnect:m}}function ry(e={}){const{storageKey:t="tempest-theme",defaultTheme:n="system"}=e;if(typeof window>"u")return n==="dark"?"dark":"light";let s=null;try{s=window.localStorage.getItem(t)}catch{s=null}const r=s??n;return r==="dark"||r==="light"?r:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function oy(e={}){const t=e.storageKey??"tempest-theme",n=e.defaultTheme??"system";return`
5
+ Raw payload: ${JSON.stringify(t,null,2)}`)}throw new Error(`Resposta inválida do servidor (${n}).`)}function Ob(e){if(!e)return null;try{return JSON.parse(e)}catch{return e}}function Fb(e){const{url:t,body:n,method:s="POST",headers:r={},getToken:a,withCredentials:i=!1,onProgress:c,signal:u,parser:d=JSON.parse,requestId:p}=e;return new Promise((f,m)=>{if(u?.aborted){m(new DOMException("Aborted","AbortError"));return}const h=new XMLHttpRequest;h.open(s,t),h.withCredentials=i;const _=a?.(),b=p?p():St(),y={...r};_&&!("Authorization"in y)&&(y.Authorization=`Bearer ${_}`),b&&!("X-Request-ID"in y)&&(y["X-Request-ID"]=b);for(const[w,x]of Object.entries(y))h.setRequestHeader(w,x);c&&(h.upload.onprogress=w=>{c({loaded:w.loaded,total:w.total,fraction:w.lengthComputable?w.loaded/w.total:null,lengthComputable:w.lengthComputable})});function g(){h.abort()}u?.addEventListener("abort",g),h.onload=()=>{u?.removeEventListener("abort",g);const w=h.status>=200&&h.status<300,x=h.getResponseHeader("content-type")??"";if(!w){const k=Ob(h.responseText);m(new it(Ct(h.status,k,{get:T=>h.getResponseHeader(T)},b)));return}if(h.status===204||!h.responseText){f(void 0);return}if(x.includes("application/json"))try{f(d(h.responseText))}catch(k){m(k)}else f(h.responseText)},h.onerror=()=>{u?.removeEventListener("abort",g),m(new it({status:0,detail:"Falha de rede no upload.",requestId:b||void 0}))},h.onabort=()=>{u?.removeEventListener("abort",g),m(new DOMException("Aborted","AbortError"))},h.send(n)})}function Bb(e,t){return new Promise((n,s)=>{if(t?.aborted){s(new DOMException("Aborted","AbortError"));return}const r=setTimeout(n,e);t?.addEventListener("abort",()=>{clearTimeout(r),s(new DOMException("Aborted","AbortError"))},{once:!0})})}async function zb(e,t={}){const{retries:n=3,initialDelay:s=300,maxDelay:r=1e4,respectRetryAfter:a=!0,shouldRetry:i=()=>!0,onRetry:c,signal:u}=t;let d=0,p;for(;d<n;){if(u?.aborted)throw new DOMException("Aborted","AbortError");try{return await e()}catch(f){if(p=f,d+=1,d>=n||!i(f,d))throw f;const m=a&&typeof f?.retryAfter=="number"?f.retryAfter*1e3:null,h=Math.min(m!==null?m:s*2**(d-1),r);c?.({attempt:d,delay:h,error:f}),await Bb(h,u)}}throw p}function Wb(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16;return(e==="x"?Math.floor(t):Math.floor(t)&3|8).toString(16)})}function qb(e,t){const{interval:n,disabled:s=!1,stopWhen:r,onError:a}=t,[i,c]=l.useState(null),[u,d]=l.useState(null),[p,f]=l.useState(!s),m=l.useRef(s),h=l.useRef(!1),_=l.useRef(null);async function b(){if(!(m.current||h.current)){h.current=!0;try{const y=await e();if(m.current)return;c(y),d(null),r?.(y)&&(m.current=!0)}catch(y){m.current||(d(y),a?.(y))}finally{h.current=!1,f(!1),m.current||(_.current=setTimeout(b,n))}}}return l.useEffect(()=>{if(m.current=s,s){_.current&&clearTimeout(_.current);return}return f(!0),b(),()=>{m.current=!0,_.current&&clearTimeout(_.current)}},[n,s]),{data:i,error:u,loading:p,stop:()=>{m.current=!0,_.current&&clearTimeout(_.current)},start:()=>{m.current&&(m.current=!1,b())}}}function vn(e={}){const t=e.name??"tempest-auth",n=e.storage==="session"?()=>sessionStorage:()=>localStorage;return yt.create()(st.persist(s=>({user:e.initialUser??null,token:e.initialToken??null,isAuthenticated:!!e.initialToken,setSession:({user:r,token:a})=>s({user:r,token:a,isAuthenticated:!0}),setUser:r=>s({user:r}),setToken:r=>s({token:r,isAuthenticated:!!r}),logout:()=>s({user:null,token:null,isAuthenticated:!1})}),{name:t,storage:st.createJSONStorage(n),partialize:s=>({user:s.user,token:s.token}),onRehydrateStorage:()=>s=>{s&&(s.isAuthenticated=!!s.token)}}))}function Ub({isAuthenticated:e,children:t,fallback:n}){return o.jsx(o.Fragment,{children:e?t:n})}function Qt(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.length%4===0?"":"=".repeat(4-t.length%4);return typeof atob<"u"?atob(t+n):Buffer.from(t+n,"base64").toString("binary")}function xn(e){const t=e.split(".");if(t.length!==3)throw new Error("Invalid JWT: must contain three segments.");const[n,s,r]=t;try{return{header:JSON.parse(Qt(n)),payload:JSON.parse(Qt(s)),signature:r}}catch{throw new Error("Invalid JWT: header or payload is not valid JSON.")}}function Hb(e,t=0){try{const{payload:n}=xn(e);if(typeof n.exp!="number")return!0;const s=Math.floor(Date.now()/1e3);return n.exp<=s+t}catch{return!0}}function jn(e,t={}){const{retries:n=3,initialDelay:s=400,reloadOnFinalFailure:r=!0}=t;async function a(i=1){try{return await e()}catch(c){if(i>=n)throw r&&typeof window<"u"&&window.location.reload(),c;return await new Promise(u=>setTimeout(u,s*2**(i-1))),a(i+1)}}return l.lazy(a)}function $n(e){let t=null;return()=>t||(t=(async()=>{try{await e()}finally{t=null}})(),t)}function Kb(e){const t=e??{};return{token:t.access_token,refreshToken:t.refresh_token}}function Gb(e){const{baseURL:t,loginPath:n="/api/auth/login",refreshPath:s="/api/auth/refresh",mePath:r,storeName:a="tempest-auth",storage:i="local",withCredentials:c=!1,fetcher:u,parseTokens:d=Kb,parseUser:p,refreshBody:f=j=>j?{refresh_token:j}:void 0}=e,m=vn({name:a,storage:i}),h=`${a}-refresh`;function _(){return typeof window>"u"?null:i==="session"?window.sessionStorage:window.localStorage}function b(){return _()?.getItem(h)??null}function y(j){const S=_();S&&(j?S.setItem(h,j):S.removeItem(h))}const g=()=>m.getState(),w=()=>g().token,x=nt({baseURL:t,withCredentials:c,fetcher:u});async function k(){if(!r)return g().user;const j=w(),S=await nt({baseURL:t,withCredentials:c,fetcher:u,getToken:()=>j}).get(r);return g().setUser(S),S}async function T(j){const S=await x.post(n,{body:j}),{token:L,refreshToken:N}=d(S);g().setToken(L),y(N??null);const C=p?.(S);return C!=null?(g().setUser(C),C):k()}function M(){g().logout(),y(null)}const P=$n(async()=>{const j=await x.post(s,{body:f(b())}),{token:S,refreshToken:L}=d(j);g().setToken(S),L&&y(L)}),$=nt({baseURL:t,withCredentials:c,fetcher:u,getToken:w,refresh:P,onUnauthorized:()=>M()});return{useAuthStore:m,api:$,login:T,logout:M,refresh:P,getToken:w}}function Jb({component:e,onSuccess:t,onError:n,locale:s,theme:r,text:a,shape:i,size:c,disableOneTap:u,width:d,className:p,style:f}){return o.jsx("div",{className:p,style:f,children:e({onSuccess:m=>{if(!m.credential){n?.({provider:"google",message:"Google returned no credential",raw:m});return}return t({idToken:m.credential,provider:"google",raw:m})},onError:()=>{n?.({provider:"google",message:"Google login failed"})},locale:s,theme:r,text:a,shape:i,size:c,useOneTap:!u,width:d})})}function Qb(e){const{exchange:t,onSuccess:n,onError:s}=e,[r,a]=l.useState(null),[i,c]=l.useState(null),[u,d]=l.useState("pending"),p=l.useRef(!1);return l.useEffect(()=>{if(p.current)return;p.current=!0;let f=!1;return t().then(m=>{if(!f)return a(m),d("success"),n?.(m)}).catch(m=>{f||(c(m),d("error"),s?.(m))}),()=>{f=!0}},[t,n,s]),{loading:u==="pending",data:r,error:i,status:u}}const kn={SHORT:30*1e3,DEFAULT:300*1e3,LONG:1800*1e3,INFINITE:1/0},Nn={SHORT:300*1e3,DEFAULT:1800*1e3,LONG:3600*1e3},Vb={REALTIME:5*1e3,FAST:30*1e3,DEFAULT:60*1e3,SLOW:300*1e3};function Xb(e,t){const n={all:[e]};for(const[s,r]of Object.entries(t))typeof r=="function"?n[s]=(...a)=>[e,...r(...a)]:n[s]=[e,...r];return n}function Sn({children:e,client:t,defaultOptions:n}){const[s]=l.useState(()=>t??new He.QueryClient({defaultOptions:{queries:{staleTime:kn.DEFAULT,gcTime:Nn.DEFAULT,retry:1,refetchOnWindowFocus:!1,...n?.queries??{}},mutations:{retry:0,...n?.mutations??{}}}}));return o.jsx(He.QueryClientProvider,{client:s,children:e})}function Yb(e){if(typeof e!="object"||e===null)return!1;const t=e;return Array.isArray(t.items)&&typeof t.total=="number"&&typeof t.pages=="number"}function Zb(e){if(typeof e!="object"||e===null)return!1;const t=e;return Array.isArray(t.items)&&typeof t.has_more=="boolean"&&"next_cursor"in t}function ey(e=20){return{items:[],total:0,page:1,size:e,pages:0}}function ty(e){const{queryKey:t,queryFn:n,initialPage:s=1,pageSize:r=20,sizeParam:a="size",orderBy:i,ascending:c=!1,...u}=e,[d,p]=l.useState(s),f=He.useQuery({...u,queryKey:[...t,{page:d,pageSize:r,sizeParam:a,orderBy:i,ascending:c}],queryFn:()=>{const x={page:d,[a]:r};return i&&(x.order_by=i,x.ascending=c),n(x)},placeholderData:He.keepPreviousData}),m=f.data,h=m?.pages??0,_=d<h,b=d>1,y=l.useCallback(x=>p(Math.max(1,x)),[]),g=l.useCallback(()=>p(x=>x<h?x+1:x),[h]),w=l.useCallback(()=>p(x=>x>1?x-1:x),[]);return{page:m,items:m?.items??[],pageNumber:d,pageCount:h,total:m?.total??0,hasNext:_,hasPrev:b,isLoading:f.isLoading,isFetching:f.isFetching,error:f.error,setPage:y,next:g,prev:w,refetch:()=>{f.refetch()}}}function ny(e){const{queryKey:t,queryFn:n,limit:s=20,orderBy:r,ascending:a=!1,...i}=e,c=He.useInfiniteQuery({...i,queryKey:[...t,{limit:s,orderBy:r,ascending:a}],initialPageParam:null,queryFn:({pageParam:d})=>n({cursor:d,limit:s,order_by:r,ascending:a}),getNextPageParam:d=>d.has_more?d.next_cursor:void 0}),u=c.data?.pages??[];return{items:u.flatMap(d=>d.items),pages:u,hasNextPage:c.hasNextPage,isLoading:c.isLoading,isFetchingNextPage:c.isFetchingNextPage,error:c.error,fetchNextPage:()=>{c.fetchNextPage()},refetch:()=>{c.refetch()}}}function Cn({when:e,redirectTo:t="/",replace:n=!0,children:s}){return o.jsx(o.Fragment,{children:e?s:o.jsx(I.Navigate,{to:t,replace:n})})}function sy(e){return e}const Vt=new WeakMap;function ry(e){let t=Vt.get(e);return t||(t=jn(e.lazy),Vt.set(e,t)),t}function oy({guard:e,redirectTo:t,children:n}){const s=typeof e=="function"?e():e;return o.jsx(Cn,{when:s,redirectTo:t,children:n})}function En(e){return e.map((t,n)=>{let s=t.element;if(t.lazy){const r=ry(t);s=o.jsx(r,{})}return t.guard!==void 0&&(s=o.jsx(oy,{guard:t.guard,redirectTo:t.redirectTo,children:s})),t.index?o.jsx(I.Route,{index:!0,element:s},`index-${n}`):o.jsx(I.Route,{path:t.path,element:s,caseSensitive:t.caseSensitive,children:t.children?En(t.children):null},t.path??`route-${n}`)})}const ay={browser:I.BrowserRouter,hash:I.HashRouter,memory:I.MemoryRouter};function iy({routes:e,router:t="browser",basename:n,initialEntries:s,fallback:r=null}){const a=l.useMemo(()=>En(e),[e]),i=ay[t],c=t==="memory"?{basename:n,initialEntries:s}:{basename:n};return o.jsx(i,{...c,children:o.jsx(l.Suspense,{fallback:r,children:o.jsx(I.Routes,{children:a})})})}function cy(e,t={}){if(!t.persist)return yt.create()(e);const{name:n,storage:s="local",partialize:r,version:a,migrate:i}=t.persist,c=s==="session"?()=>sessionStorage:()=>localStorage;return yt.create()(st.persist(e,{name:n,storage:st.createJSONStorage(c),...r?{partialize:r}:{},...a!==void 0?{version:a}:{},...i?{migrate:i}:{}}))}function ly(e){const t=e;t.use={};for(const n of Object.keys(e.getState()))t.use[n]=()=>e(s=>s[n]);return t}const Tn=l.createContext(null);function Xt(e){return e==="dark"||e==="light"?e:typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function uy(e){if(!e||typeof window>"u")return null;try{const t=window.localStorage.getItem(e);return t==="light"||t==="dark"||t==="system"?t:null}catch{return null}}function Rn({children:e,defaultTheme:t="system",storageKey:n="tempest-theme",target:s,attribute:r="data-tempest-theme"}){const[a,i]=l.useState(()=>uy(n)??t),[c,u]=l.useState(()=>Xt(a)),d=l.useRef(s);d.current=s,l.useEffect(()=>{const h=d.current?.()??document.documentElement;if(!h)return;const _=Xt(a);h.setAttribute(r,_),u(_)},[a,r]),l.useEffect(()=>{if(a!=="system"||typeof window>"u")return;const h=window.matchMedia("(prefers-color-scheme: dark)"),_=()=>{const b=d.current?.()??document.documentElement,y=h.matches?"dark":"light";b?.setAttribute(r,y),u(y)};return h.addEventListener("change",_),()=>h.removeEventListener("change",_)},[a,r]);const p=l.useCallback(h=>{if(i(h),n&&typeof window<"u")try{window.localStorage.setItem(n,h)}catch{}},[n]),f=l.useCallback(()=>{p(c==="dark"?"light":"dark")},[c,p]),m=l.useMemo(()=>({theme:a,resolvedTheme:c,setTheme:p,toggle:f}),[a,c,p,f]);return o.jsx(Tn.Provider,{value:m,children:e})}function dy(){const e=l.useContext(Tn);if(!e)throw new Error("useTheme must be used inside a <ThemeProvider>");return e}function Yt(e,t){return t?e.replace(/\{(\w+)\}/g,(n,s)=>{const r=t[s];return r===void 0?`{${s}}`:String(r)}):e}function gt(e,t,n,s){const r=e[t]?.[s];if(r!==void 0)return r;if(n){const a=e[n]?.[s];if(a!==void 0)return a}return null}function Et(e){const{locale:t,fallbackLocale:n=null,messages:s}=e;function r(u,d){const p=gt(s,t,n,u);return p===null?u:Yt(p,d)}function a(u,d,p){const m=gt(s,t,n,`${u}${d===1?"_one":"_other"}`)??gt(s,t,n,u);return m===null?u:Yt(m,{count:d,...p??{}})}function i(u,d){return new Intl.NumberFormat(t,d).format(u)}function c(u,d){const p=typeof u=="string"?new Date(u):u;return Number.isNaN(p.getTime())?"":new Intl.DateTimeFormat(t,d).format(p)}return{locale:t,fallbackLocale:n,t:r,plural:a,formatNumber:i,formatDate:c,withLocale:u=>Et({locale:u,fallbackLocale:n??void 0,messages:s})}}const Ln=l.createContext(null);function py(e,t){if(!e||typeof window>"u")return null;try{const n=window.localStorage.getItem(e);return n&&t.includes(n)?n:null}catch{return null}}function In({children:e,locale:t,fallbackLocale:n,messages:s,storageKey:r="tempest-locale"}){const a=l.useMemo(()=>Object.keys(s),[s]),[i,c]=l.useState(()=>py(r,a)??t);l.useEffect(()=>{typeof document<"u"&&document.documentElement.setAttribute("lang",i)},[i]);const u=l.useCallback(p=>{if(c(p),r&&typeof window<"u")try{window.localStorage.setItem(r,p)}catch{}},[r]),d=l.useMemo(()=>({...Et({locale:i,fallbackLocale:n,messages:s}),setLocale:u,availableLocales:a}),[i,n,s,u,a]);return o.jsx(Ln.Provider,{value:d,children:e})}function Mn(){const e=l.useContext(Ln);if(!e)throw new Error("useI18n must be used inside an <I18nProvider>");return e}function my(){return Mn().t}function fy(e=[],t=[]){if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!0;return!1}class Pn extends l.Component{state={error:null};static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,n){this.props.onError?.(t,n)}componentDidUpdate(t){this.state.error&&fy(t.resetKeys,this.props.resetKeys)&&this.reset()}reset=()=>{this.setState({error:null})};render(){const{error:t}=this.state;if(!t)return this.props.children;const{fallback:n}=this.props;return typeof n=="function"?n({error:t,reset:this.reset}):n}}function hy({children:e,query:t,theme:n,i18n:s,errorBoundary:r}){let a=e;return s&&(a=o.jsx(In,{...s,children:a})),n!==!1&&(a=o.jsx(Rn,{...n||{},children:a})),t!==!1&&(a=o.jsx(Sn,{...t||{},children:a})),r&&(a=o.jsx(Pn,{...r,children:a})),o.jsx(o.Fragment,{children:a})}function _y(e){try{return JSON.parse(e)}catch{return e}}function An(e,t={}){const{withCredentials:n=!1,namedEvents:s=[],heartbeatEvents:r=["ping"],maxRetries:a=10,initialBackoff:i=1e3,maxBackoff:c=3e4,parser:u=_y,onOpen:d,onMessage:p,onError:f,onStatusChange:m}=t;let h=null,_=null,b=0,y="idle",g=!1;function w($){y!==$&&(y=$,m?.($))}function x($,j){r.includes($)||p?.({event:$,data:u(j.data),id:j.lastEventId||void 0,raw:j})}function k(){if(g)return;if(b>=a){w("error");return}const $=Math.min(i*2**b,c);b+=1,_=setTimeout(T,$)}function T(){if(g)return;h&&h.close(),w("connecting");const $=new EventSource(e,{withCredentials:n});h=$,$.onopen=()=>{b=0,w("open"),d?.()},$.onmessage=j=>x("message",j);for(const j of s)$.addEventListener(j,S=>x(j,S));for(const j of r)$.addEventListener(j,()=>{});$.onerror=j=>{f?.(j),$.close(),h=null,w("closed"),k()}}function M(){g=!0,_&&(clearTimeout(_),_=null),b=0,h&&(h.close(),h=null),w("closed")}function P(){_&&(clearTimeout(_),_=null),b=0,g=!1,T()}return T(),{close:M,reconnect:P,get status(){return y}}}function gy(e,t={}){const{enabled:n=!0,onMessage:s,...r}=t,[a,i]=l.useState("idle"),[c,u]=l.useState(null),d=l.useRef(null),p=l.useRef(s);return p.current=s,l.useEffect(()=>{if(!n||!e){i("idle");return}const f=An(e,{...r,onStatusChange:i,onMessage:m=>{u(m),p.current?.(m)}});return d.current=f.reconnect,()=>{f.close(),d.current=null}},[e,n]),{status:a,lastMessage:c,reconnect:()=>d.current?.()}}function Dn(e){const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),s=window.atob(n),r=new ArrayBuffer(s.length),a=new Uint8Array(r);for(let i=0;i<s.length;i++)a[i]=s.charCodeAt(i);return a}function Ue(){return typeof window<"u"&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window}class Nt extends Error{constructor(){super("Web Push não suportado neste navegador."),this.name="WebPushUnsupportedError"}}class On extends Error{constructor(){super("Permissão de notificação negada pelo usuário."),this.name="WebPushPermissionDeniedError"}}class Fn{config;constructor(t){this.config=t}static isSupported(){return Ue()}async registration(){if(!Ue())throw new Nt;return this.config.getRegistration?await this.config.getRegistration():await navigator.serviceWorker.ready}permission(){return typeof Notification>"u"?"unsupported":Notification.permission}async requestPermission(){if(typeof Notification>"u")throw new Nt;return Notification.requestPermission()}async getSubscription(){return(await this.registration()).pushManager.getSubscription()}async isSubscribed(){return Ue()?await this.getSubscription()!==null:!1}async subscribe(){if(await this.requestPermission()!=="granted")throw new On;const n=await this.registration(),s=await n.pushManager.getSubscription();if(s)return await this.config.onSubscribe(s.toJSON()),s;const r=await n.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:Dn(this.config.vapidPublicKey)});return await this.config.onSubscribe(r.toJSON()),r}async unsubscribe(){const t=await this.getSubscription();return t?(this.config.onUnsubscribe&&await this.config.onUnsubscribe(t.toJSON()),t.unsubscribe()):!1}}function by(e){const t=l.useRef(e);t.current=e;const n=l.useMemo(()=>new Fn({vapidPublicKey:e.vapidPublicKey,onSubscribe:b=>t.current.onSubscribe(b),onUnsubscribe:b=>t.current.onUnsubscribe?.(b),getRegistration:e.getRegistration}),[e.vapidPublicKey,e.getRegistration]),[s]=l.useState(()=>Ue()),[r,a]=l.useState(()=>n.permission()),[i,c]=l.useState(!1),[u,d]=l.useState(!1),[p,f]=l.useState(null),m=l.useCallback(async()=>{if(s){a(n.permission());try{const b=await n.isSubscribed();c(b)}catch(b){f(b instanceof Error?b:new Error(String(b)))}}},[n,s]);l.useEffect(()=>{m()},[m]);const h=l.useCallback(async()=>{if(s){d(!0),f(null);try{await n.subscribe(),c(!0),a(n.permission())}catch(b){throw f(b instanceof Error?b:new Error(String(b))),b}finally{d(!1)}}},[n,s]),_=l.useCallback(async()=>{if(s){d(!0),f(null);try{await n.unsubscribe(),c(!1)}catch(b){throw f(b instanceof Error?b:new Error(String(b))),b}finally{d(!1)}}},[n,s]);return{supported:s,permission:r,subscribed:i,loading:u,error:p,subscribe:h,unsubscribe:_,refresh:m}}function Tt(){let e=null;async function t(s,{volume:r=1,loop:a=!1,autoplay:i=!0,stopPrevious:c=!1,onEnded:u,onError:d}={}){try{c&&e&&(e.pause(),e.currentTime=0);const p=new Audio(s);return p.volume=Math.max(0,Math.min(1,r)),p.loop=a,p.preload="auto",u&&(p.onended=u),d&&(p.onerror=f=>d(f)),e=p,i&&await p.play(),p}catch(p){return d?.(p),null}}function n(){e&&(e.pause(),e.currentTime=0)}return{play:t,stop:n,current:()=>e}}let bt=null;function Bn(){return bt||(bt=Tt()),bt}async function yy(e,t){return Bn().play(e,t)}function wy(){Bn().stop()}function vy(){const e=l.useRef(null),[t,n]=l.useState(!1);e.current||(e.current=Tt()),l.useEffect(()=>()=>{e.current?.stop()},[]);const s=l.useCallback(async(a,i)=>{await e.current.play(a,i)&&n(!0)},[]),r=l.useCallback(()=>{e.current?.stop()},[]);return{play:s,stop:r,unlocked:t}}class xy extends Xn{store;constructor(t,n,s,r){super(t),this.version(n).stores({[s]:r}),this.store=this.table(s)}}function jy(e){const{databaseName:t,version:n,tableName:s,indexes:r,keyPath:a="id",ownerField:i}=e,c=new xy(t,n,s,r),u=c.store;function d(f,m){return!i||!m?f:{...f,[i]:m}}async function p(f,m={}){const{orderBy:h=a,reverse:_=!1,limit:b,offset:y,filter:g}=m;let w=i&&f?u.where(i).equals(f):u.toCollection();g&&(w=w.filter(g));let x=h===a?await w.toArray():await w.sortBy(h);return _&&(x=x.reverse()),y&&(x=x.slice(y)),typeof b=="number"&&(x=x.slice(0,b)),x}return{put:(f,m)=>u.put(d(f,m)),bulkPut:(f,m)=>u.bulkPut(f.map(h=>d(h,m))),get:f=>u.get(f),list:p,update:(f,m)=>u.update(f,m),updateMany:async(f,m)=>{const h=m;return i&&f?u.where(i).equals(f).modify(h):u.toCollection().modify(h)},delete:f=>u.delete(f),clear:async f=>{if(i&&f){await u.where(i).equals(f).delete();return}await u.clear()},count:f=>i&&f?u.where(i).equals(f).count():u.count(),raw:u,db:c}}function $y(){const[,e]=l.useState(null);return l.useCallback(t=>{e(()=>{throw t instanceof Error?t:new Error(String(t))})},[])}function ky({name:e,label:t,helperText:n,required:s,control:r,children:a}){const i=re.useFormContext(),c=r??i?.control;if(!c)throw new Error("FormField requires either a `control` prop or a <FormProvider> in the tree.");return o.jsx(re.Controller,{name:e,control:c,render:({field:u,fieldState:d})=>{if(!l.isValidElement(a))return a;const p=d.error?.message;return l.cloneElement(a,{name:u.name,value:u.value,onChange:u.onChange,onBlur:u.onBlur,ref:u.ref,label:t,helperText:p?void 0:n,error:p,required:s,"aria-invalid":!!p})}})}function Ny(e,t){const n=e.safeParse(t);if(n.success)return{success:!0,data:n.data,errors:{}};const s={};for(const r of n.error.issues){const a=r.path.length===0?"_root":r.path.join(".");a in s||(s[a]=r.message)}return{success:!1,errors:s}}function zn(e){return async(t,n,s)=>{const r=e.safeParse(t);if(r.success)return{values:r.data,errors:{}};const a={},i=s.criteriaMode??"firstError";for(const c of r.error.issues){const u=c.path.length===0?"_root":c.path.join(".");i==="firstError"&&a[u]||(a[u]={type:c.code,message:c.message})}return{values:{},errors:a}}}function Sy(e,t={}){return re.useForm({...t,resolver:zn(e)})}function Ge(e){return e.replace(/\D/g,"")}function Cy(e){const t=Ge(e);if(t.length!==11||/^(\d)\1+$/.test(t))return!1;const n=t.split("").map(Number);let s=0;for(let a=0;a<9;a++)s+=n[a]*(10-a);let r=s*10%11;if(r===10&&(r=0),r!==n[9])return!1;s=0;for(let a=0;a<10;a++)s+=n[a]*(11-a);return r=s*10%11,r===10&&(r=0),r===n[10]}function Ey(e){const t=Ge(e);if(t.length!==14||/^(\d)\1+$/.test(t))return!1;const n=t.split("").map(Number),s=[5,4,3,2,9,8,7,6,5,4,3,2],r=[6,5,4,3,2,9,8,7,6,5,4,3,2];let a=0;for(let c=0;c<12;c++)a+=n[c]*s[c];let i=a%11;if(i=i<2?0:11-i,i!==n[12])return!1;a=0;for(let c=0;c<13;c++)a+=n[c]*r[c];return i=a%11,i=i<2?0:11-i,i===n[13]}function Wn(e){return Ge(e).slice(0,8).replace(/(\d{5})(\d)/,"$1-$2")}function qn(e){return Ge(e).slice(0,14).replace(/(\d{2})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1/$2").replace(/(\d{4})(\d)/,"$1-$2")}function Ty(e){return Ge(e)}function ut(e,t="numeric"){return l.forwardRef(function({value:s,onChange:r,...a},i){return o.jsx(ct,{...a,ref:i,value:e(s??""),inputMode:t,onChange:c=>r(e(c.target.value))})})}const Ry=ut(yn),Ly=ut(qn),Iy=ut(bn,"tel"),My=ut(Wn);function Py(e,t,n){return new Intl.NumberFormat(t,{style:"currency",currency:n}).format(e/100)}function Ay(e){const t=e.replace(/\D/g,"");return t?Number.parseInt(t,10):0}const Dy=l.forwardRef(function({value:t,onChange:n,currency:s="BRL",locale:r="pt-BR",...a},i){return o.jsx(ct,{...a,ref:i,type:"text",inputMode:"numeric",value:Py(t||0,r,s),onChange:c=>n(Ay(c.target.value))})});function Oy(){const[e,t]=l.useState(!1),[n,s]=l.useState(null),[r,a]=l.useState(null),i=l.useCallback(async u=>{const d=u.replace(/\D/g,"");if(d.length!==8)return s("CEP inválido."),null;t(!0),s(null);try{const f=await(await fetch(`https://viacep.com.br/ws/${d}/json/`)).json();return"erro"in f&&f.erro?(s("CEP não encontrado."),a(null),null):(a(f),f)}catch(p){return s(p instanceof Error?p.message:String(p)),null}finally{t(!1)}},[]),c=l.useCallback(()=>{t(!1),s(null),a(null)},[]);return{loading:e,error:n,data:r,lookup:i,reset:c}}function Fy(e){try{return JSON.parse(e)}catch{return e}}function Un(e,t={}){const{protocols:n,maxRetries:s=10,initialBackoff:r=1e3,maxBackoff:a=3e4,pingInterval:i=0,pingPayload:c=JSON.stringify({type:"ping"}),parser:u=Fy,onOpen:d,onMessage:p,onClose:f,onError:m,onStatusChange:h}=t;let _=null,b=null,y=null,g=0,w="idle",x=!1;function k(N){w!==N&&(w=N,h?.(N))}function T(){y&&(clearInterval(y),y=null)}function M(){!i||i<=0||(T(),y=setInterval(()=>{_?.readyState===WebSocket.OPEN&&_.send(c)},i))}function P(){if(x)return;if(g>=s){k("error");return}const N=Math.min(r*2**g,a);g+=1,b=setTimeout($,N)}function $(){if(x)return;_&&(_.onopen=null,_.onmessage=null,_.onclose=null,_.onerror=null,_.close()),k("connecting");const N=new WebSocket(e,n);_=N,N.onopen=C=>{g=0,k("open"),M(),d?.(C)},N.onmessage=C=>{const ae=typeof C.data=="string"?C.data:"";p?.({data:u(ae),raw:C})},N.onerror=C=>{m?.(C)},N.onclose=C=>{T(),f?.(C),_=null,k("closed"),!x&&!C.wasClean&&P()}}function j(N){return _?.readyState!==WebSocket.OPEN?!1:(_.send(N),!0)}function S(N,C){x=!0,b&&(clearTimeout(b),b=null),T(),g=0,_&&(k("closing"),_.close(N,C),_=null),k("closed")}function L(){b&&(clearTimeout(b),b=null),g=0,x=!1,$()}return $(),{send:j,close:S,reconnect:L,get status(){return w}}}function By(e,t={}){const{enabled:n=!0,onMessage:s,...r}=t,[a,i]=l.useState("idle"),[c,u]=l.useState(null),d=l.useRef(null),p=l.useRef(s);p.current=s,l.useEffect(()=>{if(!n||!e){i("idle");return}const h=Un(e,{...r,onStatusChange:i,onMessage:_=>{u(_),p.current?.(_)}});return d.current=h,()=>{h.close(),d.current=null}},[e,n]);const f=l.useCallback(h=>d.current?.send(h)??!1,[]),m=l.useCallback(()=>{d.current?.reconnect()},[]);return{status:a,lastMessage:c,send:f,reconnect:m}}function zy(e={}){const{storageKey:t="tempest-theme",defaultTheme:n="system"}=e;if(typeof window>"u")return n==="dark"?"dark":"light";let s=null;try{s=window.localStorage.getItem(t)}catch{s=null}const r=s??n;return r==="dark"||r==="light"?r:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Wy(e={}){const t=e.storageKey??"tempest-theme",n=e.defaultTheme??"system";return`
6
6
  (function(){try{
7
7
  var key=${JSON.stringify(t)};
8
8
  var def=${JSON.stringify(n)};
@@ -11,5 +11,5 @@ Raw payload: ${JSON.stringify(t,null,2)}`)}throw new Error(`Resposta inválida d
11
11
  var resolved=mode==="dark"||mode==="light"?mode:(matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");
12
12
  document.documentElement.setAttribute("data-tempest-theme",resolved);
13
13
  }catch(e){}})();
14
- `.trim()}const Qt=["debug","info","warn","error"];function ay(e,t){return Qt.indexOf(t)>=Qt.indexOf(e)}const On=({level:e,message:t,context:n})=>{const s=e==="debug"?"log":e;n?console[s](t,n):console[s](t)};function Fn(e={}){const t=e.level??"info",n=e.sinks??[On],s=e.namespace??"";function r(a,i,c){if(!ay(t,a))return;const u={level:a,message:s?`[${s}] ${i}`:i,context:c,timestamp:Date.now()};for(const d of n)try{d(u)}catch{}}return{debug:(a,i)=>r("debug",a,i),info:(a,i)=>r("info",a,i),warn:(a,i)=>r("warn",a,i),error:(a,i)=>r("error",a,i),child:a=>Fn({level:t,sinks:n,namespace:s?`${s}:${a}`:a})}}const Bn=l.createContext(null);function iy({adapter:e,children:t}){l.useEffect(()=>(e.init?.(),()=>{e.flush?.()}),[e]);const n=l.useMemo(()=>e,[e]);return o.jsx(Bn.Provider,{value:n,children:t})}function cy(){return l.useContext(Bn)}const ly={identify(e){console.info("[telemetry] identify",e)},track(e){console.info("[telemetry] track",e.name,e.properties)},captureException(e,t){console.error("[telemetry] exception",e,t)}};function uy(e){if(e===null)return null;const{id:t,email:n,name:s,traits:r}=e;return{...t!==void 0?{id:t}:null,...n!==void 0?{email:n}:null,...s!==void 0?{username:s}:null,...r??null}}function dy(e){const{sentry:t,initOptions:n,flushTimeout:s=2e3,breadcrumbCategory:r="app"}=e;return{init(){n&&t.init&&t.init(n)},identify(a){t.setUser(uy(a))},track(a){t.addBreadcrumb({category:r,message:a.name,level:"info",...a.properties?{data:a.properties}:null})},captureException(a,i){t.captureException(a,i?{extra:i}:void 0)},async flush(){t.flush&&await t.flush(s)}}}function py(e){const{email:t,name:n,traits:s}=e;return{...t!==void 0?{email:t}:null,...n!==void 0?{name:n}:null,...s??null}}function my(e){const{posthog:t,init:n}=e;return{init(){n&&t.init&&t.init(n.apiKey,n.options)},identify(s){if(s===null){t.reset?.();return}s.id!==void 0&&t.identify(s.id,py(s))},track(s){t.capture(s.name,s.properties)},captureException(s,r){if(t.captureException){t.captureException(s,r);return}const a=s instanceof Error?s:new Error(String(s));t.capture("$exception",{$exception_message:a.message,$exception_type:a.name,$exception_stack_trace_raw:a.stack,...r})}}}const zn=l.createContext(null);function fy({adapter:e,children:t}){const n=l.useMemo(()=>e,[e]);return l.useEffect(()=>{},[n]),o.jsx(zn.Provider,{value:n,children:t})}function Wn(){const e=l.useContext(zn);if(!e)throw new Error("useFeatureFlag requires <FeatureFlagsProvider>");return e}function hy(e,t=!1){const n=Wn(),s=a=>n.onChange?n.onChange(a):()=>{},r=()=>n.isEnabled(e,t);return l.useSyncExternalStore(s,r,r)}function _y(e,t){const n=Wn(),s=a=>n.onChange?n.onChange(a):()=>{},r=()=>n.get(e,t);return l.useSyncExternalStore(s,r,r)}function gy(e={}){const t={...e.initial??{}},n=new Set;function s(){for(const r of n)r()}return{isEnabled(r,a=!1){return r in t?!!t[r]:a},get(r,a){return r in t?t[r]:a},onChange(r){return n.add(r),()=>n.delete(r)},set(r,a){t[r]=a,s()}}}function by(e){const{growthbook:t}=e,n=new Set;let s=!1;function r(){s||!t.setRenderer||(s=!0,t.setRenderer(()=>{for(const a of n)a()}))}return{isEnabled(a,i=!1){const c=t.isOn(a);return typeof c=="boolean"?c:i},get(a,i){return t.getFeatureValue(a,i)},onChange(a){return r(),n.add(a),()=>{n.delete(a)}}}}function yy(e){const{client:t}=e;return{isEnabled(n,s=!1){return t.variation(n,s)===!0},get(n,s){return t.variation(n,s)},onChange(n){return!t.on||!t.off?()=>{}:(t.on("change",n),()=>{t.off("change",n)})}}}async function wy(e){if(typeof navigator>"u"||!("share"in navigator))return{shared:!1,unsupported:!0,cancelled:!1};if(e.files&&!navigator.canShare?.({files:e.files}))return{shared:!1,unsupported:!0,cancelled:!1};try{return await navigator.share(e),{shared:!0,unsupported:!1,cancelled:!1}}catch(t){return t instanceof DOMException&&t.name==="AbortError"?{shared:!1,unsupported:!1,cancelled:!0}:{shared:!1,unsupported:!1,cancelled:!1,error:t}}}function vy(){return typeof navigator<"u"&&"share"in navigator}const xy={get(e,t){if(typeof window>"u")return t;try{const n=window.localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}},set(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,JSON.stringify(t))}catch{}},remove(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(e)}catch{}}};function jy(e){return e.normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function $y(e,t,n="…"){if(e.length<=t)return e;const s=Math.max(0,t-n.length);return e.slice(0,s).trimEnd()+n}function ky(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function Ny(e){const t=e.replace(/[^a-zA-Z0-9]+/g," ").trim().split(/\s+/).filter(Boolean);return t.length===0?"":t.map((n,s)=>{const r=n.toLowerCase();return s===0?r:r.charAt(0).toUpperCase()+r.slice(1)}).join("")}function Sy(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase()}function Cy(e,t,n){return e===1?t:n??`${t}s`}function Ey(e,t){const n={};for(const s of e){const r=t(s);(n[r]??=[]).push(s)}return n}function Ty(e,t){const n=new Set,s=[];for(const r of e){const a=t(r);n.has(a)||(n.add(a),s.push(r))}return s}function Ry(e,t){if(t<1)throw new RangeError(`chunk size must be >= 1, received ${t}`);const n=[];for(let s=0;s<e.length;s+=t)n.push(e.slice(s,s+t));return n}function Ly(e,t,n=1){const s=[];if(n===0)return s;if(n>0)for(let r=e;r<t;r+=n)s.push(r);else for(let r=e;r>t;r+=n)s.push(r);return s}function Ue(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function My(e,t){const n={};for(const s of t)Object.prototype.hasOwnProperty.call(e,s)&&(n[s]=e[s]);return n}function Iy(e,t){const n=new Set(t),s={};for(const r of Object.keys(e))n.has(r)||(s[r]=e[r]);return s}function Un(e,t){if(!Ue(e)||!Ue(t))return t===void 0?e:t;const n={...e};for(const s of Object.keys(t)){const r=t[s],a=n[s];Ue(a)&&Ue(r)?n[s]=Un(a,r):n[s]=r}return n}function Dy(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:e instanceof Map||e instanceof Set?e.size===0:Ue(e)?Object.keys(e).length===0:!1}function Py(e){return e!=null}function Ay(e){return typeof e=="string"}function Oy(e){return typeof e=="number"&&!Number.isNaN(e)}function Fy(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function By(e,t){throw new Error(t??`Unexpected value: ${String(e)}`)}function zy(e,t){let n;const s=(...r)=>{n!==void 0&&clearTimeout(n),n=setTimeout(()=>{n=void 0,e(...r)},t)};return s.cancel=()=>{n!==void 0&&(clearTimeout(n),n=void 0)},s}function Wy(e,t){let n,s,r=0;const a=c=>{r=Date.now(),e(...c)},i=(...c)=>{const u=Date.now(),d=t-(u-r);d<=0?(n!==void 0&&(clearTimeout(n),n=void 0),a(c)):(s=c,n===void 0&&(n=setTimeout(()=>{if(n=void 0,s!==void 0){const p=s;s=void 0,a(p)}},d)))};return i.cancel=()=>{n!==void 0&&(clearTimeout(n),n=void 0),s=void 0,r=0},i}function Uy(e){let t=!1,n;return(...s)=>(t||(t=!0,n=e(...s)),n)}function Hy(e){let t=!1,n,s;const r=a=>{if(!t||a.length!==n.length)return!1;for(let i=0;i<a.length;i++)if(!Object.is(a[i],n[i]))return!1;return!0};return(...a)=>(r(a)||(n=a,s=e(...a),t=!0),s)}function qy(e){return new Promise(t=>setTimeout(t,e))}function Gy(e,t,n){return new Promise((s,r)=>{const a=setTimeout(()=>{const i=new Error(n??`Operation timed out after ${t}ms`);i.name="TimeoutError",r(i)},t);e.then(i=>{clearTimeout(a),s(i)},i=>{clearTimeout(a),r(i)})})}function Ky(e){let t;if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")t=crypto.randomUUID();else{const n=Date.now().toString(36),s=Math.random().toString(36).slice(2,10);t=`${n}-${s}`}return e?`${e}-${t}`:t}exports.createPartialResponse=oe.createPartialResponse;exports.installBackgroundSync=oe.installBackgroundSync;exports.installNotificationClickHandler=oe.installNotificationClickHandler;exports.installPrecache=oe.installPrecache;exports.installPushHandler=oe.installPushHandler;exports.installRuntimeCache=oe.installRuntimeCache;exports.installSkipWaitingListener=oe.installSkipWaitingListener;exports.registerServiceWorker=oe.registerServiceWorker;exports.skipWaiting=oe.skipWaiting;exports.unregisterAllServiceWorkers=oe.unregisterAllServiceWorkers;Object.defineProperty(exports,"BrowserRouter",{enumerable:!0,get:()=>L.BrowserRouter});Object.defineProperty(exports,"HashRouter",{enumerable:!0,get:()=>L.HashRouter});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>L.Link});Object.defineProperty(exports,"MemoryRouter",{enumerable:!0,get:()=>L.MemoryRouter});Object.defineProperty(exports,"NavLink",{enumerable:!0,get:()=>L.NavLink});Object.defineProperty(exports,"Navigate",{enumerable:!0,get:()=>L.Navigate});Object.defineProperty(exports,"Outlet",{enumerable:!0,get:()=>L.Outlet});Object.defineProperty(exports,"Route",{enumerable:!0,get:()=>L.Route});Object.defineProperty(exports,"Routes",{enumerable:!0,get:()=>L.Routes});Object.defineProperty(exports,"redirect",{enumerable:!0,get:()=>L.redirect});Object.defineProperty(exports,"useLocation",{enumerable:!0,get:()=>L.useLocation});Object.defineProperty(exports,"useMatch",{enumerable:!0,get:()=>L.useMatch});Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:()=>L.useNavigate});Object.defineProperty(exports,"useParams",{enumerable:!0,get:()=>L.useParams});Object.defineProperty(exports,"useRouteError",{enumerable:!0,get:()=>L.useRouteError});Object.defineProperty(exports,"useSearchParams",{enumerable:!0,get:()=>L.useSearchParams});Object.defineProperty(exports,"Controller",{enumerable:!0,get:()=>re.Controller});Object.defineProperty(exports,"FormProvider",{enumerable:!0,get:()=>re.FormProvider});Object.defineProperty(exports,"useFieldArray",{enumerable:!0,get:()=>re.useFieldArray});Object.defineProperty(exports,"useForm",{enumerable:!0,get:()=>re.useForm});Object.defineProperty(exports,"useFormContext",{enumerable:!0,get:()=>re.useFormContext});Object.defineProperty(exports,"useFormState",{enumerable:!0,get:()=>re.useFormState});Object.defineProperty(exports,"useWatch",{enumerable:!0,get:()=>re.useWatch});exports.Accordion=Xn;exports.Alert=fs;exports.AppProviders=Cb;exports.AppRouter=wb;exports.AppShell=ks;exports.AspectRatio=Cs;exports.AuthGuard=lb;exports.Avatar=Ws;exports.BREAKPOINTS=nt;exports.Badge=sr;exports.Banner=hr;exports.BottomNavigation=jr;exports.BottomSheet=Rr;exports.Breadcrumbs=Ar;exports.Button=st;exports.CACHE_TIME=gn;exports.CEPInput=Yb;exports.CNPJInput=Qb;exports.CPFInput=Jb;exports.Calendar=F_;exports.Card=bo;exports.Carousel=hg;exports.Center=jo;exports.Checkbox=Ro;exports.ChipInput=Uo;exports.ClickOutside=Xf;exports.Collapsible=Ih;exports.Combobox=ra;exports.Command=m_;exports.ConditionalWrapper=eh;exports.ConfirmDialog=$a;exports.Container=Wc;exports.ContextMenu=zh;exports.CopyButton=zf;exports.DataList=uh;exports.DataTable=Yg;exports.DatePicker=Ba;exports.DescriptionList=fh;exports.Divider=Ja;exports.Drawer=mi;exports.DropdownMenu=Si;exports.EmptyState=Mi;exports.ErrorBoundary=Nn;exports.ErrorState=Fi;exports.ErrorText=rh;exports.FeatureFlagsProvider=fy;exports.FileUpload=nc;exports.For=th;exports.Form=yc;exports.FormActions=xc;exports.FormField=Ob;exports.FormRow=vc;exports.FormSection=wc;exports.GoogleSignIn=pb;exports.Grid=Gc;exports.Hide=rd;exports.HoverCard=Vh;exports.I18nProvider=$n;exports.Image=ih;exports.Input=ot;exports.Kbd=Yc;exports.Label=Th;exports.Menubar=rg;exports.Modal=Vt;exports.Money=Gf;exports.MoneyInput=ey;exports.Navbar=il;exports.NavigationMenu=K_;exports.Page=yl;exports.Pagination=en;exports.PasswordInput=Ql;exports.PhoneInput=Vb;exports.PinInput=cu;exports.Popover=_u;exports.Portal=ln;exports.Progress=Nu;exports.QueryProvider=bn;exports.REFETCH_TIME=fb;exports.Radio=Pu;exports.RadioGroup=Au;exports.RangeSlider=Gu;exports.RatingStars=td;exports.RelativeTime=qf;exports.Resizable=$_;exports.RouteGuard=yn;exports.STALE_TIME=_n;exports.SafeArea=pd;exports.ScrollArea=g_;exports.SearchBar=rn;exports.SegmentedControl=Cd;exports.Select=Od;exports.Show=sd;exports.Sidebar=Vd;exports.Skeleton=ep;exports.Spacer=op;exports.Spinner=mp;exports.Stack=Hc;exports.Stat=Np;exports.Stepper=Dp;exports.StepperInput=Kp;exports.Switch=em;exports.Table=on;exports.Tabs=Mm;exports.Tag=mm;exports.TelemetryProvider=iy;exports.Textarea=zm;exports.ThemeProvider=xn;exports.Timeline=sf;exports.ToastProvider=Tf;exports.Toggle=vh;exports.ToggleGroup=Nh;exports.ToggleGroupItem=Sh;exports.Tooltip=pf;exports.TruncateText=Qf;exports.VirtualList=Of;exports.VisuallyHidden=Zf;exports.WebPushClient=Tn;exports.WebPushPermissionDeniedError=En;exports.WebPushUnsupportedError=jt;exports.assertNever=By;exports.camelCase=Ny;exports.capitalize=ky;exports.chunk=Ry;exports.clamp=gt;exports.cn=w;exports.consoleSink=On;exports.consoleTelemetryAdapter=ly;exports.createApiClient=eb;exports.createAudioPlayer=kt;exports.createAuthStore=cb;exports.createEventStream=Sn;exports.createGrowthBookFeatureFlagsAdapter=by;exports.createI18n=$t;exports.createInMemoryFlags=gy;exports.createLaunchDarklyFeatureFlagsAdapter=yy;exports.createLogger=Fn;exports.createOfflineStore=Pb;exports.createPostHogTelemetryAdapter=my;exports.createQueryKeys=hb;exports.createRefreshQueue=db;exports.createSelectors=xb;exports.createSentryTelemetryAdapter=dy;exports.createStore=vb;exports.createWebSocket=An;exports.debounce=zy;exports.decodeJWT=fn;exports.deepMerge=Un;exports.defineRoutes=_b;exports.estimatePasswordStrength=tn;exports.formatBytes=Pp;exports.formatCEP=Mn;exports.formatCNPJ=In;exports.formatCPF=Pn;exports.formatCompactNumber=Ap;exports.formatCurrency=Hb;exports.formatDate=qb;exports.formatDateTime=Gb;exports.formatPercent=Kb;exports.formatPhone=Dn;exports.generateIdempotencyKey=ab;exports.getInitialTheme=ry;exports.groupBy=Ey;exports.isDefined=Py;exports.isEmpty=Dy;exports.isJWTExpired=ub;exports.isNumber=Oy;exports.isPlainObject=Fy;exports.isPushSupported=He;exports.isShareSupported=vy;exports.isString=Ay;exports.kebabCase=Sy;exports.lazyWithRetry=hn;exports.memoizeOne=Hy;exports.omit=Iy;exports.once=Uy;exports.parseResponse=tb;exports.pick=My;exports.playAudio=Lb;exports.pluralize=Cy;exports.randomId=Ky;exports.range=Ly;exports.relativeTime=cn;exports.retry=ob;exports.share=wy;exports.sleep=qy;exports.slugify=jy;exports.stopAudio=Mb;exports.storage=xy;exports.themeInitScript=oy;exports.throttle=Wy;exports.truncate=$y;exports.uniqueBy=Ty;exports.unmask=Ub;exports.uploadWithProgress=sb;exports.urlBase64ToUint8Array=Cn;exports.useAsync=$g;exports.useAudio=Ib;exports.useBeforeInstallPrompt=Mg;exports.useBreakpoint=Ee;exports.useClientFilter=gg;exports.useClipboard=Eg;exports.useDebounce=_g;exports.useDeepMemo=Og;exports.useDocumentVisibility=Ng;exports.useErrorHandler=Ab;exports.useEventListener=yg;exports.useEventStream=Tb;exports.useFeatureFlag=hy;exports.useFlagValue=_y;exports.useFocusTrap=dn;exports.useGeolocation=Dg;exports.useHover=Hg;exports.useI18n=kn;exports.useIdle=Ig;exports.useIntersectionObserver=Sg;exports.useInterval=Bg;exports.useKeyboardShortcut=Lg;exports.useLocalStorage=xg;exports.useLongPress=qg;exports.useMediaQuery=bg;exports.useOAuthCallback=mb;exports.useOnline=kg;exports.usePagination=mn;exports.usePoll=ib;exports.usePrevious=Fg;exports.usePushSubscription=Rb;exports.useResizeObserver=Cg;exports.useScrollLock=Pg;exports.useStableCallback=Ag;exports.useTelemetry=cy;exports.useTheme=$b;exports.useThrottle=Wg;exports.useTimeout=zg;exports.useToast=Ef;exports.useToggle=jg;exports.useTranslate=Nb;exports.useViaCEP=ty;exports.useWebSocket=sy;exports.useWindowSize=Ug;exports.useZodForm=Bb;exports.validateCNPJ=Wb;exports.validateCPF=zb;exports.validateForm=Fb;exports.withTimeout=Gy;exports.zodResolver=Ln;
14
+ `.trim()}const Zt=["debug","info","warn","error"];function qy(e,t){return Zt.indexOf(t)>=Zt.indexOf(e)}const Hn=({level:e,message:t,context:n})=>{const s=e==="debug"?"log":e;n?console[s](t,n):console[s](t)};function Kn(e={}){const t=e.level??"info",n=e.sinks??[Hn],s=e.namespace??"";function r(a,i,c){if(!qy(t,a))return;const u={level:a,message:s?`[${s}] ${i}`:i,context:c,timestamp:Date.now()};for(const d of n)try{d(u)}catch{}}return{debug:(a,i)=>r("debug",a,i),info:(a,i)=>r("info",a,i),warn:(a,i)=>r("warn",a,i),error:(a,i)=>r("error",a,i),child:a=>Kn({level:t,sinks:n,namespace:s?`${s}:${a}`:a})}}const Gn=l.createContext(null);function Uy({adapter:e,children:t}){l.useEffect(()=>(e.init?.(),()=>{e.flush?.()}),[e]);const n=l.useMemo(()=>e,[e]);return o.jsx(Gn.Provider,{value:n,children:t})}function Hy(){return l.useContext(Gn)}const Ky={identify(e){console.info("[telemetry] identify",e)},track(e){console.info("[telemetry] track",e.name,e.properties)},captureException(e,t){console.error("[telemetry] exception",e,t)}};function Gy(e){if(e===null)return null;const{id:t,email:n,name:s,traits:r}=e;return{...t!==void 0?{id:t}:null,...n!==void 0?{email:n}:null,...s!==void 0?{username:s}:null,...r??null}}function Jy(e){const{sentry:t,initOptions:n,flushTimeout:s=2e3,breadcrumbCategory:r="app"}=e;return{init(){n&&t.init&&t.init(n)},identify(a){t.setUser(Gy(a))},track(a){t.addBreadcrumb({category:r,message:a.name,level:"info",...a.properties?{data:a.properties}:null})},captureException(a,i){t.captureException(a,i?{extra:i}:void 0)},async flush(){t.flush&&await t.flush(s)}}}function Qy(e){const{email:t,name:n,traits:s}=e;return{...t!==void 0?{email:t}:null,...n!==void 0?{name:n}:null,...s??null}}function Vy(e){const{posthog:t,init:n}=e;return{init(){n&&t.init&&t.init(n.apiKey,n.options)},identify(s){if(s===null){t.reset?.();return}s.id!==void 0&&t.identify(s.id,Qy(s))},track(s){t.capture(s.name,s.properties)},captureException(s,r){if(t.captureException){t.captureException(s,r);return}const a=s instanceof Error?s:new Error(String(s));t.capture("$exception",{$exception_message:a.message,$exception_type:a.name,$exception_stack_trace_raw:a.stack,...r})}}}const Jn=l.createContext(null);function Xy({adapter:e,children:t}){const n=l.useMemo(()=>e,[e]);return l.useEffect(()=>{},[n]),o.jsx(Jn.Provider,{value:n,children:t})}function Qn(){const e=l.useContext(Jn);if(!e)throw new Error("useFeatureFlag requires <FeatureFlagsProvider>");return e}function Yy(e,t=!1){const n=Qn(),s=a=>n.onChange?n.onChange(a):()=>{},r=()=>n.isEnabled(e,t);return l.useSyncExternalStore(s,r,r)}function Zy(e,t){const n=Qn(),s=a=>n.onChange?n.onChange(a):()=>{},r=()=>n.get(e,t);return l.useSyncExternalStore(s,r,r)}function ew(e={}){const t={...e.initial??{}},n=new Set;function s(){for(const r of n)r()}return{isEnabled(r,a=!1){return r in t?!!t[r]:a},get(r,a){return r in t?t[r]:a},onChange(r){return n.add(r),()=>n.delete(r)},set(r,a){t[r]=a,s()}}}function tw(e){const{growthbook:t}=e,n=new Set;let s=!1;function r(){s||!t.setRenderer||(s=!0,t.setRenderer(()=>{for(const a of n)a()}))}return{isEnabled(a,i=!1){const c=t.isOn(a);return typeof c=="boolean"?c:i},get(a,i){return t.getFeatureValue(a,i)},onChange(a){return r(),n.add(a),()=>{n.delete(a)}}}}function nw(e){const{client:t}=e;return{isEnabled(n,s=!1){return t.variation(n,s)===!0},get(n,s){return t.variation(n,s)},onChange(n){return!t.on||!t.off?()=>{}:(t.on("change",n),()=>{t.off("change",n)})}}}async function sw(e){if(typeof navigator>"u"||!("share"in navigator))return{shared:!1,unsupported:!0,cancelled:!1};if(e.files&&!navigator.canShare?.({files:e.files}))return{shared:!1,unsupported:!0,cancelled:!1};try{return await navigator.share(e),{shared:!0,unsupported:!1,cancelled:!1}}catch(t){return t instanceof DOMException&&t.name==="AbortError"?{shared:!1,unsupported:!1,cancelled:!0}:{shared:!1,unsupported:!1,cancelled:!1,error:t}}}function rw(){return typeof navigator<"u"&&"share"in navigator}exports.createPartialResponse=oe.createPartialResponse;exports.installBackgroundSync=oe.installBackgroundSync;exports.installNotificationClickHandler=oe.installNotificationClickHandler;exports.installPrecache=oe.installPrecache;exports.installPushHandler=oe.installPushHandler;exports.installRuntimeCache=oe.installRuntimeCache;exports.installSkipWaitingListener=oe.installSkipWaitingListener;exports.registerServiceWorker=oe.registerServiceWorker;exports.skipWaiting=oe.skipWaiting;exports.unregisterAllServiceWorkers=oe.unregisterAllServiceWorkers;Object.defineProperty(exports,"BrowserRouter",{enumerable:!0,get:()=>I.BrowserRouter});Object.defineProperty(exports,"HashRouter",{enumerable:!0,get:()=>I.HashRouter});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>I.Link});Object.defineProperty(exports,"MemoryRouter",{enumerable:!0,get:()=>I.MemoryRouter});Object.defineProperty(exports,"NavLink",{enumerable:!0,get:()=>I.NavLink});Object.defineProperty(exports,"Navigate",{enumerable:!0,get:()=>I.Navigate});Object.defineProperty(exports,"Outlet",{enumerable:!0,get:()=>I.Outlet});Object.defineProperty(exports,"Route",{enumerable:!0,get:()=>I.Route});Object.defineProperty(exports,"Routes",{enumerable:!0,get:()=>I.Routes});Object.defineProperty(exports,"redirect",{enumerable:!0,get:()=>I.redirect});Object.defineProperty(exports,"useLocation",{enumerable:!0,get:()=>I.useLocation});Object.defineProperty(exports,"useMatch",{enumerable:!0,get:()=>I.useMatch});Object.defineProperty(exports,"useNavigate",{enumerable:!0,get:()=>I.useNavigate});Object.defineProperty(exports,"useParams",{enumerable:!0,get:()=>I.useParams});Object.defineProperty(exports,"useRouteError",{enumerable:!0,get:()=>I.useRouteError});Object.defineProperty(exports,"useSearchParams",{enumerable:!0,get:()=>I.useSearchParams});Object.defineProperty(exports,"Controller",{enumerable:!0,get:()=>re.Controller});Object.defineProperty(exports,"FormProvider",{enumerable:!0,get:()=>re.FormProvider});Object.defineProperty(exports,"useFieldArray",{enumerable:!0,get:()=>re.useFieldArray});Object.defineProperty(exports,"useForm",{enumerable:!0,get:()=>re.useForm});Object.defineProperty(exports,"useFormContext",{enumerable:!0,get:()=>re.useFormContext});Object.defineProperty(exports,"useFormState",{enumerable:!0,get:()=>re.useFormState});Object.defineProperty(exports,"useWatch",{enumerable:!0,get:()=>re.useWatch});exports.Accordion=os;exports.Alert=ws;exports.AppProviders=hy;exports.AppRouter=iy;exports.AppShell=Rs;exports.AspectRatio=Ms;exports.AuthGuard=Ub;exports.Avatar=Js;exports.BREAKPOINTS=rt;exports.Badge=lr;exports.Banner=vr;exports.BottomNavigation=Er;exports.BottomSheet=Dr;exports.Breadcrumbs=qr;exports.Button=ot;exports.CACHE_TIME=Nn;exports.CEPInput=My;exports.CNPJInput=Ly;exports.CPFInput=Ry;exports.Calendar=H_;exports.Card=$o;exports.Carousel=vg;exports.Center=Eo;exports.Checkbox=Do;exports.ChipInput=Qo;exports.ClickOutside=oh;exports.Collapsible=Bh;exports.Combobox=ua;exports.Command=y_;exports.ConditionalWrapper=ah;exports.ConfirmDialog=Ta;exports.Container=Jc;exports.ContextMenu=Gh;exports.CopyButton=Gf;exports.DataList=_h;exports.DataTable=sb;exports.DatePicker=Ka;exports.DescriptionList=wh;exports.Divider=ei;exports.Drawer=yi;exports.DropdownMenu=Ii;exports.EmptyState=Fi;exports.ErrorBoundary=Pn;exports.ErrorState=Hi;exports.ErrorText=uh;exports.FeatureFlagsProvider=Xy;exports.FileUpload=cc;exports.For=ih;exports.Form=kc;exports.FormActions=Cc;exports.FormField=ky;exports.FormRow=Sc;exports.FormSection=Nc;exports.GoogleSignIn=Jb;exports.Grid=Yc;exports.Hide=ud;exports.HoverCard=n_;exports.I18nProvider=In;exports.Image=mh;exports.Input=ct;exports.Kbd=sl;exports.Label=Ah;exports.Menubar=ug;exports.Modal=en;exports.Money=Yf;exports.MoneyInput=Dy;exports.Navbar=ml;exports.NavigationMenu=Z_;exports.Page=kl;exports.Pagination=rn;exports.PasswordInput=tu;exports.PhoneInput=Iy;exports.PinInput=fu;exports.Popover=xu;exports.Portal=mn;exports.Progress=Lu;exports.QueryProvider=Sn;exports.REFETCH_TIME=Vb;exports.Radio=Wu;exports.RadioGroup=qu;exports.RangeSlider=Yu;exports.RatingStars=id;exports.RelativeTime=Xf;exports.Resizable=T_;exports.RouteGuard=Cn;exports.STALE_TIME=kn;exports.SafeArea=bd;exports.ScrollArea=j_;exports.SearchBar=ln;exports.SegmentedControl=Md;exports.Select=Ud;exports.Show=ld;exports.Sidebar=np;exports.Skeleton=ap;exports.Spacer=dp;exports.Spinner=yp;exports.Stack=Vc;exports.Stat=Lp;exports.Stepper=zp;exports.StepperInput=Zp;exports.Switch=am;exports.Table=un;exports.Tabs=Fm;exports.Tag=ym;exports.TelemetryProvider=Uy;exports.TempestApiError=it;exports.Textarea=Gm;exports.ThemeProvider=Rn;exports.Timeline=uf;exports.ToastProvider=Af;exports.Toggle=Sh;exports.ToggleGroup=Lh;exports.ToggleGroupItem=Ih;exports.Tooltip=bf;exports.TruncateText=th;exports.VirtualList=Uf;exports.VisuallyHidden=rh;exports.WebPushClient=Fn;exports.WebPushPermissionDeniedError=On;exports.WebPushUnsupportedError=Nt;exports.assertNever=Nb;exports.buildApiError=Ct;exports.camelCase=pb;exports.capitalize=db;exports.chunk=gb;exports.clamp=wt;exports.cn=v;exports.consoleSink=Hn;exports.consoleTelemetryAdapter=Ky;exports.createApiClient=nt;exports.createAudioPlayer=Tt;exports.createAuthStore=vn;exports.createEventStream=An;exports.createGrowthBookFeatureFlagsAdapter=tw;exports.createI18n=Et;exports.createInMemoryFlags=ew;exports.createLaunchDarklyFeatureFlagsAdapter=nw;exports.createLogger=Kn;exports.createOfflineStore=jy;exports.createPostHogTelemetryAdapter=Vy;exports.createQueryKeys=Xb;exports.createRefreshQueue=$n;exports.createSelectors=ly;exports.createSentryTelemetryAdapter=Jy;exports.createStore=cy;exports.createTempestAuth=Gb;exports.createWebSocket=Un;exports.debounce=Sb;exports.decodeJWT=xn;exports.deepMerge=wn;exports.defineRoutes=sy;exports.emptyOffsetPage=ey;exports.estimatePasswordStrength=on;exports.formatBytes=Wp;exports.formatCEP=Wn;exports.formatCNPJ=qn;exports.formatCPF=yn;exports.formatCompactNumber=qp;exports.formatCurrency=rb;exports.formatDate=ob;exports.formatDateTime=ab;exports.formatPercent=ib;exports.formatPhone=bn;exports.generateIdempotencyKey=Wb;exports.getInitialTheme=zy;exports.groupBy=hb;exports.isApiError=Ib;exports.isCursorPage=Zb;exports.isDefined=xb;exports.isEmpty=vb;exports.isJWTExpired=Hb;exports.isNumber=$b;exports.isOffsetPage=Yb;exports.isPlainObject=kb;exports.isPushSupported=Ue;exports.isShareSupported=rw;exports.isString=jb;exports.kebabCase=mb;exports.lazyWithRetry=jn;exports.memoizeOne=Tb;exports.omit=wb;exports.once=Eb;exports.parseResponse=Db;exports.pick=yb;exports.playAudio=yy;exports.pluralize=fb;exports.randomId=St;exports.range=bb;exports.relativeTime=pn;exports.retry=zb;exports.share=sw;exports.sleep=Rb;exports.slugify=lb;exports.stopAudio=wy;exports.storage=cb;exports.themeInitScript=Wy;exports.throttle=Cb;exports.truncate=ub;exports.uniqueBy=_b;exports.unmask=Ty;exports.uploadWithProgress=Fb;exports.urlBase64ToUint8Array=Dn;exports.useAsync=Tg;exports.useAudio=vy;exports.useBeforeInstallPrompt=Fg;exports.useBreakpoint=Ee;exports.useClientFilter=jg;exports.useClipboard=Pg;exports.useCursorQuery=ny;exports.useDebounce=xg;exports.useDeepMemo=Ug;exports.useDocumentVisibility=Lg;exports.useErrorHandler=$y;exports.useEventListener=kg;exports.useEventStream=gy;exports.useFeatureFlag=Yy;exports.useFlagValue=Zy;exports.useFocusTrap=hn;exports.useGeolocation=zg;exports.useHover=Vg;exports.useI18n=Mn;exports.useIdle=Bg;exports.useIntersectionObserver=Ig;exports.useInterval=Kg;exports.useKeyboardShortcut=Og;exports.useLocalStorage=Cg;exports.useLongPress=Xg;exports.useMediaQuery=$g;exports.useOAuthCallback=Qb;exports.useOnline=Rg;exports.usePaginatedQuery=ty;exports.usePagination=gn;exports.usePoll=qb;exports.usePrevious=Hg;exports.usePushSubscription=by;exports.useResizeObserver=Mg;exports.useScrollLock=Wg;exports.useStableCallback=qg;exports.useTelemetry=Hy;exports.useTheme=dy;exports.useThrottle=Jg;exports.useTimeout=Gg;exports.useToast=Pf;exports.useToggle=Eg;exports.useTranslate=my;exports.useViaCEP=Oy;exports.useWebSocket=By;exports.useWindowSize=Qg;exports.useZodForm=Sy;exports.validateCNPJ=Ey;exports.validateCPF=Cy;exports.validateForm=Ny;exports.withTimeout=Lb;exports.zodResolver=zn;
15
15
  //# sourceMappingURL=tempest-react-sdk.cjs.map