PageSourceSearch

https://jba.org/_next/static/chunks/1961-cd94387432f91869.js

js jba.org collected 2026-10-02 17:36:00 UTC 67,089 bytes, 6 lines download raw bytes

1"use strict";
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b7cef58f-2a08-501a-9018-f66c306206cd")}catch(e){}}();
3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1961],{14082:(e,t,a)=>{a.d(t,{Cn:()=>r,i2:()=>s,y:()=>o});var n=a(89914),i=a(41471);let o={disableCommunityCopilot:"disableCommunityCopilot",disableCommunityDataLab:"disableCommunityDataLab",disableEmailNotification:"disableEmailNotification",disableProfileIconEdit:"disableProfileIconEdit",disableUserIntroduction:"disableUserIntroduction",enableForYouRecommend:"enableForYouRecommend",enableMultiFactorAuthenticationByBrand:"enableMultiFactorAuthenticationByBrand",enableSecuritySettings:"enableSecuritySettings"},r=e=>{let{data:t}=(0,n.s3)(`/launchdarklyBrandEnabled/${e}`);return t?.value??!1},s=e=>{let t=(0,i.useSelector)(e=>e.app.brand.id),{data:a}=(0,n.s3)(`/launchdarklyBrandEnabledWithoutAuth/${e}/${t}`);return a?.value??!1}},14679:(e,t,a)=>{a.d(t,{P:()=>p});var n=a(45023),i=a(2004),o=a.n(i),r=a(90524),s=a(18097),l=a(49064),c=a(46854),d=a(81529);let u=s.c.Control;function m({children:e,...t}){let{t:a}=(0,r.B)(["components/organisms/admin/post_add"]);return(0,n.FD)(n.FK,{children:[(0,n.FD)(u,{...t,children:[(0,n.Y)("span",{className:"jsx-fa60466ed6f60c8a selector",children:a("Groups: ")}),e]}),(0,n.Y)(o(),{id:"fa60466ed6f60c8a",children:".selector.jsx-fa60466ed6f60c8a{padding:0 0 0 8px}"})]})}function p({brandGroupIds:e,boxId:t,categoryIndex:a,eventId:i,onChange:o}){let{t:s}=(0,r.B)(["components/organisms/admin/post_add"]),{data:u=[]}=(0,d.g2)(t,a,i),f=u.map(e=>({value:e.id,label:e.groupName})),g=e.map(e=>f.find(t=>t.value===e)).filter(e=>!!e);return(0,n.Y)("section",{"data-cy":"group-selector",children:(0,n.Y)(l.Ay,{value:g,styles:b,components:{Control:m,DropdownIndicator:c.mJ},options:f,isSearchable:!0,isMulti:!0,onChange:e=>{e&&o(e.map(e=>e.value))},placeholder:s("Select groups")})})}let b={control:e=>({...e,backgroundColor:"white",borderRadius:0,borderWidth:"1px 0",padding:"10px 0",margin:"0 auto",fontSize:16}),option:(e,{isDisabled:t,isFocused:a,isSelected:n})=>({...e,backgroundColor:t?void 0:n?"#000000":a?"#409EF5":void 0,color:a?"white":void 0}),indicatorSeparator:e=>({...e,display:"none"}),menuPortal:e=>({...e,zIndex:2}),menu:e=>({...e,zIndex:2}),multiValue:e=>({...e,borderRadius:"24px"}),multiValueLabel:e=>({...e,backgroundColor:"#EEEEEE",borderRadius:"24px 0 0 24px"}),multiValueRemove:e=>({...e,backgroundColor:"#EEEEEE",borderRadius:"0 24px 24px 0"})}},46854:(e,t,a)=>{a.d(t,{PK:()=>r,TR:()=>l,XL:()=>c,mJ:()=>s});var n=a(45023);let i=a(18097).c.DropdownIndicator,o=e=>(0,n.Y)(i,{...e,children:(0,n.Y)("span",{children:"▼"})}),r=e=>o(e),s=e=>o(e),l=e=>(0,n.FD)("div",{"ug-id":e["ug-id"],children:[(0,n.Y)("span",{children:e.left}),(0,n.Y)("span",{children:e.right})]}),c=()=>({control:e=>({...e,backgroundColor:"white",borderRadius:0,borderWidth:"1px 0",padding:"10px 0",margin:"0 auto",fontSize:16}),indicatorSeparator:e=>({...e,display:"none"}),menuPortal:e=>({...e,zIndex:2}),menu:e=>({...e,zIndex:2})})},48608:(e,t,a)=>{a.d(t,{I:()=>c});var n=a(45023),i=a(90524),o=a(49064),r=a(32604),s=a(46854),l=a(3841);function c({targetUserType:e,onChange:t}){let{t:a}=(0,i.B)(["components/organisms/admin/post_add"]),d=(0,s.XL)(),u=Object.values(r.xe).map(e=>({value:e,label:(0,n.Y)(s.TR,{left:a("Open to: "),right:a(l.i[e]),"ug-id":"admin-contents-posts-select-disclosure-range-label"})})).filter(e=>e.value!==r.xe.GuestUser);return(0,n.Y)("section",{"data-cy":"disclosure-range-selector",children:(0,n.Y)(o.Ay,{value:u.find(t=>t.value===e),components:{DropdownIndicator:s.PK},onChange:e=>{e&&t(e.value)},styles:d,options:u})})}},54707:(e,t)=>{t.m=void 0,t.m={ClickIcebreakerInputBtn:"ClickIcebreakerInputBtn",ClickIcebreakerInputArea:"ClickIcebreakerInputArea",ViewRecommendList:"ViewRecommendList",ViewForYouRecommendList:"ViewForYouRecommendList",SharePostOnTwitter:"SharePostOnTwitter",ShareCommentOnTwitter:"ShareCommentOnTwitter",CustomerProductView:"CustomerProductView",ClickCustomerProduct:"ClickCustomerProduct",CommunityCopilotDiscussionRoomOpen:"CommunityCopilotDiscussionRoomOpen",CommunityCopilotDiscussionRoomClose:"CommunityCopilotDiscussionRoomClose",ViewLocationPermissionPromotion:"ViewLocationPermissionPromotion",ActionLocationPermissionPromotion:"ActionLocationPermissionPromotion",Vie
3wCheckInChallengeCTA:"ViewCheckInChallengeCTA",ActionCheckInChallengeCTA:"ActionCheckInChallengeCTA",ViewCheckInChallenge:"ViewCheckInChallenge",ActionCheckInChallenge:"ActionCheckInChallenge",ClickSearchContent:"ClickSearchContent",ViewSearchContent:"ViewSearchContent"}},75746:(e,t,a)=>{a.r(t),a.d(t,{ADMIN_QUILL_CONTAINER_ID:()=>tY,AdminLayout:()=>tI});var n=a(45023),i=a(2004),o=a.n(i),r=a(36439),s=a(63640),l=a(47279),c=a(25008),d=a.n(c),u=a(30915),m=a(84221),p=a.n(m),b=a(90524),f=a(27417),g=a(39282);function h({open:e}){let{t}=(0,b.B)(["components/organisms/admin/NavigationSidebar"]);return(0,n.FD)(p(),{href:"/admin/communityDataLabApps",css:y(e),children:[(0,n.Y)(f.aj,{size:"20px",color:g.Q1.user.icon.on}),e&&t("Commune Lab")]})}let y=e=>(0,u.AH)("color:white;font-weight:bold;width:",e?"250px":"100%",";height:46px;padding:8px 16px;background-color:#254860;text-decoration:none;display:flex;align-items:center;justify-content:",e?"start":"center",";gap:20px;&:hover{background:linear-gradient(0deg,rgba(255,255,255,0.08),rgba(255,255,255,0.08)),#254860;}");var x=a(41471),w=a(64897),v=a(11970),F=a(89914);let E=()=>{let{data:e}=(0,F.s3)("/admin/brand/url/cuc");return e?.url??""};var k=a(93636);function Y({open:e}){let t,a,{t:i}=(0,b.B)(["components/organisms/admin/NavigationSidebar"]),r=(t=(0,x.useSelector)(v.B1),a=E(),(0,w.r6)()?t?"https://community.commmune.com/view/box?boxId=knowledgeBase001&categoryIndex=99":`${a}&r=/view/box?boxId=knowledgeBase001&categoryIndex=99`:"https://encommunity.commmune.com/view/box");return(0,n.FD)(n.FK,{children:[(0,n.FD)("a",{href:r,target:"_blank",className:o().dynamic([["ced89ec61cd1b2f2",[e?"250px":"100%",e&&"justify-content: center;",e?"space-between":"center"]]])+" help-center-button",children:[(0,n.Y)(f.ad,{size:"20px",color:g.Q1.user.icon.on}),e&&(0,n.FD)("span",{className:o().dynamic([["ced89ec61cd1b2f2",[e?"250px":"100%",e&&"justify-content: center;",e?"space-between":"center"]]])+" button-inner",children:[i("Help center_GUIDE"),(0,n.Y)(k.A,{fontSize:"small"})]})]}),(0,n.Y)(o(),{id:"ced89ec61cd1b2f2",dynamic:[e?"250px":"100%",e&&"justify-content: center;",e?"space-between":"center"],children:`.help-center-button.__jsx-style-dynamic-selector{color:white;font-weight:bold;width:${e?"250px":"100%"};height:46px;padding:8px 16px;background-color:#254860;display:flex;${e&&"justify-content: center;"}
4            align-items: center;gap:20px}.help-center-button.__jsx-style-dynamic-selector:hover{background:linear-gradient(0deg,rgba(255,255,255,.08),rgba(255,255,255,.08)),#254860;text-decoration:none}.button-inner.__jsx-style-dynamic-selector{width:100%;display:flex;align-items:center;justify-content:${e?"space-between":"center"}}`})]})}var C=a(96914),I=a(66432);function _({children:e,"data-cy":t,"ug-id":a,className:i,enableTargetBlank:o,route:r}){let s=(0,C.U)()(r);return(0,n.Y)(p(),{href:(0,I.Hs)(s),"data-cy":t,"ug-id":a,className:i,target:o?"_blank":void 0,rel:o?"noreferrer":void 0,children:e})}var N=a(7528);function j({menuItemStyles:e,url:t,label:a}){return(0,n.FD)(N.$n,{className:e.className,children:[(0,n.Y)(_,{route:t,enableTargetBlank:!0,children:(0,n.FD)("div",{className:"jsx-bddd9a4691277437 popup-item",children:[(0,n.Y)("span",{className:"jsx-bddd9a4691277437",children:a}),(0,n.Y)(k.A,{fontSize:"small"})]})}),(0,n.Y)(o(),{id:"bddd9a4691277437",children:".popup-item.jsx-bddd9a4691277437{width:100%;display:flex;justify-content:space-between;padding:16px}.popup-item.jsx-bddd9a4691277437 span.jsx-bddd9a4691277437{text-align:start}"})]})}var A=a(42843);function D({open:e}){let{t}=(0,b.B)(["components/organisms/admin/NavigationSidebar"]),[a,i]=r.useState(null);return(0,w.r6)()?(0,n.FD)(n.FK,{children:[(0,n.Y)(N.xu,{onClickAway:()=>i(null),children:(0,n.FD)("button",{onClick:e=>a?i(null):i(e.currentTarget),className:o().dynamic([["e5f2de9b60b789cf",[e?"250px":"100%",e?"start":"center"]]])+" products-open-button",children:[(0,n.Y)(A.A,{style:{fontSize:"20px"}}),e&&(0,n.Y)("span",{className:o().dynamic([["e5f2de9b60b789cf",[e?"250px":"100%",e?"start":"center"]]]),children:t("Products")})]})}),(0,n.Y)(N.ND,{open:!!a,anchorEl:a,placement:"right-end",transition:!0,className:z.className,children:({TransitionProps:t})=>(0,n.Y)(N.zW,{...t,timeout:350,children:(0,n.Y)(N.tu,{className:S.className,children:(0,n.FD)("div",{className:o().dynamic([["e5f2de9b60b789cf",[e?"250px":"100%",e?"start":"center"]]]),children:[(0,n.Y)(j,{menuItemStyles:R,url:"https://commune-engage.com/login",label:"Commune Engage"}),(0,n.Y)(j,{menuItemStyles:R,url:"https://voice.commune.community/ja",label:"Commune Voice"}),(0,n.Y)(j,{menuItemStyles:R,url:"https://datahub.commmune.com/users/sign_in",label:"Commune DataHub"}),(0,n.Y)(j,{menuItemStyles:R,url:"https://successhub.jp/",label:"Commune CRM"}),(0,n.Y)(j,{menuItemStyles:R,url:"https://commune.co.jp/contact-add-products",label:"プロダクト導入に関するお問い合わせ"})]})})})}),S.styles,R.styles,z.styles,(0,n.Y)(o(),{id:"e5f2de9b60b789cf",dynamic:[e?"250px":"100%",e?"start":"center"],children:`.products-open-button.__jsx-style-dynamic-selector{color:white;font-weight:bold;width:${e?"250px":"100%"};height:46px;padding:8px 16px;background-color:#254860;text-decoration:none;display:flex;align-items:center;justify-content:${e?"start":"center"};gap:20px}.products-open-button.__jsx-style-dynamic-selector:hover,.products-open-button.__jsx-style-dynamic-selector:focus{background:linear-gradient(0deg,rgba(255,255,255,.08),rgba(255,255,255,.08)),#254860;outline:none}`})]}):null}let S={styles:(0,n.Y)(o(),{id:"a1b03c1cfab186e3",children:`.MuiPaper-root.jsx-a1b03c1cfab186e3{margin-bottom:-${g.Kz[7]};margin-left:${g.Kz[7]};width:300px;border:1px solid ${g.Q1.admin.border}}`}),className:"jsx-a1b03c1cfab186e3"},R={styles:(0,n.Y)(o(),{id:"b87f1a58845050ef",children:".MuiButton-root.jsx-b87f1a58845050ef{width:100%;padding:0}.MuiButton-root.jsx-b87f1a58845050ef a{width:100%;color:black}.MuiButton-root.jsx-b87f1a58845050ef a:hover{text-decoration:none}"}),className:"jsx-b87f1a58845050ef"},z={styles:(0,n.Y)(o(),{id:"7b850790f7271dc3",children:"*.jsx-7b850790f7271dc3{z-index:100}"}),className:"jsx-7b850790f7271dc3"};var B=a(35999),M=a(14082),L=a(20764),$=a(12787),T=a(53805);function P(e){return(0,n.Y)(N.Ah,{...e,children:(0,n.Y)("path",{d:"M12,12.75c1.63,0,3.07,0.39,4.24,0.9c1.08,0.48,1.76,1.56,1.76,2.73L18,18H6l0-1.61c0-1.18,0.68-2.26,1.76-2.73 C8.93,13.14,10.37,12.75,12,12.75z M4,13c1.1,0,2-0.9,2-2c0-1.1-0.9-2-2-2s-2,0.9-2,2C2,12.1,2.9,13,4,13z M5.13,14.1 C4.76,14.04,4.39,14,4,14c-0.99,0-1.93,0.21-2.78,0.58C0.48,14.9,0,15.62,0,16.43V18l4.5,0v-1.61C4.5,15.56,4.73,14.78,5.13,14.1z M20,13c1.1,0,2-0.9,2-2c0-1.1-0.9-2-2-2s-2,0.9-2,2C18,12.1,18.9,13,20,13z M24,16.43c0-0.81-0.48-1.53-1.22-1.85 C21.93,14.21,20.99,14,20,14c-0.39,0-0.76,0.04-1.13,0.1c0.4,0.68,0.63,1.46,0.63,2.29V18l4.5,0V16.43z M12,6c1.66,0,3,1.34,3,3 c0,1.66-1.34,3-3,3s-3-1.34-3-3C9,7.34,10.34,6,12,6z"})})}var H=a(84149),O=a(92747),U=a(45863),V=a(57750),q=a(27244),K=a(81230);function W({children:e,route:t,activeRoutePrefix:a,...i}){let o,r,s=(o=(0,L.useRouter)().asPath,r=a??t,o.startsWith(r));return(0,n.FD)(_,{route:t,...i,className:d()(G.className,{active:s}),children:[e,G.styles]})}let G={styles:(0,n.Y)(o(),{id:"f706637073b74f4",children:"a.active.jsx-f706637073b74f4{background-color:rgba(0,0,0,.08);display:inline-block;height:48px;width:100%}"}),className:"jsx-f706637073b74f4"};function Q({enable:e,children:t,label:a,minorItems:i,t:s}){let[l,c]=(0,r.useState)(!1),d=(0,r.useRef)(null);return(0,n.FD)("div",{ref:d,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),className:"jsx-69d4eae566b3b617 popper-anchor",children:[(0,n.Y)(N.ND,{open:e&&l,anchorEl:d.current,placement:"right-start",transition:!0,className:Z.className,children:({TransitionProps:e})=>(0,n.Y)(N.zW,{...e,timeout:350,children:(0,n.FD)(N.tu,{className:J.className,"data-cy":"sidebar-menu-major-item-detail-popup",children:[(0,n.Y)("div",{className:"jsx-69d4eae566b3b617 popper-row label",children:s(a)}),i.map((e,t)=>(0,n.Y)(N.$n,{className:X.className,children:(0,n.Y)(W,{route:e.route,activeRoutePrefix:e.activeRoutePrefix,children:(0,n.Y)("div",{className:"jsx-69d4eae566b3b617 popper-row minor-item-body",children:(0,n.Y)("span",{className:"jsx-69d4eae566b3b617",children:s(e.label)})})})},t))]})})}),t,J.styles,X.styles,Z.styles,(0,n.Y)(o(),{id:"69d4eae566b3b617",children:".popper-anchor.jsx-69d4eae566b3b617{width:56px}.label.jsx-69d4eae566b3b617{font-size:14px;color:#666}.minor-item-body.jsx-69d4eae566b3b617{font-size:16px}.popper-row.jsx-69d4eae566b3b617{padding-left:16px;height:48px;width:100%;display:flex;justify-content:flex-start;align-items:center}"})]})}let J={styles:(0,n.Y)(o(),{id:"cf0cb85ed928e4ba",children:`.MuiPaper-root.jsx-cf0cb85ed928e4ba{margin-left:0;width:250px;border:1px solid ${g.Q1.admin.border}}`}),className:"jsx-cf0cb85ed928e4ba"},X={styles:(0,n.Y)(o(),{id:"5cc221601702d76",children:".MuiButton-root.jsx-5cc221601702d76{width:100%;padding:0}.MuiButton-root.jsx-5cc221601702d76 a{width:100%;color:black}
4.MuiButton-root.jsx-5cc221601702d76 a:hover{text-decoration:none}"}),className:"jsx-5cc221601702d76"},Z={styles:(0,n.Y)(o(),{id:"29f2df28b0b58f27",children:"*.jsx-29f2df28b0b58f27{z-index:11}"}),className:"jsx-29f2df28b0b58f27"};var ee=a(46273);function et({menuItemStyles:e}){let{t}=(0,b.B)(["components/organisms/admin/NavigationSidebar"]);return(0,n.FD)(N.$n,{className:e.className,"ug-id":"admin-back-to-community",children:[(0,n.Y)(_,{route:"/view/home",enableTargetBlank:!0,children:(0,n.FD)("div",{className:"jsx-8bce7e5c6aa0ae32 flex-row popup-item",children:[(0,n.Y)("span",{className:"jsx-8bce7e5c6aa0ae32",children:t("Go to community")}),(0,n.Y)(k.A,{fontSize:"small"})]})}),(0,n.Y)(o(),{id:"8bce7e5c6aa0ae32",children:".flex-row.jsx-8bce7e5c6aa0ae32{width:100%;display:flex;justify-content:space-between}.popup-item.jsx-8bce7e5c6aa0ae32 span.jsx-8bce7e5c6aa0ae32{text-align:start}"})]})}function ea({menuItemStyles:e}){let{t}=(0,b.B)(["components/organisms/admin/NavigationSidebar"]);return(0,w.r6)()?(0,n.FD)(N.$n,{className:e.className,"ug-id":"admin-inquiry",children:[(0,n.Y)(_,{route:"https://go.commune.co.jp/l/915341/2022-09-29/l6vxh",enableTargetBlank:!0,children:(0,n.FD)("div",{className:"jsx-8bce7e5c6aa0ae32 flex-row popup-item",children:[(0,n.Y)("span",{className:"jsx-8bce7e5c6aa0ae32",children:t("Contact us")}),(0,n.Y)(k.A,{fontSize:"small"})]})}),(0,n.Y)(o(),{id:"8bce7e5c6aa0ae32",children:".flex-row.jsx-8bce7e5c6aa0ae32{width:100%;display:flex;justify-content:space-between}.popup-item.jsx-8bce7e5c6aa0ae32 span.jsx-8bce7e5c6aa0ae32{text-align:start}"})]}):null}var en=a(64640),ei=a(97953),eo=a(55165),er=a(68121),es=a(11345);function el({user:e,className:t}){let{t:a}=(0,b.B)(["components/organisms/admin/NavigationSidebar"]),i=(0,en.q)(),s=(0,x.useDispatch)(),l=(0,x.useSelector)(eo.So),[c,u]=r.useState(null);return(0,n.FD)(n.FK,{children:[(0,n.Y)(N.xu,{onClickAway:()=>u(null),children:(0,n.FD)("button",{onClick:e=>c?u(null):u(e.currentTarget),"ug-id":"admin-user-info",className:"jsx-68839e0364e9e438 "+(d()(t,"user-info-wrapper")||""),children:[(0,n.Y)(ee.e,{src:e.iconPath,size:24,className:"mr-3",tabActiveColor:l??""}),(0,n.Y)("span",{"data-cy":"user-account-text",className:"jsx-68839e0364e9e438 user-account-text",children:e.accountName}),(0,n.Y)(es.A,{style:{fontSize:"24px"}})]})}),(0,n.Y)(N.ND,{open:!!c,anchorEl:c,placement:"right-end",transition:!0,className:eu.className,children:({TransitionProps:e})=>(0,n.Y)(N.zW,{...e,timeout:350,children:(0,n.Y)(N.tu,{className:ec.className,"data-cy":"sidebar-user-info-popup",children:(0,n.FD)("div",{className:"jsx-68839e0364e9e438",children:[(0,n.Y)(ea,{menuItemStyles:ed}),(0,n.Y)(et,{menuItemStyles:ed}),(0,n.Y)(N.$n,{className:ed.className,children:(0,n.Y)("div",{onClick:async()=>{await (0,er.w)(i),s(ei.S6.request())},"data-cy":"sidebar-user-info-popup-logout",className:"jsx-68839e0364e9e438 logout flex-row popup-item",children:(0,n.Y)("span",{className:"jsx-68839e0364e9e438",children:a("Log out")})})})]})})})}),ec.styles,ed.styles,eu.styles,(0,n.Y)(o(),{id:"68839e0364e9e438",children:".user-account-text.jsx-68839e0364e9e438{display:inline-block;width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}.user-info-wrapper.jsx-68839e0364e9e438{background-color:#254860;width:250px;height:46px;padding:8px 16px;border:none;border-top:white solid 1px;cursor:pointer;text-align:left;color:#fff;font-weight:bold;white-space:nowrap;display:flex;align-items:center}.user-info-wrapper.jsx-68839e0364e9e438:hover,.user-info-wrapper.jsx-68839e0364e9e438:focus{background:linear-gradient(0deg,rgba(255,255,255,.08),rgba(255,255,255,.08)),#254860}.flex-row.jsx-68839e0364e9e438{width:100%;display:flex;justify-content:space-between}.popup-item.jsx-68839e0364e9e438 span.jsx-68839e0364e9e438{text-align:start}"})]})}let ec={styles:(0,n.Y)(o(),{id:"6218d67d752a46c3",children:`.MuiPaper-root.jsx-6218d67d752a46c3{margin-bottom:${g.Kz[7]};margin-left:${g.Kz[7]};width:250px;border:1px solid ${g.Q1.admin.border}}`}),className:"jsx-6218d67d752a46c3"},ed={styles:(0,n.Y)(o(),{id:"b95f0d86d4779959",children:".MuiButton-root.jsx-b95f0d86d4779959{width:100%;padding:16px}.MuiButton-root.jsx-b95f0d86d4779959 a{width:100%;color:black}.MuiButton-root.jsx-b95f0d86d4779959 a:hover{text-decoration:none}"}),className:"jsx-b95f0d86d4779959"},eu={styles:(0,n.Y)(o(),{id:"5ad50290bbecb97e",children:"*.jsx-5ad50290bbecb97e{z-index:100}"}),className:"jsx-5ad50290bbecb97e"};var em=a(99178),ep=a(49768);let eb=()=>(0,n.FD)(n.FK,{children:[(0,n.Y)(em.A,{className:eI.className}),eI.styles]});function ef({children:e}){return(0,n.FD)("button",{className:"jsx-76bd02fb7030d1dc",children:[e,(0,n.Y)(o(),{id:"76bd02fb7030d1dc",children:"button.jsx-76bd02fb7030d1dc{padding:8px 0 8px 56px;color:white;width:100%;min-height:48px;border:none;text-align:left;background:none;position:relative}button.jsx-76bd02fb7030d1dc:hover,button.jsx-76bd02fb7030d1dc:focus{background-color:rgba(255,255,255,.08)}button.jsx-76bd02fb7030d1dc:focus-visible{outline:none}"})]})}function eg({children:e,route:t,activeRoutePrefix:a,blank:i,"ug-id":o,...r}){let s,l,c=(s=(0,L.useRouter)().asPath,l=a??t,s.startsWith(l));return(0,n.FD)(_,{route:t,enableTargetBlank:i,...r,className:d()(eh.className,{active:c}
4),"data-cy":"minor-item-link","ug-id":o,children:[e,eh.styles]})}let eh={styles:(0,n.Y)(o(),{id:"356055f50aa4b00e",children:"a.active.jsx-356055f50aa4b00e{background-color:rgba(255,255,255,.24);display:inline-block;height:48px;width:100%}"}),className:"jsx-356055f50aa4b00e"};function ey({children:e,"data-cy":t,"ug-id":a}){return(0,n.FD)(N.Xo,{className:ex.className,expandIcon:(0,n.Y)(eb,{}),"data-cy":t,"ug-id":a,children:[e,ex.styles]})}let ex={styles:(0,n.Y)(o(),{id:"f4f103bb3e0d85fb",children:".MuiAccordionSummary-root.jsx-f4f103bb3e0d85fb{font-weight:bold;width:250px}.MuiAccordionSummary-root.jsx-f4f103bb3e0d85fb:hover{background:linear-gradient(0deg,rgba(255,255,255,.08),rgba(255,255,255,.08)),#254860}.MuiAccordionSummary-root.Mui-focused.jsx-f4f103bb3e0d85fb{background-color:rgba(255,255,255,.08)}.MuiAccordionSummary-root.Mui-expanded.jsx-f4f103bb3e0d85fb{min-height:48px}.MuiAccordionSummary-root.jsx-f4f103bb3e0d85fb .MuiAccordionSummary-content{align-items:center;white-space:nowrap}.MuiAccordionSummary-root.jsx-f4f103bb3e0d85fb .MuiAccordionSummary-content .MuiSvgIcon-root{font-size:20px}.MuiAccordionSummary-root.jsx-f4f103bb3e0d85fb .MuiAccordionSummary-content>*+*{margin-left:20px}.MuiAccordionSummary-root.jsx-f4f103bb3e0d85fb .MuiAccordionSummary-content.Mui-expanded{margin:12px 0}"}),className:"jsx-f4f103bb3e0d85fb"};function ew({children:e}){return(0,n.FD)(N.Zi,{className:ev.className,children:[e,ev.styles]})}let ev={styles:(0,n.Y)(o(),{id:"30127cfb4cf6a1e1",children:".MuiAccordionDetails-root.jsx-30127cfb4cf6a1e1{padding:0;display:block}"}),className:"jsx-30127cfb4cf6a1e1"},eF=(e,t)=>e.map(({minorItems:e})=>e.reduce((e,a)=>{let n;return e||(n=a.activeRoutePrefix??a.route,t.startsWith(n))},!1));function eE({open:e,className:t,children:a}){return(0,n.FD)("div",{className:"jsx-281e89ab942f74ae "+(d()("expand-container",{closed:!e},t)||""),children:[a,(0,n.Y)(o(),{id:"281e89ab942f74ae",children:".expand-container.jsx-281e89ab942f74ae{width:250px;transition:width 195ms cubic-bezier(.4,0,.6,1)0ms;overflow-x:hidden}.expand-container.closed.jsx-281e89ab942f74ae{width:56px}"})]})}function ek(e){let t=(0,M.Cn)(M.y.disableCommunityDataLab),a=(0,x.useSelector)($.m6),{t:i}=(0,b.B)(["components/organisms/admin/NavigationSidebar"]),{open:c,setOpen:u}=e,m=(0,x.useSelector)($.dt),p=(0,x.useSelector)(v.Zz),f=((e,t)=>{let a=(0,M.Cn)(M.y.enableSecuritySettings),{brand:i}=(0,B.P)(),{autoDirectMessage:o,socialLogin:s}=i?.featureFlags||{autoDirectMessage:l.GL.DISABLED,socialLogin:!1};return(0,r.useMemo)(()=>{let i;return(i=(0,H.Z)(w.Ay.language)||"ja",[{label:"Users",icon:(0,n.Y)(P,{}),minorItems:[{route:`/v2/${i}/admin/users`,label:"All users",lowerLimitRoleId:T.RoleId.AdminDeveloper,ugId:"admin-minor-menu-all-users"},{route:`/v2/${i}/admin/groups`,label:"All groups",lowerLimitRoleId:T.RoleId.AdminDeveloper}],ugId:"admin-major-menu-users"},{label:"Contents",icon:(0,n.Y)(O.A,{}),minorItems:[{route:`/v2/${i}/admin/posts`,label:"Posts",ugId:"admin-minor-menu-posts"},{route:`/v2/${i}/admin/post_templates`,label:"Post templates",lowerLimitRoleId:T.RoleId.AdminSuper},{route:`/v2/${i}/admin/icebreaker_questions`,label:"Icebreakers",ugId:"admin-minor-menu-icebreaker"},{route:`/v2/${i}/admin/customer_products`,label:"Product catalog"},{route:`/v2/${i}/admin/knowledgebase`,label:"Knowledge base",brandFeatureFlags:{type:"AND",flags:["isEnabledKnowledgeBase"]},ugId:"admin-minor-enu-kb"},{route:`/v2/${i}/admin/events`,label:"Events"},{route:`/v2/${i}/admin/challenges`,label:"Challenges"},{route:`/v2/${i}/admin/training/courses`,activeRoutePrefix:"/admin/training/courses",label:"Training",brandFeatureFlags:{type:"AND",flags:["isEnabledTraining"]}}],ugId:"admin-major-menu-contents"},{label:"Messages",icon:(0,n.Y)(U.A,{}),minorItems:[{route:`/v2/${i}/admin/direct_messages`,label:"Direct messages",brandFeatureFlags:{type:"AND",flags:["isEnabledDM"]}},{route:`/v2/${i}/admin/auto_direct_messages`,label:"DM automation",brandFeatureFlags:{type:"OR",flags:["isEnabledDM","isEnabledUsersDM"]},lowerLimitRoleId:T.RoleId.AdminDeveloper}],ugId:"admin-major-menu-messages"},{label:"Analytics",icon:(0,n.Y)(V.A,{}),minorItems:[{route:`/v2/${i}/admin/analytics`,label:"Data analytics",lowerLimitRoleId:T.RoleId.AdminDeveloper}],ugId:"admin-major-menu-analytics"},{label:"Design",icon:(0,n.Y)(q.A,{}),minorItems:[{route:`/v2/${i}/admin/badges`,label:"Badges",lowerLimitRoleId:T.RoleId.AdminDeveloper},{route:`/v2/${i}/admin/rank`,label:"Points and rank",lowerLimitRoleId:T.RoleId.AdminDeveloper},{route:`/v2/${i}/admin/settings/profile_objects`,label:"Profile customization",lowerLimitRoleId:T.RoleId.AdminDeveloper},{route:`/v2/${i}/admin/settings/reaction`,label:"Custom reactions",lowerLimitRoleId:T.RoleId.AdminDeveloper},{route:"/admin/site/edit/home",label:"Community page",lowerLimitRoleId:T.RoleId.AdminDeveloper,ugId:"admin-minor-menu-community-page"},{route:`/v2/${i}/admin/settings/notification_texts`,label:"Push Notifications"}],ugId:"admin-major-menu-design"},{label:"Settings",icon:(0,n.Y)(K.A,{}),minorItems:[{route:`/v2/${i}/admin/settings/brand`,label:"Community settings",lowerLimitRoleId:T.RoleId.AdminDeveloper,ugId:"admin-minor-menu-community-settings"},{route:`/v2/${i}/admin/settings/security`,label:"Security settings",lowerLimitRoleId:T.RoleId.AdminSuper},{route:`/v2/${i}/admin/settings/onboarding`,label:"Guide for onboarding",lowerLimitRoleId:T.RoleId.AdminDeveloper},{route:`/v2/${i}/admin/settings/social_login`,label:"Social login",lowerLimitRoleId:T.RoleId.AdminSuper,ugId:"admin-minor-menu-social-login"},{route:`/v2/${i}/admin/settings/send_mail`,label:"Email settings",lowerLimitRoleId:T.RoleId.AdminDeveloper},{route:`/v2/${i}/admin/settings/integrations`,activeRoutePrefix:"/admin/settings/integrations",label:"Tools",lowerLimitRoleId:T.RoleId.AdminDeveloper},{route:`/v2/${i}/admin/settings/admin_users`,label:"Admin info",lowerLimitRoleId:T.RoleId.AdminDeveloper,ugId:"admin-minor-menu-admin"},{route:`/v2/${i}/admin/settings/preferences`,label:"Preferences",lowerLimitRoleId:T.RoleId.AdminDeveloper}],ugId:"admin-major-menu-settings"}]).map(n=>{let i=n.minorItems.filter(t=>{var a;return a=e.roleId,!t.lowerLimitRoleId||a>=t.lowerLimitRoleId}).filter(e=>!e.brandFeatureFlags||("OR"===e.brandFeatureFlags.type?e.brandFeatureFlags.flags.some(e=>t[e]):e.brandFeatureFlags.flags.every(e=>t[e]))).filter(e=>"Security settings"!==e.label||a).filter(e=>"DM automation"!==e.label||o!==l.GL.DISABLED).filter(e=>"Social login"!==e.label||s);return{...n,minorItems:i}}).filter(e=>e.minorItems.length>0)},[e.roleId,t,a,o,s])})(m,p),{setExpanded:g,initStateOfMenu:y,isExpanded:F,closeAllMenu:E}=((e,t)=>{let a=(0,L.useRouter)().asPath,[n,i]=(0,r.useState)(()=>t?eF(e,a):Array.from({length:e.length}).fill(!1));return{setExpanded:(e,t)=>{let a=[...n];a[e]=t,i(a)},initStateOfMenu:()=>i(eF(e,a)),isExpanded:e=>n[e]??!1,closeAllMenu:()=>{i(Array.from({length:e.length}).fill(!1))}}})(f,c);return(0,n.FD)("div",{"data-cy":"admin-sidebar",className:o().dynamic([["e3a3408fe2628030",[s.A.MAIN_BLUE,s.A.MAIN_BLUE]]])+" sidebar-wrapper",children:[(0,n.Y)(eE,{open:c,className:eY.className,children:(0,n.FD)("div",{className:o().dynamic([["e3a3408fe2628030",[s.A.MAIN_BLUE,s.A.MAIN_BLUE]]])+" "+(d()("sidebar-header",{closed:!c})||""),children:[(0,n.Y)(_,{route:`/v2/${p.locale}/admin/posts`,className:d()(eC.className,{removed:!c}),children:(0,n.Y)("img",{src:`/static/img/${i("COMMMUNE_LOGO_PATH")}`,width:144,alt:"commmune_logo",className:o().dynamic([["e3a3408fe2628030",[s.A.MAIN_BLUE,s.A.MAIN_BLUE]]])})}),(0,n.Y)("div",{"data-cy":"sidebar-toggle-button",onClick:()=>{c?(u(!1),E()):(u(!0),y())},className:o().dynamic([["e3a3408fe2628030",[s.A.MAIN_BLUE,s.A.MAIN_BLUE]]])+" sidebar-toggle-button",children:(0,n.Y)(ep.A,{className:eI.className})})]})}),(0,n.Y)(eE,{open:c,children:(0,n.Y)("div",{className:o().dynamic([["e3a3408fe2628030",[s.A.MAIN_BLUE,s.A.MAIN_BLUE]]])+" "+(d()("sidebar-menu",{closed:!c})||""),children:f.map(({icon:e,minorItems:t,label:a,ugId:r},l)=>(0,n.FD)(N.nD,{className:e_.className,expanded:F(l),onChange:(e,t)=>
4{c&&g(l,t)},children:[(0,n.Y)(Q,{enable:!c,minorItems:t,label:i(a),t:i,children:(0,n.FD)(ey,{"ug-id":r,"data-cy":"sidebar-menu-major-item",children:[e," ",(0,n.Y)("span",{className:o().dynamic([["e3a3408fe2628030",[s.A.MAIN_BLUE,s.A.MAIN_BLUE]]]),children:i(a)})]})}),(0,n.Y)(ew,{children:t.map(e=>(0,n.Y)(eg,{route:e.route,activeRoutePrefix:e.activeRoutePrefix,"ug-id":e.ugId,blank:e.blank,children:(0,n.Y)(ef,{children:i(e.label)})},e.route))}),e_.styles]},a))})}),(0,n.FD)(eE,{open:c,className:eN.className,children:[(0,n.FD)("div",{className:o().dynamic([["e3a3408fe2628030",[s.A.MAIN_BLUE,s.A.MAIN_BLUE]]])+" help-links",children:[(0,n.Y)(D,{open:c}),!t&&a&&(0,n.Y)(h,{open:c}),(0,n.Y)(Y,{open:c})]}),(0,n.Y)(el,{user:m,className:ej.className})]}),(0,n.Y)(o(),{id:"e3a3408fe2628030",dynamic:[s.A.MAIN_BLUE,s.A.MAIN_BLUE],children:`.sidebar-wrapper.__jsx-style-dynamic-selector{background-color:${s.A.MAIN_BLUE};min-height:100vh;overflow-y:scroll;overflow-x:hidden;flex-shrink:0;color:white}.sidebar-wrapper.__jsx-style-dynamic-selector::-webkit-scrollbar{display:none}.sidebar-wrapper.__jsx-style-dynamic-selector *{font-size:16px}.sidebar-toggle-button.__jsx-style-dynamic-selector{padding:8px;cursor:pointer}.sidebar-toggle-button.__jsx-style-dynamic-selector:hover{background-color:rgba(0,0,0,.08);border-radius:50%}.sidebar-header.__jsx-style-dynamic-selector{background-color:${s.A.MAIN_BLUE};border:none;padding:16px 8px 16px 8px;display:flex;justify-content:space-between;align-items:center}.sidebar-menu.__jsx-style-dynamic-selector{margin:72px 0 230px;width:250px}.sidebar-menu.__jsx-style-dynamic-selector>*+*{margin:8px 0 8px 0}.help-links.__jsx-style-dynamic-selector{border-top:.5px solid#7c91a0}`}),eY.styles,eI.styles,eC.styles,eN.styles,ej.styles]})}let eY={styles:(0,n.Y)(o(),{id:"7a5c34fbd4a2346",children:".expand-container.jsx-7a5c34fbd4a2346{position:fixed;z-index:10;top:0}"}),className:"jsx-7a5c34fbd4a2346"},eC={styles:(0,n.Y)(o(),{id:"53bf2272d843940d",children:"a.jsx-53bf2272d843940d{margin-left:8px;display:block}.removed.jsx-53bf2272d843940d{display:none}"}),className:"jsx-53bf2272d843940d"},eI={styles:(0,n.Y)(o(),{id:"8464bd2351c9e316",children:".MuiSvgIcon-root.jsx-8464bd2351c9e316{font-size:24px!important;color:#fff}"}),className:"jsx-8464bd2351c9e316"},e_={styles:(0,n.Y)(o(),{id:"81ced2f888adf171",children:`.MuiAccordion-root.jsx-81ced2f888adf171{width:100%;background-color:${s.A.MAIN_BLUE};color:white;box-shadow:none}.MuiAccordion-root.jsx-81ced2f888adf171::before{display:none}.MuiAccordion-root.Mui-expanded.jsx-81ced2f888adf171{margin:8px 0}`}),className:"jsx-81ced2f888adf171"},eN={styles:(0,n.Y)(o(),{id:"415dc4ca0f972230",children:".expand-container.jsx-415dc4ca0f972230{position:fixed;z-index:10;bottom:0}"}),className:"jsx-415dc4ca0f972230"},ej={styles:(0,n.Y)(o(),{id:"bed1685a540f035c",children:".user-info-wrapper.jsx-bed1685a540f035c{width:100%;border:none}"}),className:"jsx-bed1685a540f035c"};var eA=a(75718),eD=a(98841),eS=a(18731);function eR({toggleRobotIcon:e,toggleCopilotWindow:t}){let[a,i]=(0,r.useState)({left:0,top:0}),s=(0,r.useRef)(null),l=(0,r.useRef)(null),c=(0,r.useCallback)(a=>{a.currentTarget.blur();let n=s.current?.getBoundingClientRect().left||0,o=s.current?.getBoundingClientRect().top||0;i({left:a.clientX-n-50,top:a.clientY-o-50}),e(!1),t(!0),l.current?.classList.remove("effect-visible"),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{l.current?.classList.add("effect-visible")})})},[e,t]);return(0,n.FD)(n.FK,{children:[(0,n.Y)("button",{onClick:c,className:o().dynamic([["ff2f3541bf423872",[a.left,a.top,100,100,.6]]])+" robot-button",children:(0,n.FD)("div",{ref:s,className:o().dynamic([["ff2f3541bf423872",[a.left,a.top,100,100,.6]]])+" ripple-container",children:[(0,n.Y)(eS.I,{source:"Robot",size:7}),(0,n.Y)("span",{ref:l,className:o().dynamic([["ff2f3541bf423872",[a.left,a.top,100,100,.6]]])+" ripple-effect"})]})}),(0,n.Y)(o(),{id:"ff2f3541bf423872",dynamic:[a.left,a.top,100,100,.6],children:`.robot-button.__jsx-style-dynamic-selector{position:fixed;right:16px;bottom:16px;width:56px;height:56px;display:flex;justify-content:center;align-items:center;text-align:center;background-color:#EEE;border-radius:16px;box-shadow:0px 1px 3px 0px#0000004D,0px 4px 8px 3px#00000026;border:none;outline:none;z-index:1001}.robot-button.__jsx-style-dynamic-selector:hover::before{position:absolute;content:"";width:100%;height:100%;border-radius:16px;background-color:#13131314}.robot-button.__jsx-style-dynamic-selector:focus::after{position:absolute;content:"";width:100%;height:100%;border-radius:16px;background-color:#13131314}.ripple-container.__jsx-style-dynamic-selector{position:relative;width:100%;height:100%;border-radius:16px;display:flex;justify-content:center;align-items:center;overflow:hidden}.ripple-effect.__jsx-style-dynamic-selector{left:${a.left}px;top:${a.top}px;width:100px;height:100px;position:absolute;border-radius:100%;pointer-events:none;background-color:#1313131F;transform:scale(0);opacity:0}
4.effect-visible.__jsx-style-dynamic-selector{animation:ripple 0.6s ease-out}@keyframes ripple{from{opacity:1}to{transform:scale(2);opacity:0}}`})]})}var ez=a(4468),eB=a(82501),eM=a(91361);let eL=(0,r.memo)((0,r.forwardRef)(({isOverlay:e=!1,isRoomCreatable:t,onClick:a,onClose:i,listeners:s,isLoading:l},c)=>{let{t:d}=(0,b.B)(["components/organisms/admin"]),[u,m]=(0,r.useState)(!1),p=(0,r.useCallback)(()=>{m(!0)},[]),g=(0,r.useCallback)(()=>{m(!1)},[]),h=(0,r.useCallback)(()=>{m(!1)},[]);return(0,n.FD)(n.FK,{children:[(0,n.FD)("div",{ref:c,...s,onMouseDown:p,onMouseUp:g,onMouseLeave:h,className:o().dynamic([["28ee80b14ec12e91",[e||u?"grabbing":"grab"]]])+" "+(s&&null!=s.className&&s.className||"copilot-header"),children:[(0,n.Y)("div",{className:o().dynamic([["28ee80b14ec12e91",[e||u?"grabbing":"grab"]]])+" form-title",children:!l&&(0,n.FD)(n.FK,{children:[(0,n.Y)("div",{className:o().dynamic([["28ee80b14ec12e91",[e||u?"grabbing":"grab"]]])+" form-icon",children:(0,n.Y)(eS.I,{source:"Robot",size:7})}),t?(0,n.Y)(eM.$,{onClick:a,variant:"elevated",style:{outline:"none"},leaderIcon:(0,n.Y)(f.FW,{}),children:d("Start new chat")}):(0,n.Y)(eB.E,{variant:"xLarge",fontWeight:"bold",children:d("Hey there\uD83D\uDC4B")})]})}),(0,n.Y)("button",{onClick:i,"data-testid":"close-button",className:o().dynamic([["28ee80b14ec12e91",[e||u?"grabbing":"grab"]]]),children:(0,n.Y)(eS.I,{source:"ArrowBottom_Fill",size:3})})]}),(0,n.Y)(o(),{id:"28ee80b14ec12e91",dynamic:[e||u?"grabbing":"grab"],children:`.copilot-header.__jsx-style-dynamic-selector{display:flex;justify-content:space-between;align-items:center;padding:16px 24px;height:72px;border-bottom:1px solid#bfc8ca}.copilot-header.__jsx-style-dynamic-selector:hover{cursor:${e||u?"grabbing":"grab"}}.form-title.__jsx-style-dynamic-selector{display:flex;align-items:center}.form-icon.__jsx-style-dynamic-selector{margin-right:8px}`})]})}));var e$=a(8995),eT=a(78602),eP=a(55988),eH=a(54707),eO=a(99812),eU=a(96938),eV=a(99759);
4let eq="copilotDisplayState";function eK({feedbackId:e,reason:t,reasons:a,setReasons:i}){let s,l,{t:c}=(0,b.B)(["components/organisms/admin"]),d=(s=(0,en.q)(),async(e,t)=>{await s.put(`/admin/community_copilot/feedbacks/${e}/reasons/${t}`)}),u=(l=(0,en.q)(),async(e,t)=>{await l.delete(`/admin/community_copilot/feedbacks/${e}/reasons/${t}`)}),m=(0,r.useMemo)(()=>a.includes(t),[a,t]),p=(0,r.useMemo)(()=>(e=>{switch(e){case eT.VY.OFFENSIVE:return"Don't like the style";case eT.VY.INCORRECT:return"Not factually correct";case eT.VY.UNCLEAR:return"Not crisp answer";case eT.VY.UNRELATED:return"Not what I expected";case eT.VY.NOT_HELPFUL:return"Couldn't solve problem"}})(t)??"",[t]),f=(0,r.useCallback)(async()=>{e&&(m?(await u(e,t),i(a.filter(e=>e!==t))):(await d(e,t),i([...a,t])))},[m,u,e,d,t,a,i]);return(0,n.FD)("div",{className:"jsx-a573780a4d008951 reason-container",children:[(0,n.Y)(N.ip,{control:(0,n.Y)(N.Sc,{size:"small",checked:m,onChange:f,sx:{color:"#3F484A","&.Mui-checked":{color:"#131313"}}}),label:(0,n.Y)(eB.E,{variant:"small",lineHeight:400,children:c(p)})}),(0,n.Y)(o(),{id:"a573780a4d008951",children:".reason-container.jsx-a573780a4d008951{display:flex;align-items:center}"})]})}var eW=a(67126);let eG=a.n(eW)()(()=>a.e(504).then(a.bind(a,60504)),{loadableGenerated:{webpack:()=>[60504]},ssr:!1});function eQ({content:e}){return(0,n.Y)(eG,{components:{ol:({children:e})=>(0,n.FD)("ol",{className:"jsx-eff4ca6f7a23aba0 custom-ol",children:[e,(0,n.Y)(o(),{id:"eff4ca6f7a23aba0",children:".custom-ol.jsx-eff4ca6f7a23aba0{padding-left:1em;white-space:normal}"})]}),ul:({children:e})=>(0,n.FD)("ul",{className:"jsx-17ed492315a10a0b custom-ul",children:[e,(0,n.Y)(o(),{id:"17ed492315a10a0b",children:".custom-ul.jsx-17ed492315a10a0b{padding-left:1em;white-space:normal}"})]}),li:({children:e})=>(0,n.FD)("li",{className:"jsx-937a1b002b2285bf custom-li",children:[e,(0,n.Y)(o(),{id:"937a1b002b2285bf",children:".custom-li.jsx-937a1b002b2285bf{list-style:inherit;position:relative}"})]})},children:e})}let eJ=(0,u.AH)("margin-top:24px;"),eX=(0,u.AH)("display:flex;flex-direction:column;"),eZ=(0,u.AH)("margin-right:22px;"),e0=(0,u.AH)("display:flex;flex-direction:column;gap:2px;margin:6.5px 0 14.5px;padding:0 15px;"),e1=(0,u.AH)("margin-top:32px;"),e2=(0,u.AH)("outline:none;&:focus-visible{outline:auto;}"),e6=(0,u.AH)("margin-left:8px;outline:none;&:focus-visible{outline:auto;}"),e4=(0,u.AH)("position:relative;margin-top:32px;padding:12px 8px;background-color:#F5F7FE;border-radius:",g.TI[3],";"),e5=(0,u.AH)("display:flex;position:absolute;top:12px;right:8px;outline:none;&:focus-visible{outline:auto;}"),e8=(0,u.AH)("margin-top:32px;"),e3=(0,u.AH)("display:flex;align-items:center;gap:8px;"),e7=(0,u.AH)("font-size:16px;font-weight:700;color:",g.FE.gray.user[6],";"),e9=(0,u.AH)("margin-top:8px;font-size:16px;color:",g.FE.gray.user[4],";"),te=(0,u.AH)("margin-top:8px;font-size:16px;font-weight:400;color:",g.FE.gray.user[6],";word-wrap:break-word;word-break:break-all;white-space:pre-wrap;"),tt=(0,u.AH)("margin-top:32px;"),ta=(0,u.AH)("width:344px;height:26px;display:flex;align-items:center;gap:8px;margin-bottom:8px;"),tn=(0,u.AH)("width:60px;height:19px;font-size:15px;font-weight:700;line-height:19.5px;color:",g.FE.black,";"),ti=(0,u.AH)("height:26px;padding:4px 8px 4px 8px;border-radius:",g.TI[3],";font-size:13px;line-height:18.2px;font-weight:bold;background-color:",g.FE.gray.user[1],";color:",g.FE.gray.user[5],";"),to=(0,u.AH)("width:344px;display:flex;flex-direction:column;gap:8px;"),tr=(0,u.AH)("width:100%;font-size:15px;line-height:21px;display:flex;align-items:center;overflow:hidden;"),ts=(0,u.AH)("font-weight:bold;flex-shrink:0;"),tl=(0,u.AH)("flex:1;min-width:0;font-weight:400;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"),tc=(0,u.AH)("position:relative;width:100%;height:4px;"),td=(0,u.AH)("position:absolute;top:0;right:0;height:100%;border-radius:",g.TI[2],";background-color:#D0DCFA;"),tu=(0,u.AH)("position:absolute;top:0;right:0;height:100%;width:4px;border-radius:",g.TI.circle,";background-color:#3269E9;"),tm=(0,u.AH)("position:absolute;top:0;left:0;height:100%;border-radius:",g.TI[2],";background-color:#3269E9;");function tp({showAskToCommuneButton:e,showPostToShipButton:t,onClickAskToCommune:a,onClickAskOnShip:i,onClickConsult:o}){let{t:r}=(0,b.B)(["components/organisms/admin"]);return(0,n.FD)(n.FK,{children:[e&&((0,w.r6)()?(0,n.Y)("div",{css:eJ,children:(0,n.Y)(eM.$,{onClick:a,variant:"outlined",style:{outline:"none"},children:r("Ask to Commune")})}):(0,n.Y)("div",{css:eJ,children:(0,n.Y)(eM.$,{onClick:o,variant:"outlined",style:{outline:"none"},children:r("Consult by email")})})),t&&((0,w.r6)()?(0,n.Y)("div",{css:eJ,children:(0,n.Y)(eM.$,{onClick:i,variant:"outlined",style:{outline:"none"},children:r("Ask on SHIP")})}):(0,n.Y)("div",{css:eJ,children:(0,n.Y)(eM.$,{onClick:o,variant:"outlined",style:{outline:"none"},children:r("Consult by email")})}))]})}function tb({latestAnswer:e,reasons:t,setReasons:a,feedbackMessage:i,isLoading:o,textareaRef:r,handleChangeTextarea:s,getIsDisabled:l,handleFeedbackSendClick:c}){let d,{t:m}=(0,b.B)(["components/organisms/admin"]),p=l();return(0,n.FD)("div",{css:eX,children:[(0,n.Y)("div",{css:eZ,children:(0,n.Y)(eB.E,{variant:"small",lineHeight:400,children:m(e.feedback?.type===eT.r9.GOOD?"Your additional thoughts would help me provide better answer to you.":"Your thoughts would help me provide better answers to you.")})}),e.feedback?.type===eT.r9.BAD?(0,n.FD)(n.FK,{children:[(0,n.Y)("div",{css:e0,children:Object.values(eT.VY).map(i=>(0,n.Y)(eK,{reason:i,feedbackId:e.feedback?(0,eP.CommunityCopilotFeedbackId)(e.feedback?.id):void 0,reasons:t,setReasons:a},i))}),(0,n.Y)("div",{css:eZ,children:(0,n.Y)(eB.E,{variant:"small",lineHeight:400,children:m("Please let us know what you think.")})})]}):null,(0,n.Y)("textarea",{ref:r,disabled:o,value:i??"",css:(d=i?r.current?.scrollHeight:48,(0,u.AH)("width:100%;height:",d,"px;font-size:15px;line-height:21px;border:1px solid #717171;border-radius:",g.TI[2],";resize:none;padding:13.5px 16px;margin-top:8px;white-space:pre-wrap;word-wrap:break-all;word-break:break-all;overflow-y:hidden;")),onChange:s}),(0,n.Y)("button",{type:"button",disabled:p,css:(0,u.AH)("background-color:",p?"#1D1B201F":"#131313",";color:",p?"#171D1E61":"#FFFFFF",";border:none;border-radius:100px;width:77px;height:40px;font-size:14px;font-weight:600;line-height:20px;outline:none;margin-top:16px;&:focus-visible{outline:auto;}"),onClick:c,children:m("Send")})]})}function tf({latestAnswer:e,feedbackContainerRef:t,feedbackId:a,feedbackStatus:i,handleFeedbackButtonClick:o,handleFeedbackCloseClick:r,reasons:s,setReasons:l,feedbackMessage:c,isLoading:d,textareaRef:u,handleChangeTextarea:m,getIsDisabled:p,handleFeedbackSendClick:f,isProgressShown:g,setIsProgressShown:h}){let{t:y}=(0,b.B)(["components/organisms/admin"]);return(0,n.FD)("div",{css:e1,ref:t,children:[(0,n.FD)("div",{children:[(0,n.Y)("button",{type:"button",css:e2,"data-cy":"good-button",onClick:()=>o(eT.r9.GOOD),children:(0,n.Y)(eS.I,{source:e.feedback?.type===eT.r9.GOOD?"Good_Fill":"Good",size:6}
4)}),(0,n.Y)("button",{type:"button",css:e6,"data-cy":"bad-button",onClick:()=>o(eT.r9.BAD),children:(0,n.Y)(eS.I,{source:e.feedback?.type===eT.r9.BAD?"Bad_Fill":"Bad",size:6})})]}),a===e.id?(0,n.FD)(n.FK,{children:[(0,n.FD)("div",{css:e4,children:[(0,n.Y)("button",{type:"button",css:e5,"data-cy":"feedback-text-close-button",onClick:r,children:(0,n.Y)(eS.I,{source:"Close",size:3})}),"form"===i?(0,n.Y)(tb,{latestAnswer:e,reasons:s,setReasons:l,feedbackMessage:c,isLoading:d,textareaRef:u,handleChangeTextarea:m,getIsDisabled:p,handleFeedbackSendClick:f}):null,"thanks"===i?(0,n.Y)("div",{css:eZ,children:(0,n.Y)(eB.E,{variant:"small",lineHeight:400,children:y("Thank you for sharing your thoughts with me\uD83D\uDE4C I’ll better serve you next time.")})}):null]}),(0,n.Y)(th,{isLoading:d,isProgressShown:g,setIsProgressShown:h})]}):null]})}function tg({answers:e,onFeedback:t,onClickAskToCommune:a,onClickAskOnShip:i,onClickConsult:o}){let s,{t:l}=(0,b.B)(["components/organisms/admin"]),[c,d]=(0,r.useState)(null),[u,m]=(0,r.useState)(null),[p,f]=(0,r.useState)(null),[g,h]=(0,r.useState)(!1),[y,x]=(0,r.useState)(!1),[v,F]=(0,r.useState)([]),E=(s=(0,en.q)(),async(e,t)=>{let a=await s.post(`/admin/community_copilot/feedbacks/${e}/messages`,t);return a?.data}),k=(0,r.useRef)(null),Y=e.length>0?e.reduce((e,t)=>t.id>e.id?t:e,e[0]):null,C=(0,r.useRef)(null);(0,r.useEffect)(()=>{c&&u&&C.current?.scrollIntoView&&C.current?.scrollIntoView({behavior:"auto"})},[c,u]);let I=(0,r.useCallback)(async e=>{if(Y){if(await t((0,eP.CommunityCopilotAnswerId)(Y.id),Y.feedback?.type===e?eT.r9.NONE:e),f(null),x(!1),h(!1),F([]),Y.feedback?.type!==e){d((0,eP.CommunityCopilotAnswerId)(Y.id)),m("form");return}d(null),m(null)}},[Y,Y?.feedback,Y?.id,t]),_=(0,r.useCallback)(()=>{d(null),m(null),f(null),x(!1),h(!1),F([])},[]),N=(0,r.useCallback)(async()=>{if(!Y||!Y.feedback?.id)return;h(!0),x(!0);let e=()=>{m("thanks"),f(null),h(!1),F([])};p?(await E((0,eP.CommunityCopilotFeedbackId)(Y.feedback?.id),{message:p||""}),e()):setTimeout(e,0)},[p,Y,Y?.feedback?.id,E]),j=(0,r.useCallback)(e=>{f(e.target.value)},[]),A=(0,r.useCallback)(()=>{if(g||!Y)return!0;switch(Y.feedback?.type){case eT.r9.GOOD:return!p;case eT.r9.BAD:return!p&&0===v.length;default:return!1}},[p,g,Y,v]);if(!Y)return null;let D=Y.isCanceled,S=null===Y.message,R=Y.message?.question_category,z=Y.message?.references?.filter(e=>e.category===R),B=z&&z.length>0,M=Y.message?.content?.split(/[\s\n]+/).join("")===l("Help_I couldn't find what you were looking for. Please consult with Commune for further assistance."),L="help"===R&&B||M,$=Y.message?.content?.split(/[\s\n]+/).join("")===l("Knowledge_I couldn't find what you were looking for. Please consult with Commune for further assistance."),T="knowledge"===R&&B||$;return(0,n.FD)(n.FK,{children:[(0,n.FD)("div",{css:e8,children:[(0,n.FD)("div",{css:e3,children:[(0,n.Y)(eS.I,{source:"Robot",size:7}),(0,n.Y)("div",{css:e7,children:"Copilot"})]}),D&&(0,n.Y)("div",{css:e9,children:l("Stopped Copilot response.")}),!D&&(0,n.FD)("div",{css:te,children:[S&&l("I apologize, but something went wrong. Could you please type your question again? I’d be happy to assist\uD83D\uDE0A"),!S&&(0,n.Y)(eQ,{content:Y.message?.content??""})]})]},Y.id),!D&&(0,w.r6)()&&B&&(0,n.Y)("div",{css:tt,children:"help"===R&&(0,n.FD)(n.FK,{children:[(0,n.FD)("div",{css:ta,children:[(0,n.Y)("span",{css:ti,children:"SHIP"}),(0,n.Y)("text",{css:tn,children:"参考情報"})]}),(0,n.Y)("ul",{css:to,children:z.map(e=>(0,n.FD)("li",{css:tr,children:[(0,n.Y)("span",{css:ts,children:"・"}),(0,n.Y)("a",{css:tl,href:`https://community.commmune.com/view/knowledgebase/post/${e.id}`,target:"_blank",rel:"noopener noreferrer",children:e.ref_title})]},e.id))})]})}),!D&&Y.isGenerated?(0,n.FD)(n.FK,{children:[(0,n.Y)(tp,{showAskToCommuneButton:L,showPostToShipButton:T,onClickAskToCommune:a,onClickAskOnShip:i,onClickConsult:o}),(0,n.Y)(tf,{latestAnswer:Y,feedbackContainerRef:C,feedbackId:c,feedbackStatus:u,handleFeedbackButtonClick:I,handleFeedbackCloseClick:_,reasons:v,setReasons:F,feedbackMessage:p,isLoading:g,textareaRef:k,handleChangeTextarea:j,getIsDisabled:A,handleFeedbackSendClick:N,isProgressShown:y,setIsProgressShown:x})]}):null]})}function th({isLoading:e,isProgressShown:t,setIsProgressShown:a}){let[i,o]=(0,r.useState)(0),s=(0,r.useRef)(void 0);return((0,r.useEffect)(()=>
4{if(!t)return void o(0);let n=setInterval(()=>{t||clearInterval(n),e||void 0!==s.current||(s.current=setInterval(()=>{o(e=>e>=100?(a(!1),clearInterval(s.current),s.current=void 0,clearInterval(n),0):e>=100?0:e+1)},10/(100-i>0?100-i:1))),o(e=>e>=100?(a(!1),clearInterval(n),0):e>=95?(clearInterval(n),95):e+(95-.95*e)/100)},20);return()=>{clearInterval(n),clearInterval(s.current),s.current=void 0}},[e]),t)?(0,n.FD)("div",{css:tc,"data-cy":"progress-bar-container",children:[(0,n.Y)("div",{css:td,style:{width:`${100-i-1}%`}}),(0,n.Y)("div",{css:tu}),(0,n.Y)("div",{css:tm,style:{width:`${i}%`},"data-cy":"progress-bar-filled"})]}):null}var ty=a(66946);function tx({contents:e,isAsking:t,onFeedback:a,isLoading:i}){let s,{t:l}=(0,b.B)(["components/organisms/admin"]),c=(0,x.useSelector)(e=>e.user),d=(()=>{let e=(0,en.q)(),[t,a]=(0,r.useState)("");return(0,r.useEffect)(()=>{(async()=>{try{let t=await e.get("/admin/user/external_community_profile");if(!t.data)return void a("");a(t.data.company||"")}catch(e){console.error("Failed to fetch company name",e),a("")}})()},[e]),t})(),u=(s=E(),e=>{if(!(0,w.r6)())return"";let t=encodeURIComponent(`?id=1--qP8_dQ&categoryIndex=0&prefill=${e}`);return(0,eO.Rt)()?`${s}&r=/view/editpost${t}`:""}),m=(0,r.useRef)(null);(0,r.useEffect)(()=>{m.current?.scrollIntoView&&setTimeout(()=>{m.current?.scrollIntoView({behavior:"auto"})},300)},[e.length]);let p=(0,r.useCallback)(e=>()=>{var t;let a,n,i,o,r;window.open((t=c.email??"",a=encodeURIComponent(d),n=encodeURIComponent(t),i=encodeURIComponent(e),o=`?company=${a}&email=${n}&subject=%E3%81%8A%E5%95%8F%E3%81%84%E5%90%88%E3%82%8F%E3%81%9B&description=${i}`,r=(0,eO.R6)()?"https://go.commune.co.jp/l/915341/2022-09-29/l6vxh":"https://go.commune.co.jp/l/915341/2024-07-29/nldrf",`${r}${o}`),"_blank")},[c,d]),f=(0,r.useCallback)(e=>()=>{window.open(u(e),"_blank")},[u]),h=(0,r.useCallback)(e=>t=>{let a;t.preventDefault(),window.location.href=(a=encodeURIComponent(e),`mailto:[email protected]?body=${a}`)},[]);return(0,n.FD)("div",{className:o().dynamic([["ea69f77253757d6",[g.FE.gray.user[6],g.FE.gray.user[6],g.FE.gray.user[6]]]])+" copilot-content",children:[!i&&(0,n.FD)(n.FK,{children:[e.map((t,i)=>(0,n.FD)("div",{ref:i===e.length-1?m:null,className:o().dynamic([["ea69f77253757d6",[g.FE.gray.user[6],g.FE.gray.user[6],g.FE.gray.user[6]]]]),children:[(0,n.FD)("div",{className:o().dynamic([["ea69f77253757d6",[g.FE.gray.user[6],g.FE.gray.user[6],g.FE.gray.user[6]]]])+" "+((0===i?"":"copilot-content-question")||""),children:[(0,n.FD)("div",{className:o().dynamic([["ea69f77253757d6",[g.FE.gray.user[6],g.FE.gray.user[6],g.FE.gray.user[6]]]])+" copilot-content-header",children:[(0,n.Y)(e$.e,{size:"xs",avatarUrl:c.iconPath}),(0,n.Y)("div",{className:o().dynamic([["ea69f77253757d6",[g.FE.gray.user[6],g.FE.gray.user[6],g.FE.gray.user[6]]]])+" copilot-content-header-user-name",children:l("You")})]}),(0,n.Y)("div",{className:o().dynamic([["ea69f77253757d6",[g.FE.gray.user[6],g.FE.gray.user[6],g.FE.gray.user[6]]]])+" copilot-content-message",children:(0,n.Y)(eQ,{content:t.message})})]}),(0,n.Y)(tg,{answers:t.answers,onFeedback:a,onClickAskToCommune:p(t.message),onClickAskOnShip:f(t.message),onClickConsult:h(t.message)})]},t.id)),t&&(0,n.FD)("div",{className:o().dynamic([["ea69f77253757d6",[g.FE.gray.user[6],g.FE.gray.user[6],g.FE.gray.user[6]]]])+" copilot-content-submitting",children:[(0,n.FD)("div",{className:o().dynamic([["ea69f77253757d6",[g.FE.gray.user[6],g.FE.gray.user[6],g.FE.gray.user[6]]]])+" copilot-content-header",children:[(0,n.Y)(eS.I,{source:"Robot",size:7}),(0,n.Y)("div",{className:o().dynamic([["ea69f77253757d6",[g.FE.gray.user[6],g.FE.gray.user[6],g.FE.gray.user[6]]]])+" copilot-content-header-user-name",children:"Copilot"})]}),(0,n.FD)("div",{className:o().dynamic([["ea69f77253757d6",[g.FE.gray.user[6],g.FE.gray.user[6],g.FE.gray.user[6]]]])+" copilot-ai-content-message",children:[(0,n.Y)("div",{className:o().dynamic([["ea69f77253757d6",[g.FE.gray.user[6],g.FE.gray.user[6],g.FE.gray.user[6]]]])+" copilot-content-skelton-text",children:l("Copilot is Thinking")}),(0,n.Y)("div",{className:o().dynamic([["ea69f77253757d6",[g.FE.gray.user[6],g.FE.gray.user[6],g.FE.gray.user[6]]]])+" copilot-content-skelton",children:(0,n.FD)(ty.Ay,{speed:2,width:400,height:70,viewBox:"0 0 400 70",children:[(0,n.Y)("rect",{x:"0",y:"0",rx:"3",ry:"3",width:"400",height:"15",className:o().dynamic([["ea69f77253757d6",[g.FE.gray.user[6],g.FE.gray.user[6],g.FE.gray.user[6]]]])}),(0,n.Y)("rect",{x:"0",y:"25",rx:"3",ry:"3",width:"400",height:"15",className:o().dynamic([["ea69f77253757d6",[g.FE.gray.user[6],g.FE.gray.user[6],g.FE.gray.user[6]]]])}),(0,n.Y)("rect",{x:"0",y:"50",rx:"3",ry:"3",width:"200",height:"15",className:o().dynamic([["ea69f77253757d6",[g.FE.gray.user[6],g.FE.gray.user[6],g.FE.gray.user[6]]]])})]})})]})]})]}),(0,n.Y)(o(),{id:"ea69f77253757d6",dynamic:[g.FE.gray.user[6],g.FE.gray.user[6],g.FE.gray.user[6]],children:`.copilot-content.__jsx-style-dynamic-selector{flex-grow:1;overflow-y:auto;overflow-x:hidden;padding:16px 12px;display:flex;flex-direction:column}.copilot-content-question.__jsx-style-dynamic-selector{margin-top:32px}.copilot-content-header.__jsx-style-dynamic-selector{display:flex;align-items:center;gap:8px}
4.copilot-content-submitting.__jsx-style-dynamic-selector{margin-top:32px}.copilot-content-header-user-name.__jsx-style-dynamic-selector{font-size:16px;font-weight:700;color:${g.FE.gray.user[6]}}.copilot-content-message.__jsx-style-dynamic-selector{margin-top:8px;font-size:16px;font-weight:400;color:${g.FE.gray.user[6]};word-wrap:break-word;word-break:break-all;white-space:pre-wrap}.copilot-ai-content-message.__jsx-style-dynamic-selector{margin-top:8px}.copilot-content-skelton.__jsx-style-dynamic-selector{margin-top:8px}.copilot-content-skelton-text.__jsx-style-dynamic-selector{font-size:16px;font-weight:400;color:${g.FE.gray.user[6]}}`})]})}let tw=[{title:"Example_Title_Verification email",body:"Example_Body_Verification email"},{title:"Example_Title_OS and Web browser",body:"Example_Body_OS and Web browser"},{title:"Example_Title_Attachment format",body:"Example_Body_Attachment format"},{title:"Example_Title_Remove admin role",body:"Example_Body_Remove admin role"},{title:"Example_Title_Can't make post",body:"Example_Body_Can't make post"},{title:"Example_Title_Increase active users",body:"Example_Body_Increase active users"},{title:"Example_Title_Increase user posts",body:"Example_Body_Increase user posts"},{title:"Example_Title_Encourage user interaction",body:"Example_Body_Encourage user interaction"},{title:"Example_Title_Best time to post",body:"Example_Body_Best time to post"},{title:"Example_Title_How often moderators respond",body:"Example_Body_How often moderators respond"}];function tv({handleSubmit:e}){let{t}=(0,b.B)(["components/organisms/admin/copilot"]);return(0,n.FD)("div",{className:o().dynamic([["1defec95a4d04844",[g.zT.default]]])+" copilot-welcome-container",children:[(0,n.FD)("div",{className:o().dynamic([["1defec95a4d04844",[g.zT.default]]])+" copilot-welcome-texts",children:[(0,n.Y)(eB.E,{variant:"small",color:"subdued",lineHeight:400,children:t("How’s your day?")}),(0,n.Y)(eB.E,{variant:"small",color:"subdued",lineHeight:400,children:t("I’m happy to assist you with everything you want to know about the community✨")})]}),(0,n.Y)("div",{className:o().dynamic([["1defec95a4d04844",[g.zT.default]]])+" copilot-examples-title",children:(0,n.Y)(eB.E,{variant:"small",lineHeight:400,children:t("People also ask")})}),(0,n.Y)("div",{"data-testid":"copilot-example-questions",className:o().dynamic([["1defec95a4d04844",[g.zT.default]]])+" copilot-example-questions",children:tw.map(a=>(0,n.Y)("button",{onClick:()=>e(t(a.body)),className:o().dynamic([["1defec95a4d04844",[g.zT.default]]])+" copilot-example-question",children:t(a.title)},a.title))}),(0,n.Y)(o(),{id:"1defec95a4d04844",dynamic:[g.zT.default],children:`.copilot-welcome-container.__jsx-style-dynamic-selector{flex-grow:1;overflow-y:auto;padding:16px 12px;display:flex;flex-direction:column}.copilot-examples-title.__jsx-style-dynamic-selector{margin-top:16px}.copilot-example-questions.__jsx-style-dynamic-selector{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.copilot-example-question.__jsx-style-dynamic-selector{display:flex;align-items:center;justify-content:center;border:1px solid#777778;border-radius:8px;padding:6px 16px;color:#474648;font-family:"Noto Sans JP";font-size:14px;font-style:normal;font-weight:500;line-height:20px;letter-spacing:.1px;outline:none;font-family:${g.zT.default}}.copilot-example-question.__jsx-style-dynamic-selector:hover{background-color:#47464814}.copilot-example-question.__jsx-style-dynamic-selector:focus{border:1px solid#1C1B1B;background-color:#4746481f}.copilot-example-question.__jsx-style-dynamic-selector:active{background-color:#4746481f}`})]})}var tF=a(79493);function tE({isOverlay:e,toggleRobotIcon:t,toggleCopilotWindow:a,position:i}){let s,l,c,d,u,m,{t:p}=(0,b.B)(["components/organisms/admin"]),{discussionId:f,setDiscussionId:h,clearDiscussionId:y}=(()=>{let[e,t]=(0,eV.A)("discussionId","",{raw:!0});return{discussionId:e,setDiscussionId:t,clearDiscussionId:()=>{t("")}}})();s=(0,eU.U)(eH.m.CommunityCopilotDiscussionRoomOpen),l=(0,eU.U)(eH.m.CommunityCopilotDiscussionRoomClose),(0,r.useEffect)(()=>(f&&s({discussionId:(0,eP.CommunityCopilotDiscussionId)(f)}),()=>
4{f&&l({discussionId:(0,eP.CommunityCopilotDiscussionId)(f)})}),[f,s,l]),(0,r.useEffect)(()=>{let e=()=>{f&&l({discussionId:(0,eP.CommunityCopilotDiscussionId)(f)})};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}},[f,l]);let x=(c=(0,en.q)(),async e=>(await c.post("/admin/community_copilot/discussion_room",{discussionId:e})).data),w=(d=(0,en.q)(),async e=>{let t=await d.post("/admin/community_copilot/questions",e);return t?.data}),v=(u=(0,en.q)(),async e=>{let t=await u.post("/admin/community_copilot/feedbacks",e);return t?.data}),F=(m=(0,en.q)(),async e=>{let t=await m.post("/admin/community_copilot/answers/cancel",{discussionId:e});return t?.data}),E=(0,r.useRef)(null),[k,Y]=(0,r.useState)([]),[C,I]=(0,r.useState)(!0),_=k.length>0,N=(0,r.useRef)(null),j=(0,r.useRef)(null),{draftQuestion:A,setDraftQuestion:D,clearDraftQuestion:S}=(()=>{let[e,t]=(0,eV.A)("copilotFormState","",{raw:!0});return{draftQuestion:void 0===e?"":e,setDraftQuestion:t,clearDraftQuestion:()=>{t("")}}})(),[R,z]=(0,r.useState)(!1),{setNodeRef:B,setActivatorNodeRef:M,listeners:L,attributes:$,transform:T}=(0,eD.PM)({id:"copilot-form-draggable"}),P=A.length>0,H=!P||R,O=(0,r.useCallback)(()=>{let e=j.current;if(!e)return;e.style.height="24px",e.style.width="284px",e.style.whiteSpace="pre-wrap";let t=Math.min(e.scrollHeight,168);e.style.height=`${t}px`,t>=168?(e.style.overflowY="auto",e.style.paddingRight="4px"):e.style.overflowY="hidden",N.current&&(N.current.style.alignItems=t>24?"flex-end":"center")},[]);(0,r.useEffect)(()=>{O()},[A,O]),(0,r.useEffect)(()=>{(async()=>{let e=await x(f);e&&(Y(e.questions.sort((e,t)=>e.id-t.id)),h(e.discussionRoom.discussionId),I(!1))})()},[f]);let U=(0,r.useCallback)(()=>{t(!0),E.current&&(E.current.classList.add("animate-out"),setTimeout(()=>{a(!1)},300))},[t,a]),V=(0,r.useCallback)(e=>{D(e.target.value)},[D]),q=(0,r.useCallback)(async e=>{if(!f||!e&&H)return;let t=new Date;Y(a=>[...a,{id:-1,message:e??A,createdAt:t.toISOString(),answers:[]}]),z(!0),S(),j.current&&(j.current.style.height="24px"),N.current&&(N.current.style.alignItems="center");try{let t=await w({discussionId:f,message:e??A});if(t){let{id:e,questionId:a,hashId:n,message:i,isCanceled:o,isGenerated:r,feedback:s,createdAt:l}=t;Y(t=>t.map(t=>-1===t.id?{id:a,message:t.message,createdAt:t.createdAt,answers:[{id:e,discussionId:f,questionId:a,hashId:n,message:i,isCanceled:o,isGenerated:r,feedback:s,createdAt:l}]}:t))}}catch(e){tF.ih.error("",p("An error has occurred. Please try again later.")),Y(e=>e.map(e=>-1===e.id?{...e,answers:[{id:-1,discussionId:f,questionId:-1,hashId:"",message:{content:p("I apologize, but something went wrong. Could you please type your question again? I’d be happy to assist\uD83D\uDE0A"),references:[],model_name:"",question_category:"help"},isCanceled:!1,isGenerated:!1,feedback:null,createdAt:t.toISOString()}]}:e))}finally{z(!1)}},[f,H,A,S,w,p]),K=(0,r.useCallback)(e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&!R&&(e.preventDefault(),q())},[q,R]),W=(0,r.useCallback)(async(e,t)=>{let a=await v({answerId:e,type:t});Y(n=>n.map(n=>({...n,answers:n.answers.map(n=>n.id===e?{...n,feedback:null===t?null:{id:a.id,type:t}}:n)})))},[v]),G=(0,r.useCallback)(async()=>{if(void 0!==f)try{let{id:e,questionId:t,hashId:a,message:n,isCanceled:i,isGenerated:o,createdAt:r}=await F(f);Y(s=>s.map(s=>-1===s.id?{id:t,message:s.message,createdAt:s.createdAt,answers:[{id:e,discussionId:f,questionId:t,hashId:a,message:n,isCanceled:i,isGenerated:o,feedback:null,createdAt:r}]}:s)),z(!1)}catch(e){tF.ih.error("",p("An error has occurred. Please try again later."))}},[f,F,p]);return(0,n.FD)("div",{ref:B,...$,style:{transform:ez.Ks.Transform.toString(T)},className:o().dynamic([["46ff22b7ebdc5240",[i.x,i.y,g.zT.default,g.FE.gray.user[2],P?g.FE.white:g.FE.gray.user[0],P?g.FE.white:g.FE.gray.user[0],g.FE.gray.user[4]]]])+" "+($&&null!=$.className&&$.className||""),children:[(0,n.FD)("div",{ref:E,className:o().dynamic([["46ff22b7ebdc5240",[i.x,i.y,g.zT.default,g.FE.gray.user[2],P?g.FE.white:g.FE.gray.user[0],P?g.FE.white:g.FE.gray.user[0],g.FE.gray.user[4]]]])+" form",children:[(0,n.Y)(eL,{isOverlay:e,isRoomCreatable:_,onClick:y,onClose:U,ref:M,listeners:L,isLoading:C}),C?(0,n.Y)("div",{className:o().dynamic([["46ff22b7ebdc5240",[i.x,i.y,g.zT.default,g.FE.gray.user[2],P?g.FE.white:g.FE.gray.user[0],P?g.FE.white:g.FE.gray.user[0],g.FE.gray.user[4]]]])}):k.length>0?(0,n.Y)(tx,{contents:k,isAsking:R,onFeedback:W,isLoading:C}):(0,n.Y)(tv,{handleSubmit:q}),(0,n.FD)("div",{className:o().dynamic([["46ff22b7ebdc5240",[i.x,i.y,g.zT.default,g.FE.gray.user[2],P?g.FE.white:g.FE.gray.user[0],P?g.FE.white:g.FE.gray.user[0],g.FE.gray.user[4]]]])+" copilot-footer",children:[(0,n.FD)("div",{ref:N,className:o().dynamic([["46ff22b7ebdc5240",[i.x,i.y,g.zT.default,g.FE.gray.user[2],P?g.FE.white:g.FE.gray.user[0],P?g.FE.white:g.FE.gray.user[0],g.FE.gray.user[4]]]])+" copilot-footer-form",children:[(0,n.Y)("div",{className:o().dynamic([["46ff22b7ebdc5240",[i.x,i.y,g.zT.default,g.FE.gray.user[2],P?g.FE.white:g.FE.gray.user[0],P?g.FE.white:g.FE.gray.user[0],g.FE.gray.user[4]]]])+" copilot-textarea-wrapper",children:(0,n.Y)("textarea",{ref:j,value:A,onChange:V,onKeyDown:K,placeholder:p("Ask me anything..."),disabled:R,"data-testid":"question-textarea",className:o().dynamic([["46ff22b7ebdc5240",[i.x,i.y,g.zT.default,g.FE.gray.user[2],P?g.FE.white:g.FE.gray.user[0],P?g.FE.white:g.FE.gray.user[0],g.FE.gray.user[4]]]])+" copilot-textarea"})}),R?(0,n.Y)("button",{onClick:G,"data-testid":"cancel-button",className:o().dynamic([["46ff22b7ebdc5240",[i.x,i.y,g.zT.default,g.FE.gray.user[2],P?g.FE.white:g.FE.gray.user[0],P?g.FE.white:g.FE.gray.user[0],g.FE.gray.user[4]]]])+" submit-cancel-button",children:(0,n.Y)(eS.I,{source:"StopCircle",size:6}
4)}):(0,n.Y)("button",{onClick:()=>q(),disabled:H,"data-testid":"submit-button",className:o().dynamic([["46ff22b7ebdc5240",[i.x,i.y,g.zT.default,g.FE.gray.user[2],P?g.FE.white:g.FE.gray.user[0],P?g.FE.white:g.FE.gray.user[0],g.FE.gray.user[4]]]])+" submit-cancel-button",children:(0,n.Y)(eS.I,{source:"Subtract",size:6,color:H?g.FE.gray.user[2]:""})})]}),(0,n.Y)("div",{className:o().dynamic([["46ff22b7ebdc5240",[i.x,i.y,g.zT.default,g.FE.gray.user[2],P?g.FE.white:g.FE.gray.user[0],P?g.FE.white:g.FE.gray.user[0],g.FE.gray.user[4]]]])+" copilot-footer-text",children:p("Copilot is not 100% perfect. Please double-check.")})]})]}),(0,n.Y)(o(),{id:"46ff22b7ebdc5240",dynamic:[i.x,i.y,g.zT.default,g.FE.gray.user[2],P?g.FE.white:g.FE.gray.user[0],P?g.FE.white:g.FE.gray.user[0],g.FE.gray.user[4]],children:`.form.__jsx-style-dynamic-selector{position:fixed;right:${i.x}px;bottom:${i.y}px;height:640px;width:368px;background-color:#FFF;border-radius:16px;box-shadow:0px 2px 5px 0px#26262626;z-index:1002;display:flex;flex-direction:column;justify-content:space-between;font-family:${g.zT.default}}.form.animate-out.__jsx-style-dynamic-selector{animation:slideOut.3s ease-out forwards}@keyframes slideOut{from{opacity:1;transform:translatey(0)}to{opacity:0;transform:translatey(0)}}.copilot-footer.__jsx-style-dynamic-selector{padding:16px}.copilot-footer-form.__jsx-style-dynamic-selector{display:flex;align-items:"center";justify-content:space-between}.copilot-textarea-wrapper.__jsx-style-dynamic-selector{width:306px;border:1px solid ${g.FE.gray.user[2]};border-radius:16px;background-color:${P?g.FE.white:g.FE.gray.user[0]};padding:4px 4px 4px 16px;display:flex;align-items:center}.copilot-textarea.__jsx-style-dynamic-selector{height:24px;width:100%;font-size:16px;line-height:24px;background-color:${P?g.FE.white:g.FE.gray.user[0]};border:none;resize:none;overflow-wrap:break-word;word-wrap:break-word;word-break:break-all;white-space:pre-wrap;outline:none;padding:0 12px 0 0}.copilot-textarea.__jsx-style-dynamic-selector::placeholder{line-height:24px;vertical-align:middle}.copilot-textarea.__jsx-style-dynamic-selector::-webkit-scrollbar{width:8px}.copilot-textarea.__jsx-style-dynamic-selector::-webkit-scrollbar-thumb{background-color:#D9D9D9;border-radius:4px}.copilot-footer-text.__jsx-style-dynamic-selector{font-size:13px;margin-top:8px;color:${g.FE.gray.user[4]}}.submit-cancel-button.__jsx-style-dynamic-selector{cursor:pointer;outline:none}`})]})}function tk(){let e=(0,M.Cn)(M.y.disableCommunityCopilot),t=(0,eD.FR)((0,eD.MS)(eD.AN,{activationConstraint:{distance:1}})),{setNodeRef:a}=(0,eD.zM)({id:"copilot-form-droppable"}),{openCopilotWindow:i,setOpenCopilotWindow:s,showRobotIcon:l,setShowRobotIcon:c,formPosition:d,setFormPosition:u}=(()=>{let[e,t]=(0,r.useState)(!1),[a,n]=(0,r.useState)(!0),[i,o]=(0,r.useState)({x:16,y:16}),s=(0,r.useCallback)(()=>{localStorage.removeItem(eq),localStorage.setItem(eq,JSON.stringify({openCopilotWindow:e,showRobotIcon:a,formPosition:i}))},[e,a,i]);return(0,r.useEffect)(()=>{let e=localStorage.getItem(eq);if(e)try{let a=JSON.parse(e);if(!(a&&"boolean"==typeof a.openCopilotWindow&&"boolean"==typeof a.showRobotIcon&&a.formPosition&&"number"==typeof a.formPosition.x&&"number"==typeof a.formPosition.y))return void s();let{openCopilotWindow:i,showRobotIcon:r,formPosition:l}=a;t(i),n(r),o(l)}catch(e){s()}},[]),(0,r.useEffect)(()=>{localStorage.setItem(eq,JSON.stringify({openCopilotWindow:e,showRobotIcon:a,formPosition:i}))},[e,a,i]),{openCopilotWindow:e,setOpenCopilotWindow:t,showRobotIcon:a,setShowRobotIcon:n,formPosition:i,setFormPosition:o}})(),[m,p]=(0,r.useState)({x:16,y:16}),b=(0,r.useRef)(m);b.current=m,(0,r.useEffect)(()=>{p(d)},[d]),(0,r.useEffect)(()=>{let e=()=>{let e={x:b.current.x,y:b.current.y};b.current.x>window.innerWidth-184&&(e.x=window.innerWidth-184),b.current.y>window.innerHeight-640&&(e.y=window.innerHeight-640),p(e)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let f=(0,r.useCallback)(e=>{let{transform:t}=e;return{...t,x:m.x-t.x<-184?m.x+184:m.x-t.x>window.innerWidth-184?m.x+184-window.innerWidth:t.x,y:m.y-t.y<-568?m.y+640-72:m.y-t.y>window.innerHeight-640?m.y+640-window.innerHeight:t.y}},[m.x,m.y]);return e?null:(0,n.FD)(eD.Mp,{autoScroll:!1,onDragEnd:e=>{let t={x:m.x-e.delta.x,y:m.y-e.delta.y};p(t),u(t)},sensors:t,modifiers:[f],children:[(0,n.Y)("div",{ref:a,className:"jsx-15e514dbfe9a9feb admin-community-copilot-droppable",children:(0,n.FD)("div",{className:"jsx-15e514dbfe9a9feb admin-community-copilot-draggable",children:[i&&(0,n.Y)(tE,{toggleRobotIcon:c,toggleCopilotWindow:s,position:m}),l&&(0,n.Y)(eR,{toggleRobotIcon:c,toggleCopilotWindow:s})]})}),(0,n.Y)(o(),{id:"15e514dbfe9a9feb",children:".admin-community-copilot-droppable.jsx-15e514dbfe9a9feb{position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:1200;pointer-events:none}.admin-community-copilot-draggable.jsx-15e514dbfe9a9feb{pointer-events:auto;position:absolute;right:0;bottom:0}"})]})}let tY=`_Admin${eA.Y}`,tC=["/admin/site/edit/home","/admin/communityDataLabApps"];function tI({children:e}
4){let[t,a]=(0,r.useState)(!0),i=(0,L.useRouter)(),s=(0,C.C)(),l=32*!tC.includes(i.pathname);return(0,n.FD)(n.FK,{children:[(0,n.FD)("div",{className:o().dynamic([["9b82d0bbfde9c2e5",[l]]])+" admin-layout",children:[!s&&(0,n.Y)(ek,{open:t,setOpen:a}),(0,n.Y)("div",{id:tY,className:o().dynamic([["9b82d0bbfde9c2e5",[l]]])+" main",children:e}),(0,n.Y)(o(),{id:"9b82d0bbfde9c2e5",dynamic:[l],children:`.admin-layout.__jsx-style-dynamic-selector{display:flex;height:100vh}.main.__jsx-style-dynamic-selector{flex-grow:1;overflow-y:auto;scrollbar-width:none;padding-bottom:${l}px}`})]}),(0,n.Y)(tk,{})]})}},78602:(e,t)=>{t.VY=t.r9=void 0,t.r9={NONE:-1,GOOD:0,BAD:1},t.VY={OFFENSIVE:1,INCORRECT:2,UNCLEAR:3,UNRELATED:4,NOT_HELPFUL:5}},96914:(e,t,a)=>{a.d(t,{C:()=>r,U:()=>s});var n=a(20764),i=a(66432);let o="hiddenSidebar",r=()=>void 0!==(0,n.useRouter)().query[o],s=()=>{let e=r();return t=>e?(0,i.oG)(t,o,""):t}},96938:(e,t,a)=>{a.d(t,{U:()=>s});var n=a(36439),i=a(64640),o=a(41471),r=a(12787);let s=e=>{let t=(0,o.useSelector)(r.Nu),a=(0,i.q)();return(0,n.useCallback)(async n=>{t||await a.post("/actionLog",{key:e,payload:n})},[a,e,t])}}}]);
5//# sourceMappingURL=1961-cd94387432f91869.js.map
6//# debugId=b7cef58f-2a08-501a-9018-f66c306206cd

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.