@id3/face-pad
Advanced tools
Comparing version 1.5.8 to 1.5.10
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common/http"),require("rxjs"),require("rxjs/operators"),require("downloadjs"),require("@id3/facedetector"),require("@angular/common"),require("@angular/platform-browser")):"function"==typeof define&&define.amd?define("@id3/face-pad",["exports","@angular/core","@angular/common/http","rxjs","rxjs/operators","downloadjs","@id3/facedetector","@angular/common","@angular/platform-browser"],t):t(((e=e||self).id3=e.id3||{},e.id3["face-pad"]={}),e.ng.core,e.ng.common.http,e.rxjs,e.rxjs.operators,e.Downloadjs,e.FaceDetector,e.ng.common,e.ng.platformBrowser)}(this,function(e,t,i,n,a,o,r,s,c){"use strict";function p(e,t,i,n){return new(i||(i=Promise))(function(a,o){function r(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){e.done?a(e.value):new i(function(t){t(e.value)}).then(r,s)}c((n=n.apply(e,t||[])).next())})}function d(e,t){var i,n,a,o,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,n=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===o[0]||2===o[0])){r=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){r.label=o[1];break}if(6===o[0]&&r.label<a[1]){r.label=a[1],a=o;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(o);break}a[2]&&r.ops.pop(),r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e],n=0}finally{i=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}o=o&&o.hasOwnProperty("default")?o.default:o;var l={REQUEST_PERMISSIONS:0,INITIAL:1,STARTED:2,PROCESS:3,SUCCESS:4,ERROR_KEY:5,ERROR_SESSION:6,ERROR_NO_FACE:7,ERROR_MULTIPLE_FACE:8,ERROR_NO_INTERNET_CONNECTION:9,ERROR_USER_TOO_FAR:10,ERROR_USER_NOT_CENTER:11,MATCH_READY:12,MATCH_SUCCESS:13,MATCH_ERROR:14};l[l.REQUEST_PERMISSIONS]="REQUEST_PERMISSIONS",l[l.INITIAL]="INITIAL",l[l.STARTED]="STARTED",l[l.PROCESS]="PROCESS",l[l.SUCCESS]="SUCCESS",l[l.ERROR_KEY]="ERROR_KEY",l[l.ERROR_SESSION]="ERROR_SESSION",l[l.ERROR_NO_FACE]="ERROR_NO_FACE",l[l.ERROR_MULTIPLE_FACE]="ERROR_MULTIPLE_FACE",l[l.ERROR_NO_INTERNET_CONNECTION]="ERROR_NO_INTERNET_CONNECTION",l[l.ERROR_USER_TOO_FAR]="ERROR_USER_TOO_FAR",l[l.ERROR_USER_NOT_CENTER]="ERROR_USER_NOT_CENTER",l[l.MATCH_READY]="MATCH_READY",l[l.MATCH_SUCCESS]="MATCH_SUCCESS",l[l.MATCH_ERROR]="MATCH_ERROR";var h=function(){this.autoMatchingEnabled=!1,this.downloadFinalPictureOnSuccessEnabled=!1,this.formatFinalPicture=!1,this.padFrequency=100,this.circleEnabled=!1,this.faceTrackingEnabled=!1,this.circleRadius=200,this.frameWidth=120,this.resultPictureWidth=600,this.faceTrackingOptionDesign=!1},S=function(){this.endSessionEventEmitter=new t.EventEmitter,this.sessionExpiredEventEmitter=new t.EventEmitter,this.internetLostEventEmitter=new t.EventEmitter,this.colorExcellentConnection="#08FF00",this.colorGoodConnection="#08FF00",this.colorMediumConnection="#FFA600",this.colorBadConnection="#FF0000",this.defaultColor="#C0C0C0",this.highLimit=40,this.mediumLimit=100,this.badLimit=150},u=function(){this.faceDetectedEventEmitter=new t.EventEmitter,this.detectionFailureEventEmitter=new t.EventEmitter,this.faceMatchingEventEmitter=new t.EventEmitter},g=function(){this.messages=new Map,this.mapLanguage=new Map},E=function(){this.videoWidth=800,this.videoHeight=600,this.videoConstraints={audio:!1,video:{height:{min:480}}},this.cameraEventEmitter=new t.EventEmitter},m=function(){},f=function(){},v=function(){function e(){this.faceApiBaseUrl="https://web-components.id3.eu",this.pingBaseUrl="https://web-components.id3.eu",this.faceParameters="/api/parameters",this.faceRotateAndCrop="/api/face/rotate-and-crop",this.faceMatching="/api/face/match/pictures",this.apiKey="",this.processState=l.REQUEST_PERMISSIONS,this.componentOptions=new h,this.sessionState=new S,this.faceState=new u,this.messageState=new g,this.videoState=new E,this.padCircleState=new m,this.trackerState=new f,this.changeStateEventEmitter=new t.EventEmitter}return e.prototype.getUrlParameters=function(){return this.faceApiBaseUrl+this.faceParameters},e.prototype.getUrlRotateAndCrop=function(){return this.faceApiBaseUrl+this.faceRotateAndCrop},e.prototype.getUrlMatching=function(){return this.faceApiBaseUrl+this.faceMatching},e.prototype.initApiParameters=function(e){this.faceParameters=e||this.faceParameters},e.prototype.initApiFace=function(e,t){this.faceRotateAndCrop=e||this.faceRotateAndCrop,this.faceMatching=t||this.faceMatching},e.prototype.initApiBase=function(e,t,i){this.apiKey=e||this.apiKey,this.faceApiBaseUrl=t||this.faceApiBaseUrl,this.pingBaseUrl=i||this.pingBaseUrl},e.prototype.initComponentOptions=function(e,t,i,n,a,o,r,s,c,p,d){this.componentOptions.autoMatchingEnabled=e,this.componentOptions.downloadFinalPictureOnSuccessEnabled=t,this.componentOptions.formatFinalPicture=i,this.componentOptions.padFrequency=n||this.componentOptions.padFrequency,this.componentOptions.circleEnabled=a,this.componentOptions.faceTrackingEnabled=o,this.componentOptions.circleRadius=r||this.componentOptions.circleRadius,this.componentOptions.frameWidth=s||this.componentOptions.frameWidth,this.componentOptions.colorProgressCircle=c||this.componentOptions.colorProgressCircle,this.componentOptions.resultPictureWidth=p||this.componentOptions.resultPictureWidth,this.componentOptions.faceTrackingOptionDesign=d},e.prototype.initVideoState=function(e,t){this.videoState.videoHeight=e,this.videoState.videoWidth=t},e.prototype.changeProcessState=function(e){this.processState=e,this.changeStateEventEmitter.emit(l[e])},e.prototype.clearState=function(){clearInterval(this.sessionState.padContinueInterval),this.sessionState.padContinueInterval=void 0,this.sessionState.processInstruction=void 0,this.trackerState.xCoord=void 0,this.trackerState.yCoord=void 0,this.trackerState.wCoord=void 0,this.trackerState.hCoord=void 0,this.sessionState.endSessionEventEmitter.emit(!0)},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e}(),R=function(){function e(e){this.padState=e}return e.prototype.connect=function(e){var t=this,i=this.padState.faceApiBaseUrl.replace("http","ws");return new Promise(function(n,a){t.ws=new WebSocket(i+"/pad/session"),t.ws.onopen=function(){console.log("Info: Connection PAD Established."),n(!0)},t.ws.onmessage=e,t.ws.onclose=function(e){console.log("Info: Closing PAD Connection."),a(!1)}})},e.prototype.disconnect=function(){null!=this.ws&&(this.ws.close(),this.ws=null)},e.prototype.isConnected=function(){return null!=this.ws&&this.ws.readyState===this.ws.OPEN},e.prototype.sendMessage=function(e){null!=this.ws?this.ws.bufferedAmount>2e5?console.log("Image not sent : Web socket buffer is too big. We have to wait the previous message to be send before sending a new message."):this.ws.send(JSON.stringify(e)):console.warn("connection to web socket not established, please connect.")},e.prototype.waitForSocketConnection=function(e,t){var i=this;setTimeout(function(){1===e.readyState?(console.log("Connection is made"),null!=t&&t()):(console.log("wait for connection..."),i.waitForSocketConnection(e,t))},5)},e.prototype.startPingServer=function(){var e=this,t=this.padState.pingBaseUrl.replace("http","ws");return new Promise(function(i,n){e.pingWebSocket=new WebSocket(t+"/ping"),e.pingWebSocket.onopen=function(){console.log("Info: Connection Ping Established."),e.pingServer(),i(!0)},e.pingWebSocket.onclose=function(e){console.log("Info: Closing Ping Connection."),n(!1)}})},e.prototype.pingServer=function(){var e=this;1===this.pingWebSocket.readyState?(this.pingWebSocket.send(JSON.stringify(Date.now())),this.pingWebSocket.addEventListener("message",function(t){e.padState.sessionState.latency=Date.now()-t.data,setTimeout(function(){e.pingWebSocket.send(JSON.stringify(Date.now()))},2e3)})):this.startPingServer()},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:v}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v))},token:e,providedIn:"root"}),e}(),C=function(){function e(e,t){this.httpClient=e,this.padState=t}return e.prototype.loadParameters=function(){var e=this,t=new i.HttpHeaders;return t=(t=t.append("Accept","application/json")).append("ApiKeyAuth",this.padState.apiKey),this.httpClient.get(this.padState.getUrlParameters(),{headers:t}).pipe(a.map(function(t){return e.padState.parameters=t,t},function(e){console.error(e)}))},e.prototype.getParameters=function(){return this.padState.parameters?n.of(this.padState.parameters):this.loadParameters()},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:i.HttpClient},{type:v}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(i.HttpClient),t.ɵɵinject(v))},token:e,providedIn:"root"}),e}(),b=function(){function e(){}return e.b64toBlob=function(e){for(var t=atob(e.split(",")[1]),i=new ArrayBuffer(t.length),n=new Uint8Array(i),a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return new Blob([i],{type:"image/png"})},e.downloadPicture=function(e){return p(this,void 0,void 0,function(){var t,i;return d(this,function(n){switch(n.label){case 0:return[4,new Response(e).arrayBuffer()];case 1:return t=n.sent(),i="data:image/jpeg;base64,"+this.arrayBufferToBase64(t),o(i,"face-result.jpeg","image/jpeg"),[2]}})})},e.arrayBufferToBase64=function(e){for(var t="",i=new Uint8Array(e),n=i.byteLength,a=0;a<n;a++)t+=String.fromCharCode(i[a]);return window.btoa(t)},e}(),y=function(){function e(e,t){this.httpClient=e,this.padState=t}return Object.defineProperty(e.prototype,"componentOptions",{get:function(){return this.padState.componentOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"faceState",{get:function(){return this.padState.faceState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sessionState",{get:function(){return this.padState.sessionState},enumerable:!0,configurable:!0}),e.prototype.rotateAndCropFinalPicture=function(){var e=this,n=new t.EventEmitter,a=new i.HttpHeaders;a=(a=a.append("Accept","application/json")).append("ApiKeyAuth",this.padState.apiKey);var o=new FormData;return o.append("picture",this.padState.photoPADStartOriginal),this.httpClient.post(this.padState.getUrlRotateAndCrop(),o,{headers:a}).subscribe(function(t){if(t.length>0){var i=b.b64toBlob("data:image/png;base64,"+t[0].picture);e.padState.generatedPicture=i,e.componentOptions.autoMatchingEnabled?e.padState.changeProcessState(l.MATCH_READY):e.componentOptions.downloadFinalPictureOnSuccessEnabled&&b.downloadPicture(e.padState.generatedPicture).then(),n.emit(i)}else{var a="No picture generated from the original picture by the rotate-and-crop method";n.error(a),console.warn(a)}},function(t){if(417===t.status)e.padState.changeProcessState(l.ERROR_MULTIPLE_FACE),e.faceState.detectionFailureEventEmitter.emit("ERROR_MULTIPLE_FACE"),n.error(l.ERROR_MULTIPLE_FACE);else if(404===t.status)e.padState.changeProcessState(l.ERROR_NO_FACE),e.faceState.detectionFailureEventEmitter.emit("ERROR_NO_FACE"),n.error(l.ERROR_NO_FACE);else if(0===t.status)e.padState.changeProcessState(l.ERROR_NO_INTERNET_CONNECTION),e.sessionState.internetLostEventEmitter.emit(),n.error(l.ERROR_NO_INTERNET_CONNECTION);else{n.error("No picture generated from the original picture by the rotate-and-crop method"),console.error("No picture generated from the original picture by the rotate-and-crop method"+t)}e.padState.clearState()}),n},e.prototype.manageFinalPicture=function(){var e=this;this.componentOptions.formatFinalPicture?this.rotateAndCropFinalPicture().subscribe(function(t){e.faceState.faceDetectedEventEmitter.emit(t)},function(t){e.faceState.faceDetectedEventEmitter.error(t)}):(this.padState.generatedPicture=this.padState.photoPADStartOriginal,this.faceState.faceDetectedEventEmitter.emit(this.padState.generatedPicture),!this.componentOptions.autoMatchingEnabled&&this.componentOptions.downloadFinalPictureOnSuccessEnabled?b.downloadPicture(this.padState.generatedPicture).then():this.componentOptions.autoMatchingEnabled&&this.padState.changeProcessState(l.MATCH_READY))},e.prototype.compareWithReference=function(e){var t=this,n=new i.HttpHeaders;n=(n=n.append("Accept","application/json")).append("ApiKeyAuth",this.padState.apiKey);var a=URL.createObjectURL(e.target.files[0]),o=new Image;o.onload=function(){var e=500/o.width,i=document.createElement("canvas");i.width=500,i.height=o.height*e,i.getContext("2d").drawImage(o,0,0,i.width,i.height),i.toBlob(function(e){return p(t,void 0,void 0,function(){var t,i=this;return d(this,function(a){return(t=new FormData).append("reference",e),t.append("probe",this.padState.photoPADStartOriginal),this.httpClient.post(this.padState.getUrlMatching(),t,{headers:n}).subscribe(function(e){i.faceState.faceMatchingEventEmitter.emit(e),e.decision?i.padState.changeProcessState(l.MATCH_SUCCESS):i.padState.changeProcessState(l.MATCH_ERROR),e.decision&&i.componentOptions.downloadFinalPictureOnSuccessEnabled&&b.downloadPicture(i.padState.generatedPicture).then()},function(e){i.padState.changeProcessState(l.MATCH_ERROR),i.faceState.faceMatchingEventEmitter.error("An error occured during the Matching process. Please retry later.")}),[2]})})},"image/jpeg")},o.src=a},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:i.HttpClient},{type:v}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(i.HttpClient),t.ɵɵinject(v))},token:e,providedIn:"root"}),e}(),L=function(){function e(){}return e.messages=new Map([["START_TIPS_LABEL","Press on Start button when you are ready"],["PROCESS_FACE_CENTER_LABEL","Face detected, but not centered. Please look straight to the camera"],["PROCESS_NO_FACE_LABEL","No face detected. Please look straight to the camera."],["PROCESS_MULTIPLE_FACE_LABEL","Multiple faces detected. Only one person is allowed in the detection."],["TURN_FACE_LABEL","Now, please turn your face (look at the right or at the left)"],["EXPIRED_SESSION_ERROR_LABEL","Session has expired. Please try again."],["NO_FACE_ERROR_LABEL","No face detected. Please try again."],["NO_INTERNET_CONNECTION_LABEL","Internet connection lost. Please try again"],["MULTIPLE_FACE_ERROR_LABEL","Multiple faces detected. Please try again."],["MATCHING_SUCCESS_LABEL","Detected face successfully match the reference picture."],["MATCHING_READY_LABEL",'Picture is ready to be compared with a reference picture.Please click on the "Compare" button to upload the reference picture.'],["MATCHING_ERROR_LABEL","Detected face does not match the reference picture"],["SUCCESS_LABEL","Live face successfully detected."],["START_BUTTON_LABEL","Start"],["RESTART_BUTTON_LABEL","Restart"],["COMPARE_BUTTON_LABEL","Compare"],["ENABLE_CAM_BUTTON_LABEL","Start the webcam"],["RETRY_BUTTON_LABEL","Retry"],["USER_TOO_FAR_LABEL","Too far away, please move closer"],["USER_NOT_CENTER_LABEL","Please, move on the target area"]]),e}(),_=function(){function e(){}return e.messages=new Map([["START_TIPS_LABEL","Cliquez sur Démarrer lorsque vous êtes prêt"],["PROCESS_FACE_CENTER_LABEL","Visage detecté, mais non centré. Veuillez regarder la caméra en mettant votre visage bien en face"],["PROCESS_NO_FACE_LABEL","Pas de visage detecté. Veuillez vous positionner au centre de l'écran."],["PROCESS_MULTIPLE_FACE_LABEL","Plusieurs visages detectés. La detection ne fonctionne qu'avec un seul visage."],["TURN_FACE_LABEL","Maintenant, tournez lentement la tête (vers la droite ou vers la gauche)"],["EXPIRED_SESSION_ERROR_LABEL","La session a expiré. Veuillez réessayer"],["NO_FACE_ERROR_LABEL","Pas de visage detecté. Veuillez réessayer"],["NO_INTERNET_CONNECTION_LABEL","Connection internet perdue. Veuillez réessayer"],["MULTIPLE_FACE_ERROR_LABEL","Plusieurs visages detectés. Veuillez réessayer"],["MATCHING_SUCCESS_LABEL","Le visage correspond bien à la photo de référence"],["MATCHING_READY_LABEL",'La photo est prête à être comparée avec une référence.Veuillez cliquer sur le bouton "Verifier" puis choisir une photo de référence.'],["MATCHING_ERROR_LABEL","Le visage ne correspond pas à la photo de référence"],["SUCCESS_LABEL","La detection du visage a réussi."],["START_BUTTON_LABEL","Démarrer"],["RESTART_BUTTON_LABEL","Recommencer"],["COMPARE_BUTTON_LABEL","Vérifier"],["ENABLE_CAM_BUTTON_LABEL","Activer la webcam"],["RETRY_BUTTON_LABEL","Réessayer"],["USER_TOO_FAR_LABEL","Vous êtes trop loin, veuillez vous rapprocher de la caméra"],["USER_NOT_CENTER_LABEL","Veuillez vous positionner à l'intérieur de la zone cible"]]),e}(),A=function(){function e(){}return e.messages=new Map([["START_TIPS_LABEL","Pressione no botão Iniciar quando estiver pronto"],["PROCESS_FACE_CENTER_LABEL","Rosto detectado, mas não centrado. Por favor, olhe diretamente para a câmera"],["PROCESS_NO_FACE_LABEL","Nenhum rosto detectado. Por favor, olhe diretamente para a câmera."],["PROCESS_MULTIPLE_FACE_LABEL","Múltiplos rostos detectados. Apenas uma pessoa é permitida na detecção."],["TURN_FACE_LABEL","Agora, por favor, vire seu rosto (olhe para a direita ou para a esquerda)"],["EXPIRED_SESSION_ERROR_LABEL","Sessão expirou. Por favor, tente novamente."],["NO_FACE_ERROR_LABEL","Nenhum rosto detectado. Por favor, tente novamente."],["NO_INTERNET_CONNECTION_LABEL","Conexão perdida com a internet. Por favor, tente novamente."],["MULTIPLE_FACE_ERROR_LABEL","Múltiplos rostos detectados. Por favor, tente novamente."],["MATCHING_SUCCESS_LABEL","A face detectada corresponde com sucesso à imagem de referência."],["MATCHING_READY_LABEL",'A imagem está pronta para ser comparada com uma imagem de referência.Por favor, clique no botão "Comparar" para carregar a imagem de referência.'],["MATCHING_ERROR_LABEL","Detected face does not match the reference picture"],["SUCCESS_LABEL","O rosto detectado não corresponde à imagem de referência"],["START_BUTTON_LABEL","Iniciar"],["RESTART_BUTTON_LABEL","Começar de novo"],["COMPARE_BUTTON_LABEL","Comparar"],["ENABLE_CAM_BUTTON_LABEL","Comece a webcam"],["RETRY_BUTTON_LABEL","Tente novamente"],["USER_TOO_FAR_LABEL","Você está longe demais, por favor, aproxime-se da câmera"],["USER_NOT_CENTER_LABEL","Por favor posicione-se dentro da área alvo"]]),e}(),O=function(){function e(e){this.padState=e,this.messageState.mapLanguage.set("fr",_.messages),this.messageState.mapLanguage.set("en",L.messages),this.messageState.mapLanguage.set("pt",A.messages)}return Object.defineProperty(e.prototype,"messageState",{get:function(){return this.padState.messageState},enumerable:!0,configurable:!0}),e.prototype.getMessage=function(e){return!this.messageState.messages.get(e)&&this.messageState.languageFile?this.messageState.languageFile.get(e):this.messageState.messages.get(e)},e.prototype.initMessage=function(e,t,i,n,a,o,r,s,c,p,d,l,h,S,u,g,E,m,f,v){this.messageState.messages.set("START_TIPS_LABEL",e),this.messageState.messages.set("PROCESS_FACE_CENTER_LABEL",t),this.messageState.messages.set("PROCESS_NO_FACE_LABEL",i),this.messageState.messages.set("PROCESS_MULTIPLE_FACE_LABEL",n),this.messageState.messages.set("TURN_FACE_LABEL",a),this.messageState.messages.set("EXPIRED_SESSION_ERROR_LABEL",o),this.messageState.messages.set("NO_FACE_ERROR_LABEL",r),this.messageState.messages.set("MULTIPLE_FACE_ERROR_LABEL",s),this.messageState.messages.set("SUCCESS_LABEL",c),this.messageState.messages.set("START_BUTTON_LABEL",p),this.messageState.messages.set("RESTART_BUTTON_LABEL",d),this.messageState.messages.set("COMPARE_BUTTON_LABEL",l),this.messageState.messages.set("ENABLE_CAM_BUTTON_LABEL",h),this.messageState.messages.set("RETRY_BUTTON_LABEL",S),this.messageState.messages.set("MATCHING_SUCCESS_LABEL",u),this.messageState.messages.set("MATCHING_READY_LABEL",g),this.messageState.messages.set("MATCHING_ERROR_LABEL",E),this.messageState.messages.set("NO_INTERNET_CONNECTION_LABEL",m),this.messageState.messages.set("USER_TOO_FAR_LABEL",f),this.messageState.messages.set("USER_NOT_CENTER_LABEL",v)},e.prototype.initLanguage=function(){this.messageState.languageFile=this.messageState.mapLanguage.get(navigator.language.substr(0,2)),this.messageState.languageFile||(this.messageState.languageFile=L)},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:v}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v))},token:e,providedIn:"root"}),e}(),I=function(){function e(e){this.padState=e}return Object.defineProperty(e.prototype,"componentOptions",{get:function(){return this.padState.componentOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trackerState",{get:function(){return this.padState.trackerState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"videoState",{get:function(){return this.padState.videoState},enumerable:!0,configurable:!0}),e.prototype.faceTracker=function(){var e=this,t=this.videoState.videoPAD.nativeElement,i=this.videoState.canvasResult.nativeElement,n=i.getContext("2d");i.width=this.videoState.videoWidth,i.height=this.videoState.videoHeight,this.faceDetector=new r({video:t,flipLeftRight:!1,flipUpsideDown:!1}),this.faceDetector.startDetecting(),this.faceDetector.setOnFaceLostCallback(function(e,t){n.clearRect(0,0,i.width,i.height)}),this.faceDetector.setOnFaceUpdatedCallback(function(t){n.clearRect(0,0,i.width,i.height),e.componentOptions.faceTrackingOptionDesign?(n.strokeStyle="rgba(0,200,200,0)",n.fillStyle="rgba(0,200,200,0)"):(n.strokeStyle="rgba(0,221,52,1.0)",n.fillStyle="rgba(0,221,52,0.08)"),n.lineWidth=2,t.forEach(function(t){n.beginPath();var a=t.width*i.width/2,o=1.5*t.height*i.height/2;n.ellipse(t.x*i.width+a,t.y*i.height+o-o/2,a,o,0,0,2*Math.PI),n.stroke(),n.fill(),e.componentOptions.faceTrackingOptionDesign&&(n.strokeStyle="rgba(0,200,200,0)",n.lineWidth="10",n.fillStyle="rgba(0, 0, 0, 0.7)",n.beginPath(),n.moveTo(0,0),n.lineTo(0,i.height),n.lineTo(i.width/2,i.height),n.ellipse(t.x*i.width+a,t.y*i.height+o-o/2,a,o,0,Math.PI/2,Math.PI/2.000001),n.lineTo(i.height/2,i.height),n.lineTo(i.width,i.height),n.lineTo(i.width,0),n.lineTo(i.width/2,0),n.lineTo(i.width/2,0),n.lineTo(0,0),n.stroke(),n.fill()),e.trackerState.xCoord=t.x*i.width,e.trackerState.yCoord=t.y*i.height,e.trackerState.wCoord=t.width*i.width,e.trackerState.hCoord=t.height*i.height})})},e.prototype.faceTrackingReadyToStart=function(){return this.componentOptions.faceTrackingEnabled&&(!this.faceDetector||!this.faceDetector.isRunning())},e.prototype.faceTrackingHasToBeDrawn=function(){return this.componentOptions.faceTrackingEnabled&&this.faceDetector.isRunning()&&this.trackerState.xCoord&&!this.componentOptions.circleEnabled},e.prototype.faceTrackingReady=function(){return this.componentOptions.faceTrackingEnabled&&this.faceDetector.isRunning()&&this.trackerState.xCoord},e.prototype.stopTracking=function(){this.faceDetector&&this.faceDetector.stop()},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:v}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v))},token:e,providedIn:"root"}),e}(),T=function(){function e(e){this.padState=e}return Object.defineProperty(e.prototype,"videoState",{get:function(){return this.padState.videoState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentOptions",{get:function(){return this.padState.componentOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"padCircleState",{get:function(){return this.padState.padCircleState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sessionState",{get:function(){return this.padState.sessionState},enumerable:!0,configurable:!0}),e.prototype.progressCircle=function(){var e=this,t=this.videoState.canvasResult.nativeElement;t.width=this.videoState.videoWidth,t.height=this.videoState.videoHeight;var i=t.getContext("2d"),n=t.width/2,a=t.height/2;i.lineCap="round";var o=0,r=setInterval(function(){i.clearRect(0,0,t.width,t.height),e.grayScale(e.componentOptions.circleRadius,i,t,n,a),i.beginPath(),""!==e.componentOptions.colorProgressCircle?i.strokeStyle=e.componentOptions.colorProgressCircle:i.strokeStyle="#007bff",i.lineWidth="10",i.arc(n,a,e.componentOptions.circleRadius,Math.PI/180*270,Math.PI/180*(270+o)),i.stroke(),e.sessionState.processCompletion>=100?(i.arc(n,a,e.componentOptions.circleRadius,Math.PI/180*(270+o),Math.PI/180*630),i.stroke(),e.sessionState.processCompletion=0,o=0,clearInterval(r),e.padCircleState.isCircleRunning=!1):o<e.sessionState.processCompletion/100*360?o+=10:e.padState.processState!==l.ERROR_NO_FACE&&e.padState.processState!==l.ERROR_NO_INTERNET_CONNECTION&&e.padState.processState!==l.ERROR_SESSION&&e.padState.processState!==l.ERROR_MULTIPLE_FACE||(i.clearRect(0,0,t.width,t.height),e.grayScale(e.componentOptions.circleRadius,i,t,n,a),e.sessionState.processCompletion=0,o=0,clearInterval(r),e.padCircleState.isCircleRunning=!1)},60)},e.prototype.grayScale=function(e,t,i,n,a){t.strokeStyle="rgba(0,200,200,0)",t.lineWidth="10",t.fillStyle="rgba(0, 0, 0, 0.7)",t.beginPath(),t.moveTo(0,0),t.lineTo(0,i.height),t.lineTo(n,i.height),t.lineTo(n,i.height-e/2),t.arc(n,a,e,Math.PI/2,Math.PI/2.000001),t.lineTo(n,i.height),t.lineTo(i.width,i.height),t.lineTo(i.width,0),t.lineTo(n,0),t.lineTo(n,e/2),t.lineTo(n,0),t.lineTo(0,0),t.stroke(),t.fill()},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:v}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v))},token:e,providedIn:"root"}),e}(),P=function(){function e(e,t,i,n,a,o){this.padState=e,this.messageService=t,this.faceService=i,this.padSessionWebSocketService=n,this.trackerService=a,this.padCircleService=o}return Object.defineProperty(e.prototype,"processCompletion",{get:function(){return this.sessionState.processCompletion},set:function(e){this.sessionState.processCompletion=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sessionState",{get:function(){return this.padState.sessionState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentOptions",{get:function(){return this.padState.componentOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minHeadSize",{get:function(){return this.padState.parameters.minHeadSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"padCircleState",{get:function(){return this.padState.padCircleState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trackerState",{get:function(){return this.padState.trackerState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"videoState",{get:function(){return this.padState.videoState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"faceState",{get:function(){return this.padState.faceState},enumerable:!0,configurable:!0}),e.prototype.processPadSessionResponse=function(e){var t=this;this.processCompletion=e.processCompletion,e.result?(this.padState.changeProcessState(l.SUCCESS),this.padState.clearState(),this.faceService.manageFinalPicture()):(this.sessionState.processInstruction="",e.errorType||this.padState.processState!==l.STARTED?"INVALID_YAW"===e.errorType||"INVALID_PITCH"===e.errorType?(this.sessionState.processInstruction=this.messageService.getMessage("PROCESS_FACE_CENTER_LABEL"),this.sessionState.padStartTimeOut=setTimeout(function(){return t.prepareCallPADStart()},500)):"INVALID_KEY"===e.errorType?this.padState.changeProcessState(l.ERROR_KEY):"INVALID_FACE"===e.errorType?this.padState.processState===l.PROCESS?(0===e.faceCount?(this.padState.changeProcessState(l.ERROR_NO_FACE),this.faceState.detectionFailureEventEmitter.emit("ERROR_NO_FACE")):e.faceCount>1&&(this.padState.changeProcessState(l.ERROR_MULTIPLE_FACE),this.faceState.detectionFailureEventEmitter.emit("ERROR_MULTIPLE_FACE")),this.padState.clearState()):this.padState.processState===l.STARTED&&(0===e.faceCount?this.componentOptions.circleEnabled?this.sessionState.processInstruction=this.messageService.getMessage("USER_NOT_CENTER_LABEL"):this.sessionState.processInstruction=this.messageService.getMessage("PROCESS_NO_FACE_LABEL"):e.faceCount>1&&(this.sessionState.processInstruction=this.messageService.getMessage("PROCESS_MULTIPLE_FACE_LABEL")),setTimeout(function(){return t.prepareCallPADStart()},500)):"INVALID_SESSION"===e.errorType&&(this.padState.changeProcessState(l.ERROR_SESSION),this.padState.clearState(),this.sessionState.sessionExpiredEventEmitter.emit()):(this.padState.changeProcessState(l.PROCESS),this.sessionState.padContinueInterval=setInterval(function(){return t.prepareCallPADContinue()},this.componentOptions.padFrequency)))},e.prototype.prepareCallPADStart=function(){var e=this;this.padSessionWebSocketService.isConnected()?this.callPADStart():this.padSessionWebSocketService.connect(function(t){return e.processPadSessionResponse(JSON.parse(t.data))}).then(function(t){e.callPADStart()}).catch(function(t){e.padState.changeProcessState(l.ERROR_NO_INTERNET_CONNECTION),e.sessionState.internetLostEventEmitter.emit(),e.padState.clearState()})},e.prototype.callPADStart=function(){var e=this;try{this.trackerService.faceTrackingReadyToStart()?this.trackerService.faceTracker():this.componentOptions.circleEnabled&&!this.componentOptions.faceTrackingEnabled&&(this.padCircleState.isCircleRunning||(this.padCircleService.progressCircle(),this.padCircleState.isCircleRunning=!0));var t=this.componentOptions.frameWidth/this.videoState.videoPAD.nativeElement.clientWidth;this.padState.changeProcessState(l.STARTED);var i=document.createElement("canvas");if(this.trackerService.faceTrackingHasToBeDrawn()){i.width=3*this.minHeadSize*this.videoState.ratioWidth,i.height=3*this.minHeadSize*this.videoState.ratioHeight;var n=1.5*this.trackerState.wCoord*this.videoState.ratioWidth,a=(this.trackerState.xCoord-(n-this.trackerState.wCoord))*this.videoState.ratioWidth,o=1.5*this.trackerState.hCoord*this.videoState.ratioHeight,r=(this.trackerState.yCoord-(o-this.trackerState.hCoord))*this.videoState.ratioHeight;i.height*this.trackerState.hCoord/this.videoState.videoHeight<this.minHeadSize?this.padState.changeProcessState(l.ERROR_USER_TOO_FAR):(i.getContext("2d").drawImage(this.videoState.videoPAD.nativeElement,+a,r,n,o,0,0,i.width,i.height),i.toBlob(function(t){e.sessionState.photoPADStart=t,e.padState.changeStateEventEmitter.emit("PAD Start photo blob generated"),e.doPADStart()},"image/jpeg"))}else this.componentOptions.circleEnabled&&!this.componentOptions.faceTrackingEnabled?(i.width=3*this.minHeadSize*this.videoState.ratioWidth,i.height=3*this.minHeadSize*this.videoState.ratioHeight,i.getContext("2d").drawImage(this.videoState.videoPAD.nativeElement,this.videoState.width/2-2*this.componentOptions.circleRadius*this.videoState.ratioWidth/2,this.videoState.height/2-2*this.componentOptions.circleRadius*this.videoState.ratioHeight/2,2*this.componentOptions.circleRadius*this.videoState.ratioWidth,2*this.componentOptions.circleRadius*this.videoState.ratioHeight,0,0,i.width,i.height),i.toBlob(function(t){e.sessionState.photoPADStart=t,e.padState.changeStateEventEmitter.emit("PAD Start photo blob generated"),e.doPADStart()},"image/jpeg")):(i.width=this.componentOptions.frameWidth,i.height=this.videoState.videoPAD.nativeElement.clientHeight*t,i.getContext("2d").drawImage(this.videoState.videoPAD.nativeElement,0,0,i.width,i.height),i.toBlob(function(t){e.sessionState.photoPADStart=t,e.padState.changeStateEventEmitter.emit("PAD Start photo blob generated"),e.doPADStart()},"image/jpeg"));var s=this.componentOptions.resultPictureWidth/this.videoState.videoPAD.nativeElement.clientWidth,c=document.createElement("canvas");this.trackerService.faceTrackingReady()?(c.width=1.5*this.trackerState.wCoord,c.height=1.5*this.trackerState.hCoord,this.trackerState.xCoord-=c.width-this.trackerState.wCoord,this.trackerState.yCoord-=c.height-this.trackerState.hCoord,c.getContext("2d").drawImage(this.videoState.videoPAD.nativeElement,+this.trackerState.xCoord,this.trackerState.yCoord,c.width,c.height,0,0,c.width,c.height)):(c.width=this.componentOptions.resultPictureWidth,c.height=this.videoState.videoPAD.nativeElement.clientHeight*s,c.getContext("2d").drawImage(this.videoState.videoPAD.nativeElement,0,0,c.width,c.height)),c.toBlob(function(t){e.padState.photoPADStartOriginal=t,e.padState.changeStateEventEmitter.emit("PAD Start photo original blob generated")},"image/jpeg")}catch(e){console.error(e),this.padState.changeStateEventEmitter.emit("Exception at prepareCallPADStart(): "+JSON.stringify(e))}},e.prototype.doPADStart=function(){return p(this,void 0,void 0,function(){var e;return d(this,function(t){switch(t.label){case 0:return[4,new Response(this.sessionState.photoPADStart).arrayBuffer()];case 1:return e=t.sent(),this.padSessionWebSocketService.sendMessage({faceImage:b.arrayBufferToBase64(e),typeMessagePad:"START",apiKey:this.padState.apiKey}),[2]}})})},e.prototype.prepareCallPADContinue=function(){var e=this;if(this.padSessionWebSocketService.isConnected())try{var t=this.componentOptions.frameWidth/this.videoState.videoPAD.nativeElement.clientWidth,i=document.createElement("canvas");if(this.trackerService.faceTrackingReady()){i.width=3*this.minHeadSize*this.videoState.ratioWidth,i.height=3*this.minHeadSize*this.videoState.ratioHeight;var n=1.5*this.trackerState.wCoord*this.videoState.ratioWidth,a=(this.trackerState.xCoord-(n-this.trackerState.wCoord))*this.videoState.ratioWidth,o=1.5*this.trackerState.hCoord*this.videoState.ratioHeight,r=(this.trackerState.yCoord-(o-this.trackerState.hCoord))*this.videoState.ratioHeight;i.height*this.trackerState.hCoord/this.videoState.videoHeight<this.minHeadSize?this.sessionState.processInstruction=this.messageService.getMessage("USER_TOO_FAR_LABEL"):(i.getContext("2d").drawImage(this.videoState.videoPAD.nativeElement,+a,r,n,o,0,0,i.width,i.height),this.toBlob(i))}else this.componentOptions.circleEnabled&&!this.componentOptions.faceTrackingEnabled?(i.width=3*this.minHeadSize*this.videoState.ratioWidth,i.height=3*this.minHeadSize*this.videoState.ratioHeight,i.getContext("2d").drawImage(this.videoState.videoPAD.nativeElement,this.videoState.width/2-2*this.componentOptions.circleRadius*this.videoState.ratioWidth/2,this.videoState.height/2-2*this.componentOptions.circleRadius*this.videoState.ratioHeight/2,2*this.componentOptions.circleRadius*this.videoState.ratioWidth,2*this.componentOptions.circleRadius*this.videoState.ratioHeight,0,0,i.width,i.height),this.toBlob(i)):(i.width=this.componentOptions.frameWidth,i.height=this.videoState.videoPAD.nativeElement.clientHeight*t,i.getContext("2d").drawImage(this.videoState.videoPAD.nativeElement,0,0,i.width,i.height),this.toBlob(i))}catch(e){this.padState.changeStateEventEmitter.emit("Exception at prepareCallPADContinue(): "+JSON.stringify(e))}else this.padState.clearState(),this.padState.changeProcessState(l.ERROR_NO_INTERNET_CONNECTION),this.sessionState.internetLostEventEmitter.emit(),setTimeout(function(){return e.initPadSource()},5e3)},e.prototype.toBlob=function(e){var t=this;e.toBlob(function(e){return p(t,void 0,void 0,function(){var t;return d(this,function(i){switch(i.label){case 0:return this.padState.changeStateEventEmitter.emit("PAD Continue photo blob generated"),this.sessionState.photoPADContinue=e,[4,new Response(this.sessionState.photoPADContinue).arrayBuffer()];case 1:return t=i.sent(),this.padSessionWebSocketService.sendMessage({faceImage:b.arrayBufferToBase64(t),typeMessagePad:"CONTINUE",apiKey:this.padState.apiKey}),[2]}})})},"image/jpeg")},e.prototype.initPadSource=function(){return p(this,void 0,void 0,function(){var e,t,i=this;return d(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),e=this.videoState,[4,navigator.mediaDevices.getUserMedia(this.videoState.videoConstraints)];case 1:return e.videoPADStream=n.sent(),this.videoState.videoPAD&&(this.videoState.videoPAD.nativeElement.srcObject=this.videoState.videoPADStream),this.handleSuccess(),this.padState.changeProcessState(l.INITIAL),window.addEventListener("beforeunload",function(){return i.leaving()}),[3,3];case 2:return t=n.sent(),console.log("Error : "+t),[3,3];case 3:return[2]}})})},e.prototype.leaving=function(){this.videoState.videoPADStream.stop()},e.prototype.handleSuccess=function(){var e=this.videoState.videoPADStream.getVideoTracks();this.videoState.cameraEventEmitter.emit("Got stream with constraints: "+JSON.stringify(this.videoState.videoConstraints)),this.videoState.cameraEventEmitter.emit("Using video device: "+JSON.stringify(e[0].label))},e.prototype.updateNetworkStatus=function(){var e=this;setInterval(function(){e.padState.sessionState.latency<e.padState.sessionState.highLimit?(document.getElementById("excellentConnection").setAttribute("fill",e.padState.sessionState.colorExcellentConnection),document.getElementById("goodConnection").setAttribute("fill",e.padState.sessionState.colorExcellentConnection),document.getElementById("mediumConnection").setAttribute("fill",e.padState.sessionState.colorExcellentConnection),document.getElementById("lowConnection").setAttribute("fill",e.padState.sessionState.colorExcellentConnection)):e.padState.sessionState.latency>e.padState.sessionState.highLimit&&e.padState.sessionState.latency<e.padState.sessionState.mediumLimit?(document.getElementById("excellentConnection").setAttribute("fill",e.padState.sessionState.defaultColor),document.getElementById("goodConnection").setAttribute("fill",e.padState.sessionState.colorGoodConnection),document.getElementById("mediumConnection").setAttribute("fill",e.padState.sessionState.colorGoodConnection),document.getElementById("lowConnection").setAttribute("fill",e.padState.sessionState.colorGoodConnection)):e.padState.sessionState.latency>e.padState.sessionState.mediumLimit&&e.padState.sessionState.latency<e.padState.sessionState.badLimit?(document.getElementById("excellentConnection").setAttribute("fill",e.padState.sessionState.defaultColor),document.getElementById("goodConnection").setAttribute("fill",e.padState.sessionState.defaultColor),document.getElementById("mediumConnection").setAttribute("fill",e.padState.sessionState.colorMediumConnection),document.getElementById("lowConnection").setAttribute("fill",e.padState.sessionState.colorMediumConnection)):(document.getElementById("excellentConnection").setAttribute("fill",e.padState.sessionState.defaultColor),document.getElementById("goodConnection").setAttribute("fill",e.padState.sessionState.defaultColor),document.getElementById("mediumConnection").setAttribute("fill",e.padState.sessionState.defaultColor),document.getElementById("lowConnection").setAttribute("fill",e.padState.sessionState.colorBadConnection))},2e3)},e.prototype.isRequestPermissionState=function(){return this.padState.processState===l.REQUEST_PERMISSIONS},e.prototype.isInitialState=function(){return this.padState.processState===l.INITIAL},e.prototype.isStartedState=function(){return this.padState.processState===l.STARTED},e.prototype.isProcessingState=function(){return this.padState.processState===l.PROCESS},e.prototype.isErrorSessionState=function(){return this.padState.processState===l.ERROR_SESSION},e.prototype.isErrorNoFaceState=function(){return this.padState.processState===l.ERROR_NO_FACE},e.prototype.isErrorNoInternetConnection=function(){return this.padState.processState===l.ERROR_NO_INTERNET_CONNECTION},e.prototype.isErrorUserTooFar=function(){return this.padState.processState===l.ERROR_USER_TOO_FAR},e.prototype.isErrorUserNotCenter=function(){return this.padState.processState===l.ERROR_USER_NOT_CENTER},e.prototype.isErrorMultipleFaceState=function(){return this.padState.processState===l.ERROR_MULTIPLE_FACE},e.prototype.isSuccessState=function(){return this.padState.processState===l.SUCCESS},e.prototype.isInvalidKeyState=function(){return this.padState.processState===l.ERROR_KEY},e.prototype.isMatchingReadyState=function(){return this.padState.processState===l.MATCH_READY},e.prototype.isMatchingSuccessState=function(){return this.padState.processState===l.MATCH_SUCCESS},e.prototype.isMatchingErrorState=function(){return this.padState.processState===l.MATCH_ERROR},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:v},{type:O},{type:y},{type:R},{type:I},{type:T}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v),t.ɵɵinject(O),t.ɵɵinject(y),t.ɵɵinject(R),t.ɵɵinject(I),t.ɵɵinject(T))},token:e,providedIn:"root"}),e}(),N=function(){function e(e){this.padState=e}return Object.defineProperty(e.prototype,"videoState",{get:function(){return this.padState.videoState},enumerable:!0,configurable:!0}),e.prototype.initDatasFromVideoPAD=function(){var e=this;this.videoState.videoPAD.nativeElement.addEventListener("loadedmetadata",function(t){e.videoState.width=e.videoState.videoPAD.nativeElement.videoWidth,e.videoState.height=e.videoState.videoPAD.nativeElement.videoHeight,e.videoState.ratioWidth=e.videoState.width/e.videoState.videoWidth,e.videoState.ratioHeight=e.videoState.height/e.videoState.videoHeight},!1)},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:v}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v))},token:e,providedIn:"root"}),e}(),w=function(){function e(e){this.padState=e}return Object.defineProperty(e.prototype,"videoState",{get:function(){return this.padState.videoState},enumerable:!0,configurable:!0}),e.prototype.init=function(){if(this.videoState.canvasResult.nativeElement.clientHeight>this.videoState.canvasResult.nativeElement.clientWidth&&this.videoState.videoWidth>this.videoState.videoHeight){var e=this.videoState.videoWidth;this.videoState.videoWidth=this.videoState.videoHeight,this.videoState.videoHeight=e}},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:v}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v))},token:e,providedIn:"root"}),e}(),B=function(){function e(e,i,n,a,o,r,s,c,p){this.padSessionWebSocketService=e,this.padState=i,this.parametersService=n,this.faceService=a,this.messageService=o,this.padSessionService=r,this.trackerService=s,this.videoService=c,this.deviceService=p,this.downloadFinalPictureOnSuccess=!1,this.enableAutoMatching=!1,this.autoStart=!1,this.faceTrackingEnabled=!1,this.faceTrackingOptionDesign=!1,this.mirror=!1,this.circleEnabled=!1,this.circleRadius=200,this.formatFinalPicture=!1,this.resultPictureWidth=600,this.allowsMultipleRetries=!1,this.videoWidth=800,this.videoHeight=600,this.frameWidth=120,this.messagesEnabled=!0,this.padFrequency=100,this.faceDetectedHandler=new t.EventEmitter,this.detectionFailureHandler=new t.EventEmitter,this.internetLostHandler=new t.EventEmitter,this.cameraHandler=new t.EventEmitter,this.sessionExpiredHandler=new t.EventEmitter,this.changeStateHandler=new t.EventEmitter,this.matchingHandler=new t.EventEmitter}return Object.defineProperty(e.prototype,"minHeadSize",{get:function(){return this.padState.parameters.minHeadSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"processState",{get:function(){return this.padState.processState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sessionState",{get:function(){return this.padState.sessionState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"messageState",{get:function(){return this.padState.messageState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"faceState",{get:function(){return this.padState.faceState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"videoState",{get:function(){return this.padState.videoState},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.messageService.initLanguage(),this.messageService.initMessage(this.startTipsLabel,this.processFaceCenterLabel,this.processNoFaceLabel,this.processMultipleFaceLabel,this.turnFaceLabel,this.expiredSessionErrorLabel,this.noFaceErrorLabel,this.multipleFaceErrorLabel,this.successLabel,this.startButtonLabel,this.restartButtonLabel,this.compareButtonLabel,this.enableCamButtonLabel,this.retryButtonLabel,this.matchingSuccessLabel,this.matchingReadyLabel,this.matchingErrorLabel,this.noInternetConnectionLabel,this.userTooFarLabel,this.userNotCenterLabel),this.padSessionService.updateNetworkStatus(),this.sessionState.endSessionEventEmitter.subscribe(function(t){e.ngOnDestroy()}),this.padState.changeStateEventEmitter.subscribe(function(t){e.changeStateHandler.emit(t)}),this.faceState.faceDetectedEventEmitter.subscribe(function(t){e.faceDetectedHandler.emit(t)}),this.faceState.detectionFailureEventEmitter.subscribe(function(t){e.detectionFailureHandler.emit(t)}),this.faceState.faceMatchingEventEmitter.subscribe(function(t){e.matchingHandler.emit(t)}),this.sessionState.sessionExpiredEventEmitter.subscribe(function(t){e.sessionExpiredHandler.emit(t)}),this.sessionState.internetLostEventEmitter.subscribe(function(t){e.internetLostHandler.emit(t)}),this.videoState.cameraEventEmitter.subscribe(function(t){e.cameraHandler.emit(t)}),this.padState.initApiBase(this.apiKey,this.wsEndpoint,this.pingBaseUrl?this.pingBaseUrl:this.wsEndpoint),this.padSessionWebSocketService.startPingServer().then()},e.prototype.ngOnDestroy=function(){clearTimeout(this.sessionState.padStartTimeOut),this.padSessionWebSocketService.disconnect(),this.trackerService.stopTracking()},e.prototype.ngAfterViewInit=function(){this.videoState.videoPAD=this.videoPAD,this.videoState.canvasResult=this.canvasResult,this.padState.initApiFace(this.wsFormatPicture,this.wsFaceVerification),this.padState.initComponentOptions(this.enableAutoMatching,this.downloadFinalPictureOnSuccess,this.formatFinalPicture,this.padFrequency,this.circleEnabled,this.faceTrackingEnabled,this.circleRadius,this.frameWidth,this.colorProgressCircle,this.resultPictureWidth,this.faceTrackingOptionDesign),this.padState.initApiParameters(this.wsImageSize),this.padState.initVideoState(this.videoHeight,this.videoWidth),this.parametersService.getParameters().subscribe(),this.autoStart&&(this.initPadSource(),this.videoService.initDatasFromVideoPAD())},e.prototype.initPadSource=function(){this.padSessionService.initPadSource().then()},e.prototype.initDatasFromVideoPAD=function(){this.videoService.initDatasFromVideoPAD()},e.prototype.startPAD=function(){this.deviceService.init(),this.padSessionService.prepareCallPADStart()},e.prototype.emitChangeStateEvent=function(e){this.changeStateHandler.emit(e)},e.prototype.resetUI=function(){this.padState.changeProcessState(l.INITIAL)},e.prototype.compareWithReference=function(e){if(e||(e=this.padState.generatedPicture),e)document.getElementById("id3-fileForMatching").click();else{var t="PAD Result picture is missing. You have to execute the entire PAD process before calling the Matching Javascript function.\n";t+="IMPORTANT NOTE : If you are using the pureJS component, you have to provide the picture in argument (mandatory).",console.error(t),this.matchingHandler&&this.matchingHandler.error(t)}},e.prototype.handleReferenceFile=function(e){this.faceService.compareWithReference(e)},e.decorators=[{type:t.Component,args:[{selector:"id3-face-pad",template:'<id3-face-pad-messages *ngIf="messagesEnabled" class="show-small-screen" [startTipsLabel]="messageService.getMessage(\'START_TIPS_LABEL\')"\n [turnFaceLabel]="messageService.getMessage(\'TURN_FACE_LABEL\')" [expiredSessionErrorLabel]="messageService.getMessage(\'EXPIRED_SESSION_ERROR_LABEL\')"\n [noFaceErrorLabel]="messageService.getMessage(\'NO_FACE_ERROR_LABEL\')" [noInternetConnectionLabel]="messageService.getMessage(\'NO_INTERNET_CONNECTION_LABEL\')"\n [multipleFaceErrorLabel]="messageService.getMessage(\'MULTIPLE_FACE_ERROR_LABEL\')" [successLabel]="messageService.getMessage(\'SUCCESS_LABEL\')"\n [processInstruction]="sessionState.processInstruction" [padSessionService]="padSessionService" [matchingSuccessLabel]="messageService.getMessage(\'MATCHING_SUCCESS_LABEL\')"\n [matchingErrorLabel]="messageService.getMessage(\'MATCHING_ERROR_LABEL\')" [matchingReadyLabel]="messageService.getMessage(\'MATCHING_READY_LABEL\')"\n [userTooFarLabel]="messageService.getMessage(\'USER_TOO_FAR_LABEL\')" [userNotCenterLabel]="messageService.getMessage(\'USER_NOT_CENTER_LABEL\')">\n</id3-face-pad-messages>\n\n<input #fileForMatch id="id3-fileForMatching" type="file" (click)="fileForMatch.value=null;" name="fileForMatch" class="d-none" (change)="handleReferenceFile($event)"/>\n<div class="padContainer" [style.max-height]="videoHeight + \'px\'" [style.max-width]="videoWidth + \'px\'">\n <canvas class="canvas {{mirror && !circleEnabled ? \'mirror\': \'\'}}" #resultCanvas></canvas>\n <video class="liveStream {{mirror ? \'mirror\': \'\'}}" #videoPAD autoplay playsinline [style.maxHeight]="videoState.videoHeight + \'px\'"></video>\n <div class="id3-pad-overlay">\n <div class="extras">\n <img class="text-left" id="id3Logo" src="/assets/images/id3_logo_white_40.png" height="40" width="40" *ngIf="apiKey === \'test-token-id3-webcapture\'">\n <id3-network-status ></id3-network-status>\n </div>\n <div id="mainContent" class="pad-content d-block">\n\n <id3-face-pad-messages *ngIf="messagesEnabled" class="show-big-screen" [startTipsLabel]="messageService.getMessage(\'START_TIPS_LABEL\')"\n [turnFaceLabel]="messageService.getMessage(\'TURN_FACE_LABEL\')" [expiredSessionErrorLabel]="messageService.getMessage(\'EXPIRED_SESSION_ERROR_LABEL\')"\n [noFaceErrorLabel]="messageService.getMessage(\'NO_FACE_ERROR_LABEL\')" [noInternetConnectionLabel]="messageService.getMessage(\'NO_INTERNET_CONNECTION_LABEL\')"\n [multipleFaceErrorLabel]="messageService.getMessage(\'MULTIPLE_FACE_ERROR_LABEL\')" [successLabel]="messageService.getMessage(\'SUCCESS_LABEL\')"\n [processInstruction]="sessionState.processInstruction" [padSessionService]="padSessionService" [matchingSuccessLabel]="messageService.getMessage(\'MATCHING_SUCCESS_LABEL\')"\n [matchingErrorLabel]="messageService.getMessage(\'MATCHING_ERROR_LABEL\')" [matchingReadyLabel]="messageService.getMessage(\'MATCHING_READY_LABEL\')"\n [userTooFarLabel]="messageService.getMessage(\'USER_TOO_FAR_LABEL\')" [userNotCenterLabel]="messageService.getMessage(\'USER_NOT_CENTER_LABEL\')">\n </id3-face-pad-messages>\n\n <br>\n <div class="d-flex">\n <h4 id="padAlert" class="text-white"></h4>\n </div>\n </div>\n <div id="mainButtons" class="pad-buttons d-block">\n <button type="button" *ngIf="padSessionService.isRequestPermissionState()" (click)="initPadSource(); initDatasFromVideoPAD()" class="btn btn-primary btn-id3 mt-5">\n <em class="pi pi-caret-right"></em>{{messageService.getMessage(\'ENABLE_CAM_BUTTON_LABEL\')}}\n </button>\n <button type="button" *ngIf="padSessionService.isInitialState()" (click)="startPAD()" class="btn btn-primary btn-id3 mt-5">\n <em class="pi pi-caret-right"></em> {{messageService.getMessage(\'START_BUTTON_LABEL\')}}\n </button>\n <button type="button" *ngIf="padSessionService.isErrorSessionState() ||\n padSessionService.isErrorNoFaceState() || padSessionService.isErrorNoInternetConnection() ||\n padSessionService.isErrorUserTooFar() || padSessionService.isErrorUserNotCenter() ||\n padSessionService.isErrorMultipleFaceState() || (allowsMultipleRetries && padSessionService.isSuccessState())"\n (click)="resetUI()" class="btn btn-primary btn-id3 mt-3">\n <em class="pi pi-caret-right"></em> {{messageService.getMessage(\'RETRY_BUTTON_LABEL\')}}\n </button>\n\n <button type="button" *ngIf="padSessionService.isMatchingReadyState()" class="btn btn-primary btn-id3 mt-3" (click)="compareWithReference()">\n <em class="pi pi-caret-right"></em> {{messageService.getMessage(\'COMPARE_BUTTON_LABEL\')}}\n </button>\n <button type="button" *ngIf="padSessionService.isMatchingSuccessState()|| padSessionService.isMatchingErrorState()" class="btn btn-primary btn-id3 mt-3" (click)="resetUI()">\n <em class="pi pi-caret-right"></em> {{messageService.getMessage(\'RESTART_BUTTON_LABEL\')}}\n </button>\n\n </div>\n </div>\n </div>',styles:['.padContainer{position:relative;margin:auto}.padContainer .h1,.padContainer .h2,.padContainer .h3,.padContainer .h4,.padContainer .h5,.padContainer .h6,.padContainer h1,.padContainer h2,.padContainer h3,.padContainer h4,.padContainer h5,.padContainer h6{font-family:"PT Sans",sans-serif;font-weight:700;font-size:50px}.padContainer .liveStream{z-index:1;top:0;left:0;width:100%;height:auto}.padContainer .btn-id3{border-radius:10px}.padContainer .font-weight-normal{width:250px;text-align:left}.padContainer .id3-pad-overlay{z-index:3;position:absolute;top:0;bottom:0;left:0;right:0;display:flex;align-items:center;color:#fff;font-size:20px;flex-direction:column;border:1px solid #ddd}.padContainer .extras{position:absolute;display:flex;top:15;right:15;left:15;width:100%;align-items:left}.padContainer .pad-content{display:block;text-align:center}.padContainer .pad-buttons{position:absolute;display:block;text-align:center;bottom:5%}.padContainer .padBehaviorLabel{font-size:20px}.padContainer .breathe{margin:6px 10px}.padContainer .id3-overlay{position:absolute}.padContainer .canvas{z-index:2;top:0;left:0;width:100%;height:100%;position:absolute}.padContainer .mirror{transform:rotateY(180deg);-webkit-transform:rotateY(180deg);-moz-transform:rotateY(180deg)}.padContainer .clientConnectionLogo{top:0;right:0;position:absolute}@media only screen and (max-width:500px){.show-big-screen{display:none}}@media only screen and (min-width:500px){.show-small-screen{display:none}}@media only screen and (min-width:601px){h4{font-size:25px}}@media only screen and (max-width:600px){h1{font-size:27px!important;margin-left:15%}h4{font-size:25px}}']}]}],e.ctorParameters=function(){return[{type:R},{type:v},{type:C},{type:y},{type:O},{type:P},{type:I},{type:N},{type:w}]},e.propDecorators={canvasResult:[{type:t.ViewChild,args:["resultCanvas",{static:!1}]}],videoPAD:[{type:t.ViewChild,args:["videoPAD",{static:!1}]}],fileForMatching:[{type:t.ViewChild,args:["fileForMatching",{static:!1}]}],wsEndpoint:[{type:t.Input}],pingBaseUrl:[{type:t.Input}],wsImageSize:[{type:t.Input}],apiKey:[{type:t.Input}],wsFormatPicture:[{type:t.Input}],wsFaceVerification:[{type:t.Input}],downloadFinalPictureOnSuccess:[{type:t.Input}],enableAutoMatching:[{type:t.Input}],autoStart:[{type:t.Input}],faceTrackingEnabled:[{type:t.Input}],faceTrackingOptionDesign:[{type:t.Input}],mirror:[{type:t.Input}],circleEnabled:[{type:t.Input}],colorProgressCircle:[{type:t.Input}],circleRadius:[{type:t.Input}],formatFinalPicture:[{type:t.Input}],resultPictureWidth:[{type:t.Input}],allowsMultipleRetries:[{type:t.Input}],videoWidth:[{type:t.Input}],videoHeight:[{type:t.Input}],frameWidth:[{type:t.Input}],messagesEnabled:[{type:t.Input}],padFrequency:[{type:t.Input}],startTipsLabel:[{type:t.Input}],processFaceCenterLabel:[{type:t.Input}],processNoFaceLabel:[{type:t.Input}],processMultipleFaceLabel:[{type:t.Input}],turnFaceLabel:[{type:t.Input}],expiredSessionErrorLabel:[{type:t.Input}],noFaceErrorLabel:[{type:t.Input}],multipleFaceErrorLabel:[{type:t.Input}],successLabel:[{type:t.Input}],startButtonLabel:[{type:t.Input}],restartButtonLabel:[{type:t.Input}],compareButtonLabel:[{type:t.Input}],enableCamButtonLabel:[{type:t.Input}],retryButtonLabel:[{type:t.Input}],matchingSuccessLabel:[{type:t.Input}],matchingReadyLabel:[{type:t.Input}],matchingErrorLabel:[{type:t.Input}],noInternetConnectionLabel:[{type:t.Input}],userTooFarLabel:[{type:t.Input}],userNotCenterLabel:[{type:t.Input}],faceDetectedHandler:[{type:t.Output}],detectionFailureHandler:[{type:t.Output}],internetLostHandler:[{type:t.Output}],cameraHandler:[{type:t.Output}],sessionExpiredHandler:[{type:t.Output}],changeStateHandler:[{type:t.Output}],matchingHandler:[{type:t.Output}],compareWithReference:[{type:t.Input}]},e}(),M=function(){function e(){this.processInstruction=""}return e.prototype.ngOnInit=function(){},e.decorators=[{type:t.Component,args:[{selector:"id3-face-pad-messages",template:'<div class="mt-2">\n <div *ngIf="padSessionService.isInitialState()" class="alert alert-primary" role="alert">\n {{startTipsLabel}}\n </div>\n <div *ngIf="padSessionService.isStartedState() && processInstruction !== undefined || (padSessionService.isProcessingState() && processInstruction.length>0)" class="alert alert-danger" role="alert">\n {{processInstruction}}\n </div>\n <div *ngIf="padSessionService.isProcessingState() && processInstruction.length==0" class="alert alert-primary" role="alert">\n {{turnFaceLabel}}\n </div>\n <div *ngIf="padSessionService.isErrorSessionState()" class="alert alert-danger" role="alert">\n {{expiredSessionErrorLabel}}\n </div>\n <div *ngIf="padSessionService.isErrorNoFaceState()" class="alert alert-danger" role="alert">\n {{noFaceErrorLabel}}\n </div>\n <div *ngIf="padSessionService.isErrorNoInternetConnection()" class="alert alert-danger" role="alert">\n {{noInternetConnectionLabel}}\n </div>\n <div *ngIf="padSessionService.isErrorUserTooFar()" class="alert alert-primary" role="alert">\n {{userTooFarLabel}}\n </div>\n <div *ngIf="padSessionService.isErrorUserNotCenter()" class="alert alert-danger" role="alert">\n {{userNotCenterLabel}}\n </div>\n <div *ngIf="padSessionService.isErrorMultipleFaceState()" class="alert alert-danger" role="alert">\n {{multipleFaceErrorLabel}}\n </div>\n <div *ngIf="padSessionService.isSuccessState()" class="alert alert-success" role="alert">\n {{successLabel}}\n </div>\n <div *ngIf="padSessionService.isMatchingReadyState()" class="alert alert-primary" role="alert">\n {{matchingReadyLabel}}\n </div>\n <div *ngIf="padSessionService.isMatchingSuccessState()" class="alert alert-success" role="alert">\n {{matchingSuccessLabel}}\n </div>\n <div *ngIf="padSessionService.isMatchingErrorState()" class="alert alert-danger" role="alert">\n {{matchingErrorLabel}}\n </div>\n <div *ngIf="padSessionService.isInvalidKeyState()" class="alert alert-danger" role="alert">\n The API Key is invalid. Please check your API key.\n </div>\n</div>'}]}],e.ctorParameters=function(){return[]},e.propDecorators={padSessionService:[{type:t.Input}],startTipsLabel:[{type:t.Input}],turnFaceLabel:[{type:t.Input}],expiredSessionErrorLabel:[{type:t.Input}],noFaceErrorLabel:[{type:t.Input}],noInternetConnectionLabel:[{type:t.Input}],userTooFarLabel:[{type:t.Input}],multipleFaceErrorLabel:[{type:t.Input}],successLabel:[{type:t.Input}],matchingSuccessLabel:[{type:t.Input}],matchingReadyLabel:[{type:t.Input}],matchingErrorLabel:[{type:t.Input}],userNotCenterLabel:[{type:t.Input}],processInstruction:[{type:t.Input}]},e}(),F=function(){function e(){}return e.prototype.ngOnInit=function(){},e.decorators=[{type:t.Component,args:[{selector:"id3-network-status",template:'<svg class="clientConnectionLogo" version="1.0" xmlns="http://www.w3.org/2000/svg"\n width="60" height="60" viewBox="0 0 1280.000000 720.000000"\n preserveAspectRatio="xMidYMid meet">\n <g transform="translate(0.000000,720.000000) scale(0.100000,-0.100000)"\n stroke="none">\n <path id="excellentConnection" fill="#C0C0C0" d="M6169 6226 c-2 -2 -51 -7 -109 -10 -439 -29 -987 -166 -1450 -363 -519 -221 -1027 -554 -1389 -911 -82 -81 -102 -107 -120 -157 -60 -160 18 -347 181 -436 59 -32 69 -34 158 -34 86 0 100 3 147 29 29 16 92 65 140 110 395 364 836 637 1336 825 152 57 374 124 497 151 372 81 500 94 900 95 309 0 362 -2 510 -23 303 -43 520 -95 805 -193 512 -175 1010 -472 1409 -841 137 -126 188 -152 301 -153 71 0 88 4 147 33 71 35 141 103 174 169 15 31 19 60 19 153 0 144 -7 159 -128 278 -328 322 -794 638 -1252 849 -504 232 -1051 376 -1610 423 -113 9 -657 14 -666 6z"/>\n <path id="goodConnection" fill="#C0C0C0" d="M6195 4939 c-787 -66 -1561 -412 -2102 -941 -111 -108 -128 -145 -128 -273 0 -89 3 -105 27 -150 36 -67 107 -139 171 -172 40 -20 71 -27 132 -31 121 -6 169 16 297 134 123 114 297 247 428 329 224 139 526 268 760 325 47 11 101 25 120 30 19 5 100 19 180 32 207 32 550 32 762 0 561 -86 1063 -325 1473 -702 131 -120 182 -145 295 -145 72 0 93 4 141 28 63 30 146 112 178 174 46 91 43 224 -6 315 -50 92 -339 338 -576 492 -467 302 -966 482 -1522 546 -126 15 -499 20 -630 9z"/>\n <path id="mediumConnection" fill="#C0C0C0" d="M6230 3653 c-103 -11 -321 -60 -439 -99 -316 -106 -596 -274 -819 -493 -118 -116 -137 -154 -136 -271 1 -69 6 -96 26 -140 53 -115 155 -197 273 -220 51 -10 71 -9 124 5 78 20 127 50 211 130 271 257 616 395 989 395 387 0 722 -136 1017 -412 100 -93 146 -113 264 -113 105 0 160 24 239 103 77 78 106 145 106 252 0 118 -27 171 -145 283 -330 315 -769 520 -1230 577 -78 9 -399 12 -480 3z"/>\n <path id="lowConnection" fill="#C0C0C0" d="M6270 2447 c-135 -37 -242 -101 -342 -204 -226 -234 -276 -555 -132 -852 40 -82 60 -108 138 -186 103 -102 185 -154 301 -191 97 -31 258 -43 358 -25 241 42 470 233 565 471 107 270 39 583 -172 790 -78 77 -183 143 -285 181 -77 29 -99 32 -216 36 -112 3 -142 0 -215 -20z"/>\n </g>\n</svg>',styles:[".clientConnectionLogo{top:0;right:0;position:absolute}"]}]}],e.ctorParameters=function(){return[]},e}(),D=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[B,M,F],imports:[i.HttpClientModule,s.CommonModule,c.BrowserModule],exports:[B],entryComponents:[B]}]}],e}();e.FacePadComponent=B,e.FacePadModule=D,e.PadSessionWebSocketService=R,e.PadState=v,e.ParametersService=C,e.ɵa=y,e.ɵb=O,e.ɵc=P,e.ɵd=I,e.ɵe=T,e.ɵf=N,e.ɵg=w,e.ɵh=M,e.ɵi=F,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common/http"),require("rxjs"),require("rxjs/operators"),require("downloadjs"),require("@id3/facedetector"),require("@angular/common"),require("@angular/platform-browser")):"function"==typeof define&&define.amd?define("@id3/face-pad",["exports","@angular/core","@angular/common/http","rxjs","rxjs/operators","downloadjs","@id3/facedetector","@angular/common","@angular/platform-browser"],t):t(((e=e||self).id3=e.id3||{},e.id3["face-pad"]={}),e.ng.core,e.ng.common.http,e.rxjs,e.rxjs.operators,e.Downloadjs,e.FaceDetector,e.ng.common,e.ng.platformBrowser)}(this,function(e,t,i,n,a,o,r,s,c){"use strict";function p(e,t,i,n){return new(i||(i=Promise))(function(a,o){function r(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){e.done?a(e.value):new i(function(t){t(e.value)}).then(r,s)}c((n=n.apply(e,t||[])).next())})}function d(e,t){var i,n,a,o,r={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return r.label++,{value:o[1],done:!1};case 5:r.label++,n=o[1],o=[0];continue;case 7:o=r.ops.pop(),r.trys.pop();continue;default:if(!(a=(a=r.trys).length>0&&a[a.length-1])&&(6===o[0]||2===o[0])){r=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){r.label=o[1];break}if(6===o[0]&&r.label<a[1]){r.label=a[1],a=o;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(o);break}a[2]&&r.ops.pop(),r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e],n=0}finally{i=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}o=o&&o.hasOwnProperty("default")?o.default:o;var l={REQUEST_PERMISSIONS:0,INITIAL:1,STARTED:2,PROCESS:3,SUCCESS:4,ERROR_KEY:5,ERROR_SESSION:6,ERROR_NO_FACE:7,ERROR_MULTIPLE_FACE:8,ERROR_NO_INTERNET_CONNECTION:9,ERROR_USER_TOO_FAR:10,ERROR_USER_NOT_CENTER:11,MATCH_READY:12,MATCH_SUCCESS:13,MATCH_ERROR:14};l[l.REQUEST_PERMISSIONS]="REQUEST_PERMISSIONS",l[l.INITIAL]="INITIAL",l[l.STARTED]="STARTED",l[l.PROCESS]="PROCESS",l[l.SUCCESS]="SUCCESS",l[l.ERROR_KEY]="ERROR_KEY",l[l.ERROR_SESSION]="ERROR_SESSION",l[l.ERROR_NO_FACE]="ERROR_NO_FACE",l[l.ERROR_MULTIPLE_FACE]="ERROR_MULTIPLE_FACE",l[l.ERROR_NO_INTERNET_CONNECTION]="ERROR_NO_INTERNET_CONNECTION",l[l.ERROR_USER_TOO_FAR]="ERROR_USER_TOO_FAR",l[l.ERROR_USER_NOT_CENTER]="ERROR_USER_NOT_CENTER",l[l.MATCH_READY]="MATCH_READY",l[l.MATCH_SUCCESS]="MATCH_SUCCESS",l[l.MATCH_ERROR]="MATCH_ERROR";var h=function(){this.autoMatchingEnabled=!1,this.downloadFinalPictureOnSuccessEnabled=!1,this.formatFinalPicture=!1,this.padFrequency=100,this.circleEnabled=!1,this.faceTrackingEnabled=!1,this.circleRadius=200,this.frameWidth=120,this.resultPictureWidth=600,this.faceTrackingOptionDesign=!1},S=function(){this.endSessionEventEmitter=new t.EventEmitter,this.sessionExpiredEventEmitter=new t.EventEmitter,this.internetLostEventEmitter=new t.EventEmitter,this.colorExcellentConnection="#08FF00",this.colorGoodConnection="#08FF00",this.colorMediumConnection="#FFA600",this.colorBadConnection="#FF0000",this.defaultColor="#C0C0C0",this.highLimit=40,this.mediumLimit=100,this.badLimit=150},u=function(){this.faceDetectedEventEmitter=new t.EventEmitter,this.detectionFailureEventEmitter=new t.EventEmitter,this.faceMatchingEventEmitter=new t.EventEmitter},g=function(){this.messages=new Map,this.mapLanguage=new Map},E=function(){this.videoWidth=800,this.videoHeight=600,this.videoConstraints={audio:!1,video:{height:{min:480}}},this.cameraEventEmitter=new t.EventEmitter},m=function(){},f=function(){},v=function(){function e(){this.faceApiBaseUrl="https://web-components.id3.eu",this.pingBaseUrl="https://web-components.id3.eu",this.faceParameters="/api/parameters",this.faceRotateAndCrop="/api/face/rotate-and-crop",this.faceMatching="/api/face/match/pictures",this.apiKey="",this.processState=l.REQUEST_PERMISSIONS,this.componentOptions=new h,this.sessionState=new S,this.faceState=new u,this.messageState=new g,this.videoState=new E,this.padCircleState=new m,this.trackerState=new f,this.changeStateEventEmitter=new t.EventEmitter}return e.prototype.getUrlParameters=function(){return this.faceApiBaseUrl+this.faceParameters},e.prototype.getUrlRotateAndCrop=function(){return this.faceApiBaseUrl+this.faceRotateAndCrop},e.prototype.getUrlMatching=function(){return this.faceApiBaseUrl+this.faceMatching},e.prototype.initApiParameters=function(e){this.faceParameters=e||this.faceParameters},e.prototype.initApiFace=function(e,t){this.faceRotateAndCrop=e||this.faceRotateAndCrop,this.faceMatching=t||this.faceMatching},e.prototype.initApiBase=function(e,t,i){this.apiKey=e||this.apiKey,this.faceApiBaseUrl=t||this.faceApiBaseUrl,this.pingBaseUrl=i||this.pingBaseUrl},e.prototype.initComponentOptions=function(e,t,i,n,a,o,r,s,c,p,d){this.componentOptions.autoMatchingEnabled=e,this.componentOptions.downloadFinalPictureOnSuccessEnabled=t,this.componentOptions.formatFinalPicture=i,this.componentOptions.padFrequency=n||this.componentOptions.padFrequency,this.componentOptions.circleEnabled=a,this.componentOptions.faceTrackingEnabled=o,this.componentOptions.circleRadius=r||this.componentOptions.circleRadius,this.componentOptions.frameWidth=s||this.componentOptions.frameWidth,this.componentOptions.colorProgressCircle=c||this.componentOptions.colorProgressCircle,this.componentOptions.resultPictureWidth=p||this.componentOptions.resultPictureWidth,this.componentOptions.faceTrackingOptionDesign=d},e.prototype.initVideoState=function(e,t){this.videoState.videoHeight=e,this.videoState.videoWidth=t},e.prototype.changeProcessState=function(e){this.processState=e,this.changeStateEventEmitter.emit(l[e])},e.prototype.clearState=function(){clearInterval(this.sessionState.padContinueInterval),this.sessionState.padContinueInterval=void 0,this.sessionState.processInstruction=void 0,this.trackerState.xCoord=void 0,this.trackerState.yCoord=void 0,this.trackerState.wCoord=void 0,this.trackerState.hCoord=void 0,this.sessionState.endSessionEventEmitter.emit(!0)},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e}(),R=function(){function e(e){this.padState=e}return e.prototype.connect=function(e){var t=this,i=this.padState.faceApiBaseUrl.replace("http","ws");return new Promise(function(n,a){t.ws=new WebSocket(i+"/pad/session"),t.ws.onopen=function(){console.log("Info: Connection PAD Established."),n(!0)},t.ws.onmessage=e,t.ws.onclose=function(e){console.log("Info: Closing PAD Connection."),a(!1)}})},e.prototype.disconnect=function(){null!=this.ws&&(this.ws.close(),this.ws=null)},e.prototype.isConnected=function(){return null!=this.ws&&this.ws.readyState===this.ws.OPEN},e.prototype.sendMessage=function(e){null!=this.ws?this.ws.bufferedAmount>2e5?console.log("Image not sent : Web socket buffer is too big. We have to wait the previous message to be send before sending a new message."):this.ws.send(JSON.stringify(e)):console.warn("connection to web socket not established, please connect.")},e.prototype.waitForSocketConnection=function(e,t){var i=this;setTimeout(function(){1===e.readyState?(console.log("Connection is made"),null!=t&&t()):(console.log("wait for connection..."),i.waitForSocketConnection(e,t))},5)},e.prototype.startPingServer=function(){var e=this,t=this.padState.pingBaseUrl.replace("http","ws");return new Promise(function(i,n){e.pingWebSocket=new WebSocket(t+"/ping"),e.pingWebSocket.onopen=function(){console.log("Info: Connection Ping Established."),e.pingServer(),i(!0)},e.pingWebSocket.onclose=function(e){console.log("Info: Closing Ping Connection."),n(!1)}})},e.prototype.pingServer=function(){var e=this;1===this.pingWebSocket.readyState?(this.pingWebSocket.send(JSON.stringify(Date.now())),this.pingWebSocket.addEventListener("message",function(t){e.padState.sessionState.latency=Date.now()-t.data,setTimeout(function(){e.pingWebSocket.send(JSON.stringify(Date.now()))},2e3)})):this.startPingServer()},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:v}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v))},token:e,providedIn:"root"}),e}(),C=function(){function e(e,t){this.httpClient=e,this.padState=t}return e.prototype.loadParameters=function(){var e=this,t=new i.HttpHeaders;return t=(t=t.append("Accept","application/json")).append("ApiKeyAuth",this.padState.apiKey),this.httpClient.get(this.padState.getUrlParameters(),{headers:t}).pipe(a.map(function(t){return e.padState.parameters=t,t},function(e){console.error(e)}))},e.prototype.getParameters=function(){return this.padState.parameters?n.of(this.padState.parameters):this.loadParameters()},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:i.HttpClient},{type:v}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(i.HttpClient),t.ɵɵinject(v))},token:e,providedIn:"root"}),e}(),b=function(){function e(){}return e.b64toBlob=function(e){for(var t=atob(e.split(",")[1]),i=new ArrayBuffer(t.length),n=new Uint8Array(i),a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return new Blob([i],{type:"image/png"})},e.downloadPicture=function(e){return p(this,void 0,void 0,function(){var t,i;return d(this,function(n){switch(n.label){case 0:return[4,new Response(e).arrayBuffer()];case 1:return t=n.sent(),i="data:image/jpeg;base64,"+this.arrayBufferToBase64(t),o(i,"face-result.jpeg","image/jpeg"),[2]}})})},e.arrayBufferToBase64=function(e){for(var t="",i=new Uint8Array(e),n=i.byteLength,a=0;a<n;a++)t+=String.fromCharCode(i[a]);return window.btoa(t)},e}(),y=function(){function e(e,t){this.httpClient=e,this.padState=t}return Object.defineProperty(e.prototype,"componentOptions",{get:function(){return this.padState.componentOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"faceState",{get:function(){return this.padState.faceState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sessionState",{get:function(){return this.padState.sessionState},enumerable:!0,configurable:!0}),e.prototype.rotateAndCropFinalPicture=function(){var e=this,n=new t.EventEmitter,a=new i.HttpHeaders;a=(a=a.append("Accept","application/json")).append("ApiKeyAuth",this.padState.apiKey);var o=new FormData;return o.append("picture",this.padState.photoPADStartOriginal),this.httpClient.post(this.padState.getUrlRotateAndCrop(),o,{headers:a}).subscribe(function(t){if(t.length>0){var i=b.b64toBlob("data:image/png;base64,"+t[0].picture);e.padState.generatedPicture=i,e.componentOptions.autoMatchingEnabled?e.padState.changeProcessState(l.MATCH_READY):e.componentOptions.downloadFinalPictureOnSuccessEnabled&&b.downloadPicture(e.padState.generatedPicture).then(),n.emit(i)}else{var a="No picture generated from the original picture by the rotate-and-crop method";n.error(a),console.warn(a)}},function(t){if(417===t.status)e.padState.changeProcessState(l.ERROR_MULTIPLE_FACE),e.faceState.detectionFailureEventEmitter.emit("ERROR_MULTIPLE_FACE"),n.error(l.ERROR_MULTIPLE_FACE);else if(404===t.status)e.padState.changeProcessState(l.ERROR_NO_FACE),e.faceState.detectionFailureEventEmitter.emit("ERROR_NO_FACE"),n.error(l.ERROR_NO_FACE);else if(0===t.status)e.padState.changeProcessState(l.ERROR_NO_INTERNET_CONNECTION),e.sessionState.internetLostEventEmitter.emit(),n.error(l.ERROR_NO_INTERNET_CONNECTION);else{n.error("No picture generated from the original picture by the rotate-and-crop method"),console.error("No picture generated from the original picture by the rotate-and-crop method"+t)}e.padState.clearState()}),n},e.prototype.manageFinalPicture=function(){var e=this;this.componentOptions.formatFinalPicture?this.rotateAndCropFinalPicture().subscribe(function(t){e.faceState.faceDetectedEventEmitter.emit(t)},function(t){e.faceState.faceDetectedEventEmitter.error(t)}):(this.padState.generatedPicture=this.padState.photoPADStartOriginal,this.faceState.faceDetectedEventEmitter.emit(this.padState.generatedPicture),!this.componentOptions.autoMatchingEnabled&&this.componentOptions.downloadFinalPictureOnSuccessEnabled?b.downloadPicture(this.padState.generatedPicture).then():this.componentOptions.autoMatchingEnabled&&this.padState.changeProcessState(l.MATCH_READY))},e.prototype.compareWithReference=function(e){var t=this,n=new i.HttpHeaders;n=(n=n.append("Accept","application/json")).append("ApiKeyAuth",this.padState.apiKey);var a=URL.createObjectURL(e.target.files[0]),o=new Image;o.onload=function(){var e=500/o.width,i=document.createElement("canvas");i.width=500,i.height=o.height*e,i.getContext("2d").drawImage(o,0,0,i.width,i.height),i.toBlob(function(e){return p(t,void 0,void 0,function(){var t,i=this;return d(this,function(a){return(t=new FormData).append("reference",e),t.append("probe",this.padState.photoPADStartOriginal),this.httpClient.post(this.padState.getUrlMatching(),t,{headers:n}).subscribe(function(e){i.faceState.faceMatchingEventEmitter.emit(e),e.decision?i.padState.changeProcessState(l.MATCH_SUCCESS):i.padState.changeProcessState(l.MATCH_ERROR),e.decision&&i.componentOptions.downloadFinalPictureOnSuccessEnabled&&b.downloadPicture(i.padState.generatedPicture).then()},function(e){i.padState.changeProcessState(l.MATCH_ERROR),i.faceState.faceMatchingEventEmitter.error("An error occured during the Matching process. Please retry later.")}),[2]})})},"image/jpeg")},o.src=a},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:i.HttpClient},{type:v}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(i.HttpClient),t.ɵɵinject(v))},token:e,providedIn:"root"}),e}(),L=function(){function e(){}return e.messages=new Map([["START_TIPS_LABEL","Press on Start button when you are ready"],["PROCESS_FACE_CENTER_LABEL","Face detected, but not centered. Please look straight to the camera"],["PROCESS_NO_FACE_LABEL","No face detected. Please look straight to the camera."],["PROCESS_MULTIPLE_FACE_LABEL","Multiple faces detected. Only one person is allowed in the detection."],["TURN_FACE_LABEL","Now, please turn your face (look at the right or at the left)"],["EXPIRED_SESSION_ERROR_LABEL","Session has expired. Please try again."],["NO_FACE_ERROR_LABEL","No face detected. Please try again."],["NO_INTERNET_CONNECTION_LABEL","Internet connection lost. Please try again"],["MULTIPLE_FACE_ERROR_LABEL","Multiple faces detected. Please try again."],["MATCHING_SUCCESS_LABEL","Detected face successfully match the reference picture."],["MATCHING_READY_LABEL",'Picture is ready to be compared with a reference picture.Please click on the "Compare" button to upload the reference picture.'],["MATCHING_ERROR_LABEL","Detected face does not match the reference picture"],["SUCCESS_LABEL","Live face successfully detected."],["START_BUTTON_LABEL","Start"],["RESTART_BUTTON_LABEL","Restart"],["COMPARE_BUTTON_LABEL","Compare"],["ENABLE_CAM_BUTTON_LABEL","Start the webcam"],["RETRY_BUTTON_LABEL","Retry"],["USER_TOO_FAR_LABEL","Too far away, please move closer"],["USER_NOT_CENTER_LABEL","Please, move on the target area"]]),e}(),_=function(){function e(){}return e.messages=new Map([["START_TIPS_LABEL","Cliquez sur Démarrer lorsque vous êtes prêt"],["PROCESS_FACE_CENTER_LABEL","Visage detecté, mais non centré. Veuillez regarder la caméra en mettant votre visage bien en face"],["PROCESS_NO_FACE_LABEL","Pas de visage detecté. Veuillez vous positionner au centre de l'écran."],["PROCESS_MULTIPLE_FACE_LABEL","Plusieurs visages detectés. La detection ne fonctionne qu'avec un seul visage."],["TURN_FACE_LABEL","Maintenant, tournez lentement la tête (vers la droite ou vers la gauche)"],["EXPIRED_SESSION_ERROR_LABEL","La session a expiré. Veuillez réessayer"],["NO_FACE_ERROR_LABEL","Pas de visage detecté. Veuillez réessayer"],["NO_INTERNET_CONNECTION_LABEL","Connection internet perdue. Veuillez réessayer"],["MULTIPLE_FACE_ERROR_LABEL","Plusieurs visages detectés. Veuillez réessayer"],["MATCHING_SUCCESS_LABEL","Le visage correspond bien à la photo de référence"],["MATCHING_READY_LABEL",'La photo est prête à être comparée avec une référence.Veuillez cliquer sur le bouton "Verifier" puis choisir une photo de référence.'],["MATCHING_ERROR_LABEL","Le visage ne correspond pas à la photo de référence"],["SUCCESS_LABEL","La detection du visage a réussi."],["START_BUTTON_LABEL","Démarrer"],["RESTART_BUTTON_LABEL","Recommencer"],["COMPARE_BUTTON_LABEL","Vérifier"],["ENABLE_CAM_BUTTON_LABEL","Activer la webcam"],["RETRY_BUTTON_LABEL","Réessayer"],["USER_TOO_FAR_LABEL","Vous êtes trop loin, veuillez vous rapprocher de la caméra"],["USER_NOT_CENTER_LABEL","Veuillez vous positionner à l'intérieur de la zone cible"]]),e}(),A=function(){function e(){}return e.messages=new Map([["START_TIPS_LABEL","Pressione no botão Iniciar quando estiver pronto"],["PROCESS_FACE_CENTER_LABEL","Rosto detectado, mas não centrado. Por favor, olhe diretamente para a câmera"],["PROCESS_NO_FACE_LABEL","Nenhum rosto detectado. Por favor, olhe diretamente para a câmera."],["PROCESS_MULTIPLE_FACE_LABEL","Múltiplos rostos detectados. Apenas uma pessoa é permitida na detecção."],["TURN_FACE_LABEL","Agora, por favor, vire seu rosto (olhe para a direita ou para a esquerda)"],["EXPIRED_SESSION_ERROR_LABEL","Sessão expirou. Por favor, tente novamente."],["NO_FACE_ERROR_LABEL","Nenhum rosto detectado. Por favor, tente novamente."],["NO_INTERNET_CONNECTION_LABEL","Conexão perdida com a internet. Por favor, tente novamente."],["MULTIPLE_FACE_ERROR_LABEL","Múltiplos rostos detectados. Por favor, tente novamente."],["MATCHING_SUCCESS_LABEL","A face detectada corresponde com sucesso à imagem de referência."],["MATCHING_READY_LABEL",'A imagem está pronta para ser comparada com uma imagem de referência.Por favor, clique no botão "Comparar" para carregar a imagem de referência.'],["MATCHING_ERROR_LABEL","Detected face does not match the reference picture"],["SUCCESS_LABEL","O rosto detectado não corresponde à imagem de referência"],["START_BUTTON_LABEL","Iniciar"],["RESTART_BUTTON_LABEL","Começar de novo"],["COMPARE_BUTTON_LABEL","Comparar"],["ENABLE_CAM_BUTTON_LABEL","Comece a webcam"],["RETRY_BUTTON_LABEL","Tente novamente"],["USER_TOO_FAR_LABEL","Você está longe demais, por favor, aproxime-se da câmera"],["USER_NOT_CENTER_LABEL","Por favor posicione-se dentro da área alvo"]]),e}(),O=function(){function e(e){this.padState=e,this.messageState.mapLanguage.set("fr",_.messages),this.messageState.mapLanguage.set("en",L.messages),this.messageState.mapLanguage.set("pt",A.messages)}return Object.defineProperty(e.prototype,"messageState",{get:function(){return this.padState.messageState},enumerable:!0,configurable:!0}),e.prototype.getMessage=function(e){return!this.messageState.messages.get(e)&&this.messageState.languageFile?this.messageState.languageFile.messages.get(e):this.messageState.messages.get(e)},e.prototype.initMessage=function(e,t,i,n,a,o,r,s,c,p,d,l,h,S,u,g,E,m,f,v){this.messageState.messages.set("START_TIPS_LABEL",e),this.messageState.messages.set("PROCESS_FACE_CENTER_LABEL",t),this.messageState.messages.set("PROCESS_NO_FACE_LABEL",i),this.messageState.messages.set("PROCESS_MULTIPLE_FACE_LABEL",n),this.messageState.messages.set("TURN_FACE_LABEL",a),this.messageState.messages.set("EXPIRED_SESSION_ERROR_LABEL",o),this.messageState.messages.set("NO_FACE_ERROR_LABEL",r),this.messageState.messages.set("MULTIPLE_FACE_ERROR_LABEL",s),this.messageState.messages.set("SUCCESS_LABEL",c),this.messageState.messages.set("START_BUTTON_LABEL",p),this.messageState.messages.set("RESTART_BUTTON_LABEL",d),this.messageState.messages.set("COMPARE_BUTTON_LABEL",l),this.messageState.messages.set("ENABLE_CAM_BUTTON_LABEL",h),this.messageState.messages.set("RETRY_BUTTON_LABEL",S),this.messageState.messages.set("MATCHING_SUCCESS_LABEL",u),this.messageState.messages.set("MATCHING_READY_LABEL",g),this.messageState.messages.set("MATCHING_ERROR_LABEL",E),this.messageState.messages.set("NO_INTERNET_CONNECTION_LABEL",m),this.messageState.messages.set("USER_TOO_FAR_LABEL",f),this.messageState.messages.set("USER_NOT_CENTER_LABEL",v)},e.prototype.initLanguage=function(){this.messageState.languageFile=this.messageState.mapLanguage.get(navigator.language.substr(0,2)),this.messageState.languageFile||(this.messageState.languageFile=L)},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:v}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v))},token:e,providedIn:"root"}),e}(),I=function(){function e(e){this.padState=e}return Object.defineProperty(e.prototype,"componentOptions",{get:function(){return this.padState.componentOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trackerState",{get:function(){return this.padState.trackerState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"videoState",{get:function(){return this.padState.videoState},enumerable:!0,configurable:!0}),e.prototype.faceTracker=function(){var e=this,t=this.videoState.videoPAD.nativeElement,i=this.videoState.canvasResult.nativeElement,n=i.getContext("2d");i.width=this.videoState.videoWidth,i.height=this.videoState.videoHeight,this.faceDetector=new r({video:t,flipLeftRight:!1,flipUpsideDown:!1}),this.faceDetector.startDetecting(),this.faceDetector.setOnFaceLostCallback(function(e,t){n.clearRect(0,0,i.width,i.height)}),this.faceDetector.setOnFaceUpdatedCallback(function(t){n.clearRect(0,0,i.width,i.height),e.componentOptions.faceTrackingOptionDesign?(n.strokeStyle="rgba(0,200,200,0)",n.fillStyle="rgba(0,200,200,0)"):(n.strokeStyle="rgba(0,221,52,1.0)",n.fillStyle="rgba(0,221,52,0.08)"),n.lineWidth=2,t.forEach(function(t){n.beginPath();var a=t.width*i.width/2,o=1.5*t.height*i.height/2;n.ellipse(t.x*i.width+a,t.y*i.height+o-o/2,a,o,0,0,2*Math.PI),n.stroke(),n.fill(),e.componentOptions.faceTrackingOptionDesign&&(n.strokeStyle="rgba(0,200,200,0)",n.lineWidth="10",n.fillStyle="rgba(0, 0, 0, 0.7)",n.beginPath(),n.moveTo(0,0),n.lineTo(0,i.height),n.lineTo(i.width/2,i.height),n.ellipse(t.x*i.width+a,t.y*i.height+o-o/2,a,o,0,Math.PI/2,Math.PI/2.000001),n.lineTo(i.height/2,i.height),n.lineTo(i.width,i.height),n.lineTo(i.width,0),n.lineTo(i.width/2,0),n.lineTo(i.width/2,0),n.lineTo(0,0),n.stroke(),n.fill()),e.trackerState.xCoord=t.x*i.width,e.trackerState.yCoord=t.y*i.height,e.trackerState.wCoord=t.width*i.width,e.trackerState.hCoord=t.height*i.height})})},e.prototype.faceTrackingReadyToStart=function(){return this.componentOptions.faceTrackingEnabled&&(!this.faceDetector||!this.faceDetector.isRunning())},e.prototype.faceTrackingHasToBeDrawn=function(){return this.componentOptions.faceTrackingEnabled&&this.faceDetector.isRunning()&&this.trackerState.xCoord&&!this.componentOptions.circleEnabled},e.prototype.faceTrackingReady=function(){return this.componentOptions.faceTrackingEnabled&&this.faceDetector.isRunning()&&this.trackerState.xCoord},e.prototype.stopTracking=function(){this.faceDetector&&this.faceDetector.stop()},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:v}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v))},token:e,providedIn:"root"}),e}(),T=function(){function e(e){this.padState=e}return Object.defineProperty(e.prototype,"videoState",{get:function(){return this.padState.videoState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentOptions",{get:function(){return this.padState.componentOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"padCircleState",{get:function(){return this.padState.padCircleState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sessionState",{get:function(){return this.padState.sessionState},enumerable:!0,configurable:!0}),e.prototype.progressCircle=function(){var e=this,t=this.videoState.canvasResult.nativeElement;t.width=this.videoState.videoWidth,t.height=this.videoState.videoHeight;var i=t.getContext("2d"),n=t.width/2,a=t.height/2;i.lineCap="round";var o=0,r=setInterval(function(){i.clearRect(0,0,t.width,t.height),e.grayScale(e.componentOptions.circleRadius,i,t,n,a),i.beginPath(),""!==e.componentOptions.colorProgressCircle?i.strokeStyle=e.componentOptions.colorProgressCircle:i.strokeStyle="#007bff",i.lineWidth="10",i.arc(n,a,e.componentOptions.circleRadius,Math.PI/180*270,Math.PI/180*(270+o)),i.stroke(),e.sessionState.processCompletion>=100?(i.arc(n,a,e.componentOptions.circleRadius,Math.PI/180*(270+o),Math.PI/180*630),i.stroke(),e.sessionState.processCompletion=0,o=0,clearInterval(r),e.padCircleState.isCircleRunning=!1):o<e.sessionState.processCompletion/100*360?o+=10:e.padState.processState!==l.ERROR_NO_FACE&&e.padState.processState!==l.ERROR_NO_INTERNET_CONNECTION&&e.padState.processState!==l.ERROR_SESSION&&e.padState.processState!==l.ERROR_MULTIPLE_FACE||(i.clearRect(0,0,t.width,t.height),e.grayScale(e.componentOptions.circleRadius,i,t,n,a),e.sessionState.processCompletion=0,o=0,clearInterval(r),e.padCircleState.isCircleRunning=!1)},60)},e.prototype.grayScale=function(e,t,i,n,a){t.strokeStyle="rgba(0,200,200,0)",t.lineWidth="10",t.fillStyle="rgba(0, 0, 0, 0.7)",t.beginPath(),t.moveTo(0,0),t.lineTo(0,i.height),t.lineTo(n,i.height),t.lineTo(n,i.height-e/2),t.arc(n,a,e,Math.PI/2,Math.PI/2.000001),t.lineTo(n,i.height),t.lineTo(i.width,i.height),t.lineTo(i.width,0),t.lineTo(n,0),t.lineTo(n,e/2),t.lineTo(n,0),t.lineTo(0,0),t.stroke(),t.fill()},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:v}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v))},token:e,providedIn:"root"}),e}(),P=function(){function e(e,t,i,n,a,o){this.padState=e,this.messageService=t,this.faceService=i,this.padSessionWebSocketService=n,this.trackerService=a,this.padCircleService=o}return Object.defineProperty(e.prototype,"processCompletion",{get:function(){return this.sessionState.processCompletion},set:function(e){this.sessionState.processCompletion=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sessionState",{get:function(){return this.padState.sessionState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentOptions",{get:function(){return this.padState.componentOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minHeadSize",{get:function(){return this.padState.parameters.minHeadSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"padCircleState",{get:function(){return this.padState.padCircleState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trackerState",{get:function(){return this.padState.trackerState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"videoState",{get:function(){return this.padState.videoState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"faceState",{get:function(){return this.padState.faceState},enumerable:!0,configurable:!0}),e.prototype.processPadSessionResponse=function(e){var t=this;this.processCompletion=e.processCompletion,e.result?(this.padState.changeProcessState(l.SUCCESS),this.padState.clearState(),this.faceService.manageFinalPicture()):(this.sessionState.processInstruction="",e.errorType||this.padState.processState!==l.STARTED?"INVALID_YAW"===e.errorType||"INVALID_PITCH"===e.errorType?(this.sessionState.processInstruction=this.messageService.getMessage("PROCESS_FACE_CENTER_LABEL"),this.sessionState.padStartTimeOut=setTimeout(function(){return t.prepareCallPADStart()},500)):"INVALID_KEY"===e.errorType?this.padState.changeProcessState(l.ERROR_KEY):"INVALID_FACE"===e.errorType?this.padState.processState===l.PROCESS?(0===e.faceCount?(this.padState.changeProcessState(l.ERROR_NO_FACE),this.faceState.detectionFailureEventEmitter.emit("ERROR_NO_FACE")):e.faceCount>1&&(this.padState.changeProcessState(l.ERROR_MULTIPLE_FACE),this.faceState.detectionFailureEventEmitter.emit("ERROR_MULTIPLE_FACE")),this.padState.clearState()):this.padState.processState===l.STARTED&&(0===e.faceCount?this.componentOptions.circleEnabled?this.sessionState.processInstruction=this.messageService.getMessage("USER_NOT_CENTER_LABEL"):this.sessionState.processInstruction=this.messageService.getMessage("PROCESS_NO_FACE_LABEL"):e.faceCount>1&&(this.sessionState.processInstruction=this.messageService.getMessage("PROCESS_MULTIPLE_FACE_LABEL")),setTimeout(function(){return t.prepareCallPADStart()},500)):"INVALID_SESSION"===e.errorType&&(this.padState.changeProcessState(l.ERROR_SESSION),this.padState.clearState(),this.sessionState.sessionExpiredEventEmitter.emit()):(this.padState.changeProcessState(l.PROCESS),this.sessionState.padContinueInterval=setInterval(function(){return t.prepareCallPADContinue()},this.componentOptions.padFrequency)))},e.prototype.prepareCallPADStart=function(){var e=this;this.padSessionWebSocketService.isConnected()?this.callPADStart():this.padSessionWebSocketService.connect(function(t){return e.processPadSessionResponse(JSON.parse(t.data))}).then(function(t){e.callPADStart()}).catch(function(t){e.padState.changeProcessState(l.ERROR_NO_INTERNET_CONNECTION),e.sessionState.internetLostEventEmitter.emit(),e.padState.clearState()})},e.prototype.callPADStart=function(){var e=this;try{this.trackerService.faceTrackingReadyToStart()?this.trackerService.faceTracker():this.componentOptions.circleEnabled&&!this.componentOptions.faceTrackingEnabled&&(this.padCircleState.isCircleRunning||(this.padCircleService.progressCircle(),this.padCircleState.isCircleRunning=!0));var t=this.componentOptions.frameWidth/this.videoState.videoPAD.nativeElement.clientWidth;this.padState.changeProcessState(l.STARTED);var i=document.createElement("canvas");if(this.trackerService.faceTrackingHasToBeDrawn()){i.width=3*this.minHeadSize*this.videoState.ratioWidth,i.height=3*this.minHeadSize*this.videoState.ratioHeight;var n=1.5*this.trackerState.wCoord*this.videoState.ratioWidth,a=(this.trackerState.xCoord-(n-this.trackerState.wCoord))*this.videoState.ratioWidth,o=1.5*this.trackerState.hCoord*this.videoState.ratioHeight,r=(this.trackerState.yCoord-(o-this.trackerState.hCoord))*this.videoState.ratioHeight;i.height*this.trackerState.hCoord/this.videoState.videoHeight<this.minHeadSize?this.padState.changeProcessState(l.ERROR_USER_TOO_FAR):(i.getContext("2d").drawImage(this.videoState.videoPAD.nativeElement,+a,r,n,o,0,0,i.width,i.height),i.toBlob(function(t){e.sessionState.photoPADStart=t,e.padState.changeStateEventEmitter.emit("PAD Start photo blob generated"),e.doPADStart()},"image/jpeg"))}else this.componentOptions.circleEnabled&&!this.componentOptions.faceTrackingEnabled?(i.width=3*this.minHeadSize*this.videoState.ratioWidth,i.height=3*this.minHeadSize*this.videoState.ratioHeight,i.getContext("2d").drawImage(this.videoState.videoPAD.nativeElement,this.videoState.width/2-2*this.componentOptions.circleRadius*this.videoState.ratioWidth/2,this.videoState.height/2-2*this.componentOptions.circleRadius*this.videoState.ratioHeight/2,2*this.componentOptions.circleRadius*this.videoState.ratioWidth,2*this.componentOptions.circleRadius*this.videoState.ratioHeight,0,0,i.width,i.height),i.toBlob(function(t){e.sessionState.photoPADStart=t,e.padState.changeStateEventEmitter.emit("PAD Start photo blob generated"),e.doPADStart()},"image/jpeg")):(i.width=this.componentOptions.frameWidth,i.height=this.videoState.videoPAD.nativeElement.clientHeight*t,i.getContext("2d").drawImage(this.videoState.videoPAD.nativeElement,0,0,i.width,i.height),i.toBlob(function(t){e.sessionState.photoPADStart=t,e.padState.changeStateEventEmitter.emit("PAD Start photo blob generated"),e.doPADStart()},"image/jpeg"));var s=this.componentOptions.resultPictureWidth/this.videoState.videoPAD.nativeElement.videoWidth,c=document.createElement("canvas");this.trackerService.faceTrackingReady()?(c.width=1.5*this.trackerState.wCoord,c.height=1.5*this.trackerState.hCoord,this.trackerState.xCoord-=c.width-this.trackerState.wCoord,this.trackerState.yCoord-=c.height-this.trackerState.hCoord,c.getContext("2d").drawImage(this.videoState.videoPAD.nativeElement,+this.trackerState.xCoord,this.trackerState.yCoord,c.width,c.height,0,0,c.width,c.height)):(c.width=this.componentOptions.resultPictureWidth,c.height=this.videoState.videoPAD.nativeElement.videoHeight*s,c.getContext("2d").drawImage(this.videoState.videoPAD.nativeElement,0,0,c.width,c.height)),c.toBlob(function(t){e.padState.photoPADStartOriginal=t,e.padState.changeStateEventEmitter.emit("PAD Start photo original blob generated")},"image/jpeg")}catch(e){console.error(e),this.padState.changeStateEventEmitter.emit("Exception at prepareCallPADStart(): "+JSON.stringify(e))}},e.prototype.doPADStart=function(){return p(this,void 0,void 0,function(){var e;return d(this,function(t){switch(t.label){case 0:return[4,new Response(this.sessionState.photoPADStart).arrayBuffer()];case 1:return e=t.sent(),this.padSessionWebSocketService.sendMessage({faceImage:b.arrayBufferToBase64(e),typeMessagePad:"START",apiKey:this.padState.apiKey}),[2]}})})},e.prototype.prepareCallPADContinue=function(){var e=this;if(this.padSessionWebSocketService.isConnected())try{var t=this.componentOptions.frameWidth/this.videoState.videoPAD.nativeElement.clientWidth,i=document.createElement("canvas");if(this.trackerService.faceTrackingReady()){i.width=3*this.minHeadSize*this.videoState.ratioWidth,i.height=3*this.minHeadSize*this.videoState.ratioHeight;var n=1.5*this.trackerState.wCoord*this.videoState.ratioWidth,a=(this.trackerState.xCoord-(n-this.trackerState.wCoord))*this.videoState.ratioWidth,o=1.5*this.trackerState.hCoord*this.videoState.ratioHeight,r=(this.trackerState.yCoord-(o-this.trackerState.hCoord))*this.videoState.ratioHeight;i.height*this.trackerState.hCoord/this.videoState.videoHeight<this.minHeadSize?this.sessionState.processInstruction=this.messageService.getMessage("USER_TOO_FAR_LABEL"):(i.getContext("2d").drawImage(this.videoState.videoPAD.nativeElement,+a,r,n,o,0,0,i.width,i.height),this.toBlob(i))}else this.componentOptions.circleEnabled&&!this.componentOptions.faceTrackingEnabled?(i.width=3*this.minHeadSize*this.videoState.ratioWidth,i.height=3*this.minHeadSize*this.videoState.ratioHeight,i.getContext("2d").drawImage(this.videoState.videoPAD.nativeElement,this.videoState.width/2-2*this.componentOptions.circleRadius*this.videoState.ratioWidth/2,this.videoState.height/2-2*this.componentOptions.circleRadius*this.videoState.ratioHeight/2,2*this.componentOptions.circleRadius*this.videoState.ratioWidth,2*this.componentOptions.circleRadius*this.videoState.ratioHeight,0,0,i.width,i.height),this.toBlob(i)):(i.width=this.componentOptions.frameWidth,i.height=this.videoState.videoPAD.nativeElement.clientHeight*t,i.getContext("2d").drawImage(this.videoState.videoPAD.nativeElement,0,0,i.width,i.height),this.toBlob(i))}catch(e){this.padState.changeStateEventEmitter.emit("Exception at prepareCallPADContinue(): "+JSON.stringify(e))}else this.padState.clearState(),this.padState.changeProcessState(l.ERROR_NO_INTERNET_CONNECTION),this.sessionState.internetLostEventEmitter.emit(),setTimeout(function(){return e.initPadSource()},5e3)},e.prototype.toBlob=function(e){var t=this;e.toBlob(function(e){return p(t,void 0,void 0,function(){var t;return d(this,function(i){switch(i.label){case 0:return this.padState.changeStateEventEmitter.emit("PAD Continue photo blob generated"),this.sessionState.photoPADContinue=e,[4,new Response(this.sessionState.photoPADContinue).arrayBuffer()];case 1:return t=i.sent(),this.padSessionWebSocketService.sendMessage({faceImage:b.arrayBufferToBase64(t),typeMessagePad:"CONTINUE",apiKey:this.padState.apiKey}),[2]}})})},"image/jpeg")},e.prototype.initPadSource=function(){return p(this,void 0,void 0,function(){var e,t,i=this;return d(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),e=this.videoState,[4,navigator.mediaDevices.getUserMedia(this.videoState.videoConstraints)];case 1:return e.videoPADStream=n.sent(),this.videoState.videoPAD&&(this.videoState.videoPAD.nativeElement.srcObject=this.videoState.videoPADStream),this.handleSuccess(),this.padState.changeProcessState(l.INITIAL),window.addEventListener("beforeunload",function(){return i.leaving()}),[3,3];case 2:return t=n.sent(),console.log("Error : "+t),[3,3];case 3:return[2]}})})},e.prototype.leaving=function(){this.videoState.videoPADStream.stop()},e.prototype.handleSuccess=function(){var e=this.videoState.videoPADStream.getVideoTracks();this.videoState.cameraEventEmitter.emit("Got stream with constraints: "+JSON.stringify(this.videoState.videoConstraints)),this.videoState.cameraEventEmitter.emit("Using video device: "+JSON.stringify(e[0].label))},e.prototype.updateNetworkStatus=function(){var e=this;setInterval(function(){e.padState.sessionState.latency<e.padState.sessionState.highLimit?(document.getElementById("excellentConnection").setAttribute("fill",e.padState.sessionState.colorExcellentConnection),document.getElementById("goodConnection").setAttribute("fill",e.padState.sessionState.colorExcellentConnection),document.getElementById("mediumConnection").setAttribute("fill",e.padState.sessionState.colorExcellentConnection),document.getElementById("lowConnection").setAttribute("fill",e.padState.sessionState.colorExcellentConnection)):e.padState.sessionState.latency>e.padState.sessionState.highLimit&&e.padState.sessionState.latency<e.padState.sessionState.mediumLimit?(document.getElementById("excellentConnection").setAttribute("fill",e.padState.sessionState.defaultColor),document.getElementById("goodConnection").setAttribute("fill",e.padState.sessionState.colorGoodConnection),document.getElementById("mediumConnection").setAttribute("fill",e.padState.sessionState.colorGoodConnection),document.getElementById("lowConnection").setAttribute("fill",e.padState.sessionState.colorGoodConnection)):e.padState.sessionState.latency>e.padState.sessionState.mediumLimit&&e.padState.sessionState.latency<e.padState.sessionState.badLimit?(document.getElementById("excellentConnection").setAttribute("fill",e.padState.sessionState.defaultColor),document.getElementById("goodConnection").setAttribute("fill",e.padState.sessionState.defaultColor),document.getElementById("mediumConnection").setAttribute("fill",e.padState.sessionState.colorMediumConnection),document.getElementById("lowConnection").setAttribute("fill",e.padState.sessionState.colorMediumConnection)):(document.getElementById("excellentConnection").setAttribute("fill",e.padState.sessionState.defaultColor),document.getElementById("goodConnection").setAttribute("fill",e.padState.sessionState.defaultColor),document.getElementById("mediumConnection").setAttribute("fill",e.padState.sessionState.defaultColor),document.getElementById("lowConnection").setAttribute("fill",e.padState.sessionState.colorBadConnection))},2e3)},e.prototype.isRequestPermissionState=function(){return this.padState.processState===l.REQUEST_PERMISSIONS},e.prototype.isInitialState=function(){return this.padState.processState===l.INITIAL},e.prototype.isStartedState=function(){return this.padState.processState===l.STARTED},e.prototype.isProcessingState=function(){return this.padState.processState===l.PROCESS},e.prototype.isErrorSessionState=function(){return this.padState.processState===l.ERROR_SESSION},e.prototype.isErrorNoFaceState=function(){return this.padState.processState===l.ERROR_NO_FACE},e.prototype.isErrorNoInternetConnection=function(){return this.padState.processState===l.ERROR_NO_INTERNET_CONNECTION},e.prototype.isErrorUserTooFar=function(){return this.padState.processState===l.ERROR_USER_TOO_FAR},e.prototype.isErrorUserNotCenter=function(){return this.padState.processState===l.ERROR_USER_NOT_CENTER},e.prototype.isErrorMultipleFaceState=function(){return this.padState.processState===l.ERROR_MULTIPLE_FACE},e.prototype.isSuccessState=function(){return this.padState.processState===l.SUCCESS},e.prototype.isInvalidKeyState=function(){return this.padState.processState===l.ERROR_KEY},e.prototype.isMatchingReadyState=function(){return this.padState.processState===l.MATCH_READY},e.prototype.isMatchingSuccessState=function(){return this.padState.processState===l.MATCH_SUCCESS},e.prototype.isMatchingErrorState=function(){return this.padState.processState===l.MATCH_ERROR},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:v},{type:O},{type:y},{type:R},{type:I},{type:T}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v),t.ɵɵinject(O),t.ɵɵinject(y),t.ɵɵinject(R),t.ɵɵinject(I),t.ɵɵinject(T))},token:e,providedIn:"root"}),e}(),N=function(){function e(e){this.padState=e}return Object.defineProperty(e.prototype,"videoState",{get:function(){return this.padState.videoState},enumerable:!0,configurable:!0}),e.prototype.initDatasFromVideoPAD=function(){var e=this;this.videoState.videoPAD.nativeElement.addEventListener("loadedmetadata",function(t){e.videoState.width=e.videoState.videoPAD.nativeElement.videoWidth,e.videoState.height=e.videoState.videoPAD.nativeElement.videoHeight,e.videoState.ratioWidth=e.videoState.width/e.videoState.videoWidth,e.videoState.ratioHeight=e.videoState.height/e.videoState.videoHeight},!1)},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:v}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v))},token:e,providedIn:"root"}),e}(),w=function(){function e(e){this.padState=e}return Object.defineProperty(e.prototype,"videoState",{get:function(){return this.padState.videoState},enumerable:!0,configurable:!0}),e.prototype.init=function(){if(this.videoState.canvasResult.nativeElement.clientHeight>this.videoState.canvasResult.nativeElement.clientWidth&&this.videoState.videoWidth>this.videoState.videoHeight){var e=this.videoState.videoWidth;this.videoState.videoWidth=this.videoState.videoHeight,this.videoState.videoHeight=e}},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:v}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v))},token:e,providedIn:"root"}),e}(),B=function(){function e(e,i,n,a,o,r,s,c,p){this.padSessionWebSocketService=e,this.padState=i,this.parametersService=n,this.faceService=a,this.messageService=o,this.padSessionService=r,this.trackerService=s,this.videoService=c,this.deviceService=p,this.downloadFinalPictureOnSuccess=!1,this.enableAutoMatching=!1,this.autoStart=!1,this.faceTrackingEnabled=!1,this.faceTrackingOptionDesign=!1,this.mirror=!1,this.circleEnabled=!1,this.circleRadius=200,this.formatFinalPicture=!1,this.resultPictureWidth=600,this.allowsMultipleRetries=!1,this.videoWidth=800,this.videoHeight=600,this.frameWidth=120,this.messagesEnabled=!0,this.padFrequency=100,this.faceDetectedHandler=new t.EventEmitter,this.detectionFailureHandler=new t.EventEmitter,this.internetLostHandler=new t.EventEmitter,this.cameraHandler=new t.EventEmitter,this.sessionExpiredHandler=new t.EventEmitter,this.changeStateHandler=new t.EventEmitter,this.matchingHandler=new t.EventEmitter}return Object.defineProperty(e.prototype,"minHeadSize",{get:function(){return this.padState.parameters.minHeadSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"processState",{get:function(){return this.padState.processState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sessionState",{get:function(){return this.padState.sessionState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"messageState",{get:function(){return this.padState.messageState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"faceState",{get:function(){return this.padState.faceState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"videoState",{get:function(){return this.padState.videoState},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.messageService.initLanguage(),this.messageService.initMessage(this.startTipsLabel,this.processFaceCenterLabel,this.processNoFaceLabel,this.processMultipleFaceLabel,this.turnFaceLabel,this.expiredSessionErrorLabel,this.noFaceErrorLabel,this.multipleFaceErrorLabel,this.successLabel,this.startButtonLabel,this.restartButtonLabel,this.compareButtonLabel,this.enableCamButtonLabel,this.retryButtonLabel,this.matchingSuccessLabel,this.matchingReadyLabel,this.matchingErrorLabel,this.noInternetConnectionLabel,this.userTooFarLabel,this.userNotCenterLabel),this.padSessionService.updateNetworkStatus(),this.sessionState.endSessionEventEmitter.subscribe(function(t){e.ngOnDestroy()}),this.padState.changeStateEventEmitter.subscribe(function(t){e.changeStateHandler.emit(t)}),this.faceState.faceDetectedEventEmitter.subscribe(function(t){e.faceDetectedHandler.emit(t)}),this.faceState.detectionFailureEventEmitter.subscribe(function(t){e.detectionFailureHandler.emit(t)}),this.faceState.faceMatchingEventEmitter.subscribe(function(t){e.matchingHandler.emit(t)}),this.sessionState.sessionExpiredEventEmitter.subscribe(function(t){e.sessionExpiredHandler.emit(t)}),this.sessionState.internetLostEventEmitter.subscribe(function(t){e.internetLostHandler.emit(t)}),this.videoState.cameraEventEmitter.subscribe(function(t){e.cameraHandler.emit(t)}),this.padState.initApiBase(this.apiKey,this.wsEndpoint,this.pingBaseUrl?this.pingBaseUrl:this.wsEndpoint),this.padSessionWebSocketService.startPingServer().then()},e.prototype.ngOnDestroy=function(){clearTimeout(this.sessionState.padStartTimeOut),this.padSessionWebSocketService.disconnect(),this.trackerService.stopTracking()},e.prototype.ngAfterViewInit=function(){this.videoState.videoPAD=this.videoPAD,this.videoState.canvasResult=this.canvasResult,this.padState.initApiFace(this.wsFormatPicture,this.wsFaceVerification),this.padState.initComponentOptions(this.enableAutoMatching,this.downloadFinalPictureOnSuccess,this.formatFinalPicture,this.padFrequency,this.circleEnabled,this.faceTrackingEnabled,this.circleRadius,this.frameWidth,this.colorProgressCircle,this.resultPictureWidth,this.faceTrackingOptionDesign),this.padState.initApiParameters(this.wsImageSize),this.padState.initVideoState(this.videoHeight,this.videoWidth),this.parametersService.getParameters().subscribe(),this.autoStart&&(this.initPadSource(),this.videoService.initDatasFromVideoPAD())},e.prototype.initPadSource=function(){this.padSessionService.initPadSource().then()},e.prototype.initDatasFromVideoPAD=function(){this.videoService.initDatasFromVideoPAD()},e.prototype.startPAD=function(){this.deviceService.init(),this.padSessionService.prepareCallPADStart()},e.prototype.emitChangeStateEvent=function(e){this.changeStateHandler.emit(e)},e.prototype.resetUI=function(){this.padState.changeProcessState(l.INITIAL)},e.prototype.compareWithReference=function(e){if(e||(e=this.padState.generatedPicture),e)document.getElementById("id3-fileForMatching").click();else{var t="PAD Result picture is missing. You have to execute the entire PAD process before calling the Matching Javascript function.\n";t+="IMPORTANT NOTE : If you are using the pureJS component, you have to provide the picture in argument (mandatory).",console.error(t),this.matchingHandler&&this.matchingHandler.error(t)}},e.prototype.handleReferenceFile=function(e){this.faceService.compareWithReference(e)},e.decorators=[{type:t.Component,args:[{selector:"id3-face-pad",template:'<id3-face-pad-messages *ngIf="messagesEnabled" class="show-small-screen" [startTipsLabel]="messageService.getMessage(\'START_TIPS_LABEL\')"\n [turnFaceLabel]="messageService.getMessage(\'TURN_FACE_LABEL\')" [expiredSessionErrorLabel]="messageService.getMessage(\'EXPIRED_SESSION_ERROR_LABEL\')"\n [noFaceErrorLabel]="messageService.getMessage(\'NO_FACE_ERROR_LABEL\')" [noInternetConnectionLabel]="messageService.getMessage(\'NO_INTERNET_CONNECTION_LABEL\')"\n [multipleFaceErrorLabel]="messageService.getMessage(\'MULTIPLE_FACE_ERROR_LABEL\')" [successLabel]="messageService.getMessage(\'SUCCESS_LABEL\')"\n [processInstruction]="sessionState.processInstruction" [padSessionService]="padSessionService" [matchingSuccessLabel]="messageService.getMessage(\'MATCHING_SUCCESS_LABEL\')"\n [matchingErrorLabel]="messageService.getMessage(\'MATCHING_ERROR_LABEL\')" [matchingReadyLabel]="messageService.getMessage(\'MATCHING_READY_LABEL\')"\n [userTooFarLabel]="messageService.getMessage(\'USER_TOO_FAR_LABEL\')" [userNotCenterLabel]="messageService.getMessage(\'USER_NOT_CENTER_LABEL\')">\n</id3-face-pad-messages>\n\n<input #fileForMatch id="id3-fileForMatching" type="file" (click)="fileForMatch.value=null;" name="fileForMatch" class="d-none" (change)="handleReferenceFile($event)"/>\n<div class="padContainer" [style.max-height]="videoHeight + \'px\'" [style.max-width]="videoWidth + \'px\'">\n <canvas class="canvas {{mirror && !circleEnabled ? \'mirror\': \'\'}}" #resultCanvas></canvas>\n <video class="liveStream {{mirror ? \'mirror\': \'\'}}" #videoPAD autoplay playsinline [style.maxHeight]="videoState.videoHeight + \'px\'"></video>\n <div class="id3-pad-overlay">\n <div class="extras">\n <img class="text-left" id="id3Logo" src="/assets/images/id3_logo_white_40.png" height="40" width="40" *ngIf="apiKey === \'test-token-id3-webcapture\'">\n <id3-network-status ></id3-network-status>\n </div>\n <div id="mainContent" class="pad-content d-block">\n\n <id3-face-pad-messages *ngIf="messagesEnabled" class="show-big-screen" [startTipsLabel]="messageService.getMessage(\'START_TIPS_LABEL\')"\n [turnFaceLabel]="messageService.getMessage(\'TURN_FACE_LABEL\')" [expiredSessionErrorLabel]="messageService.getMessage(\'EXPIRED_SESSION_ERROR_LABEL\')"\n [noFaceErrorLabel]="messageService.getMessage(\'NO_FACE_ERROR_LABEL\')" [noInternetConnectionLabel]="messageService.getMessage(\'NO_INTERNET_CONNECTION_LABEL\')"\n [multipleFaceErrorLabel]="messageService.getMessage(\'MULTIPLE_FACE_ERROR_LABEL\')" [successLabel]="messageService.getMessage(\'SUCCESS_LABEL\')"\n [processInstruction]="sessionState.processInstruction" [padSessionService]="padSessionService" [matchingSuccessLabel]="messageService.getMessage(\'MATCHING_SUCCESS_LABEL\')"\n [matchingErrorLabel]="messageService.getMessage(\'MATCHING_ERROR_LABEL\')" [matchingReadyLabel]="messageService.getMessage(\'MATCHING_READY_LABEL\')"\n [userTooFarLabel]="messageService.getMessage(\'USER_TOO_FAR_LABEL\')" [userNotCenterLabel]="messageService.getMessage(\'USER_NOT_CENTER_LABEL\')">\n </id3-face-pad-messages>\n\n <br>\n <div class="d-flex">\n <h4 id="padAlert" class="text-white"></h4>\n </div>\n </div>\n <div id="mainButtons" class="pad-buttons d-block">\n <button type="button" *ngIf="padSessionService.isRequestPermissionState()" (click)="initPadSource(); initDatasFromVideoPAD()" class="btn btn-primary btn-id3 mt-5">\n <em class="pi pi-caret-right"></em>{{messageService.getMessage(\'ENABLE_CAM_BUTTON_LABEL\')}}\n </button>\n <button type="button" *ngIf="padSessionService.isInitialState()" (click)="startPAD()" class="btn btn-primary btn-id3 mt-5">\n <em class="pi pi-caret-right"></em> {{messageService.getMessage(\'START_BUTTON_LABEL\')}}\n </button>\n <button type="button" *ngIf="padSessionService.isErrorSessionState() ||\n padSessionService.isErrorNoFaceState() || padSessionService.isErrorNoInternetConnection() ||\n padSessionService.isErrorUserTooFar() || padSessionService.isErrorUserNotCenter() ||\n padSessionService.isErrorMultipleFaceState() || (allowsMultipleRetries && padSessionService.isSuccessState())"\n (click)="resetUI()" class="btn btn-primary btn-id3 mt-3">\n <em class="pi pi-caret-right"></em> {{messageService.getMessage(\'RETRY_BUTTON_LABEL\')}}\n </button>\n\n <button type="button" *ngIf="padSessionService.isMatchingReadyState()" class="btn btn-primary btn-id3 mt-3" (click)="compareWithReference()">\n <em class="pi pi-caret-right"></em> {{messageService.getMessage(\'COMPARE_BUTTON_LABEL\')}}\n </button>\n <button type="button" *ngIf="padSessionService.isMatchingSuccessState()|| padSessionService.isMatchingErrorState()" class="btn btn-primary btn-id3 mt-3" (click)="resetUI()">\n <em class="pi pi-caret-right"></em> {{messageService.getMessage(\'RESTART_BUTTON_LABEL\')}}\n </button>\n\n </div>\n </div>\n </div>',styles:['.padContainer{position:relative;margin:auto}.padContainer .h1,.padContainer .h2,.padContainer .h3,.padContainer .h4,.padContainer .h5,.padContainer .h6,.padContainer h1,.padContainer h2,.padContainer h3,.padContainer h4,.padContainer h5,.padContainer h6{font-family:"PT Sans",sans-serif;font-weight:700;font-size:50px}.padContainer .liveStream{z-index:1;top:0;left:0;width:100%;height:auto}.padContainer .btn-id3{border-radius:10px}.padContainer .font-weight-normal{width:250px;text-align:left}.padContainer .id3-pad-overlay{z-index:3;position:absolute;top:0;bottom:0;left:0;right:0;display:flex;align-items:center;color:#fff;font-size:20px;flex-direction:column;border:1px solid #ddd}.padContainer .extras{position:absolute;display:flex;top:15;right:15;left:15;width:100%;align-items:left}.padContainer .pad-content{display:block;text-align:center}.padContainer .pad-buttons{position:absolute;display:block;text-align:center;bottom:5%}.padContainer .padBehaviorLabel{font-size:20px}.padContainer .breathe{margin:6px 10px}.padContainer .id3-overlay{position:absolute}.padContainer .canvas{z-index:2;top:0;left:0;width:100%;height:100%;position:absolute}.padContainer .mirror{transform:rotateY(180deg);-webkit-transform:rotateY(180deg);-moz-transform:rotateY(180deg)}.padContainer .clientConnectionLogo{top:0;right:0;position:absolute}@media only screen and (max-width:500px){.show-big-screen{display:none}}@media only screen and (min-width:500px){.show-small-screen{display:none}}@media only screen and (min-width:601px){h4{font-size:25px}}@media only screen and (max-width:600px){h1{font-size:27px!important;margin-left:15%}h4{font-size:25px}}']}]}],e.ctorParameters=function(){return[{type:R},{type:v},{type:C},{type:y},{type:O},{type:P},{type:I},{type:N},{type:w}]},e.propDecorators={canvasResult:[{type:t.ViewChild,args:["resultCanvas",{static:!1}]}],videoPAD:[{type:t.ViewChild,args:["videoPAD",{static:!1}]}],fileForMatching:[{type:t.ViewChild,args:["fileForMatching",{static:!1}]}],wsEndpoint:[{type:t.Input}],pingBaseUrl:[{type:t.Input}],wsImageSize:[{type:t.Input}],apiKey:[{type:t.Input}],wsFormatPicture:[{type:t.Input}],wsFaceVerification:[{type:t.Input}],downloadFinalPictureOnSuccess:[{type:t.Input}],enableAutoMatching:[{type:t.Input}],autoStart:[{type:t.Input}],faceTrackingEnabled:[{type:t.Input}],faceTrackingOptionDesign:[{type:t.Input}],mirror:[{type:t.Input}],circleEnabled:[{type:t.Input}],colorProgressCircle:[{type:t.Input}],circleRadius:[{type:t.Input}],formatFinalPicture:[{type:t.Input}],resultPictureWidth:[{type:t.Input}],allowsMultipleRetries:[{type:t.Input}],videoWidth:[{type:t.Input}],videoHeight:[{type:t.Input}],frameWidth:[{type:t.Input}],messagesEnabled:[{type:t.Input}],padFrequency:[{type:t.Input}],startTipsLabel:[{type:t.Input}],processFaceCenterLabel:[{type:t.Input}],processNoFaceLabel:[{type:t.Input}],processMultipleFaceLabel:[{type:t.Input}],turnFaceLabel:[{type:t.Input}],expiredSessionErrorLabel:[{type:t.Input}],noFaceErrorLabel:[{type:t.Input}],multipleFaceErrorLabel:[{type:t.Input}],successLabel:[{type:t.Input}],startButtonLabel:[{type:t.Input}],restartButtonLabel:[{type:t.Input}],compareButtonLabel:[{type:t.Input}],enableCamButtonLabel:[{type:t.Input}],retryButtonLabel:[{type:t.Input}],matchingSuccessLabel:[{type:t.Input}],matchingReadyLabel:[{type:t.Input}],matchingErrorLabel:[{type:t.Input}],noInternetConnectionLabel:[{type:t.Input}],userTooFarLabel:[{type:t.Input}],userNotCenterLabel:[{type:t.Input}],faceDetectedHandler:[{type:t.Output}],detectionFailureHandler:[{type:t.Output}],internetLostHandler:[{type:t.Output}],cameraHandler:[{type:t.Output}],sessionExpiredHandler:[{type:t.Output}],changeStateHandler:[{type:t.Output}],matchingHandler:[{type:t.Output}],compareWithReference:[{type:t.Input}]},e}(),M=function(){function e(){this.processInstruction=""}return e.prototype.ngOnInit=function(){},e.decorators=[{type:t.Component,args:[{selector:"id3-face-pad-messages",template:'<div class="mt-2">\n <div *ngIf="padSessionService.isInitialState()" class="alert alert-primary" role="alert">\n {{startTipsLabel}}\n </div>\n <div *ngIf="padSessionService.isStartedState() && processInstruction !== undefined || (padSessionService.isProcessingState() && processInstruction.length>0)" class="alert alert-danger" role="alert">\n {{processInstruction}}\n </div>\n <div *ngIf="padSessionService.isProcessingState() && processInstruction.length==0" class="alert alert-primary" role="alert">\n {{turnFaceLabel}}\n </div>\n <div *ngIf="padSessionService.isErrorSessionState()" class="alert alert-danger" role="alert">\n {{expiredSessionErrorLabel}}\n </div>\n <div *ngIf="padSessionService.isErrorNoFaceState()" class="alert alert-danger" role="alert">\n {{noFaceErrorLabel}}\n </div>\n <div *ngIf="padSessionService.isErrorNoInternetConnection()" class="alert alert-danger" role="alert">\n {{noInternetConnectionLabel}}\n </div>\n <div *ngIf="padSessionService.isErrorUserTooFar()" class="alert alert-primary" role="alert">\n {{userTooFarLabel}}\n </div>\n <div *ngIf="padSessionService.isErrorUserNotCenter()" class="alert alert-danger" role="alert">\n {{userNotCenterLabel}}\n </div>\n <div *ngIf="padSessionService.isErrorMultipleFaceState()" class="alert alert-danger" role="alert">\n {{multipleFaceErrorLabel}}\n </div>\n <div *ngIf="padSessionService.isSuccessState()" class="alert alert-success" role="alert">\n {{successLabel}}\n </div>\n <div *ngIf="padSessionService.isMatchingReadyState()" class="alert alert-primary" role="alert">\n {{matchingReadyLabel}}\n </div>\n <div *ngIf="padSessionService.isMatchingSuccessState()" class="alert alert-success" role="alert">\n {{matchingSuccessLabel}}\n </div>\n <div *ngIf="padSessionService.isMatchingErrorState()" class="alert alert-danger" role="alert">\n {{matchingErrorLabel}}\n </div>\n <div *ngIf="padSessionService.isInvalidKeyState()" class="alert alert-danger" role="alert">\n The API Key is invalid. Please check your API key.\n </div>\n</div>'}]}],e.ctorParameters=function(){return[]},e.propDecorators={padSessionService:[{type:t.Input}],startTipsLabel:[{type:t.Input}],turnFaceLabel:[{type:t.Input}],expiredSessionErrorLabel:[{type:t.Input}],noFaceErrorLabel:[{type:t.Input}],noInternetConnectionLabel:[{type:t.Input}],userTooFarLabel:[{type:t.Input}],multipleFaceErrorLabel:[{type:t.Input}],successLabel:[{type:t.Input}],matchingSuccessLabel:[{type:t.Input}],matchingReadyLabel:[{type:t.Input}],matchingErrorLabel:[{type:t.Input}],userNotCenterLabel:[{type:t.Input}],processInstruction:[{type:t.Input}]},e}(),F=function(){function e(){}return e.prototype.ngOnInit=function(){},e.decorators=[{type:t.Component,args:[{selector:"id3-network-status",template:'<svg class="clientConnectionLogo" version="1.0" xmlns="http://www.w3.org/2000/svg"\n width="60" height="60" viewBox="0 0 1280.000000 720.000000"\n preserveAspectRatio="xMidYMid meet">\n <g transform="translate(0.000000,720.000000) scale(0.100000,-0.100000)"\n stroke="none">\n <path id="excellentConnection" fill="#C0C0C0" d="M6169 6226 c-2 -2 -51 -7 -109 -10 -439 -29 -987 -166 -1450 -363 -519 -221 -1027 -554 -1389 -911 -82 -81 -102 -107 -120 -157 -60 -160 18 -347 181 -436 59 -32 69 -34 158 -34 86 0 100 3 147 29 29 16 92 65 140 110 395 364 836 637 1336 825 152 57 374 124 497 151 372 81 500 94 900 95 309 0 362 -2 510 -23 303 -43 520 -95 805 -193 512 -175 1010 -472 1409 -841 137 -126 188 -152 301 -153 71 0 88 4 147 33 71 35 141 103 174 169 15 31 19 60 19 153 0 144 -7 159 -128 278 -328 322 -794 638 -1252 849 -504 232 -1051 376 -1610 423 -113 9 -657 14 -666 6z"/>\n <path id="goodConnection" fill="#C0C0C0" d="M6195 4939 c-787 -66 -1561 -412 -2102 -941 -111 -108 -128 -145 -128 -273 0 -89 3 -105 27 -150 36 -67 107 -139 171 -172 40 -20 71 -27 132 -31 121 -6 169 16 297 134 123 114 297 247 428 329 224 139 526 268 760 325 47 11 101 25 120 30 19 5 100 19 180 32 207 32 550 32 762 0 561 -86 1063 -325 1473 -702 131 -120 182 -145 295 -145 72 0 93 4 141 28 63 30 146 112 178 174 46 91 43 224 -6 315 -50 92 -339 338 -576 492 -467 302 -966 482 -1522 546 -126 15 -499 20 -630 9z"/>\n <path id="mediumConnection" fill="#C0C0C0" d="M6230 3653 c-103 -11 -321 -60 -439 -99 -316 -106 -596 -274 -819 -493 -118 -116 -137 -154 -136 -271 1 -69 6 -96 26 -140 53 -115 155 -197 273 -220 51 -10 71 -9 124 5 78 20 127 50 211 130 271 257 616 395 989 395 387 0 722 -136 1017 -412 100 -93 146 -113 264 -113 105 0 160 24 239 103 77 78 106 145 106 252 0 118 -27 171 -145 283 -330 315 -769 520 -1230 577 -78 9 -399 12 -480 3z"/>\n <path id="lowConnection" fill="#C0C0C0" d="M6270 2447 c-135 -37 -242 -101 -342 -204 -226 -234 -276 -555 -132 -852 40 -82 60 -108 138 -186 103 -102 185 -154 301 -191 97 -31 258 -43 358 -25 241 42 470 233 565 471 107 270 39 583 -172 790 -78 77 -183 143 -285 181 -77 29 -99 32 -216 36 -112 3 -142 0 -215 -20z"/>\n </g>\n</svg>',styles:[".clientConnectionLogo{top:0;right:0;position:absolute}"]}]}],e.ctorParameters=function(){return[]},e}(),D=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[B,M,F],imports:[i.HttpClientModule,s.CommonModule,c.BrowserModule],exports:[B],entryComponents:[B]}]}],e}();e.FacePadComponent=B,e.FacePadModule=D,e.PadSessionWebSocketService=R,e.PadState=v,e.ParametersService=C,e.ɵa=y,e.ɵb=O,e.ɵc=P,e.ɵd=I,e.ɵe=T,e.ɵf=N,e.ɵg=w,e.ɵh=M,e.ɵi=F,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=id3-face-pad.umd.min.js.map |
@@ -34,3 +34,3 @@ /** | ||
if (!this.messageState.messages.get(label) && this.messageState.languageFile) { | ||
return this.messageState.languageFile.get(label); | ||
return this.messageState.languageFile.messages.get(label); | ||
} | ||
@@ -113,2 +113,2 @@ else { | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVzc2FnZS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGlkMy9mYWNlLXBhZC8iLCJzb3VyY2VzIjpbImxpYi9zZXJ2aWNlL21lc3NhZ2UvbWVzc2FnZS5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUMsVUFBVSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBQyxRQUFRLEVBQUMsTUFBTSx1QkFBdUIsQ0FBQztBQUUvQyxPQUFPLEVBQUMsVUFBVSxFQUFDLE1BQU0sb0JBQW9CLENBQUM7QUFDOUMsT0FBTyxFQUFDLFVBQVUsRUFBQyxNQUFNLG9CQUFvQixDQUFDO0FBQzlDLE9BQU8sRUFBQyxVQUFVLEVBQUMsTUFBTSxvQkFBb0IsQ0FBQzs7O0FBSzlDLE1BQU0sT0FBTyxjQUFjOzs7O0lBRXZCLFlBQW9CLFFBQWtCO1FBQWxCLGFBQVEsR0FBUixRQUFRLENBQVU7UUFDbEMsSUFBSSxDQUFDLFlBQVksQ0FBQyxXQUFXLENBQUMsR0FBRyxDQUFDLElBQUksRUFBRSxVQUFVLENBQUMsU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G4gICAgICAgIHRoaXMubWVzc2FnZVN0YXRlLm1lc3NhZ2VzLnNldCgnTUFUQ0hJTkdfRVJST1JfTEFCRUwnLCBtYXRjaGluZ0Vycm9yTGFiZWwpO1xuICAgICAgICB0aGlzLm1lc3NhZ2VTdGF0ZS5tZXNzYWdlcy5zZXQoJ05PX0lOVEVSTkVUX0NPTk5FQ1RJT05fTEFCRUwnLCBub0ludGVybmV0Q29ubmVjdGlvbkxhYmVsKTtcbiAgICAgICAgdGhpcy5tZXNzYWdlU3RhdGUubWVzc2FnZXMuc2V0KCdVU0VSX1RPT19GQVJfTEFCRUwnLCB1c2VyVG9vRmFyTGFiZWwpO1xuICAgICAgICB0aGlzLm1lc3NhZ2VTdGF0ZS5tZXNzYWdlcy5zZXQoJ1VTRVJfTk9UX0NFTlRFUl9MQUJFTCcsIHVzZXJOb3RDZW50ZXJMYWJlbCk7XG4gICAgfVxuXG4gICAgcHVibGljIGluaXRMYW5ndWFnZSgpOiB2b2lkIHtcbiAgICAgICAgdGhpcy5tZXNzYWdlU3RhdGUubGFuZ3VhZ2VGaWxlID0gdGhpcy5tZXNzYWdlU3RhdGUubWFwTGFuZ3VhZ2UuZ2V0KG5hdmlnYXRvci5sYW5ndWFnZS5zdWJzdHIoMCwgMikpO1xuICAgICAgICBpZiAoIXRoaXMubWVzc2FnZVN0YXRlLmxhbmd1YWdlRmlsZSkge1xuICAgICAgICAgICAgdGhpcy5tZXNzYWdlU3RhdGUubGFuZ3VhZ2VGaWxlID0gTGFuZ3VhZ2VFbjtcbiAgICAgICAgfVxuICAgIH1cblxufVxuIl19 |
@@ -39,3 +39,3 @@ /** | ||
if (!this.messageState.messages.get(label) && this.messageState.languageFile) { | ||
return this.messageState.languageFile.get(label); | ||
return this.messageState.languageFile.messages.get(label); | ||
} | ||
@@ -146,2 +146,2 @@ else { | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVzc2FnZS5zZXJ2aWNlLm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JORVRfQ09OTkVDVElPTl9MQUJFTCcsIG5vSW50ZXJuZXRDb25uZWN0aW9uTGFiZWwpO1xuICAgICAgICB0aGlzLm1lc3NhZ2VTdGF0ZS5tZXNzYWdlcy5zZXQoJ1VTRVJfVE9PX0ZBUl9MQUJFTCcsIHVzZXJUb29GYXJMYWJlbCk7XG4gICAgICAgIHRoaXMubWVzc2FnZVN0YXRlLm1lc3NhZ2VzLnNldCgnVVNFUl9OT1RfQ0VOVEVSX0xBQkVMJywgdXNlck5vdENlbnRlckxhYmVsKTtcbiAgICB9XG5cbiAgICBwdWJsaWMgaW5pdExhbmd1YWdlKCk6IHZvaWQge1xuICAgICAgICB0aGlzLm1lc3NhZ2VTdGF0ZS5sYW5ndWFnZUZpbGUgPSB0aGlzLm1lc3NhZ2VTdGF0ZS5tYXBMYW5ndWFnZS5nZXQobmF2aWdhdG9yLmxhbmd1YWdlLnN1YnN0cigwLCAyKSk7XG4gICAgICAgIGlmICghdGhpcy5tZXNzYWdlU3RhdGUubGFuZ3VhZ2VGaWxlKSB7XG4gICAgICAgICAgICB0aGlzLm1lc3NhZ2VTdGF0ZS5sYW5ndWFnZUZpbGUgPSBMYW5ndWFnZUVuO1xuICAgICAgICB9XG4gICAgfVxuXG59XG4iXX0= |
{ | ||
"name": "@id3/face-pad", | ||
"version": "1.5.8", | ||
"version": "1.5.10", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "peerDependencies": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1621402
7