KirbyCreationV3ConversationTab.react",["fbt","AppearancePreviewEmptyState.react","AvatarSimpleCallingInterface.react","CometRelay","CometRelayErrorHandling","KDSFlexbox.react","KDSListCell.react","KDSText.react","KirbyCreationErrorHandler","KirbyCreationV3AvoidedTopicsField.react","KirbyCreationV3BaseTabLayout.react","KirbyCreationV3ConversationTabQuery.graphql","KirbyCreationV3ConversationTab_persona.graphql","KirbyCreationV3DialogExamplesField.react","KirbyCreationV3FocusTopicsField.react","KirbyCreationV3GlobalConstants","KirbyCreationV3PersistentChat.react","KirbyCreationV3TooltipIcon.react","UGCAgentsConfirmationFBTs","cdsPushToast","react","useDebouncedComet","useKirbyCreationV3EditPermission","useKirbyCreationV3IsAIYouRoute","useKirbyCreationV3PersonaFragment","useKirbyPersonaLocalEdits","useKirbyPersonaOptimisticUpdateV3Mutation"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u,c,d=c||(c=o("react")),m=c,p=m.useCallback,_=m.useMemo,f=m.useState,g={centerPane:{backgroundColor:"x1xq1juv",minWidth:"xtk6a0x",paddingTop:"x8ba5f7",paddingInlineEnd:"x19vqbe9",paddingBottom:"x1vfppjd",paddingInlineStart:"xikz0ll",$$css:!0},paneSection:{marginTop:"x1c8qwo6",marginBottom:"xi8ezg",$$css:!0},tabHeader:{marginInlineStart:"x1diwwjn",marginInlineEnd:"xbmvrgn",marginLeft:null,marginRight:null,$$css:!0}},h=e!==void 0?e:e=n("KirbyCreationV3ConversationTab_persona.graphql");function y(e){var t,n,a,i=e.personaKey,l=o("CometRelay").useFragment(h,i),u=o("CometRelay").useFragment(o("useKirbyCreationV3PersonaFragment").kirbyCreationV3PersonaFragment,l),c=f({}),m=c[0],y=c[1],C=_(function(){var e=o("useKirbyCreationV3PersonaFragment").transformPersonaFragmentToLocalState(u);return o("useKirbyPersonaLocalEdits").mergePersonaStateWithEdits(e,m)},[u,m]),b=r("useKirbyPersonaOptimisticUpdateV3Mutation")({localState:C,onError:function(t){var e;t&&o("CometRelayErrorHandling").markErrorAsHandled(t),o("cdsPushToast").pushToast({message:(e=o("KirbyCreationErrorHandler").extractGQLCodedExceptionMessage(t))!=null?e:o("UGCAgentsConfirmationFBTs").PERSONA_UPDATE_ERROR})},stepInfo:{step_name:"V3_DEFINITION",step_type:"V3_DEFINITION"}}),v=r("useDebouncedComet")(function(){b(),y({})},{wait:1e3}),S=r("useKirbyCreationV3EditPermission")(l),R=S.checkAndProceed,L=p(function(e){R(function(){var t=50,n=e.some(function(e){return e.length>t});if(n){o("cdsPushToast").pushToast({message:s._(/*BTDS*/"Topics must be 50 characters or less.")});return}var r=Array.from(new Set(e));if(r.lengtht});if(n){o("cdsPushToast").pushToast({message:s._(/*BTDS*/"Topics must be 50 characters or less.")});return}var r=Array.from(new Set(e.avoided_topics));if(r.lengtht||e.response.length>t});if(n){o("cdsPushToast").pushToast({message:s._(/*BTDS*/"Dialogue examples must be 250 characters or less.")});return}y(function(t){return babelHelpers.extends({},t,{exampleDialogueVec:e})}),v()})},[R,v]);return d.jsxs(n=r("KDSFlexbox.react"),{direction:"column",xstyle:g.centerPane,children:[d.jsxs(n,{direction:"column",gap:4,xstyle:g.tabHeader,children:[d.jsx(a=r("KDSText.react"),{color:"primary",textStyle:"headline2",children:s._(/*BTDS*/"Conversation")}),d.jsx(a,{color:"secondary",textStyle:"subtitle",children:s._(/*BTDS*/"Choose the topics that your AI talks about and add examples of how it speaks.")})]}),d.jsxs(n,{direction:"column",gap:(t=o("KirbyCreationV3GlobalConstants")).KirbyCreationV3LayoutDefaultGap,children:[d.jsx(r("KDSListCell.react"),{content:d.jsxs(n,{direction:"column",gap:t.KirbyCreationV3LayoutDefaultGap,children:[d.jsx(n,{direction:"row",justifyContent:"space-between",children:d.jsxs(n,{alignItems:"center",gap:4,children:[d.jsx(a,{color:"secondary",textStyle:"body",children:s._(/*BTDS*/"Topics that your AI can discuss")}),d.jsx(r("KirbyCreationV3TooltipIcon.react"),{tooltip:s._(/*BTDS*/"Choose the conversation topics that your AI should focus on in video chats.")})]})}),d.jsx(r("KirbyCreationV3FocusTopicsField.react"),{onChange:L,suggestedFocusTopics:C.suggestedFocusTopics,value:C.focusTopics})]}),hasBottomDivider:!0,xstyle:g.paneSection}),d.jsx(r("KDSListCell.react"),{content:d.jsxs(n,{direction:"column",gap:t.KirbyCreationV3LayoutDefaultGap,children:[d.jsx(n,{direction:"row",justifyContent:"space-between",children:d.jsxs(n,{alignItems:"center",gap:4,children:[d.jsx(a,{color:"secondary",textStyle:"body",children:s._(/*BTDS*/"Topics that your AI should avoid")}),d.jsx(r("KirbyCreationV3TooltipIcon.react"),{tooltip:s._(/*BTDS*/"Choose the conversation topics that your AI should not discuss in video chats.")})]})}),d.jsx(r("KirbyCreationV3AvoidedTopicsField.react"),{onChange:E,suggestedAvoidedTopics:C.suggestedAvoidedTopics,value:C.avoidedTopicsAttributes})]}),hasBottomDivider:!0,xstyle:g.paneSection}),d.jsx(r("KDSListCell.react"),{content:d.jsxs(n,{direction:"column",gap:t.KirbyCreationV3LayoutDefaultGap,children:[d.jsx(n,{direction:"row",justifyContent:"space-between",children:d.jsxs(n,{alignItems:"center",gap:4,children:[d.jsx(a,{color:"secondary",textStyle:"body",children:s._(/*BTDS*/"Dialogue examples")}),d.jsx(r("KirbyCreationV3TooltipIcon.react"),{tooltip:s._(/*BTDS*/"Dialogue examples show your AI how it should sound in a conversation. Enter example chats and answer them in the style that you want your AI to use.")})]})}),d.jsx(r("KirbyCreationV3DialogExamplesField.react"),{onChange:k,value:C.exampleDialogueVec})]}),hasBottomDivider:!1,xstyle:g.paneSection})]})]})}y.displayName=y.name+" [from "+i.id+"]";function C(e){var t,a,i,l,s=e.queries.queryRef,c=o("CometRelay").usePreloadedQuery(u!==void 0?u:u=n("KirbyCreationV3ConversationTabQuery.graphql"),s),m=s.variables.id,p=r("useKirbyCreationV3IsAIYouRoute")(),_=(t=(a=c.ugc_persona)==null||(a=a.version)==null?void 0:a.all_embodiment_settings)!=null?t:[],f=_.length>0,g=(i=c.ugc_persona)==null||(i=i.version)==null?void 0:i.embodiment_settings_id,h=_.find(function(e){return e.id===g}),C=(l=h==null?void 0:h.external_image_url)!=null?l:null;return c.ugc_persona!=null&&d.jsx(r("KirbyCreationV3BaseTabLayout.react"),{primaryContent:d.jsx(y,{personaKey:c.ugc_persona}),rightContent:p?f?d.jsx(r("AvatarSimpleCallingInterface.react"),{_personaID:m,embodimentImageUrl:C,persona:c.ugc_persona}):d.jsx(r("AppearancePreviewEmptyState.react"),{}):d.jsx(r("KirbyCreationV3PersistentChat.react"),{queryKey:c})})}C.displayName=C.name+" [from "+i.id+"]",l.default=C}),226);
-----
KirbyCreationV3ConversationTab.entrypoint",["JSResourceForInteraction","KirbyCreationV3ConversationTabQuery$Parameters","buildKirbyCreationV3Route.entrypoint"],(function(t,n,r,o,a,i,l){"use strict";var e=r("JSResourceForInteraction")("KirbyCreationV3ConversationTab.react").__setRef("KirbyCreationV3ConversationTab.entrypoint"),s=r("buildKirbyCreationV3Route.entrypoint")(e,function(e){var t;return{queries:{queryRef:{parameters:r("KirbyCreationV3ConversationTabQuery$Parameters"),variables:{id:e.routeProps.id,versionId:(t=e.routeProps.version_id)!=null?t:void 0}}}}});l.default=s}),98);
-----
KirbyCreationV3ConversationTabQuery$Parameters",["KirbyCreationV3ConversationTabQuery_facebookRelayOperation","WebPixelRatio.relayprovider"],(function(t,n,r,o,a,i){"use strict";var e={kind:"PreloadableConcreteRequest",params:{id:n("KirbyCreationV3ConversationTabQuery_facebookRelayOperation"),metadata:{},name:"KirbyCreationV3ConversationTabQuery",operationKind:"query",text:null,providedVariables:{__relay_internal__pv__WebPixelRatiorelayprovider:n("WebPixelRatio.relayprovider")}}};a.exports=e}),null);
-----
KirbyCreationV3ConversationTabQuery_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="25404098452615045"}),null);
-----