1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[85901],{42588:function(e,n,t){"use strict";t.d(n,{Ee:function(){return m},Y8:function(){return p},ar:function(){return useRadioGroup},xL:function(){return useRadio}});var r=t(67294),i=t(38655),s=t(54520),o=t(28387),a=t(76734),l=t(83234),c=t(46256),cx=(...e)=>e.filter(Boolean).join(" ");function isObject(e){let n=typeof e;return null!=e&&("object"===n||"function"===n)&&!Array.isArray(e)}var dataAttr=e=>e?"":void 0,ariaAttr=e=>!!e||void 0;function callAllHandlers(...e){return function(n){e.some(e=>(null==e||e(n),null==n?void 0:n.defaultPrevented))}}function useRadioGroup(e={}){let{onChange:n,value:t,defaultValue:i,name:s,isDisabled:o,isFocusable:l,isNative:c,...d}=e,[u,m]=(0,r.useState)(i||""),g=void 0!==t,p=g?t:u,x=(0,r.useRef)(null),h=(0,r.useCallback)(()=>{let e=x.current;if(!e)return;let n="input:not(:disabled):checked",t=e.querySelector(n);if(t){t.focus();return}n="input:not(:disabled)";let r=e.querySelector(n);null==r||r.focus()},[]),j=(0,r.useId)(),y=`radio-${j}`,f=s||y,v=(0,r.useCallback)(e=>{let t=e&&isObject(e)&&isObject(e.target)?e.target.value:e;g||m(t),null==n||n(String(t))},[n,g]),b=(0,r.useCallback)((e={},n=null)=>({...e,ref:(0,a.lq)(n,x),role:"radiogroup"}),[]),S=(0,r.useCallback)((e={},n=null)=>{let t=c?"checked":"isChecked";return{...e,ref:n,name:f,[t]:null!=p?e.value===p:void 0,onChange(e){v(e)},"data-radiogroup":!0}},[c,f,v,p]);return{getRootProps:b,getRadioProps:S,name:f,ref:x,focus:h,setValue:m,value:p,onChange:v,isDisabled:o,isFocusable:l,htmlProps:d}}var[d,u]=(0,o.k)({name:"RadioGroupContext",strict:!1}),m=(0,i.Gp)((e,n)=>{let{colorScheme:t,size:s,variant:o,children:a,className:l,isDisabled:c,isFocusable:u,...m}=e,{value:g,onChange:p,getRootProps:x,name:h,htmlProps:j}=useRadioGroup(m),y=(0,r.useMemo)(()=>({name:h,size:s,onChange:p,colorScheme:t,value:g,variant:o,isDisabled:c,isFocusable:u}),[h,s,p,t,g,o,c,u]);return r.createElement(d,{value:y},r.createElement(i.m$.div,{...x(j,n),className:cx("chakra-radio-group",l)},a))});m.displayName="RadioGroup";var g={border:"0px",clip:"rect(0px, 0px, 0px, 0px)",height:"1px",width:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};function useRadio(e={}){let{defaultChecked:n,isChecked:t,isFocusable:i,isDisabled:s,isReadOnly:o,isRequired:a,onChange:d,isInvalid:m,name:p,value:x,id:h,"data-radiogroup":j,"aria-describedby":y,...f}=e,v=`radio-${(0,r.useId)()}`,b=(0,l.NJ)(),S=u(),E=b&&!(S||j)?b.id:v;E=h??E;let C=s??(null==b?void 0:b.isDisabled),_=o??(null==b?void 0:b.isReadOnly),M=a??(null==b?void 0:b.isRequired),F=m??(null==b?void 0:b.isInvalid),[I,O]=(0,r.useState)(!1),[D,N]=(0,r.useState)(!1),[A,T]=(0,r.useState)(!1),[w,L]=(0,r.useState)(!1),[P,q]=(0,r.useState)(!!n),U=void 0!==t,R=U?t:P;(0,r.useEffect)(()=>(0,c.B)(O),[]);let G=(0,r.useCallback)(e=>{if(_||C){e.preventDefault();return}U||q(e.target.checked),null==d||d(e)},[U,C,_,d]),Y=(0,r.useCallback)(e=>{" "===e.key&&L(!0)},[L]),K=(0,r.useCallback)(e=>{" "===e.key&&L(!1)},[L]),B=(0,r.useCallback)((e={},n=null)=>({...e,ref:n,"data-active":dataAttr(w),"data-hover":dataAttr(A),"data-disabled":dataAttr(C),"data-invalid":dataAttr(F),"data-checked":dataAttr(R),"data-focus":dataAttr(D),"data-focus-visible":dataAttr(D&&I),"data-readonly":dataAttr(_),"aria-hidden":!0,onMouseDown:callAllHandlers(e.onMouseDown,()=>L(!0)),onMouseUp:callAllHandlers(e.onMouseUp,()=>L(!1)),onMouseEnter:callAllHandlers(e.onMouseEnter,()=>T(!0)),onMouseLeave:callAllHandlers(e.onMouseLeave,()=>T(!1))}),[w,A,C,F,R,D,_,I]),{onFocus:k,onBlur:z}=b??{},H=(0,r.useCallback)((e={},n=null)=>{let t=C&&!i;return{...e,id:E,ref:n,type:"radio",name:p,value:x,onChange:callAllHandlers(e.onChange,G),onBlur:callAllHandlers(z,e.onBlur,()=>N(!1)),onFocus:callAllHandlers(k,e.onFocus,()=>N(!0)),onKeyDown:callAllHandlers(e.onKeyDown,Y),onKeyUp:callAllHandlers(e.onKeyUp,K),checked:R,disabled:t,readOnly:_,required:M,"aria-invalid":ariaAttr(F),"aria-disabled":ariaAttr(t),"aria-required":ariaAttr(M),"data-readonly":dataAttr(_),"aria-describedby":y,style:g}},[C,i,E,p,x,G,z,k,Y,K,R,_,M,F,y]);return{state:{isInvalid:F,isFocused:D,isChecked:R,isActive:w,isHovered:A,isDisabled:C,isReadOnly:_,isRequired:M},getCheckboxProps:B,getInputProps:H,getLabelProps:(e={},n=null)=>
1({...e,ref:n,onMouseDown:callAllHandlers(e.onMouseDown,stop),onTouchStart:callAllHandlers(e.onTouchStart,stop),"data-disabled":dataAttr(C),"data-checked":dataAttr(R),"data-invalid":dataAttr(F)}),getRootProps:(e,n=null)=>({...e,ref:n,"data-disabled":dataAttr(C),"data-checked":dataAttr(R),"data-invalid":dataAttr(F)}),htmlProps:f}}function stop(e){e.preventDefault(),e.stopPropagation()}var p=(0,i.Gp)((e,n)=>{let t=u(),{onChange:o,value:a}=e,l=(0,i.jC)("Radio",{...t,...e}),c=(0,s.Lr)(e),{spacing:d="0.5rem",children:m,isDisabled:g=null==t?void 0:t.isDisabled,isFocusable:p=null==t?void 0:t.isFocusable,inputProps:x,...h}=c,j=e.isChecked;(null==t?void 0:t.value)!=null&&null!=a&&(j=t.value===a);let y=o;(null==t?void 0:t.onChange)&&null!=a&&(y=function(...e){return function(n){e.forEach(e=>{null==e||e(n)})}}(t.onChange,o));let f=(null==e?void 0:e.name)??(null==t?void 0:t.name),{getInputProps:v,getCheckboxProps:b,getLabelProps:S,getRootProps:E,htmlProps:C}=useRadio({...h,isChecked:j,isFocusable:p,isDisabled:g,onChange:y,name:f}),[_,M]=function(e,n){let t={},r={};for(let[i,s]of Object.entries(e))n.includes(i)?t[i]=s:r[i]=s;return[t,r]}(C,s.oE),F=b(M),I=v(x,n),O=S(),D=Object.assign({},_,E()),N={display:"inline-flex",alignItems:"center",verticalAlign:"top",cursor:"pointer",position:"relative",...l.container},A={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,...l.control},T={userSelect:"none",marginStart:d,...l.label};return r.createElement(i.m$.label,{className:"chakra-radio",...D,__css:N},r.createElement("input",{className:"chakra-radio__input",...I}),r.createElement(i.m$.span,{className:"chakra-radio__control",...F,__css:A}),m&&r.createElement(i.m$.span,{className:"chakra-radio__label",...O,__css:T},m))});p.displayName="Radio"},43122:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/settings/generalSettings",function(){return t(71207)}])},85200:function(e,n,t){"use strict";t.d(n,{DY:function(){return AdminPage},hb:function(){return o},lm:function(){return AdminPageHeading},yG:function(){return AdminPageHeader}});var r=t(85893),i=t(48641),s=t(38655);t(67294);let AdminPage=e=>{let{children:n,...t}=e;return(0,r.jsx)(i.xu,{...t,children:n})},AdminPageHeader=e=>{let{children:n,...t}=e;return(0,r.jsx)(i.Kq,{direction:"row",spacing:"4",alignItems:"flex-start",...t,children:n})},AdminPageHeading=e=>{let{children:n,...t}=e;return(0,r.jsx)(i.X6,{size:"md",...t,children:n})},o=(0,s.Gp)((e,n)=>{let{children:t,...s}=e;return(0,r.jsx)(i.xu,{marginY:"5",...s,ref:n,children:t})})},9556:function(e,n,t){"use strict";t.d(n,{Y:function(){return l},H:function(){return a}});var r=t(85893),i=t(48641),s=t(42588),o=t(67294);let a=o.forwardRef((e,n)=>{let{children:t,variant:o="attached",value:a,onChange:l,...c}=e,d={attached:{borderWidth:"1px",borderColor:"gray.200",divider:(0,r.jsx)(i.cX,{}),spacing:"0"},spaced:{}}[o];return(0,r.jsx)(s.Ee,{...d,as:i.Kq,variant:o,borderRadius:"xl",value:a,onChange:l,ref:n,tabIndex:-1,...c,children:t})});a.displayName="BigRadioGroup";let l=o.forwardRef((e,n)=>{let{children:t,...i}=e;return(0,r.jsx)(s.Y8,{...i,ref:n,children:t})});l.displayName="BigRadio"},12995:function(e,n,t){"use strict";t.d(n,{CX:function(){return Editable},$l:function(){return EditableCancel},sD:function(){return EditableCard},EO:function(){return EditableClosed},FT:function(){return EditableFooter},p0:function(){return EditableOpen},$P:function(){return EditableSubmit},yP:function(){return EditableToggle}});var r=t(85893),i=t(67294),s=t(90195);let o=i.createContext(null),useEditable=()=>{let e=i.useContext(o);if(!e)throw Error("You have to this inside of an <Editable/>");return e},Editable=e=>{let{children:n,...t}=e,i=(0,s.qY)(),[,a]=(0,s.pY)(t,i);return(0,r.jsx)(o.Provider,{value:{editing:a},children:n})},EditableClosed=e=>{let{editing:n}=useEditable();return n.isOpen?null:(0,r.jsx)(r.Fragment,{children:e.children})},EditableOpen=e=>{let{editing:n}=useEditable();return n.isOpen?(0,r.jsx)(r.Fragment,{children:e.children}):null};var a=t(47741);let EditableToggle=e=>{let{editing:n}=useEditable();return(0,r.jsx)(a.zx,{visibility:n.isOpen?"hidden":void 0,isDisabled:n.isOpen,onClick:n.onToggle,size:"sm",variant:"outline",colorScheme:"gray",...e})};EditableToggle.defaultProps={children:"Edit"};let EditableCancel=e=>{let{editing:n}=useEditable();return(0,r.jsx)(a.zx,{onClick:n.onToggle,size:"sm",variant:"outline",colorScheme:"primary",borderColor:"primary.500",...e})};EditableCancel.defaultProps={children:"Cancel"};
1var l=t(52670);let EditableCard=e=>{let{newView:n,...t}=e;return(0,r.jsx)(l.Z,{p:n?"4":"6",pt:n?"0":"6",...t})};var c=t(48641);let EditableFooter=e=>{let{editing:n}=useEditable();return n.isOpen?(0,r.jsx)(c.Kq,{direction:"row",justifyContent:"flex-end",...e}):null},EditableSubmit=e=>(0,r.jsx)(a.zx,{size:"sm",...e});EditableSubmit.defaultProps={children:"Submit"}},39174:function(e,n,t){"use strict";t.d(n,{A:function(){return NoMatchPage}});var r=t(85893),i=t(48641),s=t(23887),o=t(47741),a=t(11163);t(67294);let NoMatchPage=()=>{let e=(0,a.useRouter)();return(0,r.jsxs)(i.gC,{p:"12",spacing:"4",textAlign:"center",children:[(0,r.jsx)(s.Ee,{src:"https://tradewing-public.s3.us-east-2.amazonaws.com/tradewing-logo.png",alt:"Tradewing",width:"50px",height:"50px"}),(0,r.jsx)(i.xv,{textStyle:"xlBodyStrong",children:"Page Not Found"}),(0,r.jsx)(i.xv,{children:"Please check that you have the correct URL and try again. If you need help finding and accessing your community, please contact [email protected]."}),(0,r.jsx)(o.zx,{onClick:()=>e.push("/"),children:"Return to Site"})]})}},29802:function(e,n,t){"use strict";t.d(n,{F:function(){return r.F}});var r=t(21279)},21279:function(e,n,t){"use strict";t.d(n,{F:function(){return useFileUpload}});var r=t(82729),i=t(50456),s=t(50319),o=t(69073),a=t(49517);function _templateObject(){let e=(0,r._)(["\n mutation useFileUpload_UploadVersionFileV2(\n $input: PrepVersionFilesAtSourceInputV2!\n ) {\n prepVersionFilesAtSourceV2(input: $input) {\n results {\n presignedS3Url\n versionFileId\n metadataHeaders {\n name\n value\n }\n }\n }\n }\n"]);return _templateObject=function(){return e},e}let l=(0,i.Ps)(_templateObject()),useFileUpload=e=>{let[n]=(0,s.D)(l),[t,{isUploading:r,uploadProgress:i,numUploading:c}]=(0,o.w)(),uploadFiles=async r=>{try{let{data:i}=await n({variables:{input:{source:e,fileInfo:r.map(e=>({name:e.name,type:e.type,size:e.size}))}}});if(!(null==i?void 0:i.prepVersionFilesAtSourceV2))throw Error("Version file upload prep failed");if((null==i?void 0:i.prepVersionFilesAtSourceV2.results.length)!==r.length)throw Error("failed to prep for version file upload");let s=null==i?void 0:i.prepVersionFilesAtSourceV2.results.map(async(e,n)=>{let{metadataHeaders:i,presignedS3Url:s,versionFileId:o}=e,a={};return null==i||i.forEach(e=>{let{name:n,value:t}=e;n&&t&&(a[n]=t)}),await t({file:r[n],presignedS3Url:s,metadataHeaders:a}),o}),o=await Promise.all(s);return o}catch(e){return(0,a.H)(e),[]}};return{uploadFiles,isUploading:r,uploadProgress:i,numUploading:c}}},71207:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return eF}});var r,i,s,o,a,l,c=t(82729),d=t(85893),u=t(50456),m=t(37887),g=t(48641),p=t(67294),x=t(85200),h=t(96317),j=t(69171),y=t(48076),f=t(50319),v=t(80419),b=t(90195),S=t(97026),E=t(87536),C=t(9556),_=t(12995),M=t(15927),F=t(47503),I=t(63205),O=t(6491);function _templateObject(){let e=(0,c._)(["\n fragment AccountCreationForm_TenantFragment on Tenant {\n _id\n accountCreationPermission\n }\n"]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,c._)(["\n mutation AccountCreationForm_UpdateTenant($input: UpdateTenantInput!) {\n updateTenant(input: $input) {\n data {\n _id\n ...AccountCreationForm_TenantFragment\n }\n }\n }\n ","\n"]);return _templateObject1=function(){return e},e}let D=(0,u.Ps)(_templateObject()),N=(0,u.Ps)(_templateObject1(),D),A={[F.YQ.ANYONE]:(0,d.jsx)(O.n9J,{}),[F.YQ.INVITE_ONLY]:(0,d.jsx)(O.mBM,{})},T={[F.YQ.ANYONE]:"Anyone can Create an Account",[F.YQ.INVITE_ONLY]:"Invite Only"},w={[F.YQ.ANYONE]:"Anyone can sign up for a Tradewing account on their own",[F.YQ.INVITE_ONLY]:"People must be invited by admins to create a Tradewing account"},AccountCreationForm=e=>{let{tenant:n}=e,t=(0,v.pm)(),r=(0,b.qY)();(0,I.U)();let i=p.useMemo(()=>({accountCreationPermission:n.accountCreationPermission}),[n.accountCreationPermission]),{control:s,formState:{isSubmitting:o},handleSubmit:a,reset:l}=(0,E.cI)({defaultValues:i});p.useEffect(()=>l(i),[i,l]);let[c]=(0,f.D)(N),u=a(async e=>{try{await c({variables:{input:{id:n._id,data:{accountCreationPermission:e.accountCreationPermission}}}}),r.onClose()}catch(e){t({status:"error",description:e.message})}});return(0,d.jsx)(_.CX,{...r,children:(0,d.jsx)(_.sD,{children:(0,d.jsxs)(g.Kq,{spacing:"4",children:[(0,d.jsxs)(g.Kq,{direction:"row",spacing:"4",children:[(0,d.jsx)(g.xv,{textStyle:"xlBodyStrong",flex:"1",children:"Account Creation"}),(0,d.jsx)(_.yP,{})]}),(0,d.jsx)(_.p0,{children:(0,d.jsx)(E.Qr,{control:s,name:"accountCreationPermission",render:e=>{let{field:{value:n,onChange:t,onBlur:r,ref:i}}=e;return(0,d.jsxs)(C.H,{direction:"row",variant:"spaced",value:n,onChange:t,onBlur:r,ref:i,children:[(0,d.jsx)(C.Y,{value:F.YQ.ANYONE,children:(0,d.jsxs)(g.Kq,{spacing:"0",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[A[F.YQ.ANYONE],(0,d.jsx)(g.xv,{textStyle:"bodyStrong",children:T[F.YQ.ANYONE]})]}),(0,d.jsx)(g.xv,{textStyle:"compact",color:"gray.600",children:w[F.YQ.ANYONE]})]})}),(0,d.jsx)(C.Y,{value:F.YQ.INVITE_ONLY,children:(0,d.jsxs)(g.Kq,{spacing:"0",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[A[F.YQ.INVITE_ONLY],(0,d.jsx)(g.xv,{textStyle:"bodyStrong",children:T[F.YQ.INVITE_ONLY]})]}),(0,d.jsx)(g.xv,{textStyle:"compact",color:"gray.600",children:w[F.YQ.INVITE_ONLY]})]})})]})}})}),(0,d.jsx)(_.EO,{children:(0,d.jsx)(M.Q_,{children:(0,d.jsxs)(M.Ic,{as:g.Kq,direction:"row",alignItems:"center",children:[A[n.accountCreationPermission],(0,d.jsx)(g.xv,{children:T[n.accountCreationPermission]}),(0,d.jsx)(S.u,{label:w[n.accountCreationPermission],children:(0,d.jsx)(O.szr,{color:"gray.500",fontSize:"sm"})})]})})}),(0,d.jsxs)(_.FT,{children:[(0,d.jsx)(_.$l,{isDisabled:o}),(0,d.jsx)(_.$P,{onClick:u,isLoading:o,children:"Save"})]})]})})})};AccountCreationForm.tenantFragment=D;var L=t(83234),P=t(20979);
1function CommunityForm_templateObject(){let e=(0,c._)(["\n fragment CommunityForm_TenantFragment on Tenant {\n _id\n communityAccessConfig\n globalSingletonGroupEntityName\n }\n"]);return CommunityForm_templateObject=function(){return e},e}function CommunityForm_templateObject1(){let e=(0,c._)(["\n mutation CommunityForm_UpdateTenant($input: UpdateTenantInput!) {\n updateTenant(input: $input) {\n data {\n _id\n ...CommunityForm_TenantFragment\n }\n }\n }\n ","\n"]);return CommunityForm_templateObject1=function(){return e},e}let q=(0,u.Ps)(CommunityForm_templateObject()),U=(0,u.Ps)(CommunityForm_templateObject1(),q),R={[F.iX.PUBLIC]:(0,d.jsx)(O.n9J,{}),[F.iX.LOGGED_IN_USERS]:(0,d.jsx)(O.oyc,{}),[F.iX.MEMBERS_ONLY]:(0,d.jsx)(O.M3$,{})},G={[F.iX.PUBLIC]:"Public",[F.iX.LOGGED_IN_USERS]:"Logged In Users",[F.iX.MEMBERS_ONLY]:"Members Only"},Y={[F.iX.PUBLIC]:"Groups can be made public, but users must be logged in to join groups and direct message other users",[F.iX.LOGGED_IN_USERS]:"Logged in users can access groups and direct message other users",[F.iX.MEMBERS_ONLY]:"Only members can access groups and direct message other users"},CommunityForm=e=>{let{tenant:n}=e,t=(0,v.pm)(),r=(0,b.qY)(),i=p.useMemo(()=>({communityAccessConfig:n.communityAccessConfig,globalSingletonGroupEntityName:n.globalSingletonGroupEntityName}),[n.communityAccessConfig,n.globalSingletonGroupEntityName]),{register:s,control:o,formState:{isSubmitting:a},handleSubmit:l,reset:c}=(0,E.cI)({defaultValues:i});p.useEffect(()=>c(i),[i,c]);let[u]=(0,f.D)(U),m=l(async e=>{try{await u({variables:{input:{id:n._id,data:{communityAccessConfig:e.communityAccessConfig,globalSingletonGroupEntityName:e.globalSingletonGroupEntityName||null}}}}),r.onClose()}catch(e){t({status:"error",description:e.message})}});return(0,d.jsx)(_.CX,{...r,children:(0,d.jsx)(_.sD,{children:(0,d.jsxs)(g.Kq,{spacing:"4",children:[(0,d.jsxs)(g.Kq,{direction:"row",spacing:"4",children:[(0,d.jsx)(g.xv,{textStyle:"xlBodyStrong",flex:"1",children:"Community"}),(0,d.jsx)(_.yP,{})]}),(0,d.jsx)(_.p0,{children:(0,d.jsxs)(g.Kq,{spacing:"4",children:[(0,d.jsx)(E.Qr,{control:o,name:"communityAccessConfig",render:e=>{let{field:{value:n,onChange:t,onBlur:r,ref:i}}=e;return(0,d.jsxs)(L.NI,{children:[(0,d.jsx)(L.lX,{children:"Community Privacy Level"}),(0,d.jsxs)(C.H,{value:n,onChange:t,onBlur:r,ref:i,children:[(0,d.jsx)(C.Y,{value:F.iX.PUBLIC,children:(0,d.jsxs)(g.Kq,{spacing:"0",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[R[F.iX.PUBLIC],(0,d.jsx)(g.xv,{textStyle:"bodyStrong",children:G[F.iX.PUBLIC]})]}),(0,d.jsx)(g.xv,{textStyle:"compact",color:"gray.600",children:Y[F.iX.PUBLIC]})]})}),(0,d.jsx)(C.Y,{value:F.iX.LOGGED_IN_USERS,children:(0,d.jsxs)(g.Kq,{spacing:"0",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[R[F.iX.LOGGED_IN_USERS],(0,d.jsx)(g.xv,{textStyle:"bodyStrong",children:G[F.iX.LOGGED_IN_USERS]})]}),(0,d.jsx)(g.xv,{textStyle:"compact",color:"gray.600",children:Y[F.iX.LOGGED_IN_USERS]})]})}),(0,d.jsx)(C.Y,{value:F.iX.MEMBERS_ONLY,children:(0,d.jsxs)(g.Kq,{spacing:"0",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[R[F.iX.MEMBERS_ONLY],(0,d.jsx)(g.xv,{textStyle:"bodyStrong",children:G[F.iX.MEMBERS_ONLY]})]}),(0,d.jsx)(g.xv,{textStyle:"compact",color:"gray.600",children:Y[F.iX.MEMBERS_ONLY]})]})})]})]})}}),(0,d.jsxs)(L.NI,{children:[(0,d.jsx)(L.lX,{children:"Name for General Group"}),(0,d.jsx)(P.II,{placeholder:"General",...s("globalSingletonGroupEntityName")})]})]})}),(0,d.jsx)(_.EO,{children:(0,d.jsxs)(g.Kq,{spacing:"4",children:[(0,d.jsxs)(M.Q_,{children:[(0,d.jsx)(M.zt,{children:"Community Privacy Level"}),(0,d.jsxs)(M.Ic,{as:g.Kq,direction:"row",alignItems:"center",children:[R[n.communityAccessConfig],(0,d.jsx)(g.xv,{children:G[n.communityAccessConfig]}),(0,d.jsx)(S.u,{label:Y[n.communityAccessConfig],children:(0,d.jsx)(O.szr,{color:"gray.500",fontSize:"sm"})})]})]}),(0,d.jsxs)(M.Q_,{children:[(0,d.jsx)(M.zt,{children:"Name for General Group"}),(0,d.jsx)(M.Ic,{children:n.globalSingletonGroupEntityName||"General"})]})]})}),(0,d.jsxs)(_.FT,{children:[(0,d.jsx)(_.$l,{isDisabled:a}),(0,d.jsx)(_.$P,{onClick:m,isLoading:a,children:"Save"})]})]})})})};CommunityForm.tenantFragment=q;var K=t(68185),B=t(45893);
1function DirectMessageForm_templateObject(){let e=(0,c._)(["\n fragment DirectMessageForm_TenantFragment on Tenant {\n _id\n directMessagesEnabled\n }\n"]);return DirectMessageForm_templateObject=function(){return e},e}function DirectMessageForm_templateObject1(){let e=(0,c._)(["\n mutation DirectMessageForm_UpdateTenant($input: UpdateTenantInput!) {\n updateTenant(input: $input) {\n data {\n _id\n ...DirectMessageForm_TenantFragment\n }\n }\n }\n ","\n"]);return DirectMessageForm_templateObject1=function(){return e},e}let k="When turned off, direct messaging features will be unavailable to members.",z=(0,u.Ps)(DirectMessageForm_templateObject()),H=(0,u.Ps)(DirectMessageForm_templateObject1(),z),DirectMessageForm=e=>{let{tenant:n}=e,t=(0,v.pm)(),r=(0,B.x)(),i=(0,b.qY)(),[s,o]=p.useState(!1),[a,l]=p.useState(!1!==n.directMessagesEnabled),[c]=(0,f.D)(H),u=!1!==n.directMessagesEnabled;p.useEffect(()=>{i.isOpen&&l(u)},[i.isOpen,u]);let handleSubmit=async()=>{o(!0);try{await c({variables:{input:{id:n._id,data:{directMessagesEnabled:a}}},update:(e,n)=>{var t,i,s;let{data:o}=n,a=(null==o?void 0:null===(i=o.updateTenant)||void 0===i?void 0:null===(t=i.data)||void 0===t?void 0:t.directMessagesEnabled)!==!1,l=null===(s=r.user)||void 0===s?void 0:s._id;l&&e.modify({id:e.identify({__typename:"User",_id:l}),fields:{canAccessDMPage:()=>a}}),e.evict({id:"ROOT_QUERY",fieldName:"organization"})}}),t({status:"success",description:"Direct message setting updated successfully"}),i.onClose()}catch(e){t({status:"error",description:e.message||"Failed to update setting"})}finally{o(!1)}};return(0,d.jsx)(_.CX,{...i,children:(0,d.jsxs)(_.sD,{children:[(0,d.jsx)(_.EO,{children:(0,d.jsxs)(g.Kq,{spacing:"4",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",spacing:"2",children:[(0,d.jsx)(g.xv,{textStyle:"xlBodyStrong",children:"Direct Message"}),(0,d.jsx)(S.u,{label:k,placement:"top",hasArrow:!0,children:(0,d.jsx)(O.szr,{color:"gray.400"})})]}),(0,d.jsx)(_.yP,{})]}),(0,d.jsxs)(g.xv,{children:["Direct messages are currently:"," ",(0,d.jsx)(g.xv,{as:"span",fontWeight:"bold",children:u?"Enabled":"Disabled"})]})]})}),(0,d.jsx)(_.p0,{children:(0,d.jsxs)(g.Kq,{spacing:"4",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",spacing:"2",children:[(0,d.jsx)(g.xv,{textStyle:"xlBodyStrong",children:"Direct Message"}),(0,d.jsx)(S.u,{label:k,placement:"top",hasArrow:!0,children:(0,d.jsx)(O.szr,{color:"gray.400"})})]}),(0,d.jsx)(K.r,{isChecked:a,onChange:e=>l(e.target.checked),isDisabled:s,children:"Enable Direct Messages"})]})}),(0,d.jsxs)(_.FT,{mt:"6",children:[(0,d.jsx)(_.$l,{}),(0,d.jsx)(_.$P,{onClick:handleSubmit,isLoading:s,children:"Save"})]})]})})};function EventsFeedForm_templateObject(){let e=(0,c._)(["\n fragment EventsFeedForm_TenantFragment on Tenant {\n _id\n eventsFeedConfig\n }\n"]);return EventsFeedForm_templateObject=function(){return e},e}function EventsFeedForm_templateObject1(){let e=(0,c._)(["\n mutation EventsFeedForm_UpdateTenant($input: UpdateTenantInput!) {\n updateTenant(input: $input) {\n data {\n _id\n ...EventsFeedForm_TenantFragment\n }\n }\n }\n ","\n"]);return EventsFeedForm_templateObject1=function(){return e},e}DirectMessageForm.tenantFragment=z;let $="This defines who can view the event feed. Each event page has its own access settings.";(r=o||(o={})).HIDDEN="HIDDEN",r.LOGGED_IN_USERS="LOGGED_IN_USERS",r.PUBLIC="PUBLIC";let X=(0,u.Ps)(EventsFeedForm_templateObject()),Q=(0,u.Ps)(EventsFeedForm_templateObject1(),X),V={PUBLIC:(0,d.jsx)(O.n9J,{}),LOGGED_IN_USERS:(0,d.jsx)(O.oyc,{}),HIDDEN:(0,d.jsx)(O.Xl7,{})},Z={PUBLIC:"Public",LOGGED_IN_USERS:"Logged In Users",HIDDEN:"Hidden"},EventsFeedForm=e=>{let{tenant:n}=e,t=(0,v.pm)(),r=(0,b.qY)(),i=p.useMemo(()=>({eventsFeedConfig:n.eventsFeedConfig}),[n.eventsFeedConfig]),{register:s,control:o,formState:{isSubmitting:a},handleSubmit:l,reset:c}=(0,E.cI)({defaultValues:i});p.useEffect(()=>c(i),[i,c]);let[u]=(0,f.D)(Q),m=l(async e=>{try{await u({variables:{input:{id:n._id,data:{eventsFeedConfig:e.eventsFeedConfig}}}}),r.onClose()}catch(e){t({status:"error",description:e.message})}});return(0,d.jsx)(_.CX,{...r,children:(0,d.jsx)(_.sD,{children:(0,d.jsxs)(g.Kq,{spacing:"4",children:[(0,d.jsxs)(g.Kq,{direction:"row",spacing:"4",children:[(0,d.jsx)(g.xv,{textStyle:"xlBodyStrong",flex:"1",children:"Events Feed"}),(0,d.jsx)(_.yP,{})]}),(0,d.jsx)(_.p0,{children:(0,d.jsx)(g.Kq,{spacing:"4",children:(0,d.jsx)(E.Qr,{control:o,name:"eventsFeedConfig",render:e=>{let{field:{value:n,onChange:t,onBlur:r,ref:i}}=e;return(0,d.jsxs)(L.NI,{children:[(0,d.jsx)(L.lX,{children:(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[(0,d.jsx)("span",{children:"Events Feed Visibility"}),(0,d.jsx)(S.u,{label:$,children:(0,d.jsx)(O.szr,{color:"gray.500"})})]})}),(0,d.jsxs)(C.H,{value:n,onChange:t,onBlur:r,ref:i,children:[(0,d.jsx)(C.Y,{value:"PUBLIC",children:(0,d.jsxs)(g.Kq,{spacing:"0",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[V.PUBLIC,(0,d.jsx)(g.xv,{textStyle:"bodyStrong",children:"Public"})]}),(0,d.jsx)(g.xv,{textStyle:"compact",color:"gray.600",children:""})]})}),(0,d.jsx)(C.Y,{value:"LOGGED_IN_USERS",children:(0,d.jsxs)(g.Kq,{spacing:"0",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[V.LOGGED_IN_USERS,(0,d.jsx)(g.xv,{textStyle:"bodyStrong",children:"Logged In Users"})]}),(0,d.jsx)(g.xv,{textStyle:"compact",color:"gray.600",children:""})]})}),(0,d.jsx)(C.Y,{value:"HIDDEN",children:(0,d.jsxs)(g.Kq,{spacing:"0",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[V.HIDDEN,(0,d.jsx)(g.xv,{textStyle:"bodyStrong",children:"Hidden"})]}),(0,d.jsx)(g.xv,{textStyle:"compact",color:"gray.600",children:"Do not show an Events Feed for my community"})]})})]})]})}})})}),(0,d.jsx)(_.EO,{children:(0,d.jsxs)(M.Q_,{children:[(0,d.jsx)(M.zt,{as:"div",children:(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[(0,d.jsx)("span",{children:"Events Feed Visibility"}),(0,d.jsx)(S.u,{label:$,children:(0,d.jsx)(O.szr,{color:"gray.500"})})]})}),(0,d.jsxs)(M.Ic,{as:g.Kq,direction:"row",alignItems:"center",children:[V[n.eventsFeedConfig],(0,d.jsx)(g.xv,{children:Z[n.eventsFeedConfig]})]})]})}),(0,d.jsxs)(_.FT,{children:[(0,d.jsx)(_.$l,{isDisabled:a}),(0,d.jsx)(_.$P,{onClick:m,isLoading:a,children:"Save"})]})]})})})};
1function MemberDirectoryForm_templateObject(){let e=(0,c._)(["\n fragment MemberDirectoryForm_TenantFragment on Tenant {\n _id\n memberEntityName\n memberDirectoryConfig\n memberDirectoryContentConfig\n }\n"]);return MemberDirectoryForm_templateObject=function(){return e},e}function MemberDirectoryForm_templateObject1(){let e=(0,c._)(["\n mutation MemberDirectoryForm_UpdateTenant($input: UpdateTenantInput!) {\n updateTenant(input: $input) {\n data {\n _id\n ...MemberDirectoryForm_TenantFragment\n }\n }\n }\n ","\n"]);return MemberDirectoryForm_templateObject1=function(){return e},e}EventsFeedForm.tenantFragment=X;let W="This defines who can view the member directory. Each member profile page has its own privacy settings.",J="This defines which contacts appear in the member directory.";(i=a||(a={})).MEMBERS_ONLY="MEMBERS_ONLY",i.LOGGED_IN_USERS="LOGGED_IN_USERS",i.PUBLIC="PUBLIC",i.HIDDEN="HIDDEN",(s=l||(l={})).MEMBERS_ONLY="MEMBERS_ONLY",s.ALL_CONTACTS="ALL_CONTACTS";let ee=(0,u.Ps)(MemberDirectoryForm_templateObject()),en=(0,u.Ps)(MemberDirectoryForm_templateObject1(),ee),et={PUBLIC:(0,d.jsx)(O.n9J,{}),LOGGED_IN_USERS:(0,d.jsx)(O.oyc,{}),MEMBERS_ONLY:(0,d.jsx)(O.M3$,{}),HIDDEN:(0,d.jsx)(O.Xl7,{})},er={PUBLIC:"Public",LOGGED_IN_USERS:"Logged In Users",MEMBERS_ONLY:"Members Only",HIDDEN:"Hidden"},ei={MEMBERS_ONLY:(0,d.jsx)(O.M3$,{}),ALL_CONTACTS:(0,d.jsx)(O.oyc,{})},es={MEMBERS_ONLY:"Members only",ALL_CONTACTS:"All contacts"},MemberDirectoryForm=e=>{var n,t;let{tenant:r}=e,i=(0,v.pm)(),s=(0,b.qY)(),o=p.useMemo(()=>{var e;return{memberDirectoryConfig:r.memberDirectoryConfig,memberDirectoryContentConfig:null!==(e=r.memberDirectoryContentConfig)&&void 0!==e?e:"MEMBERS_ONLY",memberEntityName:r.memberEntityName}},[r.memberDirectoryConfig,r.memberDirectoryContentConfig,r.memberEntityName]),{register:a,control:l,formState:{isSubmitting:c},handleSubmit:u,reset:m}=(0,E.cI)({defaultValues:o});p.useEffect(()=>m(o),[o,m]);let[x]=(0,f.D)(en),h=u(async e=>{try{await x({variables:{input:{id:r._id,data:{memberEntityName:e.memberEntityName||null,memberDirectoryConfig:e.memberDirectoryConfig,memberDirectoryContentConfig:e.memberDirectoryContentConfig}}}}),s.onClose()}catch(e){i({status:"error",description:e.message})}});return(0,d.jsx)(_.CX,{...s,children:(0,d.jsx)(_.sD,{children:(0,d.jsxs)(g.Kq,{spacing:"4",children:[(0,d.jsxs)(g.Kq,{direction:"row",spacing:"4",children:[(0,d.jsx)(g.xv,{textStyle:"xlBodyStrong",flex:"1",children:"Member Directory"}),(0,d.jsx)(_.yP,{})]}),(0,d.jsx)(_.p0,{children:(0,d.jsxs)(g.Kq,{spacing:"4",children:[(0,d.jsx)(E.Qr,{control:l,name:"memberDirectoryConfig",render:e=>{let{field:{value:n,onChange:t,onBlur:r,ref:i}}=e;return(0,d.jsxs)(L.NI,{children:[(0,d.jsx)(L.lX,{children:(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[(0,d.jsx)("span",{children:"Member Directory Visibility"}),(0,d.jsx)(S.u,{label:W,children:(0,d.jsx)(O.szr,{color:"gray.500"})})]})}),(0,d.jsxs)(C.H,{value:n,onChange:t,onBlur:r,ref:i,children:[(0,d.jsx)(C.Y,{value:"PUBLIC",children:(0,d.jsxs)(g.Kq,{spacing:"0",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[et.PUBLIC,(0,d.jsx)(g.xv,{textStyle:"bodyStrong",children:"Public"})]}),(0,d.jsx)(g.xv,{textStyle:"compact",color:"gray.600",children:""})]})}),(0,d.jsx)(C.Y,{value:"LOGGED_IN_USERS",children:(0,d.jsxs)(g.Kq,{spacing:"0",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[et.LOGGED_IN_USERS,(0,d.jsx)(g.xv,{textStyle:"bodyStrong",children:"Logged In Users"})]}),(0,d.jsx)(g.xv,{textStyle:"compact",color:"gray.600",children:""})]})}),(0,d.jsx)(C.Y,{value:"MEMBERS_ONLY",children:(0,d.jsxs)(g.Kq,{spacing:"0",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[et.MEMBERS_ONLY,(0,d.jsx)(g.xv,{textStyle:"bodyStrong",children:"Members Only"})]}),(0,d.jsx)(g.xv,{textStyle:"compact",color:"gray.600",children:""})]})}),(0,d.jsx)(C.Y,{value:"HIDDEN",children:(0,d.jsxs)(g.Kq,{spacing:"0",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[et.HIDDEN,(0,d.jsx)(g.xv,{textStyle:"bodyStrong",children:"Hidden"})]}),(0,d.jsx)(g.xv,{textStyle:"compact",color:"gray.600",children:"Do not show a Member Directory for my community"})]})})]})]})}}),(0,d.jsx)(E.Qr,{control:l,name:"memberDirectoryContentConfig",render:e=>{let{field:{value:n,onChange:t,onBlur:r,ref:i}}=e;return(0,d.jsxs)(L.NI,{children:[(0,d.jsx)(L.lX,{children:(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[(0,d.jsx)("span",{children:"Directory Content"}),(0,d.jsx)(S.u,{label:J,children:(0,d.jsx)(O.szr,{color:"gray.500"})})]})}),(0,d.jsxs)(C.H,{value:n,onChange:t,onBlur:r,ref:i,children:[(0,d.jsx)(C.Y,{value:"MEMBERS_ONLY",children:(0,d.jsxs)(g.Kq,{spacing:"0",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[ei.MEMBERS_ONLY,(0,d.jsx)(g.xv,{textStyle:"bodyStrong",children:"Members only"})]}),(0,d.jsx)(g.xv,{textStyle:"compact",color:"gray.600",children:"Only contacts with a qualifying Member status will appear in the directory."})]})}),(0,d.jsx)(C.Y,{value:"ALL_CONTACTS",children:(0,d.jsxs)(g.Kq,{spacing:"0",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[ei.ALL_CONTACTS,(0,d.jsx)(g.xv,{textStyle:"bodyStrong",children:"All contacts"})]}),(0,d.jsx)(g.xv,{textStyle:"compact",color:"gray.600",children:"Both members and non-members will appear in the directory."})]})})]})]})}}),(0,d.jsxs)(L.NI,{children:[(0,d.jsx)(L.lX,{children:"Name for Member Directory"}),(0,d.jsx)(P.II,{placeholder:"Members",...a("memberEntityName")})]})]})}),(0,d.jsx)(_.EO,{children:(0,d.jsxs)(g.Kq,{spacing:"4",children:[(0,d.jsxs)(M.Q_,{children:[(0,d.jsx)(M.zt,{as:"div",children:(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[(0,d.jsx)("span",{children:"Member Directory Visibility"}),(0,d.jsx)(S.u,{label:W,children:(0,d.jsx)(O.szr,{color:"gray.500"})})]})}),(0,d.jsxs)(M.Ic,{as:g.Kq,direction:"row",alignItems:"center",children:[et[r.memberDirectoryConfig],(0,d.jsx)(g.xv,{children:er[r.memberDirectoryConfig]})]})]}),(0,d.jsxs)(M.Q_,{children:[(0,d.jsx)(M.zt,{as:"div",children:(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[(0,d.jsx)("span",{children:"Directory Content"}),(0,d.jsx)(S.u,{label:J,children:(0,d.jsx)(O.szr,{color:"gray.500"})})]})}),(0,d.jsxs)(M.Ic,{as:g.Kq,direction:"row",alignItems:"center",children:[ei[null!==(n=r.memberDirectoryContentConfig)&&void 0!==n?n:"MEMBERS_ONLY"],(0,d.jsx)(g.xv,{children:es[null!==(t=r.memberDirectoryContentConfig)&&void 0!==t?t:"MEMBERS_ONLY"]})]})]}),(0,d.jsxs)(M.Q_,{children:[(0,d.jsx)(M.zt,{children:"Name for Member Directory"}),(0,d.jsx)(M.Ic,{children:r.memberEntityName||"Members"})]})]})}),(0,d.jsxs)(_.FT,{children:[(0,d.jsx)(_.$l,{isDisabled:c}),(0,d.jsx)(_.$P,{onClick:h,isLoading:c,children:"Save"})]})]})})})};
1function NonMemberCommunityAccessToggle_templateObject(){let e=(0,c._)(["\n fragment NonMemberCommunityAccessToggle_TenantFragment on Tenant {\n _id\n hasCommunityAccessToNonMembers\n }\n"]);return NonMemberCommunityAccessToggle_templateObject=function(){return e},e}function NonMemberCommunityAccessToggle_templateObject1(){let e=(0,c._)(["\n mutation NonMemberCommunityAccessToggle_UpdateTenantCommunityAccess(\n $input: UpdateTenantCommunityAccessInput!\n ) {\n updateTenantCommunityAccess(input: $input) {\n message\n success\n tenant {\n ...NonMemberCommunityAccessToggle_TenantFragment\n }\n }\n }\n ","\n"]);return NonMemberCommunityAccessToggle_templateObject1=function(){return e},e}MemberDirectoryForm.tenantFragment=ee;let eo=(0,u.Ps)(NonMemberCommunityAccessToggle_templateObject()),ea=(0,u.Ps)(NonMemberCommunityAccessToggle_templateObject1(),eo),NonMemberCommunityAccessToggle=e=>{let{tenant:n}=e,t=(0,v.pm)(),r=(0,b.qY)(),[i,s]=p.useState(!1),[o,a]=p.useState(!1),[l]=(0,f.D)(ea);p.useEffect(()=>{r.isOpen&&a(!!(null==n?void 0:n.hasCommunityAccessToNonMembers))},[r.isOpen,null==n?void 0:n.hasCommunityAccessToNonMembers]);let handleToggle=async e=>{s(!0);try{var n,i,o,a;let s=await l({variables:{input:{hasCommunityAccessToNonMembers:e}}});(null===(i=s.data)||void 0===i?void 0:null===(n=i.updateTenantCommunityAccess)||void 0===n?void 0:n.success)?(t({status:"success",description:s.data.updateTenantCommunityAccess.message||"Setting updated successfully"}),r.onClose()):t({status:"error",description:(null===(a=s.data)||void 0===a?void 0:null===(o=a.updateTenantCommunityAccess)||void 0===o?void 0:o.message)||"Failed to update setting"})}catch(e){t({status:"error",description:e.message||"Failed to update setting"})}finally{s(!1)}};return(0,d.jsx)(_.CX,{...r,children:(0,d.jsxs)(_.sD,{children:[(0,d.jsx)(_.EO,{children:(0,d.jsxs)(g.Kq,{spacing:"4",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",spacing:"2",children:[(0,d.jsx)(g.xv,{textStyle:"xlBodyStrong",children:"Non-Member Community Access for AMS Synced Groups"}),(0,d.jsx)(S.u,{label:"Once enabled, non-members can access the Community Feed but will only see the groups they belong to. They cannot join or explore other groups.",placement:"top",hasArrow:!0,children:(0,d.jsx)(O.szr,{color:"gray.400"})})]}),(0,d.jsx)(_.yP,{})]}),(0,d.jsx)(M.Q_,{children:(0,d.jsx)(M.Ic,{children:(null==n?void 0:n.hasCommunityAccessToNonMembers)?"Enabled":"Disabled"})})]})}),(0,d.jsx)(_.p0,{children:(0,d.jsxs)(g.Kq,{spacing:"4",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",spacing:"2",children:[(0,d.jsx)(g.xv,{textStyle:"xlBodyStrong",children:"Non-Member Community Access for AMS Synced Groups"}),(0,d.jsx)(S.u,{label:"Once enabled, non-members can access the Community Feed but will only see the groups they belong to. They cannot join or explore other groups.",placement:"top",hasArrow:!0,children:(0,d.jsx)(O.szr,{color:"gray.400"})})]}),(0,d.jsxs)(L.NI,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,d.jsx)(L.lX,{mb:"0",flex:"1",children:(0,d.jsx)(g.Kq,{spacing:"1",children:(0,d.jsx)(g.xv,{fontSize:"sm",color:"gray.600",children:"Once enabled, non-members can access the Community Feed but will only see the groups they belong to. They cannot join or explore other groups."})})}),(0,d.jsx)(K.r,{isChecked:o,onChange:e=>a(e.target.checked),isDisabled:i})]})]})}),(0,d.jsxs)(_.FT,{mt:"6",children:[(0,d.jsx)(_.$l,{}),(0,d.jsx)(_.$P,{onClick:()=>{handleToggle(o)},isLoading:i,children:"Save"})]})]})})};NonMemberCommunityAccessToggle.tenantFragment=eo;let el="tradewing-search-mode",isSearchMode=e=>"algolia"===e||"ai"===e,getStoredSearchMode=()=>{let e=window.localStorage.getItem(el);return isSearchMode(e)?e:"algolia"},setStoredSearchMode=e=>{window.localStorage.setItem(el,e),window.dispatchEvent(new Event("tradewing-search-mode-changed"))};var ec=t(44389);function SearchModeForm_templateObject(){let e=(0,c._)(["\n mutation SearchModeForm_UpdateTenant($input: UpdateTenantInput!) {\n updateTenant(input: $input) {\n data {\n _id\n searchMode\n }\n }\n }\n"]);
1return SearchModeForm_templateObject=function(){return e},e}let ed={algolia:"Keyword Search",ai:"Tradewing IQ"},eu={algolia:"Algolia",ai:"AI"},em={Algolia:"algolia",AI:"ai"},eg=(0,u.Ps)(SearchModeForm_templateObject()),SearchModeForm=()=>{var e;let n=(0,v.pm)(),t=(0,b.qY)(),r=(0,B.x)(),i=null==r?void 0:null===(e=r.tenant)||void 0===e?void 0:e._id,[s,o]=p.useState(getStoredSearchMode()),[a,{loading:l}]=(0,f.D)(eg);p.useEffect(()=>{if(!(null==r?void 0:r.tenant))return;let e=r.tenant.searchMode,n=e===ec.W.AI?"ai":"algolia";o(n),getStoredSearchMode()!==n&&setStoredSearchMode(n)},[null==r?void 0:r.tenant]);let c=p.useMemo(()=>({searchMode:s}),[s]),{control:u,handleSubmit:m,reset:x,formState:{isSubmitting:h}}=(0,E.cI)({defaultValues:c});p.useEffect(()=>x(c),[c,x]);let j=m(async e=>{try{var r,s;if(!i)throw Error("Unable to determine tenant");let l=await a({variables:{input:{id:i,data:{searchMode:eu[e.searchMode]}}}}),c=(null===(s=l.data)||void 0===s?void 0:null===(r=s.updateTenant)||void 0===r?void 0:r.data)&&"searchMode"in l.data.updateTenant.data?l.data.updateTenant.data.searchMode:void 0,d=c&&em[c]||e.searchMode;setStoredSearchMode(d),o(d),t.onClose(),n({status:"success",description:"Search mode updated successfully"})}catch(e){n({status:"error",description:e instanceof Error?e.message:"Failed to update search mode"})}});return(0,d.jsx)(_.CX,{...t,children:(0,d.jsx)(_.sD,{children:(0,d.jsxs)(g.Kq,{spacing:"4",children:[(0,d.jsxs)(g.Kq,{direction:"row",spacing:"4",children:[(0,d.jsx)(g.xv,{textStyle:"xlBodyStrong",flex:"1",children:"Search Mode"}),(0,d.jsx)(_.yP,{})]}),(0,d.jsx)(_.p0,{children:(0,d.jsx)(E.Qr,{control:u,name:"searchMode",render:e=>{let{field:{value:n,onChange:t,onBlur:r,ref:i}}=e;return(0,d.jsxs)(C.H,{direction:"row",variant:"spaced",value:n,onChange:t,onBlur:r,ref:i,children:[(0,d.jsx)(C.Y,{value:"algolia",children:(0,d.jsx)(g.xv,{textStyle:"bodyStrong",children:"Keyword Search"})}),(0,d.jsx)(C.Y,{value:"ai",children:(0,d.jsxs)(g.Kq,{spacing:.5,children:[(0,d.jsx)(g.xv,{textStyle:"bodyStrong",children:"Tradewing IQ"}),(0,d.jsx)(g.xv,{fontSize:"sm",color:"gray.600",fontWeight:"400",children:"Powered by Community Intelligence"})]})})]})}})}),(0,d.jsx)(_.EO,{children:(0,d.jsx)(M.Q_,{children:(0,d.jsxs)(g.Kq,{spacing:.5,align:"flex-start",children:[(0,d.jsx)(M.Ic,{children:ed[s]}),"ai"===s?(0,d.jsx)(g.xv,{fontSize:"sm",color:"gray.600",fontWeight:"400",children:"Powered by Community Intelligence"}):null]})})}),(0,d.jsxs)(_.FT,{children:[(0,d.jsx)(_.$l,{isDisabled:h||l}),(0,d.jsx)(_.$P,{onClick:j,isLoading:h||l,isDisabled:h||l,children:"Save"})]})]})})})};function SponsorsForm_templateObject(){let e=(0,c._)(["\n fragment SponsorsForm_TenantFragment on Tenant {\n _id\n sponsorDirectoryAccessConfig\n organizationEntityName\n }\n"]);return SponsorsForm_templateObject=function(){return e},e}function SponsorsForm_templateObject1(){let e=(0,c._)(["\n mutation SponsorsForm_UpdateTenant($input: UpdateTenantInput!) {\n updateTenant(input: $input) {\n data {\n _id\n ...SponsorsForm_TenantFragment\n }\n }\n }\n ","\n"]);return SponsorsForm_templateObject1=function(){return e},e}let ep="This defines who can view the sponsor directory. Sponsor profile pages are always public.",ex=(0,u.Ps)(SponsorsForm_templateObject()),eh=(0,u.Ps)(SponsorsForm_templateObject1(),ex),ej={[F.pZ.PUBLIC]:(0,d.jsx)(O.n9J,{}),[F.pZ.LOGGED_IN_USERS]:(0,d.jsx)(O.oyc,{}),[F.pZ.HIDDEN]:(0,d.jsx)(O.Xl7,{})},ey={[F.pZ.PUBLIC]:"Public",[F.pZ.LOGGED_IN_USERS]:"Logged In Users",[F.pZ.HIDDEN]:"Hidden"},ef={[F.pZ.PUBLIC]:"",[F.pZ.LOGGED_IN_USERS]:"",[F.pZ.HIDDEN]:"Do not show a Sponsor Directory for my community"},SponsorsForm=e=>{let{tenant:n}=e,t=(0,v.pm)(),r=(0,b.qY)(),i=p.useMemo(()=>({sponsorDirectoryAccessConfig:n.sponsorDirectoryAccessConfig,organizationEntityName:n.organizationEntityName}),[n.sponsorDirectoryAccessConfig,n.organizationEntityName]),{register:s,control:o,formState:{isSubmitting:a},handleSubmit:l,reset:c}=(0,E.cI)({defaultValues:i});p.useEffect(()=>c(i),[i,c]);let[u]=(0,f.D)(eh),m=l(async e=>{try{await u({variables:{input:{id:n._id,data:{sponsorDirectoryAccessConfig:e.sponsorDirectoryAccessConfig,organizationEntityName:e.organizationEntityName||null}}}}),r.onClose()}catch(e){t({status:"error",description:e.message})}});return(0,d.jsx)(_.CX,{...r,children:(0,d.jsx)(_.sD,{children:(0,d.jsxs)(g.Kq,{spacing:"4",children:[(0,d.jsxs)(g.Kq,{direction:"row",spacing:"4",children:[(0,d.jsx)(g.xv,{textStyle:"xlBodyStrong",flex:"1",children:"Sponsors"}),(0,d.jsx)(_.yP,{})]}),(0,d.jsx)(_.p0,{children:(0,d.jsxs)(g.Kq,{spacing:"4",children:[(0,d.jsx)(E.Qr,{control:o,name:"sponsorDirectoryAccessConfig",render:e=>{let{field:{value:n,onChange:t,onBlur:r,ref:i}}=e;return(0,d.jsxs)(L.NI,{children:[(0,d.jsx)(L.lX,{children:(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[(0,d.jsx)("span",{children:"Sponsor Directory Visibility"}),(0,d.jsx)(S.u,{label:ep,children:(0,d.jsx)(O.szr,{color:"gray.500"})})]})}),(0,d.jsxs)(C.H,{value:n,onChange:t,onBlur:r,ref:i,children:[(0,d.jsx)(C.Y,{value:F.pZ.PUBLIC,children:(0,d.jsxs)(g.Kq,{spacing:"0",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[ej[F.pZ.PUBLIC],(0,d.jsx)(g.xv,{textStyle:"bodyStrong",children:ey[F.pZ.PUBLIC]})]}),(0,d.jsx)(g.xv,{textStyle:"compact",color:"gray.600",children:ef[F.pZ.PUBLIC]})]})}),(0,d.jsx)(C.Y,{value:F.pZ.LOGGED_IN_USERS,children:(0,d.jsxs)(g.Kq,{spacing:"0",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[ej[F.pZ.LOGGED_IN_USERS],(0,d.jsx)(g.xv,{textStyle:"bodyStrong",children:ey[F.pZ.LOGGED_IN_USERS]})]}),(0,d.jsx)(g.xv,{textStyle:"compact",color:"gray.600",children:ef[F.pZ.LOGGED_IN_USERS]})]})}),(0,d.jsx)(C.Y,{value:F.pZ.HIDDEN,children:(0,d.jsxs)(g.Kq,{spacing:"0",children:[(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[ej[F.pZ.HIDDEN],(0,d.jsx)(g.xv,{textStyle:"bodyStrong",children:ey[F.pZ.HIDDEN]})]}),(0,d.jsx)(g.xv,{textStyle:"compact",color:"gray.600",children:ef[F.pZ.HIDDEN]})]})})]})]})}}),(0,d.jsxs)(L.NI,{children:[(0,d.jsx)(L.lX,{children:'Name for "Sponsors"'}),(0,d.jsx)(P.II,{placeholder:"Sponsors",...s("organizationEntityName")})]})]})}),(0,d.jsx)(_.EO,{children:(0,d.jsxs)(g.Kq,{spacing:"4",children:[(0,d.jsxs)(M.Q_,{children:[(0,d.jsx)(M.zt,{as:"div",children:(0,d.jsxs)(g.Kq,{direction:"row",alignItems:"center",children:[(0,d.jsx)("span",{children:"Sponsor Directory Visibility"}),(0,d.jsx)(S.u,{label:ep,children:(0,d.jsx)(O.szr,{color:"gray.500"})})]})}),(0,d.jsxs)(M.Ic,{as:g.Kq,direction:"row",alignItems:"center",children:[ej[n.sponsorDirectoryAccessConfig],(0,d.jsx)(g.xv,{children:ey[n.sponsorDirectoryAccessConfig]})]})]}),(0,d.jsxs)(M.Q_,{children:[(0,d.jsx)(M.zt,{children:'Name for "Sponsors"'}),(0,d.jsx)(M.Ic,{children:n.organizationEntityName||"Sponsors"})]})]})}),(0,d.jsxs)(_.FT,{children:[(0,d.jsx)(_.$l,{isDisabled:a}),(0,d.jsx)(_.$P,{onClick:m,isLoading:a,children:"Save"})]})]})})})};SponsorsForm.tenantFragment=ex;var ev=t(9041),eb=t(21040);
1function SupportLoginMessageForm_templateObject(){let e=(0,c._)(["\n fragment SupportLoginMessageForm_TenantFragment on Tenant {\n _id\n loginContactMessage\n }\n"]);return SupportLoginMessageForm_templateObject=function(){return e},e}function SupportLoginMessageForm_templateObject1(){let e=(0,c._)(["\n mutation SupportLoginMessageForm_UpdateTenant($input: UpdateTenantInput!) {\n updateTenant(input: $input) {\n data {\n _id\n ...SupportLoginMessageForm_TenantFragment\n }\n }\n }\n ","\n"]);return SupportLoginMessageForm_templateObject1=function(){return e},e}let eS=(0,u.Ps)(SupportLoginMessageForm_templateObject()),eE=(0,u.Ps)(SupportLoginMessageForm_templateObject1(),eS),SupportLoginMessageForm=e=>{let{tenant:n}=e,t=(0,v.pm)(),r=(0,b.qY)(),i=p.useMemo(()=>{if(!n.loginContactMessage)return ev.EditorState.createEmpty();try{let e=JSON.parse(n.loginContactMessage),t=(0,ev.convertFromRaw)(e);return ev.EditorState.createWithContent(t)}catch(e){return console.error("Error parsing login message:",e),ev.EditorState.createEmpty()}},[n.loginContactMessage]),s=(0,E.cI)({defaultValues:{body:i}}),{handleSubmit:o}=s,[a]=(0,f.D)(eE);return(0,d.jsx)(E.RV,{...s,children:(0,d.jsx)(_.CX,{...r,children:(0,d.jsx)(_.sD,{children:(0,d.jsxs)(g.Kq,{spacing:"4",children:[(0,d.jsxs)(g.Kq,{direction:"row",spacing:"4",children:[(0,d.jsx)(g.xv,{textStyle:"xlBodyStrong",flex:"1",children:"Support Login Message"}),(0,d.jsx)(_.yP,{})]}),(0,d.jsx)(_.p0,{children:(0,d.jsx)(L.NI,{children:(0,d.jsx)(eb.uT,{formLabel:"Login Contact Message",placeholder:"Enter the message users will see during login...",validationMessage:""})})}),(0,d.jsx)(_.EO,{children:n.loginContactMessage?(0,d.jsx)(ev.Editor,{editorState:i,onChange:()=>{},readOnly:!0}):(0,d.jsx)(g.xv,{color:"gray.600",children:"No message set"})}),(0,d.jsxs)(_.FT,{children:[(0,d.jsx)(_.$l,{}),(0,d.jsx)(_.$P,{onClick:()=>{let e=s.getValues("body").getCurrentContent(),i=(0,ev.convertToRaw)(e),o=JSON.stringify(i);a({variables:{input:{id:n._id,data:{loginContactMessage:o}}}}).then(()=>{r.onClose(),t({status:"success",description:"Message updated successfully"})}).catch(e=>{t({status:"error",description:e.message})})},children:"Save"})]})]})})})})};function GeneralSettingsPage_templateObject(){let e=(0,c._)(["\n query GeneralSettingsPage_Tenant {\n tenant {\n result {\n _id\n featureFlags {\n aiAskEnabled\n }\n ...AccountCreationForm_TenantFragment\n ...CommunityForm_TenantFragment\n ...NonMemberCommunityAccessToggle_TenantFragment\n ...SponsorsForm_TenantFragment\n ...MemberDirectoryForm_TenantFragment\n ...EventsFeedForm_TenantFragment\n ...DirectMessageForm_TenantFragment\n ...SupportLoginMessageForm_TenantFragment\n }\n }\n }\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n"]);return GeneralSettingsPage_templateObject=function(){return e},e}function GeneralSettingsPage_templateObject1(){let e=(0,c._)(["\n query GeneralSettingsPage_TenantAmsInfo {\n tenantWithAmsInfo {\n result {\n _id\n integrationMetadata {\n isGroupSyncSupported\n integrationConfiguration {\n groupSyncConfiguration {\n active\n }\n }\n }\n }\n }\n }\n"]);return GeneralSettingsPage_templateObject1=function(){return e},e}SupportLoginMessageForm.tenantFragment=eS;let eC=(0,u.Ps)(GeneralSettingsPage_templateObject(),AccountCreationForm.tenantFragment,CommunityForm.tenantFragment,NonMemberCommunityAccessToggle.tenantFragment,SponsorsForm.tenantFragment,MemberDirectoryForm.tenantFragment,EventsFeedForm.tenantFragment,DirectMessageForm.tenantFragment,SupportLoginMessageForm.tenantFragment),e_=(0,u.Ps)(GeneralSettingsPage_templateObject1());var eM=t(93064),eF=(0,t(52609).z)(()=>{var e,n,t,r,i,s;let{data:o,loading:a,error:l}=(0,m.a)(eC),{data:c,loading:u,error:f}=(0,m.a)(e_,{errorPolicy:"ignore",notifyOnNetworkStatusChange:!1}),v=p.useMemo(()=>{var e,n,t,r;let i=null==o?void 0:o.tenant.result,s=null==c?void 0:c.tenantWithAmsInfo.result;if(!i)return!1;let a=i.communityAccessConfig===F.iX.MEMBERS_ONLY,l=!!(null==s?void 0:s.integrationMetadata),d=null!==(r=null==s?void 0:null===(t=s.integrationMetadata)||void 0===t?void 0:null===(n=t.integrationConfiguration)||void 0===n?void 0:null===(e=n.groupSyncConfiguration)||void 0===e?void 0:e.active)&&void 0!==r&&r;return a&&l&&d},[null==o?void 0:null===(e=o.tenant.result)||void 0===e?void 0:e.communityAccessConfig,null==c?void 0:null===(i=c.tenantWithAmsInfo.result)||void 0===i?void 0:null===(r=i.integrationMetadata)||void 0===r?void 0:null===(t=r.integrationConfiguration)||void 0===t?void 0:null===(n=t.groupSyncConfiguration)||void 0===n?void 0:n.active]);return(0,d.jsx)(h.C,{children:(0,d.jsxs)(x.DY,{maxWidth:"container.md",marginX:"auto",children:[(0,d.jsx)(x.yG,{justifyContent:"space-between",children:(0,d.jsx)(x.lm,{children:"General Settings"})}),(0,d.jsx)(x.hb,{children:a?(0,d.jsx)(j.g,{}):l?(0,d.jsx)(y.S,{}):(null==o?void 0:o.tenant.result)?(0,d.jsxs)(g.Kq,{spacing:"4",children:[(0,d.jsx)(AccountCreationForm,{tenant:o.tenant.result}),(0,d.jsx)(CommunityForm,{tenant:o.tenant.result}),v&&(0,d.jsx)(NonMemberCommunityAccessToggle,{tenant:o.tenant.result}),(0,d.jsx)(MemberDirectoryForm,{tenant:o.tenant.result}),(0,d.jsx)(EventsFeedForm,{tenant:o.tenant.result}),(0,d.jsx)(SponsorsForm,{tenant:o.tenant.result}),(0,d.jsx)(DirectMessageForm,{tenant:o.tenant.result}),(0,d.jsx)(SupportLoginMessageForm,{tenant:o.tenant.result}),(null===(s=o.tenant.result.featureFlags)||void 0===s?void 0:s.aiAskEnabled)===!0&&(0,d.jsx)(SearchModeForm,{})]}):(0,d.jsx)(y.S,{})})]})})},{requiresEvery:[eM.lj.ADMIN_ROLE]})},39615:function(e,n,t){"use strict";t.d(n,{E:function(){return getExternalUrl}});let getExternalUrl=e=>e?e.match(/^http?:\/\//i)||e.match(/^https?:\/\//i)?e:"http://"+e:void 0},52609:function(e,n,t){"use strict";t.d(n,{z:function(){return restrictedRoute}});var r=t(85893),i=t(11163),s=t(67294),o=t(39174),a=t(63205),l=t(62893),c=t(69171),d=t(47503),u=t
1(45893),m=t(93064);let g=new Map([[m.lj.AUTHENTICATION,e=>{var n;return!!(null===(n=e.user)||void 0===n?void 0:n._id)}],[m.lj.ADMIN_ROLE,e=>{var n,t;return(null===(n=e.user)||void 0===n?void 0:n.role)===d.uA.ADMIN||(null===(t=e.user)||void 0===t?void 0:t.role)===d.uA.MORGOTH}],[m.lj.MORGOTH_ROLE,e=>{var n;return(null===(n=e.user)||void 0===n?void 0:n.role)===d.uA.MORGOTH}],[m.lj.COMMUNITY_ACCESS,e=>{var n;return(null==e?void 0:null===(n=e.tenant)||void 0===n?void 0:n.communityAccessConfig)===d.iX.PUBLIC?!e.user||e.user.canAccessCommunity:!!e.user&&e.user.canAccessCommunity}],[m.lj.COMMUNITY_READ_ONLY_ACCESS,e=>{var n;return!!(null===(n=e.user)||void 0===n?void 0:n.canAccessCommunityReadOnly)}],[m.lj.SPONSOR_DASHBOARD_ACCESS,e=>{var n,t;return!!(null===(t=e.user)||void 0===t?void 0:null===(n=t.rosterOrganization)||void 0===n?void 0:n.currentUserOrganizationPermission.canManageOrganizationSponsorship)}],[m.lj.SPONSOR_DIRECTORY_ACCESS,e=>{var n,t,r;switch(null===(n=e.tenant)||void 0===n?void 0:n.sponsorDirectoryAccessConfig){case d.pZ.PUBLIC:return!0;case d.pZ.LOGGED_IN_USERS:return!!(null===(t=e.user)||void 0===t?void 0:t._id);case d.pZ.HIDDEN:return!1;default:throw Error("unknown sponsorDirectoryAccessConfig: ".concat(null===(r=e.tenant)||void 0===r?void 0:r.sponsorDirectoryAccessConfig))}}],[m.lj.MEMBER_DIRECTORY_ACCESS,e=>{var n;return!!(null===(n=e.tenant)||void 0===n?void 0:n.currentUserPermissions.canAccessMemberDirectory)}],[m.lj.EVENTS_FEED_ACCESS,e=>{var n;return!!(null===(n=e.tenant)||void 0===n?void 0:n.currentUserPermissions.canAccessEventsFeed)}],[m.lj.ORGANIZATION_DASHBOARD_ACCESS,e=>{var n,t;return!!(null===(t=e.user)||void 0===t?void 0:null===(n=t.rosterOrganization)||void 0===n?void 0:n.currentUserOrganizationPermission.canManageOrganizationProfile)}],[m.lj.DM_PAGE_ACCESS,e=>{var n;return!!(null===(n=e.user)||void 0===n?void 0:n.canAccessDMPage)}],[m.lj.ORGANIZATION_MEMBERSHIP_ACCESS,e=>{var n,t;return!!(null===(t=e.user)||void 0===t?void 0:null===(n=t.rosterOrganization)||void 0===n?void 0:n.currentUserOrganizationPermission.canManageOrganizationMembership)}],[m.lj.FEATURE_FLAG_CMS,e=>{var n,t;return!!(null===(t=e.tenant)||void 0===t?void 0:null===(n=t.featureFlags)||void 0===n?void 0:n.cms)}],[m.lj.FEATURE_FLAG_CONFERENCES,e=>{var n,t;return!!(null===(t=e.tenant)||void 0===t?void 0:null===(n=t.featureFlags)||void 0===n?void 0:n.conferences)}],[m.lj.FEATURE_FLAG_WEBFLOW,e=>{var n,t;return!!(null===(t=e.tenant)||void 0===t?void 0:null===(n=t.featureFlags)||void 0===n?void 0:n.webflow)}],[m.lj.PAID_MODULE_WEBSITE_BUILDER,e=>{var n,t;return!!(null===(t=e.tenant)||void 0===t?void 0:null===(n=t.paidModules)||void 0===n?void 0:n.websiteBuilder)}]]),useRequiredPermission=e=>{let n=(0,u.x)();if(!e.requiresEvery&&!e.requiresSome)return{hasPermission:!0,loading:!1};if(n.loading)return{hasPermission:!1,loading:!0};let t=null==e||!e.requiresEvery||(null==e?void 0:e.requiresEvery.map(e=>g.get(e)).every(e=>!e||e(n))),r=null==e||!e.requiresSome||(null==e?void 0:e.requiresSome.map(e=>g.get(e)).some(e=>!!e&&e(n)));return{hasPermission:t&&r,loading:!1}},restrictedRoute=(e,n,t)=>d=>{let u=(0,i.useRouter)(),m=useRequiredPermission(n),g=(0,l.T)(),p=(0,a.U)(),x=m.loading||g.isLoading||p.loading,h=!!t&&!!t.requiresMemberManagement&&!p.isActive;return(s.useEffect(()=>{x||m.hasPermission&&!h||g.isAuthenticated||!u.isReady||u.replace({pathname:"/login",query:{redirect:u.asPath}})},[x,u,h,g.isAuthenticated,m.hasPermission]),x)?(0,r.jsx)(c.g,{}):!m.hasPermission||h?g.isAuthenticated?(0,r.jsx)(o.A,{}):(0,r.jsx)(c.g,{}):(0,r.jsx)(e,{...d})}},48521:function(){},40867:function(e,n,t){"use strict";t.d(n,{D:function(){return usePopper}});var r=t(67294),i=t(73935),s=t(14519),o=t(69590),a=t.n(o),l=t(67139),c=[],usePopper=function(e,n,t){void 0===t&&(t={});var o=r.useRef(null),d={onFirstUpdate:t.onFirstUpdate,placement:t.placement||"bottom",strategy:t.strategy||"absolute",modifiers:t.modifiers||c},u=r.useState({styles:{popper:{position:d.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),m=u[0],g=u[1],p=r.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(e){var n=e.state,t=Object.keys(n.elements);i.flushSync(function(){g({styles:(0,l.sq)(t.map(function(e){return[e,n.styles[e]||{}]})),attributes:(0,l.sq)(t.map(function(e){return[e,n.attributes[e]]}))})})},requires:["computeStyles"]}},[]),x=r.useMemo(function(){var e={onFirstUpdate:d.onFirstUpdate,placement:d.placement,strategy:d.strategy,modifiers:[].concat(d.modifiers,[p,{name:"applyStyles",enabled:!1}])};return a()(o.current,e)?o.current||e:(o.current=e,e)},[d.onFirstUpdate,d.placement,d.strategy,d.modifiers,p]),h=r.useRef();return(0,l.LI)(function(){h.current&&h.current.setOptions(x)},[x]),(0,l.LI)(function(){if(null!=e&&null!=n){var r=(t.createPopper||s.fi)(e,n,x);return h.current=r,function(){r.destroy(),h.current=null}}},[e,n,t.createPopper]),{state:h.current?h.current.state:null,styles:m.styles,attributes:m.attributes,update:h.current?h.current.update:null,forceUpdate:h.current?h.current.forceUpdate:null}}},67139:function(e,n,t){"use strict";t.d(n,{$p:function(){return unwrapArray},DL:function(){return safeInvoke},LI:function(){return i},k$:function(){return setRef},sq:function(){return fromEntries}});var r=t(67294),unwrapArray=function(e){return Array.isArray(e)?e[0]:e},safeInvoke=function(e){if("function"==typeof e){for(var n=arguments.length,t=Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];return e.apply(void 0,t)}},setRef=function(e,n){if("function"==typeof e)return safeInvoke(e,n);null!=e&&(e.current=n)},fromEntries=function(e){return e.reduce(function(e,n){var t=n[0],r=n[1];return e[t]=r,e},{})},i="undefined"!=typeof window&&window.document&&window.document.createElement?r.useLayoutEffect:r.useEffect},73359:function(e,n,t){"use strict";t.d(n,{t:function(){return useLazyQuery}});var r=t(23564),i=t(67294),s=t(14012),o=t(37887),a=t(66252),l=["refetch","reobserve","fetchMore","updateQuery","startPolling","subscribeToMore"];function useLazyQuery(e,n){var t=(0,o.A)((0,a.x)(n&&n.client),e),c=(0,i.useRef)(),d=c.current?(0,s.J)(n,c.current):n,u=t.useQuery((0,r.pi)((0,r.pi)({},d),{skip:!c.current})),m=u.observable.options.initialFetchPolicy||t.getDefaultFetchPolicy(),g=Object.assign(u,{called:!!c.current}),p=(0,i.useMemo)(function(){for(var e={},n=0;n<l.length;n++)!function(n){var r=g[n];e[n]=function(){return c.current||(c.current=Object.create(null),t.forceUpdate()),r.apply(this,arguments)}}(l[n]);return e},[]);return Object.assign(g,p),[(0,i.useCallback)(function(e){c.current=e?(0,r.pi)((0,r.pi)({},e),{fetchPolicy:e.fetchPolicy||m}):{fetchPolicy:m};var n=t.asyncUpdate().then(function(e){return Object.assign(e,p)});return n.catch(function(){}),n},[]),g]}}},function(e){e.O(0,[9669,9041,5206,68058,64986,96317,55643,21040,49774,92888,40179],function(){return e(e.s=43122)}),_N_E=e.O()}]); 2//# sourceMappingURL=generalSettings-3c9c4e0bbf31d2ff.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.