UNPKG

harperdb

Version:

HarperDB is a distributed database, caching service, streaming broker, and application development platform focused on performance and ease of use.

1 lines 21.1 kB
"use strict";(self.webpackChunkharperdb_studio=self.webpackChunkharperdb_studio||[]).push([[678],{5203:(e,t,s)=>{s.r(t),s.d(t,{default:()=>G});var r=s(9950),a=s(7176),n=s(625),i=s(6713),c=s(9435),o=s(5553),l=s(2072),d=s(8125),u=s(5488),m=s(3452);const x=e=>{o.A.update((t=>{t.orgSearch=e.target.value}))},h=()=>{o.A.update((e=>{e.orgSearch=""}))};var p=s(4414);const g=function(){const e=(0,i.O$)(o.A,(e=>e.orgSearch));return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(u.A,{id:"filter_orgs",type:"text",className:"text-center",onChange:x,placeholder:"filter your organizations",value:e||""}),e&&(0,p.jsx)(m.A,{className:"clear-filter",onClick:h,children:(0,p.jsx)("i",{className:"fa fa-times"})})]})};const j=function(){const e=(0,i.O$)(o.A,(e=>e.auth.orgs)),[t,s]=r.useState(!0);return(0,p.jsx)(m.A,{color:"link",className:"btn btn-purple px-4 mx-2",onClick:()=>{o.A.update((r=>{r.auth.orgs=function(e,t){const s=[...e];return t?s.sort(((e,t)=>e.customer_name.localeCompare(t.customer_name))):s.sort(((e,t)=>t.customer_name.localeCompare(e.customer_name))),s}(e,t),s(!t)}))},children:t?(0,p.jsxs)("span",{children:[(0,p.jsx)("i",{className:"fa fa-sort-alpha-up"})," Sort by Name: Ascending"]}):(0,p.jsxs)("span",{children:[(0,p.jsx)("i",{className:"fa fa-sort-alpha-down"})," Sort by Name: Descending"]})})};var f=s(3150),b=s(3628);const A=function(){return(0,p.jsx)(c.tH,{onError:(e,t)=>(0,b.A)({error:{message:e.message,componentStack:t}}),FallbackComponent:f.A,children:(0,p.jsx)(l.A,{className:"app-subnav",children:(0,p.jsxs)(d.A,{navbar:!0,children:[(0,p.jsx)("div",{className:"filter-holder",children:(0,p.jsx)(g,{})}),(0,p.jsx)(j,{})]})})})};var v=s(6114),N=s(4084),y=s(8156),O=s(7348),_=s(2714);const k=async e=>{let{auth:t,customer_id:s,user_id:r,status:a}=e;return(0,_.A)({endpoint:"updateUserOrgs",method:"POST",payload:{customer_id:s,user_id:r,status:a},auth:t})};var C=s(5429),S=s(3304);const w=function(e){let{loading:t,status:s,customer_name:a,setFlipState:n,total_instance_count:i}=e;const c=(0,O.MW)(),o=(0,r.useCallback)((e=>{e.stopPropagation();const t=e.currentTarget.getAttribute("data-action");"delete"===t&&i?c.error("You must remove all instances from an Organization before deleting it."):n(t)}),[i,c,n]);return t?(0,p.jsx)("i",{className:"status-icon fa fa-spinner fa-spin text-purple"}):"accepted"===s?(0,p.jsx)(m.A,{"data-action":"leave",className:"status-icon",color:"link",title:`Leave ${a} organization`,onClick:o,children:(0,p.jsx)("i",{className:"fa fa-times-circle text-purple"})}):"owner"===s?(0,p.jsx)(m.A,{"data-action":"delete",className:"status-icon",color:"link",title:`Delete ${a} organization`,onClick:o,children:(0,p.jsx)("i",{className:"fa fa-trash delete text-purple "+(i?"disabled":"")})}):null};const E=function(e){let{customer_name:t,customer_id:s,total_instance_count:l,status:d,setFlipState:u}=e;const x=(0,i.O$)(o.A,(e=>e.auth)),[h,g]=(0,r.useState)(!1),j=(0,n.Zp)(),A=(0,O.MW)(),_=!h&&["owner","accepted"].includes(d),E=async e=>{const t=e.currentTarget.getAttribute("data-status");g(t);const r=await k({auth:x,customer_id:s,user_id:x.user_id,status:t});r.error?(A.error(r.message),g(!1)):(await(0,S.A)(x),"declined"!==t&&g(!1),A.success(`Organization ${t} successfully`))};return(0,p.jsx)(c.tH,{onError:(e,t)=>(0,b.A)({error:{message:e.message,componentStack:t},customer_id:s}),FallbackComponent:f.A,children:(0,p.jsx)(N.A,{className:"instance "+(_?"clickable":""),onClick:async()=>_&&j(`/o/${s}/instances`),children:(0,p.jsxs)(y.A,{children:[(0,p.jsxs)(a.A,{className:"g-0",children:[(0,p.jsx)(v.A,{xs:"10",className:"org-name",children:t}),(0,p.jsx)(v.A,{xs:"2",className:"status-icons text-end",children:(0,p.jsx)(w,{status:d,loading:h,customer_name:t,setFlipState:u,total_instance_count:l})})]}),(0,p.jsxs)("div",{className:"org-status",children:["ORG ID: ",s]}),(0,p.jsx)(C.A,{textClass:"text-bold",label:"ROLE",isReady:!0,value:"accepted"===d?"USER":d.toUpperCase(),bottomDivider:!0}),(0,p.jsx)(C.A,{label:"INSTANCES",isReady:!0,value:l||"..."}),(0,p.jsx)("div",{className:"action-buttons",children:"invited"===d&&(0,p.jsxs)(a.A,{className:"g-0",children:[(0,p.jsx)(v.A,{xs:"6",className:"pe-1",children:(0,p.jsx)(m.A,{title:`Decline invitation to ${t} organization`,disabled:!!h,color:"danger",block:!0,"data-status":"declined",onClick:E,children:"declined"===h?(0,p.jsx)("i",{className:"fa fa-spinner fa-spin text-white"}):(0,p.jsx)("span",{children:"Decline"})})}),(0,p.jsx)(v.A,{xs:"6",className:"ps-1",children:(0,p.jsx)(m.A,{title:`Accept invitation to ${t} organization`,disabled:!!h,color:"success",block:!0,"data-status":"accepted",onClick:E,children:"accepted"===h?(0,p.jsx)("i",{className:"fa fa-spinner fa-spin text-white"}):(0,p.jsx)("span",{children:"Join"})})})]})})]})})})};var z=s(9163),F=s.n(z);const $=function(e){var t;let{customer_id:s,customer_name:n,setFlipState:l,flipState:d}=e;const x=(0,O.MW)(),h=(0,i.O$)(o.A,(e=>e.auth)),[g,j]=(0,r.useState)({}),[A,_]=(0,r.useState)({});return F()((async()=>{const{submitted:e}=g;if(e){const{delete_customer_name:e}=A;if(n.toString()!==(null===e||void 0===e?void 0:e.toString()))j({error:"organization name is not correct"});else{const e=await k({auth:h,customer_id:s,user_id:h.user_id,status:"removed"});e.error?x.error(e.message):(await(0,S.A)(h),x.success("Organization removed from your profile successfully"))}}}),[g]),(0,p.jsx)(c.tH,{onError:(e,t)=>(0,b.A)({error:{message:e.message,componentStack:t},customer_id:s}),FallbackComponent:f.A,children:(0,p.jsx)(N.A,{className:"instance",children:d&&(0,p.jsxs)(y.A,{children:[(0,p.jsxs)("ul",{className:"text-small my-0 text-nowrap",children:[(0,p.jsxs)("li",{children:[(0,p.jsx)("b",{children:"YOU"})," will be removed from the org."]}),(0,p.jsxs)("li",{children:[(0,p.jsx)("b",{children:"THE ORG"})," will not be removed."]})]}),(0,p.jsx)(u.A,{id:"customer_name",onChange:e=>_({delete_customer_name:e.target.value}),type:"text",title:"customer name",className:"my-3",placeholder:`Enter "${n}" here to confirm.`,value:A.customer_name}),(0,p.jsxs)(a.A,{children:[(0,p.jsx)(v.A,{children:(0,p.jsx)(m.A,{onClick:()=>l(!1),title:"Cancel",block:!0,disabled:g.submitted,color:"grey",children:"Cancel"})}),(0,p.jsx)(v.A,{children:(0,p.jsx)(m.A,{onClick:()=>j({submitted:!0}),title:"Confirm Organization Details",block:!0,disabled:g.submitted||(null===n||void 0===n?void 0:n.toString())!==(null===(t=A.delete_customer_name)||void 0===t?void 0:t.toString()),color:"danger",children:g.submitted?(0,p.jsx)("i",{className:"fa fa-spinner fa-spin"}):(0,p.jsx)("span",{children:"Do It"})})})]})]})})})};const T=function(e){var t;let{customer_id:s,customer_name:n,setFlipState:l,flipState:d}=e;const x=(0,O.MW)(),h=(0,i.O$)(o.A,(e=>e.auth)),[g,j]=(0,r.useState)({}),[A,k]=(0,r.useState)({});return F()((async()=>{const{submitted:e}=g;if(e){const{delete_customer_name:e}=A;if(n.toString()!==(null===e||void 0===e?void 0:e.toString()))j({error:"organization name is not correct"});else{const e=await(async e=>{let{auth:t,user_id:s,customer_id:r}=e;return(0,_.A)({endpoint:"removeOrg",method:"POST",payload:{user_id:s,customer_id:r},auth:t})})({auth:h,customer_id:s.toString(),user_id:h.user_id});e.error?j({error:e.message}):(await(0,S.A)(h),x.success("Organization removed successfully"))}}}),[g]),(0,p.jsx)(c.tH,{onError:(e,t)=>(0,b.A)({error:{message:e.message,componentStack:t},customer_id:s}),FallbackComponent:f.A,children:(0,p.jsx)(N.A,{className:"instance",children:d&&(0,p.jsx)(y.A,{children:g.error?(0,p.jsxs)(p.Fragment,{children:["There was an error processing your request:",(0,p.jsx)("hr",{className:"mt-3 mb-2"}),(0,p.jsx)("div",{className:"text-danger text-small",children:g.error}),(0,p.jsx)("hr",{className:"mt-2 mb-3"}),(0,p.jsx)(m.A,{onClick:()=>l(!1),title:"Cancel",block:!0,disabled:g.submitted,color:"grey",children:"Cancel"})]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("ul",{className:"text-small text-nowrap my-0",children:[(0,p.jsxs)("li",{children:[(0,p.jsx)("b",{children:"INSTANCES"})," must first be removed."]}),(0,p.jsxs)("li",{children:[(0,p.jsx)("b",{children:"USERS"})," will no longer see this org."]})]}),(0,p.jsx)(u.A,{id:"customer_name",onChange:e=>k({delete_customer_name:e.target.value}),type:"text",title:"customer name",className:"my-3",placeholder:`Enter "${n}" here to confirm.`,value:A.customer_name}),(0,p.jsxs)(a.A,{children:[(0,p.jsx)(v.A,{children:(0,p.jsx)(m.A,{onClick:()=>l(!1),title:"Cancel",block:!0,disabled:g.submitted,color:"grey",children:"Cancel"})}),(0,p.jsx)(v.A,{children:(0,p.jsx)(m.A,{id:"deleteOrganization",onClick:()=>j({submitted:!0}),title:"Confirm Organization Details",block:!0,disabled:g.submitted||(null===n||void 0===n?void 0:n.toString())!==(null===(t=A.delete_customer_name)||void 0===t?void 0:t.toString()),color:"danger",children:g.submitted?(0,p.jsx)("i",{className:"fa fa-spinner fa-spin"}):(0,p.jsx)("span",{children:"Do It"})})})]})]})})})})};const M=function(e){return"leave"===e.flipState?(0,p.jsx)($,{...e}):(0,p.jsx)(T,{...e})};var D=s(1852);const H=function(e){let{flippedCard:t,setFlippedCard:s,customer_id:a,...n}=e;const[i,o]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{t!==a&&o(!1)}),[t]),(0,r.useEffect)((()=>{i&&s(a)}),[i]),(0,p.jsx)(v.A,{xs:"12",md:"6",lg:"4",xl:"3",className:"mb-4",children:(0,p.jsx)(c.tH,{onError:(e,t)=>(0,b.A)({error:{message:e.message,componentStack:t},customer_id:a}),FallbackComponent:D.A,children:i?(0,p.jsx)(M,{setFlipState:o,flipState:i,customer_id:a,...n}):(0,p.jsx)(E,{setFlipState:o,flipState:i,customer_id:a,...n})})})},I=()=>{const[e,t]=(0,r.useState)(!1);return(0,i.O$)(o.A,(e=>(e=>{let{orgSearch:t,orgs:s}=e;if(!s)return[];const r=((e,t)=>{const s={};return e.filter((e=>!s[e[t]]&&(s[e[t]]=!0,!0)))})(s,"customer_id");return t&&""!==t?r.filter((e=>e.customer_name&&-1!==e.customer_name.toLowerCase().indexOf(t.toLowerCase()))):r})({orgSearch:e.orgSearch,orgs:e.auth.orgs}))).map((s=>(0,p.jsx)(c.tH,{onError:(e,t)=>(0,b.A)({error:{message:e.message,componentStack:t}}),FallbackComponent:D.A,children:(0,p.jsx)(H,{...s,flippedCard:e,setFlippedCard:t})},s.customer_id)))};const P=function(){const e=(0,n.Zp)(),t=()=>{window._kmq&&window._kmq.push(["record","clicked new org card"]),e("/organizations/new")};return(0,p.jsx)(v.A,{xs:"12",md:"6",lg:"4",xl:"3",className:"mb-4",children:(0,p.jsx)(c.tH,{onError:(e,t)=>(0,b.A)({error:{message:e.message,componentStack:t}}),FallbackComponent:f.A,children:(0,p.jsx)(N.A,{tabIndex:"0",id:"newOrgCard",title:"Add New Organization",className:"instance new",onKeyDown:e=>13!==e.keyCode||t(),onClick:t,children:(0,p.jsxs)(y.A,{className:"d-flex flex-column align-items-center justify-content-center",children:[(0,p.jsx)("span",{children:"Create A New Organization"}),(0,p.jsx)("div",{className:"my-4",children:(0,p.jsx)("i",{className:"fa fa-2x fa-plus-circle new-org-plus"})}),(0,p.jsx)("span",{children:"With Its Own Instances And Billing"})]})})})})};var U=s(6685),R=s(877),q=s(1340),L=s(1652);var W=s(4701);const Y=async e=>{let{formData:t,auth:s}=e;const{org:r,subdomain:a}=t;if(!r||!a)return{error:"All fields must be filled out"};if(!(0,W.A)(a))return{error:"subdomain: alphanumeric characters only"};if(a.length>16)return{error:"subdomain: max 16 characters"};const n=await(async e=>{let{auth:t,org:s,subdomain:r}=e;return(0,_.A)({endpoint:"addOrg",method:"POST",auth:t,payload:{org:s,subdomain:r,user_id:t.user_id}})})({auth:s,org:r,subdomain:a});return n.error?{error:n.message.replace("Bad request: ","").replace(/['"]+/g,"")}:{success:!0}};const Z=function(){const e=(0,i.O$)(o.A,(e=>e.auth)),t=(0,i.O$)(o.A,(e=>e.theme)),s=(0,n.Zp)(),[l,d]=(0,r.useState)({}),[x,h]=(0,r.useState)({}),[g,j]=(0,r.useState)(!1),A=()=>s("/organizations");return F()((async()=>{if(x.submitted){j(!1);const t=await Y({formData:l,auth:e});h(t),t.error||(await(0,S.A)(e),A())}}),[x]),(0,r.useEffect)((()=>{x.submitted||h({})}),[l]),(0,p.jsx)(U.A,{id:"new-org-modal",isOpen:!0,className:t,centered:!0,fade:!1,children:(0,p.jsx)(c.tH,{onError:(e,t)=>(0,b.A)({error:{message:e.message,componentStack:t}}),FallbackComponent:f.A,children:e.email_bounced?(0,p.jsx)(R.A,{children:(0,p.jsx)(N.A,{children:(0,p.jsxs)(y.A,{children:[(0,p.jsxs)("div",{className:"p-4 pb-0 text-center",children:[(0,p.jsx)("b",{children:"Unable to Create New Organization"}),(0,p.jsx)("br",{}),(0,p.jsx)("br",{}),"Your email address seems to be unreachable. Please update it to ensure billing, upgrade, and other critical system announcements reach you."]}),(0,p.jsxs)(a.A,{children:[(0,p.jsx)(v.A,{sm:"6",children:(0,p.jsx)(m.A,{id:"cancelNewOrg",onClick:()=>s("/organizations"),title:"Cancel New Org",block:!0,className:"mt-3",color:"grey",children:"Cancel"})}),(0,p.jsx)(v.A,{sm:"6",children:(0,p.jsx)(m.A,{id:"updateEmail",onClick:()=>s("/profile"),title:"Update My Email",block:!0,className:"mt-3",color:"danger",children:"Update My Email"})})]})]})})}):x.submitted?(0,p.jsx)(R.A,{children:(0,p.jsx)(N.A,{children:(0,p.jsx)(y.A,{children:(0,p.jsxs)("div",{className:"p-4 text-center",children:[(0,p.jsx)("b",{children:"Creating Your Organization"}),(0,p.jsx)("br",{}),(0,p.jsx)("br",{}),(0,p.jsx)("br",{}),(0,p.jsx)("i",{className:"fa fa-lg fa-spinner fa-spin text-purple mb-4"}),(0,p.jsx)("br",{}),(0,p.jsx)("br",{}),"The Organization Otterhound is fetching your stuff."]})})})}):x.success?(0,p.jsx)(R.A,{children:(0,p.jsx)(N.A,{children:(0,p.jsx)(y.A,{children:(0,p.jsxs)("div",{className:"p-4 text-center",children:[(0,p.jsx)("b",{children:"Success"}),(0,p.jsx)("br",{}),(0,p.jsx)("br",{}),(0,p.jsx)("br",{}),(0,p.jsx)("i",{className:"fa fa-lg fa-thumbs-up text-purple mb-4"}),(0,p.jsx)("br",{}),(0,p.jsx)("br",{}),"Your organization was created successfully."]})})})}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(q.A,{toggle:A,children:"Add New Organization"}),(0,p.jsxs)(R.A,{children:[(0,p.jsx)(N.A,{className:"mb-3",children:(0,p.jsxs)(y.A,{children:[(0,p.jsx)(L.A,{header:"Name",children:(0,p.jsxs)(a.A,{children:[(0,p.jsx)(v.A,{sm:"4",className:"pt-2 text-nowrap text-grey",children:'Ex: "My Org"'}),(0,p.jsx)(v.A,{sm:"8",children:(0,p.jsx)(u.A,{id:"org_name",className:"text-center",onChange:e=>d({...l,org:e.target.value}),type:"text",title:"name",value:l.org||""})})]})}),(0,p.jsxs)(L.A,{header:"Subdomain",subheader:"alphanumeric only. 16 char max.",children:[(0,p.jsxs)(a.A,{children:[(0,p.jsxs)(v.A,{sm:"4",className:"pt-2 text-nowrap text-grey",children:['Ex: "myorg"\xa0',(0,p.jsx)(m.A,{color:"link",title:"Learn more",onClick:()=>j(!g),children:(0,p.jsx)("i",{className:"fa fa-question-circle text-purple"})})]}),(0,p.jsx)(v.A,{sm:"8",children:(0,p.jsx)(u.A,{id:"subdomain",className:"text-center",type:"text",title:"subdomain",value:l.subdomain||"",disabled:x.submitted,onChange:e=>d({...l,subdomain:e.target.value.substring(0,15).toLowerCase()})})})]}),g&&(0,p.jsx)("div",{className:"text-center pt-2 pb-1 text-lightpurple text-small",children:(0,p.jsx)("i",{children:"Part of the URL of your Harper Cloud Instances- see below."})}),(0,p.jsx)("hr",{className:"my-2 d-none d-sm-block"}),(0,p.jsx)(a.A,{children:(0,p.jsx)(v.A,{xs:"12",className:"pt-2 text-center text-nowrap overflow-hidden text-truncate",children:l.subdomain?(0,p.jsxs)("i",{className:"text-grey",children:["INSTANCE_NAME-",l.subdomain,".harperdbcloud.com"]}):(0,p.jsx)("span",{className:"text-lightgrey",children:"INSTANCE_NAME-SUBDOMAIN.harperdbcloud.com"})})})]})]})}),(0,p.jsx)(m.A,{id:"createOrganization",onClick:()=>h({submitted:!0}),title:"Create Organization",block:!0,className:"mt-3",color:"success",children:"Create Organization"}),x.error&&(0,p.jsx)(N.A,{className:"mt-3 error",children:(0,p.jsx)(y.A,{children:x.error})})]})]})})})};var B=s(4979);const G=function(){const{list:e,action:t}=(0,n.g)(),s=(0,n.Zp)(),l=(0,i.O$)(o.A,(e=>e.auth));return(0,r.useEffect)((()=>o.A.update((e=>{e.users=!1,e.instances=!1,e.hasCard=!1,e.lastUpdate=!1})))),(0,r.useEffect)((()=>{1!==(null===l||void 0===l?void 0:l.orgs.filter((e=>["accepted","owner"].includes(e.status)))).length||e&&"sign-up"!==e||s(`/o/${l.orgs[0].customer_id}/instances`)}),[l,e]),(0,p.jsxs)("div",{id:"organizations",children:[(0,p.jsx)(A,{}),null!==l&&void 0!==l&&l.orgs?(0,p.jsxs)(a.A,{children:[(0,p.jsx)(c.tH,{onError:(e,t)=>(0,b.A)({error:{message:e.message,componentStack:t}}),FallbackComponent:D.A,children:(0,p.jsx)(P,{})}),(0,p.jsx)(I,{})]}):(0,p.jsx)(B.A,{header:"loading organizations",spinner:!0}),"new"===t&&(0,p.jsx)(Z,{})]})}},5429:(e,t,s)=>{s.d(t,{A:()=>i});s(9950);var r=s(7176),a=s(6114),n=s(4414);const i=function(e){let{label:t,value:s,textClass:i="",isReady:c,bottomDivider:o=!1}=e;return(0,n.jsxs)(r.A,{className:"card-front-status-row text-darkgrey",children:[(0,n.jsx)(a.A,{xs:"4",children:t}),(0,n.jsx)(a.A,{xs:"8",className:i,children:c?s:""}),o&&(0,n.jsx)(a.A,{xs:"12",children:(0,n.jsx)("hr",{})})]})}},1652:(e,t,s)=>{s.d(t,{A:()=>a});s(9950);var r=s(4414);const a=function(e){let{children:t,header:s,subheader:a,maxHeight:n="auto",minHeight:i="auto",className:c}=e;return(0,r.jsxs)("div",{className:`content-container ${c}`,children:[(0,r.jsxs)("div",{className:"header-container",children:[(0,r.jsx)("span",{className:"header",children:s}),(0,r.jsx)("span",{className:"subheader",children:a})]}),(0,r.jsx)("div",{className:"auto"!==n?"scrollable":"",style:{maxHeight:n,minHeight:i},children:t})]})}},1852:(e,t,s)=>{s.d(t,{A:()=>n});s(9950);var r=s(3150),a=s(4414);const n=function(e){return(0,a.jsx)(r.A,{...e,extraClass:"entity-card"})}},4701:(e,t,s)=>{s.d(t,{A:()=>r});const r=e=>e.match(/^[a-z0-9]+$/i)},8125:(e,t,s)=>{s.d(t,{A:()=>h});var r=s(9950),a=s(1942),n=s.n(a),i=s(8738),c=s.n(i),o=s(1497),l=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"];function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},d.apply(this,arguments)}function u(e,t){if(null==e)return{};var s,r,a=function(e,t){if(null==e)return{};var s,r,a={},n=Object.keys(e);for(r=0;r<n.length;r++)s=n[r],t.indexOf(s)>=0||(a[s]=e[s]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)s=n[r],t.indexOf(s)>=0||Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}var m={card:n().bool,className:n().string,cssModule:n().object,fill:n().bool,horizontal:n().oneOf(["center","end"]),justified:n().bool,navbar:n().bool,pills:n().bool,tabs:n().bool,tag:o.Wx,vertical:n().oneOfType([n().bool,n().string])};function x(e){var t=e.className,s=e.cssModule,a=e.tabs,n=e.pills,i=e.vertical,m=void 0!==i&&i,x=e.horizontal,h=e.justified,p=e.fill,g=e.navbar,j=e.card,f=e.tag,b=void 0===f?"ul":f,A=u(e,l),v=(0,o.qO)(c()(t,g?"navbar-nav":"nav",!!x&&"justify-content-".concat(x),function(e){return!1!==e&&(!0===e||"xs"===e?"flex-column":"flex-".concat(e,"-column"))}(m),{"nav-tabs":a,"card-header-tabs":j&&a,"nav-pills":n,"card-header-pills":j&&n,"nav-justified":h,"nav-fill":p}),s);return r.createElement(b,d({},A,{className:v}))}x.propTypes=m;const h=x},2072:(e,t,s)=>{s.d(t,{A:()=>p});var r=s(9950),a=s(1942),n=s.n(a),i=s(8738),c=s.n(i),o=s(1497),l=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"];function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},d.apply(this,arguments)}function u(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function m(e,t){if(null==e)return{};var s,r,a=function(e,t){if(null==e)return{};var s,r,a={},n=Object.keys(e);for(r=0;r<n.length;r++)s=n[r],t.indexOf(s)>=0||(a[s]=e[s]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)s=n[r],t.indexOf(s)>=0||Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}var x={children:n().node,className:n().string,color:n().string,container:n().oneOfType([n().bool,n().string]),cssModule:n().object,dark:n().bool,expand:n().oneOfType([n().bool,n().string]),fixed:n().string,light:n().bool,role:n().string,sticky:n().string,tag:o.Wx};function h(e){var t,s=e.expand,a=void 0!==s&&s,n=e.className,i=e.cssModule,x=e.light,h=e.dark,p=e.fixed,g=e.sticky,j=e.color,f=e.container,b=void 0===f?"fluid":f,A=e.tag,v=void 0===A?"nav":A,N=e.children,y=m(e,l),O=(0,o.qO)(c()(n,"navbar",function(e){return!1!==e&&(!0===e||"xs"===e?"navbar-expand":"navbar-expand-".concat(e))}(a),(u(t={"navbar-light":x,"navbar-dark":h},"bg-".concat(j),j),u(t,"fixed-".concat(p),p),u(t,"sticky-".concat(g),g),t)),i),_=b&&!0===b?"container":"container-".concat(b);return r.createElement(v,d({},y,{className:O}),b?r.createElement("div",{className:_},N):N)}h.propTypes=x;const p=h},9163:(e,t,s)=>{var r=s(9950);function a(e,t,s){var a="function"===typeof t;r.useEffect((function(){var s,r=!0,n=e((function(){return r}));return Promise.resolve(n).then((function(e){s=e})),function(){r=!1,a&&t(s)}}),a?s:t)}e.exports=a,e.exports.useAsyncEffect=a}}]);