-
Notifications
You must be signed in to change notification settings - Fork 1
/
component---src-pages-shops-js-db98bc76174106689583.js
1 lines (1 loc) · 10.1 KB
/
component---src-pages-shops-js-db98bc76174106689583.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[26],{"89dr":function(e,t,a){"use strict";a.r(t);var n=a("q1tI"),o=a.n(n),r=a("7t3Y"),l=a("7xaS"),i=a("hlFM"),c=a("hlie"),s=a("vOnD"),d=a("9Koi"),p=a("ofer"),m=a("6shs"),u=a("JSho"),f=a("i+AT"),h=a("ho19"),g=a("Z3vd"),b=a("CarD"),y=a.n(b),x=a("8C4M"),E=a.n(x),v=a("GWJQ"),_=a("efpO"),C=a("AaR6"),O=a("UPbg"),w=a("m1ME"),j=a("hA7R"),S=a("ZiQX"),k=Object(s.e)(i.a).withConfig({displayName:"shops__FabContainer",componentId:"sc-bvj0n-0"})(["&&{","{bottom:96px;}bottom:32px;right:16px;position:fixed;z-index:1200;}"],C.b.down("xs")),z=Object(s.e)(p.a).withConfig({displayName:"shops__ShopDetail",componentId:"sc-bvj0n-1"})(["margin-top:8px;font-size:14px;color:",";line-height:1.33rem;"],(function(e){return e.theme.palette.secondary.main})),M=Object(s.e)(i.a).withConfig({displayName:"shops__DubiousShopLabel",componentId:"sc-bvj0n-2"})(["background:black;color:white;padding:4px 6px 4px;"]),A=10;function L(e,t,a){var n=e.node,r=n.source_url;return o.a.createElement(o.a.Fragment,null,o.a.createElement(u.b,null,o.a.createElement(i.a,null,Object(_.b)(t,n,"type")),o.a.createElement(M,null,a("dodgy_shops.category_"+n.category))),o.a.createElement(u.b,null,o.a.createElement(c.a,{onClick:function(){return window.open("https://maps.google.com/?q="+Object(_.b)(t,n,"address"),"_blank")}},Object(_.b)(t,n,"address"))),o.a.createElement(u.b,null,o.a.createElement(p.a,{variant:"h6"},Object(_.b)(t,n,"name"))),o.a.createElement(u.a,null,o.a.createElement(i.a,null,o.a.createElement(f.a,null,a("dodgy_shops.price")),n.mask_price_per_box||"-"),o.a.createElement(i.a,null,o.a.createElement(f.a,null,a("dodgy_shops.level")),Object(_.b)(t,n,"mask_level")||"-")),o.a.createElement(u.b,null,o.a.createElement(z,{component:"p",dangerouslySetInnerHTML:{__html:Object(_.b)(t,n,"details")}})),o.a.createElement(u.a,null,r&&o.a.createElement(p.a,{component:"div",variant:"body2"},o.a.createElement(c.a,{component:c.a,href:r,target:"_blank"},a("dodgy_shops.source")))),o.a.createElement(u.b,null,o.a.createElement(i.a,null,a("dodgy_shops.last_updated",{date:n.last_update}))))}"undefined"!=typeof window&&(window.innerWidth>C.b.values.lg?A=21:window.innerWidth>C.b.values.md&&(A=20));t.default=function(e){var t=e.data,a=Object(d.a)(),i=a.i18n,c=a.t,s=Object(n.useState)(t.allDodgyShop.edges),u=s[0],b=s[1],x=Object(n.useState)(0),_=x[0],C=x[1],z=Math.ceil(u.length/10);z>0&&_>=z&&C(0);var M,I,N,W=z<2?o.a.createElement("div",null):o.a.createElement(h.a,{steps:z,position:"static",variant:"text",activeStep:_,nextButton:o.a.createElement(g.a,{size:"small",onClick:function(){var e=Math.ceil(u.length/A);C((function(t){return t+1>=e?0:t+1}))},disabled:_===z-1},o.a.createElement(E.a,null)),backButton:o.a.createElement(g.a,{size:"small",onClick:function(){C((function(e){return e-1}))},disabled:0===_},o.a.createElement(y.a,null))}),D=0===u.length?o.a.createElement(p.a,{variant:"h4"},c("dodgy_shops.no_result")):(M=u,I=A,N=_,M.slice(N*I,(N+1)*I)).map((function(e,t){return o.a.createElement(m.a,{alignItems:"flex-start",key:t,children:L(e,i,c)})}));return o.a.createElement(o.a.Fragment,null,o.a.createElement(r.a,{title:"ShopsPage"}),o.a.createElement(l.a,{style:{paddingBottom:64}},o.a.createElement(k,null),o.a.createElement(S.a,{style:{marginBottom:16},severity:"error"},c("dodgy_shops.stop_update")),o.a.createElement(p.a,{variant:"h2"},c("dodgy_shops.list_text")),o.a.createElement(j.a,null,o.a.createElement(f.b,null,c("dodgy_shops.disclaimer")),o.a.createElement(w.a,{list:t.allDodgyShop.edges,placeholder:c("dodgy_shops.search_placeholder"),options:[{label:c("search.sub_district"),options:Object(v.b)(i,t.allDodgyShop.edges,"sub_district"),defaultSize:100},{label:c("search.pharmacy"),options:Object(v.b)(i,t.allDodgyShop.edges,"name")}],searchKey:"dodgy_shop",onListFiltered:function(e){b(e)}})),W,o.a.createElement(O.a,null,D),W))}},UPbg:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a("vOnD"),o=a("AaR6"),r=n.e.div.withConfig({displayName:"ResponsiveWrapper",componentId:"sc-a62aj7-0"})(["display:flex;flex-direction:column;",'{flex-direction:row;flex-wrap:wrap;justify-content:flex-start;margin:0 -8px;> [class*="Stepper"]{flex:1 0 100%;}> [class*="Card"]{flex:0 0 calc(50% - 16px);margin-left:8px;margin-right:8px;}}','{> [class*="Card"]{flex:0 0 calc(33.3% - 16px);margin-left:8px;margin-right:8px;}}'],o.b.up("md"),o.b.up("lg"))},ZiQX:function(e,t,a){"use strict";var n=a("Ff2n"),o=a("wx14"),r=a("q1tI"),l=a("iuhU"),i=a("ye/S"),c=a("H2TA"),s=a("kKAo"),d=a("5AJ6"),p=Object(d.a)(r.createElement("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),m=Object(d.a)(r.createElement("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),u=Object(d.a)(r.createElement("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),f=Object(d.a)(r.createElement("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),h=Object(d.a)(r.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),g=a("PsDL"),b=a("NqtD"),y={success:r.createElement(p,{fontSize:"inherit"}),warning:r.createElement(m,{fontSize:"inherit"}),error:r.createElement(u,{fontSize:"inherit"}),info:r.createElement(f,{fontSize:"inherit"})},x=r.createElement(h,{fontSize:"small"}),E=r.forwardRef((function(e,t){var a=e.action,i=e.children,c=e.classes,d=e.className,p=e.closeText,m=void 0===p?"Close":p,u=e.color,f=e.icon,h=e.iconMapping,E=void 0===h?y:h,v=e.onClose,_=e.role,C=void 0===_?"alert":_,O=e.severity,w=void 0===O?"success":O,j=e.variant,S=void 0===j?"standard":j,k=Object(n.a)(e,["action","children","classes","className","closeText","color","icon","iconMapping","onClose","role","severity","variant"]);return r.createElement(s.a,Object(o.a)({role:C,square:!0,elevation:0,className:Object(l.a)(c.root,c["".concat(S).concat(Object(b.a)(u||w))],d),ref:t},k),!1!==f?r.createElement("div",{className:c.icon},f||E[w]||y[w]):null,r.createElement("div",{className:c.message},i),null!=a?r.createElement("div",{className:c.action},a):null,null==a&&v?r.createElement("div",{className:c.action},r.createElement(g.a,{size:"small","aria-label":m,title:m,color:"inherit",onClick:v},x)):null)}));t.a=Object(c.a)((function(e){var t="light"===e.palette.type?i.b:i.e,a="light"===e.palette.type?i.e:i.b;return{root:Object(o.a)({},e.typography.body2,{borderRadius:e.shape.borderRadius,backgroundColor:"transparent",display:"flex",padding:"6px 16px"}),standardSuccess:{color:t(e.palette.success.main,.6),backgroundColor:a(e.palette.success.main,.9),"& $icon":{color:e.palette.success.main}},standardInfo:{color:t(e.palette.info.main,.6),backgroundColor:a(e.palette.info.main,.9),"& $icon":{color:e.palette.info.main}},standardWarning:{color:t(e.palette.warning.main,.6),backgroundColor:a(e.palette.warning.main,.9),"& $icon":{color:e.palette.warning.main}},standardError:{color:t(e.palette.error.main,.6),backgroundColor:a(e.palette.error.main,.9),"& $icon":{color:e.palette.error.main}},outlinedSuccess:{color:t(e.palette.success.main,.6),border:"1px solid ".concat(e.palette.success.main),"& $icon":{color:e.palette.success.main}},outlinedInfo:{color:t(e.palette.info.main,.6),border:"1px solid ".concat(e.palette.info.main),"& $icon":{color:e.palette.info.main}},outlinedWarning:{color:t(e.palette.warning.main,.6),border:"1px solid ".concat(e.palette.warning.main),"& $icon":{color:e.palette.warning.main}},outlinedError:{color:t(e.palette.error.main,.6),border:"1px solid ".concat(e.palette.error.main),"& $icon":{color:e.palette.error.main}},filledSuccess:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.success.main},filledInfo:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.info.main},filledWarning:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.warning.main},filledError:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.error.main},icon:{marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9},message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}}),{name:"MuiAlert"})(E)},hA7R:function(e,t,a){"use strict";a.d(t,"a",(function(){return u})),a.d(t,"b",(function(){return f})),a.d(t,"c",(function(){return g}));var n=a("zLVn"),o=a("q1tI"),r=a.n(o),l=a("vOnD"),i=a("hlFM"),c=a("AaR6"),s=["children"],d=["children"],p=["children"],m=Object(l.e)(i.a).withConfig({displayName:"Container",componentId:"sc-1ima7f0-0"})(["margin-top:16px;"]);function u(e){var t=e.children,a=Object(n.a)(e,s);return r.a.createElement(m,a,t)}var f=Object(l.e)((function(e){var t=e.children,a=Object(n.a)(e,d);return r.a.createElement(i.a,a,t)})).withConfig({displayName:"Container__SessionWrapper",componentId:"sc-1ima7f0-1"})(["margin-bottom:16px;"]),h=l.e.div.withConfig({displayName:"Container__StyledSplitWrapper",componentId:"sc-1ima7f0-2"})(["","{display:flex;align-items:flex-start;","{flex:1 0 calc(50% - 12px);&:nth-of-type(2){flex:0 0 calc(50% - 12px);margin-left:24px;}}}"],c.b.up("lg"),f);function g(e){var t=e.children,a=Object(n.a)(e,p);return r.a.createElement(h,a,t)}},"i+AT":function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return l}));var n=a("vOnD"),o=a("ofer"),r=Object(n.e)(o.a).withConfig({displayName:"Text__Label",componentId:"sc-1qimiaf-0"})(["margin-bottom:3px;font-size:","px;color:",";"],(function(e){return e.theme.typography.xsmallFontSize}),(function(e){return e.theme.palette.primary.dark})),l=Object(n.e)(o.a).withConfig({displayName:"Text__Paragraph",componentId:"sc-1qimiaf-1"})(["margin-bottom:8px;font-size:","px;&& b{font-weight:800;}"],(function(e){return e.theme.typography.smallFontSize}))}}]);