"use strict"; var CloudExperienceHost; (function (CloudExperienceHost) { var Hello; (function (Hello) { function localizedStrings() { var helloResources = {}; var keyList = ['Title', 'LeadTextFace', 'LeadTextFingerprint', 'LeadTextFaceFingerprint', 'SkipLink', 'DisambiguationTitle', 'DisambiguationLeadText', 'FaceOptionTitle', 'FaceOptionDescription', 'FingerOptionTitle', 'FingerOptionDescription', 'NextButton']; var i = 0; for (i = 0; i < keyList.length; i++) { var resourceId = '/hello/' + keyList[i]; helloResources[keyList[i]] = WinJS.Resources.getString(resourceId).value; } return JSON.stringify(helloResources); } Hello.localizedStrings = localizedStrings; function getSupportedHelloEnrollmentKinds() { return new WinJS.Promise(function (completeDispatch, errorDispatch) { var helloEnrollmentManager = new CloudExperienceHostBroker.Hello.HelloEnrollmentManager(); helloEnrollmentManager.getSupportedEnrollmentKindsAsync().done(function (winrtKinds) { var supportedKinds = {}; if (winrtKinds & CloudExperienceHostBroker.Hello.EnrollmentFlags.face) { supportedKinds.face = true; } if (winrtKinds & CloudExperienceHostBroker.Hello.EnrollmentFlags.fingerprint) { supportedKinds.fingerprint = true; } completeDispatch(JSON.stringify(supportedKinds)); }, function (e) { errorDispatch(e); }); }); } Hello.getSupportedHelloEnrollmentKinds = getSupportedHelloEnrollmentKinds; function startHelloEnrollment(kind) { var winrtKind; if (kind && kind.face) { winrtKind = CloudExperienceHostBroker.Hello.EnrollmentFlags.face; } else if (kind && kind.fingerprint) { winrtKind = CloudExperienceHostBroker.Hello.EnrollmentFlags.fingerprint; } else { throw new CloudExperienceHost.InvalidArgumentError("No supported Hello enrollment type provided"); } return new WinJS.Promise(function (completeDispatch, errorDispatch) { var helloEnrollmentManager = new CloudExperienceHostBroker.Hello.HelloEnrollmentManager(); helloEnrollmentManager.showEnrollmentAsync(winrtKind).done(function (enrolledSuccessfully) { completeDispatch(enrolledSuccessfully); }, function (e) { errorDispatch(e); }); }); } Hello.startHelloEnrollment = startHelloEnrollment; })(Hello = CloudExperienceHost.Hello || (CloudExperienceHost.Hello = {})); })(CloudExperienceHost || (CloudExperienceHost = {})); var CloudExperienceHost; (function (CloudExperienceHost) { var HelloCleanup; (function (HelloCleanup) { function cleanupHelloEnrollment() { return new WinJS.Promise(function (completeDispatch, errorDispatch) { var helloEnrollmentManager = new CloudExperienceHostBroker.Hello.HelloEnrollmentManager(); helloEnrollmentManager.cleanupEnrollmentAsync().done(function () { completeDispatch(); }, function (e) { errorDispatch(e); }); }); } HelloCleanup.cleanupHelloEnrollment = cleanupHelloEnrollment; })(HelloCleanup = CloudExperienceHost.HelloCleanup || (CloudExperienceHost.HelloCleanup = {})); })(CloudExperienceHost || (CloudExperienceHost = {}));