@genpact/genome.mfe.mgtwin-app 1.1.270-alpha → 1.1.271-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,4 +32,4 @@ File System access not available, please use Push or PullAudioOutputStream`),thi
32
32
  \r
33
33
  `);A&&A.length>0&&(o=this.parseHeaders(A[0]),A.length>1&&(s=A[1]))}i.resolve(new ni.ConnectionMessage(e.messageType,s,o,e.id))}else if(e.messageType===ni.MessageType.Binary){const n=e.binaryContent;let o={},s=null;if(!n||n.byteLength<2)throw new Error("Invalid binary message format. Header length missing.");const A=new DataView(n),r=A.getInt16(0);if(n.byteLength<r+2)throw new Error("Invalid binary message format. Header content missing.");let a="";for(let c=0;c<r;c++)a+=String.fromCharCode(A.getInt8(c+2));o=this.parseHeaders(a),n.byteLength>r+2&&(s=n.slice(2+r)),i.resolve(new ni.ConnectionMessage(e.messageType,s,o,e.id))}}catch(n){i.reject(`Error formatting the message. Error: ${n}`)}return i.promise}fromConnectionMessage(e){const i=new ni.Deferred;try{if(e.messageType===ni.MessageType.Text){const n=`${this.makeHeaders(e)}${Yd}${e.textBody?e.textBody:""}`;i.resolve(new ni.RawWebsocketMessage(ni.MessageType.Text,n,e.id))}else if(e.messageType===ni.MessageType.Binary){const n=this.makeHeaders(e),o=e.binaryBody,s=this.stringToArrayBuffer(n),A=new Int8Array(s),r=A.byteLength,a=new Int8Array(2+r+(o?o.byteLength:0));if(a[0]=r>>8&255,a[1]=r&255,a.set(A,2),o){const u=new Int8Array(o);a.set(u,2+r)}const c=a.buffer;i.resolve(new ni.RawWebsocketMessage(ni.MessageType.Binary,c,e.id))}}catch(n){i.reject(`Error formatting the message. ${n}`)}return i.promise}makeHeaders(e){let i="";if(e.headers)for(const n in e.headers)n&&(i+=`${n}: ${e.headers[n]}${Yd}`);return i}parseHeaders(e){const i={};if(e){const n=e.match(/[^\r\n]+/g);if(i){for(const o of n)if(o){const s=o.indexOf(":"),A=s>0?o.substr(0,s).trim().toLowerCase():o,r=s>0&&o.length>s+1?o.substr(s+1).trim():"";i[A]=r}}}return i}stringToArrayBuffer(e){const i=new ArrayBuffer(e.length),n=new DataView(i);for(let o=0;o<e.length;o++)n.setUint8(o,e.charCodeAt(o));return i}}Bc.WebsocketMessageFormatter=uO;var Js={},zd;function lO(){if(zd)return Js;zd=1,Object.defineProperty(Js,"__esModule",{value:!0}),Js.SpeechConnectionFactory=void 0;const t=Ct(),e=oe(),i=q(),n=li(),o=oe(),s=ht,A=ui,r=Ht;let a=class extends n.ConnectionFactoryBase{constructor(){super(...arguments),this.interactiveRelativeUri="/speech/recognition/interactive/cognitiveservices/v1",this.conversationRelativeUri="/speech/recognition/conversation/cognitiveservices/v1",this.dictationRelativeUri="/speech/recognition/dictation/cognitiveservices/v1",this.universalUri="/stt/speech/universal/v"}async create(u,l,g){let E=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_Endpoint,void 0);const C=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_Region,void 0),p=n.ConnectionFactoryBase.getHostSuffix(C),S=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_Host,"wss://"+C+".stt.speech"+p),I={},d=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_EndpointId,void 0),M=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_RecoLanguage,void 0);if(d?(!E||E.search(A.QueryParameterNames.CustomSpeechDeploymentId)===-1)&&(I[A.QueryParameterNames.CustomSpeechDeploymentId]=d):M&&(!E||E.search(A.QueryParameterNames.Language)===-1)&&(I[A.QueryParameterNames.Language]=M),(!E||E.search(A.QueryParameterNames.Format)===-1)&&(I[A.QueryParameterNames.Format]=u.parameters.getProperty(e.OutputFormatPropertyName,i.OutputFormat[i.OutputFormat.Simple]).toLowerCase()),u.autoDetectSourceLanguages!==void 0&&(I[A.QueryParameterNames.EnableLanguageId]="true"),this.setCommonUrlParams(u,I,E),E){const Q=new URL(E),j=Q.pathname;(j===""||j==="/")&&(Q.pathname=this.universalUri+u.recognitionEndpointVersion,E=await n.ConnectionFactoryBase.getRedirectUrlFromEndpoint(Q.toString()))}if(!E)switch(u.recognitionMode){case r.RecognitionMode.Conversation:u.parameters.getProperty(e.ForceDictationPropertyName,"false")==="true"?E=S+this.dictationRelativeUri:u.recognitionEndpointVersion!==void 0&&parseInt(u.recognitionEndpointVersion,10)>1?E=`${S}${this.universalUri}${u.recognitionEndpointVersion}`:E=S+this.conversationRelativeUri;break;case r.RecognitionMode.Dictation:E=S+this.dictationRelativeUri;break;default:u.recognitionEndpointVersion!==void 0&&parseInt(u.recognitionEndpointVersion,10)>1?E=`${S}${this.universalUri}${u.recognitionEndpointVersion}`:E=S+this.interactiveRelativeUri;break}const B={};l.token!==void 0&&l.token!==""&&(B[l.headerName]=l.token),B[s.HeaderNames.ConnectionId]=g,B.connectionId=g;const D=u.parameters.getProperty("SPEECH-EnableWebsocketCompression","false")==="true",L=new t.WebsocketConnection(E,I,B,new o.WebsocketMessageFormatter,t.ProxyInfo.fromRecognizerConfig(u),D,g),U=L.uri;return u.parameters.setProperty(i.PropertyId.SpeechServiceConnection_Url,U),L}};return Js.SpeechConnectionFactory=a,Js}var Hs={},Pd;function gO(){if(Pd)return Hs;Pd=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.ConversationTranscriberConnectionFactory=void 0;const t=Ct(),e=q(),i=oe(),n=li(),o=oe(),s=ht,A=ui;let r=class extends n.ConnectionFactoryBase{constructor(){super(...arguments),this.universalUri="/speech/universal/v2"}async create(c,u,l){let g=c.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Endpoint,void 0);const E=c.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Region,void 0),C=n.ConnectionFactoryBase.getHostSuffix(E),p=c.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Host,"wss://"+E+".stt.speech"+C),S={},I=c.parameters.getProperty(e.PropertyId.SpeechServiceConnection_EndpointId,void 0),d=c.parameters.getProperty(e.PropertyId.SpeechServiceConnection_RecoLanguage,void 0);if(I?(!g||g.search(A.QueryParameterNames.CustomSpeechDeploymentId)===-1)&&(S[A.QueryParameterNames.CustomSpeechDeploymentId]=I):d&&(!g||g.search(A.QueryParameterNames.Language)===-1)&&(S[A.QueryParameterNames.Language]=d),c.autoDetectSourceLanguages!==void 0&&(S[A.QueryParameterNames.EnableLanguageId]="true"),this.setV2UrlParams(c,S,g),g){const U=new URL(g),Q=U.pathname;(Q===""||Q==="/")&&(U.pathname=this.universalUri,g=await n.ConnectionFactoryBase.getRedirectUrlFromEndpoint(U.toString()))}g||(g=`${p}${this.universalUri}`);const M={};u.token!==void 0&&u.token!==""&&(M[u.headerName]=u.token),M[s.HeaderNames.ConnectionId]=l;const B=c.parameters.getProperty("SPEECH-EnableWebsocketCompression","false")==="true",D=new t.WebsocketConnection(g,S,M,new o.WebsocketMessageFormatter,t.ProxyInfo.fromRecognizerConfig(c),B,l),L=D.uri;return c.parameters.setProperty(e.PropertyId.SpeechServiceConnection_Url,L),D}setV2UrlParams(c,u,l){new Map([[e.PropertyId.Speech_SegmentationSilenceTimeoutMs,A.QueryParameterNames.SegmentationSilenceTimeoutMs],[e.PropertyId.SpeechServiceConnection_EnableAudioLogging,A.QueryParameterNames.EnableAudioLogging],[e.PropertyId.SpeechServiceConnection_EndSilenceTimeoutMs,A.QueryParameterNames.EndSilenceTimeoutMs],[e.PropertyId.SpeechServiceConnection_InitialSilenceTimeoutMs,A.QueryParameterNames.InitialSilenceTimeoutMs],[e.PropertyId.SpeechServiceResponse_PostProcessingOption,A.QueryParameterNames.Postprocessing],[e.PropertyId.SpeechServiceResponse_ProfanityOption,A.QueryParameterNames.Profanity],[e.PropertyId.SpeechServiceResponse_StablePartialResultThreshold,A.QueryParameterNames.StableIntermediateThreshold]]).forEach((C,p)=>{this.setUrlParameter(p,C,c,u,l)});const E=JSON.parse(c.parameters.getProperty(i.ServicePropertiesPropertyName,"{}"));Object.keys(E).forEach(C=>{u[C]=E[C]})}};return Hs.ConversationTranscriberConnectionFactory=r,Hs}var qs={},bd;function EO(){if(bd)return qs;bd=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.TranscriberConnectionFactory=void 0;const t=Ct(),e=q(),i=li(),n=oe(),o=ht,s=ui;let A=class extends i.ConnectionFactoryBase{constructor(){super(...arguments),this.multiaudioRelativeUri="/speech/recognition/multiaudio"}create(a,c,u){let l=a.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Endpoint,void 0);const g=a.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Region,"centralus"),E=i.ConnectionFactoryBase.getHostSuffix(g),C="wss://transcribe."+g+".cts.speech"+E+this.multiaudioRelativeUri,p=a.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Host,C),S={};this.setQueryParams(S,a,l),l||(l=p);const I={};c.token!==void 0&&c.token!==""&&(I[c.headerName]=c.token),I[o.HeaderNames.ConnectionId]=u,a.parameters.setProperty(e.PropertyId.SpeechServiceConnection_Url,l);const d=a.parameters.getProperty("SPEECH-EnableWebsocketCompression","false")==="true";return Promise.resolve(new t.WebsocketConnection(l,S,I,new n.WebsocketMessageFormatter,t.ProxyInfo.fromRecognizerConfig(a),d,u))}setQueryParams(a,c,u){const l=c.parameters.getProperty(e.PropertyId.SpeechServiceConnection_EndpointId,void 0),g=c.parameters.getProperty(e.PropertyId.SpeechServiceConnection_RecoLanguage,void 0);l&&!(s.QueryParameterNames.CustomSpeechDeploymentId in a)&&(a[s.QueryParameterNames.CustomSpeechDeploymentId]=l),g&&!(s.QueryParameterNames.Language in a)&&(a[s.QueryParameterNames.Language]=g);const E=c.parameters.getProperty(e.PropertyId.SpeechServiceResponse_RequestWordLevelTimestamps,"false").toLowerCase()==="true",C=c.parameters.getProperty(n.OutputFormatPropertyName,e.OutputFormat[e.OutputFormat.Simple])!==e.OutputFormat[e.OutputFormat.Simple];(E||C)&&(a[s.QueryParameterNames.Format]=e.OutputFormat[e.OutputFormat.Detailed].toLowerCase()),this.setCommonUrlParams(c,a,u)}};return qs.TranscriberConnectionFactory=A,qs}var Vs={},Jd;function hO(){if(Jd)return Vs;Jd=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.TranslationConnectionFactory=void 0;const t=Ct(),e=Qs,i=q(),n=li(),o=oe(),s=ht,A=ui,r=Ht;let a=class extends n.ConnectionFactoryBase{constructor(){super(...arguments),this.universalUri="/stt/speech/universal/v2",this.translationV1Uri="/speech/translation/cognitiveservices/v1"}async create(u,l,g){let E=this.getEndpointUrl(u);const C={};if(this.setQueryParams(C,u,E),E){const d=new URL(E),M=d.pathname;(M===""||M==="/")&&(d.pathname=this.universalUri,E=await n.ConnectionFactoryBase.getRedirectUrlFromEndpoint(d.toString()))}const p={};l.token!==void 0&&l.token!==""&&(p[l.headerName]=l.token),p[s.HeaderNames.ConnectionId]=g,u.parameters.setProperty(i.PropertyId.SpeechServiceConnection_Url,E);const S=u.parameters.getProperty("SPEECH-EnableWebsocketCompression","false")==="true";return new t.WebsocketConnection(E,C,p,new o.WebsocketMessageFormatter,t.ProxyInfo.fromRecognizerConfig(u),S,g)}getEndpointUrl(u,l){const g=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_Region),E=n.ConnectionFactoryBase.getHostSuffix(g);let C=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_Endpoint,void 0);return C?l===!0?C:e.StringUtils.formatString(C,{region:g}):(u.parameters.getProperty("SPEECH-ForceV1Endpoint","false")==="true"?C=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_Host,"wss://{region}.s2s.speech"+E)+this.translationV1Uri:C=u.parameters.getProperty(i.PropertyId.SpeechServiceConnection_Host,"wss://{region}.stt.speech"+E)+this.universalUri,l===!0?C:e.StringUtils.formatString(C,{region:g}))}setQueryParams(u,l,g){u.from=l.parameters.getProperty(i.PropertyId.SpeechServiceConnection_RecoLanguage),u.to=l.parameters.getProperty(i.PropertyId.SpeechServiceConnection_TranslationToLanguages),u.scenario=l.recognitionMode===r.RecognitionMode.Interactive?"interactive":l.recognitionMode===r.RecognitionMode.Conversation?"conversation":"",this.setCommonUrlParams(l,u,g),this.setUrlParameter(i.PropertyId.SpeechServiceResponse_TranslationRequestStablePartialResult,A.QueryParameterNames.StableTranslation,l,u,g);const E=l.parameters.getProperty(i.PropertyId.SpeechServiceConnection_TranslationVoice,void 0);E!==void 0&&(u.voice=E,u.features="requireVoice")}};return Vs.TranslationConnectionFactory=a,Vs}var Ws={},Hd;function CO(){if(Hd)return Ws;Hd=1,Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.EnumTranslation=void 0;const t=q(),e=oe();let i=class{static implTranslateRecognitionResult(o,s=!1){let A=t.ResultReason.Canceled;switch(o){case e.RecognitionStatus.Success:A=t.ResultReason.RecognizedSpeech;break;case e.RecognitionStatus.EndOfDictation:A=s?t.ResultReason.RecognizedSpeech:t.ResultReason.NoMatch;break;case e.RecognitionStatus.NoMatch:case e.RecognitionStatus.InitialSilenceTimeout:case e.RecognitionStatus.BabbleTimeout:A=t.ResultReason.NoMatch;break;case e.RecognitionStatus.Error:case e.RecognitionStatus.BadRequest:case e.RecognitionStatus.Forbidden:default:A=t.ResultReason.Canceled;break}return A}static implTranslateCancelResult(o){let s=t.CancellationReason.EndOfStream;switch(o){case e.RecognitionStatus.Success:case e.RecognitionStatus.EndOfDictation:case e.RecognitionStatus.NoMatch:s=t.CancellationReason.EndOfStream;break;case e.RecognitionStatus.InitialSilenceTimeout:case e.RecognitionStatus.BabbleTimeout:case e.RecognitionStatus.Error:case e.RecognitionStatus.BadRequest:case e.RecognitionStatus.Forbidden:default:s=t.CancellationReason.Error;break}return s}static implTranslateCancelErrorCode(o){let s=t.CancellationErrorCode.NoError;switch(o){case e.RecognitionStatus.Error:s=t.CancellationErrorCode.ServiceError;break;case e.RecognitionStatus.TooManyRequests:s=t.CancellationErrorCode.TooManyRequests;break;case e.RecognitionStatus.BadRequest:s=t.CancellationErrorCode.BadRequestParameters;break;case e.RecognitionStatus.Forbidden:s=t.CancellationErrorCode.Forbidden;break;default:s=t.CancellationErrorCode.NoError;break}return s}static implTranslateErrorDetails(o){let s="The speech service encountered an internal error and could not continue.";switch(o){case t.CancellationErrorCode.Forbidden:s="The recognizer is using a free subscription that ran out of quota.";break;case t.CancellationErrorCode.BadRequestParameters:s="Invalid parameter or unsupported audio format in the request.";break;case t.CancellationErrorCode.TooManyRequests:s="The number of parallel requests exceeded the number of allowed concurrent transcriptions.";break}return s}};return Ws.EnumTranslation=i,Ws}var qd={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.RecognitionStatus=t.SynthesisStatus=void 0,function(e){e[e.Success=0]="Success",e[e.SynthesisEnd=1]="SynthesisEnd",e[e.Error=2]="Error"}(t.SynthesisStatus||(t.SynthesisStatus={})),function(e){e[e.Success=0]="Success",e[e.NoMatch=1]="NoMatch",e[e.InitialSilenceTimeout=2]="InitialSilenceTimeout",e[e.BabbleTimeout=3]="BabbleTimeout",e[e.Error=4]="Error",e[e.EndOfDictation=5]="EndOfDictation",e[e.TooManyRequests=6]="TooManyRequests",e[e.BadRequest=7]="BadRequest",e[e.Forbidden=8]="Forbidden"}(t.RecognitionStatus||(t.RecognitionStatus={}))})(qd);var Zs={},Vd;function IO(){if(Vd)return Zs;Vd=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.TranslationSynthesisEnd=void 0;const t=oe();let e=class gM{constructor(n){this.privSynthesisEnd=JSON.parse(n),this.privSynthesisEnd.SynthesisStatus&&(this.privSynthesisEnd.SynthesisStatus=t.SynthesisStatus[this.privSynthesisEnd.SynthesisStatus]),this.privSynthesisEnd.Status&&(this.privSynthesisEnd.SynthesisStatus=t.SynthesisStatus[this.privSynthesisEnd.Status])}static fromJSON(n){return new gM(n)}get SynthesisStatus(){return this.privSynthesisEnd.SynthesisStatus}get FailureReason(){return this.privSynthesisEnd.FailureReason}};return Zs.TranslationSynthesisEnd=e,Zs}var vc={};Object.defineProperty(vc,"__esModule",{value:!0}),vc.TranslationHypothesis=void 0;const pO=Se,Wd=za;class fc{constructor(e,i){this.privTranslationHypothesis=e,this.privTranslationHypothesis.Offset+=i,this.privTranslationHypothesis.Translation.TranslationStatus=this.mapTranslationStatus(this.privTranslationHypothesis.Translation.TranslationStatus)}static fromJSON(e,i){return new fc(JSON.parse(e),i)}static fromTranslationResponse(e,i){pO.Contracts.throwIfNullOrUndefined(e,"translationHypothesis");const n=e.SpeechHypothesis;return e.SpeechHypothesis=void 0,n.Translation=e,new fc(n,i)}get Duration(){return this.privTranslationHypothesis.Duration}get Offset(){return this.privTranslationHypothesis.Offset}get Text(){return this.privTranslationHypothesis.Text}get Translation(){return this.privTranslationHypothesis.Translation}get Language(){var e;return(e=this.privTranslationHypothesis.PrimaryLanguage)==null?void 0:e.Language}asJson(){const e={...this.privTranslationHypothesis};return e.Translation!==void 0?JSON.stringify({...e,TranslationStatus:Wd.TranslationStatus[e.Translation.TranslationStatus]}):JSON.stringify(e)}mapTranslationStatus(e){if(typeof e=="string")return Wd.TranslationStatus[e];if(typeof e=="number")return e}}vc.TranslationHypothesis=fc;var Xs={},Zd;function dO(){if(Zd)return Xs;Zd=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.TranslationPhrase=void 0;const t=Se,e=oe(),i=za;let n=class Og{constructor(s,A){this.privTranslationPhrase=s,this.privTranslationPhrase.Offset+=A,this.privTranslationPhrase.RecognitionStatus=this.mapRecognitionStatus(this.privTranslationPhrase.RecognitionStatus),this.privTranslationPhrase.Translation!==void 0&&(this.privTranslationPhrase.Translation.TranslationStatus=this.mapTranslationStatus(this.privTranslationPhrase.Translation.TranslationStatus))}static fromJSON(s,A){return new Og(JSON.parse(s),A)}static fromTranslationResponse(s,A){t.Contracts.throwIfNullOrUndefined(s,"translationResponse");const r=s.SpeechPhrase;return s.SpeechPhrase=void 0,r.Translation=s,r.Text=r.DisplayText,new Og(r,A)}get RecognitionStatus(){return this.privTranslationPhrase.RecognitionStatus}get Offset(){return this.privTranslationPhrase.Offset}get Duration(){return this.privTranslationPhrase.Duration}get Text(){return this.privTranslationPhrase.Text}get Language(){var s;return(s=this.privTranslationPhrase.PrimaryLanguage)==null?void 0:s.Language}get Confidence(){var s;return(s=this.privTranslationPhrase.PrimaryLanguage)==null?void 0:s.Confidence}get Translation(){return this.privTranslationPhrase.Translation}asJson(){const s={...this.privTranslationPhrase},A={...s,RecognitionStatus:e.RecognitionStatus[s.RecognitionStatus]};return s.Translation&&(A.Translation={...s.Translation,TranslationStatus:i.TranslationStatus[s.Translation.TranslationStatus]}),JSON.stringify(A)}mapRecognitionStatus(s){if(typeof s=="string")return e.RecognitionStatus[s];if(typeof s=="number")return s}mapTranslationStatus(s){if(typeof s=="string")return i.TranslationStatus[s];if(typeof s=="number")return s}};return Xs.TranslationPhrase=n,Xs}var _s={},Xd;function SO(){if(Xd)return _s;Xd=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s.TranslationServiceRecognizer=void 0;const t=Ee(),e=q(),i=oe();let n=class extends i.ConversationServiceRecognizer{constructor(s,A,r,a,c){super(s,A,r,a,c),this.privTranslationRecognizer=c,this.connectionEvents.attach(u=>{u.name==="ConnectionEstablishedEvent"&&this.privTranslationRecognizer.onConnection()})}async processTypeSpecificMessages(s){const A=new e.PropertyCollection;let r=await this.processSpeechMessages(s);if(r)return!0;const a=async u=>{if(A.setProperty(e.PropertyId.SpeechServiceResponse_JsonResult,u.asJson()),this.privRequestSession.onPhraseRecognized(u.Offset+u.Duration),u.RecognitionStatus===i.RecognitionStatus.Success){const l=this.fireEventForResult(u,A);if(this.privTranslationRecognizer.recognized)try{this.privTranslationRecognizer.recognized(this.privTranslationRecognizer,l)}catch{}if(this.privSuccessCallback){try{this.privSuccessCallback(l.result)}catch(g){this.privErrorCallback&&this.privErrorCallback(g)}this.privSuccessCallback=void 0,this.privErrorCallback=void 0}}else{const l=i.EnumTranslation.implTranslateRecognitionResult(u.RecognitionStatus),g=new e.TranslationRecognitionResult(void 0,this.privRequestSession.requestId,l,u.Text,u.Duration,u.Offset,u.Language,u.Confidence,void 0,u.asJson(),A);if(l===e.ResultReason.Canceled){const E=i.EnumTranslation.implTranslateCancelResult(u.RecognitionStatus),C=i.EnumTranslation.implTranslateCancelErrorCode(u.RecognitionStatus);await this.cancelRecognitionLocal(E,C,i.EnumTranslation.implTranslateErrorDetails(C))}else if(u.RecognitionStatus!==i.RecognitionStatus.EndOfDictation){const E=new e.TranslationRecognitionEventArgs(g,g.offset,this.privRequestSession.sessionId);if(this.privTranslationRecognizer.recognized)try{this.privTranslationRecognizer.recognized(this.privTranslationRecognizer,E)}catch{}if(this.privSuccessCallback){try{this.privSuccessCallback(g)}catch(C){this.privErrorCallback&&this.privErrorCallback(C)}this.privSuccessCallback=void 0,this.privErrorCallback=void 0}}r=!0}},c=u=>{A.setProperty(e.PropertyId.SpeechServiceResponse_JsonResult,u.asJson());const l=this.fireEventForResult(u,A);if(this.privRequestSession.onHypothesis(l.offset),this.privTranslationRecognizer.recognizing)try{this.privTranslationRecognizer.recognizing(this.privTranslationRecognizer,l)}catch{}r=!0};switch(s.messageType===t.MessageType.Text&&A.setProperty(e.PropertyId.SpeechServiceResponse_JsonResult,s.textBody),s.path.toLowerCase()){case"translation.hypothesis":c(i.TranslationHypothesis.fromJSON(s.textBody,this.privRequestSession.currentTurnAudioOffset));break;case"translation.response":const u=JSON.parse(s.textBody);if(u.SpeechPhrase)await a(i.TranslationPhrase.fromTranslationResponse(u,this.privRequestSession.currentTurnAudioOffset));else{const g=JSON.parse(s.textBody);g.SpeechHypothesis&&c(i.TranslationHypothesis.fromTranslationResponse(g,this.privRequestSession.currentTurnAudioOffset))}break;case"translation.phrase":await a(i.TranslationPhrase.fromJSON(s.textBody,this.privRequestSession.currentTurnAudioOffset));break;case"translation.synthesis":case"audio":this.sendSynthesisAudio(s.binaryBody,this.privRequestSession.sessionId),r=!0;break;case"audio.end":case"translation.synthesis.end":const l=i.TranslationSynthesisEnd.fromJSON(s.textBody);switch(l.SynthesisStatus){case i.SynthesisStatus.Error:if(this.privTranslationRecognizer.synthesizing){const g=new e.TranslationSynthesisResult(e.ResultReason.Canceled,void 0),E=new e.TranslationSynthesisEventArgs(g,this.privRequestSession.sessionId);try{this.privTranslationRecognizer.synthesizing(this.privTranslationRecognizer,E)}catch{}}if(this.privTranslationRecognizer.canceled){const g=new e.TranslationRecognitionCanceledEventArgs(this.privRequestSession.sessionId,e.CancellationReason.Error,l.FailureReason,e.CancellationErrorCode.ServiceError,null);try{this.privTranslationRecognizer.canceled(this.privTranslationRecognizer,g)}catch{}}break;case i.SynthesisStatus.Success:this.sendSynthesisAudio(void 0,this.privRequestSession.sessionId);break}r=!0;break}return r}cancelRecognition(s,A,r,a,c){const u=new e.PropertyCollection;if(u.setProperty(i.CancellationErrorCodePropertyName,e.CancellationErrorCode[a]),this.privTranslationRecognizer.canceled){const l=new e.TranslationRecognitionCanceledEventArgs(s,r,c,a,void 0);try{this.privTranslationRecognizer.canceled(this.privTranslationRecognizer,l)}catch{}}if(this.privSuccessCallback){const l=new e.TranslationRecognitionResult(void 0,A,e.ResultReason.Canceled,void 0,void 0,void 0,void 0,void 0,c,void 0,u);try{this.privSuccessCallback(l),this.privSuccessCallback=void 0}catch{}}}handleRecognizingCallback(s,A,r){try{const a=new e.TranslationRecognitionEventArgs(e.TranslationRecognitionResult.fromSpeechRecognitionResult(s),A,r);this.privTranslationRecognizer.recognizing(this.privTranslationRecognizer,a)}catch{}}handleRecognizedCallback(s,A,r){try{const a=new e.TranslationRecognitionEventArgs(e.TranslationRecognitionResult.fromSpeechRecognitionResult(s),A,r);this.privTranslationRecognizer.recognized(this.privTranslationRecognizer,a)}catch{}}fireEventForResult(s,A){let r;if(s.Translation.Translations!==void 0){r=new e.Translations;for(const E of s.Translation.Translations)r.set(E.Language,E.Text||E.DisplayText)}let a,c;s instanceof i.TranslationPhrase?(s.Translation&&s.Translation.TranslationStatus===t.TranslationStatus.Success?a=e.ResultReason.TranslatedSpeech:a=e.ResultReason.RecognizedSpeech,c=s.Confidence):a=e.ResultReason.TranslatingSpeech;const u=s.Language,l=new e.TranslationRecognitionResult(r,this.privRequestSession.requestId,a,s.Text,s.Duration,s.Offset,u,c,s.Translation.FailureReason,s.asJson(),A);return new e.TranslationRecognitionEventArgs(l,s.Offset,this.privRequestSession.sessionId)}sendSynthesisAudio(s,A){const r=s===void 0?e.ResultReason.SynthesizingAudioCompleted:e.ResultReason.SynthesizingAudio,a=new e.TranslationSynthesisResult(r,s),c=new e.TranslationSynthesisEventArgs(a,A);if(this.privTranslationRecognizer.synthesizing)try{this.privTranslationRecognizer.synthesizing(this.privTranslationRecognizer,c)}catch{}}};return _s.TranslationServiceRecognizer=n,_s}var wc={};Object.defineProperty(wc,"__esModule",{value:!0}),wc.SpeechDetected=void 0;class Wl{constructor(e,i){this.privSpeechStartDetected=JSON.parse(e),this.privSpeechStartDetected.Offset+=i}static fromJSON(e,i){return new Wl(e,i)}get Offset(){return this.privSpeechStartDetected.Offset}}wc.SpeechDetected=Wl;var mc={};Object.defineProperty(mc,"__esModule",{value:!0}),mc.SpeechHypothesis=void 0;class Zl{constructor(e,i){this.privSpeechHypothesis=JSON.parse(e),this.updateOffset(i)}static fromJSON(e,i){return new Zl(e,i)}updateOffset(e){this.privSpeechHypothesis.Offset+=e}asJson(){return JSON.stringify(this.privSpeechHypothesis)}get Text(){return this.privSpeechHypothesis.Text}get Offset(){return this.privSpeechHypothesis.Offset}get Duration(){return this.privSpeechHypothesis.Duration}get Language(){return this.privSpeechHypothesis.PrimaryLanguage===void 0?void 0:this.privSpeechHypothesis.PrimaryLanguage.Language}get LanguageDetectionConfidence(){return this.privSpeechHypothesis.PrimaryLanguage===void 0?void 0:this.privSpeechHypothesis.PrimaryLanguage.Confidence}get SpeakerId(){return this.privSpeechHypothesis.SpeakerId}}mc.SpeechHypothesis=Zl;var Qc={};Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.SpeechKeyword=void 0;class Xl{constructor(e,i){this.privSpeechKeyword=JSON.parse(e),this.privSpeechKeyword.Offset+=i}static fromJSON(e,i){return new Xl(e,i)}get Status(){return this.privSpeechKeyword.Status}get Text(){return this.privSpeechKeyword.Text}get Offset(){return this.privSpeechKeyword.Offset}get Duration(){return this.privSpeechKeyword.Duration}asJson(){return JSON.stringify(this.privSpeechKeyword)}}Qc.SpeechKeyword=Xl;var $s={},_d;function MO(){if(_d)return $s;_d=1,Object.defineProperty($s,"__esModule",{value:!0}),$s.SpeechServiceRecognizer=void 0;const t=q(),e=oe();let i=class extends e.ServiceRecognizerBase{constructor(o,s,A,r,a){super(o,s,A,r,a),this.privSpeechRecognizer=a}async processTypeSpecificMessages(o){let s;const A=new t.PropertyCollection;let r=!1;switch(o.path.toLowerCase()){case"speech.hypothesis":case"speech.fragment":const a=e.SpeechHypothesis.fromJSON(o.textBody,this.privRequestSession.currentTurnAudioOffset);A.setProperty(t.PropertyId.SpeechServiceResponse_JsonResult,a.asJson()),s=new t.SpeechRecognitionResult(this.privRequestSession.requestId,t.ResultReason.RecognizingSpeech,a.Text,a.Duration,a.Offset,a.Language,a.LanguageDetectionConfidence,void 0,void 0,a.asJson(),A),this.privRequestSession.onHypothesis(a.Offset);const c=new t.SpeechRecognitionEventArgs(s,a.Offset,this.privRequestSession.sessionId);if(this.privSpeechRecognizer.recognizing)try{this.privSpeechRecognizer.recognizing(this.privSpeechRecognizer,c)}catch{}r=!0;break;case"speech.phrase":const u=e.SimpleSpeechPhrase.fromJSON(o.textBody,this.privRequestSession.currentTurnAudioOffset);A.setProperty(t.PropertyId.SpeechServiceResponse_JsonResult,u.asJson());const l=e.EnumTranslation.implTranslateRecognitionResult(u.RecognitionStatus,this.privExpectContentAssessmentResponse);if(this.privRequestSession.onPhraseRecognized(u.Offset+u.Duration),t.ResultReason.Canceled===l){const g=e.EnumTranslation.implTranslateCancelResult(u.RecognitionStatus),E=e.EnumTranslation.implTranslateCancelErrorCode(u.RecognitionStatus);await this.cancelRecognitionLocal(g,E,e.EnumTranslation.implTranslateErrorDetails(E))}else{if(u.RecognitionStatus===e.RecognitionStatus.EndOfDictation)break;if(this.privRecognizerConfig.parameters.getProperty(e.OutputFormatPropertyName)===t.OutputFormat[t.OutputFormat.Simple])s=new t.SpeechRecognitionResult(this.privRequestSession.requestId,l,u.DisplayText,u.Duration,u.Offset,u.Language,u.LanguageDetectionConfidence,void 0,void 0,u.asJson(),A);else{const E=e.DetailedSpeechPhrase.fromJSON(o.textBody,this.privRequestSession.currentTurnAudioOffset);A.setProperty(t.PropertyId.SpeechServiceResponse_JsonResult,E.asJson()),s=new t.SpeechRecognitionResult(this.privRequestSession.requestId,l,E.RecognitionStatus===e.RecognitionStatus.Success?E.NBest[0].Display:"",E.Duration,E.Offset,E.Language,E.LanguageDetectionConfidence,void 0,void 0,E.asJson(),A)}const g=new t.SpeechRecognitionEventArgs(s,s.offset,this.privRequestSession.sessionId);if(this.privSpeechRecognizer.recognized)try{this.privSpeechRecognizer.recognized(this.privSpeechRecognizer,g)}catch{}if(this.privSuccessCallback){try{this.privSuccessCallback(s)}catch(E){this.privErrorCallback&&this.privErrorCallback(E)}this.privSuccessCallback=void 0,this.privErrorCallback=void 0}}r=!0;break}return r}cancelRecognition(o,s,A,r,a){const c=new t.PropertyCollection;if(c.setProperty(e.CancellationErrorCodePropertyName,t.CancellationErrorCode[r]),this.privSpeechRecognizer.canceled){const u=new t.SpeechRecognitionCanceledEventArgs(A,a,r,void 0,o);try{this.privSpeechRecognizer.canceled(this.privSpeechRecognizer,u)}catch{}}if(this.privSuccessCallback){const u=new t.SpeechRecognitionResult(s,t.ResultReason.Canceled,void 0,void 0,void 0,void 0,void 0,void 0,a,void 0,c);try{this.privSuccessCallback(u),this.privSuccessCallback=void 0}catch{}}}};return $s.SpeechServiceRecognizer=i,$s}var eA={},$d={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityProvider=t.SpeakerDiarizationMode=void 0,function(e){e.None="None",e.Identity="Identity",e.Anonymous="Anonymous"}(t.SpeakerDiarizationMode||(t.SpeakerDiarizationMode={})),function(e){e.CallCenter="CallCenter"}(t.IdentityProvider||(t.IdentityProvider={}))})($d);var eS;function BO(){if(eS)return eA;eS=1,Object.defineProperty(eA,"__esModule",{value:!0}),eA.ConversationTranscriptionServiceRecognizer=void 0;const t=q(),e=oe(),i=$d,n=Ht;let o=class extends e.ServiceRecognizerBase{constructor(A,r,a,c,u){super(A,r,a,c,u),this.privConversationTranscriber=u,this.setSpeakerDiarizationJson()}setSpeakerDiarizationJson(){if(this.privEnableSpeakerId){const A=this.privSpeechContext.getContext().phraseDetection||{};A.mode=n.RecognitionMode.Conversation;const r={};r.mode=i.SpeakerDiarizationMode.Anonymous,r.audioSessionId=this.privDiarizationSessionId,r.audioOffsetMs=0,r.diarizeIntermediates=this.privRecognizerConfig.parameters.getProperty(t.PropertyId.SpeechServiceResponse_DiarizeIntermediateResults,"false")==="true",A.speakerDiarization=r,this.privSpeechContext.getContext().phraseDetection=A}}async processTypeSpecificMessages(A){let r;const a=new t.PropertyCollection;a.setProperty(t.PropertyId.SpeechServiceResponse_JsonResult,A.textBody);let c=!1;switch(A.path.toLowerCase()){case"speech.hypothesis":case"speech.fragment":const u=e.SpeechHypothesis.fromJSON(A.textBody,this.privRequestSession.currentTurnAudioOffset);r=new t.ConversationTranscriptionResult(this.privRequestSession.requestId,t.ResultReason.RecognizingSpeech,u.Text,u.Duration,u.Offset,u.Language,u.LanguageDetectionConfidence,u.SpeakerId,void 0,u.asJson(),a),this.privRequestSession.onHypothesis(u.Offset);const l=new t.ConversationTranscriptionEventArgs(r,u.Duration,this.privRequestSession.sessionId);if(this.privConversationTranscriber.transcribing)try{this.privConversationTranscriber.transcribing(this.privConversationTranscriber,l)}catch{}c=!0;break;case"speech.phrase":const g=e.SimpleSpeechPhrase.fromJSON(A.textBody,this.privRequestSession.currentTurnAudioOffset),E=e.EnumTranslation.implTranslateRecognitionResult(g.RecognitionStatus);if(this.privRequestSession.onPhraseRecognized(g.Offset+g.Duration),t.ResultReason.Canceled===E){const C=e.EnumTranslation.implTranslateCancelResult(g.RecognitionStatus),p=e.EnumTranslation.implTranslateCancelErrorCode(g.RecognitionStatus);await this.cancelRecognitionLocal(C,p,e.EnumTranslation.implTranslateErrorDetails(p))}else if(!(this.privRequestSession.isSpeechEnded&&E===t.ResultReason.NoMatch&&g.RecognitionStatus!==e.RecognitionStatus.InitialSilenceTimeout)){if(this.privRecognizerConfig.parameters.getProperty(e.OutputFormatPropertyName)===t.OutputFormat[t.OutputFormat.Simple])r=new t.ConversationTranscriptionResult(this.privRequestSession.requestId,E,g.DisplayText,g.Duration,g.Offset,g.Language,g.LanguageDetectionConfidence,g.SpeakerId,void 0,g.asJson(),a);else{const p=e.DetailedSpeechPhrase.fromJSON(A.textBody,this.privRequestSession.currentTurnAudioOffset);r=new t.ConversationTranscriptionResult(this.privRequestSession.requestId,E,p.RecognitionStatus===e.RecognitionStatus.Success?p.NBest[0].Display:void 0,p.Duration,p.Offset,p.Language,p.LanguageDetectionConfidence,g.SpeakerId,void 0,p.asJson(),a)}const C=new t.ConversationTranscriptionEventArgs(r,r.offset,this.privRequestSession.sessionId);if(this.privConversationTranscriber.transcribed)try{this.privConversationTranscriber.transcribed(this.privConversationTranscriber,C)}catch{}}c=!0;break}return c}cancelRecognition(A,r,a,c,u){if(new t.PropertyCollection().setProperty(e.CancellationErrorCodePropertyName,t.CancellationErrorCode[c]),this.privConversationTranscriber.canceled){const g=new t.ConversationTranscriptionCanceledEventArgs(a,u,c,void 0,A);try{this.privConversationTranscriber.canceled(this.privConversationTranscriber,g)}catch{}}}};return eA.ConversationTranscriptionServiceRecognizer=o,eA}var tA={},tS;function vO(){if(tS)return tA;tS=1,Object.defineProperty(tA,"__esModule",{value:!0}),tA.TranscriptionServiceRecognizer=void 0;const t=Ee(),e=q(),i=oe(),n=Ki;let o=class extends i.ConversationServiceRecognizer{constructor(A,r,a,c,u){super(A,r,a,c,u),this.privTranscriberRecognizer=u,this.sendPrePayloadJSONOverride=l=>this.sendTranscriptionStartJSON(l),this.privRecognizerConfig.parameters.getProperty(e.PropertyId.SpeechServiceResponse_RequestWordLevelTimestamps)==="true"&&this.privSpeechContext.setWordLevelTimings()}async sendSpeechEventAsync(A,r){if(this.privRequestSession.isRecognizing){const a=await this.fetchConnection();await this.sendSpeechEvent(a,this.createSpeechEventPayload(A,r))}}async sendMeetingSpeechEventAsync(A,r){if(this.privRequestSession.isRecognizing){const a=await this.fetchConnection();await this.sendSpeechEvent(a,this.createMeetingSpeechEventPayload(A,r))}}processTypeSpecificMessages(A){return this.processSpeechMessages(A)}handleRecognizedCallback(A,r,a){try{const c=new e.SpeechRecognitionEventArgs(A,r,a);if(this.privTranscriberRecognizer.recognized(this.privTranscriberRecognizer,c),this.privSuccessCallback){try{this.privSuccessCallback(A)}catch(u){this.privErrorCallback&&this.privErrorCallback(u)}this.privSuccessCallback=void 0,this.privErrorCallback=void 0}}catch{}}handleRecognizingCallback(A,r,a){try{const c=new e.SpeechRecognitionEventArgs(A,r,a);this.privTranscriberRecognizer.recognizing(this.privTranscriberRecognizer,c)}catch{}}cancelRecognition(A,r,a,c,u){const l=new e.PropertyCollection;if(l.setProperty(i.CancellationErrorCodePropertyName,e.CancellationErrorCode[c]),this.privTranscriberRecognizer.IsMeetingRecognizer()){if(this.privTranscriberRecognizer.canceled){const g=new e.MeetingTranscriptionCanceledEventArgs(a,u,c,void 0,A);try{this.privTranscriberRecognizer.canceled(this.privTranscriberRecognizer,g)}catch{}}}else if(this.privTranscriberRecognizer.canceled){const g=new e.ConversationTranscriptionCanceledEventArgs(a,u,c,void 0,A);try{this.privTranscriberRecognizer.canceled(this.privTranscriberRecognizer,g)}catch{}}if(this.privSuccessCallback){const g=new e.SpeechRecognitionResult(r,e.ResultReason.Canceled,void 0,void 0,void 0,void 0,void 0,void 0,u,void 0,l);try{this.privSuccessCallback(g),this.privSuccessCallback=void 0}catch{}}}async sendTranscriptionStartJSON(A){if(await this.sendSpeechContext(A,!0),this.privTranscriberRecognizer.IsMeetingRecognizer()){const r=this.privTranscriberRecognizer.getMeetingInfo(),a=this.createMeetingSpeechEventPayload(r,"start");await this.sendSpeechEvent(A,a)}else{const r=this.privTranscriberRecognizer.getConversationInfo(),a=this.createSpeechEventPayload(r,"start");await this.sendSpeechEvent(A,a)}await this.sendWaveHeader(A)}sendSpeechEvent(A,r){const a=JSON.stringify(r);if(a)return A.send(new n.SpeechConnectionMessage(t.MessageType.Text,"speech.event",this.privRequestSession.requestId,"application/json",a))}createSpeechEventPayload(A,r){const a={id:"meeting",name:r,meeting:A.conversationProperties};return a.meeting.id=A.id,a.meeting.attendees=A.participants,a}createMeetingSpeechEventPayload(A,r){const a={id:"meeting",name:r,meeting:A.meetingProperties};return a.meeting.id=A.id,a.meeting.attendees=A.participants,a}};return tA.TranscriptionServiceRecognizer=o,tA}var iA={},iS;function fO(){if(iS)return iA;iS=1,Object.defineProperty(iA,"__esModule",{value:!0}),iA.DetailedSpeechPhrase=void 0;const t=oe();let e=class EM{constructor(n,o){this.privDetailedSpeechPhrase=JSON.parse(n),this.privDetailedSpeechPhrase.RecognitionStatus=this.mapRecognitionStatus(this.privDetailedSpeechPhrase.RecognitionStatus),this.updateOffsets(o)}static fromJSON(n,o){return new EM(n,o)}updateOffsets(n){if(this.privDetailedSpeechPhrase.Offset+=n,this.privDetailedSpeechPhrase.NBest)for(const o of this.privDetailedSpeechPhrase.NBest){if(o.Words)for(const s of o.Words)s.Offset+=n;if(o.DisplayWords)for(const s of o.DisplayWords)s.Offset+=n}}asJson(){const n={...this.privDetailedSpeechPhrase};return JSON.stringify({...n,RecognitionStatus:t.RecognitionStatus[n.RecognitionStatus]})}get RecognitionStatus(){return this.privDetailedSpeechPhrase.RecognitionStatus}get NBest(){return this.privDetailedSpeechPhrase.NBest}get Duration(){return this.privDetailedSpeechPhrase.Duration}get Offset(){return this.privDetailedSpeechPhrase.Offset}get Language(){return this.privDetailedSpeechPhrase.PrimaryLanguage===void 0?void 0:this.privDetailedSpeechPhrase.PrimaryLanguage.Language}get LanguageDetectionConfidence(){return this.privDetailedSpeechPhrase.PrimaryLanguage===void 0?void 0:this.privDetailedSpeechPhrase.PrimaryLanguage.Confidence}get Text(){return this.privDetailedSpeechPhrase.NBest&&this.privDetailedSpeechPhrase.NBest[0]?this.privDetailedSpeechPhrase.NBest[0].Display||this.privDetailedSpeechPhrase.NBest[0].DisplayText:this.privDetailedSpeechPhrase.DisplayText}get SpeakerId(){return this.privDetailedSpeechPhrase.SpeakerId}mapRecognitionStatus(n){if(typeof n=="string")return t.RecognitionStatus[n];if(typeof n=="number")return n}};return iA.DetailedSpeechPhrase=e,iA}var nA={},nS;function wO(){if(nS)return nA;nS=1,Object.defineProperty(nA,"__esModule",{value:!0}),nA.SimpleSpeechPhrase=void 0;const t=oe();let e=class hM{constructor(n,o=0){this.privSimpleSpeechPhrase=JSON.parse(n),this.privSimpleSpeechPhrase.RecognitionStatus=this.mapRecognitionStatus(this.privSimpleSpeechPhrase.RecognitionStatus),this.updateOffset(o)}static fromJSON(n,o){return new hM(n,o)}updateOffset(n){this.privSimpleSpeechPhrase.Offset+=n}asJson(){const n={...this.privSimpleSpeechPhrase};return JSON.stringify({...n,RecognitionStatus:t.RecognitionStatus[n.RecognitionStatus]})}get RecognitionStatus(){return this.privSimpleSpeechPhrase.RecognitionStatus}get DisplayText(){return this.privSimpleSpeechPhrase.DisplayText}get Offset(){return this.privSimpleSpeechPhrase.Offset}get Duration(){return this.privSimpleSpeechPhrase.Duration}get Language(){return this.privSimpleSpeechPhrase.PrimaryLanguage===void 0?void 0:this.privSimpleSpeechPhrase.PrimaryLanguage.Language}get LanguageDetectionConfidence(){return this.privSimpleSpeechPhrase.PrimaryLanguage===void 0?void 0:this.privSimpleSpeechPhrase.PrimaryLanguage.Confidence}get SpeakerId(){return this.privSimpleSpeechPhrase.SpeakerId}mapRecognitionStatus(n){if(typeof n=="string")return t.RecognitionStatus[n];if(typeof n=="number")return n}};return nA.SimpleSpeechPhrase=e,nA}var Rc={};Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.AddedLmIntent=void 0;class mO{constructor(e,i){this.modelImpl=e,this.intentName=i}}Rc.AddedLmIntent=mO;var rA={},rS;function QO(){if(rS)return rA;rS=1,Object.defineProperty(rA,"__esModule",{value:!0}),rA.IntentServiceRecognizer=void 0;const t=Ee(),e=q(),i=oe();let n=class extends i.ServiceRecognizerBase{constructor(s,A,r,a,c){super(s,A,r,a,c),this.privIntentRecognizer=c,this.privIntentDataSent=!1,a.recognitionEndpointVersion="1"}setIntents(s,A){this.privAddedLmIntents=s,this.privUmbrellaIntent=A,this.privIntentDataSent=!0}processTypeSpecificMessages(s){let A,r,a=!1;const c=new e.PropertyCollection;switch(s.messageType===t.MessageType.Text&&c.setProperty(e.PropertyId.SpeechServiceResponse_JsonResult,s.textBody),s.path.toLowerCase()){case"speech.hypothesis":const l=i.SpeechHypothesis.fromJSON(s.textBody,this.privRequestSession.currentTurnAudioOffset);if(A=new e.IntentRecognitionResult(void 0,this.privRequestSession.requestId,e.ResultReason.RecognizingIntent,l.Text,l.Duration,l.Offset,l.Language,l.LanguageDetectionConfidence,void 0,l.asJson(),c),this.privRequestSession.onHypothesis(A.offset),r=new e.IntentRecognitionEventArgs(A,l.Offset,this.privRequestSession.sessionId),this.privIntentRecognizer.recognizing)try{this.privIntentRecognizer.recognizing(this.privIntentRecognizer,r)}catch{}a=!0;break;case"speech.phrase":const g=i.SimpleSpeechPhrase.fromJSON(s.textBody,this.privRequestSession.currentTurnAudioOffset);A=new e.IntentRecognitionResult(void 0,this.privRequestSession.requestId,i.EnumTranslation.implTranslateRecognitionResult(g.RecognitionStatus),g.DisplayText,g.Duration,g.Offset,g.Language,g.LanguageDetectionConfidence,void 0,g.asJson(),c),r=new e.IntentRecognitionEventArgs(A,A.offset,this.privRequestSession.sessionId);const E=()=>{if(this.privIntentRecognizer.recognized)try{this.privIntentRecognizer.recognized(this.privIntentRecognizer,r)}catch{}if(this.privSuccessCallback){try{this.privSuccessCallback(A)}catch(p){this.privErrorCallback&&this.privErrorCallback(p)}this.privSuccessCallback=void 0,this.privErrorCallback=void 0}};this.privIntentDataSent===!1||e.ResultReason.NoMatch===r.result.reason?(this.privRequestSession.onPhraseRecognized(r.offset+r.result.duration),E()):this.privPendingIntentArgs=r,a=!0;break;case"response":if(r=this.privPendingIntentArgs,this.privPendingIntentArgs=void 0,r===void 0){if(s.textBody==="")return;r=new e.IntentRecognitionEventArgs(new e.IntentRecognitionResult,0,this.privRequestSession.sessionId)}const C=i.IntentResponse.fromJSON(s.textBody);if(C!==null&&C.topScoringIntent&&C.topScoringIntent.intent){let p=this.privAddedLmIntents[C.topScoringIntent.intent];if(this.privUmbrellaIntent!==void 0&&(p=this.privUmbrellaIntent),p){const S=p===void 0||p.intentName===void 0?C.topScoringIntent.intent:p.intentName;let I=r.result.reason;S!==void 0&&(I=e.ResultReason.RecognizedIntent);const d=r.result.properties!==void 0?r.result.properties:new e.PropertyCollection;d.setProperty(e.PropertyId.LanguageUnderstandingServiceResponse_JsonResult,s.textBody),r=new e.IntentRecognitionEventArgs(new e.IntentRecognitionResult(S,r.result.resultId,I,r.result.text,r.result.duration,r.result.offset,void 0,void 0,r.result.errorDetails,r.result.json,d),r.offset,r.sessionId)}}if(this.privRequestSession.onPhraseRecognized(r.offset+r.result.duration),this.privIntentRecognizer.recognized)try{this.privIntentRecognizer.recognized(this.privIntentRecognizer,r)}catch{}if(this.privSuccessCallback){try{this.privSuccessCallback(r.result)}catch(p){this.privErrorCallback&&this.privErrorCallback(p)}this.privSuccessCallback=void 0,this.privErrorCallback=void 0}a=!0;break}const u=new t.Deferred;return u.resolve(a),u.promise}cancelRecognition(s,A,r,a,c){const u=new e.PropertyCollection;if(u.setProperty(i.CancellationErrorCodePropertyName,e.CancellationErrorCode[a]),this.privIntentRecognizer.canceled){const l=new e.IntentRecognitionCanceledEventArgs(r,c,a,void 0,void 0,s);try{this.privIntentRecognizer.canceled(this.privIntentRecognizer,l)}catch{}}if(this.privSuccessCallback){const l=new e.IntentRecognitionResult(void 0,A,e.ResultReason.Canceled,void 0,void 0,void 0,void 0,void 0,c,void 0,u);try{this.privSuccessCallback(l),this.privSuccessCallback=void 0}catch{}}}};return rA.IntentServiceRecognizer=n,rA}var Dc={};Object.defineProperty(Dc,"__esModule",{value:!0}),Dc.IntentResponse=void 0;class _l{constructor(e){e===""?this.privIntentResponse={}:this.privIntentResponse=JSON.parse(e)}static fromJSON(e){return new _l(e)}get query(){return this.privIntentResponse.query}get topScoringIntent(){return this.privIntentResponse.topScoringIntent}get entities(){return this.privIntentResponse.entities}}Dc.IntentResponse=_l;var oS={};Object.defineProperty(oS,"__esModule",{value:!0});var yc={},Tc={};Object.defineProperty(Tc,"__esModule",{value:!0}),Tc.ServiceTelemetryListener=void 0;const Gi=Ee(),sS=Mc;class RO{constructor(e,i,n){this.privIsDisposed=!1,this.privListeningTriggerMetric=null,this.privMicMetric=null,this.privConnectionEstablishMetric=null,this.privRequestId=e,this.privAudioSourceId=i,this.privAudioNodeId=n,this.privReceivedMessages={},this.privPhraseLatencies=[],this.privHypothesisLatencies=[]}phraseReceived(e){e>0&&this.privPhraseLatencies.push(Date.now()-e)}hypothesisReceived(e){e>0&&this.privHypothesisLatencies.push(Date.now()-e)}onEvent(e){if(!this.privIsDisposed&&(e instanceof sS.RecognitionTriggeredEvent&&e.requestId===this.privRequestId&&(this.privListeningTriggerMetric={End:e.eventTime,Name:"ListeningTrigger",Start:e.eventTime}),e instanceof Gi.AudioStreamNodeAttachingEvent&&e.audioSourceId===this.privAudioSourceId&&e.audioNodeId===this.privAudioNodeId&&(this.privMicStartTime=e.eventTime),e instanceof Gi.AudioStreamNodeAttachedEvent&&e.audioSourceId===this.privAudioSourceId&&e.audioNodeId===this.privAudioNodeId&&(this.privMicStartTime=e.eventTime),e instanceof Gi.AudioSourceErrorEvent&&e.audioSourceId===this.privAudioSourceId&&(this.privMicMetric||(this.privMicMetric={End:e.eventTime,Error:e.error,Name:"Microphone",Start:this.privMicStartTime})),e instanceof Gi.AudioStreamNodeErrorEvent&&e.audioSourceId===this.privAudioSourceId&&e.audioNodeId===this.privAudioNodeId&&(this.privMicMetric||(this.privMicMetric={End:e.eventTime,Error:e.error,Name:"Microphone",Start:this.privMicStartTime})),e instanceof Gi.AudioStreamNodeDetachedEvent&&e.audioSourceId===this.privAudioSourceId&&e.audioNodeId===this.privAudioNodeId&&(this.privMicMetric||(this.privMicMetric={End:e.eventTime,Name:"Microphone",Start:this.privMicStartTime})),e instanceof sS.ConnectingToServiceEvent&&e.requestId===this.privRequestId&&(this.privConnectionId=e.sessionId),e instanceof Gi.ConnectionStartEvent&&e.connectionId===this.privConnectionId&&(this.privConnectionStartTime=e.eventTime),e instanceof Gi.ConnectionEstablishedEvent&&e.connectionId===this.privConnectionId&&(this.privConnectionEstablishMetric||(this.privConnectionEstablishMetric={End:e.eventTime,Id:this.privConnectionId,Name:"Connection",Start:this.privConnectionStartTime})),e instanceof Gi.ConnectionEstablishErrorEvent&&e.connectionId===this.privConnectionId&&(this.privConnectionEstablishMetric||(this.privConnectionEstablishMetric={End:e.eventTime,Error:this.getConnectionError(e.statusCode),Id:this.privConnectionId,Name:"Connection",Start:this.privConnectionStartTime})),e instanceof Gi.ConnectionMessageReceivedEvent&&e.connectionId===this.privConnectionId&&e.message&&e.message.headers&&e.message.headers.path)){this.privReceivedMessages[e.message.headers.path]||(this.privReceivedMessages[e.message.headers.path]=new Array);const i=50;this.privReceivedMessages[e.message.headers.path].length<i&&this.privReceivedMessages[e.message.headers.path].push(e.networkReceivedTime)}}getTelemetry(){const e=new Array;this.privListeningTriggerMetric&&e.push(this.privListeningTriggerMetric),this.privMicMetric&&e.push(this.privMicMetric),this.privConnectionEstablishMetric&&e.push(this.privConnectionEstablishMetric),this.privPhraseLatencies.length>0&&e.push({PhraseLatencyMs:this.privPhraseLatencies}),this.privHypothesisLatencies.length>0&&e.push({FirstHypothesisLatencyMs:this.privHypothesisLatencies});const i={Metrics:e,ReceivedMessages:this.privReceivedMessages},n=JSON.stringify(i);return this.privReceivedMessages={},this.privListeningTriggerMetric=null,this.privMicMetric=null,this.privConnectionEstablishMetric=null,this.privPhraseLatencies=[],this.privHypothesisLatencies=[],n}get hasTelemetry(){return Object.keys(this.privReceivedMessages).length!==0||this.privListeningTriggerMetric!==null||this.privMicMetric!==null||this.privConnectionEstablishMetric!==null||this.privPhraseLatencies.length!==0||this.privHypothesisLatencies.length!==0}dispose(){this.privIsDisposed=!0}getConnectionError(e){switch(e){case 400:case 1002:case 1003:case 1005:case 1007:case 1008:case 1009:return"BadRequest";case 401:return"Unauthorized";case 403:return"Forbidden";case 503:case 1001:return"ServerUnavailable";case 500:case 1011:return"ServerError";case 408:case 504:return"Timeout";default:return"statuscode:"+e.toString()}}}Tc.ServiceTelemetryListener=RO,Object.defineProperty(yc,"__esModule",{value:!0}),yc.RequestSession=void 0;const Tr=Ee(),Lc=Mc,DO=Tc;class yO{constructor(e){this.privIsDisposed=!1,this.privDetachables=new Array,this.privIsAudioNodeDetached=!1,this.privIsRecognizing=!1,this.privIsSpeechEnded=!1,this.privTurnStartAudioOffset=0,this.privLastRecoOffset=0,this.privHypothesisReceived=!1,this.privBytesSent=0,this.privRecognitionBytesSent=0,this.privRecogNumber=0,this.privInTurn=!1,this.privConnectionAttempts=0,this.privAudioSourceId=e,this.privRequestId=(0,Tr.createNoDashGuid)(),this.privAudioNodeId=(0,Tr.createNoDashGuid)(),this.privTurnDeferral=new Tr.Deferred,this.privTurnDeferral.resolve()}get sessionId(){return this.privSessionId}get requestId(){return this.privRequestId}get audioNodeId(){return this.privAudioNodeId}get turnCompletionPromise(){return this.privTurnDeferral.promise}get isSpeechEnded(){return this.privIsSpeechEnded}get isRecognizing(){return this.privIsRecognizing}get currentTurnAudioOffset(){return this.privTurnStartAudioOffset}get recogNumber(){return this.privRecogNumber}get numConnectionAttempts(){return this.privConnectionAttempts}get bytesSent(){return this.privBytesSent}get recognitionBytesSent(){return this.privRecognitionBytesSent}listenForServiceTelemetry(e){this.privServiceTelemetryListener&&this.privDetachables.push(e.attachListener(this.privServiceTelemetryListener))}startNewRecognition(){this.privRecognitionBytesSent=0,this.privIsSpeechEnded=!1,this.privIsRecognizing=!0,this.privTurnStartAudioOffset=0,this.privLastRecoOffset=0,this.privRecogNumber++,this.privServiceTelemetryListener=new DO.ServiceTelemetryListener(this.privRequestId,this.privAudioSourceId,this.privAudioNodeId),this.onEvent(new Lc.RecognitionTriggeredEvent(this.requestId,this.privSessionId,this.privAudioSourceId,this.privAudioNodeId))}async onAudioSourceAttachCompleted(e,i){this.privAudioNode=e,this.privIsAudioNodeDetached=!1,i?await this.onComplete():this.onEvent(new Lc.ListeningStartedEvent(this.privRequestId,this.privSessionId,this.privAudioSourceId,this.privAudioNodeId))}onPreConnectionStart(e,i){this.privAuthFetchEventId=e,this.privSessionId=i,this.onEvent(new Lc.ConnectingToServiceEvent(this.privRequestId,this.privAuthFetchEventId,this.privSessionId))}async onAuthCompleted(e){e&&await this.onComplete()}async onConnectionEstablishCompleted(e,i){if(e===200){this.onEvent(new Lc.RecognitionStartedEvent(this.requestId,this.privAudioSourceId,this.privAudioNodeId,this.privAuthFetchEventId,this.privSessionId)),this.privAudioNode&&this.privAudioNode.replay(),this.privTurnStartAudioOffset=this.privLastRecoOffset,this.privBytesSent=0;return}else e===403&&await this.onComplete()}async onServiceTurnEndResponse(e){this.privTurnDeferral.resolve(),!e||this.isSpeechEnded?(await this.onComplete(),this.privInTurn=!1):(this.privTurnStartAudioOffset=this.privLastRecoOffset,this.privAudioNode.replay())}onSpeechContext(){this.privRequestId=(0,Tr.createNoDashGuid)()}onServiceTurnStartResponse(){this.privTurnDeferral&&this.privInTurn&&(this.privTurnDeferral.reject("Another turn started before current completed."),this.privTurnDeferral.promise.then().catch(()=>{})),this.privInTurn=!0,this.privTurnDeferral=new Tr.Deferred}onHypothesis(e){this.privHypothesisReceived||(this.privHypothesisReceived=!0,this.privServiceTelemetryListener.hypothesisReceived(this.privAudioNode.findTimeAtOffset(e)))}onPhraseRecognized(e){this.privServiceTelemetryListener.phraseReceived(this.privAudioNode.findTimeAtOffset(e)),this.onServiceRecognized(e)}onServiceRecognized(e){this.privLastRecoOffset=e,this.privHypothesisReceived=!1,this.privAudioNode.shrinkBuffers(e),this.privConnectionAttempts=0}onAudioSent(e){this.privBytesSent+=e,this.privRecognitionBytesSent+=e}onRetryConnection(){this.privConnectionAttempts++}async dispose(){if(!this.privIsDisposed){this.privIsDisposed=!0;for(const e of this.privDetachables)await e.detach();this.privServiceTelemetryListener&&this.privServiceTelemetryListener.dispose(),this.privIsRecognizing=!1}}getTelemetry(){return this.privServiceTelemetryListener.hasTelemetry?this.privServiceTelemetryListener.getTelemetry():null}async onStopRecognizing(){await this.onComplete()}onSpeechEnded(){this.privIsSpeechEnded=!0}onEvent(e){this.privServiceTelemetryListener&&this.privServiceTelemetryListener.onEvent(e),Tr.Events.instance.onEvent(e)}async onComplete(){this.privIsRecognizing&&(this.privIsRecognizing=!1,await this.detachAudioNode())}async detachAudioNode(){this.privIsAudioNodeDetached||(this.privIsAudioNodeDetached=!0,this.privAudioNode&&await this.privAudioNode.detach())}}yc.RequestSession=yO;var Oc={},AS={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TentativePhraseResultsOption=t.OutputFormat=t.PhraseExtension=t.PhraseOption=void 0,function(e){e.WordTimings="WordTimings",e.SNR="SNR",e.Pronunciation="Pronunciation",e.WordPronunciation="WordPronunciation",e.WordConfidence="WordConfidence",e.Words="Words",e.Sentiment="Sentiment",e.PronunciationAssessment="PronunciationAssessment",e.ContentAssessment="ContentAssessment",e.PhraseAMScore="PhraseAMScore",e.PhraseLMScore="PhraseLMScore",e.WordAMScore="WordAMScore",e.WordLMScore="WordLMScore",e.RuleTree="RuleTree",e.NBestTimings="NBestTimings",e.DecoderDiagnostics="DecoderDiagnostics",e.DisplayWordTimings="DisplayWordTimings",e.DisplayWords="DisplayWords"}(t.PhraseOption||(t.PhraseOption={})),function(e){e.Graph="Graph",e.Corrections="Corrections",e.Sentiment="Sentiment"}(t.PhraseExtension||(t.PhraseExtension={})),function(e){e.Simple="Simple",e.Detailed="Detailed"}(t.OutputFormat||(t.OutputFormat={})),function(e){e.None="None",e.Always="Always"}(t.TentativePhraseResultsOption||(t.TentativePhraseResultsOption={}))})(AS),Object.defineProperty(Oc,"__esModule",{value:!0}),Oc.SpeechContext=void 0;const TO=Ht,hn=AS;class LO{constructor(e){this.privContext={},this.privDynamicGrammar=e}getContext(){return this.privContext}setPronunciationAssessmentParams(e,i,n=!1){this.privContext.phraseDetection===void 0&&(this.privContext.phraseDetection={enrichment:{pronunciationAssessment:{}}}),this.privContext.phraseDetection.enrichment===void 0&&(this.privContext.phraseDetection.enrichment={pronunciationAssessment:{}}),this.privContext.phraseDetection.enrichment.pronunciationAssessment=JSON.parse(e)||{},n&&(this.privContext.phraseDetection.mode=TO.RecognitionMode.Conversation),this.setWordLevelTimings(),this.privContext.phraseOutput.detailed.options.push(hn.PhraseOption.PronunciationAssessment),this.privContext.phraseOutput.detailed.options.indexOf(hn.PhraseOption.SNR)===-1&&this.privContext.phraseOutput.detailed.options.push(hn.PhraseOption.SNR),i&&(this.privContext.phraseDetection.enrichment.contentAssessment={topic:i},this.privContext.phraseOutput.detailed.options.push(hn.PhraseOption.ContentAssessment))}setDetailedOutputFormat(){this.privContext.phraseOutput===void 0&&(this.privContext.phraseOutput={detailed:{options:[]}}),this.privContext.phraseOutput.detailed===void 0&&(this.privContext.phraseOutput.detailed={options:[]}),this.privContext.phraseOutput.format=hn.OutputFormat.Detailed}setWordLevelTimings(){this.privContext.phraseOutput===void 0&&(this.privContext.phraseOutput={detailed:{options:[]}}),this.privContext.phraseOutput.detailed===void 0&&(this.privContext.phraseOutput.detailed={options:[]}),this.privContext.phraseOutput.format=hn.OutputFormat.Detailed,this.privContext.phraseOutput.detailed.options.indexOf(hn.PhraseOption.WordTimings)===-1&&this.privContext.phraseOutput.detailed.options.push(hn.PhraseOption.WordTimings)}setSpeakerDiarizationAudioOffsetMs(e){this.privContext.phraseDetection.speakerDiarization.audioOffsetMs=e}toJSON(){const e=this.privDynamicGrammar.generateGrammarObject();return this.privContext.dgi=e,JSON.stringify(this.privContext)}}Oc.SpeechContext=LO;var Uc={},aS={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SubstringMatchType=t.GroupType=void 0,function(e){e.IntentText="IntentText",e.IntentEntity="IntentEntity",e.Generic="Generic",e.People="People",e.Place="Place",e.DynamicEntity="DynamicEntity"}(t.GroupType||(t.GroupType={})),function(e){e.None="None",e.LeftRooted="LeftRooted",e.PartialName="PartialName",e.MiddleOfSentence="MiddleOfSentence"}(t.SubstringMatchType||(t.SubstringMatchType={}))})(aS),Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.DynamicGrammarBuilder=void 0;const OO=aS;class UO{addPhrase(e){this.privPhrases||(this.privPhrases=[]),e instanceof Array?this.privPhrases=this.privPhrases.concat(e):this.privPhrases.push(e)}clearPhrases(){this.privPhrases=void 0}addReferenceGrammar(e){this.privGrammars||(this.privGrammars=[]),e instanceof Array?this.privGrammars=this.privGrammars.concat(e):this.privGrammars.push(e)}clearGrammars(){this.privGrammars=void 0}generateGrammarObject(){if(this.privGrammars===void 0&&this.privPhrases===void 0)return;const e={};if(e.referenceGrammars=this.privGrammars,this.privPhrases!==void 0&&this.privPhrases.length!==0){const i=[];this.privPhrases.forEach(n=>{i.push({text:n})}),e.groups=[{type:OO.GroupType.Generic,items:i}]}return e}}Uc.DynamicGrammarBuilder=UO;var oA={},Nc={},Kc={},$l={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.MessageDataStreamType=t.ActivityPayloadResponse=void 0;class e{constructor(n){this.privActivityResponse=JSON.parse(n)}static fromJSON(n){return new e(n)}get conversationId(){return this.privActivityResponse.conversationId}get messageDataStreamType(){return this.privActivityResponse.messageDataStreamType}get messagePayload(){return this.privActivityResponse.messagePayload}get version(){return this.privActivityResponse.version}}t.ActivityPayloadResponse=e,function(i){i[i.None=0]="None",i[i.TextToSpeechAudio=1]="TextToSpeechAudio"}(t.MessageDataStreamType||(t.MessageDataStreamType={}))})($l),Object.defineProperty(Kc,"__esModule",{value:!0}),Kc.DialogServiceTurnState=void 0;const NO=gn,KO=ft,FO=$l;class GO{constructor(e,i){this.privRequestId=i,this.privIsCompleted=!1,this.privAudioStream=null,this.privTurnManager=e,this.resetTurnEndTimeout()}get audioStream(){return this.resetTurnEndTimeout(),this.privAudioStream}processActivityPayload(e,i){return e.messageDataStreamType===FO.MessageDataStreamType.TextToSpeechAudio&&(this.privAudioStream=KO.AudioOutputStream.createPullStream(),this.privAudioStream.format=i!==void 0?i:NO.AudioOutputFormatImpl.getDefaultOutputFormat()),this.privAudioStream}endAudioStream(){this.privAudioStream!==null&&!this.privAudioStream.isClosed&&this.privAudioStream.close()}complete(){this.privTimeoutToken!==void 0&&clearTimeout(this.privTimeoutToken),this.endAudioStream()}resetTurnEndTimeout(){this.privTimeoutToken!==void 0&&clearTimeout(this.privTimeoutToken),this.privTimeoutToken=setTimeout(()=>{this.privTurnManager.CompleteTurn(this.privRequestId)},2e3)}}Kc.DialogServiceTurnState=GO,Object.defineProperty(Nc,"__esModule",{value:!0}),Nc.DialogServiceTurnStateManager=void 0;const cS=Mt,xO=Kc;class jO{constructor(){this.privTurnMap=new Map}StartTurn(e){if(this.privTurnMap.has(e))throw new cS.InvalidOperationError("Service error: There is already a turn with id:"+e);const i=new xO.DialogServiceTurnState(this,e);return this.privTurnMap.set(e,i),this.privTurnMap.get(e)}GetTurn(e){return this.privTurnMap.get(e)}CompleteTurn(e){if(!this.privTurnMap.has(e))throw new cS.InvalidOperationError("Service error: Received turn end for an unknown turn id:"+e);const i=this.privTurnMap.get(e);return i.complete(),this.privTurnMap.delete(e),i}}Nc.DialogServiceTurnStateManager=jO;var uS={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InvocationSource=void 0,function(e){e.None="None",e.VoiceActivationWithKeyword="VoiceActivationWithKeyword"}(t.InvocationSource||(t.InvocationSource={}))})(uS);var lS={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.OnRejectAction=t.KeywordDetectionType=void 0,function(e){e.StartTrigger="StartTrigger"}(t.KeywordDetectionType||(t.KeywordDetectionType={})),function(e){e.EndOfTurn="EndOfTurn",e.Continue="Continue"}(t.OnRejectAction||(t.OnRejectAction={}))})(lS);var gS;function kO(){if(gS)return oA;gS=1,Object.defineProperty(oA,"__esModule",{value:!0}),oA.DialogServiceAdapter=void 0;const t=Ct(),e=Tn,i=Ee(),n=gn,o=q(),s=Nc,A=oe(),r=$l,a=uS,c=lS,u=Ki;let l=class extends A.ServiceRecognizerBase{constructor(E,C,p,S,I){super(E,C,p,S,I),this.privEvents=new i.EventSource,this.privDialogServiceConnector=I,this.receiveMessageOverride=()=>this.receiveDialogMessageOverride(),this.privTurnStateManager=new s.DialogServiceTurnStateManager,this.recognizeOverride=(d,M,B)=>this.listenOnce(d,M,B),this.postConnectImplOverride=d=>this.dialogConnectImpl(d),this.configConnectionOverride=d=>this.configConnection(d),this.disconnectOverride=()=>this.privDisconnect(),this.privDialogAudioSource=p,this.agentConfigSent=!1,this.privLastResult=null,this.connectionEvents.attach(d=>{d.name==="ConnectionClosedEvent"&&(this.terminateMessageLoop=!0)})}async sendMessage(E){const C=(0,i.createGuid)(),p=(0,i.createNoDashGuid)(),S={context:{interactionId:C},messagePayload:JSON.parse(E),version:.5},I=JSON.stringify(S);await(await this.fetchConnection()).send(new u.SpeechConnectionMessage(i.MessageType.Text,"agent",p,"application/json",I))}async privDisconnect(){await this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,o.CancellationReason.Error,o.CancellationErrorCode.NoError,"Disconnecting"),this.terminateMessageLoop=!0,this.agentConfigSent=!1}processTypeSpecificMessages(E){const C=new o.PropertyCollection;E.messageType===i.MessageType.Text&&C.setProperty(o.PropertyId.SpeechServiceResponse_JsonResult,E.textBody);let p,S;switch(E.path.toLowerCase()){case"speech.phrase":const d=A.SimpleSpeechPhrase.fromJSON(E.textBody,this.privRequestSession.currentTurnAudioOffset);if(this.privRequestSession.onPhraseRecognized(d.Offset+d.Duration),d.RecognitionStatus!==A.RecognitionStatus.TooManyRequests&&d.RecognitionStatus!==A.RecognitionStatus.Error){const U=this.fireEventForResult(d,C);if(this.privLastResult=U.result,this.privDialogServiceConnector.recognized)try{this.privDialogServiceConnector.recognized(this.privDialogServiceConnector,U)}catch{}}S=!0;break;case"speech.hypothesis":const M=A.SpeechHypothesis.fromJSON(E.textBody,this.privRequestSession.currentTurnAudioOffset);p=new o.SpeechRecognitionResult(this.privRequestSession.requestId,o.ResultReason.RecognizingSpeech,M.Text,M.Duration,M.Offset,M.Language,M.LanguageDetectionConfidence,void 0,void 0,M.asJson(),C),this.privRequestSession.onHypothesis(M.Offset);const B=new o.SpeechRecognitionEventArgs(p,M.Offset,this.privRequestSession.sessionId);if(this.privDialogServiceConnector.recognizing)try{this.privDialogServiceConnector.recognizing(this.privDialogServiceConnector,B)}catch{}S=!0;break;case"speech.keyword":const D=A.SpeechKeyword.fromJSON(E.textBody,this.privRequestSession.currentTurnAudioOffset);p=new o.SpeechRecognitionResult(this.privRequestSession.requestId,D.Status==="Accepted"?o.ResultReason.RecognizedKeyword:o.ResultReason.NoMatch,D.Text,D.Duration,D.Offset,void 0,void 0,void 0,void 0,D.asJson(),C),D.Status!=="Accepted"&&(this.privLastResult=p);const L=new o.SpeechRecognitionEventArgs(p,p.duration,p.resultId);if(this.privDialogServiceConnector.recognized)try{this.privDialogServiceConnector.recognized(this.privDialogServiceConnector,L)}catch{}S=!0;break;case"audio":{const U=E.requestId.toUpperCase(),Q=this.privTurnStateManager.GetTurn(U);try{E.binaryBody?Q.audioStream.write(E.binaryBody):Q.endAudioStream()}catch{}}S=!0;break;case"response":this.handleResponseMessage(E),S=!0;break}const I=new i.Deferred;return I.resolve(S),I.promise}async cancelRecognition(E,C,p,S,I){if(this.terminateMessageLoop=!0,this.privRequestSession.isRecognizing&&await this.privRequestSession.onStopRecognizing(),this.privDialogServiceConnector.canceled){const d=new o.PropertyCollection;d.setProperty(A.CancellationErrorCodePropertyName,o.CancellationErrorCode[S]);const M=new o.SpeechRecognitionCanceledEventArgs(p,I,S,void 0,E);try{this.privDialogServiceConnector.canceled(this.privDialogServiceConnector,M)}catch{}if(this.privSuccessCallback){const B=new o.SpeechRecognitionResult(void 0,o.ResultReason.Canceled,void 0,void 0,void 0,void 0,void 0,void 0,I,void 0,d);try{this.privSuccessCallback(B),this.privSuccessCallback=void 0}catch{}}}}async listenOnce(E,C,p){this.privRecognizerConfig.recognitionMode=E,this.privSuccessCallback=C,this.privErrorCallback=p,this.privRequestSession.startNewRecognition(),this.privRequestSession.listenForServiceTelemetry(this.privDialogAudioSource.events),this.privRecognizerConfig.parameters.setProperty(o.PropertyId.Speech_SessionId,this.privRequestSession.sessionId);const S=this.connectImpl(),I=this.sendPreAudioMessages(),d=await this.privDialogAudioSource.attach(this.privRequestSession.audioNodeId),M=await this.privDialogAudioSource.format,B=await this.privDialogAudioSource.deviceInfo,D=new t.ReplayableAudioNode(d,M.avgBytesPerSec);await this.privRequestSession.onAudioSourceAttachCompleted(D,!1),this.privRecognizerConfig.SpeechServiceConfig.Context.audio={source:B};try{await S,await I}catch(Q){return await this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,o.CancellationReason.Error,o.CancellationErrorCode.ConnectionFailure,Q),Promise.resolve()}const L=new o.SessionEventArgs(this.privRequestSession.sessionId);this.privRecognizer.sessionStarted&&this.privRecognizer.sessionStarted(this.privRecognizer,L),this.sendAudio(D).then(()=>{},async Q=>{await this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,o.CancellationReason.Error,o.CancellationErrorCode.RuntimeError,Q)})}dialogConnectImpl(E){return this.privConnectionLoop=this.startMessageLoop(),E}receiveDialogMessageOverride(){const E=new i.Deferred,C=async()=>{try{const p=this.isDisposed(),S=!this.isDisposed()&&this.terminateMessageLoop;if(p||S){E.resolve(void 0);return}const d=await(await this.fetchConnection()).read();if(!d)return C();const M=u.SpeechConnectionMessage.fromConnectionMessage(d);switch(M.path.toLowerCase()){case"turn.start":{const z=M.requestId.toUpperCase(),K=this.privRequestSession.requestId.toUpperCase();z!==K?this.privTurnStateManager.StartTurn(z):this.privRequestSession.onServiceTurnStartResponse()}break;case"speech.startdetected":const D=A.SpeechDetected.fromJSON(M.textBody,this.privRequestSession.currentTurnAudioOffset),L=new o.RecognitionEventArgs(D.Offset,this.privRequestSession.sessionId);this.privRecognizer.speechStartDetected&&this.privRecognizer.speechStartDetected(this.privRecognizer,L);break;case"speech.enddetected":let U;M.textBody.length>0?U=M.textBody:U="{ Offset: 0 }";const Q=A.SpeechDetected.fromJSON(U,this.privRequestSession.currentTurnAudioOffset);this.privRequestSession.onServiceRecognized(Q.Offset);const j=new o.RecognitionEventArgs(Q.Offset,this.privRequestSession.sessionId);this.privRecognizer.speechEndDetected&&this.privRecognizer.speechEndDetected(this.privRecognizer,j);break;case"turn.end":{const z=M.requestId.toUpperCase(),K=this.privRequestSession.requestId.toUpperCase();if(z!==K)this.privTurnStateManager.CompleteTurn(z);else{const N=new o.SessionEventArgs(this.privRequestSession.sessionId);if(await this.privRequestSession.onServiceTurnEndResponse(!1),(!this.privRecognizerConfig.isContinuousRecognition||this.privRequestSession.isSpeechEnded||!this.privRequestSession.isRecognizing)&&this.privRecognizer.sessionStopped&&this.privRecognizer.sessionStopped(this.privRecognizer,N),this.privSuccessCallback&&this.privLastResult){try{this.privSuccessCallback(this.privLastResult),this.privLastResult=null}catch(X){this.privErrorCallback&&this.privErrorCallback(X)}this.privSuccessCallback=void 0,this.privErrorCallback=void 0}}}break;default:try{await this.processTypeSpecificMessages(M)||this.serviceEvents&&this.serviceEvents.onEvent(new i.ServiceEvent(M.path.toLowerCase(),M.textBody))}catch{}}return C()}catch{this.terminateMessageLoop=!0,E.resolve()}};return C().catch(p=>{i.Events.instance.onEvent(new i.BackgroundEvent(p))}),E.promise}async startMessageLoop(){this.terminateMessageLoop=!1;try{await this.receiveDialogMessageOverride()}catch(E){await this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,o.CancellationReason.Error,o.CancellationErrorCode.RuntimeError,E)}return Promise.resolve()}async configConnection(E){return this.terminateMessageLoop?(this.terminateMessageLoop=!1,Promise.reject("Connection to service terminated.")):(await this.sendSpeechServiceConfig(E,this.privRequestSession,this.privRecognizerConfig.SpeechServiceConfig.serialize()),await this.sendAgentConfig(E),E)}async sendPreAudioMessages(){const E=await this.fetchConnection();this.addKeywordContextData(),await this.sendSpeechContext(E,!0),await this.sendAgentContext(E),await this.sendWaveHeader(E)}sendAgentConfig(E){if(this.agentConfig&&!this.agentConfigSent){if(this.privRecognizerConfig.parameters.getProperty(o.PropertyId.Conversation_DialogType)===o.DialogServiceConfig.DialogTypes.CustomCommands){const p=this.agentConfig.get();p.botInfo.commandsCulture=this.privRecognizerConfig.parameters.getProperty(o.PropertyId.SpeechServiceConnection_RecoLanguage,"en-us"),this.agentConfig.set(p)}this.onEvent(new e.SendingAgentContextMessageEvent(this.agentConfig));const C=this.agentConfig.toJsonString();return this.agentConfigSent=!0,E.send(new u.SpeechConnectionMessage(i.MessageType.Text,"agent.config",this.privRequestSession.requestId,"application/json",C))}}sendAgentContext(E){const C=(0,i.createGuid)(),p=this.privDialogServiceConnector.properties.getProperty(o.PropertyId.Conversation_Speech_Activity_Template),I=JSON.stringify({channelData:"",context:{interactionId:C},messagePayload:typeof p===void 0?void 0:p,version:.5});return E.send(new u.SpeechConnectionMessage(i.MessageType.Text,"speech.agent.context",this.privRequestSession.requestId,"application/json",I))}fireEventForResult(E,C){const p=A.EnumTranslation.implTranslateRecognitionResult(E.RecognitionStatus),S=new o.SpeechRecognitionResult(this.privRequestSession.requestId,p,E.DisplayText,E.Duration,E.Offset,E.Language,E.LanguageDetectionConfidence,void 0,void 0,E.asJson(),C);return new o.SpeechRecognitionEventArgs(S,E.Offset,this.privRequestSession.sessionId)}handleResponseMessage(E){const C=JSON.parse(E.textBody);switch(C.messageType.toLowerCase()){case"message":const p=E.requestId.toUpperCase(),S=r.ActivityPayloadResponse.fromJSON(E.textBody),I=this.privTurnStateManager.GetTurn(p);if(S.conversationId){const B=this.agentConfig.get();B.botInfo.conversationId=S.conversationId,this.agentConfig.set(B)}const d=I.processActivityPayload(S,n.AudioOutputFormatImpl.fromSpeechSynthesisOutputFormatString(this.privDialogServiceConnector.properties.getProperty(o.PropertyId.SpeechServiceConnection_SynthOutputFormat,void 0))),M=new o.ActivityReceivedEventArgs(S.messagePayload,d);if(this.privDialogServiceConnector.activityReceived)try{this.privDialogServiceConnector.activityReceived(this.privDialogServiceConnector,M)}catch{}break;case"messagestatus":if(this.privDialogServiceConnector.turnStatusReceived)try{this.privDialogServiceConnector.turnStatusReceived(this.privDialogServiceConnector,new o.TurnStatusReceivedEventArgs(E.textBody))}catch{}break;default:i.Events.instance.onEvent(new i.BackgroundEvent(`Unexpected response of type ${C.messageType}. Ignoring.`));break}}onEvent(E){this.privEvents.onEvent(E),i.Events.instance.onEvent(E)}addKeywordContextData(){const E=this.privRecognizerConfig.parameters.getProperty("SPEECH-KeywordsToDetect");if(E===void 0)return;const C=this.privRecognizerConfig.parameters.getProperty("SPEECH-KeywordsToDetect-Offsets"),p=this.privRecognizerConfig.parameters.getProperty("SPEECH-KeywordsToDetect-Durations"),S=E.split(";"),I=C===void 0?[]:C.split(";"),d=p===void 0?[]:p.split(";"),M=[];for(let B=0;B<S.length;B++){const D={text:S[B]};B<I.length&&(D.startOffset=Number(I[B])),B<d.length&&(D.duration=Number(d[B])),M.push(D)}this.speechContext.getContext().invocationSource=a.InvocationSource.VoiceActivationWithKeyword,this.speechContext.getContext().keywordDetection=[{clientDetectedKeywords:M,onReject:{action:c.OnRejectAction.EndOfTurn},type:c.KeywordDetectionType.StartTrigger}]}};return oA.DialogServiceAdapter=l,oA}var Fc={};Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.AgentConfig=void 0;class YO{toJsonString(){return JSON.stringify(this.iPrivConfig)}get(){return this.iPrivConfig}set(e){this.iPrivConfig=e}}Fc.AgentConfig=YO;var eg={},sA={},Lr={};Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.ConversationConnectionConfig=void 0;const zO=zs;class Ut extends zO.RestConfigBase{static get host(){return Ut.privHost}static get apiVersion(){return Ut.privApiVersion}static get clientAppId(){return Ut.privClientAppId}static get defaultLanguageCode(){return Ut.privDefaultLanguageCode}static get restPath(){return Ut.privRestPath}static get webSocketPath(){return Ut.privWebSocketPath}static get transcriptionEventKeys(){return Ut.privTranscriptionEventKeys}}Lr.ConversationConnectionConfig=Ut,Ut.privHost="dev.microsofttranslator.com",Ut.privRestPath="/capito/room",Ut.privApiVersion="2.0",Ut.privDefaultLanguageCode="en-US",Ut.privClientAppId="FC539C22-1767-4F1F-84BC-B4D811114F15",Ut.privWebSocketPath="/capito/translate",Ut.privTranscriptionEventKeys=["iCalUid","callId","organizer","FLAC","MTUri","DifferentiateGuestSpeakers","audiorecording","Threadid","OrganizerMri","OrganizerTenantId","UserToken"];var ES;function PO(){if(ES)return sA;ES=1,Object.defineProperty(sA,"__esModule",{value:!0}),sA.ConversationManager=void 0;const t=Ct(),e=Se,i=q(),n=Lr;let o=class{constructor(){this.privRequestParams=n.ConversationConnectionConfig.configParams,this.privErrors=n.ConversationConnectionConfig.restErrors,this.privHost=n.ConversationConnectionConfig.host,this.privApiVersion=n.ConversationConnectionConfig.apiVersion,this.privRestPath=n.ConversationConnectionConfig.restPath,this.privRestAdapter=new t.RestMessageAdapter({})}createOrJoin(A,r,a,c){try{e.Contracts.throwIfNullOrUndefined(A,"args");const u=A.getProperty(i.PropertyId.SpeechServiceConnection_RecoLanguage,n.ConversationConnectionConfig.defaultLanguageCode),l=A.getProperty(i.PropertyId.ConversationTranslator_Name,"conversation_host"),g=A.getProperty(i.PropertyId.ConversationTranslator_Host,this.privHost),E=A.getProperty(i.PropertyId.ConversationTranslator_CorrelationId),C=A.getProperty(i.PropertyId.SpeechServiceConnection_Key),p=A.getProperty(i.PropertyId.SpeechServiceConnection_Region),S=A.getProperty(i.PropertyId.SpeechServiceAuthorization_Token);e.Contracts.throwIfNullOrWhitespace(u,"languageCode"),e.Contracts.throwIfNullOrWhitespace(l,"nickname"),e.Contracts.throwIfNullOrWhitespace(g,"endpointHost");const I={};I[this.privRequestParams.apiVersion]=this.privApiVersion,I[this.privRequestParams.languageCode]=u,I[this.privRequestParams.nickname]=l;const d={};E&&(d[this.privRequestParams.correlationId]=E),d[this.privRequestParams.clientAppId]=n.ConversationConnectionConfig.clientAppId,r!==void 0?I[this.privRequestParams.roomId]=r:(e.Contracts.throwIfNullOrUndefined(p,this.privErrors.authInvalidSubscriptionRegion),d[this.privRequestParams.subscriptionRegion]=p,C?d[this.privRequestParams.subscriptionKey]=C:S?d[this.privRequestParams.authorization]=`Bearer ${S}`:e.Contracts.throwIfNullOrUndefined(C,this.privErrors.authInvalidSubscriptionKey));const M={};M.headers=d,this.privRestAdapter.options=M;const B=`https://${g}${this.privRestPath}`;this.privRestAdapter.request(t.RestRequestType.Post,B,I,null).then(D=>{const L=t.RestMessageAdapter.extractHeaderValue(this.privRequestParams.requestId,D.headers);if(!D.ok){if(c){let Q=this.privErrors.invalidCreateJoinConversationResponse.replace("{status}",D.status.toString()),j;try{j=JSON.parse(D.data),Q+=` [${j.error.code}: ${j.error.message}]`}catch{Q+=` [${D.data}]`}L&&(Q+=` ${L}`),c(Q)}return}const U=JSON.parse(D.data);if(U&&(U.requestId=L),a){try{a(U)}catch(Q){c&&c(Q)}a=void 0}}).catch(()=>{})}catch(u){if(c)if(u instanceof Error){const l=u;c(l.name+": "+l.message)}else c(u)}}leave(A,r){return new Promise((a,c)=>{try{e.Contracts.throwIfNullOrUndefined(A,this.privErrors.invalidArgs.replace("{arg}","config")),e.Contracts.throwIfNullOrWhitespace(r,this.privErrors.invalidArgs.replace("{arg}","token"));const u=A.getProperty(i.PropertyId.ConversationTranslator_Host,this.privHost),l=A.getProperty(i.PropertyId.ConversationTranslator_CorrelationId),g={};g[this.privRequestParams.apiVersion]=this.privApiVersion,g[this.privRequestParams.sessionToken]=r;const E={};l&&(E[this.privRequestParams.correlationId]=l);const C={};C.headers=E,this.privRestAdapter.options=C;const p=`https://${u}${this.privRestPath}`;this.privRestAdapter.request(t.RestRequestType.Delete,p,g,null).then(S=>{S.ok,a()}).catch(()=>{})}catch(u){if(u instanceof Error){const l=u;c(l.name+": "+l.message)}else c(u)}})}};return sA.ConversationManager=o,sA}var Jn={},AA={},Gc={},aA={};Object.defineProperty(aA,"__esModule",{value:!0}),aA.ConversationConnectionMessage=void 0;const bO=Ee();class JO extends bO.ConnectionMessage{constructor(e,i,n,o){super(e,i,n,o);const s=JSON.parse(this.textBody);s.type!==void 0&&(this.privConversationMessageType=s.type)}get conversationMessageType(){return this.privConversationMessageType}}aA.ConversationConnectionMessage=JO,Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.ConversationWebsocketMessageFormatter=void 0;const Hn=Ee(),hS=aA;class HO{toConnectionMessage(e){const i=new Hn.Deferred;try{if(e.messageType===Hn.MessageType.Text){const n=new hS.ConversationConnectionMessage(e.messageType,e.textContent,{},e.id);i.resolve(n)}else e.messageType===Hn.MessageType.Binary&&i.resolve(new hS.ConversationConnectionMessage(e.messageType,e.binaryContent,void 0,e.id))}catch(n){i.reject(`Error formatting the message. Error: ${n}`)}return i.promise}fromConnectionMessage(e){const i=new Hn.Deferred;try{if(e.messageType===Hn.MessageType.Text){const n=`${e.textBody?e.textBody:""}`;i.resolve(new Hn.RawWebsocketMessage(Hn.MessageType.Text,n,e.id))}}catch(n){i.reject(`Error formatting the message. ${n}`)}return i.promise}}Gc.ConversationWebsocketMessageFormatter=HO;var CS;function qO(){if(CS)return AA;CS=1,Object.defineProperty(AA,"__esModule",{value:!0}),AA.ConversationConnectionFactory=void 0;const t=Ct(),e=Ee(),i=Se,n=q(),o=li(),s=Lr,A=Gc;let r=class extends o.ConnectionFactoryBase{create(c,u,l){const g=c.parameters.getProperty(n.PropertyId.ConversationTranslator_Host,s.ConversationConnectionConfig.host),E=c.parameters.getProperty(n.PropertyId.ConversationTranslator_CorrelationId,(0,e.createGuid)()),C=`wss://${g}${s.ConversationConnectionConfig.webSocketPath}`,p=c.parameters.getProperty(n.PropertyId.ConversationTranslator_Token,void 0);i.Contracts.throwIfNullOrUndefined(p,"token");const S={};S[s.ConversationConnectionConfig.configParams.apiVersion]=s.ConversationConnectionConfig.apiVersion,S[s.ConversationConnectionConfig.configParams.token]=p,S[s.ConversationConnectionConfig.configParams.correlationId]=E;const I=c.parameters.getProperty("SPEECH-EnableWebsocketCompression","false")==="true";return Promise.resolve(new t.WebsocketConnection(C,S,{},new A.ConversationWebsocketMessageFormatter,t.ProxyInfo.fromRecognizerConfig(c),I,l))}};return AA.ConversationConnectionFactory=r,AA}var cA={},xc={};Object.defineProperty(xc,"__esModule",{value:!0}),xc.ConversationRequestSession=void 0;const tg=Ee();class VO{constructor(e){this.privIsDisposed=!1,this.privDetachables=new Array,this.privSessionId=e,this.privRequestId=(0,tg.createNoDashGuid)(),this.privRequestCompletionDeferral=new tg.Deferred}get sessionId(){return this.privSessionId}get requestId(){return this.privRequestId}get completionPromise(){return this.privRequestCompletionDeferral.promise}onPreConnectionStart(e,i){this.privSessionId=i}onAuthCompleted(e){e&&this.onComplete()}onConnectionEstablishCompleted(e){e!==200&&e===403&&this.onComplete()}onServiceTurnEndResponse(e){e?this.privRequestId=(0,tg.createNoDashGuid)():this.onComplete()}async dispose(){if(!this.privIsDisposed){this.privIsDisposed=!0;for(const e of this.privDetachables)await e.detach()}}onComplete(){}}xc.ConversationRequestSession=VO;var Kt={},IS;function pS(){if(IS)return Kt;IS=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.ConversationReceivedTranslationEventArgs=Kt.ParticipantsListEventArgs=Kt.ParticipantAttributeEventArgs=Kt.ParticipantEventArgs=Kt.LockRoomEventArgs=Kt.MuteAllEventArgs=void 0;const t=q();class e extends t.SessionEventArgs{constructor(a,c){super(c),this.privIsMuted=a}get isMuted(){return this.privIsMuted}}Kt.MuteAllEventArgs=e;class i extends t.SessionEventArgs{constructor(a,c){super(c),this.privIsLocked=a}get isMuted(){return this.privIsLocked}}Kt.LockRoomEventArgs=i;class n extends t.SessionEventArgs{constructor(a,c){super(c),this.privParticipant=a}get participant(){return this.privParticipant}}Kt.ParticipantEventArgs=n;class o extends t.SessionEventArgs{constructor(a,c,u,l){super(l),this.privKey=c,this.privValue=u,this.privParticipantId=a}get value(){return this.privValue}get key(){return this.privKey}get id(){return this.privParticipantId}}Kt.ParticipantAttributeEventArgs=o;class s extends t.SessionEventArgs{constructor(a,c,u,l,g,E,C,p,S){super(S),this.privRoomId=a,this.privSessionToken=c,this.privTranslateTo=u,this.privProfanityFilter=l,this.privRoomProfanityFilter=g,this.privIsRoomLocked=E,this.privIsRoomLocked=C,this.privParticipants=p}get sessionToken(){return this.privSessionToken}get conversationId(){return this.privRoomId}get translateTo(){return this.privTranslateTo}get profanityFilter(){return this.privProfanityFilter}get roomProfanityFilter(){return this.privRoomProfanityFilter}get isRoomLocked(){return this.privIsRoomLocked}get isMuteAll(){return this.privIsMuteAll}get participants(){return this.privParticipants}}Kt.ParticipantsListEventArgs=s;class A{constructor(a,c,u){this.privPayload=c,this.privCommand=a,this.privSessionId=u}get payload(){return this.privPayload}get command(){return this.privCommand}get sessionId(){return this.privSessionId}}return Kt.ConversationReceivedTranslationEventArgs=A,Kt}var xi={};Object.defineProperty(xi,"__esModule",{value:!0}),xi.ConversationTranslatorCommandTypes=xi.ConversationTranslatorMessageTypes=xi.InternalParticipants=void 0;class WO{constructor(e=[],i){this.participants=e,this.meId=i}addOrUpdateParticipant(e){if(e===void 0)return;const i=this.getParticipantIndex(e.id);return i>-1?this.participants.splice(i,1,e):this.participants.push(e),this.getParticipant(e.id)}getParticipantIndex(e){return this.participants.findIndex(i=>i.id===e)}getParticipant(e){return this.participants.find(i=>i.id===e)}deleteParticipant(e){this.participants=this.participants.filter(i=>i.id!==e)}get host(){return this.participants.find(e=>e.isHost===!0)}get me(){return this.getParticipant(this.meId)}}xi.InternalParticipants=WO,xi.ConversationTranslatorMessageTypes={command:"command",final:"final",info:"info",instantMessage:"instant_message",keepAlive:"keep_alive",partial:"partial",participantCommand:"participant_command",translatedMessage:"translated_message"},xi.ConversationTranslatorCommandTypes={changeNickname:"ChangeNickname",disconnectSession:"DisconnectSession",ejectParticipant:"EjectParticipant",instant_message:"instant_message",joinSession:"JoinSession",leaveSession:"LeaveSession",participantList:"ParticipantList",roomExpirationWarning:"RoomExpirationWarning",setLockState:"SetLockState",setMute:"SetMute",setMuteAll:"SetMuteAll",setProfanityFiltering:"SetProfanityFiltering",setTranslateToLanguages:"SetTranslateToLanguages",setUseTTS:"SetUseTTS"};var dS={},jc={};Object.defineProperty(jc,"__esModule",{value:!0}),jc.CommandResponsePayload=void 0;const ZO=t=>JSON.parse(t);class ig{constructor(e){this.privCommandResponse=ZO(e)}get type(){return this.privCommandResponse.type}get command(){return this.privCommandResponse.command}get id(){return this.privCommandResponse.id}get nickname(){return this.privCommandResponse.nickname}get participantId(){return this.privCommandResponse.participantId}get roomid(){return this.privCommandResponse.roomid}get value(){return this.privCommandResponse.value}get token(){return this.privCommandResponse.token}static fromJSON(e){return new ig(e)}}jc.CommandResponsePayload=ig;var Or={};Object.defineProperty(Or,"__esModule",{value:!0}),Or.ParticipantPayloadResponse=Or.ParticipantsListPayloadResponse=void 0;const XO=t=>JSON.parse(t),_O=t=>JSON.parse(t);class ng{constructor(e){this.privParticipantsPayloadResponse=XO(e)}get roomid(){return this.privParticipantsPayloadResponse.roomid}get id(){return this.privParticipantsPayloadResponse.id}get command(){return this.privParticipantsPayloadResponse.command}get participants(){return this.privParticipantsPayloadResponse.participants}get token(){return this.privParticipantsPayloadResponse.token}get translateTo(){return this.privParticipantsPayloadResponse.translateTo}get profanityFilter(){return this.privParticipantsPayloadResponse.profanityFilter}get roomProfanityFilter(){return this.privParticipantsPayloadResponse.roomProfanityFilter}get roomLocked(){return this.privParticipantsPayloadResponse.roomLocked}get muteAll(){return this.privParticipantsPayloadResponse.muteAll}get type(){return this.privParticipantsPayloadResponse.type}static fromJSON(e){return new ng(e)}}Or.ParticipantsListPayloadResponse=ng;class rg{constructor(e){this.privParticipantPayloadResponse=_O(e)}get nickname(){return this.privParticipantPayloadResponse.nickname}get locale(){return this.privParticipantPayloadResponse.locale}get usetts(){return this.privParticipantPayloadResponse.usetts}get ismuted(){return this.privParticipantPayloadResponse.ismuted}get ishost(){return this.privParticipantPayloadResponse.ishost}get participantId(){return this.privParticipantPayloadResponse.participantId}get avatar(){return this.privParticipantPayloadResponse.avatar}static fromJSON(e){return new rg(e)}}Or.ParticipantPayloadResponse=rg;var Ur={};Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.TextResponsePayload=Ur.SpeechResponsePayload=void 0;const $O=t=>JSON.parse(t),eU=t=>JSON.parse(t);class og{constructor(e){this.privSpeechResponse=$O(e)}get recognition(){return this.privSpeechResponse.recognition}get translations(){return this.privSpeechResponse.translations}get id(){return this.privSpeechResponse.id}get language(){return this.privSpeechResponse.language}get nickname(){return this.privSpeechResponse.nickname}get participantId(){return this.privSpeechResponse.participantId}get roomid(){return this.privSpeechResponse.roomid}get timestamp(){return this.privSpeechResponse.timestamp}get type(){return this.privSpeechResponse.type}get isFinal(){return this.privSpeechResponse.type==="final"}static fromJSON(e){return new og(e)}}Ur.SpeechResponsePayload=og;class sg{constructor(e){this.privTextResponse=eU(e)}get originalText(){return this.privTextResponse.originalText}get translations(){return this.privTextResponse.translations}get id(){return this.privTextResponse.id}get language(){return this.privTextResponse.language}get nickname(){return this.privTextResponse.nickname}get participantId(){return this.privTextResponse.participantId}get roomid(){return this.privTextResponse.roomid}get timestamp(){return this.privTextResponse.timestamp}get type(){return this.privTextResponse.type}static fromJSON(e){return new sg(e)}}Ur.TextResponsePayload=sg,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TextResponsePayload=t.SpeechResponsePayload=t.ParticipantPayloadResponse=t.ParticipantsListPayloadResponse=t.CommandResponsePayload=void 0;var e=jc;Object.defineProperty(t,"CommandResponsePayload",{enumerable:!0,get:function(){return e.CommandResponsePayload}});var i=Or;Object.defineProperty(t,"ParticipantsListPayloadResponse",{enumerable:!0,get:function(){return i.ParticipantsListPayloadResponse}}),Object.defineProperty(t,"ParticipantPayloadResponse",{enumerable:!0,get:function(){return i.ParticipantPayloadResponse}});var n=Ur;Object.defineProperty(t,"SpeechResponsePayload",{enumerable:!0,get:function(){return n.SpeechResponsePayload}}),Object.defineProperty(t,"TextResponsePayload",{enumerable:!0,get:function(){return n.TextResponsePayload}})}(dS);var SS;function tU(){if(SS)return cA;SS=1,Object.defineProperty(cA,"__esModule",{value:!0}),cA.ConversationServiceAdapter=void 0;const t=Ee(),e=q(),i=oe(),n=aA,o=xc,s=pS(),A=xi,r=dS;let a=class extends i.ServiceRecognizerBase{constructor(u,l,g,E,C){super(u,l,g,E,C),this.privConnectionConfigPromise=void 0,this.privLastPartialUtteranceId="",this.privConversationServiceConnector=C,this.privConversationAuthentication=u,this.receiveMessageOverride=()=>this.receiveConversationMessageOverride(),this.recognizeOverride=()=>this.noOp(),this.postConnectImplOverride=p=>this.conversationConnectImpl(p),this.configConnectionOverride=()=>this.configConnection(),this.disconnectOverride=()=>this.privDisconnect(),this.privConversationRequestSession=new o.ConversationRequestSession((0,t.createNoDashGuid)()),this.privConversationConnectionFactory=l,this.privConversationIsDisposed=!1}isDisposed(){return super.isDisposed()||this.privConversationIsDisposed}async dispose(u){this.privConversationIsDisposed=!0,this.privConnectionConfigPromise!==void 0&&await(await this.privConnectionConfigPromise).dispose(u),await super.dispose(u)}async sendMessage(u){return(await this.fetchConnection()).send(new n.ConversationConnectionMessage(t.MessageType.Text,u))}async sendMessageAsync(u){await(await this.fetchConnection()).send(new n.ConversationConnectionMessage(t.MessageType.Text,u))}privDisconnect(){if(!this.terminateMessageLoop)return this.cancelRecognition(this.privConversationRequestSession.sessionId,this.privConversationRequestSession.requestId,e.CancellationReason.Error,e.CancellationErrorCode.NoError,"Disconnecting"),this.terminateMessageLoop=!0,Promise.resolve()}async processTypeSpecificMessages(){return!0}cancelRecognition(u,l,g,E,C){this.terminateMessageLoop=!0;const p=new e.ConversationTranslationCanceledEventArgs(g,C,E,void 0,u);try{this.privConversationServiceConnector.canceled&&this.privConversationServiceConnector.canceled(this.privConversationServiceConnector,p)}catch{}}async conversationConnectImpl(u){return this.privConnectionLoop=this.startMessageLoop(),u}async receiveConversationMessageOverride(){if(this.isDisposed()||this.terminateMessageLoop)return Promise.resolve();const u=new t.Deferred;try{const g=await(await this.fetchConnection()).read();if(this.isDisposed()||this.terminateMessageLoop)return u.resolve(),Promise.resolve();if(!g)return this.receiveConversationMessageOverride();const E=this.privConversationRequestSession.sessionId,C=g.conversationMessageType.toLowerCase();let p=!1;try{switch(C){case"info":case"participant_command":case"command":const S=r.CommandResponsePayload.fromJSON(g.textBody);switch(S.command.toLowerCase()){case"participantlist":const L=r.ParticipantsListPayloadResponse.fromJSON(g.textBody),U=L.participants.map(X=>({avatar:X.avatar,displayName:X.nickname,id:X.participantId,isHost:X.ishost,isMuted:X.ismuted,isUsingTts:X.usetts,preferredLanguage:X.locale}));this.privConversationServiceConnector.participantsListReceived&&this.privConversationServiceConnector.participantsListReceived(this.privConversationServiceConnector,new s.ParticipantsListEventArgs(L.roomid,L.token,L.translateTo,L.profanityFilter,L.roomProfanityFilter,L.roomLocked,L.muteAll,U,E));break;case"settranslatetolanguages":this.privConversationServiceConnector.participantUpdateCommandReceived&&this.privConversationServiceConnector.participantUpdateCommandReceived(this.privConversationServiceConnector,new s.ParticipantAttributeEventArgs(S.participantId,A.ConversationTranslatorCommandTypes.setTranslateToLanguages,S.value,E));break;case"setprofanityfiltering":this.privConversationServiceConnector.participantUpdateCommandReceived&&this.privConversationServiceConnector.participantUpdateCommandReceived(this.privConversationServiceConnector,new s.ParticipantAttributeEventArgs(S.participantId,A.ConversationTranslatorCommandTypes.setProfanityFiltering,S.value,E));break;case"setmute":this.privConversationServiceConnector.participantUpdateCommandReceived&&this.privConversationServiceConnector.participantUpdateCommandReceived(this.privConversationServiceConnector,new s.ParticipantAttributeEventArgs(S.participantId,A.ConversationTranslatorCommandTypes.setMute,S.value,E));break;case"setmuteall":this.privConversationServiceConnector.muteAllCommandReceived&&this.privConversationServiceConnector.muteAllCommandReceived(this.privConversationServiceConnector,new s.MuteAllEventArgs(S.value,E));break;case"roomexpirationwarning":this.privConversationServiceConnector.conversationExpiration&&this.privConversationServiceConnector.conversationExpiration(this.privConversationServiceConnector,new e.ConversationExpirationEventArgs(S.value,this.privConversationRequestSession.sessionId));break;case"setusetts":this.privConversationServiceConnector.participantUpdateCommandReceived&&this.privConversationServiceConnector.participantUpdateCommandReceived(this.privConversationServiceConnector,new s.ParticipantAttributeEventArgs(S.participantId,A.ConversationTranslatorCommandTypes.setUseTTS,S.value,E));break;case"setlockstate":this.privConversationServiceConnector.lockRoomCommandReceived&&this.privConversationServiceConnector.lockRoomCommandReceived(this.privConversationServiceConnector,new s.LockRoomEventArgs(S.value,E));break;case"changenickname":this.privConversationServiceConnector.participantUpdateCommandReceived&&this.privConversationServiceConnector.participantUpdateCommandReceived(this.privConversationServiceConnector,new s.ParticipantAttributeEventArgs(S.participantId,A.ConversationTranslatorCommandTypes.changeNickname,S.value,E));break;case"joinsession":const Q=r.ParticipantPayloadResponse.fromJSON(g.textBody),j={avatar:Q.avatar,displayName:Q.nickname,id:Q.participantId,isHost:Q.ishost,isMuted:Q.ismuted,isUsingTts:Q.usetts,preferredLanguage:Q.locale};this.privConversationServiceConnector.participantJoinCommandReceived&&this.privConversationServiceConnector.participantJoinCommandReceived(this.privConversationServiceConnector,new s.ParticipantEventArgs(j,E));break;case"leavesession":const z={id:S.participantId};this.privConversationServiceConnector.participantLeaveCommandReceived&&this.privConversationServiceConnector.participantLeaveCommandReceived(this.privConversationServiceConnector,new s.ParticipantEventArgs(z,E));break;case"disconnectsession":const K={id:S.participantId};break;case"token":const N=new i.CognitiveTokenAuthentication(()=>{const X=S.token;return Promise.resolve(X)},()=>{const X=S.token;return Promise.resolve(X)});this.authentication=N,this.privConversationServiceConnector.onToken(N);break;default:break}break;case"partial":case"final":const I=r.SpeechResponsePayload.fromJSON(g.textBody),d=C==="final"?e.ResultReason.TranslatedParticipantSpeech:e.ResultReason.TranslatingParticipantSpeech,M=new e.ConversationTranslationResult(I.participantId,this.getTranslations(I.translations),I.language,I.id,d,I.recognition,void 0,void 0,g.textBody,void 0);I.isFinal?((M.text!==void 0&&M.text.length>0||I.id===this.privLastPartialUtteranceId)&&(p=!0),p&&this.privConversationServiceConnector.translationReceived&&this.privConversationServiceConnector.translationReceived(this.privConversationServiceConnector,new s.ConversationReceivedTranslationEventArgs(A.ConversationTranslatorMessageTypes.final,M,E))):M.text!==void 0&&(this.privLastPartialUtteranceId=I.id,this.privConversationServiceConnector.translationReceived&&this.privConversationServiceConnector.translationReceived(this.privConversationServiceConnector,new s.ConversationReceivedTranslationEventArgs(A.ConversationTranslatorMessageTypes.partial,M,E)));break;case"translated_message":const B=r.TextResponsePayload.fromJSON(g.textBody),D=new e.ConversationTranslationResult(B.participantId,this.getTranslations(B.translations),B.language,void 0,void 0,B.originalText,void 0,void 0,void 0,g.textBody,void 0);this.privConversationServiceConnector.translationReceived&&this.privConversationServiceConnector.translationReceived(this.privConversationServiceConnector,new s.ConversationReceivedTranslationEventArgs(A.ConversationTranslatorMessageTypes.instantMessage,D,E));break;default:break}}catch{}return this.receiveConversationMessageOverride()}catch{this.terminateMessageLoop=!0}return u.promise}async startMessageLoop(){if(this.isDisposed())return Promise.resolve();this.terminateMessageLoop=!1;const u=this.receiveConversationMessageOverride();try{return await u}catch(l){return this.cancelRecognition(this.privRequestSession?this.privRequestSession.sessionId:"",this.privRequestSession?this.privRequestSession.requestId:"",e.CancellationReason.Error,e.CancellationErrorCode.RuntimeError,l),null}}configConnection(){return this.isDisposed()?Promise.resolve(void 0):this.privConnectionConfigPromise!==void 0?this.privConnectionConfigPromise.then(u=>u.state()===t.ConnectionState.Disconnected?(this.privConnectionId=null,this.privConnectionConfigPromise=void 0,this.configConnection()):this.privConnectionConfigPromise,()=>(this.privConnectionId=null,this.privConnectionConfigPromise=void 0,this.configConnection())):this.terminateMessageLoop?Promise.resolve(void 0):(this.privConnectionConfigPromise=this.connectImpl().then(u=>u),this.privConnectionConfigPromise)}getTranslations(u){let l;if(u!==void 0){l=new e.Translations;for(const g of u)l.set(g.lang,g.translation)}return l}};return cA.ConversationServiceAdapter=a,cA}var MS;function iU(){if(MS)return Jn;MS=1,Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.ConversationTranslatorRecognizer=Jn.ConversationRecognizerFactory=void 0;const t=oe(),e=Ee(),i=Se,n=q(),o=qO(),s=tU();class A{static fromConfig(c,u,l){return new r(c,u,l)}}Jn.ConversationRecognizerFactory=A;let r=class extends n.Recognizer{constructor(c,u,l){const g=u;i.Contracts.throwIfNull(g,"speechConfig");const E=c;i.Contracts.throwIfNull(E,"conversationImpl"),super(l,g.properties,new o.ConversationConnectionFactory),this.privConversation=E,this.privIsDisposed=!1,this.privProperties=g.properties.clone(),this.privConnection=n.Connection.fromRecognizer(this),this.privProperties.getProperty(n.PropertyId.WebWorkerLoadType,"on").toLowerCase()==="on"&&typeof Blob<"u"&&typeof Worker<"u"?(this.privSetTimeout=e.Timeout.setTimeout,this.privClearTimeout=e.Timeout.clearTimeout):typeof window<"u"?(this.privSetTimeout=window.setTimeout.bind(window),this.privClearTimeout=window.clearTimeout.bind(window)):(this.privSetTimeout=setTimeout,this.privClearTimeout=clearTimeout)}set connected(c){this.privConnection.connected=c}set disconnected(c){this.privConnection.disconnected=c}get speechRecognitionLanguage(){return this.privSpeechRecognitionLanguage}get properties(){return this.privProperties}isDisposed(){return this.privIsDisposed}connect(c,u,l){try{i.Contracts.throwIfDisposed(this.privIsDisposed),i.Contracts.throwIfNullOrWhitespace(c,"token"),this.privReco.conversationTranslatorToken=c,this.resetConversationTimeout(),this.privReco.connectAsync(u,l)}catch(g){if(l)if(g instanceof Error){const E=g;l(E.name+": "+E.message)}else l(g)}}disconnect(c,u){try{i.Contracts.throwIfDisposed(this.privIsDisposed),this.privTimeoutToken!==void 0&&this.privClearTimeout(this.privTimeoutToken),this.privReco.disconnect().then(()=>{c&&c()},l=>{u&&u(l)})}catch(l){if(u)if(l instanceof Error){const g=l;u(g.name+": "+g.message)}else u(l);this.dispose(!0).catch(g=>{e.Events.instance.onEvent(new e.BackgroundEvent(g))})}}sendRequest(c,u,l){try{i.Contracts.throwIfDisposed(this.privIsDisposed),this.sendMessage(c,u,l)}catch(g){if(l)if(g instanceof Error){const E=g;l(E.name+": "+E.message)}else l(g);this.dispose(!0).catch(E=>{e.Events.instance.onEvent(new e.BackgroundEvent(E))})}}onToken(c){this.privConversation.onToken(c)}async close(){this.privIsDisposed||(this.privConnection&&(this.privConnection.closeConnection(),this.privConnection.close()),this.privConnection=void 0,await this.dispose(!0))}async dispose(c){this.privIsDisposed||c&&(this.privTimeoutToken!==void 0&&this.privClearTimeout(this.privTimeoutToken),this.privIsDisposed=!0,this.privConnection&&(this.privConnection.closeConnection(),this.privConnection.close(),this.privConnection=void 0),await super.dispose(c))}createRecognizerConfig(c){return new t.RecognizerConfig(c,this.privProperties)}createServiceRecognizer(c,u,l,g){const E=l;return new s.ConversationServiceAdapter(c,u,E,g,this)}sendMessage(c,u,l){const g=this.privReco;((C,p,S)=>{C!==void 0?C.then(()=>{try{p&&p()}catch(I){S&&S(`'Unhandled error on promise callback: ${I}'`)}},I=>{try{S&&S(I)}catch{}}):S&&S("Null promise")})(g.sendMessageAsync(c),u,l),this.resetConversationTimeout()}resetConversationTimeout(){this.privTimeoutToken!==void 0&&this.privClearTimeout(this.privTimeoutToken),this.privTimeoutToken=this.privSetTimeout(()=>{this.sendRequest(this.privConversation.getKeepAlive())},6e4)}};return Jn.ConversationTranslatorRecognizer=r,Jn}var uA={},BS;function nU(){if(BS)return uA;BS=1,Object.defineProperty(uA,"__esModule",{value:!0}),uA.TranscriberRecognizer=void 0;const t=Ee(),e=Se,i=q(),n=oe(),o=Ht;let s=class extends i.Recognizer{constructor(r,a){const c=r;e.Contracts.throwIfNull(c,"speechTranslationConfig");const u=a;e.Contracts.throwIfNull(u,"audioConfigImpl"),e.Contracts.throwIfNullOrWhitespace(c.speechRecognitionLanguage,i.PropertyId[i.PropertyId.SpeechServiceConnection_RecoLanguage]),super(a,c.properties,new n.TranscriberConnectionFactory),this.privDisposedRecognizer=!1,this.isMeetingRecognizer=!1}get speechRecognitionLanguage(){return e.Contracts.throwIfDisposed(this.privDisposedRecognizer),this.properties.getProperty(i.PropertyId.SpeechServiceConnection_RecoLanguage)}get properties(){return this.privProperties}get authorizationToken(){return this.properties.getProperty(i.PropertyId.SpeechServiceAuthorization_Token)}set authorizationToken(r){e.Contracts.throwIfNullOrWhitespace(r,"token"),this.properties.setProperty(i.PropertyId.SpeechServiceAuthorization_Token,r)}set conversation(r){e.Contracts.throwIfNullOrUndefined(r,"Conversation"),this.isMeetingRecognizer=!1,this.privConversation=r}getConversationInfo(){return e.Contracts.throwIfNullOrUndefined(this.privConversation,"Conversation"),this.privConversation.conversationInfo}set meeting(r){e.Contracts.throwIfNullOrUndefined(r,"Meeting"),this.isMeetingRecognizer=!0,this.privMeeting=r}getMeetingInfo(){return e.Contracts.throwIfNullOrUndefined(this.privMeeting,"Meeting"),this.privMeeting.meetingInfo}IsMeetingRecognizer(){return this.isMeetingRecognizer}startContinuousRecognitionAsync(r,a){(0,t.marshalPromiseToCallbacks)(this.startContinuousRecognitionAsyncImpl(o.RecognitionMode.Conversation),r,a)}stopContinuousRecognitionAsync(r,a){(0,t.marshalPromiseToCallbacks)(this.stopContinuousRecognitionAsyncImpl(),r,a)}async close(){this.privDisposedRecognizer||await this.dispose(!0)}async pushConversationEvent(r,a){const c=this.privReco;e.Contracts.throwIfNullOrUndefined(c,"serviceRecognizer"),await c.sendSpeechEventAsync(r,a)}async pushMeetingEvent(r,a){const c=this.privReco;e.Contracts.throwIfNullOrUndefined(c,"serviceRecognizer"),await c.sendMeetingSpeechEventAsync(r,a)}async enforceAudioGating(){const c=(await this.audioConfig.format).channels;if(c===1){if(this.properties.getProperty("f0f5debc-f8c9-4892-ac4b-90a7ab359fd2","false").toLowerCase()!=="true")throw new Error("Single channel audio configuration for MeetingTranscriber is currently under private preview, please contact diarizationrequest@microsoft.com for more details")}else if(c!==8)throw new Error(`Unsupported audio configuration: Detected ${c}-channel audio`)}connectMeetingCallbacks(r){this.isMeetingRecognizer=!0,this.canceled=(a,c)=>{r.canceled&&r.canceled(r,c)},this.recognizing=(a,c)=>{r.transcribing&&r.transcribing(r,c)},this.recognized=(a,c)=>{r.transcribed&&r.transcribed(r,c)},this.sessionStarted=(a,c)=>{r.sessionStarted&&r.sessionStarted(r,c)},this.sessionStopped=(a,c)=>{r.sessionStopped&&r.sessionStopped(r,c)}}disconnectCallbacks(){this.canceled=void 0,this.recognizing=void 0,this.recognized=void 0,this.sessionStarted=void 0,this.sessionStopped=void 0}async dispose(r){this.privDisposedRecognizer||(r&&(this.privDisposedRecognizer=!0,await this.implRecognizerStop()),await super.dispose(r))}createRecognizerConfig(r){return new n.RecognizerConfig(r,this.properties)}createServiceRecognizer(r,a,c,u){const l=c;return new n.TranscriptionServiceRecognizer(r,a,l,u,this)}};return uA.TranscriberRecognizer=s,uA}var vS;function rU(){return vS||(vS=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InternalParticipants=t.ConversationTranslatorMessageTypes=t.ConversationTranslatorCommandTypes=t.ParticipantsListEventArgs=t.ParticipantEventArgs=t.ParticipantAttributeEventArgs=t.MuteAllEventArgs=t.LockRoomEventArgs=t.ConversationReceivedTranslationEventArgs=t.TranscriberRecognizer=t.ConversationRecognizerFactory=t.ConversationConnectionConfig=t.ConversationManager=void 0;var e=PO();Object.defineProperty(t,"ConversationManager",{enumerable:!0,get:function(){return e.ConversationManager}});var i=Lr;Object.defineProperty(t,"ConversationConnectionConfig",{enumerable:!0,get:function(){return i.ConversationConnectionConfig}});var n=iU();Object.defineProperty(t,"ConversationRecognizerFactory",{enumerable:!0,get:function(){return n.ConversationRecognizerFactory}});var o=nU();Object.defineProperty(t,"TranscriberRecognizer",{enumerable:!0,get:function(){return o.TranscriberRecognizer}});var s=pS();Object.defineProperty(t,"ConversationReceivedTranslationEventArgs",{enumerable:!0,get:function(){return s.ConversationReceivedTranslationEventArgs}}),Object.defineProperty(t,"LockRoomEventArgs",{enumerable:!0,get:function(){return s.LockRoomEventArgs}}),Object.defineProperty(t,"MuteAllEventArgs",{enumerable:!0,get:function(){return s.MuteAllEventArgs}}),Object.defineProperty(t,"ParticipantAttributeEventArgs",{enumerable:!0,get:function(){return s.ParticipantAttributeEventArgs}}),Object.defineProperty(t,"ParticipantEventArgs",{enumerable:!0,get:function(){return s.ParticipantEventArgs}}),Object.defineProperty(t,"ParticipantsListEventArgs",{enumerable:!0,get:function(){return s.ParticipantsListEventArgs}});var A=xi;Object.defineProperty(t,"ConversationTranslatorCommandTypes",{enumerable:!0,get:function(){return A.ConversationTranslatorCommandTypes}}),Object.defineProperty(t,"ConversationTranslatorMessageTypes",{enumerable:!0,get:function(){return A.ConversationTranslatorMessageTypes}}),Object.defineProperty(t,"InternalParticipants",{enumerable:!0,get:function(){return A.InternalParticipants}})}(eg)),eg}var Ag={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SynthesisAudioMetadata=t.MetadataType=void 0,function(i){i.WordBoundary="WordBoundary",i.Bookmark="Bookmark",i.Viseme="Viseme",i.SentenceBoundary="SentenceBoundary",i.SessionEnd="SessionEnd",i.AvatarSignal="TalkingAvatarSignal"}(t.MetadataType||(t.MetadataType={}));class e{constructor(n){this.privSynthesisAudioMetadata=JSON.parse(n)}static fromJSON(n){return new e(n)}get Metadata(){return this.privSynthesisAudioMetadata.Metadata}}t.SynthesisAudioMetadata=e})(Ag);var lA={},Mi={};Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.SynthesisStartedEvent=Mi.ConnectingToSynthesisServiceEvent=Mi.SynthesisTriggeredEvent=Mi.SpeechSynthesisEvent=void 0;const fS=Ee();class kc extends fS.PlatformEvent{constructor(e,i,n=fS.EventType.Info){super(e,n),this.privRequestId=i}get requestId(){return this.privRequestId}}Mi.SpeechSynthesisEvent=kc;class oU extends kc{constructor(e,i,n){super("SynthesisTriggeredEvent",e),this.privSessionAudioDestinationId=i,this.privTurnAudioDestinationId=n}get audioSessionDestinationId(){return this.privSessionAudioDestinationId}get audioTurnDestinationId(){return this.privTurnAudioDestinationId}}Mi.SynthesisTriggeredEvent=oU;class sU extends kc{constructor(e,i){super("ConnectingToSynthesisServiceEvent",e),this.privAuthFetchEventId=i}get authFetchEventId(){return this.privAuthFetchEventId}}Mi.ConnectingToSynthesisServiceEvent=sU;class AU extends kc{constructor(e,i){super("SynthesisStartedEvent",e),this.privAuthFetchEventId=i}get authFetchEventId(){return this.privAuthFetchEventId}}Mi.SynthesisStartedEvent=AU;var wS;function aU(){if(wS)return lA;wS=1,Object.defineProperty(lA,"__esModule",{value:!0}),lA.SynthesisTurn=void 0;const t=Ee(),e=ft,i=q(),n=Ag,o=Mi;let s=class Ug{constructor(){this.privIsDisposed=!1,this.privIsSynthesizing=!1,this.privIsSynthesisEnded=!1,this.privBytesReceived=0,this.privInTurn=!1,this.privTextOffset=0,this.privNextSearchTextIndex=0,this.privSentenceOffset=0,this.privNextSearchSentenceIndex=0,this.privRequestId=(0,t.createNoDashGuid)(),this.privTurnDeferral=new t.Deferred,this.privTurnDeferral.resolve()}get requestId(){return this.privRequestId}get streamId(){return this.privStreamId}set streamId(r){this.privStreamId=r}get audioOutputFormat(){return this.privAudioOutputFormat}set audioOutputFormat(r){this.privAudioOutputFormat=r}get turnCompletionPromise(){return this.privTurnDeferral.promise}get isSynthesisEnded(){return this.privIsSynthesisEnded}get isSynthesizing(){return this.privIsSynthesizing}get currentTextOffset(){return this.privTextOffset}get currentSentenceOffset(){return this.privSentenceOffset}get bytesReceived(){return this.privBytesReceived}get audioDuration(){return this.privAudioDuration}get extraProperties(){if(this.privWebRTCSDP){const r=new i.PropertyCollection;return r.setProperty(i.PropertyId.TalkingAvatarService_WebRTC_SDP,this.privWebRTCSDP),r}}async getAllReceivedAudio(){return this.privReceivedAudio?Promise.resolve(this.privReceivedAudio):this.privIsSynthesisEnded?(await this.readAllAudioFromStream(),Promise.resolve(this.privReceivedAudio)):null}async getAllReceivedAudioWithHeader(){if(this.privReceivedAudioWithHeader)return this.privReceivedAudioWithHeader;if(!this.privIsSynthesisEnded)return null;if(this.audioOutputFormat.hasHeader){const r=await this.getAllReceivedAudio();return this.privReceivedAudioWithHeader=this.audioOutputFormat.addHeader(r),this.privReceivedAudioWithHeader}else return this.getAllReceivedAudio()}startNewSynthesis(r,a,c,u){this.privIsSynthesisEnded=!1,this.privIsSynthesizing=!0,this.privRequestId=r,this.privRawText=a,this.privIsSSML=c,this.privAudioOutputStream=new e.PullAudioOutputStreamImpl,this.privAudioOutputStream.format=this.privAudioOutputFormat,this.privReceivedAudio=null,this.privReceivedAudioWithHeader=null,this.privBytesReceived=0,this.privTextOffset=0,this.privNextSearchTextIndex=0,this.privSentenceOffset=0,this.privNextSearchSentenceIndex=0,this.privPartialVisemeAnimation="",this.privWebRTCSDP="",u!==void 0&&(this.privTurnAudioDestination=u,this.privTurnAudioDestination.format=this.privAudioOutputFormat),this.onEvent(new o.SynthesisTriggeredEvent(this.requestId,void 0,u===void 0?void 0:u.id()))}onPreConnectionStart(r){this.privAuthFetchEventId=r,this.onEvent(new o.ConnectingToSynthesisServiceEvent(this.privRequestId,this.privAuthFetchEventId))}onAuthCompleted(r){r&&this.onComplete()}onConnectionEstablishCompleted(r){if(r===200){this.onEvent(new o.SynthesisStartedEvent(this.requestId,this.privAuthFetchEventId)),this.privBytesReceived=0;return}else r===403&&this.onComplete()}onServiceResponseMessage(r){const a=JSON.parse(r);this.streamId=a.audio.streamId}onServiceTurnEndResponse(){this.privInTurn=!1,this.privTurnDeferral.resolve(),this.onComplete()}onServiceTurnStartResponse(r){this.privTurnDeferral&&this.privInTurn&&(this.privTurnDeferral.reject("Another turn started before current completed."),this.privTurnDeferral.promise.then().catch(()=>{})),this.privInTurn=!0,this.privTurnDeferral=new t.Deferred;const a=JSON.parse(r);a.webrtc&&(this.privWebRTCSDP=a.webrtc.connectionString)}onAudioChunkReceived(r){this.isSynthesizing&&(this.privAudioOutputStream.write(r),this.privBytesReceived+=r.byteLength,this.privTurnAudioDestination!==void 0&&this.privTurnAudioDestination.write(r))}onTextBoundaryEvent(r){this.updateTextOffset(r.Data.text.Text,r.Type)}onVisemeMetadataReceived(r){r.Data.AnimationChunk!==void 0&&(this.privPartialVisemeAnimation+=r.Data.AnimationChunk)}onSessionEnd(r){this.privAudioDuration=r.Data.Offset}async constructSynthesisResult(){const r=await this.getAllReceivedAudioWithHeader();return new i.SpeechSynthesisResult(this.requestId,i.ResultReason.SynthesizingAudioCompleted,r,void 0,this.extraProperties,this.audioDuration)}dispose(){this.privIsDisposed||(this.privIsDisposed=!0)}onStopSynthesizing(){this.onComplete()}getAndClearVisemeAnimation(){const r=this.privPartialVisemeAnimation;return this.privPartialVisemeAnimation="",r}onEvent(r){t.Events.instance.onEvent(r)}static isXmlTag(r){return r.length>=2&&r[0]==="<"&&r[r.length-1]===">"}updateTextOffset(r,a){a===n.MetadataType.WordBoundary?(this.privTextOffset=this.privRawText.indexOf(r,this.privNextSearchTextIndex),this.privTextOffset>=0&&(this.privNextSearchTextIndex=this.privTextOffset+r.length,this.privIsSSML&&this.withinXmlTag(this.privTextOffset)&&!Ug.isXmlTag(r)&&this.updateTextOffset(r,a))):(this.privSentenceOffset=this.privRawText.indexOf(r,this.privNextSearchSentenceIndex),this.privSentenceOffset>=0&&(this.privNextSearchSentenceIndex=this.privSentenceOffset+r.length,this.privIsSSML&&this.withinXmlTag(this.privSentenceOffset)&&!Ug.isXmlTag(r)&&this.updateTextOffset(r,a)))}onComplete(){this.privIsSynthesizing&&(this.privIsSynthesizing=!1,this.privIsSynthesisEnded=!0,this.privAudioOutputStream.close(),this.privInTurn=!1,this.privTurnAudioDestination!==void 0&&(this.privTurnAudioDestination.close(),this.privTurnAudioDestination=void 0))}async readAllAudioFromStream(){if(this.privIsSynthesisEnded){this.privReceivedAudio=new ArrayBuffer(this.bytesReceived);try{await this.privAudioOutputStream.read(this.privReceivedAudio)}catch{this.privReceivedAudio=new ArrayBuffer(0)}}}withinXmlTag(r){return this.privRawText.indexOf("<",r+1)>this.privRawText.indexOf(">",r+1)}};return lA.SynthesisTurn=s,lA}var gA={},mS;function cU(){if(mS)return gA;mS=1,Object.defineProperty(gA,"__esModule",{value:!0}),gA.SynthesisAdapterBase=void 0;const t=Ee(),e=q(),i=oe(),n=Ki;let o=class{constructor(A,r,a,c){if(this.speakOverride=void 0,this.receiveMessageOverride=void 0,this.connectImplOverride=void 0,this.configConnectionOverride=void 0,this.privConnectionConfigurationPromise=void 0,!A)throw new t.ArgumentNullError("authentication");if(!r)throw new t.ArgumentNullError("connectionFactory");if(!a)throw new t.ArgumentNullError("synthesizerConfig");this.privAuthentication=A,this.privConnectionFactory=r,this.privSynthesizerConfig=a,this.privIsDisposed=!1,this.privSessionAudioDestination=c,this.privSynthesisTurn=new i.SynthesisTurn,this.privConnectionEvents=new t.EventSource,this.privServiceEvents=new t.EventSource,this.privSynthesisContext=new i.SynthesisContext,this.privAgentConfig=new i.AgentConfig,this.connectionEvents.attach(u=>{if(u.name==="ConnectionClosedEvent"){const l=u;l.statusCode!==1e3&&this.cancelSynthesisLocal(e.CancellationReason.Error,l.statusCode===1007?e.CancellationErrorCode.BadRequestParameters:e.CancellationErrorCode.ConnectionFailure,`${l.reason} websocket error code: ${l.statusCode}`)}})}get synthesisContext(){return this.privSynthesisContext}get agentConfig(){return this.privAgentConfig}get connectionEvents(){return this.privConnectionEvents}get serviceEvents(){return this.privServiceEvents}set activityTemplate(A){this.privActivityTemplate=A}get activityTemplate(){return this.privActivityTemplate}set audioOutputFormat(A){this.privAudioOutputFormat=A,this.privSynthesisTurn.audioOutputFormat=A,this.privSessionAudioDestination!==void 0&&(this.privSessionAudioDestination.format=A),this.synthesisContext!==void 0&&(this.synthesisContext.audioOutputFormat=A)}isDisposed(){return this.privIsDisposed}async dispose(A){this.privIsDisposed=!0,this.privSessionAudioDestination!==void 0&&this.privSessionAudioDestination.close(),this.privConnectionConfigurationPromise!==void 0&&await(await this.privConnectionConfigurationPromise).dispose(A)}async connect(){await this.connectImpl()}async sendNetworkMessage(A,r){const a=typeof r=="string"?t.MessageType.Text:t.MessageType.Binary,c=typeof r=="string"?"application/json":"";return(await this.fetchConnection()).send(new n.SpeechConnectionMessage(a,A,this.privSynthesisTurn.requestId,c,r))}async Speak(A,r,a,c,u,l){let g;if(r?g=A:g=this.privSynthesizer.buildSsml(A),this.speakOverride!==void 0)return this.speakOverride(g,a,c,u);this.privSuccessCallback=c,this.privErrorCallback=u,this.privSynthesisTurn.startNewSynthesis(a,A,r,l);try{await this.connectImpl();const E=await this.fetchConnection();await this.sendSynthesisContext(E),await this.sendSsmlMessage(E,g,a),this.onSynthesisStarted(a),this.receiveMessage()}catch(E){return this.cancelSynthesisLocal(e.CancellationReason.Error,e.CancellationErrorCode.ConnectionFailure,E),Promise.reject(E)}}async stopSpeaking(){return await this.connectImpl(),(await this.fetchConnection()).send(new n.SpeechConnectionMessage(t.MessageType.Text,"synthesis.control",this.privSynthesisTurn.requestId,"application/json",JSON.stringify({action:"stop"})))}cancelSynthesis(A,r,a,c){const u=new e.PropertyCollection;u.setProperty(i.CancellationErrorCodePropertyName,e.CancellationErrorCode[a]);const l=new e.SpeechSynthesisResult(A,e.ResultReason.Canceled,void 0,c,u);if(this.onSynthesisCancelled(l),this.privSuccessCallback)try{this.privSuccessCallback(l)}catch{}}cancelSynthesisLocal(A,r,a){this.privSynthesisTurn.isSynthesizing&&(this.privSynthesisTurn.onStopSynthesizing(),this.cancelSynthesis(this.privSynthesisTurn.requestId,A,r,a))}processTypeSpecificMessages(A){return!0}async receiveMessage(){try{const r=await(await this.fetchConnection()).read();if(this.receiveMessageOverride!==void 0)return this.receiveMessageOverride();if(this.privIsDisposed)return;if(!r)return this.privSynthesisTurn.isSynthesizing?this.receiveMessage():void 0;const a=n.SpeechConnectionMessage.fromConnectionMessage(r);if(a.requestId.toLowerCase()===this.privSynthesisTurn.requestId.toLowerCase())switch(a.path.toLowerCase()){case"turn.start":this.privSynthesisTurn.onServiceTurnStartResponse(a.textBody);break;case"response":this.privSynthesisTurn.onServiceResponseMessage(a.textBody);break;case"audio":this.privSynthesisTurn.streamId.toLowerCase()===a.streamId.toLowerCase()&&a.binaryBody&&(this.privSynthesisTurn.onAudioChunkReceived(a.binaryBody),this.onSynthesizing(a.binaryBody),this.privSessionAudioDestination!==void 0&&this.privSessionAudioDestination.write(a.binaryBody));break;case"audio.metadata":const c=i.SynthesisAudioMetadata.fromJSON(a.textBody).Metadata;for(const l of c)switch(l.Type){case i.MetadataType.WordBoundary:case i.MetadataType.SentenceBoundary:this.privSynthesisTurn.onTextBoundaryEvent(l);const g=new e.SpeechSynthesisWordBoundaryEventArgs(l.Data.Offset,l.Data.Duration,l.Data.text.Text,l.Data.text.Length,l.Type===i.MetadataType.WordBoundary?this.privSynthesisTurn.currentTextOffset:this.privSynthesisTurn.currentSentenceOffset,l.Data.text.BoundaryType);this.onWordBoundary(g);break;case i.MetadataType.Bookmark:const E=new e.SpeechSynthesisBookmarkEventArgs(l.Data.Offset,l.Data.Bookmark);this.onBookmarkReached(E);break;case i.MetadataType.Viseme:if(this.privSynthesisTurn.onVisemeMetadataReceived(l),l.Data.IsLastAnimation){const C=new e.SpeechSynthesisVisemeEventArgs(l.Data.Offset,l.Data.VisemeId,this.privSynthesisTurn.getAndClearVisemeAnimation());this.onVisemeReceived(C)}break;case i.MetadataType.AvatarSignal:this.onAvatarEvent(l);break;case i.MetadataType.SessionEnd:this.privSynthesisTurn.onSessionEnd(l);break}break;case"turn.end":this.privSynthesisTurn.onServiceTurnEndResponse();let u;try{u=await this.privSynthesisTurn.constructSynthesisResult(),this.privSuccessCallback&&this.privSuccessCallback(u)}catch(l){this.privErrorCallback&&this.privErrorCallback(l)}this.onSynthesisCompleted(u);break;default:this.processTypeSpecificMessages(a)||this.privServiceEvents&&this.serviceEvents.onEvent(new t.ServiceEvent(a.path.toLowerCase(),a.textBody))}return this.receiveMessage()}catch{}}sendSynthesisContext(A){this.setSynthesisContextSynthesisSection();const r=this.synthesisContext.toJSON();if(r)return A.send(new n.SpeechConnectionMessage(t.MessageType.Text,"synthesis.context",this.privSynthesisTurn.requestId,"application/json",r))}setSpeechConfigSynthesisSection(){}connectImpl(A=!1){if(this.privConnectionPromise!=null)return this.privConnectionPromise.then(a=>a.state()===t.ConnectionState.Disconnected?(this.privConnectionId=null,this.privConnectionPromise=null,this.connectImpl()):this.privConnectionPromise,()=>(this.privConnectionId=null,this.privConnectionPromise=null,this.connectImpl()));this.privAuthFetchEventId=(0,t.createNoDashGuid)(),this.privConnectionId=(0,t.createNoDashGuid)(),this.privSynthesisTurn.onPreConnectionStart(this.privAuthFetchEventId);const r=A?this.privAuthentication.fetchOnExpiry(this.privAuthFetchEventId):this.privAuthentication.fetch(this.privAuthFetchEventId);return this.privConnectionPromise=r.then(async a=>{this.privSynthesisTurn.onAuthCompleted(!1);const c=await this.privConnectionFactory.create(this.privSynthesizerConfig,a,this.privConnectionId);c.events.attach(l=>{this.connectionEvents.onEvent(l)});const u=await c.open();return u.statusCode===200?(this.privSynthesisTurn.onConnectionEstablishCompleted(u.statusCode),Promise.resolve(c)):u.statusCode===403&&!A?this.connectImpl(!0):(this.privSynthesisTurn.onConnectionEstablishCompleted(u.statusCode),Promise.reject(`Unable to contact server. StatusCode: ${u.statusCode},
34
34
  ${this.privSynthesizerConfig.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Url)} Reason: ${u.reason}`))},a=>{throw this.privSynthesisTurn.onAuthCompleted(!0),new Error(a)}),this.privConnectionPromise.catch(()=>{}),this.privConnectionPromise}sendSpeechServiceConfig(A,r){if(r)return A.send(new n.SpeechConnectionMessage(t.MessageType.Text,"speech.config",this.privSynthesisTurn.requestId,"application/json",r))}sendSsmlMessage(A,r,a){return A.send(new n.SpeechConnectionMessage(t.MessageType.Text,"ssml",a,"application/ssml+xml",r))}async fetchConnection(){return this.privConnectionConfigurationPromise!==void 0?this.privConnectionConfigurationPromise.then(A=>A.state()===t.ConnectionState.Disconnected?(this.privConnectionId=null,this.privConnectionConfigurationPromise=void 0,this.fetchConnection()):this.privConnectionConfigurationPromise,()=>(this.privConnectionId=null,this.privConnectionConfigurationPromise=void 0,this.fetchConnection())):(this.privConnectionConfigurationPromise=this.configureConnection(),await this.privConnectionConfigurationPromise)}async configureConnection(){const A=await this.connectImpl();return this.configConnectionOverride!==void 0?this.configConnectionOverride(A):(this.setSpeechConfigSynthesisSection(),await this.sendSpeechServiceConfig(A,this.privSynthesizerConfig.SpeechServiceConfig.serialize()),A)}onAvatarEvent(A){}onSynthesisStarted(A){}onSynthesizing(A){}onSynthesisCancelled(A){}onSynthesisCompleted(A){}onWordBoundary(A){}onVisemeReceived(A){}onBookmarkReached(A){}};return gA.SynthesisAdapterBase=o,o.telemetryDataEnabled=!0,gA}var EA={},QS;function uU(){if(QS)return EA;QS=1,Object.defineProperty(EA,"__esModule",{value:!0}),EA.AvatarSynthesisAdapter=void 0;const t=q(),e=oe();let i=class extends e.SynthesisAdapterBase{constructor(o,s,A,r,a){super(o,s,A,void 0),this.privAvatarSynthesizer=r,this.privSynthesizer=r,this.privAvatarConfig=a}setSynthesisContextSynthesisSection(){this.privSynthesisContext.setSynthesisSection(void 0)}setSpeechConfigSynthesisSection(){var o,s,A,r,a,c,u,l,g,E,C,p,S,I,d,M,B;this.privSynthesizerConfig.synthesisVideoSection={format:{bitrate:(o=this.privAvatarConfig.videoFormat)==null?void 0:o.bitrate,codec:(s=this.privAvatarConfig.videoFormat)==null?void 0:s.codec,crop:{bottomRight:{x:(a=(r=(A=this.privAvatarConfig.videoFormat)==null?void 0:A.cropRange)==null?void 0:r.bottomRight)==null?void 0:a.x,y:(l=(u=(c=this.privAvatarConfig.videoFormat)==null?void 0:c.cropRange)==null?void 0:u.bottomRight)==null?void 0:l.y},topLeft:{x:(C=(E=(g=this.privAvatarConfig.videoFormat)==null?void 0:g.cropRange)==null?void 0:E.topLeft)==null?void 0:C.x,y:(I=(S=(p=this.privAvatarConfig.videoFormat)==null?void 0:p.cropRange)==null?void 0:S.topLeft)==null?void 0:I.y}},resolution:{height:(d=this.privAvatarConfig.videoFormat)==null?void 0:d.height,width:(M=this.privAvatarConfig.videoFormat)==null?void 0:M.width}},protocol:{name:"WebRTC",webrtcConfig:{clientDescription:btoa(this.privSynthesizerConfig.parameters.getProperty(t.PropertyId.TalkingAvatarService_WebRTC_SDP)),iceServers:this.privAvatarConfig.remoteIceServers??this.privAvatarSynthesizer.iceServers}},talkingAvatar:{background:{color:this.privAvatarConfig.backgroundColor,image:{url:(B=this.privAvatarConfig.backgroundImage)==null?void 0:B.toString()}},character:this.privAvatarConfig.character,customized:this.privAvatarConfig.customized,style:this.privAvatarConfig.style,useBuiltInVoice:this.privAvatarConfig.useBuiltInVoice}}}onAvatarEvent(o){if(this.privAvatarSynthesizer.avatarEventReceived){const s=new t.AvatarEventArgs(o.Data.Offset,o.Data.Name);try{this.privAvatarSynthesizer.avatarEventReceived(this.privAvatarSynthesizer,s)}catch{}}}};return EA.AvatarSynthesisAdapter=i,EA}var hA={},RS;function lU(){if(RS)return hA;RS=1,Object.defineProperty(hA,"__esModule",{value:!0}),hA.SpeechSynthesisAdapter=void 0;const t=q(),e=oe();let i=class extends e.SynthesisAdapterBase{constructor(o,s,A,r,a){super(o,s,A,a),this.privSpeechSynthesizer=r,this.privSynthesizer=r}setSynthesisContextSynthesisSection(){this.privSynthesisContext.setSynthesisSection(this.privSpeechSynthesizer)}onSynthesisStarted(o){const s=new t.SpeechSynthesisEventArgs(new t.SpeechSynthesisResult(o,t.ResultReason.SynthesizingAudioStarted));this.privSpeechSynthesizer.synthesisStarted&&this.privSpeechSynthesizer.synthesisStarted(this.privSpeechSynthesizer,s)}onSynthesizing(o){if(this.privSpeechSynthesizer.synthesizing)try{const s=this.privSynthesisTurn.audioOutputFormat.addHeader(o),A=new t.SpeechSynthesisEventArgs(new t.SpeechSynthesisResult(this.privSynthesisTurn.requestId,t.ResultReason.SynthesizingAudio,s));this.privSpeechSynthesizer.synthesizing(this.privSpeechSynthesizer,A)}catch{}}onSynthesisCancelled(o){if(this.privSpeechSynthesizer.SynthesisCanceled){const s=new t.SpeechSynthesisEventArgs(o);try{this.privSpeechSynthesizer.SynthesisCanceled(this.privSpeechSynthesizer,s)}catch{}}}onSynthesisCompleted(o){if(this.privSpeechSynthesizer.synthesisCompleted)try{this.privSpeechSynthesizer.synthesisCompleted(this.privSpeechSynthesizer,new t.SpeechSynthesisEventArgs(o))}catch{}}onWordBoundary(o){if(this.privSpeechSynthesizer.wordBoundary)try{this.privSpeechSynthesizer.wordBoundary(this.privSpeechSynthesizer,o)}catch{}}onVisemeReceived(o){if(this.privSpeechSynthesizer.visemeReceived)try{this.privSpeechSynthesizer.visemeReceived(this.privSpeechSynthesizer,o)}catch{}}onBookmarkReached(o){if(this.privSpeechSynthesizer.bookmarkReached)try{this.privSpeechSynthesizer.bookmarkReached(this.privSpeechSynthesizer,o)}catch{}}};return hA.SpeechSynthesisAdapter=i,hA}var CA={},DS;function gU(){if(DS)return CA;DS=1,Object.defineProperty(CA,"__esModule",{value:!0}),CA.SynthesisRestAdapter=void 0;const t=Ct(),e=q(),i=li(),n=ht;let o=class{constructor(A,r){let a=A.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Endpoint,void 0);if(!a){const u=A.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Region,"westus"),l=i.ConnectionFactoryBase.getHostSuffix(u);a=A.parameters.getProperty(e.PropertyId.SpeechServiceConnection_Host,`https://${u}.tts.speech${l}`)}this.privUri=`${a}/cognitiveservices/voices/list`;const c=t.RestConfigBase.requestOptions;this.privRestAdapter=new t.RestMessageAdapter(c),this.privAuthentication=r}getVoicesList(A){return this.privRestAdapter.setHeaders(n.HeaderNames.ConnectionId,A),this.privAuthentication.fetch(A).then(r=>(this.privRestAdapter.setHeaders(r.headerName,r.token),this.privRestAdapter.request(t.RestRequestType.Get,this.privUri)))}};return CA.SynthesisRestAdapter=o,CA}var ag={},yS;function EU(){return yS||(yS=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SynthesizerConfig=t.SynthesisServiceType=void 0;const e=oe();var i;(function(o){o[o.Standard=0]="Standard",o[o.Custom=1]="Custom"})(i=t.SynthesisServiceType||(t.SynthesisServiceType={}));class n{constructor(s,A){this.privSynthesisServiceType=i.Standard,this.avatarEnabled=!1,this.privSpeechServiceConfig=s||new e.SpeechServiceConfig(new e.Context(null)),this.privParameters=A}get parameters(){return this.privParameters}get synthesisServiceType(){return this.privSynthesisServiceType}set synthesisServiceType(s){this.privSynthesisServiceType=s}set synthesisVideoSection(s){this.privSpeechServiceConfig.Context.synthesis={video:s}}get SpeechServiceConfig(){return this.privSpeechServiceConfig}}t.SynthesizerConfig=n}(ag)),ag}var IA={},TS;function hU(){if(TS)return IA;TS=1,Object.defineProperty(IA,"__esModule",{value:!0}),IA.SynthesisContext=void 0;const t=q();let e=class{constructor(){this.privContext={}}setSection(n,o){this.privContext[n]=o}set audioOutputFormat(n){this.privAudioOutputFormat=n}toJSON(){return JSON.stringify(this.privContext)}setSynthesisSection(n){const o=this.buildSynthesisContext(n);this.setSection("synthesis",o)}buildSynthesisContext(n){return{audio:{metadataOptions:{bookmarkEnabled:!!(n!=null&&n.bookmarkReached),punctuationBoundaryEnabled:n==null?void 0:n.properties.getProperty(t.PropertyId.SpeechServiceResponse_RequestPunctuationBoundary,!!(n!=null&&n.wordBoundary)),sentenceBoundaryEnabled:n==null?void 0:n.properties.getProperty(t.PropertyId.SpeechServiceResponse_RequestSentenceBoundary,!1),sessionEndEnabled:!0,visemeEnabled:!!(n!=null&&n.visemeReceived),wordBoundaryEnabled:n==null?void 0:n.properties.getProperty(t.PropertyId.SpeechServiceResponse_RequestWordBoundary,!!(n!=null&&n.wordBoundary))},outputFormat:this.privAudioOutputFormat.requestAudioFormatString},language:{autoDetection:n==null?void 0:n.autoDetectSourceLanguage}}}};return IA.SynthesisContext=e,IA}var pA={},LS;function CU(){if(LS)return pA;LS=1,Object.defineProperty(pA,"__esModule",{value:!0}),pA.SpeakerRecognitionConfig=void 0;const t=oe();let e=class{constructor(n,o){this.privContext=n||new t.Context(null),this.privParameters=o}get parameters(){return this.privParameters}get Context(){return this.privContext}};return pA.SpeakerRecognitionConfig=e,pA}var dA={},OS;function IU(){if(OS)return dA;OS=1,Object.defineProperty(dA,"__esModule",{value:!0}),dA.SpeakerServiceRecognizer=void 0;const t=Ct(),e=Ee(),i=q(),n=oe(),o=Ki;let s=class extends n.ServiceRecognizerBase{constructor(r,a,c,u,l){super(r,a,c,u,l),this.privSpeakerRecognizer=l,this.privSpeakerAudioSource=c,this.recognizeSpeaker=g=>this.recognizeSpeakerOnce(g),this.sendPrePayloadJSONOverride=()=>this.noOp()}processTypeSpecificMessages(r){let a=!1;const c=new i.PropertyCollection;switch(r.messageType===e.MessageType.Text&&c.setProperty(i.PropertyId.SpeechServiceResponse_JsonResult,r.textBody),r.path.toLowerCase()){case"speaker.response":const l=JSON.parse(r.textBody);let g;l.status.statusCode.toLowerCase()!=="success"?g=new i.SpeakerRecognitionResult(l,i.ResultReason.Canceled,i.CancellationErrorCode.ServiceError,l.status.reason):g=new i.SpeakerRecognitionResult(l,i.ResultReason.RecognizedSpeaker),this.privResultDeferral&&this.privResultDeferral.resolve(g),a=!0;break}const u=new e.Deferred;return u.resolve(a),u.promise}cancelRecognition(r,a,c,u,l){if(new i.PropertyCollection().setProperty(n.CancellationErrorCodePropertyName,i.CancellationErrorCode[u]),this.privResultDeferral){const E=new i.SpeakerRecognitionResult({scenario:this.privSpeakerModel.scenario,status:{statusCode:l,reason:l}},i.ResultReason.Canceled,u,l);try{this.privResultDeferral.resolve(E)}catch(C){this.privResultDeferral.reject(C)}}}async recognizeSpeakerOnce(r){this.privSpeakerModel=r,this.voiceProfileType=r.scenario,this.privResultDeferral||(this.privResultDeferral=new e.Deferred),this.privRequestSession.startNewRecognition(),this.privRequestSession.listenForServiceTelemetry(this.privSpeakerAudioSource.events),this.privRecognizerConfig.parameters.setProperty(i.PropertyId.Speech_SessionId,this.privRequestSession.sessionId);const a=this.connectImpl(),c=this.sendPreAudioMessages(this.extractSpeakerContext(r)),u=await this.privSpeakerAudioSource.attach(this.privRequestSession.audioNodeId),l=await this.privSpeakerAudioSource.format,g=await this.privSpeakerAudioSource.deviceInfo,E=new t.ReplayableAudioNode(u,l.avgBytesPerSec);await this.privRequestSession.onAudioSourceAttachCompleted(E,!1),this.privRecognizerConfig.SpeechServiceConfig.Context.audio={source:g};try{await a,await c}catch(S){this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,i.CancellationReason.Error,i.CancellationErrorCode.ConnectionFailure,S)}const C=new i.SessionEventArgs(this.privRequestSession.sessionId);return this.privRecognizer.sessionStarted&&this.privRecognizer.sessionStarted(this.privRecognizer,C),this.receiveMessage(),this.sendAudio(E).then(()=>{},S=>{this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,i.CancellationReason.Error,i.CancellationErrorCode.RuntimeError,S)}),this.privResultDeferral.promise}async sendPreAudioMessages(r){const a=await this.fetchConnection();await this.sendSpeakerRecognition(a,r)}async sendSpeakerRecognition(r,a){const c=JSON.stringify(a);return r.send(new o.SpeechConnectionMessage(e.MessageType.Text,"speaker.context",this.privRequestSession.requestId,"application/json; charset=utf-8",c))}extractSpeakerContext(r){return{features:{interimResult:"enabled",progressiveDetection:"disabled"},profileIds:r.profileIds,scenario:r.scenario}}};return dA.SpeakerServiceRecognizer=s,dA}var SA={},US;function pU(){if(US)return SA;US=1,Object.defineProperty(SA,"__esModule",{value:!0}),SA.VoiceServiceRecognizer=void 0;const t=Ct(),e=Ee(),i=q(),n=oe(),o=Ki;let s=class extends n.ServiceRecognizerBase{constructor(r,a,c,u,l){super(r,a,c,u,l),this.privDeferralMap=new e.DeferralMap,this.privSpeakerAudioSource=c,this.sendPrePayloadJSONOverride=()=>this.noOp()}set SpeakerAudioSource(r){this.privSpeakerAudioSource=r}processTypeSpecificMessages(r){let a=!1;const c=new i.PropertyCollection;switch(r.messageType===e.MessageType.Text&&c.setProperty(i.PropertyId.SpeechServiceResponse_JsonResult,r.textBody),r.path.toLowerCase()){case"speaker.profiles":const l=JSON.parse(r.textBody);switch(l.operation.toLowerCase()){case"create":this.handleCreateResponse(l,r.requestId);break;case"delete":case"reset":this.handleResultResponse(l,r.requestId);break;case"fetch":const p=JSON.parse(r.textBody);this.handleFetchResponse(p,r.requestId);break}a=!0;break;case"speaker.phrases":const g=JSON.parse(r.textBody);this.handlePhrasesResponse(g,r.requestId),a=!0;break;case"speaker.profile.enrollment":const E=JSON.parse(r.textBody),C=new i.VoiceProfileEnrollmentResult(this.enrollmentReasonFrom(E.enrollment?E.enrollment.enrollmentStatus:E.status.statusCode),E.enrollment?JSON.stringify(E.enrollment):void 0,E.status.reason);this.privDeferralMap.getId(r.requestId)&&this.privDeferralMap.complete(r.requestId,C),this.privRequestSession.onSpeechEnded(),a=!0;break}const u=new e.Deferred;return u.resolve(a),u.promise}cancelRecognition(r,a,c,u,l){new i.PropertyCollection().setProperty(n.CancellationErrorCodePropertyName,i.CancellationErrorCode[u]);const E=new i.VoiceProfileEnrollmentResult(i.ResultReason.Canceled,l,l);this.privDeferralMap.getId(a)&&this.privDeferralMap.complete(a,E)}async createProfile(r,a){this.voiceProfileType=r.toString();const c=this.connectImpl();try{const u=new e.Deferred;return await c,await this.sendCreateProfile(u,r,a),this.receiveMessage(),u.promise}catch(u){throw u}}async resetProfile(r){return this.voiceProfileType=r.profileType.toString(),this.sendCommonRequest("reset",r.profileType,r)}async deleteProfile(r){return this.voiceProfileType=r.profileType.toString(),this.sendCommonRequest("delete",r.profileType,r)}async retrieveEnrollmentResult(r){return this.voiceProfileType=r.profileType.toString(),this.privExpectedProfileId=r.profileId,this.sendCommonRequest("fetch",r.profileType,r)}async getAllProfiles(r){return this.voiceProfileType=r.toString(),this.sendCommonRequest("fetch",r)}async getActivationPhrases(r,a){this.voiceProfileType=r.toString();const c=this.connectImpl();try{const u=new e.Deferred;return await c,await this.sendPhrasesRequest(u,r,a),this.receiveMessage(),u.promise}catch(u){throw u}}async enrollProfile(r){this.voiceProfileType=r.profileType.toString();const a=new e.Deferred;this.privRequestSession.startNewRecognition(),this.privRequestSession.listenForServiceTelemetry(this.privSpeakerAudioSource.events),this.privRecognizerConfig.parameters.setProperty(i.PropertyId.Speech_SessionId,this.privRequestSession.sessionId);const c=this.connectImpl(),u=this.sendPreAudioMessages(r,a),l=await this.privSpeakerAudioSource.attach(this.privRequestSession.audioNodeId),g=await this.privSpeakerAudioSource.format,E=await this.privSpeakerAudioSource.deviceInfo,C=new t.ReplayableAudioNode(l,g.avgBytesPerSec);await this.privRequestSession.onAudioSourceAttachCompleted(C,!1),this.privRecognizerConfig.SpeechServiceConfig.Context.audio={source:E};try{await c,await u}catch(I){this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,i.CancellationReason.Error,i.CancellationErrorCode.ConnectionFailure,I)}const p=new i.SessionEventArgs(this.privRequestSession.sessionId);return this.privRecognizer.sessionStarted&&this.privRecognizer.sessionStarted(this.privRecognizer,p),this.receiveMessage(),this.sendAudio(C).then(()=>{},I=>{this.cancelRecognition(this.privRequestSession.sessionId,this.privRequestSession.requestId,i.CancellationReason.Error,i.CancellationErrorCode.RuntimeError,I)}),a.promise}async sendPreAudioMessages(r,a){const c=await this.fetchConnection();this.privRequestSession.onSpeechContext(),this.privDeferralMap.add(this.privRequestSession.requestId,a),await this.sendBaseRequest(c,"enroll",this.scenarioFrom(r.profileType),r)}async sendPhrasesRequest(r,a,c){const u=await this.fetchConnection();this.privRequestSession.onSpeechContext(),this.privDeferralMap.add(this.privRequestSession.requestId,r);const l=this.scenarioFrom(a),g={locale:c,scenario:l};return u.send(new o.SpeechConnectionMessage(e.MessageType.Text,"speaker.profile.phrases",this.privRequestSession.requestId,"application/json; charset=utf-8",JSON.stringify(g)))}async sendCreateProfile(r,a,c){const u=await this.fetchConnection();this.privRequestSession.onSpeechContext(),this.privDeferralMap.add(this.privRequestSession.requestId,r);const l=a===i.VoiceProfileType.TextIndependentIdentification?"TextIndependentIdentification":a===i.VoiceProfileType.TextIndependentVerification?"TextIndependentVerification":"TextDependentVerification",g={locale:c,number:"1",scenario:l};return u.send(new o.SpeechConnectionMessage(e.MessageType.Text,"speaker.profile.create",this.privRequestSession.requestId,"application/json; charset=utf-8",JSON.stringify(g)))}async sendCommonRequest(r,a,c=void 0){const u=this.connectImpl();try{const l=new e.Deferred;this.privRequestSession.onSpeechContext(),await u;const g=await this.fetchConnection();return this.privDeferralMap.add(this.privRequestSession.requestId,l),await this.sendBaseRequest(g,r,this.scenarioFrom(a),c),this.receiveMessage(),l.promise}catch(l){throw l}}async sendBaseRequest(r,a,c,u){const l={scenario:c};return u?l.profileIds=[u.profileId]:l.maxPageSize=-1,r.send(new o.SpeechConnectionMessage(e.MessageType.Text,`speaker.profile.${a}`,this.privRequestSession.requestId,"application/json; charset=utf-8",JSON.stringify(l)))}extractSpeakerContext(r){return{features:{interimResult:"enabled",progressiveDetection:"disabled"},profileIds:r.profileIds,scenario:r.scenario}}handlePhrasesResponse(r,a){if(this.privDeferralMap.getId(a))if(r.status.statusCode.toLowerCase()!=="success"){const c=i.ResultReason.Canceled,u=new i.VoiceProfilePhraseResult(c,r.status.statusCode,r.passPhraseType,[]);this.privDeferralMap.complete(a,u)}else if(r.phrases&&r.phrases.length>0){const c=i.ResultReason.EnrollingVoiceProfile,u=new i.VoiceProfilePhraseResult(c,r.status.statusCode,r.passPhraseType,r.phrases);this.privDeferralMap.complete(a,u)}else throw new Error("Voice Profile get activation phrases failed, no phrases received");else throw new Error(`Voice Profile get activation phrases request for requestID ${a} not found`)}handleCreateResponse(r,a){if(r.profiles&&r.profiles.length>0)if(this.privDeferralMap.getId(a)){const c=r.profiles.map(u=>u.profileId);this.privDeferralMap.complete(a,c)}else throw new Error(`Voice Profile create request for requestID ${a} not found`);else throw new Error("Voice Profile create failed, no profile id received")}handleResultResponse(r,a){if(this.privDeferralMap.getId(a)){const c=r.operation.toLowerCase()==="delete"?i.ResultReason.DeletedVoiceProfile:i.ResultReason.ResetVoiceProfile,u=r.status.statusCode.toLowerCase()==="success"?c:i.ResultReason.Canceled,l=new i.VoiceProfileResult(u,`statusCode: ${r.status.statusCode}, errorDetails: ${r.status.reason}`);this.privDeferralMap.complete(a,l)}else throw new Error(`Voice Profile create request for requestID ${a} not found`)}handleFetchResponse(r,a){if(this.privDeferralMap.getId(a)&&r.profiles[0]){if(this.privExpectedProfileId&&r.profiles.length===1&&r.profiles[0].profileId===this.privExpectedProfileId){this.privExpectedProfileId=void 0;const c=r.profiles[0],u=new i.VoiceProfileEnrollmentResult(this.enrollmentReasonFrom(c.enrollmentStatus),JSON.stringify(c),r.status.reason);this.privDeferralMap.complete(a,u)}else if(r.profiles.length>0){const c=r.profiles,u=[];for(const l of c)u.push(new i.VoiceProfileEnrollmentResult(this.enrollmentReasonFrom(l.enrollmentStatus),JSON.stringify(l),r.status.reason));this.privDeferralMap.complete(a,u)}}else throw new Error(`Voice Profile fetch request for requestID ${a} not found`)}enrollmentReasonFrom(r){switch(r.toLowerCase()){case"enrolled":return i.ResultReason.EnrolledVoiceProfile;case"invalidlocale":case"invalidphrase":case"invalidaudioformat":case"invalidscenario":case"invalidprofilecount":case"invalidoperation":case"audiotooshort":case"audiotoolong":case"toomanyenrollments":case"storageconflict":case"profilenotfound":case"incompatibleprofiles":case"incompleteenrollment":return i.ResultReason.Canceled;default:return i.ResultReason.EnrollingVoiceProfile}}scenarioFrom(r){return r===i.VoiceProfileType.TextIndependentIdentification?"TextIndependentIdentification":r===i.VoiceProfileType.TextIndependentVerification?"TextIndependentVerification":"TextDependentVerification"}};return SA.VoiceServiceRecognizer=s,SA}var NS={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.type=t.connectivity=t.Device=t.OS=t.System=t.Context=t.SpeechServiceConfig=void 0;class e{constructor(r){this.context=r}serialize(){return JSON.stringify(this,(r,a)=>{if(a&&typeof a=="object"&&!Array.isArray(a)){const c={};for(const u in a)Object.hasOwnProperty.call(a,u)&&(c[u&&u.charAt(0).toLowerCase()+u.substring(1)]=a[u]);return c}return a})}get Context(){return this.context}get Recognition(){return this.recognition}set Recognition(r){this.recognition=r.toLowerCase()}}t.SpeechServiceConfig=e;class i{constructor(r){this.system=new n,this.os=r}}t.Context=i;class n{constructor(){const r="1.44.0";this.name="SpeechSDK",this.version=r,this.build="JavaScript",this.lang="JavaScript"}}t.System=n;class o{constructor(r,a,c){this.platform=r,this.name=a,this.version=c}}t.OS=o;class s{constructor(r,a,c){this.manufacturer=r,this.model=a,this.version=c}}t.Device=s,function(A){A.Bluetooth="Bluetooth",A.Wired="Wired",A.WiFi="WiFi",A.Cellular="Cellular",A.InBuilt="InBuilt",A.Unknown="Unknown"}(t.connectivity||(t.connectivity={})),function(A){A.Phone="Phone",A.Speaker="Speaker",A.Car="Car",A.Headset="Headset",A.Thermostat="Thermostat",A.Microphones="Microphones",A.Deskphone="Deskphone",A.RemoteControl="RemoteControl",A.Unknown="Unknown",A.File="File",A.Stream="Stream"}(t.type||(t.type={}))})(NS);var KS;function oe(){return KS||(KS=1,function(t){var e=De&&De.__createBinding||(Object.create?function(s,A,r,a){a===void 0&&(a=r),Object.defineProperty(s,a,{enumerable:!0,get:function(){return A[r]}})}:function(s,A,r,a){a===void 0&&(a=r),s[a]=A[r]}),i=De&&De.__exportStar||function(s,A){for(var r in s)r!=="default"&&!Object.prototype.hasOwnProperty.call(A,r)&&e(A,s,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.AutoDetectSourceLanguagesOpenRangeOptionName=t.ForceDictationPropertyName=t.ServicePropertiesPropertyName=t.CancellationErrorCodePropertyName=t.OutputFormatPropertyName=t.SpeechSynthesisAdapter=t.AvatarSynthesisAdapter=void 0,i(Ba,t),i(ba,t),i(Qr,t),i(fI,t),i(wI,t),i(oO(),t),i(sO(),t),i(Mc,t),i(AO(),t),i(aO(),t),i(cO(),t),i(kd,t),i(Bc,t),i(lO(),t),i(gO(),t),i(EO(),t),i(hO(),t),i(dd(),t),i(CO(),t),i(qd,t),i(IO(),t),i(vc,t),i(dO(),t),i(SO(),t),i(wc,t),i(mc,t),i(Qc,t),i(MO(),t),i(BO(),t),i(vO(),t),i(fO(),t),i(wO(),t),i(Rc,t),i(QO(),t),i(Dc,t),i(oS,t),i(yc,t),i(Oc,t),i(Uc,t),i(kO(),t),i(Fc,t),i(rU(),t),i(Ag,t),i(aU(),t),i(cU(),t);var n=uU();Object.defineProperty(t,"AvatarSynthesisAdapter",{enumerable:!0,get:function(){return n.AvatarSynthesisAdapter}});var o=lU();Object.defineProperty(t,"SpeechSynthesisAdapter",{enumerable:!0,get:function(){return o.SpeechSynthesisAdapter}}),i(gU(),t),i(EU(),t),i(hU(),t),i(CU(),t),i(IU(),t),i(pU(),t),i(NS,t),t.OutputFormatPropertyName="OutputFormat",t.CancellationErrorCodePropertyName="CancellationErrorCode",t.ServicePropertiesPropertyName="ServiceProperties",t.ForceDictationPropertyName="ForceDictation",t.AutoDetectSourceLanguagesOpenRangeOptionName="UND"}(El)),El}(function(t){var e=De&&De.__createBinding||(Object.create?function(o,s,A,r){r===void 0&&(r=A),Object.defineProperty(o,r,{enumerable:!0,get:function(){return s[A]}})}:function(o,s,A,r){r===void 0&&(r=A),o[r]=s[A]}),i=De&&De.__exportStar||function(o,s){for(var A in o)A!=="default"&&!Object.prototype.hasOwnProperty.call(s,A)&&e(s,o,A)};Object.defineProperty(t,"__esModule",{value:!0});const n=oe();new n.AgentConfig,i(q(),t)})(Si);const wt=[];for(let t=0;t<256;++t)wt.push((t+256).toString(16).slice(1));function dU(t,e=0){return(wt[t[e+0]]+wt[t[e+1]]+wt[t[e+2]]+wt[t[e+3]]+"-"+wt[t[e+4]]+wt[t[e+5]]+"-"+wt[t[e+6]]+wt[t[e+7]]+"-"+wt[t[e+8]]+wt[t[e+9]]+"-"+wt[t[e+10]]+wt[t[e+11]]+wt[t[e+12]]+wt[t[e+13]]+wt[t[e+14]]+wt[t[e+15]]).toLowerCase()}let cg;const SU=new Uint8Array(16);function MU(){if(!cg){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");cg=crypto.getRandomValues.bind(crypto)}return cg(SU)}const FS={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function BU(t,e,i){var o;if(FS.randomUUID&&!e&&!t)return FS.randomUUID();t=t||{};const n=t.random??((o=t.rng)==null?void 0:o.call(t))??MU();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){if(i=i||0,i<0||i+16>e.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let s=0;s<16;++s)e[i+s]=n[s];return e}return dU(n)}const Nr=ct(),GS=ze(),Kr=f(""),qn=f(""),Fr=f(""),Ft=f(""),xS=f("");let Cn=null;const jS=4e3;kt(async()=>{await ug()});let it=null,Gr=null,Bi=null,Yc=null;const xr=()=>{Bi&&Bi.mute(),it&&(it.close(),it=null),Gr=null},ug=async()=>{var t,e,i;try{const n=await zt("/fetchCompletionSubDemo1");return(t=n==null?void 0:n.data)==null?void 0:t.token}catch(n){if(console.error(n),me.isAxiosError(n)){const o=n;console.log("Error found!"),console.error((e=o.response)==null?void 0:e.data),Nr.setError(((i=o.response)==null?void 0:i.data).message)}else Nr.setError("There was an issue while fetching data")}},lg=()=>{Cn&&clearTimeout(Cn),Yc&&(Yc.stopContinuousRecognitionAsync(()=>{},t=>{console.error("Error stopping recognition",t)}),Yc=null)},vU=async t=>{const e=await ug();return await xr(),new Promise((i,n)=>{const o=Si.SpeechConfig.fromAuthorizationToken(e,"eastus2");o.speechSynthesisVoiceName="en-US-EmmaMultilingualNeural",Bi=new Si.SpeakerAudioDestination;const s=Si.AudioConfig.fromSpeakerOutput(Bi);it=new Si.SpeechSynthesizer(o,s);const A=BU();Gr=A,it.speakTextAsync(t,r=>{if(A!==Gr)return Bi==null||Bi.mute(),it==null||it.close(),it=null,i();r.reason===Si.ResultReason.SynthesizingAudioCompleted?i():n(new Error("Speech synthesis failed")),it==null||it.close(),it=null,Gr=null},r=>{if(A!==Gr)return Bi==null||Bi.mute(),it==null||it.close(),it=null,i();it==null||it.close(),it=null,Gr=null,n(r)})})},fU=async t=>{const e=await ug(),i=Si.SpeechConfig.fromAuthorizationToken(e,"eastus2");i.speechRecognitionLanguage="en-US";const n=Si.AudioConfig.fromDefaultMicrophoneInput(),o=new Si.SpeechRecognizer(i,n);return Yc=o,Kr.value="",qn.value="",o.recognizing=(s,A)=>{A.result.text&&A.result.text.trim()&&(Kr.value=A.result.text.trim(),xr(),GS.userspeaking=!0,GS.userSpeechText=(qn.value?qn.value+" ":"")+Kr.value,Ft.value="user",Cn&&clearTimeout(Cn),Cn=setTimeout(()=>{Kr.value&&(t(Kr.value.trim()),Kr.value="")},jS))},o.recognized=(s,A)=>{A.result.reason===Si.ResultReason.RecognizedSpeech&&A.result.text&&A.result.text.trim()&&(qn.value+=" "+A.result.text.trim(),Cn&&clearTimeout(Cn),Cn=setTimeout(()=>{qn.value&&(t(qn.value),qn.value="")},jS))},o.canceled=(s,A)=>{console.error("Recognition canceled:",A)},o.startContinuousRecognitionAsync(),o},wU=async()=>{var t,e;Fr.value="",xS.value="";try{console.log("before stopping TTS"),xr(),console.log("after stopping TTS"),console.log("in startRecognition function"),await fU(i=>{i&&(console.log("STT recognized:",i),Fr.value=i)})}catch(i){if(console.error(i),me.isAxiosError(i)){const n=i;console.log("Error found!"),console.error((t=n.response)==null?void 0:t.data),Nr.setError(((e=n.response)==null?void 0:e.data).message)}else Nr.setError("There was an issue while fetching data")}},kS=async t=>{var e,i;console.log("playRecognition called",t),xS.value="";try{(Ft.value=="user"||Ft.value=="listening")&&xr(),await vU(t)}catch(n){if(console.error(n),me.isAxiosError(n)){const o=n;console.log("Error found!"),console.error((e=o.response)==null?void 0:e.data),Nr.setError(((i=o.response)==null?void 0:i.data).message)}else Nr.setError("There was an issue while fetching data")}};ze();const YS=ct(),jr=f(!1),MA=f("");f(""),f(""),kt(()=>{console.log("Mounted voiceService11Labs")});const mU=async()=>{var t,e,i,n;try{const o=await zt("/fetchCompletionSubDemo1?ellevenLabs=true");return console.log("response",(t=o==null?void 0:o.data)==null?void 0:t.token),(e=o==null?void 0:o.data)==null?void 0:e.token}catch(o){if(console.error(o),me.isAxiosError(o)){const s=o;console.log("Error found!"),console.error((i=s.response)==null?void 0:i.data),YS.setError(((n=s.response)==null?void 0:n.data).message)}else YS.setError("There was an issue while fetching data")}};let zc;const QU="Xb7hH8MSUJpSbSDYk0k2";f(!1);const RU=f("");let Pc=[];const zS=f(!1);let kr=!1,Gt=null,BA=null,In=null;f("");let Vn,Wn,Yr,zr;function gg(){zr&&zr.disconnect(),Wn&&Wn.disconnect(),console.log("microphone outside->",Yr),Yr&&(console.log("microphone->",Yr),console.log("Stopping microphone connection"),Yr.disconnect()),Vn&&Vn.close()}function DU(t,e=.09){console.log("monitorMicDuringTTS called with threshold:",e),Vn=new(window.AudioContext||window.webkitAudioContext),Wn=Vn.createAnalyser(),Yr=Vn.createMediaStreamSource(BA),zr=Vn.createScriptProcessor(2048,1,1),Yr.connect(Wn),Wn.connect(zr),zr.connect(Vn.destination),zr.onaudioprocess=()=>{const i=new Uint8Array(Wn.frequencyBinCount);Wn.getByteFrequencyData(i);const n=i.reduce((o,s)=>o+s)/i.length;console.log("Average volume:",n),console.log("threshold * 100:",e*100),n>e*100&&(t(),console.log("onInterrupt",t),gg())}}async function Eg(){zS.value=!0,jr.value=!0,console.log("Starting voice recognition with ElevenLabs"),Gt&&Gt.pause(),BA=await navigator.mediaDevices.getUserMedia({audio:!0}),await yU()}async function yU(){if(!BA)throw new Error("micStream is null");In=new MediaRecorder(BA),Pc=[],console.log("Starting beginListening with ElevenLabs"),In.ondataavailable=t=>{Gt&&Gt.pause(),t.data.size>0&&Pc.push(t.data),console.log("Audio chunk available:",Pc)},In.onstop=async()=>{const t=new Blob(Pc,{type:"audio/webm"}),e=await LU(t);RU.value=e,console.log("Transcription:",e),MA.value=e,zS.value=!1},In.start(),Gt&&Gt.pause(),TU(BA,()=>{(In==null?void 0:In.state)==="recording"&&In.stop()})}function TU(t,e,i=1500,n=.08){const o=new(window.AudioContext||window.webkitAudioContext),s=o.createAnalyser(),A=o.createMediaStreamSource(t),r=o.createScriptProcessor(2048,1,1);s.smoothingTimeConstant=.8,s.fftSize=1024,A.connect(s),s.connect(r),r.connect(o.destination);let a=performance.now();r.onaudioprocess=()=>{const c=new Uint8Array(s.frequencyBinCount);s.getByteFrequencyData(c),c.reduce((l,g)=>l+g)/c.length<n*100?performance.now()-a>i&&(e(),r.disconnect(),s.disconnect(),A.disconnect(),o.close()):a=performance.now()}}async function LU(t){console.log("authToken 11labs",zc);const e=new FormData;e.append("file",t,"recording.webm"),e.append("model_id","scribe_v1");const i=await fetch("https://api.elevenlabs.io/v1/speech-to-text?language_code=eng",{method:"POST",headers:{"xi-api-key":zc},body:e}),n=await i.json();return i.ok?(n==null?void 0:n.text)||"[No transcription result]":(console.error("Transcription error:",n),"[Error in transcription]")}async function PS(t){console.log("speakText11Labs called with text:",t),zc=await mU(),Gt&&Gt.pause(),kr=!0;const i=await(await fetch(`https://api.elevenlabs.io/v1/text-to-speech/${QU}`,{method:"POST",headers:{"xi-api-key":zc,"Content-Type":"application/json"},body:JSON.stringify({text:t,model_id:"eleven_monolingual_v1",voice_settings:{stability:.5,similarity_boost:.5}})})).blob(),n=URL.createObjectURL(i);return Gt=new Audio(n),new Promise(o=>{Gt&&(Gt.onended=async()=>{kr=!1,console.log("Audio is playing:",kr),jr.value?(console.log("micEnabled before calling startrecognition:",jr.value),o(await Eg())):o()},Gt.play(),console.log("Audio is playing:",kr),console.log("micEnabled:",jr.value),jr.value&&DU(()=>{Gt&&(Gt.pause(),Gt.currentTime=0),kr=!1,console.log("monitorMicDuringTTS:",kr),console.log("micEnabled before calling startrecognition:",jr.value),Eg()}))})}const OU={class:"max-h-screen overflow-auto md:p-6 p-3 flex flex-col items-center justify-center gap-4 text-[#161916] fontFormattingAMA"},UU=h("div",{class:"text-[22px] font-[700]"},"Please Note Before You Begin",-1),NU=h("ul",{className:"list-disc max-h-[40vh] overflow-auto space-y-3 pl-6 text-[#102345] text-[15px]"},[h("li",null,"Stay expressive — this is an interactive role-play."),h("li",null,[Rt("The session may take up to "),h("b",{class:"font-[600]"},"10 minutes"),Rt(".")]),h("li",null,"Choose a quiet space and ensure your mic and internet are working."),h("li",null,[Rt("In Voice Mode? Click "),h("span",{class:"font-[600]"},"“Turn on Mic”"),Rt(" to begin.")]),h("li",null,"Don’t mute until your response is fully processed.")],-1),KU={class:"flex items-end justify-start"},FU={class:"fontFormattingAMA w-full bg-gray-100 rounded-lg"},GU={class:"w-full rounded-md px-3 py-2 text-lg font-bold text-black md:text-[22px]"},xU={class:"w-full px-3 py-2 text-base text-black md:text-[16px] font-[550]"},jU={key:0,class:"fontFormattingAMA"},kU=h("br",null,null,-1),YU=` You're about to step into a realistic, voice-based client conversation powered by AI.
35
- This is a role-play simulation designed to mirror real-world scenarios. Just follow the prompts, speak naturally, and let the AI guide you. Based on your responses, you’ll receive personalized feedback to help sharpen your client engagement skills.`,zU=Re({__name:"greetingsSimulation",setup(t){const e=ze(),i=ct(),n=f(!1),o=f(!1),s=f(!0),A=()=>{e.simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"?(e.beginFlag=!1,n.value=!0):(e.beginFlag=!1,C())},r=`Hi, get ready to test your ${e.skillNameForSimulation||"Unknown"} knowledge! Here’s what to expect:`,a=` Hi ${e.learnerName||"Expert"}, and welcome!`,c=` Hi, ${e.learnerName||"Expert"}. Get ready to test your ${e.skillNameForSimulation||"Unknown"} knowledge! Here’s what to expect:`,u=tt(()=>["32b7d6d8-f7a8-40a0-ab84-8784f25897ef"].includes(e.simulationSkill)?r:["7bd03cb6-79ad-4e2a-8a8b-88dc16147369"].includes(e.simulationSkill)?a:c),l=`Hi, get ready to test your ${e.skillNameForSimulation||"Unknown"} knowledge! Here’s what to expect:`,g=` AI Guru will ask you a few questions on '${e.skillNameForSimulation.trim()||"Unknown"} '. Please provide detailed and thoughtful answers to the best of your knowledge. At the end, you'll receive a feedback, outlining your strengths and improvement areas.`,E=tt(()=>["32b7d6d8-f7a8-40a0-ab84-8784f25897ef"].includes(e.simulationSkill)?l:["7bd03cb6-79ad-4e2a-8a8b-88dc16147369"].includes(e.simulationSkill)?YU:g),C=async()=>{var p,S,I,d,M,B;console.log("firstQuestion fired==>"),s.value=!1;try{const D={question:"Hello, let's start"};if(e.conversations.push(D),e.assessmentQuestion){const L={past_messages:e.past_messages,question:"Let's begin",bandCode:e.band_code,userGenomeFunction:e.genomeFunctionValue,userGenomeRole:e.genomeRoleValue,skillId:e.simulationSkill||"937e84ef-e95d-4327-9afe-e7be2bf420eb"},U=f("");e.dotLoader=!0,Ft.value="listening";const Q=await ot("/sqlTest",L);e.addConversation((p=Q.data)==null?void 0:p.body,"new"),U.value=(I=(S=Q==null?void 0:Q.data)==null?void 0:S.body)==null?void 0:I.answer,e.dotLoader=!1,Ft.value="bot",e.showVoiceComponent&&(e.elevenLabs?await PS(U.value.replace(/[*#]/g,"")):await kS(U.value.replace(/[*#]/g,"")))}else{o.value=!0,e.dotLoader=!0,console.log("firstQuestion fired==> else part");const L={assessmentId:e.simulationSkill,question:"Hello, Let's begin",past_messages:e.past_messages,prompt:e.generatedPrompt,assessmentType:e.assessmentType,userFunction:e.genomeFunctionValue,empSeniority:e.empSeniority,functionRole:e.functionRole,userBand:e,storeFinalFeedback:e.storeFinalFeedback,storeFinalScore:e.storeFinalScore};let U;$t==="prod"?U="/ManualExportActivity":U="/fetchCompletionDemo";const Q=await ot(U,L);e.addConversation((d=Q.data)==null?void 0:d.body,"assessment"),e.dotLoader=!1}}catch(D){if(console.error(D),me.isAxiosError(D)){const L=D;console.log("Error found!"),console.error((M=L.response)==null?void 0:M.data),i.setError(((B=L.response)==null?void 0:B.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(p,S)=>(m(),R("section",null,[ne(fr,{"is-visible":n.value},{default:hi(()=>[h("div",OU,[UU,NU,h("button",{onClick:S[0]||(S[0]=I=>{n.value=!1,C()}),class:"bg-[#021c42] rounded-md px-4 py-1.5 text-center text-[16px] text-white cursor-pointer italic hover:bg-blue-700"}," Proceed ")])]),_:1},8,["is-visible"]),h("div",KU,[h("div",FU,[h("div",GU,de(u.value),1),h("div",xU,de(E.value),1)])]),y(e).beginFlag?(m(),R("span",jU,[h("button",{type:"button",id:"button",onClick:A,class:"mt-4 bg-[#021c42] rounded-md px-4 py-1.5 text-center text-[16px] text-white cursor-pointer italic hover:bg-blue-700"}," Let's begin ")])):Be("",!0),kU]))}}),PU="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAB9AH0DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5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-5495a945"),t=t(),At(),t),bU={class:"fontFormattingAMA flex items-end justify-start py-2"},JU={class:"line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg"},HU=["innerHTML"],qU=["innerHTML"],VU={key:0,class:"py-4"},WU={class:"fontFormattingAMA px-2 py-1.5 md:px-6"},ZU=["value","disabled","name"],XU={for:"item",name:"options-Array",id:"index"},_U={key:1,class:"py-4"},$U={class:"fontFormattingAMA px-2 py-1.5 md:px-6"},eN=["onClick","disabled","name"],tN={for:"item",name:"options-Array",id:"index"},iN={key:2,class:"flex flex-col justify-start py-10"},nN=[hg(()=>h("div",{class:"mb-4"}," Add Agentic AI to your Digital Skills on Genome.ai and start mastering AI today! ",-1)),hg(()=>h("img",{class:"h-20 w-20",src:PU,alt:"qr_code"},null,-1))],rN={key:3,class:"flex flex-col justify-start items-start mt-4 bg-gray-100 rounded-lg"},oN=hg(()=>h("div",{class:""},[Rt(" Please select interaction mode below "),h("span",{class:"italic"},"(Note: once selected the mode can't be changed during the interaction. You need to re-start to change the interaction mode)")],-1)),sN={class:"flex justify-start items-center md:gap-[40px] gap-[30px]"},AN=Re({__name:"responseSimulation",props:{question:{type:String,required:!0},c2question:{type:String,required:!0},answer:{type:String,required:!0},questionId:{type:String,required:!0},showFeedback:{type:Boolean,default:!0},showSources:{type:String,default:""},relatedQues:{type:Array,required:!0},optionsArray:{type:Array,default:[]},ansId:{type:Number,default:0}},emits:["char-typed"],setup(t,{emit:e}){const i=t,n=f([]),o=f(!1),s=ze(),A=f("");let r=[],a="";const c=async()=>{console.log("startCharByChar "),r=a.split(""),A.value="";for(let E=0;E<r.length;E++)A.value+=r[E],E%30&&e("char-typed"),await new Promise(C=>setTimeout(C,50))},u=()=>{s.showSelectTypeConvesation=!1,s.isRestart=!0,s.showModelToggle=!1,s.isSpeechToggle=!1,console.log("text mode",s.isSpeechToggle)},l=()=>{s.isRestart=!0,s.beginFlag=!0,s.showVoiceComponent=!0,s.showSelectTypeConvesation=!1,s.showModelToggle=!0,s.isSpeechToggle=!1,console.log("text mode",s.isSpeechToggle)},g=tt(()=>{const E=i.answer.replace(/[*#]/g,"").replace(/Assessment Rating & Feedback/g,'<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>').replace(/BEGIN ROLE PLAY./g,'<div style="font-size: 18px; font-weight: bold;">BEGIN ROLE PLAY</div>');(E.includes("Thank you for your participation!")||E.includes("Thank you for your participation"))&&(s.searchBoxdisable=!1,o.value=!0),(E.includes("BEGIN ROLE PLAY")||E.includes("BEGIN ROLE PLAY."))&&(s.showSelectTypeConvesation=!0);const C=/\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;if(E.includes("AI Guru")){if(E.includes("AI Guru"))return console.log("aig found"),E.replace(C,(p,S,I)=>`<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${S}</a>`)}else return E.replace(C,(p,S,I)=>`<a href="${I}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${S}</a>`);if(E.includes("Assessment Rating & Feedback")){const p=E.split("Assessment Rating & Feedback")[0],S=E.split("Assessment Rating & Feedback")[1];s.conversations.push(p),s.conversations.push(S)}});return Qi(()=>i.answer,()=>{let E=i.answer.replace(/[*#]/g,"").replace(/Assessment Rating & Feedback/g,'<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>');const C=/\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;if(E.includes("AI Guru")?E=E.replace(C,(p,S,I)=>`<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${S}</a>`):E=E.replace(C,(p,S,I)=>`<a href="${I}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${S}</a>`),E.includes("Assessment Rating & Feedback")){const p=E.split("Assessment Rating & Feedback")[0],S=E.split("Assessment Rating & Feedback")[1];s.conversations.push(p),s.conversations.push(S)}a=E,s.showVoiceComponent&&c(),console.log("watch for startCharByChar")},{immediate:!0}),Qi(n,E=>{s.question=(E??[]).join(", "),console.log("selectedOptions",E)}),(E,C)=>(m(),R("div",bU,[h("div",JU,[y(s).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"&&y(s).showVoiceComponent===!0&&y(s).conversations.length-1===i.ansId&&!i.answer.includes("BEGIN ROLE PLAY")?(m(),R("span",{key:0,class:"fontFormattingAMA",innerHTML:A.value},null,8,HU)):(m(),R("span",{key:1,class:"fontFormattingAMA",innerHTML:g.value},null,8,qU)),h("div",null,[t.optionsArray.length&&y(s).mcqType==="multi_choice"?(m(),R("div",VU,[(m(!0),R(Le,null,lt(t.optionsArray,(p,S)=>(m(),R("div",{key:S,class:"italic"},[h("div",WU,[Ye(h("input",{class:"mr-4 cursor-pointer",type:"checkbox",value:p,"onUpdate:modelValue":C[0]||(C[0]=I=>n.value=I),disabled:y(s).conversations.length-1!==i.ansId,name:g.value},null,8,ZU),[[xv,n.value]]),h("label",XU,de(p),1)])]))),128))])):t.optionsArray.length?(m(),R("div",_U,[(m(!0),R(Le,null,lt(t.optionsArray,(p,S)=>(m(),R("div",{key:S,class:"italic"},[h("div",$U,[h("input",{class:"mr-4 cursor-pointer",type:"radio",onClick:I=>y(s).question=String(t.optionsArray[S]),disabled:y(s).conversations.length-1!==i.ansId,name:g.value},null,8,eN),h("label",tN,de(p),1)])]))),128))])):Be("",!0)]),o.value&&y(s).simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ef"?(m(),R("div",iN,nN)):Be("",!0),y(s).isSpeechToggle&&y(s).showSelectTypeConvesation&&y(s).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"&&y(s).conversations.length-1===i.ansId?(m(),R("div",rN,[oN,h("div",sN,[h("button",{type:"button",id:"button",onClick:C[1]||(C[1]=p=>u()),class:"mt-4 w-32 cursor-pointer bg-[#021c42] hover:bg-blue-700 italic rounded-md px-4 py-1.5 text-center text-white text-[16px]"}," Text Mode "),h("button",{type:"button",id:"button",onClick:C[2]||(C[2]=p=>l()),class:"mt-4 w-32 cursor-pointer bg-[#021c42] hover:bg-blue-700 italic rounded-md px-4 py-1.5 text-center text-white text-[16px]"}," Voice Mode ")])])):Be("",!0)])]))}}),Ok="",aN=Pe(AN,[["__scopeId","data-v-5495a945"]]),cN={class:"flex justify-end items-end py-3"},uN={class:"max-w-[80%]"},lN={class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},gN=Re({__name:"learnerSimulation",props:{question:{type:String,required:!0},showFeedback:{type:Boolean,default:!0}},setup(t){return(e,i)=>(m(),R("div",cN,[h("div",uN,[h("div",lN,de(t.question),1)])]))}}),EN=t=>(st("data-v-347ad6de"),t=t(),At(),t),hN={class:"flex w-full flex-col items-start justify-start bg-white"},CN={class:"bot-typing-animation gap-1"},IN={class:"block w-full text-lg italic text-gray-800"},pN=EN(()=>h("span",{class:"dot-animation"},[h("span",null,"."),h("span",null,"."),h("span",null,".")],-1)),dN=cr('<div class="block w-full max-w-full items-stretch" data-v-347ad6de><div class="flex animate-pulse items-start justify-start space-x-4" data-v-347ad6de><div class="flex-1 space-y-6 py-1" data-v-347ad6de><div class="h-2 w-full rounded bg-gray-300" data-v-347ad6de></div><div class="space-y-3" data-v-347ad6de><div class="grid grid-cols-3 gap-4" data-v-347ad6de><div class="col-span-2 h-2 rounded bg-gray-300" data-v-347ad6de></div><div class="col-span-1 h-2 rounded bg-gray-300" data-v-347ad6de></div></div><div class="h-2 rounded bg-gray-300" data-v-347ad6de></div></div></div></div></div>',1),SN=Re({__name:"LoadingResponse",setup(t){const e=f("Generating response"),i=f(["This may take a few seconds","Fetching the best response for you","Thinking... give me a moment","One moment while I gather the information","Hang in tight, we are almost there","Almost there... just a bit longer","Compiling a response for you"]);return setTimeout(()=>{const n=Math.floor(Math.random()*i.value.length);e.value=i.value[n]},15e3),(n,o)=>(m(),R("div",hN,[h("div",CN,[h("div",IN,de(e.value),1),pN]),dN]))}}),Uk="",MN=Pe(SN,[["__scopeId","data-v-347ad6de"]]),BN={class:"flex mx-auto justify-end items-end py-3"},vN={class:"max-w-[80%]"},fN={class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},wN=Re({__name:"QuestionStreaming",setup(t){const e=ze();return(i,n)=>(m(),R("div",BN,[h("div",vN,[h("div",fN,de(y(e).userSpeechText),1)])]))}}),mN={key:0},QN={key:1},RN={key:0,class:"flex"},DN={key:1,name:"askQuestion"},yN=Re({__name:"conversationSimulation",setup(t){let e=f(""),i=f("");e.value='<a style="color:#00AECF;"',i.value='<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';const n=ze(),o=f(),s=()=>{o.value.scrollTo(0,o.value.scrollHeight)};return kt(()=>{var a;const A=document.getElementsByName("askQuestion"),r=Array.from(A);console.log("New array===>",r),A.length&&((a=r==null?void 0:r.pop())==null||a.scrollIntoView({behavior:"smooth",block:"center"})),window.addEventListener("custom-event",s)}),VA(()=>{var a;const A=document.getElementsByName("askQuestion"),r=Array.from(A);console.log("New array===>",r),A.length&&((a=r==null?void 0:r.pop())==null||a.scrollIntoView({behavior:"smooth",block:"center"}))}),ar(()=>{window.removeEventListener("custom-event",s)}),(A,r)=>(m(),R("div",{ref_key:"nestedElement",ref:o,class:"smooth-scroll overflow-auto md:px-6 px-2"},[ne(zU),(m(!0),R(Le,null,lt(y(n).conversations,(a,c)=>(m(),R("div",{key:c},[a.question?(m(),R("div",mN,[ne(gN,{question:a.question,c2question:a.c2question,"show-feedback":a.showFeedback,id:`qId${c}`,name:"askQuestion","que-id":c},null,8,["question","c2question","show-feedback","id","que-id"])])):Be("",!0),a.answer?(m(),R("div",QN,[ne(aN,{question:a==null?void 0:a.question,c2question:a==null?void 0:a.c2question,"show-sources":a==null?void 0:a.showSources,questionId:a.id,answer:a.answer.replaceAll("<a",y(e)).replaceAll("<ul",y(i)),"show-feedback":a.showFeedback,"related-ques":a.relatedQues,"options-array":a.optionsArray,"ans-id":c,onCharTyped:s},null,8,["question","c2question","show-sources","questionId","answer","show-feedback","related-ques","options-array","ans-id"])])):Be("",!0)]))),128)),y(n).dotLoader?(m(),R("div",RN,[ne(MN)])):Be("",!0),y(n).userspeaking?(m(),R("div",DN,[ne(wN)])):Be("",!0)],512))}}),Nk="",TN=Pe(yN,[["__scopeId","data-v-e55a322f"]]),Cg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAYCAYAAAARfGZ1AAABSUlEQVR4nLXWvUocURTA8d/eQosEgmQL0RRTRFCMhYKPYcDCIrUsPoCQNvMEYmEgRYp09luElPsIVmKKJIX4UUQJxMJAXC1mL4zLzjq7O/OHA/P5v+ecmbl3GsoxjVnM4S8u8bvkvYXCFr7hH+774if2sTKqeAu/BggHxR2+oPmUtIG0pLQ/TrE2TP5xTHGMayzkM43s4BMkSSJJkqeqfESn04mbJ1jHTTzQxJ+YQZqm96PSV0EKoSd/jxcjpTqcXTSDrDXvKhTDc7wNWMWriuWwEbBYgxiWguyTroP5IHu6ddANOK9JfhZkL30dfA84ks0LVdOOPT+sWHyDdtyZwZXJJq18fOgfrVWR+BjPBpVzMKH4Cq+LehUXi+4Y4h94UyTOs9m7uIz0Pz7jZRlxZArb+Irbgkz3sFwkaBSdGDBQ/tfiQrakDeUBf+jdzbi9K1QAAAAASUVORK5CYII=",LN={class:"flex items-center gap-4 py-2 rounded-full z-10"},ON={key:0,class:"flex items-center"},UN={width:"30",height:"30",viewBox:"0 0 36 24",class:"fill-white",style:{transform:"scaleX(-1)"}},NN=[cr('<rect x="0" y="11" width="2" height="2" rx="1"><animate attributeName="height" values="2;6;2" dur="1s" repeatCount="indefinite" begin="0s"></animate><animate attributeName="y" values="11;9;11" dur="1s" repeatCount="indefinite" begin="0s"></animate></rect><rect x="4" y="10" width="2" height="4" rx="1"><animate attributeName="height" values="4;8;4" dur="1s" repeatCount="indefinite" begin="0.1s"></animate><animate attributeName="y" values="10;8;10" dur="1s" repeatCount="indefinite" begin="0.1s"></animate></rect><rect x="8" y="8" width="2" height="8" rx="1"><animate attributeName="height" values="8;12;8" dur="1s" repeatCount="indefinite" begin="0.2s"></animate><animate attributeName="y" values="8;6;8" dur="1s" repeatCount="indefinite" begin="0.2s"></animate></rect><rect x="12" y="6" width="2" height="12" rx="1"><animate attributeName="height" values="12;16;12" dur="1s" repeatCount="indefinite" begin="0.3s"></animate><animate attributeName="y" values="6;4;6" dur="1s" repeatCount="indefinite" begin="0.3s"></animate></rect><rect x="16" y="4" width="2" height="16" rx="1"><animate attributeName="height" values="16;20;16" dur="1s" repeatCount="indefinite" begin="0.4s"></animate><animate attributeName="y" values="4;2;4" dur="1s" repeatCount="indefinite" begin="0.4s"></animate></rect><rect x="20" y="6" width="2" height="12" rx="1"><animate attributeName="height" values="12;16;12" dur="1s" repeatCount="indefinite" begin="0.5s"></animate><animate attributeName="y" values="6;4;6" dur="1s" repeatCount="indefinite" begin="0.5s"></animate></rect><rect x="24" y="8" width="2" height="8" rx="1"><animate attributeName="height" values="8;12;8" dur="1s" repeatCount="indefinite" begin="0.6s"></animate><animate attributeName="y" values="8;6;8" dur="1s" repeatCount="indefinite" begin="0.6s"></animate></rect><rect x="28" y="10" width="2" height="4" rx="1"><animate attributeName="height" values="4;8;4" dur="1s" repeatCount="indefinite" begin="0.7s"></animate><animate attributeName="y" values="10;8;10" dur="1s" repeatCount="indefinite" begin="0.7s"></animate></rect><rect x="32" y="11" width="2" height="2" rx="1"><animate attributeName="height" values="2;6;2" dur="1s" repeatCount="indefinite" begin="0.8s"></animate><animate attributeName="y" values="11;9;11" dur="1s" repeatCount="indefinite" begin="0.8s"></animate></rect>',9)],KN={key:1,class:"flex items-center"},FN={width:"30",height:"30",viewBox:"0 0 36 24",class:"fill-white",style:{transform:"scaleX(-1)"}},GN=[cr('<rect x="0" y="11" width="2" height="2" rx="1"><animate attributeName="height" values="2;6;2" dur="1s" repeatCount="indefinite" begin="0s"></animate><animate attributeName="y" values="11;9;11" dur="1s" repeatCount="indefinite" begin="0s"></animate></rect><rect x="4" y="10" width="2" height="4" rx="1"><animate attributeName="height" values="4;8;4" dur="1s" repeatCount="indefinite" begin="0.1s"></animate><animate attributeName="y" values="10;8;10" dur="1s" repeatCount="indefinite" begin="0.1s"></animate></rect><rect x="8" y="8" width="2" height="8" rx="1"><animate attributeName="height" values="8;12;8" dur="1s" repeatCount="indefinite" begin="0.2s"></animate><animate attributeName="y" values="8;6;8" dur="1s" repeatCount="indefinite" begin="0.2s"></animate></rect><rect x="12" y="6" width="2" height="12" rx="1"><animate attributeName="height" values="12;16;12" dur="1s" repeatCount="indefinite" begin="0.3s"></animate><animate attributeName="y" values="6;4;6" dur="1s" repeatCount="indefinite" begin="0.3s"></animate></rect><rect x="16" y="4" width="2" height="16" rx="1"><animate attributeName="height" values="16;20;16" dur="1s" repeatCount="indefinite" begin="0.4s"></animate><animate attributeName="y" values="4;2;4" dur="1s" repeatCount="indefinite" begin="0.4s"></animate></rect><rect x="20" y="6" width="2" height="12" rx="1"><animate attributeName="height" values="12;16;12" dur="1s" repeatCount="indefinite" begin="0.5s"></animate><animate attributeName="y" values="6;4;6" dur="1s" repeatCount="indefinite" begin="0.5s"></animate></rect><rect x="24" y="8" width="2" height="8" rx="1"><animate attributeName="height" values="8;12;8" dur="1s" repeatCount="indefinite" begin="0.6s"></animate><animate attributeName="y" values="8;6;8" dur="1s" repeatCount="indefinite" begin="0.6s"></animate></rect><rect x="28" y="10" width="2" height="4" rx="1"><animate attributeName="height" values="4;8;4" dur="1s" repeatCount="indefinite" begin="0.7s"></animate><animate attributeName="y" values="10;8;10" dur="1s" repeatCount="indefinite" begin="0.7s"></animate></rect><rect x="32" y="11" width="2" height="2" rx="1"><animate attributeName="height" values="2;6;2" dur="1s" repeatCount="indefinite" begin="0.8s"></animate><animate attributeName="y" values="11;9;11" dur="1s" repeatCount="indefinite" begin="0.8s"></animate></rect>',9)],xN={key:2,class:"flex items-center"},jN=[cr('<svg width="30" height="30" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="12" y="16" width="40" height="32" rx="8" fill="white" stroke="#9CA3AF" stroke-width="2"></rect><circle cx="24" cy="32" r="4" fill="black"></circle><circle cx="40" cy="32" r="4" fill="black"></circle><line x1="32" y1="10" x2="32" y2="16" stroke="#9CA3AF" stroke-width="2"></line><circle cx="32" cy="8" r="2" fill="white"></circle><circle cx="52" cy="14" r="3" fill="white"><animate attributeName="opacity" values="0;1;0" dur="1.2s" begin="0s" repeatCount="indefinite"></animate></circle><circle cx="58" cy="10" r="2.5" fill="white"><animate attributeName="opacity" values="0;1;0" dur="1.2s" begin="0.2s" repeatCount="indefinite"></animate></circle><circle cx="63" cy="6" r="2" fill="white"><animate attributeName="opacity" values="0;1;0" dur="1.2s" begin="0.4s" repeatCount="indefinite"></animate></circle></svg>',1)],kN={class:"tooltiptext text-genpact-darkest-teal"},YN=[h("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-[10px] w-[10px] text-gray-700",fill:"currentColor",viewBox:"0 0 24 24"},[h("path",{d:"M12 14a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 14 0h-2zm-5 9a7 7 0 0 0 7-7h2a9 9 0 0 1-8 8.94V22h-2v-1.06A9 9 0 0 1 3 13h2a7 7 0 0 0 7 7z"})],-1)],zN=[h("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-[10px] w-[10px] text-gray-700",fill:"currentColor",viewBox:"0 0 24 24"},[h("path",{d:"M12 14a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 14 0h-2zm-5 9a7 7 0 0 0 7-7h2a9 9 0 0 1-8 8.94V22h-2v-1.06A9 9 0 0 1 3 13h2a7 7 0 0 0 7 7z"}),h("line",{x1:"4",y1:"4",x2:"20",y2:"20",stroke:"currentColor","stroke-width":"2"})],-1)],PN=Re({__name:"NewVoiceConversation",setup(t){const e=ze(),i=ct(),n=f(""),o=f(!1),s=f("Turn on mic"),A=()=>{o.value===!1?e.elevenLabs?(console.log("mic enabled true 11labs"),o.value=!0,Eg(),Ft.value="user",s.value="Turn off mic"):(console.log("mic enabled true"),o.value=!0,xr(),wU(),Ft.value="user",s.value="Turn off mic"):e.elevenLabs?(console.log("mic enabled false"),gg(),o.value=!1,s.value="Turn on mic"):(console.log("mic enabled false"),lg(),o.value=!1,s.value="Turn on mic")},r=()=>{e.elevenLabs?(console.log("closeConversation 11 labs"),gg(),Ft.value="none",o.value=!1):(console.log("closeConversation"),lg(),xr(),Ft.value="none",o.value=!1)},a=async()=>{var c,u,l,g,E,C;try{const p={question:Fr.value||MA.value};console.log("ques",p),e.conversations.push(p),e.dotLoader=!0,e.question="";const S={past_messages:e.past_messages,question:Fr.value||MA.value,bandCode:"4A",userGenomeFunction:"HR",userGenomeRole:"Consultant",skillId:"7bd03cb6-79ad-4e2a-8a8b-88dc16147369"},I=await ot("/sqlTest",S);if(Ft.value="bot",n.value=(u=(c=I==null?void 0:I.data)==null?void 0:c.body)==null?void 0:u.answer,n.value===""){console.log("in the if case calling api again");const d=await ot("/sqlTest",S);e.addConversation((l=d.data)==null?void 0:l.body,"new")}else console.log("in the else case"),e.addConversation((g=I.data)==null?void 0:g.body,"new");e.dotLoader=!1,console.log("answer.value",n.value.replace(/[*#]/g,"")),e.elevenLabs?await PS(n.value.replace(/[*#]/g,"")):n.value.includes("Feedback and Assessment")?(e.showVoiceComponent=!1,lg()):await kS(n.value.replace(/[*#]/g,""))}catch(p){if(console.error(p),me.isAxiosError(p)){const S=p;console.log("Error found!"),console.error((E=S.response)==null?void 0:E.data),i.setError(((C=S.response)==null?void 0:C.data).message)}else i.setError("There was an issue, please contact helpmate")}};return Qi(Fr,async c=>{c&&(console.log("Recognized text:",c),Ft.value="listening",e.userspeaking=!1,console.log("store userspeaking in recognized",e.userspeaking),await a(),Fr.value="")}),Qi(MA,async c=>{c&&(console.log("Recognized text:",c),Ft.value="listening",await a(),MA.value="")}),(c,u)=>(m(),R("div",LN,[y(Ft)==="bot"?(m(),R("div",ON,[h("span",null,[(m(),R("svg",UN,NN))])])):y(Ft)==="user"?(m(),R("div",KN,[h("span",null,[(m(),R("svg",FN,GN))])])):y(Ft)==="listening"?(m(),R("div",xN,jN)):Be("",!0),h("div",{class:ge([o.value?"":"animate-pulse","tooltip"])},[h("span",kN,de(s.value),1),o.value?(m(),R("button",{key:0,class:"rounded-full bg-white p-2 transition hover:bg-gray-300",onClick:u[0]||(u[0]=l=>A())},YN)):(m(),R("button",{key:1,class:"rounded-full bg-white p-2 transition hover:bg-gray-300",onClick:u[1]||(u[1]=l=>A())},zN))],2),h("button",{class:"rounded-full bg-white p-2 hover:bg-gray-300",onClick:u[2]||(u[2]=l=>r())},[ne(y(KC),{class:"h-[10px] w-[10px] text-gray-700"})])]))}}),pn=t=>(st("data-v-e951c0ed"),t=t(),At(),t),bN={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},JN={class:"py-2"},HN={class:"flex"},qN={class:"z-1 relative w-full"},VN={class:"flex justify-between my-2 w-full"},WN=pn(()=>h("div",null,null,-1)),ZN={key:0,class:"flex justify-center bg-genpact-darkest-blue px-4 rounded-full"},XN={class:"relative w-full"},_N={class:"absolute inset-y-0 left-0 flex items-center pl-3"},$N={class:"tooltip"},eK=pn(()=>h("span",{class:"tooltiptext text-genpact-darkest-teal"},"Restart",-1)),tK=[pn(()=>h("path",{d:"M12 4C8.229 4 6.343 4 5.172 5.172C4.001 6.344 4 8.229 4 12V18C4 18.943 4 19.414 4.293 19.707C4.586 20 5.057 20 6 20H12C15.771 20 17.657 20 18.828 18.828C19.999 17.656 20 15.771 20 12",stroke:"currentColor","stroke-width":"2"},null,-1)),pn(()=>h("path",{d:"M9 10H15M9 14H12M19 8V2M16 5H22",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1))],iK={class:"absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3"},nK={key:0},rK=["disabled"],oK=[pn(()=>h("path",{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576 6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76 7.494-7.493Z"},null,-1))],sK={key:1,class:"tooltip"},AK=[pn(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),pn(()=>h("img",{class:"w-7 h-7",src:Cg,alt:"watingIcon"},null,-1))],aK={class:"flex justify-start gap-2 md:gap-1"},cK=["disabled"],uK=pn(()=>h("div",{class:"pt-1 text-start font-sans text-xs font-bold text-gray-500 md:text-sm"},[h("div",null," Note: AI-generated response may not be fully accurate; check with experts for critical information. ")],-1)),lK=Re({__name:"NewQuestionSimulation",setup(t){const e=ze(),i=ct(),n=f(""),o=f("");e.question="";const s=f(null),A=f(!1),r=f(ei),a=f(!1);o.value=e.recognizedText,kt(()=>{s.value.focus()});const c=()=>{window.location.reload()},u=g=>{const E=g.length;r.value=ei-E,A.value=E>=ei},l=async()=>{var g,E,C,p,S,I,d,M;console.log("options fdsfdscdzxfsdv",e.recognizedText);try{if(console.log("options fdsfdscdzxfsdv",e.recognizedText),e.question.trim().length<1){console.log("Please enter answer!");return}a.value=!0,e.dotLoader=!0;const B={question:e.question||e.recognizedText};console.log("ques",B),e.conversations.push(B);const D=f("");D.value=e.question||e.recognizedText,e.question="";const L={ohr_id:n.value,past_messages:e.past_messages,question:D.value||e.recognizedText,bandCode:e.band_code,userGenomeFunction:e.genomeFunctionValue,userGenomeRole:e.genomeRoleValue,skillId:e.simulationSkill||"937e84ef-e95d-4327-9afe-e7be2bf420eb"},U=await ot("/sqlTest",L);if(n.value=(E=(g=U.data)==null?void 0:g.body)==null?void 0:E.ohr,((p=(C=U==null?void 0:U.data)==null?void 0:C.body)==null?void 0:p.answer)===""){console.log("in the if case calling api again");const j=await ot("/sqlTest",L);e.addConversation((S=j.data)==null?void 0:S.body,"new")}else console.log("in the else case"),e.addConversation((I=U.data)==null?void 0:I.body,"new");console.log("ohr id asdf",n.value),a.value=!1,e.dotLoader=!1,e.recognizedText=""}catch(B){if(console.error(B),e.dotLoader=!1,me.isAxiosError(B)){const D=B;console.log("Error found!"),console.error((d=D.response)==null?void 0:d.data),i.setError(((M=D.response)==null?void 0:M.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(g,E)=>(m(),R("div",bN,[h("div",JN,[h("div",HN,[h("div",qN,[h("div",VN,[WN,y(e).showVoiceComponent?(m(),R("div",ZN,[ne(PN)])):Be("",!0)]),h("div",XN,[h("div",_N,[h("div",$N,[eK,(m(),R("svg",{onClick:c,class:"ml-2 h-7 w-7 rounded",id:"newTopicDisable",width:"7",height:"",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:"restart"},tK))])]),h("div",iK,[a.value?(m(),R("div",sK,AK)):(m(),R("div",nK,[(m(),R("svg",{disabled:y(e).beginFlag===!0,class:ge([y(e).beginFlag===!0?"cursor-not-allowed text-gray-600":"cursor-pointer","bi bi-send ml-2 h-7 w-7 rotate-45 rounded"]),onClick:E[0]||(E[0]=C=>y(e).searchBoxdisable===!1||y(e).beginFlag===!0?"":l()),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},oK,10,rK))]))]),h("div",aK,[Ye(h("input",{onKeyup:[E[1]||(E[1]=Fu(C=>a.value?"":l(),["enter"])),E[3]||(E[3]=C=>u(y(e).question))],disabled:y(e).beginFlag===!0||y(e).searchBoxdisable===!1,class:ge([y(e).beginFlag===!0||y(e).searchBoxdisable===!1?"cursor-not-allowed bg-[#e5e7eb]":"bg-white","fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] px-[70px]"]),"onUpdate:modelValue":E[2]||(E[2]=C=>y(e).question=C),placeholder:"Write your answer here...",type:"text",ref_key:"AiSearch",ref:s},null,42,cK),[[Ze,y(e).question]])])]),uK])])])]))}}),Jk="",gK=Pe(lK,[["__scopeId","data-v-e951c0ed"]]),bc=t=>(st("data-v-bbd70acc"),t=t(),At(),t),EK={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},hK={class:"py-2"},CK={class:"flex"},IK={class:"z-1 relative w-full"},pK={class:"relative w-full"},dK={class:"absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3"},SK={key:0},MK=["disabled"],BK=[bc(()=>h("path",{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576 6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76 7.494-7.493Z"},null,-1))],vK={key:1,class:"tooltip"},fK=[bc(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),bc(()=>h("img",{class:"w-7 h-7",src:Cg,alt:"watingIcon"},null,-1))],wK={class:"flex justify-start gap-2 md:gap-1"},mK=["disabled"],QK=bc(()=>h("div",{class:"pt-1 text-start font-sans text-xs font-bold text-gray-500 md:text-sm"},[h("div",null," Note: AI-generated response may not be fully accurate; check with experts for critical information. ")],-1)),RK=Re({__name:"NewMDMQuestionSimulation",setup(t){const e=ze(),i=ct(),n=f("");e.question="";const o=f(null),s=f(!1),A=f(ei),r=f(!1);n.value=e.recognizedText,kt(()=>{o.value.focus()});const a=u=>{const l=u.length;A.value=ei-l,s.value=l>=ei},c=async()=>{var u,l,g;console.log("options fdsfdscdzxfsdv",e.recognizedText);try{if(console.log("options fdsfdscdzxfsdv",e.recognizedText),e.question.trim().length<1){console.log("Please enter answer!");return}r.value=!0,e.dotLoader=!0;const E={question:e.question||e.recognizedText};console.log("ques",E),e.conversations.push(E);const C=f("");C.value=e.question||e.recognizedText,e.question="";const p={assessmentId:e.simulationSkill,question:C.value,past_messages:e.past_messages,prompt:e.generatedPrompt,assessmentType:e.assessmentType,userFunction:"HR",empSeniority:e.empSeniority,functionRole:e.functionRole,userBand:e.band_code,storeFinalFeedback:e.storeFinalFeedback,storeFinalScore:e.storeFinalScore};console.log("Payload for MDM1==> ",p);let S;$t==="prod"?S="/ManualExportActivity":S="/fetchCompletionDemo";const I=await ot(S,p);e.addConversation((u=I.data)==null?void 0:u.body,"new"),r.value=!1,e.dotLoader=!1,e.recognizedText=""}catch(E){if(console.error(E),me.isAxiosError(E)){const C=E;console.log("Error found!"),console.error((l=C.response)==null?void 0:l.data),i.setError(((g=C.response)==null?void 0:g.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(u,l)=>(m(),R("div",EK,[h("div",hK,[h("div",CK,[h("div",IK,[h("div",pK,[h("div",dK,[r.value?(m(),R("div",vK,fK)):(m(),R("div",SK,[(m(),R("svg",{disabled:y(e).beginFlag===!0,class:ge([y(e).beginFlag===!0?"cursor-not-allowed text-gray-600":"cursor-pointer","bi bi-send ml-2 h-7 w-7 rotate-45 rounded"]),onClick:l[0]||(l[0]=g=>y(e).searchBoxdisable===!1||y(e).beginFlag===!0?"":c()),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},BK,10,MK))]))]),h("div",wK,[Ye(h("input",{onKeyup:[l[1]||(l[1]=Fu(g=>r.value?"":c(),["enter"])),l[3]||(l[3]=g=>a(y(e).question))],disabled:y(e).beginFlag===!0||y(e).searchBoxdisable===!1,class:ge([y(e).beginFlag===!0||y(e).searchBoxdisable===!1?"cursor-not-allowed bg-[#e5e7eb]":"bg-white","fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] pl-[30px] pr-[70px]"]),"onUpdate:modelValue":l[2]||(l[2]=g=>y(e).question=g),placeholder:"Write your answer here...",type:"text",ref_key:"AiSearch",ref:o},null,42,mK),[[Ze,y(e).question]])])]),QK])])])]))}}),Wk="",DK=Pe(RK,[["__scopeId","data-v-bbd70acc"]]),yK={},TK={class:"flex min-h-screen justify-center -mt-16"},LK=[h("div",{class:"flex items-center justify-center"},[h("img",{class:"loadercss",src:Li,alt:"Loader Gif"})],-1)];function OK(t,e){return m(),R("div",TK,LK)}const bS=Pe(yK,[["render",OK]]),vA=t=>(st("data-v-277190d6"),t=t(),At(),t),UK={class:"max-h-screen overflow-auto md:p-6 p-3 text-[#161916]"},NK={key:0,class:"flex flex-col items-center justify-center gap-4"},KK=[vA(()=>h("div",{class:"text-2xl font-[700]"},"Assessment Access Required",-1)),vA(()=>h("h3",{className:"text-lg font-medium my-6 text-center text-gray-500"}," You don't have access to this assessment. Please contact to administrator ",-1))],FK={key:1,class:"flex flex-col items-center justify-center gap-4"},GK=[vA(()=>h("div",{class:"text-2xl font-[700]"},"Bad Request",-1)),vA(()=>h("h3",{className:"text-lg font-medium my-6 text-center text-gray-500"}," Invalid URL or assessment not found. Please check the URL or contact support. ",-1))],xK={key:1,className:"h-screen flex flex-col items-stretch"},jK={class:"z-20"},kK=vA(()=>h("div",{class:"mt-6"},null,-1)),YK={class:"flex h-full items-stretch overflow-hidden"},zK={class:"mx-auto w-11/12 bg-white"},PK={class:"relative flex h-full w-full flex-col items-stretch overflow-hidden"},bK={key:0,class:"relative"},JK={key:1,class:"relative"},HK=Re({__name:"AssessmentSimulation",setup(t){const e=f(!0),i=f(!1),n=f(!1);f(!1),f(!1);const o=ze(),s=ct(),A=f(""),r=f(""),a=f(""),c=f(""),u=localStorage.getItem("accessToken");let l="",g="",E="";const C=f(!1),p=new URL(window.location.href),S=p.searchParams.get("skillId")||p.searchParams.get("assessmentId");r.value=p.searchParams.get("mode")??"",o.simulationSkill=S??"";const I=["703331197","703380812","703331909","703363051","703319578"];kt(async()=>{console.log("uuid. value",S),e.value=!0,await d(),await B(),o.assessmentQuestion||(console.log("getAssessmentDetails========================>"),await M()),e.value=!1});const d=async()=>{var D,L,U,Q,j,z,K;try{if(S===null)throw{response:{status:424,data:{message:"Invalid URL"}}};e.value=!0;const N=new URLSearchParams(window.location.search);o.simulationSkill=N.get("skillId")||o.simulationSkill,console.log("before calling get learner");const X=await zt(`/getLearnerData?forSimulation=true&skillForSimulation=${o.simulationSkill}`);o.initialize(X.data),o.simulationSkill==="937e84ef-e95d-4327-9afe-e7be2bf420eb"?o.skillNameForSimulation="GenpactNext":o.simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ea"||o.simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ef"?o.skillNameForSimulation="Agentic AI":o.simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"&&(o.skillNameForSimulation="Data")}catch(N){if(console.error(N),e.value=!1,me.isAxiosError(N)&&((D=N.response)!=null&&D.status)||N&&typeof N=="object"&&"response"in N&&N.response&&typeof N.response=="object"&&"status"in N.response&&N.response.status){const X=N;if(console.log("Error found!"),console.error((L=X.response)==null?void 0:L.data),((U=X.response)==null?void 0:U.status)===424||((Q=X.response)==null?void 0:Q.status)===425||((j=X.response)==null?void 0:j.status)===400){c.value=(z=X.response)==null?void 0:z.status,console.log("errorCode value",c.value),n.value=!0;return}s.setError(((K=X.response)==null?void 0:K.data).message)}else s.setError("There was an issue, please contact helpmate")}},M=async()=>{var D,L,U,Q,j,z,K,N,X,H,b,G,W,P,se,ce,Me,Ce,Te,Ke,Je,Fe,x,ee,V,te,Ie,v,w,T,F,k,O,$,Z,_,J,Ae,re,ue,he,fe,je,Ue,qe,It,xt,$e;console.log("Start getAssessmentDetails");try{$t==="prod"?l=`https://api-v2.genpact.com/api/my-profile/assessment-master/getAssessmentDetailsById?id=${o.simulationSkill}`:l=`https://api-v2-dev.genpact.com/api/my-profile/assessment-master/getAssessmentDetailsById?id=${o.simulationSkill}`;const ae=await zt(l);A.value=(L=(D=ae==null?void 0:ae.data)==null?void 0:D.data)==null?void 0:L.name,o.skillNameForSimulation=A.value,o.generatedPrompt=(Q=(U=ae==null?void 0:ae.data)==null?void 0:U.data)==null?void 0:Q.generatedPrompt,o.assessmentType=(z=(j=ae==null?void 0:ae.data)==null?void 0:j.data)==null?void 0:z.assessmentType,a.value=(N=(K=ae==null?void 0:ae.data)==null?void 0:K.data)==null?void 0:N.status,C.value=(H=(X=ae==null?void 0:ae.data)==null?void 0:X.data)==null?void 0:H.editMode,o.empSeniority=(G=(b=ae==null?void 0:ae.data)==null?void 0:b.data)==null?void 0:G.empSeniority,o.functionRole=(P=(W=ae==null?void 0:ae.data)==null?void 0:W.data)==null?void 0:P.functionRole,g=(ce=(se=ae==null?void 0:ae.data)==null?void 0:se.data)==null?void 0:ce.accessBand,E=(Ce=(Me=ae==null?void 0:ae.data)==null?void 0:Me.data)==null?void 0:Ce.accessOhrList;const qt=(Ke=(Te=ae==null?void 0:ae.data)==null?void 0:Te.data)==null?void 0:Ke.createdBy;if(o.mcqType=(Fe=(Je=ae==null?void 0:ae.data)==null?void 0:Je.data)==null?void 0:Fe.mcqTypes,o.storeFinalFeedback=(ee=(x=ae==null?void 0:ae.data)==null?void 0:x.data)==null?void 0:ee.storeFinalFeedback,o.storeFinalScore=(te=(V=ae==null?void 0:ae.data)==null?void 0:V.data)==null?void 0:te.storeFinalScore,a.value==="inactive")i.value=!0;else if(a.value==="draft")r.value!==cl.DRAFT&&(i.value=!0);else if(a.value==="active"&&C.value&&r.value===cl.DRAFT){console.log("fetching values from draft table.....",C.value),$t==="prod"?l=`https://api-v2.genpact.com/api/my-profile/assessment-master/getDraftAssessmentDetailsById?assessmentId=${o.simulationSkill}`:l=`https://api-v2-dev.genpact.com/api/my-profile/assessment-master/getDraftAssessmentDetailsById?assessmentId=${o.simulationSkill}`;const ke=await zt(l);o.generatedPrompt=(v=(Ie=ke==null?void 0:ke.data)==null?void 0:Ie.data)==null?void 0:v.generatedPrompt,o.assessmentType=(T=(w=ke==null?void 0:ke.data)==null?void 0:w.data)==null?void 0:T.assessmentType,o.empSeniority=(k=(F=ke==null?void 0:ke.data)==null?void 0:F.data)==null?void 0:k.empSeniority,o.functionRole=($=(O=ke==null?void 0:ke.data)==null?void 0:O.data)==null?void 0:$.functionRole,o.storeFinalFeedback=(_=(Z=ke==null?void 0:ke.data)==null?void 0:Z.data)==null?void 0:_.storeFinalFeedback,o.storeFinalScore=(Ae=(J=ke==null?void 0:ke.data)==null?void 0:J.data)==null?void 0:Ae.storeFinalScore,g=(ue=(re=ke==null?void 0:ke.data)==null?void 0:re.data)==null?void 0:ue.accessBand,E=(fe=(he=ke==null?void 0:ke.data)==null?void 0:he.data)==null?void 0:fe.accessOhrList}console.log("store mcqType====>",o.mcqType);const ut=o==null?void 0:o.band_code;console.log("accessBand , accessOhrList====>",g,E);const pt=(je=g==null?void 0:g.split(","))==null?void 0:je.map(ke=>ke.trim());if(console.log("bands ,====>",pt),qt===(o==null?void 0:o.ohr)||I.includes(o==null?void 0:o.ohr))console.log("User has access to this assessment.");else{if(pt.length===0&&E.length===0)throw console.log("Both bands and exceptionOHR are empty. Access denied."),{response:{status:424,data:{message:"You don't have access to this assessment. Please contact to administrator"}}};if(pt.includes(ut)||E.includes(o==null?void 0:o.ohr))console.log("User has access to this assessment.");else throw console.log("User does not have access to this assessment."),{response:{status:424,data:{message:"You don't have access to this assessment. Please contact to administrator"}}}}console.log("end getAssessmentDetails")}catch(ae){if(console.error(ae),e.value=!1,me.isAxiosError(ae)&&((Ue=ae.response)!=null&&Ue.status)||ae&&typeof ae=="object"&&"response"in ae&&ae.response&&typeof ae.response=="object"&&"status"in ae.response&&ae.response.status){const qt=ae;if(console.log("Error found!"),console.error((qe=qt.response)==null?void 0:qe.data),((It=qt.response)==null?void 0:It.status)===424||((xt=qt.response)==null?void 0:xt.status)===425){n.value=!0;return}s.setError((($e=qt.response)==null?void 0:$e.data).message)}else s.setError("There was an issue, please contact helpmate")}},B=async()=>{var D,L,U,Q,j,z,K,N;try{const X=await me({url:"https://api-v2-dev.genpact.com/api/delphi/v2/myprofile",headers:{authorization:`Bearer ${u}`,"content-type":"application/json"},method:"get"});o.genomeFunctionValue=(U=(L=(D=X==null?void 0:X.data)==null?void 0:D.role_function)==null?void 0:L.function)==null?void 0:U.name,o.genomeRoleValue=(z=(j=(Q=X==null?void 0:X.data)==null?void 0:Q.role_function)==null?void 0:j.role)==null?void 0:z.name,console.log("profile data",o.genomeFunctionValue,o.genomeRoleValue)}catch(X){if(console.error(X),e.value=!1,me.isAxiosError(X)){const H=X;console.log("Error found!"),console.error((K=H.response)==null?void 0:K.data),s.setError(((N=H.response)==null?void 0:N.data).message)}else s.setError("There was an issue, please contact helpmate")}};return(D,L)=>(m(),R("section",null,[ne(fr,{"is-visible":n.value},{default:hi(()=>[h("div",UK,[c.value===424||c.value==="425"?(m(),R("div",NK,KK)):Be("",!0),c.value===400?(m(),R("div",FK,GK)):Be("",!0)])]),_:1},8,["is-visible"]),h("div",null,[e.value?(m(),Di(bS,{key:0})):(m(),R("main",xK,[h("div",jK,[ne(Vy)]),kK,h("div",YK,[h("div",zK,[h("div",PK,[ne(TN),h("div",{class:ge(y(o).showVoiceComponent===!0?"mt-[160px]":"mt-[120px]")},null,2)]),y(o).assessmentQuestion?(m(),R("div",bK,[ne(gK)])):(m(),R("div",JK,[ne(DK)]))])])]))])]))}}),t1="",qK=Object.freeze(Object.defineProperty({__proto__:null,default:Pe(HK,[["__scopeId","data-v-277190d6"]])},Symbol.toStringTag,{value:"Module"})),VK={class:"flex h-14 w-full flex-1 items-center justify-between bg-[#021c42] md:pr-6 lg:pr-6"},WK=["href"],ZK=[h("img",{class:"h-11 w-auto cursor-pointer",src:PC,alt:"Genome Logo"},null,-1)],XK=["href"],_K=[h("img",{class:"h-9 w-28 cursor-pointer md:w-36",src:ul,alt:"Aiguru Logo"},null,-1)],$K=Re({__name:"headerAMA",setup(t){const e=f(""),i=f("");return $t==="prod"?e.value="https://genome.genpact.com":e.value="https://genome-dev.genpact.com",$t==="prod"?i.value="https://genome.genpact.com/#aiguru":i.value="https://genome-dev.genpact.com/#aiguru",(n,o)=>(m(),R("nav",VK,[h("a",{class:"px-2 md:px-0 lg:px-0",href:e.value,target:"_blank"},ZK,8,WK),h("a",{class:"px-2 md:px-0 lg:px-0",href:i.value,target:"_blank"},_K,8,XK)]))}}),eF={class:"flex items-end justify-start"},tF={class:"fontFormattingAMA w-full bg-gray-100 rounded-lg"},iF={class:"w-full rounded-md px-3 py-2 text-lg font-bold text-black text-[18px] md:text-[22px]"},nF={class:"w-full px-3 py-2 text-base text-black text-[12px] md:text-[16px] font-[550]"},rF=h("br",null,null,-1),oF=Re({__name:"greetingsAMA",setup(t){const e=ze(),i=` Hi ${e.learnerName||"Expert"}, and welcome!`,n=tt(()=>i),o=tt(()=>e.welcomeMessage);return(s,A)=>(m(),R("section",null,[h("div",eF,[h("div",tF,[h("div",iF,de(n.value),1),h("div",nF,de(o.value),1)])]),rF]))}}),sF={class:"fontFormattingAMA flex items-end justify-start py-2"},AF={class:"line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg"},aF=["innerHTML"],cF=Re({__name:"responseAMA",props:{answer:{type:String,required:!0}},setup(t){const e=t,i=tt(()=>{const n=e.answer.replace(/[*#]/g,"").replace(/Assessment Rating & Feedback/g,'<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>'),o=/\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;if(n.includes("AI Guru")){if(n.includes("AI Guru"))return console.log("aig found"),n.replace(o,(s,A,r)=>`<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${A}</a>`)}else return n.replace(o,(s,A,r)=>`<a href="${r}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${A}</a>`)});return(n,o)=>(m(),R("div",sF,[h("div",AF,[h("span",{class:"fontFormattingAMA",innerHTML:i.value},null,8,aF)])]))}}),o1="",uF=Pe(cF,[["__scopeId","data-v-fa0c60bd"]]),lF={class:"flex justify-end items-end py-3"},gF={class:"max-w-[80%]"},EF={class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},hF=Re({__name:"learnerAMA",props:{question:{type:String,required:!0}},setup(t){return(e,i)=>(m(),R("div",lF,[h("div",gF,[h("div",EF,de(t.question),1)])]))}}),CF=t=>(st("data-v-12a02acf"),t=t(),At(),t),IF={class:"flex w-full flex-col items-start justify-start bg-white"},pF={class:"bot-typing-animation gap-1"},dF={class:"block w-full text-lg italic text-gray-800"},SF=CF(()=>h("span",{class:"dot-animation"},[h("span",null,"."),h("span",null,"."),h("span",null,".")],-1)),MF=cr('<div class="block w-full max-w-full items-stretch" data-v-12a02acf><div class="flex animate-pulse items-start justify-start space-x-4" data-v-12a02acf><div class="flex-1 space-y-6 py-1" data-v-12a02acf><div class="h-2 w-full rounded bg-gray-300" data-v-12a02acf></div><div class="space-y-3" data-v-12a02acf><div class="grid grid-cols-3 gap-4" data-v-12a02acf><div class="col-span-2 h-2 rounded bg-gray-300" data-v-12a02acf></div><div class="col-span-1 h-2 rounded bg-gray-300" data-v-12a02acf></div></div><div class="h-2 rounded bg-gray-300" data-v-12a02acf></div></div></div></div></div>',1),BF=Re({__name:"LoadingResponseAMA",setup(t){const e=f("Generating response"),i=f(["This may take a few seconds","Fetching the best response for you","Thinking... give me a moment","One moment while I gather the information","Hang in tight, we are almost there","Almost there... just a bit longer","Compiling a response for you"]);return setTimeout(()=>{const n=Math.floor(Math.random()*i.value.length);e.value=i.value[n]},15e3),(n,o)=>(m(),R("div",IF,[h("div",pF,[h("div",dF,de(e.value),1),SF]),MF]))}}),s1="",vF=Pe(BF,[["__scopeId","data-v-12a02acf"]]),fF={key:0},wF={key:1},mF={key:0,class:"flex"},QF=Re({__name:"conversationAMA",setup(t){let e=f(""),i=f("");e.value='<a style="color:#00AECF;"',i.value='<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';const n=ze(),o=f(),s=()=>{o.value.scrollTo(0,o.value.scrollHeight)};return kt(()=>{var a;const A=document.getElementsByName("askQuestion"),r=Array.from(A);console.log("New array===>",r),A.length&&((a=r==null?void 0:r.pop())==null||a.scrollIntoView({behavior:"smooth",block:"center"})),window.addEventListener("custom-event",s)}),VA(()=>{var a;const A=document.getElementsByName("askQuestion"),r=Array.from(A);console.log("New array===>",r),A.length&&((a=r==null?void 0:r.pop())==null||a.scrollIntoView({behavior:"smooth",block:"center"}))}),ar(()=>{window.removeEventListener("custom-event",s)}),(A,r)=>(m(),R("div",{ref_key:"nestedElement",ref:o,class:"smooth-scroll overflow-auto md:px-6 px-2"},[ne(oF),(m(!0),R(Le,null,lt(y(n).conversations,(a,c)=>(m(),R("div",{key:c},[a.question?(m(),R("div",fF,[ne(hF,{question:a.question,c2question:a.c2question,"show-feedback":a.showFeedback,id:`qId${c}`,name:"askQuestion","que-id":c},null,8,["question","c2question","show-feedback","id","que-id"])])):Be("",!0),a.answer?(m(),R("div",wF,[ne(uF,{question:a==null?void 0:a.question,c2question:a==null?void 0:a.c2question,"show-sources":a==null?void 0:a.showSources,questionId:a.id,answer:a.answer.replaceAll("<a",y(e)).replaceAll("<ul",y(i)),"show-feedback":a.showFeedback,"related-ques":a.relatedQues,"options-array":a.optionsArray,"ans-id":c,onCharTyped:s},null,8,["question","c2question","show-sources","questionId","answer","show-feedback","related-ques","options-array","ans-id"])])):Be("",!0)]))),128)),y(n).dotLoader?(m(),R("div",mF,[ne(vF)])):Be("",!0)],512))}}),A1="",RF=Pe(QF,[["__scopeId","data-v-f92feaf3"]]),Jc=t=>(st("data-v-3fa4dc8a"),t=t(),At(),t),DF={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},yF={class:"py-2"},TF={class:"flex"},LF={class:"z-1 relative w-full"},OF={class:"relative w-full"},UF={class:"absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3"},NF={key:0},KF=[Jc(()=>h("path",{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576 6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76 7.494-7.493Z"},null,-1))],FF={key:1,class:"tooltip"},GF=[Jc(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),Jc(()=>h("img",{class:"w-7 h-7",src:Cg,alt:"watingIcon"},null,-1))],xF={class:"flex justify-start gap-2 md:gap-1"},jF=Jc(()=>h("div",{class:"pt-1 text-start font-sans"},[h("div",{class:"flex justify-start items-start text-[#161916] italic"},"10 questions remaining for the day"),h("div",{class:"text-xs font-bold text-gray-500 md:text-sm"}," Note: AI-generated response may not be fully accurate; check with experts for critical information. ")],-1)),kF=Re({__name:"NewQuestionAMA",setup(t){const e=ze(),i=ct(),n=f(""),o=f("");e.question="";const s=f(null),A=f(!1),r=f(ei),a=f(!1);o.value=e.recognizedText,kt(()=>{s.value.focus()});const c=l=>{const g=l.length;r.value=ei-g,A.value=g>=ei},u=async()=>{var l,g,E,C,p,S,I,d;console.log("options fdsfdscdzxfsdv",e.recognizedText);try{if(console.log("options fdsfdscdzxfsdv",e.recognizedText),e.question.trim().length<1){console.log("Please enter answer!");return}a.value=!0,e.dotLoader=!0;const M={question:e.question||e.recognizedText};console.log("ques",M),e.conversations.push(M);const B=f("");B.value=e.question||e.recognizedText,e.question="";const D={ohr_id:n.value,past_messages:e.past_messages,question:B.value||e.recognizedText,bandCode:e.band_code,userGenomeFunction:e.genomeFunctionValue,userGenomeRole:e.genomeRoleValue,skillId:e.simulationSkill||"937e84ef-e95d-4327-9afe-e7be2bf420eb"},L=await ot("/sqlTest",D);if(n.value=(g=(l=L.data)==null?void 0:l.body)==null?void 0:g.ohr,((C=(E=L==null?void 0:L.data)==null?void 0:E.body)==null?void 0:C.answer)===""){console.log("in the if case calling api again");const Q=await ot("/sqlTest",D);e.addConversation((p=Q.data)==null?void 0:p.body,"new")}else console.log("in the else case"),e.addConversation((S=L.data)==null?void 0:S.body,"new");console.log("ohr id asdf",n.value),a.value=!1,e.dotLoader=!1,e.recognizedText=""}catch(M){if(console.error(M),e.dotLoader=!1,me.isAxiosError(M)){const B=M;console.log("Error found!"),console.error((I=B.response)==null?void 0:I.data),i.setError(((d=B.response)==null?void 0:d.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(l,g)=>(m(),R("div",DF,[h("div",yF,[h("div",TF,[h("div",LF,[h("div",OF,[h("div",UF,[a.value?(m(),R("div",FF,GF)):(m(),R("div",NF,[(m(),R("svg",{onClick:g[0]||(g[0]=E=>u()),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"bi bi-send ml-2 h-7 w-7 rotate-45 rounded",viewBox:"0 0 16 16"},KF))]))]),h("div",xF,[Ye(h("input",{onKeyup:[g[1]||(g[1]=Fu(E=>a.value?"":u(),["enter"])),g[3]||(g[3]=E=>c(y(e).question))],"onUpdate:modelValue":g[2]||(g[2]=E=>y(e).question=E),class:"fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] pl-[30px] pr-[70px]",placeholder:"Write your answer here...",type:"text",ref_key:"AiSearch",ref:s},null,544),[[Ze,y(e).question]])])]),jF])])])]))}}),l1="",YF=Pe(kF,[["__scopeId","data-v-3fa4dc8a"]]),Ig=t=>(st("data-v-004a4a93"),t=t(),At(),t),zF=Ig(()=>h("div",{class:"max-h-screen overflow-auto md:p-6 p-3 flex flex-col items-center justify-center gap-4 text-[#161916]"},[h("div",{class:"text-2xl font-[700]"},"Assessment Access Required"),h("h3",{className:"text-lg font-medium my-6 text-center text-gray-500"}," You don't have access to this assessment. Please contact to administrator ")],-1)),PF={key:1,className:"h-screen flex flex-col items-stretch"},bF={class:"z-20"},JF=Ig(()=>h("div",{class:"mt-6"},null,-1)),HF={class:"flex h-full items-stretch overflow-hidden"},qF={class:"mx-auto w-11/12 bg-white"},VF={class:"relative flex h-full w-full flex-col items-stretch overflow-hidden"},WF=Ig(()=>h("div",{class:"mt-[160px]"},null,-1)),ZF={class:"relative"},XF=Re({__name:"AssessmentAMA",setup(t){const e=f(!0),i=f(!1),n=ze(),o=ct(),s=f(""),A=f(""),r=localStorage.getItem("accessToken");let a="",c="",u="";const l=f(!1),E=new URL(window.location.href).searchParams.get("amaId");n.amaSkillId=E??"";const C=["703331197","703380812","703331909","703363051","703319578"];kt(async()=>{console.log("uuid value",E),console.log("store amaSkillId value",n.amaSkillId),e.value=!0,await p(),await d(),e.value=!1});const p=async()=>{var M,B,D,L,U;try{if(E===null)throw{response:{status:424,data:{message:"Invalid URL"}}};console.log("before calling get learner");const Q=await zt(`/getLearnerData?forSimulation=true&skillForSimulation=${n.amaSkillId}`);n.initialize(Q.data),await S()}catch(Q){if(console.error(Q),e.value=!1,me.isAxiosError(Q)&&((M=Q.response)!=null&&M.status)||Q&&typeof Q=="object"&&"response"in Q&&Q.response&&typeof Q.response=="object"&&"status"in Q.response&&Q.response.status){const j=Q;if(console.log("Error found!"),console.error((B=j.response)==null?void 0:B.data),((D=j.response)==null?void 0:D.status)===424||((L=j.response)==null?void 0:L.status)===425){i.value=!0;return}o.setError(((U=j.response)==null?void 0:U.data).message)}else o.setError("There was an issue, please contact helpmate")}},S=async()=>{var M,B,D,L,U,Q,j,z,K,N,X,H,b,G,W,P,se,ce,Me,Ce,Te,Ke,Je,Fe,x,ee,V,te,Ie,v,w,T,F,k;console.log("Start getAssessmentDetails");try{$t==="prod"?a=`https://api-v2-dev.genpact.com/api/my-profile/ama-master/getAMADetailsById?id=${n.amaSkillId}`:a=`https://api-v2-dev.genpact.com/api/my-profile/ama-master/getAMADetailsById?id=${n.amaSkillId}`;const O=await zt(a);console.log("response from GetAMA",O),s.value=(B=(M=O==null?void 0:O.data)==null?void 0:M.data)==null?void 0:B.name,n.welcomeMessage=(L=(D=O==null?void 0:O.data)==null?void 0:D.data)==null?void 0:L.displayMsg,console.log("response from GetAMA skill Name",s.value),n.skillNameForSimulation=s.value,n.generatedPrompt=(Q=(U=O==null?void 0:O.data)==null?void 0:U.data)==null?void 0:Q.generatedPrompt,n.assessmentType=(z=(j=O==null?void 0:O.data)==null?void 0:j.data)==null?void 0:z.assessmentType,A.value=(N=(K=O==null?void 0:O.data)==null?void 0:K.data)==null?void 0:N.status,l.value=(H=(X=O==null?void 0:O.data)==null?void 0:X.data)==null?void 0:H.editMode,n.empSeniority=(G=(b=O==null?void 0:O.data)==null?void 0:b.data)==null?void 0:G.empSeniority,n.functionRole=(P=(W=O==null?void 0:O.data)==null?void 0:W.data)==null?void 0:P.functionRole,c=(ce=(se=O==null?void 0:O.data)==null?void 0:se.data)==null?void 0:ce.accessBand,u=(Ce=(Me=O==null?void 0:O.data)==null?void 0:Me.data)==null?void 0:Ce.accessOhrList;const $=(Ke=(Te=O==null?void 0:O.data)==null?void 0:Te.data)==null?void 0:Ke.createdBy;n.mcqType=(Fe=(Je=O==null?void 0:O.data)==null?void 0:Je.data)==null?void 0:Fe.mcqTypes,n.storeFinalFeedback=(ee=(x=O==null?void 0:O.data)==null?void 0:x.data)==null?void 0:ee.storeFinalFeedback,n.storeFinalScore=(te=(V=O==null?void 0:O.data)==null?void 0:V.data)==null?void 0:te.storeFinalScore,console.log("store mcqType====>",n.mcqType);const Z=n==null?void 0:n.band_code;console.log("accessBand , accessOhrList====>",c,u);const _=(Ie=c==null?void 0:c.split(","))==null?void 0:Ie.map(J=>J.trim());if(console.log("bands ,====>",_),$===(n==null?void 0:n.ohr)||C.includes(n==null?void 0:n.ohr))console.log("User has access to this assessment.");else{if(_.length===0&&u.length===0)throw console.log("Both bands and exceptionOHR are empty. Access denied."),{response:{status:424,data:{message:"You don't have access to this assessment. Please contact to administrator"}}};if(_.includes(Z)||u.includes(n==null?void 0:n.ohr))console.log("User has access to this assessment.");else throw console.log("User does not have access to this assessment."),{response:{status:424,data:{message:"You don't have access to this assessment. Please contact to administrator"}}}}await I(),console.log("end getAssessmentDetails")}catch(O){if(console.error(O),e.value=!1,me.isAxiosError(O)&&((v=O.response)!=null&&v.status)||O&&typeof O=="object"&&"response"in O&&O.response&&typeof O.response=="object"&&"status"in O.response&&O.response.status){const $=O;if(console.log("Error found!"),console.error((w=$.response)==null?void 0:w.data),((T=$.response)==null?void 0:T.status)===424||((F=$.response)==null?void 0:F.status)===425){i.value=!0;return}o.setError(((k=$.response)==null?void 0:k.data).message)}else o.setError("There was an issue, please contact helpmate")}},I=async()=>{var M,B;console.log("Start getAssessmentDetails");try{$t==="prod"?a=`https://api-v2-dev.genpact.com/api/my-profile/ama-master/getAMACorpusDetailsById?id=${n.amaCorpusId}`:a=`https://api-v2-dev.genpact.com/api/my-profile/ama-master/getAMACorpusDetailsById?id=${n.amaCorpusId}`;const D=await zt(a);console.log("response from GetAMA",D)}catch(D){if(console.error(D),e.value=!1,me.isAxiosError(D)){const L=D;console.log("Error found!"),console.error((M=L.response)==null?void 0:M.data),o.setError(((B=L.response)==null?void 0:B.data).message)}else o.setError("There was an issue, please contact helpmate")}},d=async()=>{var M,B,D,L,U,Q,j,z;try{const K=await me({url:"https://api-v2-dev.genpact.com/api/delphi/v2/myprofile",headers:{authorization:`Bearer ${r}`,"content-type":"application/json"},method:"get"});n.genomeFunctionValue=(D=(B=(M=K==null?void 0:K.data)==null?void 0:M.role_function)==null?void 0:B.function)==null?void 0:D.name,n.genomeRoleValue=(Q=(U=(L=K==null?void 0:K.data)==null?void 0:L.role_function)==null?void 0:U.role)==null?void 0:Q.name,console.log("profile data",n.genomeFunctionValue,n.genomeRoleValue)}catch(K){if(console.error(K),e.value=!1,me.isAxiosError(K)){const N=K;console.log("Error found!"),console.error((j=N.response)==null?void 0:j.data),o.setError(((z=N.response)==null?void 0:z.data).message)}else o.setError("There was an issue, please contact helpmate")}};return(M,B)=>(m(),R("section",null,[ne(fr,{"is-visible":i.value},{default:hi(()=>[zF]),_:1},8,["is-visible"]),h("div",null,[e.value?(m(),Di(bS,{key:0})):(m(),R("main",PF,[h("div",bF,[ne($K)]),JF,h("div",HF,[h("div",qF,[h("div",VF,[ne(RF),WF]),h("div",ZF,[ne(YF)])])])]))])]))}}),g1="",_F=Object.freeze(Object.defineProperty({__proto__:null,default:Pe(XF,[["__scopeId","data-v-004a4a93"]])},Symbol.toStringTag,{value:"Module"})),$F={},eG={className:"flex justify-between items-center gap-4 h-14"},tG=[h("div",{class:"text-white font-bold md:text-xl text-base"}," AI Guru Skill Data ",-1),h("img",{class:"md:w-36 w-20",src:So},null,-1)];function iG(t,e){return m(),R("div",eG,tG)}const nG=Pe($F,[["render",iG]]),rG={class:"bg-genpact-blue-box w-full px-5 mb-4"},oG={key:0},sG={class:"flex justify-between items-start text-lg px-6"},AG=h("div",null,null,-1),aG={class:"flex justify-start items-center text-white bg-genpact-darkest-blue rounded-lg py-2 px-4 cursor-pointer"},cG={class:"flex justify-start items-start w-full px-6 py-3"},uG=h("div",{class:"md:w-1/2"},null,-1),lG={class:"relative flex justify-start items-end border border-gray-300 md:rounded-full rounded-lg md:w-1/2 w-full"},gG={class:"absolute inset-y-0 left-5 flex items-center"},EG={class:"flex justify-between flex-col md:flex-row items-center w-full border-none py-1 px-1 md:px-2 md:py-2 text-sm md:border md:border-gray-300 rounded-full"},hG={class:"flex justify-start flex-wrap md:gap-2 items-start ml-10 space-y-2 md:space-y-0 md:space-x-1 mx-auto"},CG={class:"flex justify-start items-center"},IG=h("div",{class:"flex items-center"},[h("div",{class:"text-gray-500 font-medium text-sm px-1 py-2 md:px-2 md:py-2 hidden md:flex"}," | ")],-1),pG={class:"flex-grow md:flex-grow-0"},dG={class:"px-6"},SG=h("div",{class:"flex justify-start items-start text-xl font-bold py-1 italic"}," Current Topic List ",-1),MG={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[630px]"},BG={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},vG=h("thead",{class:"text-sm text-center md:text-base text-gray-700 uppercase bg-gray-200 top-0 sticky z-10"},[h("tr",null,[h("th",{scope:"col",class:"px-6 py-3"},"Topic name"),h("th",{scope:"col",class:"px-6 py-3"},"Description"),h("th",{scope:"col",class:"px-6 py-3"},"Knowledge corpus"),h("th",{scope:"col",class:"px-6 py-3"},"Edit")])],-1),fG={class:"px-3 py-4 font-medium text-gray-900"},wG={class:"px-3 py-4"},mG={class:"px-3 py-4 text-center"},QG={class:"px-1.5 py-4 text-center"},RG=["onClick"],DG={key:1,id:"index",class:"flex justify-center items-center bg-genpact-darkest-blue text-white font-bold text-center rounded-lg px-6 py-2 hover:-translate-y-1 hover:scale-100 duration-300"},yG=[h("img",{class:"w-6 h-6 block loadercss",src:Li,alt:"Loader Gif"},null,-1)],JS=Object.freeze(Object.defineProperty({__proto__:null,default:Re({__name:"SkillData",setup(t){const e=f([]),i=f(),n=f(""),o=f(""),s=f(!1),A=f([!0]),r=ze(),a=ct(),c=Aa(),u=f(""),l=()=>{try{u.value==="user"?(sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","user"),c.replace({name:"EditSkillData"})):u.value==="admin"&&(sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","admin"),c.replace({name:"EditSkillAdminData"})),r.isTopicPending=!1,r.topicNameForSkillData="",r.descriptionForSkillData="",r.offeringTypeForSkillData="",r.enableInputbox=!0}catch{a.setError("Invalid Router!!")}},g=async(I,d)=>{var M,B,D;try{console.log("isTopicPending------->",r.isTopicPending),r.topicNameForSkillData=I.Topic,r.descriptionForSkillData=I.Description,r.offeringTypeForSkillData=I.OfferingType,r.enableInputbox=!1,A.value[d]=!1;const L=await zt(`/fetchTempTopic?Topic=${r.topicNameForSkillData}`);r.isTopicPending=!1,console.log("response array length------->",(M=L==null?void 0:L.data)==null?void 0:M.length),((B=L==null?void 0:L.data)==null?void 0:B.length)>0&&(r.isTopicPending=!0),A.value[d]=!0,u.value==="user"?(sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","user"),c.replace({name:"EditSkillData"})):u.value==="admin"&&(sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","admin"),c.replace({name:"EditSkillAdminData"}))}catch(L){if(console.error(L),me.isAxiosError(L)){const U=L;a.setError(((D=U.response)==null?void 0:D.data).message)}else a.setError("There was an issue with route")}},E=async()=>{var I,d,M,B,D,L;try{const U=await zt("/FetchSkillData");console.log("role value ",(I=U==null?void 0:U.data)==null?void 0:I.role),i.value=((d=U==null?void 0:U.data)==null?void 0:d.body)||[],u.value=(M=U==null?void 0:U.data)==null?void 0:M.role,e.value=i.value,console.log("length",(B=U==null?void 0:U.data)==null?void 0:B.body),console.log("data",(D=U==null?void 0:U.data)==null?void 0:D.body)}catch(U){if(console.error(U),me.isAxiosError(U)){const Q=U;a.setError(((L=Q.response)==null?void 0:L.data).message)}else a.setError("There was an issue while fetching data")}},C=I=>{console.log(I.target.value),I.target.value===""&&(e.value=i.value),console.log("Invoked topic name Search"),e.value=i.value.filter(d=>d.Topic.toLowerCase().includes(I.target.value.toLowerCase()))},p=I=>{console.log(I.target.value),I.target.value===""&&(e.value=i.value),console.log("Invoked Knowledge Corpus Search"),e.value=i.value.filter(d=>d.OfferingType.toLowerCase().includes(I.target.value.toLowerCase()))},S=()=>{n.value="",o.value="",e.value=i.value};return kt(async()=>{await E(),s.value=!0,A.value=Array(e.value.length).fill(!0),console.log("array",A.value)}),(I,d)=>(m(),R(Le,null,[h("nav",rG,[ne(nG)]),s.value?(m(),R("div",oG,[h("div",sG,[AG,h("div",aG,[ne(y($m),{class:"w-7 h-7 mr-1"}),h("button",{onClick:l,class:"font-bold"},"Add New Topic")])]),h("div",cG,[uG,h("div",lG,[h("div",gG,[ne(y(Xm),{class:"w-5 h-5 mr-5 hidden md:flex"})]),h("div",EG,[h("div",hG,[h("div",CG,[Ye(h("input",{id:"topic-search",type:"search",onInput:C,"onUpdate:modelValue":d[0]||(d[0]=M=>n.value=M),class:"text-gray-500 font-medium text-sm px-2 py-2 w-full md:w-52 rounded-lg shadow-sm border-none border-gray-500 focus:outline-none focus:border focus:border-genpact-blue-box md:ml-2",placeholder:"enter topic name "},null,544),[[Ze,n.value]])]),IG,h("div",pG,[Ye(h("input",{id:"offering-search",type:"search",onInput:p,"onUpdate:modelValue":d[1]||(d[1]=M=>o.value=M),class:"text-gray-500 font-medium text-sm px-2 py-2 md:w-52 w-full rounded-lg shadow-sm border-none border-gray-500 focus:outline-none focus:border focus:border-genpact-blue-box",placeholder:"enter knowledge corpus"},null,544),[[Ze,o.value]])])]),h("div",{class:"mt-2 md:mt-0"},[h("button",{onClick:S,type:"reset",class:"text-white bg-genpact-blue-box hover:bg-genpact-darkest-blue font-medium rounded-full text-base px-8 py-1"}," Reset ")])])])]),h("div",dG,[SG,h("div",MG,[h("table",BG,[vG,h("tbody",null,[(m(!0),R(Le,null,lt(e.value,(M,B)=>(m(),R("tr",{key:B,class:"odd:bg-white even:bg-gray-100"},[h("th",fG,de(M.Topic||"title"),1),h("td",wG,de(M.Description||"desc"),1),h("td",mG,de(M.OfferingType||"Knowledge Corpus"),1),h("td",QG,[A.value[B]?(m(),R("button",{key:0,id:"index",onClick:D=>g(M,B),class:"hover:bg-genpact-darkest-blue bg-genpact-blue-box text-white font-bold py-2 px-6 rounded-lg hover:-translate-y-1 hover:scale-100 duration-300"}," edit ",8,RG)):(m(),R("div",DG,yG))])]))),128))])])])])])):(m(),Di(ll,{key:1}))],64))}})},Symbol.toStringTag,{value:"Module"})),TG={className:"flex justify-between items-center gap-4 h-14"},LG=h("div",{class:"font-bold text-base md:text-xl"},"Back",-1),OG=h("div",{class:"text-white font-bold md:text-xl text-base"},"AI Guru Edit Skill Data",-1),UG=h("img",{class:"md:w-36 w-20",src:So},null,-1),NG=Re({__name:"HeaderForEditSkillData",setup(t){const e=Aa(),i=()=>{ar(()=>{sessionStorage.removeItem("dataViewAccess")}),e.push({name:"SkillData"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")};return(n,o)=>(m(),R("div",TG,[h("div",{onClick:i,class:"flex justify-start items-center text-white cursor-pointer"},[ne(y(NC),{class:"md:w-9 w-5 h-5 md:h-9 mr-1"}),LG]),OG,UG]))}}),ji=t=>(st("data-v-18de1cf9"),t=t(),At(),t),KG={class:"bg-genpact-blue-box w-full px-5 mb-6"},FG={class:"grid grid-cols-5 gap-8 p-10 items-stretch"},GG=ji(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"topic",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[Rt("Topic Name "),h("span",{class:"label"},"*")])],-1)),xG={class:"col-span-4"},jG=["disabled"],kG=ji(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"description",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[Rt("Description "),h("span",{class:"label"},"*")])],-1)),YG={class:"col-span-4"},zG=ji(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"Knowledge Corpus",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[Rt("Knowledge Corpus "),h("span",{class:"label"},"*")])],-1)),PG={class:"col-span-4"},bG=ji(()=>h("div",{class:"col-span-1"},null,-1)),JG={class:"col-span-4"},HG={class:"md:flex block justify-between items-center space-y-2"},qG=["disabled"],VG={key:1,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40 px-4 py-2"},WG=[ji(()=>h("img",{class:"w-6 h-6 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],ZG=["disabled"],XG={key:3,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40 px-10 py-2"},_G=[ji(()=>h("img",{class:"w-6 h-6 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],$G=ji(()=>h("div",{class:"col-span-1"},null,-1)),ex={key:0,class:"col-span-4"},tx=[ji(()=>h("div",{class:"p-2 items-center text-lg font-bold bg-gray-200"}," This topic is under review and cannot be submitted again at this moment ",-1))],ix={key:0,class:"pl-16 pr-8 py-2"},nx={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[550px]"},rx={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},ox=ji(()=>h("thead",{class:"text-sm text-center md:text-base text-gray-700 uppercase bg-gray-200 top-0 sticky z-10"},[h("tr",null,[h("th",{scope:"col",class:"px-6 py-3"},"Topic name"),h("th",{scope:"col",class:"px-6 py-3"},"Description"),h("th",{scope:"col",class:"px-6 py-3"},"Knowledge Corpus"),h("th",{scope:"col",class:"px-6 py-3"},"Score")])],-1)),sx={key:0,class:"px-3 py-4 font-medium text-gray-900 text-center"},Ax={key:1,class:"px-3 py-4"},ax={key:2,class:"px-3 py-4 text-center"},cx={key:3,class:"px-3 py-4 text-center"},ux={class:"absolute top-0 md:left-20 md:right-20 left-12 right-12 flex justify-center items-center mx-auto z-[100]"},lx={class:"w-full rounded-md px-3 text-center mt-4 bg-green-500 py-2 text-white"},gx=Re({__name:"EditSkillData",setup(t){const e=ze(),i=ct(),n=f(!0),o=f(!0),s=f(!1),A=f(""),r=f(""),a=f(!1),c=f(!1),u=f(),l=f(),g=f([]),E=async()=>{var S,I,d,M,B,D,L;try{const U={question:e.descriptionForSkillData};console.log("question",r.value),n.value=!1;const Q=await ot("/SearchSkillTags",U);console.log("abc",(S=Q==null?void 0:Q.data)==null?void 0:S.body),l.value=(d=(I=Q==null?void 0:Q.data)==null?void 0:I.body)==null?void 0:d.length,console.log("ARRAY LENGTH",l.value),u.value=((M=Q==null?void 0:Q.data)==null?void 0:M.body)||[],g.value=u.value,console.log("length",(D=(B=Q==null?void 0:Q.data)==null?void 0:B.body)==null?void 0:D.length),console.log("data",Q),n.value=!0,a.value=!0,c.value=!0,console.log("showSubmitButton",c.value)}catch(U){if(console.error(U),n.value=!0,me.isAxiosError(U)){const Q=U;i.setError(((L=Q.response)==null?void 0:L.data).message)}else i.setError("We ran into an issue while fetching duplicate values.")}},C=async()=>{var S;try{const I={Topic:e.topicNameForSkillData,Description:e.descriptionForSkillData,OfferingType:e.offeringTypeForSkillData,DuplicateExists:l.value>0?1:0};o.value=!1,console.log("payload-=====>",I);const d=await ot("/InsertIntoTempSkillFile",I);console.log("data",d),A.value="Data Submitted Successfully!",o.value=!0,p()}catch(I){if(console.error(I),o.value=!0,me.isAxiosError(I)){const d=I;i.setError(((S=d.response)==null?void 0:S.data).message)}else i.setError("There was an issue while inserting data")}},p=()=>{s.value=!0,setTimeout(()=>{s.value=!1,ar(()=>{sessionStorage.removeItem("dataViewAccess")}),Mr.push({name:"SkillData"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")},3e3),c.value=!1};return(S,I)=>(m(),R(Le,null,[h("nav",KG,[ne(NG)]),h("div",FG,[GG,h("div",xG,[Ye(h("input",{disabled:y(e).enableInputbox!==!0,class:ge([y(e).enableInputbox!==!0?"cursor-not-allowed fill-gray-400":"","w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1"]),type:"text","onUpdate:modelValue":I[0]||(I[0]=d=>y(e).topicNameForSkillData=d),id:"topic",placeholder:"Write here...",required:""},null,10,jG),[[Ze,y(e).topicNameForSkillData]])]),kG,h("div",YG,[Ye(h("textarea",{"onUpdate:modelValue":I[1]||(I[1]=d=>y(e).descriptionForSkillData=d),onInput:I[2]||(I[2]=d=>c.value=!1),type:"text",id:"description",rows:"5",class:"w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1",placeholder:"Write here...",required:""},null,544),[[Ze,y(e).descriptionForSkillData]])]),zG,h("div",PG,[Ye(h("input",{"onUpdate:modelValue":I[3]||(I[3]=d=>y(e).offeringTypeForSkillData=d),type:"text",id:"offeringType",class:"w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1",placeholder:"Write here...",required:""},null,512),[[Ze,y(e).offeringTypeForSkillData]])]),bG,h("div",JG,[h("div",HG,[n.value?(m(),R("button",{key:0,disabled:y(e).isTopicPending===!0,class:ge([y(e).isTopicPending===!0?"cursor-not-allowed bg-gray-600":"cursor-pointer bg-genpact-darkest-blue","text-center whitespace-nowrap text-white w-40 px-4 py-2 rounded-md font-bold"]),onClick:E,type:"button"}," Duplicate Check ",10,qG)):(m(),R("div",VG,WG)),o.value?(m(),R("button",{key:2,disabled:c.value!==!0,class:ge([c.value!==!0?"cursor-not-allowed bg-gray-600":"cursor-pointer bg-genpact-darkest-blue","text-center text-white w-40 px-10 py-2 rounded-md font-bold"]),onClick:C,type:"submit"}," Submit ",10,ZG)):(m(),R("div",XG,_G))])]),$G,y(e).isTopicPending?(m(),R("div",ex,tx)):Be("",!0)]),a.value?(m(),R("div",ix,[h("div",nx,[h("table",rx,[ox,h("tbody",null,[(m(!0),R(Le,null,lt(g.value,(d,M)=>(m(),R("tr",{key:M,class:"odd:bg-white even:bg-gray-100"},[d.Topic!==y(e).topicNameForSkillData?(m(),R("th",sx,de(d.Topic||"title"),1)):Be("",!0),d.Topic!==y(e).topicNameForSkillData?(m(),R("td",Ax,de(d.Description||"desc"),1)):Be("",!0),d.Topic!==y(e).topicNameForSkillData?(m(),R("td",ax,de(d.OfferingType||"Knowledge Corpus"),1)):Be("",!0),d.Topic!==y(e).topicNameForSkillData?(m(),R("td",cx,de(d.new_tag),1)):Be("",!0)]))),128))])])])])):Be("",!0),Ye(h("div",ux,[h("div",lx,de(A.value),1)],512),[[Er,s.value]])],64))}}),B1="",Ex=Object.freeze(Object.defineProperty({__proto__:null,default:Pe(gx,[["__scopeId","data-v-18de1cf9"]])},Symbol.toStringTag,{value:"Module"})),hx={},Cx={className:"flex justify-between items-center gap-4 h-14"},Ix=[h("div",{class:"text-white font-bold md:text-xl text-base"}," AI Guru Skill Automation ",-1),h("img",{class:"md:w-36 w-20",src:So},null,-1)];function px(t,e){return m(),R("div",Cx,Ix)}const dx=Pe(hx,[["render",px]]),Sx={class:"bg-genpact-blue-box w-full px-5 mb-4"},Mx={key:0},Bx={class:"w-full px-6 py-1"},vx=h("div",{class:"flex justify-start items-start text-xl font-bold py-1 italic"}," Topic Update Request ",-1),fx={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[630px]"},wx={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},mx=h("thead",{class:"text-sm text-center md:text-base font-bold text-gray-700 uppercase bg-gray-200 top-0 sticky z-10"},[h("tr",null,[h("th",{scope:"col",class:"px-6 py-3"},"Topic name"),h("th",{scope:"col",class:"px-6 py-3"},"Description"),h("th",{scope:"col",class:"px-6 py-3"},"Knowledge Corpus"),h("th",{scope:"col",class:"px-6 py-3"},"Duplicate Exist"),h("th",{scope:"col",class:"px-6 py-3"},"View")])],-1),Qx={class:"px-3 py-4 font-medium text-gray-900 text-center"},Rx={class:"px-3 py-4"},Dx={class:"px-3 py-4 text-center"},yx={class:"px-2 py-4 text-center"},Tx={class:"px-2 py-4 text-gray-500 hover:text-genpact-darkest-blue"},Lx=Object.freeze(Object.defineProperty({__proto__:null,default:Re({__name:"SkillAutomation",setup(t){const e=f([]),i=f(),n=f(!1),o=ze(),s=ct(),A=Aa(),r=c=>{sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","skillAutomation"),A.replace({name:"EditSkillAdminData"}),o.topicNameForSkillData=c.Topic,o.descriptionForSkillData=c.Description,o.offeringTypeForSkillData=c.OfferingType,o.enableInputbox=!1},a=async()=>{var c,u;try{const l=await zt("/sqlTest");i.value=((c=l==null?void 0:l.data)==null?void 0:c.body)||[],e.value=i.value,console.log("length",l.data.length),console.log("data",l.data)}catch(l){if(console.error(l),me.isAxiosError(l)){const g=l;s.setError(((u=g.response)==null?void 0:u.data).message)}else s.setError("There was an issue while fetching data")}};return kt(async()=>{await a(),n.value=!0}),(c,u)=>(m(),R(Le,null,[h("nav",Sx,[ne(dx)]),n.value?(m(),R("div",Mx,[h("div",Bx,[vx,h("div",fx,[h("table",wx,[mx,h("tbody",null,[(m(!0),R(Le,null,lt(e.value,(l,g)=>(m(),R("tr",{key:g,class:"odd:bg-white even:bg-gray-100"},[h("th",Qx,de(l.Topic||"title"),1),h("td",Rx,de(l.Description||"desc"),1),h("td",Dx,de(l.OfferingType||"Knowledge Corpus"),1),h("td",yx,de(l.DuplicateExists),1),h("td",Tx,[ne(y(Wm),{onClick:E=>r(l),class:"w-8 h-8 text-center cursor-pointer hover:-translate-y-1 hover:scale-110 duration-300"},null,8,["onClick"])])]))),128))])])])])])):(m(),Di(ll,{key:1}))],64))}})},Symbol.toStringTag,{value:"Module"})),Ox={className:"flex justify-between items-center gap-4 h-14"},Ux=h("div",{class:"font-bold text-base md:text-xl"},"Back",-1),Nx=h("div",{class:"text-white font-bold md:text-xl text-base"},"AI Guru Edit Skill Admin Data",-1),Kx=h("img",{class:"md:w-36 w-20",src:So},null,-1),Fx=Re({__name:"HeaderForEditSKillAdminDatas",setup(t){const e=Aa(),i=()=>{const n=sessionStorage.getItem("role");console.log("role",n),n==="user"?e.push({name:"SkillData"}):n==="admin"?e.push({name:"SkillData"}):e.push({name:"SkillAutomation"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")};return(n,o)=>(m(),R("div",Ox,[h("div",{onClick:i,class:"flex justify-start items-center text-white cursor-pointer"},[ne(y(NC),{class:"md:w-9 w-5 h-5 md:h-9 mr-1"}),Ux]),Nx,Kx]))}}),gi=t=>(st("data-v-ecf2c818"),t=t(),At(),t),Gx={class:"bg-genpact-blue-box w-full px-5 mb-6"},xx={class:"grid grid-cols-5 gap-8 p-10 items-stretch"},jx=gi(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"topic",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[Rt("Topic Name "),h("span",{class:"label"},"*")])],-1)),kx={class:"col-span-4"},Yx=["disabled"],zx=gi(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"description",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[Rt("Description "),h("span",{class:"label"},"*")])],-1)),Px={class:"col-span-4"},bx=gi(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"Knowledge Corpus",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[Rt("Knowledge Corpus "),h("span",{class:"label"},"*")])],-1)),Jx={class:"col-span-4"},Hx=gi(()=>h("div",{class:"col-span-1"},null,-1)),qx={class:"col-span-4"},Vx={class:"grid md:grid-cols-5 grid-cols-1 justify-start items-center gap-2"},Wx={class:"col-span-1"},Zx=["disabled"],Xx={key:1,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40"},_x=[gi(()=>h("img",{class:"w-10 h-10 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],$x=gi(()=>h("div",{class:"col-span-1"},null,-1)),ej=gi(()=>h("div",{class:"col-span-1"},null,-1)),tj={class:"col-span-1 flex md:justify-end justify-start items-end"},ij={key:1,class:"flex justify-center items-center text-center w-52 bg-genpact-darkest-blue text-white rounded-md"},nj=[gi(()=>h("img",{class:"w-10 h-10 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],rj={class:"col-span-1 flex md:justify-end justify-start items-end"},oj=["disabled"],sj={key:1,class:"flex justify-center items-center text-center w-52 bg-genpact-darkest-blue text-white rounded-md"},Aj=[gi(()=>h("img",{class:"w-10 h-10 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],aj={class:"pl-16 pr-8 py-2"},cj={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[550px]"},uj={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},lj=gi(()=>h("thead",{class:"text-sm text-center md:text-base text-gray-700 uppercase bg-gray-200 top-0 sticky z-10"},[h("tr",null,[h("th",{scope:"col",class:"px-6 py-3"},"Topic name"),h("th",{scope:"col",class:"px-6 py-3"},"Description"),h("th",{scope:"col",class:"px-6 py-3"},"Knowledge Corpus"),h("th",{scope:"col",class:"px-6 py-3"},"Score")])],-1)),gj={class:"px-3 py-4 font-medium text-gray-900 text-center"},Ej={class:"px-3 py-4"},hj={class:"px-3 py-4 text-center"},Cj=gi(()=>h("td",{class:"px-3 py-4 text-center"},de("1.05"),-1)),Ij={class:"absolute top-0 md:left-20 md:right-20 left-12 right-12 flex justify-center items-center mx-auto z-[100]"},pj={class:"w-full rounded-md px-3 text-center mt-4 bg-green-500 py-2 text-white"},dj=Re({__name:"EditSkillAdminData",setup(t){const e=ze(),i=ct(),n=f(!0),o=f(!0),s=f(!0),A=f(!1),r=f(""),a=f(!1),c=f(!1),u=f(),l=f(),g=f(""),E=f([]),C=async()=>{var d,M,B,D,L,U;try{const Q={question:e.descriptionForSkillData};console.log("question",r.value),n.value=!1;const j=await ot("/SearchSkillTags",Q);l.value=(M=(d=j==null?void 0:j.data)==null?void 0:d.body)==null?void 0:M.length,console.log("ARRAY LENGTH",l.value),u.value=((B=j==null?void 0:j.data)==null?void 0:B.body)||[],E.value=u.value,console.log("length",(L=(D=j==null?void 0:j.data)==null?void 0:D.body)==null?void 0:L.length),console.log("data",j),n.value=!0,a.value=!0,c.value=!0,console.log("showSubmitButton",c.value)}catch(Q){if(console.error(Q),n.value=!0,me.isAxiosError(Q)){const j=Q;i.setError(((U=j.response)==null?void 0:U.data).message)}else i.setError("We ran into an issue while fetching duplicate values.")}},p=async()=>{var d;try{console.log("before rejecting topic"),o.value=!1;const M=encodeURIComponent(e.topicNameForSkillData),B=await zt(`/rejectTempTopic?Topic=${M}`);console.log("encoded topic",M),console.log("response",B),o.value=!0,B.status===200&&(e.topicNameForSkillData="",e.descriptionForSkillData="",e.offeringTypeForSkillData="",console.log("after rejecting topic"),g.value="Data Rejected Successfully!",I())}catch(M){if(console.error(M),o.value=!0,me.isAxiosError(M)){const B=M;i.setError(((d=B.response)==null?void 0:d.data).message)}else i.setError("We ran into an issue while rejecting values.")}},S=async()=>{var d;try{const M={Topic:e.topicNameForSkillData,Description:e.descriptionForSkillData,OfferingType:e.offeringTypeForSkillData};console.log("payload-=====>",M),s.value=!1;const B=await ot("/editMasterSkillFile",M);console.log("data",B),s.value=!0,g.value="Data Submitted Successfully!",I()}catch(M){if(console.error(M),s.value=!0,me.isAxiosError(M)){const B=M;i.setError(((d=B.response)==null?void 0:d.data).message)}else i.setError("There was an issue while inserting data")}},I=()=>{A.value=!0,setTimeout(()=>{A.value=!1;const d=sessionStorage.getItem("role");console.log("role",d),d==="user"?Mr.push({name:"SkillData"}):d==="admin"?Mr.push({name:"SkillData"}):Mr.push({name:"SkillAutomation"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")},3e3)};return(d,M)=>(m(),R(Le,null,[h("nav",Gx,[ne(Fx)]),h("div",xx,[jx,h("div",kx,[Ye(h("input",{disabled:y(e).enableInputbox!==!0,class:ge([y(e).enableInputbox!==!0?"cursor-not-allowed fill-gray-400":"","w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1"]),type:"text","onUpdate:modelValue":M[0]||(M[0]=B=>y(e).topicNameForSkillData=B),id:"topic",placeholder:"Write here...",required:""},null,10,Yx),[[Ze,y(e).topicNameForSkillData]])]),zx,h("div",Px,[Ye(h("textarea",{"onUpdate:modelValue":M[1]||(M[1]=B=>y(e).descriptionForSkillData=B),onInput:M[2]||(M[2]=B=>c.value=!1),type:"text",id:"description",rows:"5",class:"w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1",placeholder:"Write here...",required:""},null,544),[[Ze,y(e).descriptionForSkillData]])]),bx,h("div",Jx,[Ye(h("input",{"onUpdate:modelValue":M[3]||(M[3]=B=>y(e).offeringTypeForSkillData=B),type:"text",id:"offeringType",class:"w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1",placeholder:"Write here...",required:""},null,512),[[Ze,y(e).offeringTypeForSkillData]])]),Hx,h("div",qx,[h("div",Vx,[h("div",Wx,[n.value?(m(),R("button",{key:0,disabled:y(e).isTopicPending===!0,class:ge([y(e).isTopicPending===!0?"cursor-not-allowed bg-gray-600":"cursor-pointer bg-genpact-darkest-blue","text-center whitespace-nowrap text-white w-52 px-4 py-2 rounded-md font-bold"]),type:"button",onClick:C}," Duplicate Check ",10,Zx)):(m(),R("div",Xx,_x))]),$x,ej,h("div",tj,[o.value?(m(),R("button",{key:0,type:"button",onClick:p,class:"bg-genpact-darkest-blue text-center text-white w-52 px-16 py-2 rounded-md font-bold cursor-pointer"}," Reject ")):(m(),R("div",ij,nj))]),h("div",rj,[s.value?(m(),R("button",{key:0,type:"submit",disabled:c.value!==!0,class:ge([c.value!==!0?"cursor-not-allowed bg-gray-600":"cursor-pointer bg-genpact-darkest-blue","text-center text-white w-52 px-2 py-2 rounded-md whitespace-nowrap font-bold"]),onClick:S}," Approve & Submit ",10,oj)):(m(),R("div",sj,Aj))])])])]),Ye(h("div",aj,[h("div",cj,[h("table",uj,[lj,h("tbody",null,[(m(!0),R(Le,null,lt(E.value,(B,D)=>(m(),R("tr",{key:D,class:"odd:bg-white even:bg-gray-100"},[h("th",gj,de(B.Topic||"title"),1),h("td",Ej,de(B.Description||"desc"),1),h("td",hj,de(B.OfferingType||"Knowledge Corpus"),1),Cj]))),128))])])])],512),[[Er,a.value]]),Ye(h("div",Ij,[h("div",pj,de(g.value),1)],512),[[Er,A.value]])],64))}}),y1="",Sj=Object.freeze(Object.defineProperty({__proto__:null,default:Pe(dj,[["__scopeId","data-v-ecf2c818"]])},Symbol.toStringTag,{value:"Module"})),Mj="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgEAAAIBCAYAAADQ5mxhAAAACXBIWXMAAAsSAAALEgHS3X78AAAfXUlEQVR4nO3dsY7kRp7gYeZhjfI0uhfYg/YBpoDSA8ho+duGxh0NCpDc9VrmmZJ160pAYSR3ZdSdrTbmB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u3Tug6XEFNREBC0ozqD+t7Nr2WY4vL/fpPeQ+1a2kfTqF0cQKf8bthIe5e7M+h9/d7W+aH1dQCxGwsHHlfXx5+fGM28wu6aR/P22APp6xgSvhx7ThaW1F/03mcn4xdyKoz+F3d/ub/d3+pulxBTUQAStJ51L/ZYOV1o/pMPX/PGdFPu4FHl9efpn2wJa8Ucy01/mnVo4A3JeOBix2O2Gfw9vSJLNNx9UYJCv+u1CUiYErundDoW/SrYNfnDA7+znTrPA3v0uvwNPVBa/TzWk+Sz/nvv7p7ng/VvJwoHN9ly5Re24i35vLO0+ZbOdz+N29Gwp9k24dvPi4Sv8mNM8lghVIK/KrtNGYDhF/9J6V2LSCni7/Gn//vNWKO01ye/Hg9V89sRGcXuP0ul83eMi/Sj6Ht6VbCJ89rp67/A9aJgIAIChzAgAgKBEAAEGJAAAISgQAQFAiAACCEgEAEJQIAICgRAAABCUCACAoEQAAQYkAAAhKBABAUCIAAIISAQAQlAgAgKBEAAAEJQIAICgRAABBiQAACEoEAEBQIgAAghIBABCUCACAoEQAAAQlAgAgKBEAAEGJAAAISgQAQFAiAACCEgEAEJQIAICgRAAABCUCACAoEQAAQYkAAAhKBABAUCIAAIISAQAQlAgAgKBEAAAEJQIAICgRAABBiQAACEoEAEBQIgAAghIBABCUCACAoEQAAAQlAgAgKBEAAEGJAACIaBiG/w+yjGibxxwNWgAAAABJRU5ErkJggg==",Bj={},vj={class:"w-screen h-screen flex justify-center"},fj=[h("div",{class:"flex flex-col justify-center items-center gap-6"},[h("img",{class:"h-24",src:Mj}),h("div",{class:"font-bold text-[50px] capitalize text-gray-600"},"We are under maintenance"),h("div",{class:"font-medium text-lg capitalize text-gray-600"},"please check back later")],-1)];function wj(t,e){return m(),R("div",vj,fj)}const HS=Object.freeze(Object.defineProperty({__proto__:null,default:Pe(Bj,[["render",wj]])},Symbol.toStringTag,{value:"Module"}))});
35
+ This is a role-play simulation designed to mirror real-world scenarios. Just follow the prompts, speak naturally, and let the AI guide you. Based on your responses, you’ll receive personalized feedback to help sharpen your client engagement skills.`,zU=Re({__name:"greetingsSimulation",setup(t){const e=ze(),i=ct(),n=f(!1),o=f(!1),s=f(!0),A=()=>{e.simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"?(e.beginFlag=!1,n.value=!0):(e.beginFlag=!1,C())},r=`Hi, get ready to test your ${e.skillNameForSimulation||"Unknown"} knowledge! Here’s what to expect:`,a=` Hi ${e.learnerName||"Expert"}, and welcome!`,c=` Hi, ${e.learnerName||"Expert"}. Get ready to test your ${e.skillNameForSimulation||"Unknown"} knowledge! Here’s what to expect:`,u=tt(()=>["32b7d6d8-f7a8-40a0-ab84-8784f25897ef"].includes(e.simulationSkill)?r:["7bd03cb6-79ad-4e2a-8a8b-88dc16147369"].includes(e.simulationSkill)?a:c),l=`Hi, get ready to test your ${e.skillNameForSimulation||"Unknown"} knowledge! Here’s what to expect:`,g=` AI Guru will ask you a few questions on '${e.skillNameForSimulation.trim()||"Unknown"} '. Please provide detailed and thoughtful answers to the best of your knowledge. At the end, you'll receive a feedback, outlining your strengths and improvement areas.`,E=tt(()=>["32b7d6d8-f7a8-40a0-ab84-8784f25897ef"].includes(e.simulationSkill)?l:["7bd03cb6-79ad-4e2a-8a8b-88dc16147369"].includes(e.simulationSkill)?YU:g),C=async()=>{var p,S,I,d,M,B;console.log("firstQuestion fired==>"),s.value=!1;try{const D={question:"Hello, let's start"};if(e.conversations.push(D),e.assessmentQuestion){const L={past_messages:e.past_messages,question:"Let's begin",bandCode:e.band_code,userGenomeFunction:e.genomeFunctionValue,userGenomeRole:e.genomeRoleValue,skillId:e.simulationSkill||"937e84ef-e95d-4327-9afe-e7be2bf420eb"},U=f("");e.dotLoader=!0,Ft.value="listening";const Q=await ot("/sqlTest",L);e.addConversation((p=Q.data)==null?void 0:p.body,"new"),U.value=(I=(S=Q==null?void 0:Q.data)==null?void 0:S.body)==null?void 0:I.answer,e.dotLoader=!1,Ft.value="bot",e.showVoiceComponent&&(e.elevenLabs?await PS(U.value.replace(/[*#]/g,"")):await kS(U.value.replace(/[*#]/g,"")))}else{o.value=!0,e.dotLoader=!0,console.log("firstQuestion fired==> else part");const L={assessmentId:e.simulationSkill,question:"Hello, Let's begin",past_messages:e.past_messages,prompt:e.generatedPrompt,assessmentType:e.assessmentType,userFunction:e.genomeFunctionValue,empSeniority:e.empSeniority,functionRole:e.functionRole,userBand:e,storeFinalFeedback:e.storeFinalFeedback,storeFinalScore:e.storeFinalScore};let U;$t==="prod"?U="/ManualExportActivity":U="/fetchCompletionDemo";const Q=await ot(U,L);e.addConversation((d=Q.data)==null?void 0:d.body,"assessment"),e.dotLoader=!1}}catch(D){if(console.error(D),me.isAxiosError(D)){const L=D;console.log("Error found!"),console.error((M=L.response)==null?void 0:M.data),i.setError(((B=L.response)==null?void 0:B.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(p,S)=>(m(),R("section",null,[ne(fr,{"is-visible":n.value},{default:hi(()=>[h("div",OU,[UU,NU,h("button",{onClick:S[0]||(S[0]=I=>{n.value=!1,C()}),class:"bg-[#021c42] rounded-md px-4 py-1.5 text-center text-[16px] text-white cursor-pointer italic hover:bg-blue-700"}," Proceed ")])]),_:1},8,["is-visible"]),h("div",KU,[h("div",FU,[h("div",GU,de(u.value),1),h("div",xU,de(E.value),1)])]),y(e).beginFlag?(m(),R("span",jU,[h("button",{type:"button",id:"button",onClick:A,class:"mt-4 bg-[#021c42] rounded-md px-4 py-1.5 text-center text-[16px] text-white cursor-pointer italic hover:bg-blue-700"}," Let's begin ")])):Be("",!0),kU]))}}),PU="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjI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Y28VLRQB5/4T+H174ft9ahutYmvBqAYLvJOzOa8/H7Oc6zGVNeKNuyCq4Ir6AooA8f8PfBzUdK162vr3xFcXtvEcvBKxZX9iDXp/8AYOkZ/wCQXZ/9+V/wrRooA8X8T/BC61/WLm5TW3htJH3JbY+RPoOldD4r+GL+I/Cuj6Mt95f9nhQXI+/ivR6KAKGlaVa6VZQ29tbxRlI1RmRAu4gYyav0UUAf/9k=",hg=t=>(st("data-v-5495a945"),t=t(),At(),t),bU={class:"fontFormattingAMA flex items-end justify-start py-2"},JU={class:"line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg"},HU=["innerHTML"],qU=["innerHTML"],VU={key:0,class:"py-4"},WU={class:"fontFormattingAMA px-2 py-1.5 md:px-6"},ZU=["value","disabled","name"],XU={for:"item",name:"options-Array",id:"index"},_U={key:1,class:"py-4"},$U={class:"fontFormattingAMA px-2 py-1.5 md:px-6"},eN=["onClick","disabled","name"],tN={for:"item",name:"options-Array",id:"index"},iN={key:2,class:"flex flex-col justify-start py-10"},nN=[hg(()=>h("div",{class:"mb-4"}," Add Agentic AI to your Digital Skills on Genome.ai and start mastering AI today! ",-1)),hg(()=>h("img",{class:"h-20 w-20",src:PU,alt:"qr_code"},null,-1))],rN={key:3,class:"flex flex-col justify-start items-start mt-4 bg-gray-100 rounded-lg"},oN=hg(()=>h("div",{class:""},[Rt(" Please select interaction mode below "),h("span",{class:"italic"},"(Note: once selected the mode can't be changed during the interaction. You need to re-start to change the interaction mode)")],-1)),sN={class:"flex justify-start items-center md:gap-[40px] gap-[30px]"},AN=Re({__name:"responseSimulation",props:{question:{type:String,required:!0},c2question:{type:String,required:!0},answer:{type:String,required:!0},questionId:{type:String,required:!0},showFeedback:{type:Boolean,default:!0},showSources:{type:String,default:""},relatedQues:{type:Array,required:!0},optionsArray:{type:Array,default:[]},ansId:{type:Number,default:0}},emits:["char-typed"],setup(t,{emit:e}){const i=t,n=f([]),o=f(!1),s=ze(),A=f("");let r=[],a="";const c=async()=>{console.log("startCharByChar "),r=a.split(""),A.value="";for(let E=0;E<r.length;E++)A.value+=r[E],E%30&&e("char-typed"),await new Promise(C=>setTimeout(C,50))},u=()=>{s.showSelectTypeConvesation=!1,s.isRestart=!0,s.showModelToggle=!1,s.isSpeechToggle=!1,console.log("text mode",s.isSpeechToggle)},l=()=>{s.isRestart=!0,s.beginFlag=!0,s.showVoiceComponent=!0,s.showSelectTypeConvesation=!1,s.showModelToggle=!0,s.isSpeechToggle=!1,console.log("text mode",s.isSpeechToggle)},g=tt(()=>{const E=i.answer.replace(/[*#]/g,"").replace(/Assessment Rating & Feedback/g,'<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>').replace(/BEGIN ROLE PLAY./g,'<div style="font-size: 18px; font-weight: bold;">BEGIN ROLE PLAY</div>');(E.includes("Thank you for your participation!")||E.includes("Thank you for your participation"))&&(s.searchBoxdisable=!1,o.value=!0),(E.includes("BEGIN ROLE PLAY")||E.includes("BEGIN ROLE PLAY."))&&(s.showSelectTypeConvesation=!0);const C=/\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;if(E.includes("AI Guru")){if(E.includes("AI Guru"))return console.log("aig found"),E.replace(C,(p,S,I)=>`<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${S}</a>`)}else return E.replace(C,(p,S,I)=>`<a href="${I}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${S}</a>`);if(E.includes("Assessment Rating & Feedback")){const p=E.split("Assessment Rating & Feedback")[0],S=E.split("Assessment Rating & Feedback")[1];s.conversations.push(p),s.conversations.push(S)}});return Qi(()=>i.answer,()=>{let E=i.answer.replace(/[*#]/g,"").replace(/Assessment Rating & Feedback/g,'<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>');const C=/\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;if(E.includes("AI Guru")?E=E.replace(C,(p,S,I)=>`<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${S}</a>`):E=E.replace(C,(p,S,I)=>`<a href="${I}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${S}</a>`),E.includes("Assessment Rating & Feedback")){const p=E.split("Assessment Rating & Feedback")[0],S=E.split("Assessment Rating & Feedback")[1];s.conversations.push(p),s.conversations.push(S)}a=E,s.showVoiceComponent&&c(),console.log("watch for startCharByChar")},{immediate:!0}),Qi(n,E=>{s.question=(E??[]).join(", "),console.log("selectedOptions",E)}),(E,C)=>(m(),R("div",bU,[h("div",JU,[y(s).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"&&y(s).showVoiceComponent===!0&&y(s).conversations.length-1===i.ansId&&!i.answer.includes("BEGIN ROLE PLAY")?(m(),R("span",{key:0,class:"fontFormattingAMA",innerHTML:A.value},null,8,HU)):(m(),R("span",{key:1,class:"fontFormattingAMA",innerHTML:g.value},null,8,qU)),h("div",null,[t.optionsArray.length&&y(s).mcqType==="multi_choice"?(m(),R("div",VU,[(m(!0),R(Le,null,lt(t.optionsArray,(p,S)=>(m(),R("div",{key:S,class:"italic"},[h("div",WU,[Ye(h("input",{class:"mr-4 cursor-pointer",type:"checkbox",value:p,"onUpdate:modelValue":C[0]||(C[0]=I=>n.value=I),disabled:y(s).conversations.length-1!==i.ansId,name:g.value},null,8,ZU),[[xv,n.value]]),h("label",XU,de(p),1)])]))),128))])):t.optionsArray.length?(m(),R("div",_U,[(m(!0),R(Le,null,lt(t.optionsArray,(p,S)=>(m(),R("div",{key:S,class:"italic"},[h("div",$U,[h("input",{class:"mr-4 cursor-pointer",type:"radio",onClick:I=>y(s).question=String(t.optionsArray[S]),disabled:y(s).conversations.length-1!==i.ansId,name:g.value},null,8,eN),h("label",tN,de(p),1)])]))),128))])):Be("",!0)]),o.value&&y(s).simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ef"?(m(),R("div",iN,nN)):Be("",!0),y(s).isSpeechToggle&&y(s).showSelectTypeConvesation&&y(s).simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"&&y(s).conversations.length-1===i.ansId?(m(),R("div",rN,[oN,h("div",sN,[h("button",{type:"button",id:"button",onClick:C[1]||(C[1]=p=>u()),class:"mt-4 w-32 cursor-pointer bg-[#021c42] hover:bg-blue-700 italic rounded-md px-4 py-1.5 text-center text-white text-[16px]"}," Text Mode "),h("button",{type:"button",id:"button",onClick:C[2]||(C[2]=p=>l()),class:"mt-4 w-32 cursor-pointer bg-[#021c42] hover:bg-blue-700 italic rounded-md px-4 py-1.5 text-center text-white text-[16px]"}," Voice Mode ")])])):Be("",!0)])]))}}),Ok="",aN=Pe(AN,[["__scopeId","data-v-5495a945"]]),cN={class:"flex justify-end items-end py-3"},uN={class:"max-w-[80%]"},lN={class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},gN=Re({__name:"learnerSimulation",props:{question:{type:String,required:!0},showFeedback:{type:Boolean,default:!0}},setup(t){return(e,i)=>(m(),R("div",cN,[h("div",uN,[h("div",lN,de(t.question),1)])]))}}),EN=t=>(st("data-v-347ad6de"),t=t(),At(),t),hN={class:"flex w-full flex-col items-start justify-start bg-white"},CN={class:"bot-typing-animation gap-1"},IN={class:"block w-full text-lg italic text-gray-800"},pN=EN(()=>h("span",{class:"dot-animation"},[h("span",null,"."),h("span",null,"."),h("span",null,".")],-1)),dN=cr('<div class="block w-full max-w-full items-stretch" data-v-347ad6de><div class="flex animate-pulse items-start justify-start space-x-4" data-v-347ad6de><div class="flex-1 space-y-6 py-1" data-v-347ad6de><div class="h-2 w-full rounded bg-gray-300" data-v-347ad6de></div><div class="space-y-3" data-v-347ad6de><div class="grid grid-cols-3 gap-4" data-v-347ad6de><div class="col-span-2 h-2 rounded bg-gray-300" data-v-347ad6de></div><div class="col-span-1 h-2 rounded bg-gray-300" data-v-347ad6de></div></div><div class="h-2 rounded bg-gray-300" data-v-347ad6de></div></div></div></div></div>',1),SN=Re({__name:"LoadingResponse",setup(t){const e=f("Generating response"),i=f(["This may take a few seconds","Fetching the best response for you","Thinking... give me a moment","One moment while I gather the information","Hang in tight, we are almost there","Almost there... just a bit longer","Compiling a response for you"]);return setTimeout(()=>{const n=Math.floor(Math.random()*i.value.length);e.value=i.value[n]},15e3),(n,o)=>(m(),R("div",hN,[h("div",CN,[h("div",IN,de(e.value),1),pN]),dN]))}}),Uk="",MN=Pe(SN,[["__scopeId","data-v-347ad6de"]]),BN={class:"flex mx-auto justify-end items-end py-3"},vN={class:"max-w-[80%]"},fN={class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},wN=Re({__name:"QuestionStreaming",setup(t){const e=ze();return(i,n)=>(m(),R("div",BN,[h("div",vN,[h("div",fN,de(y(e).userSpeechText),1)])]))}}),mN={key:0},QN={key:1},RN={key:0,class:"flex"},DN={key:1,name:"askQuestion"},yN=Re({__name:"conversationSimulation",setup(t){let e=f(""),i=f("");e.value='<a style="color:#00AECF;"',i.value='<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';const n=ze(),o=f(),s=()=>{o.value.scrollTo(0,o.value.scrollHeight)};return kt(()=>{var a;const A=document.getElementsByName("askQuestion"),r=Array.from(A);console.log("New array===>",r),A.length&&((a=r==null?void 0:r.pop())==null||a.scrollIntoView({behavior:"smooth",block:"center"})),window.addEventListener("custom-event",s)}),VA(()=>{var a;const A=document.getElementsByName("askQuestion"),r=Array.from(A);console.log("New array===>",r),A.length&&((a=r==null?void 0:r.pop())==null||a.scrollIntoView({behavior:"smooth",block:"center"}))}),ar(()=>{window.removeEventListener("custom-event",s)}),(A,r)=>(m(),R("div",{ref_key:"nestedElement",ref:o,class:"smooth-scroll overflow-auto md:px-6 px-2"},[ne(zU),(m(!0),R(Le,null,lt(y(n).conversations,(a,c)=>(m(),R("div",{key:c},[a.question?(m(),R("div",mN,[ne(gN,{question:a.question,c2question:a.c2question,"show-feedback":a.showFeedback,id:`qId${c}`,name:"askQuestion","que-id":c},null,8,["question","c2question","show-feedback","id","que-id"])])):Be("",!0),a.answer?(m(),R("div",QN,[ne(aN,{question:a==null?void 0:a.question,c2question:a==null?void 0:a.c2question,"show-sources":a==null?void 0:a.showSources,questionId:a.id,answer:a.answer.replaceAll("<a",y(e)).replaceAll("<ul",y(i)),"show-feedback":a.showFeedback,"related-ques":a.relatedQues,"options-array":a.optionsArray,"ans-id":c,onCharTyped:s},null,8,["question","c2question","show-sources","questionId","answer","show-feedback","related-ques","options-array","ans-id"])])):Be("",!0)]))),128)),y(n).dotLoader?(m(),R("div",RN,[ne(MN)])):Be("",!0),y(n).userspeaking?(m(),R("div",DN,[ne(wN)])):Be("",!0)],512))}}),Nk="",TN=Pe(yN,[["__scopeId","data-v-e55a322f"]]),Cg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAYCAYAAAARfGZ1AAABSUlEQVR4nLXWvUocURTA8d/eQosEgmQL0RRTRFCMhYKPYcDCIrUsPoCQNvMEYmEgRYp09luElPsIVmKKJIX4UUQJxMJAXC1mL4zLzjq7O/OHA/P5v+ecmbl3GsoxjVnM4S8u8bvkvYXCFr7hH+774if2sTKqeAu/BggHxR2+oPmUtIG0pLQ/TrE2TP5xTHGMayzkM43s4BMkSSJJkqeqfESn04mbJ1jHTTzQxJ+YQZqm96PSV0EKoSd/jxcjpTqcXTSDrDXvKhTDc7wNWMWriuWwEbBYgxiWguyTroP5IHu6ddANOK9JfhZkL30dfA84ks0LVdOOPT+sWHyDdtyZwZXJJq18fOgfrVWR+BjPBpVzMKH4Cq+LehUXi+4Y4h94UyTOs9m7uIz0Pz7jZRlxZArb+Irbgkz3sFwkaBSdGDBQ/tfiQrakDeUBf+jdzbi9K1QAAAAASUVORK5CYII=",LN={class:"flex items-center gap-4 py-2 rounded-full z-10"},ON={key:0,class:"flex items-center"},UN={width:"30",height:"30",viewBox:"0 0 36 24",class:"fill-white",style:{transform:"scaleX(-1)"}},NN=[cr('<rect x="0" y="11" width="2" height="2" rx="1"><animate attributeName="height" values="2;6;2" dur="1s" repeatCount="indefinite" begin="0s"></animate><animate attributeName="y" values="11;9;11" dur="1s" repeatCount="indefinite" begin="0s"></animate></rect><rect x="4" y="10" width="2" height="4" rx="1"><animate attributeName="height" values="4;8;4" dur="1s" repeatCount="indefinite" begin="0.1s"></animate><animate attributeName="y" values="10;8;10" dur="1s" repeatCount="indefinite" begin="0.1s"></animate></rect><rect x="8" y="8" width="2" height="8" rx="1"><animate attributeName="height" values="8;12;8" dur="1s" repeatCount="indefinite" begin="0.2s"></animate><animate attributeName="y" values="8;6;8" dur="1s" repeatCount="indefinite" begin="0.2s"></animate></rect><rect x="12" y="6" width="2" height="12" rx="1"><animate attributeName="height" values="12;16;12" dur="1s" repeatCount="indefinite" begin="0.3s"></animate><animate attributeName="y" values="6;4;6" dur="1s" repeatCount="indefinite" begin="0.3s"></animate></rect><rect x="16" y="4" width="2" height="16" rx="1"><animate attributeName="height" values="16;20;16" dur="1s" repeatCount="indefinite" begin="0.4s"></animate><animate attributeName="y" values="4;2;4" dur="1s" repeatCount="indefinite" begin="0.4s"></animate></rect><rect x="20" y="6" width="2" height="12" rx="1"><animate attributeName="height" values="12;16;12" dur="1s" repeatCount="indefinite" begin="0.5s"></animate><animate attributeName="y" values="6;4;6" dur="1s" repeatCount="indefinite" begin="0.5s"></animate></rect><rect x="24" y="8" width="2" height="8" rx="1"><animate attributeName="height" values="8;12;8" dur="1s" repeatCount="indefinite" begin="0.6s"></animate><animate attributeName="y" values="8;6;8" dur="1s" repeatCount="indefinite" begin="0.6s"></animate></rect><rect x="28" y="10" width="2" height="4" rx="1"><animate attributeName="height" values="4;8;4" dur="1s" repeatCount="indefinite" begin="0.7s"></animate><animate attributeName="y" values="10;8;10" dur="1s" repeatCount="indefinite" begin="0.7s"></animate></rect><rect x="32" y="11" width="2" height="2" rx="1"><animate attributeName="height" values="2;6;2" dur="1s" repeatCount="indefinite" begin="0.8s"></animate><animate attributeName="y" values="11;9;11" dur="1s" repeatCount="indefinite" begin="0.8s"></animate></rect>',9)],KN={key:1,class:"flex items-center"},FN={width:"30",height:"30",viewBox:"0 0 36 24",class:"fill-white",style:{transform:"scaleX(-1)"}},GN=[cr('<rect x="0" y="11" width="2" height="2" rx="1"><animate attributeName="height" values="2;6;2" dur="1s" repeatCount="indefinite" begin="0s"></animate><animate attributeName="y" values="11;9;11" dur="1s" repeatCount="indefinite" begin="0s"></animate></rect><rect x="4" y="10" width="2" height="4" rx="1"><animate attributeName="height" values="4;8;4" dur="1s" repeatCount="indefinite" begin="0.1s"></animate><animate attributeName="y" values="10;8;10" dur="1s" repeatCount="indefinite" begin="0.1s"></animate></rect><rect x="8" y="8" width="2" height="8" rx="1"><animate attributeName="height" values="8;12;8" dur="1s" repeatCount="indefinite" begin="0.2s"></animate><animate attributeName="y" values="8;6;8" dur="1s" repeatCount="indefinite" begin="0.2s"></animate></rect><rect x="12" y="6" width="2" height="12" rx="1"><animate attributeName="height" values="12;16;12" dur="1s" repeatCount="indefinite" begin="0.3s"></animate><animate attributeName="y" values="6;4;6" dur="1s" repeatCount="indefinite" begin="0.3s"></animate></rect><rect x="16" y="4" width="2" height="16" rx="1"><animate attributeName="height" values="16;20;16" dur="1s" repeatCount="indefinite" begin="0.4s"></animate><animate attributeName="y" values="4;2;4" dur="1s" repeatCount="indefinite" begin="0.4s"></animate></rect><rect x="20" y="6" width="2" height="12" rx="1"><animate attributeName="height" values="12;16;12" dur="1s" repeatCount="indefinite" begin="0.5s"></animate><animate attributeName="y" values="6;4;6" dur="1s" repeatCount="indefinite" begin="0.5s"></animate></rect><rect x="24" y="8" width="2" height="8" rx="1"><animate attributeName="height" values="8;12;8" dur="1s" repeatCount="indefinite" begin="0.6s"></animate><animate attributeName="y" values="8;6;8" dur="1s" repeatCount="indefinite" begin="0.6s"></animate></rect><rect x="28" y="10" width="2" height="4" rx="1"><animate attributeName="height" values="4;8;4" dur="1s" repeatCount="indefinite" begin="0.7s"></animate><animate attributeName="y" values="10;8;10" dur="1s" repeatCount="indefinite" begin="0.7s"></animate></rect><rect x="32" y="11" width="2" height="2" rx="1"><animate attributeName="height" values="2;6;2" dur="1s" repeatCount="indefinite" begin="0.8s"></animate><animate attributeName="y" values="11;9;11" dur="1s" repeatCount="indefinite" begin="0.8s"></animate></rect>',9)],xN={key:2,class:"flex items-center"},jN=[cr('<svg width="30" height="30" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="12" y="16" width="40" height="32" rx="8" fill="white" stroke="#9CA3AF" stroke-width="2"></rect><circle cx="24" cy="32" r="4" fill="black"></circle><circle cx="40" cy="32" r="4" fill="black"></circle><line x1="32" y1="10" x2="32" y2="16" stroke="#9CA3AF" stroke-width="2"></line><circle cx="32" cy="8" r="2" fill="white"></circle><circle cx="52" cy="14" r="3" fill="white"><animate attributeName="opacity" values="0;1;0" dur="1.2s" begin="0s" repeatCount="indefinite"></animate></circle><circle cx="58" cy="10" r="2.5" fill="white"><animate attributeName="opacity" values="0;1;0" dur="1.2s" begin="0.2s" repeatCount="indefinite"></animate></circle><circle cx="63" cy="6" r="2" fill="white"><animate attributeName="opacity" values="0;1;0" dur="1.2s" begin="0.4s" repeatCount="indefinite"></animate></circle></svg>',1)],kN={class:"tooltiptext text-genpact-darkest-teal"},YN=[h("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-[10px] w-[10px] text-gray-700",fill:"currentColor",viewBox:"0 0 24 24"},[h("path",{d:"M12 14a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 14 0h-2zm-5 9a7 7 0 0 0 7-7h2a9 9 0 0 1-8 8.94V22h-2v-1.06A9 9 0 0 1 3 13h2a7 7 0 0 0 7 7z"})],-1)],zN=[h("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-[10px] w-[10px] text-gray-700",fill:"currentColor",viewBox:"0 0 24 24"},[h("path",{d:"M12 14a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 14 0h-2zm-5 9a7 7 0 0 0 7-7h2a9 9 0 0 1-8 8.94V22h-2v-1.06A9 9 0 0 1 3 13h2a7 7 0 0 0 7 7z"}),h("line",{x1:"4",y1:"4",x2:"20",y2:"20",stroke:"currentColor","stroke-width":"2"})],-1)],PN=Re({__name:"NewVoiceConversation",setup(t){const e=ze(),i=ct(),n=f(""),o=f(!1),s=f("Turn on mic"),A=()=>{o.value===!1?e.elevenLabs?(console.log("mic enabled true 11labs"),o.value=!0,Eg(),Ft.value="user",s.value="Turn off mic"):(console.log("mic enabled true"),o.value=!0,xr(),wU(),Ft.value="user",s.value="Turn off mic"):e.elevenLabs?(console.log("mic enabled false"),gg(),o.value=!1,s.value="Turn on mic"):(console.log("mic enabled false"),lg(),o.value=!1,s.value="Turn on mic")},r=()=>{e.elevenLabs?(console.log("closeConversation 11 labs"),gg(),Ft.value="none",o.value=!1):(console.log("closeConversation"),lg(),xr(),Ft.value="none",o.value=!1)},a=async()=>{var c,u,l,g,E,C;try{const p={question:Fr.value||MA.value};console.log("ques",p),e.conversations.push(p),e.dotLoader=!0,e.question="";const S={past_messages:e.past_messages,question:Fr.value||MA.value,bandCode:"4A",userGenomeFunction:"HR",userGenomeRole:"Consultant",skillId:"7bd03cb6-79ad-4e2a-8a8b-88dc16147369"},I=await ot("/sqlTest",S);if(Ft.value="bot",n.value=(u=(c=I==null?void 0:I.data)==null?void 0:c.body)==null?void 0:u.answer,n.value===""){console.log("in the if case calling api again");const d=await ot("/sqlTest",S);e.addConversation((l=d.data)==null?void 0:l.body,"new")}else console.log("in the else case"),e.addConversation((g=I.data)==null?void 0:g.body,"new");e.dotLoader=!1,console.log("answer.value",n.value.replace(/[*#]/g,"")),e.elevenLabs?await PS(n.value.replace(/[*#]/g,"")):n.value.includes("Feedback and Assessment")?(e.showVoiceComponent=!1,lg()):await kS(n.value.replace(/[*#]/g,""))}catch(p){if(console.error(p),me.isAxiosError(p)){const S=p;console.log("Error found!"),console.error((E=S.response)==null?void 0:E.data),i.setError(((C=S.response)==null?void 0:C.data).message)}else i.setError("There was an issue, please contact helpmate")}};return Qi(Fr,async c=>{c&&(console.log("Recognized text:",c),Ft.value="listening",e.userspeaking=!1,console.log("store userspeaking in recognized",e.userspeaking),await a(),Fr.value="")}),Qi(MA,async c=>{c&&(console.log("Recognized text:",c),Ft.value="listening",await a(),MA.value="")}),(c,u)=>(m(),R("div",LN,[y(Ft)==="bot"?(m(),R("div",ON,[h("span",null,[(m(),R("svg",UN,NN))])])):y(Ft)==="user"?(m(),R("div",KN,[h("span",null,[(m(),R("svg",FN,GN))])])):y(Ft)==="listening"?(m(),R("div",xN,jN)):Be("",!0),h("div",{class:ge([o.value?"":"animate-pulse","tooltip"])},[h("span",kN,de(s.value),1),o.value?(m(),R("button",{key:0,class:"rounded-full bg-white p-2 transition hover:bg-gray-300",onClick:u[0]||(u[0]=l=>A())},YN)):(m(),R("button",{key:1,class:"rounded-full bg-white p-2 transition hover:bg-gray-300",onClick:u[1]||(u[1]=l=>A())},zN))],2),h("button",{class:"rounded-full bg-white p-2 hover:bg-gray-300",onClick:u[2]||(u[2]=l=>r())},[ne(y(KC),{class:"h-[10px] w-[10px] text-gray-700"})])]))}}),pn=t=>(st("data-v-e951c0ed"),t=t(),At(),t),bN={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},JN={class:"py-2"},HN={class:"flex"},qN={class:"z-1 relative w-full"},VN={class:"flex justify-between my-2 w-full"},WN=pn(()=>h("div",null,null,-1)),ZN={key:0,class:"flex justify-center bg-genpact-darkest-blue px-4 rounded-full"},XN={class:"relative w-full"},_N={class:"absolute inset-y-0 left-0 flex items-center pl-3"},$N={class:"tooltip"},eK=pn(()=>h("span",{class:"tooltiptext text-genpact-darkest-teal"},"Restart",-1)),tK=[pn(()=>h("path",{d:"M12 4C8.229 4 6.343 4 5.172 5.172C4.001 6.344 4 8.229 4 12V18C4 18.943 4 19.414 4.293 19.707C4.586 20 5.057 20 6 20H12C15.771 20 17.657 20 18.828 18.828C19.999 17.656 20 15.771 20 12",stroke:"currentColor","stroke-width":"2"},null,-1)),pn(()=>h("path",{d:"M9 10H15M9 14H12M19 8V2M16 5H22",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1))],iK={class:"absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3"},nK={key:0},rK=["disabled"],oK=[pn(()=>h("path",{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576 6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76 7.494-7.493Z"},null,-1))],sK={key:1,class:"tooltip"},AK=[pn(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),pn(()=>h("img",{class:"w-7 h-7",src:Cg,alt:"watingIcon"},null,-1))],aK={class:"flex justify-start gap-2 md:gap-1"},cK=["disabled"],uK=pn(()=>h("div",{class:"pt-1 text-start font-sans text-xs font-bold text-gray-500 md:text-sm"},[h("div",null," Note: AI-generated response may not be fully accurate; check with experts for critical information. ")],-1)),lK=Re({__name:"NewQuestionSimulation",setup(t){const e=ze(),i=ct(),n=f(""),o=f("");e.question="";const s=f(null),A=f(!1),r=f(ei),a=f(!1);o.value=e.recognizedText,kt(()=>{s.value.focus()});const c=()=>{window.location.reload()},u=g=>{const E=g.length;r.value=ei-E,A.value=E>=ei},l=async()=>{var g,E,C,p,S,I,d,M;console.log("options fdsfdscdzxfsdv",e.recognizedText);try{if(console.log("options fdsfdscdzxfsdv",e.recognizedText),e.question.trim().length<1){console.log("Please enter answer!");return}a.value=!0,e.dotLoader=!0;const B={question:e.question||e.recognizedText};console.log("ques",B),e.conversations.push(B);const D=f("");D.value=e.question||e.recognizedText,e.question="";const L={ohr_id:n.value,past_messages:e.past_messages,question:D.value||e.recognizedText,bandCode:e.band_code,userGenomeFunction:e.genomeFunctionValue,userGenomeRole:e.genomeRoleValue,skillId:e.simulationSkill||"937e84ef-e95d-4327-9afe-e7be2bf420eb"},U=await ot("/sqlTest",L);if(n.value=(E=(g=U.data)==null?void 0:g.body)==null?void 0:E.ohr,((p=(C=U==null?void 0:U.data)==null?void 0:C.body)==null?void 0:p.answer)===""){console.log("in the if case calling api again");const j=await ot("/sqlTest",L);e.addConversation((S=j.data)==null?void 0:S.body,"new")}else console.log("in the else case"),e.addConversation((I=U.data)==null?void 0:I.body,"new");console.log("ohr id asdf",n.value),a.value=!1,e.dotLoader=!1,e.recognizedText=""}catch(B){if(console.error(B),e.dotLoader=!1,me.isAxiosError(B)){const D=B;console.log("Error found!"),console.error((d=D.response)==null?void 0:d.data),i.setError(((M=D.response)==null?void 0:M.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(g,E)=>(m(),R("div",bN,[h("div",JN,[h("div",HN,[h("div",qN,[h("div",VN,[WN,y(e).showVoiceComponent?(m(),R("div",ZN,[ne(PN)])):Be("",!0)]),h("div",XN,[h("div",_N,[h("div",$N,[eK,(m(),R("svg",{onClick:c,class:"ml-2 h-7 w-7 rounded",id:"newTopicDisable",width:"7",height:"",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",title:"restart"},tK))])]),h("div",iK,[a.value?(m(),R("div",sK,AK)):(m(),R("div",nK,[(m(),R("svg",{disabled:y(e).beginFlag===!0,class:ge([y(e).beginFlag===!0?"cursor-not-allowed text-gray-600":"cursor-pointer","bi bi-send ml-2 h-7 w-7 rotate-45 rounded"]),onClick:E[0]||(E[0]=C=>y(e).searchBoxdisable===!1||y(e).beginFlag===!0?"":l()),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},oK,10,rK))]))]),h("div",aK,[Ye(h("input",{onKeyup:[E[1]||(E[1]=Fu(C=>a.value?"":l(),["enter"])),E[3]||(E[3]=C=>u(y(e).question))],disabled:y(e).beginFlag===!0||y(e).searchBoxdisable===!1,class:ge([y(e).beginFlag===!0||y(e).searchBoxdisable===!1?"cursor-not-allowed bg-[#e5e7eb]":"bg-white","fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] px-[70px]"]),"onUpdate:modelValue":E[2]||(E[2]=C=>y(e).question=C),placeholder:"Write your answer here...",type:"text",ref_key:"AiSearch",ref:s},null,42,cK),[[Ze,y(e).question]])])]),uK])])])]))}}),Jk="",gK=Pe(lK,[["__scopeId","data-v-e951c0ed"]]),bc=t=>(st("data-v-bbd70acc"),t=t(),At(),t),EK={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},hK={class:"py-2"},CK={class:"flex"},IK={class:"z-1 relative w-full"},pK={class:"relative w-full"},dK={class:"absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3"},SK={key:0},MK=["disabled"],BK=[bc(()=>h("path",{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576 6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76 7.494-7.493Z"},null,-1))],vK={key:1,class:"tooltip"},fK=[bc(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),bc(()=>h("img",{class:"w-7 h-7",src:Cg,alt:"watingIcon"},null,-1))],wK={class:"flex justify-start gap-2 md:gap-1"},mK=["disabled"],QK=bc(()=>h("div",{class:"pt-1 text-start font-sans text-xs font-bold text-gray-500 md:text-sm"},[h("div",null," Note: AI-generated response may not be fully accurate; check with experts for critical information. ")],-1)),RK=Re({__name:"NewMDMQuestionSimulation",setup(t){const e=ze(),i=ct(),n=f("");e.question="";const o=f(null),s=f(!1),A=f(ei),r=f(!1);n.value=e.recognizedText,kt(()=>{o.value.focus()});const a=u=>{const l=u.length;A.value=ei-l,s.value=l>=ei},c=async()=>{var u,l,g;console.log("options fdsfdscdzxfsdv",e.recognizedText);try{if(console.log("options fdsfdscdzxfsdv",e.recognizedText),e.question.trim().length<1){console.log("Please enter answer!");return}r.value=!0,e.dotLoader=!0;const E={question:e.question||e.recognizedText};console.log("ques",E),e.conversations.push(E);const C=f("");C.value=e.question||e.recognizedText,e.question="";const p={assessmentId:e.simulationSkill,question:C.value,past_messages:e.past_messages,prompt:e.generatedPrompt,assessmentType:e.assessmentType,userFunction:"HR",empSeniority:e.empSeniority,functionRole:e.functionRole,userBand:e.band_code,storeFinalFeedback:e.storeFinalFeedback,storeFinalScore:e.storeFinalScore};console.log("Payload for MDM1==> ",p);let S;$t==="prod"?S="/ManualExportActivity":S="/fetchCompletionDemo";const I=await ot(S,p);e.addConversation((u=I.data)==null?void 0:u.body,"new"),r.value=!1,e.dotLoader=!1,e.recognizedText=""}catch(E){if(console.error(E),me.isAxiosError(E)){const C=E;console.log("Error found!"),console.error((l=C.response)==null?void 0:l.data),i.setError(((g=C.response)==null?void 0:g.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(u,l)=>(m(),R("div",EK,[h("div",hK,[h("div",CK,[h("div",IK,[h("div",pK,[h("div",dK,[r.value?(m(),R("div",vK,fK)):(m(),R("div",SK,[(m(),R("svg",{disabled:y(e).beginFlag===!0,class:ge([y(e).beginFlag===!0?"cursor-not-allowed text-gray-600":"cursor-pointer","bi bi-send ml-2 h-7 w-7 rotate-45 rounded"]),onClick:l[0]||(l[0]=g=>y(e).searchBoxdisable===!1||y(e).beginFlag===!0?"":c()),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"},BK,10,MK))]))]),h("div",wK,[Ye(h("input",{onKeyup:[l[1]||(l[1]=Fu(g=>r.value?"":c(),["enter"])),l[3]||(l[3]=g=>a(y(e).question))],disabled:y(e).beginFlag===!0||y(e).searchBoxdisable===!1,class:ge([y(e).beginFlag===!0||y(e).searchBoxdisable===!1?"cursor-not-allowed bg-[#e5e7eb]":"bg-white","fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] pl-[30px] pr-[70px]"]),"onUpdate:modelValue":l[2]||(l[2]=g=>y(e).question=g),placeholder:"Write your answer here...",type:"text",ref_key:"AiSearch",ref:o},null,42,mK),[[Ze,y(e).question]])])]),QK])])])]))}}),Wk="",DK=Pe(RK,[["__scopeId","data-v-bbd70acc"]]),yK={},TK={class:"flex min-h-screen justify-center -mt-16"},LK=[h("div",{class:"flex items-center justify-center"},[h("img",{class:"loadercss",src:Li,alt:"Loader Gif"})],-1)];function OK(t,e){return m(),R("div",TK,LK)}const bS=Pe(yK,[["render",OK]]),vA=t=>(st("data-v-ecbbcb08"),t=t(),At(),t),UK={class:"max-h-screen overflow-auto md:p-6 p-3 text-[#161916]"},NK={key:0,class:"flex flex-col items-center justify-center gap-4"},KK=[vA(()=>h("div",{class:"text-2xl font-[700]"},"Assessment Access Required",-1)),vA(()=>h("h3",{className:"text-lg font-medium my-6 text-center text-gray-500"}," You don't have access to this assessment. Please contact to administrator ",-1))],FK={key:1,class:"flex flex-col items-center justify-center gap-4"},GK=[vA(()=>h("div",{class:"text-2xl font-[700]"},"Invalid URL",-1)),vA(()=>h("h3",{className:"text-lg font-medium my-6 text-center text-gray-500"}," Invalid URL or assessment not found. Please check the URL or contact support. ",-1))],xK={key:1,className:"h-screen flex flex-col items-stretch"},jK={class:"z-20"},kK=vA(()=>h("div",{class:"mt-6"},null,-1)),YK={class:"flex h-full items-stretch overflow-hidden"},zK={class:"mx-auto w-11/12 bg-white"},PK={class:"relative flex h-full w-full flex-col items-stretch overflow-hidden"},bK={key:0,class:"relative"},JK={key:1,class:"relative"},HK=Re({__name:"AssessmentSimulation",setup(t){const e=f(!0),i=f(!1),n=f(!1);f(!1),f(!1);const o=ze(),s=ct(),A=f(""),r=f(""),a=f(""),c=f(""),u=localStorage.getItem("accessToken");let l="",g="",E="";const C=f(!1),p=new URL(window.location.href),S=p.searchParams.get("skillId")||p.searchParams.get("assessmentId");r.value=p.searchParams.get("mode")??"",o.simulationSkill=S??"";const I=["703331197","703380812","703331909","703363051","703319578"];kt(async()=>{console.log("uuid. value",S),e.value=!0,await d(),await B(),o.assessmentQuestion||(console.log("getAssessmentDetails========================>"),await M()),e.value=!1});const d=async()=>{var D,L,U,Q,j,z,K;try{if(S===null)throw{response:{status:424,data:{message:"Invalid URL"}}};e.value=!0;const N=new URLSearchParams(window.location.search);o.simulationSkill=N.get("skillId")||o.simulationSkill,console.log("before calling get learner");const X=await zt(`/getLearnerData?forSimulation=true&skillForSimulation=${o.simulationSkill}`);o.initialize(X.data),o.simulationSkill==="937e84ef-e95d-4327-9afe-e7be2bf420eb"?o.skillNameForSimulation="GenpactNext":o.simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ea"||o.simulationSkill==="32b7d6d8-f7a8-40a0-ab84-8784f25897ef"?o.skillNameForSimulation="Agentic AI":o.simulationSkill==="7bd03cb6-79ad-4e2a-8a8b-88dc16147369"&&(o.skillNameForSimulation="Data")}catch(N){if(console.error(N),e.value=!1,me.isAxiosError(N)&&((D=N.response)!=null&&D.status)||N&&typeof N=="object"&&"response"in N&&N.response&&typeof N.response=="object"&&"status"in N.response&&N.response.status){const X=N;if(console.log("Error found!"),console.error((L=X.response)==null?void 0:L.data),((U=X.response)==null?void 0:U.status)===424||((Q=X.response)==null?void 0:Q.status)===425||((j=X.response)==null?void 0:j.status)===400){c.value=(z=X.response)==null?void 0:z.status,console.log("errorCode value",c.value),n.value=!0;return}s.setError(((K=X.response)==null?void 0:K.data).message)}else s.setError("There was an issue, please contact helpmate")}},M=async()=>{var D,L,U,Q,j,z,K,N,X,H,b,G,W,P,se,ce,Me,Ce,Te,Ke,Je,Fe,x,ee,V,te,Ie,v,w,T,F,k,O,$,Z,_,J,Ae,re,ue,he,fe,je,Ue,qe,It,xt,$e;console.log("Start getAssessmentDetails");try{$t==="prod"?l=`https://api-v2.genpact.com/api/my-profile/assessment-master/getAssessmentDetailsById?id=${o.simulationSkill}`:l=`https://api-v2-dev.genpact.com/api/my-profile/assessment-master/getAssessmentDetailsById?id=${o.simulationSkill}`;const ae=await zt(l);A.value=(L=(D=ae==null?void 0:ae.data)==null?void 0:D.data)==null?void 0:L.name,o.skillNameForSimulation=A.value,o.generatedPrompt=(Q=(U=ae==null?void 0:ae.data)==null?void 0:U.data)==null?void 0:Q.generatedPrompt,o.assessmentType=(z=(j=ae==null?void 0:ae.data)==null?void 0:j.data)==null?void 0:z.assessmentType,a.value=(N=(K=ae==null?void 0:ae.data)==null?void 0:K.data)==null?void 0:N.status,C.value=(H=(X=ae==null?void 0:ae.data)==null?void 0:X.data)==null?void 0:H.editMode,o.empSeniority=(G=(b=ae==null?void 0:ae.data)==null?void 0:b.data)==null?void 0:G.empSeniority,o.functionRole=(P=(W=ae==null?void 0:ae.data)==null?void 0:W.data)==null?void 0:P.functionRole,g=(ce=(se=ae==null?void 0:ae.data)==null?void 0:se.data)==null?void 0:ce.accessBand,E=(Ce=(Me=ae==null?void 0:ae.data)==null?void 0:Me.data)==null?void 0:Ce.accessOhrList;const qt=(Ke=(Te=ae==null?void 0:ae.data)==null?void 0:Te.data)==null?void 0:Ke.createdBy;if(o.mcqType=(Fe=(Je=ae==null?void 0:ae.data)==null?void 0:Je.data)==null?void 0:Fe.mcqTypes,o.storeFinalFeedback=(ee=(x=ae==null?void 0:ae.data)==null?void 0:x.data)==null?void 0:ee.storeFinalFeedback,o.storeFinalScore=(te=(V=ae==null?void 0:ae.data)==null?void 0:V.data)==null?void 0:te.storeFinalScore,a.value==="inactive")i.value=!0;else if(a.value==="draft")r.value!==cl.DRAFT&&(i.value=!0);else if(a.value==="active"&&C.value&&r.value===cl.DRAFT){console.log("fetching values from draft table.....",C.value),$t==="prod"?l=`https://api-v2.genpact.com/api/my-profile/assessment-master/getDraftAssessmentDetailsById?assessmentId=${o.simulationSkill}`:l=`https://api-v2-dev.genpact.com/api/my-profile/assessment-master/getDraftAssessmentDetailsById?assessmentId=${o.simulationSkill}`;const ke=await zt(l);o.generatedPrompt=(v=(Ie=ke==null?void 0:ke.data)==null?void 0:Ie.data)==null?void 0:v.generatedPrompt,o.assessmentType=(T=(w=ke==null?void 0:ke.data)==null?void 0:w.data)==null?void 0:T.assessmentType,o.empSeniority=(k=(F=ke==null?void 0:ke.data)==null?void 0:F.data)==null?void 0:k.empSeniority,o.functionRole=($=(O=ke==null?void 0:ke.data)==null?void 0:O.data)==null?void 0:$.functionRole,o.storeFinalFeedback=(_=(Z=ke==null?void 0:ke.data)==null?void 0:Z.data)==null?void 0:_.storeFinalFeedback,o.storeFinalScore=(Ae=(J=ke==null?void 0:ke.data)==null?void 0:J.data)==null?void 0:Ae.storeFinalScore,g=(ue=(re=ke==null?void 0:ke.data)==null?void 0:re.data)==null?void 0:ue.accessBand,E=(fe=(he=ke==null?void 0:ke.data)==null?void 0:he.data)==null?void 0:fe.accessOhrList}console.log("store mcqType====>",o.mcqType);const ut=o==null?void 0:o.band_code;console.log("accessBand , accessOhrList====>",g,E);const pt=(je=g==null?void 0:g.split(","))==null?void 0:je.map(ke=>ke.trim());if(console.log("bands ,====>",pt),qt===(o==null?void 0:o.ohr)||I.includes(o==null?void 0:o.ohr))console.log("User has access to this assessment.");else{if(pt.length===0&&E.length===0)throw console.log("Both bands and exceptionOHR are empty. Access denied."),{response:{status:424,data:{message:"You don't have access to this assessment. Please contact to administrator"}}};if(pt.includes(ut)||E.includes(o==null?void 0:o.ohr))console.log("User has access to this assessment.");else throw console.log("User does not have access to this assessment."),{response:{status:424,data:{message:"You don't have access to this assessment. Please contact to administrator"}}}}console.log("end getAssessmentDetails")}catch(ae){if(console.error(ae),e.value=!1,me.isAxiosError(ae)&&((Ue=ae.response)!=null&&Ue.status)||ae&&typeof ae=="object"&&"response"in ae&&ae.response&&typeof ae.response=="object"&&"status"in ae.response&&ae.response.status){const qt=ae;if(console.log("Error found!"),console.error((qe=qt.response)==null?void 0:qe.data),((It=qt.response)==null?void 0:It.status)===424||((xt=qt.response)==null?void 0:xt.status)===425){n.value=!0;return}s.setError((($e=qt.response)==null?void 0:$e.data).message)}else s.setError("There was an issue, please contact helpmate")}},B=async()=>{var D,L,U,Q,j,z,K,N;try{const X=await me({url:"https://api-v2-dev.genpact.com/api/delphi/v2/myprofile",headers:{authorization:`Bearer ${u}`,"content-type":"application/json"},method:"get"});o.genomeFunctionValue=(U=(L=(D=X==null?void 0:X.data)==null?void 0:D.role_function)==null?void 0:L.function)==null?void 0:U.name,o.genomeRoleValue=(z=(j=(Q=X==null?void 0:X.data)==null?void 0:Q.role_function)==null?void 0:j.role)==null?void 0:z.name,console.log("profile data",o.genomeFunctionValue,o.genomeRoleValue)}catch(X){if(console.error(X),e.value=!1,me.isAxiosError(X)){const H=X;console.log("Error found!"),console.error((K=H.response)==null?void 0:K.data),s.setError(((N=H.response)==null?void 0:N.data).message)}else s.setError("There was an issue, please contact helpmate")}};return(D,L)=>(m(),R("section",null,[ne(fr,{"is-visible":n.value},{default:hi(()=>[h("div",UK,[c.value===424||c.value==="425"?(m(),R("div",NK,KK)):Be("",!0),c.value===400?(m(),R("div",FK,GK)):Be("",!0)])]),_:1},8,["is-visible"]),h("div",null,[e.value?(m(),Di(bS,{key:0})):(m(),R("main",xK,[h("div",jK,[ne(Vy)]),kK,h("div",YK,[h("div",zK,[h("div",PK,[ne(TN),h("div",{class:ge(y(o).showVoiceComponent===!0?"mt-[160px]":"mt-[120px]")},null,2)]),y(o).assessmentQuestion?(m(),R("div",bK,[ne(gK)])):(m(),R("div",JK,[ne(DK)]))])])]))])]))}}),t1="",qK=Object.freeze(Object.defineProperty({__proto__:null,default:Pe(HK,[["__scopeId","data-v-ecbbcb08"]])},Symbol.toStringTag,{value:"Module"})),VK={class:"flex h-14 w-full flex-1 items-center justify-between bg-[#021c42] md:pr-6 lg:pr-6"},WK=["href"],ZK=[h("img",{class:"h-11 w-auto cursor-pointer",src:PC,alt:"Genome Logo"},null,-1)],XK=["href"],_K=[h("img",{class:"h-9 w-28 cursor-pointer md:w-36",src:ul,alt:"Aiguru Logo"},null,-1)],$K=Re({__name:"headerAMA",setup(t){const e=f(""),i=f("");return $t==="prod"?e.value="https://genome.genpact.com":e.value="https://genome-dev.genpact.com",$t==="prod"?i.value="https://genome.genpact.com/#aiguru":i.value="https://genome-dev.genpact.com/#aiguru",(n,o)=>(m(),R("nav",VK,[h("a",{class:"px-2 md:px-0 lg:px-0",href:e.value,target:"_blank"},ZK,8,WK),h("a",{class:"px-2 md:px-0 lg:px-0",href:i.value,target:"_blank"},_K,8,XK)]))}}),eF={class:"flex items-end justify-start"},tF={class:"fontFormattingAMA w-full bg-gray-100 rounded-lg"},iF={class:"w-full rounded-md px-3 py-2 text-lg font-bold text-black text-[18px] md:text-[22px]"},nF={class:"w-full px-3 py-2 text-base text-black text-[12px] md:text-[16px] font-[550]"},rF=h("br",null,null,-1),oF=Re({__name:"greetingsAMA",setup(t){const e=ze(),i=` Hi ${e.learnerName||"Expert"}, and welcome!`,n=tt(()=>i),o=tt(()=>e.welcomeMessage);return(s,A)=>(m(),R("section",null,[h("div",eF,[h("div",tF,[h("div",iF,de(n.value),1),h("div",nF,de(o.value),1)])]),rF]))}}),sF={class:"fontFormattingAMA flex items-end justify-start py-2"},AF={class:"line-break w-full bg-gray-100 p-3 text-sm text-black md:text-[15px] rounded-lg"},aF=["innerHTML"],cF=Re({__name:"responseAMA",props:{answer:{type:String,required:!0}},setup(t){const e=t,i=tt(()=>{const n=e.answer.replace(/[*#]/g,"").replace(/Assessment Rating & Feedback/g,'<div style="font-size: 26px; font-weight: bold; text-decoration: underline;">Rating & Feedback</div>'),o=/\[([^\]]+)\]\((https?:\/\/[^\s]+)\)/g;if(n.includes("AI Guru")){if(n.includes("AI Guru"))return console.log("aig found"),n.replace(o,(s,A,r)=>`<a href="https://genome.genpact.com/#aiguru" target="_blank" style="color: blue; text-decoration: underline; cursor:pointer;">${A}</a>`)}else return n.replace(o,(s,A,r)=>`<a href="${r}" target="_blank" rel="noopener noreferrer" style="color: blue; text-decoration: underline;">${A}</a>`)});return(n,o)=>(m(),R("div",sF,[h("div",AF,[h("span",{class:"fontFormattingAMA",innerHTML:i.value},null,8,aF)])]))}}),o1="",uF=Pe(cF,[["__scopeId","data-v-fa0c60bd"]]),lF={class:"flex justify-end items-end py-3"},gF={class:"max-w-[80%]"},EF={class:"w-fit md:text-[15px] fontFormattingAMA text-sm text-white bg-genpact-blue-box leading-6 p-3 rounded-lg"},hF=Re({__name:"learnerAMA",props:{question:{type:String,required:!0}},setup(t){return(e,i)=>(m(),R("div",lF,[h("div",gF,[h("div",EF,de(t.question),1)])]))}}),CF=t=>(st("data-v-12a02acf"),t=t(),At(),t),IF={class:"flex w-full flex-col items-start justify-start bg-white"},pF={class:"bot-typing-animation gap-1"},dF={class:"block w-full text-lg italic text-gray-800"},SF=CF(()=>h("span",{class:"dot-animation"},[h("span",null,"."),h("span",null,"."),h("span",null,".")],-1)),MF=cr('<div class="block w-full max-w-full items-stretch" data-v-12a02acf><div class="flex animate-pulse items-start justify-start space-x-4" data-v-12a02acf><div class="flex-1 space-y-6 py-1" data-v-12a02acf><div class="h-2 w-full rounded bg-gray-300" data-v-12a02acf></div><div class="space-y-3" data-v-12a02acf><div class="grid grid-cols-3 gap-4" data-v-12a02acf><div class="col-span-2 h-2 rounded bg-gray-300" data-v-12a02acf></div><div class="col-span-1 h-2 rounded bg-gray-300" data-v-12a02acf></div></div><div class="h-2 rounded bg-gray-300" data-v-12a02acf></div></div></div></div></div>',1),BF=Re({__name:"LoadingResponseAMA",setup(t){const e=f("Generating response"),i=f(["This may take a few seconds","Fetching the best response for you","Thinking... give me a moment","One moment while I gather the information","Hang in tight, we are almost there","Almost there... just a bit longer","Compiling a response for you"]);return setTimeout(()=>{const n=Math.floor(Math.random()*i.value.length);e.value=i.value[n]},15e3),(n,o)=>(m(),R("div",IF,[h("div",pF,[h("div",dF,de(e.value),1),SF]),MF]))}}),s1="",vF=Pe(BF,[["__scopeId","data-v-12a02acf"]]),fF={key:0},wF={key:1},mF={key:0,class:"flex"},QF=Re({__name:"conversationAMA",setup(t){let e=f(""),i=f("");e.value='<a style="color:#00AECF;"',i.value='<ul style="list-style: disc !important; margin-left: 3.5rem !important; padding: 0;"';const n=ze(),o=f(),s=()=>{o.value.scrollTo(0,o.value.scrollHeight)};return kt(()=>{var a;const A=document.getElementsByName("askQuestion"),r=Array.from(A);console.log("New array===>",r),A.length&&((a=r==null?void 0:r.pop())==null||a.scrollIntoView({behavior:"smooth",block:"center"})),window.addEventListener("custom-event",s)}),VA(()=>{var a;const A=document.getElementsByName("askQuestion"),r=Array.from(A);console.log("New array===>",r),A.length&&((a=r==null?void 0:r.pop())==null||a.scrollIntoView({behavior:"smooth",block:"center"}))}),ar(()=>{window.removeEventListener("custom-event",s)}),(A,r)=>(m(),R("div",{ref_key:"nestedElement",ref:o,class:"smooth-scroll overflow-auto md:px-6 px-2"},[ne(oF),(m(!0),R(Le,null,lt(y(n).conversations,(a,c)=>(m(),R("div",{key:c},[a.question?(m(),R("div",fF,[ne(hF,{question:a.question,c2question:a.c2question,"show-feedback":a.showFeedback,id:`qId${c}`,name:"askQuestion","que-id":c},null,8,["question","c2question","show-feedback","id","que-id"])])):Be("",!0),a.answer?(m(),R("div",wF,[ne(uF,{question:a==null?void 0:a.question,c2question:a==null?void 0:a.c2question,"show-sources":a==null?void 0:a.showSources,questionId:a.id,answer:a.answer.replaceAll("<a",y(e)).replaceAll("<ul",y(i)),"show-feedback":a.showFeedback,"related-ques":a.relatedQues,"options-array":a.optionsArray,"ans-id":c,onCharTyped:s},null,8,["question","c2question","show-sources","questionId","answer","show-feedback","related-ques","options-array","ans-id"])])):Be("",!0)]))),128)),y(n).dotLoader?(m(),R("div",mF,[ne(vF)])):Be("",!0)],512))}}),A1="",RF=Pe(QF,[["__scopeId","data-v-f92feaf3"]]),Jc=t=>(st("data-v-3fa4dc8a"),t=t(),At(),t),DF={class:"z-3 absolute bottom-0 mt-4 w-full bg-white px-2 md:px-6"},yF={class:"py-2"},TF={class:"flex"},LF={class:"z-1 relative w-full"},OF={class:"relative w-full"},UF={class:"absolute inset-y-0 right-0 flex items-center md:pr-8 pr-3"},NF={key:0},KF=[Jc(()=>h("path",{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576 6.636 10.07Zm6.787-8.201L1.591 6.602l4.339 2.76 7.494-7.493Z"},null,-1))],FF={key:1,class:"tooltip"},GF=[Jc(()=>h("span",{class:"tooltiptext fontFormattingAMA"},"Waiting for response",-1)),Jc(()=>h("img",{class:"w-7 h-7",src:Cg,alt:"watingIcon"},null,-1))],xF={class:"flex justify-start gap-2 md:gap-1"},jF=Jc(()=>h("div",{class:"pt-1 text-start font-sans"},[h("div",{class:"flex justify-start items-start text-[#161916] italic"},"10 questions remaining for the day"),h("div",{class:"text-xs font-bold text-gray-500 md:text-sm"}," Note: AI-generated response may not be fully accurate; check with experts for critical information. ")],-1)),kF=Re({__name:"NewQuestionAMA",setup(t){const e=ze(),i=ct(),n=f(""),o=f("");e.question="";const s=f(null),A=f(!1),r=f(ei),a=f(!1);o.value=e.recognizedText,kt(()=>{s.value.focus()});const c=l=>{const g=l.length;r.value=ei-g,A.value=g>=ei},u=async()=>{var l,g,E,C,p,S,I,d;console.log("options fdsfdscdzxfsdv",e.recognizedText);try{if(console.log("options fdsfdscdzxfsdv",e.recognizedText),e.question.trim().length<1){console.log("Please enter answer!");return}a.value=!0,e.dotLoader=!0;const M={question:e.question||e.recognizedText};console.log("ques",M),e.conversations.push(M);const B=f("");B.value=e.question||e.recognizedText,e.question="";const D={ohr_id:n.value,past_messages:e.past_messages,question:B.value||e.recognizedText,bandCode:e.band_code,userGenomeFunction:e.genomeFunctionValue,userGenomeRole:e.genomeRoleValue,skillId:e.simulationSkill||"937e84ef-e95d-4327-9afe-e7be2bf420eb"},L=await ot("/sqlTest",D);if(n.value=(g=(l=L.data)==null?void 0:l.body)==null?void 0:g.ohr,((C=(E=L==null?void 0:L.data)==null?void 0:E.body)==null?void 0:C.answer)===""){console.log("in the if case calling api again");const Q=await ot("/sqlTest",D);e.addConversation((p=Q.data)==null?void 0:p.body,"new")}else console.log("in the else case"),e.addConversation((S=L.data)==null?void 0:S.body,"new");console.log("ohr id asdf",n.value),a.value=!1,e.dotLoader=!1,e.recognizedText=""}catch(M){if(console.error(M),e.dotLoader=!1,me.isAxiosError(M)){const B=M;console.log("Error found!"),console.error((I=B.response)==null?void 0:I.data),i.setError(((d=B.response)==null?void 0:d.data).message)}else i.setError("There was an issue, please contact helpmate")}};return(l,g)=>(m(),R("div",DF,[h("div",yF,[h("div",TF,[h("div",LF,[h("div",OF,[h("div",UF,[a.value?(m(),R("div",FF,GF)):(m(),R("div",NF,[(m(),R("svg",{onClick:g[0]||(g[0]=E=>u()),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"bi bi-send ml-2 h-7 w-7 rotate-45 rounded",viewBox:"0 0 16 16"},KF))]))]),h("div",xF,[Ye(h("input",{onKeyup:[g[1]||(g[1]=Fu(E=>a.value?"":u(),["enter"])),g[3]||(g[3]=E=>c(y(e).question))],"onUpdate:modelValue":g[2]||(g[2]=E=>y(e).question=E),class:"fontFormattingAMA rounded-lg flex w-full border border-genpact-darkest-teal py-[18px] pl-[30px] pr-[70px]",placeholder:"Write your answer here...",type:"text",ref_key:"AiSearch",ref:s},null,544),[[Ze,y(e).question]])])]),jF])])])]))}}),l1="",YF=Pe(kF,[["__scopeId","data-v-3fa4dc8a"]]),Ig=t=>(st("data-v-004a4a93"),t=t(),At(),t),zF=Ig(()=>h("div",{class:"max-h-screen overflow-auto md:p-6 p-3 flex flex-col items-center justify-center gap-4 text-[#161916]"},[h("div",{class:"text-2xl font-[700]"},"Assessment Access Required"),h("h3",{className:"text-lg font-medium my-6 text-center text-gray-500"}," You don't have access to this assessment. Please contact to administrator ")],-1)),PF={key:1,className:"h-screen flex flex-col items-stretch"},bF={class:"z-20"},JF=Ig(()=>h("div",{class:"mt-6"},null,-1)),HF={class:"flex h-full items-stretch overflow-hidden"},qF={class:"mx-auto w-11/12 bg-white"},VF={class:"relative flex h-full w-full flex-col items-stretch overflow-hidden"},WF=Ig(()=>h("div",{class:"mt-[160px]"},null,-1)),ZF={class:"relative"},XF=Re({__name:"AssessmentAMA",setup(t){const e=f(!0),i=f(!1),n=ze(),o=ct(),s=f(""),A=f(""),r=localStorage.getItem("accessToken");let a="",c="",u="";const l=f(!1),E=new URL(window.location.href).searchParams.get("amaId");n.amaSkillId=E??"";const C=["703331197","703380812","703331909","703363051","703319578"];kt(async()=>{console.log("uuid value",E),console.log("store amaSkillId value",n.amaSkillId),e.value=!0,await p(),await d(),e.value=!1});const p=async()=>{var M,B,D,L,U;try{if(E===null)throw{response:{status:424,data:{message:"Invalid URL"}}};console.log("before calling get learner");const Q=await zt(`/getLearnerData?forSimulation=true&skillForSimulation=${n.amaSkillId}`);n.initialize(Q.data),await S()}catch(Q){if(console.error(Q),e.value=!1,me.isAxiosError(Q)&&((M=Q.response)!=null&&M.status)||Q&&typeof Q=="object"&&"response"in Q&&Q.response&&typeof Q.response=="object"&&"status"in Q.response&&Q.response.status){const j=Q;if(console.log("Error found!"),console.error((B=j.response)==null?void 0:B.data),((D=j.response)==null?void 0:D.status)===424||((L=j.response)==null?void 0:L.status)===425){i.value=!0;return}o.setError(((U=j.response)==null?void 0:U.data).message)}else o.setError("There was an issue, please contact helpmate")}},S=async()=>{var M,B,D,L,U,Q,j,z,K,N,X,H,b,G,W,P,se,ce,Me,Ce,Te,Ke,Je,Fe,x,ee,V,te,Ie,v,w,T,F,k;console.log("Start getAssessmentDetails");try{$t==="prod"?a=`https://api-v2-dev.genpact.com/api/my-profile/ama-master/getAMADetailsById?id=${n.amaSkillId}`:a=`https://api-v2-dev.genpact.com/api/my-profile/ama-master/getAMADetailsById?id=${n.amaSkillId}`;const O=await zt(a);console.log("response from GetAMA",O),s.value=(B=(M=O==null?void 0:O.data)==null?void 0:M.data)==null?void 0:B.name,n.welcomeMessage=(L=(D=O==null?void 0:O.data)==null?void 0:D.data)==null?void 0:L.displayMsg,console.log("response from GetAMA skill Name",s.value),n.skillNameForSimulation=s.value,n.generatedPrompt=(Q=(U=O==null?void 0:O.data)==null?void 0:U.data)==null?void 0:Q.generatedPrompt,n.assessmentType=(z=(j=O==null?void 0:O.data)==null?void 0:j.data)==null?void 0:z.assessmentType,A.value=(N=(K=O==null?void 0:O.data)==null?void 0:K.data)==null?void 0:N.status,l.value=(H=(X=O==null?void 0:O.data)==null?void 0:X.data)==null?void 0:H.editMode,n.empSeniority=(G=(b=O==null?void 0:O.data)==null?void 0:b.data)==null?void 0:G.empSeniority,n.functionRole=(P=(W=O==null?void 0:O.data)==null?void 0:W.data)==null?void 0:P.functionRole,c=(ce=(se=O==null?void 0:O.data)==null?void 0:se.data)==null?void 0:ce.accessBand,u=(Ce=(Me=O==null?void 0:O.data)==null?void 0:Me.data)==null?void 0:Ce.accessOhrList;const $=(Ke=(Te=O==null?void 0:O.data)==null?void 0:Te.data)==null?void 0:Ke.createdBy;n.mcqType=(Fe=(Je=O==null?void 0:O.data)==null?void 0:Je.data)==null?void 0:Fe.mcqTypes,n.storeFinalFeedback=(ee=(x=O==null?void 0:O.data)==null?void 0:x.data)==null?void 0:ee.storeFinalFeedback,n.storeFinalScore=(te=(V=O==null?void 0:O.data)==null?void 0:V.data)==null?void 0:te.storeFinalScore,console.log("store mcqType====>",n.mcqType);const Z=n==null?void 0:n.band_code;console.log("accessBand , accessOhrList====>",c,u);const _=(Ie=c==null?void 0:c.split(","))==null?void 0:Ie.map(J=>J.trim());if(console.log("bands ,====>",_),$===(n==null?void 0:n.ohr)||C.includes(n==null?void 0:n.ohr))console.log("User has access to this assessment.");else{if(_.length===0&&u.length===0)throw console.log("Both bands and exceptionOHR are empty. Access denied."),{response:{status:424,data:{message:"You don't have access to this assessment. Please contact to administrator"}}};if(_.includes(Z)||u.includes(n==null?void 0:n.ohr))console.log("User has access to this assessment.");else throw console.log("User does not have access to this assessment."),{response:{status:424,data:{message:"You don't have access to this assessment. Please contact to administrator"}}}}await I(),console.log("end getAssessmentDetails")}catch(O){if(console.error(O),e.value=!1,me.isAxiosError(O)&&((v=O.response)!=null&&v.status)||O&&typeof O=="object"&&"response"in O&&O.response&&typeof O.response=="object"&&"status"in O.response&&O.response.status){const $=O;if(console.log("Error found!"),console.error((w=$.response)==null?void 0:w.data),((T=$.response)==null?void 0:T.status)===424||((F=$.response)==null?void 0:F.status)===425){i.value=!0;return}o.setError(((k=$.response)==null?void 0:k.data).message)}else o.setError("There was an issue, please contact helpmate")}},I=async()=>{var M,B;console.log("Start getAssessmentDetails");try{$t==="prod"?a=`https://api-v2-dev.genpact.com/api/my-profile/ama-master/getAMACorpusDetailsById?id=${n.amaCorpusId}`:a=`https://api-v2-dev.genpact.com/api/my-profile/ama-master/getAMACorpusDetailsById?id=${n.amaCorpusId}`;const D=await zt(a);console.log("response from GetAMA",D)}catch(D){if(console.error(D),e.value=!1,me.isAxiosError(D)){const L=D;console.log("Error found!"),console.error((M=L.response)==null?void 0:M.data),o.setError(((B=L.response)==null?void 0:B.data).message)}else o.setError("There was an issue, please contact helpmate")}},d=async()=>{var M,B,D,L,U,Q,j,z;try{const K=await me({url:"https://api-v2-dev.genpact.com/api/delphi/v2/myprofile",headers:{authorization:`Bearer ${r}`,"content-type":"application/json"},method:"get"});n.genomeFunctionValue=(D=(B=(M=K==null?void 0:K.data)==null?void 0:M.role_function)==null?void 0:B.function)==null?void 0:D.name,n.genomeRoleValue=(Q=(U=(L=K==null?void 0:K.data)==null?void 0:L.role_function)==null?void 0:U.role)==null?void 0:Q.name,console.log("profile data",n.genomeFunctionValue,n.genomeRoleValue)}catch(K){if(console.error(K),e.value=!1,me.isAxiosError(K)){const N=K;console.log("Error found!"),console.error((j=N.response)==null?void 0:j.data),o.setError(((z=N.response)==null?void 0:z.data).message)}else o.setError("There was an issue, please contact helpmate")}};return(M,B)=>(m(),R("section",null,[ne(fr,{"is-visible":i.value},{default:hi(()=>[zF]),_:1},8,["is-visible"]),h("div",null,[e.value?(m(),Di(bS,{key:0})):(m(),R("main",PF,[h("div",bF,[ne($K)]),JF,h("div",HF,[h("div",qF,[h("div",VF,[ne(RF),WF]),h("div",ZF,[ne(YF)])])])]))])]))}}),g1="",_F=Object.freeze(Object.defineProperty({__proto__:null,default:Pe(XF,[["__scopeId","data-v-004a4a93"]])},Symbol.toStringTag,{value:"Module"})),$F={},eG={className:"flex justify-between items-center gap-4 h-14"},tG=[h("div",{class:"text-white font-bold md:text-xl text-base"}," AI Guru Skill Data ",-1),h("img",{class:"md:w-36 w-20",src:So},null,-1)];function iG(t,e){return m(),R("div",eG,tG)}const nG=Pe($F,[["render",iG]]),rG={class:"bg-genpact-blue-box w-full px-5 mb-4"},oG={key:0},sG={class:"flex justify-between items-start text-lg px-6"},AG=h("div",null,null,-1),aG={class:"flex justify-start items-center text-white bg-genpact-darkest-blue rounded-lg py-2 px-4 cursor-pointer"},cG={class:"flex justify-start items-start w-full px-6 py-3"},uG=h("div",{class:"md:w-1/2"},null,-1),lG={class:"relative flex justify-start items-end border border-gray-300 md:rounded-full rounded-lg md:w-1/2 w-full"},gG={class:"absolute inset-y-0 left-5 flex items-center"},EG={class:"flex justify-between flex-col md:flex-row items-center w-full border-none py-1 px-1 md:px-2 md:py-2 text-sm md:border md:border-gray-300 rounded-full"},hG={class:"flex justify-start flex-wrap md:gap-2 items-start ml-10 space-y-2 md:space-y-0 md:space-x-1 mx-auto"},CG={class:"flex justify-start items-center"},IG=h("div",{class:"flex items-center"},[h("div",{class:"text-gray-500 font-medium text-sm px-1 py-2 md:px-2 md:py-2 hidden md:flex"}," | ")],-1),pG={class:"flex-grow md:flex-grow-0"},dG={class:"px-6"},SG=h("div",{class:"flex justify-start items-start text-xl font-bold py-1 italic"}," Current Topic List ",-1),MG={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[630px]"},BG={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},vG=h("thead",{class:"text-sm text-center md:text-base text-gray-700 uppercase bg-gray-200 top-0 sticky z-10"},[h("tr",null,[h("th",{scope:"col",class:"px-6 py-3"},"Topic name"),h("th",{scope:"col",class:"px-6 py-3"},"Description"),h("th",{scope:"col",class:"px-6 py-3"},"Knowledge corpus"),h("th",{scope:"col",class:"px-6 py-3"},"Edit")])],-1),fG={class:"px-3 py-4 font-medium text-gray-900"},wG={class:"px-3 py-4"},mG={class:"px-3 py-4 text-center"},QG={class:"px-1.5 py-4 text-center"},RG=["onClick"],DG={key:1,id:"index",class:"flex justify-center items-center bg-genpact-darkest-blue text-white font-bold text-center rounded-lg px-6 py-2 hover:-translate-y-1 hover:scale-100 duration-300"},yG=[h("img",{class:"w-6 h-6 block loadercss",src:Li,alt:"Loader Gif"},null,-1)],JS=Object.freeze(Object.defineProperty({__proto__:null,default:Re({__name:"SkillData",setup(t){const e=f([]),i=f(),n=f(""),o=f(""),s=f(!1),A=f([!0]),r=ze(),a=ct(),c=Aa(),u=f(""),l=()=>{try{u.value==="user"?(sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","user"),c.replace({name:"EditSkillData"})):u.value==="admin"&&(sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","admin"),c.replace({name:"EditSkillAdminData"})),r.isTopicPending=!1,r.topicNameForSkillData="",r.descriptionForSkillData="",r.offeringTypeForSkillData="",r.enableInputbox=!0}catch{a.setError("Invalid Router!!")}},g=async(I,d)=>{var M,B,D;try{console.log("isTopicPending------->",r.isTopicPending),r.topicNameForSkillData=I.Topic,r.descriptionForSkillData=I.Description,r.offeringTypeForSkillData=I.OfferingType,r.enableInputbox=!1,A.value[d]=!1;const L=await zt(`/fetchTempTopic?Topic=${r.topicNameForSkillData}`);r.isTopicPending=!1,console.log("response array length------->",(M=L==null?void 0:L.data)==null?void 0:M.length),((B=L==null?void 0:L.data)==null?void 0:B.length)>0&&(r.isTopicPending=!0),A.value[d]=!0,u.value==="user"?(sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","user"),c.replace({name:"EditSkillData"})):u.value==="admin"&&(sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","admin"),c.replace({name:"EditSkillAdminData"}))}catch(L){if(console.error(L),me.isAxiosError(L)){const U=L;a.setError(((D=U.response)==null?void 0:D.data).message)}else a.setError("There was an issue with route")}},E=async()=>{var I,d,M,B,D,L;try{const U=await zt("/FetchSkillData");console.log("role value ",(I=U==null?void 0:U.data)==null?void 0:I.role),i.value=((d=U==null?void 0:U.data)==null?void 0:d.body)||[],u.value=(M=U==null?void 0:U.data)==null?void 0:M.role,e.value=i.value,console.log("length",(B=U==null?void 0:U.data)==null?void 0:B.body),console.log("data",(D=U==null?void 0:U.data)==null?void 0:D.body)}catch(U){if(console.error(U),me.isAxiosError(U)){const Q=U;a.setError(((L=Q.response)==null?void 0:L.data).message)}else a.setError("There was an issue while fetching data")}},C=I=>{console.log(I.target.value),I.target.value===""&&(e.value=i.value),console.log("Invoked topic name Search"),e.value=i.value.filter(d=>d.Topic.toLowerCase().includes(I.target.value.toLowerCase()))},p=I=>{console.log(I.target.value),I.target.value===""&&(e.value=i.value),console.log("Invoked Knowledge Corpus Search"),e.value=i.value.filter(d=>d.OfferingType.toLowerCase().includes(I.target.value.toLowerCase()))},S=()=>{n.value="",o.value="",e.value=i.value};return kt(async()=>{await E(),s.value=!0,A.value=Array(e.value.length).fill(!0),console.log("array",A.value)}),(I,d)=>(m(),R(Le,null,[h("nav",rG,[ne(nG)]),s.value?(m(),R("div",oG,[h("div",sG,[AG,h("div",aG,[ne(y($m),{class:"w-7 h-7 mr-1"}),h("button",{onClick:l,class:"font-bold"},"Add New Topic")])]),h("div",cG,[uG,h("div",lG,[h("div",gG,[ne(y(Xm),{class:"w-5 h-5 mr-5 hidden md:flex"})]),h("div",EG,[h("div",hG,[h("div",CG,[Ye(h("input",{id:"topic-search",type:"search",onInput:C,"onUpdate:modelValue":d[0]||(d[0]=M=>n.value=M),class:"text-gray-500 font-medium text-sm px-2 py-2 w-full md:w-52 rounded-lg shadow-sm border-none border-gray-500 focus:outline-none focus:border focus:border-genpact-blue-box md:ml-2",placeholder:"enter topic name "},null,544),[[Ze,n.value]])]),IG,h("div",pG,[Ye(h("input",{id:"offering-search",type:"search",onInput:p,"onUpdate:modelValue":d[1]||(d[1]=M=>o.value=M),class:"text-gray-500 font-medium text-sm px-2 py-2 md:w-52 w-full rounded-lg shadow-sm border-none border-gray-500 focus:outline-none focus:border focus:border-genpact-blue-box",placeholder:"enter knowledge corpus"},null,544),[[Ze,o.value]])])]),h("div",{class:"mt-2 md:mt-0"},[h("button",{onClick:S,type:"reset",class:"text-white bg-genpact-blue-box hover:bg-genpact-darkest-blue font-medium rounded-full text-base px-8 py-1"}," Reset ")])])])]),h("div",dG,[SG,h("div",MG,[h("table",BG,[vG,h("tbody",null,[(m(!0),R(Le,null,lt(e.value,(M,B)=>(m(),R("tr",{key:B,class:"odd:bg-white even:bg-gray-100"},[h("th",fG,de(M.Topic||"title"),1),h("td",wG,de(M.Description||"desc"),1),h("td",mG,de(M.OfferingType||"Knowledge Corpus"),1),h("td",QG,[A.value[B]?(m(),R("button",{key:0,id:"index",onClick:D=>g(M,B),class:"hover:bg-genpact-darkest-blue bg-genpact-blue-box text-white font-bold py-2 px-6 rounded-lg hover:-translate-y-1 hover:scale-100 duration-300"}," edit ",8,RG)):(m(),R("div",DG,yG))])]))),128))])])])])])):(m(),Di(ll,{key:1}))],64))}})},Symbol.toStringTag,{value:"Module"})),TG={className:"flex justify-between items-center gap-4 h-14"},LG=h("div",{class:"font-bold text-base md:text-xl"},"Back",-1),OG=h("div",{class:"text-white font-bold md:text-xl text-base"},"AI Guru Edit Skill Data",-1),UG=h("img",{class:"md:w-36 w-20",src:So},null,-1),NG=Re({__name:"HeaderForEditSkillData",setup(t){const e=Aa(),i=()=>{ar(()=>{sessionStorage.removeItem("dataViewAccess")}),e.push({name:"SkillData"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")};return(n,o)=>(m(),R("div",TG,[h("div",{onClick:i,class:"flex justify-start items-center text-white cursor-pointer"},[ne(y(NC),{class:"md:w-9 w-5 h-5 md:h-9 mr-1"}),LG]),OG,UG]))}}),ji=t=>(st("data-v-18de1cf9"),t=t(),At(),t),KG={class:"bg-genpact-blue-box w-full px-5 mb-6"},FG={class:"grid grid-cols-5 gap-8 p-10 items-stretch"},GG=ji(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"topic",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[Rt("Topic Name "),h("span",{class:"label"},"*")])],-1)),xG={class:"col-span-4"},jG=["disabled"],kG=ji(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"description",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[Rt("Description "),h("span",{class:"label"},"*")])],-1)),YG={class:"col-span-4"},zG=ji(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"Knowledge Corpus",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[Rt("Knowledge Corpus "),h("span",{class:"label"},"*")])],-1)),PG={class:"col-span-4"},bG=ji(()=>h("div",{class:"col-span-1"},null,-1)),JG={class:"col-span-4"},HG={class:"md:flex block justify-between items-center space-y-2"},qG=["disabled"],VG={key:1,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40 px-4 py-2"},WG=[ji(()=>h("img",{class:"w-6 h-6 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],ZG=["disabled"],XG={key:3,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40 px-10 py-2"},_G=[ji(()=>h("img",{class:"w-6 h-6 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],$G=ji(()=>h("div",{class:"col-span-1"},null,-1)),ex={key:0,class:"col-span-4"},tx=[ji(()=>h("div",{class:"p-2 items-center text-lg font-bold bg-gray-200"}," This topic is under review and cannot be submitted again at this moment ",-1))],ix={key:0,class:"pl-16 pr-8 py-2"},nx={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[550px]"},rx={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},ox=ji(()=>h("thead",{class:"text-sm text-center md:text-base text-gray-700 uppercase bg-gray-200 top-0 sticky z-10"},[h("tr",null,[h("th",{scope:"col",class:"px-6 py-3"},"Topic name"),h("th",{scope:"col",class:"px-6 py-3"},"Description"),h("th",{scope:"col",class:"px-6 py-3"},"Knowledge Corpus"),h("th",{scope:"col",class:"px-6 py-3"},"Score")])],-1)),sx={key:0,class:"px-3 py-4 font-medium text-gray-900 text-center"},Ax={key:1,class:"px-3 py-4"},ax={key:2,class:"px-3 py-4 text-center"},cx={key:3,class:"px-3 py-4 text-center"},ux={class:"absolute top-0 md:left-20 md:right-20 left-12 right-12 flex justify-center items-center mx-auto z-[100]"},lx={class:"w-full rounded-md px-3 text-center mt-4 bg-green-500 py-2 text-white"},gx=Re({__name:"EditSkillData",setup(t){const e=ze(),i=ct(),n=f(!0),o=f(!0),s=f(!1),A=f(""),r=f(""),a=f(!1),c=f(!1),u=f(),l=f(),g=f([]),E=async()=>{var S,I,d,M,B,D,L;try{const U={question:e.descriptionForSkillData};console.log("question",r.value),n.value=!1;const Q=await ot("/SearchSkillTags",U);console.log("abc",(S=Q==null?void 0:Q.data)==null?void 0:S.body),l.value=(d=(I=Q==null?void 0:Q.data)==null?void 0:I.body)==null?void 0:d.length,console.log("ARRAY LENGTH",l.value),u.value=((M=Q==null?void 0:Q.data)==null?void 0:M.body)||[],g.value=u.value,console.log("length",(D=(B=Q==null?void 0:Q.data)==null?void 0:B.body)==null?void 0:D.length),console.log("data",Q),n.value=!0,a.value=!0,c.value=!0,console.log("showSubmitButton",c.value)}catch(U){if(console.error(U),n.value=!0,me.isAxiosError(U)){const Q=U;i.setError(((L=Q.response)==null?void 0:L.data).message)}else i.setError("We ran into an issue while fetching duplicate values.")}},C=async()=>{var S;try{const I={Topic:e.topicNameForSkillData,Description:e.descriptionForSkillData,OfferingType:e.offeringTypeForSkillData,DuplicateExists:l.value>0?1:0};o.value=!1,console.log("payload-=====>",I);const d=await ot("/InsertIntoTempSkillFile",I);console.log("data",d),A.value="Data Submitted Successfully!",o.value=!0,p()}catch(I){if(console.error(I),o.value=!0,me.isAxiosError(I)){const d=I;i.setError(((S=d.response)==null?void 0:S.data).message)}else i.setError("There was an issue while inserting data")}},p=()=>{s.value=!0,setTimeout(()=>{s.value=!1,ar(()=>{sessionStorage.removeItem("dataViewAccess")}),Mr.push({name:"SkillData"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")},3e3),c.value=!1};return(S,I)=>(m(),R(Le,null,[h("nav",KG,[ne(NG)]),h("div",FG,[GG,h("div",xG,[Ye(h("input",{disabled:y(e).enableInputbox!==!0,class:ge([y(e).enableInputbox!==!0?"cursor-not-allowed fill-gray-400":"","w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1"]),type:"text","onUpdate:modelValue":I[0]||(I[0]=d=>y(e).topicNameForSkillData=d),id:"topic",placeholder:"Write here...",required:""},null,10,jG),[[Ze,y(e).topicNameForSkillData]])]),kG,h("div",YG,[Ye(h("textarea",{"onUpdate:modelValue":I[1]||(I[1]=d=>y(e).descriptionForSkillData=d),onInput:I[2]||(I[2]=d=>c.value=!1),type:"text",id:"description",rows:"5",class:"w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1",placeholder:"Write here...",required:""},null,544),[[Ze,y(e).descriptionForSkillData]])]),zG,h("div",PG,[Ye(h("input",{"onUpdate:modelValue":I[3]||(I[3]=d=>y(e).offeringTypeForSkillData=d),type:"text",id:"offeringType",class:"w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1",placeholder:"Write here...",required:""},null,512),[[Ze,y(e).offeringTypeForSkillData]])]),bG,h("div",JG,[h("div",HG,[n.value?(m(),R("button",{key:0,disabled:y(e).isTopicPending===!0,class:ge([y(e).isTopicPending===!0?"cursor-not-allowed bg-gray-600":"cursor-pointer bg-genpact-darkest-blue","text-center whitespace-nowrap text-white w-40 px-4 py-2 rounded-md font-bold"]),onClick:E,type:"button"}," Duplicate Check ",10,qG)):(m(),R("div",VG,WG)),o.value?(m(),R("button",{key:2,disabled:c.value!==!0,class:ge([c.value!==!0?"cursor-not-allowed bg-gray-600":"cursor-pointer bg-genpact-darkest-blue","text-center text-white w-40 px-10 py-2 rounded-md font-bold"]),onClick:C,type:"submit"}," Submit ",10,ZG)):(m(),R("div",XG,_G))])]),$G,y(e).isTopicPending?(m(),R("div",ex,tx)):Be("",!0)]),a.value?(m(),R("div",ix,[h("div",nx,[h("table",rx,[ox,h("tbody",null,[(m(!0),R(Le,null,lt(g.value,(d,M)=>(m(),R("tr",{key:M,class:"odd:bg-white even:bg-gray-100"},[d.Topic!==y(e).topicNameForSkillData?(m(),R("th",sx,de(d.Topic||"title"),1)):Be("",!0),d.Topic!==y(e).topicNameForSkillData?(m(),R("td",Ax,de(d.Description||"desc"),1)):Be("",!0),d.Topic!==y(e).topicNameForSkillData?(m(),R("td",ax,de(d.OfferingType||"Knowledge Corpus"),1)):Be("",!0),d.Topic!==y(e).topicNameForSkillData?(m(),R("td",cx,de(d.new_tag),1)):Be("",!0)]))),128))])])])])):Be("",!0),Ye(h("div",ux,[h("div",lx,de(A.value),1)],512),[[Er,s.value]])],64))}}),B1="",Ex=Object.freeze(Object.defineProperty({__proto__:null,default:Pe(gx,[["__scopeId","data-v-18de1cf9"]])},Symbol.toStringTag,{value:"Module"})),hx={},Cx={className:"flex justify-between items-center gap-4 h-14"},Ix=[h("div",{class:"text-white font-bold md:text-xl text-base"}," AI Guru Skill Automation ",-1),h("img",{class:"md:w-36 w-20",src:So},null,-1)];function px(t,e){return m(),R("div",Cx,Ix)}const dx=Pe(hx,[["render",px]]),Sx={class:"bg-genpact-blue-box w-full px-5 mb-4"},Mx={key:0},Bx={class:"w-full px-6 py-1"},vx=h("div",{class:"flex justify-start items-start text-xl font-bold py-1 italic"}," Topic Update Request ",-1),fx={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[630px]"},wx={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},mx=h("thead",{class:"text-sm text-center md:text-base font-bold text-gray-700 uppercase bg-gray-200 top-0 sticky z-10"},[h("tr",null,[h("th",{scope:"col",class:"px-6 py-3"},"Topic name"),h("th",{scope:"col",class:"px-6 py-3"},"Description"),h("th",{scope:"col",class:"px-6 py-3"},"Knowledge Corpus"),h("th",{scope:"col",class:"px-6 py-3"},"Duplicate Exist"),h("th",{scope:"col",class:"px-6 py-3"},"View")])],-1),Qx={class:"px-3 py-4 font-medium text-gray-900 text-center"},Rx={class:"px-3 py-4"},Dx={class:"px-3 py-4 text-center"},yx={class:"px-2 py-4 text-center"},Tx={class:"px-2 py-4 text-gray-500 hover:text-genpact-darkest-blue"},Lx=Object.freeze(Object.defineProperty({__proto__:null,default:Re({__name:"SkillAutomation",setup(t){const e=f([]),i=f(),n=f(!1),o=ze(),s=ct(),A=Aa(),r=c=>{sessionStorage.setItem("dataViewAccess","true"),sessionStorage.setItem("role","skillAutomation"),A.replace({name:"EditSkillAdminData"}),o.topicNameForSkillData=c.Topic,o.descriptionForSkillData=c.Description,o.offeringTypeForSkillData=c.OfferingType,o.enableInputbox=!1},a=async()=>{var c,u;try{const l=await zt("/sqlTest");i.value=((c=l==null?void 0:l.data)==null?void 0:c.body)||[],e.value=i.value,console.log("length",l.data.length),console.log("data",l.data)}catch(l){if(console.error(l),me.isAxiosError(l)){const g=l;s.setError(((u=g.response)==null?void 0:u.data).message)}else s.setError("There was an issue while fetching data")}};return kt(async()=>{await a(),n.value=!0}),(c,u)=>(m(),R(Le,null,[h("nav",Sx,[ne(dx)]),n.value?(m(),R("div",Mx,[h("div",Bx,[vx,h("div",fx,[h("table",wx,[mx,h("tbody",null,[(m(!0),R(Le,null,lt(e.value,(l,g)=>(m(),R("tr",{key:g,class:"odd:bg-white even:bg-gray-100"},[h("th",Qx,de(l.Topic||"title"),1),h("td",Rx,de(l.Description||"desc"),1),h("td",Dx,de(l.OfferingType||"Knowledge Corpus"),1),h("td",yx,de(l.DuplicateExists),1),h("td",Tx,[ne(y(Wm),{onClick:E=>r(l),class:"w-8 h-8 text-center cursor-pointer hover:-translate-y-1 hover:scale-110 duration-300"},null,8,["onClick"])])]))),128))])])])])])):(m(),Di(ll,{key:1}))],64))}})},Symbol.toStringTag,{value:"Module"})),Ox={className:"flex justify-between items-center gap-4 h-14"},Ux=h("div",{class:"font-bold text-base md:text-xl"},"Back",-1),Nx=h("div",{class:"text-white font-bold md:text-xl text-base"},"AI Guru Edit Skill Admin Data",-1),Kx=h("img",{class:"md:w-36 w-20",src:So},null,-1),Fx=Re({__name:"HeaderForEditSKillAdminDatas",setup(t){const e=Aa(),i=()=>{const n=sessionStorage.getItem("role");console.log("role",n),n==="user"?e.push({name:"SkillData"}):n==="admin"?e.push({name:"SkillData"}):e.push({name:"SkillAutomation"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")};return(n,o)=>(m(),R("div",Ox,[h("div",{onClick:i,class:"flex justify-start items-center text-white cursor-pointer"},[ne(y(NC),{class:"md:w-9 w-5 h-5 md:h-9 mr-1"}),Ux]),Nx,Kx]))}}),gi=t=>(st("data-v-ecf2c818"),t=t(),At(),t),Gx={class:"bg-genpact-blue-box w-full px-5 mb-6"},xx={class:"grid grid-cols-5 gap-8 p-10 items-stretch"},jx=gi(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"topic",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[Rt("Topic Name "),h("span",{class:"label"},"*")])],-1)),kx={class:"col-span-4"},Yx=["disabled"],zx=gi(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"description",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[Rt("Description "),h("span",{class:"label"},"*")])],-1)),Px={class:"col-span-4"},bx=gi(()=>h("div",{class:"col-span-1 text-right"},[h("label",{for:"Knowledge Corpus",class:"block text-lg font-bold text-gray-900 mb-1 italic"},[Rt("Knowledge Corpus "),h("span",{class:"label"},"*")])],-1)),Jx={class:"col-span-4"},Hx=gi(()=>h("div",{class:"col-span-1"},null,-1)),qx={class:"col-span-4"},Vx={class:"grid md:grid-cols-5 grid-cols-1 justify-start items-center gap-2"},Wx={class:"col-span-1"},Zx=["disabled"],Xx={key:1,class:"flex justify-center items-center text-center bg-genpact-darkest-blue text-white rounded-md w-40"},_x=[gi(()=>h("img",{class:"w-10 h-10 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],$x=gi(()=>h("div",{class:"col-span-1"},null,-1)),ej=gi(()=>h("div",{class:"col-span-1"},null,-1)),tj={class:"col-span-1 flex md:justify-end justify-start items-end"},ij={key:1,class:"flex justify-center items-center text-center w-52 bg-genpact-darkest-blue text-white rounded-md"},nj=[gi(()=>h("img",{class:"w-10 h-10 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],rj={class:"col-span-1 flex md:justify-end justify-start items-end"},oj=["disabled"],sj={key:1,class:"flex justify-center items-center text-center w-52 bg-genpact-darkest-blue text-white rounded-md"},Aj=[gi(()=>h("img",{class:"w-10 h-10 block loadercss",src:Li,alt:"Loader Gif"},null,-1))],aj={class:"pl-16 pr-8 py-2"},cj={class:"w-full relative overflow-x-auto rounded-lg border border-gray-200 max-h-[550px]"},uj={class:"table-auto w-full text-sm text-left rtl:text-right rounded-lg"},lj=gi(()=>h("thead",{class:"text-sm text-center md:text-base text-gray-700 uppercase bg-gray-200 top-0 sticky z-10"},[h("tr",null,[h("th",{scope:"col",class:"px-6 py-3"},"Topic name"),h("th",{scope:"col",class:"px-6 py-3"},"Description"),h("th",{scope:"col",class:"px-6 py-3"},"Knowledge Corpus"),h("th",{scope:"col",class:"px-6 py-3"},"Score")])],-1)),gj={class:"px-3 py-4 font-medium text-gray-900 text-center"},Ej={class:"px-3 py-4"},hj={class:"px-3 py-4 text-center"},Cj=gi(()=>h("td",{class:"px-3 py-4 text-center"},de("1.05"),-1)),Ij={class:"absolute top-0 md:left-20 md:right-20 left-12 right-12 flex justify-center items-center mx-auto z-[100]"},pj={class:"w-full rounded-md px-3 text-center mt-4 bg-green-500 py-2 text-white"},dj=Re({__name:"EditSkillAdminData",setup(t){const e=ze(),i=ct(),n=f(!0),o=f(!0),s=f(!0),A=f(!1),r=f(""),a=f(!1),c=f(!1),u=f(),l=f(),g=f(""),E=f([]),C=async()=>{var d,M,B,D,L,U;try{const Q={question:e.descriptionForSkillData};console.log("question",r.value),n.value=!1;const j=await ot("/SearchSkillTags",Q);l.value=(M=(d=j==null?void 0:j.data)==null?void 0:d.body)==null?void 0:M.length,console.log("ARRAY LENGTH",l.value),u.value=((B=j==null?void 0:j.data)==null?void 0:B.body)||[],E.value=u.value,console.log("length",(L=(D=j==null?void 0:j.data)==null?void 0:D.body)==null?void 0:L.length),console.log("data",j),n.value=!0,a.value=!0,c.value=!0,console.log("showSubmitButton",c.value)}catch(Q){if(console.error(Q),n.value=!0,me.isAxiosError(Q)){const j=Q;i.setError(((U=j.response)==null?void 0:U.data).message)}else i.setError("We ran into an issue while fetching duplicate values.")}},p=async()=>{var d;try{console.log("before rejecting topic"),o.value=!1;const M=encodeURIComponent(e.topicNameForSkillData),B=await zt(`/rejectTempTopic?Topic=${M}`);console.log("encoded topic",M),console.log("response",B),o.value=!0,B.status===200&&(e.topicNameForSkillData="",e.descriptionForSkillData="",e.offeringTypeForSkillData="",console.log("after rejecting topic"),g.value="Data Rejected Successfully!",I())}catch(M){if(console.error(M),o.value=!0,me.isAxiosError(M)){const B=M;i.setError(((d=B.response)==null?void 0:d.data).message)}else i.setError("We ran into an issue while rejecting values.")}},S=async()=>{var d;try{const M={Topic:e.topicNameForSkillData,Description:e.descriptionForSkillData,OfferingType:e.offeringTypeForSkillData};console.log("payload-=====>",M),s.value=!1;const B=await ot("/editMasterSkillFile",M);console.log("data",B),s.value=!0,g.value="Data Submitted Successfully!",I()}catch(M){if(console.error(M),s.value=!0,me.isAxiosError(M)){const B=M;i.setError(((d=B.response)==null?void 0:d.data).message)}else i.setError("There was an issue while inserting data")}},I=()=>{A.value=!0,setTimeout(()=>{A.value=!1;const d=sessionStorage.getItem("role");console.log("role",d),d==="user"?Mr.push({name:"SkillData"}):d==="admin"?Mr.push({name:"SkillData"}):Mr.push({name:"SkillAutomation"}),sessionStorage.removeItem("dataViewAccess"),sessionStorage.removeItem("role")},3e3)};return(d,M)=>(m(),R(Le,null,[h("nav",Gx,[ne(Fx)]),h("div",xx,[jx,h("div",kx,[Ye(h("input",{disabled:y(e).enableInputbox!==!0,class:ge([y(e).enableInputbox!==!0?"cursor-not-allowed fill-gray-400":"","w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1"]),type:"text","onUpdate:modelValue":M[0]||(M[0]=B=>y(e).topicNameForSkillData=B),id:"topic",placeholder:"Write here...",required:""},null,10,Yx),[[Ze,y(e).topicNameForSkillData]])]),zx,h("div",Px,[Ye(h("textarea",{"onUpdate:modelValue":M[1]||(M[1]=B=>y(e).descriptionForSkillData=B),onInput:M[2]||(M[2]=B=>c.value=!1),type:"text",id:"description",rows:"5",class:"w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1",placeholder:"Write here...",required:""},null,544),[[Ze,y(e).descriptionForSkillData]])]),bx,h("div",Jx,[Ye(h("input",{"onUpdate:modelValue":M[3]||(M[3]=B=>y(e).offeringTypeForSkillData=B),type:"text",id:"offeringType",class:"w-full p-2.5 text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 shadow-sm focus:outline-none focus:border-genpact-blue-box focus:ring-genpact-blue-box focus:ring-1",placeholder:"Write here...",required:""},null,512),[[Ze,y(e).offeringTypeForSkillData]])]),Hx,h("div",qx,[h("div",Vx,[h("div",Wx,[n.value?(m(),R("button",{key:0,disabled:y(e).isTopicPending===!0,class:ge([y(e).isTopicPending===!0?"cursor-not-allowed bg-gray-600":"cursor-pointer bg-genpact-darkest-blue","text-center whitespace-nowrap text-white w-52 px-4 py-2 rounded-md font-bold"]),type:"button",onClick:C}," Duplicate Check ",10,Zx)):(m(),R("div",Xx,_x))]),$x,ej,h("div",tj,[o.value?(m(),R("button",{key:0,type:"button",onClick:p,class:"bg-genpact-darkest-blue text-center text-white w-52 px-16 py-2 rounded-md font-bold cursor-pointer"}," Reject ")):(m(),R("div",ij,nj))]),h("div",rj,[s.value?(m(),R("button",{key:0,type:"submit",disabled:c.value!==!0,class:ge([c.value!==!0?"cursor-not-allowed bg-gray-600":"cursor-pointer bg-genpact-darkest-blue","text-center text-white w-52 px-2 py-2 rounded-md whitespace-nowrap font-bold"]),onClick:S}," Approve & Submit ",10,oj)):(m(),R("div",sj,Aj))])])])]),Ye(h("div",aj,[h("div",cj,[h("table",uj,[lj,h("tbody",null,[(m(!0),R(Le,null,lt(E.value,(B,D)=>(m(),R("tr",{key:D,class:"odd:bg-white even:bg-gray-100"},[h("th",gj,de(B.Topic||"title"),1),h("td",Ej,de(B.Description||"desc"),1),h("td",hj,de(B.OfferingType||"Knowledge Corpus"),1),Cj]))),128))])])])],512),[[Er,a.value]]),Ye(h("div",Ij,[h("div",pj,de(g.value),1)],512),[[Er,A.value]])],64))}}),y1="",Sj=Object.freeze(Object.defineProperty({__proto__:null,default:Pe(dj,[["__scopeId","data-v-ecf2c818"]])},Symbol.toStringTag,{value:"Module"})),Mj="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgEAAAIBCAYAAADQ5mxhAAAACXBIWXMAAAsSAAALEgHS3X78AAAfXUlEQVR4nO3dsY7kRp7gYeZhjfI0uhfYg/YBpoDSA8ho+duGxh0NCpDc9VrmmZJ160pAYSR3ZdSdrTbmBRLIeYAR9g2065WXB7aCUnV1VVcwM0hGxP/7gELNYHeqM5kZ5I9kkNwdj8cBAIjnf/jMASAmEQAAQYkAAAhKBABAUCIAAIISAQAQlAgAgKBEAAAEJQIAICgRAABBiQAACEoEAEBQIgAAghIBABCUCACAoEQAAAQlAgAgKBEAAEGJAAAISgQAQFAiAACCEgEAEJQIAICgRAAABCUCACAoEQAAQYkAAAhKBABAUCIAAIISAQAQlAgAgKBEAAAEJQIAICgRAABBiQAACEoEAEBQIgAAghIBABCUCACAoEQAAAQlAgAgKBEAAEGJAAAISgQAQFAiAACCEgEAEJQIAICgRAAABCUCACAoEQAAQYkAAAhKBABAUCIAAIISAQAQlAgAgKBEAAAEJQIAICgRAABBiQAACEoEAEBQIgAAghIBABCUCACAoEQAAAQlAgAgKBEAAEH9kw+eiC6uri+HYfi/wzD8693+5uBLEM/u9vD9+KaPLy8/j74siMuRAMJJAfC3YRj+efyd/juBpAD48/gzxQBEJAII5V4AfJDe9wdCIJZ7ATARAoQlAgjjkQCYCIEgHgmAiRAgJBFACO8JgIkQ6Nx7AmAiBAhHBNC9jACYCIFOZQTARAgQigigazMCYCIEOjMjACZCgDBEAN06IQAmQqATJwTARAgQggigS2cEwEQINO6MAJgIAbonAuhOgQCYCIFGFQiAiRCgayKArhQMgIkQaEzBAJgIAbolAujGAgEwEQKNWCAAJkKALokAurBgAEyEQOUWDICJEKA7IoDmrRAAEyFQqRUCYCIE6IoIoGkrBsBECFRmxQCYCAG6IQJo1gYBMBECldggACZCgC6IAJq0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aA3xqL/DFg9+5Pp1zWVfaMJwyoe31vSebPXSVNoY5k8/u+yodaZkld+8290FNT0kBl/NwoXG5/Es6fZT7t5v/HEq4uLqudlylmxs9KQXFs9/Dlh8glPmwpa/SkR0q4SmCC0iPnR3OWGHVck7zT+Pe1MyHtFwtcBOb/VYbnlxjXO1uD68zPrsP08bgyxl/3ueQLhm8uLoeOhhXUA2nAxaSDhH/aeYhzNrew/jaP934PUyvoQW5G/ZZN43yOfwu3Tug6XEFNREBC0ozqD+t7Nr2WY4vL/fpPeQ+1a2kfTqF0cQKf8bthIe5e7M+h9/d7W+aH1dQCxGwsHHlfXx5+fGM28wu6aR/P22APp6xgSvhx7ThaW1F/03mcn4xdyKoz+F3d/ub/d3+pulxBTUQAStJ51L/ZYOV1o/pMPX/PGdFPu4FHl9efpn2wJa8Ucy01/mnVo4A3JeOBix2O2Gfw9vSJLNNx9UYJCv+u1CUiYErundDoW/SrYNfnDA7+znTrPA3v0uvwNPVBa/TzWk+Sz/nvv7p7ng/VvJwoHN9ly5Re24i35vLO0+ZbOdz+N29Gwp9k24dvPi4Sv8mNM8lghVIK/KrtNGYDhF/9J6V2LSCni7/Gn//vNWKO01ye/Hg9V89sRGcXuP0ul83eMi/Sj6Ht6VbCJ89rp67/A9aJgIAIChzAgAgKBEAAEGJAAAISgQAQFAiAACCEgEAEJQIAICgRAAABCUCACAoEQAAQYkAAAhKBABAUCIAAIISAQAQlAgAgKBEAAAEJQIAICgRAABBiQAACEoEAEBQIgAAghIBABCUCACAoEQAAAQlAgAgKBEAAEGJAAAISgQAQFAiAACCEgEAEJQIAICgRAAABCUCACAoEQAAQYkAAAhKBABAUCIAAIISAQAQlAgAgKBEAAAEJQIAICgRAABBiQAACEoEAEBQIgAAghIBABCUCACAoEQAAAQlAgAgKBEAAEGJAACIaBiG/w+yjGibxxwNWgAAAABJRU5ErkJggg==",Bj={},vj={class:"w-screen h-screen flex justify-center"},fj=[h("div",{class:"flex flex-col justify-center items-center gap-6"},[h("img",{class:"h-24",src:Mj}),h("div",{class:"font-bold text-[50px] capitalize text-gray-600"},"We are under maintenance"),h("div",{class:"font-medium text-lg capitalize text-gray-600"},"please check back later")],-1)];function wj(t,e){return m(),R("div",vj,fj)}const HS=Object.freeze(Object.defineProperty({__proto__:null,default:Pe(Bj,[["render",wj]])},Symbol.toStringTag,{value:"Module"}))});