text: (()=>{"use strict";var e,t,o,r,a,n={5386:(e,t,o)=>{o.d(t,{Z:()=>d});var r,a=o(7294);e=o.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e);"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var n=function(){return a.createElement("div",{className:"Footer"},a.createElement("p",{className:"Footer-title"},"Platzi Store"),a.createElement("p",{className:"Footer-copy"},"Todos los Izquierdos Reservados"))},l=n;const d=l;var i,c;(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(i.register(n,"Footer","/home/juan/Dev/platzi-store/src/components/Footer.jsx"),i.register(l,"default","/home/juan/Dev/platzi-store/src/components/Footer.jsx")),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},9706:(e,t,o)=>{o.d(t,{Z:()=>p});var r=o(7294),a=o(3727),n=o(420),l=o(2694);const d=function(e){var t=e.title;return r.createElement("span",null,t)};var i;e=o.hmd(e),(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&i(e);"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var c=function(e){return r.createElement("div",{className:"Header"},r.createElement("h1",{className:"Header-title"},r.createElement(a.rU,{to:"/"},r.createElement("img",{src:l,alt:"Logo",width:"32"}),r.createElement(d,{title:"Platzi Store V2"}))),r.createElement("div",{className:"Header-checkout"},r.createElement(a.rU,{to:"/checkout"},r.createElement("i",{className:"fas fa-shopping-basket"})),e.cart.length>0&&r.createElement("div",{className:"Header-alert"},e.cart.length)))},s=function(e){return{cart:e.cart}},u=(0,n.$j)(s,null)(c);const p=u;var f,m;(f="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(f.register(c,"Header","/home/juan/Dev/platzi-store/src/components/Header.jsx"),f.register(s,"mapStateToProps","/home/juan/Dev/platzi-store/src/components/Header.jsx"),f.register(u,"default","/home/juan/Dev/platzi-store/src/components/Header.jsx")),(m="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&m(e)},2230:(e,t,o)=>{o.d(t,{Z:()=>c});var r,a=o(7294),n=o(9706),l=o(5386);e=o.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e);"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var d=function(e){var t=e.children;return a.createElement("div",{className:"Main"},a.createElement(n.Z,null),t,a.createElement(l.Z,null))},i=d;const c=i;var s,u;(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(s.register(d,"Layout","/home/juan/Dev/platzi-store/src/components/Layout.jsx"),s.register(i,"default","/home/juan/Dev/platzi-store/src/components/Layout.jsx")),(u="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&u(e)},3217:(e,t,o)=>{o.d(t,{Z:()=>d});var r,a=o(7294);e=o.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e);"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var n=function(e){var t=e.product,o=e.handleAddToCart;return a.createElement("div",{className:"Products-item"},a.createElement("img",{src:t.image,alt:t.title}),a.createElement("div",{className:"Products-item-info"},a.createElement("h2",null,t.title,a.createElement("span",null,"$",t.price)),a.createElement("p",null,t.description)),a.createElement("button",{type:"button",onClick:o(t)},"Comprar"))},l=n;const d=l;var i,c;(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(i.register(n,"Product","/home/juan/Dev/platzi-store/src/components/Product.jsx"),i.register(l,"default","/home/juan/Dev/platzi-store/src/components/Product.jsx")),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},219:(e,t,o)=>{o.d(t,{Z:()=>s});var r,a=o(7294),n=o(744),l=o(3217);e=o.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e);var d="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e},i=function(){var e=(0,a.useContext)(n.Z),t=function(e){return function(){console.log(e)}};return a.createElement("div",{className:"Products"},a.createElement("div",{className:"Products-items"},e.map((function(e){return a.createElement(l.Z,{key:e.id,product:e,handleAddToCart:t})}))))};d(i,"useContext{products}");var c=i;const s=c;var u,p;(u="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(u.register(i,"Products","/home/juan/Dev/platzi-store/src/components/Products.jsx"),u.register(c,"default","/home/juan/Dev/platzi-store/src/components/Products.jsx")),(p="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&p(e)},8255:(e,t,o)=>{o.d(t,{Z:()=>i});var r,a=o(7294),n=o(219);e=o.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e);"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var l=function(){return a.createElement(n.Z,null)},d=l;const i=d;var c,s;(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(c.register(l,"Home","/home/juan/Dev/platzi-store/src/containers/Home.jsx"),c.register(d,"default","/home/juan/Dev/platzi-store/src/containers/Home.jsx")),(s="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&s(e)},4341:(e,t,o)=>{o.d(t,{Z:()=>d});var r,a=o(7294);e=o.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e);"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var n=function(){return a.createElement("h1",null,"NotFound")},l=n;const d=l;var i,c;(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(i.register(n,"NotFound","/home/juan/Dev/platzi-store/src/containers/NotFound.jsx"),i.register(l,"default","/home/juan/Dev/platzi-store/src/containers/NotFound.jsx")),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},744:(e,t,o)=>{o.d(t,{Z:()=>d});var r,a=o(7294);e=o.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e);"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var n=a.createContext({}),l=n;const d=l;var i,c;(i="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(i.register(n,"AppContext","/home/juan/Dev/platzi-store/src/context/AppContext.js"),i.register(l,"default","/home/juan/Dev/platzi-store/src/context/AppContext.js")),(c="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&c(e)},2151:(e,t,o)=>{o.d(t,{Z:()=>v});var r,a=o(2137),n=o(4738),l=o(7757),d=o.n(l),i=o(7294),c=o(9669),s=o.n(c);e=o.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e);var u="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e},p="https://us-central1-gndx-fake-api.cloudfunctions.net/api",f=function(){var e=(0,i.useState)([]),t=(0,n.Z)(e,2),o=t[0],r=t[1];return(0,i.useEffect)((0,a.Z)(d().mark((function e(){var t;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s()(p);case 2:t=e.sent,r(t.data);case 4:case"end":return e.stop()}}),e)}))),[]),{products:o}};u(f,"useState{[products, setProducts]([])}\nuseEffect{}");var m=f;const v=m;var b,h;(b="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(b.register(p,"API","/home/juan/Dev/platzi-store/src/hooks/useInitialState.js"),b.register(f,"useInitialState","/home/juan/Dev/platzi-store/src/hooks/useInitialState.js"),b.register(m,"default","/home/juan/Dev/platzi-store/src/hooks/useInitialState.js")),(h="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&h(e)},5579:(e,t,o)=>{var r,a=o(7294),n=o(3935),l=o(420),d=o(4890),i=o(6498),c=o(4322),s=o(4118);e=o.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e);"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var u,p,f=(0,d.MT)(c.Z,s.Z);n.render(a.createElement(l.zt,{store:f},a.createElement(i.Z,null)),document.getElementById("app")),(u="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&u.register(f,"store","/home/juan/Dev/platzi-store/src/index.js"),(p="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&p(e)},4118:(e,t,o)=>{var r;o.d(t,{Z:()=>n}),e=o.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e);"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var a={cart:[],products:[{id:"1",image:"https://arepa.s3.amazonaws.com/camiseta.png",title:"Camiseta",price:25,description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit"},{id:"3",image:"https://arepa.s3.amazonaws.com/mug.png",title:"Mug",price:10,description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit"},{id:"4",image:"https://arepa.s3.amazonaws.com/pin.png",title:"Pin",price:4,description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit"},{id:"5",image:"https://arepa.s3.amazonaws.com/stickers1.png",title:"Stickers",price:2,description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit"},{id:"6",image:"https://arepa.s3.amazonaws.com/stickers2.png",title:"Stickers",price:2,description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit"},{id:"7",image:"https://arepa.s3.amazonaws.com/hoodie.png",title:"Hoodie",price:35,description:"Lorem ipsum dolor sit amet, consectetur adipiscing elit"}]};const n=a;var l,d;(l="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&l.register(a,"default","/home/juan/Dev/platzi-store/src/initialState.js"),(d="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&d(e)},4322:(e,t,o)=>{o.d(t,{Z:()=>s});var r,a=o(8927),n=o(6156);function l(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function d(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?l(Object(o),!0).forEach((function(t){(0,n.Z)(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):l(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}e=o.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e);"undefined"!=typeof reactHotLoaderGlobal&&reactHotLoaderGlobal.default.signature;var i=function(e,t){switch(t.type){case"ADD_TO_CART":return d(d({},e),{},{cart:[].concat((0,a.Z)(e.cart),[t.payload])});case"REMOVE_FROM_CART":return d(d({},e),{},{cart:e.cart.filter((function(e){return e.id!==t.payload.id}))});default:return e}},c=i;const s=c;var u,p;(u="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(u.register(i,"reducer","/home/juan/Dev/platzi-store/src/reducers/index.js"),u.register(c,"default","/home/juan/Dev/platzi-store/src/reducers/index.js")),(p="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&p(e)},6498:(e,t,o)=>{o.d(t,{Z:()=>h});var r,a=o(7294),n=o(3727),l=o(5977),d=o(8255),i=o(2230),c=o(4341),s=o(744),u=o(2151),p=o(1570);e=o.hmd(e),(r="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.enterModule:void 0)&&r(e);var f="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default.signature:function(e){return e},m=a.lazy((function(){return o.e(982).then(o.bind(o,9982))})),v=function(){var e=(0,u.Z)().products,t=e.length;return a.createElement(a.Fragment,null,t>0?a.createElement(a.Suspense,{fallback:a.createElement("div",null,"Loading...")},a.createElement(s.Z.Provider,{value:e},a.createElement(n.VK,null,a.createElement(i.Z,null,a.createElement(l.rs,null,a.createElement(l.AW,{exact:!0,path:"/",component:d.Z}),a.createElement(l.AW,{exact:!0,path:"/checkout",component:m}),a.createElement(l.AW,{component:c.Z})))))):a.createElement("h1",null,"Loading..."))};f(v,"useInitialState{{ products }}",(function(){return[u.Z]}));var b=(0,p.w)(v);const h=b;var g,L;(g="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.default:void 0)&&(g.register(m,"AsyncCheckoutContainer","/home/juan/Dev/platzi-store/src/routes/App.jsx"),g.register(v,"App","/home/juan/Dev/platzi-store/src/routes/App.jsx"),g.register(b,"default","/home/juan/Dev/platzi-store/src/routes/App.jsx")),(L="undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal.leaveModule:void 0)&&L(e)},2694:(e,t,o)=>{e.exports=o.p+"2919f2487ede6b463f58.png"}},l={};function d(e){var t=l[e];if(void 0!==t)return t.exports;var o=l[e]={id:e,loaded:!1,exports:{}};return n[e](o,o.exports,d),o.loaded=!0,o.exports}d.m=n,e=[],d.O=(t,o,r,a)=>{if(!o){var n=1/0;for(c=0;c<e.length;c++){for(var[o,r,a]=e[c],l=!0,i=0;i<o.length;i++)(!1&a||n>=a)&&Object.keys(d.O).every((e=>d.O[e](o[i])))?o.splice(i--,1):(l=!1,a<n&&(n=a));l&&(e.splice(c--,1),t=r())}return t}a=a||0;for(var c=e.length;c>0&&e[c-1][2]>a;c--)e[c]=e[c-1];e[c]=[o,r,a]},d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},d.d=(e,t)=>{for(var o in t)d.o(t,o)&&!d.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((t,o)=>(d.f[o](e,t),t)),[])),d.u=e=>e+".bundle.js",d.miniCssF=e=>"assets/"+e+".css",d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},o="platzi-store:",d.l=(e,r,a,n)=>{if(t[e])t[e].push(r);else{var l,i;if(void 0!==a)for(var c=document.getElementsByTagName("script"),s=0;s<c.length;s++){var u=c[s];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==o+a){l=u;break}}l||(i=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,d.nc&&l.setAttribute("nonce",d.nc),l.setAttribute("data-webpack",o+a),l.src=e),t[e]=[r];var p=(o,r)=>{l.onerror=l.onload=null,clearTimeout(f);var a=t[e];if(delete t[e],l.parentNode&&l.parentNode.removeChild(l),a&&a.forEach((e=>e(r))),o)return o(r)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),i&&document.head.appendChild(l)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.j=177,(()=>{var e;d.g.importScripts&&(e=d.g.location+"");var t=d.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");o.length&&(e=o[o.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),d.p=e})(),r=e=>new Promise(((t,o)=>{var r=d.miniCssF(e),a=d.p+r;if(((e,t)=>{for(var o=document.getElementsByTagName("link"),r=0;r<o.length;r++){var a=(l=o[r]).getAttribute("data-href")||l.getAttribute("href");if("stylesheet"===l.rel&&(a===e||a===t))return l}var n=document.getElementsByTagName("style");for(r=0;r<n.length;r++){var l;if((a=(l=n[r]).getAttribute("data-href"))===e||a===t)return l}})(r,a))return t();((e,t,o,r)=>{var a=document.createElement("link");a.rel="stylesheet",a.type="text/css",a.onerror=a.onload=n=>{if(a.onerror=a.onload=null,"load"===n.type)o();else{var l=n&&("load"===n.type?"missing":n.type),d=n&&n.target&&n.target.href||t,i=new Error("Loading CSS chunk "+e+" failed.\n("+d+")");i.code="CSS_CHUNK_LOAD_FAILED",i.type=l,i.request=d,a.parentNode.removeChild(a),r(i)}},a.href=t,document.head.appendChild(a)})(e,a,t,o)})),a={177:0},d.f.miniCss=(e,t)=>{a[e]?t.push(a[e]):0!==a[e]&&{982:1}[e]&&t.push(a[e]=r(e).then((()=>{a[e]=0}),(t=>{throw delete a[e],t})))},(()=>{var e={177:0};d.f.j=(t,o)=>{var r=d.o(e,t)?e[t]:void 0;if(0!==r)if(r)o.push(r[2]);else{var a=new Promise(((o,a)=>r=e[t]=[o,a]));o.push(r[2]=a);var n=d.p+d.u(t),l=new Error;d.l(n,(o=>{if(d.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var a=o&&("load"===o.type?"missing":o.type),n=o&&o.target&&o.target.src;l.message="Loading chunk "+t+" failed.\n("+a+": "+n+")",l.name="ChunkLoadError",l.type=a,l.request=n,r[1](l)}}),"chunk-"+t,t)}},d.O.j=t=>0===e[t];var t=(t,o)=>{var r,a,[n,l,i]=o,c=0;for(r in l)d.o(l,r)&&(d.m[r]=l[r]);if(i)var s=i(d);for(t&&t(o);c<n.length;c++)a=n[c],d.o(e,a)&&e[a]&&e[a][0](),e[n[c]]=0;return d.O(s)},o=self.webpackChunkplatzi_store=self.webpackChunkplatzi_store||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var i=d.O(void 0,[351,216],(()=>d(5579)));i=d.O(i)})();