(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[843],{84384:function(e,t){"use strict";t.JY=void 0;var r=["00000000000","11111111111","22222222222","33333333333","44444444444","55555555555","66666666666","77777777777","88888888888","99999999999"],o=/[.-]/g,n=/[^\d]/g;function a(e){var t=e.split("").map((function(e){return parseInt(e,10)})),r=t.length+1,o=t.map((function(e,t){return e*(r-t)})).reduce((function(e,t){return e+t}))%11;return o<2?0:11-o}function i(e){return l(e).replace(/^(\d{3})(\d{3})(\d{3})(\d{2})$/,"$1.$2.$3-$4")}function l(e,t){void 0===t&&(t=!1);var r=t?o:n;return(e||"").toString().replace(r,"")}t.JY=function(e,t){void 0===t&&(t=!1);var o=l(e,t);if(!o)return!1;if(11!==o.length)return!1;if(r.includes(o))return!1;var n=o.substr(0,9);return n+=a(n),(n+=a(n)).substr(-2)===o.substr(-2)}},67057:function(e,t,r){"use strict";r.d(t,{m:function(){return y}});var o=r(2784),n=r(77767),a=r(82740);const i={default:{backgroundColor:"--color-neutral-130",svgColor:"--color-neutral-70",opacity:.8,hover:{backgroundColor:"--color-neutral-130",svgColor:"--color-neutral-70"},focus:{backgroundColor:"--color-neutral-130",svgColor:"--color-neutral-70"},disabled:{backgroundColor:"--color-neutral-110",svgColor:"--color-neutral-120"}},inverted:{opacity:1,backgroundColor:"--color-neutral-70",svgColor:"--color-neutral-130",hover:{backgroundColor:"--color-neutral-90",svgColor:"--color-secondary-100"},focus:{backgroundColor:"--color-neutral-90",svgColor:"--color-secondary-100"},disabled:{backgroundColor:"--color-neutral-90",svgColor:"--color-neutral-110"}}},l={left:"0px 4px 4px 0px",right:"4px 0px 0px 4px",up:"0px 0px 4px 4px",down:"4px 4px 0px 0px"},s=a.default.button` display: inline-flex; justify-content: center; align-items: center; padding: 0px; min-width: ${e=>{var t;return null===(t=e.dimensions)||void 0===t?void 0:t.minWidth}}; min-height: ${e=>{var t;return null===(t=e.dimensions)||void 0===t?void 0:t.minHeight}}; opacity: ${e=>e.theme.opacity}; background-color: var(${e=>e.theme.backgroundColor}); border-radius: ${e=>l[e.direction||"left"]||"0px 4px 4px 0px"}; border: none; cursor: pointer; width: ${e=>{var t;return null===(t=e.dimensions)||void 0===t?void 0:t.width}}; height: ${e=>{var t;return null===(t=e.dimensions)||void 0===t?void 0:t.height}}; svg { color: var(${e=>e.theme.svgColor}); transform: rotate(${e=>e.rotation}deg); } :hover { opacity: 1; background-color: var(${e=>e.theme.hover.backgroundColor}); svg { color: var(${e=>e.theme.hover.svgColor}); } } :focus { opacity: 1; outline: 2px solid var(--color-neutral-130); outline-offset: 2px; background-color: var(${e=>e.theme.focus.backgroundColor}); svg { color: var(${e=>e.theme.focus.svgColor}); } } :disabled { pointer-events: none; background-color: var(${e=>e.theme.disabled.backgroundColor}); cursor: default; svg { color: var(${e=>e.theme.disabled.svgColor}); } } `,d=({direction:e,disabled:t,color:r="default",width:l="28px",height:d="48px",onClick:c,"aria-label":u})=>{const p="inverted"===r?"inverted":"default",m=(e=>{switch(e){case"left":return 0;case"up":return 90;case"right":return 180;case"down":return 270}return 0})(e),g=((e,t,r,o,n)=>{switch(r){case"up":case"down":return{width:o,height:n,minWidth:t,minHeight:e};case"right":case"left":default:return{width:o,height:n,minWidth:e,minHeight:t}}})("28px","48px",e,l,d);return o.createElement(a.ThemeProvider,{theme:i[p]},o.createElement(s,{"data-ds-component":"DS-ArrowButton",rotation:m,dimensions:g,direction:e,onClick:e=>{e.stopPropagation(),e.preventDefault(),c&&c(e)},disabled:!!t,color:r,"aria-label":u},o.createElement(n.ChevronLeft,null)))};d.displayName="ArrowButton";var c=d;var u=e=>o.createElement("svg",{style:{marginRight:e.marginRight||"0px"},width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.createElement("path",{d:"M23 7L16 12L23 17V7Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M14 5H3C1.89543 5 1 5.89543 1 7V17C1 18.1046 1.89543 19 3 19H14C15.1046 19 16 18.1046 16 17V7C16 5.89543 15.1046 5 14 5Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}));const p=a.default.div` display: inline-flex; flex-direction: row; justify-content: flex-end; align-items: center; padding: 4px 8px; gap: 10px; height: 24px; background: var(--color-neutral-130); opacity: 0.8; border-radius: 4px; div { display: flex; flex-direction: row; align-items: center; height: 16px; padding: 0px; gap: 4px; svg { width: 16px; height: 16px; color: var(--color-neutral-70); } span { width: 16px; height: 16px; display: contents; font-family: 'Nunito Sans'; font-style: normal; font-weight: 600; font-size: 12px; line-height: 16px; color: var(--color-neutral-70); } } `,m=({currentImage:e,imagesCount:t,currentVideo:r,videosCount:a,hideNumbers:i=!1,hideIcons:l=!1})=>{const s=e?`${e} / ${t}`:t,d=r?`${r} / ${a}`:a;return t||a?o.createElement(p,{"data-ds-component":"DS-AdMediaCounter"},!!t&&o.createElement("div",null,!l&&o.createElement(n.Camera,{size:16}),!i&&o.createElement("span",{"aria-label":`Quantidade de fotos: ${t}`},s)),!!a&&o.createElement("div",null,!l&&o.createElement(u,{size:16}),!i&&o.createElement("span",{"aria-label":`Quantidade de v\xeddeos: ${a}`},d))):o.createElement(o.Fragment,null)};m.displayName="AdMediaCounter";var g=m;const h=a.default.div` position: relative; width: 100%; height: 100%; padding: 0px; span { position: absolute; height: 24px; left: 8px; top: 8px; } @media screen and (min-width: 566px) { span { left: 16px; top: 16px; } } `,f=a.default.ul` scroll-snap-type: x mandatory; display: flex; justify-content: flex-start; align-items: center; overflow-x: scroll; overflow-y: hidden; padding: 0; margin: 0; height: 100%; scrollbar-width: none; ::-webkit-scrollbar { display: none; } `,v=a.default.li` list-style: none; margin: 0; padding: 0; min-width: 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; overflow: hidden; img { object-fit: cover; height: 100%; width: 100%; display: block; } `,b=a.default.div` display: flex; position: absolute; width: 28px; height: 48px; left: 0px; top: calc(50% - 48px / 2); `,x=a.default.div` display: flex; position: absolute; width: 28px; height: 48px; right: 0px; top: calc(50% - 48px / 2); `,w=a.default.div` position: absolute; right: 8px; bottom: 6px; `,y=({imageList:e=[],totalAdImages:t,totalAdVideos:r,badge:n,isSmallScreen:a,showDisabledButton:i,loading:l="lazy"})=>{const[s,d]=(0,o.useState)(0),u=(0,o.useRef)(null),p=(0,o.useRef)(null),m=(0,o.useRef)(null),y=(0,o.useRef)(null);!e.length&&e.push({url:"https://static.olx.com.br/cd/listing/notFound.png",alt:"An\xfancio sem imagens"});const k="undefined"!==typeof window,C=0===s,E=s===e.length-1,$=!C||i,z=!E||i,T=a&&r?0:t,S=e=>{const t=e.current;(null===t||void 0===t?void 0:t.dataset.src)&&(t.src=t.dataset.src,t.dataset.src="")};(0,o.useEffect)((()=>{S(u),S(p),(()=>{var e,t;const r=(null===(e=m.current)||void 0===e?void 0:e.clientWidth)||0,o=s;null===(t=y.current)||void 0===t||t.scrollTo({top:0,left:r*o,behavior:"smooth"})})()}));return o.createElement(h,{ref:m,"data-ds-component":"DS-AdCardImageCarousel"},o.createElement(f,{ref:y,onScroll:()=>{var e,t;const r=(null===(e=m.current)||void 0===e?void 0:e.clientWidth)||0,o=((null===(t=y.current)||void 0===t?void 0:t.scrollLeft)||0)/r;Number.isInteger(o)&&d(o)}},e.map(((e,t)=>{let r=null;t===s&&(r=u),t===s+1&&(r=p);const n={[k?"data-src":"src"]:e.url};return o.createElement(v,{key:e.alt,isSmallScreen:a},o.createElement("img",Object.assign({ref:r,alt:e.alt,loading:l},n)))}))),n,!a&&o.createElement(o.Fragment,null,$&&o.createElement(b,null,o.createElement(c,{onClick:()=>{d(s-1)},disabled:C,"aria-label":"Imagem anterior"})),z&&o.createElement(x,null,o.createElement(c,{direction:"right",onClick:()=>{d(s+1)},disabled:E,"aria-label":"Pr\xf3xima imagem"}))),o.createElement(w,null,o.createElement(g,{imagesCount:T,videosCount:r,hideNumbers:a})))};y.displayName="AdCardImageCarousel"},28714:function(e,t,r){"use strict";r.d(t,{C:function(){return a}});var o=r(2784);const n=r(82740).default.span` display: inline-flex; column-gap: var(--spacing-1); align-items: center; font-size: var(--font-size-xxxs); padding: var(--spacing-0-5) var(--spacing-1); border-radius: var(--border-radius-xs); font-family: var(--font-family); background: var(--color-neutral-70); color: var(--color-neutral-130); font-weight: 600; &.success { background: var(--color-feedback-success-80); color: var(--color-feedback-success-120); } &.info { background: var(--color-feedback-info-80); color: var(--color-feedback-info-110); } &.warning { background: var(--color-feedback-attention-80); color: var(--color-feedback-attention-110); } &.secondary { background: var(--color-secondary-70); color: var(--color-secondary-100); } &.error { background: var(--color-feedback-error-80); color: var(--color-feedback-error-110); } svg { max-width: 16px; max-height: 16px; } `,a=e=>{const t=e.customColor?{color:e.customColor.textColor||"",backgroundColor:e.customColor.backgroundColor||""}:{};return o.createElement(n,{"data-ds-component":"DS-Badge",role:"status",className:e.color||"info","aria-label":e["aria-label"],style:t},e.children)};a.displayName="Badge"},39647:function(e,t,r){"use strict";r.d(t,{W:function(){return d}});var o=r(2784);const n={type:"outlined"};var a=r(82740),i=r(42992),l=r(36827);const s=(0,a.default)((e=>o.createElement(i.k,Object.assign({"data-ds-component":"DS-Container"},e))))` background-color: var(--container-background-color); border-radius: var(--border-radius-sm); padding: var(--spacing-2); overflow: hidden; ${({type:e=n.type})=>({outlined:a.css` border: var(--border-width-hairline) solid var(--container-border-color-outlined); `,elevated:a.css` box-shadow: var(--shadow-level-3); `}[e])} ${l.i} `,d=e=>o.createElement(s,Object.assign({"data-ds-component":"DS-Container"},e),e.children);d.defaultProps=n,d.displayName="DS-Container"},49915:function(e,t,r){"use strict";r.d(t,{u:function(){return w}});var o=r(2784),n=r(11011),a=r(34736);const i=!1,l=!1,s="medium",d="464px",c="";var u=r(82740);const p={small:"400px",medium:"600px",large:"800px"},m=u.default.div` align-items: center; background-color: #00000055; border: 0; display: flex; height: 100%; justify-content: center; left: 0; position: fixed; right: 0; top: 0; width: 100%; z-index: var(--z-index-900-modal, 900); transition: opacity ease 300ms; opacity: 0; visibility: hidden; will-change: transform; &.show { opacity: 1; visibility: visible; } @media (max-width: 481px) { align-items: flex-end; } `,g=u.keyframes` from { transform: translateY(0%); } to { transform: translateY(100%); } `,h=u.default.div` background-color: white; border-radius: 16px; display: flex; flex-direction: column; width: ${({size:e})=>(e=>p[e])(e)}; max-width: ${({maxWidth:e})=>e}; max-height: ${({maxHeight:e})=>e}; min-height: 200px; padding: 24px 32px; position: relative; transition: opacity ease 300ms; opacity: 0; transition: all ease 0.3s; transform: translateY(10%) scale(0.9); &.show { opacity: 1; transform: scale(1); } @media (max-width: 481px) { border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; transform: translateY(100%) scale(0.9); /* animation: ${g} 600ms linear reverse; */ &.show { transform: translateY(0); } } `,f=u.default.button` align-items: center; background-color: #00000000; border: none; border-radius: 50%; cursor: pointer; display: inline-flex; justify-content: center; outline: none; padding: 5px; :hover { background-color: #f6f6f6; } :focus { outline: var(--border-width-thin) solid var(--color-neutral-130); border-radius: var(--border-radius-pill); } `,v=u.default.div` display: flex; justify-content: flex-end; `,b=u.default.div` display: flex; flex-direction: column; height: 100%; overflow-y: auto; overflow-x: hidden; ::-webkit-scrollbar { width: 10px; } /* Track */ ::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 15px; } /* Handle */ ::-webkit-scrollbar-thumb { background: #aaa; border-radius: 15px; } /* Handle on hover */ ::-webkit-scrollbar-thumb:hover { background: #888; } `,x=()=>o.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.0607 12L18.5303 17.4697C18.8232 17.7626 18.8232 18.2374 18.5303 18.5303C18.2374 18.8232 17.7626 18.8232 17.4697 18.5303L12 13.0607L6.53033 18.5303C6.23744 18.8232 5.76256 18.8232 5.46967 18.5303C5.17678 18.2374 5.17678 17.7626 5.46967 17.4697L10.9393 12L5.46967 6.53033C5.17678 6.23744 5.17678 5.76256 5.46967 5.46967C5.76256 5.17678 6.23744 5.17678 6.53033 5.46967L12 10.9393L17.4697 5.46967C17.7626 5.17678 18.2374 5.17678 18.5303 5.46967C18.8232 5.76256 18.8232 6.23744 18.5303 6.53033L13.0607 12Z",fill:"#4A4A4A"})),w=({children:e,open:t=i,preventCloseOnOutsideClick:r=l,size:u=s,maxHeight:p=d,maxWidth:g=c,closeCallback:w,onAfterOpen:y})=>{const[k,C]=(0,o.useState)(t),E=(0,o.useRef)(null),$=(0,n.L)("ds-modal-content"),z=(0,o.useCallback)((()=>{C(!1),w&&w()}),[w]);return(0,o.useEffect)((()=>{C(t),t&&y&&y()}),[y,t]),(0,o.useEffect)((()=>{const e=e=>{var t;if(k&&"Escape"===e.key)return z();const r=null===(t=E.current)||void 0===t?void 0:t.querySelectorAll('a, button:not([disabled]), input:not([readonly]), details, select, textarea, [tabindex]:not([tabindex^="-"])');if("Tab"===e.key||e.shiftKey){const t=r.item(0),o=r.item(r.length-1);e.shiftKey||"Tab"!==e.key||e.target!==o||(e.preventDefault(),t.focus()),e.shiftKey&&"Tab"===e.key&&e.target===t&&(e.preventDefault(),o.focus())}};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}}),[z,k]),(0,o.useEffect)((()=>{if(r)return;const e=e=>{k&&E.current&&!E.current.contains(e.target)&&z()};return window.addEventListener("mousedown",e),()=>{window.removeEventListener("mousedown",e)}}),[z,r,k]),o.createElement(m,{id:"modal","data-ds-component":"DS-Modal",className:k?"show":"",size:u,"data-testid":"modal-overlay","aria-hidden":!k},o.createElement(h,{role:"dialog","aria-modal":"true","aria-labelledby":$,"data-testid":"modal",size:u,maxHeight:p,maxWidth:g,ref:E,className:k?"show":""},o.createElement(v,null,o.createElement(f,{"data-ds-component":"DS-Modal-Button","data-testid":"closeButton",onClick:z,type:"button"},o.createElement(a.T,null,"Fechar janela de di\xe1logo"),o.createElement(x,null))),o.createElement(b,{id:$},e)))}},74168:function(e,t,r){"use strict";r.d(t,{o:function(){return S}});var o=r(2784);const n={type:"text",size:"medium"};var a=r(82740),i=r(65152),l=r(3925);const s=a.default.div` ${({display:e})=>e&&`display: ${e}`}; ${({width:e})=>e&&`width: ${e}`}; ${l.U} `,d=a.default.span` width: 100%; display: inline-flex; align-items: center; border: none; border-radius: ${({size:e})=>"medium"==e?"var(--border-radius-sm)":"var(--border-radius-xs)"}; background-color: var(--textinput-background-color-base); color: var(--textinput-color-font); position: relative; z-index: var(--z-index-1-default, 1); box-shadow: ${({hasContent:e})=>e?"0 0 0 var(--border-width-hairline) var(--textinput-border-color-filled)":"0 0 0 var(--border-width-hairline) var(--textinput-border-color-empty)"}; ${({disabled:e,state:t})=>((e,t)=>e?a.css` background-color: var(--textinput-background-color-disabled); box-shadow: 0 0 0 var(--border-width-hairline) var(--textinput-border-color-disabled); cursor: not-allowed; `:"error"===t?a.css` background-color: var(--textinput-background-color-error); box-shadow: 0 0 0 var(--border-width-hairline) var(--textinput-border-color-error); `:"success"===t?a.css` background-color: var(--textinput-background-color-success); box-shadow: 0 0 0 var(--border-width-hairline) var(--textinput-border-color-success); `:a.css` :hover { box-shadow: 0 0 0 var(--border-width-thin) var(--textinput-border-color-hover); } :focus-within { outline: var(--border-width-thin) solid var(--color-neutral-130); } `)(e,t)} `,c=a.default.input` width: 100%; outline: none; border: none; background-color: inherit; font-family: var(--font-family); font-weight: var(--font-weight-regular); position: relative; ${({variant:e})=>"medium"==e?"\n font-size: var(--font-size-xs);\n padding: var(--spacing-1-5) var(--spacing-2);\n line-height: var(--font-lineheight-distant);\n border-radius: var(--border-radius-sm);\n ":"\n font-size: var(--font-size-xxs);\n padding: var(--spacing-0-5) var(--spacing-1);\n border-radius: var(--border-radius-xs);\n "}; ::placeholder { color: var(--textinput-color-placeholder); } :disabled { cursor: not-allowed; } /* Chrome, Safari, Edge, Opera */ ::-webkit-outer-spin-button, ::-webkit-inner-spin-button { -webkit-appearance: none; } /* Firefox */ &[type='number'] { -moz-appearance: textfield; } `,u=a.default.span` ${({position:e,size:t})=>"medium"==t?`\n width: 24px;\n height: 24px;\n min-width: 24px;\n min-height: 24px;\n max-width: 24px;\n max-height: 24px;\n ${"left"===e?"margin-left: var(--spacing-2);":""}\n ${"right"===e?"margin-right: var(--spacing-2);":""}\n `:`\n width: 16px;\n height: 16px;\n min-width: 16px;\n min-height: 16px;\n max-width: 16px;\n max-height: 16px;\n ${"left"===e?"margin-left: var(--spacing-1);":""}\n ${"right"===e?"margin-right: var(--spacing-1);":""}\n `}; display: inline-flex; align-items: center; justify-content: center; svg { fill: var(--textinput-icon-color); width: 100%; height: 100%; } `,p=a.default.div` width: 100%; display: flex; align-items: center; justify-content: space-between; margin-bottom: ${({size:e})=>"medium"==e?"var(--spacing-1)":"var(--spacing-0-5)"}; `,m=a.default.span` display: flex; margin-top: var(--spacing-1); * { color: var(--textinput-feedback-error-font-color); } `,g=(0,a.default)(i.x.Caption)` margin-left: var(--spacing-0-5); line-height: 18px; `,h=a.default.div` width: 16px; height: 16px; `,f=(0,a.default)(i.x.Caption)` color: var(--textinput-caption-font-color); `,v=a.default.span` font-size: var(--font-size-xxxs); font-weight: var(--font-weight-regular); line-height: var(--font-lineheight-medium); color: var(--color-neutral-120); margin-top: var(--spacing-1); margin-left: var(--spacing-1); float: right; `,b=e=>void 0===e||null===e||""===e.trim();var x=r(24651);const w=({label:e,id:t,link:r,size:n})=>{if(b(e))return o.createElement(o.Fragment,null);const a="medium"===n?i.x.BodyMedium:i.x.BodySmall;return o.createElement(p,{size:n},o.createElement(a,{htmlFor:t,tag:"label",weight:"semibold"},e),r&&r)};var y=r(77767);const k=({caption:e,disabled:t,errorId:r,state:n,stateMessage:a})=>((e,t,r)=>!e&&"error"===t&&void 0!==r&&""!==r)(t,n,a)?o.createElement(o.Fragment,null,o.createElement(m,{id:r,role:"alert","aria-describedby":"contentError"},o.createElement(h,null,o.createElement(y.XCircle,{size:"16px"})),o.createElement(g,{id:"contentError"},a))):(e=>void 0!==e&&""!==e)(e)?o.createElement(f,{display:"block",marginTop:"--spacing-1"},e):null;var C=r(42992);const E=e=>e?e.toString().length:0;var $=r(11011),z=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n{if(b(r)&&b(e))throw new Error('[TextInput - Accessibility Error] Se a prop "label" n\xe3o for informada no TextInput \xe9 necess\xe1rio informar o atributo "aria-label" para garantir melhor acessibilidade no formul\xe1rio.');if(!b(r)&&b(t))throw new Error("[TextInput - Error] Para utiliza\xe7\xe3o da label com no componente \xe9 obrigat\xf3rio a utiliza\xe7\xe3o de um id v\xe1lido.");if("loading"===o&&b(n))throw new Error('[TextInput - Accessibility Error] Quando o componente est\xe1 com state="loading" a propriedade stateMessage \xe9 obrigat\xf3ria.')},S=(0,o.forwardRef)(((e,t)=>{var r;const[a,i]=(0,o.useState)("");(0,o.useEffect)((()=>{i(`error-${Math.floor(101*Math.random())}`)}),[]);const{"aria-label":l,className:p,display:m,iconLeft:g,iconRight:h,id:f,type:b=n.type,margin:y,marginBottom:S,marginLeft:L,marginRight:j,marginTop:D,state:O,width:B,size:N=n.size,limitTextSize:R}=e,A=z(e,["aria-label","className","display","iconLeft","iconRight","id","type","margin","marginBottom","marginLeft","marginRight","marginTop","state","width","size","limitTextSize"]);T(e);const I=(e=>{if(e&&Number.isInteger(e)&&e>=1)return e})(R),M=(0,$.L)("ds-textinput-limittext");return o.createElement(s,{"data-ds-component":"DS-TextInput",display:m,margin:y,marginBottom:S,marginLeft:L,marginRight:j,marginTop:D,width:B,className:p},o.createElement(w,Object.assign({},e,{id:f})),o.createElement(d,{state:O,disabled:!0===e.disabled,size:N,hasContent:void 0!==e.value&&""!==e.value},g&&o.createElement(u,{position:"left",size:N},g),o.createElement(c,Object.assign({id:f,type:b,"aria-busy":"loading"===O,"aria-label":l,"aria-invalid":"error"===O,"aria-errormessage":"error"===O?a:"","aria-disabled":!0===e.disabled},I&&{"aria-describedby":M},{variant:N,ref:t,maxLength:I},A)),("loading"===O||h)&&o.createElement(u,{position:"right",size:N},"loading"===O?o.createElement(x.$,{"aria-label":null!==(r=e.stateMessage)&&void 0!==r?r:"",size:"extra-small"}):h)),o.createElement(C.k,{flexDirection:"row",justifyContent:A.caption||"error"===O?"space-between":"flex-end"},o.createElement(k,Object.assign({errorId:a},e)),I&&o.createElement(v,{id:M,"aria-label":`${E(A.value)} de ${R} caracteres usado`},E(A.value),"/",R)))}));S.defaultProps=n,S.displayName="TextInput"},52908:function(e,t,r){"use strict";r.d(t,{F:function(){return w}});var o=r(2784),n=r(28316),a=r(51679),i=r(34736),l=r(82740),s=r(77767),d=r(39647),c=r(65152);const u=l.keyframes` 0% { opacity: 0; transform: translate(0, 100%); } 100% { opacity: 1; transform: none; } `,p=l.keyframes` 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate(0, 100%); } `,m=l.default.div` width: 100%; z-index: var(--z-index-500-toast, 500); position: fixed; bottom: 0; left: 0; `,g=(0,l.default)(d.W)` opacity: 1; width: 288px; position: absolute; bottom: var(--spacing-3); left: calc((100vw - 288px) / 2); /* largura da tela - largura do toast */ background-color: var(--toast-background-color); /* TODO: aplicar media queries do ds-grid quando for desenvolvido */ @media screen and (min-width: 600px) { width: 568px; left: var(--spacing-3); } ${({visible:e})=>e?l.css` animation: 0.5s ${u}; `:l.css` animation: 0.5s ${p}; animation-fill-mode: forwards; `} `,h=(0,l.default)(c.x.BodyMedium)` flex: 1; color: var(--toast-font-color); `,f=l.default.span` width: 24px; height: 24px; margin-right: var(--spacing-1); pointer-events: none; svg { width: 100%; height: 100%; pointer-events: none; } `,v=l.default.button` display: flex; padding: 0; margin-left: var(--spacing-1); background-color: transparent; border: none; cursor: pointer; `,b=(0,l.default)(s.X)` width: 24px; height: 24px; color: var(--toast-close-icon-color); `,x=5e3;class w extends o.Component{constructor(e){super(e),this.timeout=0,this.getActionByProps=(e,t)=>!e&&t?"mounting":e&&!t?"unmounting":null,this.closeToast=()=>{clearTimeout(this.timeout),this.props.onClose()},this.initTimer=()=>{const{duration:e=x}=this.props;"infinite"!==e&&e>0&&(clearTimeout(this.timeout),this.timeout=setTimeout(this.closeToast,e))},this.renderRightContent=()=>{var e;const{action:t,closable:r}=this.props;return t&&t.href&&t.text?o.createElement(a.r,{marginLeft:"--spacing-1",href:t.href,onClick:null!==(e=t.onClick)&&void 0!==e?e:void 0,size:"caption",variant:"inverted"},t.text):r?o.createElement(v,{onClick:this.closeToast,"data-ds-component":"DS-Toast-Button"},o.createElement(b,{"aria-hidden":"true","data-testid":"ds-icon-system-x",size:24}),o.createElement(i.T,null,"Fechar")):null},this.state={isClient:!1,unmount:!e.visible}}static getDerivedStateFromProps(e,t){return e.visible&&t.unmount?{unmount:!1}:null}componentDidMount(){this.setState({isClient:!0}),this.props.visible&&this.initTimer()}componentDidUpdate(e){const{visible:t}=e,{visible:r}=this.props,o=this.getActionByProps(t,r);"mounting"===o&&this.initTimer(),"unmounting"===o&&setTimeout((()=>this.setState({unmount:!0})),1e3)}componentWillUnmount(){clearTimeout(this.timeout)}render(){const{isClient:e,unmount:t}=this.state,{icon:r,visible:a,text:i}=this.props;return!e||t?null:(0,n.createPortal)(o.createElement(m,{role:"alert","data-ds-component":"DS-Toast"},o.createElement(g,{type:"elevated",paddingTop:"--spacing-2",paddingRight:"--spacing-3",paddingBottom:"--spacing-2",paddingLeft:"--spacing-3",visible:a},r&&o.createElement(f,null,r),o.createElement(h,null,i),this.renderRightContent())),document.body)}}w.defaultProps={visible:!1,duration:x}},11011:function(e,t,r){"use strict";r.d(t,{L:function(){return a}});var o=r(2784);const n=function(){let e=0;return function(t){return e+=1,`${t}-${e}`}}(),a=e=>(0,o.useRef)(n(e)).current},5632:function(e,t,r){e.exports=r(25564)},95922:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var o=r(64034),n=r(17602),a=r(57211),i=r(42330);function l(e){return(0,o.Z)(e)||(0,n.Z)(e)||(0,a.Z)(e)||(0,i.Z)()}}}]);