1_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[104],{cRm7:function(e,t,a){"use strict";a.r(t);var n=a("q1tI"),c=a.n(n),o=a("4JyM"),r=a("s02U"),s=a("yzAy"),i=a("TSYQ"),l=a.n(i),u=a("gdJV"),m=a("zM5D"),d=a("ryKu"),p=c.a.createElement,f=function(e){var t=Object(n.useContext)(u.b),a=t.user,c=t.fetchUser,o=e.item;return p("div",{className:"item",key:o.id},p("a",{className:"item-remove",onClick:function(){var e;e=o.id,s.a.delCart(e).then((function(e){e.data,c(),1==a.cart.length&&setToggle(!1)})).catch((function(e){console.log(e.response)}))}},p("i",{className:"fas fa-trash"})),p("div",{className:"item-body"},p("div",{className:"item-content"},p("div",{className:"item-detail"},p("p",null,o.name),p("p",null,p("b",null,o.quantity," x \u0e3f ",parseFloat(o.cover_price).toFixed(2))))),p("div",{className:"area-72px"},p("div",{className:"area-img"},p("div",{className:"item-img"},p("img",{src:o.picture?o.picture:"".concat(s.a.frontend_url,"/images/book.png"),align:"middle",className:"mh-100 no-img mw-100per"}))))))},N=Object(n.memo)((function(e){var t=e.user,a=e.t,i=(Object(n.useContext)(u.b).setHandle,Object(n.useState)(!1)),N=i[0],v=i[1],b=Object(n.useState)(),g=b[0],y=b[1],h=Object(n.useState)();h[0],h[1];Object(n.useEffect)((function(){if(t){var e=0;t.cart.forEach((function(t){"ecode"===t.type&&(e+=parseFloat(t.price)*parseFloat(t.quantity))})),y({total:e})}}),[t]);var w=function(){var e=0;return null===t||void 0===t||t.cart.forEach((function(t){"ecode"==t.type&&e++})),t&&0!=t.cart.length?e>99?p("span",null,"99",p("span",null,"+")):p("span",null,e):""},_=Object(n.useState)(!1),x=_[0],E=_[1],k=function(){E(!1)};return p(c.a.Fragment,null,N&&p("div",{className:"bg-transparent-dropdown",onClick:function(){return v(!1)}}),p("a",t?{className:"text-default d-flex align-items-center",onClick:function(){t&&0!=t.cart.length?v(!N):o.Router.push("/user/no-cart")}}:{className:"text-default d-flex align-items-center",onClick:function(){return E(!0)}},p("div",{className:"popup-container-count"},p("img",{src:"".concat(s.a.frontend_url,"/icon/cart.svg"),alt:"\u0e28\u0e39\u0e19\u0e22\u0e4c\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d\u0e08\u0e38\u0e2c\u0e32\u0e2f",className:"pr-1 w-auto icon-header icon-cart"}),w()),p("b",null,"\u0e3f ",r.a.currencyFormatDE(g&&g.total?g.total:0))),p("div",{className:l()("popup-container cart",{"d-none":!N})},p("div",{className:"popup-container-list"},t?t.cart.map((function(e){return"ecode"===e.type?p(f,{key:Math.random(),item:e}):""})):""),p("div",{className:"popup-container-summary"},p("p",{className:"text-center m-0"},p("b",null,"\u0e23\u0e32\u0e04\u0e32\u0e23\u0e27\u0e21 : \u0e3f ",r.a.currencyFormatDE(g&&g.total?g.total:0)))),p("div",{className:"popup-container-footer"},p(o.Link,{href:"/ecode/cart",as:"/ecode/cart"},p("button",{type:"button",className:"btn btn-primary w-100"},"\u0e14\u0e39\u0e23\u0e16\u0e40\u0e02\u0e47\u0e19 ( ",w()," )")))),p(m.a,{className:"modal-cart",centered:!0,show:x,onHide:k,size:"xl"},p(m.a.Header,{closeButton:!0},p("div",null,p(m.a.Title,{className:"d-flex"},a("system_login")))),p(m.a.Body,null,p(d.a,{loginBy:"modal",closeModal:k,isModal:!0}))))}));t.default=Object(o.withTranslation)(["header"])(N)},xZri:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ecode/cartecode",function(){return a("cRm7")}])}},[["xZri",0,2,1,3,5,4,6,7,9]]]);
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.