ChatGeminiActiveLensesDialog.react",["fbt","ChatGeminiActiveLensesDialogAnalyzeMutation.graphql","CometColumn.react","CometColumnItem.react","CometRelay","CometRow.react","CometRowItem.react","CometScrollView.react","FDSButton.react","FDSFormTextArea.react","FDSInlinePressableText.react","FDSSwitch.react","FDSText.react","I64","MWThreadKey.react","MWXDialog.react","MWXDialogHeader.react","ReQL","ReQLSuspense","react","react-compiler-runtime","useReStore"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j,k,l,m=k||(k=d("react"));e=k;e.useCallback;var n=e.useState;function o(a){var b=d("react-compiler-runtime").c(2);a=a.threadKey;var c;b[0]!==a?(c=m.jsx(q,{threadKey:a}),b[0]=a,b[1]=c):c=b[1];return c}var p=i!==void 0?i:i=b("ChatGeminiActiveLensesDialogAnalyzeMutation.graphql");function q(a){var b=d("react-compiler-runtime").c(40);a=a.threadKey;var e=n("\n Analyze the chat conversation and extract all messages which invoke a hashtag bot. These messages begin with a hashtag, often followed by additional text.\n Do not include messages which simply mention a hashtag without invoking the bot. Use subsequent messages to determine if the bot was invoked.\n\n For each hashtag bot which is called, extract the hashtag, the bot name, and the message which invoked the bot. Organize the results in a list following this format:\n {bot name}: {message count that invoked the bot}\n"),f=e[0];e=e[1];var g=n(!0),i=g[0],j=g[1];g=n(!1);var k=g[0];g=g[1];var l=n(),o=l[0],q=l[1];l=i?"Hide Prompts":"Show Prompts";var v=u(a);a=d("CometRelay").useMutation(p);var w=a[0];a=a[1];var x=t,y=s,z;b[0]!==o||b[1]!==w||b[2]!==v||b[3]!==f?(z=function(){if(!v||v.length===0){q("No messages to analyze.");return}w({variables:{input:{formatted_messages:v.map(r),llm_instructions:f!=null?"\n [PREFACE]\n You are NOT a conversational bot. You are a utility program which consumes a chat conversation and extracts specific information.\n Do not add any additional information or context: simply extract the requested information from the conversation and format it in the requested format.\n\n [INSTRUCTIONS]\n"+f+"\n\n Do not add any conversational context or explanation. Do not add any affirmation such as 'sure, here is the list of hashtags'.\n Just provide the list of hashtags in the requested format.\n":"",previous_analysis:o!=null?o:null}},onCompleted:function(a,b){var c;if((a==null||(c=a.xfb_workplace_chat_lens_get_analysis)==null?void 0:c.analysis)!=null)q(a.xfb_workplace_chat_lens_get_analysis.analysis);else{var d;(a==null||(d=a.xfb_workplace_chat_lens_get_analysis)==null?void 0:d.error)!=null?q("Error: "+a.xfb_workplace_chat_lens_get_analysis.error):b&&b.length>0?q("GraphQL Error: "+b[0].message):q("Unknown error.")}},onError:function(a){q("Network error: "+a.message)}})},b[0]=o,b[1]=w,b[2]=v,b[3]=f,b[4]=z):z=b[4];z=z;var A;b[5]===Symbol["for"]("react.memo_cache_sentinel")?(A=m.jsx(c("CometRowItem.react"),{children:m.jsxs(c("FDSText.react"),{isSemanticHeading:!0,numberOfLines:1,type:"headlineEmphasized1",children:[" ",h._(/*BTDS*/"")]})}),b[5]=A):A=b[5];var B;b[6]!==i?(B=function(){j(!i)},b[6]=i,b[7]=B):B=b[7];b[8]!==l||b[9]!==B?(A=m.jsxs(c("CometRow.react"),{verticalAlign:"center",children:[A,m.jsx(c("CometRowItem.react"),{children:m.jsx(c("FDSText.react"),{color:"highlight",type:"button1",children:m.jsx(c("FDSInlinePressableText.react"),{onPress:B,children:l})})})]}),b[8]=l,b[9]=B,b[10]=A):A=b[10];l=A;b[11]!==f?(B=m.jsx(c("CometScrollView.react"),{children:m.jsx(c("CometColumn.react"),{spacing:16,children:m.jsx(c("CometColumnItem.react"),{children:m.jsx(c("FDSFormTextArea.react"),{label:"Refined Prompt",minRows:2,onValueChange:e,value:f})})})}),b[11]=f,b[12]=B):B=b[12];A=B;b[13]!==z||b[14]!==a?(e=m.jsx(c("CometRowItem.react"),{children:m.jsx(c("FDSButton.react"),{disabled:a,label:"Analyze Conversation",onPress:z})}),b[13]=z,b[14]=a,b[15]=e):e=b[15];b[16]===Symbol["for"]("react.memo_cache_sentinel")?(B=m.jsx(c("CometRowItem.react"),{children:m.jsx(c("FDSText.react"),{type:"body3",children:h._(/*BTDS*/"")})}),b[16]=B):B=b[16];b[17]===Symbol["for"]("react.memo_cache_sentinel")?(z=h._(/*BTDS*/""),b[17]=z):z=b[17];b[18]!==k?(a=m.jsx(c("CometRowItem.react"),{children:m.jsxs(c("CometRow.react"),{verticalAlign:"center",children:[B,m.jsx(c("CometRowItem.react"),{children:m.jsx(c("FDSSwitch.react"),{"aria-label":z,onValueChange:g,size:"small",value:k})})]})}),b[18]=k,b[19]=a):a=b[19];b[20]!==e||b[21]!==a?(B=m.jsx(c("CometColumnItem.react"),{children:m.jsxs(c("CometRow.react"),{expanding:!0,verticalAlign:"center",children:[e,a]})}),b[20]=e,b[21]=a,b[22]=B):B=b[22];b[23]===Symbol["for"]("react.memo_cache_sentinel")?(z=m.jsx(c("CometRowItem.react"),{expanding:!0,children:m.jsx(c("FDSText.react"),{type:"headlineEmphasized1",children:"Analysis: "})}),b[23]=z):z=b[23];b[24]===Symbol["for"]("react.memo_cache_sentinel")?(g=m.jsx(c("CometRowItem.react"),{children:m.jsx(c("FDSText.react"),{color:"highlight",type:"button1",children:m.jsx(c("FDSInlinePressableText.react"),{onPress:function(){y()},children:"Edit"})})}),b[24]=g):g=b[24];b[25]===Symbol["for"]("react.memo_cache_sentinel")?(k=m.jsx(c("CometColumnItem.react"),{children:m.jsxs(c("CometRow.react"),{verticalAlign:"center",children:[z,m.jsx(c("CometRowItem.react"),{children:m.jsxs(c("CometRow.react"),{children:[g,m.jsx(c("CometRowItem.react"),{children:m.jsx(c("FDSText.react"),{color:"negative",type:"button1",children:m.jsx(c("FDSInlinePressableText.react"),{onPress:function(){x()},children:"Clear"})})})]})})]})}),b[25]=k):k=b[25];b[26]!==o?(e=m.jsx(c("CometColumnItem.react"),{children:m.jsx(c("FDSFormTextArea.react"),{label:"Analysis Output",minRows:2,onValueChange:q,value:o})}),b[26]=o,b[27]=e):e=b[27];b[28]!==B||b[29]!==e?(a=m.jsxs(c("CometColumn.react"),{spacing:16,children:[B,k,e]}),b[28]=B,b[29]=e,b[30]=a):a=b[30];z=a;b[31]!==l?(g=m.jsx(c("CometColumnItem.react"),{children:l}),b[31]=l,b[32]=g):g=b[32];b[33]!==A||b[34]!==i?(k=i&&m.jsx(c("CometColumnItem.react"),{children:A}),b[33]=A,b[34]=i,b[35]=k):k=b[35];b[36]!==z||b[37]!==g||b[38]!==k?(B=m.jsxs(c("CometColumn.react"),{spacing:16,children:[g,k,z]}),b[36]=z,b[37]=g,b[38]=k,b[39]=B):B=b[39];return B}function r(a){return{senderID:(l||(l=d("I64"))).to_string(a.senderId),message:(a=a.text)!=null?a:""}}function s(){}function t(){}function u(a){var b=d("react-compiler-runtime").c(6),e=(j||(j=c("useReStore")))(),g;b[0]!==e.tables.messages||b[1]!==a?(g=function(){return d("ReQL").fromTableAscending(e.tables.messages).getKeyRange(a)},b[0]=e.tables.messages,b[1]=a,b[2]=g):g=b[2];var h;b[3]!==e||b[4]!==a?(h=[e,a],b[3]=e,b[4]=a,b[5]=h):h=b[5];return d("ReQLSuspense").useArray(g,h,f.id+":296")}function a(a){var b=d("react-compiler-runtime").c(21);a=a.onClose;var e=d("MWThreadKey.react").useMWThreadKeyMemoizedExn(),f=u(e),g=n(!1),i=g[0],j=g[1];b[0]!==f?(g=f.map(v),b[0]=f,b[1]=g):g=b[1];b[2]!==g?(f=m.jsx("div",{children:g}),b[2]=g,b[3]=f):f=b[3];g=f;b[4]===Symbol["for"]("react.memo_cache_sentinel")?(f={className:"x6prxxf xvq8zen xg87l8a x1dqj196 x1iymm2a xvc51xn xh8yej3 x1xoerdy"},b[4]=f):f=b[4];var k;b[5]===Symbol["for"]("react.memo_cache_sentinel")?(k=h._(/*BTDS*/""),b[5]=k):k=b[5];b[6]!==a?(k=m.jsx(c("MWXDialogHeader.react"),{onClose:a,title:k,withBackButton:!1,withCloseButton:!0}),b[6]=a,b[7]=k):k=b[7];var l;b[8]!==e?(l=m.jsx(o,{threadKey:e}),b[8]=e,b[9]=l):l=b[9];e=i?"Hide Message History":"Show Message History";var p;b[10]!==i?(p=function(){return j(!i)},b[10]=i,b[11]=p):p=b[11];var q;b[12]!==e||b[13]!==p?(q=m.jsx(c("CometRow.react"),{align:"start",verticalAlign:"center",children:m.jsx(c("CometRowItem.react"),{children:m.jsx(c("FDSButton.react"),{label:e,onPress:p})})}),b[12]=e,b[13]=p,b[14]=q):q=b[14];e=i&&g;b[15]!==a||b[16]!==e||b[17]!==k||b[18]!==l||b[19]!==q?(p=m.jsx("div",babelHelpers["extends"]({},f,{children:m.jsxs(c("MWXDialog.react"),{footer:null,header:k,onClose:a,size:"medium",children:[l,q,e]})})),b[15]=a,b[16]=e,b[17]=k,b[18]=l,b[19]=q,b[20]=p):p=b[20];return p}function v(a){return m.jsxs(c("CometRow.react"),{verticalAlign:"center",children:[m.jsx(c("CometRowItem.react"),{children:m.jsx(c("FDSText.react"),{type:"body2",children:(l||(l=d("I64"))).to_string(a.senderId)})}),m.jsx(c("CometRowItem.react"),{children:m.jsx(c("FDSText.react"),{type:"body3",children:a.text})})]},a.messageId)}v.displayName=v.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
ChatGeminiActiveLensesDialogAnalyzeMutation.graphql",["ChatGeminiActiveLensesDialogAnalyzeMutation_facebookRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"input"}],c=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"XFBWorkplaceChatLensAnalysisResponse",kind:"LinkedField",name:"xfb_workplace_chat_lens_get_analysis",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"analysis",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"error",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"ChatGeminiActiveLensesDialogAnalyzeMutation",selections:c,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"ChatGeminiActiveLensesDialogAnalyzeMutation",selections:c},params:{id:b("ChatGeminiActiveLensesDialogAnalyzeMutation_facebookRelayOperation"),metadata:{},name:"ChatGeminiActiveLensesDialogAnalyzeMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----
ChatGeminiActiveLensesDialogAnalyzeMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="10013112502099320"}),null);
-----
-----
ChatGeminiActiveLensesDialogAnalyzeMutation.graphql",["ChatGeminiActiveLensesDialogAnalyzeMutation_facebookRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"input"}],c=[{alias:null,args:[{kind:"Variable",name:"input",variableName:"input"}],concreteType:"XFBWorkplaceChatLensAnalysisResponse",kind:"LinkedField",name:"xfb_workplace_chat_lens_get_analysis",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"analysis",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"error",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"ChatGeminiActiveLensesDialogAnalyzeMutation",selections:c,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"ChatGeminiActiveLensesDialogAnalyzeMutation",selections:c},params:{id:b("ChatGeminiActiveLensesDialogAnalyzeMutation_facebookRelayOperation"),metadata:{},name:"ChatGeminiActiveLensesDialogAnalyzeMutation",operationKind:"mutation",text:null}}}();e.exports=a}),null);
-----
ChatGeminiActiveLensesDialogAnalyzeMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="10013112502099320"}),null);
-----