(window.webpackJsonp=window.webpackJsonp||[]).push([["reader"],{"/Mos":
/*!**********************************!*\
  !*** ./components/PersonList.js ***!
  \**********************************/
/*! exports provided: PersonList */
/*! exports used: PersonList */function(e,t,s){"use strict";s.d(t,"a",function(){return d});var n=s(/*! @babel/runtime/helpers/esm/extends */"IKa1"),i=s(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Yh9w"),a=s(/*! @emotion/core */"xH0s"),r=s(/*! react */"r0ML"),c=s(/*! ../utils */"2RAV"),u=s(/*! ../utils */"4iFE"),l=s(/*! ../utils */"zehm"),o=s(/*! ./PickList */"z8hX");function d(e){var t=e.people,s=e.iconPresent,l=e.iconAbsent,d=Object(i.a)(e,["people","iconPresent","iconAbsent"]),b=Object(r.useCallback)(function(e){return Object(a.a)("span",null,Object(c.a)(e),function(){switch(e.present){case!0:return Object(a.a)(u.a,{icon:s,pull:"right"});case!1:return Object(a.a)(u.a,{icon:l,pull:"right"});default:return null}}())},[s,l]);return Object(a.a)(o.a,Object(n.a)({},d,{items:t,renderItem:b}))}d.propTypes={people:l.a.arrayOf(l.a.shape({id:l.a.string.isRequired})),iconPresent:l.a.string.isRequired,iconAbsent:l.a.string.isRequired},d.defaultProps={iconPresent:"far:user-circle",iconAbsent:"far:circle"}},B9Ml:
/*!*************************!*\
  !*** ./reader/index.js ***!
  \*************************/
/*! exports provided: default */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./entry.js (referenced with import()) */function(e,t,s){"use strict";s.r(t),s.d(t,"default",function(){return A});var n=s(/*! @babel/runtime/helpers/esm/toConsumableArray */"1lK0"),i=s(/*! lodash/some */"ePEb"),a=s.n(i),r=s(/*! lodash/filter */"xzHw"),c=s.n(r),u=s(/*! lodash/uniq */"d+lS"),l=s.n(u),o=s(/*! lodash/map */"jJDv"),d=s.n(o),b=s(/*! lodash/fromPairs */"30c9"),f=s.n(b),m=s(/*! @emotion/core */"xH0s"),O=s(/*! react */"r0ML"),g=s(/*! reactstrap */"hmas"),p=s(/*! reactstrap */"dxsL"),j=s(/*! reactstrap */"QzYW"),h=s(/*! ../context */"2Xtx"),v=s(/*! ../context */"AmVM"),y=s(/*! @swiper/core */"ZMRi"),M=s(/*! ../components */"/Mos"),_=s(/*! ../utils */"4iFE"),k=s(/*! ../utils */"fRGg"),N=s(/*! ../utils */"NbPN"),w=s(/*! ../hooks */"/nod");function A(){var e=Object(h.b)(),t=Object(v.b)(),s=t.session,i=t.swipe,r=t.dispatch,u=t.member;y.a.debug("MEMBER",u),Object(w.a)("session",s);var o=Object(O.useMemo)(function(){return u?f()(d()(["family","friend","guest"],function(e){return[e,u.flag("bring_".concat(e),"bring_".concat(e,"s"))]})):{}},[u]),b=Object(O.useCallback)(function(e){if(y.a.debug("handlePick",e),!e.isOverlay)return e.id===i.member.id||o[e.relation]?i.toggle(e):void 0;r.overlay(e.id)},[r,i,o]),A=Object(O.useMemo)(function(){if(!s||!e)return{};var t=e.get("settings.guests.simultaneousGuestLimit",3),n=e.get("settings.guests.dailyGuestLimit",1/0);n<=0&&(n=1/0);var i=l()(d()(s.guests,"guestId")).length,a=c()(s.guests,"present").length,r=c()(s.friends,"present").length;y.a.debug("CANBRING",o);var u={daily_guests:i,active_guests:a,active_friends:r,sim_limit:t,day_limit:n};if(e.get("settings.friends.countTowardGuestLimit",!1)){var b=u.total_guests=a+r;u.guests_remain=i<n&&b<t,u.friends_remain=b<t}else u.guests_remain=i<n&&a<t,u.friends_remain=!0;return y.a.debug("LIMITS",u),u},[o,s,e]),P=Object(O.useMemo)(function(){if(!e.get("settings.guests.enabled",!1))return!1;var t=Object(n.a)(s.guests||[]);return o.guest&&(A.guests_remain?t.push({id:"AddGuestOverlay",displayName:Object(m.a)("i",null,"Add a Guest"),isOverlay:!0}):t.push({displayName:Object(m.a)("i",null,"Guest Limit Reached"),isOverlay:!0})),t},[e,s,o,A.guests_remain]),R=Object(O.useMemo)(function(){if(!e.get("settings.friends.enabled",!1))return!1;var t=Object(n.a)(s.friends||[]);return o.friend&&(A.friends_remain?t.push({id:"AddFriendOverlay",displayName:Object(m.a)("i",null,"Add a Friend"),isOverlay:!0}):t.push({displayName:Object(m.a)("i",null,"Friend Limit Reached"),isOverlay:!0})),t},[e,s,o,A.friends_remain]),G=Object(O.useMemo)(function(){if(u.is_staff);else if(a()(o))return Object(m.a)("div",{className:"my-5"},Object(m.a)("p",null,"To sign someone in or out, press the ",Object(m.a)("kbd",null,"letter")," or ",Object(m.a)("kbd",null,"number")," next to their name."),Object(m.a)(_.a,{icon:"far:user-circle"})," = Signed in        ",Object(m.a)(_.a,{icon:"far:circle"})," = Signed out");return null},[u,o]);return Object(m.a)(g.a,{className:"actions h-100",fluid:!0},Object(m.a)(p.a,null,Object(m.a)(j.a,null,Object(m.a)(M.a,{title:"Family",people:s.members,onPick:b,selectors:"letters","data-testid":"family-list"})),Object(m.a)(j.a,null,Object(m.a)(M.a,{title:"Guests",people:P,onPick:b,selectors:"numbers","data-testid":"guests-list"}),Object(m.a)(M.a,{title:"Friends",people:R,onPick:b,selectors:"numbers",startAt:P.length,"data-testid":"friends-list"}),G,Object(m.a)(k.a,{onClick:r.reset,shortcut:"Escape"},"Finished"))),Object(m.a)(N.a,{type:"swipe"}))}A.propTypes={}},fRGg:
/*!*************************!*\
  !*** ./utils/Button.js ***!
  \*************************/
/*! exports provided: Button */
/*! exports used: Button */function(e,t,s){"use strict";s.d(t,"a",function(){return d});var n=s(/*! @babel/runtime/helpers/esm/extends */"IKa1"),i=s(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Yh9w"),a=s(/*! @emotion/core */"xH0s"),r=s(/*! react */"r0ML"),c=s(/*! ./ */"MPav"),u=s(/*! ./ */"zehm"),l=s(/*! ../hooks */"5Eku"),o=s(/*! reactstrap */"tG/F");function d(e){var t=e.shortcut,s=e.className,u=e.children,d=Object(i.a)(e,["shortcut","className","children"]),b=d.onClick;return Object(l.a)(Object(r.useCallback)(function(e){return!!t&&(e===t&&(b(),!0))},[t,b])),d.className=Object(c.a)("focusable",s),Object(a.a)(o.a,Object(n.a)({outline:!0},d),t&&Object(a.a)("kbd",{className:"mr-4"},t),Object(a.a)("span",null,u))}d.propTypes={shortcut:u.a.string,onClick:u.a.func.isRequired}}}]);
//# sourceMappingURL=reader.cd2b4e9d.chunk.js.map