1var H=Object.defineProperty,I=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var w=Object.getOwnPropertySymbols;var U=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var C=(o,i,t)=>i in o?H(o,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[i]=t,k=(o,i)=>{for(var t in i||(i={}))U.call(i,t)&&C(o,t,i[t]);if(w)for(var t of w(i))$.call(i,t)&&C(o,t,i[t]);return o},S=(o,i)=>I(o,N(i));import{s as r,A as _,a as Q,r as l,j as e,R as T,u as j,F as b,b as s,B as q,L as J,_ as K,P as V,S as W,c as G,d as X,e as Y,f as Z,g as P,h as ee,i as te}from"./vendor.a38976bf.js";const oe=function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))c(n);new MutationObserver(n=>{for(const a of n)if(a.type==="childList")for(const d of a.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&c(d)}).observe(document,{childList:!0,subtree:!0});function t(n){const a={};return n.integrity&&(a.integrity=n.integrity),n.referrerpolicy&&(a.referrerPolicy=n.referrerpolicy),n.crossorigin==="use-credentials"?a.credentials="include":n.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function c(n){if(n.ep)return;n.ep=!0;const a=t(n);fetch(n.href,a)}};oe();const ie=r.div` 2 display: flex; 3 align-items: center; 4 justify-content: space-evenly; 5 position: fixed; 6 z-index: 2; 7 8 width: 100%; 9 height: 100px; 10 background: #fff159; 11`,ne=r.div` 12 width: 80px; 13 height: 80px; 14`,re=r.div` 15 display: flex; 16 flex-direction: column; 17 justify-content: space-around; 18 height: 100%; 19 width: 40%; 20`,ae=r(_)` 21 width: 50px; 22 height: 50px; 23 24 color: ${({color:o})=>o}; 25`;var se="/assets/mercado-livre-logo.12232a35.svg";const m=async o=>{try{return(await Q.get(o)).data}catch(i){console.log(i.message)}},ce=async()=>await m("https://api.mercadolibre.com/sites/MLB/categories"),le=async(o,i)=>{const t=`https://api.mercadolibre.com/sites/MLB/search?category=${o}&q=${i}`;return await m(t)},de=async o=>{const i=`https://api.mercadolibre.com/items/${o}`;return await m(i)},L=l.exports.createContext(),pe=({children:o})=>{const[i,t]=l.exports.useState([]),[c,n]=l.exports.useState([]),[a,d]=l.exports.useState(""),[h,p]=l.exports.useState(""),[f,g]=l.exports.useState(!1),[B,D]=l.exports.useState({}),[y,F]=l.exports.useState("");l.exports.useState([]);const M=async()=>{g(!0),g(!1);const u=await ce();n(u.slice(0,20))},E=async(u,v)=>{if(g(!0),v==="felipe")t([{title:"Professor gostoso e inteligente",price:5,thumbnail:"https://ca.slack-edge.com/TMDDFEPFU-U02F24A9QLU-89a646b13624-512",shipping:{free_shipping:!0}}]);else{const z=await le(u,v);t(z.results)}g(!1)};l.exports.useEffect(()=>{g(!0),de(y).then(u=>{D(u),console.log(u),g(!1)})},[y]),l.exports.useEffect(()=>{M()},[]),l.exports.useEffect(()=>{E(a,h)},[a,h]);const R={categories:c,setCategory:d,products:i,setQuery:p,query:h,isLoading:f,productInfos:B,setProductId:F};return e(L.Provider,{value:R,children:o})},x=()=>l.exports.useContext(L),he=r.div` 26 display: flex; 27 align-items: center; 28 width: 110px; 29 justify-content: center; 30 position: relative; 31`,ge=r.div` 32 z-index: 5; 33 cursor: pointer; 34 35 width: 100%; 36 text-align: center; 37 color: #4b4b4b; 38 font-weight: 500; 39 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, 40 Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; 41 42 p { 43 display: flex; 44 align-items: center; 45 justify-content: center; 46 height: 30px; 47 } 48 49 div { 50 left: -72px; 51 position: absolute; 52 top: 50px; 53 text-align: center; 54 visibility: hidden; 55 background-color: #292b2e; 56 color: #fff; 57 padding: 20px 0; 58 border-radius: 5px; 59 transition: all 0.3s; 60 z-index: 10; 61 62 &:after { 63 content: ''; 64 position: absolute; 65 bottom: 100%; 66 left: 75%; 67 margin-left: -8px; 68 width: 0; 69 height: 0; 70 border-bottom: 8px solid #292b2e; 71 border-right: 8px solid transparent; 72 border-left: 8px solid transparent; 73 } 74 75 button { 76 padding-left: 30px; 77 text-align: left; 78 width: 220px; 79 font-size: 14px; 80 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, 81 Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; 82 font-weight: 400; 83 height: 30px; 84 border: none; 85 background: none; 86 color: white; 87 cursor: pointer; 88 89 &:hover { 90 background: #008aff; 91 } 92 } 93 } 94 &:hover, 95 div { 96 svg { 97 color: black; 98 } 99 color: black; 100 transition: all 0.3s; 101 div { 102 visibility: visible; 103 } 104 span { 105 visibility: visible; 106 } 107 } 108`,ue=r(T)` 109 margin-top: 5px; 110 color: #4b4b4b; 111 width: 25px; 112 height: 25px; 113`,xe=r.span` 114 visibility: hidden; 115 left: 0; 116 top: 100px; 117 width: 100vw; 118 height: 100vh; 119 background: rgba(5, 5, 5, 30%); 120 position: fixed; 121 transition: all 0.3s; 122 z-index: 2; 123 pointer-events: none; 124`;function fe(){const{categories:o,setCategory:i}=x(),t=j(),c=n=>{i(n.target.id),t("/")};return e(b,{children:e(he,{children:s(ge,{children:[s("p",{children:["Categorias ",e(ue,{})]}),e("div",{children:o.map(({name:n,id:a})=>e("button",{id:a,onClick:c,children:n},a))}),e(xe,{className:"overlay"})]})})})}const be=r.div` 125 display: flex; 126 justify-content: space-evenly; 127 align-items: baseline; 128 width: 100%; 129`;function me(){return s(be,{children:[e(fe,{}),e("div",{children:"Ofertas do dia"}),e("div",{children:"Contato"})]})}const ye=r.form` 130 width: 100%; 131 display: flex; 132 justify-content: space-between; 133 align-items: center; 134 height: 40px; 135 background: #fff; 136 padding: 0 15px; 137 align-items: center; 138 box-shadow: 0 1px 2px 0.3px #a9a9a9; 139 140 input { 141 border: none; 142 width: 90%; 143 144 border-right: 1px solid #a9a9; 145 146 &:focus { 147 box-shadow: 0; 148 border: 0 none; 149 border-right: 1px solid #a9a9; 150 outline: 0; 151 } 152 } 153`,ve=r(q)` 154 width: 25px; 155 height: 25px; 156 color: gray; 157`;function we(){const{setQuery:o,setCategory:i}=x(),[t,c]=l.exports.useState(""),n=j(),a=d=>{d.preventDefault(),o(t),i(""),n("/")};return s(ye,{onSubmit:a,children:[e("input",{name:"inputSearch",type:"text",value:t,placeholder:"Buscar produtos, mar
157cas e muito mais...",onChange:d=>c(d.target.value)}),e(ve,{onClick:a})]})}function A(){const[o,i]=l.exports.useState("black"),t=()=>{i(c=>c==="red"?"black":"red")};return l.exports.useEffect(()=>{console.log("oi")}),s(ie,{children:[e(ne,{children:e("img",{src:se,alt:"MercadoLogo"})}),s(re,{children:[e(we,{}),e(me,{})]}),e("div",{children:e(ae,{onClick:t,color:o})})]})}const Ce=r.div` 158 text-decoration: none; 159 160 display: flex; 161 flex-direction: column; 162 align-items: center; 163 164 width: 290px; 165 height: 530px; 166 167 margin: 10px; 168 border-radius: 8px; 169 box-shadow: 0 0 2px 1px rgba(199, 197, 197, 0.739); 170 box-sizing: border-box; 171 172 font-family: Inter, sans-serif; 173 background-color: white; 174 transition: all 0.3s; 175 &:hover { 176 box-shadow: 0 20px 30px 4px rgba(173, 172, 172, 0.808); 177 z-index: 1; 178 } 179`,ke=r.div` 180 border-radius: 8px 8px 0 0; 181 background-color: white; 182 width: 100%; 183 height: 55%; 184 border-bottom: 1px solid rgba(204, 203, 203, 0.52); 185 overflow: hidden; 186 text-align: center; 187 img { 188 max-width: 100%; 189 max-height: 100%; 190 box-sizing: content-box; 191 transition: all 0.3s; 192 } 193 img:hover { 194 transform: scale(1.1); 195 } 196`,Se=r(J)` 197 text-decoration: none; 198`,Pe=r.div` 199 background-color: white; 200 padding: 20px; 201 font-family: sans-serif; 202 display: flex; 203 flex-direction: column; 204 justify-content: space-between; 205 height: 300px; 206 border-radius: 0 0 8px 8px; 207`,je=r.p` 208 color: rgb(46, 45, 45); 209 font-weight: 400; 210 font-size: 1.6rem; 211 background-color: white; 212 align-self: flex-start; 213`,Le=r.div` 214 display: flex; 215 justify-content: flex-start; 216 217 p { 218 color: rgb(46, 45, 45); 219 font-weight: 400; 220 font-size: 1rem; 221 background-color: white; 222 223 word-break: break-word; 224 display: -webkit-box; 225 -webkit-line-clamp: 2; 226 -webkit-box-orient: vertical; 227 overflow: hidden; 228 text-overflow: ellipsis; 229 } 230`,Ae=r.p` 231 color: #03a752; 232 font-weight: 600; 233 font-size: 0.8rem; 234`,Oe=r.button` 235 background: #03a752; 236 color: white; 237 border: none; 238 border-radius: 5px; 239 240 &:hover { 241 box-shadow: 0 0 2px 2px gray; 242 font-weight: 600; 243 } 244 245`,Be=({price:o,shipping:i,title:t})=>s(Pe,{children:[e(je,{children:o==null?void 0:o.toLocaleString("pt-br",{style:"currency",currency:"BRL"})}),i&&e(Ae,{children:"Frete gr\xE1tis"}),e(Le,{children:e("p",{children:t})}),e(Oe,{onClick:()=>{console.log("aaaaaaaa")},children:"Comprar"})]}),De=({products:o})=>o==null?void 0:o.map(({title:i,price:t,thumbnail:c,shipping:n,id:a})=>e(Se,{to:`/product-details/${a}`,children:s(Ce,{children:[e(ke,{children:e("img",{src:c.replace("I.jpg","J.jpg"),alt:i})}),e(Be,{price:t,title:i,shipping:n.free_shipping})]})},a)),Fe=r.div` 246 height: 361px; 247 width: 60%; 248 margin: 0 auto; 249 250 /* * { 251 border: 1px solid red; 252 } */ 253 254 .css-1ps6pg7-MuiPaper-root { 255 text-align: center; 256 257 cursor: move; 258 cursor: grab; 259 cursor: -moz-grab; 260 cursor: -webkit-grab; 261 262 border-radius: none; 263 box-shadow: none; 264 } 265 .css-1ps6pg7-MuiPaper-root:active { 266 border: none; 267 cursor: grabbing; 268 cursor: -moz-grabbing; 269 cursor: -webkit-grabbing; 270 } 271 272 img { 273 border: none; 274 275 width: 410px; 276 height: 310px; 277 object-fit: contain; 278 } 279 280 transition: all 0.3s; 281`,Me=()=>{var c;const{products:o,setQuery:i}=x();l.exports.useEffect(()=>{o.length||i("promo\xE7\xE3o")},[]);const t={autoPlay:!0,stopAutoPlayOnHover:!0,interval:3e3,indicators:!0,swipe:!0,cycleNavigation:!0,navButtonsAlwaysVisible:!0,navButtonsAlwaysInvisible:!1,fullHeightHover:!1,duration:500};return e(b,{children:(o==null?void 0:o.length)&&e(Fe,{children:e(K,S(k({},t),{animation:"slide",children:(c=o==null?void 0:o.slice(0,10))==null?void 0:c.map(({thumbnail:n,id:a})=>e(V,{children:e("img",{src:n.replace("I.jpg","J.jpg"),alt:""})},a))}))})})},Ee=r.div` 282 position: absolute; 283 top: 50vh; 284 left: 50vw; 285 286 * { 287 width: 40px; 288 height: 40px; 289 } 290`;function O(){return e(Ee,{children:e(W,{animation:"border"})})}function Re(){const{products:o,isLoading:i}=x();return s("div",{children:[e(A,{}),e("div",{style:{"padding-top":"120px"},children:i?e(O,{}):s(b,{children:[e(Me,{}),e("div",{style:{display:"flex",flexWrap:"wrap","justify-content":"center"},children:e(De,{products:o})})]})})]})}const ze=r.div` 291 border: 1px solid red; 292`;function He(o){const{attributes:i}=o;return s(ze,{children:[e("p",{children:"Informa\xE7\xF5es detalhadas do produto"}),e("table",{children:e("tbody",{children:i==null?void 0:i.map(({id:t,name:c,value_name:n})=>s("tr",{children:[e("td",{children:c}),e("td",{children:n})]},t))})})]})}const Ie=r.div` 293 display: flex; 294 justify-content: space-around; 295 width: 100%; 296`,Ne=r.div` 297 display: flex; 298 flex-direction: column; 299 align-items: center; 300 width: 85px; 301 padding-top: 5px; 302 height: 600px; 303 304 overflow: auto; 305 img { 306 width: 50px; 307 border: 0.5px solid #aaabab; 308 height: 50px; 309 margin-top: 10px; 310 border-radius: 5px; 311 object-fit: contain; 312 313 &:hover { 314 box-shadow: 0 0 1px 2px #005aff; 315 } 316 } 317`,Ue=r.div` 318 display: flex; 319 justify-content: center; 320 align-items: center; 321 322 width: 90%; 323 height: 600px; 324 325 img { 326 object-fit: contain; 327 height: 80%; 328 width: 80%; 329 } 330`;function $e({pictures:o,thumbnail:i}){const[t,c]=l.exports.useState("");return l.exports.useEffect(()=>{c(i==null?void 0:i.replace("I.jpg","J.jpg"))},[i]),s(Ie,{children:[e(Ne,{children:o==null?void 0:o.slice(0,6).map(({url:n,id:a})=>e("img",{onMouseOver:()=>c(n),src:n,alt:n},a))}),t&&e(Ue,{children:e("img",{src:t,alt:"aaaaaa"})})]})}const _e=r.div` 331 display: flex; 332 flex-direction: column; 333 align-items: center; 334 padding-top: 100px; 335`,Qe=r.div` 336 width: 70%; 337`,Te=r.div` 338 height: 250px; 339 width: 100vw; 340 background-image: url(https://http2.mlstatic.com/storage/official-stores-images/multimveis/background2
34002002130329.jpg); 341`,qe=r.div` 342 display: flex; 343 flex-direction: column; 344 345 margin: 15px 15px 0 0; 346 border-radius: 10px; 347 348 padding: 15px; 349 350 border: 1px solid #dbd9d9; 351 352 width: 30%; 353`,Je=r.div` 354 display: flex; 355 flex-direction: row; 356 justify-content: space-between; 357 358 background: #f9f9f9; 359 width: 65%; 360 margin-top: -110px; 361 border-radius: 5px; 362 363 border-top: 50px solid #e5e5e5; 364`,Ke=r.div` 365 display: flex; 366 justify-content: space-around; 367 368 h1 { 369 font-size: 20px; 370 width: 80%; 371 } 372`,Ve=r(G)` 373 width: 25px; 374 height: 30px; 375 color: #3483fa; 376`,We=r(X)` 377 width: 25px; 378 height: 30px; 379 color: red; 380`,Ge=r.div` 381 width: 50%; 382 height: 25px; 383 display: flex; 384 margin-bottom: 10px; 385 justify-content: space-between; 386 span { 387 width: 60px; 388 border-right: 1px solid #a9a9a9; 389 } 390`,Xe=r.div` 391 border: 1px solid red; 392 display: flex; 393 flex-direction: column ; 394 align-items: flex-start ; 395 396 397 p { 398 text-decoration: line-through; 399 color: gray; 400 } 401 402 span { 403 display: flex; 404 width: 80%; 405 align-items: center; 406 justify-content: space-around; ; 407 font-size: 30px; 408 font-weight: 300; 409 } 410 411 h5 { 412 color: #16AE5F 413 } 414`,Ye={new:"novo",used:"usado",undefined:"n\xE3o especificado"};function Ze(){const{id:o}=Y(),{setProductId:i,productInfos:t,isLoading:c}=x(),[n,a]=l.exports.useState(!1),d=(p,f)=>p&&f?Math.floor(Math.floor(p)/Math.floor(f)*100/10)+"% OFF":"",h=p=>p==null?void 0:p.toLocaleString("pt-BR",{style:"currency",currency:"BRL"});return l.exports.useEffect(()=>{i(o)}),s(b,{children:[e(A,{}),c?e(O,{}):s(_e,{children:[e(Te,{}),s(Je,{children:[s(Qe,{children:[e($e,{thumbnail:t==null?void 0:t.thumbnail,pictures:t==null?void 0:t.pictures}),e(He,{attributes:t==null?void 0:t.attributes})]}),s(qe,{children:[s(Ge,{children:[s("span",{children:[" ",Ye[t==null?void 0:t.condition]]}),s("p",{children:[t==null?void 0:t.sold_quantity," vendidos"]})]}),s(Ke,{children:[e("h1",{children:t==null?void 0:t.title}),e("div",{onClick:()=>a(!n),children:n?e(We,{}):e(Ve,{})})]}),s(Xe,{children:[e("p",{children:h(t==null?void 0:t.original_price)}),s("span",{children:[h(t==null?void 0:t.price),e("h5",{children:d(t==null?void 0:t.price,t==null?void 0:t.original_price)})]})]})]})]})]})]})}const et=()=>s(Z,{children:[e(P,{path:"/",element:e(Re,{})}),e(P,{path:"/product-details/:id",element:e(Ze,{})})]});function tt(){return e(et,{})}ee.render(e(pe,{children:e(te,{children:e(tt,{})})}),document.getElementById("root"));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.