KirbyAdvancedCreationVoiceListDialog.entrypoint",["JSResourceForInteraction","KirbyAdvancedCreationVoiceListDialogQuery$Parameters"],(function(a,b,c,d,e,f,g){"use strict";a={getPreloadProps:function(a){a={personaID:a.personaID,versionID:a.personaVersionID};return{queries:{personaQuery:{parameters:c("KirbyAdvancedCreationVoiceListDialogQuery$Parameters"),variables:a}}}},root:c("JSResourceForInteraction")("KirbyAdvancedCreationVoiceListDialog.react").__setRef("KirbyAdvancedCreationVoiceListDialog.entrypoint")};g["default"]=a}),98);
-----
KirbyAdvancedCreationVoiceListDialogQuery$Parameters",["KirbyAdvancedCreationVoiceListDialogQuery_facebookRelayOperation"],(function(a,b,c,d,e,f){"use strict";a={kind:"PreloadableConcreteRequest",params:{id:b("KirbyAdvancedCreationVoiceListDialogQuery_facebookRelayOperation"),metadata:{},name:"KirbyAdvancedCreationVoiceListDialogQuery",operationKind:"query",text:null}};e.exports=a}),null);
-----
KirbyAdvancedCreationVoiceListDialogQuery_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="9556943761041664"}),null);
-----
KirbyAdvancedCreationVoiceListDialog.react",["fbt","$InternalEnum","BaseContextualLayer.react","CDSCheckboxListCell.react","CDSChip.react","CDSChipPile.react","CDSDialog.react","CDSDialogFooter.react","CDSDialogHeader.react","CDSMultiSelectList.react","CDSText.react","CDSTextPairing.react","CometColumn.react","CometColumnItem.react","CometRelay","CometRow.react","CometRowItem.react","KirbyAdvancedCreationVoiceListDialogFragment.graphql","KirbyAdvancedCreationVoiceListDialogQuery.graphql","KirbyAdvancedCreationVoiceSample.react","MetaBrandLargeTriangleDownFilled24.svg.react","react","useKirbyFieldUpdater"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j,k,l=k||(k=d("react"));e=k;var m=e.useEffect,n=e.useRef,o=e.useState,p={menuPadding:{marginTop:"x1xmf6yo",$$css:!0}},q=b("$InternalEnum")({LOW:"Low",MEDIUM:"Medium",HIGH:"High"}),r=i!==void 0?i:i=b("KirbyAdvancedCreationVoiceListDialogFragment.graphql");function s(a,b,d,e,f){return a.map(function(a){if(a.voice_selection_name==null||a.voice_id==null)return null;var g=a.voice_selection_name+a.voice_id,h=(b==null?void 0:b.voice_selection_name)!=null&&b.voice_id!=null?b.voice_selection_name+b.voice_id:null;return l.jsx("div",{children:l.jsx(c("KirbyAdvancedCreationVoiceSample.react"),{onSelect:function(){d(a)},selected:g===h,voiceId:a.voice_id,voiceIntensity:e,voiceSentiment:f})},g)})}function a(a){var e=a.props,f=e.fragmentKey,g=e.onChange,i=e.onClose;e=a.queries.personaQuery;a=d("CometRelay").usePreloadedQuery(j!==void 0?j:j=b("KirbyAdvancedCreationVoiceListDialogQuery.graphql"),e);var k=(e=a.persona)==null?void 0:e.persona_version_for_viewer;a=(k==null?void 0:k.voice_id)!=null&&(k==null?void 0:k.voice_selection_name)!=null?{voice_category:null,voice_id:k.voice_id,voice_selection_name:k.voice_selection_name}:null;e=n(null);var t=o(!1),u=t[0],v=t[1];t=o(a);var w=t[0],x=t[1],y=(a=k==null?void 0:k.voice_intensity)!=null?a:q.MEDIUM,z=(t=k==null?void 0:k.voice_sentiment)!=null?t:"Neutral";t=(a=k==null?void 0:k.voice_selection_list)!=null?a:[];var A={};t.forEach(function(a){if(a.voice_category==null)return;var b=a.voice_category;A[b]||(A[b]=[]);A[b].push({voice_category:b,voice_id:a.voice_id,voice_selection_name:a.voice_selection_name})});a=Object.keys(A);var B={};a.forEach(function(a){B[a]=!0});t=o(B);var C=t[0],D=t[1],E=c("useKirbyFieldUpdater")({onRevert:null,updater:function(a,b){if(k===null)return;a=a.readUpdatableFragment(r,f);a=a.updatableData;a.voice_id=b.voice_id;a.voice_selection_name=b.voice_selection_name;a.voice_sentiment=z;a.voice_intensity=y}});t=l.jsx(c("CDSDialogHeader.react"),{onClose:function(){i()},titleHidden:!0});var F=l.jsx(c("CDSDialogFooter.react"),{primary:{disabled:!1,label:h._(/*BTDS*/"Confirm"),onPress:function(){if(w!=null&&w.voice_id!=null){var a;E(w);g("voice_id:"+((a=w.voice_id)!=null?a:""),"VOICE_ID")}i()}}}),G=n(null);m(function(){G.current&&u&&G.current.reposition()},[C,u]);return l.jsx(c("CDSDialog.react"),{"aria-label":h._(/*BTDS*/"Choose a voice for your AI"),footer:F,header:t,children:l.jsxs(c("CometColumn.react"),{children:[l.jsx(c("CometColumnItem.react"),{paddingHorizontal:12,children:l.jsx(c("CDSTextPairing.react"),{contentText:h._(/*BTDS*/"Give your AI some guidance about the link and how to share it in conversation."),headlineText:h._(/*BTDS*/"Choose a voice for your AI"),textAlign:"start",textPairingStyle:"headline2Body"})}),l.jsxs(c("CometColumnItem.react"),{paddingHorizontal:12,paddingTop:16,children:[l.jsx(c("CDSChipPile.react"),{children:l.jsx(c("CDSChip.react"),{addOnEnd:c("MetaBrandLargeTriangleDownFilled24.svg.react"),forwardedRef:e,label:h._(/*BTDS*/"Category"),onPress:function(){v(!u)}})}),u?l.jsx(c("BaseContextualLayer.react"),{align:"start",contextRef:e,imperativeRef:G,children:l.jsx(c("CDSMultiSelectList.react"),{"aria-label":h._(/*BTDS*/"Capabilities"),xstyle:p.menuPadding,children:a.map(function(a){return l.jsx(c("CDSCheckboxListCell.react"),{checked:C[a],hasBottomDivider:!1,name:"checkbox",onValueChange:function(){var b=babelHelpers["extends"]({},C);b[a]=!b[a];D(b)},title:a,value:a},a)})})}):null]}),l.jsx(c("CometColumnItem.react"),{paddingTop:16,children:Object.keys(C).map(function(a){if(C[a]===!1)return null;var b=A[a];return l.jsxs(c("CometColumnItem.react"),{children:[l.jsx(c("CometRow.react"),{children:l.jsx(c("CometRowItem.react"),{children:l.jsx(c("CDSText.react"),{color:"secondaryText",textStyle:"secondaryLabel",children:a})})}),l.jsx(c("CometRow.react"),{children:l.jsx(c("CometRowItem.react"),{children:l.jsx("div",{style:{columnGap:"12px",display:"grid",gridTemplateColumns:"1fr 1fr 1fr",rowGap:"12px"},children:s(b,w,x,y,z)})})})]},a)})})]})})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
KirbyAdvancedCreationVoiceListDialogQuery.graphql",["KirbyAdvancedCreationVoiceListDialogQuery_facebookRelayOperation","relay-runtime"],(function(a,b,c,d,e,f){"use strict";a=function(){var a=[{defaultValue:null,kind:"LocalArgument",name:"personaID"},{defaultValue:null,kind:"LocalArgument",name:"versionID"}],c=[{kind:"Variable",name:"persona_id",variableName:"personaID"}],d=[{kind:"Variable",name:"persona_version_id",variableName:"versionID"}],e={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},f={alias:null,args:null,kind:"ScalarField",name:"voice_id",storageKey:null},g={alias:null,args:null,kind:"ScalarField",name:"voice_selection_name",storageKey:null},h={alias:null,args:null,kind:"ScalarField",name:"voice_intensity",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"voice_sentiment",storageKey:null},j={alias:null,args:null,concreteType:"XWIGenAIVoiceOptions",kind:"LinkedField",name:"voice_selection_list",plural:!0,selections:[f,{alias:null,args:null,kind:"ScalarField",name:"voice_category",storageKey:null},g],storageKey:null},k={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:a,kind:"Fragment",metadata:null,name:"KirbyAdvancedCreationVoiceListDialogQuery",selections:[{alias:"persona",args:c,concreteType:null,kind:"LinkedField",name:"xfb_fetch_genai_persona",plural:!1,selections:[{kind:"RequiredField",field:{alias:null,args:d,concreteType:null,kind:"LinkedField",name:"persona_version_for_viewer",plural:!1,selections:[e,f,g,h,i,j],storageKey:null},action:"THROW",path:"persona.persona_version_for_viewer"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:a,kind:"Operation",name:"KirbyAdvancedCreationVoiceListDialogQuery",selections:[{alias:"persona",args:c,concreteType:null,kind:"LinkedField",name:"xfb_fetch_genai_persona",plural:!1,selections:[e,{alias:null,args:d,concreteType:null,kind:"LinkedField",name:"persona_version_for_viewer",plural:!1,selections:[e,f,g,h,i,j,k],storageKey:null},k],storageKey:null}]},params:{id:b("KirbyAdvancedCreationVoiceListDialogQuery_facebookRelayOperation"),metadata:{},name:"KirbyAdvancedCreationVoiceListDialogQuery",operationKind:"query",text:null}}}();b("relay-runtime").PreloadableQueryRegistry.set(a.params.id,a);e.exports=a}),null);
-----