@planningcenter/topbar 9.17.0 → 9.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/topbar.js +1 -1
- package/dist/topbar.js.map +1 -1
- package/dist/topbar.modern.js +1 -1
- package/dist/topbar.modern.js.map +1 -1
- package/dist/topbar.module.js +1 -1
- package/dist/topbar.module.js.map +1 -1
- package/dist/topbar.umd.js +1 -1
- package/dist/topbar.umd.js.map +1 -1
- package/dist/types/modules/toolbar/tools/chat/chat_api_context.d.ts.map +1 -1
- package/dist/types/modules/toolbar/tools/chat/chat_context.d.ts +5 -1
- package/dist/types/modules/toolbar/tools/chat/chat_context.d.ts.map +1 -1
- package/dist/types/modules/toolbar/tools/chat/components/channel_list_view/index.d.ts.map +1 -1
- package/dist/types/modules/toolbar/tools/chat/components/channel_list_view/preview.d.ts.map +1 -1
- package/dist/types/modules/toolbar/tools/chat/components/channel_view/message_input.d.ts.map +1 -1
- package/dist/types/modules/toolbar/tools/chat/hooks/index.d.ts +1 -0
- package/dist/types/modules/toolbar/tools/chat/hooks/index.d.ts.map +1 -1
- package/dist/types/modules/toolbar/tools/chat/hooks/use_channel_unread.d.ts +4 -4
- package/dist/types/modules/toolbar/tools/chat/hooks/use_channel_unread.d.ts.map +1 -1
- package/dist/types/modules/toolbar/tools/chat/hooks/use_chat_navigation.d.ts +2 -1
- package/dist/types/modules/toolbar/tools/chat/hooks/use_chat_navigation.d.ts.map +1 -1
- package/dist/types/modules/toolbar/tools/chat/hooks/use_total_unread_count.d.ts +12 -0
- package/dist/types/modules/toolbar/tools/chat/hooks/use_total_unread_count.d.ts.map +1 -0
- package/dist/types/modules/toolbar/tools/chat/index.d.ts.map +1 -1
- package/dist/types/modules/toolbar/tools/chat/utils/index.d.ts +1 -1
- package/dist/types/modules/toolbar/tools/chat/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/topbar.module.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as e from"react";import t,{useEffect as n,useState as r,useMemo as a,useCallback as i,useRef as o,useContext as l,Fragment as s}from"react";import c from"@planningcenter/jolt-client";import u from"@planningcenter/url";import{useSyncExternalStore as d}from"use-sync-external-store/shim";import{ThemeProvider as h,Divider as m,Button as f,StackView as p,Text as g,Icon as v,designSystem as y,Link as E,HeadingUppercase as w,List as b,Box as k,Heading as _,GridView as C,Avatar as x,Badge as S,Spinner as M,WrapView as A,Collapse as T,ToggleSwitch as N,Input as D,Select as P,Menu as O,Group as V,Tooltip as H,Dropdown as z,Combobox as Y,Logo as L}from"@planningcenter/tapestry-react";import*as R from"@planningcenter/icons/paths/church-center";import*as Z from"@planningcenter/icons/paths/general";import*as I from"@planningcenter/icons/paths/people";import*as W from"@planningcenter/icons/paths/toolbar";import{UiExtensionFirstPartyComponent as F,components as U,UiExtensionDataContext as j}from"@planningcenter/add-ons";import{useChatContext as B,Avatar as G,ChannelList as q,InfiniteScroll as J,useMessageListContext as $,MessageStatus as Q,useMessageContext as X,useTranslationContext as K,getReadByTooltipText as ee,mapToUserNameOrId as te,useMessageInputContext as ne,useChannelStateContext as re,AttachmentPreviewList as ae,ChatAutoComplete as ie,Channel as oe,Window as le,MessageInput as se,MessageList as ce,Chat as ue}from"stream-chat-react";import de from"@planningcenter/datetime-fmt";import{StreamChat as he,logChatPromiseExecution as me}from"stream-chat";import fe from"@emoji-mart/data";import{init as pe,SearchIndex as ge}from"emoji-mart";import{nanoid as ve}from"nanoid";import{useDropzone as ye}from"react-dropzone";import{UploadButton as Ee}from"react-file-utils";import{EmojiPicker as we}from"stream-chat-react/emojis";import{InlineWidget as be}from"react-calendly";import ke from"algoliasearch";import{useSearchBox as _e,useHits as Ce,InstantSearch as xe,Configure as Se}from"react-instantsearch";import{TransitionGroup as Me,Transition as Ae}from"react-transition-group";function Te(){return Te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Te.apply(this,arguments)}function Ne(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,De(e,t)}function De(e,t){return De=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},De(e,t)}function Pe(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function Oe(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(a[n]=e[n]);return a}function Ve(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var He=["headers"],ze=function(e,t){return fetch(e,Te({credentials:"include",mode:"cors"},t))},Ye=function(e,t){var n,r,a,i=t.headers,o=Oe(t,He);return fetch(e,Te({headers:Te({},i,{"X-CSRF-Token":(null==(n=window)||null==(r=n.Rails)?void 0:r.csrfToken())||(null==(a=document.querySelector('meta[name="csrf-token"]'))?void 0:a.getAttribute("content"))||null})},o,{credentials:"include",mode:"cors"}))};function Le(e,t,n){var r=void 0===n?{}:n,a=r.method,i=void 0===a?"GET":a,o=r.data,l=void 0===o?null:o,s={headers:{Accept:"application/json","Content-Type":"application/json"},method:i,redirect:"follow"};return l&&"GET"!==i&&(s.body=JSON.stringify(l)),e(t,s).then(function(e){return e.json().then(function(t){return{json:t,ok:e.ok,response:e}}).catch(function(){return{json:null,ok:e.ok,response:e}})},function(e){return console.warn(e),{json:null,ok:!1,response:null}})}var Re=function(e){var n=e.channelName,r=e.enableJoltLogging,a=void 0!==r&&r,i=e.enabled,o=void 0===i||i,l=e.env,s=e.wssEndpoint,d=e.fetchSubscribeToken,h=e.joltPromise,m=void 0===h?function(){return Promise.resolve()}:h,f=t.useState(),p=f[0],g=f[1],v=t.useState(),y=v[0],E=v[1],w=t.useState(!1),b=w[0],k=w[1],_=t.useCallback(function(){try{return Promise.resolve(m().then(function(e){return e})).then(function(e){var t=function(e,t){try{return Promise.resolve(d(t))}catch(e){return Promise.reject(e)}};e||(k(!0),e=new c(s||function(e){switch(e){case"development":case"test":return"wss://1csnwvu025.execute-api.us-east-1.amazonaws.com/v1/";case"staging":return"wss://xvk2ac1o3l.execute-api.us-east-1.amazonaws.com/v1/";default:return"wss://yxe88gasn3.execute-api.us-east-1.amazonaws.com/v1/"}}(l),{fetchAuthTokenFn:function(){try{return Promise.resolve(Le(Ye,window.location.origin+"/~api/notifications/v2/me/notifications_jolt_authorize",{data:{data:{attributes:{}}},method:"POST"}).then(function(e){return e.json.data.id}))}catch(e){return Promise.reject(e)}},fetchSubscribeTokenFn:t},{logToConsole:a}));var r=e.subscriptions.find(function(e){return e.channel===n})||e.subscribe(n,{fetchSubscribeTokenFn:t});g(r),E(e)})}catch(e){return Promise.reject(e)}},[Le,n,l,u,Ye]);return t.useEffect(function(){o&&_()},[o,_]),t.useEffect(function(){var e=function(e){var t,n;e.data.hasOwnProperty("PCOPageExpiredCurrentPersonACID")&&e.data.PCOPageExpiredCurrentPersonACID!==(null==(t=window)||null==(n=t.pcoPageExpired)?void 0:n.currentPersonACID)&&y&&y.disconnect()};return window.addEventListener("message",e),function(){return window.removeEventListener("message",e)}},[y]),t.useEffect(function(){return function(){y&&b&&y.disconnect()}},[y]),p},Ze=function(e,t,r){return n(function(){return e?(e.bind(t,r),function(){return e.unbind(t,r)}):function(){}},[e,r])},Ie=function(e,t){void 0===t&&(t=1);var n=e.replace(/[a-z()%]/g,"").split(" ");return"hsla("+n[0]+", "+n[1]+"%, "+n[2]+"%, "+t+")"},We=function(e,t){var n;return function(){var r=[].slice.call(arguments),a=this;clearTimeout(n),(n=setTimeout(function(){n=null,e.apply(a,r)},t))||e.apply(a,r)}};function Fe(e,t){return Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every(function(e){return t[e[0]]!==e[1]})}function Ue(e,t){var a=r(function(){try{var n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(e){return t}}),i=a[0],o=a[1],l=JSON.stringify(i);return n(function(){window.localStorage.setItem(e,l)},[e,l]),{dropKey:function(){return window.localStorage.removeItem(e)},setStoredValue:o,storedValue:i}}var je=function(){};function Be(e){var t=e,n=new Set;return{getState:function(){return t},setState:function(e){t=e,n.forEach(function(e){return e(t)})},subscribe:function(e){return n.add(e),function(){return n.delete(e)}}}}var Ge=Be({}),qe=function(e){var a,i,o,l,s,c,d,h,m,f,p,g,v,y,E,w,b,k,_,C,x,S=e.configuredFetch,M=e.enableJoltLogging,A=e.env,T=e.formatter,N=void 0===T?Je:T,D=e.joltPromise,P=e.wssEndpoint,O=e.render,V=e.userId,H=function(e){var t=e.configuredFetch,a=e.env,i=Ue("Topbar",{}),o=i.setStoredValue,l=r(i.storedValue),s=l[0],c=l[1];n(function(){d()},[]);var d=function(){Le(t,u(a)("api")+"/people/v2/me/topbar").then(function(e){var t=e.json;e.ok&&(c(t),o(t))})};return s}({configuredFetch:void 0===S?ze:S,env:A}),z=N(H),Y=null==H||null==(a=H.data)||null==(i=a.attributes)?void 0:i.has_connected_people,L=null==H||null==(o=H.data)||null==(l=o.attributes)||null==(s=l.features)?void 0:s.includes("mfa_enabled"),R=null==H||null==(c=H.data)||null==(d=c.attributes)||null==(h=d.features)?void 0:h.includes("notifications_context_menu"),Z=!(null==H||null==(m=H.data)||null==(f=m.attributes)||!f.mfa_configured),I=null==H||null==(p=H.data)||null==(g=p.attributes)?void 0:g.name,W=!window.notificationsDisabled,F=(null==H||null==(v=H.data)||null==(y=v.attributes)?void 0:y.org_time_zone)||"America/Los_Angeles",U=null==H||null==(E=H.data)||null==(w=E.attributes)||null==(b=w.features)?void 0:b.includes("chat_enabled"),j={algoliaApplicationId:null==H||null==(k=H.data)||null==(_=k.attributes)?void 0:_.algolia_application_identifier,algoliaSearchOnlyApiKey:null==H||null==(C=H.data)||null==(x=C.attributes)?void 0:x.algolia_search_key},B=Re({channelName:"notifications.people."+V,enableJoltLogging:M,enabled:!0,env:A,wssEndpoint:P,fetchSubscribeToken:function(e){try{var t=window.location.origin+"/~api/notifications/v2/me/notifications_jolt_subscribe";return Promise.resolve(Le(Ye,t,{data:{data:{attributes:{cid:e}}},method:"POST"}).then(function(e){return e.json.data.id}))}catch(e){return Promise.reject(e)}},joltPromise:D}),G=function(e){var n,r,a=e.enabled,i=e.joltChannel,o=Ue("Topbar:Notifications:hasUnread",!1),l=o.storedValue,s=o.setStoredValue,c=(n=function(){var e=window.location.origin+"/~api/notifications/v2/me/unread";Le(ze,e).then(function(e){s(e.json.data.attributes.unread)}).catch(je)},void 0===(r=300)&&(r=0),t.useMemo(function(){return We(n,r)},[]));return t.useEffect(function(){a&&c()},[a]),Ze(a?i:void 0,"notifications.v2.events.notification.created",c),Ze(a?i:void 0,"notifications.v2.events.notification.updated",c),Ze(a?i:void 0,"notifications.v2.events.notification.destroyed",c),l}({enabled:!0,env:A,joltChannel:B});return n(function(){var e=Ge.getState();Ge.setState(Te({},e,{algoliaSearchAuth:j,chatEnabled:U,hasConnectedPeople:Y,indicatorVisible:Te({},e.indicatorVisible,{Notifications:G}),joltPromise:D,mfaConfigured:Z,mfaEnabled:L,name:I,notifications:{enabled:W,env:A,joltChannel:B},notificationsContextMenu:R,notificationsEnabled:W,notificationsJoltChannel:B,organizationTimeZone:F,userId:V}))},[D,Z,L,I,R,W,G,F,V]),O(z||[],{fetch:function(){},remove:function(){}})};function Je(e){var t,n;return(null==e||null==(t=e.data)||null==(n=t.attributes)?void 0:n.apps)||[]}function $e(){window.localStorage.removeItem("Topbar:ConnectedPeople")}function Qe(e){window.location=e}var Xe=/*#__PURE__*/function(e){function t(t){var n;return(n=e.call(this,t)||this).state={connectedPeople:[]},n}Ne(t,e);var n=t.prototype;return n.fetch=function(){var e=this;Le(this.props.configuredFetch,u(this.props.env)("api")+"/login/v2/me/connected_people").then(function(t){var n=t.json;if(t.ok&&n){var r=n.data;return e.setState({connectedPeople:r},function(){return window.localStorage.setItem("Topbar:ConnectedPeople",JSON.stringify(r))})}})},n.unlink=function(){Le(this.props.configuredFetch,u(this.props.env)("api")+"/login/v2/me/unlink",{method:"POST"}).then(function(e){var t,n=e.json;null!=n&&null!=(t=n.meta)&&t.redirect_to&&Qe(n.meta.redirect_to)})},n.switch=function(e,t){Le(this.props.configuredFetch,u(this.props.env)("api")+"/login/v2/me/switch_connected_person",{data:{data:{attributes:{id:e,return_path:t}}},method:"POST"}).then(function(e){var t,n=e.json;null!=n&&null!=(t=n.meta)&&t.redirect_to&&Qe(n.meta.redirect_to)})},n.componentDidMount=function(){var e=JSON.parse(window.localStorage.getItem("Topbar:ConnectedPeople"));return e?this.setState({connectedPeople:e}):this.fetch()},n.render=function(){return this.props.render(this.state.connectedPeople||[],{fetch:this.fetch.bind(this),remove:$e.bind(this),switch:this.switch.bind(this),unlink:this.unlink.bind(this)})},t}(t.Component);Xe.defaultProps={configuredFetch:ze};var Ke=/*#__PURE__*/function(e){function n(t){var n;return(n=e.call(this,t)||this).state={width:window.innerWidth},n.setWindowWidth=n.setWindowWidth.bind(Ve(n)),n}Ne(n,e);var r=n.prototype;return r.setWindowWidth=function(){this.setState({width:window.innerWidth})},r.componentDidMount=function(){window.addEventListener("resize",We(this.setWindowWidth,100),!1)},r.componentWillUnmount=function(){window.removeEventListener("resize",We(this.setWindowWidth,100),!1)},r.breakpointString=function(e){return e<480?"xs":e<600?"sm":e<720?"md":e<960?"lg":"xl"},r.render=function(){return t.createElement(t.Fragment,null,this.props.render(this.breakpointString(this.state.width)))},n}(t.Component),et=/*#__PURE__*/function(e){function n(){return e.apply(this,arguments)||this}return Ne(n,e),n.prototype.render=function(){var e=this;return t.createElement(Ke,{render:function(t){return-1!==e.props.smallBreakpoints.indexOf(t)?e.props.smallTopbar(t):e.props.notSmallTopbar(t)}})},n}(t.Component);function tt(e){return t.createElement("path",{fill:e.color,d:"M16.95,9.28h0l-1.33-.23c-.12,0-.24-.04-.34-.11-.1-.07-.18-.16-.23-.27-.12-.45-.3-.89-.54-1.3-.04-.11-.05-.24-.03-.35,.02-.12,.08-.23,.16-.32l.78-1.1h0s0-.03,0-.04l-.03-.02-.04-.04-.87-.87-.05-.05h0s-.02-.02-.03,0l-1.11,.78c-.09,.08-.2,.13-.32,.16-.12,.02-.24,.01-.35-.03-.41-.24-.84-.42-1.3-.54-.11-.05-.2-.13-.27-.23-.07-.1-.11-.22-.11-.34l-.22-1.33h0s-.01-.03-.02-.03h-1.41s-.02,0-.02,.02l-.23,1.34c0,.12-.04,.24-.11,.34-.07,.1-.16,.18-.27,.23-.45,.12-.89,.3-1.3,.54-.11,.04-.24,.05-.35,.03-.12-.02-.23-.08-.32-.16l-1.1-.78h0s-.02-.01-.03,0l-.02,.03-.04,.04-.87,.87-.05,.05h0s0,.03,0,.04l.78,1.11c.08,.09,.13,.2,.16,.32,.02,.12,.01,.24-.03,.35-.24,.4-.42,.84-.54,1.29-.05,.11-.13,.2-.23,.27-.1,.07-.22,.11-.34,.11l-1.33,.22h0s-.02,0-.02,.02v1.41s0,.02,.02,.02l1.34,.23c.12,0,.24,.05,.34,.11,.1,.07,.18,.16,.23,.27,.12,.45,.3,.89,.54,1.29,.04,.11,.05,.24,.03,.35-.02,.12-.08,.23-.16,.32l-.78,1.11s0,.02,0,.03h0l.05,.06,.87,.87,.04,.04,.02,.02s.02,0,.03,0h0l1.1-.79c.09-.08,.2-.13,.32-.16,.12-.02,.24-.01,.35,.03,.4,.24,.84,.42,1.29,.54,.11,.05,.2,.13,.27,.23,.07,.1,.11,.22,.11,.34l.23,1.34s0,.02,.02,.02h1.41s.02,0,.02-.02h0l.22-1.34c0-.12,.05-.24,.11-.34,.07-.1,.16-.18,.27-.23,.45-.12,.89-.3,1.29-.54,.11-.04,.24-.05,.35-.03,.12,.02,.23,.08,.32,.16l1.11,.78s.02,0,.03,0h0l.05-.06,.87-.87,.04-.04,.02-.02s0-.02,0-.03h0l-.78-1.11c-.08-.09-.13-.2-.16-.32-.02-.12-.01-.24,.03-.35,.24-.4,.42-.84,.54-1.29,.05-.11,.13-.2,.23-.27s.22-.11,.34-.11l1.34-.23s.02,0,.02-.02v-1.4s0-.02-.02-.02Zm-4.67,3.01c-.45,.45-1.03,.76-1.65,.88-.63,.12-1.27,.06-1.86-.18-.59-.24-1.09-.66-1.45-1.19-.35-.53-.54-1.15-.54-1.79s.19-1.26,.54-1.79c.35-.53,.86-.94,1.45-1.19,.59-.24,1.24-.31,1.86-.18,.63,.12,1.2,.43,1.65,.88,.3,.3,.54,.66,.7,1.05,.16,.39,.25,.81,.25,1.24s-.08,.84-.25,1.24c-.16,.39-.4,.75-.7,1.05Z"})}et.defaultProps={smallBreakpoints:["xs","sm"]};var nt={__proto__:null,Squircle:function(e){var n=e.color;return t.createElement("path",{fill:void 0===n?"#fff":n,d:"M10.008.045C2.047.045.056,2.036.056,10s1.991,9.952,9.952,9.952S19.96,17.959,19.96,10,17.969.045,10.008.045Z"})},Accounts:tt,API:function(e){return t.createElement("path",{fill:e.color,d:"M11.08,12.387a3.277,3.277,0,0,0,.21-.86l1.47-.23-.25-1.63-1.48.22A3.167,3.167,0,0,0,9.93,8.5l.54-1.37-1.54-.6L8.39,7.9a3.393,3.393,0,0,0-1.76.27l-.92-1.15-1.3,1.03.93,1.16a3.462,3.462,0,0,0-.43.78A3.333,3.333,0,0,0,4.69,11l-1.49.23.25,1.69,1.59-.24a3.278,3.278,0,0,0,1.02,1.2l-.54,1.39,1.55.6.54-1.39a3.319,3.319,0,0,0,1.74-.27l.93,1.17,1.3-1.04-.93-1.17A3.258,3.258,0,0,0,11.08,12.387ZM9.81,11.9A1.953,1.953,0,0,1,7.29,13a1.942,1.942,0,1,1,2.52-1.1Zm5.89-4.32a1.581,1.581,0,0,0,.04-.38,2.066,2.066,0,0,0-1.39-1.95v-.82H12.97v.82A2.066,2.066,0,0,0,11.58,7.2a1.581,1.581,0,0,0,.04.38l-.71.41.7,1.2.7-.4a2.073,2.073,0,0,0,2.7,0l.7.4.7-1.2Zm-2.04.67A1.045,1.045,0,1,1,14.7,7.2,1.041,1.041,0,0,1,13.66,8.247Z"})},Calendar:function(e){return t.createElement("path",{fill:e.color,d:"M14.18,6.5h-.91V5.8a.55.55,0,0,0-.55-.55h-.26a.55.55,0,0,0-.55.55v.7H8.09V5.8a.55.55,0,0,0-.55-.55H7.28a.55.55,0,0,0-.55.55v.7H5.82a.58.58,0,0,0-.58.59v7.08a.58.58,0,0,0,.58.58h8.36a.58.58,0,0,0,.58-.58V7.09A.58.58,0,0,0,14.18,6.5Zm-.91,6.71H6.73V9.09h6.54Z"})},CheckIns:function(e){return t.createElement("path",{fill:e.color,d:"M14.175,8.341,9.258,13.256a1.157,1.157,0,0,1-1.638,0L5.161,10.8A1.159,1.159,0,1,1,6.8,9.16L8.439,10.8l4.1-4.1a1.159,1.159,0,0,1,1.639,1.639Z"})},ChurchCenter:function(e){return t.createElement("path",{fill:e.color,d:"M13.91,14.763a.334.334,0,0,1-.331.338l-1.959-.016a.334.334,0,0,1-.338-.331s.005-.233.005-1.8a3.674,3.674,0,0,0-1.279-2.638,3.674,3.674,0,0,0-1.279,2.638c0,1.565.005,1.8.005,1.8a.334.334,0,0,1-.338.331L6.437,15.1a.334.334,0,0,1-.331-.338s-.242-6.457-.02-6.65h0L9.671,5.021a.522.522,0,0,1,.684,0l3.58,3.092H13.93C14.152,8.325,13.91,14.763,13.91,14.763Z"})},Giving:function(e){return t.createElement("path",{fill:e.color,d:"M10.3,13.769a.508.508,0,0,1-.592,0c-1.259-.888-5.982-4.494-3.268-6.83a2.386,2.386,0,0,1,3.215.205l.349.349.349-.349a2.386,2.386,0,0,1,3.215-.205C16.286,9.275,11.563,12.881,10.3,13.769Z"})},Groups:function(e){return t.createElement("path",{fill:e.color,d:"M13.769,11.313V8.683a1.867,1.867,0,1,0-2.443-2.449H8.69A1.867,1.867,0,1,0,6.243,8.681v2.632A1.867,1.867,0,1,0,8.69,13.76h2.632a1.867,1.867,0,1,0,2.447-2.447Zm-1.455,0a1.873,1.873,0,0,0-.992.992H8.69a1.877,1.877,0,0,0-.992-.992V8.681a1.877,1.877,0,0,0,.992-.992h2.636a1.872,1.872,0,0,0,.988.99Z"})},Home:function(e){return t.createElement("path",{fill:e.color,d:"M14.7619 8.93233C14.7619 8.72768 14.6587 8.53243 14.4775 8.39414L10.5927 5.43C10.2573 5.17413 9.74265 5.17413 9.40731 5.42999L5.52252 8.39414C5.34128 8.53243 5.2381 8.72768 5.2381 8.93233V13.0794C5.2381 13.4827 5.63079 13.8095 6.11521 13.8095H13.8848C14.3692 13.8095 14.7619 13.4826 14.7619 13.0794V8.93233Z"})},People:function(e){return t.createElement("path",{fill:e.color,d:"M8.177,5.732A2.018,2.018,0,1,1,6.159,7.75,2.019,2.019,0,0,1,8.177,5.732Zm2.494,8.53H5.664A.565.565,0,0,1,5.1,13.7V12.422a1.841,1.841,0,0,1,1.841-1.841H9.394a1.841,1.841,0,0,1,1.841,1.841V13.7A.565.565,0,0,1,10.671,14.262ZM12.814,6.94A1.513,1.513,0,1,1,11.3,8.453,1.513,1.513,0,0,1,12.814,6.94Zm1.537,6.093H12.413a.565.565,0,0,1-.565-.565v-.049a2.292,2.292,0,0,0-.2-.957.555.555,0,0,0-.062-.141.8.8,0,0,0-.061-.11,1.19,1.19,0,0,0-.092-.16,1.131,1.131,0,0,1,.908-.472h1.472a1.108,1.108,0,0,1,1.105,1.1v.785A.565.565,0,0,1,14.351,13.033Z"})},Publishing:function(e){return t.createElement("path",{fill:e.color,d:"M7.287,13.575a.478.478,0,0,1-.477.477H5.856a.478.478,0,0,1-.477-.477V6.407a.478.478,0,0,1,.477-.477H6.81a.478.478,0,0,1,.477.477Zm7.293,0a.477.477,0,0,1-.477.477H9.268a.478.478,0,0,1-.477-.477V12.6a.478.478,0,0,1,.477-.477H14.1a.477.477,0,0,1,.477.477Zm0-3.473a.477.477,0,0,1-.476.477H9.268a.478.478,0,0,1-.477-.477V6.407a.478.478,0,0,1,.477-.477H14.1a.477.477,0,0,1,.477.477Z"})},Registrations:function(e){return t.createElement("path",{fill:e.color,d:"M4.48,11.09a.51.51,0,0,0,0,.71l.7.7a.22.22,0,0,0,.27,0,1.47,1.47,0,0,1,1.8.22,1.5,1.5,0,0,1,.23,1.81.21.21,0,0,0,0,.27l.7.7a.51.51,0,0,0,.71,0l2-2a.16.16,0,0,0,0-.22L6.7,9.1a.17.17,0,0,0-.23,0Zm11-2.89-.71-.7a.21.21,0,0,0-.26,0,1.47,1.47,0,0,1-1.79-.23,1.49,1.49,0,0,1-.24-1.79.22.22,0,0,0,0-.27l-.7-.7a.51.51,0,0,0-.71,0L7.47,8.11a.14.14,0,0,0,0,.22l4.2,4.2a.14.14,0,0,0,.22,0l3.63-3.62A.51.51,0,0,0,15.52,8.2Z"})},Services:function(e){return t.createElement("path",{fill:e.color,d:"M6.5,6.559A1.059,1.059,0,1,1,5.443,5.5,1.059,1.059,0,0,1,6.5,6.559ZM5.443,8.943A1.059,1.059,0,1,0,6.5,10,1.059,1.059,0,0,0,5.443,8.943Zm0,3.443A1.059,1.059,0,1,0,6.5,13.445,1.059,1.059,0,0,0,5.443,12.386ZM15,6.087a.485.485,0,0,0-.485-.485H8.136a.485.485,0,0,0-.485.485V7.03a.485.485,0,0,0,.485.485h6.38A.485.485,0,0,0,15,7.03ZM15,9.53a.485.485,0,0,0-.485-.485H8.136a.485.485,0,0,0-.485.485v.943a.485.485,0,0,0,.485.485h6.38A.485.485,0,0,0,15,10.473Zm0,3.443a.485.485,0,0,0-.485-.485H8.136a.485.485,0,0,0-.485.485v.943a.485.485,0,0,0,.485.485h6.38A.485.485,0,0,0,15,13.916Z"})}},rt=["appName","colors","style","size"];function at(e){var n=e.color;return t.createElement("path",{d:"M10.008.045C2.047.045.056,2.036.056,10s1.991,9.952,9.952,9.952S19.96,17.959,19.96,10,17.969.045,10.008.045Z",fill:void 0===n?"#fff":n})}function it(e){var n=e.appName,r=e.colors,a=e.style,i=e.size,o=void 0===i?20:i,l=Oe(e,rt);return t.createElement("svg",Te({xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 20 20",role:"img","aria-labelledby":"title desc",style:Te({display:"block"},a)},l),t.createElement("title",{id:"title"},"Planning Center ",n," App Icon"),t.createElement("desc",{id:"desc"},"An image symbolizing the Planning Center ",n," app."),"Accounts"===n?null:t.createElement(at,null),nt[n]?t.createElement(nt[n],{color:"Accounts"!=n?r.base0:"#fff"}):t.createElement("div",null,"appName not supported"))}var ot={__proto__:null,Accounts:function(e){var n=e.color,r=e.size;return t.createElement("svg",{"data-name":"Layer 1",height:void 0===r?20:r,id:"4ce749c7-c01e-4a9b-9496-b14fd2e761aa",viewBox:"0 0 77.073 20",xmlns:"http://www.w3.org/2000/svg"},t.createElement("title",null,"accounts-text"),t.createElement("path",{fill:n,d:"M4.729,5.537A10.859,10.859,0,0,0,1.262,6.1a.566.566,0,0,0-.4.717l.194.819a.579.579,0,0,0,.7.5,10.108,10.108,0,0,1,2.748-.47,1.416,1.416,0,0,1,1.065.349A2.307,2.307,0,0,1,6,9.682,7.706,7.706,0,0,0,4.1,9.418c-2.493,0-4.1,1.305-4.1,3.327a3.2,3.2,0,0,0,3.328,3.434,4.385,4.385,0,0,0,3.011-1.161l.181.509c.1.249.231.415.515.415h.712a.6.6,0,0,0,.59-.589v-5.3C8.337,7.581,8.065,5.537,4.729,5.537ZM3.78,14.181a1.343,1.343,0,0,1-1.436-1.459c0-.91.777-1.522,1.932-1.522a4.726,4.726,0,0,1,1.7.3v1.556A2.983,2.983,0,0,1,3.78,14.181ZM18.6,13.194c.4.361.326.669.2.865a4.646,4.646,0,0,1-3.977,2.12,5.2,5.2,0,0,1-5.2-5.31,5.285,5.285,0,0,1,5.225-5.332,4.461,4.461,0,0,1,3.711,1.768.6.6,0,0,1-.1.869l-.775.71c-.361.335-.64.056-.806-.11A2.909,2.909,0,0,0,14.9,7.816,2.938,2.938,0,0,0,12,10.847,2.921,2.921,0,0,0,14.837,13.9a2.623,2.623,0,0,0,2.03-.965c.082-.081.161-.16.241-.233a.574.574,0,0,1,.819-.049Zm9.661,0c.4.361.326.669.2.865a4.644,4.644,0,0,1-3.976,2.12,5.2,5.2,0,0,1-5.2-5.31A5.286,5.286,0,0,1,24.5,5.537a4.459,4.459,0,0,1,3.71,1.768.6.6,0,0,1-.1.869l-.775.71c-.361.335-.641.056-.806-.11a2.779,2.779,0,0,0-4.869,2.073A2.92,2.92,0,0,0,24.5,13.9a2.625,2.625,0,0,0,2.03-.965c.081-.081.161-.16.241-.233a.573.573,0,0,1,.818-.049Zm5.86-7.657A5.323,5.323,0,1,0,39.3,10.826,5.317,5.317,0,0,0,34.117,5.537Zm2.838,5.289a2.857,2.857,0,1,1-5.7,0,2.853,2.853,0,1,1,5.7,0ZM49.346,6.341v9.012a.616.616,0,0,1-.612.589h-.517c-.34,0-.474-.245-.561-.485l-.2-.536a4.084,4.084,0,0,1-3.1,1.258c-3.388,0-3.823-2.5-3.823-4.685V6.341a.621.621,0,0,1,.59-.588h1.207a.6.6,0,0,1,.59.588v5.3c0,1.539.58,2.256,1.825,2.256a2.357,2.357,0,0,0,2.214-1.544l0-6.016c0-.544.349-.588.676-.588h1.1A.624.624,0,0,1,49.346,6.341Zm11.089,4.01v5a.605.605,0,0,1-.591.589H58.637a.6.6,0,0,1-.59-.589V10.265c0-1.579-.655-2.449-1.846-2.449a2.939,2.939,0,0,0-2.514,1.355v6.182c0,.4-.229.589-.7.589h-1.1a.6.6,0,0,1-.59-.589V6.341a.6.6,0,0,1,.59-.588h.518a.5.5,0,0,1,.522.391l.235.67a4.691,4.691,0,0,1,3.3-1.277C59.134,5.537,60.435,7.111,60.435,10.351Zm8.048,4.379a.556.556,0,0,1-.283.721,6.126,6.126,0,0,1-2.822.728c-2.337,0-2.637-1.651-2.637-3.09V7.816H61.713a.6.6,0,0,1-.589-.59V6.341a.569.569,0,0,1,.589-.588h1.028V3.088a.59.59,0,0,1,.59-.59h1.228a.573.573,0,0,1,.568.59V5.753h2.515a.582.582,0,0,1,.59.588v.885a.613.613,0,0,1-.59.59H65.127V13c0,.828.323.9.683.9a3.241,3.241,0,0,0,1.536-.458.523.523,0,0,1,.431-.064.558.558,0,0,1,.317.335Zm7.869-1.576c0,1.5-1.262,3.025-3.672,3.025a5.927,5.927,0,0,1-3.343-1.033h0a.523.523,0,0,1-.208-.663l.452-.926a.494.494,0,0,1,.3-.254.635.635,0,0,1,.505.076l.032.017a4.485,4.485,0,0,0,2.389.7c.74,0,1.2-.328,1.2-.855,0-.58-.666-.985-2.066-1.618-1.435-.648-2.763-1.49-2.763-3.253,0-1.41,1.056-2.832,3.414-2.832a5.7,5.7,0,0,1,2.973.752.706.706,0,0,1,.256.882l-.344.689a.582.582,0,0,1-.8.247,5.057,5.057,0,0,0-2.087-.485c-.8,0-1.156.385-1.156.768,0,.546.574.9,1.633,1.361C75.052,10.588,76.352,11.279,76.352,13.154Z"}))},API:function(e){var n=e.color,r=e.size;return t.createElement("svg",{"data-name":"Layer 1",height:void 0===r?20:r,id:"bed028ef-58ee-4c4c-a757-08ecc3276857",viewBox:"0 0 119.5 20",xmlns:"http://www.w3.org/2000/svg"},t.createElement("title",null,"api-text"),t.createElement("path",{fill:n,d:"M9.136.675H7.908a.621.621,0,0,0-.59.589V5.5a6.9,6.9,0,0,0-2.384-.469A5.013,5.013,0,0,0,.012,10.343c0,2.989,2.048,5.331,4.663,5.331a4.885,4.885,0,0,0,3.22-1.3l.16.543a.591.591,0,0,0,.564.519h.517a.6.6,0,0,0,.59-.59V1.264A.6.6,0,0,0,9.136.675ZM7.34,7.847v4.175A2.745,2.745,0,0,1,4.978,13.4,2.815,2.815,0,0,1,2.4,10.343a2.913,2.913,0,0,1,2.772-3.03A4.941,4.941,0,0,1,7.34,7.847Zm8.833-2.813A5.081,5.081,0,0,0,11.1,10.343a5.046,5.046,0,0,0,5.094,5.331,5.712,5.712,0,0,0,3.761-1.256.512.512,0,0,0,.064-.819l-.582-.906a.467.467,0,0,0-.3-.22.619.619,0,0,0-.45.147,3.737,3.737,0,0,1-2.368.818,2.818,2.818,0,0,1-2.854-2.484h6.755a.578.578,0,0,0,.566-.532c.023-.175.045-.524.045-.7A4.571,4.571,0,0,0,16.173,5.034ZM16.13,7.1a2.23,2.23,0,0,1,2.334,2.032H13.591A2.411,2.411,0,0,1,16.13,7.1ZM30.587,5.982l-4.3,9.366a.561.561,0,0,1-.515.326h-.129a.59.59,0,0,1-.534-.323l-4.31-9.373a.484.484,0,0,1-.024-.49.542.542,0,0,1,.493-.239h1.315a.543.543,0,0,1,.534.344l2.571,5.914,2.7-5.91c.161-.348.486-.348.773-.348h.97a.544.544,0,0,1,.494.239A.488.488,0,0,1,30.587,5.982Zm4.983-.948A5.081,5.081,0,0,0,30.5,10.343a5.045,5.045,0,0,0,5.094,5.331,5.706,5.706,0,0,0,3.76-1.256.512.512,0,0,0,.065-.819l-.582-.906a.467.467,0,0,0-.3-.22.616.616,0,0,0-.45.147,3.738,3.738,0,0,1-2.369.818,2.819,2.819,0,0,1-2.854-2.484h6.755a.58.58,0,0,0,.567-.532c.023-.175.044-.524.044-.7A4.57,4.57,0,0,0,35.57,5.034ZM35.527,7.1a2.23,2.23,0,0,1,2.334,2.032H32.988A2.413,2.413,0,0,1,35.527,7.1Zm8.426-5.833V14.847a.606.606,0,0,1-.59.59H42.156a.6.6,0,0,1-.59-.59V1.264a.606.606,0,0,1,.59-.589h1.207A.621.621,0,0,1,43.953,1.264Zm6.576,3.77a5.322,5.322,0,1,0,5.18,5.287A5.315,5.315,0,0,0,50.529,5.034Zm2.836,5.287a2.856,2.856,0,1,1-5.695,0,2.852,2.852,0,1,1,5.7,0Zm8.65-5.287a4.76,4.76,0,0,0-3.08,1.1l-.2-.487a.523.523,0,0,0-.539-.4h-.539a.606.606,0,0,0-.59.59V19.422a.6.6,0,0,0,.59.59h1.207a.58.58,0,0,0,.633-.59V15.066a5.6,5.6,0,0,0,2.427.608,5.075,5.075,0,0,0,4.9-5.331A5.026,5.026,0,0,0,62.015,5.034Zm2.427,5.309A2.9,2.9,0,0,1,61.648,13.4a4.112,4.112,0,0,1-2.19-.678v-4.1a2.628,2.628,0,0,1,2.277-1.3A2.787,2.787,0,0,1,64.442,10.343ZM72.73,5.034a5.081,5.081,0,0,0-5.073,5.309,5.046,5.046,0,0,0,5.095,5.331,5.711,5.711,0,0,0,3.76-1.256.512.512,0,0,0,.065-.819l-.583-.906a.463.463,0,0,0-.3-.22.61.61,0,0,0-.45.147,3.735,3.735,0,0,1-2.368.818,2.818,2.818,0,0,1-2.854-2.484h6.754a.577.577,0,0,0,.567-.532c.023-.178.045-.527.045-.7A4.57,4.57,0,0,0,72.73,5.034ZM72.687,7.1a2.23,2.23,0,0,1,2.334,2.032H70.147A2.413,2.413,0,0,1,72.687,7.1ZM85.434,5.6a.518.518,0,0,1,.009.524L84.926,7.2a.584.584,0,0,1-.334.323.543.543,0,0,1-.424-.032,2.366,2.366,0,0,0-.854-.181A2.734,2.734,0,0,0,81.08,8.561v6.286c0,.59-.485.59-.8.59h-.991a.6.6,0,0,1-.59-.59V5.839a.605.605,0,0,1,.59-.59H79.8a.576.576,0,0,1,.544.435l.213.688a3.921,3.921,0,0,1,2.971-1.338C84.277,5.034,85.17,5.183,85.434,5.6Zm11.8-5.4a.621.621,0,0,0-.469-.3h-.216a.62.62,0,0,0-.472.305l-6.615,14.5a.508.508,0,0,0,.02.5.517.517,0,0,0,.451.229h1.357a.652.652,0,0,0,.6-.392l1.284-2.884h6.9l1.306,2.884a.618.618,0,0,0,.6.392h1.358a.517.517,0,0,0,.451-.229.508.508,0,0,0,.021-.494Zm1.916,9.871H94.116l2.5-5.627ZM110.327.12h-4.913a.526.526,0,0,0-.526.525V14.912a.526.526,0,0,0,.526.525h1.4a.54.54,0,0,0,.525-.525V9.963h3.009A4.922,4.922,0,1,0,110.327.12Zm2.493,4.856a2.563,2.563,0,0,1-2.536,2.643H107.34V2.507h2.944A2.476,2.476,0,0,1,112.82,4.976ZM119.087.645V14.912a.54.54,0,0,1-.526.525h-1.422a.54.54,0,0,1-.525-.525V.645a.539.539,0,0,1,.525-.525h1.422A.539.539,0,0,1,119.087.645Z"}))},Calendar:function(e){var n=e.color,r=e.size;return t.createElement("svg",{"data-name":"Layer 1",height:void 0===r?20:r,id:"Layer_1",viewBox:"0 0 73.83 20",xmlns:"http://www.w3.org/2000/svg"},t.createElement("title",null,"calendar-text"),t.createElement("path",{fill:n,d:"M9,12.56c.39.36.32.66.19.85a4.65,4.65,0,0,1-4,2.12A5.21,5.21,0,0,1,0,10.21,5.3,5.3,0,0,1,5.23,4.87,4.49,4.49,0,0,1,9,6.64a.6.6,0,0,1-.1.85l-.78.71c-.35.33-.61.07-.78-.11a3,3,0,0,0-2-1,3,3,0,0,0-2.94,3.06,3,3,0,0,0,2.87,3.09,2.63,2.63,0,0,0,2.05-1l.25-.23A.55.55,0,0,1,8.32,12Zm9.25-3.17v5.33a.59.59,0,0,1-.57.57H17c-.27,0-.4-.16-.5-.4l-.19-.54a4.39,4.39,0,0,1-3,1.18A3.2,3.2,0,0,1,9.91,12.1c0-2,1.61-3.33,4.11-3.33a7.24,7.24,0,0,1,1.92.28,2.33,2.33,0,0,0-.43-1.72A1.44,1.44,0,0,0,14.43,7a10.27,10.27,0,0,0-2.77.48A.56.56,0,0,1,11,7l-.2-.82a.56.56,0,0,1,.39-.7,10.9,10.9,0,0,1,3.48-.57C18,4.87,18.25,6.92,18.25,9.39Zm-2.34,3V10.83a4.91,4.91,0,0,0-1.72-.3c-1.17,0-2,.62-2,1.55a1.37,1.37,0,0,0,1.46,1.48A3,3,0,0,0,15.91,12.42ZM22,.47H20.79a.6.6,0,0,0-.58.57V14.72a.59.59,0,0,0,.58.57H22a.59.59,0,0,0,.57-.57V1A.61.61,0,0,0,22,.47ZM33.75,9.56c0,.18,0,.53,0,.71a.57.57,0,0,1-.55.52H26.35a2.84,2.84,0,0,0,2.89,2.53,3.84,3.84,0,0,0,2.39-.82.57.57,0,0,1,.43-.15.45.45,0,0,1,.29.21l.58.92a.48.48,0,0,1-.06.79,5.67,5.67,0,0,1-3.76,1.26A5.05,5.05,0,0,1,24,10.19a5.1,5.1,0,0,1,5.08-5.32A4.58,4.58,0,0,1,33.75,9.56ZM26.46,9h4.95A2.27,2.27,0,0,0,29,6.91,2.45,2.45,0,0,0,26.46,9Zm13.8-4.12a4.72,4.72,0,0,0-3.32,1.3l-.24-.7a.48.48,0,0,0-.51-.38h-.52a.59.59,0,0,0-.57.57v9.06a.58.58,0,0,0,.57.57h1.11c.45,0,.68-.19.68-.57V8.5A3,3,0,0,1,40,7.13c1.21,0,1.88.88,1.88,2.48v5.11a.58.58,0,0,0,.57.57h1.21a.6.6,0,0,0,.58-.57v-5C44.24,6.45,42.94,4.87,40.26,4.87ZM55.29,1V14.72a.58.58,0,0,1-.57.57H54.2a.57.57,0,0,1-.55-.5l-.17-.58a4.89,4.89,0,0,1-3.24,1.32c-2.62,0-4.67-2.34-4.67-5.34A5,5,0,0,1,50.5,4.87a6.85,6.85,0,0,1,2.39.48h0V1a.61.61,0,0,1,.58-.57h1.23A.59.59,0,0,1,55.29,1ZM52.93,11.88V7.67a5,5,0,0,0-2.19-.54,2.94,2.94,0,0,0-2.81,3.06,2.85,2.85,0,0,0,2.61,3.09A2.76,2.76,0,0,0,52.93,11.88Zm12-2.49v5.33a.59.59,0,0,1-.57.57h-.72c-.27,0-.39-.16-.5-.4L63,14.35a4.39,4.39,0,0,1-3,1.18A3.2,3.2,0,0,1,56.6,12.1c0-2,1.62-3.33,4.11-3.33a7.24,7.24,0,0,1,1.92.28,2.33,2.33,0,0,0-.43-1.72A1.42,1.42,0,0,0,61.12,7a10.27,10.27,0,0,0-2.77.48A.56.56,0,0,1,57.67,7l-.2-.82a.56.56,0,0,1,.39-.7,10.9,10.9,0,0,1,3.48-.57C64.67,4.87,64.94,6.92,64.94,9.39Zm-2.34,3V10.83a4.91,4.91,0,0,0-1.72-.3c-1.17,0-2,.62-2,1.55a1.37,1.37,0,0,0,1.46,1.48A3,3,0,0,0,62.6,12.42Zm11-7c-.26-.42-1.18-.57-1.9-.57a4,4,0,0,0-3,1.37l-.23-.73A.56.56,0,0,0,68,5.09h-.52a.59.59,0,0,0-.58.57v9.06a.58.58,0,0,0,.58.57h1c.32,0,.79,0,.79-.57V8.4A2.77,2.77,0,0,1,71.5,7.13a2.47,2.47,0,0,1,.86.18.5.5,0,0,0,.41,0A.56.56,0,0,0,73.1,7l.52-1.09A.48.48,0,0,0,73.61,5.44Z"}))},CheckIns:function(e){var n=e.color,r=e.size;return t.createElement("svg",{"data-name":"Layer 1",height:void 0===r?20:r,id:"dc713595-39c2-41c4-b1d9-3ef8c295b738",viewBox:"0 0 79.311 20",xmlns:"http://www.w3.org/2000/svg"},t.createElement("title",null,"check-ins-text"),t.createElement("path",{fill:n,d:"M40.221,13.213c.4.362.326.669.2.866A4.646,4.646,0,0,1,36.44,16.2a5.2,5.2,0,0,1-5.2-5.311,5.286,5.286,0,0,1,5.225-5.331,4.462,4.462,0,0,1,3.711,1.768.605.605,0,0,1-.1.869L39.3,8.9c-.362.333-.64.055-.806-.109a2.9,2.9,0,0,0-1.967-.959,2.937,2.937,0,0,0-2.9,3.031,2.92,2.92,0,0,0,2.837,3.054,2.62,2.62,0,0,0,2.03-.965c.082-.081.162-.16.242-.234a.572.572,0,0,1,.818-.049h0Zm-9.679-2.971c0,.178-.022.526-.044.7a.579.579,0,0,1-.567.531H23.174a2.82,2.82,0,0,0,2.855,2.485,3.736,3.736,0,0,0,2.369-.818.609.609,0,0,1,.45-.147.459.459,0,0,1,.3.219l.583.907a.513.513,0,0,1-.065.819A5.708,5.708,0,0,1,25.9,16.2a5.046,5.046,0,0,1-5.1-5.332,5.081,5.081,0,0,1,5.074-5.31A4.572,4.572,0,0,1,30.542,10.242ZM23.3,9.653h4.874A2.23,2.23,0,0,0,25.835,7.62,2.412,2.412,0,0,0,23.3,9.653Zm-7.751-4.1a4.789,4.789,0,0,0-2.773.924V2.339a.621.621,0,0,0-.59-.588H10.974a.6.6,0,0,0-.59.588V15.373a.59.59,0,0,0,.59.589H12.16a.575.575,0,0,0,.611-.589V9.193a2.871,2.871,0,0,1,2.493-1.357c1.2,0,1.867.884,1.867,2.492v5.045a.59.59,0,0,0,.59.589h1.207a.606.606,0,0,0,.59-.589v-5C19.518,7.221,18.144,5.557,15.544,5.557ZM8.315,12.674h0a.573.573,0,0,0-.818.049c-.08.074-.16.154-.242.235a2.624,2.624,0,0,1-2.029.964,2.92,2.92,0,0,1-2.838-3.054,2.938,2.938,0,0,1,2.9-3.031A2.906,2.906,0,0,1,7.257,8.8c.166.164.444.442.8.109l.775-.71a.6.6,0,0,0,.1-.869A4.464,4.464,0,0,0,5.225,5.557,5.285,5.285,0,0,0,0,10.888,5.2,5.2,0,0,0,5.2,16.2a4.647,4.647,0,0,0,3.977-2.12c.13-.2.2-.5-.2-.866ZM55.084,9.566h-4.1a.514.514,0,0,0-.525.525v.926a.51.51,0,0,0,.525.5h4.1a.51.51,0,0,0,.526-.5v-.926A.514.514,0,0,0,55.084,9.566Zm20.945.2C74.97,9.308,74.4,8.955,74.4,8.41c0-.383.357-.769,1.156-.769a5.059,5.059,0,0,1,2.087.486.581.581,0,0,0,.8-.248l.344-.689a.706.706,0,0,0-.256-.882,5.705,5.705,0,0,0-2.973-.751c-2.358,0-3.413,1.422-3.413,2.831,0,1.764,1.327,2.606,2.762,3.253,1.4.634,2.066,1.038,2.066,1.618,0,.528-.459.856-1.2.856a4.5,4.5,0,0,1-2.39-.7l-.031-.018a.629.629,0,0,0-.506-.075.494.494,0,0,0-.3.254l-.452.926a.523.523,0,0,0,.21.664A5.935,5.935,0,0,0,75.639,16.2c2.41,0,3.672-1.522,3.672-3.025C79.311,11.3,78.011,10.609,76.029,9.769Zm-9.2-4.212a4.687,4.687,0,0,0-3.3,1.277l-.235-.67a.5.5,0,0,0-.522-.392h-.517a.605.605,0,0,0-.591.59v9.011a.591.591,0,0,0,.591.589h1.1c.469,0,.7-.193.7-.589V9.19A2.934,2.934,0,0,1,66.57,7.836c1.191,0,1.846.87,1.846,2.45v5.087a.59.59,0,0,0,.59.589h1.207a.606.606,0,0,0,.59-.589v-5C70.8,7.131,69.5,5.557,66.829,5.557Zm-8.3-4.275a1.543,1.543,0,0,0-1.538,1.581,1.532,1.532,0,0,0,1.538,1.559,1.57,1.57,0,1,0,0-3.14Zm-12.215,9.1,3.949-3.716a.548.548,0,0,0,.14-.588.484.484,0,0,0-.476-.3H48.355a1.063,1.063,0,0,0-.7.331L44.008,9.4V2.339a.62.62,0,0,0-.59-.588H42.211a.6.6,0,0,0-.59.588V15.373a.59.59,0,0,0,.59.589h1.207a.606.606,0,0,0,.59-.589V11.329l3.783,4.4a.711.711,0,0,0,.542.237H50.1a.468.468,0,0,0,.461-.256.561.561,0,0,0-.094-.582ZM59.135,5.772H57.928a.605.605,0,0,0-.59.59v9.011a.59.59,0,0,0,.59.589h1.207a.606.606,0,0,0,.59-.589V6.362A.621.621,0,0,0,59.135,5.772Z"}))},ChurchCenter:function(e){var n=e.color,r=e.size;return t.createElement("svg",{"data-name":"Layer 1",height:void 0===r?20:r,id:"e2e8a225-c349-4aea-935c-64b6ad436be8",viewBox:"0 0 118.083 20",xmlns:"http://www.w3.org/2000/svg"},t.createElement("title",null,"church-center-text"),t.createElement("path",{fill:n,d:"M5.188,16.2A5.187,5.187,0,0,1,0,10.908,5.27,5.27,0,0,1,5.209,5.591a4.453,4.453,0,0,1,3.7,1.762.588.588,0,0,1-.1.844l-.776.712c-.346.319-.607.062-.779-.109a2.93,2.93,0,0,0-1.983-.966A2.959,2.959,0,0,0,2.35,10.887a2.942,2.942,0,0,0,2.859,3.076,2.642,2.642,0,0,0,2.045-.971c.082-.081.162-.16.242-.234a.552.552,0,0,1,.794-.047l.669.539c.388.352.318.651.193.841A4.629,4.629,0,0,1,5.188,16.2ZM19.5,15.4V10.391c0-3.14-1.368-4.8-3.959-4.8a4.788,4.788,0,0,0-2.788.939l-.006-4.209a.609.609,0,0,0-.571-.57H10.964a.592.592,0,0,0-.571.57V15.4a.58.58,0,0,0,.571.572H12.15a.558.558,0,0,0,.593-.572V9.207a2.893,2.893,0,0,1,2.515-1.373c1.217,0,1.888.893,1.888,2.514V15.4a.579.579,0,0,0,.571.572h1.208A.593.593,0,0,0,19.5,15.4Zm8.7-.468.2.566c.09.246.218.474.544.474h.518a.6.6,0,0,0,.592-.572V6.378a.612.612,0,0,0-.592-.57h-1.1c-.332,0-.657.044-.657.57l0,6.023a2.38,2.38,0,0,1-2.236,1.562c-1.259,0-1.845-.723-1.845-2.277V6.378a.585.585,0,0,0-.571-.57H21.843a.6.6,0,0,0-.57.57v5.156c0,2.175.433,4.67,3.807,4.67A4.06,4.06,0,0,0,28.193,14.928Zm6.2.468V9.1A2.755,2.755,0,0,1,36.65,7.834a2.382,2.382,0,0,1,.863.184.53.53,0,0,0,.41.032.571.571,0,0,0,.324-.315l.518-1.077a.5.5,0,0,0-.009-.507c-.259-.413-1.18-.56-1.89-.56a3.975,3.975,0,0,0-2.984,1.356l-.223-.719a.555.555,0,0,0-.525-.42h-.518a.585.585,0,0,0-.571.57V15.4a.58.58,0,0,0,.571.572h.993C33.922,15.968,34.4,15.968,34.4,15.4Zm13.35-1.305c.125-.19.2-.489-.193-.841l-.669-.539a.552.552,0,0,0-.794.047c-.08.074-.16.153-.242.234a2.642,2.642,0,0,1-2.044.971,2.942,2.942,0,0,1-2.86-3.076,2.959,2.959,0,0,1,2.924-3.053A2.93,2.93,0,0,1,45.85,8.8c.172.171.433.428.779.109l.776-.712a.588.588,0,0,0,.1-.844,4.452,4.452,0,0,0-3.7-1.762,5.271,5.271,0,0,0-5.21,5.317,5.187,5.187,0,0,0,5.188,5.3A4.629,4.629,0,0,0,47.745,14.091ZM58.089,15.4V10.391c0-3.14-1.368-4.8-3.959-4.8a4.79,4.79,0,0,0-2.788.939l-.006-4.209a.609.609,0,0,0-.571-.57H49.557a.592.592,0,0,0-.571.57V15.4a.58.58,0,0,0,.571.572h1.187a.557.557,0,0,0,.592-.572V9.207a2.893,2.893,0,0,1,2.515-1.373c1.217,0,1.888.893,1.888,2.514V15.4a.579.579,0,0,0,.571.572h1.208A.593.593,0,0,0,58.089,15.4Zm12.926-1.305c.126-.19.2-.489-.192-.841l-.669-.539a.553.553,0,0,0-.8.047c-.08.074-.159.153-.242.234a2.64,2.64,0,0,1-2.044.971,2.941,2.941,0,0,1-2.859-3.076A2.8,2.8,0,0,1,69.121,8.8c.171.171.433.428.778.109l.777-.712a.587.587,0,0,0,.1-.844,4.449,4.449,0,0,0-3.7-1.762,5.271,5.271,0,0,0-5.21,5.317,5.187,5.187,0,0,0,5.188,5.3A4.629,4.629,0,0,0,71.015,14.091Zm10.247-3.83c0,.177-.022.525-.044.7a.562.562,0,0,1-.549.516H73.887a2.838,2.838,0,0,0,2.877,2.526,3.743,3.743,0,0,0,2.382-.824.6.6,0,0,1,.436-.143.447.447,0,0,1,.283.212l.584.907a.492.492,0,0,1-.063.794A5.7,5.7,0,0,1,76.634,16.2a5.031,5.031,0,0,1-5.08-5.317,5.068,5.068,0,0,1,5.059-5.3A4.558,4.558,0,0,1,81.262,10.261Zm-2.335-.57a2.251,2.251,0,0,0-2.358-2.073,2.433,2.433,0,0,0-2.564,2.073ZM91.707,15.4V10.391c0-3.23-1.3-4.8-3.959-4.8a4.657,4.657,0,0,0-3.306,1.3l-.246-.7a.479.479,0,0,0-.5-.376h-.518a.585.585,0,0,0-.571.57V15.4a.58.58,0,0,0,.571.572h1.1c.457,0,.679-.187.679-.572V9.2a2.96,2.96,0,0,1,2.536-1.37c1.2,0,1.867.877,1.867,2.471V15.4a.58.58,0,0,0,.571.572h1.208A.594.594,0,0,0,91.707,15.4Zm7.779.081a.538.538,0,0,0,.277-.7l-.389-1.014a.537.537,0,0,0-.306-.325.493.493,0,0,0-.415.061,3.249,3.249,0,0,1-1.548.462c-.445,0-.7-.15-.7-.918V7.834h2.536a.594.594,0,0,0,.571-.571V6.378a.564.564,0,0,0-.571-.57H96.4V3.12a.555.555,0,0,0-.549-.571h-1.23a.579.579,0,0,0-.571.571V5.808H93.005a.552.552,0,0,0-.571.57v.885a.579.579,0,0,0,.571.571h1.048v5.3c0,1.431.3,3.073,2.62,3.073A6.067,6.067,0,0,0,99.486,15.477Zm10.11-5.216c0,.177-.022.525-.044.7a.561.561,0,0,1-.549.516h-6.782a2.838,2.838,0,0,0,2.877,2.526,3.743,3.743,0,0,0,2.382-.824.6.6,0,0,1,.437-.143.446.446,0,0,1,.282.212l.584.907a.491.491,0,0,1-.063.794,5.7,5.7,0,0,1-3.752,1.252,5.032,5.032,0,0,1-5.08-5.317,5.068,5.068,0,0,1,5.059-5.3A4.557,4.557,0,0,1,109.6,10.261Zm-2.335-.57A2.25,2.25,0,0,0,104.9,7.618a2.434,2.434,0,0,0-2.565,2.073Zm6.026,5.705V9.1a2.755,2.755,0,0,1,2.255-1.265,2.388,2.388,0,0,1,.864.184.528.528,0,0,0,.409.032.568.568,0,0,0,.324-.315l.519-1.077a.5.5,0,0,0-.009-.507c-.26-.413-1.181-.56-1.891-.56a3.977,3.977,0,0,0-2.984,1.356l-.223-.719a.555.555,0,0,0-.525-.42h-.518a.585.585,0,0,0-.571.57V15.4a.58.58,0,0,0,.571.572h.993C112.814,15.968,113.287,15.968,113.287,15.4Z"}))},Giving:function(e){var n=e.color,r=e.size;return t.createElement("svg",{"data-name":"Layer 1",height:void 0===r?20:r,id:"a221b42b-722d-4eb3-b043-fff7f3c6686f",viewBox:"0 0 50.486 20",xmlns:"http://www.w3.org/2000/svg"},t.createElement("title",null,"giving-text"),t.createElement("path",{fill:n,d:"M9.17,5.089H8.588c-.335,0-.42.255-.474.416l-.2.473a4.791,4.791,0,0,0-3.1-1.1A5.026,5.026,0,0,0,0,10.184a5.085,5.085,0,0,0,4.923,5.332,5.459,5.459,0,0,0,2.428-.629v.342c0,2.113-1.285,2.557-2.363,2.557a3.619,3.619,0,0,1-2.259-.905.567.567,0,0,0-.474-.114.553.553,0,0,0-.365.3l-.516.948a.563.563,0,0,0,.126.7A5.489,5.489,0,0,0,5.031,20a4.407,4.407,0,0,0,4.728-4.771V5.679A.6.6,0,0,0,9.17,5.089Zm-1.8,3.378V12.5a3.951,3.951,0,0,1-2.191.74,2.973,2.973,0,0,1-2.8-3.054A2.82,2.82,0,0,1,5.1,7.152,2.835,2.835,0,0,1,7.373,8.467Zm6.745-2.788v9.01a.6.6,0,0,1-.59.589H12.321a.59.59,0,0,1-.59-.589V5.679a.605.605,0,0,1,.59-.59h1.207A.62.62,0,0,1,14.118,5.679Zm.388-3.508A1.572,1.572,0,0,1,12.924,3.73a1.532,1.532,0,0,1-1.538-1.559A1.543,1.543,0,0,1,12.924.59,1.564,1.564,0,0,1,14.506,2.171Zm10.3,3.156a.49.49,0,0,1-.027.5l-4.307,9.367a.558.558,0,0,1-.514.327h-.13a.6.6,0,0,1-.534-.323L14.984,5.817a.487.487,0,0,1-.025-.49.545.545,0,0,1,.494-.238h1.315a.547.547,0,0,1,.535.344l2.572,5.917,2.7-5.913c.16-.348.486-.348.773-.348h.97A.545.545,0,0,1,24.807,5.327Zm3.249.352v9.01a.6.6,0,0,1-.59.589H26.259a.59.59,0,0,1-.59-.589V5.679a.605.605,0,0,1,.59-.59h1.207A.62.62,0,0,1,28.056,5.679Zm.388-3.508A1.572,1.572,0,0,1,26.863,3.73a1.532,1.532,0,0,1-1.539-1.559A1.544,1.544,0,0,1,26.863.59,1.564,1.564,0,0,1,28.444,2.171Zm10.69,7.517v5a.6.6,0,0,1-.59.589H37.337a.59.59,0,0,1-.59-.589V9.6c0-1.581-.655-2.451-1.846-2.451a2.938,2.938,0,0,0-2.514,1.355v6.182c0,.4-.229.589-.7.589h-1.1a.59.59,0,0,1-.59-.589V5.679a.605.605,0,0,1,.59-.59h.517a.5.5,0,0,1,.522.391l.235.67a4.692,4.692,0,0,1,3.3-1.276C37.834,4.874,39.134,6.448,39.134,9.688Zm10.456-4.6h-.582c-.336,0-.42.255-.473.416l-.2.473a4.777,4.777,0,0,0-3.1-1.1,5.026,5.026,0,0,0-4.815,5.31,5.085,5.085,0,0,0,4.923,5.332,5.459,5.459,0,0,0,2.428-.629v.342c0,2.113-1.285,2.557-2.363,2.557a3.619,3.619,0,0,1-2.259-.905.567.567,0,0,0-.474-.114.553.553,0,0,0-.365.3l-.516.948a.563.563,0,0,0,.126.7A5.489,5.489,0,0,0,45.451,20a4.407,4.407,0,0,0,4.729-4.771V5.679A.605.605,0,0,0,49.59,5.089Zm-1.8,7.409a3.944,3.944,0,0,1-2.19.74,2.973,2.973,0,0,1-2.795-3.054,2.693,2.693,0,0,1,4.985-1.717Z"}))},Home:function(e){var n=e.color,r=e.size;return t.createElement("svg",{id:"a221b42b-722d-4eb3-b043-fff7f3c6686f","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",height:void 0===r?20:r,viewBox:"0 0 47.624 20"},t.createElement("title",null,"home-text"),t.createElement("path",{fill:n,d:"M8.952,9.7V14.69a.584.584,0,0,1-.553.57H7.229a.57.57,0,0,1-.553-.57V9.658c0-1.616-.649-2.506-1.827-2.506A2.791,2.791,0,0,0,2.414,8.52v6.17a.547.547,0,0,1-.573.57H.692a.569.569,0,0,1-.553-.57v-13a.583.583,0,0,1,.553-.569H1.861a.6.6,0,0,1,.553.569V5.857a4.544,4.544,0,0,1,2.706-.94C7.627,4.917,8.952,6.571,8.952,9.7Zm11.261.473a5.239,5.239,0,0,1-5,5.322,5.185,5.185,0,0,1-5.022-5.322A5.213,5.213,0,0,1,15.21,4.917,5.2,5.2,0,0,1,20.213,10.174Zm-2.234,0a2.789,2.789,0,1,0-5.558,0,2.884,2.884,0,0,0,2.789,3.087A2.876,2.876,0,0,0,17.979,10.174Zm14.59-5.257a4.475,4.475,0,0,0-3.248,1.519,3.34,3.34,0,0,0-2.956-1.519,4.128,4.128,0,0,0-3.031,1.289L23.111,5.5a.487.487,0,0,0-.506-.367h-.48a.584.584,0,0,0-.553.569V14.69a.57.57,0,0,0,.553.57h1.169a.577.577,0,0,0,.553-.57V8.512a2.367,2.367,0,0,1,2.184-1.36c1.216,0,1.808.806,1.808,2.463V14.69a.555.555,0,0,0,.552.57h1.191a.559.559,0,0,0,.532-.57V9.551a10.249,10.249,0,0,0-.077-1.3l.06-.064a2.793,2.793,0,0,1,2.159-1.034c1.2,0,1.807.829,1.807,2.463V14.69a.538.538,0,0,0,.553.57h1.17a.549.549,0,0,0,.553-.57V9.7C36.339,7.647,35.948,4.917,32.569,4.917ZM47.042,9.572c0,.176-.021.523-.043.7a.549.549,0,0,1-.531.514H39.9A2.778,2.778,0,0,0,42.687,13.3a3.573,3.573,0,0,0,2.306-.82.6.6,0,0,1,.422-.144.431.431,0,0,1,.274.211l.566.9a.5.5,0,0,1-.061.791A5.416,5.416,0,0,1,42.562,15.5c-2.85,0-4.919-2.229-4.919-5.3a4.988,4.988,0,0,1,4.9-5.279A4.479,4.479,0,0,1,47.042,9.572ZM40.016,9h4.765A2.2,2.2,0,0,0,42.5,6.937,2.375,2.375,0,0,0,40.016,9Z"}))},Groups:function(e){var n=e.color,r=e.size;return t.createElement("svg",{"data-name":"Layer 1",height:void 0===r?20:r,id:"08e4075e-8ca4-4400-a3ae-98f53270d1d0",viewBox:"0 0 58.688 20",xmlns:"http://www.w3.org/2000/svg"},t.createElement("title",null,"groups-text"),t.createElement("path",{fill:n,d:"M9.17,5.09H8.588c-.335,0-.42.255-.474.416l-.2.472a4.791,4.791,0,0,0-3.1-1.1A5.027,5.027,0,0,0,0,10.185a5.085,5.085,0,0,0,4.923,5.332,5.465,5.465,0,0,0,2.428-.63v.342c0,2.113-1.285,2.557-2.363,2.557a3.631,3.631,0,0,1-2.259-.9.568.568,0,0,0-.473-.115.556.556,0,0,0-.366.3l-.516.947a.574.574,0,0,0,.126.7A5.487,5.487,0,0,0,5.031,20a4.407,4.407,0,0,0,4.728-4.771V5.679A.6.6,0,0,0,9.17,5.09Zm-1.8,3.378V12.5a3.951,3.951,0,0,1-2.191.74,2.972,2.972,0,0,1-2.8-3.053A2.821,2.821,0,0,1,5.1,7.152,2.835,2.835,0,0,1,7.373,8.468Zm11.092-2.5-.517,1.077a.588.588,0,0,1-.335.323.535.535,0,0,1-.424-.032,2.351,2.351,0,0,0-.854-.183A2.738,2.738,0,0,0,14.1,8.4v6.288c0,.59-.485.59-.806.59H12.3a.6.6,0,0,1-.59-.59V5.679a.6.6,0,0,1,.59-.589h.517a.574.574,0,0,1,.544.434l.213.688A3.931,3.931,0,0,1,16.55,4.874c.749,0,1.642.149,1.9.568A.517.517,0,0,1,18.465,5.967Zm4.994-1.093a5.323,5.323,0,0,0,0,10.643,5.323,5.323,0,0,0,0-10.643Zm0,8.364A2.907,2.907,0,0,1,20.6,10.163a2.852,2.852,0,1,1,5.7,0A2.9,2.9,0,0,1,23.459,13.238ZM38.688,5.679v9.01a.616.616,0,0,1-.611.59H37.56c-.34,0-.475-.246-.561-.486l-.2-.535a4.082,4.082,0,0,1-3.1,1.259c-3.389,0-3.824-2.5-3.824-4.686V5.679a.621.621,0,0,1,.59-.589h1.207a.605.605,0,0,1,.591.589v5.3c0,1.539.579,2.256,1.824,2.256A2.356,2.356,0,0,0,36.3,11.694l0-6.015c0-.544.334-.589.677-.589h1.1A.632.632,0,0,1,38.688,5.679Zm6.9-.805a4.752,4.752,0,0,0-3.081,1.1l-.2-.488a.523.523,0,0,0-.54-.4h-.538a.6.6,0,0,0-.59.589V19.266a.6.6,0,0,0,.59.589H42.44a.58.58,0,0,0,.633-.589V14.909a5.612,5.612,0,0,0,2.428.608,5.075,5.075,0,0,0,4.9-5.332A5.027,5.027,0,0,0,45.587,4.874ZM43.029,8.457a2.633,2.633,0,0,1,2.278-1.305,2.789,2.789,0,0,1,2.708,3.033,2.9,2.9,0,0,1-2.794,3.053,4.131,4.131,0,0,1-2.192-.676Zm15.349,4.034c0,1.5-1.262,3.026-3.672,3.026a5.921,5.921,0,0,1-3.343-1.034h0a.522.522,0,0,1-.208-.663l.452-.925a.493.493,0,0,1,.3-.254.633.633,0,0,1,.5.075l.037.02a4.488,4.488,0,0,0,2.384.7c.74,0,1.2-.329,1.2-.856,0-.581-.666-.985-2.066-1.619-1.435-.646-2.763-1.487-2.763-3.252,0-1.41,1.056-2.832,3.414-2.832a5.71,5.71,0,0,1,2.973.752.705.705,0,0,1,.256.881L57.5,7.2a.58.58,0,0,1-.8.248,5.043,5.043,0,0,0-2.087-.485c-.8,0-1.156.386-1.156.768,0,.545.574.9,1.633,1.361C57.078,9.926,58.378,10.616,58.378,12.491Z"}))},People:function(e){var n=e.color,r=e.size;return t.createElement("svg",{"data-name":"Layer 1",height:void 0===r?20:r,id:"c461f8d4-1c6e-406e-af2d-8d7721d891d5",viewBox:"0 0 57.729 20",xmlns:"http://www.w3.org/2000/svg"},t.createElement("title",null,"people-text"),t.createElement("path",{fill:n,d:"M4.944,5.019a4.754,4.754,0,0,0-3.08,1.1l-.2-.487a.521.521,0,0,0-.539-.4H.59A.606.606,0,0,0,0,5.823V19.41A.6.6,0,0,0,.59,20H1.8a.58.58,0,0,0,.633-.59V15.053a5.593,5.593,0,0,0,2.428.607,5.075,5.075,0,0,0,4.9-5.331A5.027,5.027,0,0,0,4.944,5.019ZM2.387,8.6A2.63,2.63,0,0,1,4.665,7.3a2.789,2.789,0,0,1,2.708,3.032,2.9,2.9,0,0,1-2.795,3.054,4.109,4.109,0,0,1-2.191-.678ZM15.663,5.019a5.083,5.083,0,0,0-5.075,5.31,5.046,5.046,0,0,0,5.1,5.331A5.707,5.707,0,0,0,19.445,14.4a.511.511,0,0,0,.065-.818l-.583-.907a.459.459,0,0,0-.295-.22.609.609,0,0,0-.45.147,3.735,3.735,0,0,1-2.369.82,2.819,2.819,0,0,1-2.854-2.487h6.756a.578.578,0,0,0,.567-.531c.022-.177.045-.525.045-.7A4.572,4.572,0,0,0,15.663,5.019Zm-2.583,4.1a2.411,2.411,0,0,1,2.539-2.033,2.231,2.231,0,0,1,2.335,2.033Zm13.145-4.1a5.322,5.322,0,0,0,0,10.641,5.322,5.322,0,0,0,0-10.641Zm2.837,5.289a2.856,2.856,0,1,1-5.7,0,2.852,2.852,0,1,1,5.7,0Zm8.653-5.289a4.758,4.758,0,0,0-3.081,1.1l-.2-.487a.522.522,0,0,0-.54-.4h-.538a.606.606,0,0,0-.591.589V19.41a.592.592,0,0,0,.591.59h1.207a.58.58,0,0,0,.633-.59V15.05a5.541,5.541,0,0,0,2.428.61,5.075,5.075,0,0,0,4.9-5.331A5.027,5.027,0,0,0,37.715,5.019ZM35.158,8.6a2.629,2.629,0,0,1,2.277-1.3,2.789,2.789,0,0,1,2.708,3.032,2.9,2.9,0,0,1-2.794,3.054,4.109,4.109,0,0,1-2.191-.678ZM46.324,1.247V14.834a.606.606,0,0,1-.59.59H44.527a.6.6,0,0,1-.59-.59V1.247a.6.6,0,0,1,.59-.589h1.207A.621.621,0,0,1,46.324,1.247Zm6.459,3.772a5.083,5.083,0,0,0-5.075,5.31,5.047,5.047,0,0,0,5.1,5.331A5.713,5.713,0,0,0,56.566,14.4a.511.511,0,0,0,.064-.818l-.583-.907a.459.459,0,0,0-.295-.22.6.6,0,0,0-.449.147,3.739,3.739,0,0,1-2.369.82,2.821,2.821,0,0,1-2.855-2.487h6.756a.577.577,0,0,0,.567-.531c.022-.177.045-.525.045-.7A4.572,4.572,0,0,0,52.783,5.019ZM52.74,7.081a2.231,2.231,0,0,1,2.334,2.033H50.2A2.412,2.412,0,0,1,52.74,7.081Z"}))},Publishing:function(e){var n=e.color,r=e.size;return t.createElement("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",height:void 0===r?20:r,viewBox:"0 0 84.973 20"},t.createElement("title",null,"publishing-text"),t.createElement("path",{d:"M4.905,5.03A4.709,4.709,0,0,0,1.829,6.141l-.2-.511a.5.5,0,0,0-.52-.385H.568A.59.59,0,0,0,0,5.812V19.374a.575.575,0,0,0,.568.568h1.2a.559.559,0,0,0,.611-.568v-4.4a5.573,5.573,0,0,0,2.437.618A5.036,5.036,0,0,0,9.681,10.3,4.988,4.988,0,0,0,4.905,5.03ZM2.338,8.575A2.642,2.642,0,0,1,4.626,7.261,2.8,2.8,0,0,1,7.343,10.3a2.908,2.908,0,0,1-2.8,3.06,4.117,4.117,0,0,1-2.2-.684Zm17.4-2.763v8.974a.6.6,0,0,1-.59.569h-.515c-.326,0-.456-.238-.541-.472l-.2-.562a4.046,4.046,0,0,1-3.1,1.27c-3.358,0-3.788-2.484-3.788-4.647V5.812a.606.606,0,0,1,.568-.567h1.2a.59.59,0,0,1,.568.567v5.282c0,1.546.584,2.266,1.837,2.266A2.368,2.368,0,0,0,17.4,11.806V5.812c0-.524.323-.567.654-.567h1.094A.609.609,0,0,1,19.737,5.812Zm6.74-.782A6.836,6.836,0,0,0,24.1,5.5l-.018.006V1.246a.606.606,0,0,0-.568-.567H22.29a.583.583,0,0,0-.568.567v13.54a.576.576,0,0,0,.568.569h.516a.569.569,0,0,0,.542-.5l.17-.576a4.845,4.845,0,0,0,3.217,1.31c2.6,0,4.711-2.374,4.711-5.291A5.071,5.071,0,0,0,26.477,5.03ZM24.061,7.76a5.243,5.243,0,0,1,2.18-.5A3,3,0,0,1,29.107,10.3a2.9,2.9,0,0,1-2.694,3.06A2.761,2.761,0,0,1,24.061,12ZM35.225,1.246v13.54a.591.591,0,0,1-.568.569h-1.2a.576.576,0,0,1-.569-.569V1.246a.59.59,0,0,1,.569-.567h1.2A.606.606,0,0,1,35.225,1.246Zm4.349,4.566v8.974a.591.591,0,0,1-.568.569H37.8a.576.576,0,0,1-.568-.569V5.812a.582.582,0,0,1,.568-.567h1.2A.606.606,0,0,1,39.574,5.812Zm.387-3.577a1.547,1.547,0,0,1-1.556,1.534,1.508,1.508,0,0,1-1.513-1.534A1.519,1.519,0,0,1,38.405.679,1.539,1.539,0,0,1,39.961,2.235ZM48.143,12.6c0,1.488-1.25,2.994-3.638,2.994a5.875,5.875,0,0,1-3.318-1.026h0a.5.5,0,0,1-.2-.636l.45-.922a.47.47,0,0,1,.291-.243.613.613,0,0,1,.487.073l.036.02a4.489,4.489,0,0,0,2.385.7c.737,0,1.214-.342,1.214-.871,0-.589-.667-.994-2.069-1.629-1.423-.642-2.74-1.476-2.74-3.222,0-1.394,1.045-2.8,3.38-2.8a5.67,5.67,0,0,1,2.951.745.684.684,0,0,1,.248.853l-.343.687a.56.56,0,0,1-.769.238,5.05,5.05,0,0,0-2.087-.485c-.808,0-1.17.394-1.17.784,0,.554.575.91,1.638,1.372C46.853,10.057,48.143,10.742,48.143,12.6ZM58.461,9.805v4.981a.592.592,0,0,1-.569.569h-1.2a.576.576,0,0,1-.568-.569V9.763c0-1.614-.668-2.5-1.879-2.5a2.881,2.881,0,0,0-2.5,1.366v6.159a.554.554,0,0,1-.589.569H49.97a.576.576,0,0,1-.568-.569V1.246A.582.582,0,0,1,49.97.679h1.2a.606.606,0,0,1,.567.567V5.967a4.766,4.766,0,0,1,2.782-.937C57.1,5.03,58.461,6.681,58.461,9.805Zm4.2-3.993v8.974a.59.59,0,0,1-.567.569h-1.2a.576.576,0,0,1-.568-.569V5.812a.59.59,0,0,1,.568-.567h1.2A.606.606,0,0,1,62.657,5.812Zm.387-3.577a1.547,1.547,0,0,1-1.556,1.534,1.507,1.507,0,0,1-1.512-1.534A1.518,1.518,0,0,1,61.488.679,1.539,1.539,0,0,1,63.044,2.235Zm10.647,7.57v4.981a.591.591,0,0,1-.569.569h-1.2a.576.576,0,0,1-.568-.569V9.72c0-1.586-.66-2.459-1.858-2.459a2.944,2.944,0,0,0-2.523,1.364v6.161c0,.383-.221.569-.676.569H65.2a.576.576,0,0,1-.568-.569V5.812a.59.59,0,0,1,.568-.567h.516a.474.474,0,0,1,.5.375l.245.7a4.64,4.64,0,0,1,3.29-1.288C72.4,5.03,73.691,6.592,73.691,9.805Zm10.432-4.56h-.579c-.32,0-.4.236-.454.4l-.2.5a4.737,4.737,0,0,0-3.1-1.112A4.988,4.988,0,0,0,75.01,10.3a5.046,5.046,0,0,0,4.884,5.291,5.429,5.429,0,0,0,2.437-.64v.372c0,2.121-1.29,2.566-2.373,2.566a3.629,3.629,0,0,1-2.261-.9.547.547,0,0,0-.456-.111.535.535,0,0,0-.352.292l-.514.944a.551.551,0,0,0,.123.673A5.444,5.444,0,0,0,80,20.056a4.371,4.371,0,0,0,4.69-4.733V5.812A.582.582,0,0,0,84.123,5.245ZM80.151,13.36a2.979,2.979,0,0,1-2.8-3.06,2.7,2.7,0,0,1,5-1.715v4.029A3.973,3.973,0,0,1,80.151,13.36Z",fill:n}))},Registrations:function(e){var n=e.color,r=e.size;return t.createElement("svg",{id:"2da9f999-408b-4466-9b5d-b1268727ac81","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",height:void 0===r?20:r,viewBox:"0 0 105.758 20"},t.createElement("title",null,"registrations-text"),t.createElement("path",{fill:n,d:"M6.751,5.966,6.234,7.043a.589.589,0,0,1-.336.324.545.545,0,0,1-.423-.033,2.375,2.375,0,0,0-.854-.182A2.74,2.74,0,0,0,2.387,8.4v6.288c0,.59-.485.59-.8.59H.59a.6.6,0,0,1-.59-.59V5.679A.6.6,0,0,1,.59,5.09h.517a.574.574,0,0,1,.544.433l.212.685A4,4,0,0,1,4.836,4.874c.749,0,1.643.148,1.9.567A.517.517,0,0,1,6.751,5.966Zm9.583,3.593c0,.181-.022.53-.044.705a.578.578,0,0,1-.567.531H8.966a2.82,2.82,0,0,0,2.855,2.486,3.74,3.74,0,0,0,2.369-.819.608.608,0,0,1,.45-.148.465.465,0,0,1,.295.22l.583.907a.513.513,0,0,1-.065.819,5.708,5.708,0,0,1-3.762,1.256,5.046,5.046,0,0,1-5.1-5.331A5.083,5.083,0,0,1,11.67,4.874,4.572,4.572,0,0,1,16.334,9.559ZM11.627,6.937A2.411,2.411,0,0,0,9.087,8.97h4.874A2.23,2.23,0,0,0,11.627,6.937ZM26.8,5.679v9.55A4.407,4.407,0,0,1,22.071,20a5.486,5.486,0,0,1-3.53-1.284.564.564,0,0,1-.127-.7l.516-.948a.555.555,0,0,1,.365-.3.561.561,0,0,1,.474.114,3.622,3.622,0,0,0,2.259.905c1.078,0,2.364-.444,2.364-2.557v-.342a5.472,5.472,0,0,1-2.429.629,5.084,5.084,0,0,1-4.922-5.331,5.027,5.027,0,0,1,4.814-5.311,4.777,4.777,0,0,1,3.1,1.1l.2-.473c.053-.161.138-.415.473-.415h.582A.6.6,0,0,1,26.8,5.679ZM22.136,7.152a2.821,2.821,0,0,0-2.708,3.033,2.972,2.972,0,0,0,2.794,3.053,3.948,3.948,0,0,0,2.191-.74V8.468A2.834,2.834,0,0,0,22.136,7.152ZM29.965.6a1.544,1.544,0,0,0-1.538,1.582A1.55,1.55,0,0,0,29.965,3.74a1.571,1.571,0,1,0,0-3.141Zm.6,4.491H29.361a.6.6,0,0,0-.59.589v9.01a.59.59,0,0,0,.59.59h1.208a.6.6,0,0,0,.589-.59V5.679A.62.62,0,0,0,30.569,5.09Zm5.91,4c-1.059-.462-1.632-.815-1.632-1.36,0-.383.357-.769,1.155-.769a5.048,5.048,0,0,1,2.088.486.582.582,0,0,0,.8-.248l.345-.689a.709.709,0,0,0-.256-.882A5.713,5.713,0,0,0,36,4.874c-2.357,0-3.413,1.422-3.413,2.831,0,1.764,1.328,2.606,2.763,3.253,1.4.634,2.065,1.038,2.065,1.618,0,.528-.459.856-1.2.856a4.5,4.5,0,0,1-2.387-.7l-.034-.018a.644.644,0,0,0-.5-.076.494.494,0,0,0-.3.254l-.452.925a.517.517,0,0,0,.208.663h0a5.917,5.917,0,0,0,3.342,1.034c2.411,0,3.672-1.522,3.672-3.025C39.761,10.617,38.461,9.926,36.479,9.087Zm10.558,3.964a.556.556,0,0,0-.316-.335.523.523,0,0,0-.432.063,3.244,3.244,0,0,1-1.537.459c-.359,0-.681-.069-.681-.9V7.152h2.514a.605.605,0,0,0,.59-.59V5.679a.577.577,0,0,0-.59-.589H44.071V2.424a.574.574,0,0,0-.569-.59H42.273a.59.59,0,0,0-.589.59V5.09H40.657a.57.57,0,0,0-.59.589v.883a.59.59,0,0,0,.59.59h1.027v5.274c0,1.438.3,3.09,2.637,3.09a6.116,6.116,0,0,0,2.822-.729.556.556,0,0,0,.283-.721Zm8.023-7.61c-.263-.419-1.156-.567-1.905-.567a4,4,0,0,0-2.973,1.335l-.212-.686a.574.574,0,0,0-.544-.433h-.517a.6.6,0,0,0-.59.589v9.01a.59.59,0,0,0,.59.59H49.9c.321,0,.806,0,.806-.59V8.4A2.738,2.738,0,0,1,52.94,7.152a2.369,2.369,0,0,1,.853.182.548.548,0,0,0,.424.033.6.6,0,0,0,.336-.324l.517-1.077A.517.517,0,0,0,55.06,5.441Zm8.351,3.946v5.3a.605.605,0,0,1-.59.59H62.11c-.284,0-.412-.166-.516-.416l-.181-.509A4.386,4.386,0,0,1,58.4,15.516a3.2,3.2,0,0,1-3.328-3.435c0-2.021,1.611-3.327,4.1-3.327a7.7,7.7,0,0,1,1.892.265,2.3,2.3,0,0,0-.417-1.668A1.414,1.414,0,0,0,59.588,7a10.1,10.1,0,0,0-2.749.47.577.577,0,0,1-.7-.494l-.194-.82a.566.566,0,0,1,.4-.717A10.865,10.865,0,0,1,59.8,4.874C63.14,4.874,63.411,6.918,63.411,9.387Zm-4.06,1.149c-1.174,0-1.933.6-1.933,1.524a1.343,1.343,0,0,0,1.436,1.458,2.987,2.987,0,0,0,2.191-1.125V10.835A4.853,4.853,0,0,0,59.351,10.536Zm11.773,2.515a.556.556,0,0,0-.316-.335.523.523,0,0,0-.432.063,3.244,3.244,0,0,1-1.537.459c-.359,0-.681-.069-.681-.9V7.152h2.514a.605.605,0,0,0,.59-.59V5.679a.577.577,0,0,0-.59-.589H68.158V2.424a.574.574,0,0,0-.569-.59H66.36a.591.591,0,0,0-.59.59V5.09H64.744a.57.57,0,0,0-.59.589v.883a.591.591,0,0,0,.59.59H65.77v5.274c0,1.438.3,3.09,2.638,3.09a6.107,6.107,0,0,0,2.821-.729.556.556,0,0,0,.284-.721ZM74.2,5.09H72.994a.605.605,0,0,0-.591.589v9.01a.591.591,0,0,0,.591.59H74.2a.605.605,0,0,0,.59-.59V5.679A.621.621,0,0,0,74.2,5.09ZM73.6.6a1.543,1.543,0,0,0-1.538,1.582A1.55,1.55,0,0,0,73.6,3.74,1.571,1.571,0,1,0,73.6.6Zm12.869,9.563a5.341,5.341,0,0,1-5.182,5.354,5.323,5.323,0,1,1,5.182-5.354Zm-2.344,0a2.853,2.853,0,1,0-5.7,0,2.857,2.857,0,1,0,5.7,0Zm8.867-5.288a4.7,4.7,0,0,0-3.3,1.277l-.235-.671a.5.5,0,0,0-.522-.39h-.518a.6.6,0,0,0-.589.589v9.01a.6.6,0,0,0,.589.59h1.1c.469,0,.7-.192.7-.59V8.507A2.939,2.939,0,0,1,92.73,7.152c1.191,0,1.847.87,1.847,2.451v5.086a.6.6,0,0,0,.59.59h1.207a.605.605,0,0,0,.59-.59v-5C96.964,6.448,95.664,4.874,92.989,4.874Zm9.2,4.213c-1.059-.462-1.633-.815-1.633-1.36,0-.383.358-.769,1.156-.769a5.04,5.04,0,0,1,2.087.486.585.585,0,0,0,.8-.248l.344-.689a.709.709,0,0,0-.255-.882,5.718,5.718,0,0,0-2.974-.751C99.355,4.874,98.3,6.3,98.3,7.705c0,1.764,1.328,2.606,2.763,3.253,1.4.634,2.066,1.038,2.066,1.618,0,.528-.46.856-1.2.856a4.49,4.49,0,0,1-2.387-.7l-.034-.018A.633.633,0,0,0,99,12.64a.49.49,0,0,0-.3.253l-.452.925a.516.516,0,0,0,.209.663h0a5.923,5.923,0,0,0,3.342,1.034c2.411,0,3.673-1.522,3.673-3.025C105.472,10.617,104.172,9.926,102.19,9.087Z"}))},Services:function(e){var n=e.color,r=e.size;return t.createElement("svg",{id:"bd77a8f3-6992-4241-927e-9fdc3bf67b80","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",height:void 0===r?20:r,viewBox:"0 0 67.995 20"},t.createElement("title",null,"services-text"),t.createElement("path",{fill:n,d:"M7.277,12.49c0,1.5-1.262,3.026-3.672,3.026A5.924,5.924,0,0,1,.262,14.482h0a.521.521,0,0,1-.209-.663L.5,12.893a.5.5,0,0,1,.305-.254.62.62,0,0,1,.5.075l.036.019a4.479,4.479,0,0,0,2.385.7c.74,0,1.2-.328,1.2-.856,0-.582-.666-.985-2.066-1.618C1.432,10.311.105,9.469.105,7.705c0-1.41,1.055-2.832,3.413-2.832a5.717,5.717,0,0,1,2.974.752.7.7,0,0,1,.255.881L6.4,7.2a.58.58,0,0,1-.8.248,5.04,5.04,0,0,0-2.087-.485c-.8,0-1.155.386-1.155.768,0,.546.573.9,1.632,1.361C5.977,9.925,7.277,10.615,7.277,12.49ZM17.622,9.559c0,.178-.022.528-.044.7a.58.58,0,0,1-.568.532H10.255a2.818,2.818,0,0,0,2.854,2.485,3.734,3.734,0,0,0,2.369-.819.64.64,0,0,1,.451-.148.472.472,0,0,1,.294.22l.583.907a.513.513,0,0,1-.065.82,5.715,5.715,0,0,1-3.761,1.256,5.047,5.047,0,0,1-5.1-5.332,5.083,5.083,0,0,1,5.074-5.311A4.573,4.573,0,0,1,17.622,9.559ZM15.249,8.97a2.229,2.229,0,0,0-2.334-2.034,2.412,2.412,0,0,0-2.54,2.034Zm8.511-4.1a3.929,3.929,0,0,0-2.972,1.338l-.213-.688a.575.575,0,0,0-.544-.434h-.518a.6.6,0,0,0-.589.589v9.01a.6.6,0,0,0,.589.59h.992c.32,0,.8,0,.8-.59V8.4a2.74,2.74,0,0,1,2.235-1.249,2.351,2.351,0,0,1,.854.183.534.534,0,0,0,.424.032.584.584,0,0,0,.334-.323l.518-1.077a.517.517,0,0,0-.01-.525C25.4,5.022,24.509,4.873,23.76,4.873Zm11.569.216H34.36c-.288,0-.613,0-.774.348l-2.695,5.912L28.319,5.433a.545.545,0,0,0-.535-.344H26.469a.544.544,0,0,0-.493.238.489.489,0,0,0,.024.49l4.311,9.376a.6.6,0,0,0,.534.323h.13a.56.56,0,0,0,.514-.327L35.8,5.822a.49.49,0,0,0,.027-.5A.545.545,0,0,0,35.329,5.089Zm3.154,0H37.276a.6.6,0,0,0-.59.589v9.01a.6.6,0,0,0,.59.59h1.207a.605.605,0,0,0,.59-.59V5.678A.621.621,0,0,0,38.483,5.089ZM37.879.6A1.543,1.543,0,0,0,36.341,2.18a1.532,1.532,0,0,0,1.538,1.559,1.57,1.57,0,1,0,0-3.14Zm10.8,11.392a.567.567,0,0,0-.818.047c-.08.073-.16.152-.241.233a2.623,2.623,0,0,1-2.031.966,2.92,2.92,0,0,1-2.838-3.053,2.778,2.778,0,0,1,4.87-2.073c.165.164.444.443.806.11l.774-.71a.606.606,0,0,0,.1-.87,4.465,4.465,0,0,0-3.711-1.768,5.285,5.285,0,0,0-5.225,5.332,5.2,5.2,0,0,0,5.2,5.311,4.647,4.647,0,0,0,3.977-2.12c.13-.2.2-.5-.2-.866ZM59.784,9.559c0,.178-.022.528-.044.7a.58.58,0,0,1-.567.532H52.417a2.818,2.818,0,0,0,2.854,2.485,3.734,3.734,0,0,0,2.369-.819.641.641,0,0,1,.451-.148.472.472,0,0,1,.294.22l.583.907a.513.513,0,0,1-.065.82,5.712,5.712,0,0,1-3.761,1.256,5.047,5.047,0,0,1-5.1-5.332A5.083,5.083,0,0,1,55.12,4.873,4.573,4.573,0,0,1,59.784,9.559ZM52.537,8.97h4.874a2.229,2.229,0,0,0-2.334-2.034A2.412,2.412,0,0,0,52.537,8.97ZM64.4,9.087c-1.06-.462-1.633-.816-1.633-1.361,0-.382.357-.768,1.156-.768a5.047,5.047,0,0,1,2.087.485.58.58,0,0,0,.8-.248l.344-.689a.706.706,0,0,0-.256-.881,5.71,5.71,0,0,0-2.973-.752c-2.358,0-3.414,1.422-3.414,2.832,0,1.764,1.328,2.606,2.763,3.253,1.4.633,2.066,1.036,2.066,1.618,0,.528-.459.856-1.2.856a4.485,4.485,0,0,1-2.384-.7l-.037-.02a.632.632,0,0,0-.5-.075.493.493,0,0,0-.3.254l-.452.925a.521.521,0,0,0,.209.663h0a5.923,5.923,0,0,0,3.342,1.034c2.412,0,3.673-1.522,3.673-3.026C67.685,10.615,66.385,9.925,64.4,9.087Z"}))}};function lt(e){var n=e.appName,r=e.size;return ot[n]?t.createElement(ot[n],{color:e.color,size:void 0===r?20:r}):t.createElement("div",null,"appName not supported")}var st={transition:"background-color 120ms ease-in"},ct={fontFamily:"inherit"},ut={flex:"1 1 auto"},dt=["dot","dotFill","fill","style"],ht=["dark","id","style"],mt=["colors","style"],ft=["fill","size","style"],pt=["fill","style"],gt=["fill","style"],vt=function(e){var n=e.dot,r=void 0!==n&&n,a=e.dotFill,i=void 0===a?"#fff":a,o=e.fill,l=void 0===o?"#fff":o,s=e.style,c=Oe(e,dt),u=t.createElement("path",{d:"M21.482,16.626,19.1,13.649V9a7,7,0,0,0-14,0v4.649L2.478,16.929A1.89,1.89,0,0,0,3.952,20H9.285a2.983,2.983,0,0,0,5.633,0H19.86a2.077,2.077,0,0,0,1.622-3.374ZM19.86,18H4.182l2.7-3.375A1,1,0,0,0,7.1,14V9a5,5,0,0,1,10,0v5a1,1,0,0,0,.219.625l2.6,3.25Z",fill:"white"});return t.createElement("svg",Te({width:"24",height:"24",viewBox:"0 0 24 24",style:Te({display:"block"},s)},c,{stroke:"none"}),t.createElement("title",null,"bell"),t.createElement("defs",null,t.createElement("mask",{id:"mask-no-dot"},u),t.createElement("mask",{id:"mask-dot"},u,t.createElement("circle",{cx:"18",cy:"6",fill:"black",r:"7"}))),t.createElement("rect",{fill:l,height:"24",mask:r?"url(#mask-dot)":"url(#mask-no-dot",width:"24",x:"0",y:"0"}),r&&t.createElement("circle",{cx:"18",cy:"6",r:"4",fill:i||l}))},yt=function(e){var n=e.dark,r=void 0!==n&&n,a=e.id,i=void 0===a?"default":a,o=e.style,l=Oe(e,ht);return t.createElement("svg",Te({fill:"none",height:"123",style:Te({},o),width:"160"},l),t.createElement("g",{clipPath:"url(#clip-path-blank-state-"+i+")"},t.createElement("path",{opacity:".6",d:"M155.367 66.751c-6.081 17.955-18.824 33.158-32.579 41.991-14.045 8.977-28.96 11.294-46.19 7.529-16.941-3.764-33.738-11.583-47.638-18.968C15.204 89.63 4.344 82.533 1.593 71.385-1.013 60.525 4.78 45.61 18.68 30.842 32.435 16.362 54.3 2.896 80.362.579c25.919-2.606 49.666 6.082 63.276 18.534 13.901 12.597 17.666 29.828 11.729 47.638z",fill:r?"#414141":"#E1F0F9"}),t.createElement("g",{opacity:".2"},t.createElement("path",{opacity:".2",d:"M90.643 122.063c-9.702 0-19.258-2.606-29.25-7.674-12.741-6.66-26.352-16.796-41.41-30.841C8.832 72.688-.29 62.697 0 50.678c.145-8.542 5.503-17.81 14.914-26.352l1.448 1.593c-9.122 8.108-14.19 16.94-14.335 24.76-.29 11.294 8.543 20.85 19.403 31.42C36.344 96 49.81 105.992 62.263 112.508c13.031 6.805 25.629 8.977 38.371 6.516l.434 2.027c-3.475.724-6.95 1.013-10.425 1.013zM116.706 115.982l-.869-1.738c13.756-6.226 25.919-16.507 34.027-28.67l1.738 1.159c-8.254 12.453-20.706 22.878-34.896 29.249zM158.552 71.385l-2.027-.58c2.896-11.294.869-22.877-5.792-33.303-10.715-17.086-32-29.973-55.457-33.882-19.258-3.475-40.108-.29-58.642 8.688l-.869-1.883c18.824-9.122 40.109-12.307 59.8-8.832 24.037 3.91 45.901 17.23 56.906 34.75 7.095 11.005 9.267 23.023 6.081 35.042z",fill:"#BAC7D3"})),t.createElement("path",{d:"M115.258 20.706l-.145 4.199c0 .869.289 1.882 1.013 2.461l3.186 2.752c.724.724.29 1.882-.724 1.882l-4.199-.145c-.869 0-1.882.29-2.462 1.014l-2.896 3.33c-.724.724-1.882.29-1.882-.724l.145-4.199c0-.869-.29-1.882-1.014-2.462l-3.185-2.75c-.724-.725-.29-1.883.724-1.883l4.199.145c.869 0 1.882-.29 2.461-1.014l2.751-3.185c.724-.87 2.028-.435 2.028.579zM92.959 30.842v1.882c0 .434.144.869.579 1.158l1.448 1.159c.29.29.145.869-.29.869h-1.882c-.434 0-.869.144-1.158.579l-1.159 1.448c-.29.29-.869.145-.869-.29v-1.882c0-.435-.144-.869-.579-1.159l-1.448-1.158c-.29-.29-.145-.869.29-.869h1.882c.435 0 .869-.145 1.159-.579l1.158-1.448c.29-.434.869-.29.869.29z",fill:"#FCC846"}),t.createElement("path",{d:"M68.778 36.633l-19.982 57.63 57.919-20.127-37.937-37.502z",fill:"#48A5E5"}),t.createElement("path",{d:"M82.099 54.299H62.696l2.027-5.647h12.308l5.068 5.647zM99.91 70.082H57.194l2.027-5.648h33.737l6.95 5.648zM72.398 85.864H51.692l1.737-5.647h35.91l-16.941 5.647z",fill:"#79CAF2"}),t.createElement("path",{d:"M107.613 73.964c1.44-1.5-6.087-11.069-16.813-21.374-10.726-10.305-20.588-17.443-22.029-15.944-1.44 1.5 6.087 11.069 16.813 21.374 10.726 10.305 20.588 17.443 22.029 15.944z",fill:r?"#525252":"#636363"}),t.createElement("path",{d:"M113.086 55.747h-3.041c-.724 0-1.303.29-1.737.868l-1.883 2.607c-.434.579-1.448.29-1.448-.435l-.144-3.185c0-.724-.29-1.303-.869-1.738l-2.607-1.882c-.579-.434-.289-1.448.435-1.448l3.185-.145c.724 0 1.303-.29 1.738-.869l1.882-2.606c.435-.58 1.448-.29 1.448.434l.145 3.186c0 .724.29 1.303.869 1.738l2.606 1.882c.579.58.29 1.593-.579 1.593z",fill:"#FCC846"})),t.createElement("defs",null,t.createElement("clipPath",{id:"clip-path-blank-state-"+i},t.createElement("path",{fill:"#fff",d:"M0 0h160v122.063H0z"}))))},Et=function(e){var n=e.colors,r=e.style,a=Oe(e,mt);return t.createElement("svg",Te({color:n.base3,height:"16",viewBox:"0 0 16 16",width:"16"},{style:r},a),t.createElement("title",null,"chevron"),t.createElement("polygon",{fill:"currentColor",points:"11.931 4.892 8 8.824 4.069 4.892 2.927 6.034 8 11.108 9.142 9.966 13.073 6.034 11.931 4.892"}))},wt=function(e){var n=e.fill,r=void 0===n?"#000":n,a=e.size,i=void 0===a?24:a,o=e.style,l=Oe(e,ft);return t.createElement("svg",Te({height:i,style:Te({display:"block"},o),viewBox:"0 0 16 16",width:i},l),t.createElement("title",null,"exclamation triangle icon"),t.createElement("path",{d:"M15.669 13.676L8.65499 1.56099C8.58867 1.44593 8.49322 1.35037 8.37823 1.28392C8.26325 1.21748 8.13279 1.1825 7.99999 1.1825C7.86718 1.1825 7.73672 1.21748 7.62174 1.28392C7.50675 1.35037 7.4113 1.44593 7.34499 1.56099L0.330986 13.676C0.264196 13.7911 0.228916 13.9217 0.2287 14.0548C0.228484 14.1878 0.26334 14.3186 0.329756 14.4339C0.396172 14.5492 0.491802 14.6449 0.60701 14.7115C0.722218 14.778 0.852933 14.813 0.985986 14.813H15.014C15.147 14.813 15.2778 14.778 15.393 14.7115C15.5082 14.6449 15.6038 14.5492 15.6702 14.4339C15.7366 14.3186 15.7715 14.1878 15.7713 14.0548C15.7711 13.9217 15.7358 13.7911 15.669 13.676ZM8.75699 12.542H7.24299V11.028H8.75699V12.542ZM8.75699 9.51399H7.24299V6.48499H8.75699V9.51399Z",fill:r}))},bt=function(e){var n=e.fill,r=void 0===n?"#000":n,a=e.style,i=Oe(e,pt);return t.createElement("svg",Te({width:"24",height:"24",viewBox:"0 0 24 24",style:Te({display:"block"},a)},i),t.createElement("title",null,"search spyglass icon"),t.createElement("path",{d:"M17.352,15.481a8.517,8.517,0,1,0-2.209,2.033l4.642,4.642,2.121-2.121Zm-6.757,1.364a6.5,6.5,0,1,1,6.5-6.5A6.508,6.508,0,0,1,10.595,16.845Z",fill:r}))},kt=function(e){var n=e.fill,r=void 0===n?"#A0A0A0":n,a=e.style,i=Oe(e,gt);return t.createElement("svg",Te({width:"16",height:"16",viewBox:"0 0 16 16",style:Te({display:"block"},a)},i),t.createElement("title",null,"close-x"),t.createElement("path",{d:"M9.142,8l3.814,3.814-1.142,1.142L8,9.142,4.186,12.956,3.044,11.814,6.858,8,3.044,4.186,4.186,3.044,8,6.858l3.814-3.814,1.142,1.142Z",fill:r}))},_t=["style"];function Ct(e){var n=e.style,r=Oe(e,_t);return t.createElement("button",Te({style:Te({WebkitAppearance:"none",appearance:"none",backgroundColor:"transparent",border:"none",cursor:"pointer",display:"inline-block",outline:0,padding:0},ct,n)},r))}var xt=["appName","colors","displayIconOnly","expanded","onClick","style"],St=function(e){var n=e.appName,r=e.colors,a=e.displayIconOnly,i=e.expanded,o=e.onClick,l=e.style,s=void 0===l?null:l,c=Oe(e,xt),u=t.useState(!1),d=u[0],h=u[1],m=t.useState(!1),f=m[0],p=m[1];return t.createElement(Ct,Te({onClick:o,onMouseDown:function(){return h(!0)},onMouseEnter:function(){return p(!0)},onMouseLeave:function(){return p(!1)},onMouseUp:function(){return h(!1)},style:Te({alignItems:"center",backgroundColor:i&&!d?r.base1:f&&d?r.base2:f?r.base1:"transparent",display:"flex",height:"100%",outline:0,paddingLeft:"16px",paddingRight:"16px",whiteSpace:"nowrap"},st,s)},c),t.createElement(it,{appName:n.replace(/[\s-]/,""),colors:r,size:24}),!a&&t.createElement(t.Fragment,null,"Accounts"===n?t.createElement("div",{style:{color:"#fff",fontSize:"14px",fontWeight:500,marginLeft:3}},"Account settings"):t.createElement(t.Fragment,null,t.createElement("div",{key:"spacer-1",style:{margin:4}}),t.createElement(lt,{appName:n.replace(/[\s-]/,""),color:"#fff",key:"mono-app-name",size:24})),t.createElement("div",{key:"space-2",style:{margin:4}}),t.createElement(Et,{colors:r,key:"disclosure-chevron-icon",style:{display:"block"}})))},Mt={__proto__:null,Accounts:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"2e1ed2e7-b842-4126-8f57-f6b6dd63ddb6",x1:"1.844",y1:"1.833",x2:"18.622",y2:"18.612",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#32a0f0"}),t.createElement("stop",{offset:"1",stopColor:"#3f75e5"}))),t.createElement("title",{key:"title"},"accounts-squircle"),t.createElement("path",{key:"path",d:"M19.96,10c0,7.962-1.991,9.952-9.952,9.952S.056,17.959.056,10,2.047.045,10.008.045,19.96,2.036,19.96,10Z",fill:"url(#2e1ed2e7-b842-4126-8f57-f6b6dd63ddb6)"})]},API:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"c8ec303e-a96d-4850-93ae-70864e3306bb",x1:"0.991",y1:"0.983",x2:"19.295",y2:"19.288",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#32a0f0"}),t.createElement("stop",{offset:"1",stopColor:"#3f75e5"}))),t.createElement("title",{key:"title"},"api-squircle"),t.createElement("path",{key:"path",d:"M20,10c0,7.991-2,9.989-9.989,9.989S.019,17.991.019,10s2-9.989,9.989-9.989S20,2.009,20,10Z",fill:"url(#c8ec303e-a96d-4850-93ae-70864e3306bb)"})]},Calendar:function(){return[t.createElement("defs",{key:"defs"},t.createElement("linearGradient",{id:"calendar-gradient",x1:"2.05",y1:"2.04",x2:"17.97",y2:"17.96",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#f25437"}),t.createElement("stop",{offset:"1",stopColor:"#cd4e39"}))),t.createElement("title",{key:"title"},"calendar-squircle"),t.createElement("path",{key:"path",d:"M20,10c0,8-2,10-10,10S.06,18,.06,10,2.05.05,10,.05,20,2,20,10Z",fill:"url(#calendar-gradient)"})]},CheckIns:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"679bc2bf-38c8-45ab-9ee3-a2ff814fead7",x1:"1.75",y1:"1.739",x2:"18.156",y2:"18.145",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#a76ebe"}),t.createElement("stop",{offset:"1",stopColor:"#875e96"}))),t.createElement("title",{key:"title"},"check-ins-squircle"),t.createElement("path",{key:"path",d:"M10.008.045C2.047.045.056,2.036.056,10s1.991,9.952,9.952,9.952S19.96,17.959,19.96,10,17.969.045,10.008.045Z",fill:"url(#679bc2bf-38c8-45ab-9ee3-a2ff814fead7)"})]},ChurchCenter:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"6de99831-a6f8-498e-9bf3-9d55c8d887fa",x1:"2.04",y1:"2.029",x2:"17.976",y2:"17.965",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#42a5f5"}),t.createElement("stop",{offset:"1",stopColor:"#66bb6a"}))),t.createElement("title",{key:"title"},"church-center-squircle"),t.createElement("path",{key:"path",d:"M10.008.037C2.04.037.048,2.029.048,10s1.992,9.96,9.96,9.96,9.96-1.992,9.96-9.96S17.976.037,10.008.037Z",fill:"url(#6de99831-a6f8-498e-9bf3-9d55c8d887fa)"})]},Giving:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"0aae6372-b733-476d-af45-8777c08c1e24",x1:"2.047",y1:"2.036",x2:"17.969",y2:"17.959",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#f5c426"}),t.createElement("stop",{offset:"1",stopColor:"#f2b327"}))),t.createElement("title",{key:"title"},"giving-squircle"),t.createElement("path",{key:"path",d:"M10.008.045C2.047.045.056,2.036.056,10s1.991,9.952,9.952,9.952S19.96,17.959,19.96,10,17.969.045,10.008.045Z",fill:"url(#0aae6372-b733-476d-af45-8777c08c1e24)"})]},Groups:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"86d10072-1c7f-4a02-88fe-0735565ae99a",x1:"1.939",y1:"1.928",x2:"18.146",y2:"18.135",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#ff962d"}),t.createElement("stop",{offset:"1",stopColor:"#fc7638"}))),t.createElement("title",{key:"title"},"groups-squircle"),t.createElement("path",{key:"path",d:"M19.96,10c0,7.962-1.991,9.952-9.952,9.952S.056,17.959.056,10,2.047.045,10.008.045,19.96,2.036,19.96,10Z",fill:"url(#86d10072-1c7f-4a02-88fe-0735565ae99a)"})]},Home:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"paint0_linear_1_2",x1:"-2.23242",y1:"0.320978",x2:"19.9609",y2:"22.5228",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#289DFF"}),t.createElement("stop",{offset:"1",stopColor:"#2266F7"}))),t.createElement("title",{key:"title"},"home-squircle"),t.createElement("path",{key:"path",d:"M9.99962 0C1.99854 0 0 2.00015 0 10C0 17.9998 1.99854 20 9.99962 20C18.0007 20 20 18.0014 20 10C20 1.99862 17.9999 0 9.99962 0Z",fill:"url(#paint0_linear_1_2)"})]},People:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"7f805f16-2322-4b42-b61a-2bf71eadb25a",x1:"2.047",y1:"2.036",x2:"17.969",y2:"17.958",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#32a0f0"}),t.createElement("stop",{offset:"1",stopColor:"#3f75e5"}))),t.createElement("title",{key:"title"},"people-squircle"),t.createElement("path",{key:"path",d:"M19.96,10c0,7.962-1.991,9.952-9.952,9.952S.056,17.959.056,10,2.047.045,10.008.045,19.96,2.036,19.96,10Z",fill:"url(#7f805f16-2322-4b42-b61a-2bf71eadb25a)"})]},Publishing:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"publishing-gradient",x1:"2.047",y1:"2.036",x2:"17.969",y2:"17.958",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#787882"}),t.createElement("stop",{offset:"1",stopColor:"#5f5f69"})),t.createElement("linearGradient",{id:"publishing-gradient-2",x1:"2.03",y1:"2.03",x2:"17.952",y2:"17.952",gradientTransform:"translate(2.563 -2.028) rotate(13.283)",xlinkHref:"#publishing-gradient"})),t.createElement("title",{key:"title"},"publishing-squircle"),t.createElement("path",{d:"M19.96,10c0,7.962-1.991,9.952-9.952,9.952S.056,17.959.056,10,2.047.045,10.008.045,19.96,2.036,19.96,10Z",fill:"url(#publishing-gradient)",key:"path"}),t.createElement("circle",{cx:"9.991",cy:"9.991",r:"9.951",transform:"translate(-2.028 2.563) rotate(-13.283)",fill:"url(#publishing-gradient-2)",key:"circle"})]},Registrations:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"bd67604d-f11c-4431-bd82-159c57241115",x1:"2.047",y1:"2.036",x2:"17.969",y2:"17.958",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#41b99e"}),t.createElement("stop",{offset:"1",stopColor:"#46948d"}))),t.createElement("title",{key:"title"},"registrations-squircle"),t.createElement("path",{key:"path",d:"M19.96,10c0,7.962-1.991,9.952-9.952,9.952S.056,17.959.056,10,2.047.045,10.008.045,19.96,2.036,19.96,10Z",fill:"url(#bd67604d-f11c-4431-bd82-159c57241115)"})]},Services:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"00f9217c-0536-41ea-b265-a8689874be71",x1:"2.04",y1:"2.029",x2:"17.976",y2:"17.965",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#6eaa50"}),t.createElement("stop",{offset:"1",stopColor:"#6a9639"}))),t.createElement("title",{key:"title"},"services-squircle"),t.createElement("path",{key:"path",d:"M19.968,10c0,7.968-1.992,9.96-9.96,9.96S.048,17.965.048,10,2.04.037,10.008.037,19.968,2.029,19.968,10Z",fill:"url(#00f9217c-0536-41ea-b265-a8689874be71)"})]}};function At(e){var n=e.appName,r=e.size,a=void 0===r?20:r;return t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 20 20",style:{display:"block"}},t.createElement(Mt[n]?Mt[n]:"span",{key:"key1"}),nt[n]?t.createElement(nt[n],{color:"#fff",key:"key2"}):t.createElement("div",{key:"key3"},"appName not supported"))}function Tt(e){var t,n,r,a="/apps/"+e.toLowerCase(),i=null==(t=window)||null==(n=t.location)||null==(r=n.pathname)?void 0:r.toString();if(!i)return a;var o=new URLSearchParams;return o.append("referer",i),a+"?"+o.toString()}var Nt=["active","component","style"],Dt=function(e){var n=e.active,r=void 0!==n&&n,a=e.component,i=void 0===a?"span":a,o=e.style,l=void 0===o?null:o,s=Oe(e,Nt),c=t.useState(!1),u=c[1];return t.createElement(i,Te({onMouseEnter:function(){return u(!0)},onMouseLeave:function(){return u(!1)},style:Te({},l,{backgroundColor:r?"#ededed":c[0]?"#f7f7f7":"transparent"})},s))},Pt=["cleanup","onOutsideClick","visible"],Ot=/*#__PURE__*/function(e){function n(t){var n;return(n=e.call(this,t)||this).container=void 0,n.handleOutsideClick=n.handleOutsideClick.bind(Ve(n)),n}Ne(n,e);var r=n.prototype;return r.componentWillUnmount=function(){document.removeEventListener("click",this.handleOutsideClick,!0)},r.handleOutsideClick=function(e){if(!this.container.contains(e.target))return e.stopPropagation(),e.preventDefault(),this.props.onOutsideClick()},r.render=function(){var e=this,n=this.props,r=n.cleanup,a=Oe(n,Pt);return r?document.removeEventListener("click",this.handleOutsideClick,!0):document.addEventListener("click",this.handleOutsideClick,!0),t.createElement("div",Te({ref:function(t){return e.container=t}},a))},n}(t.Component),Vt=["style"],Ht=function(e){var n=e.style,r=void 0===n?null:n,a=Oe(e,Vt);return t.createElement("div",Te({style:Te({alignSelf:"flex-end",display:"flex",position:"relative"},r)},a))},zt=["component","style"],Yt=function(e){var n=e.component,r=void 0===n?"div":n,a=e.style,i=void 0===a?null:a,o=Oe(e,zt);return t.createElement(r,Te({style:Te({background:"#FFFFFF",borderRadius:"3px",boxShadow:"0 0 0 1px #D4D9E2, 0 8px 32px rgba(0,0,0,.3)",overflow:"hidden",position:"absolute"},i)},o))},Lt=function(e){var n=e.appName,r=e.apps,a=e.env,i=e.toggle,o=e.visible,l=r.find(function(e){return"Accounts"===e.name}),s=r.find(function(e){return"Home"===e.name}),c=[].concat(r).filter(function(e){var t=e.name;return"Home"!==t&&"Accounts"!==t}).sort(function(e,t){return e.name.localeCompare(t.name)}),d=Te({},ct,{alignItems:"center",display:"flex",height:"48px",overflow:"hidden",padding:"0 16px",verticalAlign:"middle"});return t.createElement(Ht,null,t.createElement(Yt,{cleanup:!o,component:Ot,onOutsideClick:i,style:Te({marginTop:"8px"},o?{opacity:1,transition:"none",visibility:"visible"}:{opacity:0,transition:"all 120ms ease-in",visibility:"hidden"})},t.createElement("menu",{"data-pendo":"app-switcher",style:{margin:0,minWidth:180,padding:0}},s&&t.createElement(Dt,{component:"a","data-pendo":"app-switcher--change-app--"+s.name,"data-turbolinks":!1,href:n===s.name?u(a)("accounts")+"/apps/"+n:u(a)("accounts")+Tt(s.name),style:Te({},d,{borderBottom:"1px solid #ededed"})},t.createElement("div",{style:{marginRight:"6px"}},t.createElement(At,{appName:"Home",size:20})),t.createElement(lt,{appName:"Home",color:"#444",size:18})),c.map(function(e,r){var i=e.name,o=0===r,l=r===c.length-1;return t.createElement(Dt,{component:"a","data-pendo":"app-switcher--change-app--"+i,"data-turbolinks":!1,href:i===n?u(a)("accounts")+"/apps/"+i.toLowerCase():u(a)("accounts")+Tt(i),key:i,style:Te({},d,{height:"40px",paddingBottom:l?"4px":null,paddingTop:o?"4px":null})},t.createElement("div",{style:{marginRight:"6px"}},t.createElement(At,{appName:i.replace(/[\s-]/,""),size:20})),t.createElement(lt,{appName:i.replace(/[\s-]/,""),color:"#444",size:18}))}),l&&t.createElement(Dt,{component:"a","data-pendo":"app-switcher--change-app--"+l.name,"data-turbolinks":!1,href:u(a)("accounts")+Tt(l.name),style:Te({},d,{borderTop:"1px solid #ededed",padding:"0 12px",textDecoration:"none"})},t.createElement("svg",{height:22,style:{display:"block",marginRight:"2px"},viewBox:"0 0 20 20",width:22,xmlns:"http://www.w3.org/2000/svg"},t.createElement(tt,{color:"#9e9e9e",key:"key2"})),t.createElement("div",{style:{color:"#737373",fontSize:"12px",lineHeight:"28px"}},"Account settings")))))},Rt=function(e){return(t="name",function(e){return e.slice().sort(function(e,n){return e[t].localeCompare(n[t])})})(e).reduce(function(e,t){return"Church Center"===(t.name||"")||"API"===(t.name||"")?e:"Home"===t.name?[t].concat(e):[].concat(e,[t])},[]);var t},Zt=function(e){return e.slice().sort(function(e,t){return e.attributes.organization_name.localeCompare(t.attributes.organization_name)})},It=function(e){return void 0===e&&(e=function(e){return e}),d(Ge.subscribe,function(){return e(Ge.getState())})},Wt=["children","style"];function Ft(e){var n=e.children,r=e.style,a=Oe(e,Wt);return t.createElement("nav",Te({className:"simple","data-pendo":"topbar","aria-label":"topbar-navigation",style:Te({MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",alignItems:"center",color:"white",display:"flex",height:"48px",position:"relative"},r)},a),t.createElement("style",null,"\n @media only print {\n .simple {\n display: none !important;\n }\n }\n "),n)}var Ut={danger43:"hsl(8 60% 43%)",danger45:"hsl(8 60% 45%)",danger47:"hsl(8 60% 47%)",danger93:"hsl(9 59% 93%)",danger97:"hsl(7 60% 97%)",darkNeutral07:"hsl(0 0% 7%)",darkNeutral12:"hsl(0 0% 12%)",darkNeutral15:"hsl(0 0% 15%)",darkNeutral17:"hsl(0 0% 17%)",darkNeutral19:"hsl(0 0% 19%)",darkNeutral24:"hsl(0 0% 24%)",darkNeutral32:"hsl(0 0% 32%)",darkNeutral50:"hsl(0 0% 50%)",darkNeutral68:"hsl(0 0% 68%)",darkNeutral88:"hsl(0 0% 88%)",darkNeutral98:"hsl(0 0% 98%)",interaction45:"hsl(221 75% 45%)",interaction50:"hsl(221 91% 50%)",interaction55:"hsl(221 91% 55%)",interaction66:"hsl(221 91% 66%)",interaction91:"hsl(221 91% 91%)",interaction93:"hsl(221 91% 93%)",interaction97:"hsl(221 89% 97%)",lightNeutral12:"hsl(0 0% 12%)",lightNeutral24:"hsl(0 0% 24%)",lightNeutral45:"hsl(0 0% 45%)",lightNeutral62:"hsl(0 0% 62%)",lightNeutral81:"hsl(0 0% 81%)",lightNeutral88:"hsl(0 0% 88%)",lightNeutral93:"hsl(0 0% 93%)",lightNeutral95:"hsl(0 0% 95%)",lightNeutral97:"hsl(0 0% 97%)",lightNeutral98:"hsl(0 0% 98%)",lightNeutral100:"hsl(0 0% 100%)",success23:"hsl(86 91% 23%)",success25:"hsl(86 91% 25%)",success27:"hsl(86 91% 27%)",success91:"hsl(95 50% 91%)",success97:"hsl(93 53% 97%)",warning20:"hsl(42 100% 20%)",warning49:"hsl(42 84% 49%)",warning55:"hsl(42 84% 55%)",warning63:"hsl(42 84% 63%)",warning94:"hsl(42 84% 94%)",warning97:"hsl(42 84% 97%)"},jt=["style"],Bt=function(e){var n=e.style,r=void 0===n?null:n,a=Oe(e,jt);return t.createElement("div",Te({style:Te({alignSelf:"flex-end",display:"flex",position:"relative"},r)},a))},Gt=function(e){var n=e.appName,r=e.connectedPeople,a=e.hasConnectedPeople,i=e.requestClearAppsCache,o=e.requestClearConnectedPeopleCache,l=e.requestSwitchConnectedPerson,s=e.requestUnlinkConnectedPeople,c=e.setUserMenuVisible,d=e.userMenuVisible,y=u(e.env)("login")+"/logout";return t.createElement(Bt,null,t.createElement(Yt,{component:Ot,onOutsideClick:function(){return c(!1)},cleanup:!d,style:Te({color:"#525252",marginTop:"8px",maxHeight:"75vh",maxWidth:"320px",minWidth:"242px",overflow:"auto",right:0},d?{opacity:1,transition:"none",visibility:"visible"}:{opacity:0,transition:"all 120ms ease-in",visibility:"hidden"},{cursor:"default"})},t.createElement("div",null,a?t.createElement("div",{style:{alignItems:"center",backgroundColor:"#eee",display:"flex",lineHeight:"32px",padding:"0 16px"}},t.createElement("div",{style:Te({},ut,{color:"#666",fontSize:"12px",textTransform:"uppercase",whiteSpace:"nowrap"},ct)},"Linked Accounts"),t.createElement("div",{style:Te({},ut,{alignItems:"center",fontSize:"12px",textAlign:"right"})},t.createElement("a",{href:"",onClick:function(e){i(),o(),s(),e.preventDefault()},style:Te({color:"#666",marginLeft:"64px",textDecoration:"none"},ct)},"unlink"))):t.createElement("noscript",null),t.createElement("style",null,"\n .NotSmallTopbar__connected-people-list > *:first-child > * { border-top-width: 0 !important }\n "),t.createElement("ul",{className:"NotSmallTopbar__connected-people-list",style:{listStyleType:"none",margin:0,padding:0}},Zt(r).map(function(e){var r=e.id,a=e.attributes;return t.createElement(Dt,{component:"li",key:r},t.createElement("a",{href:"",onClick:function(e){i(),o(),l(r,n+"/"),e.preventDefault()},style:Te({borderTop:"1px solid #ddd",color:"#444",display:"block",lineHeight:"48px",overflow:"hidden",paddingLeft:"16px",paddingRight:"16px",textDecoration:"none",textOverflow:"ellipsis",whiteSpace:"nowrap"},ct)},a.organization_name))}))),t.createElement(h,null,a&&t.createElement(m,null),t.createElement("form",{method:"POST",action:y},t.createElement(f,{"data-turbolinks":!1,hover:{backgroundColor:Ut.lightNeutral97},onClick:function(){i(),o()},style:{padding:0},theme:!1,type:"submit",width:"100%"},t.createElement(p,{distribution:"space-between",alignment:"center",axis:"horizontal",grow:1,paddingHorizontal:2,paddingVertical:1.5,spacing:4},t.createElement(g,{color:Ut.lightNeutral45,lineHeight:"24px"},"Log out"),t.createElement(v,{name:"general.intoBox",fill:Ut.lightNeutral45})))))))},qt=["active","component","hover","innerRef","style"],Jt=function(e){var n=e.active,r=void 0===n?null:n,a=e.component,i=void 0===a?"div":a,o=e.hover,l=void 0===o?null:o,s=e.innerRef,c=void 0===s?null:s,u=e.style,d=void 0===u?null:u,h=Oe(e,qt),m=t.useState(!1),f=m[0],p=m[1],g=t.useState(!1),v=g[1];return t.createElement(i,Te({onMouseDown:function(){return p(!0)},onMouseEnter:function(){return v(!0)},onMouseLeave:function(){return v(!1)},onMouseUp:function(){return p(!1)},style:Te({},ct,d,g[0]&&l,f&&r)},c&&{ref:c},h))},$t=function(e){var n=e.colors,r=e.orgName,a=e.requestConnectedPeopleFetch,i=e.setUserMenuVisible,o=e.showOrgName;return t.createElement("div",{style:{cursor:"pointer",marginLeft:"16px",position:"relative",whiteSpace:"nowrap"},"data-pendo":"topbar-org-switcher"},t.createElement(Jt,{component:"button",type:"button",style:Te({WebkitAppearance:"none",alignItems:"center",appearance:"none",backgroundColor:n.base1,border:"none",borderRadius:"9999px",color:n.text||"#fff",cursor:"pointer",display:"flex",fontSize:"13px",lineHeight:"32px",outline:0,padding:0},st),active:{backgroundColor:n.base3},hover:{backgroundColor:n.base2},onClick:function(){i(function(e){return!e}),a()}},t.createElement("div",{style:{marginLeft:8}}),o?t.createElement("div",{style:{fontSize:"13px",margin:"0 8px 0 8px",maxWidth:"240px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},r):t.createElement("div",{style:{margin:"0 4px 0 4px"}}),t.createElement("div",{style:{paddingRight:"8px"}},t.createElement(Et,{colors:n,style:{margin:"-3px"}}))))},Qt=["active","colors","style"],Xt=function(e){var n=t.useState(!1),r=n[0],a=n[1],i=t.useState(!0),o=i[0],l=i[1],s=t.useState(!1),c=s[0],u=s[1],d=It(),h=d.hasConnectedPeople,m=d.notificationsEnabled;return t.createElement(Ft,{style:Te({paddingLeft:"8px",paddingRight:"16px"},e.style)},t.createElement(Lt,{env:e.env,appName:e.appName,apps:Rt(e.apps),visible:r,toggle:function(){return a(function(e){return!e})}}),t.createElement(St,{colors:e.colors,expanded:r,onClick:function(){a(function(e){return!e}),e.requestAppsFetch()},appName:e.appName}),t.createElement("div",{style:{margin:"12px"}}),o&&e.routes,t.createElement("div",{style:{margin:"auto"}}),!m&&e.notifications(),e.search({hideRoutes:function(){return l(!1)},showRoutes:function(){return l(!0)}}),t.createElement($t,{colors:e.colors,orgName:e.orgName,requestConnectedPeopleFetch:e.requestConnectedPeopleFetch,setUserMenuVisible:u,showOrgName:e.showOrgName}),t.createElement(Gt,{appName:e.appName,hasConnectedPeople:h,connectedPeople:e.connectedPeople,env:e.env,requestClearAppsCache:e.requestClearAppsCache,requestClearConnectedPeopleCache:e.requestClearConnectedPeopleCache,requestSwitchConnectedPerson:e.requestSwitchConnectedPerson,requestUnlinkConnectedPeople:e.requestUnlinkConnectedPeople,setUserMenuVisible:u,userMenuVisible:c}))};Xt.defaultProps={notifications:function(){return null},search:function(){return null},showOrgName:!0,useDummyNotifications:!1};var Kt=function(e){var n=e.active,r=e.colors,a=e.style,i=void 0===a?null:a,o=Oe(e,Qt),l=t.useState(!1),s=l[0],c=l[1],u=t.useState(!1),d=u[1];return t.createElement("a",Te({style:Te({backgroundColor:s&&u[0]?r.base2:s||n?r.base1:"transparent",borderRadius:"9999px",color:r.text||"#fff",fontSize:"14px",fontWeight:600,lineHeight:"32px",marginRight:"4px",paddingLeft:"12px",paddingRight:"12px",textDecoration:"none",textTransform:"capitalize",verticalAlign:"middle",whiteSpace:"nowrap"},ct,st,i),onMouseEnter:function(){return c(!0)},onMouseLeave:function(){return c(!1)},onMouseDown:function(){return d(!0)},onMouseUp:function(){return d(!1)}},o))},en=["style"],tn=["children","className","colors","style"],nn=/*#__PURE__*/function(e){function n(t){var n;return(n=e.call(this,t)||this).state={announcements:t.initialAnnouncements},n}Ne(n,e);var r=n.prototype;return r.dismissAnnouncements=function(e){return this.setState(function(t){var n=t.announcements,r=n;return n[e]&&delete r[e],{announcements:r}}),Le(this.props.configuredFetch,u(this.props.env)("api")+"/people/v2/me/platform_notifications/"+e+"/dismiss",{method:"POST"})},r.render=function(){return t.createElement(t.Fragment,null,this.props.children({announcements:this.props.formatter(this.state.announcements)},{dismissAnnouncements:this.dismissAnnouncements.bind(this)}))},n}(t.Component);nn.defaultProps={formatter:function(e){return function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}(e).map(function(e){return{data:e[1],id:e[0]}})}};var rn=/*#__PURE__*/function(e){function n(){return e.apply(this,arguments)||this}return Ne(n,e),n.prototype.render=function(){var e=this.props,n=e.style,r=Oe(e,en);return t.createElement(Ke,{render:function(e){return t.createElement("div",Te({style:Te({alignItems:"center",display:"flex",justifyContent:"space-between",paddingBottom:14,paddingLeft:-1!==["xs","sm"].indexOf(e)?16:24,paddingRight:18,paddingTop:14},n)},r))}})},n}(t.Component),an=/*#__PURE__*/function(e){function n(){return e.apply(this,arguments)||this}return Ne(n,e),n.prototype.render=function(){var e=this.props,n=e.children,r=e.colors,a=e.style,i=Oe(e,tn);return t.createElement("div",Te({className:["__Topbar_PlatformAnnouncements_link"].join(" ").trim(),style:Te({backgroundColor:"#282828",color:"white",fontSize:"14px"},a)},i),t.createElement("style",null,"\n .__Topbar_PlatformAnnouncements_link { color: white }\n .__Topbar_PlatformAnnouncements_link a { color: "+r.base0+" }\n .__Topbar_PlatformAnnouncements_link a:hover { color: "+r.base1+" }\n .__Topbar_PlatformAnnouncements_link a:active { color: "+r.base2+" }\n "),n)},n}(t.Component),on=/*#__PURE__*/function(e){function n(){return e.apply(this,arguments)||this}return Ne(n,e),n.prototype.render=function(){var e=this;return t.createElement(an,{colors:this.props.colors},t.createElement(nn,{env:this.props.env,initialAnnouncements:this.props.data,configuredFetch:this.props.configuredFetch},function(n,r){return Boolean(n.announcements.length>0)?t.createElement("div",null,n.announcements.map(function(t){return e.props.renderItem({actions:r,announcement:t})})):null}))},n}(t.Component);function ln(e){var n=Te({},(Pe(e),e));return t.createElement("button",Te({type:"button",style:{WebkitAppearance:"none",backgroundColor:"transparent",borderWidth:0,cursor:"pointer",margin:-8,padding:8}},n),t.createElement(kt,{fill:"white",style:{height:20,width:20}}))}function sn(e){return t.createElement(rn,null,t.createElement("span",{dangerouslySetInnerHTML:{__html:e.html}}),t.createElement(ln,{onClick:e.onClick}))}on.defaultProps={configuredFetch:ze,renderItem:function(e){var n=e.announcement,r=e.actions;return t.createElement(sn,{key:n.id,html:n.data.html,onClick:function(){return r.dismissAnnouncements(n.id)}})}};var cn=["colors","html","onClick"],un=["children","className","colors","style"],dn=["style"];function hn(e){var n=e.colors,r=e.html,a=void 0===r?"":r,i=e.onClick,o=void 0===i?function(e){}:i,l=Oe(e,cn),s=t.useState(!1),c=s[1];return s[0]||!a?null:t.createElement(mn,Te({colors:n},l),t.createElement(fn,null,t.createElement("span",{dangerouslySetInnerHTML:{__html:a}}),t.createElement(pn,{onClick:function(e){o(e),c(!0)}})))}var mn=/*#__PURE__*/function(e){function n(){return e.apply(this,arguments)||this}return Ne(n,e),n.prototype.render=function(){var e=this.props,n=e.children,r=e.className,a=e.colors,i=e.style,o=Oe(e,un);return t.createElement("div",Te({className:["Topbar_ProductAnnouncement",r].filter(Boolean).join(" ").trim(),style:Te({backgroundColor:a.base1},i)},o),t.createElement("style",null,"\n .Topbar_ProductAnnouncement {\n color: white;\n font-size: 14px;\n }\n .Topbar_ProductAnnouncement a { color: white; font-weight: bold; }\n "),n)},n}(t.Component),fn=/*#__PURE__*/function(e){function n(){return e.apply(this,arguments)||this}return Ne(n,e),n.prototype.render=function(){var e=this.props,n=e.style,r=Oe(e,dn);return t.createElement(Ke,{render:function(e){return t.createElement("div",Te({style:Te({alignItems:"center",boxSizing:"border-box",display:"flex",justifyContent:"space-between",paddingBottom:14,paddingLeft:-1!==["xs","sm"].indexOf(e)?16:24,paddingRight:18,paddingTop:14},n)},r))}})},n}(t.Component);function pn(e){var n=Te({},(Pe(e),e));return t.createElement("button",Te({type:"button",style:{WebkitAppearance:"none",backgroundColor:"transparent",borderWidth:0,cursor:"pointer",margin:-8,padding:8}},n),t.createElement(kt,{fill:"white",style:{height:20,width:20}}))}var gn=["env","url","style"];function vn(e){var n=e.env,r=e.url,a=void 0===r?"":r,i=e.style,o=Oe(e,gn),l=a||u(n)("people")+"/static/no_photo_thumbnail_gray.svg";return t.createElement("div",Te({style:Te({backgroundColor:"white",backgroundImage:"url("+l+")",backgroundPosition:"center",backgroundSize:"cover",borderRadius:"50%",height:"26px",marginLeft:"4px",width:"26px"},i)},o))}var yn=/*#__PURE__*/function(e){function n(){return e.apply(this,arguments)||this}Ne(n,e);var r=n.prototype;return r.update=function(e){return window[this.props.method].setItem(this.props.item,JSON.stringify(e)),this.forceUpdate()},r.render=function(){return t.createElement(t.Fragment,null,this.props.render(JSON.parse(window[this.props.method].getItem(this.props.item))||void 0,this.update.bind(this)))},n}(t.Component);function En(e){var n="accounts";return t.createElement("a",{style:{alignItems:"center",display:"flex",height:"48px",paddingLeft:"12px",paddingRight:"16px",textDecoration:"none"},"data-pendo":"app-switcher--change-app--"+n,"data-turbolinks":!1,href:u(e.env)(n)+Tt(n)},t.createElement("svg",{height:22,style:{display:"block",marginRight:"2px"},viewBox:"0 0 20 20",width:22,xmlns:"http://www.w3.org/2000/svg"},t.createElement(tt,{color:Ut.lightNeutral45,key:"key2"})),t.createElement("div",{style:{color:Ut.lightNeutral45,fontSize:"12px",lineHeight:"48px",textDecoration:"none"}},"Account settings"))}yn.defaultProps={method:"localStorage"};var wn=function(e){var n=e.color,r=e.size,a=void 0===r?22:r,i=e.style;return t.createElement("div",{style:void 0===i?{}:i},t.createElement(kt,{fill:void 0===n?Ut.lightNeutral100:n,style:{height:a+"px",width:a+"px"}}))};function bn(e){var t,n,r,a=e.appName,i=e.userId,o=u(e.env)("login")+"/people/AC"+i,l=null==(t=window)||null==(n=t.location)||null==(r=n.pathname)?void 0:r.toString();if(!l)return o;var s=new URLSearchParams;return s.append("return",a+"/"+l),o+"?"+s.toString()}var kn=function(e){var n=e.isActive,r=n?"hsl(86, 91%, 27%)":"hsl(8, 60%, 47%)";return t.createElement("div",{style:{alignItems:"center",display:"flex",fontSize:"13px",marginBottom:2,marginTop:4}},t.createElement("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none"},t.createElement("path",n?{d:"M12.588 5.31499H11.832V3.79999C11.8159 2.80798 11.4105 1.86207 10.7032 1.16625C9.99602 0.470436 9.04363 0.0804749 8.0515 0.0804749C7.05937 0.0804749 6.10698 0.470436 5.39976 1.16625C4.69253 1.86207 4.28713 2.80798 4.271 3.79999V5.31499H3.515C3.1138 5.31525 2.72906 5.47454 2.44508 5.75795C2.16111 6.04136 2.00106 6.42579 2 6.82699V14.388C2.00132 14.7891 2.16146 15.1734 2.44537 15.4567C2.72929 15.7401 3.11388 15.8995 3.515 15.9H12.588C12.9886 15.8987 13.3724 15.7389 13.6557 15.4557C13.939 15.1724 14.0987 14.7886 14.1 14.388V6.82699C14.0987 6.42639 13.939 6.04257 13.6557 5.7593C13.3724 5.47603 12.9886 5.31631 12.588 5.31499ZM8.051 12.115C7.75171 12.1152 7.45909 12.0266 7.21015 11.8605C6.96121 11.6944 6.76713 11.4581 6.65246 11.1817C6.53779 10.9052 6.50768 10.601 6.56595 10.3074C6.62422 10.0139 6.76824 9.74418 6.97979 9.53249C7.19135 9.32079 7.46094 9.17659 7.75446 9.11813C8.04798 9.05967 8.35225 9.08958 8.62877 9.20406C8.90529 9.31855 9.14165 9.51247 9.30794 9.7613C9.47424 10.0101 9.563 10.3027 9.563 10.602C9.56327 11.0036 9.40424 11.389 9.1208 11.6735C8.83736 11.9581 8.45264 12.1187 8.051 12.12V12.115ZM10.395 5.31499H5.707V3.79999C5.707 3.17832 5.95396 2.58211 6.39354 2.14253C6.83313 1.70294 7.42933 1.45599 8.051 1.45599C8.67267 1.45599 9.26887 1.70294 9.70846 2.14253C10.148 2.58211 10.395 3.17832 10.395 3.79999V5.31499Z",fill:r}:{d:"M13.7,5.8a1.5,1.5,0,0,0-1.1-.4H5.7V3.8a2.34,2.34,0,0,1,.7-1.7,2.19,2.19,0,0,1,1.7-.7,2.34,2.34,0,0,1,1.7.7,2.67,2.67,0,0,1,.7,1.4h1.4a4.12,4.12,0,0,0-1.1-2.4A4.73,4.73,0,0,0,8.1.1,4,4,0,0,0,5.4,1.2,3.63,3.63,0,0,0,4.3,3.8V5.3H3.5a2.1,2.1,0,0,0-1.1.4A2.1,2.1,0,0,0,2,6.8v7.6a2.1,2.1,0,0,0,.4,1.1,1.5,1.5,0,0,0,1.1.4h9.1a2.1,2.1,0,0,0,1.1-.4,1.5,1.5,0,0,0,.4-1.1V6.8A1.53,1.53,0,0,0,13.7,5.8ZM9.1,11.7a1.5,1.5,0,0,1-1.1.4H8a1.14,1.14,0,0,1-.8-.3,4.35,4.35,0,0,1-.6-.7,2.77,2.77,0,0,1-.1-.9A3,3,0,0,1,7,9.5a1.23,1.23,0,0,1,.8-.4,1.41,1.41,0,0,1,.9.1,1.34,1.34,0,0,1,.7.6,1.14,1.14,0,0,1,.3.8A2.38,2.38,0,0,1,9.1,11.7Z",fill:r})),t.createElement("span",{style:{color:"#888",marginLeft:4,whiteSpace:"nowrap"}},"Two-step verification ",n?"active":"inactive"))},_n={colors:Te({},(0,y.generateColorScale)({baseColor:"#2266f7",key:"primary"})),icons:{churchCenter:R,general:Z,people:I,toolbar:W},id:"topbar"};function Cn(e){var n=e.appName,r=e.connectedPeople,a=e.env,i=e.hasConnectedPeople,o=e.linkToProfile,l=e.mfaConfigured,s=e.mfaEnabled,c=e.requestClearAppsCache,d=e.requestClearConnectedPeopleCache,m=e.requestSwitchConnectedPerson,v=e.requestUnlinkConnectedPeople,y=e.setUserMenuVisible,k=e.userId,_=e.userName;return t.createElement(h,{theme:_n},t.createElement(p,{axis:"vertical",width:"100%"},t.createElement(p,{axis:"horizontal",alignItems:"start",distribution:"space-between"},t.createElement(p,{axis:"horizontal",spacing:2,padding:2,paddingRight:0,shrink:1},t.createElement(p,{shrink:0},t.createElement(vn,{env:a,url:e.userAvatarPath,style:{height:48,width:48}})),t.createElement(p,{spacing:1,shrink:1},t.createElement(g,{color:Ut.lightNeutral24,weight:700,truncate:!0},_),o&&t.createElement(E,{as:"a",href:"/people/AC"+k,color:Ut.lightNeutral45,underline:!1},"My profile"),s&&t.createElement(E,{as:"a",href:bn({appName:n,env:a,userId:k}),color:Ut.lightNeutral45,underline:!1},"My login settings",t.createElement(kn,{isActive:l})),t.createElement("form",{method:"POST",action:u(a)("login")+"/logout"},t.createElement(f,{color:Ut.lightNeutral45,"data-turbolinks":!1,onClick:function(){c(),d()},type:"submit"},"Log out")))),t.createElement(f,{color:Ut.lightNeutral45,icon:"general.x",onClick:function(){return y(!1)},padding:2,variant:"naked",title:"Close Menu"})),i&&t.createElement(t.Fragment,null,t.createElement(p,{backgroundColor:Ut.lightNeutral95,paddingVertical:1.5,paddingHorizontal:2,marginTop:1,borderBottom:"1px solid "+Ut.lightNeutral88},t.createElement(w,{color:Ut.lightNeutral62,fontWeight:500},"Linked Accounts")),t.createElement(b,{dividerColor:Ut.lightNeutral88,width:"100%"},Zt(r).map(function(e){var r=e.id;return t.createElement(b.Item,{key:r,onClick:function(e){c(),d(),m(r,n+"/"),e.preventDefault()},color:Ut.lightNeutral45,padding:2},t.createElement(g,{truncate:!0},e.attributes.organization_name))}),t.createElement(b.Item,{onClick:function(e){c(),d(),v(),e.preventDefault()},color:Ut.danger47,padding:2,underline:!1},t.createElement(g,{size:3},"Unlink my accounts"))))))}var xn=["active"],Sn=function(e){var n=e.appName.replace(/[\s-]/,"");return t.createElement("div",{style:{alignItems:"center",display:"flex"}},t.createElement("div",{style:{marginRight:"6px"}},t.createElement(At,{appName:n,size:20})),t.createElement(lt,{appName:n,color:Ut.lightNeutral24,size:18}))},Mn=function(e){var n,r,a,i=t.useState(!1),o=i[0],l=i[1],s=t.useState(!1),c=s[0],d=s[1],h=t.useState(!1),m=h[0],f=h[1],p=It(),g=p.hasConnectedPeople,v=p.mfaConfigured,y=p.mfaEnabled,E=p.userId,w=p.name,b=e.colors,k=e.routes.filter(function(e){return e.props.active})||[],_=e.currentRouteComponent,C=k&&k[0]&&k[0].props&&k[0].props.children||e.appName,x=e.apps.find(function(e){return"Accounts"===e.name}),S=e.apps.find(function(e){return"Home"===e.name}),M=[].concat(e.apps).filter(function(e){var t=e.name;return"Home"!==t&&"Accounts"!==t}),A=Ut.lightNeutral88;return t.useEffect(function(){l(!1)},[k&&(null==(n=k[0])||null==(r=n.props)?void 0:r.href)]),t.createElement(Ft,{style:Te({},e.style)},t.createElement("div",{style:{alignItems:"center",display:"flex",height:"48px",justifyContent:"center",paddingLeft:"16px",paddingRight:"16px"},onClick:function(){e.requestAppsFetch(),e.requestConnectedPeopleFetch(),l(!1),d(function(e){return!e})}},t.createElement(it,{appName:e.appName.replace(/[\s-]/,""),colors:b,size:26})),t.createElement("div",{style:{left:0,position:"absolute",top:"48px",width:"100%"}},o&&e.routes),t.createElement(yn,{item:"Topbar:Small:Menus:Products:visibility",render:function(){return t.createElement("div",{style:{MozUserSelect:"none",WebkitTapHighlightColor:"transparent",WebkitUserSelect:"none",backgroundColor:Ie(Ut.lightNeutral12,.75),bottom:0,color:"black",display:c?"block":"none",left:0,msUserSelect:"none",position:"fixed",right:0,top:0,userSelect:"none"},onClick:function(){d(function(e){return!e}),f(!1)}},t.createElement(wn,{style:{position:"absolute",right:"17px",top:"12px"}}),t.createElement("div",{onClick:function(e){e.forcePropagation||e.stopPropagation()},style:{backgroundColor:Ut.lightNeutral100,borderRight:"1px solid "+A,display:"flex",flexDirection:"column",height:"calc(100% - 52px - env(safe-area-inset-bottom))",position:"relative",width:"calc(100% - 57px)"}},t.createElement("div",{style:{alignItems:"center",backgroundColor:Ut.lightNeutral98,borderBottom:"1px solid "+A,display:"flex",height:"48px",paddingLeft:"16px",paddingRight:"16px"}},t.createElement("div",{style:Te({},ut)},t.createElement("a",{style:{alignItems:"center",display:"flex",height:"48px",paddingRight:"16px"},"data-pendo":"app-switcher--change-app--"+(null==S?void 0:S.name),"data-turbolinks":!1,href:S?u(e.env)("accounts")+Tt(null==S?void 0:S.name):void 0},t.createElement("div",{style:{alignItems:"center",display:"flex"}},t.createElement(Sn,{appName:S?S.name:e.appName}))))),t.createElement("div",{style:Te({},ut,{WebkitOverflowScrolling:"touch",overflowY:"scroll"})},t.createElement("ul",{"data-pendo":"app-switcher",style:{margin:0,padding:0}},Rt(M).map(function(n,r){var a=n.name,i=0===r,o=r===Rt(M).length-1;return t.createElement("li",{key:a,style:{listStyleType:"none"}},t.createElement("a",{style:{alignItems:"center",display:"flex",height:"40px",paddingBottom:o?"4px":0,paddingLeft:"16px",paddingRight:"16px",paddingTop:i?"4px":0},"data-pendo":"app-switcher--change-app--"+a,"data-turbolinks":!1,href:u(e.env)("accounts")+Tt(a)},t.createElement(Sn,{appName:a})))})),x&&t.createElement("div",{style:{borderTop:"1px solid "+A}},t.createElement(En,{env:e.env})))))}}),t.createElement("div",{style:Te({},ut,{fontWeight:600,lineHeight:"48px",textAlign:"center"}),onClick:e.routes.length>0?function(){d(!1),l(function(e){return!e})}:null},t.createElement(_,null,(a=C).charAt(0).toUpperCase()+a.slice(1)),e.routes.length>0&&t.createElement(Et,{colors:b,style:{marginLeft:"4px",verticalAlign:"middle"}})),t.createElement("button",{onClick:function(){return f(!m)},style:{background:"none",border:"none",margin:"0 12px",padding:0}},t.createElement(vn,{env:e.env,url:e.userAvatarPath})),t.createElement("div",{style:{MozUserSelect:"none",WebkitTapHighlightColor:"transparent",WebkitUserSelect:"none",bottom:0,color:"black",display:m?"block":"none",left:0,msUserSelect:"none",position:"fixed",right:0,top:0,userSelect:"none"}},t.createElement("div",{onClick:function(e){return e.stopPropagation()},style:{WebkitOverflowScrolling:"touch",backgroundColor:"#fff",display:"flex",flexDirection:"column",height:"100%",overflowY:"scroll",position:"relative",width:"100%"}},t.createElement(Cn,{appName:e.appName,env:e.env,connectedPeople:e.connectedPeople,hasConnectedPeople:g,linkToProfile:e.linkToProfile,mfaConfigured:v,mfaEnabled:y,requestClearAppsCache:e.requestClearAppsCache,requestClearConnectedPeopleCache:e.requestClearConnectedPeopleCache,requestSwitchConnectedPerson:e.requestSwitchConnectedPerson,requestUnlinkConnectedPeople:e.requestUnlinkConnectedPeople,setUserMenuVisible:f,userAvatarPath:e.userAvatarPath,userId:E,userName:w}))))};Mn.defaultProps={currentRouteComponent:function(e){return t.createElement("span",Te({},e))},linkToProfile:!0};var An=function(e){var n=e.active,r=Oe(e,xn);return t.createElement("a",Te({style:Te({backgroundColor:"#444",borderBottom:"1px solid #333",color:"#fff",display:"block",fontWeight:600,lineHeight:"47px",position:"relative",textAlign:"center",textDecoration:"none",textTransform:"capitalize",whiteSpace:"nowrap"},ct,n&&{backgroundColor:"#333"})},r))},Tn={domain:window.location.host.split(".").slice(-2).join("."),"max-age":2592e3},Nn=Object.entries(Tn).map(function(e){return e[0]+"="+e[1]}).join("; ");function Dn(e){var n=e.bottom,r=e.children,a=e.hasShadow,i=e.height,o=e.id,l=e.overflow,s=e.position,c=e.width;return t.createElement(p,Te({backgroundColor:"surface",elevation:void 0!==a&&a&&open?2:void 0,left:0,position:"absolute",zIndex:1},{bottom:void 0===n?"auto":n,height:void 0===i?"100%":i,id:void 0===o?"toolbarDrawer":o,overflow:void 0===l?"visible":l,position:void 0===s?"absolute":s,width:void 0===c?"100%":c}),r)}function Pn(e){var n=e.closeDrawer;return t.createElement(p,{alignment:"start",axis:"horizontal",color:"foreground",distribution:"space-between",padding:2,paddingTop:1},t.createElement(k,{flex:1},e.children),n&&t.createElement(f,{icon:{fill:Ut.lightNeutral12,name:"general.x",size:"md"},onClick:function(){return n()},title:"Close",theme:!1,hover:{backgroundColor:Ut.lightNeutral93},marginTop:.25}))}var On=["children"];function Vn(e){var n=e.children,r=Oe(e,On);return t.createElement(_,Te({},r,{color:Ut.lightNeutral12,letterSpacing:".002em",level:2,lineHeight:"35px",weight:700}),n)}var Hn,zn=function(e){return t.createElement(k,Te({backgroundColor:Ut.interaction66,height:1.5,pointerEvents:"none",position:"absolute",radius:"50%",width:1.5,zIndex:6},e))},Yn=["children"],Ln={bottom:{background:"linear-gradient(rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.07))",bottom:0},top:{background:"linear-gradient(rgba(0, 0, 0, 0.07), rgba(255, 255, 255, 0))",top:0}},Rn=function(e){var a=e.children,i=Oe(e,Yn),l=r(!1),s=l[0],c=l[1],u=r(!1),d=u[0],h=u[1],m=o(null),f=o(null),g=o(null),v=function(){var e=null==m?void 0:m.current;e&&h(e.scrollHeight-e.clientHeight>e.scrollTop+1)};return n(function(){var e=null==m?void 0:m.current;if(!e)return function(){};h(e.scrollHeight>e.clientHeight);var t={root:e,threshold:1},n=new IntersectionObserver(function(e){return h(!e[0].isIntersecting)},t),r=new IntersectionObserver(function(e){return c(!e[0].isIntersecting)},t),a=null==f?void 0:f.current,i=null==g?void 0:g.current;a&&n.observe(a),i&&r.observe(i);var o=new ResizeObserver(v);return o.observe(e),function(){a&&n.unobserve(a),i&&r.unobserve(i),o.unobserve(e)}},[]),t.createElement(p,{grow:1,position:"relative",shrink:1},s&&t.createElement(Zn,{edge:"top"}),d&&t.createElement(Zn,{edge:"bottom"}),t.createElement(p,Te({basis:2,grow:1,innerRef:m,overflow:"auto",role:"region",shrink:1,css:{overscrollBehavior:"contain"}},i),t.createElement(k,{innerRef:g}),a,t.createElement(k,{innerRef:f})))},Zn=function(e){return t.createElement(k,Te({height:1,left:0,pointerEvents:"none",position:"absolute",right:0,role:"presentation",zIndex:10},Ln[e.edge]))},In=function(e){var n=e.activeIndex,r=e.children,a=t.Children.count(r),i=n<0?0:n>a-1?a-1:n;return t.createElement(p,{grow:1,overflow:"hidden",position:"relative"},t.Children.map(r,function(e,r){var a=r===i;return t.createElement(p,{"aria-hidden":!a,visibility:a?"visible":"hidden",height:"100%",key:r,opacity:a?1:0,pointerEvents:a?"auto":"none",position:"absolute",top:0,width:"100%",transform:a?"translateX(0)":r<n?"translateX(-100px)":"translateX(100px)",transition:"visibility 100ms 50ms ease-in-out, transform 200ms ease-in-out, opacity 100ms 50ms ease-in-out"},e)}))};!function(e){e.close="close",e.mount="mount",e.open="open",e.unmount="unmount"}(Hn||(Hn={}));var Wn={currentContent:null,open:!1},Fn=function(e,t){switch(t.type){case Hn.mount:return Te({},e,{currentContent:t.payload.content});case Hn.unmount:return Te({},e,{currentContent:null});case Hn.open:return Te({},e,{open:!0});case Hn.close:return Te({},e,{open:!1})}},Un=["fields"];function jn(e,t,n){if(!e.s){if(n instanceof Bn){if(!n.s)return void(n.o=jn.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(jn.bind(null,e,t),jn.bind(null,e,2));e.s=t,e.v=n;var r=e.o;r&&r(e)}}var Bn=/*#__PURE__*/function(){function e(){}return e.prototype.then=function(t,n){var r=new e,a=this.s;if(a){var i=1&a?t:n;if(i){try{jn(r,1,i(this.v))}catch(e){jn(r,2,e)}return r}return this}return this.o=function(e){try{var a=e.v;1&e.s?jn(r,1,t?t(a):a):n?jn(r,1,n(a)):jn(r,2,a)}catch(e){jn(r,2,e)}},r},e}();function Gn(e){return e instanceof Bn&&1&e.s}var qn=t.createContext({}),Jn=function(e){var t=[e.data].flat().map(function(e){var t,n=e.attributes;return Te({id:e.id},(void 0===(t=e.relationships)&&(t={}),Object.keys(t).reduce(function(e,n){var r,a=t[n].data,i=Array.isArray(a);return Te({},e,((r={})[n+"_"+(i?"ids":"id")]=i?a.map(function(e){return e.id}):null==a?void 0:a.id,r))},{})),n)}),n=t[0],r=t.slice(1);return Array.isArray(e.data)?n?[n].concat(r):[]:n},$n=function(e){var t=e.app,n=u(e.env)("api")+"/"+t+"/v2";return{delete:function(e){return Le(Ye,[n,e].join("/"),{method:"DELETE"})},get:function(e,t,r){var a=void 0===t?{}:t,i=a.fields,o=void 0===i?{}:i,l=Oe(a,Un),s=(void 0===r?{}:r).unpaginated,c=void 0!==s&&s;try{o=Object.entries(o).reduce(function(e,t){var n;return Te({},e,((n={})["fields["+t[0]+"]"]=t[1],n))},{});var u=new URLSearchParams(Te({},o,l));return Promise.resolve(Le(ze,[[n,e].join("/"),u].join("?"))).then(function(e){var t,n=e.json,r=Jn(n),a=null==n||null==(t=n.links)?void 0:t.next,i=function(e,t,n){for(var r;;){var a=e();if(Gn(a)&&(a=a.v),!a)return i;if(a.then){r=0;break}var i=n();if(i&&i.then){if(!Gn(i)){r=1;break}i=i.s}if(t){var o=t();if(o&&o.then&&!Gn(o)){r=2;break}}}var l=new Bn,s=jn.bind(null,l,2);return(0===r?a.then(u):1===r?i.then(c):o.then(d)).then(void 0,s),l;function c(r){i=r;do{if(t&&(o=t())&&o.then&&!Gn(o))return void o.then(d).then(void 0,s);if(!(a=e())||Gn(a)&&!a.v)return void jn(l,1,i);if(a.then)return void a.then(u).then(void 0,s);Gn(i=n())&&(i=i.v)}while(!i||!i.then);i.then(c).then(void 0,s)}function u(e){e?(i=n())&&i.then?i.then(c).then(void 0,s):c(i):jn(l,1,i)}function d(){(a=e())?a.then?a.then(u).then(void 0,s):u(a):jn(l,1,i)}}(function(){return!!c&&!!a},void 0,function(){return Promise.resolve(Le(ze,a)).then(function(e){var t,n=e.json;r=[].concat(r,Jn(n)),a=null==n||null==(t=n.links)?void 0:t.next})});return i&&i.then?i.then(function(){return r}):r})}catch(e){return Promise.reject(e)}},patch:function(e,t){try{return Promise.resolve(Le(Ye,[n,e].join("/"),{data:{data:{attributes:t}},method:"PATCH"})).then(function(e){return Jn(e.json)})}catch(e){return Promise.reject(e)}},post:function(e,t){try{return Promise.resolve(Le(Ye,[n,e].join("/"),{data:{data:{attributes:t}},method:"POST"})).then(function(e){return Jn(e.json)})}catch(e){return Promise.reject(e)}}}},Qn=function(e){var n=e.children,r=e.env,i=a(function(){var e=$n({app:"chat",env:r}),t=$n({app:"services",env:r});return{chat:e,groups:$n({app:"groups",env:r}),services:t}},[r]);return t.createElement(qn.Provider,{value:i},n)},Xn=t.createContext({}),Kn=function(e){return t.createElement(Xn.Provider,{value:e.value},e.children)},er=function(){return t.createElement(S,{color:"hsla(221, 89%, 93%, 1)",radius:"pill",size:"xs"},t.createElement(g,{color:"hsla(221, 91%, 55%, 1)"},"Beta"))},tr=function(){return t.createElement(Pn,null,t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1},t.createElement(Vn,null,"Chat"),t.createElement(er,null),t.createElement(M,{color:"hsl(0 0% 62%)",thickness:2,trackColor:"hsl(0 0% 97%)"})))},nr=function(e){var n=B().client,r=t.useState(function(){return e.muteStatus()}),a=r[0].muted,i=r[1];return t.useEffect(function(){var t=function(){i(e.muteStatus())};return n.on("notification.channel_mutes_updated",t),function(){return n.off("notification.channel_mutes_updated",t)}},[]),a};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var rr,ar,ir=(rr=function(e,t){e.exports=function(){var t,n;function r(){return t.apply(null,arguments)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(o(e,t))return!1;return!0}function s(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,r=[],a=e.length;for(n=0;n<a;++n)r.push(t(e[n],n));return r}function h(e,t){for(var n in t)o(t,n)&&(e[n]=t[n]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function m(e,t,n,r){return Pt(e,t,n,r,!0).utc()}function f(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function p(e){if(null==e._isValid){var t=f(e),r=n.call(t.parsedDateParts,function(e){return null!=e}),a=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r);if(e._strict&&(a=a&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return a;e._isValid=a}return e._isValid}function g(e){var t=m(NaN);return null!=e?h(f(t),e):f(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var v=r.momentProperties=[],y=!1;function E(e,t){var n,r,a,i=v.length;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=f(t)),s(t._locale)||(e._locale=t._locale),i>0)for(n=0;n<i;n++)s(a=t[r=v[n]])||(e[r]=a);return e}function w(e){E(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,r.updateOffset(this),y=!1)}function b(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function k(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function _(e,t){var n=!0;return h(function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var a,i,l,s=[],c=arguments.length;for(i=0;i<c;i++){if(a="","object"==typeof arguments[i]){for(l in a+="\n["+i+"] ",arguments[0])o(arguments[0],l)&&(a+=l+": "+arguments[0][l]+", ");a=a.slice(0,-2)}else a=arguments[i];s.push(a)}k(e+"\nArguments: "+Array.prototype.slice.call(s).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)},t)}var C,x={};function S(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),x[e]||(k(t),x[e]=!0)}function M(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function A(e,t){var n,r=h({},e);for(n in t)o(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},h(r[n],e[n]),h(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)o(e,n)&&!o(t,n)&&i(e[n])&&(r[n]=h({},r[n]));return r}function T(e){null!=e&&this.set(e)}function N(e,t,n){var r=""+Math.abs(e);return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,t-r.length)).toString().substr(1)+r}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,C=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)o(e,t)&&n.push(t);return n};var D=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,P=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,O={},V={};function H(e,t,n,r){var a=r;"string"==typeof r&&(a=function(){return this[r]()}),e&&(V[e]=a),t&&(V[t[0]]=function(){return N(a.apply(this,arguments),t[1],t[2])}),n&&(V[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function z(e,t){return e.isValid()?(t=Y(t,e.localeData()),O[t]=O[t]||function(e){var t,n,r,a=e.match(D);for(t=0,n=a.length;t<n;t++)a[t]=V[a[t]]?V[a[t]]:(r=a[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,i="";for(r=0;r<n;r++)i+=M(a[r])?a[r].call(t,e):a[r];return i}}(t),O[t](e)):e.localeData().invalidDate()}function Y(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(P.lastIndex=0;n>=0&&P.test(e);)e=e.replace(P,r),P.lastIndex=0,n-=1;return e}var L={};function R(e,t){var n=e.toLowerCase();L[n]=L[n+"s"]=L[t]=e}function Z(e){return"string"==typeof e?L[e]||L[e.toLowerCase()]:void 0}function I(e){var t,n,r={};for(n in e)o(e,n)&&(t=Z(n))&&(r[t]=e[n]);return r}var W={};function F(e,t){W[e]=t}function U(e){return e%4==0&&e%100!=0||e%400==0}function j(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function B(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=j(t)),n}function G(e,t){return function(n){return null!=n?(J(this,e,n),r.updateOffset(this,t),this):q(this,e)}}function q(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function J(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&U(e.year())&&1===e.month()&&29===e.date()?(n=B(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Ne(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var $,Q=/\d/,X=/\d\d/,K=/\d{3}/,ee=/\d{4}/,te=/[+-]?\d{6}/,ne=/\d\d?/,re=/\d\d\d\d?/,ae=/\d\d\d\d\d\d?/,ie=/\d{1,3}/,oe=/\d{1,4}/,le=/[+-]?\d{1,6}/,se=/\d+/,ce=/[+-]?\d+/,ue=/Z|[+-]\d\d:?\d\d/gi,de=/Z|[+-]\d\d(?::?\d\d)?/gi,he=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function me(e,t,n){$[e]=M(t)?t:function(e,r){return e&&n?n:t}}function fe(e,t){return o($,e)?$[e](t._strict,t._locale):new RegExp(pe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,a){return t||n||r||a})))}function pe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}$={};var ge={};function ve(e,t){var n,r,a=t;for("string"==typeof e&&(e=[e]),c(t)&&(a=function(e,n){n[t]=B(e)}),r=e.length,n=0;n<r;n++)ge[e[n]]=a}function ye(e,t){ve(e,function(e,n,r,a){r._w=r._w||{},t(e,r._w,r,a)})}function Ee(e,t,n){null!=t&&o(ge,e)&&ge[e](t,n._a,n,e)}var we,be=0,ke=1,_e=2,Ce=3,xe=4,Se=5,Me=6,Ae=7,Te=8;function Ne(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=(t%12+12)%12;return e+=(t-n)/12,1===n?U(e)?29:28:31-n%7%2}we=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},H("M",["MM",2],"Mo",function(){return this.month()+1}),H("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),H("MMMM",0,0,function(e){return this.localeData().months(this,e)}),R("month","M"),F("month",8),me("M",ne),me("MM",ne,X),me("MMM",function(e,t){return t.monthsShortRegex(e)}),me("MMMM",function(e,t){return t.monthsRegex(e)}),ve(["M","MM"],function(e,t){t[ke]=B(e)-1}),ve(["MMM","MMMM"],function(e,t,n,r){var a=n._locale.monthsParse(e,r,n._strict);null!=a?t[ke]=a:f(n).invalidMonth=e});var De="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Pe="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Oe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ve=he,He=he;function ze(e,t,n){var r,a,i,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=m([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(a=we.call(this._shortMonthsParse,o))?a:null:-1!==(a=we.call(this._longMonthsParse,o))?a:null:"MMM"===t?-1!==(a=we.call(this._shortMonthsParse,o))||-1!==(a=we.call(this._longMonthsParse,o))?a:null:-1!==(a=we.call(this._longMonthsParse,o))||-1!==(a=we.call(this._shortMonthsParse,o))?a:null}function Ye(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=B(t);else if(!c(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Ne(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Le(e){return null!=e?(Ye(this,e),r.updateOffset(this,!0),this):q(this,"Month")}function Re(){function e(e,t){return t.length-e.length}var t,n,r=[],a=[],i=[];for(t=0;t<12;t++)n=m([2e3,t]),r.push(this.monthsShort(n,"")),a.push(this.months(n,"")),i.push(this.months(n,"")),i.push(this.monthsShort(n,""));for(r.sort(e),a.sort(e),i.sort(e),t=0;t<12;t++)r[t]=pe(r[t]),a[t]=pe(a[t]);for(t=0;t<24;t++)i[t]=pe(i[t]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Ze(e){return U(e)?366:365}H("Y",0,0,function(){var e=this.year();return e<=9999?N(e,4):"+"+e}),H(0,["YY",2],0,function(){return this.year()%100}),H(0,["YYYY",4],0,"year"),H(0,["YYYYY",5],0,"year"),H(0,["YYYYYY",6,!0],0,"year"),R("year","y"),F("year",1),me("Y",ce),me("YY",ne,X),me("YYYY",oe,ee),me("YYYYY",le,te),me("YYYYYY",le,te),ve(["YYYYY","YYYYYY"],be),ve("YYYY",function(e,t){t[be]=2===e.length?r.parseTwoDigitYear(e):B(e)}),ve("YY",function(e,t){t[be]=r.parseTwoDigitYear(e)}),ve("Y",function(e,t){t[be]=parseInt(e,10)}),r.parseTwoDigitYear=function(e){return B(e)+(B(e)>68?1900:2e3)};var Ie=G("FullYear",!0);function We(e,t,n,r,a,i,o){var l;return e<100&&e>=0?(l=new Date(e+400,t,n,r,a,i,o),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,r,a,i,o),l}function Fe(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ue(e,t,n){var r=7+t-n;return-(7+Fe(e,0,r).getUTCDay()-t)%7+r-1}function je(e,t,n,r,a){var i,o,l=1+7*(t-1)+(7+n-r)%7+Ue(e,r,a);return l<=0?o=Ze(i=e-1)+l:l>Ze(e)?(i=e+1,o=l-Ze(e)):(i=e,o=l),{year:i,dayOfYear:o}}function Be(e,t,n){var r,a,i=Ue(e.year(),t,n),o=Math.floor((e.dayOfYear()-i-1)/7)+1;return o<1?r=o+Ge(a=e.year()-1,t,n):o>Ge(e.year(),t,n)?(r=o-Ge(e.year(),t,n),a=e.year()+1):(a=e.year(),r=o),{week:r,year:a}}function Ge(e,t,n){var r=Ue(e,t,n),a=Ue(e+1,t,n);return(Ze(e)-r+a)/7}function qe(e,t){return e.slice(t,7).concat(e.slice(0,t))}H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),R("week","w"),R("isoWeek","W"),F("week",5),F("isoWeek",5),me("w",ne),me("ww",ne,X),me("W",ne),me("WW",ne,X),ye(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=B(e)}),H("d",0,"do","day"),H("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),H("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),H("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),R("day","d"),R("weekday","e"),R("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),me("d",ne),me("e",ne),me("E",ne),me("dd",function(e,t){return t.weekdaysMinRegex(e)}),me("ddd",function(e,t){return t.weekdaysShortRegex(e)}),me("dddd",function(e,t){return t.weekdaysRegex(e)}),ye(["dd","ddd","dddd"],function(e,t,n,r){var a=n._locale.weekdaysParse(e,r,n._strict);null!=a?t.d=a:f(n).invalidWeekday=e}),ye(["d","e","E"],function(e,t,n,r){t[r]=B(e)});var Je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),$e="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Qe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Xe=he,Ke=he,et=he;function tt(e,t,n){var r,a,i,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=m([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(a=we.call(this._weekdaysParse,o))?a:null:"ddd"===t?-1!==(a=we.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=we.call(this._minWeekdaysParse,o))?a:null:"dddd"===t?-1!==(a=we.call(this._weekdaysParse,o))||-1!==(a=we.call(this._shortWeekdaysParse,o))||-1!==(a=we.call(this._minWeekdaysParse,o))?a:null:"ddd"===t?-1!==(a=we.call(this._shortWeekdaysParse,o))||-1!==(a=we.call(this._weekdaysParse,o))||-1!==(a=we.call(this._minWeekdaysParse,o))?a:null:-1!==(a=we.call(this._minWeekdaysParse,o))||-1!==(a=we.call(this._weekdaysParse,o))||-1!==(a=we.call(this._shortWeekdaysParse,o))?a:null}function nt(){function e(e,t){return t.length-e.length}var t,n,r,a,i,o=[],l=[],s=[],c=[];for(t=0;t<7;t++)n=m([2e3,1]).day(t),r=pe(this.weekdaysMin(n,"")),a=pe(this.weekdaysShort(n,"")),i=pe(this.weekdays(n,"")),o.push(r),l.push(a),s.push(i),c.push(r),c.push(a),c.push(i);o.sort(e),l.sort(e),s.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function rt(){return this.hours()%12||12}function at(e,t){H(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function it(e,t){return t._meridiemParse}H("H",["HH",2],0,"hour"),H("h",["hh",2],0,rt),H("k",["kk",2],0,function(){return this.hours()||24}),H("hmm",0,0,function(){return""+rt.apply(this)+N(this.minutes(),2)}),H("hmmss",0,0,function(){return""+rt.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)}),H("Hmm",0,0,function(){return""+this.hours()+N(this.minutes(),2)}),H("Hmmss",0,0,function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)}),at("a",!0),at("A",!1),R("hour","h"),F("hour",13),me("a",it),me("A",it),me("H",ne),me("h",ne),me("k",ne),me("HH",ne,X),me("hh",ne,X),me("kk",ne,X),me("hmm",re),me("hmmss",ae),me("Hmm",re),me("Hmmss",ae),ve(["H","HH"],Ce),ve(["k","kk"],function(e,t,n){var r=B(e);t[Ce]=24===r?0:r}),ve(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ve(["h","hh"],function(e,t,n){t[Ce]=B(e),f(n).bigHour=!0}),ve("hmm",function(e,t,n){var r=e.length-2;t[Ce]=B(e.substr(0,r)),t[xe]=B(e.substr(r)),f(n).bigHour=!0}),ve("hmmss",function(e,t,n){var r=e.length-4,a=e.length-2;t[Ce]=B(e.substr(0,r)),t[xe]=B(e.substr(r,2)),t[Se]=B(e.substr(a)),f(n).bigHour=!0}),ve("Hmm",function(e,t,n){var r=e.length-2;t[Ce]=B(e.substr(0,r)),t[xe]=B(e.substr(r))}),ve("Hmmss",function(e,t,n){var r=e.length-4,a=e.length-2;t[Ce]=B(e.substr(0,r)),t[xe]=B(e.substr(r,2)),t[Se]=B(e.substr(a))});var ot,lt=G("Hours",!0),st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:De,monthsShort:Pe,week:{dow:0,doy:6},weekdays:Je,weekdaysMin:Qe,weekdaysShort:$e,meridiemParse:/[ap]\.?m?\.?/i},ct={},ut={};function dt(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function ht(e){return e?e.toLowerCase().replace("_","-"):e}function mt(t){var n=null;if(void 0===ct[t]&&e&&e.exports&&function(e){return null!=e.match("^[^/\\\\]*$")}(t))try{n=ot._abbr,function(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')}("./locale/"+t),ft(n)}catch(e){ct[t]=null}return ct[t]}function ft(e,t){var n;return e&&((n=s(t)?gt(e):pt(e,t))?ot=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ot._abbr}function pt(e,t){if(null!==t){var n,r=st;if(t.abbr=e,null!=ct[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ct[e]._config;else if(null!=t.parentLocale)if(null!=ct[t.parentLocale])r=ct[t.parentLocale]._config;else{if(null==(n=mt(t.parentLocale)))return ut[t.parentLocale]||(ut[t.parentLocale]=[]),ut[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ct[e]=new T(A(r,t)),ut[e]&&ut[e].forEach(function(e){pt(e.name,e.config)}),ft(e),ct[e]}return delete ct[e],null}function gt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ot;if(!a(e)){if(t=mt(e))return t;e=[e]}return function(e){for(var t,n,r,a,i=0;i<e.length;){for(t=(a=ht(e[i]).split("-")).length,n=(n=ht(e[i+1]))?n.split("-"):null;t>0;){if(r=mt(a.slice(0,t).join("-")))return r;if(n&&n.length>=t&&dt(a,n)>=t-1)break;t--}i++}return ot}(e)}function vt(e){var t,n=e._a;return n&&-2===f(e).overflow&&(t=n[ke]<0||n[ke]>11?ke:n[_e]<1||n[_e]>Ne(n[be],n[ke])?_e:n[Ce]<0||n[Ce]>24||24===n[Ce]&&(0!==n[xe]||0!==n[Se]||0!==n[Me])?Ce:n[xe]<0||n[xe]>59?xe:n[Se]<0||n[Se]>59?Se:n[Me]<0||n[Me]>999?Me:-1,f(e)._overflowDayOfYear&&(t<be||t>_e)&&(t=_e),f(e)._overflowWeeks&&-1===t&&(t=Ae),f(e)._overflowWeekday&&-1===t&&(t=Te),f(e).overflow=t),e}var yt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Et=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,bt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],kt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],_t=/^\/?Date\((-?\d+)/i,Ct=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,xt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function St(e){var t,n,r,a,i,o,l=e._i,s=yt.exec(l)||Et.exec(l),c=bt.length,u=kt.length;if(s){for(f(e).iso=!0,t=0,n=c;t<n;t++)if(bt[t][1].exec(s[1])){a=bt[t][0],r=!1!==bt[t][2];break}if(null==a)return void(e._isValid=!1);if(s[3]){for(t=0,n=u;t<n;t++)if(kt[t][1].exec(s[3])){i=(s[2]||" ")+kt[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(s[4]){if(!wt.exec(s[4]))return void(e._isValid=!1);o="Z"}e._f=a+(i||"")+(o||""),Nt(e)}else e._isValid=!1}function Mt(e){var t,n,r,a,i,o,l,s,c,u=Ct.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(u){if(n=u[3],r=u[2],a=u[5],i=u[6],o=u[7],l=[(s=u[4],c=parseInt(s,10),c<=49?2e3+c:c<=999?1900+c:c),Pe.indexOf(n),parseInt(r,10),parseInt(a,10),parseInt(i,10)],o&&l.push(parseInt(o,10)),!function(e,t,n){return!e||$e.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(f(n).weekdayMismatch=!0,n._isValid=!1,!1)}(u[1],t=l,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return xt[e];if(t)return 0;var r=parseInt(n,10),a=r%100;return(r-a)/100*60+a}(u[8],u[9],u[10]),e._d=Fe.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),f(e).rfc2822=!0}else e._isValid=!1}function At(e,t,n){return null!=e?e:null!=t?t:n}function Tt(e){var t,n,a,i,o,l=[];if(!e._d){for(a=function(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[_e]&&null==e._a[ke]&&function(e){var t,n,r,a,i,o,l,s,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(i=1,o=4,n=At(t.GG,e._a[be],Be(Ot(),1,4).year),r=At(t.W,1),((a=At(t.E,1))<1||a>7)&&(s=!0)):(i=e._locale._week.dow,o=e._locale._week.doy,c=Be(Ot(),i,o),n=At(t.gg,e._a[be],c.year),r=At(t.w,c.week),null!=t.d?((a=t.d)<0||a>6)&&(s=!0):null!=t.e?(a=t.e+i,(t.e<0||t.e>6)&&(s=!0)):a=i),r<1||r>Ge(n,i,o)?f(e)._overflowWeeks=!0:null!=s?f(e)._overflowWeekday=!0:(l=je(n,r,a,i,o),e._a[be]=l.year,e._dayOfYear=l.dayOfYear)}(e),null!=e._dayOfYear&&(o=At(e._a[be],a[be]),(e._dayOfYear>Ze(o)||0===e._dayOfYear)&&(f(e)._overflowDayOfYear=!0),n=Fe(o,0,e._dayOfYear),e._a[ke]=n.getUTCMonth(),e._a[_e]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=l[t]=a[t];for(;t<7;t++)e._a[t]=l[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ce]&&0===e._a[xe]&&0===e._a[Se]&&0===e._a[Me]&&(e._nextDay=!0,e._a[Ce]=0),e._d=(e._useUTC?Fe:We).apply(null,l),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ce]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(f(e).weekdayMismatch=!0)}}function Nt(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],f(e).empty=!0;var t,n,a,i,o,l,s,c=""+e._i,u=c.length,d=0;for(s=(a=Y(e._f,e._locale).match(D)||[]).length,t=0;t<s;t++)(n=(c.match(fe(i=a[t],e))||[])[0])&&((o=c.substr(0,c.indexOf(n))).length>0&&f(e).unusedInput.push(o),c=c.slice(c.indexOf(n)+n.length),d+=n.length),V[i]?(n?f(e).empty=!1:f(e).unusedTokens.push(i),Ee(i,n,e)):e._strict&&!n&&f(e).unusedTokens.push(i);f(e).charsLeftOver=u-d,c.length>0&&f(e).unusedInput.push(c),e._a[Ce]<=12&&!0===f(e).bigHour&&e._a[Ce]>0&&(f(e).bigHour=void 0),f(e).parsedDateParts=e._a.slice(0),f(e).meridiem=e._meridiem,e._a[Ce]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[Ce],e._meridiem),null!==(l=f(e).era)&&(e._a[be]=e._locale.erasConvertYear(l,e._a[be])),Tt(e),vt(e)}else Mt(e);else St(e)}function Dt(e){var t=e._i,n=e._f;return e._locale=e._locale||gt(e._l),null===t||void 0===n&&""===t?g({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),b(t)?new w(vt(t)):(u(t)?e._d=t:a(n)?function(e){var t,n,r,a,i,o,l=!1,s=e._f.length;if(0===s)return f(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;a<s;a++)i=0,o=!1,t=E({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[a],Nt(t),p(t)&&(o=!0),i+=f(t).charsLeftOver,i+=10*f(t).unusedTokens.length,f(t).score=i,l?i<r&&(r=i,n=t):(null==r||i<r||o)&&(r=i,n=t,o&&(l=!0));h(e,n||t)}(e):n?Nt(e):function(e){var t=e._i;s(t)?e._d=new Date(r.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=_t.exec(e._i);null===t?(St(e),!1===e._isValid&&(delete e._isValid,Mt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):a(t)?(e._a=d(t.slice(0),function(e){return parseInt(e,10)}),Tt(e)):i(t)?function(e){if(!e._d){var t=I(e._i);e._a=d([t.year,t.month,void 0===t.day?t.date:t.day,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),Tt(e)}}(e):c(t)?e._d=new Date(t):r.createFromInputFallback(e)}(e),p(e)||(e._d=null),e))}function Pt(e,t,n,r,o){var s,c={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(i(e)&&l(e)||a(e)&&0===e.length)&&(e=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=o,c._l=n,c._i=e,c._f=t,c._strict=r,(s=new w(vt(Dt(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Ot(e,t,n,r){return Pt(e,t,n,r,!1)}r.createFromInputFallback=_("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),r.ISO_8601=function(){},r.RFC_2822=function(){};var Vt=_("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ot.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:g()}),Ht=_("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ot.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:g()});function zt(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Ot();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Yt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Lt(e){var t=I(e),n=t.year||0,r=t.quarter||0,a=t.month||0,i=t.week||t.isoWeek||0,l=t.day||0,s=t.hour||0,c=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,n,r=!1,a=Yt.length;for(t in e)if(o(e,t)&&(-1===we.call(Yt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<a;++n)if(e[Yt[n]]){if(r)return!1;parseFloat(e[Yt[n]])!==B(e[Yt[n]])&&(r=!0)}return!0}(t),this._milliseconds=+d+1e3*u+6e4*c+1e3*s*60*60,this._days=+l+7*i,this._months=+a+3*r+12*n,this._data={},this._locale=gt(),this._bubble()}function Rt(e){return e instanceof Lt}function Zt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function It(e,t){H(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+N(~~(e/60),2)+t+N(~~e%60,2)})}It("Z",":"),It("ZZ",""),me("Z",de),me("ZZ",de),ve(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Ft(de,e)});var Wt=/([\+\-]|\d\d)/gi;function Ft(e,t){var n,r,a=(t||"").match(e);return null===a?null:0===(r=60*(n=((a[a.length-1]||[])+"").match(Wt)||["-",0,0])[1]+B(n[2]))?0:"+"===n[0]?r:-r}function Ut(e,t){var n,a;return t._isUTC?(n=t.clone(),a=(b(e)||u(e)?e.valueOf():Ot(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+a),r.updateOffset(n,!1),n):Ot(e).local()}function jt(e){return-Math.round(e._d.getTimezoneOffset())}function Bt(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Gt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,qt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Jt(e,t){var n,r,a,i,l,s,u=e,d=null;return Rt(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(u={},t?u[t]=+e:u.milliseconds=+e):(d=Gt.exec(e))?(n="-"===d[1]?-1:1,u={y:0,d:B(d[_e])*n,h:B(d[Ce])*n,m:B(d[xe])*n,s:B(d[Se])*n,ms:B(Zt(1e3*d[Me]))*n}):(d=qt.exec(e))?u={y:$t(d[2],n="-"===d[1]?-1:1),M:$t(d[3],n),w:$t(d[4],n),d:$t(d[5],n),h:$t(d[6],n),m:$t(d[7],n),s:$t(d[8],n)}:null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(i=Ot(u.from),l=Ot(u.to),a=i.isValid()&&l.isValid()?(l=Ut(l,i),i.isBefore(l)?s=Qt(i,l):((s=Qt(l,i)).milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0},(u={}).ms=a.milliseconds,u.M=a.months),r=new Lt(u),Rt(e)&&o(e,"_locale")&&(r._locale=e._locale),Rt(e)&&o(e,"_isValid")&&(r._isValid=e._isValid),r}function $t(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Qt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Xt(e,t){return function(n,r){var a;return null===r||isNaN(+r)||(S(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),Kt(this,Jt(n,r),e),this}}function Kt(e,t,n,a){var i=t._milliseconds,o=Zt(t._days),l=Zt(t._months);e.isValid()&&(a=null==a||a,l&&Ye(e,q(e,"Month")+l*n),o&&J(e,"Date",q(e,"Date")+o*n),i&&e._d.setTime(e._d.valueOf()+i*n),a&&r.updateOffset(e,o||l))}Jt.fn=Lt.prototype,Jt.invalid=function(){return Jt(NaN)};var en=Xt(1,"add"),tn=Xt(-1,"subtract");function nn(e){return"string"==typeof e||e instanceof String}function rn(e,t){if(e.date()<t.date())return-rn(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function an(e){var t;return void 0===e?this._locale._abbr:(null!=(t=gt(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var on=_("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function ln(){return this._locale}var sn=1e3,cn=6e4,un=36e5,dn=126227808e5;function hn(e,t){return(e%t+t)%t}function mn(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-dn:new Date(e,t,n).valueOf()}function fn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-dn:Date.UTC(e,t,n)}function pn(e,t){return t.erasAbbrRegex(e)}function gn(){var e,t,n=[],r=[],a=[],i=[],o=this.eras();for(e=0,t=o.length;e<t;++e)r.push(pe(o[e].name)),n.push(pe(o[e].abbr)),a.push(pe(o[e].narrow)),i.push(pe(o[e].name)),i.push(pe(o[e].abbr)),i.push(pe(o[e].narrow));this._erasRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}function vn(e,t){H(0,[e,e.length],0,t)}function yn(e,t,n,r,a){var i;return null==e?Be(this,r,a).year:(t>(i=Ge(e,r,a))&&(t=i),En.call(this,e,t,n,r,a))}function En(e,t,n,r,a){var i=je(e,t,n,r,a),o=Fe(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}H("N",0,0,"eraAbbr"),H("NN",0,0,"eraAbbr"),H("NNN",0,0,"eraAbbr"),H("NNNN",0,0,"eraName"),H("NNNNN",0,0,"eraNarrow"),H("y",["y",1],"yo","eraYear"),H("y",["yy",2],0,"eraYear"),H("y",["yyy",3],0,"eraYear"),H("y",["yyyy",4],0,"eraYear"),me("N",pn),me("NN",pn),me("NNN",pn),me("NNNN",function(e,t){return t.erasNameRegex(e)}),me("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),ve(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var a=n._locale.erasParse(e,r,n._strict);a?f(n).era=a:f(n).invalidEra=e}),me("y",se),me("yy",se),me("yyy",se),me("yyyy",se),me("yo",function(e,t){return t._eraYearOrdinalRegex||se}),ve(["y","yy","yyy","yyyy"],be),ve(["yo"],function(e,t,n,r){var a;n._locale._eraYearOrdinalRegex&&(a=e.match(n._locale._eraYearOrdinalRegex)),t[be]=n._locale.eraYearOrdinalParse?n._locale.eraYearOrdinalParse(e,a):parseInt(e,10)}),H(0,["gg",2],0,function(){return this.weekYear()%100}),H(0,["GG",2],0,function(){return this.isoWeekYear()%100}),vn("gggg","weekYear"),vn("ggggg","weekYear"),vn("GGGG","isoWeekYear"),vn("GGGGG","isoWeekYear"),R("weekYear","gg"),R("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),me("G",ce),me("g",ce),me("GG",ne,X),me("gg",ne,X),me("GGGG",oe,ee),me("gggg",oe,ee),me("GGGGG",le,te),me("ggggg",le,te),ye(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=B(e)}),ye(["gg","GG"],function(e,t,n,a){t[a]=r.parseTwoDigitYear(e)}),H("Q",0,"Qo","quarter"),R("quarter","Q"),F("quarter",7),me("Q",Q),ve("Q",function(e,t){t[ke]=3*(B(e)-1)}),H("D",["DD",2],"Do","date"),R("date","D"),F("date",9),me("D",ne),me("DD",ne,X),me("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ve(["D","DD"],_e),ve("Do",function(e,t){t[_e]=B(e.match(ne)[0])});var wn=G("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear"),R("dayOfYear","DDD"),F("dayOfYear",4),me("DDD",ie),me("DDDD",K),ve(["DDD","DDDD"],function(e,t,n){n._dayOfYear=B(e)}),H("m",["mm",2],0,"minute"),R("minute","m"),F("minute",14),me("m",ne),me("mm",ne,X),ve(["m","mm"],xe);var bn=G("Minutes",!1);H("s",["ss",2],0,"second"),R("second","s"),F("second",15),me("s",ne),me("ss",ne,X),ve(["s","ss"],Se);var kn,_n,Cn=G("Seconds",!1);for(H("S",0,0,function(){return~~(this.millisecond()/100)}),H(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,function(){return 10*this.millisecond()}),H(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),H(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),H(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),H(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),H(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),R("millisecond","ms"),F("millisecond",16),me("S",ie,Q),me("SS",ie,X),me("SSS",ie,K),kn="SSSS";kn.length<=9;kn+="S")me(kn,se);function xn(e,t){t[Me]=B(1e3*("0."+e))}for(kn="S";kn.length<=9;kn+="S")ve(kn,xn);_n=G("Milliseconds",!1),H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");var Sn=w.prototype;function Mn(e){return e}Sn.add=en,Sn.calendar=function(e,t){var n;1===arguments.length&&(arguments[0]?b(n=arguments[0])||u(n)||nn(n)||c(n)||function(e){var t=a(e),n=!1;return t&&(n=0===e.filter(function(t){return!c(t)&&nn(e)}).length),t&&n}(n)||function(e){var t,n=i(e)&&!l(e),r=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s=a.length;for(t=0;t<s;t+=1)r=r||o(e,a[t]);return n&&r}(n)||null==n?(e=arguments[0],t=void 0):function(e){var t,n=i(e)&&!l(e),r=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<a.length;t+=1)r=r||o(e,a[t]);return n&&r}(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var s=e||Ot(),d=Ut(s,this).startOf("day"),h=r.calendarFormat(this,d)||"sameElse",m=t&&(M(t[h])?t[h].call(this,s):t[h]);return this.format(m||this.localeData().calendar(h,this,Ot(s)))},Sn.clone=function(){return new w(this)},Sn.diff=function(e,t,n){var r,a,i;if(!this.isValid())return NaN;if(!(r=Ut(e,this)).isValid())return NaN;switch(a=6e4*(r.utcOffset()-this.utcOffset()),t=Z(t)){case"year":i=rn(this,r)/12;break;case"month":i=rn(this,r);break;case"quarter":i=rn(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-a)/864e5;break;case"week":i=(this-r-a)/6048e5;break;default:i=this-r}return n?i:j(i)},Sn.endOf=function(e){var t,n;if(void 0===(e=Z(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?fn:mn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=un-hn(t+(this._isUTC?0:this.utcOffset()*cn),un)-1;break;case"minute":t=this._d.valueOf(),t+=cn-hn(t,cn)-1;break;case"second":t=this._d.valueOf(),t+=sn-hn(t,sn)-1}return this._d.setTime(t),r.updateOffset(this,!0),this},Sn.format=function(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=z(this,e);return this.localeData().postformat(t)},Sn.from=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Ot(e).isValid())?Jt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Sn.fromNow=function(e){return this.from(Ot(),e)},Sn.to=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Ot(e).isValid())?Jt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Sn.toNow=function(e){return this.to(Ot(),e)},Sn.get=function(e){return M(this[e=Z(e)])?this[e]():this},Sn.invalidAt=function(){return f(this).overflow},Sn.isAfter=function(e,t){var n=b(e)?e:Ot(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=Z(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},Sn.isBefore=function(e,t){var n=b(e)?e:Ot(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=Z(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},Sn.isBetween=function(e,t,n,r){var a=b(e)?e:Ot(e),i=b(t)?t:Ot(t);return!!(this.isValid()&&a.isValid()&&i.isValid())&&("("===(r=r||"()")[0]?this.isAfter(a,n):!this.isBefore(a,n))&&(")"===r[1]?this.isBefore(i,n):!this.isAfter(i,n))},Sn.isSame=function(e,t){var n,r=b(e)?e:Ot(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=Z(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},Sn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},Sn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},Sn.isValid=function(){return p(this)},Sn.lang=on,Sn.locale=an,Sn.localeData=ln,Sn.max=Ht,Sn.min=Vt,Sn.parsingFlags=function(){return h({},f(this))},Sn.set=function(e,t){if("object"==typeof e){var n,r=function(e){var t,n=[];for(t in e)o(e,t)&&n.push({unit:t,priority:W[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=I(e)),a=r.length;for(n=0;n<a;n++)this[r[n].unit](e[r[n].unit])}else if(M(this[e=Z(e)]))return this[e](t);return this},Sn.startOf=function(e){var t,n;if(void 0===(e=Z(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?fn:mn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=hn(t+(this._isUTC?0:this.utcOffset()*cn),un);break;case"minute":t=this._d.valueOf(),t-=hn(t,cn);break;case"second":t=this._d.valueOf(),t-=hn(t,sn)}return this._d.setTime(t),r.updateOffset(this,!0),this},Sn.subtract=tn,Sn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},Sn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},Sn.toDate=function(){return new Date(this.valueOf())},Sn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?z(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):M(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",z(n,"Z")):z(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Sn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n="moment",r="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+n+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+r+'[")]')},"undefined"!=typeof Symbol&&null!=Symbol.for&&(Sn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Sn.toJSON=function(){return this.isValid()?this.toISOString():null},Sn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Sn.unix=function(){return Math.floor(this.valueOf()/1e3)},Sn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Sn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Sn.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""},Sn.eraNarrow=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""},Sn.eraAbbr=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""},Sn.eraYear=function(){var e,t,n,a,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,a=this.clone().startOf("day").valueOf(),i[e].since<=a&&a<=i[e].until||i[e].until<=a&&a<=i[e].since)return(this.year()-r(i[e].since).year())*n+i[e].offset;return this.year()},Sn.year=Ie,Sn.isLeapYear=function(){return U(this.year())},Sn.weekYear=function(e){return yn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Sn.isoWeekYear=function(e){return yn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Sn.quarter=Sn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Sn.month=Le,Sn.daysInMonth=function(){return Ne(this.year(),this.month())},Sn.week=Sn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Sn.isoWeek=Sn.isoWeeks=function(e){var t=Be(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},Sn.weeksInYear=function(){var e=this.localeData()._week;return Ge(this.year(),e.dow,e.doy)},Sn.weeksInWeekYear=function(){var e=this.localeData()._week;return Ge(this.weekYear(),e.dow,e.doy)},Sn.isoWeeksInYear=function(){return Ge(this.year(),1,4)},Sn.isoWeeksInISOWeekYear=function(){return Ge(this.isoWeekYear(),1,4)},Sn.date=wn,Sn.day=Sn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},Sn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},Sn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},Sn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},Sn.hour=Sn.hours=lt,Sn.minute=Sn.minutes=bn,Sn.second=Sn.seconds=Cn,Sn.millisecond=Sn.milliseconds=_n,Sn.utcOffset=function(e,t,n){var a,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ft(de,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(a=jt(this)),this._offset=e,this._isUTC=!0,null!=a&&this.add(a,"m"),i!==e&&(!t||this._changeInProgress?Kt(this,Jt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:jt(this)},Sn.utc=function(e){return this.utcOffset(0,e)},Sn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(jt(this),"m")),this},Sn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ft(ue,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},Sn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ot(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Sn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Sn.isLocal=function(){return!!this.isValid()&&!this._isUTC},Sn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Sn.isUtc=Bt,Sn.isUTC=Bt,Sn.zoneAbbr=function(){return this._isUTC?"UTC":""},Sn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Sn.dates=_("dates accessor is deprecated. Use date instead.",wn),Sn.months=_("months accessor is deprecated. Use month instead",Le),Sn.years=_("years accessor is deprecated. Use year instead",Ie),Sn.zone=_("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),Sn.isDSTShifted=_("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e,t={};return E(t,this),(t=Dt(t))._a?(e=t._isUTC?m(t._a):Ot(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var r,a=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),o=0;for(r=0;r<a;r++)B(e[r])!==B(t[r])&&o++;return o+i}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted});var An=T.prototype;function Tn(e,t,n,r){var a=gt(),i=m().set(r,t);return a[n](i,e)}function Nn(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return Tn(e,t,n,"month");var r,a=[];for(r=0;r<12;r++)a[r]=Tn(e,r,n,"month");return a}function Dn(e,t,n,r){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var a,i=gt(),o=e?i._week.dow:0,l=[];if(null!=n)return Tn(t,(n+o)%7,r,"day");for(a=0;a<7;a++)l[a]=Tn(t,(a+o)%7,r,"day");return l}An.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return M(r)?r.call(t,n):r},An.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(D).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},An.invalidDate=function(){return this._invalidDate},An.ordinal=function(e){return this._ordinal.replace("%d",e)},An.preparse=Mn,An.postformat=Mn,An.relativeTime=function(e,t,n,r){var a=this._relativeTime[n];return M(a)?a(e,t,n,r):a.replace(/%d/i,e)},An.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return M(n)?n(t):n.replace(/%s/i,t)},An.set=function(e){var t,n;for(n in e)o(e,n)&&(M(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},An.eras=function(e,t){var n,a,i,o=this._eras||gt("en")._eras;for(n=0,a=o.length;n<a;++n)switch("string"==typeof o[n].since&&(i=r(o[n].since).startOf("day"),o[n].since=i.valueOf()),typeof o[n].until){case"undefined":o[n].until=Infinity;break;case"string":i=r(o[n].until).startOf("day").valueOf(),o[n].until=i.valueOf()}return o},An.erasParse=function(e,t,n){var r,a,i,o,l,s=this.eras();for(e=e.toUpperCase(),r=0,a=s.length;r<a;++r)if(i=s[r].name.toUpperCase(),o=s[r].abbr.toUpperCase(),l=s[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(o===e)return s[r];break;case"NNNN":if(i===e)return s[r];break;case"NNNNN":if(l===e)return s[r]}else if([i,o,l].indexOf(e)>=0)return s[r]},An.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n},An.erasAbbrRegex=function(e){return o(this,"_erasAbbrRegex")||gn.call(this),e?this._erasAbbrRegex:this._erasRegex},An.erasNameRegex=function(e){return o(this,"_erasNameRegex")||gn.call(this),e?this._erasNameRegex:this._erasRegex},An.erasNarrowRegex=function(e){return o(this,"_erasNarrowRegex")||gn.call(this),e?this._erasNarrowRegex:this._erasRegex},An.months=function(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Oe).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone},An.monthsShort=function(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Oe.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},An.monthsParse=function(e,t,n){var r,a,i;if(this._monthsParseExact)return ze.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(a=m([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},An.monthsRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||Re.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=He),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},An.monthsShortRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||Re.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=Ve),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},An.week=function(e){return Be(e,this._week.dow,this._week.doy).week},An.firstDayOfYear=function(){return this._week.doy},An.firstDayOfWeek=function(){return this._week.dow},An.weekdays=function(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?qe(n,this._week.dow):e?n[e.day()]:n},An.weekdaysMin=function(e){return!0===e?qe(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},An.weekdaysShort=function(e){return!0===e?qe(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},An.weekdaysParse=function(e,t,n){var r,a,i;if(this._weekdaysParseExact)return tt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(a=m([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},An.weekdaysRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Xe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},An.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ke),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},An.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=et),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},An.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},An.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ft("en",{eras:[{since:"0001-01-01",until:Infinity,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-Infinity,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===B(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=_("moment.lang is deprecated. Use moment.locale instead.",ft),r.langData=_("moment.langData is deprecated. Use moment.localeData instead.",gt);var Pn=Math.abs;function On(e,t,n,r){var a=Jt(t,n);return e._milliseconds+=r*a._milliseconds,e._days+=r*a._days,e._months+=r*a._months,e._bubble()}function Vn(e){return e<0?Math.floor(e):Math.ceil(e)}function Hn(e){return 4800*e/146097}function zn(e){return 146097*e/4800}function Yn(e){return function(){return this.as(e)}}var Ln=Yn("ms"),Rn=Yn("s"),Zn=Yn("m"),In=Yn("h"),Wn=Yn("d"),Fn=Yn("w"),Un=Yn("M"),jn=Yn("Q"),Bn=Yn("y");function Gn(e){return function(){return this.isValid()?this._data[e]:NaN}}var qn=Gn("milliseconds"),Jn=Gn("seconds"),$n=Gn("minutes"),Qn=Gn("hours"),Xn=Gn("days"),Kn=Gn("months"),er=Gn("years"),tr=Math.round,nr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function rr(e,t,n,r,a){return a.relativeTime(t||1,!!n,e,r)}var ar=Math.abs;function ir(e){return(e>0)-(e<0)||+e}function or(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,a,i,o,l,s=ar(this._milliseconds)/1e3,c=ar(this._days),u=ar(this._months),d=this.asSeconds();return d?(e=j(s/60),t=j(e/60),s%=60,e%=60,n=j(u/12),u%=12,r=s?s.toFixed(3).replace(/\.?0+$/,""):"",a=d<0?"-":"",i=ir(this._months)!==ir(d)?"-":"",o=ir(this._days)!==ir(d)?"-":"",l=ir(this._milliseconds)!==ir(d)?"-":"",a+"P"+(n?i+n+"Y":"")+(u?i+u+"M":"")+(c?o+c+"D":"")+(t||e||s?"T":"")+(t?l+t+"H":"")+(e?l+e+"M":"")+(s?l+r+"S":"")):"P0D"}var lr=Lt.prototype;return lr.isValid=function(){return this._isValid},lr.abs=function(){var e=this._data;return this._milliseconds=Pn(this._milliseconds),this._days=Pn(this._days),this._months=Pn(this._months),e.milliseconds=Pn(e.milliseconds),e.seconds=Pn(e.seconds),e.minutes=Pn(e.minutes),e.hours=Pn(e.hours),e.months=Pn(e.months),e.years=Pn(e.years),this},lr.add=function(e,t){return On(this,e,t,1)},lr.subtract=function(e,t){return On(this,e,t,-1)},lr.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=Z(e))||"quarter"===e||"year"===e)switch(n=this._months+Hn(t=this._days+r/864e5),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(zn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},lr.asMilliseconds=Ln,lr.asSeconds=Rn,lr.asMinutes=Zn,lr.asHours=In,lr.asDays=Wn,lr.asWeeks=Fn,lr.asMonths=Un,lr.asQuarters=jn,lr.asYears=Bn,lr.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*B(this._months/12):NaN},lr._bubble=function(){var e,t,n,r,a,i=this._milliseconds,o=this._days,l=this._months,s=this._data;return i>=0&&o>=0&&l>=0||i<=0&&o<=0&&l<=0||(i+=864e5*Vn(zn(l)+o),o=0,l=0),s.milliseconds=i%1e3,e=j(i/1e3),s.seconds=e%60,t=j(e/60),s.minutes=t%60,n=j(t/60),s.hours=n%24,o+=j(n/24),l+=a=j(Hn(o)),o-=Vn(zn(a)),r=j(l/12),l%=12,s.days=o,s.months=l,s.years=r,this},lr.clone=function(){return Jt(this)},lr.get=function(e){return e=Z(e),this.isValid()?this[e+"s"]():NaN},lr.milliseconds=qn,lr.seconds=Jn,lr.minutes=$n,lr.hours=Qn,lr.days=Xn,lr.weeks=function(){return j(this.days()/7)},lr.months=Kn,lr.years=er,lr.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,a=!1,i=nr;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(a=e),"object"==typeof t&&(i=Object.assign({},nr,t),null!=t.s&&null==t.ss&&(i.ss=t.s-1)),r=function(e,t,n,r){var a=Jt(e).abs(),i=tr(a.as("s")),o=tr(a.as("m")),l=tr(a.as("h")),s=tr(a.as("d")),c=tr(a.as("M")),u=tr(a.as("w")),d=tr(a.as("y")),h=i<=n.ss&&["s",i]||i<n.s&&["ss",i]||o<=1&&["m"]||o<n.m&&["mm",o]||l<=1&&["h"]||l<n.h&&["hh",l]||s<=1&&["d"]||s<n.d&&["dd",s];return null!=n.w&&(h=h||u<=1&&["w"]||u<n.w&&["ww",u]),(h=h||c<=1&&["M"]||c<n.M&&["MM",c]||d<=1&&["y"]||["yy",d])[2]=t,h[3]=+e>0,h[4]=r,rr.apply(null,h)}(this,!a,i,n=this.localeData()),a&&(r=n.pastFuture(+this,r)),n.postformat(r)},lr.toISOString=or,lr.toString=or,lr.toJSON=or,lr.locale=an,lr.localeData=ln,lr.toIsoString=_("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",or),lr.lang=on,H("X",0,0,"unix"),H("x",0,0,"valueOf"),me("x",ce),me("X",/[+-]?\d+(\.\d{1,3})?/),ve("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),ve("x",function(e,t,n){n._d=new Date(B(e))}),r.version="2.29.4",t=Ot,r.fn=Sn,r.min=function(){return zt("isBefore",[].slice.call(arguments,0))},r.max=function(){return zt("isAfter",[].slice.call(arguments,0))},r.now=function(){return Date.now?Date.now():+new Date},r.utc=m,r.unix=function(e){return Ot(1e3*e)},r.months=function(e,t){return Nn(e,t,"months")},r.isDate=u,r.locale=ft,r.invalid=g,r.duration=Jt,r.isMoment=b,r.weekdays=function(e,t,n){return Dn(e,t,n,"weekdays")},r.parseZone=function(){return Ot.apply(null,arguments).parseZone()},r.localeData=gt,r.isDuration=Rt,r.monthsShort=function(e,t){return Nn(e,t,"monthsShort")},r.weekdaysMin=function(e,t,n){return Dn(e,t,n,"weekdaysMin")},r.defineLocale=pt,r.updateLocale=function(e,t){if(null!=t){var n,r,a=st;null!=ct[e]&&null!=ct[e].parentLocale?ct[e].set(A(ct[e]._config,t)):(null!=(r=mt(e))&&(a=r._config),t=A(a,t),null==r&&(t.abbr=e),(n=new T(t)).parentLocale=ct[e],ct[e]=n),ft(e)}else null!=ct[e]&&(null!=ct[e].parentLocale?(ct[e]=ct[e].parentLocale,e===ft()&&ft(e)):null!=ct[e]&&delete ct[e]);return ct[e]},r.locales=function(){return C(ct)},r.weekdaysShort=function(e,t,n){return Dn(e,t,n,"weekdaysShort")},r.normalizeUnits=Z,r.relativeTimeRounding=function(e){return void 0===e?tr:"function"==typeof e&&(tr=e,!0)},r.relativeTimeThreshold=function(e,t){return void 0!==nr[e]&&(void 0===t?nr[e]:(nr[e]=t,"s"===e&&(nr.ss=t-1),!0))},r.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=Sn,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()},rr(ar={exports:{}}),ar.exports),or={fontSize:"16px",fontWeight:400,lineHeight:"165%"},lr=function(){},sr=function(e){var t=void 0===e?{}:e,n=t.disabled,r=t.spinner,a=Te({},or,{backgroundColor:Ut.interaction55,color:r?"transparent":"surface",spinner:r?{color:Ut.interaction55}:void 0});return Te({},a,n?{backgroundColor:Ut.lightNeutral81,spinner:r?{color:Ut.lightNeutral81}:void 0}:{active:{backgroundColor:Ut.interaction45},focus:{backgroundColor:Ut.interaction55},hover:{backgroundColor:Ut.interaction50}})},cr="notification.mark_read",ur=[cr,"notification.mark_unread"],dr=function(){var e=l(Xn);if(!e)throw new Error("useChat must be used within a ChatProvider");return e},hr=function(){return l(qn)},mr=function(){var e=t.useState(null),n=e[0],r=e[1],a=null===n,i=hr();return t.useEffect(function(){i.chat.get("me/connected_people").then(function(e){return r(e)})},[]),{loading:a,people:n,switchPerson:fr}},fr=function(e,t,n){Le(Ye,u(n)("api")+"/login/v2/me/switch_connected_person",{data:{data:{attributes:{id:e,return_path:t}}},method:"POST"}).then(function(e){window.location=e.json.meta.redirect_to})},pr={plan_id:null,teams:[]},gr={Services:pr},vr=[["List",""],["Shortcuts","new/shortcuts"],["NewServices","new/services"],["NewGroups","new/groups"],["Conversation","conversations/:id"],["Details","conversations/:id/details"],["NewServicesPlan","new/services/plans/:plan_id/teams/:teams"],["NewServicesTeam","new/services/teams/:teams"],["BlankState","blankstate"]],yr=function(e){null!=e||(e="");var t=e.split("/"),n=vr.find(function(e){var n=e[1].split("/");return t.length===n.length&&n.every(function(e,n){return e.startsWith(":")||e===t[n]})});if(!n)return null;var r=n[0],a=n[1],i=a.split("/").reduce(function(e,n,r){var a;return n.startsWith(":")?Te({},e,((a={})[n.slice(1)]=t[r],a)):e},{});return{name:r,params:i,index:vr.indexOf(n),path:function(e){return void 0===e&&(e=i),a.split("/").reduce(function(t,n){return[].concat(t,[n.startsWith(":")?e[n.slice(1)]:n])},[]).join("/")}}},Er=["token"],wr={fontSize:"16px",fontWeight:600,lineHeight:"165%"},br=function(e){var n=e.children;return t.createElement(_,Te({level:2},wr),n)},kr=function(e){var n=e.children,r=e.loading;return t.createElement(p,{spacing:1},t.createElement(p,{spacing:1,alignment:"center",axis:"horizontal"},t.createElement(br,null,e.title),r&&t.createElement(M,{size:"sm"})),t.createElement(t.Fragment,null,n))},_r={Services:function(e){var n=e.groups,r=["Team","PlanTeam"].reduce(function(e,t){return n[t]?[].concat(e,n[t]):e},[]);return t.createElement(kr,{title:"Teams"},t.createElement(A,{spacing:1},r.map(function(e){return t.createElement(S,{key:e.source_identifier,size:"sm"},e.name)})))}},Cr=function(e){return t.createElement(t.Fragment,null,Object.entries(e.groups).reduce(function(e,n){var r=n[0],a=_r[r];return a?[].concat(e,[t.createElement(a,{key:r,groups:n[1]})]):e},[]))},xr="18px 1fr auto",Sr=function(e){var n=e.childPeople,a=r(!1),i=a[0],o=a[1],l=n.length,s=l+" "+(1===l?"member":"members")+" under age 13";return t.createElement(p,{background:Ut.warning94,marginBottom:.5,padding:1,radius:4},t.createElement(C,{alignment:"start",columns:xr,spacing:1},t.createElement(v,{color:Ut.warning49,marginTop:"1px",name:"general.shieldExclamation",size:"lg"}),t.createElement(g,{grow:1,color:"foreground",size:4},i?"Members under age 13 cannot chat. They will not see conversations or receive notifications.":s),t.createElement(f,{"aria-label":i?"Hide explanation":"Show explanation",icon:{name:i?"general.upCaret":"general.downCaret",size:"md"},onClick:function(){return o(!i)},size:"xs",theme:"warning",tooltip:i?"Hide explanation":"Show explanation",variant:"naked"})),t.createElement(T,{open:i},t.createElement(C,{alignment:"start",columns:xr,spacing:1},t.createElement(p,{gridColumnStart:2,paddingTop:1,spacing:1},n.map(function(e){return t.createElement(p,{alignment:"center",axis:"horizontal",key:e.id,spacing:1},t.createElement(x,{src:e.avatar,size:"sm"}),t.createElement(g,{color:"foreground",size:4,weight:500},e.name))})))))},Mr=function(e){var n=e.person;return t.createElement(n.child?Tr:Ar,{person:n})},Ar=function(e){var n=e.person;return t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1},t.createElement(x,{src:n.avatar,size:"lg"}),t.createElement(p,{alignment:"start",spacing:.25},t.createElement(g,{truncate:!0},n.name),n.badges.length>0&&t.createElement(p,{alignment:"center",axis:"horizontal",spacing:.5},n.badges.map(function(e){var n=e.title;return t.createElement(S,{key:n,size:"xs"},n)}))))},Tr=function(e){var n=e.person;return t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1},t.createElement(k,{opacity:.5},t.createElement(x,{src:n.avatar,size:"lg"})),t.createElement(p,null,t.createElement(g,{color:"foreground",opacity:.75,truncate:!0},n.name),t.createElement(p,{alignment:"center",axis:"horizontal",spacing:.5},t.createElement(v,{name:"general.shieldExclamation",color:Ut.warning49}),t.createElement(g,{color:Ut.warning20,size:5},"Not eligible to chat"))))},Nr=function(e){var n=function(e){var n=t.useState([]),r=n[0],a=n[1],i=t.useState(!1),o=i[0],l=i[1],s=hr();return t.useEffect(function(){e&&(l(!0),s.chat.get("me/conversations/"+e.id+"/members",{per_page:100},{unpaginated:!0}).then(function(e){a(e),l(!1)}).catch(lr))},[e]),{chatMembers:r,loadingChatMembers:o}}(e.channel),r=n.chatMembers,a=n.loadingChatMembers,i=r.filter(function(e){return e.child}),o=i.length>0,l=r.slice(0,500),s=r.length>500;return t.createElement(kr,{title:"People",loading:a},t.createElement(p,{paddingBottom:2,spacing:1.5},o&&t.createElement(Sr,{childPeople:i}),l.map(function(e){return t.createElement(Mr,{key:e.id,person:e})}),s&&t.createElement(g,{color:"foregroundSecondary"},"and ",r.length-l.length," more...")))},Dr=function(e){var n=e.channel,r=nr(n);return t.createElement(p,{axis:"horizontal",width:"100%"},t.createElement(g,{as:"label",display:"flex",grow:1},"Mute",t.createElement(p,{grow:1}),t.createElement(N,{isChecked:r,ariaLabel:"Mute Channel",onClick:function(){return r?n.unmute():n.mute()}})))},Pr=function(e){var n=e.channel,r=t.useState(!1),a=r[0],i=r[1],o=t.useState(!1),l=o[0],s=o[1],c=dr().navigation,u=hr();return t.createElement(k,null,!a&&t.createElement(f,{onClick:function(){return i(!0)},paddingHorizontal:0,paddingVertical:0,theme:!1},t.createElement(g,{color:"error"},"Delete conversation")),t.createElement(T,{open:a,instant:!0},t.createElement(p,{backgroundColor:"error-lightest",padding:2,radius:4,spacing:1},t.createElement(g,{size:4},"Deleting this conversation will remove it for everyone. This cannot be undone. Are you sure?"),t.createElement(p,{distribution:"end",alignment:"end",axis:"horizontal",spacing:1},t.createElement(f,{fontWeight:400,onClick:function(){return i(!1)},size:"sm",theme:"dark",variant:"naked"},"Cancel"),t.createElement(f,{disabled:l,fontWeight:400,onMouseDown:function(e){return e.preventDefault()},onClick:function(){s(!0),u.chat.delete("me/conversations/"+n.id).then(c.switchToChannelListView).catch(lr)},size:"sm",theme:"error",title:"Yes, delete",spinner:l})))))},Or=function(e){var n=e.channel,r=e.isRemovable;return t.createElement(kr,{title:"Settings"},t.createElement(p,{spacing:1},t.createElement(Dr,{channel:n}),r&&t.createElement(Pr,{channel:n})))},Vr=function(e){var n=e.channel,r=e.isEditable,a=t.useState(n.data.name),i=a[0],o=a[1],l=hr();return t.createElement(kr,{title:"Title"},t.createElement(D,{size:"lg",value:i,maxLength:255,disabled:!r,onChange:function(e){return o(e.target.value)},onBlur:function(){i!==n.data.name&&l.chat.patch("me/conversations/"+n.id,{title:i}).catch(lr)},onKeyDown:function(e){return"Enter"===e.key&&e.target.blur()}}))},Hr=function(e){var n=e.channel,r=function(e){var n=t.useState([]),r=n[0],a=n[1],i=hr();return t.useEffect(function(){e&&i.chat.get("me/conversations/"+e.id+"/groups").then(a).catch(lr)},[e]),r.reduce(function(e,t){var n,r,a;return e[n=t.source_app_name]||(e[n]={}),(r=e[t.source_app_name])[a=t.source_type]||(r[a]=[]),e[t.source_app_name][t.source_type].push(t),e},{})}(n),a=function(e){var n=hr(),r=t.useState({canDelete:!1,canUpdate:!1}),a=r[0],i=r[1];return t.useEffect(function(){n.chat.get("/me/conversations/"+e.id+"/member_ability").then(function(e){return i({canDelete:e.can_delete,canUpdate:e.can_update})})},[e]),a}(n);return t.createElement(Rn,null,t.createElement(p,{padding:2,spacing:4,grow:1,distribution:"start"},t.createElement(Vr,{channel:n,isEditable:a.canUpdate}),t.createElement(Or,{channel:n,isRemovable:a.canDelete}),Object.keys(r).length>0&&t.createElement(Cr,{groups:r}),t.createElement(Nr,{channel:n})))},zr=function(){var e=B().channel,n=dr().navigation;return e&&n.isChannelDetailsViewActive?t.createElement(t.Fragment,null,t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1,padding:2,paddingTop:1},t.createElement(f,{"aria-label":"Switch to chat list",color:Ut.lightNeutral12,icon:"general.leftChevron",onClick:function(){return n.switchToChannelView(e.id)},size:"sm",title:"Back to chat list",variant:"naked"}),t.createElement(Vn,{truncate:!0},"Conversation details")),t.createElement(Hr,{channel:e})):null},Yr=function(){return t.createElement(p,{alignment:"center",distribution:"center",padding:4,paddingTop:"54px",width:"100%"},t.createElement(Lr,null),t.createElement(_,{color:"foreground",fontWeight:500,marginTop:1,size:3},"No conversations"))},Lr=function(){return t.createElement("svg",{width:"162",height:"124",viewBox:"0 0 162 124",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M157.354 67.5522C151.241 85.6769 138.257 101.123 124.335 110.111C110.102 119.278 94.9458 121.54 77.5441 117.715C60.3357 113.846 43.3207 105.974 29.2803 98.519C15.344 90.6768 4.35267 83.5043 1.63086 72.2247C-1.04633 61.2576 4.81374 46.0644 18.8987 31.0943C32.835 16.3773 54.9962 2.71679 81.3665 0.469802C107.543 -2.16409 131.594 6.57091 145.381 19.3088C159.526 32.1211 163.437 49.5613 157.369 67.5522H157.354Z",fill:"#EDF6FB"}),t.createElement("g",{opacity:"0.2"},t.createElement("path",{opacity:"0.2",d:"M102.204 121.658C88.8481 124.173 75.9678 121.851 62.6562 114.947C47.0244 106.747 32.642 94.7534 20.9962 83.9054C9.55863 72.7299 0.798274 62.9533 1.08087 51.3463C1.25935 43.147 6.37575 33.9656 15.85 25.4092",stroke:"#BAC7D3",strokeWidth:"1.48",strokeMiterlimit:"10"}),t.createElement("path",{opacity:"0.2",d:"M152.714 87.1641C143.909 100.408 130.985 110.631 117.792 116.628",stroke:"#BAC7D3",strokeWidth:"1.48",strokeMiterlimit:"10"}),t.createElement("path",{opacity:"0.2",d:"M36.5986 11.6C53.108 3.53464 74.4809 -1.27187 96.6421 2.6864C122.611 6.91253 143.582 21.5701 153.607 37.4478C160.761 48.5191 162.62 60.4683 159.63 72.0009",stroke:"#BAC7D3",strokeWidth:"1.48",strokeMiterlimit:"10"})),t.createElement("path",{d:"M108.125 25.5668H52.4657C49.4438 25.4274 46.4893 26.4961 44.2438 28.5407C41.9982 30.5854 40.6427 33.441 40.4717 36.4876V72.233C40.6427 75.2796 41.9982 78.1352 44.2438 80.1799C46.4893 82.2245 49.4438 83.2931 52.4657 83.1538H64.7654L80.2729 96.7441L95.7804 83.1538H108.125C111.147 83.2931 114.102 82.2245 116.347 80.1799C118.593 78.1352 119.948 75.2796 120.119 72.233V36.4876C119.948 33.441 118.593 30.5854 116.347 28.5407C114.102 26.4961 111.147 25.4274 108.125 25.5668Z",fill:"#48A5E5"}),t.createElement("path",{d:"M64.8701 59.3043C62.3848 59.3043 60.3701 57.2886 60.3701 54.8021C60.3701 52.3155 62.3848 50.2998 64.8701 50.2998C67.3554 50.2998 69.3701 52.3155 69.3701 54.8021C69.3701 57.2886 67.3554 59.3043 64.8701 59.3043Z",fill:"#EEF5FD"}),t.createElement("path",{d:"M79.9258 59.3043C77.4405 59.3043 75.4258 57.2886 75.4258 54.8021C75.4258 52.3155 77.4405 50.2998 79.9258 50.2998C82.4111 50.2998 84.4258 52.3155 84.4258 54.8021C84.4258 57.2886 82.4111 59.3043 79.9258 59.3043Z",fill:"#EEF5FD"}),t.createElement("path",{d:"M95.0615 59.3043C92.5762 59.3043 90.5615 57.2886 90.5615 54.8021C90.5615 52.3155 92.5762 50.2998 95.0615 50.2998C97.5468 50.2998 99.5615 52.3155 99.5615 54.8021C99.5615 57.2886 97.5468 59.3043 95.0615 59.3043Z",fill:"#EEF5FD"}),t.createElement("path",{d:"M124.007 65.7374H96.4523C94.9563 65.6685 93.4937 66.1975 92.382 67.2097C91.2703 68.2219 90.5993 69.6355 90.5146 71.1438V88.8395C90.5993 90.3477 91.2703 91.7614 92.382 92.7736C93.4937 93.7858 94.9563 94.3148 96.4523 94.2458H102.541L110.218 100.974L117.895 94.2458H124.007C125.503 94.3148 126.965 93.7858 128.077 92.7736C129.188 91.7614 129.859 90.3477 129.944 88.8395V71.1438C129.859 69.6355 129.188 68.2219 128.077 67.2097C126.965 66.1975 125.503 65.6685 124.007 65.7374Z",fill:"#79CAF2"}),t.createElement("path",{d:"M102.594 82.4391C101.363 82.4391 100.366 81.4412 100.366 80.2103C100.366 78.9793 101.363 77.9814 102.594 77.9814C103.824 77.9814 104.821 78.9793 104.821 80.2103C104.821 81.4412 103.824 82.4391 102.594 82.4391Z",fill:"#EEF5FD"}),t.createElement("path",{d:"M110.047 82.4391C108.816 82.4391 107.819 81.4412 107.819 80.2103C107.819 78.9793 108.816 77.9814 110.047 77.9814C111.277 77.9814 112.274 78.9793 112.274 80.2103C112.274 81.4412 111.277 82.4391 110.047 82.4391Z",fill:"#EEF5FD"}),t.createElement("path",{d:"M117.54 82.4391C116.31 82.4391 115.312 81.4412 115.312 80.2103C115.312 78.9793 116.31 77.9814 117.54 77.9814C118.77 77.9814 119.768 78.9793 119.768 80.2103C119.768 81.4412 118.77 82.4391 117.54 82.4391Z",fill:"#EEF5FD"}))},Rr=function(e){var a=e.appName,i=e.env,o=e.currentPersonId,l=mr(),s=l.people,c=l.loading,u=l.switchPerson,d=r(s),h=d[0],m=d[1],f=r(null),g=f[0],v=f[1],y=r(!1),E=y[0],w=y[1],b=null==h?void 0:h.some(function(e){return e.id!==""+o&&e.unread_count});return n(function(){if(s){var e=s.sort(function(e,t){return e.organization_name.localeCompare(t.organization_name)});m(e);var t=s.find(function(e){return e.id===""+o});v(t)}},[s]),t.createElement(p,{paddingHorizontal:2},t.createElement(P,{emptyValue:"Linked Accounts",disabled:E,matchWidths:!0,onChange:function(e){var t=e.value,n=h.find(function(e){return e.id===t});v(n),n.id!==""+o&&(w(!0),u(n.id,a+"/",i))},value:null==g?void 0:g.id,renderValue:function(){return t.createElement(p,{alignment:"center",axis:"horizontal",distribution:"space-between",spacing:1},g.organization_name,b&&!E&&t.createElement(zn,{right:3.5,top:1.25}),E&&t.createElement(M,{key:"loader",position:"absolute",height:1.5,width:1.5,zIndex:6,right:3.5,top:1.25}))}},t.createElement(Ir,null),null==h?void 0:h.map(function(e){return t.createElement(P.Option,{value:e.id,key:e.id},t.createElement(p,{alignment:"center",axis:"horizontal",distribution:"space-between",spacing:1},e.organization_name,e.unread_count>0&&t.createElement(zn,{right:1.5,top:1.25})))}),c&&t.createElement(Zr,null)))},Zr=function(){return t.createElement(O.Item,{alignment:"center",distribution:"center",paddingBottom:2,paddingTop:2},t.createElement(M,null))},Ir=function(){return t.createElement(p,{axis:"horizontal",backgroundColor:Ut.interaction97,marginBottom:.5,marginHorizontal:1.25,marginTop:1,padding:1,radius:4,spacing:1},t.createElement(v,{color:Ut.interaction66,marginTop:"3px",name:"general.outlinedExclamationCircle"}),t.createElement(g,{size:5},"Make sure any changes outside of chat are saved before switching accounts."))},Wr=function(){return t.createElement(p,{alignment:"center",spacing:2,padding:2,paddingTop:"10%"},t.createElement(v,{name:"general.exclamationTriangle",color:"warning",size:"xl"}),t.createElement(g,{color:"foregroundSecondary",align:"center"},"An error occured while connecting to the chat, please try again."))},Fr=function(e){var n,r,a,i,o=e.children,l=e.error,s=void 0===l?null:l,c=e.loading,u=dr().navigation,d=(n=t.useState({}),r=n[0],a=n[1],i=hr(),t.useEffect(function(){i.chat.get("me/app_grants").then(function(e){return e.reduce(function(e,t){var n;return Te({},e,((n={})[t.app_name]=t,n))},{})}).then(a)},[]),{canCreateChat:function(e){return r[e]&&r[e].create_conversations}}),h=d.canCreateChat("Services")||d.canCreateChat("Groups");return s?t.createElement(Wr,null):c?null:t.createElement(p,{grow:1,shrink:1},t.createElement(Rn,null,o),t.createElement(m,null),t.createElement(p,{padding:2,alignment:"stretch"},h&&t.createElement(f,Te({"aria-label":"Switch to new conversation",onClick:u.switchToNewChatShortcutsView},sr()),"New conversation")))},Ur={groups:"Groups",services:"Services"},jr=function(e){var n,r,a=e.appName,i=e.channel;switch(a){case"Groups":var o,l,s=i.data[a];n="Group",null!=s&&null!=(o=s.names)&&o.length&&(r=null==(l=s.names)?void 0:l.join(", "));break;case"Services":var c=i.data[a];n=null!=c&&c.dates?"Plan":"Team",null!=c&&c.dates&&(r=c.dates)}return t.createElement(V,{radius:4,spacing:"0.25px",className:"channel-meta",maxWidth:"100%"},t.createElement(p,{alignment:"center",axis:"horizontal",backgroundColor:Ut.lightNeutral95,borderColor:Ut.lightNeutral95,borderWidth:1,distribution:"center",padding:.5,paddingHorizontal:1,spacing:.5},t.createElement(At,{appName:a,size:15}),t.createElement(g,{lineHeight:"13px",size:5,weight:500},n)),r&&t.createElement(p,{alignment:"center",borderColor:Ut.lightNeutral95,borderLeftWidth:0,borderWidth:1,distribution:"center",padding:.5,paddingHorizontal:1,shrink:1},t.createElement(H,{title:r,openDelay:800},t.createElement(g,{color:"foregroundSecondary",lineHeight:"13px",size:5,truncate:!0,maxWidth:"100%"},r))))},Br=function(e){var n,r=e.channel;if(null==r||null==(n=r.data)||!n.pco_apps)return null;var a=r.data.pco_apps.map(function(e){return t.createElement(jr,{key:e,appName:Ur[e],channel:r})});return t.createElement(p,{axis:"horizontal",maxWidth:"calc(100% + 24px)"},a)},Gr=function(e){var n,r,a=e.size;return t.createElement(G,{image:(n=e.member,null==(r=n.user)?void 0:r.image),shape:"square",size:void 0===a?40:a})},qr=function(e){var n=e.members,r=null;return 1===n.length&&(r=t.createElement(Gr,{member:n[0]})),2===n.length&&(r=t.createElement(t.Fragment,null,t.createElement("div",null,t.createElement(Gr,{member:n[0]})),t.createElement("div",{style:{marginLeft:"-20px"}},t.createElement(Gr,{member:n[1]})))),3===n.length&&(r=t.createElement(t.Fragment,null,t.createElement("div",null,t.createElement(Gr,{member:n[0]})),t.createElement("div",{style:{marginLeft:"-20px"}},t.createElement(Gr,{member:n[1],size:20}),t.createElement(Gr,{member:n[2],size:20})))),n.length>=4&&(r=t.createElement(t.Fragment,null,t.createElement("div",null,t.createElement(Gr,{member:n[n.length-4],size:20}),t.createElement(Gr,{member:n[n.length-3],size:20})),t.createElement("div",null,t.createElement(Gr,{member:n[n.length-2],size:20}),t.createElement(Gr,{member:n[n.length-1],size:20})))),t.createElement("div",{className:"str-chat__avatar-group"},r)},Jr=function(e){var n=e.unread;if(n<1)return null;var r=n<=99?n.toString():"99+";return t.createElement(S,{title:r,size:"xs",color:Ut.interaction66,radius:"pill",minWidth:3})},$r=function(e){var n=e.channel,r=e.lastMessage,a=e.setActiveChannel,i=e.unread,o=B().client,l=dr(),s=l.setActionsOpenForChannel,c=l.actionsOpenForChannel,u=l.navigation,d=nr(n),h=function(e,n){var r=B().client,a=t.useState(n),i=a[0],o=a[1];t.useEffect(function(){o(n)},[n]),t.useEffect(function(){var t=function(t){var n,a;if(t.cid===e.cid&&(null==(n=t.user)?void 0:n.id)===(null==(a=r.user)?void 0:a.id)){var i=t.type===cr?0:e.countUnread();o(i)}};return ur.forEach(function(e){return r.on(e,t)}),function(){return ur.forEach(function(e){return r.off(e,t)})}},[]);var l=t.useMemo(function(){return function(e,t){for(var n=e.length-1;n>=0;n--)if((null==(a=e[n].user)?void 0:a.id)!==r.userID)return e[n];var a}(e.state.latestMessages)},[i]),s=Boolean(null==l?void 0:l.id);return{isUnread:Boolean(i),isUnreadable:s,markRead:function(){return e.markRead()},markUnread:function(){return s&&e.markUnread({message_id:l.id})},unreadCount:i}}(n,i),m=h.isUnread,f=h.isUnreadable,y=h.markRead,E=h.markUnread,w=h.unreadCount,b=c===n.id,x=function(e){"actions-dropdown"!==e.target.getAttribute("data-type")&&(a(n),u.switchToChannelView(n.id))},S=Object.values(n.state.members).filter(function(e){return e.user.id!==o.userID}),M=n.data.name;return t.createElement(C,{alignment:"start","aria-label":"Select Channel: "+(M||""),backgroundColor:b?"surfaceTertiary":"surface",borderBottomColor:"separatorTertiary",borderBottomWidth:1,columns:"auto 1fr auto",cursor:"pointer",css:{"&:hover":{".actions-dropdown":{visibility:"visible"},".channel-meta > *":{borderColor:Ut.lightNeutral88},backgroundColor:"surfaceTertiary"},"@media (hover: none)":{".actions-dropdown":{visibility:"visible"}}},minHeight:10,onClick:x,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||x(e)},padding:1,paddingHorizontal:2,radius:0,role:"button",spacing:1,tabIndex:0,width:"100%"},t.createElement(qr,{members:S}),t.createElement(p,{height:"100%",alignment:"start",paddingRight:1},t.createElement(_,{level:4,maxWidth:"100%",truncate:!0,weight:500},M),t.createElement(g,{color:"foregroundSecondary",css:{WebkitBoxOrient:"vertical",WebkitLineClamp:"2",display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis"},lineHeight:"1.35",maxWidth:"100%",size:4,textAlign:"left"},function(e){var t,n;if(!e)return"Empty conversation";var r=null==(t=e.user)?void 0:t.name,a=null==(n=e.attachments)?void 0:n.length;return r+": "+((e.deleted_at?"Message deleted":e.text)||(1===a?"1 attachment":a+" attachments"))}(r)),t.createElement(p,{basis:.5,grow:1}),t.createElement(Br,{channel:n})),t.createElement(p,{alignment:"end",minWidth:6,height:"100%"},t.createElement(g,{color:"foregroundSecondary",size:5},function(e){var t,n,r=null==(t=e.state)?void 0:t.last_message_at,a=null==(n=e.data)?void 0:n.created_at;if(!r&&!a)return null;var i=new Date(r||a);return isNaN(i.getTime())?null:function(e){var t=ir(),n=t.isSame(e,"day"),r=t.isSame(e,"week"),a=t.isSame(e,"year");return n?de.time(e):de.date(e,r?{style:"relative"}:a?{style:"abbreviated"}:{style:"short",year:!0})}(i)}(n)),t.createElement(p,{alignment:"end",alignSelf:"stretch",grow:1},d?t.createElement(v,{name:"general.bellMuted"}):t.createElement(Jr,{unread:w})),t.createElement(k,{onClick:function(e){return e.stopPropagation()}},t.createElement(z,{alignSelf:"end",className:"actions-dropdown","data-type":"actions-dropdown",icon:{name:"people.importProgress",size:"lg"},radius:"circle",iconRight:null,lockScrollWhileOpen:!0,onClose:function(){return s(null)},onOpen:function(){return s(n.id)},placement:"top-end",popoverProps:{offset:4,shouldFlip:!0},right:"1.5px",size:"xs",theme:"dark",title:"Chat actions",variant:"naked",visibility:b?"visible":"hidden"},t.createElement(z.Item,{disabled:!(m||f),onSelect:m?y:E},"Mark "+(m?"read":"unread")),t.createElement(z.Item,{onSelect:function(){return d?n.unmute():n.mute()}},d?"Unmute":"Mute")))))},Qr=function(e){var a,o,l,s,c=e.client,u=e.closeDrawer,d=e.env,h=e.appName,m=e.currentPersonId,f=(o=(a=r(!0))[0],l=a[1],s=B("ChannelList").channelsQueryState.queryInProgress,n(function(){l(null!=s)},[s]),o),g=It().hasConnectedPeople,v={$or:[{last_message_at:{$exists:!0}},{created_by_id:c.userID}],members:{$in:[c.userID]},type:"messaging"},y=i(function(e,t){try{var n=t.channel;if(null==n||!n.id)return Promise.resolve();if(!Boolean(n.last_message_at))return Promise.resolve();var r=function(t,r){try{var a=(i=c.channel(n.type,n.id),Promise.resolve(i.watch()).then(function(){e(function(e){return[i].concat(e)})}))}catch(e){return r(e)}var i;return a&&a.then?a.then(void 0,r):a}(0,function(e){console.error(e)});return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},[c.userID]);return t.createElement(t.Fragment,null,t.createElement(Pn,{closeDrawer:u},t.createElement(p,{axis:"horizontal",alignment:"center",spacing:1},t.createElement(Vn,null,"Chat"),t.createElement(er,null),f&&t.createElement(M,{color:"hsl(0 0% 62%)",thickness:2,trackColor:"hsl(0 0% 97%)"}))),t.createElement(p,{spacing:2,grow:1},g&&t.createElement(Rr,{env:d,appName:h,currentPersonId:m}),t.createElement(q,{setActiveChannelOnMount:!1,EmptyStateIndicator:Yr,filters:v,onMessageNew:y,onAddedToChannel:y,List:Fr,Paginator:J,Preview:$r})))},Xr=function(){return t.createElement(p,{alignment:"center",distribution:"center",height:"100%",spacing:1},t.createElement(v,{color:Ut.lightNeutral81,name:"general.outlinedTextMessage",size:"64px"}),t.createElement(g,{color:"foregroundTertiary"},"No conversation"))},Kr=function(e){var r=e.channel,a=e.closeDrawer,i=e.switchToChannelDetailsView,l=e.switchToChannelListView,s=e.title,c=function(e){var t=e.setOverflowBottom,r=e.setOverflowTop,a=$(),i=a.listElement,l=a.scrollToBottom,s=o(null);return n(function(){var e=new ResizeObserver(function(){i&&t(i.scrollHeight-i.clientHeight>i.scrollTop+1)});return e.observe(i),function(){return e.unobserve(i)}},[i,t]),n(function(){var e,n=i.scrollTop,a=i.scrollHeight,o=i.clientHeight;r(n>0),t(a-o>n+1);var c=null==s||null==(e=s.current)?void 0:e.offsetHeight;i.style.marginTop=c+"px",l()},[i]),n(function(){var e=function(){var e=i.scrollTop,n=i.scrollHeight,a=i.clientHeight;r(e>0),t(n-a>e+1)};return i.addEventListener("scroll",e),function(){return i.removeEventListener("scroll",e)}},[i,r,t]),{headerRef:s}}({setOverflowBottom:e.setOverflowBottom,setOverflowTop:e.setOverflowTop});return t.createElement(ea,{channel:r,closeDrawer:a,innerRef:c.headerRef,switchToChannelDetailsView:i,switchToChannelListView:l,title:s})},ea=function(e){var n=e.channel,r=e.closeDrawer,a=e.switchToChannelDetailsView,i=e.title,o=e.innerRef;return t.createElement(p,{axis:"horizontal",backgroundColor:"surface",innerRef:void 0===o?null:o,left:0,padding:2,paddingTop:1,position:"absolute",right:0,spacing:1,top:0,zIndex:5},t.createElement(f,{alignSelf:"baseline","aria-label":"Switch to chat list",icon:{color:Ut.lightNeutral12,name:"general.leftChevron"},marginTop:.25,onClick:e.switchToChannelListView,size:"md",title:"Back to chat list",variant:"naked"}),t.createElement(p,{shrink:1},t.createElement(Vn,{truncate:!0},i),t.createElement(Br,{channel:n})),t.createElement(p,{alignment:"start",axis:"horizontal",marginLeft:"auto",spacing:.25},t.createElement(f,{"aria-label":"Switch to conversation details",icon:{color:Ut.lightNeutral12,name:"general.cog"},onClick:a,size:"md",title:"Conversation details",variant:"naked"}),t.createElement(f,{"aria-label":"Close drawer",icon:{color:Ut.lightNeutral12,name:"general.x"},onClick:r,size:"md",title:"Close drawer",variant:"naked"})))},ta={placement:"top",popoverProps:{backgroundColor:"surface",color:"foreground",elevation:2,offset:0,paddingHorizontal:1,paddingVertical:1,radius:6}},na={alignment:p.CENTER,axis:p.HORIZONTAL,distribution:p.CENTER,marginRight:.5,padding:.5,spacing:.5},ra=function(){return t.createElement(Q,{MessageReadStatus:ia,MessageDeliveredStatus:aa})},aa=function(){return t.createElement(H,Te({title:"Delivered"},ta),t.createElement(p,Te({},na),t.createElement(v,{name:"general.check"})))},ia=function(){var e,n=B().client,r=X("MessageStatus").readBy,a=K("MessageStatus"),i=ee(r,a.t,n,te),o=1===(null==r?void 0:r.length)&&r[0].id===(null==(e=n.user)?void 0:e.id),l=(null!=r&&r.length&&!o?r.filter(function(e){var t;return e.id!==(null==(t=n.user)?void 0:t.id)}):[]).length;return t.createElement(H,Te({title:i},ta),t.createElement(p,Te({},na),t.createElement(g,{size:5,color:"foregroundSecondary",shrink:0,userSelect:"none"},l),t.createElement(v,{name:"general.checkDouble",size:"lg"})))},oa=[{Component:function(){return t.createElement(t.Fragment,null,"❤️")},name:"Love",type:"heart"},{Component:function(){return t.createElement(t.Fragment,null,"🙏")},name:"Pray",type:"pray"},{Component:function(){return t.createElement(t.Fragment,null,"😂")},name:"Laughing",type:"laughing"},{Component:function(){return t.createElement(t.Fragment,null,"👍")},name:"Thumbs up",type:"+1"},{Component:function(){return t.createElement(t.Fragment,null,"👎")},name:"Thumbs down",type:"-1"}];pe({data:fe});var la=ge,sa=function(){var e=ne(),n=e.handleSubmit,a=e.isUploadEnabled,i=e.maxFilesLeft,o=e.numberOfUploads,l=e.text,s=e.uploadNewFiles,c=r(!1),u=c[0],d=c[1],h=re().multipleUploads,m=ye({disabled:!a||0===i,multiple:h,noClick:!0,onDrop:s}),g=m.getRootProps,v=m.isDragActive,y=m.isDragReject,E=da(),w=E.isChildOfModal,b=E.ref,_=ha(),x=!o&&!l.length;return t.createElement(C,{alignment:"end",borderColor:"separatorTertiary",borderTopWidth:w?0:1,columns:"auto 1fr auto",innerRef:b,padding:2,spacing:1},t.createElement(ca,{isUploadEnabled:a,maxFilesLeft:i,multipleUploads:h,uploadNewFiles:s}),t.createElement(p,Te({},g({borderColor:"separatorTertiary",borderWidth:1,className:w?"is-modal-child":"",outline:u?Ut.interaction66:"none",outlineOffset:1,outlineStyle:u?"solid":"none",position:"relative",radius:8,refKey:"innerRef"})),v&&t.createElement(ua,{isDragReject:y}),a&&!!o&&t.createElement(ae,null),t.createElement(p,{alignment:"end",axis:"horizontal",position:"relative",spacing:.5},t.createElement(k,{grow:1,innerRef:_},t.createElement(ie,{placeholder:"Send a message",onFocus:function(){return d(!0)},onBlur:function(e){return"blur"===e.type&&d(!1)}})),t.createElement(k,{marginBottom:1.25,marginRight:1},t.createElement(we,{pickerProps:{previewPosition:"none",theme:"light"}})))),t.createElement(f,Te({className:"focus-visible",disabled:x,icon:{color:"surface",name:"general.upArrow"},marginBottom:"10px",onClick:n,radius:"circle",size:"sm",title:w?"Save":"Send",tabIndex:0},sr({disabled:x}))))},ca=function(e){var n=e.isUploadEnabled,r=e.maxFilesLeft,a=e.multipleUploads,i=e.uploadNewFiles,o=t.useMemo(function(){return ve()},[]),l=document.getElementById(o);return t.createElement(k,{marginBottom:1.5},t.createElement("label",{htmlFor:o,tabIndex:0,onKeyDown:function(e){!l||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),l.click())},className:"str-chat__file-label"},t.createElement(v,{color:Ut.lightNeutral45,css:{"&:active":{fill:Ut.lightNeutral12},"&:hover":{fill:Ut.lightNeutral24}},cursor:"pointer",name:"general.paperclip",size:"20px"})),t.createElement(Ee,{"aria-label":"File upload",className:"str-chat__file-input",disabled:!n||0===r,id:o,multiple:a,onFileChange:i}))},ua=function(e){var n=e.isDragReject;return t.createElement(p,{alignment:"center",backgroundColor:"surfaceTertiary",borderColor:n?"error-dark":"success-darker",borderRadius:8,borderStyle:"dashed",borderWidth:1,bottom:0,distribution:"center",left:0,position:"absolute",right:0,top:0,zIndex:10},t.createElement(g,{color:n?"error-dark":"success-darker",size:4,weight:600},n?"Some of the files will not be accepted":"Drop your files here"))},da=function(){var e=r(!1),t=e[0],a=e[1],i=o(null);return n(function(){var e=document.querySelector(".str-chat__modal");a(null==e?void 0:e.contains(i.current))},[]),{isChildOfModal:t,ref:i}},ha=function(){var e=t.useRef(null);return n(function(){if(e.current){var t,n,r,a=null==(t=e.current)?void 0:t.querySelector("textarea");null==a||a.focus(),null==a||a.setSelectionRange(null==a||null==(n=a.value)?void 0:n.length,null==a||null==(r=a.value)?void 0:r.length)}},[]),e},ma=function(){var e,a,i=B(),o=i.client,l=i.channel,s=dr(),c=s.closeDrawer,u=s.navigation,d=(null==l||null==(e=l.data)?void 0:e.name)||"Channel name",h=r(0)[1],m=r(!1),f=m[0],g=m[1],v=r(!1),y=v[0],E=v[1];n(function(){if(!l)return lr;var e=function(e){l&&l.cid===e.cid&&h(function(e){return e+1})};return o.on("channel.updated",e),function(){return o.off("channel.updated",e)}},[null==l?void 0:l.cid]);var w=!(null==l||null==(a=l.data)||!a.last_message_at),b={channel:l,closeDrawer:c,navigation:u,title:d};return t.createElement(p,{grow:1,shrink:1},t.createElement(oe,{Input:sa,EditMessageInput:sa,emojiSearchIndex:la,EmptyStateIndicator:Xr,reactionOptions:oa,doMarkReadRequest:function(e){return u.isChannelViewActive&&me(e.markRead(),"mark read")},MessageStatus:ra},t.createElement(le,null,w?t.createElement(fa,Te({},b,{overflowBottom:y,overflowTop:f,setOverflowBottom:E,setOverflowTop:g})):t.createElement(pa,Te({},b)),t.createElement(k,{position:"relative"},y&&t.createElement(k,Te({},Ln.bottom,{bottom:"unset",height:1,left:-1,pointerEvents:"none",position:"absolute",right:-1,role:"presentation",top:-1,zIndex:10})),t.createElement(se,{disableMentions:!0,grow:!0})))))},fa=function(e){var n=e.overflowTop,r=e.navigation;return t.createElement(ce,{head:t.createElement(s,{key:"custom-head"},t.createElement(Kr,{channel:e.channel,closeDrawer:e.closeDrawer,setOverflowBottom:e.setOverflowBottom,setOverflowTop:e.setOverflowTop,switchToChannelDetailsView:r.switchToChannelDetailsView,switchToChannelListView:r.switchToChannelListView,title:e.title}),n&&t.createElement(k,Te({},Ln.top,{height:1,left:-1,pointerEvents:"none",position:"absolute",right:-1,role:"presentation",top:"unset",zIndex:10}))),messageActions:["edit","delete","react"]})},pa=function(e){var n=e.navigation;return t.createElement(t.Fragment,null,t.createElement(ea,{channel:e.channel,closeDrawer:e.closeDrawer,switchToChannelDetailsView:n.switchToChannelDetailsView,switchToChannelListView:n.switchToChannelListView,title:e.title}),t.createElement(ce,{messageActions:["edit","delete","react"]}))};function ga(){var e=document.head.querySelectorAll('meta[property^="pco:"]'),t={};return e.forEach(function(e){var n,r=e.getAttribute("property");t[r.substring("pco:".length)]="boolean"===(n=e).getAttribute("datatype")?"true"===n.content||"1"===n.content:n.content}),t}var va=Be(ga()),ya=new MutationObserver(function(){var e=va.getState(),t=ga();Fe(e,t)||va.setState(t)}),Ea=!1;function wa(){return Ea||(Ea=!0,ya.observe(document.head,{attributes:!0,childList:!0,subtree:!0})),d(va.subscribe,function(){return va.getState()})}var ba=function(e){var a=function(e){var t=wa(),a=u(t["rails-env"])("api")+"/groups/v2/me/groups",o=new URLSearchParams({"fields[Group]":"name,header_image,memberships_count,can_create_conversation",per_page:"100"}),l=r(a+"?"+o),s=l[0],c=l[1],d=r([]),h=d[0],m=d[1],f=r(!1),p=f[0],g=f[1],v=r(!1),y=v[0],E=v[1],w=Boolean(s),b=i(function(){w&&(g(!0),Le(ze,s).then(function(e){var t=e.json,n=t.data.map(function(e){return{id:e.id,name:e.attributes.name,headerImage:e.attributes.header_image,membershipsCount:e.attributes.memberships_count,canCreateConversation:e.attributes.can_create_conversation}});m(function(e){return[].concat(e,n)}),c(t.links.next||null)}).catch(function(){return E(!0)}).finally(function(){return g(!1)}))},[s]);return n(function(){e&&b()},[e]),{groups:h,hasMore:w,isError:y,isLoading:p,loadMore:b}}(e.isActive),o=a.isLoading,l=a.isError,s=a.groups,c=dr(),d=c.navigation,h=c.setFilterValues,m=r(!1),v=m[0],y=m[1],E=s.filter(function(e){return e.canCreateConversation}),w=E.slice(0,v?void 0:5),b=s.length!==E.length&&(v||E.length<=5);return t.createElement(p,null,t.createElement(p,{axis:"horizontal",padding:2,paddingBottom:1,alignment:"center",spacing:1},t.createElement(br,null,"My groups"),o&&t.createElement(M,{size:"xs"})),0!==s.length||l?t.createElement(p,{spacing:1.5},t.createElement(p,null,w.map(function(e){var n=e.id,r=e.name,a=e.membershipsCount;return t.createElement(f,{alignment:"start","aria-label":"Select "+r,axis:"vertical",borderBottomColor:"separatorTertiary",borderBottomStyle:"solid",borderBottomWidth:1,hover:{backgroundColor:"surfaceSecondary"},key:n,paddingHorizontal:2,paddingVertical:1,spacing:.25,textAlign:"left",theme:!1,onClick:function(){h({appName:"Groups",values:{group:{id:n,name:r}}}),d.switchToNewGroupsChatView()}},t.createElement(p,{axis:"horizontal",spacing:1},t.createElement("img",{alt:"",src:e.headerImage.thumbnail,style:{borderRadius:"4px",height:40,width:75,objectFit:"cover"}}),t.createElement(p,{distribution:"start",maxWidth:"250px"},t.createElement(g,{lineHeight:"1.3",weight:500,truncate:!0},r),t.createElement(g,{lineHeight:"1.3",weight:300},a," ",1===a?"member":"members"))))})),b&&t.createElement(Ca,null),E.length>5&&t.createElement(xa,{showAll:v,onClick:function(){return y(!v)}}),l&&t.createElement(ka,null)):t.createElement(_a,null))},ka=function(){return t.createElement(k,{backgroundColor:"error-lighter",marginHorizontal:2,padding:2,radius:3},t.createElement(p,{axis:"horizontal",spacing:1},t.createElement(v,{name:"general.exclamationTriangle",color:"error",marginTop:.5}),t.createElement(g,{size:4},"There was an issue loading your groups, please refresh and try again.")))},_a=function(){return t.createElement(p,{axis:"vertical",alignment:"center",distribution:"center",height:20,padding:2},t.createElement(g,{align:"center",color:"foregroundSecondary"},"Join a group with chat enabled and permissions to start a new conversation."))},Ca=function(){return t.createElement(p,{alignment:"center",distribution:"center",paddingHorizontal:2},t.createElement(g,{lineHeight:"1.3",size:5},"*You have additional groups without chat enabled or permissions to start a new conversation."))},xa=function(e){var n=e.showAll;return t.createElement(f,{variant:"outline",size:"sm",onClick:e.onClick,marginLeft:"auto",marginRight:"auto",marginBottom:2},t.createElement(v,{name:n?"general.upCaret":"general.downCaret",size:"lg",paddingRight:1}),t.createElement(g,null,"View ",n?"fewer":"more"," groups"))};function Sa(e){var a,i=function(e){var t=wa(),a=u(t["rails-env"])("api")+"/groups/v2/me/groups/"+e+"/memberships",i=new URLSearchParams({"fields[Membership]":"person,role","fields[Person]":"avatar_url,child,first_name,last_name",include:"person",per_page:"50"}),o=r(!1),l=o[0],s=o[1],c=r(!1),d=c[0],h=c[1],m=r([]),f=m[0],p=m[1],g=r(null),v=g[0],y=g[1],E=null===v?null:v>f.length;return n(function(){s(!0),Le(ze,a+"?"+i).then(function(e){var n=e.json,r=n.data.map(function(e){var r=n.included.find(function(t){return"Person"===t.type&&t.id===e.relationships.person.data.id}),a=[];return"leader"===e.attributes.role&&a.push({title:"Leader"}),r.id===t["current-person-id"]&&a.push({title:"Conversation owner"}),{avatar:r.attributes.avatar_url,badges:a,child:r.attributes.child,id:r.id,name:r.attributes.first_name+" "+r.attributes.last_name,source:[]}});p(function(e){return[].concat(e,r)}),y(n.meta.total_count)}).catch(function(){return h(!0)}).finally(function(){return s(!1)})},[]),{hasMore:E,isError:d,isLoading:l,people:f,totalCount:v}}(e.groupId),o=i.isLoading,l=i.isError,s=i.people,c=i.hasMore,d=i.totalCount,h=s.length>0,m=s.filter(function(e){return e.child}),f=m.length>0;switch(d){case null:case 0:a="Members";break;case 1:a="1 member";break;default:a=d+" members"}return t.createElement(t.Fragment,null,t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1},t.createElement(br,null,a),o&&t.createElement(M,{size:"sm"})),l&&t.createElement(Ma,null),h&&t.createElement(t.Fragment,null,f&&t.createElement(Sr,{childPeople:m}),t.createElement(Rn,null,t.createElement(p,{paddingBottom:2,spacing:1.5},s.map(function(e){return t.createElement(Mr,{key:e.id,person:e})}),c&&t.createElement(g,{color:"foregroundSecondary"},"and ",d-s.length," more...")))))}var Ma=function(){return t.createElement(k,{backgroundColor:"error-lighter",marginBottom:2,padding:2,radius:3},t.createElement(p,{axis:"horizontal",spacing:1},t.createElement(v,{name:"general.exclamationTriangle",color:"error",marginTop:.5}),t.createElement(g,{size:4},"There was an issue loading group members, please refresh and try again.")))},Aa=function(e){var i=e.isActive,o=e.setFilterValues,l=e.switchToNewServicesChatView,s=r(!1),c=s[0],u=s[1],d=function(e){var t=r([]),i=t[0],o=t[1],l=r(!1),s=l[0],c=l[1],u=hr();return n(function(){e&&(c(!0),u.services.get("chat",{fields:{Chat:"teams_i_lead"}}).then(function(e){var t=e.teams_i_lead.map(function(e){var t=e.value;return{service_type:{id:t.service_type_id,name:e.service_type_name},team:{id:t.team_id,name:e.team_name}}});o(t)}).finally(function(){return c(!1)}))},[e]),{loading:s,serviceTypeTeams:a(function(){return i.reduce(function(e,t){var n=t.service_type,r=t.team,a=e.find(function(e){return e.id===n.id});return a||e.push(a={id:n.id,name:n.name,teams:[]}),a.teams.push(r),e},[])},[i])}}(i),h=d.loading,m=d.serviceTypeTeams;n(function(){i||u(!1)},[]);var v=m.length>4;return t.createElement(p,null,t.createElement(p,{alignment:"center",axis:"horizontal",distribution:"space-between",paddingBottom:1,paddingHorizontal:2,spacing:1},t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1},t.createElement(br,null,"Teams I lead"),h&&t.createElement(M,{size:"xs"})),t.createElement(f,{icon:"general.search",marginLeft:"auto",onClick:l,size:"sm",title:"Search all teams",tooltip:"Search all teams",variant:"outline"})),0===m.length?t.createElement(Ta,{onClick:l}):t.createElement(p,{spacing:1.5,paddingBottom:1},t.createElement(p,null,m.slice(0,c?void 0:4).map(function(e){var n=e.id,r=e.name,a=e.teams;return t.createElement(f,{alignment:"start","aria-label":"Select "+r+" teams I lead",axis:"vertical",borderBottomColor:"separatorTertiary",borderBottomStyle:"solid",borderBottomWidth:1,hover:{backgroundColor:"surfaceSecondary"},key:n,paddingHorizontal:2,paddingVertical:1,spacing:.25,textAlign:"left",theme:!1,onClick:function(){o({appName:"Services",values:{plan_id:null,teams:a.map(function(e){return{service_type_id:n,team_id:e.id}})}}),l()}},t.createElement(g,{weight:500},r),t.createElement(g,{color:"foregroundSecondary"},a.map(function(e){return e.name}).join(", ")))})),v&&t.createElement(p,{alignment:"center"},t.createElement(f,{fontWeight:400,iconLeft:{name:c?"general.upCaret":"general.downCaret"},onClick:function(){return u(!c)},size:"xs",title:c?"Less teams":"Show all teams I lead",variant:"outline"}))))},Ta=function(e){var n=e.onClick;return t.createElement(p,{alignment:"center",axis:"vertical",distribution:"center",height:20,padding:2,spacing:1},t.createElement(g,{color:"foregroundSecondary"},"You don't lead any teams."),t.createElement(f,{fontWeight:400,onClick:n,size:"sm",variant:"outline"},"Browse teams"))},Na=function(){var e=dr(),n=e.navigation,r=e.setFilterValues;return t.createElement(t.Fragment,null,t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1,padding:2,paddingTop:1},t.createElement(f,{icon:{color:Ut.lightNeutral12,name:"general.leftChevron"},marginTop:.25,onClick:n.switchToChannelListView,size:"md",title:"Back to to conversation list",tooltip:"Back to conversations list",variant:"naked"}),t.createElement(Vn,null,"New conversation")),t.createElement(Rn,null,t.createElement(Aa,{isActive:n.isNewChatShortcutsViewActive,setFilterValues:r,switchToNewServicesChatView:n.switchToNewServicesChatView}),t.createElement(ba,{isActive:n.isNewChatShortcutsViewActive})))},Da=function(e){var n=e.text,r=e.buttonDisabled,a=e.showSpinner,i=e.onButtonClick;return t.createElement(t.Fragment,null,t.createElement(m,null),t.createElement(p,{grow:0,marginHorizontal:"auto",padding:2,spacing:2},t.createElement(g,{align:"center",size:5,color:"foregroundSecondary"},n),t.createElement(f,Te({"aria-label":"Start conversation",disabled:r,onClick:i},sr({disabled:r,spinner:a})),"Start conversation")))},Pa=function(){var e=dr();return t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1,padding:2,paddingTop:1},t.createElement(f,{icon:{color:Ut.lightNeutral12,name:"general.leftChevron"},marginTop:.25,onClick:e.navigation.switchToNewChatShortcutsView,size:"md",title:"Back to to new conversation shortcuts",tooltip:"Back to to new conversation shortcuts",variant:"naked"}),t.createElement(Vn,null,"New conversation"))},Oa=function(){var e,n=r(""),a=n[0],i=n[1],o=r(!1),l=o[0],s=o[1],c=r(!1),u=c[0],d=c[1],h=hr(),f=dr(),v=f.filterValues,y=f.navigation,E=null==v||null==(e=v.Groups)?void 0:e.group;return E?t.createElement(t.Fragment,null,t.createElement(Pa,null),t.createElement(p,{grow:1},t.createElement(p,{spacing:2,padding:2,paddingTop:0},t.createElement(p,{axis:"horizontal",alignment:"center",spacing:1},t.createElement(g,{weight:600},"To:"),t.createElement(At,{appName:"Groups"}),t.createElement(g,{wrap:!1,truncate:!0},E.name)),t.createElement(p,{spacing:1},t.createElement(D.InputLabel,{controls:"title"},"Title"),t.createElement(D,{id:"title",placeholder:"Topic of conversation... (required)",required:!0,onChange:function(e){return i(e.target.value)}}))),t.createElement(m,null),t.createElement(p,{grow:1,padding:2,paddingBottom:0,spacing:1},t.createElement(Sa,{groupId:E.id}))),u&&t.createElement(Va,null),t.createElement(Da,{text:"Conversation will be automatically updated if any people are added or removed from the group.",showSpinner:l,buttonDisabled:0===a.trim().length,onButtonClick:function(){return(s(!0),h.groups.post("me/groups/"+E.id+"/chat_conversation_payload",{title:a}).then(function(e){return h.chat.post("me/conversations",{payload:e.value})}).catch(function(){return d(!0)}).finally(function(){return s(!1)})).then(function(e){return y.switchToChannelView(e.stream_channel_id)}).then(function(){return i("")})}})):null},Va=function(){return t.createElement(k,{backgroundColor:"error-lighter",marginHorizontal:2,marginBottom:2,padding:2,radius:3},t.createElement(p,{axis:"horizontal",spacing:1},t.createElement(v,{name:"general.exclamationTriangle",color:"error",marginTop:.5}),t.createElement(g,{size:4},"There was an issue starting the conversation, please try again.")))},Ha="Conversation will be automatically updated if any people are added or removed from a team.",za=function(e){var l,s=function(e){var t=r([]),l=t[0],s=t[1],c=r(!1),u=c[0],d=c[1],h=r(!1),m=h[0],f=h[1],p=o({}),g=dr().navigation,v=hr(),y=a(function(){var t={team_id:e.teams.map(function(e){return e.team_id}).sort()};return e.plan_id&&(t.plan_id=e.plan_id),t},[e]);n(function(){!function(e){try{var t=function(e){p.current[n]=e,s(e)},n=JSON.stringify(e),r=p.current[n];return Promise.resolve(r?t(r):Promise.resolve(function(e){try{return f(!0),Promise.resolve(v.services.get("chat",Te({fields:{Chat:"people"}},e))).then(function(e){return f(!1),e})}catch(e){return Promise.reject(e)}}(e).then(function(e){return e.people})).then(t))}catch(e){return Promise.reject(e)}}(y)},[y]);var E=i(function(){try{return Promise.resolve(v.services.get("chat",Te({fields:{Chat:"group_identifiers"}},y))).then(function(e){return v.chat.get("me/conversations",{fields:{Conversation:"stream_channel"},filter:"with_exact_groups",gids:e.group_identifiers})})}catch(e){return Promise.reject(e)}},[y]),w=i(function(){try{return Promise.resolve(v.services.get("chat",Te({fields:{Chat:"payload"}},y))).then(function(e){return v.chat.post("me/conversations",{payload:e.payload})})}catch(e){return Promise.reject(e)}},[y]);return{findOrCreateConversation:function(){try{return d(!0),Promise.resolve(E()).then(function(e){function t(){g.switchToChannelView(e.map(function(e){return e.stream_channel_id}).join(","))}var n=function(){if(0===e.length)return Promise.resolve(w()).then(function(t){e=[t]})}();return n&&n.then?n.then(t):t()})}catch(e){return Promise.reject(e)}},isFetching:m,isThinking:u,people:l}}(e.filter),c=s.people,u=s.findOrCreateConversation,d=s.isThinking,h=s.isFetching,m=c.length>0,f=c.length,v=c.filter(function(e){return e.child}),y=v.length>0;switch(f){case 0:l="People selected";break;case 1:l="1 person selected";break;default:l=f+" people selected"}return t.createElement(p,{grow:1},t.createElement(p,{grow:1,padding:2,paddingBottom:0,spacing:1},t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1},t.createElement(br,null,l),h&&t.createElement(M,{size:"sm"})),m?t.createElement(t.Fragment,null,y&&t.createElement(Sr,{childPeople:v}),t.createElement(Rn,null,t.createElement(p,{paddingBottom:2,spacing:1.5},c.map(function(e){return t.createElement(Mr,{key:e.id,person:e})})))):t.createElement(p,{alignment:"center",grow:1,maxHeight:18},t.createElement(g,{color:"foregroundSecondary"},"No Results"))),t.createElement(Da,{text:Ha,showSpinner:d,buttonDisabled:!m,onButtonClick:u}))},Ya=function(e){return{label:e.name,value:e.value}},La=function(e){var i=e.onChange,o=e.isActive,l=e.values,s=r({}),c=s[0],u=s[1],d=r(!1),h=d[0],m=d[1],f=r(0),y=f[0],E=f[1],w=hr(),b=o&&h,k=!o&&l.teams.length>0;n(function(){o||m(!1)},[o]),n(function(){l.plan_id&&m(!0)},[l.plan_id]),n(function(){b&&l.teams.forEach(function(e){var t=e.team_id;c[t]||(E(function(e){return e+1}),w.services.get("chat",{fields:{Chat:"plans"},team_id:t,plan_id:l.plan_id}).then(function(e){var n=e.plans;u(function(e){var r;return Te({},e,((r={})[t]=n,r))}),E(function(e){return e-1})}))})},[l.teams,b]);var _=a(function(){var e=l.teams.reduce(function(e,t){var n=t.team_id;return c[n]?Te({},e,c[n].reduce(function(e,t){var n;return Te({},e,((n={})[t.value]=t,n))},{})):e},{});return Object.values(e).map(Ya)},[l.teams,c]);return t.createElement(p,{spacing:1},t.createElement(p,{axis:"horizontal",alignItems:"center",spacing:1},t.createElement(p,{alignItems:"center",axis:"horizontal",marginRight:"auto",spacing:1},t.createElement(br,null,"Filter by plan"),y>0&&t.createElement(M,{size:"xs"})),t.createElement(N,{ariaLabel:"Filter by plan",disabled:!o,isChecked:h,onClick:function(){m(function(e){return!e}),i({appName:"Services",values:function(e){return Te({},e,{plan_id:null})}})}})),h?t.createElement(P,{id:"filter-by-plan-select",value:l.plan_id,defaultValue:null,emptyValue:_.length?"Choose a plan":"No plans available",disabled:_.length<1,options:_,onChange:function(e){var t=e.value;return i({appName:"Services",values:function(e){return Te({},e,{plan_id:t})}})}}):k?t.createElement(p,{axis:"horizontal",alignItems:"center",spacing:2,padding:2},t.createElement(v,{color:"foregroundSecondary",name:"general.exclamationTriangle",size:"lg"}),t.createElement(g,{size:5,color:"foregroundSecondary"},"Plan filtering is not possible using teams from multiple service types. Try choosing teams above with only one service type.")):null)};function Ra(){return Ra=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ra.apply(this,arguments)}var Za={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Ấ":"A","Ắ":"A","Ẳ":"A","Ẵ":"A","Ặ":"A","Æ":"AE","Ầ":"A","Ằ":"A","Ȃ":"A","Ç":"C","Ḉ":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ế":"E","Ḗ":"E","Ề":"E","Ḕ":"E","Ḝ":"E","Ȇ":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ḯ":"I","Ȋ":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ố":"O","Ṍ":"O","Ṓ":"O","Ȏ":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","ấ":"a","ắ":"a","ẳ":"a","ẵ":"a","ặ":"a","æ":"ae","ầ":"a","ằ":"a","ȃ":"a","ç":"c","ḉ":"c","è":"e","é":"e","ê":"e","ë":"e","ế":"e","ḗ":"e","ề":"e","ḕ":"e","ḝ":"e","ȇ":"e","ì":"i","í":"i","î":"i","ï":"i","ḯ":"i","ȋ":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ố":"o","ṍ":"o","ṓ":"o","ȏ":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Ĉ":"C","ĉ":"c","Ċ":"C","ċ":"c","Č":"C","č":"c","C̆":"C","c̆":"c","Ď":"D","ď":"d","Đ":"D","đ":"d","Ē":"E","ē":"e","Ĕ":"E","ĕ":"e","Ė":"E","ė":"e","Ę":"E","ę":"e","Ě":"E","ě":"e","Ĝ":"G","Ǵ":"G","ĝ":"g","ǵ":"g","Ğ":"G","ğ":"g","Ġ":"G","ġ":"g","Ģ":"G","ģ":"g","Ĥ":"H","ĥ":"h","Ħ":"H","ħ":"h","Ḫ":"H","ḫ":"h","Ĩ":"I","ĩ":"i","Ī":"I","ī":"i","Ĭ":"I","ĭ":"i","Į":"I","į":"i","İ":"I","ı":"i","IJ":"IJ","ij":"ij","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","Ḱ":"K","ḱ":"k","K̆":"K","k̆":"k","Ĺ":"L","ĺ":"l","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ŀ":"L","ŀ":"l","Ł":"l","ł":"l","Ḿ":"M","ḿ":"m","M̆":"M","m̆":"m","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","ʼn":"n","N̆":"N","n̆":"n","Ō":"O","ō":"o","Ŏ":"O","ŏ":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","P̆":"P","p̆":"p","Ŕ":"R","ŕ":"r","Ŗ":"R","ŗ":"r","Ř":"R","ř":"r","R̆":"R","r̆":"r","Ȓ":"R","ȓ":"r","Ś":"S","ś":"s","Ŝ":"S","ŝ":"s","Ş":"S","Ș":"S","ș":"s","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","ț":"t","Ț":"T","Ť":"T","ť":"t","Ŧ":"T","ŧ":"t","T̆":"T","t̆":"t","Ũ":"U","ũ":"u","Ū":"U","ū":"u","Ŭ":"U","ŭ":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ȗ":"U","ȗ":"u","V̆":"V","v̆":"v","Ŵ":"W","ŵ":"w","Ẃ":"W","ẃ":"w","X̆":"X","x̆":"x","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Y̆":"Y","y̆":"y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ſ":"s","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Ǎ":"A","ǎ":"a","Ǐ":"I","ǐ":"i","Ǒ":"O","ǒ":"o","Ǔ":"U","ǔ":"u","Ǖ":"U","ǖ":"u","Ǘ":"U","ǘ":"u","Ǚ":"U","ǚ":"u","Ǜ":"U","ǜ":"u","Ứ":"U","ứ":"u","Ṹ":"U","ṹ":"u","Ǻ":"A","ǻ":"a","Ǽ":"AE","ǽ":"ae","Ǿ":"O","ǿ":"o","Þ":"TH","þ":"th","Ṕ":"P","ṕ":"p","Ṥ":"S","ṥ":"s","X́":"X","x́":"x","Ѓ":"Г","ѓ":"г","Ќ":"К","ќ":"к","A̋":"A","a̋":"a","E̋":"E","e̋":"e","I̋":"I","i̋":"i","Ǹ":"N","ǹ":"n","Ồ":"O","ồ":"o","Ṑ":"O","ṑ":"o","Ừ":"U","ừ":"u","Ẁ":"W","ẁ":"w","Ỳ":"Y","ỳ":"y","Ȁ":"A","ȁ":"a","Ȅ":"E","ȅ":"e","Ȉ":"I","ȉ":"i","Ȍ":"O","ȍ":"o","Ȑ":"R","ȑ":"r","Ȕ":"U","ȕ":"u","B̌":"B","b̌":"b","Č̣":"C","č̣":"c","Ê̌":"E","ê̌":"e","F̌":"F","f̌":"f","Ǧ":"G","ǧ":"g","Ȟ":"H","ȟ":"h","J̌":"J","ǰ":"j","Ǩ":"K","ǩ":"k","M̌":"M","m̌":"m","P̌":"P","p̌":"p","Q̌":"Q","q̌":"q","Ř̩":"R","ř̩":"r","Ṧ":"S","ṧ":"s","V̌":"V","v̌":"v","W̌":"W","w̌":"w","X̌":"X","x̌":"x","Y̌":"Y","y̌":"y","A̧":"A","a̧":"a","B̧":"B","b̧":"b","Ḑ":"D","ḑ":"d","Ȩ":"E","ȩ":"e","Ɛ̧":"E","ɛ̧":"e","Ḩ":"H","ḩ":"h","I̧":"I","i̧":"i","Ɨ̧":"I","ɨ̧":"i","M̧":"M","m̧":"m","O̧":"O","o̧":"o","Q̧":"Q","q̧":"q","U̧":"U","u̧":"u","X̧":"X","x̧":"x","Z̧":"Z","z̧":"z"},Ia=Object.keys(Za).join("|"),Wa=new RegExp(Ia,"g"),Fa=new RegExp(Ia,""),Ua=function(e){return e.replace(Wa,function(e){return Za[e]})},ja=Ua,Ba=Ua;ja.has=function(e){return!!e.match(Fa)},ja.remove=Ba;var Ga={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};Ja.rankings=Ga;var qa=function(e,t){return String(e.rankedValue).localeCompare(String(t.rankedValue))};function Ja(e,t,n){void 0===n&&(n={});var r=n.keys,a=n.threshold,i=void 0===a?Ga.MATCHES:a,o=n.baseSort,l=void 0===o?qa:o,s=n.sorter,c=void 0===s?function(e){return e.sort(function(e,t){return function(e,t,n){var r=e.rank,a=e.keyIndex,i=t.rank,o=t.keyIndex;return r===i?a===o?n(e,t):a<o?-1:1:r>i?-1:1}(e,t,l)})}:s,u=e.reduce(function(e,a,o){var l=function(e,t,n,r){if(!t)return{rankedValue:e,rank:$a(e,n,r),keyIndex:-1,keyThreshold:r.threshold};var a=function(e,t){for(var n=[],r=0,a=t.length;r<a;r++)for(var i=t[r],o=ei(i),l=Xa(e,i),s=0,c=l.length;s<c;s++)n.push({itemValue:l[s],attributes:o});return n}(e,t);return a.reduce(function(e,t,a){var i=e.rank,o=e.rankedValue,l=e.keyIndex,s=e.keyThreshold,c=t.itemValue,u=t.attributes,d=$a(c,n,r),h=o,m=u.minRanking,f=u.maxRanking;return d<m&&d>=Ga.MATCHES?d=m:d>f&&(d=f),d>i&&(i=d,l=a,s=u.threshold,h=c),{rankedValue:h,rank:i,keyIndex:l,keyThreshold:s}},{rankedValue:e,rank:Ga.NO_MATCH,keyIndex:-1,keyThreshold:r.threshold})}(a,r,t,n),s=l.keyThreshold;return l.rank>=(void 0===s?i:s)&&e.push(Ra({},l,{item:a,index:o})),e},[]);return c(u).map(function(e){return e.item})}function $a(e,t,n){return e=Qa(e,n),(t=Qa(t,n)).length>e.length?Ga.NO_MATCH:e===t?Ga.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase())===(t=t.toLowerCase())?Ga.EQUAL:e.startsWith(t)?Ga.STARTS_WITH:e.includes(" "+t)?Ga.WORD_STARTS_WITH:e.includes(t)?Ga.CONTAINS:1===t.length?Ga.NO_MATCH:(r=e,a="",r.split(" ").forEach(function(e){e.split("-").forEach(function(e){a+=e.substr(0,1)})}),a).includes(t)?Ga.ACRONYM:function(e,t){var n=0,r=0;function a(e,t,r){for(var a=r,i=t.length;a<i;a++)if(t[a]===e)return n+=1,a+1;return-1}var i=a(t[0],e,0);if(i<0)return Ga.NO_MATCH;r=i;for(var o=1,l=t.length;o<l;o++)if(!((r=a(t[o],e,r))>-1))return Ga.NO_MATCH;return Ga.MATCHES+n/t.length*(1/(r-i))}(e,t);var r,a}function Qa(e,t){return e=""+e,t.keepDiacritics||(e=ja(e)),e}function Xa(e,t){var n;if("object"==typeof t&&(t=t.key),"function"==typeof t)n=t(e);else if(null==e)n=null;else if(Object.hasOwnProperty.call(e,t))n=e[t];else{if(t.includes("."))return function(e,t){for(var n=e.split("."),r=[t],a=0,i=n.length;a<i;a++){for(var o=n[a],l=[],s=0,c=r.length;s<c;s++){var u=r[s];if(null!=u)if(Object.hasOwnProperty.call(u,o)){var d=u[o];null!=d&&l.push(d)}else"*"===o&&(l=l.concat(u))}r=l}if(Array.isArray(r[0])){var h=[];return h.concat.apply(h,r)}return r}(t,e);n=null}return null==n?[]:Array.isArray(n)?n:[String(n)]}var Ka={maxRanking:Infinity,minRanking:-Infinity};function ei(e){return"string"==typeof e?Ka:Ra({},Ka,e)}var ti=function(e,t){var n=e.order,r=n[2],a=t.order,i=a[2];return n[0]-a[0]||n[1].localeCompare(a[1])||r.localeCompare(i)},ni=function(e){var a=e.values,i=e.onChange,l=e.isActive,s=r(""),c=s[0],u=s[1],d=function(e,t){var a=r([]),i=a[0],o=a[1],l=r(!1),s=l[0],c=l[1],u=hr();n(function(){t&&(c(!0),u.services.get("chat",{fields:{Chat:"teams"}}).then(function(e){return o(e.teams)}).finally(function(){return c(!1)}))},[t]);var d=i.reduce(function(t,n){return t[e.teams.some(function(e){return e.team_id===n.value.team_id})?0:1].push(n),t},[[],[]]);return[d[0],d[1],s]}(a,l),h=d[0],m=d[1],y=d[2],E=o(),w=0,b={teams_i_lead:!0},k=function(e,t){return Ja(e,t,{keys:["name"],threshold:Ja.rankings.CONTAINS}).sort(ti).reduce(function(e,t){var n;return e[n=t.group]||(e[n]=[]),e[t.group].push(t),e},{})}(m,c);n(function(){l||u("")},[l]);var _=Object.entries(k);return t.createElement(p,{spacing:1},t.createElement(p,{axis:"horizontal",alignItems:"center",spacing:1},t.createElement(D.InputLabel,Te({controls:"teams"},wr),"Teams"),y&&t.createElement(M,{size:"xs"})),t.createElement(p,{spacing:1},h.length>0&&t.createElement(A,{spacing:1},h.map(function(e){return t.createElement(S,{key:e.value.team_id,renderRight:t.createElement(f,{title:"remove",icon:{name:"general.x",size:"xs"},theme:"naked",onClick:function(){return i({appName:"Services",values:function(t){return Te({},t,{teams:t.teams.filter(function(t){return t.team_id!==e.value.team_id})})}})}}),shrink:1,size:"sm"},t.createElement(g,{truncate:!0},e.name))})),t.createElement(Y.Popover,{ref:E,id:"teams",openOnFocus:!0,closeOnSelect:!0,onClear:function(){return u("")},onChange:function(e){return u(e.target.value)},onSelect:function(e){var t=e.value;return i({appName:"Services",values:function(e){return Te({},e,{teams:[].concat(e.teams,[t])})}})},placeholder:"Search teams",renderLeft:t.createElement(v,{name:"general.search"}),value:c},_.length?_.map(function(e,n){var r=e[0],a=e[1],o=function(e){return e.split("_").map(function(e,t){return"i"===e.toLowerCase()?"I":0===t?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e.toLowerCase()}).join(" ")}(r),l=a.map(function(e){return t.createElement(Y.Item,{key:w,index:w++,value:e},t.createElement(g,{truncate:!0},e.name))}),s=a.length>10;return Object.keys(k).length>1?t.createElement(p,{key:r,marginTop:n>0?1.5:0},t.createElement(p,{axis:"horizontal"},t.createElement(O.Item,null,t.createElement(g,{weight:600},o)),b[r]&&t.createElement(p,{padding:1,marginLeft:"auto"},t.createElement(f,{disabled:s,fontWeight:400,onClick:function(e){i({appName:"Services",values:function(e){return Te({},e,{teams:[].concat(e.teams,a.map(function(e){return e.value}))})}}),E.current&&E.current.handleBlur(e)},size:"xs",theme:"primary",title:"Select all",tooltip:{popoverProps:{zIndex:1e4},title:s?"Disabled when options would exceed 10":'select all in "'+o+'"'},variant:"naked"}))),l):l}):t.createElement(O.Item,null,t.createElement(g,null,"No matching teams for:"," ",t.createElement(g,{as:"span",inline:!0,italic:!0},'"'+c+'"'))))))},ri=function(){return t.createElement(p,{grow:1},t.createElement(p,{alignItems:"center",axis:"horizontal",padding:2,spacing:1},t.createElement(br,null,"People selected")),t.createElement(p,{alignment:"center",grow:1,maxHeight:18,padding:2},t.createElement(g,{color:"foreground",align:"center",size:4},"Search teams above to add people to the chat.")))},ai=function(e){var r=e.isActive,i=function(e){var t=dr(),r=t.setFilterValues,i=t.filterValues.Services;n(function(){r({appName:"Services",values:e?function(e){return e}:pr})},[e]);var o=a(function(){var e=i.teams,t=e[0],n=e.slice(1);return Boolean(t)&&n.every(function(e){return e.service_type_id===t.service_type_id})},[i.teams]);return n(function(){o||r({appName:"Services",values:function(e){return Te({},e,{plan_id:null})}})},[o]),{filterValues:i,isFiltering:i.teams.length>0,isPlansActive:o,setFilterValues:r}}(r),o=i.filterValues,l=i.setFilterValues,s=i.isFiltering,c=i.isPlansActive;return t.createElement(p,{grow:1},t.createElement(p,{spacing:2,padding:2,paddingTop:0},t.createElement(ni,{values:o,onChange:l,isActive:r}),t.createElement(La,{values:o,onChange:l,isActive:c})),t.createElement(m,null),s?t.createElement(za,{filter:o}):t.createElement(t.Fragment,null,t.createElement(ri,null),t.createElement(Da,{text:Ha,buttonDisabled:!0,showSpinner:!1,onButtonClick:lr})))},ii=function(){var e=dr().navigation;return t.createElement(t.Fragment,null,t.createElement(Pa,null),t.createElement(ai,{isActive:e.isNewServicesChatViewActive}))},oi=function(e){var n=e.closeDrawer,r=e.children,a=e.currentPath,o=e.onChangePath,l=function(){var e=t.useState(gr),n=e[1];return{filterValues:e[0],setFilterValues:i(function(e){var t=e.appName,r=e.values;n(function(e){var n;return Te({},e,((n={})[t]="function"==typeof r?r(e[t]):r,n))})},[])}}(),s=l.filterValues,c=l.setFilterValues,u=t.useState(!1),d=u[0],h=u[1],m=function(e){var n=e.currentPath,r=e.onChangePath,a=e.setFilterValues,i=B(),o=i.client,l=i.channel,s=i.setActiveChannel,c=t.useState(function(){var e=n&&yr(n);return e?e.index:0}),u=c[0],d=c[1],h=function(){return r("")},m=function(){return r("new/services")},f=1===u,p=2===u,g=3===u,v=4===u,y=5===u,E=8===u,w=t.useCallback(function(e){try{return Promise.resolve(o.queryChannels({id:{$in:e},members:{$in:[o.userID]},type:"messaging"},{last_message_at:-1},{limit:1})).then(function(e){return e[0]})}catch(e){return Promise.reject(e)}},[o]),b=t.useCallback(function(e){try{var t=e.params.id.split(",");return Promise.resolve(w(t)).then(function(n){if(!n)return h();s(n),t.length>1?r(e.path({id:n.id})):d(e.index)})}catch(e){return Promise.reject(e)}},[o]);return t.useEffect(function(){var e=yr(n);switch(null==e?void 0:e.name){case"BlankState":case"Shortcuts":case"NewServices":case"NewGroups":d(e.index);break;case"List":d(e.index),l&&s(null);break;case"NewServicesPlan":case"NewServicesTeam":var t=e.params,r=t.plan_id,i=void 0===r?null:r,o=t.teams;a({appName:"Services",values:{plan_id:i&&parseInt(i),teams:o.split(",").map(function(e){return e.split(":")}).map(function(e){var t=e[0];return{team_id:parseInt(e[1]),service_type_id:parseInt(t)}})}}),m();break;case"Conversation":case"Details":l&&l.id===e.params.id?d(e.index):b(e);break;default:h()}},[n,r]),{activeIndex:u,isBlankStateActive:E,isChannelDetailsViewActive:y,isChannelViewActive:v,isNewChatShortcutsViewActive:f,isNewServicesChatViewActive:p,isNewGroupsChatViewActive:g,switchToChannelDetailsView:function(){return r("conversations/"+l.id+"/details")},switchToChannelListView:h,switchToChannelView:function(e){return r("conversations/"+e)},switchToNewChatShortcutsView:function(){return r("new/shortcuts")},switchToNewServicesChatView:m,switchToNewGroupsChatView:function(){return r("new/groups")}}}({currentPath:a,onChangePath:o,setFilterValues:c});return t.createElement(Kn,{value:{actionsOpenForChannel:d,closeDrawer:n,filterValues:s,setActionsOpenForChannel:h,setFilterValues:c,navigation:m}},t.createElement(In,{activeIndex:m.activeIndex},r))},li=function(e){var n=e.chatClient,r=e.closeDrawer,a=e.env;return t.createElement(ue,{client:n,theme:"str-chat__theme-light"},t.createElement(Qn,{env:a},t.createElement(oi,{closeDrawer:r,currentPath:e.currentPath,onChangePath:e.onChangePath},t.createElement(Qr,{closeDrawer:r,client:n,env:a,appName:e.appName,currentPersonId:e.currentPersonId}),t.createElement(Na,null),t.createElement(ii,null),t.createElement(Oa,null),t.createElement(ma,null),t.createElement(zr,null),t.createElement(tr,null))))},si={component:function(e){var n=e.appName,r=e.closeDrawer,a=e.currentPath,i=e.env,o=e.onChangePath,l=e.userId,s=function(e){var n=t.useState(null),r=n[0],a=n[1];return t.useEffect(function(){if(!e)return lr;var t=!1,n=new he(e.api_key),r=n.connectUser({id:e.id},e.tokenProvider).then(function(){t||a(n)});return function(){t=!0,a(null),r.then(function(){return n.disconnectUser()}).then(function(){console.log("connection closed")})}},[null==e?void 0:e.id,null==e?void 0:e.api_key]),r}(e.chatStreamUser);return s?t.createElement(li,{chatClient:s,closeDrawer:r,env:i,appName:n,currentPersonId:l,currentPath:a,onChangePath:o}):t.createElement(Pn,{closeDrawer:r},t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1},t.createElement(Vn,null,"Chat"),t.createElement(er,null),t.createElement(M,{color:"hsl(0 0% 62%)",thickness:2,trackColor:"hsl(0 0% 97%)"})))},icons:{active:"general.textMessage",static:"general.outlinedTextMessage"},name:"Chat"},ci=function(e){var n=e.currentAppName,r=e.sectionName.toLowerCase();return"account information"===r||"recent updates"===r?t.createElement(v,{name:"account information"===r?"general.cogPerson":"general.outlinedGenericFile",color:"foregroundSecondary"}):"Accounts"===n?t.createElement(v,{name:"general.cog",color:"foregroundSecondary"}):t.createElement(p,{width:2,height:2},t.createElement(L,{name:n.toLowerCase().replace(/[\s]/,"-"),size:"sm",theme:"color",markOnly:!0}))},ui=function(e){var n=e.hit;return t.createElement(Y.Item,{key:n.objectID,index:e.index,value:n,paddingVertical:1},t.createElement(g,{color:"neutralDarker",size:4,whiteSpace:"normal"},n.title))},di=function(e){var n=e.currentAppName,r=e.indexName,a=_e(),i=a.query,o=a.refine,l=Ce(),s=l.hits,c=l.results,u=null==c?void 0:c.hits.reduce(function(e,t){var n=t.category.title;return e[n]||(e[n]=[]),e[n].push(t),e},{}),d=0;return t.createElement(p,{id:"helpdesk-search",position:"relative"},t.createElement(Y.Popover,{renderTo:"#helpdesk-search",popoverProps:{zIndex:2},placeholder:"Search our documentation",value:i,renderRight:t.createElement(v,{name:"general.search"}),onChange:function(e){return o(e.target.value)},onSelect:function(e){return function(e,t){var n=t.split("_")[1],r=window.open("https://"+n+".zendesk.com/hc/"+e.locale.locale+"/articles/"+e.id,"_blank");r&&r.focus()}(e,r)},placement:"bottom-start"},!s.length&&t.createElement(t.Fragment,null,t.createElement(p,{axis:"horizontal",alignment:"center",paddingHorizontal:2,paddingVertical:1},t.createElement(g,{color:"neutralDarker",size:4,whiteSpace:"normal"},"No results match your search"))),u&&Object.keys(u).map(function(e){var r=u[e];return t.createElement(t.Fragment,{key:e},d>0&&t.createElement(m,{margin:1}),t.createElement(p,{axis:"horizontal",alignment:"center",spacing:.5,paddingHorizontal:2,paddingVertical:1},t.createElement(ci,{currentAppName:n,sectionName:e}),t.createElement(g,{size:5,color:"foregroundSecondary",fontWeight:500},e)),r.map(function(e){return t.createElement(ui,{key:e.objectID,hit:e,index:d++})}))})))},hi=function(e){var n=e.indexName,r=e.currentAppName,a=It().algoliaSearchAuth,i=ke(a.algoliaApplicationId,a.algoliaSearchOnlyApiKey);return t.createElement(xe,{indexName:n,searchClient:i},t.createElement(Se,{hitsPerPage:5}),t.createElement(di,{currentAppName:r,indexName:n}))},mi=U.LoadingIndicator,fi=U.StackView,pi={component:function(e){var n=e.appName,r=e.closeDrawer,a=e.helpdeskConfig,i=u(e.env)("helpdesk")+"/addons/toolbar.helpdesk.help";return t.createElement(F,{grow:1,display:"flex",extensionId:"11",url:i,loadingFallback:t.createElement(fi,{flex:1,axis:"vertical"},t.createElement(Pn,{closeDrawer:r},t.createElement(fi,{axis:"horizontal",spacing:1},t.createElement(Vn,null,"Help and support"),t.createElement(mi,null)))),additionalComponents:{CalendlyWidget:be,DocumentationSearch:hi,DrawerHeader:Pn,DrawerHeading:Vn,ScrollContainer:Rn,SwitchView:In},args:{appName:n,closeDrawer:r,currentPageParams:location.search,helpdeskConfig:a},componentVersion:"5"})},icons:{active:"general.questionCircle",static:"general.outlinedQuestionCircle"},name:"Helpdesk"},gi=["dark","style"],vi=function(e){var n=e.dark,r=e.style,a=Oe(e,gi);return t.createElement("div",Te({style:Te({color:n?Ut.lightNeutral62:Ut.lightNeutral24,fontSize:"12px",fontWeight:400,textTransform:"uppercase"},r)},a))},yi=function(e){var a,i,o,l,s,c,u=e.isRead,d=void 0!==u&&u,h=e.onClick,m=t.useRef(null),f=(a=m,o=(i=r(!1))[0],l=i[1],s=function(){return l(!0)},c=function(){return l(!1)},n(function(){var e=null==a?void 0:a.current;if(e)return e.addEventListener("mouseenter",s),e.addEventListener("mouseleave",c),function(){e.removeEventListener("mouseenter",s),e.removeEventListener("mouseleave",c)}},[a]),o);return t.createElement("div",Te({ref:m,style:{alignItems:"center",display:"flex",height:"12px",justifyContent:"center",width:"12px"}},{onClick:h}),t.createElement("svg",{height:"12",viewBox:"0 0 12 12",width:"12"},t.createElement("title",null,"unread dot"),t.createElement("circle",{cx:"6",cy:"6",fill:f?Ut.interaction66:Ut.lightNeutral81,r:"6",style:{transition:"all 0.2s"}}),t.createElement("circle",{cx:"6",cy:"6",fill:Ut.lightNeutral100,r:"5"}),!d&&t.createElement("circle",{cx:"6",cy:"6",r:"4",fill:Ut.interaction66})))},Ei=function(e){var n=e.mobile,r=void 0!==n&&n,a=e.isLast,i=e.onCreateTask,o=e.onMarkAsRead,l=void 0===o?function(){try{return Promise.resolve({})}catch(e){return Promise.reject(e)}}:o,s=e.onToggleRead,c=e.showBottomBorder,u=e.notification,d=u.appName,h=u.createdAt,m=u.isRead,f=u.link,p=u.title,g=It(),v=g.organizationTimeZone,y=g.notificationsContextMenu,E=t.useState(!1),w=E[0],b=E[1],k={style:"relative"};return v&&(k.timeZone=v),t.createElement(Dt,{active:w,"data-turbolinks":!1,href:f,onClick:function(e){try{return b(!0),Promise.resolve(l(u)).then(function(){window.location.href=f})}catch(e){return Promise.reject(e)}},style:Te({alignItems:"flex-start",borderBottom:c||!a?"1px solid "+(r?Ut.lightNeutral24:Ut.lightNeutral93):"none",cursor:"pointer",display:"flex",overflow:"hidden",padding:"12px 16px",textDecoration:"none",verticalAlign:"middle"},ct)},t.createElement("div",{style:{display:"flex",flexDirection:"column",flexGrow:1,justifyContent:"center"}},t.createElement("div",{style:{alignItems:"center",borderLeft:"4px solid hsl("+({Calendar:"9 61% 50%","Check-Ins":"283 22% 48%",Giving:"43 88% 64%",Groups:"17 96% 62%",People:"220 74% 57%",Publishing:"220 12% 31%",Registrations:"175 36% 43%",Services:"88 45% 41%"}[d]||"0 0% 81%")+" / "+(m?"40%":"100%"),display:"flex",marginBottom:"10px",paddingLeft:"8px"}},t.createElement("div",{style:{flexGrow:1,marginRight:"16px"}},t.createElement(vi,{dark:r,style:{marginBottom:"6px",userSelect:"none"}},d),t.createElement("h1",{style:{color:r?Ut.lightNeutral88:Ut.darkNeutral12,fontSize:"16px",fontWeight:500,lineHeight:"1.3em",margin:0,userSelect:"none"}},p)),!r&&!y&&t.createElement(yi,Te({onClick:function(e){e.preventDefault(),e.stopPropagation(),s()}},{isRead:m})),!r&&y&&t.createElement(z,{icon:{name:"general.threeDots"},title:"More options",variant:"naked",iconRight:null,placement:"bottom-end",onClick:function(e){e.stopPropagation()}},t.createElement(z.Item,{onClick:function(e){e.preventDefault(),e.stopPropagation(),s()}},"Mark ",m?"unread":"as read"),u.taskUrl?t.createElement(z.Item,{onClick:function(e){e.preventDefault(),e.stopPropagation(),window.location.href=u.taskUrl}},"Open task"):t.createElement(z.Item,{onClick:function(e){e.preventDefault(),e.stopPropagation(),i(u)}},"Create task"))),t.createElement("div",{style:{color:r?Ut.lightNeutral62:Ut.lightNeutral24,fontSize:"12px",paddingLeft:"12px",userSelect:"none"}},de.datetime(h,k))))},wi=function(e){var n=e.dark,r=void 0!==n&&n,a=e.description,i=e.title,o=void 0===i?"No notifications":i;return t.createElement(p,{alignment:"center",distribution:"center",padding:4},t.createElement(yt,Te({id:e.context},{dark:r})),t.createElement(_,{color:r?"#fafafa":"#3d3d3d",fontWeight:500,marginTop:1,size:3},o),t.createElement(g,{align:"center",color:r?"#fafafa":"#3d3d3d",size:4},a))},bi=function(e,t){var n,r,a,i,o,l,s,c,u=function(e,t){var n=e.type,r=e.id;return t.find(function(e){return e.type===n&&e.id===r})},d=null==(n=u(e.relationships.app.data,t.included))||null==(r=n.attributes)?void 0:r.name,h=JSON.parse(null==(a=u({id:null==e||null==(o=e.relationships)||null==(l=o.web_payloads)||null==(s=l.data[0])?void 0:s.id,type:"Payload"},t.included))||null==(i=a.attributes)?void 0:i.content);return{appName:d,createdAt:new Date(e.attributes.created_at),id:e.id,isRead:(null==(c=e.attributes.read_at)?void 0:c.length)>0,link:null==h?void 0:h.link,title:null==h?void 0:h.title}},ki=["disabled","onClick","title"],_i=function(e){var n=e.disabled,r=e.onClick,a=e.title,i=Oe(e,ki);return t.createElement(p,Te({color:n?Ut.lightNeutral62:Ut.interaction66,cursor:n?"default":"pointer",fontSize:5,fontWeight:600,userSelect:"none",onClick:!n&&r},i),a)},Ci=function(e){var n=Te({},(Pe(e),e));return t.createElement(_,Te({color:Ut.lightNeutral12,lineHeight:2,size:5,textTransform:"uppercase",userSelect:"none"},n))},xi={component:function(e){var n=e.closeDrawer,r=t.useState(!1),a=r[0],o=r[1],l={transition:"opacity 300ms ease-in-out"},s={entered:{opacity:1},entering:{opacity:.2}},c=Ge.getState().notifications,d=function(e){var n=e.enabled,r=e.env,a=e.joltChannel,o=t.useState([]),l=o[0],s=o[1],c=t.useState(!0),d=c[0],h=c[1],m=t.useState(!1),f=m[0],p=m[1],g=function(e){var t=[].concat(e).sort(function(e,t){return e.createdAt<t.createdAt?1:-1}).reduce(function(e,t){return Te({},e,t.isRead?{read:[].concat(e.read,[t])}:{unread:[].concat(e.unread,[t])})},{read:[],unread:[]});return{read:t.read,unread:t.unread}}(l),v=g.read,y=g.unread,E=function(){try{p(!1),Le(ze,window.location.origin+"/~api/notifications/v2/me/notifications?include=app,web_payloads&per_page=100&order=read_at,-created_at").then(function(e){var t=e.json,n=t.data.map(function(e){return bi(e,t)});h(!1),s(n)})}catch(e){p(!0),console.error("topbar encountered error when fetching all notifications",e)}};t.useEffect(function(){n&&E()},[n]);var w=function(e){return"string"==typeof e.data?JSON.parse(e.data):e.data},b=t.useCallback(function(e){try{(function(e){try{try{return p(!1),Promise.resolve(Le(ze,window.location.origin+"/~api/notifications/v2/me/notifications/"+e+"?include=app,web_payloads").then(function(e){return e.json}))}catch(e){p(!0),console.error("topbar encountered error when fetching a single notification",e)}return Promise.resolve()}catch(e){return Promise.reject(e)}})(w(e).data.id).then(function(e){var t=bi(e.data,e);s(function(e){return[].concat(e.filter(function(e){return e.id!==t.id}),[t])})})}catch(e){console.error("topbar encountered error when updating state from jolt message",e)}},[bi,w,E,v,s,y]),k=t.useCallback(function(e){var t=w(e),n=l.filter(function(e){return e.id!==t.data.id});s(n)},[w,l,s]);Ze(n?a:void 0,"notifications.v2.events.notification.created",b),Ze(n?a:void 0,"notifications.v2.events.notification.updated",b),Ze(n?a:void 0,"notifications.v2.events.notification.destroyed",k);var _=function(e,t){try{var n=e.reduce(function(e,n){return[].concat(e,[{attributes:{action:t},id:n,type:"graph_notification"}])},[]);return Promise.resolve(Le(Ye,u(r)("api")+"/notifications/v2/me/bulk_update",{data:{data:{attributes:{},relationships:{notifications:{data:{source:"/included/graph_notification/*"}}},type:"BulkUpdate"},included:n},method:"POST"}).then(function(t){t.ok||(h(!1),p(!0),s(function(t){return t.map(function(t){return e.includes(t.id)?Te({},t,{isRead:!t.isRead}):t})}))}))}catch(e){return Promise.reject(e)}},C=i(function(e){try{return Promise.resolve(Le(Ye,u(r)("api")+"/home/v2/me/task_lists/inbox/tasks",{data:{data:{attributes:{description:e.link?'<a href="'+e.link+'">Link</a>':void 0,title:e.title}}},method:"POST"}).then(function(t){t.ok&&s(function(n){return n.map(function(n){return e.id===n.id?Te({},n,{taskUrl:t.json.data.links.html}):n})})}))}catch(e){return Promise.reject(e)}},[]);return{handleCreateTask:C,handleMarkAllAsRead:function(){var e=y.map(function(e){return e.id});s(function(t){return t.map(function(t){return e.includes(t.id)?Te({},t,{isRead:!0}):t})}),_(y.map(function(e){return e.id}),"read")},handleMarkAsRead:function(e){try{return _([e.id],"read")}catch(e){return Promise.reject(e)}},handleToggleRead:function(e){try{var t=e.isRead?"unread":"read";return s(function(n){return n.map(function(n){return e.id==n.id?Te({},n,{isRead:"read"===t}):n})}),_([e.id],t)}catch(e){return Promise.reject(e)}},hasError:f,isLoading:d,read:v,unread:y}}({enabled:c.enabled,env:c.env,joltChannel:c.joltChannel}),h=d.handleCreateTask,m=d.handleMarkAllAsRead,f=d.handleMarkAsRead,g=d.handleToggleRead,v=d.hasError,y=d.isLoading,E=d.read,w=d.unread;return t.createElement(t.Fragment,null,t.createElement(Pn,{closeDrawer:n},t.createElement(p,{spacing:.5},t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1},t.createElement(Vn,null,"Notifications"),y&&t.createElement(M,{color:"hsl(0 0% 62%)",thickness:2,trackColor:"hsl(0 0% 97%)"}),v&&t.createElement(wt,{fill:"hsl(8 60% 47%)",size:16})),E.length>0&&t.createElement(_i,{onClick:function(){return o(function(e){return!e})},title:(a?"Hide":"Show")+" read"}))),t.createElement(Rn,null,t.createElement(p,{alignment:"stretch",spacing:2},t.createElement("div",{style:{boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"space-between",margin:0,padding:"4px 0"}},!y&&0===w.length&&t.createElement(wi,Te({context:"toolbar",description:"When you have "+(E.length>0?"unread ":"")+"notifications they will show up here."},E.length>0&&{title:"No unread notifications"})),w.length>0&&t.createElement(p,{axis:"horizontal",alignment:"center",distribution:"space-between",padding:2},t.createElement(Ci,null,"Unread"),w.length>0&&t.createElement(_i,{onClick:function(){return m()},title:"Mark "+w.length+" as read"})),t.createElement(Me,{exit:!1},w.map(function(e,n){return t.createElement(Ae,{key:e.id,timeout:0},function(r){return t.createElement("div",{style:Te({},l,s[r])},t.createElement(Ei,Te({isLast:w.length===n+1,key:e.id,onMarkAsRead:f,onToggleRead:function(){return g(e)},onCreateTask:h,showBottomBorder:E.length>0},{notification:e})))})})),E.length>0&&a&&t.createElement(t.Fragment,null,t.createElement(Ci,{padding:2},"Read"),t.createElement(Me,{exit:!1},E.map(function(e){return t.createElement(Ae,{key:e.id,timeout:0},function(n){return t.createElement("div",{style:Te({},l,s[n])},t.createElement("div",{style:{opacity:.6}},t.createElement(Ei,Te({key:e.id,onToggleRead:function(){return g(e)},onCreateTask:h,showBottomBorder:!0},{notification:e}))))})})))))))},icons:{active:"toolbar.notification",static:"toolbar.notificationO"},name:"Notifications"},Si=["children","badge","onClick"],Mi=U.LoadingIndicator,Ai=U.StackView;function Ti(e){var n=e.children,r=e.badge,a=e.onClick,i=Oe(e,Si);return t.createElement(p,Te({as:"button",axis:"horizontal",distribution:"space-between",alignment:"center",paddingBottom:.75,onClick:function(){return a()},spacing:1},i),n,r&&t.createElement(S,Te({size:"sm",fontWeight:"600"},r)))}var Ni={component:function(e){var n=e.closeDrawer,a=e.enableJoltLogging,o=e.env,l=e.isOpen,s=e.joltPromise,c=e.onReceiveWorker,d=e.openDrawer,h=e.currentPath,m=e.onChangePath,f=wa(),p=u(o)("home")+"/addons/toolbar.tasks.list.js",g=r(),v=g[0],y=g[1],E=r(),w=E[0],b=E[1],k=Re({channelName:null==w?void 0:w.channelName,enableJoltLogging:a,enabled:!!w,env:o,fetchSubscribeToken:function(e){try{return Promise.resolve(Le(Ye,w.subscribeUrl,{data:{data:{attributes:{connection_id:e}}},method:"POST"})).then(function(e){return e.json.data.id})}catch(e){return Promise.reject(e)}},joltPromise:s}),_=i(function(e){y(Te({},e,{timestamp:(new Date).getTime()}))},[]);Ze(k,"",_);var C=i(function(e,t){var n;if(void 0===t&&(t={}),null==(n=window)||!n.pendo)return console.warn("`window.pendo` is undefined");window.pendo.track(e,t)},[]);return t.createElement(F,{grow:1,display:"flex",extensionId:"2",url:p,onReceiveWorker:c,loadingFallback:t.createElement(Ai,{flex:1,axis:"vertical"},t.createElement(Pn,{closeDrawer:n},t.createElement(Ai,{axis:"horizontal",spacing:1},t.createElement(Vn,null,"To do"),t.createElement(Mi,null)))),additionalComponents:{DrawerHeader:Pn,DrawerHeading:Vn,NavLinkWithBadge:Ti,ScrollContainer:Rn,SwitchView:In},args:{closeDrawer:n,currentPath:h,isOpen:l,latestJoltMessage:v,onChangePath:m,openDrawer:d,pcoMeta:f,requestJoltChannel:b,trackPendo:C},componentVersion:"5"})},icons:{active:"toolbar.checklist",static:"toolbar.checklistO"},name:"Tasks"},Di={Chat:si,Notifications:xi,Tasks:Ni},Pi=Object.fromEntries(Object.entries(Di).map(function(e){var t=e[1];return[e[0].toLowerCase(),t]}));function Oi(o){var l,s,c,d,y,w,b,S,M,A,T=o.appName,N=o.autoMountTool,D=o.enableJoltLogging,P=o.env,O=o.helpdeskConfig,V=void 0===O?{}:O,H=o.linkToProfile,z=void 0===H||H,Y=o.userAvatarPath,L=o.userName,R=o.onReceiveTasksWorker,Z=(b=function(e){var t=a(function(){return new RegExp(e+"=([^&]+)")},[e]),o=i(function(e){var n=e.match(t);return n?n[1]:null},[t]),l=r(function(){return o(location.hash)}),s=l[0],c=l[1],u=i(function(e){c(o(e))},[]);return n(function(){function e(){u(location.hash)}return window.addEventListener("hashchange",e),function(){return window.removeEventListener("hashchange",e)}},[u]),[s,u]}("toolbar"),S=b[0],A=i(function(e,t){void 0===t&&(t="");var n="#toolbar="+e+"/"+t;history.replaceState(void 0,void 0,n),M(n)},[M=b[1]]),[a(function(){if(S){var e=S.split("/"),t=e[0];return{path:e.slice(1).join("/"),tool:t}}return null},[S]),A,i(function(){history.replaceState(void 0,void 0,"#"),M("")},[])]),I=Z[0],W=Z[1],F=Z[2],U=(d="topbarToolbarToolState",y=r(function(){return function(e){var t=document.cookie.split(";").map(function(e){return e.trim()}).find(function(t){return t.startsWith(e+"=")});return t&&decodeURIComponent(t.split("=")[1])}(d)}),w=y[1],l=[y[0],i(function(e){document.cookie=d+"="+encodeURIComponent(e)+"; "+Nn,w(e)},[d])],c=l[1],[a(function(){if(!s)return{};try{return JSON.parse(s)}catch(e){return{}}},[s=l[0]]),i(function(e){return c(JSON.stringify(e))},[c])]),B=U[0],G=U[1],q=e.useReducer(Fn,Te({},Wn,{currentContent:N?Di[N]:null})),J=q[0],$=q[1],Q=J.currentContent,X=J.open,K=!!Q,ee=It(),te=ee.indicatorVisible,ne=ee.joltPromise,re=ee.chatEnabled,ae=ee.userId;t.useEffect(function(){X?(document.body.style.overflow="hidden",window.scrollTo(0,0)):document.body.style.overflow="auto"},[X]),t.useEffect(function(){return window.openHelpdesk=function(){return be(pi)},function(){delete window.openHelpdesk}},[pi]);var ie=bn({appName:T.replace(/[\s-]/,""),env:P,userId:ae}),oe=u(P)("login")+"/logout",le="/people/AC"+ae,se=pi,ce=null!=V&&V.onClick?V.onClick:function(){return me(se)},ue=i(function(e){$({payload:{content:e},type:Hn.mount}),setTimeout(function(){return $({type:Hn.open})})},[]),de=i(function(e){e.name.toLowerCase()in Pi?W(e.name.toLowerCase(),B[e.name.toLowerCase()]):(F(),ue(e))},[W,F,ue,B]),he=i(function(){$({type:Hn.close}),F(),setTimeout(function(){return $({type:Hn.unmount})},100)},[F]);t.useEffect(function(){var e;if(I){var t=Te({},B,((e={})[I.tool]=I.path,e));Fe(t,B)||G(t)}},[I,B]),t.useEffect(function(){null==I||!I.tool||Q===Pi[I.tool]&&X||ue(Pi[I.tool])},[ue,null==I?void 0:I.tool,Q,X]);var me=function(e){return X&&(null==Q?void 0:Q.name)===e.name?he():de(e)},fe=function(e){var n=e.enableJoltLogging,r=e.env,a=e.userId,i=e.isEnabled,o=e.joltPromise,l=e.onConnectionFailure,s=void 0===l?lr:l,c=t.useState(null),d=c[0],h=c[1],m=Re({channelName:"chat.people."+a,enableJoltLogging:n,enabled:i,env:r,fetchSubscribeToken:function(e){try{var t=u(r)("api")+"/chat/v2/me/jolt_subscribe";return Promise.resolve(Le(Ye,t,{data:{data:{attributes:{cid:e}}},method:"POST"}).then(function(e){return e.json.data.id}))}catch(e){return Promise.reject(e)}},joltPromise:o}),f=function(e){var t=e.fields;try{var n=u(r)("api")+"/chat/v2/me/stream_user",a="?context=linked_accounts&fields[StreamUser]="+t.join(",");return Promise.resolve(Le(ze,""+n+a)).then(function(e){return e.json.data})}catch(e){return Promise.reject(e)}},p=function(){return f({fields:["api_key","token","unread"]}).then(function(e){var t=e.id,n=e.attributes,r=n.token,a=Oe(n,Er);r?h(function(e){return Te({id:t},e,a,{tokenProvider:function(){try{return Promise.resolve(f({fields:["token"]})).then(function(e){return e.attributes.token})}catch(e){return Promise.reject(e)}}})}):(s(),h(null))}).catch(lr)};return Ze(i?m:void 0,"STREAM_USER_UPDATED",p),t.useEffect(function(){i&&p()},[i]),d}({enableJoltLogging:D,env:P,isEnabled:Boolean(ae&&re),joltPromise:ne,onConnectionFailure:function(){return Q===si&&he()},userId:ae}),pe=[xi,Ni,fe&&si].filter(Boolean),ge={component:function(){return function(e){var n=e.closeDrawer,r=e.linkToProfile,a=e.loginSettingsUrl,i=e.logoutUrl,o=e.profileUrl,l=e.userAvatarPath,s=It(),c=s.mfaConfigured,u=s.mfaEnabled,d=s.name;return t.createElement(p,{axis:"vertical",spacing:t.createElement(m,null)},t.createElement(C,{columns:"auto 1fr auto",alignment:"start",spacing:2,padding:2,paddingTop:1,width:"100%"},t.createElement(x,{source:l,size:"md"}),t.createElement(p,{axis:"vertical",spacing:1,grow:0,shrink:1},t.createElement(_,{level:3,size:1,weight:600,paddingTop:.5,color:Ut.lightNeutral12},d),r&&t.createElement(E,{to:o,style:{color:Ut.lightNeutral45},size:3},"My profile"),u&&t.createElement(t.Fragment,null,t.createElement(E,{to:a,style:{color:Ut.lightNeutral45},size:3},"My login settings"),t.createElement(p,{axis:"horizontal",alignment:"center",spacing:.5,width:"100%"},t.createElement(v,{name:c?"general.lock":"general.unlock",size:"sm",color:c?Ut.success25:Ut.danger45}),t.createElement(g,{size:5,weight:400,color:Ut.lightNeutral62,wrap:!0},"Two-step verification ",c?"active":"inactive")))),t.createElement(f,{icon:{fill:Ut.lightNeutral24,name:"general.x",size:"md"},onClick:n,title:"Close",variant:"naked",theme:!1,hover:{backgroundColor:Ut.lightNeutral95}})),t.createElement("form",{method:"POST",action:i},t.createElement(f,{"data-turbolinks":!1,onClick:function(){$e()},style:{padding:0},theme:!1,type:"submit",width:"100%"},t.createElement(p,{distribution:"space-between",alignment:"center",axis:"horizontal",grow:1,paddingHorizontal:3,paddingVertical:2},t.createElement(g,{color:Ut.lightNeutral45,size:3},"Log out"),t.createElement(v,{name:"general.intoBox",fill:Ut.lightNeutral45})))))}({closeDrawer:he,linkToProfile:z,loginSettingsUrl:ie,logoutUrl:oe,profileUrl:le,userAvatarPath:Y})},name:"Profile"},ve=function(e){var t=function(e){return"undefined"!=typeof window&&window.matchMedia(e).matches},a=r(t(e)),i=a[0],o=a[1];function l(){o(t(e))}return n(function(){var t=window.matchMedia(e);return l(),t.addListener?t.addListener(l):t.addEventListener("change",l),function(){t.removeListener?t.removeListener(l):t.removeEventListener("change",l)}},[e]),i}("(max-width: 599px)"),ye=t.useState(0),Ee=ye[0],we=ye[1];t.useLayoutEffect(function(){var e=function(){we(window.innerHeight)};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[]);var be=function(e){var t;de(e),null==(t=document.getElementById("toolbarDrawer"+e.name))||t.scrollTo({behavior:"smooth",top:0})},ke={Chat:{chatStreamUser:fe},Tasks:{onReceiveWorker:R}},_e=i(function(e){W(null==Q?void 0:Q.name.toLowerCase(),e)},[null==Q?void 0:Q.name]),Ce=Te({appName:T,closeDrawer:he,currentPath:null==I?void 0:I.path,env:P,helpdeskConfig:V,isOpen:X,joltPromise:ne,onChangePath:_e,openDrawer:function(){return Q&&de(Q)},userId:ae},Q?ke[Q.name]:{}),xe=Te({},te,{Chat:null==fe?void 0:fe.unread});return t.createElement(h,{theme:_n},t.createElement(j,null,ve?t.createElement(t.Fragment,null,t.createElement(p,{left:0,position:"absolute",right:0,pointerEvents:"none",style:{minHeight:Ee},top:0,zIndex:10001},t.createElement(p,{alignItems:"start",axis:"horizontal",backgroundColor:"white",borderTopColor:"separatorTertiary",borderTopWidth:1,bottom:0,distribution:"fill",height:"calc(52px + env(safe-area-inset-bottom))",left:0,position:"fixed",pointerEvents:"auto",right:0},t.createElement(p,{alignment:"center",flex:"1",position:"relative"},t.createElement(f,{css:{WebkitTapHighlightColor:"transparent"},color:X?Ut.lightNeutral62:Ut.lightNeutral24,hover:{color:Ut.lightNeutral24},icon:{name:X?"toolbar.planningCenterO":"toolbar.planningCenter",size:"20px"},onClick:function(){return he()},padding:2,theme:!1,title:"Home"})),[se].concat(pe).map(function(e){return t.createElement(p,{alignment:"center",flex:"1",key:e.name,position:"relative"},t.createElement(f,{id:"toolbar-"+e.name.toLowerCase(),"aria-label":""+e.name,color:X&&Q===e?Ut.lightNeutral24:Ut.lightNeutral62,css:{WebkitTapHighlightColor:"transparent"},hover:{color:Ut.lightNeutral24},key:e.name,onClick:function(){return be(e)},paddingHorizontal:2,paddingVertical:2,theme:!1},t.createElement(k,{position:"relative"},xe[e.name]&&t.createElement(zn,{right:-.5,top:-.5}),t.createElement(v,{name:X&&Q===e?e.icons.active:e.icons.static,size:"20px"}))))}))),K&&t.createElement(Dn,{id:"toolbarDrawer"+Q.name,bottom:"52px",height:X?"calc(100% - 52px)":"0px",overflow:"auto",position:"absolute"},t.createElement(Q.component,Te({},Ce)))):t.createElement(p,{height:"100%",position:"absolute",right:0,width:X?"calc(360px + 48px)":"48px",transition:"all 100ms ease-in-out"},t.createElement(p,{backgroundColor:"surface",borderLeftColor:"separatorTertiary",borderLeftWidth:1,grow:1,paddingVertical:1,spacing:t.createElement(m,{margin:1.5}),zIndex:2,position:"absolute",right:0,height:"100%",width:"48px"},t.createElement(p,{alignment:"center","data-pendo":"toolbar-profile-support-wrapper",spacing:2},t.createElement(f,{"data-pendo":"toolbar-profile",onClick:function(){return me(ge)},radius:0,theme:!1},t.createElement(x,{alt:L+"'s avatar",hover:{outlineColor:Ut.lightNeutral62},outlineColor:X&&K&&"Profile"==Q.name?Ut.lightNeutral62:"transparent",outlineOffset:"2px",outlineStyle:"solid",outlineWidth:"2px",size:"sm",source:Y})),t.createElement(Vi,{currentContent:Q,indicatorState:xe,key:se.name,onClick:ce,open:X,tool:se})),t.createElement(p,{alignment:"center",spacing:2},pe.map(function(e){return t.createElement(Vi,{currentContent:Q,indicatorState:xe,key:e.name,onClick:function(){return me(e)},open:X,tool:e})}))),K&&t.createElement(Dn,{hasShadow:!0,id:"toolbarDrawer"+Q.name,width:"360px"},t.createElement(Q.component,Te({},Ce))))))}var Vi=function(e){var n=e.currentContent,r=e.indicatorState,a=e.onClick,i=e.open,o=e.tool;return t.createElement(k,{"data-pendo":"toolbar-"+o.name.toLowerCase(),key:o.name,position:"relative"},r[o.name]&&t.createElement(zn,{right:.25,top:.25}),t.createElement(f,{id:"toolbar-"+o.name.toLowerCase(),color:i&&n===o?Ut.lightNeutral24:Ut.lightNeutral62,hover:{color:Ut.lightNeutral24},icon:{name:i&&n===o?o.icons.active:o.icons.static,size:"20px"},key:o.name,onClick:a,title:"Open "+o.name+" drawer",theme:!1}))};export{qe as AppsProvider,vt as BellIcon,Xe as ConnectedPeopleProvider,et as DisplaySwitch,Kt as NotSmallRoute,Xt as NotSmallTopbar,on as PlatformAnnouncements,an as PlatformAnnouncementsStyleProvider,hn as ProductAnnouncement,mn as ProductAnnouncementStyleProvider,An as SmallRoute,Mn as SmallTopbar,bt as SpyglassIcon,rn as StyledPlatformAnnouncement,fn as StyledProductAnnouncement,pn as StyledProductAnnouncementDimissButton,In as SwitchView,Oi as Toolbar,kt as XIcon,Je as mapApps,Ye as railsCsrfFetch};
|
|
1
|
+
import*as e from"react";import t,{useEffect as n,useState as r,useMemo as a,useCallback as i,useRef as o,useContext as l,Fragment as s}from"react";import c from"@planningcenter/jolt-client";import u from"@planningcenter/url";import{useSyncExternalStore as d}from"use-sync-external-store/shim";import{ThemeProvider as m,Divider as h,Button as f,StackView as p,Text as g,Icon as v,designSystem as y,Link as E,HeadingUppercase as w,List as b,Box as k,Heading as _,GridView as C,Avatar as x,Badge as S,Spinner as M,WrapView as A,Collapse as T,ToggleSwitch as N,Input as P,Select as D,Menu as O,Group as V,Tooltip as z,Dropdown as H,Combobox as L,Logo as R}from"@planningcenter/tapestry-react";import*as Y from"@planningcenter/icons/paths/church-center";import*as Z from"@planningcenter/icons/paths/general";import*as I from"@planningcenter/icons/paths/people";import*as U from"@planningcenter/icons/paths/toolbar";import{UiExtensionFirstPartyComponent as W,components as F,UiExtensionDataContext as j}from"@planningcenter/add-ons";import{useChatContext as B,Avatar as G,useTranslationContext as q,ChannelList as J,InfiniteScroll as $,useMessageListContext as Q,MessageStatus as X,useMessageContext as K,getReadByTooltipText as ee,mapToUserNameOrId as te,useMessageInputContext as ne,useChannelStateContext as re,AttachmentPreviewList as ae,ChatAutoComplete as ie,Channel as oe,Window as le,MessageInput as se,MessageList as ce,Chat as ue}from"stream-chat-react";import de from"@planningcenter/datetime-fmt";import{StreamChat as me,logChatPromiseExecution as he}from"stream-chat";import fe from"@emoji-mart/data";import{init as pe,SearchIndex as ge}from"emoji-mart";import{nanoid as ve}from"nanoid";import{useDropzone as ye}from"react-dropzone";import{UploadButton as Ee}from"react-file-utils";import{EmojiPicker as we}from"stream-chat-react/emojis";import{InlineWidget as be}from"react-calendly";import ke from"algoliasearch";import{useSearchBox as _e,useHits as Ce,InstantSearch as xe,Configure as Se}from"react-instantsearch";import{TransitionGroup as Me,Transition as Ae}from"react-transition-group";function Te(){return Te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Te.apply(this,arguments)}function Ne(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Pe(e,t)}function Pe(e,t){return Pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pe(e,t)}function De(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function Oe(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(a[n]=e[n]);return a}function Ve(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var ze=["headers"],He=function(e,t){return fetch(e,Te({credentials:"include",mode:"cors"},t))},Le=function(e,t){var n,r,a,i=t.headers,o=Oe(t,ze);return fetch(e,Te({headers:Te({},i,{"X-CSRF-Token":(null==(n=window)||null==(r=n.Rails)?void 0:r.csrfToken())||(null==(a=document.querySelector('meta[name="csrf-token"]'))?void 0:a.getAttribute("content"))||null})},o,{credentials:"include",mode:"cors"}))};function Re(e,t,n){var r=void 0===n?{}:n,a=r.method,i=void 0===a?"GET":a,o=r.data,l=void 0===o?null:o,s={headers:{Accept:"application/json","Content-Type":"application/json"},method:i,redirect:"follow"};return l&&"GET"!==i&&(s.body=JSON.stringify(l)),e(t,s).then(function(e){return e.json().then(function(t){return{json:t,ok:e.ok,response:e}}).catch(function(){return{json:null,ok:e.ok,response:e}})},function(e){return console.warn(e),{json:null,ok:!1,response:null}})}var Ye=function(e){var n=e.channelName,r=e.enableJoltLogging,a=void 0!==r&&r,i=e.enabled,o=void 0===i||i,l=e.env,s=e.wssEndpoint,d=e.fetchSubscribeToken,m=e.joltPromise,h=void 0===m?function(){return Promise.resolve()}:m,f=t.useState(),p=f[0],g=f[1],v=t.useState(),y=v[0],E=v[1],w=t.useState(!1),b=w[0],k=w[1],_=t.useCallback(function(){try{return Promise.resolve(h().then(function(e){return e})).then(function(e){var t=function(e,t){try{return Promise.resolve(d(t))}catch(e){return Promise.reject(e)}};e||(k(!0),e=new c(s||function(e){switch(e){case"development":case"test":return"wss://1csnwvu025.execute-api.us-east-1.amazonaws.com/v1/";case"staging":return"wss://xvk2ac1o3l.execute-api.us-east-1.amazonaws.com/v1/";default:return"wss://yxe88gasn3.execute-api.us-east-1.amazonaws.com/v1/"}}(l),{fetchAuthTokenFn:function(){try{return Promise.resolve(Re(Le,window.location.origin+"/~api/notifications/v2/me/notifications_jolt_authorize",{data:{data:{attributes:{}}},method:"POST"}).then(function(e){return e.json.data.id}))}catch(e){return Promise.reject(e)}},fetchSubscribeTokenFn:t},{logToConsole:a}));var r=e.subscriptions.find(function(e){return e.channel===n})||e.subscribe(n,{fetchSubscribeTokenFn:t});g(r),E(e)})}catch(e){return Promise.reject(e)}},[Re,n,l,u,Le]);return t.useEffect(function(){o&&_()},[o,_]),t.useEffect(function(){var e=function(e){var t,n;e.data.hasOwnProperty("PCOPageExpiredCurrentPersonACID")&&e.data.PCOPageExpiredCurrentPersonACID!==(null==(t=window)||null==(n=t.pcoPageExpired)?void 0:n.currentPersonACID)&&y&&y.disconnect()};return window.addEventListener("message",e),function(){return window.removeEventListener("message",e)}},[y]),t.useEffect(function(){return function(){y&&b&&y.disconnect()}},[y]),p},Ze=function(e,t,r){return n(function(){return e?(e.bind(t,r),function(){return e.unbind(t,r)}):function(){}},[e,r])},Ie=function(e,t){void 0===t&&(t=1);var n=e.replace(/[a-z()%]/g,"").split(" ");return"hsla("+n[0]+", "+n[1]+"%, "+n[2]+"%, "+t+")"},Ue=function(e,t){var n;return function(){var r=[].slice.call(arguments),a=this;clearTimeout(n),(n=setTimeout(function(){n=null,e.apply(a,r)},t))||e.apply(a,r)}};function We(e,t){return Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every(function(e){return t[e[0]]!==e[1]})}function Fe(e,t){var a=r(function(){try{var n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(e){return t}}),i=a[0],o=a[1],l=JSON.stringify(i);return n(function(){window.localStorage.setItem(e,l)},[e,l]),{dropKey:function(){return window.localStorage.removeItem(e)},setStoredValue:o,storedValue:i}}var je=function(){};function Be(e){var t=e,n=new Set;return{getState:function(){return t},setState:function(e){t=e,n.forEach(function(e){return e(t)})},subscribe:function(e){return n.add(e),function(){return n.delete(e)}}}}var Ge=Be({}),qe=function(e){var a,i,o,l,s,c,d,m,h,f,p,g,v,y,E,w,b,k,_,C,x,S=e.configuredFetch,M=e.enableJoltLogging,A=e.env,T=e.formatter,N=void 0===T?Je:T,P=e.joltPromise,D=e.wssEndpoint,O=e.render,V=e.userId,z=function(e){var t=e.configuredFetch,a=e.env,i=Fe("Topbar",{}),o=i.setStoredValue,l=r(i.storedValue),s=l[0],c=l[1];n(function(){d()},[]);var d=function(){Re(t,u(a)("api")+"/people/v2/me/topbar").then(function(e){var t=e.json;e.ok&&(c(t),o(t))})};return s}({configuredFetch:void 0===S?He:S,env:A}),H=N(z),L=null==z||null==(a=z.data)||null==(i=a.attributes)?void 0:i.has_connected_people,R=null==z||null==(o=z.data)||null==(l=o.attributes)||null==(s=l.features)?void 0:s.includes("mfa_enabled"),Y=null==z||null==(c=z.data)||null==(d=c.attributes)||null==(m=d.features)?void 0:m.includes("notifications_context_menu"),Z=!(null==z||null==(h=z.data)||null==(f=h.attributes)||!f.mfa_configured),I=null==z||null==(p=z.data)||null==(g=p.attributes)?void 0:g.name,U=!window.notificationsDisabled,W=(null==z||null==(v=z.data)||null==(y=v.attributes)?void 0:y.org_time_zone)||"America/Los_Angeles",F=null==z||null==(E=z.data)||null==(w=E.attributes)||null==(b=w.features)?void 0:b.includes("chat_enabled"),j={algoliaApplicationId:null==z||null==(k=z.data)||null==(_=k.attributes)?void 0:_.algolia_application_identifier,algoliaSearchOnlyApiKey:null==z||null==(C=z.data)||null==(x=C.attributes)?void 0:x.algolia_search_key},B=Ye({channelName:"notifications.people."+V,enableJoltLogging:M,enabled:!0,env:A,wssEndpoint:D,fetchSubscribeToken:function(e){try{var t=window.location.origin+"/~api/notifications/v2/me/notifications_jolt_subscribe";return Promise.resolve(Re(Le,t,{data:{data:{attributes:{cid:e}}},method:"POST"}).then(function(e){return e.json.data.id}))}catch(e){return Promise.reject(e)}},joltPromise:P}),G=function(e){var n,r,a=e.enabled,i=e.joltChannel,o=Fe("Topbar:Notifications:hasUnread",!1),l=o.storedValue,s=o.setStoredValue,c=(n=function(){var e=window.location.origin+"/~api/notifications/v2/me/unread";Re(He,e).then(function(e){s(e.json.data.attributes.unread)}).catch(je)},void 0===(r=300)&&(r=0),t.useMemo(function(){return Ue(n,r)},[]));return t.useEffect(function(){a&&c()},[a]),Ze(a?i:void 0,"notifications.v2.events.notification.created",c),Ze(a?i:void 0,"notifications.v2.events.notification.updated",c),Ze(a?i:void 0,"notifications.v2.events.notification.destroyed",c),l}({enabled:!0,env:A,joltChannel:B});return n(function(){var e=Ge.getState();Ge.setState(Te({},e,{algoliaSearchAuth:j,chatEnabled:F,hasConnectedPeople:L,indicatorVisible:Te({},e.indicatorVisible,{Notifications:G}),joltPromise:P,mfaConfigured:Z,mfaEnabled:R,name:I,notifications:{enabled:U,env:A,joltChannel:B},notificationsContextMenu:Y,notificationsEnabled:U,notificationsJoltChannel:B,organizationTimeZone:W,userId:V}))},[P,Z,R,I,Y,U,G,W,V]),O(H||[],{fetch:function(){},remove:function(){}})};function Je(e){var t,n;return(null==e||null==(t=e.data)||null==(n=t.attributes)?void 0:n.apps)||[]}function $e(){window.localStorage.removeItem("Topbar:ConnectedPeople")}function Qe(e){window.location=e}var Xe=/*#__PURE__*/function(e){function t(t){var n;return(n=e.call(this,t)||this).state={connectedPeople:[]},n}Ne(t,e);var n=t.prototype;return n.fetch=function(){var e=this;Re(this.props.configuredFetch,u(this.props.env)("api")+"/login/v2/me/connected_people").then(function(t){var n=t.json;if(t.ok&&n){var r=n.data;return e.setState({connectedPeople:r},function(){return window.localStorage.setItem("Topbar:ConnectedPeople",JSON.stringify(r))})}})},n.unlink=function(){Re(this.props.configuredFetch,u(this.props.env)("api")+"/login/v2/me/unlink",{method:"POST"}).then(function(e){var t,n=e.json;null!=n&&null!=(t=n.meta)&&t.redirect_to&&Qe(n.meta.redirect_to)})},n.switch=function(e,t){Re(this.props.configuredFetch,u(this.props.env)("api")+"/login/v2/me/switch_connected_person",{data:{data:{attributes:{id:e,return_path:t}}},method:"POST"}).then(function(e){var t,n=e.json;null!=n&&null!=(t=n.meta)&&t.redirect_to&&Qe(n.meta.redirect_to)})},n.componentDidMount=function(){var e=JSON.parse(window.localStorage.getItem("Topbar:ConnectedPeople"));return e?this.setState({connectedPeople:e}):this.fetch()},n.render=function(){return this.props.render(this.state.connectedPeople||[],{fetch:this.fetch.bind(this),remove:$e.bind(this),switch:this.switch.bind(this),unlink:this.unlink.bind(this)})},t}(t.Component);Xe.defaultProps={configuredFetch:He};var Ke=/*#__PURE__*/function(e){function n(t){var n;return(n=e.call(this,t)||this).state={width:window.innerWidth},n.setWindowWidth=n.setWindowWidth.bind(Ve(n)),n}Ne(n,e);var r=n.prototype;return r.setWindowWidth=function(){this.setState({width:window.innerWidth})},r.componentDidMount=function(){window.addEventListener("resize",Ue(this.setWindowWidth,100),!1)},r.componentWillUnmount=function(){window.removeEventListener("resize",Ue(this.setWindowWidth,100),!1)},r.breakpointString=function(e){return e<480?"xs":e<600?"sm":e<720?"md":e<960?"lg":"xl"},r.render=function(){return t.createElement(t.Fragment,null,this.props.render(this.breakpointString(this.state.width)))},n}(t.Component),et=/*#__PURE__*/function(e){function n(){return e.apply(this,arguments)||this}return Ne(n,e),n.prototype.render=function(){var e=this;return t.createElement(Ke,{render:function(t){return-1!==e.props.smallBreakpoints.indexOf(t)?e.props.smallTopbar(t):e.props.notSmallTopbar(t)}})},n}(t.Component);function tt(e){return t.createElement("path",{fill:e.color,d:"M16.95,9.28h0l-1.33-.23c-.12,0-.24-.04-.34-.11-.1-.07-.18-.16-.23-.27-.12-.45-.3-.89-.54-1.3-.04-.11-.05-.24-.03-.35,.02-.12,.08-.23,.16-.32l.78-1.1h0s0-.03,0-.04l-.03-.02-.04-.04-.87-.87-.05-.05h0s-.02-.02-.03,0l-1.11,.78c-.09,.08-.2,.13-.32,.16-.12,.02-.24,.01-.35-.03-.41-.24-.84-.42-1.3-.54-.11-.05-.2-.13-.27-.23-.07-.1-.11-.22-.11-.34l-.22-1.33h0s-.01-.03-.02-.03h-1.41s-.02,0-.02,.02l-.23,1.34c0,.12-.04,.24-.11,.34-.07,.1-.16,.18-.27,.23-.45,.12-.89,.3-1.3,.54-.11,.04-.24,.05-.35,.03-.12-.02-.23-.08-.32-.16l-1.1-.78h0s-.02-.01-.03,0l-.02,.03-.04,.04-.87,.87-.05,.05h0s0,.03,0,.04l.78,1.11c.08,.09,.13,.2,.16,.32,.02,.12,.01,.24-.03,.35-.24,.4-.42,.84-.54,1.29-.05,.11-.13,.2-.23,.27-.1,.07-.22,.11-.34,.11l-1.33,.22h0s-.02,0-.02,.02v1.41s0,.02,.02,.02l1.34,.23c.12,0,.24,.05,.34,.11,.1,.07,.18,.16,.23,.27,.12,.45,.3,.89,.54,1.29,.04,.11,.05,.24,.03,.35-.02,.12-.08,.23-.16,.32l-.78,1.11s0,.02,0,.03h0l.05,.06,.87,.87,.04,.04,.02,.02s.02,0,.03,0h0l1.1-.79c.09-.08,.2-.13,.32-.16,.12-.02,.24-.01,.35,.03,.4,.24,.84,.42,1.29,.54,.11,.05,.2,.13,.27,.23,.07,.1,.11,.22,.11,.34l.23,1.34s0,.02,.02,.02h1.41s.02,0,.02-.02h0l.22-1.34c0-.12,.05-.24,.11-.34,.07-.1,.16-.18,.27-.23,.45-.12,.89-.3,1.29-.54,.11-.04,.24-.05,.35-.03,.12,.02,.23,.08,.32,.16l1.11,.78s.02,0,.03,0h0l.05-.06,.87-.87,.04-.04,.02-.02s0-.02,0-.03h0l-.78-1.11c-.08-.09-.13-.2-.16-.32-.02-.12-.01-.24,.03-.35,.24-.4,.42-.84,.54-1.29,.05-.11,.13-.2,.23-.27s.22-.11,.34-.11l1.34-.23s.02,0,.02-.02v-1.4s0-.02-.02-.02Zm-4.67,3.01c-.45,.45-1.03,.76-1.65,.88-.63,.12-1.27,.06-1.86-.18-.59-.24-1.09-.66-1.45-1.19-.35-.53-.54-1.15-.54-1.79s.19-1.26,.54-1.79c.35-.53,.86-.94,1.45-1.19,.59-.24,1.24-.31,1.86-.18,.63,.12,1.2,.43,1.65,.88,.3,.3,.54,.66,.7,1.05,.16,.39,.25,.81,.25,1.24s-.08,.84-.25,1.24c-.16,.39-.4,.75-.7,1.05Z"})}et.defaultProps={smallBreakpoints:["xs","sm"]};var nt={__proto__:null,Squircle:function(e){var n=e.color;return t.createElement("path",{fill:void 0===n?"#fff":n,d:"M10.008.045C2.047.045.056,2.036.056,10s1.991,9.952,9.952,9.952S19.96,17.959,19.96,10,17.969.045,10.008.045Z"})},Accounts:tt,API:function(e){return t.createElement("path",{fill:e.color,d:"M11.08,12.387a3.277,3.277,0,0,0,.21-.86l1.47-.23-.25-1.63-1.48.22A3.167,3.167,0,0,0,9.93,8.5l.54-1.37-1.54-.6L8.39,7.9a3.393,3.393,0,0,0-1.76.27l-.92-1.15-1.3,1.03.93,1.16a3.462,3.462,0,0,0-.43.78A3.333,3.333,0,0,0,4.69,11l-1.49.23.25,1.69,1.59-.24a3.278,3.278,0,0,0,1.02,1.2l-.54,1.39,1.55.6.54-1.39a3.319,3.319,0,0,0,1.74-.27l.93,1.17,1.3-1.04-.93-1.17A3.258,3.258,0,0,0,11.08,12.387ZM9.81,11.9A1.953,1.953,0,0,1,7.29,13a1.942,1.942,0,1,1,2.52-1.1Zm5.89-4.32a1.581,1.581,0,0,0,.04-.38,2.066,2.066,0,0,0-1.39-1.95v-.82H12.97v.82A2.066,2.066,0,0,0,11.58,7.2a1.581,1.581,0,0,0,.04.38l-.71.41.7,1.2.7-.4a2.073,2.073,0,0,0,2.7,0l.7.4.7-1.2Zm-2.04.67A1.045,1.045,0,1,1,14.7,7.2,1.041,1.041,0,0,1,13.66,8.247Z"})},Calendar:function(e){return t.createElement("path",{fill:e.color,d:"M14.18,6.5h-.91V5.8a.55.55,0,0,0-.55-.55h-.26a.55.55,0,0,0-.55.55v.7H8.09V5.8a.55.55,0,0,0-.55-.55H7.28a.55.55,0,0,0-.55.55v.7H5.82a.58.58,0,0,0-.58.59v7.08a.58.58,0,0,0,.58.58h8.36a.58.58,0,0,0,.58-.58V7.09A.58.58,0,0,0,14.18,6.5Zm-.91,6.71H6.73V9.09h6.54Z"})},CheckIns:function(e){return t.createElement("path",{fill:e.color,d:"M14.175,8.341,9.258,13.256a1.157,1.157,0,0,1-1.638,0L5.161,10.8A1.159,1.159,0,1,1,6.8,9.16L8.439,10.8l4.1-4.1a1.159,1.159,0,0,1,1.639,1.639Z"})},ChurchCenter:function(e){return t.createElement("path",{fill:e.color,d:"M13.91,14.763a.334.334,0,0,1-.331.338l-1.959-.016a.334.334,0,0,1-.338-.331s.005-.233.005-1.8a3.674,3.674,0,0,0-1.279-2.638,3.674,3.674,0,0,0-1.279,2.638c0,1.565.005,1.8.005,1.8a.334.334,0,0,1-.338.331L6.437,15.1a.334.334,0,0,1-.331-.338s-.242-6.457-.02-6.65h0L9.671,5.021a.522.522,0,0,1,.684,0l3.58,3.092H13.93C14.152,8.325,13.91,14.763,13.91,14.763Z"})},Giving:function(e){return t.createElement("path",{fill:e.color,d:"M10.3,13.769a.508.508,0,0,1-.592,0c-1.259-.888-5.982-4.494-3.268-6.83a2.386,2.386,0,0,1,3.215.205l.349.349.349-.349a2.386,2.386,0,0,1,3.215-.205C16.286,9.275,11.563,12.881,10.3,13.769Z"})},Groups:function(e){return t.createElement("path",{fill:e.color,d:"M13.769,11.313V8.683a1.867,1.867,0,1,0-2.443-2.449H8.69A1.867,1.867,0,1,0,6.243,8.681v2.632A1.867,1.867,0,1,0,8.69,13.76h2.632a1.867,1.867,0,1,0,2.447-2.447Zm-1.455,0a1.873,1.873,0,0,0-.992.992H8.69a1.877,1.877,0,0,0-.992-.992V8.681a1.877,1.877,0,0,0,.992-.992h2.636a1.872,1.872,0,0,0,.988.99Z"})},Home:function(e){return t.createElement("path",{fill:e.color,d:"M14.7619 8.93233C14.7619 8.72768 14.6587 8.53243 14.4775 8.39414L10.5927 5.43C10.2573 5.17413 9.74265 5.17413 9.40731 5.42999L5.52252 8.39414C5.34128 8.53243 5.2381 8.72768 5.2381 8.93233V13.0794C5.2381 13.4827 5.63079 13.8095 6.11521 13.8095H13.8848C14.3692 13.8095 14.7619 13.4826 14.7619 13.0794V8.93233Z"})},People:function(e){return t.createElement("path",{fill:e.color,d:"M8.177,5.732A2.018,2.018,0,1,1,6.159,7.75,2.019,2.019,0,0,1,8.177,5.732Zm2.494,8.53H5.664A.565.565,0,0,1,5.1,13.7V12.422a1.841,1.841,0,0,1,1.841-1.841H9.394a1.841,1.841,0,0,1,1.841,1.841V13.7A.565.565,0,0,1,10.671,14.262ZM12.814,6.94A1.513,1.513,0,1,1,11.3,8.453,1.513,1.513,0,0,1,12.814,6.94Zm1.537,6.093H12.413a.565.565,0,0,1-.565-.565v-.049a2.292,2.292,0,0,0-.2-.957.555.555,0,0,0-.062-.141.8.8,0,0,0-.061-.11,1.19,1.19,0,0,0-.092-.16,1.131,1.131,0,0,1,.908-.472h1.472a1.108,1.108,0,0,1,1.105,1.1v.785A.565.565,0,0,1,14.351,13.033Z"})},Publishing:function(e){return t.createElement("path",{fill:e.color,d:"M7.287,13.575a.478.478,0,0,1-.477.477H5.856a.478.478,0,0,1-.477-.477V6.407a.478.478,0,0,1,.477-.477H6.81a.478.478,0,0,1,.477.477Zm7.293,0a.477.477,0,0,1-.477.477H9.268a.478.478,0,0,1-.477-.477V12.6a.478.478,0,0,1,.477-.477H14.1a.477.477,0,0,1,.477.477Zm0-3.473a.477.477,0,0,1-.476.477H9.268a.478.478,0,0,1-.477-.477V6.407a.478.478,0,0,1,.477-.477H14.1a.477.477,0,0,1,.477.477Z"})},Registrations:function(e){return t.createElement("path",{fill:e.color,d:"M4.48,11.09a.51.51,0,0,0,0,.71l.7.7a.22.22,0,0,0,.27,0,1.47,1.47,0,0,1,1.8.22,1.5,1.5,0,0,1,.23,1.81.21.21,0,0,0,0,.27l.7.7a.51.51,0,0,0,.71,0l2-2a.16.16,0,0,0,0-.22L6.7,9.1a.17.17,0,0,0-.23,0Zm11-2.89-.71-.7a.21.21,0,0,0-.26,0,1.47,1.47,0,0,1-1.79-.23,1.49,1.49,0,0,1-.24-1.79.22.22,0,0,0,0-.27l-.7-.7a.51.51,0,0,0-.71,0L7.47,8.11a.14.14,0,0,0,0,.22l4.2,4.2a.14.14,0,0,0,.22,0l3.63-3.62A.51.51,0,0,0,15.52,8.2Z"})},Services:function(e){return t.createElement("path",{fill:e.color,d:"M6.5,6.559A1.059,1.059,0,1,1,5.443,5.5,1.059,1.059,0,0,1,6.5,6.559ZM5.443,8.943A1.059,1.059,0,1,0,6.5,10,1.059,1.059,0,0,0,5.443,8.943Zm0,3.443A1.059,1.059,0,1,0,6.5,13.445,1.059,1.059,0,0,0,5.443,12.386ZM15,6.087a.485.485,0,0,0-.485-.485H8.136a.485.485,0,0,0-.485.485V7.03a.485.485,0,0,0,.485.485h6.38A.485.485,0,0,0,15,7.03ZM15,9.53a.485.485,0,0,0-.485-.485H8.136a.485.485,0,0,0-.485.485v.943a.485.485,0,0,0,.485.485h6.38A.485.485,0,0,0,15,10.473Zm0,3.443a.485.485,0,0,0-.485-.485H8.136a.485.485,0,0,0-.485.485v.943a.485.485,0,0,0,.485.485h6.38A.485.485,0,0,0,15,13.916Z"})}},rt=["appName","colors","style","size"];function at(e){var n=e.color;return t.createElement("path",{d:"M10.008.045C2.047.045.056,2.036.056,10s1.991,9.952,9.952,9.952S19.96,17.959,19.96,10,17.969.045,10.008.045Z",fill:void 0===n?"#fff":n})}function it(e){var n=e.appName,r=e.colors,a=e.style,i=e.size,o=void 0===i?20:i,l=Oe(e,rt);return t.createElement("svg",Te({xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 20 20",role:"img","aria-labelledby":"title desc",style:Te({display:"block"},a)},l),t.createElement("title",{id:"title"},"Planning Center ",n," App Icon"),t.createElement("desc",{id:"desc"},"An image symbolizing the Planning Center ",n," app."),"Accounts"===n?null:t.createElement(at,null),nt[n]?t.createElement(nt[n],{color:"Accounts"!=n?r.base0:"#fff"}):t.createElement("div",null,"appName not supported"))}var ot={__proto__:null,Accounts:function(e){var n=e.color,r=e.size;return t.createElement("svg",{"data-name":"Layer 1",height:void 0===r?20:r,id:"4ce749c7-c01e-4a9b-9496-b14fd2e761aa",viewBox:"0 0 77.073 20",xmlns:"http://www.w3.org/2000/svg"},t.createElement("title",null,"accounts-text"),t.createElement("path",{fill:n,d:"M4.729,5.537A10.859,10.859,0,0,0,1.262,6.1a.566.566,0,0,0-.4.717l.194.819a.579.579,0,0,0,.7.5,10.108,10.108,0,0,1,2.748-.47,1.416,1.416,0,0,1,1.065.349A2.307,2.307,0,0,1,6,9.682,7.706,7.706,0,0,0,4.1,9.418c-2.493,0-4.1,1.305-4.1,3.327a3.2,3.2,0,0,0,3.328,3.434,4.385,4.385,0,0,0,3.011-1.161l.181.509c.1.249.231.415.515.415h.712a.6.6,0,0,0,.59-.589v-5.3C8.337,7.581,8.065,5.537,4.729,5.537ZM3.78,14.181a1.343,1.343,0,0,1-1.436-1.459c0-.91.777-1.522,1.932-1.522a4.726,4.726,0,0,1,1.7.3v1.556A2.983,2.983,0,0,1,3.78,14.181ZM18.6,13.194c.4.361.326.669.2.865a4.646,4.646,0,0,1-3.977,2.12,5.2,5.2,0,0,1-5.2-5.31,5.285,5.285,0,0,1,5.225-5.332,4.461,4.461,0,0,1,3.711,1.768.6.6,0,0,1-.1.869l-.775.71c-.361.335-.64.056-.806-.11A2.909,2.909,0,0,0,14.9,7.816,2.938,2.938,0,0,0,12,10.847,2.921,2.921,0,0,0,14.837,13.9a2.623,2.623,0,0,0,2.03-.965c.082-.081.161-.16.241-.233a.574.574,0,0,1,.819-.049Zm9.661,0c.4.361.326.669.2.865a4.644,4.644,0,0,1-3.976,2.12,5.2,5.2,0,0,1-5.2-5.31A5.286,5.286,0,0,1,24.5,5.537a4.459,4.459,0,0,1,3.71,1.768.6.6,0,0,1-.1.869l-.775.71c-.361.335-.641.056-.806-.11a2.779,2.779,0,0,0-4.869,2.073A2.92,2.92,0,0,0,24.5,13.9a2.625,2.625,0,0,0,2.03-.965c.081-.081.161-.16.241-.233a.573.573,0,0,1,.818-.049Zm5.86-7.657A5.323,5.323,0,1,0,39.3,10.826,5.317,5.317,0,0,0,34.117,5.537Zm2.838,5.289a2.857,2.857,0,1,1-5.7,0,2.853,2.853,0,1,1,5.7,0ZM49.346,6.341v9.012a.616.616,0,0,1-.612.589h-.517c-.34,0-.474-.245-.561-.485l-.2-.536a4.084,4.084,0,0,1-3.1,1.258c-3.388,0-3.823-2.5-3.823-4.685V6.341a.621.621,0,0,1,.59-.588h1.207a.6.6,0,0,1,.59.588v5.3c0,1.539.58,2.256,1.825,2.256a2.357,2.357,0,0,0,2.214-1.544l0-6.016c0-.544.349-.588.676-.588h1.1A.624.624,0,0,1,49.346,6.341Zm11.089,4.01v5a.605.605,0,0,1-.591.589H58.637a.6.6,0,0,1-.59-.589V10.265c0-1.579-.655-2.449-1.846-2.449a2.939,2.939,0,0,0-2.514,1.355v6.182c0,.4-.229.589-.7.589h-1.1a.6.6,0,0,1-.59-.589V6.341a.6.6,0,0,1,.59-.588h.518a.5.5,0,0,1,.522.391l.235.67a4.691,4.691,0,0,1,3.3-1.277C59.134,5.537,60.435,7.111,60.435,10.351Zm8.048,4.379a.556.556,0,0,1-.283.721,6.126,6.126,0,0,1-2.822.728c-2.337,0-2.637-1.651-2.637-3.09V7.816H61.713a.6.6,0,0,1-.589-.59V6.341a.569.569,0,0,1,.589-.588h1.028V3.088a.59.59,0,0,1,.59-.59h1.228a.573.573,0,0,1,.568.59V5.753h2.515a.582.582,0,0,1,.59.588v.885a.613.613,0,0,1-.59.59H65.127V13c0,.828.323.9.683.9a3.241,3.241,0,0,0,1.536-.458.523.523,0,0,1,.431-.064.558.558,0,0,1,.317.335Zm7.869-1.576c0,1.5-1.262,3.025-3.672,3.025a5.927,5.927,0,0,1-3.343-1.033h0a.523.523,0,0,1-.208-.663l.452-.926a.494.494,0,0,1,.3-.254.635.635,0,0,1,.505.076l.032.017a4.485,4.485,0,0,0,2.389.7c.74,0,1.2-.328,1.2-.855,0-.58-.666-.985-2.066-1.618-1.435-.648-2.763-1.49-2.763-3.253,0-1.41,1.056-2.832,3.414-2.832a5.7,5.7,0,0,1,2.973.752.706.706,0,0,1,.256.882l-.344.689a.582.582,0,0,1-.8.247,5.057,5.057,0,0,0-2.087-.485c-.8,0-1.156.385-1.156.768,0,.546.574.9,1.633,1.361C75.052,10.588,76.352,11.279,76.352,13.154Z"}))},API:function(e){var n=e.color,r=e.size;return t.createElement("svg",{"data-name":"Layer 1",height:void 0===r?20:r,id:"bed028ef-58ee-4c4c-a757-08ecc3276857",viewBox:"0 0 119.5 20",xmlns:"http://www.w3.org/2000/svg"},t.createElement("title",null,"api-text"),t.createElement("path",{fill:n,d:"M9.136.675H7.908a.621.621,0,0,0-.59.589V5.5a6.9,6.9,0,0,0-2.384-.469A5.013,5.013,0,0,0,.012,10.343c0,2.989,2.048,5.331,4.663,5.331a4.885,4.885,0,0,0,3.22-1.3l.16.543a.591.591,0,0,0,.564.519h.517a.6.6,0,0,0,.59-.59V1.264A.6.6,0,0,0,9.136.675ZM7.34,7.847v4.175A2.745,2.745,0,0,1,4.978,13.4,2.815,2.815,0,0,1,2.4,10.343a2.913,2.913,0,0,1,2.772-3.03A4.941,4.941,0,0,1,7.34,7.847Zm8.833-2.813A5.081,5.081,0,0,0,11.1,10.343a5.046,5.046,0,0,0,5.094,5.331,5.712,5.712,0,0,0,3.761-1.256.512.512,0,0,0,.064-.819l-.582-.906a.467.467,0,0,0-.3-.22.619.619,0,0,0-.45.147,3.737,3.737,0,0,1-2.368.818,2.818,2.818,0,0,1-2.854-2.484h6.755a.578.578,0,0,0,.566-.532c.023-.175.045-.524.045-.7A4.571,4.571,0,0,0,16.173,5.034ZM16.13,7.1a2.23,2.23,0,0,1,2.334,2.032H13.591A2.411,2.411,0,0,1,16.13,7.1ZM30.587,5.982l-4.3,9.366a.561.561,0,0,1-.515.326h-.129a.59.59,0,0,1-.534-.323l-4.31-9.373a.484.484,0,0,1-.024-.49.542.542,0,0,1,.493-.239h1.315a.543.543,0,0,1,.534.344l2.571,5.914,2.7-5.91c.161-.348.486-.348.773-.348h.97a.544.544,0,0,1,.494.239A.488.488,0,0,1,30.587,5.982Zm4.983-.948A5.081,5.081,0,0,0,30.5,10.343a5.045,5.045,0,0,0,5.094,5.331,5.706,5.706,0,0,0,3.76-1.256.512.512,0,0,0,.065-.819l-.582-.906a.467.467,0,0,0-.3-.22.616.616,0,0,0-.45.147,3.738,3.738,0,0,1-2.369.818,2.819,2.819,0,0,1-2.854-2.484h6.755a.58.58,0,0,0,.567-.532c.023-.175.044-.524.044-.7A4.57,4.57,0,0,0,35.57,5.034ZM35.527,7.1a2.23,2.23,0,0,1,2.334,2.032H32.988A2.413,2.413,0,0,1,35.527,7.1Zm8.426-5.833V14.847a.606.606,0,0,1-.59.59H42.156a.6.6,0,0,1-.59-.59V1.264a.606.606,0,0,1,.59-.589h1.207A.621.621,0,0,1,43.953,1.264Zm6.576,3.77a5.322,5.322,0,1,0,5.18,5.287A5.315,5.315,0,0,0,50.529,5.034Zm2.836,5.287a2.856,2.856,0,1,1-5.695,0,2.852,2.852,0,1,1,5.7,0Zm8.65-5.287a4.76,4.76,0,0,0-3.08,1.1l-.2-.487a.523.523,0,0,0-.539-.4h-.539a.606.606,0,0,0-.59.59V19.422a.6.6,0,0,0,.59.59h1.207a.58.58,0,0,0,.633-.59V15.066a5.6,5.6,0,0,0,2.427.608,5.075,5.075,0,0,0,4.9-5.331A5.026,5.026,0,0,0,62.015,5.034Zm2.427,5.309A2.9,2.9,0,0,1,61.648,13.4a4.112,4.112,0,0,1-2.19-.678v-4.1a2.628,2.628,0,0,1,2.277-1.3A2.787,2.787,0,0,1,64.442,10.343ZM72.73,5.034a5.081,5.081,0,0,0-5.073,5.309,5.046,5.046,0,0,0,5.095,5.331,5.711,5.711,0,0,0,3.76-1.256.512.512,0,0,0,.065-.819l-.583-.906a.463.463,0,0,0-.3-.22.61.61,0,0,0-.45.147,3.735,3.735,0,0,1-2.368.818,2.818,2.818,0,0,1-2.854-2.484h6.754a.577.577,0,0,0,.567-.532c.023-.178.045-.527.045-.7A4.57,4.57,0,0,0,72.73,5.034ZM72.687,7.1a2.23,2.23,0,0,1,2.334,2.032H70.147A2.413,2.413,0,0,1,72.687,7.1ZM85.434,5.6a.518.518,0,0,1,.009.524L84.926,7.2a.584.584,0,0,1-.334.323.543.543,0,0,1-.424-.032,2.366,2.366,0,0,0-.854-.181A2.734,2.734,0,0,0,81.08,8.561v6.286c0,.59-.485.59-.8.59h-.991a.6.6,0,0,1-.59-.59V5.839a.605.605,0,0,1,.59-.59H79.8a.576.576,0,0,1,.544.435l.213.688a3.921,3.921,0,0,1,2.971-1.338C84.277,5.034,85.17,5.183,85.434,5.6Zm11.8-5.4a.621.621,0,0,0-.469-.3h-.216a.62.62,0,0,0-.472.305l-6.615,14.5a.508.508,0,0,0,.02.5.517.517,0,0,0,.451.229h1.357a.652.652,0,0,0,.6-.392l1.284-2.884h6.9l1.306,2.884a.618.618,0,0,0,.6.392h1.358a.517.517,0,0,0,.451-.229.508.508,0,0,0,.021-.494Zm1.916,9.871H94.116l2.5-5.627ZM110.327.12h-4.913a.526.526,0,0,0-.526.525V14.912a.526.526,0,0,0,.526.525h1.4a.54.54,0,0,0,.525-.525V9.963h3.009A4.922,4.922,0,1,0,110.327.12Zm2.493,4.856a2.563,2.563,0,0,1-2.536,2.643H107.34V2.507h2.944A2.476,2.476,0,0,1,112.82,4.976ZM119.087.645V14.912a.54.54,0,0,1-.526.525h-1.422a.54.54,0,0,1-.525-.525V.645a.539.539,0,0,1,.525-.525h1.422A.539.539,0,0,1,119.087.645Z"}))},Calendar:function(e){var n=e.color,r=e.size;return t.createElement("svg",{"data-name":"Layer 1",height:void 0===r?20:r,id:"Layer_1",viewBox:"0 0 73.83 20",xmlns:"http://www.w3.org/2000/svg"},t.createElement("title",null,"calendar-text"),t.createElement("path",{fill:n,d:"M9,12.56c.39.36.32.66.19.85a4.65,4.65,0,0,1-4,2.12A5.21,5.21,0,0,1,0,10.21,5.3,5.3,0,0,1,5.23,4.87,4.49,4.49,0,0,1,9,6.64a.6.6,0,0,1-.1.85l-.78.71c-.35.33-.61.07-.78-.11a3,3,0,0,0-2-1,3,3,0,0,0-2.94,3.06,3,3,0,0,0,2.87,3.09,2.63,2.63,0,0,0,2.05-1l.25-.23A.55.55,0,0,1,8.32,12Zm9.25-3.17v5.33a.59.59,0,0,1-.57.57H17c-.27,0-.4-.16-.5-.4l-.19-.54a4.39,4.39,0,0,1-3,1.18A3.2,3.2,0,0,1,9.91,12.1c0-2,1.61-3.33,4.11-3.33a7.24,7.24,0,0,1,1.92.28,2.33,2.33,0,0,0-.43-1.72A1.44,1.44,0,0,0,14.43,7a10.27,10.27,0,0,0-2.77.48A.56.56,0,0,1,11,7l-.2-.82a.56.56,0,0,1,.39-.7,10.9,10.9,0,0,1,3.48-.57C18,4.87,18.25,6.92,18.25,9.39Zm-2.34,3V10.83a4.91,4.91,0,0,0-1.72-.3c-1.17,0-2,.62-2,1.55a1.37,1.37,0,0,0,1.46,1.48A3,3,0,0,0,15.91,12.42ZM22,.47H20.79a.6.6,0,0,0-.58.57V14.72a.59.59,0,0,0,.58.57H22a.59.59,0,0,0,.57-.57V1A.61.61,0,0,0,22,.47ZM33.75,9.56c0,.18,0,.53,0,.71a.57.57,0,0,1-.55.52H26.35a2.84,2.84,0,0,0,2.89,2.53,3.84,3.84,0,0,0,2.39-.82.57.57,0,0,1,.43-.15.45.45,0,0,1,.29.21l.58.92a.48.48,0,0,1-.06.79,5.67,5.67,0,0,1-3.76,1.26A5.05,5.05,0,0,1,24,10.19a5.1,5.1,0,0,1,5.08-5.32A4.58,4.58,0,0,1,33.75,9.56ZM26.46,9h4.95A2.27,2.27,0,0,0,29,6.91,2.45,2.45,0,0,0,26.46,9Zm13.8-4.12a4.72,4.72,0,0,0-3.32,1.3l-.24-.7a.48.48,0,0,0-.51-.38h-.52a.59.59,0,0,0-.57.57v9.06a.58.58,0,0,0,.57.57h1.11c.45,0,.68-.19.68-.57V8.5A3,3,0,0,1,40,7.13c1.21,0,1.88.88,1.88,2.48v5.11a.58.58,0,0,0,.57.57h1.21a.6.6,0,0,0,.58-.57v-5C44.24,6.45,42.94,4.87,40.26,4.87ZM55.29,1V14.72a.58.58,0,0,1-.57.57H54.2a.57.57,0,0,1-.55-.5l-.17-.58a4.89,4.89,0,0,1-3.24,1.32c-2.62,0-4.67-2.34-4.67-5.34A5,5,0,0,1,50.5,4.87a6.85,6.85,0,0,1,2.39.48h0V1a.61.61,0,0,1,.58-.57h1.23A.59.59,0,0,1,55.29,1ZM52.93,11.88V7.67a5,5,0,0,0-2.19-.54,2.94,2.94,0,0,0-2.81,3.06,2.85,2.85,0,0,0,2.61,3.09A2.76,2.76,0,0,0,52.93,11.88Zm12-2.49v5.33a.59.59,0,0,1-.57.57h-.72c-.27,0-.39-.16-.5-.4L63,14.35a4.39,4.39,0,0,1-3,1.18A3.2,3.2,0,0,1,56.6,12.1c0-2,1.62-3.33,4.11-3.33a7.24,7.24,0,0,1,1.92.28,2.33,2.33,0,0,0-.43-1.72A1.42,1.42,0,0,0,61.12,7a10.27,10.27,0,0,0-2.77.48A.56.56,0,0,1,57.67,7l-.2-.82a.56.56,0,0,1,.39-.7,10.9,10.9,0,0,1,3.48-.57C64.67,4.87,64.94,6.92,64.94,9.39Zm-2.34,3V10.83a4.91,4.91,0,0,0-1.72-.3c-1.17,0-2,.62-2,1.55a1.37,1.37,0,0,0,1.46,1.48A3,3,0,0,0,62.6,12.42Zm11-7c-.26-.42-1.18-.57-1.9-.57a4,4,0,0,0-3,1.37l-.23-.73A.56.56,0,0,0,68,5.09h-.52a.59.59,0,0,0-.58.57v9.06a.58.58,0,0,0,.58.57h1c.32,0,.79,0,.79-.57V8.4A2.77,2.77,0,0,1,71.5,7.13a2.47,2.47,0,0,1,.86.18.5.5,0,0,0,.41,0A.56.56,0,0,0,73.1,7l.52-1.09A.48.48,0,0,0,73.61,5.44Z"}))},CheckIns:function(e){var n=e.color,r=e.size;return t.createElement("svg",{"data-name":"Layer 1",height:void 0===r?20:r,id:"dc713595-39c2-41c4-b1d9-3ef8c295b738",viewBox:"0 0 79.311 20",xmlns:"http://www.w3.org/2000/svg"},t.createElement("title",null,"check-ins-text"),t.createElement("path",{fill:n,d:"M40.221,13.213c.4.362.326.669.2.866A4.646,4.646,0,0,1,36.44,16.2a5.2,5.2,0,0,1-5.2-5.311,5.286,5.286,0,0,1,5.225-5.331,4.462,4.462,0,0,1,3.711,1.768.605.605,0,0,1-.1.869L39.3,8.9c-.362.333-.64.055-.806-.109a2.9,2.9,0,0,0-1.967-.959,2.937,2.937,0,0,0-2.9,3.031,2.92,2.92,0,0,0,2.837,3.054,2.62,2.62,0,0,0,2.03-.965c.082-.081.162-.16.242-.234a.572.572,0,0,1,.818-.049h0Zm-9.679-2.971c0,.178-.022.526-.044.7a.579.579,0,0,1-.567.531H23.174a2.82,2.82,0,0,0,2.855,2.485,3.736,3.736,0,0,0,2.369-.818.609.609,0,0,1,.45-.147.459.459,0,0,1,.3.219l.583.907a.513.513,0,0,1-.065.819A5.708,5.708,0,0,1,25.9,16.2a5.046,5.046,0,0,1-5.1-5.332,5.081,5.081,0,0,1,5.074-5.31A4.572,4.572,0,0,1,30.542,10.242ZM23.3,9.653h4.874A2.23,2.23,0,0,0,25.835,7.62,2.412,2.412,0,0,0,23.3,9.653Zm-7.751-4.1a4.789,4.789,0,0,0-2.773.924V2.339a.621.621,0,0,0-.59-.588H10.974a.6.6,0,0,0-.59.588V15.373a.59.59,0,0,0,.59.589H12.16a.575.575,0,0,0,.611-.589V9.193a2.871,2.871,0,0,1,2.493-1.357c1.2,0,1.867.884,1.867,2.492v5.045a.59.59,0,0,0,.59.589h1.207a.606.606,0,0,0,.59-.589v-5C19.518,7.221,18.144,5.557,15.544,5.557ZM8.315,12.674h0a.573.573,0,0,0-.818.049c-.08.074-.16.154-.242.235a2.624,2.624,0,0,1-2.029.964,2.92,2.92,0,0,1-2.838-3.054,2.938,2.938,0,0,1,2.9-3.031A2.906,2.906,0,0,1,7.257,8.8c.166.164.444.442.8.109l.775-.71a.6.6,0,0,0,.1-.869A4.464,4.464,0,0,0,5.225,5.557,5.285,5.285,0,0,0,0,10.888,5.2,5.2,0,0,0,5.2,16.2a4.647,4.647,0,0,0,3.977-2.12c.13-.2.2-.5-.2-.866ZM55.084,9.566h-4.1a.514.514,0,0,0-.525.525v.926a.51.51,0,0,0,.525.5h4.1a.51.51,0,0,0,.526-.5v-.926A.514.514,0,0,0,55.084,9.566Zm20.945.2C74.97,9.308,74.4,8.955,74.4,8.41c0-.383.357-.769,1.156-.769a5.059,5.059,0,0,1,2.087.486.581.581,0,0,0,.8-.248l.344-.689a.706.706,0,0,0-.256-.882,5.705,5.705,0,0,0-2.973-.751c-2.358,0-3.413,1.422-3.413,2.831,0,1.764,1.327,2.606,2.762,3.253,1.4.634,2.066,1.038,2.066,1.618,0,.528-.459.856-1.2.856a4.5,4.5,0,0,1-2.39-.7l-.031-.018a.629.629,0,0,0-.506-.075.494.494,0,0,0-.3.254l-.452.926a.523.523,0,0,0,.21.664A5.935,5.935,0,0,0,75.639,16.2c2.41,0,3.672-1.522,3.672-3.025C79.311,11.3,78.011,10.609,76.029,9.769Zm-9.2-4.212a4.687,4.687,0,0,0-3.3,1.277l-.235-.67a.5.5,0,0,0-.522-.392h-.517a.605.605,0,0,0-.591.59v9.011a.591.591,0,0,0,.591.589h1.1c.469,0,.7-.193.7-.589V9.19A2.934,2.934,0,0,1,66.57,7.836c1.191,0,1.846.87,1.846,2.45v5.087a.59.59,0,0,0,.59.589h1.207a.606.606,0,0,0,.59-.589v-5C70.8,7.131,69.5,5.557,66.829,5.557Zm-8.3-4.275a1.543,1.543,0,0,0-1.538,1.581,1.532,1.532,0,0,0,1.538,1.559,1.57,1.57,0,1,0,0-3.14Zm-12.215,9.1,3.949-3.716a.548.548,0,0,0,.14-.588.484.484,0,0,0-.476-.3H48.355a1.063,1.063,0,0,0-.7.331L44.008,9.4V2.339a.62.62,0,0,0-.59-.588H42.211a.6.6,0,0,0-.59.588V15.373a.59.59,0,0,0,.59.589h1.207a.606.606,0,0,0,.59-.589V11.329l3.783,4.4a.711.711,0,0,0,.542.237H50.1a.468.468,0,0,0,.461-.256.561.561,0,0,0-.094-.582ZM59.135,5.772H57.928a.605.605,0,0,0-.59.59v9.011a.59.59,0,0,0,.59.589h1.207a.606.606,0,0,0,.59-.589V6.362A.621.621,0,0,0,59.135,5.772Z"}))},ChurchCenter:function(e){var n=e.color,r=e.size;return t.createElement("svg",{"data-name":"Layer 1",height:void 0===r?20:r,id:"e2e8a225-c349-4aea-935c-64b6ad436be8",viewBox:"0 0 118.083 20",xmlns:"http://www.w3.org/2000/svg"},t.createElement("title",null,"church-center-text"),t.createElement("path",{fill:n,d:"M5.188,16.2A5.187,5.187,0,0,1,0,10.908,5.27,5.27,0,0,1,5.209,5.591a4.453,4.453,0,0,1,3.7,1.762.588.588,0,0,1-.1.844l-.776.712c-.346.319-.607.062-.779-.109a2.93,2.93,0,0,0-1.983-.966A2.959,2.959,0,0,0,2.35,10.887a2.942,2.942,0,0,0,2.859,3.076,2.642,2.642,0,0,0,2.045-.971c.082-.081.162-.16.242-.234a.552.552,0,0,1,.794-.047l.669.539c.388.352.318.651.193.841A4.629,4.629,0,0,1,5.188,16.2ZM19.5,15.4V10.391c0-3.14-1.368-4.8-3.959-4.8a4.788,4.788,0,0,0-2.788.939l-.006-4.209a.609.609,0,0,0-.571-.57H10.964a.592.592,0,0,0-.571.57V15.4a.58.58,0,0,0,.571.572H12.15a.558.558,0,0,0,.593-.572V9.207a2.893,2.893,0,0,1,2.515-1.373c1.217,0,1.888.893,1.888,2.514V15.4a.579.579,0,0,0,.571.572h1.208A.593.593,0,0,0,19.5,15.4Zm8.7-.468.2.566c.09.246.218.474.544.474h.518a.6.6,0,0,0,.592-.572V6.378a.612.612,0,0,0-.592-.57h-1.1c-.332,0-.657.044-.657.57l0,6.023a2.38,2.38,0,0,1-2.236,1.562c-1.259,0-1.845-.723-1.845-2.277V6.378a.585.585,0,0,0-.571-.57H21.843a.6.6,0,0,0-.57.57v5.156c0,2.175.433,4.67,3.807,4.67A4.06,4.06,0,0,0,28.193,14.928Zm6.2.468V9.1A2.755,2.755,0,0,1,36.65,7.834a2.382,2.382,0,0,1,.863.184.53.53,0,0,0,.41.032.571.571,0,0,0,.324-.315l.518-1.077a.5.5,0,0,0-.009-.507c-.259-.413-1.18-.56-1.89-.56a3.975,3.975,0,0,0-2.984,1.356l-.223-.719a.555.555,0,0,0-.525-.42h-.518a.585.585,0,0,0-.571.57V15.4a.58.58,0,0,0,.571.572h.993C33.922,15.968,34.4,15.968,34.4,15.4Zm13.35-1.305c.125-.19.2-.489-.193-.841l-.669-.539a.552.552,0,0,0-.794.047c-.08.074-.16.153-.242.234a2.642,2.642,0,0,1-2.044.971,2.942,2.942,0,0,1-2.86-3.076,2.959,2.959,0,0,1,2.924-3.053A2.93,2.93,0,0,1,45.85,8.8c.172.171.433.428.779.109l.776-.712a.588.588,0,0,0,.1-.844,4.452,4.452,0,0,0-3.7-1.762,5.271,5.271,0,0,0-5.21,5.317,5.187,5.187,0,0,0,5.188,5.3A4.629,4.629,0,0,0,47.745,14.091ZM58.089,15.4V10.391c0-3.14-1.368-4.8-3.959-4.8a4.79,4.79,0,0,0-2.788.939l-.006-4.209a.609.609,0,0,0-.571-.57H49.557a.592.592,0,0,0-.571.57V15.4a.58.58,0,0,0,.571.572h1.187a.557.557,0,0,0,.592-.572V9.207a2.893,2.893,0,0,1,2.515-1.373c1.217,0,1.888.893,1.888,2.514V15.4a.579.579,0,0,0,.571.572h1.208A.593.593,0,0,0,58.089,15.4Zm12.926-1.305c.126-.19.2-.489-.192-.841l-.669-.539a.553.553,0,0,0-.8.047c-.08.074-.159.153-.242.234a2.64,2.64,0,0,1-2.044.971,2.941,2.941,0,0,1-2.859-3.076A2.8,2.8,0,0,1,69.121,8.8c.171.171.433.428.778.109l.777-.712a.587.587,0,0,0,.1-.844,4.449,4.449,0,0,0-3.7-1.762,5.271,5.271,0,0,0-5.21,5.317,5.187,5.187,0,0,0,5.188,5.3A4.629,4.629,0,0,0,71.015,14.091Zm10.247-3.83c0,.177-.022.525-.044.7a.562.562,0,0,1-.549.516H73.887a2.838,2.838,0,0,0,2.877,2.526,3.743,3.743,0,0,0,2.382-.824.6.6,0,0,1,.436-.143.447.447,0,0,1,.283.212l.584.907a.492.492,0,0,1-.063.794A5.7,5.7,0,0,1,76.634,16.2a5.031,5.031,0,0,1-5.08-5.317,5.068,5.068,0,0,1,5.059-5.3A4.558,4.558,0,0,1,81.262,10.261Zm-2.335-.57a2.251,2.251,0,0,0-2.358-2.073,2.433,2.433,0,0,0-2.564,2.073ZM91.707,15.4V10.391c0-3.23-1.3-4.8-3.959-4.8a4.657,4.657,0,0,0-3.306,1.3l-.246-.7a.479.479,0,0,0-.5-.376h-.518a.585.585,0,0,0-.571.57V15.4a.58.58,0,0,0,.571.572h1.1c.457,0,.679-.187.679-.572V9.2a2.96,2.96,0,0,1,2.536-1.37c1.2,0,1.867.877,1.867,2.471V15.4a.58.58,0,0,0,.571.572h1.208A.594.594,0,0,0,91.707,15.4Zm7.779.081a.538.538,0,0,0,.277-.7l-.389-1.014a.537.537,0,0,0-.306-.325.493.493,0,0,0-.415.061,3.249,3.249,0,0,1-1.548.462c-.445,0-.7-.15-.7-.918V7.834h2.536a.594.594,0,0,0,.571-.571V6.378a.564.564,0,0,0-.571-.57H96.4V3.12a.555.555,0,0,0-.549-.571h-1.23a.579.579,0,0,0-.571.571V5.808H93.005a.552.552,0,0,0-.571.57v.885a.579.579,0,0,0,.571.571h1.048v5.3c0,1.431.3,3.073,2.62,3.073A6.067,6.067,0,0,0,99.486,15.477Zm10.11-5.216c0,.177-.022.525-.044.7a.561.561,0,0,1-.549.516h-6.782a2.838,2.838,0,0,0,2.877,2.526,3.743,3.743,0,0,0,2.382-.824.6.6,0,0,1,.437-.143.446.446,0,0,1,.282.212l.584.907a.491.491,0,0,1-.063.794,5.7,5.7,0,0,1-3.752,1.252,5.032,5.032,0,0,1-5.08-5.317,5.068,5.068,0,0,1,5.059-5.3A4.557,4.557,0,0,1,109.6,10.261Zm-2.335-.57A2.25,2.25,0,0,0,104.9,7.618a2.434,2.434,0,0,0-2.565,2.073Zm6.026,5.705V9.1a2.755,2.755,0,0,1,2.255-1.265,2.388,2.388,0,0,1,.864.184.528.528,0,0,0,.409.032.568.568,0,0,0,.324-.315l.519-1.077a.5.5,0,0,0-.009-.507c-.26-.413-1.181-.56-1.891-.56a3.977,3.977,0,0,0-2.984,1.356l-.223-.719a.555.555,0,0,0-.525-.42h-.518a.585.585,0,0,0-.571.57V15.4a.58.58,0,0,0,.571.572h.993C112.814,15.968,113.287,15.968,113.287,15.4Z"}))},Giving:function(e){var n=e.color,r=e.size;return t.createElement("svg",{"data-name":"Layer 1",height:void 0===r?20:r,id:"a221b42b-722d-4eb3-b043-fff7f3c6686f",viewBox:"0 0 50.486 20",xmlns:"http://www.w3.org/2000/svg"},t.createElement("title",null,"giving-text"),t.createElement("path",{fill:n,d:"M9.17,5.089H8.588c-.335,0-.42.255-.474.416l-.2.473a4.791,4.791,0,0,0-3.1-1.1A5.026,5.026,0,0,0,0,10.184a5.085,5.085,0,0,0,4.923,5.332,5.459,5.459,0,0,0,2.428-.629v.342c0,2.113-1.285,2.557-2.363,2.557a3.619,3.619,0,0,1-2.259-.905.567.567,0,0,0-.474-.114.553.553,0,0,0-.365.3l-.516.948a.563.563,0,0,0,.126.7A5.489,5.489,0,0,0,5.031,20a4.407,4.407,0,0,0,4.728-4.771V5.679A.6.6,0,0,0,9.17,5.089Zm-1.8,3.378V12.5a3.951,3.951,0,0,1-2.191.74,2.973,2.973,0,0,1-2.8-3.054A2.82,2.82,0,0,1,5.1,7.152,2.835,2.835,0,0,1,7.373,8.467Zm6.745-2.788v9.01a.6.6,0,0,1-.59.589H12.321a.59.59,0,0,1-.59-.589V5.679a.605.605,0,0,1,.59-.59h1.207A.62.62,0,0,1,14.118,5.679Zm.388-3.508A1.572,1.572,0,0,1,12.924,3.73a1.532,1.532,0,0,1-1.538-1.559A1.543,1.543,0,0,1,12.924.59,1.564,1.564,0,0,1,14.506,2.171Zm10.3,3.156a.49.49,0,0,1-.027.5l-4.307,9.367a.558.558,0,0,1-.514.327h-.13a.6.6,0,0,1-.534-.323L14.984,5.817a.487.487,0,0,1-.025-.49.545.545,0,0,1,.494-.238h1.315a.547.547,0,0,1,.535.344l2.572,5.917,2.7-5.913c.16-.348.486-.348.773-.348h.97A.545.545,0,0,1,24.807,5.327Zm3.249.352v9.01a.6.6,0,0,1-.59.589H26.259a.59.59,0,0,1-.59-.589V5.679a.605.605,0,0,1,.59-.59h1.207A.62.62,0,0,1,28.056,5.679Zm.388-3.508A1.572,1.572,0,0,1,26.863,3.73a1.532,1.532,0,0,1-1.539-1.559A1.544,1.544,0,0,1,26.863.59,1.564,1.564,0,0,1,28.444,2.171Zm10.69,7.517v5a.6.6,0,0,1-.59.589H37.337a.59.59,0,0,1-.59-.589V9.6c0-1.581-.655-2.451-1.846-2.451a2.938,2.938,0,0,0-2.514,1.355v6.182c0,.4-.229.589-.7.589h-1.1a.59.59,0,0,1-.59-.589V5.679a.605.605,0,0,1,.59-.59h.517a.5.5,0,0,1,.522.391l.235.67a4.692,4.692,0,0,1,3.3-1.276C37.834,4.874,39.134,6.448,39.134,9.688Zm10.456-4.6h-.582c-.336,0-.42.255-.473.416l-.2.473a4.777,4.777,0,0,0-3.1-1.1,5.026,5.026,0,0,0-4.815,5.31,5.085,5.085,0,0,0,4.923,5.332,5.459,5.459,0,0,0,2.428-.629v.342c0,2.113-1.285,2.557-2.363,2.557a3.619,3.619,0,0,1-2.259-.905.567.567,0,0,0-.474-.114.553.553,0,0,0-.365.3l-.516.948a.563.563,0,0,0,.126.7A5.489,5.489,0,0,0,45.451,20a4.407,4.407,0,0,0,4.729-4.771V5.679A.605.605,0,0,0,49.59,5.089Zm-1.8,7.409a3.944,3.944,0,0,1-2.19.74,2.973,2.973,0,0,1-2.795-3.054,2.693,2.693,0,0,1,4.985-1.717Z"}))},Home:function(e){var n=e.color,r=e.size;return t.createElement("svg",{id:"a221b42b-722d-4eb3-b043-fff7f3c6686f","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",height:void 0===r?20:r,viewBox:"0 0 47.624 20"},t.createElement("title",null,"home-text"),t.createElement("path",{fill:n,d:"M8.952,9.7V14.69a.584.584,0,0,1-.553.57H7.229a.57.57,0,0,1-.553-.57V9.658c0-1.616-.649-2.506-1.827-2.506A2.791,2.791,0,0,0,2.414,8.52v6.17a.547.547,0,0,1-.573.57H.692a.569.569,0,0,1-.553-.57v-13a.583.583,0,0,1,.553-.569H1.861a.6.6,0,0,1,.553.569V5.857a4.544,4.544,0,0,1,2.706-.94C7.627,4.917,8.952,6.571,8.952,9.7Zm11.261.473a5.239,5.239,0,0,1-5,5.322,5.185,5.185,0,0,1-5.022-5.322A5.213,5.213,0,0,1,15.21,4.917,5.2,5.2,0,0,1,20.213,10.174Zm-2.234,0a2.789,2.789,0,1,0-5.558,0,2.884,2.884,0,0,0,2.789,3.087A2.876,2.876,0,0,0,17.979,10.174Zm14.59-5.257a4.475,4.475,0,0,0-3.248,1.519,3.34,3.34,0,0,0-2.956-1.519,4.128,4.128,0,0,0-3.031,1.289L23.111,5.5a.487.487,0,0,0-.506-.367h-.48a.584.584,0,0,0-.553.569V14.69a.57.57,0,0,0,.553.57h1.169a.577.577,0,0,0,.553-.57V8.512a2.367,2.367,0,0,1,2.184-1.36c1.216,0,1.808.806,1.808,2.463V14.69a.555.555,0,0,0,.552.57h1.191a.559.559,0,0,0,.532-.57V9.551a10.249,10.249,0,0,0-.077-1.3l.06-.064a2.793,2.793,0,0,1,2.159-1.034c1.2,0,1.807.829,1.807,2.463V14.69a.538.538,0,0,0,.553.57h1.17a.549.549,0,0,0,.553-.57V9.7C36.339,7.647,35.948,4.917,32.569,4.917ZM47.042,9.572c0,.176-.021.523-.043.7a.549.549,0,0,1-.531.514H39.9A2.778,2.778,0,0,0,42.687,13.3a3.573,3.573,0,0,0,2.306-.82.6.6,0,0,1,.422-.144.431.431,0,0,1,.274.211l.566.9a.5.5,0,0,1-.061.791A5.416,5.416,0,0,1,42.562,15.5c-2.85,0-4.919-2.229-4.919-5.3a4.988,4.988,0,0,1,4.9-5.279A4.479,4.479,0,0,1,47.042,9.572ZM40.016,9h4.765A2.2,2.2,0,0,0,42.5,6.937,2.375,2.375,0,0,0,40.016,9Z"}))},Groups:function(e){var n=e.color,r=e.size;return t.createElement("svg",{"data-name":"Layer 1",height:void 0===r?20:r,id:"08e4075e-8ca4-4400-a3ae-98f53270d1d0",viewBox:"0 0 58.688 20",xmlns:"http://www.w3.org/2000/svg"},t.createElement("title",null,"groups-text"),t.createElement("path",{fill:n,d:"M9.17,5.09H8.588c-.335,0-.42.255-.474.416l-.2.472a4.791,4.791,0,0,0-3.1-1.1A5.027,5.027,0,0,0,0,10.185a5.085,5.085,0,0,0,4.923,5.332,5.465,5.465,0,0,0,2.428-.63v.342c0,2.113-1.285,2.557-2.363,2.557a3.631,3.631,0,0,1-2.259-.9.568.568,0,0,0-.473-.115.556.556,0,0,0-.366.3l-.516.947a.574.574,0,0,0,.126.7A5.487,5.487,0,0,0,5.031,20a4.407,4.407,0,0,0,4.728-4.771V5.679A.6.6,0,0,0,9.17,5.09Zm-1.8,3.378V12.5a3.951,3.951,0,0,1-2.191.74,2.972,2.972,0,0,1-2.8-3.053A2.821,2.821,0,0,1,5.1,7.152,2.835,2.835,0,0,1,7.373,8.468Zm11.092-2.5-.517,1.077a.588.588,0,0,1-.335.323.535.535,0,0,1-.424-.032,2.351,2.351,0,0,0-.854-.183A2.738,2.738,0,0,0,14.1,8.4v6.288c0,.59-.485.59-.806.59H12.3a.6.6,0,0,1-.59-.59V5.679a.6.6,0,0,1,.59-.589h.517a.574.574,0,0,1,.544.434l.213.688A3.931,3.931,0,0,1,16.55,4.874c.749,0,1.642.149,1.9.568A.517.517,0,0,1,18.465,5.967Zm4.994-1.093a5.323,5.323,0,0,0,0,10.643,5.323,5.323,0,0,0,0-10.643Zm0,8.364A2.907,2.907,0,0,1,20.6,10.163a2.852,2.852,0,1,1,5.7,0A2.9,2.9,0,0,1,23.459,13.238ZM38.688,5.679v9.01a.616.616,0,0,1-.611.59H37.56c-.34,0-.475-.246-.561-.486l-.2-.535a4.082,4.082,0,0,1-3.1,1.259c-3.389,0-3.824-2.5-3.824-4.686V5.679a.621.621,0,0,1,.59-.589h1.207a.605.605,0,0,1,.591.589v5.3c0,1.539.579,2.256,1.824,2.256A2.356,2.356,0,0,0,36.3,11.694l0-6.015c0-.544.334-.589.677-.589h1.1A.632.632,0,0,1,38.688,5.679Zm6.9-.805a4.752,4.752,0,0,0-3.081,1.1l-.2-.488a.523.523,0,0,0-.54-.4h-.538a.6.6,0,0,0-.59.589V19.266a.6.6,0,0,0,.59.589H42.44a.58.58,0,0,0,.633-.589V14.909a5.612,5.612,0,0,0,2.428.608,5.075,5.075,0,0,0,4.9-5.332A5.027,5.027,0,0,0,45.587,4.874ZM43.029,8.457a2.633,2.633,0,0,1,2.278-1.305,2.789,2.789,0,0,1,2.708,3.033,2.9,2.9,0,0,1-2.794,3.053,4.131,4.131,0,0,1-2.192-.676Zm15.349,4.034c0,1.5-1.262,3.026-3.672,3.026a5.921,5.921,0,0,1-3.343-1.034h0a.522.522,0,0,1-.208-.663l.452-.925a.493.493,0,0,1,.3-.254.633.633,0,0,1,.5.075l.037.02a4.488,4.488,0,0,0,2.384.7c.74,0,1.2-.329,1.2-.856,0-.581-.666-.985-2.066-1.619-1.435-.646-2.763-1.487-2.763-3.252,0-1.41,1.056-2.832,3.414-2.832a5.71,5.71,0,0,1,2.973.752.705.705,0,0,1,.256.881L57.5,7.2a.58.58,0,0,1-.8.248,5.043,5.043,0,0,0-2.087-.485c-.8,0-1.156.386-1.156.768,0,.545.574.9,1.633,1.361C57.078,9.926,58.378,10.616,58.378,12.491Z"}))},People:function(e){var n=e.color,r=e.size;return t.createElement("svg",{"data-name":"Layer 1",height:void 0===r?20:r,id:"c461f8d4-1c6e-406e-af2d-8d7721d891d5",viewBox:"0 0 57.729 20",xmlns:"http://www.w3.org/2000/svg"},t.createElement("title",null,"people-text"),t.createElement("path",{fill:n,d:"M4.944,5.019a4.754,4.754,0,0,0-3.08,1.1l-.2-.487a.521.521,0,0,0-.539-.4H.59A.606.606,0,0,0,0,5.823V19.41A.6.6,0,0,0,.59,20H1.8a.58.58,0,0,0,.633-.59V15.053a5.593,5.593,0,0,0,2.428.607,5.075,5.075,0,0,0,4.9-5.331A5.027,5.027,0,0,0,4.944,5.019ZM2.387,8.6A2.63,2.63,0,0,1,4.665,7.3a2.789,2.789,0,0,1,2.708,3.032,2.9,2.9,0,0,1-2.795,3.054,4.109,4.109,0,0,1-2.191-.678ZM15.663,5.019a5.083,5.083,0,0,0-5.075,5.31,5.046,5.046,0,0,0,5.1,5.331A5.707,5.707,0,0,0,19.445,14.4a.511.511,0,0,0,.065-.818l-.583-.907a.459.459,0,0,0-.295-.22.609.609,0,0,0-.45.147,3.735,3.735,0,0,1-2.369.82,2.819,2.819,0,0,1-2.854-2.487h6.756a.578.578,0,0,0,.567-.531c.022-.177.045-.525.045-.7A4.572,4.572,0,0,0,15.663,5.019Zm-2.583,4.1a2.411,2.411,0,0,1,2.539-2.033,2.231,2.231,0,0,1,2.335,2.033Zm13.145-4.1a5.322,5.322,0,0,0,0,10.641,5.322,5.322,0,0,0,0-10.641Zm2.837,5.289a2.856,2.856,0,1,1-5.7,0,2.852,2.852,0,1,1,5.7,0Zm8.653-5.289a4.758,4.758,0,0,0-3.081,1.1l-.2-.487a.522.522,0,0,0-.54-.4h-.538a.606.606,0,0,0-.591.589V19.41a.592.592,0,0,0,.591.59h1.207a.58.58,0,0,0,.633-.59V15.05a5.541,5.541,0,0,0,2.428.61,5.075,5.075,0,0,0,4.9-5.331A5.027,5.027,0,0,0,37.715,5.019ZM35.158,8.6a2.629,2.629,0,0,1,2.277-1.3,2.789,2.789,0,0,1,2.708,3.032,2.9,2.9,0,0,1-2.794,3.054,4.109,4.109,0,0,1-2.191-.678ZM46.324,1.247V14.834a.606.606,0,0,1-.59.59H44.527a.6.6,0,0,1-.59-.59V1.247a.6.6,0,0,1,.59-.589h1.207A.621.621,0,0,1,46.324,1.247Zm6.459,3.772a5.083,5.083,0,0,0-5.075,5.31,5.047,5.047,0,0,0,5.1,5.331A5.713,5.713,0,0,0,56.566,14.4a.511.511,0,0,0,.064-.818l-.583-.907a.459.459,0,0,0-.295-.22.6.6,0,0,0-.449.147,3.739,3.739,0,0,1-2.369.82,2.821,2.821,0,0,1-2.855-2.487h6.756a.577.577,0,0,0,.567-.531c.022-.177.045-.525.045-.7A4.572,4.572,0,0,0,52.783,5.019ZM52.74,7.081a2.231,2.231,0,0,1,2.334,2.033H50.2A2.412,2.412,0,0,1,52.74,7.081Z"}))},Publishing:function(e){var n=e.color,r=e.size;return t.createElement("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",height:void 0===r?20:r,viewBox:"0 0 84.973 20"},t.createElement("title",null,"publishing-text"),t.createElement("path",{d:"M4.905,5.03A4.709,4.709,0,0,0,1.829,6.141l-.2-.511a.5.5,0,0,0-.52-.385H.568A.59.59,0,0,0,0,5.812V19.374a.575.575,0,0,0,.568.568h1.2a.559.559,0,0,0,.611-.568v-4.4a5.573,5.573,0,0,0,2.437.618A5.036,5.036,0,0,0,9.681,10.3,4.988,4.988,0,0,0,4.905,5.03ZM2.338,8.575A2.642,2.642,0,0,1,4.626,7.261,2.8,2.8,0,0,1,7.343,10.3a2.908,2.908,0,0,1-2.8,3.06,4.117,4.117,0,0,1-2.2-.684Zm17.4-2.763v8.974a.6.6,0,0,1-.59.569h-.515c-.326,0-.456-.238-.541-.472l-.2-.562a4.046,4.046,0,0,1-3.1,1.27c-3.358,0-3.788-2.484-3.788-4.647V5.812a.606.606,0,0,1,.568-.567h1.2a.59.59,0,0,1,.568.567v5.282c0,1.546.584,2.266,1.837,2.266A2.368,2.368,0,0,0,17.4,11.806V5.812c0-.524.323-.567.654-.567h1.094A.609.609,0,0,1,19.737,5.812Zm6.74-.782A6.836,6.836,0,0,0,24.1,5.5l-.018.006V1.246a.606.606,0,0,0-.568-.567H22.29a.583.583,0,0,0-.568.567v13.54a.576.576,0,0,0,.568.569h.516a.569.569,0,0,0,.542-.5l.17-.576a4.845,4.845,0,0,0,3.217,1.31c2.6,0,4.711-2.374,4.711-5.291A5.071,5.071,0,0,0,26.477,5.03ZM24.061,7.76a5.243,5.243,0,0,1,2.18-.5A3,3,0,0,1,29.107,10.3a2.9,2.9,0,0,1-2.694,3.06A2.761,2.761,0,0,1,24.061,12ZM35.225,1.246v13.54a.591.591,0,0,1-.568.569h-1.2a.576.576,0,0,1-.569-.569V1.246a.59.59,0,0,1,.569-.567h1.2A.606.606,0,0,1,35.225,1.246Zm4.349,4.566v8.974a.591.591,0,0,1-.568.569H37.8a.576.576,0,0,1-.568-.569V5.812a.582.582,0,0,1,.568-.567h1.2A.606.606,0,0,1,39.574,5.812Zm.387-3.577a1.547,1.547,0,0,1-1.556,1.534,1.508,1.508,0,0,1-1.513-1.534A1.519,1.519,0,0,1,38.405.679,1.539,1.539,0,0,1,39.961,2.235ZM48.143,12.6c0,1.488-1.25,2.994-3.638,2.994a5.875,5.875,0,0,1-3.318-1.026h0a.5.5,0,0,1-.2-.636l.45-.922a.47.47,0,0,1,.291-.243.613.613,0,0,1,.487.073l.036.02a4.489,4.489,0,0,0,2.385.7c.737,0,1.214-.342,1.214-.871,0-.589-.667-.994-2.069-1.629-1.423-.642-2.74-1.476-2.74-3.222,0-1.394,1.045-2.8,3.38-2.8a5.67,5.67,0,0,1,2.951.745.684.684,0,0,1,.248.853l-.343.687a.56.56,0,0,1-.769.238,5.05,5.05,0,0,0-2.087-.485c-.808,0-1.17.394-1.17.784,0,.554.575.91,1.638,1.372C46.853,10.057,48.143,10.742,48.143,12.6ZM58.461,9.805v4.981a.592.592,0,0,1-.569.569h-1.2a.576.576,0,0,1-.568-.569V9.763c0-1.614-.668-2.5-1.879-2.5a2.881,2.881,0,0,0-2.5,1.366v6.159a.554.554,0,0,1-.589.569H49.97a.576.576,0,0,1-.568-.569V1.246A.582.582,0,0,1,49.97.679h1.2a.606.606,0,0,1,.567.567V5.967a4.766,4.766,0,0,1,2.782-.937C57.1,5.03,58.461,6.681,58.461,9.805Zm4.2-3.993v8.974a.59.59,0,0,1-.567.569h-1.2a.576.576,0,0,1-.568-.569V5.812a.59.59,0,0,1,.568-.567h1.2A.606.606,0,0,1,62.657,5.812Zm.387-3.577a1.547,1.547,0,0,1-1.556,1.534,1.507,1.507,0,0,1-1.512-1.534A1.518,1.518,0,0,1,61.488.679,1.539,1.539,0,0,1,63.044,2.235Zm10.647,7.57v4.981a.591.591,0,0,1-.569.569h-1.2a.576.576,0,0,1-.568-.569V9.72c0-1.586-.66-2.459-1.858-2.459a2.944,2.944,0,0,0-2.523,1.364v6.161c0,.383-.221.569-.676.569H65.2a.576.576,0,0,1-.568-.569V5.812a.59.59,0,0,1,.568-.567h.516a.474.474,0,0,1,.5.375l.245.7a4.64,4.64,0,0,1,3.29-1.288C72.4,5.03,73.691,6.592,73.691,9.805Zm10.432-4.56h-.579c-.32,0-.4.236-.454.4l-.2.5a4.737,4.737,0,0,0-3.1-1.112A4.988,4.988,0,0,0,75.01,10.3a5.046,5.046,0,0,0,4.884,5.291,5.429,5.429,0,0,0,2.437-.64v.372c0,2.121-1.29,2.566-2.373,2.566a3.629,3.629,0,0,1-2.261-.9.547.547,0,0,0-.456-.111.535.535,0,0,0-.352.292l-.514.944a.551.551,0,0,0,.123.673A5.444,5.444,0,0,0,80,20.056a4.371,4.371,0,0,0,4.69-4.733V5.812A.582.582,0,0,0,84.123,5.245ZM80.151,13.36a2.979,2.979,0,0,1-2.8-3.06,2.7,2.7,0,0,1,5-1.715v4.029A3.973,3.973,0,0,1,80.151,13.36Z",fill:n}))},Registrations:function(e){var n=e.color,r=e.size;return t.createElement("svg",{id:"2da9f999-408b-4466-9b5d-b1268727ac81","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",height:void 0===r?20:r,viewBox:"0 0 105.758 20"},t.createElement("title",null,"registrations-text"),t.createElement("path",{fill:n,d:"M6.751,5.966,6.234,7.043a.589.589,0,0,1-.336.324.545.545,0,0,1-.423-.033,2.375,2.375,0,0,0-.854-.182A2.74,2.74,0,0,0,2.387,8.4v6.288c0,.59-.485.59-.8.59H.59a.6.6,0,0,1-.59-.59V5.679A.6.6,0,0,1,.59,5.09h.517a.574.574,0,0,1,.544.433l.212.685A4,4,0,0,1,4.836,4.874c.749,0,1.643.148,1.9.567A.517.517,0,0,1,6.751,5.966Zm9.583,3.593c0,.181-.022.53-.044.705a.578.578,0,0,1-.567.531H8.966a2.82,2.82,0,0,0,2.855,2.486,3.74,3.74,0,0,0,2.369-.819.608.608,0,0,1,.45-.148.465.465,0,0,1,.295.22l.583.907a.513.513,0,0,1-.065.819,5.708,5.708,0,0,1-3.762,1.256,5.046,5.046,0,0,1-5.1-5.331A5.083,5.083,0,0,1,11.67,4.874,4.572,4.572,0,0,1,16.334,9.559ZM11.627,6.937A2.411,2.411,0,0,0,9.087,8.97h4.874A2.23,2.23,0,0,0,11.627,6.937ZM26.8,5.679v9.55A4.407,4.407,0,0,1,22.071,20a5.486,5.486,0,0,1-3.53-1.284.564.564,0,0,1-.127-.7l.516-.948a.555.555,0,0,1,.365-.3.561.561,0,0,1,.474.114,3.622,3.622,0,0,0,2.259.905c1.078,0,2.364-.444,2.364-2.557v-.342a5.472,5.472,0,0,1-2.429.629,5.084,5.084,0,0,1-4.922-5.331,5.027,5.027,0,0,1,4.814-5.311,4.777,4.777,0,0,1,3.1,1.1l.2-.473c.053-.161.138-.415.473-.415h.582A.6.6,0,0,1,26.8,5.679ZM22.136,7.152a2.821,2.821,0,0,0-2.708,3.033,2.972,2.972,0,0,0,2.794,3.053,3.948,3.948,0,0,0,2.191-.74V8.468A2.834,2.834,0,0,0,22.136,7.152ZM29.965.6a1.544,1.544,0,0,0-1.538,1.582A1.55,1.55,0,0,0,29.965,3.74a1.571,1.571,0,1,0,0-3.141Zm.6,4.491H29.361a.6.6,0,0,0-.59.589v9.01a.59.59,0,0,0,.59.59h1.208a.6.6,0,0,0,.589-.59V5.679A.62.62,0,0,0,30.569,5.09Zm5.91,4c-1.059-.462-1.632-.815-1.632-1.36,0-.383.357-.769,1.155-.769a5.048,5.048,0,0,1,2.088.486.582.582,0,0,0,.8-.248l.345-.689a.709.709,0,0,0-.256-.882A5.713,5.713,0,0,0,36,4.874c-2.357,0-3.413,1.422-3.413,2.831,0,1.764,1.328,2.606,2.763,3.253,1.4.634,2.065,1.038,2.065,1.618,0,.528-.459.856-1.2.856a4.5,4.5,0,0,1-2.387-.7l-.034-.018a.644.644,0,0,0-.5-.076.494.494,0,0,0-.3.254l-.452.925a.517.517,0,0,0,.208.663h0a5.917,5.917,0,0,0,3.342,1.034c2.411,0,3.672-1.522,3.672-3.025C39.761,10.617,38.461,9.926,36.479,9.087Zm10.558,3.964a.556.556,0,0,0-.316-.335.523.523,0,0,0-.432.063,3.244,3.244,0,0,1-1.537.459c-.359,0-.681-.069-.681-.9V7.152h2.514a.605.605,0,0,0,.59-.59V5.679a.577.577,0,0,0-.59-.589H44.071V2.424a.574.574,0,0,0-.569-.59H42.273a.59.59,0,0,0-.589.59V5.09H40.657a.57.57,0,0,0-.59.589v.883a.59.59,0,0,0,.59.59h1.027v5.274c0,1.438.3,3.09,2.637,3.09a6.116,6.116,0,0,0,2.822-.729.556.556,0,0,0,.283-.721Zm8.023-7.61c-.263-.419-1.156-.567-1.905-.567a4,4,0,0,0-2.973,1.335l-.212-.686a.574.574,0,0,0-.544-.433h-.517a.6.6,0,0,0-.59.589v9.01a.59.59,0,0,0,.59.59H49.9c.321,0,.806,0,.806-.59V8.4A2.738,2.738,0,0,1,52.94,7.152a2.369,2.369,0,0,1,.853.182.548.548,0,0,0,.424.033.6.6,0,0,0,.336-.324l.517-1.077A.517.517,0,0,0,55.06,5.441Zm8.351,3.946v5.3a.605.605,0,0,1-.59.59H62.11c-.284,0-.412-.166-.516-.416l-.181-.509A4.386,4.386,0,0,1,58.4,15.516a3.2,3.2,0,0,1-3.328-3.435c0-2.021,1.611-3.327,4.1-3.327a7.7,7.7,0,0,1,1.892.265,2.3,2.3,0,0,0-.417-1.668A1.414,1.414,0,0,0,59.588,7a10.1,10.1,0,0,0-2.749.47.577.577,0,0,1-.7-.494l-.194-.82a.566.566,0,0,1,.4-.717A10.865,10.865,0,0,1,59.8,4.874C63.14,4.874,63.411,6.918,63.411,9.387Zm-4.06,1.149c-1.174,0-1.933.6-1.933,1.524a1.343,1.343,0,0,0,1.436,1.458,2.987,2.987,0,0,0,2.191-1.125V10.835A4.853,4.853,0,0,0,59.351,10.536Zm11.773,2.515a.556.556,0,0,0-.316-.335.523.523,0,0,0-.432.063,3.244,3.244,0,0,1-1.537.459c-.359,0-.681-.069-.681-.9V7.152h2.514a.605.605,0,0,0,.59-.59V5.679a.577.577,0,0,0-.59-.589H68.158V2.424a.574.574,0,0,0-.569-.59H66.36a.591.591,0,0,0-.59.59V5.09H64.744a.57.57,0,0,0-.59.589v.883a.591.591,0,0,0,.59.59H65.77v5.274c0,1.438.3,3.09,2.638,3.09a6.107,6.107,0,0,0,2.821-.729.556.556,0,0,0,.284-.721ZM74.2,5.09H72.994a.605.605,0,0,0-.591.589v9.01a.591.591,0,0,0,.591.59H74.2a.605.605,0,0,0,.59-.59V5.679A.621.621,0,0,0,74.2,5.09ZM73.6.6a1.543,1.543,0,0,0-1.538,1.582A1.55,1.55,0,0,0,73.6,3.74,1.571,1.571,0,1,0,73.6.6Zm12.869,9.563a5.341,5.341,0,0,1-5.182,5.354,5.323,5.323,0,1,1,5.182-5.354Zm-2.344,0a2.853,2.853,0,1,0-5.7,0,2.857,2.857,0,1,0,5.7,0Zm8.867-5.288a4.7,4.7,0,0,0-3.3,1.277l-.235-.671a.5.5,0,0,0-.522-.39h-.518a.6.6,0,0,0-.589.589v9.01a.6.6,0,0,0,.589.59h1.1c.469,0,.7-.192.7-.59V8.507A2.939,2.939,0,0,1,92.73,7.152c1.191,0,1.847.87,1.847,2.451v5.086a.6.6,0,0,0,.59.59h1.207a.605.605,0,0,0,.59-.59v-5C96.964,6.448,95.664,4.874,92.989,4.874Zm9.2,4.213c-1.059-.462-1.633-.815-1.633-1.36,0-.383.358-.769,1.156-.769a5.04,5.04,0,0,1,2.087.486.585.585,0,0,0,.8-.248l.344-.689a.709.709,0,0,0-.255-.882,5.718,5.718,0,0,0-2.974-.751C99.355,4.874,98.3,6.3,98.3,7.705c0,1.764,1.328,2.606,2.763,3.253,1.4.634,2.066,1.038,2.066,1.618,0,.528-.46.856-1.2.856a4.49,4.49,0,0,1-2.387-.7l-.034-.018A.633.633,0,0,0,99,12.64a.49.49,0,0,0-.3.253l-.452.925a.516.516,0,0,0,.209.663h0a5.923,5.923,0,0,0,3.342,1.034c2.411,0,3.673-1.522,3.673-3.025C105.472,10.617,104.172,9.926,102.19,9.087Z"}))},Services:function(e){var n=e.color,r=e.size;return t.createElement("svg",{id:"bd77a8f3-6992-4241-927e-9fdc3bf67b80","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",height:void 0===r?20:r,viewBox:"0 0 67.995 20"},t.createElement("title",null,"services-text"),t.createElement("path",{fill:n,d:"M7.277,12.49c0,1.5-1.262,3.026-3.672,3.026A5.924,5.924,0,0,1,.262,14.482h0a.521.521,0,0,1-.209-.663L.5,12.893a.5.5,0,0,1,.305-.254.62.62,0,0,1,.5.075l.036.019a4.479,4.479,0,0,0,2.385.7c.74,0,1.2-.328,1.2-.856,0-.582-.666-.985-2.066-1.618C1.432,10.311.105,9.469.105,7.705c0-1.41,1.055-2.832,3.413-2.832a5.717,5.717,0,0,1,2.974.752.7.7,0,0,1,.255.881L6.4,7.2a.58.58,0,0,1-.8.248,5.04,5.04,0,0,0-2.087-.485c-.8,0-1.155.386-1.155.768,0,.546.573.9,1.632,1.361C5.977,9.925,7.277,10.615,7.277,12.49ZM17.622,9.559c0,.178-.022.528-.044.7a.58.58,0,0,1-.568.532H10.255a2.818,2.818,0,0,0,2.854,2.485,3.734,3.734,0,0,0,2.369-.819.64.64,0,0,1,.451-.148.472.472,0,0,1,.294.22l.583.907a.513.513,0,0,1-.065.82,5.715,5.715,0,0,1-3.761,1.256,5.047,5.047,0,0,1-5.1-5.332,5.083,5.083,0,0,1,5.074-5.311A4.573,4.573,0,0,1,17.622,9.559ZM15.249,8.97a2.229,2.229,0,0,0-2.334-2.034,2.412,2.412,0,0,0-2.54,2.034Zm8.511-4.1a3.929,3.929,0,0,0-2.972,1.338l-.213-.688a.575.575,0,0,0-.544-.434h-.518a.6.6,0,0,0-.589.589v9.01a.6.6,0,0,0,.589.59h.992c.32,0,.8,0,.8-.59V8.4a2.74,2.74,0,0,1,2.235-1.249,2.351,2.351,0,0,1,.854.183.534.534,0,0,0,.424.032.584.584,0,0,0,.334-.323l.518-1.077a.517.517,0,0,0-.01-.525C25.4,5.022,24.509,4.873,23.76,4.873Zm11.569.216H34.36c-.288,0-.613,0-.774.348l-2.695,5.912L28.319,5.433a.545.545,0,0,0-.535-.344H26.469a.544.544,0,0,0-.493.238.489.489,0,0,0,.024.49l4.311,9.376a.6.6,0,0,0,.534.323h.13a.56.56,0,0,0,.514-.327L35.8,5.822a.49.49,0,0,0,.027-.5A.545.545,0,0,0,35.329,5.089Zm3.154,0H37.276a.6.6,0,0,0-.59.589v9.01a.6.6,0,0,0,.59.59h1.207a.605.605,0,0,0,.59-.59V5.678A.621.621,0,0,0,38.483,5.089ZM37.879.6A1.543,1.543,0,0,0,36.341,2.18a1.532,1.532,0,0,0,1.538,1.559,1.57,1.57,0,1,0,0-3.14Zm10.8,11.392a.567.567,0,0,0-.818.047c-.08.073-.16.152-.241.233a2.623,2.623,0,0,1-2.031.966,2.92,2.92,0,0,1-2.838-3.053,2.778,2.778,0,0,1,4.87-2.073c.165.164.444.443.806.11l.774-.71a.606.606,0,0,0,.1-.87,4.465,4.465,0,0,0-3.711-1.768,5.285,5.285,0,0,0-5.225,5.332,5.2,5.2,0,0,0,5.2,5.311,4.647,4.647,0,0,0,3.977-2.12c.13-.2.2-.5-.2-.866ZM59.784,9.559c0,.178-.022.528-.044.7a.58.58,0,0,1-.567.532H52.417a2.818,2.818,0,0,0,2.854,2.485,3.734,3.734,0,0,0,2.369-.819.641.641,0,0,1,.451-.148.472.472,0,0,1,.294.22l.583.907a.513.513,0,0,1-.065.82,5.712,5.712,0,0,1-3.761,1.256,5.047,5.047,0,0,1-5.1-5.332A5.083,5.083,0,0,1,55.12,4.873,4.573,4.573,0,0,1,59.784,9.559ZM52.537,8.97h4.874a2.229,2.229,0,0,0-2.334-2.034A2.412,2.412,0,0,0,52.537,8.97ZM64.4,9.087c-1.06-.462-1.633-.816-1.633-1.361,0-.382.357-.768,1.156-.768a5.047,5.047,0,0,1,2.087.485.58.58,0,0,0,.8-.248l.344-.689a.706.706,0,0,0-.256-.881,5.71,5.71,0,0,0-2.973-.752c-2.358,0-3.414,1.422-3.414,2.832,0,1.764,1.328,2.606,2.763,3.253,1.4.633,2.066,1.036,2.066,1.618,0,.528-.459.856-1.2.856a4.485,4.485,0,0,1-2.384-.7l-.037-.02a.632.632,0,0,0-.5-.075.493.493,0,0,0-.3.254l-.452.925a.521.521,0,0,0,.209.663h0a5.923,5.923,0,0,0,3.342,1.034c2.412,0,3.673-1.522,3.673-3.026C67.685,10.615,66.385,9.925,64.4,9.087Z"}))}};function lt(e){var n=e.appName,r=e.size;return ot[n]?t.createElement(ot[n],{color:e.color,size:void 0===r?20:r}):t.createElement("div",null,"appName not supported")}var st={transition:"background-color 120ms ease-in"},ct={fontFamily:"inherit"},ut={flex:"1 1 auto"},dt=["dot","dotFill","fill","style"],mt=["dark","id","style"],ht=["colors","style"],ft=["fill","size","style"],pt=["fill","style"],gt=["fill","style"],vt=function(e){var n=e.dot,r=void 0!==n&&n,a=e.dotFill,i=void 0===a?"#fff":a,o=e.fill,l=void 0===o?"#fff":o,s=e.style,c=Oe(e,dt),u=t.createElement("path",{d:"M21.482,16.626,19.1,13.649V9a7,7,0,0,0-14,0v4.649L2.478,16.929A1.89,1.89,0,0,0,3.952,20H9.285a2.983,2.983,0,0,0,5.633,0H19.86a2.077,2.077,0,0,0,1.622-3.374ZM19.86,18H4.182l2.7-3.375A1,1,0,0,0,7.1,14V9a5,5,0,0,1,10,0v5a1,1,0,0,0,.219.625l2.6,3.25Z",fill:"white"});return t.createElement("svg",Te({width:"24",height:"24",viewBox:"0 0 24 24",style:Te({display:"block"},s)},c,{stroke:"none"}),t.createElement("title",null,"bell"),t.createElement("defs",null,t.createElement("mask",{id:"mask-no-dot"},u),t.createElement("mask",{id:"mask-dot"},u,t.createElement("circle",{cx:"18",cy:"6",fill:"black",r:"7"}))),t.createElement("rect",{fill:l,height:"24",mask:r?"url(#mask-dot)":"url(#mask-no-dot",width:"24",x:"0",y:"0"}),r&&t.createElement("circle",{cx:"18",cy:"6",r:"4",fill:i||l}))},yt=function(e){var n=e.dark,r=void 0!==n&&n,a=e.id,i=void 0===a?"default":a,o=e.style,l=Oe(e,mt);return t.createElement("svg",Te({fill:"none",height:"123",style:Te({},o),width:"160"},l),t.createElement("g",{clipPath:"url(#clip-path-blank-state-"+i+")"},t.createElement("path",{opacity:".6",d:"M155.367 66.751c-6.081 17.955-18.824 33.158-32.579 41.991-14.045 8.977-28.96 11.294-46.19 7.529-16.941-3.764-33.738-11.583-47.638-18.968C15.204 89.63 4.344 82.533 1.593 71.385-1.013 60.525 4.78 45.61 18.68 30.842 32.435 16.362 54.3 2.896 80.362.579c25.919-2.606 49.666 6.082 63.276 18.534 13.901 12.597 17.666 29.828 11.729 47.638z",fill:r?"#414141":"#E1F0F9"}),t.createElement("g",{opacity:".2"},t.createElement("path",{opacity:".2",d:"M90.643 122.063c-9.702 0-19.258-2.606-29.25-7.674-12.741-6.66-26.352-16.796-41.41-30.841C8.832 72.688-.29 62.697 0 50.678c.145-8.542 5.503-17.81 14.914-26.352l1.448 1.593c-9.122 8.108-14.19 16.94-14.335 24.76-.29 11.294 8.543 20.85 19.403 31.42C36.344 96 49.81 105.992 62.263 112.508c13.031 6.805 25.629 8.977 38.371 6.516l.434 2.027c-3.475.724-6.95 1.013-10.425 1.013zM116.706 115.982l-.869-1.738c13.756-6.226 25.919-16.507 34.027-28.67l1.738 1.159c-8.254 12.453-20.706 22.878-34.896 29.249zM158.552 71.385l-2.027-.58c2.896-11.294.869-22.877-5.792-33.303-10.715-17.086-32-29.973-55.457-33.882-19.258-3.475-40.108-.29-58.642 8.688l-.869-1.883c18.824-9.122 40.109-12.307 59.8-8.832 24.037 3.91 45.901 17.23 56.906 34.75 7.095 11.005 9.267 23.023 6.081 35.042z",fill:"#BAC7D3"})),t.createElement("path",{d:"M115.258 20.706l-.145 4.199c0 .869.289 1.882 1.013 2.461l3.186 2.752c.724.724.29 1.882-.724 1.882l-4.199-.145c-.869 0-1.882.29-2.462 1.014l-2.896 3.33c-.724.724-1.882.29-1.882-.724l.145-4.199c0-.869-.29-1.882-1.014-2.462l-3.185-2.75c-.724-.725-.29-1.883.724-1.883l4.199.145c.869 0 1.882-.29 2.461-1.014l2.751-3.185c.724-.87 2.028-.435 2.028.579zM92.959 30.842v1.882c0 .434.144.869.579 1.158l1.448 1.159c.29.29.145.869-.29.869h-1.882c-.434 0-.869.144-1.158.579l-1.159 1.448c-.29.29-.869.145-.869-.29v-1.882c0-.435-.144-.869-.579-1.159l-1.448-1.158c-.29-.29-.145-.869.29-.869h1.882c.435 0 .869-.145 1.159-.579l1.158-1.448c.29-.434.869-.29.869.29z",fill:"#FCC846"}),t.createElement("path",{d:"M68.778 36.633l-19.982 57.63 57.919-20.127-37.937-37.502z",fill:"#48A5E5"}),t.createElement("path",{d:"M82.099 54.299H62.696l2.027-5.647h12.308l5.068 5.647zM99.91 70.082H57.194l2.027-5.648h33.737l6.95 5.648zM72.398 85.864H51.692l1.737-5.647h35.91l-16.941 5.647z",fill:"#79CAF2"}),t.createElement("path",{d:"M107.613 73.964c1.44-1.5-6.087-11.069-16.813-21.374-10.726-10.305-20.588-17.443-22.029-15.944-1.44 1.5 6.087 11.069 16.813 21.374 10.726 10.305 20.588 17.443 22.029 15.944z",fill:r?"#525252":"#636363"}),t.createElement("path",{d:"M113.086 55.747h-3.041c-.724 0-1.303.29-1.737.868l-1.883 2.607c-.434.579-1.448.29-1.448-.435l-.144-3.185c0-.724-.29-1.303-.869-1.738l-2.607-1.882c-.579-.434-.289-1.448.435-1.448l3.185-.145c.724 0 1.303-.29 1.738-.869l1.882-2.606c.435-.58 1.448-.29 1.448.434l.145 3.186c0 .724.29 1.303.869 1.738l2.606 1.882c.579.58.29 1.593-.579 1.593z",fill:"#FCC846"})),t.createElement("defs",null,t.createElement("clipPath",{id:"clip-path-blank-state-"+i},t.createElement("path",{fill:"#fff",d:"M0 0h160v122.063H0z"}))))},Et=function(e){var n=e.colors,r=e.style,a=Oe(e,ht);return t.createElement("svg",Te({color:n.base3,height:"16",viewBox:"0 0 16 16",width:"16"},{style:r},a),t.createElement("title",null,"chevron"),t.createElement("polygon",{fill:"currentColor",points:"11.931 4.892 8 8.824 4.069 4.892 2.927 6.034 8 11.108 9.142 9.966 13.073 6.034 11.931 4.892"}))},wt=function(e){var n=e.fill,r=void 0===n?"#000":n,a=e.size,i=void 0===a?24:a,o=e.style,l=Oe(e,ft);return t.createElement("svg",Te({height:i,style:Te({display:"block"},o),viewBox:"0 0 16 16",width:i},l),t.createElement("title",null,"exclamation triangle icon"),t.createElement("path",{d:"M15.669 13.676L8.65499 1.56099C8.58867 1.44593 8.49322 1.35037 8.37823 1.28392C8.26325 1.21748 8.13279 1.1825 7.99999 1.1825C7.86718 1.1825 7.73672 1.21748 7.62174 1.28392C7.50675 1.35037 7.4113 1.44593 7.34499 1.56099L0.330986 13.676C0.264196 13.7911 0.228916 13.9217 0.2287 14.0548C0.228484 14.1878 0.26334 14.3186 0.329756 14.4339C0.396172 14.5492 0.491802 14.6449 0.60701 14.7115C0.722218 14.778 0.852933 14.813 0.985986 14.813H15.014C15.147 14.813 15.2778 14.778 15.393 14.7115C15.5082 14.6449 15.6038 14.5492 15.6702 14.4339C15.7366 14.3186 15.7715 14.1878 15.7713 14.0548C15.7711 13.9217 15.7358 13.7911 15.669 13.676ZM8.75699 12.542H7.24299V11.028H8.75699V12.542ZM8.75699 9.51399H7.24299V6.48499H8.75699V9.51399Z",fill:r}))},bt=function(e){var n=e.fill,r=void 0===n?"#000":n,a=e.style,i=Oe(e,pt);return t.createElement("svg",Te({width:"24",height:"24",viewBox:"0 0 24 24",style:Te({display:"block"},a)},i),t.createElement("title",null,"search spyglass icon"),t.createElement("path",{d:"M17.352,15.481a8.517,8.517,0,1,0-2.209,2.033l4.642,4.642,2.121-2.121Zm-6.757,1.364a6.5,6.5,0,1,1,6.5-6.5A6.508,6.508,0,0,1,10.595,16.845Z",fill:r}))},kt=function(e){var n=e.fill,r=void 0===n?"#A0A0A0":n,a=e.style,i=Oe(e,gt);return t.createElement("svg",Te({width:"16",height:"16",viewBox:"0 0 16 16",style:Te({display:"block"},a)},i),t.createElement("title",null,"close-x"),t.createElement("path",{d:"M9.142,8l3.814,3.814-1.142,1.142L8,9.142,4.186,12.956,3.044,11.814,6.858,8,3.044,4.186,4.186,3.044,8,6.858l3.814-3.814,1.142,1.142Z",fill:r}))},_t=["style"];function Ct(e){var n=e.style,r=Oe(e,_t);return t.createElement("button",Te({style:Te({WebkitAppearance:"none",appearance:"none",backgroundColor:"transparent",border:"none",cursor:"pointer",display:"inline-block",outline:0,padding:0},ct,n)},r))}var xt=["appName","colors","displayIconOnly","expanded","onClick","style"],St=function(e){var n=e.appName,r=e.colors,a=e.displayIconOnly,i=e.expanded,o=e.onClick,l=e.style,s=void 0===l?null:l,c=Oe(e,xt),u=t.useState(!1),d=u[0],m=u[1],h=t.useState(!1),f=h[0],p=h[1];return t.createElement(Ct,Te({onClick:o,onMouseDown:function(){return m(!0)},onMouseEnter:function(){return p(!0)},onMouseLeave:function(){return p(!1)},onMouseUp:function(){return m(!1)},style:Te({alignItems:"center",backgroundColor:i&&!d?r.base1:f&&d?r.base2:f?r.base1:"transparent",display:"flex",height:"100%",outline:0,paddingLeft:"16px",paddingRight:"16px",whiteSpace:"nowrap"},st,s)},c),t.createElement(it,{appName:n.replace(/[\s-]/,""),colors:r,size:24}),!a&&t.createElement(t.Fragment,null,"Accounts"===n?t.createElement("div",{style:{color:"#fff",fontSize:"14px",fontWeight:500,marginLeft:3}},"Account settings"):t.createElement(t.Fragment,null,t.createElement("div",{key:"spacer-1",style:{margin:4}}),t.createElement(lt,{appName:n.replace(/[\s-]/,""),color:"#fff",key:"mono-app-name",size:24})),t.createElement("div",{key:"space-2",style:{margin:4}}),t.createElement(Et,{colors:r,key:"disclosure-chevron-icon",style:{display:"block"}})))},Mt={__proto__:null,Accounts:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"2e1ed2e7-b842-4126-8f57-f6b6dd63ddb6",x1:"1.844",y1:"1.833",x2:"18.622",y2:"18.612",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#32a0f0"}),t.createElement("stop",{offset:"1",stopColor:"#3f75e5"}))),t.createElement("title",{key:"title"},"accounts-squircle"),t.createElement("path",{key:"path",d:"M19.96,10c0,7.962-1.991,9.952-9.952,9.952S.056,17.959.056,10,2.047.045,10.008.045,19.96,2.036,19.96,10Z",fill:"url(#2e1ed2e7-b842-4126-8f57-f6b6dd63ddb6)"})]},API:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"c8ec303e-a96d-4850-93ae-70864e3306bb",x1:"0.991",y1:"0.983",x2:"19.295",y2:"19.288",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#32a0f0"}),t.createElement("stop",{offset:"1",stopColor:"#3f75e5"}))),t.createElement("title",{key:"title"},"api-squircle"),t.createElement("path",{key:"path",d:"M20,10c0,7.991-2,9.989-9.989,9.989S.019,17.991.019,10s2-9.989,9.989-9.989S20,2.009,20,10Z",fill:"url(#c8ec303e-a96d-4850-93ae-70864e3306bb)"})]},Calendar:function(){return[t.createElement("defs",{key:"defs"},t.createElement("linearGradient",{id:"calendar-gradient",x1:"2.05",y1:"2.04",x2:"17.97",y2:"17.96",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#f25437"}),t.createElement("stop",{offset:"1",stopColor:"#cd4e39"}))),t.createElement("title",{key:"title"},"calendar-squircle"),t.createElement("path",{key:"path",d:"M20,10c0,8-2,10-10,10S.06,18,.06,10,2.05.05,10,.05,20,2,20,10Z",fill:"url(#calendar-gradient)"})]},CheckIns:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"679bc2bf-38c8-45ab-9ee3-a2ff814fead7",x1:"1.75",y1:"1.739",x2:"18.156",y2:"18.145",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#a76ebe"}),t.createElement("stop",{offset:"1",stopColor:"#875e96"}))),t.createElement("title",{key:"title"},"check-ins-squircle"),t.createElement("path",{key:"path",d:"M10.008.045C2.047.045.056,2.036.056,10s1.991,9.952,9.952,9.952S19.96,17.959,19.96,10,17.969.045,10.008.045Z",fill:"url(#679bc2bf-38c8-45ab-9ee3-a2ff814fead7)"})]},ChurchCenter:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"6de99831-a6f8-498e-9bf3-9d55c8d887fa",x1:"2.04",y1:"2.029",x2:"17.976",y2:"17.965",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#42a5f5"}),t.createElement("stop",{offset:"1",stopColor:"#66bb6a"}))),t.createElement("title",{key:"title"},"church-center-squircle"),t.createElement("path",{key:"path",d:"M10.008.037C2.04.037.048,2.029.048,10s1.992,9.96,9.96,9.96,9.96-1.992,9.96-9.96S17.976.037,10.008.037Z",fill:"url(#6de99831-a6f8-498e-9bf3-9d55c8d887fa)"})]},Giving:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"0aae6372-b733-476d-af45-8777c08c1e24",x1:"2.047",y1:"2.036",x2:"17.969",y2:"17.959",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#f5c426"}),t.createElement("stop",{offset:"1",stopColor:"#f2b327"}))),t.createElement("title",{key:"title"},"giving-squircle"),t.createElement("path",{key:"path",d:"M10.008.045C2.047.045.056,2.036.056,10s1.991,9.952,9.952,9.952S19.96,17.959,19.96,10,17.969.045,10.008.045Z",fill:"url(#0aae6372-b733-476d-af45-8777c08c1e24)"})]},Groups:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"86d10072-1c7f-4a02-88fe-0735565ae99a",x1:"1.939",y1:"1.928",x2:"18.146",y2:"18.135",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#ff962d"}),t.createElement("stop",{offset:"1",stopColor:"#fc7638"}))),t.createElement("title",{key:"title"},"groups-squircle"),t.createElement("path",{key:"path",d:"M19.96,10c0,7.962-1.991,9.952-9.952,9.952S.056,17.959.056,10,2.047.045,10.008.045,19.96,2.036,19.96,10Z",fill:"url(#86d10072-1c7f-4a02-88fe-0735565ae99a)"})]},Home:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"paint0_linear_1_2",x1:"-2.23242",y1:"0.320978",x2:"19.9609",y2:"22.5228",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#289DFF"}),t.createElement("stop",{offset:"1",stopColor:"#2266F7"}))),t.createElement("title",{key:"title"},"home-squircle"),t.createElement("path",{key:"path",d:"M9.99962 0C1.99854 0 0 2.00015 0 10C0 17.9998 1.99854 20 9.99962 20C18.0007 20 20 18.0014 20 10C20 1.99862 17.9999 0 9.99962 0Z",fill:"url(#paint0_linear_1_2)"})]},People:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"7f805f16-2322-4b42-b61a-2bf71eadb25a",x1:"2.047",y1:"2.036",x2:"17.969",y2:"17.958",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#32a0f0"}),t.createElement("stop",{offset:"1",stopColor:"#3f75e5"}))),t.createElement("title",{key:"title"},"people-squircle"),t.createElement("path",{key:"path",d:"M19.96,10c0,7.962-1.991,9.952-9.952,9.952S.056,17.959.056,10,2.047.045,10.008.045,19.96,2.036,19.96,10Z",fill:"url(#7f805f16-2322-4b42-b61a-2bf71eadb25a)"})]},Publishing:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"publishing-gradient",x1:"2.047",y1:"2.036",x2:"17.969",y2:"17.958",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#787882"}),t.createElement("stop",{offset:"1",stopColor:"#5f5f69"})),t.createElement("linearGradient",{id:"publishing-gradient-2",x1:"2.03",y1:"2.03",x2:"17.952",y2:"17.952",gradientTransform:"translate(2.563 -2.028) rotate(13.283)",xlinkHref:"#publishing-gradient"})),t.createElement("title",{key:"title"},"publishing-squircle"),t.createElement("path",{d:"M19.96,10c0,7.962-1.991,9.952-9.952,9.952S.056,17.959.056,10,2.047.045,10.008.045,19.96,2.036,19.96,10Z",fill:"url(#publishing-gradient)",key:"path"}),t.createElement("circle",{cx:"9.991",cy:"9.991",r:"9.951",transform:"translate(-2.028 2.563) rotate(-13.283)",fill:"url(#publishing-gradient-2)",key:"circle"})]},Registrations:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"bd67604d-f11c-4431-bd82-159c57241115",x1:"2.047",y1:"2.036",x2:"17.969",y2:"17.958",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#41b99e"}),t.createElement("stop",{offset:"1",stopColor:"#46948d"}))),t.createElement("title",{key:"title"},"registrations-squircle"),t.createElement("path",{key:"path",d:"M19.96,10c0,7.962-1.991,9.952-9.952,9.952S.056,17.959.056,10,2.047.045,10.008.045,19.96,2.036,19.96,10Z",fill:"url(#bd67604d-f11c-4431-bd82-159c57241115)"})]},Services:function(){return[t.createElement("defs",{key:"def"},t.createElement("linearGradient",{id:"00f9217c-0536-41ea-b265-a8689874be71",x1:"2.04",y1:"2.029",x2:"17.976",y2:"17.965",gradientUnits:"userSpaceOnUse"},t.createElement("stop",{offset:"0",stopColor:"#6eaa50"}),t.createElement("stop",{offset:"1",stopColor:"#6a9639"}))),t.createElement("title",{key:"title"},"services-squircle"),t.createElement("path",{key:"path",d:"M19.968,10c0,7.968-1.992,9.96-9.96,9.96S.048,17.965.048,10,2.04.037,10.008.037,19.968,2.029,19.968,10Z",fill:"url(#00f9217c-0536-41ea-b265-a8689874be71)"})]}};function At(e){var n=e.appName,r=e.size,a=void 0===r?20:r;return t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 20 20",style:{display:"block"}},t.createElement(Mt[n]?Mt[n]:"span",{key:"key1"}),nt[n]?t.createElement(nt[n],{color:"#fff",key:"key2"}):t.createElement("div",{key:"key3"},"appName not supported"))}function Tt(e){var t,n,r,a="/apps/"+e.toLowerCase(),i=null==(t=window)||null==(n=t.location)||null==(r=n.pathname)?void 0:r.toString();if(!i)return a;var o=new URLSearchParams;return o.append("referer",i),a+"?"+o.toString()}var Nt=["active","component","style"],Pt=function(e){var n=e.active,r=void 0!==n&&n,a=e.component,i=void 0===a?"span":a,o=e.style,l=void 0===o?null:o,s=Oe(e,Nt),c=t.useState(!1),u=c[1];return t.createElement(i,Te({onMouseEnter:function(){return u(!0)},onMouseLeave:function(){return u(!1)},style:Te({},l,{backgroundColor:r?"#ededed":c[0]?"#f7f7f7":"transparent"})},s))},Dt=["cleanup","onOutsideClick","visible"],Ot=/*#__PURE__*/function(e){function n(t){var n;return(n=e.call(this,t)||this).container=void 0,n.handleOutsideClick=n.handleOutsideClick.bind(Ve(n)),n}Ne(n,e);var r=n.prototype;return r.componentWillUnmount=function(){document.removeEventListener("click",this.handleOutsideClick,!0)},r.handleOutsideClick=function(e){if(!this.container.contains(e.target))return e.stopPropagation(),e.preventDefault(),this.props.onOutsideClick()},r.render=function(){var e=this,n=this.props,r=n.cleanup,a=Oe(n,Dt);return r?document.removeEventListener("click",this.handleOutsideClick,!0):document.addEventListener("click",this.handleOutsideClick,!0),t.createElement("div",Te({ref:function(t){return e.container=t}},a))},n}(t.Component),Vt=["style"],zt=function(e){var n=e.style,r=void 0===n?null:n,a=Oe(e,Vt);return t.createElement("div",Te({style:Te({alignSelf:"flex-end",display:"flex",position:"relative"},r)},a))},Ht=["component","style"],Lt=function(e){var n=e.component,r=void 0===n?"div":n,a=e.style,i=void 0===a?null:a,o=Oe(e,Ht);return t.createElement(r,Te({style:Te({background:"#FFFFFF",borderRadius:"3px",boxShadow:"0 0 0 1px #D4D9E2, 0 8px 32px rgba(0,0,0,.3)",overflow:"hidden",position:"absolute"},i)},o))},Rt=function(e){var n=e.appName,r=e.apps,a=e.env,i=e.toggle,o=e.visible,l=r.find(function(e){return"Accounts"===e.name}),s=r.find(function(e){return"Home"===e.name}),c=[].concat(r).filter(function(e){var t=e.name;return"Home"!==t&&"Accounts"!==t}).sort(function(e,t){return e.name.localeCompare(t.name)}),d=Te({},ct,{alignItems:"center",display:"flex",height:"48px",overflow:"hidden",padding:"0 16px",verticalAlign:"middle"});return t.createElement(zt,null,t.createElement(Lt,{cleanup:!o,component:Ot,onOutsideClick:i,style:Te({marginTop:"8px"},o?{opacity:1,transition:"none",visibility:"visible"}:{opacity:0,transition:"all 120ms ease-in",visibility:"hidden"})},t.createElement("menu",{"data-pendo":"app-switcher",style:{margin:0,minWidth:180,padding:0}},s&&t.createElement(Pt,{component:"a","data-pendo":"app-switcher--change-app--"+s.name,"data-turbolinks":!1,href:n===s.name?u(a)("accounts")+"/apps/"+n:u(a)("accounts")+Tt(s.name),style:Te({},d,{borderBottom:"1px solid #ededed"})},t.createElement("div",{style:{marginRight:"6px"}},t.createElement(At,{appName:"Home",size:20})),t.createElement(lt,{appName:"Home",color:"#444",size:18})),c.map(function(e,r){var i=e.name,o=0===r,l=r===c.length-1;return t.createElement(Pt,{component:"a","data-pendo":"app-switcher--change-app--"+i,"data-turbolinks":!1,href:i===n?u(a)("accounts")+"/apps/"+i.toLowerCase():u(a)("accounts")+Tt(i),key:i,style:Te({},d,{height:"40px",paddingBottom:l?"4px":null,paddingTop:o?"4px":null})},t.createElement("div",{style:{marginRight:"6px"}},t.createElement(At,{appName:i.replace(/[\s-]/,""),size:20})),t.createElement(lt,{appName:i.replace(/[\s-]/,""),color:"#444",size:18}))}),l&&t.createElement(Pt,{component:"a","data-pendo":"app-switcher--change-app--"+l.name,"data-turbolinks":!1,href:u(a)("accounts")+Tt(l.name),style:Te({},d,{borderTop:"1px solid #ededed",padding:"0 12px",textDecoration:"none"})},t.createElement("svg",{height:22,style:{display:"block",marginRight:"2px"},viewBox:"0 0 20 20",width:22,xmlns:"http://www.w3.org/2000/svg"},t.createElement(tt,{color:"#9e9e9e",key:"key2"})),t.createElement("div",{style:{color:"#737373",fontSize:"12px",lineHeight:"28px"}},"Account settings")))))},Yt=function(e){return(t="name",function(e){return e.slice().sort(function(e,n){return e[t].localeCompare(n[t])})})(e).reduce(function(e,t){return"Church Center"===(t.name||"")||"API"===(t.name||"")?e:"Home"===t.name?[t].concat(e):[].concat(e,[t])},[]);var t},Zt=function(e){return e.slice().sort(function(e,t){return e.attributes.organization_name.localeCompare(t.attributes.organization_name)})},It=function(e){return void 0===e&&(e=function(e){return e}),d(Ge.subscribe,function(){return e(Ge.getState())})},Ut=["children","style"];function Wt(e){var n=e.children,r=e.style,a=Oe(e,Ut);return t.createElement("nav",Te({className:"simple","data-pendo":"topbar","aria-label":"topbar-navigation",style:Te({MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",alignItems:"center",color:"white",display:"flex",height:"48px",position:"relative"},r)},a),t.createElement("style",null,"\n @media only print {\n .simple {\n display: none !important;\n }\n }\n "),n)}var Ft={danger43:"hsl(8 60% 43%)",danger45:"hsl(8 60% 45%)",danger47:"hsl(8 60% 47%)",danger93:"hsl(9 59% 93%)",danger97:"hsl(7 60% 97%)",darkNeutral07:"hsl(0 0% 7%)",darkNeutral12:"hsl(0 0% 12%)",darkNeutral15:"hsl(0 0% 15%)",darkNeutral17:"hsl(0 0% 17%)",darkNeutral19:"hsl(0 0% 19%)",darkNeutral24:"hsl(0 0% 24%)",darkNeutral32:"hsl(0 0% 32%)",darkNeutral50:"hsl(0 0% 50%)",darkNeutral68:"hsl(0 0% 68%)",darkNeutral88:"hsl(0 0% 88%)",darkNeutral98:"hsl(0 0% 98%)",interaction45:"hsl(221 75% 45%)",interaction50:"hsl(221 91% 50%)",interaction55:"hsl(221 91% 55%)",interaction66:"hsl(221 91% 66%)",interaction91:"hsl(221 91% 91%)",interaction93:"hsl(221 91% 93%)",interaction97:"hsl(221 89% 97%)",lightNeutral12:"hsl(0 0% 12%)",lightNeutral24:"hsl(0 0% 24%)",lightNeutral45:"hsl(0 0% 45%)",lightNeutral62:"hsl(0 0% 62%)",lightNeutral81:"hsl(0 0% 81%)",lightNeutral88:"hsl(0 0% 88%)",lightNeutral93:"hsl(0 0% 93%)",lightNeutral95:"hsl(0 0% 95%)",lightNeutral97:"hsl(0 0% 97%)",lightNeutral98:"hsl(0 0% 98%)",lightNeutral100:"hsl(0 0% 100%)",success23:"hsl(86 91% 23%)",success25:"hsl(86 91% 25%)",success27:"hsl(86 91% 27%)",success91:"hsl(95 50% 91%)",success97:"hsl(93 53% 97%)",warning20:"hsl(42 100% 20%)",warning49:"hsl(42 84% 49%)",warning55:"hsl(42 84% 55%)",warning63:"hsl(42 84% 63%)",warning94:"hsl(42 84% 94%)",warning97:"hsl(42 84% 97%)"},jt=["style"],Bt=function(e){var n=e.style,r=void 0===n?null:n,a=Oe(e,jt);return t.createElement("div",Te({style:Te({alignSelf:"flex-end",display:"flex",position:"relative"},r)},a))},Gt=function(e){var n=e.appName,r=e.connectedPeople,a=e.hasConnectedPeople,i=e.requestClearAppsCache,o=e.requestClearConnectedPeopleCache,l=e.requestSwitchConnectedPerson,s=e.requestUnlinkConnectedPeople,c=e.setUserMenuVisible,d=e.userMenuVisible,y=u(e.env)("login")+"/logout";return t.createElement(Bt,null,t.createElement(Lt,{component:Ot,onOutsideClick:function(){return c(!1)},cleanup:!d,style:Te({color:"#525252",marginTop:"8px",maxHeight:"75vh",maxWidth:"320px",minWidth:"242px",overflow:"auto",right:0},d?{opacity:1,transition:"none",visibility:"visible"}:{opacity:0,transition:"all 120ms ease-in",visibility:"hidden"},{cursor:"default"})},t.createElement("div",null,a?t.createElement("div",{style:{alignItems:"center",backgroundColor:"#eee",display:"flex",lineHeight:"32px",padding:"0 16px"}},t.createElement("div",{style:Te({},ut,{color:"#666",fontSize:"12px",textTransform:"uppercase",whiteSpace:"nowrap"},ct)},"Linked Accounts"),t.createElement("div",{style:Te({},ut,{alignItems:"center",fontSize:"12px",textAlign:"right"})},t.createElement("a",{href:"",onClick:function(e){i(),o(),s(),e.preventDefault()},style:Te({color:"#666",marginLeft:"64px",textDecoration:"none"},ct)},"unlink"))):t.createElement("noscript",null),t.createElement("style",null,"\n .NotSmallTopbar__connected-people-list > *:first-child > * { border-top-width: 0 !important }\n "),t.createElement("ul",{className:"NotSmallTopbar__connected-people-list",style:{listStyleType:"none",margin:0,padding:0}},Zt(r).map(function(e){var r=e.id,a=e.attributes;return t.createElement(Pt,{component:"li",key:r},t.createElement("a",{href:"",onClick:function(e){i(),o(),l(r,n+"/"),e.preventDefault()},style:Te({borderTop:"1px solid #ddd",color:"#444",display:"block",lineHeight:"48px",overflow:"hidden",paddingLeft:"16px",paddingRight:"16px",textDecoration:"none",textOverflow:"ellipsis",whiteSpace:"nowrap"},ct)},a.organization_name))}))),t.createElement(m,null,a&&t.createElement(h,null),t.createElement("form",{method:"POST",action:y},t.createElement(f,{"data-turbolinks":!1,hover:{backgroundColor:Ft.lightNeutral97},onClick:function(){i(),o()},style:{padding:0},theme:!1,type:"submit",width:"100%"},t.createElement(p,{distribution:"space-between",alignment:"center",axis:"horizontal",grow:1,paddingHorizontal:2,paddingVertical:1.5,spacing:4},t.createElement(g,{color:Ft.lightNeutral45,lineHeight:"24px"},"Log out"),t.createElement(v,{name:"general.intoBox",fill:Ft.lightNeutral45})))))))},qt=["active","component","hover","innerRef","style"],Jt=function(e){var n=e.active,r=void 0===n?null:n,a=e.component,i=void 0===a?"div":a,o=e.hover,l=void 0===o?null:o,s=e.innerRef,c=void 0===s?null:s,u=e.style,d=void 0===u?null:u,m=Oe(e,qt),h=t.useState(!1),f=h[0],p=h[1],g=t.useState(!1),v=g[1];return t.createElement(i,Te({onMouseDown:function(){return p(!0)},onMouseEnter:function(){return v(!0)},onMouseLeave:function(){return v(!1)},onMouseUp:function(){return p(!1)},style:Te({},ct,d,g[0]&&l,f&&r)},c&&{ref:c},m))},$t=function(e){var n=e.colors,r=e.orgName,a=e.requestConnectedPeopleFetch,i=e.setUserMenuVisible,o=e.showOrgName;return t.createElement("div",{style:{cursor:"pointer",marginLeft:"16px",position:"relative",whiteSpace:"nowrap"},"data-pendo":"topbar-org-switcher"},t.createElement(Jt,{component:"button",type:"button",style:Te({WebkitAppearance:"none",alignItems:"center",appearance:"none",backgroundColor:n.base1,border:"none",borderRadius:"9999px",color:n.text||"#fff",cursor:"pointer",display:"flex",fontSize:"13px",lineHeight:"32px",outline:0,padding:0},st),active:{backgroundColor:n.base3},hover:{backgroundColor:n.base2},onClick:function(){i(function(e){return!e}),a()}},t.createElement("div",{style:{marginLeft:8}}),o?t.createElement("div",{style:{fontSize:"13px",margin:"0 8px 0 8px",maxWidth:"240px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},r):t.createElement("div",{style:{margin:"0 4px 0 4px"}}),t.createElement("div",{style:{paddingRight:"8px"}},t.createElement(Et,{colors:n,style:{margin:"-3px"}}))))},Qt=["active","colors","style"],Xt=function(e){var n=t.useState(!1),r=n[0],a=n[1],i=t.useState(!0),o=i[0],l=i[1],s=t.useState(!1),c=s[0],u=s[1],d=It(),m=d.hasConnectedPeople,h=d.notificationsEnabled;return t.createElement(Wt,{style:Te({paddingLeft:"8px",paddingRight:"16px"},e.style)},t.createElement(Rt,{env:e.env,appName:e.appName,apps:Yt(e.apps),visible:r,toggle:function(){return a(function(e){return!e})}}),t.createElement(St,{colors:e.colors,expanded:r,onClick:function(){a(function(e){return!e}),e.requestAppsFetch()},appName:e.appName}),t.createElement("div",{style:{margin:"12px"}}),o&&e.routes,t.createElement("div",{style:{margin:"auto"}}),!h&&e.notifications(),e.search({hideRoutes:function(){return l(!1)},showRoutes:function(){return l(!0)}}),t.createElement($t,{colors:e.colors,orgName:e.orgName,requestConnectedPeopleFetch:e.requestConnectedPeopleFetch,setUserMenuVisible:u,showOrgName:e.showOrgName}),t.createElement(Gt,{appName:e.appName,hasConnectedPeople:m,connectedPeople:e.connectedPeople,env:e.env,requestClearAppsCache:e.requestClearAppsCache,requestClearConnectedPeopleCache:e.requestClearConnectedPeopleCache,requestSwitchConnectedPerson:e.requestSwitchConnectedPerson,requestUnlinkConnectedPeople:e.requestUnlinkConnectedPeople,setUserMenuVisible:u,userMenuVisible:c}))};Xt.defaultProps={notifications:function(){return null},search:function(){return null},showOrgName:!0,useDummyNotifications:!1};var Kt=function(e){var n=e.active,r=e.colors,a=e.style,i=void 0===a?null:a,o=Oe(e,Qt),l=t.useState(!1),s=l[0],c=l[1],u=t.useState(!1),d=u[1];return t.createElement("a",Te({style:Te({backgroundColor:s&&u[0]?r.base2:s||n?r.base1:"transparent",borderRadius:"9999px",color:r.text||"#fff",fontSize:"14px",fontWeight:600,lineHeight:"32px",marginRight:"4px",paddingLeft:"12px",paddingRight:"12px",textDecoration:"none",textTransform:"capitalize",verticalAlign:"middle",whiteSpace:"nowrap"},ct,st,i),onMouseEnter:function(){return c(!0)},onMouseLeave:function(){return c(!1)},onMouseDown:function(){return d(!0)},onMouseUp:function(){return d(!1)}},o))},en=["style"],tn=["children","className","colors","style"],nn=/*#__PURE__*/function(e){function n(t){var n;return(n=e.call(this,t)||this).state={announcements:t.initialAnnouncements},n}Ne(n,e);var r=n.prototype;return r.dismissAnnouncements=function(e){return this.setState(function(t){var n=t.announcements,r=n;return n[e]&&delete r[e],{announcements:r}}),Re(this.props.configuredFetch,u(this.props.env)("api")+"/people/v2/me/platform_notifications/"+e+"/dismiss",{method:"POST"})},r.render=function(){return t.createElement(t.Fragment,null,this.props.children({announcements:this.props.formatter(this.state.announcements)},{dismissAnnouncements:this.dismissAnnouncements.bind(this)}))},n}(t.Component);nn.defaultProps={formatter:function(e){return function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}(e).map(function(e){return{data:e[1],id:e[0]}})}};var rn=/*#__PURE__*/function(e){function n(){return e.apply(this,arguments)||this}return Ne(n,e),n.prototype.render=function(){var e=this.props,n=e.style,r=Oe(e,en);return t.createElement(Ke,{render:function(e){return t.createElement("div",Te({style:Te({alignItems:"center",display:"flex",justifyContent:"space-between",paddingBottom:14,paddingLeft:-1!==["xs","sm"].indexOf(e)?16:24,paddingRight:18,paddingTop:14},n)},r))}})},n}(t.Component),an=/*#__PURE__*/function(e){function n(){return e.apply(this,arguments)||this}return Ne(n,e),n.prototype.render=function(){var e=this.props,n=e.children,r=e.colors,a=e.style,i=Oe(e,tn);return t.createElement("div",Te({className:["__Topbar_PlatformAnnouncements_link"].join(" ").trim(),style:Te({backgroundColor:"#282828",color:"white",fontSize:"14px"},a)},i),t.createElement("style",null,"\n .__Topbar_PlatformAnnouncements_link { color: white }\n .__Topbar_PlatformAnnouncements_link a { color: "+r.base0+" }\n .__Topbar_PlatformAnnouncements_link a:hover { color: "+r.base1+" }\n .__Topbar_PlatformAnnouncements_link a:active { color: "+r.base2+" }\n "),n)},n}(t.Component),on=/*#__PURE__*/function(e){function n(){return e.apply(this,arguments)||this}return Ne(n,e),n.prototype.render=function(){var e=this;return t.createElement(an,{colors:this.props.colors},t.createElement(nn,{env:this.props.env,initialAnnouncements:this.props.data,configuredFetch:this.props.configuredFetch},function(n,r){return Boolean(n.announcements.length>0)?t.createElement("div",null,n.announcements.map(function(t){return e.props.renderItem({actions:r,announcement:t})})):null}))},n}(t.Component);function ln(e){var n=Te({},(De(e),e));return t.createElement("button",Te({type:"button",style:{WebkitAppearance:"none",backgroundColor:"transparent",borderWidth:0,cursor:"pointer",margin:-8,padding:8}},n),t.createElement(kt,{fill:"white",style:{height:20,width:20}}))}function sn(e){return t.createElement(rn,null,t.createElement("span",{dangerouslySetInnerHTML:{__html:e.html}}),t.createElement(ln,{onClick:e.onClick}))}on.defaultProps={configuredFetch:He,renderItem:function(e){var n=e.announcement,r=e.actions;return t.createElement(sn,{key:n.id,html:n.data.html,onClick:function(){return r.dismissAnnouncements(n.id)}})}};var cn=["colors","html","onClick"],un=["children","className","colors","style"],dn=["style"];function mn(e){var n=e.colors,r=e.html,a=void 0===r?"":r,i=e.onClick,o=void 0===i?function(e){}:i,l=Oe(e,cn),s=t.useState(!1),c=s[1];return s[0]||!a?null:t.createElement(hn,Te({colors:n},l),t.createElement(fn,null,t.createElement("span",{dangerouslySetInnerHTML:{__html:a}}),t.createElement(pn,{onClick:function(e){o(e),c(!0)}})))}var hn=/*#__PURE__*/function(e){function n(){return e.apply(this,arguments)||this}return Ne(n,e),n.prototype.render=function(){var e=this.props,n=e.children,r=e.className,a=e.colors,i=e.style,o=Oe(e,un);return t.createElement("div",Te({className:["Topbar_ProductAnnouncement",r].filter(Boolean).join(" ").trim(),style:Te({backgroundColor:a.base1},i)},o),t.createElement("style",null,"\n .Topbar_ProductAnnouncement {\n color: white;\n font-size: 14px;\n }\n .Topbar_ProductAnnouncement a { color: white; font-weight: bold; }\n "),n)},n}(t.Component),fn=/*#__PURE__*/function(e){function n(){return e.apply(this,arguments)||this}return Ne(n,e),n.prototype.render=function(){var e=this.props,n=e.style,r=Oe(e,dn);return t.createElement(Ke,{render:function(e){return t.createElement("div",Te({style:Te({alignItems:"center",boxSizing:"border-box",display:"flex",justifyContent:"space-between",paddingBottom:14,paddingLeft:-1!==["xs","sm"].indexOf(e)?16:24,paddingRight:18,paddingTop:14},n)},r))}})},n}(t.Component);function pn(e){var n=Te({},(De(e),e));return t.createElement("button",Te({type:"button",style:{WebkitAppearance:"none",backgroundColor:"transparent",borderWidth:0,cursor:"pointer",margin:-8,padding:8}},n),t.createElement(kt,{fill:"white",style:{height:20,width:20}}))}var gn=["env","url","style"];function vn(e){var n=e.env,r=e.url,a=void 0===r?"":r,i=e.style,o=Oe(e,gn),l=a||u(n)("people")+"/static/no_photo_thumbnail_gray.svg";return t.createElement("div",Te({style:Te({backgroundColor:"white",backgroundImage:"url("+l+")",backgroundPosition:"center",backgroundSize:"cover",borderRadius:"50%",height:"26px",marginLeft:"4px",width:"26px"},i)},o))}var yn=/*#__PURE__*/function(e){function n(){return e.apply(this,arguments)||this}Ne(n,e);var r=n.prototype;return r.update=function(e){return window[this.props.method].setItem(this.props.item,JSON.stringify(e)),this.forceUpdate()},r.render=function(){return t.createElement(t.Fragment,null,this.props.render(JSON.parse(window[this.props.method].getItem(this.props.item))||void 0,this.update.bind(this)))},n}(t.Component);function En(e){var n="accounts";return t.createElement("a",{style:{alignItems:"center",display:"flex",height:"48px",paddingLeft:"12px",paddingRight:"16px",textDecoration:"none"},"data-pendo":"app-switcher--change-app--"+n,"data-turbolinks":!1,href:u(e.env)(n)+Tt(n)},t.createElement("svg",{height:22,style:{display:"block",marginRight:"2px"},viewBox:"0 0 20 20",width:22,xmlns:"http://www.w3.org/2000/svg"},t.createElement(tt,{color:Ft.lightNeutral45,key:"key2"})),t.createElement("div",{style:{color:Ft.lightNeutral45,fontSize:"12px",lineHeight:"48px",textDecoration:"none"}},"Account settings"))}yn.defaultProps={method:"localStorage"};var wn=function(e){var n=e.color,r=e.size,a=void 0===r?22:r,i=e.style;return t.createElement("div",{style:void 0===i?{}:i},t.createElement(kt,{fill:void 0===n?Ft.lightNeutral100:n,style:{height:a+"px",width:a+"px"}}))};function bn(e){var t,n,r,a=e.appName,i=e.userId,o=u(e.env)("login")+"/people/AC"+i,l=null==(t=window)||null==(n=t.location)||null==(r=n.pathname)?void 0:r.toString();if(!l)return o;var s=new URLSearchParams;return s.append("return",a+"/"+l),o+"?"+s.toString()}var kn=function(e){var n=e.isActive,r=n?"hsl(86, 91%, 27%)":"hsl(8, 60%, 47%)";return t.createElement("div",{style:{alignItems:"center",display:"flex",fontSize:"13px",marginBottom:2,marginTop:4}},t.createElement("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none"},t.createElement("path",n?{d:"M12.588 5.31499H11.832V3.79999C11.8159 2.80798 11.4105 1.86207 10.7032 1.16625C9.99602 0.470436 9.04363 0.0804749 8.0515 0.0804749C7.05937 0.0804749 6.10698 0.470436 5.39976 1.16625C4.69253 1.86207 4.28713 2.80798 4.271 3.79999V5.31499H3.515C3.1138 5.31525 2.72906 5.47454 2.44508 5.75795C2.16111 6.04136 2.00106 6.42579 2 6.82699V14.388C2.00132 14.7891 2.16146 15.1734 2.44537 15.4567C2.72929 15.7401 3.11388 15.8995 3.515 15.9H12.588C12.9886 15.8987 13.3724 15.7389 13.6557 15.4557C13.939 15.1724 14.0987 14.7886 14.1 14.388V6.82699C14.0987 6.42639 13.939 6.04257 13.6557 5.7593C13.3724 5.47603 12.9886 5.31631 12.588 5.31499ZM8.051 12.115C7.75171 12.1152 7.45909 12.0266 7.21015 11.8605C6.96121 11.6944 6.76713 11.4581 6.65246 11.1817C6.53779 10.9052 6.50768 10.601 6.56595 10.3074C6.62422 10.0139 6.76824 9.74418 6.97979 9.53249C7.19135 9.32079 7.46094 9.17659 7.75446 9.11813C8.04798 9.05967 8.35225 9.08958 8.62877 9.20406C8.90529 9.31855 9.14165 9.51247 9.30794 9.7613C9.47424 10.0101 9.563 10.3027 9.563 10.602C9.56327 11.0036 9.40424 11.389 9.1208 11.6735C8.83736 11.9581 8.45264 12.1187 8.051 12.12V12.115ZM10.395 5.31499H5.707V3.79999C5.707 3.17832 5.95396 2.58211 6.39354 2.14253C6.83313 1.70294 7.42933 1.45599 8.051 1.45599C8.67267 1.45599 9.26887 1.70294 9.70846 2.14253C10.148 2.58211 10.395 3.17832 10.395 3.79999V5.31499Z",fill:r}:{d:"M13.7,5.8a1.5,1.5,0,0,0-1.1-.4H5.7V3.8a2.34,2.34,0,0,1,.7-1.7,2.19,2.19,0,0,1,1.7-.7,2.34,2.34,0,0,1,1.7.7,2.67,2.67,0,0,1,.7,1.4h1.4a4.12,4.12,0,0,0-1.1-2.4A4.73,4.73,0,0,0,8.1.1,4,4,0,0,0,5.4,1.2,3.63,3.63,0,0,0,4.3,3.8V5.3H3.5a2.1,2.1,0,0,0-1.1.4A2.1,2.1,0,0,0,2,6.8v7.6a2.1,2.1,0,0,0,.4,1.1,1.5,1.5,0,0,0,1.1.4h9.1a2.1,2.1,0,0,0,1.1-.4,1.5,1.5,0,0,0,.4-1.1V6.8A1.53,1.53,0,0,0,13.7,5.8ZM9.1,11.7a1.5,1.5,0,0,1-1.1.4H8a1.14,1.14,0,0,1-.8-.3,4.35,4.35,0,0,1-.6-.7,2.77,2.77,0,0,1-.1-.9A3,3,0,0,1,7,9.5a1.23,1.23,0,0,1,.8-.4,1.41,1.41,0,0,1,.9.1,1.34,1.34,0,0,1,.7.6,1.14,1.14,0,0,1,.3.8A2.38,2.38,0,0,1,9.1,11.7Z",fill:r})),t.createElement("span",{style:{color:"#888",marginLeft:4,whiteSpace:"nowrap"}},"Two-step verification ",n?"active":"inactive"))},_n={colors:Te({},(0,y.generateColorScale)({baseColor:"#2266f7",key:"primary"})),icons:{churchCenter:Y,general:Z,people:I,toolbar:U},id:"topbar"};function Cn(e){var n=e.appName,r=e.connectedPeople,a=e.env,i=e.hasConnectedPeople,o=e.linkToProfile,l=e.mfaConfigured,s=e.mfaEnabled,c=e.requestClearAppsCache,d=e.requestClearConnectedPeopleCache,h=e.requestSwitchConnectedPerson,v=e.requestUnlinkConnectedPeople,y=e.setUserMenuVisible,k=e.userId,_=e.userName;return t.createElement(m,{theme:_n},t.createElement(p,{axis:"vertical",width:"100%"},t.createElement(p,{axis:"horizontal",alignItems:"start",distribution:"space-between"},t.createElement(p,{axis:"horizontal",spacing:2,padding:2,paddingRight:0,shrink:1},t.createElement(p,{shrink:0},t.createElement(vn,{env:a,url:e.userAvatarPath,style:{height:48,width:48}})),t.createElement(p,{spacing:1,shrink:1},t.createElement(g,{color:Ft.lightNeutral24,weight:700,truncate:!0},_),o&&t.createElement(E,{as:"a",href:"/people/AC"+k,color:Ft.lightNeutral45,underline:!1},"My profile"),s&&t.createElement(E,{as:"a",href:bn({appName:n,env:a,userId:k}),color:Ft.lightNeutral45,underline:!1},"My login settings",t.createElement(kn,{isActive:l})),t.createElement("form",{method:"POST",action:u(a)("login")+"/logout"},t.createElement(f,{color:Ft.lightNeutral45,"data-turbolinks":!1,onClick:function(){c(),d()},type:"submit"},"Log out")))),t.createElement(f,{color:Ft.lightNeutral45,icon:"general.x",onClick:function(){return y(!1)},padding:2,variant:"naked",title:"Close Menu"})),i&&t.createElement(t.Fragment,null,t.createElement(p,{backgroundColor:Ft.lightNeutral95,paddingVertical:1.5,paddingHorizontal:2,marginTop:1,borderBottom:"1px solid "+Ft.lightNeutral88},t.createElement(w,{color:Ft.lightNeutral62,fontWeight:500},"Linked Accounts")),t.createElement(b,{dividerColor:Ft.lightNeutral88,width:"100%"},Zt(r).map(function(e){var r=e.id;return t.createElement(b.Item,{key:r,onClick:function(e){c(),d(),h(r,n+"/"),e.preventDefault()},color:Ft.lightNeutral45,padding:2},t.createElement(g,{truncate:!0},e.attributes.organization_name))}),t.createElement(b.Item,{onClick:function(e){c(),d(),v(),e.preventDefault()},color:Ft.danger47,padding:2,underline:!1},t.createElement(g,{size:3},"Unlink my accounts"))))))}var xn=["active"],Sn=function(e){var n=e.appName.replace(/[\s-]/,"");return t.createElement("div",{style:{alignItems:"center",display:"flex"}},t.createElement("div",{style:{marginRight:"6px"}},t.createElement(At,{appName:n,size:20})),t.createElement(lt,{appName:n,color:Ft.lightNeutral24,size:18}))},Mn=function(e){var n,r,a,i=t.useState(!1),o=i[0],l=i[1],s=t.useState(!1),c=s[0],d=s[1],m=t.useState(!1),h=m[0],f=m[1],p=It(),g=p.hasConnectedPeople,v=p.mfaConfigured,y=p.mfaEnabled,E=p.userId,w=p.name,b=e.colors,k=e.routes.filter(function(e){return e.props.active})||[],_=e.currentRouteComponent,C=k&&k[0]&&k[0].props&&k[0].props.children||e.appName,x=e.apps.find(function(e){return"Accounts"===e.name}),S=e.apps.find(function(e){return"Home"===e.name}),M=[].concat(e.apps).filter(function(e){var t=e.name;return"Home"!==t&&"Accounts"!==t}),A=Ft.lightNeutral88;return t.useEffect(function(){l(!1)},[k&&(null==(n=k[0])||null==(r=n.props)?void 0:r.href)]),t.createElement(Wt,{style:Te({},e.style)},t.createElement("div",{style:{alignItems:"center",display:"flex",height:"48px",justifyContent:"center",paddingLeft:"16px",paddingRight:"16px"},onClick:function(){e.requestAppsFetch(),e.requestConnectedPeopleFetch(),l(!1),d(function(e){return!e})}},t.createElement(it,{appName:e.appName.replace(/[\s-]/,""),colors:b,size:26})),t.createElement("div",{style:{left:0,position:"absolute",top:"48px",width:"100%"}},o&&e.routes),t.createElement(yn,{item:"Topbar:Small:Menus:Products:visibility",render:function(){return t.createElement("div",{style:{MozUserSelect:"none",WebkitTapHighlightColor:"transparent",WebkitUserSelect:"none",backgroundColor:Ie(Ft.lightNeutral12,.75),bottom:0,color:"black",display:c?"block":"none",left:0,msUserSelect:"none",position:"fixed",right:0,top:0,userSelect:"none"},onClick:function(){d(function(e){return!e}),f(!1)}},t.createElement(wn,{style:{position:"absolute",right:"17px",top:"12px"}}),t.createElement("div",{onClick:function(e){e.forcePropagation||e.stopPropagation()},style:{backgroundColor:Ft.lightNeutral100,borderRight:"1px solid "+A,display:"flex",flexDirection:"column",height:"calc(100% - 52px - env(safe-area-inset-bottom))",position:"relative",width:"calc(100% - 57px)"}},t.createElement("div",{style:{alignItems:"center",backgroundColor:Ft.lightNeutral98,borderBottom:"1px solid "+A,display:"flex",height:"48px",paddingLeft:"16px",paddingRight:"16px"}},t.createElement("div",{style:Te({},ut)},t.createElement("a",{style:{alignItems:"center",display:"flex",height:"48px",paddingRight:"16px"},"data-pendo":"app-switcher--change-app--"+(null==S?void 0:S.name),"data-turbolinks":!1,href:S?u(e.env)("accounts")+Tt(null==S?void 0:S.name):void 0},t.createElement("div",{style:{alignItems:"center",display:"flex"}},t.createElement(Sn,{appName:S?S.name:e.appName}))))),t.createElement("div",{style:Te({},ut,{WebkitOverflowScrolling:"touch",overflowY:"scroll"})},t.createElement("ul",{"data-pendo":"app-switcher",style:{margin:0,padding:0}},Yt(M).map(function(n,r){var a=n.name,i=0===r,o=r===Yt(M).length-1;return t.createElement("li",{key:a,style:{listStyleType:"none"}},t.createElement("a",{style:{alignItems:"center",display:"flex",height:"40px",paddingBottom:o?"4px":0,paddingLeft:"16px",paddingRight:"16px",paddingTop:i?"4px":0},"data-pendo":"app-switcher--change-app--"+a,"data-turbolinks":!1,href:u(e.env)("accounts")+Tt(a)},t.createElement(Sn,{appName:a})))})),x&&t.createElement("div",{style:{borderTop:"1px solid "+A}},t.createElement(En,{env:e.env})))))}}),t.createElement("div",{style:Te({},ut,{fontWeight:600,lineHeight:"48px",textAlign:"center"}),onClick:e.routes.length>0?function(){d(!1),l(function(e){return!e})}:null},t.createElement(_,null,(a=C).charAt(0).toUpperCase()+a.slice(1)),e.routes.length>0&&t.createElement(Et,{colors:b,style:{marginLeft:"4px",verticalAlign:"middle"}})),t.createElement("button",{onClick:function(){return f(!h)},style:{background:"none",border:"none",margin:"0 12px",padding:0}},t.createElement(vn,{env:e.env,url:e.userAvatarPath})),t.createElement("div",{style:{MozUserSelect:"none",WebkitTapHighlightColor:"transparent",WebkitUserSelect:"none",bottom:0,color:"black",display:h?"block":"none",left:0,msUserSelect:"none",position:"fixed",right:0,top:0,userSelect:"none"}},t.createElement("div",{onClick:function(e){return e.stopPropagation()},style:{WebkitOverflowScrolling:"touch",backgroundColor:"#fff",display:"flex",flexDirection:"column",height:"100%",overflowY:"scroll",position:"relative",width:"100%"}},t.createElement(Cn,{appName:e.appName,env:e.env,connectedPeople:e.connectedPeople,hasConnectedPeople:g,linkToProfile:e.linkToProfile,mfaConfigured:v,mfaEnabled:y,requestClearAppsCache:e.requestClearAppsCache,requestClearConnectedPeopleCache:e.requestClearConnectedPeopleCache,requestSwitchConnectedPerson:e.requestSwitchConnectedPerson,requestUnlinkConnectedPeople:e.requestUnlinkConnectedPeople,setUserMenuVisible:f,userAvatarPath:e.userAvatarPath,userId:E,userName:w}))))};Mn.defaultProps={currentRouteComponent:function(e){return t.createElement("span",Te({},e))},linkToProfile:!0};var An=function(e){var n=e.active,r=Oe(e,xn);return t.createElement("a",Te({style:Te({backgroundColor:"#444",borderBottom:"1px solid #333",color:"#fff",display:"block",fontWeight:600,lineHeight:"47px",position:"relative",textAlign:"center",textDecoration:"none",textTransform:"capitalize",whiteSpace:"nowrap"},ct,n&&{backgroundColor:"#333"})},r))},Tn={domain:window.location.host.split(".").slice(-2).join("."),"max-age":2592e3},Nn=Object.entries(Tn).map(function(e){return e[0]+"="+e[1]}).join("; ");function Pn(e){var n=e.bottom,r=e.children,a=e.hasShadow,i=e.height,o=e.id,l=e.overflow,s=e.position,c=e.width;return t.createElement(p,Te({backgroundColor:"surface",boxShadow:void 0!==a&&a&&open?"0 4px 12px rgba(0, 0, 0, 0.25)":null,left:0,position:"absolute",zIndex:1},{bottom:void 0===n?"auto":n,height:void 0===i?"100%":i,id:void 0===o?"toolbarDrawer":o,overflow:void 0===l?"visible":l,position:void 0===s?"absolute":s,width:void 0===c?"100%":c}),r)}function Dn(e){var n=e.closeDrawer;return t.createElement(p,{alignment:"start",axis:"horizontal",color:"foreground",distribution:"space-between",padding:2,paddingTop:1},t.createElement(k,{flex:1},e.children),n&&t.createElement(f,{icon:{fill:Ft.lightNeutral12,name:"general.x",size:"md"},onClick:function(){return n()},title:"Close",theme:!1,hover:{backgroundColor:Ft.lightNeutral93},marginTop:.25}))}var On=["children"];function Vn(e){var n=e.children,r=Oe(e,On);return t.createElement(_,Te({},r,{color:Ft.lightNeutral12,letterSpacing:".002em",level:2,lineHeight:"35px",weight:700}),n)}var zn,Hn=function(e){return t.createElement(k,Te({backgroundColor:Ft.interaction66,height:1.5,pointerEvents:"none",position:"absolute",radius:"50%",width:1.5,zIndex:6},e))},Ln=["children"],Rn={bottom:{background:"linear-gradient(rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.07))",bottom:0},top:{background:"linear-gradient(rgba(0, 0, 0, 0.07), rgba(255, 255, 255, 0))",top:0}},Yn=function(e){var a=e.children,i=Oe(e,Ln),l=r(!1),s=l[0],c=l[1],u=r(!1),d=u[0],m=u[1],h=o(null),f=o(null),g=o(null),v=function(){var e=null==h?void 0:h.current;e&&m(e.scrollHeight-e.clientHeight>e.scrollTop+1)};return n(function(){var e=null==h?void 0:h.current;if(!e)return function(){};m(e.scrollHeight>e.clientHeight);var t={root:e,threshold:1},n=new IntersectionObserver(function(e){return m(!e[0].isIntersecting)},t),r=new IntersectionObserver(function(e){return c(!e[0].isIntersecting)},t),a=null==f?void 0:f.current,i=null==g?void 0:g.current;a&&n.observe(a),i&&r.observe(i);var o=new ResizeObserver(v);return o.observe(e),function(){a&&n.unobserve(a),i&&r.unobserve(i),o.unobserve(e)}},[]),t.createElement(p,{grow:1,position:"relative",shrink:1},s&&t.createElement(Zn,{edge:"top"}),d&&t.createElement(Zn,{edge:"bottom"}),t.createElement(p,Te({basis:2,grow:1,innerRef:h,overflow:"auto",role:"region",shrink:1,css:{overscrollBehavior:"contain"}},i),t.createElement(k,{innerRef:g}),a,t.createElement(k,{innerRef:f})))},Zn=function(e){return t.createElement(k,Te({height:1,left:0,pointerEvents:"none",position:"absolute",right:0,role:"presentation",zIndex:10},Rn[e.edge]))},In=function(e){var n=e.activeIndex,r=e.children,a=t.Children.count(r),i=n<0?0:n>a-1?a-1:n;return t.createElement(p,{grow:1,overflow:"hidden",position:"relative"},t.Children.map(r,function(e,r){var a=r===i;return t.createElement(p,{"aria-hidden":!a,visibility:a?"visible":"hidden",height:"100%",key:r,opacity:a?1:0,pointerEvents:a?"auto":"none",position:"absolute",top:0,width:"100%",transform:a?"translateX(0)":r<n?"translateX(-100px)":"translateX(100px)",transition:"visibility 100ms 50ms ease-in-out, transform 200ms ease-in-out, opacity 100ms 50ms ease-in-out"},e)}))};!function(e){e.close="close",e.mount="mount",e.open="open",e.unmount="unmount"}(zn||(zn={}));var Un={currentContent:null,open:!1},Wn=function(e,t){switch(t.type){case zn.mount:return Te({},e,{currentContent:t.payload.content});case zn.unmount:return Te({},e,{currentContent:null});case zn.open:return Te({},e,{open:!0});case zn.close:return Te({},e,{open:!1})}},Fn=["fields"];function jn(e,t,n){if(!e.s){if(n instanceof Bn){if(!n.s)return void(n.o=jn.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(jn.bind(null,e,t),jn.bind(null,e,2));e.s=t,e.v=n;var r=e.o;r&&r(e)}}var Bn=/*#__PURE__*/function(){function e(){}return e.prototype.then=function(t,n){var r=new e,a=this.s;if(a){var i=1&a?t:n;if(i){try{jn(r,1,i(this.v))}catch(e){jn(r,2,e)}return r}return this}return this.o=function(e){try{var a=e.v;1&e.s?jn(r,1,t?t(a):a):n?jn(r,1,n(a)):jn(r,2,a)}catch(e){jn(r,2,e)}},r},e}();function Gn(e){return e instanceof Bn&&1&e.s}var qn=t.createContext({}),Jn=function(e){if(null===e)return null;var t=[e.data].flat().map(function(e){var t,n=e.attributes;return Te({id:e.id},(void 0===(t=e.relationships)&&(t={}),Object.keys(t).reduce(function(e,n){var r,a=t[n].data,i=Array.isArray(a);return Te({},e,((r={})[n+"_"+(i?"ids":"id")]=i?a.map(function(e){return e.id}):null==a?void 0:a.id,r))},{})),n)}),n=t[0],r=t.slice(1);return Array.isArray(e.data)?n?[n].concat(r):[]:n},$n=function(e){var t=e.app,n=u(e.env)("api")+"/"+t+"/v2";return{delete:function(e){return Re(Le,[n,e].join("/"),{method:"DELETE"})},get:function(e,t,r){var a=void 0===t?{}:t,i=a.fields,o=void 0===i?{}:i,l=Oe(a,Fn),s=(void 0===r?{}:r).unpaginated,c=void 0!==s&&s;try{o=Object.entries(o).reduce(function(e,t){var n;return Te({},e,((n={})["fields["+t[0]+"]"]=t[1],n))},{});var u=new URLSearchParams(Te({},o,l));return Promise.resolve(Re(He,[[n,e].join("/"),u].join("?"))).then(function(e){var t,n=e.json,r=Jn(n),a=null==n||null==(t=n.links)?void 0:t.next,i=function(e,t,n){for(var r;;){var a=e();if(Gn(a)&&(a=a.v),!a)return i;if(a.then){r=0;break}var i=n();if(i&&i.then){if(!Gn(i)){r=1;break}i=i.s}if(t){var o=t();if(o&&o.then&&!Gn(o)){r=2;break}}}var l=new Bn,s=jn.bind(null,l,2);return(0===r?a.then(u):1===r?i.then(c):o.then(d)).then(void 0,s),l;function c(r){i=r;do{if(t&&(o=t())&&o.then&&!Gn(o))return void o.then(d).then(void 0,s);if(!(a=e())||Gn(a)&&!a.v)return void jn(l,1,i);if(a.then)return void a.then(u).then(void 0,s);Gn(i=n())&&(i=i.v)}while(!i||!i.then);i.then(c).then(void 0,s)}function u(e){e?(i=n())&&i.then?i.then(c).then(void 0,s):c(i):jn(l,1,i)}function d(){(a=e())?a.then?a.then(u).then(void 0,s):u(a):jn(l,1,i)}}(function(){return!!c&&!!a},void 0,function(){return Promise.resolve(Re(He,a)).then(function(e){var t,n=e.json;r=[].concat(r,Jn(n)),a=null==n||null==(t=n.links)?void 0:t.next})});return i&&i.then?i.then(function(){return r}):r})}catch(e){return Promise.reject(e)}},patch:function(e,t){try{return Promise.resolve(Re(Le,[n,e].join("/"),{data:{data:{attributes:t}},method:"PATCH"})).then(function(e){return Jn(e.json)})}catch(e){return Promise.reject(e)}},post:function(e,t){try{return Promise.resolve(Re(Le,[n,e].join("/"),{data:{data:{attributes:t}},method:"POST"})).then(function(e){return Jn(e.json)})}catch(e){return Promise.reject(e)}}}},Qn=function(e){var n=e.children,r=e.env,i=a(function(){var e=$n({app:"chat",env:r}),t=$n({app:"services",env:r});return{chat:e,groups:$n({app:"groups",env:r}),services:t}},[r]);return t.createElement(qn.Provider,{value:i},n)},Xn=t.createContext({}),Kn=function(e){return t.createElement(Xn.Provider,{value:e.value},e.children)},er=function(){return t.createElement(S,{color:"hsla(221, 89%, 93%, 1)",radius:"pill",size:"xs"},t.createElement(g,{color:"hsla(221, 91%, 55%, 1)"},"Beta"))},tr=function(){return t.createElement(Dn,null,t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1},t.createElement(Vn,null,"Chat"),t.createElement(er,null),t.createElement(M,{color:"hsl(0 0% 62%)",thickness:2,trackColor:"hsl(0 0% 97%)"})))},nr=function(e){var n=B().client,r=t.useState(function(){return e.muteStatus()}),a=r[0].muted,i=r[1];return t.useEffect(function(){var t=function(){i(e.muteStatus())};return n.on("notification.channel_mutes_updated",t),function(){return n.off("notification.channel_mutes_updated",t)}},[]),a};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var rr,ar,ir=(rr=function(e,t){e.exports=function(){var t,n;function r(){return t.apply(null,arguments)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(o(e,t))return!1;return!0}function s(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,r=[],a=e.length;for(n=0;n<a;++n)r.push(t(e[n],n));return r}function m(e,t){for(var n in t)o(t,n)&&(e[n]=t[n]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function h(e,t,n,r){return Dt(e,t,n,r,!0).utc()}function f(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function p(e){if(null==e._isValid){var t=f(e),r=n.call(t.parsedDateParts,function(e){return null!=e}),a=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r);if(e._strict&&(a=a&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return a;e._isValid=a}return e._isValid}function g(e){var t=h(NaN);return null!=e?m(f(t),e):f(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var v=r.momentProperties=[],y=!1;function E(e,t){var n,r,a,i=v.length;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=f(t)),s(t._locale)||(e._locale=t._locale),i>0)for(n=0;n<i;n++)s(a=t[r=v[n]])||(e[r]=a);return e}function w(e){E(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,r.updateOffset(this),y=!1)}function b(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function k(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function _(e,t){var n=!0;return m(function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var a,i,l,s=[],c=arguments.length;for(i=0;i<c;i++){if(a="","object"==typeof arguments[i]){for(l in a+="\n["+i+"] ",arguments[0])o(arguments[0],l)&&(a+=l+": "+arguments[0][l]+", ");a=a.slice(0,-2)}else a=arguments[i];s.push(a)}k(e+"\nArguments: "+Array.prototype.slice.call(s).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)},t)}var C,x={};function S(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),x[e]||(k(t),x[e]=!0)}function M(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function A(e,t){var n,r=m({},e);for(n in t)o(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},m(r[n],e[n]),m(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)o(e,n)&&!o(t,n)&&i(e[n])&&(r[n]=m({},r[n]));return r}function T(e){null!=e&&this.set(e)}function N(e,t,n){var r=""+Math.abs(e);return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,t-r.length)).toString().substr(1)+r}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,C=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)o(e,t)&&n.push(t);return n};var P=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,D=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,O={},V={};function z(e,t,n,r){var a=r;"string"==typeof r&&(a=function(){return this[r]()}),e&&(V[e]=a),t&&(V[t[0]]=function(){return N(a.apply(this,arguments),t[1],t[2])}),n&&(V[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function H(e,t){return e.isValid()?(t=L(t,e.localeData()),O[t]=O[t]||function(e){var t,n,r,a=e.match(P);for(t=0,n=a.length;t<n;t++)a[t]=V[a[t]]?V[a[t]]:(r=a[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,i="";for(r=0;r<n;r++)i+=M(a[r])?a[r].call(t,e):a[r];return i}}(t),O[t](e)):e.localeData().invalidDate()}function L(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(D.lastIndex=0;n>=0&&D.test(e);)e=e.replace(D,r),D.lastIndex=0,n-=1;return e}var R={};function Y(e,t){var n=e.toLowerCase();R[n]=R[n+"s"]=R[t]=e}function Z(e){return"string"==typeof e?R[e]||R[e.toLowerCase()]:void 0}function I(e){var t,n,r={};for(n in e)o(e,n)&&(t=Z(n))&&(r[t]=e[n]);return r}var U={};function W(e,t){U[e]=t}function F(e){return e%4==0&&e%100!=0||e%400==0}function j(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function B(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=j(t)),n}function G(e,t){return function(n){return null!=n?(J(this,e,n),r.updateOffset(this,t),this):q(this,e)}}function q(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function J(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&F(e.year())&&1===e.month()&&29===e.date()?(n=B(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Ne(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var $,Q=/\d/,X=/\d\d/,K=/\d{3}/,ee=/\d{4}/,te=/[+-]?\d{6}/,ne=/\d\d?/,re=/\d\d\d\d?/,ae=/\d\d\d\d\d\d?/,ie=/\d{1,3}/,oe=/\d{1,4}/,le=/[+-]?\d{1,6}/,se=/\d+/,ce=/[+-]?\d+/,ue=/Z|[+-]\d\d:?\d\d/gi,de=/Z|[+-]\d\d(?::?\d\d)?/gi,me=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function he(e,t,n){$[e]=M(t)?t:function(e,r){return e&&n?n:t}}function fe(e,t){return o($,e)?$[e](t._strict,t._locale):new RegExp(pe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,a){return t||n||r||a})))}function pe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}$={};var ge={};function ve(e,t){var n,r,a=t;for("string"==typeof e&&(e=[e]),c(t)&&(a=function(e,n){n[t]=B(e)}),r=e.length,n=0;n<r;n++)ge[e[n]]=a}function ye(e,t){ve(e,function(e,n,r,a){r._w=r._w||{},t(e,r._w,r,a)})}function Ee(e,t,n){null!=t&&o(ge,e)&&ge[e](t,n._a,n,e)}var we,be=0,ke=1,_e=2,Ce=3,xe=4,Se=5,Me=6,Ae=7,Te=8;function Ne(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=(t%12+12)%12;return e+=(t-n)/12,1===n?F(e)?29:28:31-n%7%2}we=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},z("M",["MM",2],"Mo",function(){return this.month()+1}),z("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),z("MMMM",0,0,function(e){return this.localeData().months(this,e)}),Y("month","M"),W("month",8),he("M",ne),he("MM",ne,X),he("MMM",function(e,t){return t.monthsShortRegex(e)}),he("MMMM",function(e,t){return t.monthsRegex(e)}),ve(["M","MM"],function(e,t){t[ke]=B(e)-1}),ve(["MMM","MMMM"],function(e,t,n,r){var a=n._locale.monthsParse(e,r,n._strict);null!=a?t[ke]=a:f(n).invalidMonth=e});var Pe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),De="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Oe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ve=me,ze=me;function He(e,t,n){var r,a,i,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=h([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(a=we.call(this._shortMonthsParse,o))?a:null:-1!==(a=we.call(this._longMonthsParse,o))?a:null:"MMM"===t?-1!==(a=we.call(this._shortMonthsParse,o))||-1!==(a=we.call(this._longMonthsParse,o))?a:null:-1!==(a=we.call(this._longMonthsParse,o))||-1!==(a=we.call(this._shortMonthsParse,o))?a:null}function Le(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=B(t);else if(!c(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Ne(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Re(e){return null!=e?(Le(this,e),r.updateOffset(this,!0),this):q(this,"Month")}function Ye(){function e(e,t){return t.length-e.length}var t,n,r=[],a=[],i=[];for(t=0;t<12;t++)n=h([2e3,t]),r.push(this.monthsShort(n,"")),a.push(this.months(n,"")),i.push(this.months(n,"")),i.push(this.monthsShort(n,""));for(r.sort(e),a.sort(e),i.sort(e),t=0;t<12;t++)r[t]=pe(r[t]),a[t]=pe(a[t]);for(t=0;t<24;t++)i[t]=pe(i[t]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Ze(e){return F(e)?366:365}z("Y",0,0,function(){var e=this.year();return e<=9999?N(e,4):"+"+e}),z(0,["YY",2],0,function(){return this.year()%100}),z(0,["YYYY",4],0,"year"),z(0,["YYYYY",5],0,"year"),z(0,["YYYYYY",6,!0],0,"year"),Y("year","y"),W("year",1),he("Y",ce),he("YY",ne,X),he("YYYY",oe,ee),he("YYYYY",le,te),he("YYYYYY",le,te),ve(["YYYYY","YYYYYY"],be),ve("YYYY",function(e,t){t[be]=2===e.length?r.parseTwoDigitYear(e):B(e)}),ve("YY",function(e,t){t[be]=r.parseTwoDigitYear(e)}),ve("Y",function(e,t){t[be]=parseInt(e,10)}),r.parseTwoDigitYear=function(e){return B(e)+(B(e)>68?1900:2e3)};var Ie=G("FullYear",!0);function Ue(e,t,n,r,a,i,o){var l;return e<100&&e>=0?(l=new Date(e+400,t,n,r,a,i,o),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,r,a,i,o),l}function We(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Fe(e,t,n){var r=7+t-n;return-(7+We(e,0,r).getUTCDay()-t)%7+r-1}function je(e,t,n,r,a){var i,o,l=1+7*(t-1)+(7+n-r)%7+Fe(e,r,a);return l<=0?o=Ze(i=e-1)+l:l>Ze(e)?(i=e+1,o=l-Ze(e)):(i=e,o=l),{year:i,dayOfYear:o}}function Be(e,t,n){var r,a,i=Fe(e.year(),t,n),o=Math.floor((e.dayOfYear()-i-1)/7)+1;return o<1?r=o+Ge(a=e.year()-1,t,n):o>Ge(e.year(),t,n)?(r=o-Ge(e.year(),t,n),a=e.year()+1):(a=e.year(),r=o),{week:r,year:a}}function Ge(e,t,n){var r=Fe(e,t,n),a=Fe(e+1,t,n);return(Ze(e)-r+a)/7}function qe(e,t){return e.slice(t,7).concat(e.slice(0,t))}z("w",["ww",2],"wo","week"),z("W",["WW",2],"Wo","isoWeek"),Y("week","w"),Y("isoWeek","W"),W("week",5),W("isoWeek",5),he("w",ne),he("ww",ne,X),he("W",ne),he("WW",ne,X),ye(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=B(e)}),z("d",0,"do","day"),z("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),z("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),z("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),z("e",0,0,"weekday"),z("E",0,0,"isoWeekday"),Y("day","d"),Y("weekday","e"),Y("isoWeekday","E"),W("day",11),W("weekday",11),W("isoWeekday",11),he("d",ne),he("e",ne),he("E",ne),he("dd",function(e,t){return t.weekdaysMinRegex(e)}),he("ddd",function(e,t){return t.weekdaysShortRegex(e)}),he("dddd",function(e,t){return t.weekdaysRegex(e)}),ye(["dd","ddd","dddd"],function(e,t,n,r){var a=n._locale.weekdaysParse(e,r,n._strict);null!=a?t.d=a:f(n).invalidWeekday=e}),ye(["d","e","E"],function(e,t,n,r){t[r]=B(e)});var Je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),$e="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Qe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Xe=me,Ke=me,et=me;function tt(e,t,n){var r,a,i,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(a=we.call(this._weekdaysParse,o))?a:null:"ddd"===t?-1!==(a=we.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=we.call(this._minWeekdaysParse,o))?a:null:"dddd"===t?-1!==(a=we.call(this._weekdaysParse,o))||-1!==(a=we.call(this._shortWeekdaysParse,o))||-1!==(a=we.call(this._minWeekdaysParse,o))?a:null:"ddd"===t?-1!==(a=we.call(this._shortWeekdaysParse,o))||-1!==(a=we.call(this._weekdaysParse,o))||-1!==(a=we.call(this._minWeekdaysParse,o))?a:null:-1!==(a=we.call(this._minWeekdaysParse,o))||-1!==(a=we.call(this._weekdaysParse,o))||-1!==(a=we.call(this._shortWeekdaysParse,o))?a:null}function nt(){function e(e,t){return t.length-e.length}var t,n,r,a,i,o=[],l=[],s=[],c=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=pe(this.weekdaysMin(n,"")),a=pe(this.weekdaysShort(n,"")),i=pe(this.weekdays(n,"")),o.push(r),l.push(a),s.push(i),c.push(r),c.push(a),c.push(i);o.sort(e),l.sort(e),s.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function rt(){return this.hours()%12||12}function at(e,t){z(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function it(e,t){return t._meridiemParse}z("H",["HH",2],0,"hour"),z("h",["hh",2],0,rt),z("k",["kk",2],0,function(){return this.hours()||24}),z("hmm",0,0,function(){return""+rt.apply(this)+N(this.minutes(),2)}),z("hmmss",0,0,function(){return""+rt.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)}),z("Hmm",0,0,function(){return""+this.hours()+N(this.minutes(),2)}),z("Hmmss",0,0,function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)}),at("a",!0),at("A",!1),Y("hour","h"),W("hour",13),he("a",it),he("A",it),he("H",ne),he("h",ne),he("k",ne),he("HH",ne,X),he("hh",ne,X),he("kk",ne,X),he("hmm",re),he("hmmss",ae),he("Hmm",re),he("Hmmss",ae),ve(["H","HH"],Ce),ve(["k","kk"],function(e,t,n){var r=B(e);t[Ce]=24===r?0:r}),ve(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ve(["h","hh"],function(e,t,n){t[Ce]=B(e),f(n).bigHour=!0}),ve("hmm",function(e,t,n){var r=e.length-2;t[Ce]=B(e.substr(0,r)),t[xe]=B(e.substr(r)),f(n).bigHour=!0}),ve("hmmss",function(e,t,n){var r=e.length-4,a=e.length-2;t[Ce]=B(e.substr(0,r)),t[xe]=B(e.substr(r,2)),t[Se]=B(e.substr(a)),f(n).bigHour=!0}),ve("Hmm",function(e,t,n){var r=e.length-2;t[Ce]=B(e.substr(0,r)),t[xe]=B(e.substr(r))}),ve("Hmmss",function(e,t,n){var r=e.length-4,a=e.length-2;t[Ce]=B(e.substr(0,r)),t[xe]=B(e.substr(r,2)),t[Se]=B(e.substr(a))});var ot,lt=G("Hours",!0),st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Pe,monthsShort:De,week:{dow:0,doy:6},weekdays:Je,weekdaysMin:Qe,weekdaysShort:$e,meridiemParse:/[ap]\.?m?\.?/i},ct={},ut={};function dt(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function mt(e){return e?e.toLowerCase().replace("_","-"):e}function ht(t){var n=null;if(void 0===ct[t]&&e&&e.exports&&function(e){return null!=e.match("^[^/\\\\]*$")}(t))try{n=ot._abbr,function(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')}("./locale/"+t),ft(n)}catch(e){ct[t]=null}return ct[t]}function ft(e,t){var n;return e&&((n=s(t)?gt(e):pt(e,t))?ot=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ot._abbr}function pt(e,t){if(null!==t){var n,r=st;if(t.abbr=e,null!=ct[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ct[e]._config;else if(null!=t.parentLocale)if(null!=ct[t.parentLocale])r=ct[t.parentLocale]._config;else{if(null==(n=ht(t.parentLocale)))return ut[t.parentLocale]||(ut[t.parentLocale]=[]),ut[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ct[e]=new T(A(r,t)),ut[e]&&ut[e].forEach(function(e){pt(e.name,e.config)}),ft(e),ct[e]}return delete ct[e],null}function gt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ot;if(!a(e)){if(t=ht(e))return t;e=[e]}return function(e){for(var t,n,r,a,i=0;i<e.length;){for(t=(a=mt(e[i]).split("-")).length,n=(n=mt(e[i+1]))?n.split("-"):null;t>0;){if(r=ht(a.slice(0,t).join("-")))return r;if(n&&n.length>=t&&dt(a,n)>=t-1)break;t--}i++}return ot}(e)}function vt(e){var t,n=e._a;return n&&-2===f(e).overflow&&(t=n[ke]<0||n[ke]>11?ke:n[_e]<1||n[_e]>Ne(n[be],n[ke])?_e:n[Ce]<0||n[Ce]>24||24===n[Ce]&&(0!==n[xe]||0!==n[Se]||0!==n[Me])?Ce:n[xe]<0||n[xe]>59?xe:n[Se]<0||n[Se]>59?Se:n[Me]<0||n[Me]>999?Me:-1,f(e)._overflowDayOfYear&&(t<be||t>_e)&&(t=_e),f(e)._overflowWeeks&&-1===t&&(t=Ae),f(e)._overflowWeekday&&-1===t&&(t=Te),f(e).overflow=t),e}var yt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Et=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,bt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],kt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],_t=/^\/?Date\((-?\d+)/i,Ct=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,xt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function St(e){var t,n,r,a,i,o,l=e._i,s=yt.exec(l)||Et.exec(l),c=bt.length,u=kt.length;if(s){for(f(e).iso=!0,t=0,n=c;t<n;t++)if(bt[t][1].exec(s[1])){a=bt[t][0],r=!1!==bt[t][2];break}if(null==a)return void(e._isValid=!1);if(s[3]){for(t=0,n=u;t<n;t++)if(kt[t][1].exec(s[3])){i=(s[2]||" ")+kt[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(s[4]){if(!wt.exec(s[4]))return void(e._isValid=!1);o="Z"}e._f=a+(i||"")+(o||""),Nt(e)}else e._isValid=!1}function Mt(e){var t,n,r,a,i,o,l,s,c,u=Ct.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(u){if(n=u[3],r=u[2],a=u[5],i=u[6],o=u[7],l=[(s=u[4],c=parseInt(s,10),c<=49?2e3+c:c<=999?1900+c:c),De.indexOf(n),parseInt(r,10),parseInt(a,10),parseInt(i,10)],o&&l.push(parseInt(o,10)),!function(e,t,n){return!e||$e.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(f(n).weekdayMismatch=!0,n._isValid=!1,!1)}(u[1],t=l,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return xt[e];if(t)return 0;var r=parseInt(n,10),a=r%100;return(r-a)/100*60+a}(u[8],u[9],u[10]),e._d=We.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),f(e).rfc2822=!0}else e._isValid=!1}function At(e,t,n){return null!=e?e:null!=t?t:n}function Tt(e){var t,n,a,i,o,l=[];if(!e._d){for(a=function(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[_e]&&null==e._a[ke]&&function(e){var t,n,r,a,i,o,l,s,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(i=1,o=4,n=At(t.GG,e._a[be],Be(Ot(),1,4).year),r=At(t.W,1),((a=At(t.E,1))<1||a>7)&&(s=!0)):(i=e._locale._week.dow,o=e._locale._week.doy,c=Be(Ot(),i,o),n=At(t.gg,e._a[be],c.year),r=At(t.w,c.week),null!=t.d?((a=t.d)<0||a>6)&&(s=!0):null!=t.e?(a=t.e+i,(t.e<0||t.e>6)&&(s=!0)):a=i),r<1||r>Ge(n,i,o)?f(e)._overflowWeeks=!0:null!=s?f(e)._overflowWeekday=!0:(l=je(n,r,a,i,o),e._a[be]=l.year,e._dayOfYear=l.dayOfYear)}(e),null!=e._dayOfYear&&(o=At(e._a[be],a[be]),(e._dayOfYear>Ze(o)||0===e._dayOfYear)&&(f(e)._overflowDayOfYear=!0),n=We(o,0,e._dayOfYear),e._a[ke]=n.getUTCMonth(),e._a[_e]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=l[t]=a[t];for(;t<7;t++)e._a[t]=l[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ce]&&0===e._a[xe]&&0===e._a[Se]&&0===e._a[Me]&&(e._nextDay=!0,e._a[Ce]=0),e._d=(e._useUTC?We:Ue).apply(null,l),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ce]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(f(e).weekdayMismatch=!0)}}function Nt(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],f(e).empty=!0;var t,n,a,i,o,l,s,c=""+e._i,u=c.length,d=0;for(s=(a=L(e._f,e._locale).match(P)||[]).length,t=0;t<s;t++)(n=(c.match(fe(i=a[t],e))||[])[0])&&((o=c.substr(0,c.indexOf(n))).length>0&&f(e).unusedInput.push(o),c=c.slice(c.indexOf(n)+n.length),d+=n.length),V[i]?(n?f(e).empty=!1:f(e).unusedTokens.push(i),Ee(i,n,e)):e._strict&&!n&&f(e).unusedTokens.push(i);f(e).charsLeftOver=u-d,c.length>0&&f(e).unusedInput.push(c),e._a[Ce]<=12&&!0===f(e).bigHour&&e._a[Ce]>0&&(f(e).bigHour=void 0),f(e).parsedDateParts=e._a.slice(0),f(e).meridiem=e._meridiem,e._a[Ce]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[Ce],e._meridiem),null!==(l=f(e).era)&&(e._a[be]=e._locale.erasConvertYear(l,e._a[be])),Tt(e),vt(e)}else Mt(e);else St(e)}function Pt(e){var t=e._i,n=e._f;return e._locale=e._locale||gt(e._l),null===t||void 0===n&&""===t?g({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),b(t)?new w(vt(t)):(u(t)?e._d=t:a(n)?function(e){var t,n,r,a,i,o,l=!1,s=e._f.length;if(0===s)return f(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;a<s;a++)i=0,o=!1,t=E({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[a],Nt(t),p(t)&&(o=!0),i+=f(t).charsLeftOver,i+=10*f(t).unusedTokens.length,f(t).score=i,l?i<r&&(r=i,n=t):(null==r||i<r||o)&&(r=i,n=t,o&&(l=!0));m(e,n||t)}(e):n?Nt(e):function(e){var t=e._i;s(t)?e._d=new Date(r.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=_t.exec(e._i);null===t?(St(e),!1===e._isValid&&(delete e._isValid,Mt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):a(t)?(e._a=d(t.slice(0),function(e){return parseInt(e,10)}),Tt(e)):i(t)?function(e){if(!e._d){var t=I(e._i);e._a=d([t.year,t.month,void 0===t.day?t.date:t.day,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),Tt(e)}}(e):c(t)?e._d=new Date(t):r.createFromInputFallback(e)}(e),p(e)||(e._d=null),e))}function Dt(e,t,n,r,o){var s,c={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(i(e)&&l(e)||a(e)&&0===e.length)&&(e=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=o,c._l=n,c._i=e,c._f=t,c._strict=r,(s=new w(vt(Pt(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Ot(e,t,n,r){return Dt(e,t,n,r,!1)}r.createFromInputFallback=_("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),r.ISO_8601=function(){},r.RFC_2822=function(){};var Vt=_("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ot.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:g()}),zt=_("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ot.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:g()});function Ht(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Ot();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Lt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Rt(e){var t=I(e),n=t.year||0,r=t.quarter||0,a=t.month||0,i=t.week||t.isoWeek||0,l=t.day||0,s=t.hour||0,c=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,n,r=!1,a=Lt.length;for(t in e)if(o(e,t)&&(-1===we.call(Lt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<a;++n)if(e[Lt[n]]){if(r)return!1;parseFloat(e[Lt[n]])!==B(e[Lt[n]])&&(r=!0)}return!0}(t),this._milliseconds=+d+1e3*u+6e4*c+1e3*s*60*60,this._days=+l+7*i,this._months=+a+3*r+12*n,this._data={},this._locale=gt(),this._bubble()}function Yt(e){return e instanceof Rt}function Zt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function It(e,t){z(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+N(~~(e/60),2)+t+N(~~e%60,2)})}It("Z",":"),It("ZZ",""),he("Z",de),he("ZZ",de),ve(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Wt(de,e)});var Ut=/([\+\-]|\d\d)/gi;function Wt(e,t){var n,r,a=(t||"").match(e);return null===a?null:0===(r=60*(n=((a[a.length-1]||[])+"").match(Ut)||["-",0,0])[1]+B(n[2]))?0:"+"===n[0]?r:-r}function Ft(e,t){var n,a;return t._isUTC?(n=t.clone(),a=(b(e)||u(e)?e.valueOf():Ot(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+a),r.updateOffset(n,!1),n):Ot(e).local()}function jt(e){return-Math.round(e._d.getTimezoneOffset())}function Bt(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Gt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,qt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Jt(e,t){var n,r,a,i,l,s,u=e,d=null;return Yt(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(u={},t?u[t]=+e:u.milliseconds=+e):(d=Gt.exec(e))?(n="-"===d[1]?-1:1,u={y:0,d:B(d[_e])*n,h:B(d[Ce])*n,m:B(d[xe])*n,s:B(d[Se])*n,ms:B(Zt(1e3*d[Me]))*n}):(d=qt.exec(e))?u={y:$t(d[2],n="-"===d[1]?-1:1),M:$t(d[3],n),w:$t(d[4],n),d:$t(d[5],n),h:$t(d[6],n),m:$t(d[7],n),s:$t(d[8],n)}:null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(i=Ot(u.from),l=Ot(u.to),a=i.isValid()&&l.isValid()?(l=Ft(l,i),i.isBefore(l)?s=Qt(i,l):((s=Qt(l,i)).milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0},(u={}).ms=a.milliseconds,u.M=a.months),r=new Rt(u),Yt(e)&&o(e,"_locale")&&(r._locale=e._locale),Yt(e)&&o(e,"_isValid")&&(r._isValid=e._isValid),r}function $t(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Qt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Xt(e,t){return function(n,r){var a;return null===r||isNaN(+r)||(S(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),Kt(this,Jt(n,r),e),this}}function Kt(e,t,n,a){var i=t._milliseconds,o=Zt(t._days),l=Zt(t._months);e.isValid()&&(a=null==a||a,l&&Le(e,q(e,"Month")+l*n),o&&J(e,"Date",q(e,"Date")+o*n),i&&e._d.setTime(e._d.valueOf()+i*n),a&&r.updateOffset(e,o||l))}Jt.fn=Rt.prototype,Jt.invalid=function(){return Jt(NaN)};var en=Xt(1,"add"),tn=Xt(-1,"subtract");function nn(e){return"string"==typeof e||e instanceof String}function rn(e,t){if(e.date()<t.date())return-rn(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function an(e){var t;return void 0===e?this._locale._abbr:(null!=(t=gt(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var on=_("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function ln(){return this._locale}var sn=1e3,cn=6e4,un=36e5,dn=126227808e5;function mn(e,t){return(e%t+t)%t}function hn(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-dn:new Date(e,t,n).valueOf()}function fn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-dn:Date.UTC(e,t,n)}function pn(e,t){return t.erasAbbrRegex(e)}function gn(){var e,t,n=[],r=[],a=[],i=[],o=this.eras();for(e=0,t=o.length;e<t;++e)r.push(pe(o[e].name)),n.push(pe(o[e].abbr)),a.push(pe(o[e].narrow)),i.push(pe(o[e].name)),i.push(pe(o[e].abbr)),i.push(pe(o[e].narrow));this._erasRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}function vn(e,t){z(0,[e,e.length],0,t)}function yn(e,t,n,r,a){var i;return null==e?Be(this,r,a).year:(t>(i=Ge(e,r,a))&&(t=i),En.call(this,e,t,n,r,a))}function En(e,t,n,r,a){var i=je(e,t,n,r,a),o=We(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}z("N",0,0,"eraAbbr"),z("NN",0,0,"eraAbbr"),z("NNN",0,0,"eraAbbr"),z("NNNN",0,0,"eraName"),z("NNNNN",0,0,"eraNarrow"),z("y",["y",1],"yo","eraYear"),z("y",["yy",2],0,"eraYear"),z("y",["yyy",3],0,"eraYear"),z("y",["yyyy",4],0,"eraYear"),he("N",pn),he("NN",pn),he("NNN",pn),he("NNNN",function(e,t){return t.erasNameRegex(e)}),he("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),ve(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var a=n._locale.erasParse(e,r,n._strict);a?f(n).era=a:f(n).invalidEra=e}),he("y",se),he("yy",se),he("yyy",se),he("yyyy",se),he("yo",function(e,t){return t._eraYearOrdinalRegex||se}),ve(["y","yy","yyy","yyyy"],be),ve(["yo"],function(e,t,n,r){var a;n._locale._eraYearOrdinalRegex&&(a=e.match(n._locale._eraYearOrdinalRegex)),t[be]=n._locale.eraYearOrdinalParse?n._locale.eraYearOrdinalParse(e,a):parseInt(e,10)}),z(0,["gg",2],0,function(){return this.weekYear()%100}),z(0,["GG",2],0,function(){return this.isoWeekYear()%100}),vn("gggg","weekYear"),vn("ggggg","weekYear"),vn("GGGG","isoWeekYear"),vn("GGGGG","isoWeekYear"),Y("weekYear","gg"),Y("isoWeekYear","GG"),W("weekYear",1),W("isoWeekYear",1),he("G",ce),he("g",ce),he("GG",ne,X),he("gg",ne,X),he("GGGG",oe,ee),he("gggg",oe,ee),he("GGGGG",le,te),he("ggggg",le,te),ye(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=B(e)}),ye(["gg","GG"],function(e,t,n,a){t[a]=r.parseTwoDigitYear(e)}),z("Q",0,"Qo","quarter"),Y("quarter","Q"),W("quarter",7),he("Q",Q),ve("Q",function(e,t){t[ke]=3*(B(e)-1)}),z("D",["DD",2],"Do","date"),Y("date","D"),W("date",9),he("D",ne),he("DD",ne,X),he("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ve(["D","DD"],_e),ve("Do",function(e,t){t[_e]=B(e.match(ne)[0])});var wn=G("Date",!0);z("DDD",["DDDD",3],"DDDo","dayOfYear"),Y("dayOfYear","DDD"),W("dayOfYear",4),he("DDD",ie),he("DDDD",K),ve(["DDD","DDDD"],function(e,t,n){n._dayOfYear=B(e)}),z("m",["mm",2],0,"minute"),Y("minute","m"),W("minute",14),he("m",ne),he("mm",ne,X),ve(["m","mm"],xe);var bn=G("Minutes",!1);z("s",["ss",2],0,"second"),Y("second","s"),W("second",15),he("s",ne),he("ss",ne,X),ve(["s","ss"],Se);var kn,_n,Cn=G("Seconds",!1);for(z("S",0,0,function(){return~~(this.millisecond()/100)}),z(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),z(0,["SSS",3],0,"millisecond"),z(0,["SSSS",4],0,function(){return 10*this.millisecond()}),z(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),z(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),z(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),z(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),z(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),Y("millisecond","ms"),W("millisecond",16),he("S",ie,Q),he("SS",ie,X),he("SSS",ie,K),kn="SSSS";kn.length<=9;kn+="S")he(kn,se);function xn(e,t){t[Me]=B(1e3*("0."+e))}for(kn="S";kn.length<=9;kn+="S")ve(kn,xn);_n=G("Milliseconds",!1),z("z",0,0,"zoneAbbr"),z("zz",0,0,"zoneName");var Sn=w.prototype;function Mn(e){return e}Sn.add=en,Sn.calendar=function(e,t){var n;1===arguments.length&&(arguments[0]?b(n=arguments[0])||u(n)||nn(n)||c(n)||function(e){var t=a(e),n=!1;return t&&(n=0===e.filter(function(t){return!c(t)&&nn(e)}).length),t&&n}(n)||function(e){var t,n=i(e)&&!l(e),r=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s=a.length;for(t=0;t<s;t+=1)r=r||o(e,a[t]);return n&&r}(n)||null==n?(e=arguments[0],t=void 0):function(e){var t,n=i(e)&&!l(e),r=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<a.length;t+=1)r=r||o(e,a[t]);return n&&r}(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var s=e||Ot(),d=Ft(s,this).startOf("day"),m=r.calendarFormat(this,d)||"sameElse",h=t&&(M(t[m])?t[m].call(this,s):t[m]);return this.format(h||this.localeData().calendar(m,this,Ot(s)))},Sn.clone=function(){return new w(this)},Sn.diff=function(e,t,n){var r,a,i;if(!this.isValid())return NaN;if(!(r=Ft(e,this)).isValid())return NaN;switch(a=6e4*(r.utcOffset()-this.utcOffset()),t=Z(t)){case"year":i=rn(this,r)/12;break;case"month":i=rn(this,r);break;case"quarter":i=rn(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-a)/864e5;break;case"week":i=(this-r-a)/6048e5;break;default:i=this-r}return n?i:j(i)},Sn.endOf=function(e){var t,n;if(void 0===(e=Z(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?fn:hn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=un-mn(t+(this._isUTC?0:this.utcOffset()*cn),un)-1;break;case"minute":t=this._d.valueOf(),t+=cn-mn(t,cn)-1;break;case"second":t=this._d.valueOf(),t+=sn-mn(t,sn)-1}return this._d.setTime(t),r.updateOffset(this,!0),this},Sn.format=function(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=H(this,e);return this.localeData().postformat(t)},Sn.from=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Ot(e).isValid())?Jt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Sn.fromNow=function(e){return this.from(Ot(),e)},Sn.to=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Ot(e).isValid())?Jt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Sn.toNow=function(e){return this.to(Ot(),e)},Sn.get=function(e){return M(this[e=Z(e)])?this[e]():this},Sn.invalidAt=function(){return f(this).overflow},Sn.isAfter=function(e,t){var n=b(e)?e:Ot(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=Z(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},Sn.isBefore=function(e,t){var n=b(e)?e:Ot(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=Z(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},Sn.isBetween=function(e,t,n,r){var a=b(e)?e:Ot(e),i=b(t)?t:Ot(t);return!!(this.isValid()&&a.isValid()&&i.isValid())&&("("===(r=r||"()")[0]?this.isAfter(a,n):!this.isBefore(a,n))&&(")"===r[1]?this.isBefore(i,n):!this.isAfter(i,n))},Sn.isSame=function(e,t){var n,r=b(e)?e:Ot(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=Z(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},Sn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},Sn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},Sn.isValid=function(){return p(this)},Sn.lang=on,Sn.locale=an,Sn.localeData=ln,Sn.max=zt,Sn.min=Vt,Sn.parsingFlags=function(){return m({},f(this))},Sn.set=function(e,t){if("object"==typeof e){var n,r=function(e){var t,n=[];for(t in e)o(e,t)&&n.push({unit:t,priority:U[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=I(e)),a=r.length;for(n=0;n<a;n++)this[r[n].unit](e[r[n].unit])}else if(M(this[e=Z(e)]))return this[e](t);return this},Sn.startOf=function(e){var t,n;if(void 0===(e=Z(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?fn:hn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=mn(t+(this._isUTC?0:this.utcOffset()*cn),un);break;case"minute":t=this._d.valueOf(),t-=mn(t,cn);break;case"second":t=this._d.valueOf(),t-=mn(t,sn)}return this._d.setTime(t),r.updateOffset(this,!0),this},Sn.subtract=tn,Sn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},Sn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},Sn.toDate=function(){return new Date(this.valueOf())},Sn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?H(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):M(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",H(n,"Z")):H(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Sn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n="moment",r="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+n+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+r+'[")]')},"undefined"!=typeof Symbol&&null!=Symbol.for&&(Sn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Sn.toJSON=function(){return this.isValid()?this.toISOString():null},Sn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Sn.unix=function(){return Math.floor(this.valueOf()/1e3)},Sn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Sn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Sn.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""},Sn.eraNarrow=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""},Sn.eraAbbr=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""},Sn.eraYear=function(){var e,t,n,a,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,a=this.clone().startOf("day").valueOf(),i[e].since<=a&&a<=i[e].until||i[e].until<=a&&a<=i[e].since)return(this.year()-r(i[e].since).year())*n+i[e].offset;return this.year()},Sn.year=Ie,Sn.isLeapYear=function(){return F(this.year())},Sn.weekYear=function(e){return yn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Sn.isoWeekYear=function(e){return yn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Sn.quarter=Sn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Sn.month=Re,Sn.daysInMonth=function(){return Ne(this.year(),this.month())},Sn.week=Sn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Sn.isoWeek=Sn.isoWeeks=function(e){var t=Be(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},Sn.weeksInYear=function(){var e=this.localeData()._week;return Ge(this.year(),e.dow,e.doy)},Sn.weeksInWeekYear=function(){var e=this.localeData()._week;return Ge(this.weekYear(),e.dow,e.doy)},Sn.isoWeeksInYear=function(){return Ge(this.year(),1,4)},Sn.isoWeeksInISOWeekYear=function(){return Ge(this.isoWeekYear(),1,4)},Sn.date=wn,Sn.day=Sn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},Sn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},Sn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},Sn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},Sn.hour=Sn.hours=lt,Sn.minute=Sn.minutes=bn,Sn.second=Sn.seconds=Cn,Sn.millisecond=Sn.milliseconds=_n,Sn.utcOffset=function(e,t,n){var a,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Wt(de,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(a=jt(this)),this._offset=e,this._isUTC=!0,null!=a&&this.add(a,"m"),i!==e&&(!t||this._changeInProgress?Kt(this,Jt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:jt(this)},Sn.utc=function(e){return this.utcOffset(0,e)},Sn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(jt(this),"m")),this},Sn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Wt(ue,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},Sn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ot(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Sn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Sn.isLocal=function(){return!!this.isValid()&&!this._isUTC},Sn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Sn.isUtc=Bt,Sn.isUTC=Bt,Sn.zoneAbbr=function(){return this._isUTC?"UTC":""},Sn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Sn.dates=_("dates accessor is deprecated. Use date instead.",wn),Sn.months=_("months accessor is deprecated. Use month instead",Re),Sn.years=_("years accessor is deprecated. Use year instead",Ie),Sn.zone=_("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),Sn.isDSTShifted=_("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e,t={};return E(t,this),(t=Pt(t))._a?(e=t._isUTC?h(t._a):Ot(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var r,a=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),o=0;for(r=0;r<a;r++)B(e[r])!==B(t[r])&&o++;return o+i}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted});var An=T.prototype;function Tn(e,t,n,r){var a=gt(),i=h().set(r,t);return a[n](i,e)}function Nn(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return Tn(e,t,n,"month");var r,a=[];for(r=0;r<12;r++)a[r]=Tn(e,r,n,"month");return a}function Pn(e,t,n,r){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var a,i=gt(),o=e?i._week.dow:0,l=[];if(null!=n)return Tn(t,(n+o)%7,r,"day");for(a=0;a<7;a++)l[a]=Tn(t,(a+o)%7,r,"day");return l}An.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return M(r)?r.call(t,n):r},An.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(P).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},An.invalidDate=function(){return this._invalidDate},An.ordinal=function(e){return this._ordinal.replace("%d",e)},An.preparse=Mn,An.postformat=Mn,An.relativeTime=function(e,t,n,r){var a=this._relativeTime[n];return M(a)?a(e,t,n,r):a.replace(/%d/i,e)},An.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return M(n)?n(t):n.replace(/%s/i,t)},An.set=function(e){var t,n;for(n in e)o(e,n)&&(M(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},An.eras=function(e,t){var n,a,i,o=this._eras||gt("en")._eras;for(n=0,a=o.length;n<a;++n)switch("string"==typeof o[n].since&&(i=r(o[n].since).startOf("day"),o[n].since=i.valueOf()),typeof o[n].until){case"undefined":o[n].until=Infinity;break;case"string":i=r(o[n].until).startOf("day").valueOf(),o[n].until=i.valueOf()}return o},An.erasParse=function(e,t,n){var r,a,i,o,l,s=this.eras();for(e=e.toUpperCase(),r=0,a=s.length;r<a;++r)if(i=s[r].name.toUpperCase(),o=s[r].abbr.toUpperCase(),l=s[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(o===e)return s[r];break;case"NNNN":if(i===e)return s[r];break;case"NNNNN":if(l===e)return s[r]}else if([i,o,l].indexOf(e)>=0)return s[r]},An.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n},An.erasAbbrRegex=function(e){return o(this,"_erasAbbrRegex")||gn.call(this),e?this._erasAbbrRegex:this._erasRegex},An.erasNameRegex=function(e){return o(this,"_erasNameRegex")||gn.call(this),e?this._erasNameRegex:this._erasRegex},An.erasNarrowRegex=function(e){return o(this,"_erasNarrowRegex")||gn.call(this),e?this._erasNarrowRegex:this._erasRegex},An.months=function(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Oe).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone},An.monthsShort=function(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Oe.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},An.monthsParse=function(e,t,n){var r,a,i;if(this._monthsParseExact)return He.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(a=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},An.monthsRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||Ye.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=ze),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},An.monthsShortRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||Ye.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=Ve),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},An.week=function(e){return Be(e,this._week.dow,this._week.doy).week},An.firstDayOfYear=function(){return this._week.doy},An.firstDayOfWeek=function(){return this._week.dow},An.weekdays=function(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?qe(n,this._week.dow):e?n[e.day()]:n},An.weekdaysMin=function(e){return!0===e?qe(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},An.weekdaysShort=function(e){return!0===e?qe(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},An.weekdaysParse=function(e,t,n){var r,a,i;if(this._weekdaysParseExact)return tt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(a=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},An.weekdaysRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Xe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},An.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ke),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},An.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=et),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},An.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},An.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ft("en",{eras:[{since:"0001-01-01",until:Infinity,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-Infinity,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===B(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=_("moment.lang is deprecated. Use moment.locale instead.",ft),r.langData=_("moment.langData is deprecated. Use moment.localeData instead.",gt);var Dn=Math.abs;function On(e,t,n,r){var a=Jt(t,n);return e._milliseconds+=r*a._milliseconds,e._days+=r*a._days,e._months+=r*a._months,e._bubble()}function Vn(e){return e<0?Math.floor(e):Math.ceil(e)}function zn(e){return 4800*e/146097}function Hn(e){return 146097*e/4800}function Ln(e){return function(){return this.as(e)}}var Rn=Ln("ms"),Yn=Ln("s"),Zn=Ln("m"),In=Ln("h"),Un=Ln("d"),Wn=Ln("w"),Fn=Ln("M"),jn=Ln("Q"),Bn=Ln("y");function Gn(e){return function(){return this.isValid()?this._data[e]:NaN}}var qn=Gn("milliseconds"),Jn=Gn("seconds"),$n=Gn("minutes"),Qn=Gn("hours"),Xn=Gn("days"),Kn=Gn("months"),er=Gn("years"),tr=Math.round,nr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function rr(e,t,n,r,a){return a.relativeTime(t||1,!!n,e,r)}var ar=Math.abs;function ir(e){return(e>0)-(e<0)||+e}function or(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,a,i,o,l,s=ar(this._milliseconds)/1e3,c=ar(this._days),u=ar(this._months),d=this.asSeconds();return d?(e=j(s/60),t=j(e/60),s%=60,e%=60,n=j(u/12),u%=12,r=s?s.toFixed(3).replace(/\.?0+$/,""):"",a=d<0?"-":"",i=ir(this._months)!==ir(d)?"-":"",o=ir(this._days)!==ir(d)?"-":"",l=ir(this._milliseconds)!==ir(d)?"-":"",a+"P"+(n?i+n+"Y":"")+(u?i+u+"M":"")+(c?o+c+"D":"")+(t||e||s?"T":"")+(t?l+t+"H":"")+(e?l+e+"M":"")+(s?l+r+"S":"")):"P0D"}var lr=Rt.prototype;return lr.isValid=function(){return this._isValid},lr.abs=function(){var e=this._data;return this._milliseconds=Dn(this._milliseconds),this._days=Dn(this._days),this._months=Dn(this._months),e.milliseconds=Dn(e.milliseconds),e.seconds=Dn(e.seconds),e.minutes=Dn(e.minutes),e.hours=Dn(e.hours),e.months=Dn(e.months),e.years=Dn(e.years),this},lr.add=function(e,t){return On(this,e,t,1)},lr.subtract=function(e,t){return On(this,e,t,-1)},lr.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=Z(e))||"quarter"===e||"year"===e)switch(n=this._months+zn(t=this._days+r/864e5),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Hn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},lr.asMilliseconds=Rn,lr.asSeconds=Yn,lr.asMinutes=Zn,lr.asHours=In,lr.asDays=Un,lr.asWeeks=Wn,lr.asMonths=Fn,lr.asQuarters=jn,lr.asYears=Bn,lr.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*B(this._months/12):NaN},lr._bubble=function(){var e,t,n,r,a,i=this._milliseconds,o=this._days,l=this._months,s=this._data;return i>=0&&o>=0&&l>=0||i<=0&&o<=0&&l<=0||(i+=864e5*Vn(Hn(l)+o),o=0,l=0),s.milliseconds=i%1e3,e=j(i/1e3),s.seconds=e%60,t=j(e/60),s.minutes=t%60,n=j(t/60),s.hours=n%24,o+=j(n/24),l+=a=j(zn(o)),o-=Vn(Hn(a)),r=j(l/12),l%=12,s.days=o,s.months=l,s.years=r,this},lr.clone=function(){return Jt(this)},lr.get=function(e){return e=Z(e),this.isValid()?this[e+"s"]():NaN},lr.milliseconds=qn,lr.seconds=Jn,lr.minutes=$n,lr.hours=Qn,lr.days=Xn,lr.weeks=function(){return j(this.days()/7)},lr.months=Kn,lr.years=er,lr.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,a=!1,i=nr;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(a=e),"object"==typeof t&&(i=Object.assign({},nr,t),null!=t.s&&null==t.ss&&(i.ss=t.s-1)),r=function(e,t,n,r){var a=Jt(e).abs(),i=tr(a.as("s")),o=tr(a.as("m")),l=tr(a.as("h")),s=tr(a.as("d")),c=tr(a.as("M")),u=tr(a.as("w")),d=tr(a.as("y")),m=i<=n.ss&&["s",i]||i<n.s&&["ss",i]||o<=1&&["m"]||o<n.m&&["mm",o]||l<=1&&["h"]||l<n.h&&["hh",l]||s<=1&&["d"]||s<n.d&&["dd",s];return null!=n.w&&(m=m||u<=1&&["w"]||u<n.w&&["ww",u]),(m=m||c<=1&&["M"]||c<n.M&&["MM",c]||d<=1&&["y"]||["yy",d])[2]=t,m[3]=+e>0,m[4]=r,rr.apply(null,m)}(this,!a,i,n=this.localeData()),a&&(r=n.pastFuture(+this,r)),n.postformat(r)},lr.toISOString=or,lr.toString=or,lr.toJSON=or,lr.locale=an,lr.localeData=ln,lr.toIsoString=_("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",or),lr.lang=on,z("X",0,0,"unix"),z("x",0,0,"valueOf"),he("x",ce),he("X",/[+-]?\d+(\.\d{1,3})?/),ve("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),ve("x",function(e,t,n){n._d=new Date(B(e))}),r.version="2.29.4",t=Ot,r.fn=Sn,r.min=function(){return Ht("isBefore",[].slice.call(arguments,0))},r.max=function(){return Ht("isAfter",[].slice.call(arguments,0))},r.now=function(){return Date.now?Date.now():+new Date},r.utc=h,r.unix=function(e){return Ot(1e3*e)},r.months=function(e,t){return Nn(e,t,"months")},r.isDate=u,r.locale=ft,r.invalid=g,r.duration=Jt,r.isMoment=b,r.weekdays=function(e,t,n){return Pn(e,t,n,"weekdays")},r.parseZone=function(){return Ot.apply(null,arguments).parseZone()},r.localeData=gt,r.isDuration=Yt,r.monthsShort=function(e,t){return Nn(e,t,"monthsShort")},r.weekdaysMin=function(e,t,n){return Pn(e,t,n,"weekdaysMin")},r.defineLocale=pt,r.updateLocale=function(e,t){if(null!=t){var n,r,a=st;null!=ct[e]&&null!=ct[e].parentLocale?ct[e].set(A(ct[e]._config,t)):(null!=(r=ht(e))&&(a=r._config),t=A(a,t),null==r&&(t.abbr=e),(n=new T(t)).parentLocale=ct[e],ct[e]=n),ft(e)}else null!=ct[e]&&(null!=ct[e].parentLocale?(ct[e]=ct[e].parentLocale,e===ft()&&ft(e)):null!=ct[e]&&delete ct[e]);return ct[e]},r.locales=function(){return C(ct)},r.weekdaysShort=function(e,t,n){return Pn(e,t,n,"weekdaysShort")},r.normalizeUnits=Z,r.relativeTimeRounding=function(e){return void 0===e?tr:"function"==typeof e&&(tr=e,!0)},r.relativeTimeThreshold=function(e,t){return void 0!==nr[e]&&(void 0===t?nr[e]:(nr[e]=t,"s"===e&&(nr.ss=t-1),!0))},r.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=Sn,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()},rr(ar={exports:{}}),ar.exports),or={fontSize:"16px",fontWeight:400,lineHeight:"165%"},lr=function(){},sr=function(e){var t=void 0===e?{}:e,n=t.disabled,r=t.spinner,a=Te({},or,{backgroundColor:Ft.interaction55,color:r?"transparent":"surface",spinner:r?{color:Ft.interaction55}:void 0});return Te({},a,n?{backgroundColor:Ft.lightNeutral81,spinner:r?{color:Ft.lightNeutral81}:void 0}:{active:{backgroundColor:Ft.interaction45},focus:{backgroundColor:Ft.interaction55},hover:{backgroundColor:Ft.interaction50}})},cr="notification.mark_read",ur=[cr,"notification.mark_unread"],dr=function(){var e=l(Xn);if(!e)throw new Error("useChat must be used within a ChatProvider");return e},mr=function(){return l(qn)},hr=function(){var e=t.useState(null),n=e[0],r=e[1],a=null===n,i=mr();return t.useEffect(function(){i.chat.get("me/connected_people").then(function(e){return r(e)})},[]),{loading:a,people:n,switchPerson:fr}},fr=function(e,t,n){Re(Le,u(n)("api")+"/login/v2/me/switch_connected_person",{data:{data:{attributes:{id:e,return_path:t}}},method:"POST"}).then(function(e){window.location=e.json.meta.redirect_to})},pr={plan_id:null,teams:[]},gr={Services:pr},vr=[["List",""],["Shortcuts","new/shortcuts"],["NewServices","new/services"],["NewGroups","new/groups"],["Conversation","conversations/:id"],["Details","conversations/:id/details"],["NewServicesPlan","new/services/plans/:plan_id/teams/:teams"],["NewServicesTeam","new/services/teams/:teams"],["BlankState","blankstate"]],yr=function(e){null!=e||(e="");var t=e.split("/"),n=vr.find(function(e){var n=e[1].split("/");return t.length===n.length&&n.every(function(e,n){return e.startsWith(":")||e===t[n]})});if(!n)return null;var r=n[0],a=n[1],i=a.split("/").reduce(function(e,n,r){var a;return n.startsWith(":")?Te({},e,((a={})[n.slice(1)]=t[r],a)):e},{});return{name:r,params:i,index:vr.indexOf(n),path:function(e){return void 0===e&&(e=i),a.split("/").reduce(function(t,n){return[].concat(t,[n.startsWith(":")?e[n.slice(1)]:n])},[]).join("/")}}},Er=["token"],wr={fontSize:"16px",fontWeight:600,lineHeight:"165%"},br=function(e){var n=e.children;return t.createElement(_,Te({level:2},wr),n)},kr=function(e){var n=e.children,r=e.loading;return t.createElement(p,{spacing:1},t.createElement(p,{spacing:1,alignment:"center",axis:"horizontal"},t.createElement(br,null,e.title),r&&t.createElement(M,{size:"sm"})),t.createElement(t.Fragment,null,n))},_r={Services:function(e){var n=e.groups,r=["Team","PlanTeam"].reduce(function(e,t){return n[t]?[].concat(e,n[t]):e},[]);return t.createElement(kr,{title:"Teams"},t.createElement(A,{spacing:1},r.map(function(e){return t.createElement(S,{key:e.source_identifier,size:"sm"},e.name)})))}},Cr=function(e){return t.createElement(t.Fragment,null,Object.entries(e.groups).reduce(function(e,n){var r=n[0],a=_r[r];return a?[].concat(e,[t.createElement(a,{key:r,groups:n[1]})]):e},[]))},xr="18px 1fr auto",Sr=function(e){var n=e.childPeople,a=r(!1),i=a[0],o=a[1],l=n.length,s=l+" "+(1===l?"member":"members")+" under age 13";return t.createElement(p,{background:Ft.warning94,marginBottom:.5,padding:1,radius:4},t.createElement(C,{alignment:"start",columns:xr,spacing:1},t.createElement(v,{color:Ft.warning49,marginTop:"1px",name:"general.shieldExclamation",size:"lg"}),t.createElement(g,{grow:1,color:"foreground",size:4},i?"Members under age 13 cannot chat. They will not see conversations or receive notifications.":s),t.createElement(f,{"aria-label":i?"Hide explanation":"Show explanation",icon:{name:i?"general.upCaret":"general.downCaret",size:"md"},onClick:function(){return o(!i)},size:"xs",theme:"warning",tooltip:i?"Hide explanation":"Show explanation",variant:"naked"})),t.createElement(T,{open:i},t.createElement(C,{alignment:"start",columns:xr,spacing:1},t.createElement(p,{gridColumnStart:2,paddingTop:1,spacing:1},n.map(function(e){return t.createElement(p,{alignment:"center",axis:"horizontal",key:e.id,spacing:1},t.createElement(x,{src:e.avatar,size:"sm"}),t.createElement(g,{color:"foreground",size:4,weight:500},e.name))})))))},Mr=function(e){var n=e.person;return t.createElement(n.child?Tr:Ar,{person:n})},Ar=function(e){var n=e.person;return t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1},t.createElement(x,{src:n.avatar,size:"lg"}),t.createElement(p,{alignment:"start",spacing:.25},t.createElement(g,{truncate:!0},n.name),n.badges.length>0&&t.createElement(p,{alignment:"center",axis:"horizontal",spacing:.5},n.badges.map(function(e){var n=e.title;return t.createElement(S,{key:n,size:"xs"},n)}))))},Tr=function(e){var n=e.person;return t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1},t.createElement(k,{opacity:.5},t.createElement(x,{src:n.avatar,size:"lg"})),t.createElement(p,null,t.createElement(g,{color:"foreground",opacity:.75,truncate:!0},n.name),t.createElement(p,{alignment:"center",axis:"horizontal",spacing:.5},t.createElement(v,{name:"general.shieldExclamation",color:Ft.warning49}),t.createElement(g,{color:Ft.warning20,size:5},"Not eligible to chat"))))},Nr=function(e){var n=function(e){var n=t.useState([]),r=n[0],a=n[1],i=t.useState(!1),o=i[0],l=i[1],s=mr();return t.useEffect(function(){e&&(l(!0),s.chat.get("me/conversations/"+e.id+"/members",{per_page:100},{unpaginated:!0}).then(function(e){a(e),l(!1)}).catch(lr))},[e]),{chatMembers:r,loadingChatMembers:o}}(e.channel),r=n.chatMembers,a=n.loadingChatMembers,i=r.filter(function(e){return e.child}),o=i.length>0,l=r.slice(0,500),s=r.length>500;return t.createElement(kr,{title:"People",loading:a},t.createElement(p,{paddingBottom:2,spacing:1.5},o&&t.createElement(Sr,{childPeople:i}),l.map(function(e){return t.createElement(Mr,{key:e.id,person:e})}),s&&t.createElement(g,{color:"foregroundSecondary"},"and ",r.length-l.length," more...")))},Pr=function(e){var n=e.channel,r=nr(n);return t.createElement(p,{axis:"horizontal",width:"100%"},t.createElement(g,{as:"label",display:"flex",grow:1},"Mute",t.createElement(p,{grow:1}),t.createElement(N,{isChecked:r,ariaLabel:"Mute Channel",onClick:function(){return r?n.unmute():n.mute()}})))},Dr=function(e){var n=e.channel,r=t.useState(!1),a=r[0],i=r[1],o=t.useState(!1),l=o[0],s=o[1],c=dr().navigation,u=mr();return t.createElement(k,null,!a&&t.createElement(f,{onClick:function(){return i(!0)},paddingHorizontal:0,paddingVertical:0,theme:!1},t.createElement(g,{color:"error"},"Delete conversation")),t.createElement(T,{open:a,instant:!0},t.createElement(p,{backgroundColor:"error-lightest",padding:2,radius:4,spacing:1},t.createElement(g,{size:4},"Deleting this conversation will remove it for everyone. This cannot be undone. Are you sure?"),t.createElement(p,{distribution:"end",alignment:"end",axis:"horizontal",spacing:1},t.createElement(f,{fontWeight:400,onClick:function(){return i(!1)},size:"sm",theme:"dark",variant:"naked"},"Cancel"),t.createElement(f,{disabled:l,fontWeight:400,onMouseDown:function(e){return e.preventDefault()},onClick:function(){s(!0),u.chat.delete("me/conversations/"+n.id).then(c.switchToChannelListView).catch(lr)},size:"sm",theme:"error",title:"Yes, delete",spinner:l})))))},Or=function(e){var n=e.channel,r=e.isRemovable;return t.createElement(kr,{title:"Settings"},t.createElement(p,{spacing:1},t.createElement(Pr,{channel:n}),r&&t.createElement(Dr,{channel:n})))},Vr=function(e){var n=e.channel,r=e.isEditable,a=t.useState(n.data.name),i=a[0],o=a[1],l=mr();return t.createElement(kr,{title:"Title"},t.createElement(P,{size:"lg",value:i,maxLength:255,disabled:!r,onChange:function(e){return o(e.target.value)},onBlur:function(){i!==n.data.name&&l.chat.patch("me/conversations/"+n.id,{title:i}).catch(lr)},onKeyDown:function(e){return"Enter"===e.key&&e.target.blur()}}))},zr=function(e){var n=e.channel,r=function(e){var n=t.useState([]),r=n[0],a=n[1],i=mr();return t.useEffect(function(){e&&i.chat.get("me/conversations/"+e.id+"/groups").then(a).catch(lr)},[e]),r.reduce(function(e,t){var n,r,a;return e[n=t.source_app_name]||(e[n]={}),(r=e[t.source_app_name])[a=t.source_type]||(r[a]=[]),e[t.source_app_name][t.source_type].push(t),e},{})}(n),a=function(e){var n=mr(),r=t.useState({canDelete:!1,canUpdate:!1}),a=r[0],i=r[1];return t.useEffect(function(){n.chat.get("/me/conversations/"+e.id+"/member_ability").then(function(e){return i({canDelete:e.can_delete,canUpdate:e.can_update})})},[e]),a}(n);return t.createElement(Yn,null,t.createElement(p,{padding:2,spacing:4,grow:1,distribution:"start"},t.createElement(Vr,{channel:n,isEditable:a.canUpdate}),t.createElement(Or,{channel:n,isRemovable:a.canDelete}),Object.keys(r).length>0&&t.createElement(Cr,{groups:r}),t.createElement(Nr,{channel:n})))},Hr=function(){var e=B().channel,n=dr().navigation;return e&&n.isChannelDetailsViewActive?t.createElement(t.Fragment,null,t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1,padding:2,paddingTop:1},t.createElement(f,{"aria-label":"Switch to chat list",color:Ft.lightNeutral12,icon:"general.leftChevron",onClick:function(){return n.switchToChannelView(e.id)},size:"sm",title:"Back to chat list",variant:"naked"}),t.createElement(Vn,{truncate:!0},"Conversation details")),t.createElement(zr,{channel:e})):null},Lr=function(){return t.createElement(p,{alignment:"center",distribution:"center",padding:4,paddingTop:"54px",width:"100%"},t.createElement(Rr,null),t.createElement(_,{color:"foreground",fontWeight:500,marginTop:1,size:3},"No conversations"))},Rr=function(){return t.createElement("svg",{width:"162",height:"124",viewBox:"0 0 162 124",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M157.354 67.5522C151.241 85.6769 138.257 101.123 124.335 110.111C110.102 119.278 94.9458 121.54 77.5441 117.715C60.3357 113.846 43.3207 105.974 29.2803 98.519C15.344 90.6768 4.35267 83.5043 1.63086 72.2247C-1.04633 61.2576 4.81374 46.0644 18.8987 31.0943C32.835 16.3773 54.9962 2.71679 81.3665 0.469802C107.543 -2.16409 131.594 6.57091 145.381 19.3088C159.526 32.1211 163.437 49.5613 157.369 67.5522H157.354Z",fill:"#EDF6FB"}),t.createElement("g",{opacity:"0.2"},t.createElement("path",{opacity:"0.2",d:"M102.204 121.658C88.8481 124.173 75.9678 121.851 62.6562 114.947C47.0244 106.747 32.642 94.7534 20.9962 83.9054C9.55863 72.7299 0.798274 62.9533 1.08087 51.3463C1.25935 43.147 6.37575 33.9656 15.85 25.4092",stroke:"#BAC7D3",strokeWidth:"1.48",strokeMiterlimit:"10"}),t.createElement("path",{opacity:"0.2",d:"M152.714 87.1641C143.909 100.408 130.985 110.631 117.792 116.628",stroke:"#BAC7D3",strokeWidth:"1.48",strokeMiterlimit:"10"}),t.createElement("path",{opacity:"0.2",d:"M36.5986 11.6C53.108 3.53464 74.4809 -1.27187 96.6421 2.6864C122.611 6.91253 143.582 21.5701 153.607 37.4478C160.761 48.5191 162.62 60.4683 159.63 72.0009",stroke:"#BAC7D3",strokeWidth:"1.48",strokeMiterlimit:"10"})),t.createElement("path",{d:"M108.125 25.5668H52.4657C49.4438 25.4274 46.4893 26.4961 44.2438 28.5407C41.9982 30.5854 40.6427 33.441 40.4717 36.4876V72.233C40.6427 75.2796 41.9982 78.1352 44.2438 80.1799C46.4893 82.2245 49.4438 83.2931 52.4657 83.1538H64.7654L80.2729 96.7441L95.7804 83.1538H108.125C111.147 83.2931 114.102 82.2245 116.347 80.1799C118.593 78.1352 119.948 75.2796 120.119 72.233V36.4876C119.948 33.441 118.593 30.5854 116.347 28.5407C114.102 26.4961 111.147 25.4274 108.125 25.5668Z",fill:"#48A5E5"}),t.createElement("path",{d:"M64.8701 59.3043C62.3848 59.3043 60.3701 57.2886 60.3701 54.8021C60.3701 52.3155 62.3848 50.2998 64.8701 50.2998C67.3554 50.2998 69.3701 52.3155 69.3701 54.8021C69.3701 57.2886 67.3554 59.3043 64.8701 59.3043Z",fill:"#EEF5FD"}),t.createElement("path",{d:"M79.9258 59.3043C77.4405 59.3043 75.4258 57.2886 75.4258 54.8021C75.4258 52.3155 77.4405 50.2998 79.9258 50.2998C82.4111 50.2998 84.4258 52.3155 84.4258 54.8021C84.4258 57.2886 82.4111 59.3043 79.9258 59.3043Z",fill:"#EEF5FD"}),t.createElement("path",{d:"M95.0615 59.3043C92.5762 59.3043 90.5615 57.2886 90.5615 54.8021C90.5615 52.3155 92.5762 50.2998 95.0615 50.2998C97.5468 50.2998 99.5615 52.3155 99.5615 54.8021C99.5615 57.2886 97.5468 59.3043 95.0615 59.3043Z",fill:"#EEF5FD"}),t.createElement("path",{d:"M124.007 65.7374H96.4523C94.9563 65.6685 93.4937 66.1975 92.382 67.2097C91.2703 68.2219 90.5993 69.6355 90.5146 71.1438V88.8395C90.5993 90.3477 91.2703 91.7614 92.382 92.7736C93.4937 93.7858 94.9563 94.3148 96.4523 94.2458H102.541L110.218 100.974L117.895 94.2458H124.007C125.503 94.3148 126.965 93.7858 128.077 92.7736C129.188 91.7614 129.859 90.3477 129.944 88.8395V71.1438C129.859 69.6355 129.188 68.2219 128.077 67.2097C126.965 66.1975 125.503 65.6685 124.007 65.7374Z",fill:"#79CAF2"}),t.createElement("path",{d:"M102.594 82.4391C101.363 82.4391 100.366 81.4412 100.366 80.2103C100.366 78.9793 101.363 77.9814 102.594 77.9814C103.824 77.9814 104.821 78.9793 104.821 80.2103C104.821 81.4412 103.824 82.4391 102.594 82.4391Z",fill:"#EEF5FD"}),t.createElement("path",{d:"M110.047 82.4391C108.816 82.4391 107.819 81.4412 107.819 80.2103C107.819 78.9793 108.816 77.9814 110.047 77.9814C111.277 77.9814 112.274 78.9793 112.274 80.2103C112.274 81.4412 111.277 82.4391 110.047 82.4391Z",fill:"#EEF5FD"}),t.createElement("path",{d:"M117.54 82.4391C116.31 82.4391 115.312 81.4412 115.312 80.2103C115.312 78.9793 116.31 77.9814 117.54 77.9814C118.77 77.9814 119.768 78.9793 119.768 80.2103C119.768 81.4412 118.77 82.4391 117.54 82.4391Z",fill:"#EEF5FD"}))},Yr=function(e){var a=e.appName,i=e.env,o=e.currentPersonId,l=hr(),s=l.people,c=l.loading,u=l.switchPerson,d=r(s),m=d[0],h=d[1],f=r(null),g=f[0],v=f[1],y=r(!1),E=y[0],w=y[1],b=null==m?void 0:m.some(function(e){return e.id!==""+o&&e.unread_count});return n(function(){if(s){var e=s.sort(function(e,t){return e.organization_name.localeCompare(t.organization_name)});h(e);var t=s.find(function(e){return e.id===""+o});v(t)}},[s]),t.createElement(p,{paddingHorizontal:2},t.createElement(D,{emptyValue:"Linked Accounts",disabled:E,matchWidths:!0,onChange:function(e){var t=e.value,n=m.find(function(e){return e.id===t});v(n),n.id!==""+o&&(w(!0),u(n.id,a+"/",i))},value:null==g?void 0:g.id,renderValue:function(){return t.createElement(p,{alignment:"center",axis:"horizontal",distribution:"space-between",spacing:1},g.organization_name,b&&!E&&t.createElement(Hn,{right:3.5,top:1.25}),E&&t.createElement(M,{key:"loader",position:"absolute",height:1.5,width:1.5,zIndex:6,right:3.5,top:1.25}))}},t.createElement(Ir,null),null==m?void 0:m.map(function(e){return t.createElement(D.Option,{value:e.id,key:e.id},t.createElement(p,{alignment:"center",axis:"horizontal",distribution:"space-between",spacing:1},e.organization_name,e.unread_count>0&&t.createElement(Hn,{right:1.5,top:1.25})))}),c&&t.createElement(Zr,null)))},Zr=function(){return t.createElement(O.Item,{alignment:"center",distribution:"center",paddingBottom:2,paddingTop:2},t.createElement(M,null))},Ir=function(){return t.createElement(p,{axis:"horizontal",backgroundColor:Ft.interaction97,marginBottom:.5,marginHorizontal:1.25,marginTop:1,padding:1,radius:4,spacing:1},t.createElement(v,{color:Ft.interaction66,marginTop:"3px",name:"general.outlinedExclamationCircle"}),t.createElement(g,{size:5},"Make sure any changes outside of chat are saved before switching accounts."))},Ur=function(){return t.createElement(p,{alignment:"center",spacing:2,padding:2,paddingTop:"10%"},t.createElement(v,{name:"general.exclamationTriangle",color:"warning",size:"xl"}),t.createElement(g,{color:"foregroundSecondary",align:"center"},"An error occured while connecting to the chat, please try again."))},Wr=function(e){var n,r,a,i,o=e.children,l=e.error,s=void 0===l?null:l,c=e.loading,u=dr().navigation,d=(n=t.useState({}),r=n[0],a=n[1],i=mr(),t.useEffect(function(){i.chat.get("me/app_grants").then(function(e){return e.reduce(function(e,t){var n;return Te({},e,((n={})[t.app_name]=t,n))},{})}).then(a)},[]),{canCreateChat:function(e){return r[e]&&r[e].create_conversations}}),m=d.canCreateChat("Services")||d.canCreateChat("Groups");return s?t.createElement(Ur,null):c?null:t.createElement(p,{grow:1,shrink:1},t.createElement(Yn,null,o),t.createElement(h,null),t.createElement(p,{padding:2,alignment:"stretch"},m&&t.createElement(f,Te({"aria-label":"Switch to new conversation",onClick:u.switchToNewChatShortcutsView},sr()),"New conversation")))},Fr={groups:"Groups",services:"Services"},jr=function(e){var n,r,a=e.appName,i=e.channel;switch(a){case"Groups":var o,l,s=i.data[a];n="Group",null!=s&&null!=(o=s.names)&&o.length&&(r=null==(l=s.names)?void 0:l.join(", "));break;case"Services":var c=i.data[a];n=null!=c&&c.dates?"Plan":"Team",null!=c&&c.dates&&(r=c.dates)}return t.createElement(V,{radius:4,spacing:"0.25px",className:"channel-meta",maxWidth:"100%"},t.createElement(p,{alignment:"center",axis:"horizontal",backgroundColor:Ft.lightNeutral95,borderColor:Ft.lightNeutral95,borderWidth:1,distribution:"center",padding:.5,paddingHorizontal:1,spacing:.5},t.createElement(At,{appName:a,size:15}),t.createElement(g,{lineHeight:"13px",size:5,weight:500},n)),r&&t.createElement(p,{alignment:"center",borderColor:Ft.lightNeutral95,borderLeftWidth:0,borderWidth:1,distribution:"center",padding:.5,paddingHorizontal:1,shrink:1},t.createElement(z,{title:r,openDelay:800},t.createElement(g,{color:"foregroundSecondary",lineHeight:"13px",size:5,truncate:!0,maxWidth:"100%"},r))))},Br=function(e){var n,r=e.channel;if(null==r||null==(n=r.data)||!n.pco_apps)return null;var a=r.data.pco_apps.map(function(e){return t.createElement(jr,{key:e,appName:Fr[e],channel:r})});return t.createElement(p,{axis:"horizontal",maxWidth:"calc(100% + 24px)"},a)},Gr=function(e){var n,r,a=e.size;return t.createElement(G,{image:(n=e.member,null==(r=n.user)?void 0:r.image),shape:"square",size:void 0===a?40:a})},qr=function(e){var n=e.members,r=null;return 1===n.length&&(r=t.createElement(Gr,{member:n[0]})),2===n.length&&(r=t.createElement(t.Fragment,null,t.createElement("div",null,t.createElement(Gr,{member:n[0]})),t.createElement("div",{style:{marginLeft:"-20px"}},t.createElement(Gr,{member:n[1]})))),3===n.length&&(r=t.createElement(t.Fragment,null,t.createElement("div",null,t.createElement(Gr,{member:n[0]})),t.createElement("div",{style:{marginLeft:"-20px"}},t.createElement(Gr,{member:n[1],size:20}),t.createElement(Gr,{member:n[2],size:20})))),n.length>=4&&(r=t.createElement(t.Fragment,null,t.createElement("div",null,t.createElement(Gr,{member:n[n.length-4],size:20}),t.createElement(Gr,{member:n[n.length-3],size:20})),t.createElement("div",null,t.createElement(Gr,{member:n[n.length-2],size:20}),t.createElement(Gr,{member:n[n.length-1],size:20})))),t.createElement("div",{className:"str-chat__avatar-group"},r)},Jr=function(e){var n=e.unread;if(n<1)return null;var r=n<=99?n.toString():"99+";return t.createElement(S,{title:r,size:"xs",color:Ft.interaction66,radius:"pill",minWidth:3})},$r=function(e){var n=e.channel,r=e.lastMessage,a=e.setActiveChannel,i=e.unread,o=B().client,l=q().userLanguage,s=dr(),c=s.setActionsOpenForChannel,u=s.actionsOpenForChannel,d=s.navigation,m=s.refreshTotalUnreadCount,h=nr(n),f=function(e,n,r){var a=B().client,i=t.useState(n),o=i[0],l=i[1],s=t.useRef(!0);t.useEffect(function(){l(n),s.current?s.current=!1:r()},[n]),t.useEffect(function(){var t=function(t){var n,r;if(t.cid===e.cid&&(null==(n=t.user)?void 0:n.id)===(null==(r=a.user)?void 0:r.id)){var i=t.type===cr?0:e.countUnread();l(i)}};return ur.forEach(function(e){return a.on(e,t)}),function(){return ur.forEach(function(e){return a.off(e,t)})}},[]);var c=t.useMemo(function(){return function(e,t){for(var n=e.length-1;n>=0;n--)if((null==(r=e[n].user)?void 0:r.id)!==a.userID)return e[n];var r}(e.state.latestMessages)},[o]),u=Boolean(null==c?void 0:c.id);return{isUnread:Boolean(o),isUnreadable:u,markRead:function(){try{return Promise.resolve(e.markRead())}catch(e){return Promise.reject(e)}},markUnread:function(){try{return Promise.resolve(u&&e.markUnread({message_id:c.id}))}catch(e){return Promise.reject(e)}},unreadCount:o}}(n,i,m),y=f.isUnread,E=f.isUnreadable,w=f.markRead,b=f.markUnread,x=f.unreadCount,S=u===n.id,M=function(e){"actions-dropdown"!==e.target.getAttribute("data-type")&&(a(n),d.switchToChannelView(n.id))},A=Object.values(n.state.members).filter(function(e){return e.user.id!==o.userID}),T=n.data.name;return t.createElement(C,{alignment:"start","aria-label":"Select Channel: "+(T||""),backgroundColor:S?"surfaceTertiary":"surface",borderBottomColor:"separatorTertiary",borderBottomWidth:1,columns:"auto 1fr auto",cursor:"pointer",css:{"&:hover":{".actions-dropdown":{visibility:"visible"},".channel-meta > *":{borderColor:Ft.lightNeutral88},backgroundColor:"surfaceTertiary"},"@media (hover: none)":{".actions-dropdown":{visibility:"visible"}}},minHeight:10,onClick:M,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||M(e)},padding:1,paddingHorizontal:2,radius:0,role:"button",spacing:1,tabIndex:0,width:"100%"},t.createElement(qr,{members:A}),t.createElement(p,{height:"100%",alignment:"start",paddingRight:1},t.createElement(_,{level:4,maxWidth:"100%",truncate:!0,weight:500},T),t.createElement(g,{color:"foregroundSecondary",css:{WebkitBoxOrient:"vertical",WebkitLineClamp:"2",display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis"},lineHeight:"1.35",maxWidth:"100%",size:4,textAlign:"left"},function(e){var t,n;if(!e)return"Empty conversation";var r=null==(t=e.user)?void 0:t.name,a=null==(n=e.attachments)?void 0:n.length;return r+": "+((e.deleted_at?"Message deleted":e.text)||(1===a?"1 attachment":a+" attachments"))}(r)),t.createElement(p,{basis:.5,grow:1}),t.createElement(Br,{channel:n})),t.createElement(p,{alignment:"end",minWidth:6,height:"100%"},t.createElement(g,{color:"foregroundSecondary",size:5},function(e,t){var n,r,a=null==(n=e.state)?void 0:n.last_message_at,i=null==(r=e.data)?void 0:r.created_at;if(!a&&!i)return null;var o=new Date(a||i);return isNaN(o.getTime())?null:function(e,t){var n=ir(),r=n.isSame(e,"day"),a=n.isSame(e,"week"),i=n.isSame(e,"year"),o=new Intl.DateTimeFormat(t,{timeStyle:"short"});return r?o.format(e):de.date(e,a?{style:"relative"}:i?{style:"abbreviated"}:{style:"short",year:!0})}(o,t)}(n,l)),t.createElement(p,{alignment:"end",alignSelf:"stretch",grow:1},h?t.createElement(v,{name:"general.bellMuted"}):t.createElement(Jr,{unread:x})),t.createElement(k,{onClick:function(e){return e.stopPropagation()}},t.createElement(H,{alignSelf:"end",className:"actions-dropdown","data-type":"actions-dropdown",icon:{name:"people.importProgress",size:"lg"},radius:"circle",iconRight:null,lockScrollWhileOpen:!0,onClose:function(){return c(null)},onOpen:function(){return c(n.id)},placement:"top-end",popoverProps:{offset:4,shouldFlip:!0},right:"1.5px",size:"xs",theme:"dark",title:"Chat actions",variant:"naked",visibility:S?"visible":"hidden"},t.createElement(H.Item,{disabled:!(y||E),onSelect:function(){try{return Promise.resolve(y?w():b()).then(function(e){return Promise.resolve(m()).then(function(){})})}catch(e){return Promise.reject(e)}}},"Mark "+(y?"read":"unread")),t.createElement(H.Item,{onSelect:function(){return h?n.unmute():n.mute()}},h?"Unmute":"Mute")))))},Qr=function(e){var a,o,l,s,c=e.client,u=e.closeDrawer,d=e.env,m=e.appName,h=e.currentPersonId,g=(o=(a=r(!0))[0],l=a[1],s=B("ChannelList").channelsQueryState.queryInProgress,n(function(){l(null!=s)},[s]),o),v=It().hasConnectedPeople,y=dr(),E=y.totalUnreadCount,w=y.markAllRead,b=y.markAllReadProcessing,k={$or:[{last_message_at:{$exists:!0}},{created_by_id:c.userID}],members:{$in:[c.userID]},type:"messaging"},_=i(function(e,t){try{var n=t.channel;if(null==n||!n.id)return Promise.resolve();if(!Boolean(n.last_message_at))return Promise.resolve();var r=function(t,r){try{var a=(i=c.channel(n.type,n.id),Promise.resolve(i.watch()).then(function(){e(function(e){return[i].concat(e)})}))}catch(e){return r(e)}var i;return a&&a.then?a.then(void 0,r):a}(0,function(e){console.error(e)});return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},[c.userID]);return t.createElement(t.Fragment,null,t.createElement(Dn,{closeDrawer:u},t.createElement(p,{axis:"horizontal",alignment:"center",spacing:1},t.createElement(Vn,null,"Chat"),t.createElement(er,null),g&&t.createElement(M,{color:"hsl(0 0% 62%)",thickness:2,trackColor:"hsl(0 0% 97%)"}))),t.createElement(p,{spacing:2,grow:1},v&&t.createElement(Yr,{env:d,appName:m,currentPersonId:h}),t.createElement(p,{alignment:"center",axis:"horizontal",spacing:2,distribution:"space-between",paddingHorizontal:2},t.createElement(br,null,"Conversations"),t.createElement(f,{disabled:b,fontWeight:400,left:"6px",onClick:w,size:"xs",spinner:b,theme:"primary",variant:"naked"},"Mark ",E||"all"," read")),t.createElement(J,{setActiveChannelOnMount:!1,EmptyStateIndicator:Lr,filters:k,onMessageNew:_,onAddedToChannel:_,List:Wr,Paginator:$,Preview:$r})))},Xr=function(){return t.createElement(p,{alignment:"center",distribution:"center",height:"100%",spacing:1},t.createElement(v,{color:Ft.lightNeutral81,name:"general.outlinedTextMessage",size:"64px"}),t.createElement(g,{color:"foregroundTertiary"},"No conversation"))},Kr=function(e){var r=e.channel,a=e.closeDrawer,i=e.switchToChannelDetailsView,l=e.switchToChannelListView,s=e.title,c=function(e){var t=e.setOverflowBottom,r=e.setOverflowTop,a=Q(),i=a.listElement,l=a.scrollToBottom,s=o(null);return n(function(){var e=new ResizeObserver(function(){i&&t(i.scrollHeight-i.clientHeight>i.scrollTop+1)});return e.observe(i),function(){return e.unobserve(i)}},[i,t]),n(function(){var e,n=i.scrollTop,a=i.scrollHeight,o=i.clientHeight;r(n>0),t(a-o>n+1);var c=null==s||null==(e=s.current)?void 0:e.offsetHeight;i.style.marginTop=c+"px",l()},[i]),n(function(){var e=function(){var e=i.scrollTop,n=i.scrollHeight,a=i.clientHeight;r(e>0),t(n-a>e+1)};return i.addEventListener("scroll",e),function(){return i.removeEventListener("scroll",e)}},[i,r,t]),{headerRef:s}}({setOverflowBottom:e.setOverflowBottom,setOverflowTop:e.setOverflowTop});return t.createElement(ea,{channel:r,closeDrawer:a,innerRef:c.headerRef,switchToChannelDetailsView:i,switchToChannelListView:l,title:s})},ea=function(e){var n=e.channel,r=e.closeDrawer,a=e.switchToChannelDetailsView,i=e.title,o=e.innerRef;return t.createElement(p,{axis:"horizontal",backgroundColor:"surface",innerRef:void 0===o?null:o,left:0,padding:2,paddingTop:1,position:"absolute",right:0,spacing:1,top:0,zIndex:5},t.createElement(f,{alignSelf:"baseline","aria-label":"Switch to chat list",icon:{color:Ft.lightNeutral12,name:"general.leftChevron"},marginTop:.25,onClick:e.switchToChannelListView,size:"md",title:"Back to chat list",variant:"naked"}),t.createElement(p,{shrink:1},t.createElement(Vn,{truncate:!0},i),t.createElement(Br,{channel:n})),t.createElement(p,{alignment:"start",axis:"horizontal",marginLeft:"auto",spacing:.25},t.createElement(f,{"aria-label":"Switch to conversation details",icon:{color:Ft.lightNeutral12,name:"general.cog"},onClick:a,size:"md",title:"Conversation details",variant:"naked"}),t.createElement(f,{"aria-label":"Close drawer",icon:{color:Ft.lightNeutral12,name:"general.x"},onClick:r,size:"md",title:"Close drawer",variant:"naked"})))},ta={placement:"top",popoverProps:{backgroundColor:"surface",color:"foreground",elevation:2,offset:0,paddingHorizontal:1,paddingVertical:1,radius:6}},na={alignment:p.CENTER,axis:p.HORIZONTAL,distribution:p.CENTER,marginRight:.5,padding:.5,spacing:.5},ra=function(){return t.createElement(X,{MessageReadStatus:ia,MessageDeliveredStatus:aa})},aa=function(){return t.createElement(z,Te({title:"Delivered"},ta),t.createElement(p,Te({},na),t.createElement(v,{name:"general.check"})))},ia=function(){var e,n=B().client,r=K("MessageStatus").readBy,a=q("MessageStatus"),i=ee(r,a.t,n,te),o=1===(null==r?void 0:r.length)&&r[0].id===(null==(e=n.user)?void 0:e.id),l=(null!=r&&r.length&&!o?r.filter(function(e){var t;return e.id!==(null==(t=n.user)?void 0:t.id)}):[]).length;return t.createElement(z,Te({title:i},ta),t.createElement(p,Te({},na),t.createElement(g,{size:5,color:"foregroundSecondary",shrink:0,userSelect:"none"},l),t.createElement(v,{name:"general.checkDouble",size:"lg"})))},oa=[{Component:function(){return t.createElement(t.Fragment,null,"❤️")},name:"Love",type:"heart"},{Component:function(){return t.createElement(t.Fragment,null,"🙏")},name:"Pray",type:"pray"},{Component:function(){return t.createElement(t.Fragment,null,"😂")},name:"Laughing",type:"laughing"},{Component:function(){return t.createElement(t.Fragment,null,"👍")},name:"Thumbs up",type:"+1"},{Component:function(){return t.createElement(t.Fragment,null,"👎")},name:"Thumbs down",type:"-1"}];pe({data:fe});var la=ge,sa=["children"],ca=function(){var e,n,a=ne(),i=a.handleSubmit,o=a.isUploadEnabled,l=a.maxFilesLeft,s=a.numberOfUploads,c=a.text,u=a.uploadNewFiles,d=B().channel,m=r(!1),h=m[0],g=m[1],v=(null==d?void 0:d.data)||{},y=v.frozen,E=(null==(e=v.own_capabilities)?void 0:e.includes("send-message"))||!1,w=(null==(n=v.own_capabilities)?void 0:n.includes("send-reaction"))||!1,b=re().multipleUploads,_=ye({disabled:!o||0===l,multiple:b,noClick:!0,onDrop:u}),x=_.getRootProps,S=_.isDragActive,M=_.isDragReject,A=pa(),T=A.isChildOfModal,N=A.ref,P=ga(),D=!s&&!c.length,O=y&&E?{}:{borderColor:"separatorTertiary",borderTopWidth:T?0:1};return y&&!E?t.createElement(fa,Te({},O),t.createElement(ha,{canReact:w})):t.createElement(t.Fragment,null,y&&E&&t.createElement(ma,{isChildOfModal:T}),t.createElement(fa,Te({},O),t.createElement(C,{alignment:"end",columns:"auto 1fr auto",innerRef:N,spacing:1},t.createElement(ua,{isUploadEnabled:o,maxFilesLeft:l,multipleUploads:b,uploadNewFiles:u}),t.createElement(p,Te({},x({borderColor:"separatorTertiary",borderWidth:1,className:T?"is-modal-child":"",outline:h?Ft.interaction66:"none",outlineOffset:1,outlineStyle:h?"solid":"none",position:"relative",radius:8,refKey:"innerRef"})),S&&t.createElement(da,{isDragReject:M}),o&&!!s&&t.createElement(ae,null),t.createElement(p,{alignment:"end",axis:"horizontal",position:"relative",spacing:.5},t.createElement(k,{grow:1,innerRef:P},t.createElement(ie,{placeholder:"Send a message",onFocus:function(){return g(!0)},onBlur:function(e){return"blur"===e.type&&g(!1)}})),t.createElement(k,{marginBottom:1.25,marginRight:1},t.createElement(we,{pickerProps:{previewPosition:"none",theme:"light"}})))),t.createElement(f,Te({className:"focus-visible",disabled:D,icon:{color:"surface",name:"general.upArrow"},marginBottom:"10px",onClick:i,radius:"circle",size:"sm",title:T?"Save":"Send",tabIndex:0},sr({disabled:D}))))))},ua=function(e){var n=e.isUploadEnabled,r=e.maxFilesLeft,a=e.multipleUploads,i=e.uploadNewFiles,o=t.useMemo(function(){return ve()},[]),l=document.getElementById(o);return t.createElement(k,{marginBottom:1.5},t.createElement("label",{htmlFor:o,tabIndex:0,onKeyDown:function(e){!l||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),l.click())},className:"str-chat__file-label"},t.createElement(v,{color:Ft.lightNeutral45,css:{"&:active":{fill:Ft.lightNeutral12},"&:hover":{fill:Ft.lightNeutral24}},cursor:"pointer",name:"general.paperclip",size:"20px"})),t.createElement(Ee,{"aria-label":"File upload",className:"str-chat__file-input",disabled:!n||0===r,id:o,multiple:a,onFileChange:i}))},da=function(e){var n=e.isDragReject;return t.createElement(p,{alignment:"center",backgroundColor:"surfaceTertiary",borderColor:n?"error-dark":"success-darker",borderRadius:8,borderStyle:"dashed",borderWidth:1,bottom:0,distribution:"center",left:0,position:"absolute",right:0,top:0,zIndex:10},t.createElement(g,{color:n?"error-dark":"success-darker",size:4,weight:600},n?"Some of the files will not be accepted":"Drop your files here"))},ma=function(e){return t.createElement(k,{backgroundColor:"backgroundTertiary",padding:.5,borderColor:"separatorTertiary",borderTopWidth:e.isChildOfModal?0:1},t.createElement(g,{size:5,textAlign:"center",color:"foreground"},"Replies are frozen for everyone else."))},ha=function(e){return t.createElement(g,{size:4,textAlign:"center",color:"foreground",paddingHorizontal:2},e.canReact?"Replies have been disabled by a leader, but you can still add reactions.":"Replies and reactions have been disabled by a leader.")},fa=function(e){var n=e.children,r=Oe(e,sa);return t.createElement(p,Te({padding:2,spacing:1},r),n)},pa=function(){var e=r(!1),t=e[0],a=e[1],i=o(null);return n(function(){var e=document.querySelector(".str-chat__modal");a(null==e?void 0:e.contains(i.current))},[]),{isChildOfModal:t,ref:i}},ga=function(){var e=t.useRef(null);return n(function(){if(e.current){var t,n,r,a=null==(t=e.current)?void 0:t.querySelector("textarea");null==a||a.focus(),null==a||a.setSelectionRange(null==a||null==(n=a.value)?void 0:n.length,null==a||null==(r=a.value)?void 0:r.length)}},[]),e},va=function(){var e,a,i=B(),o=i.client,l=i.channel,s=dr(),c=s.closeDrawer,u=s.navigation,d=(null==l||null==(e=l.data)?void 0:e.name)||"Channel name",m=r(0)[1],h=r(!1),f=h[0],g=h[1],v=r(!1),y=v[0],E=v[1];n(function(){if(!l)return lr;var e=function(e){l&&l.cid===e.cid&&m(function(e){return e+1})};return o.on("channel.updated",e),function(){return o.off("channel.updated",e)}},[null==l?void 0:l.cid]);var w=!(null==l||null==(a=l.data)||!a.last_message_at),b={channel:l,closeDrawer:c,navigation:u,title:d};return t.createElement(p,{grow:1,shrink:1},t.createElement(oe,{Input:ca,EditMessageInput:ca,emojiSearchIndex:la,EmptyStateIndicator:Xr,reactionOptions:oa,doMarkReadRequest:function(e){return u.isChannelViewActive&&he(e.markRead(),"mark read")},MessageStatus:ra},t.createElement(le,null,w?t.createElement(ya,Te({},b,{overflowBottom:y,overflowTop:f,setOverflowBottom:E,setOverflowTop:g})):t.createElement(Ea,Te({},b)),t.createElement(k,{position:"relative"},y&&t.createElement(k,Te({},Rn.bottom,{bottom:"unset",height:1,left:-1,pointerEvents:"none",position:"absolute",right:-1,role:"presentation",top:-1,zIndex:10})),t.createElement(se,{disableMentions:!0,grow:!0})))))},ya=function(e){var n=e.overflowTop,r=e.navigation;return t.createElement(ce,{head:t.createElement(s,{key:"custom-head"},t.createElement(Kr,{channel:e.channel,closeDrawer:e.closeDrawer,setOverflowBottom:e.setOverflowBottom,setOverflowTop:e.setOverflowTop,switchToChannelDetailsView:r.switchToChannelDetailsView,switchToChannelListView:r.switchToChannelListView,title:e.title}),n&&t.createElement(k,Te({},Rn.top,{height:1,left:-1,pointerEvents:"none",position:"absolute",right:-1,role:"presentation",top:"unset",zIndex:10}))),messageActions:["edit","delete","react"]})},Ea=function(e){var n=e.navigation;return t.createElement(t.Fragment,null,t.createElement(ea,{channel:e.channel,closeDrawer:e.closeDrawer,switchToChannelDetailsView:n.switchToChannelDetailsView,switchToChannelListView:n.switchToChannelListView,title:e.title}),t.createElement(ce,{messageActions:["edit","delete","react"]}))};function wa(){var e=document.head.querySelectorAll('meta[property^="pco:"]'),t={};return e.forEach(function(e){var n,r=e.getAttribute("property");t[r.substring("pco:".length)]="boolean"===(n=e).getAttribute("datatype")?"true"===n.content||"1"===n.content:n.content}),t}var ba=Be(wa()),ka=new MutationObserver(function(){var e=ba.getState(),t=wa();We(e,t)||ba.setState(t)}),_a=!1;function Ca(){return _a||(_a=!0,ka.observe(document.head,{attributes:!0,childList:!0,subtree:!0})),d(ba.subscribe,function(){return ba.getState()})}var xa=function(e){var a=function(e){var t=Ca(),a=u(t["rails-env"])("api")+"/groups/v2/me/groups",o=new URLSearchParams({"fields[Group]":"name,header_image,memberships_count,can_create_conversation",per_page:"100"}),l=r(a+"?"+o),s=l[0],c=l[1],d=r([]),m=d[0],h=d[1],f=r(!1),p=f[0],g=f[1],v=r(!1),y=v[0],E=v[1],w=Boolean(s),b=i(function(){w&&(g(!0),Re(He,s).then(function(e){var t=e.json,n=t.data.map(function(e){return{id:e.id,name:e.attributes.name,headerImage:e.attributes.header_image,membershipsCount:e.attributes.memberships_count,canCreateConversation:e.attributes.can_create_conversation}});h(function(e){return[].concat(e,n)}),c(t.links.next||null)}).catch(function(){return E(!0)}).finally(function(){return g(!1)}))},[s]);return n(function(){e&&b()},[e]),{groups:m,hasMore:w,isError:y,isLoading:p,loadMore:b}}(e.isActive),o=a.isLoading,l=a.isError,s=a.groups,c=dr(),d=c.navigation,m=c.setFilterValues,h=r(!1),v=h[0],y=h[1],E=s.filter(function(e){return e.canCreateConversation}),w=E.slice(0,v?void 0:5),b=s.length!==E.length&&(v||E.length<=5);return t.createElement(p,null,t.createElement(p,{axis:"horizontal",padding:2,paddingBottom:1,alignment:"center",spacing:1},t.createElement(br,null,"My groups"),o&&t.createElement(M,{size:"xs"})),0!==s.length||l?t.createElement(p,{spacing:1.5},t.createElement(p,null,w.map(function(e){var n=e.id,r=e.name,a=e.membershipsCount;return t.createElement(f,{alignment:"start","aria-label":"Select "+r,axis:"vertical",borderBottomColor:"separatorTertiary",borderBottomStyle:"solid",borderBottomWidth:1,hover:{backgroundColor:"surfaceSecondary"},key:n,paddingHorizontal:2,paddingVertical:1,spacing:.25,textAlign:"left",theme:!1,onClick:function(){m({appName:"Groups",values:{group:{id:n,name:r}}}),d.switchToNewGroupsChatView()}},t.createElement(p,{axis:"horizontal",spacing:1},t.createElement("img",{alt:"",src:e.headerImage.thumbnail,style:{borderRadius:"4px",height:40,width:75,objectFit:"cover"}}),t.createElement(p,{distribution:"start",maxWidth:"250px"},t.createElement(g,{lineHeight:"1.3",weight:500,truncate:!0},r),t.createElement(g,{lineHeight:"1.3",weight:300},a," ",1===a?"member":"members"))))})),b&&t.createElement(Aa,null),E.length>5&&t.createElement(Ta,{showAll:v,onClick:function(){return y(!v)}}),l&&t.createElement(Sa,null)):t.createElement(Ma,null))},Sa=function(){return t.createElement(k,{backgroundColor:"error-lighter",marginHorizontal:2,padding:2,radius:3},t.createElement(p,{axis:"horizontal",spacing:1},t.createElement(v,{name:"general.exclamationTriangle",color:"error",marginTop:.5}),t.createElement(g,{size:4},"There was an issue loading your groups, please refresh and try again.")))},Ma=function(){return t.createElement(p,{axis:"vertical",alignment:"center",distribution:"center",height:20,padding:2},t.createElement(g,{align:"center",color:"foregroundSecondary"},"Join a group with chat enabled and permissions to start a new conversation."))},Aa=function(){return t.createElement(p,{alignment:"center",distribution:"center",paddingHorizontal:2},t.createElement(g,{lineHeight:"1.3",size:5},"*You have additional groups without chat enabled or permissions to start a new conversation."))},Ta=function(e){var n=e.showAll;return t.createElement(f,{variant:"outline",size:"sm",onClick:e.onClick,marginLeft:"auto",marginRight:"auto",marginBottom:2},t.createElement(v,{name:n?"general.upCaret":"general.downCaret",size:"lg",paddingRight:1}),t.createElement(g,null,"View ",n?"fewer":"more"," groups"))};function Na(e){var a,i=function(e){var t=Ca(),a=u(t["rails-env"])("api")+"/groups/v2/me/groups/"+e+"/memberships",i=new URLSearchParams({"fields[Membership]":"person,role","fields[Person]":"avatar_url,child,first_name,last_name",include:"person",per_page:"50"}),o=r(!1),l=o[0],s=o[1],c=r(!1),d=c[0],m=c[1],h=r([]),f=h[0],p=h[1],g=r(null),v=g[0],y=g[1],E=null===v?null:v>f.length;return n(function(){s(!0),Re(He,a+"?"+i).then(function(e){var n=e.json,r=n.data.map(function(e){var r=n.included.find(function(t){return"Person"===t.type&&t.id===e.relationships.person.data.id}),a=[];return"leader"===e.attributes.role&&a.push({title:"Leader"}),r.id===t["current-person-id"]&&a.push({title:"Conversation owner"}),{avatar:r.attributes.avatar_url,badges:a,child:r.attributes.child,id:r.id,name:r.attributes.first_name+" "+r.attributes.last_name,source:[]}});p(function(e){return[].concat(e,r)}),y(n.meta.total_count)}).catch(function(){return m(!0)}).finally(function(){return s(!1)})},[]),{hasMore:E,isError:d,isLoading:l,people:f,totalCount:v}}(e.groupId),o=i.isLoading,l=i.isError,s=i.people,c=i.hasMore,d=i.totalCount,m=s.length>0,h=s.filter(function(e){return e.child}),f=h.length>0;switch(d){case null:case 0:a="Members";break;case 1:a="1 member";break;default:a=d+" members"}return t.createElement(t.Fragment,null,t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1},t.createElement(br,null,a),o&&t.createElement(M,{size:"sm"})),l&&t.createElement(Pa,null),m&&t.createElement(t.Fragment,null,f&&t.createElement(Sr,{childPeople:h}),t.createElement(Yn,null,t.createElement(p,{paddingBottom:2,spacing:1.5},s.map(function(e){return t.createElement(Mr,{key:e.id,person:e})}),c&&t.createElement(g,{color:"foregroundSecondary"},"and ",d-s.length," more...")))))}var Pa=function(){return t.createElement(k,{backgroundColor:"error-lighter",marginBottom:2,padding:2,radius:3},t.createElement(p,{axis:"horizontal",spacing:1},t.createElement(v,{name:"general.exclamationTriangle",color:"error",marginTop:.5}),t.createElement(g,{size:4},"There was an issue loading group members, please refresh and try again.")))},Da=function(e){var i=e.isActive,o=e.setFilterValues,l=e.switchToNewServicesChatView,s=r(!1),c=s[0],u=s[1],d=function(e){var t=r([]),i=t[0],o=t[1],l=r(!1),s=l[0],c=l[1],u=mr();return n(function(){e&&(c(!0),u.services.get("chat",{fields:{Chat:"teams_i_lead"}}).then(function(e){var t=e.teams_i_lead.map(function(e){var t=e.value;return{service_type:{id:t.service_type_id,name:e.service_type_name},team:{id:t.team_id,name:e.team_name}}});o(t)}).finally(function(){return c(!1)}))},[e]),{loading:s,serviceTypeTeams:a(function(){return i.reduce(function(e,t){var n=t.service_type,r=t.team,a=e.find(function(e){return e.id===n.id});return a||e.push(a={id:n.id,name:n.name,teams:[]}),a.teams.push(r),e},[])},[i])}}(i),m=d.loading,h=d.serviceTypeTeams;n(function(){i||u(!1)},[]);var v=h.length>4;return t.createElement(p,null,t.createElement(p,{alignment:"center",axis:"horizontal",distribution:"space-between",paddingBottom:1,paddingHorizontal:2,spacing:1},t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1},t.createElement(br,null,"Teams I lead"),m&&t.createElement(M,{size:"xs"})),t.createElement(f,{icon:"general.search",marginLeft:"auto",onClick:l,size:"sm",title:"Search all teams",tooltip:"Search all teams",variant:"outline"})),0===h.length?t.createElement(Oa,{onClick:l}):t.createElement(p,{spacing:1.5,paddingBottom:1},t.createElement(p,null,h.slice(0,c?void 0:4).map(function(e){var n=e.id,r=e.name,a=e.teams;return t.createElement(f,{alignment:"start","aria-label":"Select "+r+" teams I lead",axis:"vertical",borderBottomColor:"separatorTertiary",borderBottomStyle:"solid",borderBottomWidth:1,hover:{backgroundColor:"surfaceSecondary"},key:n,paddingHorizontal:2,paddingVertical:1,spacing:.25,textAlign:"left",theme:!1,onClick:function(){o({appName:"Services",values:{plan_id:null,teams:a.map(function(e){return{service_type_id:n,team_id:e.id}})}}),l()}},t.createElement(g,{weight:500},r),t.createElement(g,{color:"foregroundSecondary"},a.map(function(e){return e.name}).join(", ")))})),v&&t.createElement(p,{alignment:"center"},t.createElement(f,{fontWeight:400,iconLeft:{name:c?"general.upCaret":"general.downCaret"},onClick:function(){return u(!c)},size:"xs",title:c?"Less teams":"Show all teams I lead",variant:"outline"}))))},Oa=function(e){var n=e.onClick;return t.createElement(p,{alignment:"center",axis:"vertical",distribution:"center",height:20,padding:2,spacing:1},t.createElement(g,{color:"foregroundSecondary"},"You don't lead any teams."),t.createElement(f,{fontWeight:400,onClick:n,size:"sm",variant:"outline"},"Browse teams"))},Va=function(){var e=dr(),n=e.navigation,r=e.setFilterValues;return t.createElement(t.Fragment,null,t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1,padding:2,paddingTop:1},t.createElement(f,{icon:{color:Ft.lightNeutral12,name:"general.leftChevron"},marginTop:.25,onClick:n.switchToChannelListView,size:"md",title:"Back to to conversation list",tooltip:"Back to conversations list",variant:"naked"}),t.createElement(Vn,null,"New conversation")),t.createElement(Yn,null,t.createElement(Da,{isActive:n.isNewChatShortcutsViewActive,setFilterValues:r,switchToNewServicesChatView:n.switchToNewServicesChatView}),t.createElement(xa,{isActive:n.isNewChatShortcutsViewActive})))},za=function(e){var n=e.text,r=e.buttonDisabled,a=e.showSpinner,i=e.onButtonClick;return t.createElement(t.Fragment,null,t.createElement(h,null),t.createElement(p,{grow:0,marginHorizontal:"auto",padding:2,spacing:2},t.createElement(g,{align:"center",size:5,color:"foregroundSecondary"},n),t.createElement(f,Te({"aria-label":"Start conversation",disabled:r,onClick:i},sr({disabled:r,spinner:a})),"Start conversation")))},Ha=function(){var e=dr();return t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1,padding:2,paddingTop:1},t.createElement(f,{icon:{color:Ft.lightNeutral12,name:"general.leftChevron"},marginTop:.25,onClick:e.navigation.switchToNewChatShortcutsView,size:"md",title:"Back to to new conversation shortcuts",tooltip:"Back to to new conversation shortcuts",variant:"naked"}),t.createElement(Vn,null,"New conversation"))},La=function(){var e,n=r(""),a=n[0],i=n[1],o=r(!1),l=o[0],s=o[1],c=r(!1),u=c[0],d=c[1],m=mr(),f=dr(),v=f.filterValues,y=f.navigation,E=null==v||null==(e=v.Groups)?void 0:e.group;return E?t.createElement(t.Fragment,null,t.createElement(Ha,null),t.createElement(p,{grow:1},t.createElement(p,{spacing:2,padding:2,paddingTop:0},t.createElement(p,{axis:"horizontal",alignment:"center",spacing:1},t.createElement(g,{weight:600},"To:"),t.createElement(At,{appName:"Groups"}),t.createElement(g,{wrap:!1,truncate:!0},E.name)),t.createElement(p,{spacing:1},t.createElement(P.InputLabel,{controls:"title"},"Title"),t.createElement(P,{id:"title",placeholder:"Topic of conversation... (required)",required:!0,onChange:function(e){return i(e.target.value)}}))),t.createElement(h,null),t.createElement(p,{grow:1,padding:2,paddingBottom:0,spacing:1},t.createElement(Na,{groupId:E.id}))),u&&t.createElement(Ra,null),t.createElement(za,{text:"Conversation will be automatically updated if any people are added or removed from the group.",showSpinner:l,buttonDisabled:0===a.trim().length,onButtonClick:function(){return(s(!0),m.groups.post("me/groups/"+E.id+"/chat_conversation_payload",{title:a}).then(function(e){return m.chat.post("me/conversations",{payload:e.value})}).catch(function(){return d(!0)}).finally(function(){return s(!1)})).then(function(e){return y.switchToChannelView(e.stream_channel_id)}).then(function(){return i("")})}})):null},Ra=function(){return t.createElement(k,{backgroundColor:"error-lighter",marginHorizontal:2,marginBottom:2,padding:2,radius:3},t.createElement(p,{axis:"horizontal",spacing:1},t.createElement(v,{name:"general.exclamationTriangle",color:"error",marginTop:.5}),t.createElement(g,{size:4},"There was an issue starting the conversation, please try again.")))},Ya="Conversation will be automatically updated if any people are added or removed from a team.",Za=function(e){var l,s=function(e){var t=r([]),l=t[0],s=t[1],c=r(!1),u=c[0],d=c[1],m=r(!1),h=m[0],f=m[1],p=o({}),g=dr().navigation,v=mr(),y=a(function(){var t={team_id:e.teams.map(function(e){return e.team_id}).sort()};return e.plan_id&&(t.plan_id=e.plan_id),t},[e]);n(function(){!function(e){try{var t=function(e){p.current[n]=e,s(e)},n=JSON.stringify(e),r=p.current[n];return Promise.resolve(r?t(r):Promise.resolve(function(e){try{return f(!0),Promise.resolve(v.services.get("chat",Te({fields:{Chat:"people"}},e))).then(function(e){return f(!1),e})}catch(e){return Promise.reject(e)}}(e).then(function(e){return e.people})).then(t))}catch(e){return Promise.reject(e)}}(y)},[y]);var E=i(function(){try{return Promise.resolve(v.services.get("chat",Te({fields:{Chat:"group_identifiers"}},y))).then(function(e){return v.chat.get("me/conversations",{fields:{Conversation:"stream_channel"},filter:"with_exact_groups",gids:e.group_identifiers})})}catch(e){return Promise.reject(e)}},[y]),w=i(function(){try{return Promise.resolve(v.services.get("chat",Te({fields:{Chat:"payload"}},y))).then(function(e){return v.chat.post("me/conversations",{payload:e.payload})})}catch(e){return Promise.reject(e)}},[y]);return{findOrCreateConversation:function(){try{return d(!0),Promise.resolve(E()).then(function(e){function t(){g.switchToChannelView(e.map(function(e){return e.stream_channel_id}).join(","))}var n=function(){if(0===e.length)return Promise.resolve(w()).then(function(t){e=[t]})}();return n&&n.then?n.then(t):t()})}catch(e){return Promise.reject(e)}},isFetching:h,isThinking:u,people:l}}(e.filter),c=s.people,u=s.findOrCreateConversation,d=s.isThinking,m=s.isFetching,h=c.length>0,f=c.length,v=c.filter(function(e){return e.child}),y=v.length>0;switch(f){case 0:l="People selected";break;case 1:l="1 person selected";break;default:l=f+" people selected"}return t.createElement(p,{grow:1},t.createElement(p,{grow:1,padding:2,paddingBottom:0,spacing:1},t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1},t.createElement(br,null,l),m&&t.createElement(M,{size:"sm"})),h?t.createElement(t.Fragment,null,y&&t.createElement(Sr,{childPeople:v}),t.createElement(Yn,null,t.createElement(p,{paddingBottom:2,spacing:1.5},c.map(function(e){return t.createElement(Mr,{key:e.id,person:e})})))):t.createElement(p,{alignment:"center",grow:1,maxHeight:18},t.createElement(g,{color:"foregroundSecondary"},"No Results"))),t.createElement(za,{text:Ya,showSpinner:d,buttonDisabled:!h,onButtonClick:u}))},Ia=function(e){return{label:e.name,value:e.value}},Ua=function(e){var i=e.onChange,o=e.isActive,l=e.values,s=r({}),c=s[0],u=s[1],d=r(!1),m=d[0],h=d[1],f=r(0),y=f[0],E=f[1],w=mr(),b=o&&m,k=!o&&l.teams.length>0;n(function(){o||h(!1)},[o]),n(function(){l.plan_id&&h(!0)},[l.plan_id]),n(function(){b&&l.teams.forEach(function(e){var t=e.team_id;c[t]||(E(function(e){return e+1}),w.services.get("chat",{fields:{Chat:"plans"},team_id:t,plan_id:l.plan_id}).then(function(e){var n=e.plans;u(function(e){var r;return Te({},e,((r={})[t]=n,r))}),E(function(e){return e-1})}))})},[l.teams,b]);var _=a(function(){var e=l.teams.reduce(function(e,t){var n=t.team_id;return c[n]?Te({},e,c[n].reduce(function(e,t){var n;return Te({},e,((n={})[t.value]=t,n))},{})):e},{});return Object.values(e).map(Ia)},[l.teams,c]);return t.createElement(p,{spacing:1},t.createElement(p,{axis:"horizontal",alignItems:"center",spacing:1},t.createElement(p,{alignItems:"center",axis:"horizontal",marginRight:"auto",spacing:1},t.createElement(br,null,"Filter by plan"),y>0&&t.createElement(M,{size:"xs"})),t.createElement(N,{ariaLabel:"Filter by plan",disabled:!o,isChecked:m,onClick:function(){h(function(e){return!e}),i({appName:"Services",values:function(e){return Te({},e,{plan_id:null})}})}})),m?t.createElement(D,{id:"filter-by-plan-select",value:l.plan_id,defaultValue:null,emptyValue:_.length?"Choose a plan":"No plans available",disabled:_.length<1,options:_,onChange:function(e){var t=e.value;return i({appName:"Services",values:function(e){return Te({},e,{plan_id:t})}})}}):k?t.createElement(p,{axis:"horizontal",alignItems:"center",spacing:2,padding:2},t.createElement(v,{color:"foregroundSecondary",name:"general.exclamationTriangle",size:"lg"}),t.createElement(g,{size:5,color:"foregroundSecondary"},"Plan filtering is not possible using teams from multiple service types. Try choosing teams above with only one service type.")):null)};function Wa(){return Wa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wa.apply(this,arguments)}var Fa={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Ấ":"A","Ắ":"A","Ẳ":"A","Ẵ":"A","Ặ":"A","Æ":"AE","Ầ":"A","Ằ":"A","Ȃ":"A","Ç":"C","Ḉ":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ế":"E","Ḗ":"E","Ề":"E","Ḕ":"E","Ḝ":"E","Ȇ":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ḯ":"I","Ȋ":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ố":"O","Ṍ":"O","Ṓ":"O","Ȏ":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","ấ":"a","ắ":"a","ẳ":"a","ẵ":"a","ặ":"a","æ":"ae","ầ":"a","ằ":"a","ȃ":"a","ç":"c","ḉ":"c","è":"e","é":"e","ê":"e","ë":"e","ế":"e","ḗ":"e","ề":"e","ḕ":"e","ḝ":"e","ȇ":"e","ì":"i","í":"i","î":"i","ï":"i","ḯ":"i","ȋ":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ố":"o","ṍ":"o","ṓ":"o","ȏ":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Ĉ":"C","ĉ":"c","Ċ":"C","ċ":"c","Č":"C","č":"c","C̆":"C","c̆":"c","Ď":"D","ď":"d","Đ":"D","đ":"d","Ē":"E","ē":"e","Ĕ":"E","ĕ":"e","Ė":"E","ė":"e","Ę":"E","ę":"e","Ě":"E","ě":"e","Ĝ":"G","Ǵ":"G","ĝ":"g","ǵ":"g","Ğ":"G","ğ":"g","Ġ":"G","ġ":"g","Ģ":"G","ģ":"g","Ĥ":"H","ĥ":"h","Ħ":"H","ħ":"h","Ḫ":"H","ḫ":"h","Ĩ":"I","ĩ":"i","Ī":"I","ī":"i","Ĭ":"I","ĭ":"i","Į":"I","į":"i","İ":"I","ı":"i","IJ":"IJ","ij":"ij","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","Ḱ":"K","ḱ":"k","K̆":"K","k̆":"k","Ĺ":"L","ĺ":"l","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ŀ":"L","ŀ":"l","Ł":"l","ł":"l","Ḿ":"M","ḿ":"m","M̆":"M","m̆":"m","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","ʼn":"n","N̆":"N","n̆":"n","Ō":"O","ō":"o","Ŏ":"O","ŏ":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","P̆":"P","p̆":"p","Ŕ":"R","ŕ":"r","Ŗ":"R","ŗ":"r","Ř":"R","ř":"r","R̆":"R","r̆":"r","Ȓ":"R","ȓ":"r","Ś":"S","ś":"s","Ŝ":"S","ŝ":"s","Ş":"S","Ș":"S","ș":"s","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","ț":"t","Ț":"T","Ť":"T","ť":"t","Ŧ":"T","ŧ":"t","T̆":"T","t̆":"t","Ũ":"U","ũ":"u","Ū":"U","ū":"u","Ŭ":"U","ŭ":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ȗ":"U","ȗ":"u","V̆":"V","v̆":"v","Ŵ":"W","ŵ":"w","Ẃ":"W","ẃ":"w","X̆":"X","x̆":"x","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Y̆":"Y","y̆":"y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ſ":"s","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Ǎ":"A","ǎ":"a","Ǐ":"I","ǐ":"i","Ǒ":"O","ǒ":"o","Ǔ":"U","ǔ":"u","Ǖ":"U","ǖ":"u","Ǘ":"U","ǘ":"u","Ǚ":"U","ǚ":"u","Ǜ":"U","ǜ":"u","Ứ":"U","ứ":"u","Ṹ":"U","ṹ":"u","Ǻ":"A","ǻ":"a","Ǽ":"AE","ǽ":"ae","Ǿ":"O","ǿ":"o","Þ":"TH","þ":"th","Ṕ":"P","ṕ":"p","Ṥ":"S","ṥ":"s","X́":"X","x́":"x","Ѓ":"Г","ѓ":"г","Ќ":"К","ќ":"к","A̋":"A","a̋":"a","E̋":"E","e̋":"e","I̋":"I","i̋":"i","Ǹ":"N","ǹ":"n","Ồ":"O","ồ":"o","Ṑ":"O","ṑ":"o","Ừ":"U","ừ":"u","Ẁ":"W","ẁ":"w","Ỳ":"Y","ỳ":"y","Ȁ":"A","ȁ":"a","Ȅ":"E","ȅ":"e","Ȉ":"I","ȉ":"i","Ȍ":"O","ȍ":"o","Ȑ":"R","ȑ":"r","Ȕ":"U","ȕ":"u","B̌":"B","b̌":"b","Č̣":"C","č̣":"c","Ê̌":"E","ê̌":"e","F̌":"F","f̌":"f","Ǧ":"G","ǧ":"g","Ȟ":"H","ȟ":"h","J̌":"J","ǰ":"j","Ǩ":"K","ǩ":"k","M̌":"M","m̌":"m","P̌":"P","p̌":"p","Q̌":"Q","q̌":"q","Ř̩":"R","ř̩":"r","Ṧ":"S","ṧ":"s","V̌":"V","v̌":"v","W̌":"W","w̌":"w","X̌":"X","x̌":"x","Y̌":"Y","y̌":"y","A̧":"A","a̧":"a","B̧":"B","b̧":"b","Ḑ":"D","ḑ":"d","Ȩ":"E","ȩ":"e","Ɛ̧":"E","ɛ̧":"e","Ḩ":"H","ḩ":"h","I̧":"I","i̧":"i","Ɨ̧":"I","ɨ̧":"i","M̧":"M","m̧":"m","O̧":"O","o̧":"o","Q̧":"Q","q̧":"q","U̧":"U","u̧":"u","X̧":"X","x̧":"x","Z̧":"Z","z̧":"z"},ja=Object.keys(Fa).join("|"),Ba=new RegExp(ja,"g"),Ga=new RegExp(ja,""),qa=function(e){return e.replace(Ba,function(e){return Fa[e]})},Ja=qa,$a=qa;Ja.has=function(e){return!!e.match(Ga)},Ja.remove=$a;var Qa={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};Ka.rankings=Qa;var Xa=function(e,t){return String(e.rankedValue).localeCompare(String(t.rankedValue))};function Ka(e,t,n){void 0===n&&(n={});var r=n.keys,a=n.threshold,i=void 0===a?Qa.MATCHES:a,o=n.baseSort,l=void 0===o?Xa:o,s=n.sorter,c=void 0===s?function(e){return e.sort(function(e,t){return function(e,t,n){var r=e.rank,a=e.keyIndex,i=t.rank,o=t.keyIndex;return r===i?a===o?n(e,t):a<o?-1:1:r>i?-1:1}(e,t,l)})}:s,u=e.reduce(function(e,a,o){var l=function(e,t,n,r){if(!t)return{rankedValue:e,rank:ei(e,n,r),keyIndex:-1,keyThreshold:r.threshold};var a=function(e,t){for(var n=[],r=0,a=t.length;r<a;r++)for(var i=t[r],o=ai(i),l=ni(e,i),s=0,c=l.length;s<c;s++)n.push({itemValue:l[s],attributes:o});return n}(e,t);return a.reduce(function(e,t,a){var i=e.rank,o=e.rankedValue,l=e.keyIndex,s=e.keyThreshold,c=t.itemValue,u=t.attributes,d=ei(c,n,r),m=o,h=u.minRanking,f=u.maxRanking;return d<h&&d>=Qa.MATCHES?d=h:d>f&&(d=f),d>i&&(i=d,l=a,s=u.threshold,m=c),{rankedValue:m,rank:i,keyIndex:l,keyThreshold:s}},{rankedValue:e,rank:Qa.NO_MATCH,keyIndex:-1,keyThreshold:r.threshold})}(a,r,t,n),s=l.keyThreshold;return l.rank>=(void 0===s?i:s)&&e.push(Wa({},l,{item:a,index:o})),e},[]);return c(u).map(function(e){return e.item})}function ei(e,t,n){return e=ti(e,n),(t=ti(t,n)).length>e.length?Qa.NO_MATCH:e===t?Qa.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase())===(t=t.toLowerCase())?Qa.EQUAL:e.startsWith(t)?Qa.STARTS_WITH:e.includes(" "+t)?Qa.WORD_STARTS_WITH:e.includes(t)?Qa.CONTAINS:1===t.length?Qa.NO_MATCH:(r=e,a="",r.split(" ").forEach(function(e){e.split("-").forEach(function(e){a+=e.substr(0,1)})}),a).includes(t)?Qa.ACRONYM:function(e,t){var n=0,r=0;function a(e,t,r){for(var a=r,i=t.length;a<i;a++)if(t[a]===e)return n+=1,a+1;return-1}var i=a(t[0],e,0);if(i<0)return Qa.NO_MATCH;r=i;for(var o=1,l=t.length;o<l;o++)if(!((r=a(t[o],e,r))>-1))return Qa.NO_MATCH;return Qa.MATCHES+n/t.length*(1/(r-i))}(e,t);var r,a}function ti(e,t){return e=""+e,t.keepDiacritics||(e=Ja(e)),e}function ni(e,t){var n;if("object"==typeof t&&(t=t.key),"function"==typeof t)n=t(e);else if(null==e)n=null;else if(Object.hasOwnProperty.call(e,t))n=e[t];else{if(t.includes("."))return function(e,t){for(var n=e.split("."),r=[t],a=0,i=n.length;a<i;a++){for(var o=n[a],l=[],s=0,c=r.length;s<c;s++){var u=r[s];if(null!=u)if(Object.hasOwnProperty.call(u,o)){var d=u[o];null!=d&&l.push(d)}else"*"===o&&(l=l.concat(u))}r=l}if(Array.isArray(r[0])){var m=[];return m.concat.apply(m,r)}return r}(t,e);n=null}return null==n?[]:Array.isArray(n)?n:[String(n)]}var ri={maxRanking:Infinity,minRanking:-Infinity};function ai(e){return"string"==typeof e?ri:Wa({},ri,e)}var ii=function(e,t){var n=e.order,r=n[2],a=t.order,i=a[2];return n[0]-a[0]||n[1].localeCompare(a[1])||r.localeCompare(i)},oi=function(e){var a=e.values,i=e.onChange,l=e.isActive,s=r(""),c=s[0],u=s[1],d=function(e,t){var a=r([]),i=a[0],o=a[1],l=r(!1),s=l[0],c=l[1],u=mr();n(function(){t&&(c(!0),u.services.get("chat",{fields:{Chat:"teams"}}).then(function(e){return o(e.teams)}).finally(function(){return c(!1)}))},[t]);var d=i.reduce(function(t,n){return t[e.teams.some(function(e){return e.team_id===n.value.team_id})?0:1].push(n),t},[[],[]]);return[d[0],d[1],s]}(a,l),m=d[0],h=d[1],y=d[2],E=o(),w=0,b={teams_i_lead:!0},k=function(e,t){return Ka(e,t,{keys:["name"],threshold:Ka.rankings.CONTAINS}).sort(ii).reduce(function(e,t){var n;return e[n=t.group]||(e[n]=[]),e[t.group].push(t),e},{})}(h,c);n(function(){l||u("")},[l]);var _=Object.entries(k);return t.createElement(p,{spacing:1},t.createElement(p,{axis:"horizontal",alignItems:"center",spacing:1},t.createElement(P.InputLabel,Te({controls:"teams"},wr),"Teams"),y&&t.createElement(M,{size:"xs"})),t.createElement(p,{spacing:1},m.length>0&&t.createElement(A,{spacing:1},m.map(function(e){return t.createElement(S,{key:e.value.team_id,renderRight:t.createElement(f,{title:"remove",icon:{name:"general.x",size:"xs"},theme:"naked",onClick:function(){return i({appName:"Services",values:function(t){return Te({},t,{teams:t.teams.filter(function(t){return t.team_id!==e.value.team_id})})}})}}),shrink:1,size:"sm"},t.createElement(g,{truncate:!0},e.name))})),t.createElement(L.Popover,{ref:E,id:"teams",openOnFocus:!0,closeOnSelect:!0,onClear:function(){return u("")},onChange:function(e){return u(e.target.value)},onSelect:function(e){var t=e.value;return i({appName:"Services",values:function(e){return Te({},e,{teams:[].concat(e.teams,[t])})}})},placeholder:"Search teams",renderLeft:t.createElement(v,{name:"general.search"}),value:c},_.length?_.map(function(e,n){var r=e[0],a=e[1],o=function(e){return e.split("_").map(function(e,t){return"i"===e.toLowerCase()?"I":0===t?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e.toLowerCase()}).join(" ")}(r),l=a.map(function(e){return t.createElement(L.Item,{key:w,index:w++,value:e},t.createElement(g,{truncate:!0},e.name))}),s=a.length>10;return Object.keys(k).length>1?t.createElement(p,{key:r,marginTop:n>0?1.5:0},t.createElement(p,{axis:"horizontal"},t.createElement(O.Item,null,t.createElement(g,{weight:600},o)),b[r]&&t.createElement(p,{padding:1,marginLeft:"auto"},t.createElement(f,{disabled:s,fontWeight:400,onClick:function(e){i({appName:"Services",values:function(e){return Te({},e,{teams:[].concat(e.teams,a.map(function(e){return e.value}))})}}),E.current&&E.current.handleBlur(e)},size:"xs",theme:"primary",title:"Select all",tooltip:{popoverProps:{zIndex:1e4},title:s?"Disabled when options would exceed 10":'select all in "'+o+'"'},variant:"naked"}))),l):l}):t.createElement(O.Item,null,t.createElement(g,null,"No matching teams for:"," ",t.createElement(g,{as:"span",inline:!0,italic:!0},'"'+c+'"'))))))},li=function(){return t.createElement(p,{grow:1},t.createElement(p,{alignItems:"center",axis:"horizontal",padding:2,spacing:1},t.createElement(br,null,"People selected")),t.createElement(p,{alignment:"center",grow:1,maxHeight:18,padding:2},t.createElement(g,{color:"foreground",align:"center",size:4},"Search teams above to add people to the chat.")))},si=function(e){var r=e.isActive,i=function(e){var t=dr(),r=t.setFilterValues,i=t.filterValues.Services;n(function(){r({appName:"Services",values:e?function(e){return e}:pr})},[e]);var o=a(function(){var e=i.teams,t=e[0],n=e.slice(1);return Boolean(t)&&n.every(function(e){return e.service_type_id===t.service_type_id})},[i.teams]);return n(function(){o||r({appName:"Services",values:function(e){return Te({},e,{plan_id:null})}})},[o]),{filterValues:i,isFiltering:i.teams.length>0,isPlansActive:o,setFilterValues:r}}(r),o=i.filterValues,l=i.setFilterValues,s=i.isFiltering,c=i.isPlansActive;return t.createElement(p,{grow:1},t.createElement(p,{spacing:2,padding:2,paddingTop:0},t.createElement(oi,{values:o,onChange:l,isActive:r}),t.createElement(Ua,{values:o,onChange:l,isActive:c})),t.createElement(h,null),s?t.createElement(Za,{filter:o}):t.createElement(t.Fragment,null,t.createElement(li,null),t.createElement(za,{text:Ya,buttonDisabled:!0,showSpinner:!1,onButtonClick:lr})))},ci=function(){var e=dr().navigation;return t.createElement(t.Fragment,null,t.createElement(Ha,null),t.createElement(si,{isActive:e.isNewServicesChatViewActive}))},ui=function(e){var a=e.client,o=e.closeDrawer,l=e.children,s=e.currentPath,c=e.currentPersonId,d=e.env,m=e.onChangePath,h=function(){var e=t.useState(gr),n=e[1];return{filterValues:e[0],setFilterValues:i(function(e){var t=e.appName,r=e.values;n(function(e){var n;return Te({},e,((n={})[t]="function"==typeof r?r(e[t]):r,n))})},[])}}(),f=h.filterValues,p=h.setFilterValues,g=t.useState(!1),v=g[0],y=g[1],E=function(e){var n=e.currentPath,r=e.onChangePath,a=e.setFilterValues,i=B(),o=i.client,l=i.channel,s=i.setActiveChannel,c=t.useState(function(){var e=n&&yr(n);return e?e.index:0}),u=c[0],d=c[1],m=function(){return r("")},h=function(){return r("new/services")},f=0===u,p=1===u,g=2===u,v=3===u,y=4===u,E=5===u,w=8===u,b=t.useCallback(function(e){try{return Promise.resolve(o.queryChannels({id:{$in:e},members:{$in:[o.userID]},type:"messaging"},{last_message_at:-1},{limit:1})).then(function(e){return e[0]})}catch(e){return Promise.reject(e)}},[o]),k=t.useCallback(function(e){try{var t=e.params.id.split(",");return Promise.resolve(b(t)).then(function(n){if(!n)return m();s(n),t.length>1?r(e.path({id:n.id})):d(e.index)})}catch(e){return Promise.reject(e)}},[o]);return t.useEffect(function(){var e=yr(n);switch(null==e?void 0:e.name){case"BlankState":case"Shortcuts":case"NewServices":case"NewGroups":d(e.index);break;case"List":d(e.index),l&&s(null);break;case"NewServicesPlan":case"NewServicesTeam":var t=e.params,r=t.plan_id,i=void 0===r?null:r,o=t.teams;a({appName:"Services",values:{plan_id:i&&parseInt(i),teams:o.split(",").map(function(e){return e.split(":")}).map(function(e){var t=e[0];return{team_id:parseInt(e[1]),service_type_id:parseInt(t)}})}}),h();break;case"Conversation":case"Details":l&&l.id===e.params.id?d(e.index):k(e);break;default:m()}},[n,r]),{activeIndex:u,isBlankStateActive:w,isChannelDetailsViewActive:E,isChannelListViewActive:f,isChannelViewActive:y,isNewChatShortcutsViewActive:p,isNewServicesChatViewActive:g,isNewGroupsChatViewActive:v,switchToChannelDetailsView:function(){return r("conversations/"+l.id+"/details")},switchToChannelListView:m,switchToChannelView:function(e){return r("conversations/"+e)},switchToNewChatShortcutsView:function(){return r("new/shortcuts")},switchToNewServicesChatView:h,switchToNewGroupsChatView:function(){return r("new/groups")}}}({currentPath:s,onChangePath:m,setFilterValues:p}),w=function(e){var t=e.client,a=e.currentPersonId,o=e.isChannelListViewActive,l=e.env,s=r(!1),c=s[0],d=s[1],m=r(function(){return t.user.unread_count}),h=m[0],f=m[1],p=mr(),g=function(){try{return p.chat.get("me/stream_user",{context:"default",fields:{StreamUser:"unread_count"}}).then(function(e){return f(e.unread_count)}),Promise.resolve()}catch(e){return Promise.reject(e)}},v=i(function(e){try{var t=u(l)("api")+"/notifications/v2/me/bulk_update";return Promise.resolve(Re(Le,t,{data:{data:{attributes:{partition:"chat"},relationships:{rollup_keys:{data:{source:"/included/person/*"}}},type:"BulkUpdate"},included:[{attributes:{action:"read"},id:""+e,type:"person"}]},method:"POST"}))}catch(e){return Promise.reject(e)}},[a]);return n(function(){o&&g()},[o]),{markAllRead:function(){try{return d(!0),Promise.resolve(t.markAllRead()).then(function(){return Promise.resolve(v(a)).then(function(){return Promise.resolve(function(){try{return Promise.resolve(p.chat.post("me/stream_user_updated",{}))}catch(e){return Promise.reject(e)}}()).then(function(){return Promise.resolve(g()).then(function(){d(!1)})})})})}catch(e){return Promise.reject(e)}},markAllReadProcessing:c,refreshTotalUnreadCount:g,totalUnreadCount:h}}({client:a,currentPersonId:c,env:d,isChannelListViewActive:E.isChannelListViewActive});return t.createElement(Kn,{value:{actionsOpenForChannel:v,closeDrawer:o,filterValues:f,markAllRead:w.markAllRead,markAllReadProcessing:w.markAllReadProcessing,navigation:E,refreshTotalUnreadCount:w.refreshTotalUnreadCount,setActionsOpenForChannel:y,setFilterValues:p,totalUnreadCount:w.totalUnreadCount}},t.createElement(In,{activeIndex:E.activeIndex},l))},di=function(e){var n=e.chatClient,r=e.closeDrawer,a=e.env,i=e.currentPersonId;return t.createElement(ue,{client:n,theme:"str-chat__theme-light"},t.createElement(Qn,{env:a},t.createElement(ui,{client:n,closeDrawer:r,currentPath:e.currentPath,currentPersonId:i,env:a,onChangePath:e.onChangePath},t.createElement(Qr,{closeDrawer:r,client:n,env:a,appName:e.appName,currentPersonId:i}),t.createElement(Va,null),t.createElement(ci,null),t.createElement(La,null),t.createElement(va,null),t.createElement(Hr,null),t.createElement(tr,null))))},mi={component:function(e){var n=e.appName,r=e.closeDrawer,a=e.currentPath,i=e.env,o=e.onChangePath,l=e.userId,s=function(e){var n=t.useState(null),r=n[0],a=n[1];return t.useEffect(function(){if(!e)return lr;var t=!1,n=new me(e.api_key),r=n.connectUser({id:e.id},e.tokenProvider).then(function(){t||a(n)});return function(){t=!0,a(null),r.then(function(){return n.disconnectUser()}).then(function(){console.log("connection closed")})}},[null==e?void 0:e.id,null==e?void 0:e.api_key]),r}(e.chatStreamUser);return s?t.createElement(di,{chatClient:s,closeDrawer:r,env:i,appName:n,currentPersonId:l,currentPath:a,onChangePath:o}):t.createElement(Dn,{closeDrawer:r},t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1},t.createElement(Vn,null,"Chat"),t.createElement(er,null),t.createElement(M,{color:"hsl(0 0% 62%)",thickness:2,trackColor:"hsl(0 0% 97%)"})))},icons:{active:"general.textMessage",static:"general.outlinedTextMessage"},name:"Chat"},hi=function(e){var n=e.currentAppName,r=e.sectionName.toLowerCase();return"account information"===r||"recent updates"===r?t.createElement(v,{name:"account information"===r?"general.cogPerson":"general.outlinedGenericFile",color:"foregroundSecondary"}):"Accounts"===n?t.createElement(v,{name:"general.cog",color:"foregroundSecondary"}):t.createElement(p,{width:2,height:2},t.createElement(R,{name:n.toLowerCase().replace(/[\s]/,"-"),size:"sm",theme:"color",markOnly:!0}))},fi=function(e){var n=e.hit;return t.createElement(L.Item,{key:n.objectID,index:e.index,value:n,paddingVertical:1},t.createElement(g,{color:"neutralDarker",size:4,whiteSpace:"normal"},n.title))},pi=function(e){var n=e.currentAppName,r=e.indexName,a=_e(),i=a.query,o=a.refine,l=Ce(),s=l.hits,c=l.results,u=null==c?void 0:c.hits.reduce(function(e,t){var n=t.category.title;return e[n]||(e[n]=[]),e[n].push(t),e},{}),d=0;return t.createElement(p,{id:"helpdesk-search",position:"relative"},t.createElement(L.Popover,{renderTo:"#helpdesk-search",popoverProps:{zIndex:2},placeholder:"Search our documentation",value:i,renderRight:t.createElement(v,{name:"general.search"}),onChange:function(e){return o(e.target.value)},onSelect:function(e){return function(e,t){var n=t.split("_")[1],r=window.open("https://"+n+".zendesk.com/hc/"+e.locale.locale+"/articles/"+e.id,"_blank");r&&r.focus()}(e,r)},placement:"bottom-start"},!s.length&&t.createElement(t.Fragment,null,t.createElement(p,{axis:"horizontal",alignment:"center",paddingHorizontal:2,paddingVertical:1},t.createElement(g,{color:"neutralDarker",size:4,whiteSpace:"normal"},"No results match your search"))),u&&Object.keys(u).map(function(e){var r=u[e];return t.createElement(t.Fragment,{key:e},d>0&&t.createElement(h,{margin:1}),t.createElement(p,{axis:"horizontal",alignment:"center",spacing:.5,paddingHorizontal:2,paddingVertical:1},t.createElement(hi,{currentAppName:n,sectionName:e}),t.createElement(g,{size:5,color:"foregroundSecondary",fontWeight:500},e)),r.map(function(e){return t.createElement(fi,{key:e.objectID,hit:e,index:d++})}))})))},gi=function(e){var n=e.indexName,r=e.currentAppName,a=It().algoliaSearchAuth,i=ke(a.algoliaApplicationId,a.algoliaSearchOnlyApiKey);return t.createElement(xe,{indexName:n,searchClient:i},t.createElement(Se,{hitsPerPage:5}),t.createElement(pi,{currentAppName:r,indexName:n}))},vi=F.LoadingIndicator,yi=F.StackView,Ei={component:function(e){var n=e.appName,r=e.closeDrawer,a=e.helpdeskConfig,i=u(e.env)("helpdesk")+"/addons/toolbar.helpdesk.help";return t.createElement(W,{grow:1,display:"flex",extensionId:"11",url:i,loadingFallback:t.createElement(yi,{flex:1,axis:"vertical"},t.createElement(Dn,{closeDrawer:r},t.createElement(yi,{axis:"horizontal",spacing:1},t.createElement(Vn,null,"Help and support"),t.createElement(vi,null)))),additionalComponents:{CalendlyWidget:be,DocumentationSearch:gi,DrawerHeader:Dn,DrawerHeading:Vn,ScrollContainer:Yn,SwitchView:In},args:{appName:n,closeDrawer:r,currentPageParams:location.search,helpdeskConfig:a},componentVersion:"5"})},icons:{active:"general.questionCircle",static:"general.outlinedQuestionCircle"},name:"Helpdesk"},wi=["dark","style"],bi=function(e){var n=e.dark,r=e.style,a=Oe(e,wi);return t.createElement("div",Te({style:Te({color:n?Ft.lightNeutral62:Ft.lightNeutral24,fontSize:"12px",fontWeight:400,textTransform:"uppercase"},r)},a))},ki=function(e){var a,i,o,l,s,c,u=e.isRead,d=void 0!==u&&u,m=e.onClick,h=t.useRef(null),f=(a=h,o=(i=r(!1))[0],l=i[1],s=function(){return l(!0)},c=function(){return l(!1)},n(function(){var e=null==a?void 0:a.current;if(e)return e.addEventListener("mouseenter",s),e.addEventListener("mouseleave",c),function(){e.removeEventListener("mouseenter",s),e.removeEventListener("mouseleave",c)}},[a]),o);return t.createElement("div",Te({ref:h,style:{alignItems:"center",display:"flex",height:"12px",justifyContent:"center",width:"12px"}},{onClick:m}),t.createElement("svg",{height:"12",viewBox:"0 0 12 12",width:"12"},t.createElement("title",null,"unread dot"),t.createElement("circle",{cx:"6",cy:"6",fill:f?Ft.interaction66:Ft.lightNeutral81,r:"6",style:{transition:"all 0.2s"}}),t.createElement("circle",{cx:"6",cy:"6",fill:Ft.lightNeutral100,r:"5"}),!d&&t.createElement("circle",{cx:"6",cy:"6",r:"4",fill:Ft.interaction66})))},_i=function(e){var n=e.mobile,r=void 0!==n&&n,a=e.isLast,i=e.onCreateTask,o=e.onMarkAsRead,l=void 0===o?function(){try{return Promise.resolve({})}catch(e){return Promise.reject(e)}}:o,s=e.onToggleRead,c=e.showBottomBorder,u=e.notification,d=u.appName,m=u.createdAt,h=u.isRead,f=u.link,p=u.title,g=It(),v=g.organizationTimeZone,y=g.notificationsContextMenu,E=t.useState(!1),w=E[0],b=E[1],k={style:"relative"};return v&&(k.timeZone=v),t.createElement(Pt,{active:w,"data-turbolinks":!1,href:f,onClick:function(e){try{return b(!0),Promise.resolve(l(u)).then(function(){window.location.href=f})}catch(e){return Promise.reject(e)}},style:Te({alignItems:"flex-start",borderBottom:c||!a?"1px solid "+(r?Ft.lightNeutral24:Ft.lightNeutral93):"none",cursor:"pointer",display:"flex",overflow:"hidden",padding:"12px 16px",textDecoration:"none",verticalAlign:"middle"},ct)},t.createElement("div",{style:{display:"flex",flexDirection:"column",flexGrow:1,justifyContent:"center"}},t.createElement("div",{style:{alignItems:"center",borderLeft:"4px solid hsl("+({Calendar:"9 61% 50%","Check-Ins":"283 22% 48%",Giving:"43 88% 64%",Groups:"17 96% 62%",People:"220 74% 57%",Publishing:"220 12% 31%",Registrations:"175 36% 43%",Services:"88 45% 41%"}[d]||"0 0% 81%")+" / "+(h?"40%":"100%"),display:"flex",marginBottom:"10px",paddingLeft:"8px"}},t.createElement("div",{style:{flexGrow:1,marginRight:"16px"}},t.createElement(bi,{dark:r,style:{marginBottom:"6px",userSelect:"none"}},d),t.createElement("h1",{style:{color:r?Ft.lightNeutral88:Ft.darkNeutral12,fontSize:"16px",fontWeight:500,lineHeight:"1.3em",margin:0,userSelect:"none"}},p)),!r&&!y&&t.createElement(ki,Te({onClick:function(e){e.preventDefault(),e.stopPropagation(),s()}},{isRead:h})),!r&&y&&t.createElement(H,{icon:{name:"general.threeDots"},title:"More options",variant:"naked",iconRight:null,placement:"bottom-end",onClick:function(e){e.stopPropagation()}},t.createElement(H.Item,{onClick:function(e){e.preventDefault(),e.stopPropagation(),s()}},"Mark ",h?"unread":"as read"),u.taskUrl?t.createElement(H.Item,{onClick:function(e){e.preventDefault(),e.stopPropagation(),window.location.href=u.taskUrl}},"Open task"):t.createElement(H.Item,{onClick:function(e){e.preventDefault(),e.stopPropagation(),i(u)}},"Create task"))),t.createElement("div",{style:{color:r?Ft.lightNeutral62:Ft.lightNeutral24,fontSize:"12px",paddingLeft:"12px",userSelect:"none"}},de.datetime(m,k))))},Ci=function(e){var n=e.dark,r=void 0!==n&&n,a=e.description,i=e.title,o=void 0===i?"No notifications":i;return t.createElement(p,{alignment:"center",distribution:"center",padding:4},t.createElement(yt,Te({id:e.context},{dark:r})),t.createElement(_,{color:r?"#fafafa":"#3d3d3d",fontWeight:500,marginTop:1,size:3},o),t.createElement(g,{align:"center",color:r?"#fafafa":"#3d3d3d",size:4},a))},xi=function(e,t){var n,r,a,i,o,l,s,c,u=function(e,t){var n=e.type,r=e.id;return t.find(function(e){return e.type===n&&e.id===r})},d=null==(n=u(e.relationships.app.data,t.included))||null==(r=n.attributes)?void 0:r.name,m=JSON.parse(null==(a=u({id:null==e||null==(o=e.relationships)||null==(l=o.web_payloads)||null==(s=l.data[0])?void 0:s.id,type:"Payload"},t.included))||null==(i=a.attributes)?void 0:i.content);return{appName:d,createdAt:new Date(e.attributes.created_at),id:e.id,isRead:(null==(c=e.attributes.read_at)?void 0:c.length)>0,link:null==m?void 0:m.link,title:null==m?void 0:m.title}},Si=["disabled","onClick","title"],Mi=function(e){var n=e.disabled,r=e.onClick,a=e.title,i=Oe(e,Si);return t.createElement(p,Te({color:n?Ft.lightNeutral62:Ft.interaction66,cursor:n?"default":"pointer",fontSize:5,fontWeight:600,userSelect:"none",onClick:!n&&r},i),a)},Ai=function(e){var n=Te({},(De(e),e));return t.createElement(_,Te({color:Ft.lightNeutral12,lineHeight:2,size:5,textTransform:"uppercase",userSelect:"none"},n))},Ti={component:function(e){var n=e.closeDrawer,r=t.useState(!1),a=r[0],o=r[1],l={transition:"opacity 300ms ease-in-out"},s={entered:{opacity:1},entering:{opacity:.2}},c=Ge.getState().notifications,d=function(e){var n=e.enabled,r=e.env,a=e.joltChannel,o=t.useState([]),l=o[0],s=o[1],c=t.useState(!0),d=c[0],m=c[1],h=t.useState(!1),f=h[0],p=h[1],g=function(e){var t=[].concat(e).sort(function(e,t){return e.createdAt<t.createdAt?1:-1}).reduce(function(e,t){return Te({},e,t.isRead?{read:[].concat(e.read,[t])}:{unread:[].concat(e.unread,[t])})},{read:[],unread:[]});return{read:t.read,unread:t.unread}}(l),v=g.read,y=g.unread,E=function(){try{p(!1),Re(He,window.location.origin+"/~api/notifications/v2/me/notifications?include=app,web_payloads&per_page=100&order=read_at,-created_at").then(function(e){var t=e.json,n=t.data.map(function(e){return xi(e,t)});m(!1),s(n)})}catch(e){p(!0),console.error("topbar encountered error when fetching all notifications",e)}};t.useEffect(function(){n&&E()},[n]);var w=function(e){return"string"==typeof e.data?JSON.parse(e.data):e.data},b=t.useCallback(function(e){try{(function(e){try{try{return p(!1),Promise.resolve(Re(He,window.location.origin+"/~api/notifications/v2/me/notifications/"+e+"?include=app,web_payloads").then(function(e){return e.json}))}catch(e){p(!0),console.error("topbar encountered error when fetching a single notification",e)}return Promise.resolve()}catch(e){return Promise.reject(e)}})(w(e).data.id).then(function(e){var t=xi(e.data,e);s(function(e){return[].concat(e.filter(function(e){return e.id!==t.id}),[t])})})}catch(e){console.error("topbar encountered error when updating state from jolt message",e)}},[xi,w,E,v,s,y]),k=t.useCallback(function(e){var t=w(e),n=l.filter(function(e){return e.id!==t.data.id});s(n)},[w,l,s]);Ze(n?a:void 0,"notifications.v2.events.notification.created",b),Ze(n?a:void 0,"notifications.v2.events.notification.updated",b),Ze(n?a:void 0,"notifications.v2.events.notification.destroyed",k);var _=function(e,t){try{var n=e.reduce(function(e,n){return[].concat(e,[{attributes:{action:t},id:n,type:"graph_notification"}])},[]);return Promise.resolve(Re(Le,u(r)("api")+"/notifications/v2/me/bulk_update",{data:{data:{attributes:{},relationships:{notifications:{data:{source:"/included/graph_notification/*"}}},type:"BulkUpdate"},included:n},method:"POST"}).then(function(t){t.ok||(m(!1),p(!0),s(function(t){return t.map(function(t){return e.includes(t.id)?Te({},t,{isRead:!t.isRead}):t})}))}))}catch(e){return Promise.reject(e)}},C=i(function(e){try{return Promise.resolve(Re(Le,u(r)("api")+"/home/v2/me/task_lists/inbox/tasks",{data:{data:{attributes:{description:e.link?'<a href="'+e.link+'">Link</a>':void 0,title:e.title}}},method:"POST"}).then(function(t){t.ok&&s(function(n){return n.map(function(n){return e.id===n.id?Te({},n,{taskUrl:t.json.data.links.html}):n})})}))}catch(e){return Promise.reject(e)}},[]);return{handleCreateTask:C,handleMarkAllAsRead:function(){var e=y.map(function(e){return e.id});s(function(t){return t.map(function(t){return e.includes(t.id)?Te({},t,{isRead:!0}):t})}),_(y.map(function(e){return e.id}),"read")},handleMarkAsRead:function(e){try{return _([e.id],"read")}catch(e){return Promise.reject(e)}},handleToggleRead:function(e){try{var t=e.isRead?"unread":"read";return s(function(n){return n.map(function(n){return e.id==n.id?Te({},n,{isRead:"read"===t}):n})}),_([e.id],t)}catch(e){return Promise.reject(e)}},hasError:f,isLoading:d,read:v,unread:y}}({enabled:c.enabled,env:c.env,joltChannel:c.joltChannel}),m=d.handleCreateTask,h=d.handleMarkAllAsRead,f=d.handleMarkAsRead,g=d.handleToggleRead,v=d.hasError,y=d.isLoading,E=d.read,w=d.unread;return t.createElement(t.Fragment,null,t.createElement(Dn,{closeDrawer:n},t.createElement(p,{spacing:.5},t.createElement(p,{alignment:"center",axis:"horizontal",spacing:1},t.createElement(Vn,null,"Notifications"),y&&t.createElement(M,{color:"hsl(0 0% 62%)",thickness:2,trackColor:"hsl(0 0% 97%)"}),v&&t.createElement(wt,{fill:"hsl(8 60% 47%)",size:16})),E.length>0&&t.createElement(Mi,{onClick:function(){return o(function(e){return!e})},title:(a?"Hide":"Show")+" read"}))),t.createElement(Yn,null,t.createElement(p,{alignment:"stretch",spacing:2},t.createElement("div",{style:{boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"space-between",margin:0,padding:"4px 0"}},!y&&0===w.length&&t.createElement(Ci,Te({context:"toolbar",description:"When you have "+(E.length>0?"unread ":"")+"notifications they will show up here."},E.length>0&&{title:"No unread notifications"})),w.length>0&&t.createElement(p,{axis:"horizontal",alignment:"center",distribution:"space-between",padding:2},t.createElement(Ai,null,"Unread"),w.length>0&&t.createElement(Mi,{onClick:function(){return h()},title:"Mark "+w.length+" as read"})),t.createElement(Me,{exit:!1},w.map(function(e,n){return t.createElement(Ae,{key:e.id,timeout:0},function(r){return t.createElement("div",{style:Te({},l,s[r])},t.createElement(_i,Te({isLast:w.length===n+1,key:e.id,onMarkAsRead:f,onToggleRead:function(){return g(e)},onCreateTask:m,showBottomBorder:E.length>0},{notification:e})))})})),E.length>0&&a&&t.createElement(t.Fragment,null,t.createElement(Ai,{padding:2},"Read"),t.createElement(Me,{exit:!1},E.map(function(e){return t.createElement(Ae,{key:e.id,timeout:0},function(n){return t.createElement("div",{style:Te({},l,s[n])},t.createElement("div",{style:{opacity:.6}},t.createElement(_i,Te({key:e.id,onToggleRead:function(){return g(e)},onCreateTask:m,showBottomBorder:!0},{notification:e}))))})})))))))},icons:{active:"toolbar.notification",static:"toolbar.notificationO"},name:"Notifications"},Ni=["children","badge","onClick"],Pi=F.LoadingIndicator,Di=F.StackView;function Oi(e){var n=e.children,r=e.badge,a=e.onClick,i=Oe(e,Ni);return t.createElement(p,Te({as:"button",axis:"horizontal",distribution:"space-between",alignment:"center",paddingBottom:.75,onClick:function(){return a()},spacing:1},i),n,r&&t.createElement(S,Te({size:"sm",fontWeight:"600"},r)))}var Vi={component:function(e){var n=e.closeDrawer,a=e.enableJoltLogging,o=e.env,l=e.isOpen,s=e.joltPromise,c=e.onReceiveWorker,d=e.openDrawer,m=e.currentPath,h=e.onChangePath,f=Ca(),p=u(o)("home")+"/addons/toolbar.tasks.list.js",g=r(),v=g[0],y=g[1],E=r(),w=E[0],b=E[1],k=Ye({channelName:null==w?void 0:w.channelName,enableJoltLogging:a,enabled:!!w,env:o,fetchSubscribeToken:function(e){try{return Promise.resolve(Re(Le,w.subscribeUrl,{data:{data:{attributes:{connection_id:e}}},method:"POST"})).then(function(e){return e.json.data.id})}catch(e){return Promise.reject(e)}},joltPromise:s}),_=i(function(e){y(Te({},e,{timestamp:(new Date).getTime()}))},[]);Ze(k,"",_);var C=i(function(e,t){var n;if(void 0===t&&(t={}),null==(n=window)||!n.pendo)return console.warn("`window.pendo` is undefined");window.pendo.track(e,t)},[]);return t.createElement(W,{grow:1,display:"flex",extensionId:"2",url:p,onReceiveWorker:c,loadingFallback:t.createElement(Di,{flex:1,axis:"vertical"},t.createElement(Dn,{closeDrawer:n},t.createElement(Di,{axis:"horizontal",spacing:1},t.createElement(Vn,null,"To do"),t.createElement(Pi,null)))),additionalComponents:{DrawerHeader:Dn,DrawerHeading:Vn,NavLinkWithBadge:Oi,ScrollContainer:Yn,SwitchView:In},args:{closeDrawer:n,currentPath:m,isOpen:l,latestJoltMessage:v,onChangePath:h,openDrawer:d,pcoMeta:f,requestJoltChannel:b,trackPendo:C},componentVersion:"5"})},icons:{active:"toolbar.checklist",static:"toolbar.checklistO"},name:"Tasks"},zi={Chat:mi,Notifications:Ti,Tasks:Vi},Hi=Object.fromEntries(Object.entries(zi).map(function(e){var t=e[1];return[e[0].toLowerCase(),t]}));function Li(o){var l,s,c,d,y,w,b,S,M,A,T=o.appName,N=o.autoMountTool,P=o.enableJoltLogging,D=o.env,O=o.helpdeskConfig,V=void 0===O?{}:O,z=o.linkToProfile,H=void 0===z||z,L=o.userAvatarPath,R=o.userName,Y=o.onReceiveTasksWorker,Z=(b=function(e){var t=a(function(){return new RegExp(e+"=([^&]+)")},[e]),o=i(function(e){var n=e.match(t);return n?n[1]:null},[t]),l=r(function(){return o(location.hash)}),s=l[0],c=l[1],u=i(function(e){c(o(e))},[]);return n(function(){function e(){u(location.hash)}return window.addEventListener("hashchange",e),function(){return window.removeEventListener("hashchange",e)}},[u]),[s,u]}("toolbar"),S=b[0],A=i(function(e,t){void 0===t&&(t="");var n="#toolbar="+e+"/"+t;history.replaceState(void 0,void 0,n),M(n)},[M=b[1]]),[a(function(){if(S){var e=S.split("/"),t=e[0];return{path:e.slice(1).join("/"),tool:t}}return null},[S]),A,i(function(){history.replaceState(void 0,void 0,"#"),M("")},[])]),I=Z[0],U=Z[1],W=Z[2],F=(d="topbarToolbarToolState",y=r(function(){return function(e){var t=document.cookie.split(";").map(function(e){return e.trim()}).find(function(t){return t.startsWith(e+"=")});return t&&decodeURIComponent(t.split("=")[1])}(d)}),w=y[1],l=[y[0],i(function(e){document.cookie=d+"="+encodeURIComponent(e)+"; "+Nn,w(e)},[d])],c=l[1],[a(function(){if(!s)return{};try{return JSON.parse(s)}catch(e){return{}}},[s=l[0]]),i(function(e){return c(JSON.stringify(e))},[c])]),B=F[0],G=F[1],q=e.useReducer(Wn,Te({},Un,{currentContent:N?zi[N]:null})),J=q[0],$=q[1],Q=J.currentContent,X=J.open,K=!!Q,ee=It(),te=ee.indicatorVisible,ne=ee.joltPromise,re=ee.chatEnabled,ae=ee.userId;t.useEffect(function(){X?(document.body.style.overflow="hidden",window.scrollTo(0,0)):document.body.style.overflow="auto"},[X]),t.useEffect(function(){return window.openHelpdesk=function(){return be(Ei)},function(){delete window.openHelpdesk}},[Ei]);var ie=bn({appName:T.replace(/[\s-]/,""),env:D,userId:ae}),oe=u(D)("login")+"/logout",le="/people/AC"+ae,se=Ei,ce=null!=V&&V.onClick?V.onClick:function(){return he(se)},ue=i(function(e){$({payload:{content:e},type:zn.mount}),setTimeout(function(){return $({type:zn.open})})},[]),de=i(function(e){e.name.toLowerCase()in Hi?U(e.name.toLowerCase(),B[e.name.toLowerCase()]):(W(),ue(e))},[U,W,ue,B]),me=i(function(){$({type:zn.close}),W(),setTimeout(function(){return $({type:zn.unmount})},100)},[W]);t.useEffect(function(){var e;if(I){var t=Te({},B,((e={})[I.tool]=I.path,e));We(t,B)||G(t)}},[I,B]),t.useEffect(function(){null==I||!I.tool||Q===Hi[I.tool]&&X||ue(Hi[I.tool])},[ue,null==I?void 0:I.tool,Q,X]);var he=function(e){return X&&(null==Q?void 0:Q.name)===e.name?me():de(e)},fe=function(e){var n=e.enableJoltLogging,r=e.env,a=e.userId,i=e.isEnabled,o=e.joltPromise,l=e.onConnectionFailure,s=void 0===l?lr:l,c=t.useState(null),d=c[0],m=c[1],h=Ye({channelName:"chat.people."+a,enableJoltLogging:n,enabled:i,env:r,fetchSubscribeToken:function(e){try{var t=u(r)("api")+"/chat/v2/me/jolt_subscribe";return Promise.resolve(Re(Le,t,{data:{data:{attributes:{cid:e}}},method:"POST"}).then(function(e){return e.json.data.id}))}catch(e){return Promise.reject(e)}},joltPromise:o}),f=function(e){var t=e.fields;try{var n=u(r)("api")+"/chat/v2/me/stream_user",a="?context=linked_accounts&fields[StreamUser]="+t.join(",");return Promise.resolve(Re(He,""+n+a)).then(function(e){return e.json.data})}catch(e){return Promise.reject(e)}},p=function(){return f({fields:["api_key","token","unread"]}).then(function(e){var t=e.id,n=e.attributes,r=n.token,a=Oe(n,Er);r?m(function(e){return Te({id:t},e,a,{tokenProvider:function(){try{return Promise.resolve(f({fields:["token"]})).then(function(e){return e.attributes.token})}catch(e){return Promise.reject(e)}}})}):(s(),m(null))}).catch(lr)};return Ze(i?h:void 0,"STREAM_USER_UPDATED",p),t.useEffect(function(){i&&p()},[i]),d}({enableJoltLogging:P,env:D,isEnabled:Boolean(ae&&re),joltPromise:ne,onConnectionFailure:function(){return Q===mi&&me()},userId:ae}),pe=[Ti,Vi,fe&&mi].filter(Boolean),ge={component:function(){return function(e){var n=e.closeDrawer,r=e.linkToProfile,a=e.loginSettingsUrl,i=e.logoutUrl,o=e.profileUrl,l=e.userAvatarPath,s=It(),c=s.mfaConfigured,u=s.mfaEnabled,d=s.name;return t.createElement(p,{axis:"vertical",spacing:t.createElement(h,null)},t.createElement(C,{columns:"auto 1fr auto",alignment:"start",spacing:2,padding:2,paddingTop:1,width:"100%"},t.createElement(x,{source:l,size:"md"}),t.createElement(p,{axis:"vertical",spacing:1,grow:0,shrink:1},t.createElement(_,{level:3,size:1,weight:600,paddingTop:.5,color:Ft.lightNeutral12},d),r&&t.createElement(E,{to:o,style:{color:Ft.lightNeutral45},size:3},"My profile"),u&&t.createElement(t.Fragment,null,t.createElement(E,{to:a,style:{color:Ft.lightNeutral45},size:3},"My login settings"),t.createElement(p,{axis:"horizontal",alignment:"center",spacing:.5,width:"100%"},t.createElement(v,{name:c?"general.lock":"general.unlock",size:"sm",color:c?Ft.success25:Ft.danger45}),t.createElement(g,{size:5,weight:400,color:Ft.lightNeutral62,wrap:!0},"Two-step verification ",c?"active":"inactive")))),t.createElement(f,{icon:{fill:Ft.lightNeutral24,name:"general.x",size:"md"},onClick:n,title:"Close",variant:"naked",theme:!1,hover:{backgroundColor:Ft.lightNeutral95}})),t.createElement("form",{method:"POST",action:i},t.createElement(f,{"data-turbolinks":!1,onClick:function(){$e()},style:{padding:0},theme:!1,type:"submit",width:"100%"},t.createElement(p,{distribution:"space-between",alignment:"center",axis:"horizontal",grow:1,paddingHorizontal:3,paddingVertical:2},t.createElement(g,{color:Ft.lightNeutral45,size:3},"Log out"),t.createElement(v,{name:"general.intoBox",fill:Ft.lightNeutral45})))))}({closeDrawer:me,linkToProfile:H,loginSettingsUrl:ie,logoutUrl:oe,profileUrl:le,userAvatarPath:L})},name:"Profile"},ve=function(e){var t=function(e){return"undefined"!=typeof window&&window.matchMedia(e).matches},a=r(t(e)),i=a[0],o=a[1];function l(){o(t(e))}return n(function(){var t=window.matchMedia(e);return l(),t.addListener?t.addListener(l):t.addEventListener("change",l),function(){t.removeListener?t.removeListener(l):t.removeEventListener("change",l)}},[e]),i}("(max-width: 599px)"),ye=t.useState(0),Ee=ye[0],we=ye[1];t.useLayoutEffect(function(){var e=function(){we(window.innerHeight)};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[]);var be=function(e){var t;de(e),null==(t=document.getElementById("toolbarDrawer"+e.name))||t.scrollTo({behavior:"smooth",top:0})},ke={Chat:{chatStreamUser:fe},Tasks:{onReceiveWorker:Y}},_e=i(function(e){U(null==Q?void 0:Q.name.toLowerCase(),e)},[null==Q?void 0:Q.name]),Ce=Te({appName:T,closeDrawer:me,currentPath:null==I?void 0:I.path,env:D,helpdeskConfig:V,isOpen:X,joltPromise:ne,onChangePath:_e,openDrawer:function(){return Q&&de(Q)},userId:ae},Q?ke[Q.name]:{}),xe=Te({},te,{Chat:null==fe?void 0:fe.unread});return t.createElement(m,{theme:_n},t.createElement(j,null,ve?t.createElement(t.Fragment,null,t.createElement(p,{left:0,position:"absolute",right:0,pointerEvents:"none",style:{minHeight:Ee},top:0,zIndex:10001},t.createElement(p,{alignItems:"start",axis:"horizontal",backgroundColor:"white",borderTopColor:"separatorTertiary",borderTopWidth:1,bottom:0,distribution:"fill",height:"calc(52px + env(safe-area-inset-bottom))",left:0,position:"fixed",pointerEvents:"auto",right:0},t.createElement(p,{alignment:"center",flex:"1",position:"relative"},t.createElement(f,{css:{WebkitTapHighlightColor:"transparent"},color:X?Ft.lightNeutral62:Ft.lightNeutral24,hover:{color:Ft.lightNeutral24},icon:{name:X?"toolbar.planningCenterO":"toolbar.planningCenter",size:"20px"},onClick:function(){return me()},padding:2,theme:!1,title:"Home"})),[se].concat(pe).map(function(e){return t.createElement(p,{alignment:"center",flex:"1",key:e.name,position:"relative"},t.createElement(f,{id:"toolbar-"+e.name.toLowerCase(),"aria-label":""+e.name,color:X&&Q===e?Ft.lightNeutral24:Ft.lightNeutral62,css:{WebkitTapHighlightColor:"transparent"},hover:{color:Ft.lightNeutral24},key:e.name,onClick:function(){return be(e)},paddingHorizontal:2,paddingVertical:2,theme:!1},t.createElement(k,{position:"relative"},xe[e.name]&&t.createElement(Hn,{right:-.5,top:-.5}),t.createElement(v,{name:X&&Q===e?e.icons.active:e.icons.static,size:"20px"}))))}))),K&&t.createElement(Pn,{id:"toolbarDrawer"+Q.name,bottom:"52px",height:X?"calc(100% - 52px)":"0px",overflow:"auto",position:"absolute"},t.createElement(Q.component,Te({},Ce)))):t.createElement(p,{height:"100%",position:"absolute",right:0,width:X?"calc(360px + 48px)":"48px",transition:"all 100ms ease-in-out"},t.createElement(p,{backgroundColor:"surface",borderLeftColor:"separatorTertiary",borderLeftWidth:1,grow:1,paddingVertical:1,spacing:t.createElement(h,{margin:1.5}),zIndex:2,position:"absolute",right:0,height:"100%",width:"48px"},t.createElement(p,{alignment:"center","data-pendo":"toolbar-profile-support-wrapper",spacing:2},t.createElement(f,{"data-pendo":"toolbar-profile",onClick:function(){return he(ge)},radius:0,theme:!1},t.createElement(x,{alt:R+"'s avatar",hover:{outlineColor:Ft.lightNeutral62},outlineColor:X&&K&&"Profile"==Q.name?Ft.lightNeutral62:"transparent",outlineOffset:"2px",outlineStyle:"solid",outlineWidth:"2px",size:"sm",source:L})),t.createElement(Ri,{currentContent:Q,indicatorState:xe,key:se.name,onClick:ce,open:X,tool:se})),t.createElement(p,{alignment:"center",spacing:2},pe.map(function(e){return t.createElement(Ri,{currentContent:Q,indicatorState:xe,key:e.name,onClick:function(){return he(e)},open:X,tool:e})}))),K&&t.createElement(Pn,{hasShadow:!0,id:"toolbarDrawer"+Q.name,width:"360px"},t.createElement(Q.component,Te({},Ce))))))}var Ri=function(e){var n=e.currentContent,r=e.indicatorState,a=e.onClick,i=e.open,o=e.tool;return t.createElement(k,{"data-pendo":"toolbar-"+o.name.toLowerCase(),key:o.name,position:"relative"},r[o.name]&&t.createElement(Hn,{right:.25,top:.25}),t.createElement(f,{id:"toolbar-"+o.name.toLowerCase(),color:i&&n===o?Ft.lightNeutral24:Ft.lightNeutral62,hover:{color:Ft.lightNeutral24},icon:{name:i&&n===o?o.icons.active:o.icons.static,size:"20px"},key:o.name,onClick:a,title:"Open "+o.name+" drawer",theme:!1}))};export{qe as AppsProvider,vt as BellIcon,Xe as ConnectedPeopleProvider,et as DisplaySwitch,Kt as NotSmallRoute,Xt as NotSmallTopbar,on as PlatformAnnouncements,an as PlatformAnnouncementsStyleProvider,mn as ProductAnnouncement,hn as ProductAnnouncementStyleProvider,An as SmallRoute,Mn as SmallTopbar,bt as SpyglassIcon,rn as StyledPlatformAnnouncement,fn as StyledProductAnnouncement,pn as StyledProductAnnouncementDimissButton,In as SwitchView,Li as Toolbar,kt as XIcon,Je as mapApps,Le as railsCsrfFetch};
|
|
2
2
|
//# sourceMappingURL=topbar.module.js.map
|