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.4 kB
JavaScript
;(self.webpackChunkharperdb_studio=self.webpackChunkharperdb_studio||[]).push([[678],{5203:(e,t,s)=>{s.r(t),s.d(t,{default:()=>Q});var a=s(9950),r=s(7176),n=s(5077),c=s(6713),i=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,c.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,c.O$)(o.A,(e=>e.auth.orgs)),[t,s]=a.useState(!0);return(0,p.jsx)(m.A,{color:"link",className:"btn btn-purple px-4 mx-2",onClick:()=>{o.A.update((a=>{a.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)(i.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(9379),N=s(45),y=s(6114),O=s(4084),_=s(8156),C=s(7348),k=s(2714);const S=async e=>{let{auth:t,customer_id:s,user_id:a,status:r}=e;return(0,k.A)({endpoint:"updateUserOrgs",method:"POST",payload:{customer_id:s,user_id:a,status:r},auth:t})};var w=s(5429),E=s(3304);const z=function(e){let{loading:t,status:s,customer_name:r,setFlipState:n,total_instance_count:c}=e;const i=(0,C.MW)(),o=(0,a.useCallback)((e=>{e.stopPropagation();const t=e.currentTarget.getAttribute("data-action");"delete"===t&&c?i.error("You must remove all instances from an Organization before deleting it."):n(t)}),[c,i,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 ".concat(r," 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 ".concat(r," organization"),onClick:o,children:(0,p.jsx)("i",{className:"fa fa-trash delete text-purple ".concat(c?"disabled":"")})}):null};const F=function(e){let{customer_name:t,customer_id:s,total_instance_count:l,status:d,setFlipState:u}=e;const x=(0,c.O$)(o.A,(e=>e.auth)),[h,g]=(0,a.useState)(!1),j=(0,n.Zp)(),A=(0,C.MW)(),v=!h&&["owner","accepted"].includes(d),N=async e=>{const t=e.currentTarget.getAttribute("data-status");g(t);const a=await S({auth:x,customer_id:s,user_id:x.user_id,status:t});a.error?(A.error(a.message),g(!1)):(await(0,E.A)(x),"declined"!==t&&g(!1),A.success("Organization ".concat(t," successfully")))};return(0,p.jsx)(i.tH,{onError:(e,t)=>(0,b.A)({error:{message:e.message,componentStack:t},customer_id:s}),FallbackComponent:f.A,children:(0,p.jsx)(O.A,{className:"instance ".concat(v?"clickable":""),onClick:async()=>v&&j("/o/".concat(s,"/instances")),children:(0,p.jsxs)(_.A,{children:[(0,p.jsxs)(r.A,{className:"g-0",children:[(0,p.jsx)(y.A,{xs:"10",className:"org-name",children:t}),(0,p.jsx)(y.A,{xs:"2",className:"status-icons text-end",children:(0,p.jsx)(z,{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)(w.A,{textClass:"text-bold",label:"ROLE",isReady:!0,value:"accepted"===d?"USER":d.toUpperCase(),bottomDivider:!0}),(0,p.jsx)(w.A,{label:"INSTANCES",isReady:!0,value:l||"..."}),(0,p.jsx)("div",{className:"action-buttons",children:"invited"===d&&(0,p.jsxs)(r.A,{className:"g-0",children:[(0,p.jsx)(y.A,{xs:"6",className:"pe-1",children:(0,p.jsx)(m.A,{title:"Decline invitation to ".concat(t," organization"),disabled:!!h,color:"danger",block:!0,"data-status":"declined",onClick:N,children:"declined"===h?(0,p.jsx)("i",{className:"fa fa-spinner fa-spin text-white"}):(0,p.jsx)("span",{children:"Decline"})})}),(0,p.jsx)(y.A,{xs:"6",className:"ps-1",children:(0,p.jsx)(m.A,{title:"Accept invitation to ".concat(t," organization"),disabled:!!h,color:"success",block:!0,"data-status":"accepted",onClick:N,children:"accepted"===h?(0,p.jsx)("i",{className:"fa fa-spinner fa-spin text-white"}):(0,p.jsx)("span",{children:"Join"})})})]})})]})})})};var T=s(9163),M=s.n(T);const D=function(e){var t;let{customer_id:s,customer_name:n,setFlipState:l,flipState:d}=e;const x=(0,C.MW)(),h=(0,c.O$)(o.A,(e=>e.auth)),[g,j]=(0,a.useState)({}),[A,v]=(0,a.useState)({});return M()((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 S({auth:h,customer_id:s,user_id:h.user_id,status:"removed"});e.error?x.error(e.message):(await(0,E.A)(h),x.success("Organization removed from your profile successfully"))}}}),[g]),(0,p.jsx)(i.tH,{onError:(e,t)=>(0,b.A)({error:{message:e.message,componentStack:t},customer_id:s}),FallbackComponent:f.A,children:(0,p.jsx)(O.A,{className:"instance",children:d&&(0,p.jsxs)(_.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=>v({delete_customer_name:e.target.value}),type:"text",title:"customer name",className:"my-3",placeholder:'Enter "'.concat(n,'" here to confirm.'),value:A.customer_name}),(0,p.jsxs)(r.A,{children:[(0,p.jsx)(y.A,{children:(0,p.jsx)(m.A,{onClick:()=>l(!1),title:"Cancel",block:!0,disabled:g.submitted,color:"grey",children:"Cancel"})}),(0,p.jsx)(y.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 H=function(e){var t;let{customer_id:s,customer_name:n,setFlipState:l,flipState:d}=e;const x=(0,C.MW)(),h=(0,c.O$)(o.A,(e=>e.auth)),[g,j]=(0,a.useState)({}),[A,v]=(0,a.useState)({});return M()((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:a}=e;return(0,k.A)({endpoint:"removeOrg",method:"POST",payload:{user_id:s,customer_id:a},auth:t})})({auth:h,customer_id:s.toString(),user_id:h.user_id});e.error?j({error:e.message}):(await(0,E.A)(h),x.success("Organization removed successfully"))}}}),[g]),(0,p.jsx)(i.tH,{onError:(e,t)=>(0,b.A)({error:{message:e.message,componentStack:t},customer_id:s}),FallbackComponent:f.A,children:(0,p.jsx)(O.A,{className:"instance",children:d&&(0,p.jsx)(_.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=>v({delete_customer_name:e.target.value}),type:"text",title:"customer name",className:"my-3",placeholder:'Enter "'.concat(n,'" here to confirm.'),value:A.customer_name}),(0,p.jsxs)(r.A,{children:[(0,p.jsx)(y.A,{children:(0,p.jsx)(m.A,{onClick:()=>l(!1),title:"Cancel",block:!0,disabled:g.submitted,color:"grey",children:"Cancel"})}),(0,p.jsx)(y.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 I=function(e){return"leave"===e.flipState?(0,p.jsx)(D,(0,v.A)({},e)):(0,p.jsx)(H,(0,v.A)({},e))};var P=s(1852);const U=["flippedCard","setFlippedCard","customer_id"];const $=function(e){let{flippedCard:t,setFlippedCard:s,customer_id:r}=e,n=(0,N.A)(e,U);const[c,o]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{t!==r&&o(!1)}),[t]),(0,a.useEffect)((()=>{c&&s(r)}),[c]),(0,p.jsx)(y.A,{xs:"12",md:"6",lg:"4",xl:"3",className:"mb-4",children:(0,p.jsx)(i.tH,{onError:(e,t)=>(0,b.A)({error:{message:e.message,componentStack:t},customer_id:r}),FallbackComponent:P.A,children:c?(0,p.jsx)(I,(0,v.A)({setFlipState:o,flipState:c,customer_id:r},n)):(0,p.jsx)(F,(0,v.A)({setFlipState:o,flipState:c,customer_id:r},n))})})},R=()=>{const[e,t]=(0,a.useState)(!1);return(0,c.O$)(o.A,(e=>(e=>{let{orgSearch:t,orgs:s}=e;if(!s)return[];const a=((e,t)=>{const s={};return e.filter((e=>!s[e[t]]&&(s[e[t]]=!0,!0)))})(s,"customer_id");return t&&""!==t?a.filter((e=>e.customer_name&&-1!==e.customer_name.toLowerCase().indexOf(t.toLowerCase()))):a})({orgSearch:e.orgSearch,orgs:e.auth.orgs}))).map((s=>(0,p.jsx)(i.tH,{onError:(e,t)=>(0,b.A)({error:{message:e.message,componentStack:t}}),FallbackComponent:P.A,children:(0,p.jsx)($,(0,v.A)((0,v.A)({},s),{},{flippedCard:e,setFlippedCard:t}))},s.customer_id)))};const q=function(){const e=(0,n.Zp)(),t=()=>{window._kmq&&window._kmq.push(["record","clicked new org card"]),e("/organizations/new")};return(0,p.jsx)(y.A,{xs:"12",md:"6",lg:"4",xl:"3",className:"mb-4",children:(0,p.jsx)(i.tH,{onError:(e,t)=>(0,b.A)({error:{message:e.message,componentStack:t}}),FallbackComponent:f.A,children:(0,p.jsx)(O.A,{tabIndex:"0",id:"newOrgCard",title:"Add New Organization",className:"instance new",onKeyDown:e=>13!==e.keyCode||t(),onClick:t,children:(0,p.jsxs)(_.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 L=s(6685),W=s(877),Y=s(1340),Z=s(1652);var B=s(4701);const G=async e=>{let{formData:t,auth:s}=e;const{org:a,subdomain:r}=t;if(!a||!r)return{error:"All fields must be filled out"};if(!(0,B.A)(r))return{error:"subdomain: alphanumeric characters only"};if(r.length>16)return{error:"subdomain: max 16 characters"};const n=await(async e=>{let{auth:t,org:s,subdomain:a}=e;return(0,k.A)({endpoint:"addOrg",method:"POST",auth:t,payload:{org:s,subdomain:a,user_id:t.user_id}})})({auth:s,org:a,subdomain:r});return n.error?{error:n.message.replace("Bad request: ","").replace(/['"]+/g,"")}:{success:!0}};const J=function(){const e=(0,c.O$)(o.A,(e=>e.auth)),t=(0,c.O$)(o.A,(e=>e.theme)),s=(0,n.Zp)(),[l,d]=(0,a.useState)({}),[x,h]=(0,a.useState)({}),[g,j]=(0,a.useState)(!1),A=()=>s("/organizations");return M()((async()=>{if(x.submitted){j(!1);const t=await G({formData:l,auth:e});h(t),t.error||(await(0,E.A)(e),A())}}),[x]),(0,a.useEffect)((()=>{x.submitted||h({})}),[l]),(0,p.jsx)(L.A,{id:"new-org-modal",isOpen:!0,className:t,centered:!0,fade:!1,children:(0,p.jsx)(i.tH,{onError:(e,t)=>(0,b.A)({error:{message:e.message,componentStack:t}}),FallbackComponent:f.A,children:e.email_bounced?(0,p.jsx)(W.A,{children:(0,p.jsx)(O.A,{children:(0,p.jsxs)(_.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)(r.A,{children:[(0,p.jsx)(y.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)(y.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)(W.A,{children:(0,p.jsx)(O.A,{children:(0,p.jsx)(_.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)(W.A,{children:(0,p.jsx)(O.A,{children:(0,p.jsx)(_.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)(Y.A,{toggle:A,children:"Add New Organization"}),(0,p.jsxs)(W.A,{children:[(0,p.jsx)(O.A,{className:"mb-3",children:(0,p.jsxs)(_.A,{children:[(0,p.jsx)(Z.A,{header:"Name",children:(0,p.jsxs)(r.A,{children:[(0,p.jsx)(y.A,{sm:"4",className:"pt-2 text-nowrap text-grey",children:'Ex: "My Org"'}),(0,p.jsx)(y.A,{sm:"8",children:(0,p.jsx)(u.A,{id:"org_name",className:"text-center",onChange:e=>d((0,v.A)((0,v.A)({},l),{},{org:e.target.value})),type:"text",title:"name",value:l.org||""})})]})}),(0,p.jsxs)(Z.A,{header:"Subdomain",subheader:"alphanumeric only. 16 char max.",children:[(0,p.jsxs)(r.A,{children:[(0,p.jsxs)(y.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)(y.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((0,v.A)((0,v.A)({},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)(r.A,{children:(0,p.jsx)(y.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)(O.A,{className:"mt-3 error",children:(0,p.jsx)(_.A,{children:x.error})})]})]})})})};var K=s(4979);const Q=function(){const{list:e,action:t}=(0,n.g)(),s=(0,n.Zp)(),l=(0,c.O$)(o.A,(e=>e.auth));return(0,a.useEffect)((()=>o.A.update((e=>{e.users=!1,e.instances=!1,e.hasCard=!1,e.lastUpdate=!1})))),(0,a.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/".concat(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)(r.A,{children:[(0,p.jsx)(i.tH,{onError:(e,t)=>(0,b.A)({error:{message:e.message,componentStack:t}}),FallbackComponent:P.A,children:(0,p.jsx)(q,{})}),(0,p.jsx)(R,{})]}):(0,p.jsx)(K.A,{header:"loading organizations",spinner:!0}),"new"===t&&(0,p.jsx)(J,{})]})}},5429:(e,t,s)=>{s.d(t,{A:()=>c});s(9950);var a=s(7176),r=s(6114),n=s(4414);const c=function(e){let{label:t,value:s,textClass:c="",isReady:i,bottomDivider:o=!1}=e;return(0,n.jsxs)(a.A,{className:"card-front-status-row text-darkgrey",children:[(0,n.jsx)(r.A,{xs:"4",children:t}),(0,n.jsx)(r.A,{xs:"8",className:c,children:i?s:""}),o&&(0,n.jsx)(r.A,{xs:"12",children:(0,n.jsx)("hr",{})})]})}},1652:(e,t,s)=>{s.d(t,{A:()=>r});s(9950);var a=s(4414);const r=function(e){let{children:t,header:s,subheader:r,maxHeight:n="auto",minHeight:c="auto",className:i}=e;return(0,a.jsxs)("div",{className:"content-container ".concat(i),children:[(0,a.jsxs)("div",{className:"header-container",children:[(0,a.jsx)("span",{className:"header",children:s}),(0,a.jsx)("span",{className:"subheader",children:r})]}),(0,a.jsx)("div",{className:"auto"!==n?"scrollable":"",style:{maxHeight:n,minHeight:c},children:t})]})}},1852:(e,t,s)=>{s.d(t,{A:()=>c});var a=s(9379),r=(s(9950),s(3150)),n=s(4414);const c=function(e){return(0,n.jsx)(r.A,(0,a.A)((0,a.A)({},e),{},{extraClass:"entity-card"}))}},4701:(e,t,s)=>{s.d(t,{A:()=>a});const a=e=>e.match(/^[a-z0-9]+$/i)},8125:(e,t,s)=>{s.d(t,{A:()=>h});var a=s(9950),r=s(1942),n=s.n(r),c=s(8738),i=s.n(c),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 a in s)Object.prototype.hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},d.apply(this,arguments)}function u(e,t){if(null==e)return{};var s,a,r=function(e,t){if(null==e)return{};var s,a,r={},n=Object.keys(e);for(a=0;a<n.length;a++)s=n[a],t.indexOf(s)>=0||(r[s]=e[s]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)s=n[a],t.indexOf(s)>=0||Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}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,r=e.tabs,n=e.pills,c=e.vertical,m=void 0!==c&&c,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)(i()(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":r,"card-header-tabs":j&&r,"nav-pills":n,"card-header-pills":j&&n,"nav-justified":h,"nav-fill":p}),s);return a.createElement(b,d({},A,{className:v}))}x.propTypes=m;const h=x},2072:(e,t,s)=>{s.d(t,{A:()=>p});var a=s(9950),r=s(1942),n=s.n(r),c=s(8738),i=s.n(c),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 a in s)Object.prototype.hasOwnProperty.call(s,a)&&(e[a]=s[a])}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,a,r=function(e,t){if(null==e)return{};var s,a,r={},n=Object.keys(e);for(a=0;a<n.length;a++)s=n[a],t.indexOf(s)>=0||(r[s]=e[s]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)s=n[a],t.indexOf(s)>=0||Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}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,r=void 0!==s&&s,n=e.className,c=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)(i()(n,"navbar",function(e){return!1!==e&&(!0===e||"xs"===e?"navbar-expand":"navbar-expand-".concat(e))}(r),(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)),c),_=b&&!0===b?"container":"container-".concat(b);return a.createElement(v,d({},y,{className:O}),b?a.createElement("div",{className:_},N):N)}h.propTypes=x;const p=h},9163:(e,t,s)=>{var a=s(9950);function r(e,t,s){var r="function"===typeof t;a.useEffect((function(){var s,a=!0,n=e((function(){return a}));return Promise.resolve(n).then((function(e){s=e})),function(){a=!1,r&&t(s)}}),r?s:t)}e.exports=r,e.exports.useAsyncEffect=r}}]);