var __extends,__spreadArrays,profileDataModule,__decorate,MeePortal;(function(n){var t;(function(t){var i;(function(t){var i;(function(t){function r(n,t,r){var f,u;i&&(i.result=2,i.customData.errorMessage=r.message,i.customData.stackTrace=r.stack,i.__finish());f=n.getActiveComponentOperations();f.forEach(function(n){n.result=2;n.customData.errorMessage=r.message;n.customData.stackTrace=r.stack;n.__finish()});u=n.getCurrentPage();u&&(u.customData.stackTrace=r.stack,n.finishCurrentPage({success:!1}))}function f(){return i}var i,u=angular.module("clientReliabilityModule",[]).config(["$provide",function(n){n.decorator("$exceptionHandler",["$delegate","$injector",function(n,t){return function(i,u){var f=t.get("pageReliabilityService"),e=t.get("componentReliabilityService");r(f,e,i);n(i,u)}}])}]);u.run(["$rootScope","pageReliabilityService","componentReliabilityService","performanceService",function(t,r,u,f){var e;i=u.trackComponentOperation(n.Telemetry.portalAreaName+".app",2e4);e=t.$on("$stateChangeStart",function(){var t,n;i.customData.startTime=i.getStartTime();i.customData.endTime=f.nowOrNaN();t=i.customData.endTime;i.durationMs=t;i.result=1;i.__finish();n=r.getCurrentPage();n&&(n.customData.alt=t,n.kind="application",i=null);e()})}]);t.getApplicationLoadOperation=f})(i=t.ClientReliability||(t.ClientReliability={}))})(i=t.Angular||(t.Angular={}))})(t=n.Shared||(n.Shared={}))})(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i;(function(t){var i;(function(t){var r="Ms.Osgs.ClientReliability",u=function(){function n(n,t,i,r,u,f,e){var o=this;this.name=n;this.timeoutMs=t;this.$timeout=i;this.logger=r;this.eventLogger=u;this.performanceService=f;this.pageOperation=e;this.result=0;this.kind="component";this.customData={};this.loggerId="ComponentOperation";this.__finish=function(){o.isFinished()||(o.$timeout.cancel(o.timeoutPromise),o.timeoutPromise=null,o.durationMs||(o.durationMs=o.performanceService.nowOrNaN()-o.startTime),o.eventLogger.reportEvent(o),o.logger.trace(o.loggerId,"Component finishes",o.name))};this.getStartTime=function(){return o.startTime};this.isFinished=function(){return!o.timeoutPromise};this.startTime=this.performanceService.nowOrNaN();this.timeoutPromise=this.$timeout(function(){r.trace(o.loggerId,"Component timeout",n);o.result=4;o.__finish()},t);r.trace(this.loggerId,"Component starts",n)}return n.prototype.getPageOperation=function(){return this.pageOperation},n}(),i=function(){function t(t,i,f,e){var o=this;this.$timeout=t;this.telemetryService=i;this.logger=f;this.performanceService=e;this.loggerId="ComponentOperation";this.trackComponentOperation=function(n,t,i){return new u(n,t,o.$timeout,o.logger,o,o.performanceService,i)};this.reportEvent=function(t){var u,f,e;if(t&&t.isFinished()){var s={name:r,content:{}},h=n.Telemetry.portalAreaName||"default",i=t.name;t.kind==="component"&&(u=t.getPageOperation(),i=u&&u.name||"unknown");s.content[r]={uri:o.telemetryService.portalBi.getCurrentLocation(),referrerUri:o.telemetryService.portalBi.getCurrentReferrer(),pageName:i,area:h,name:t.name,result:t.result,durationMs:t.durationMs,kind:t.kind,data:JSON.stringify(t.customData,o.$errorSerializer)};o.telemetryService.portalQos.reportRawEvent(s);t.result===3&&t.kind==="component"&&o.logger.trace(o.loggerId,"Component "+t.name+" was cancelled. If it was specified as a requiredComponent on the "+i+" page, then its QoS will be impacted.");switch(t.kind){case"application":case"page":f={loadTimeMsec:t.durationMs||0};"application"===t.kind&&(f.application={loadTimeMsec:t.customData.alt||0});e=[{name:"area",value:h},{name:"pageName",value:i},{name:"result",value:t.result}];t.result!==1&&t.kind==="page"&&e.push({name:"failedRequiredComponent",value:t.customData.componentsNotLoaded});o.telemetryService.portalClientPerf.reportViewPerformanceMetrics(f,e)}}}}return t.prototype.$errorSerializer=function(n,t){if(t instanceof Error){var i={};return Object.getOwnPropertyNames(t).forEach(function(n){i[n]=t[n]}),i}return t},t}();t.ComponentReliabilityService=i;i.$inject=["$timeout","telemetryService","loggingService","performanceService"];angular.module("clientReliabilityModule").service("componentReliabilityService",i)})(i=t.ClientReliability||(t.ClientReliability={}))})(i=t.Angular||(t.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i;(function(t){var i;(function(){var t=function(){function t(n,t,i,r,u,f){var e=this;this.componentReliabilityService=n;this.telemetryService=t;this.$rootScope=i;this.$timeout=r;this.$state=u;this.$q=f;this.activeComponentOperations=[];this.loadedComponents=[];this.requiredComponents=[];this.optionalComponents=[];this.expectedTransitions=[];this.ignoreCancelledComponents=!1;i.$on("$stateChangeStart",function(n,t,i,r,u){e.onUiStateChangeStart(t,i,r,u)});i.$on("$stateChangeSuccess",function(n,t,i,r,u){e.onUiStateChangeSuccess(t,i,r,u)})}return t.prototype.getCurrentPage=function(){return this.currentPage},t.prototype.finishCurrentPage=function(n){this.currentPage&&!this.currentPage.isFinished()&&(this.currentPage.result=n.success?1:2,this.currentPage.__finish())},t.prototype.trackComponentOperation=function(n,i){if(i===void 0&&(i=t.DefaultComponentTimeoutMsec),!n)return null;if(this.requiredComponents.indexOf(n)===-1&&this.optionalComponents.indexOf(n)===-1)throw new Error(this.currentPage.name+" - Please add Component: "+n+" to either requiredComponents or optionalComponents in route registration.");var r=this.componentReliabilityService.trackComponentOperation(n,i,this.currentPage);return this.activeComponentOperations.push(r),r},t.prototype.addRequiredComponentName=function(n){this.requiredComponents.push(n)},t.prototype.finishComponent=function(n,t){if(n&&!n.isFinished()){n.result=t||2;n.__finish();this.removeItemIfExist(this.activeComponentOperations,n);n.result===1&&this.loadedComponents.push(n.name);var i=this.requiredComponents.indexOf(n.name);if(i!==-1){if(n.result!==1&&!(n.result===3&&this.ignoreCancelledComponents)){this.setFailedComponentInformationForTracking();this.finishCurrentPage({success:!1});return}this.requiredComponents.splice(i,1)}this.finishCurrentPageWhenAllRequiredComponentsLoaded()}},t.prototype.destroyComponent=function(n){var t=this;n&&this.$timeout().then(function(){n.isFinished()||(t.$state.current._isFatalErrorPage?t.finishComponent(n,2):(n.result=3,n.__finish()));t.removeItemIfExist(t.getLoadedComponents(),n.name)})},t.prototype.getActiveComponentOperations=function(){return this.activeComponentOperations},t.prototype.getLoadedComponents=function(){return this.loadedComponents},t.prototype.getComponentNameFromDomElement=function(n){return n.attr("data-rid")||n.attr("id")||""},t.prototype.overrideDefaultTimeout=function(n){t.DefaultComponentTimeoutMsec=n;t.DefaultPageTimeoutMsec=n},t.prototype.getDefaultComponentTimeout=function(){return t.DefaultComponentTimeoutMsec},t.prototype.completeOrCancelCurrentPageIfNotFinished=function(n){this.currentPage&&!this.currentPage.isFinished()&&(this.expectedTransitions.indexOf(n.name)===-1?(this.currentPage.result=3,this.setFailedComponentInformationForTracking()):this.currentPage.result=1,this.currentPage.__finish())},t.prototype.removeItemIfExist=function(n,t){var i=n.indexOf(t);i!==-1&&n.splice(i,1)},t.prototype.isAllRequiredComponentLoaded=function(){return this.requiredComponents.length===0},t.prototype.finishCurrentPageWhenAllRequiredComponentsLoaded=function(){this.isAllRequiredComponentLoaded()&&this.finishCurrentPage({success:!0})},t.prototype.ignoreStateChange=function(n,t){return n.data&&n.data.alwaysLogPageView?!1:!n.url&&n.name.indexOf(t.name)>-1?!0:this.lastKnownUrl===n.url&&angular.equals(n.params,this.lastKnownStateParams)?!0:!1},t.prototype.prepareComponentLists=function(n){var t,i,r;n&&(n.data&&(n.data.hasOwnProperty("requiredComponents")&&n.data.requiredComponents&&(t=this.requiredComponents).push.apply(t,n.data.requiredComponents),n.data.hasOwnProperty("optionalComponents")&&n.data.optionalComponents&&(i=this.optionalComponents).push.apply(i,n.data.optionalComponents),n.data.hasOwnProperty("expectedTransitions")&&n.data.expectedTransitions&&(r=this.expectedTransitions).push.apply(r,n.data.expectedTransitions)),this.prepareComponentLists(n.parent))},t.prototype.defaultBiPageView=function(t){return{path:"/"+n.Telemetry.portalAreaName+"/"+t.name.replace(".","/"),viewId:n.Telemetry.portalAreaName+"."+t.name}},t.prototype.onUiStateChangeStart=function(i,r,u,f){var o=this,s,h,e,c,l;this.ignoreStateChange(i,u)||(s=this.findStateWithUrl(i),this.completeOrCancelCurrentPageIfNotFinished(i),this.expectedTransitions=[],this.requiredComponents=[],this.optionalComponents=[],h=(n.Telemetry.portalAreaName||"default")+"."+s.name,this.currentPage=this.componentReliabilityService.trackComponentOperation(h,t.DefaultPageTimeoutMsec,null),this.currentPage.kind="page",e=this.$q.defer(),i.data&&i.data.pageReadyEvent?(c=this.$timeout(function(){return e.reject()},t.DefaultPageTimeoutMsec),l=this.$rootScope.$on(i.data.pageReadyEvent,function(){o.$timeout.cancel(c);e.resolve()}),e.promise.finally(function(){return l()})):e.resolve(),e.promise.finally(function(){var n;n=i.data&&i.data.biPageView?i.data.biPageView(i,r,u,f):o.defaultBiPageView(i,r,u,f);o.telemetryService.portalBi.reportSpaPageView(n)}))},t.prototype.onUiStateChangeSuccess=function(n,t,i){var r=this,u;this.ignoreStateChange(n,i)||(u=this.findStateWithUrl(n),this.lastKnownUrl=u.url&&u.url.toString(),this.lastKnownStateParams=angular.copy(n.params),this.prepareComponentLists(this.$state.$current),this.ignoreCancelledComponents=n.data&&n.data.ignoreCancelledComponents,this.requiredComponents.length>0?this.$timeout(function(){for(var n=r.requiredComponents.length-1;n>=0;n--)r.getLoadedComponents().indexOf(r.requiredComponents[n])!==-1&&r.requiredComponents.splice(n,1);r.finishCurrentPageWhenAllRequiredComponentsLoaded()}):this.finishCurrentPageWhenAllRequiredComponentsLoaded())},t.prototype.findStateWithUrl=function(n){if(n._isFatalErrorPage)return n;for(var t=n.name||"undefined";n.url!=="^";){if(n.url)return n;n=this.$state.get("^",n)}throw new Error('state "'+t+'" does not roll up to a state with a URL.');},t.prototype.setFailedComponentInformationForTracking=function(){this.currentPage.customData||(this.currentPage.customData={});this.currentPage.customData.componentsNotLoaded=this.requiredComponents},t.$inject=["componentReliabilityService","telemetryService","$rootScope","$timeout","$state","$q"],t.DefaultPageTimeoutMsec=15e3,t.DefaultComponentTimeoutMsec=15e3,t}();angular.module("clientReliabilityModule").service("pageReliabilityService",t)})(i=t.ClientReliability||(t.ClientReliability={}))})(i=t.Angular||(t.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n){this.$window=n}return n.prototype.nowOrNaN=function(){return this.$window.performance&&this.$window.performance.now?this.$window.performance.now():NaN},n.$inject=["$window"],n}();n.PerformanceService=t;angular.module("clientReliabilityModule").service("performanceService",t)})(t=n.ClientReliability||(n.ClientReliability={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(t,i,r){return function(u){var f=function(t){function i(n){for(var r,u=[],i=1;i<arguments.length;i++)u[i-1]=arguments[i];return r=t.apply(this,u)||this,r.pageReliabilityService=n,r}return __extends(i,t),i.prototype.$onInit=function(){var i=this,r,u;if(t.prototype.$onInit)throw new Error("$onInit is not supported, please use componentOnInit instead.");if(!this.componentOnInit)throw new Error("componentOnInit is not defined, please implement IComponentReliability interface.");if(!this.getInstrumentationComponentName)throw new Error("getInstrumentationComponentName is not defined, please implement IComponentReliability interface.");this.componentOperation=this.pageReliabilityService.trackComponentOperation(this.getInstrumentationComponentName());r=this.getCustomOperationData&&this.getCustomOperationData()||{};n.InstrumentedComponentHelper.setCustomOperationData(r,this.componentOperation);u=this.componentOnInit();n.InstrumentedComponentHelper.isAngularPromise(u)?u.then(function(){r=i.getCustomOperationData&&i.getCustomOperationData()||{};n.InstrumentedComponentHelper.setCustomOperationData(r,i.componentOperation);i.pageReliabilityService.finishComponent(i.componentOperation,1)},function(t){r=i.getCustomOperationData&&i.getCustomOperationData()||{};r.error=t;n.InstrumentedComponentHelper.setCustomOperationData(r,i.componentOperation);i.pageReliabilityService.finishComponent(i.componentOperation,2)}):(r=this.getCustomOperationData&&this.getCustomOperationData()||{},n.InstrumentedComponentHelper.setCustomOperationData(r,this.componentOperation),this.pageReliabilityService.finishComponent(this.componentOperation,1),console.warn("instrumentedComponent: Instrumented components should return a promise in componentOnInit(). If your component does not retrieve any data or your component does not need to be instrumented, consider using the Component decorator instead."))},i.prototype.$onDestroy=function(){t.prototype.$onDestroy&&t.prototype.$onDestroy.call(this);this.pageReliabilityService.destroyComponent(this.componentOperation)},i.dependencies=["pageReliabilityService"],i.$inject=u.$inject?i.dependencies.concat(u.$inject):i.dependencies,i}(u);return angular.module(t).component(i,angular.extend(r,{controller:f})),f}}n.InstrumentedComponent=t})(t=n.ClientReliability||(n.ClientReliability={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return!!n&&!!n.then&&!!n.catch&&!!n.finally}function i(n,t){if(t){t.customData={};for(var i in n)t.customData[i]=n[i]}}n.isAngularPromise=t;n.setCustomOperationData=i})(t=n.InstrumentedComponentHelper||(n.InstrumentedComponentHelper={}))})(t=n.ClientReliability||(n.ClientReliability={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));__spreadArrays=this&&this.__spreadArrays||function(){for(var i=0,n=0,r=arguments.length;n<r;n++)i+=arguments[n].length;for(var u=Array(i),f=0,n=0;n<r;n++)for(var e=arguments[n],t=0,o=e.length;t<o;t++,f++)u[f]=e[t];return u},function(n){var t;(function(n){var t;(function(n){var t;(function(n){function i(t,i,r,u,f,e,o,s){var l,c=o||{},v=s?s:r.getDefaultComponentTimeout(),h=i.trackComponentOperation(f+":"+e,v);n.InstrumentedComponentHelper.setCustomOperationData(c,h);try{l=t()}catch(a){h.result=2;c.error=a;n.InstrumentedComponentHelper.setCustomOperationData(c,h);h.__finish();throw a;}return n.InstrumentedComponentHelper.isAngularPromise(l)?l.then(function(n){return h.result=1,u.resolve(n)}).catch(function(n){return h.result=2,c.error=n,u.reject(n)}).finally(function(){n.InstrumentedComponentHelper.setCustomOperationData(c,h);h.__finish()}):(h.result=1,n.InstrumentedComponentHelper.setCustomOperationData(c,h),h.__finish(),l)}function r(n){t=n}function u(n,r){return function(u,f){var e=u[f];return u[f]=function(){for(var u,s,h,c=this,o=[],f=0;f<arguments.length;f++)o[f]=arguments[f];if(u=t,u||(u=angular.element(document.querySelector(".ng-scope")).injector()),!u||!u.invoke)throw new Error("Could not obtain AngularJS injector instance. For unit tests call __overrideInstrumentedComponentOperationInjectorForTests() before the component is initialized.");if(!this.getInstrumentationComponentName)throw new Error("Instrumented Component Operation: Make sure the class has implemented the IComponentReliabilityOperations interface.");return s=e.bind.apply(e,__spreadArrays([this],o)),h=this.getCustomOperationData&&this.getCustomOperationData(),u.invoke(["pageReliabilityService","componentReliabilityService","$q",function(t,u,f){return i(s,u,t,f,c.getInstrumentationComponentName(),n,h,r)}])}}}var t;n.__overrideInstrumentedComponentOperationInjectorForTests=r;n.InstrumentedComponentOperation=u})(t=n.ClientReliability||(n.ClientReliability={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i;(function(t){var i;(function(t){function f(t){return function(r){var c=t.get("$state"),e=t.get("$log"),l=t.get("$timeout"),o=t.get("$window"),a=t.get("pageReliabilityService");r.stack?e.error(r.stack):e.error("Unhandled exception occurred, but no stack information was provided.");o.portalUnhandledException&&i.unhandledErrors||(o.portalUnhandledException=r.stack||r.message);try{var f=/\/([^/]+\.js):(\d+):\d+/.exec(r.stack||""),s="",h=0;f&&(s=f[1],h=parseInt(f[2]));n.Telemetry.globalErrorLoggingHandler(s,r.message,h,r.stack)}finally{i.unhandledErrors++;i.pendingSwitchToFatalErrorState||(i.pendingSwitchToFatalErrorState=l(1e3).then(function(){var n=i.unhandledErrors!==0;i={unhandledErrors:0,pendingSwitchToFatalErrorState:null};n&&(a.finishCurrentPage({success:!1}),c.go(u))}))}}}var i;t.moduleName="unhandledExceptionHandlerModule";var u="fatalError",r=angular.module(t.moduleName,["ui.router","ngRoute"]).config(["$stateProvider",function(n){n.state(u,{template:"<fatal-error><\/fatal-error>",_isFatalErrorPage:!0,params:{_modalDismissQuietly:!0},allowAnonymous:!0})}]).config(["$qProvider",function(n){n.errorOnUnhandledRejections(!1)}]),e={data:{title:"",summary:""}};r.constant("fatalErrorCmsContent",e);r.run(["portalAjaxServiceAngular",function(n){n.get({serviceName:"MeePortal",operationName:"GetFatalErrorPageContent",url:"/CmsContent/fatalError",contentType:"application/json"}).then(function(n){e.data=n.data})}]);i={unhandledErrors:0};r.run(["$rootScope","$meeWatchOperationProgress",function(n,t){t(n,function(n,t){t==="failed"&&i.unhandledErrors--})}]);r.run(["$rootScope","$window",function(n,t){n.$on("$stateChangeStart",function(n,i){i.name!==u&&(t.portalUnhandledException=undefined)})}]);t.portalExceptionHandlerFactory=f;f.$inject=["$injector"];r.factory("$exceptionHandler",f)})(i=t.UnhandledExceptionHandler||(t.UnhandledExceptionHandler={}))})(i=t.Angular||(t.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n,t){var i=this;this.fatalErrorCmsContent=n;this.telemetryService=t;this.$onInit=function(){angular.element("#site-footer").show()};this.getCurrentCvValue=function(){return i.telemetryService.portalCv.getCurrentCvValue()}}return n.$inject=["fatalErrorCmsContent","telemetryService"],n}();angular.module(n.moduleName).component("fatalError",{template:'<div class="full-height">\n                      <header class="page-title-header text-center">\n                        <h1 mee-heading="heading2" id="error-title" class="text-center-align">{{$ctrl.fatalErrorCmsContent.data.title}}<\/h1>\n                        <p mee-heading="subheading2" id="error-summary" class="text-center-align">{{$ctrl.fatalErrorCmsContent.data.summary}}<\/p>\n                      <\/header>\n                      <div>\n                        <p mee-paragraph="para3" class="text-center-align">TraceId: {{$ctrl.getCurrentCvValue()}}<\/p>\n                     <\/div>\n                  <\/div>\n                ',controller:t})})(t=n.UnhandledExceptionHandler||(n.UnhandledExceptionHandler={}))})(t=n.Angular||(n.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i;(function(i){var r;(function(){var i=function(){function i(n,t,i,r,u,f,e){this.$window=n;this.catpchaConfig=t;this.commonConfig=i;this.scriptLoader=r;this.formatString=u;this.$element=f;this.componentRegistryService=e;this.errorPrefix="captchaComponent: ";this.captchaScriptsId="captcha-challenge-scripts";this.componentClassName="Captcha";this.isHipClientLoaded=!1;this.isReloaded=!1}return i.prototype.getInstrumentationComponentName=function(){return"captcha.component"},i.prototype.componentOnInit=function(){var r=this,t,i;return this.setupGlobals(),t=Math.random(),this.flowId=n.Utilities.generateGuid().replace(new RegExp("-","g"),""),this.componentRegistryService.register(this.componentClassName,this.componentId,this),i=this.formatString(this.catpchaConfig.javascriptUrlFormat,[this.catpchaConfig.javascriptUrlDomain,this.commonConfig.userCulture,this.flowId,this.catpchaConfig.scenarioId,t]),this.$window.addEventListener("resize",function(){return r.resizeCaptcha()}),this.resizeCaptcha(),this.scriptLoader.loadScript(i,"#"+this.captchaScriptsId)},i.prototype.$onDestroy=function(){this.$window.removeEventListener("resize",this.resizeCaptcha)},i.prototype.resizeCaptcha=function(){var n=this.$element.find("#captcha-challenge"),t=this.$element.find(".hip-input");t&&n&&n.width()&&t.css("width",n.width())},i.prototype.verify=function(){var t=this,n;if(!this.isHipClientLoaded)throw new Error("The captcha element is not initialized.");return n=null,WebHip.verify(function(i,r){WebHip.clientValidation();var u=!0;WebHip.error!==0&&(t.reload(),u=!1);n={isSuccess:u,solution:i,hid:r,flowId:t.flowId}}),n},i.prototype.reload=function(){WebHip.reloadHIP(1);this.isReloaded=!0},i.prototype.postLoad=function(){if(this.isHipClientLoaded=!0,this.isReloaded&&this.invalidInputMessage){var n=WebHip.setFocus();this.$element.find("#"+n).attr("aria-label",this.invalidInputMessage)}},i.prototype.instructionOutsideCallback=function(n){var t=this.$element.find("#captcha-input-label");t.html(n)},i.prototype.setupGlobals=function(){var n=this.$element.find("#captcha-challenge"),t=500;n&&n.width()&&(t=n.width());this.$window.WebHip={showMenu:!0,showError:!0,errorMessage:"",instructionsInside:!1,showInstruction:!1,holder:"captcha-challenge-holder",scriptHolder:""+this.captchaScriptsId,inputWidth:t,type:"visual",cssSet:{cssCdHIPMenu:"hip-menu",cssCdHIPInput:"hip-input",cssCdHIPLink:"hip-link",cssCdHIPError:"hip-error",cssCdHIPErrorImg:"hip-error-image"},postLoad:this.postLoad.bind(this),instructionOutsideCallback:this.instructionOutsideCallback.bind(this)}},i.$inject=["$window","captchaConfig","commonConfig","scriptLoaderService","stringFormatFilter","$element","componentRegistryService"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("verify")],i.prototype,"verify",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("reload")],i.prototype,"reload",null),__decorate([t.Angular.ClientReliability.InstrumentedComponent("captchaModule","captcha",{template:'<div class="captcha-section">\n                           <div id="captcha-challenge">\n                               <div id="captcha-challenge-holder">\n                               <\/div>\n                               <label id="captcha-input-label" aria-hidden="true">\n                               <\/label>\n                               <div id="captcha-challenge-scripts">\n                               <\/div>\n                           <\/div>\n                       <\/div>',bindings:{componentId:"<",invalidInputMessage:"<?"}})],i)}()})(r=i.Components||(i.Components={}))})(i=t.Angular||(t.Angular={}))})(t=n.Shared||(n.Shared={}))}(MeePortal||(MeePortal={}));
/*!
 * jQuery Color Animations v2.0pre
 *
 * Microsoft grants you the right to use these JavaScript files for the sole purpose of either: 
 * (i) interacting through your browser with the Microsoft website, subject to the website's terms of use; or 
 * (ii) using the files as included with a Microsoft product subject to that product's license terms. 
 * Microsoft reserves all other rights to the files not expressly granted by Microsoft, whether by implication, estoppel or otherwise. 
 * The notices and licenses below are for informational purposes only.
 *
 * Copyright 2011 John Resig
 *
 * Provided for Informational Purposes Only
 *
 * MIT License
 * Permission is hereby granted, free of charge, to any person 
 * obtaining a copy of this software and associated documentation 
 * files (the "Software"), to deal in the Software without 
 * restriction, including without limitation the rights to use, 
 * copy, modify, merge, publish, distribute, sublicense, and/or sell 
 * copies of the Software, and to permit persons to whom the 
 * Software is furnished to do so, subject to the following 
 * conditions:
 *
 * The above copyright notice and this permission notice shall be 
 * included in all copies or substantial portions of the Software. 
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 
 * OR OTHER DEALINGS IN THE SOFTWARE.
 */
(function(n,t){function e(n,t,i){var r=s[t.type]||{},u=t.empty||i;return u&&n==null?null:t.def&&n==null?t.def:(n=r.floor?~~n:parseFloat(n),n==null||isNaN(n))?t.def:r.mod?(n=n%r.mod,n<0?r.mod+n:n):r.min>n?r.min:r.max<n?r.max:n}function l(t){var e=i(),o=e._rgba=[];return(t=t.toLowerCase(),r(y,function(n,i){var f=i.re.exec(t),s=f&&i.parse(f),r,h=i.space||"rgba",c=u[h].cache;if(s)return r=e[h](s),e[c]=r[c],o=e._rgba=r._rgba,!1}),o.length!==0)?(Math.max.apply(Math,o)===0&&n.extend(o,f.transparent),e):(t=f[t])?t:void 0}function o(n,t,i){return(i=(i+1)%1,i*6<1)?n+(t-n)*6*i:i*2<1?t:i*3<2?n+(t-n)*(2/3-i)*6:n}var a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color outlineColor".split(" "),v=/^([\-+])=\s*(\d+\.?\d*)/,y=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(n){return[n[1],n[2],n[3],n[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(n){return[2.55*n[1],2.55*n[2],2.55*n[3],n[4]]}},{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,parse:function(n){return[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]}},{re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,parse:function(n){return[parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(n){return[n[1],n[2]/100,n[3]/100,n[4]]}}],i=n.Color=function(t,i,r,u){return new n.Color.fn.parse(t,i,r,u)},u={rgba:{cache:"_rgba",props:{red:{idx:0,type:"byte",empty:!0},green:{idx:1,type:"byte",empty:!0},blue:{idx:2,type:"byte",empty:!0},alpha:{idx:3,type:"percent",def:1}}},hsla:{cache:"_hsla",props:{hue:{idx:0,type:"degrees",empty:!0},saturation:{idx:1,type:"percent",empty:!0},lightness:{idx:2,type:"percent",empty:!0}}}},s={byte:{floor:!0,min:0,max:255},percent:{min:0,max:1},degrees:{mod:360,floor:!0}},h=u.rgba.props,c=i.support={},f,r=n.each;u.hsla.props.alpha=h.alpha;i.fn=i.prototype={constructor:i,parse:function(o,s,c,a){if(o===t)return this._rgba=[null,null,null,null],this;(o instanceof n||o.nodeType)&&(o=o instanceof n?o.css(s):n(o).css(s),s=t);var v=this,y=n.type(o),p=this._rgba=[];return(s!==t&&(o=[o,s,c,a],y="array"),y==="string")?this.parse(l(o)||f._default):y==="array"?(r(h,function(n,t){p[t.idx]=e(o[t.idx],t)}),this):y==="object"?(o instanceof i?r(u,function(n,t){o[t.cache]&&(v[t.cache]=o[t.cache].slice())}):r(u,function(n,t){r(t.props,function(n,i){var r=t.cache;if(!v[r]&&t.to){if(o[n]==null||n==="alpha")return;v[r]=t.to(v._rgba)}v[r][i.idx]=e(o[n],i,!0)})}),this):void 0},is:function(n){var e=i(n),t=!0,f=this;return r(u,function(n,i){var u=e[i.cache],o;return u&&(o=f[i.cache]||i.to&&i.to(f._rgba)||[],r(i.props,function(n,i){if(u[i.idx]!=null)return t=u[i.idx]===o[i.idx]})),t}),t},_space:function(){var n=[],t=this;return r(u,function(i,r){t[r.cache]&&n.push(i)}),n.pop()},transition:function(n,t){var f=i(n),c=f._space(),o=u[c],l=this[o.cache]||o.to(this._rgba),h=l.slice();return f=f[o.cache],r(o.props,function(n,i){var c=i.idx,r=l[c],u=f[c],o=s[i.type]||{};u!==null&&(r===null?h[c]=u:(o.mod&&(u-r>o.mod/2?r+=o.mod:r-u>o.mod/2&&(r-=o.mod)),h[i.idx]=e((u-r)*t+r,i)))}),this[c](h)},blend:function(t){if(this._rgba[3]===1)return this;var r=this._rgba.slice(),u=r.pop(),f=i(t)._rgba;return i(n.map(r,function(n,t){return(1-u)*f[t]+u*n}))},toRgbaString:function(){var i="rgba(",t=n.map(this._rgba,function(n,t){return n==null?t>2?1:0:n});return t[3]===1&&(t.pop(),i="rgb("),i+t.join(",")+")"},toHslaString:function(){var i="hsla(",t=n.map(this.hsla(),function(n,t){return n==null&&(n=t>2?1:0),t&&t<3&&(n=Math.round(n*100)+"%"),n});return t[3]===1&&(t.pop(),i="hsl("),i+t.join(",")+")"},toHexString:function(t){var i=this._rgba.slice(),r=i.pop();return t&&i.push(~~(r*255)),"#"+n.map(i,function(n){return n=(n||0).toString(16),n.length===1?"0"+n:n}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}};i.fn.parse.prototype=i.fn;u.hsla.to=function(n){if(n[0]==null||n[1]==null||n[2]==null)return[null,null,null,n[3]];var t=n[0]/255,i=n[1]/255,e=n[2]/255,h=n[3],r=Math.max(t,i,e),o=Math.min(t,i,e),u=r-o,s=r+o,f=s*.5,c,l;return c=o===r?0:t===r?60*(i-e)/u+360:i===r?60*(e-t)/u+120:60*(t-i)/u+240,l=f===0||f===1?f:f<=.5?u/s:u/(2-s),[Math.round(c)%360,l,f,h==null?1:h]};u.hsla.from=function(n){if(n[0]==null||n[1]==null||n[2]==null)return[null,null,null,n[3]];var r=n[0]/360,u=n[1],t=n[2],e=n[3],i=t<=.5?t*(1+u):t+u-t*u,f=2*t-i;return[Math.round(o(f,i,r+1/3)*255),Math.round(o(f,i,r)*255),Math.round(o(f,i,r-1/3)*255),e]};r(u,function(u,f){var s=f.props,o=f.cache,h=f.to,c=f.from;i.fn[u]=function(u){if(h&&!this[o]&&(this[o]=h(this._rgba)),u===t)return this[o].slice();var l=n.type(u),v=l==="array"||l==="object"?u:arguments,f=this[o].slice(),a;return r(s,function(n,t){var i=v[l==="object"?n:t.idx];i==null&&(i=f[t.idx]);f[t.idx]=e(i,t)}),c?(a=i(c(f)),a[o]=f,a):i(f)};r(s,function(t,r){i.fn[t]||(i.fn[t]=function(i){var f=n.type(i),h=t==="alpha"?this._hsla?"hsla":"rgba":u,o=this[h](),s=o[r.idx],e;return f==="undefined"?s:(f==="function"&&(i=i.call(this,s),f=n.type(i)),i==null&&r.empty)?this:(f==="string"&&(e=v.exec(i),e&&(i=s+parseFloat(e[2])*(e[1]==="+"?1:-1))),o[r.idx]=i,this[h](o))})})});r(a,function(t,r){n.cssHooks[r]={set:function(t,u){var o,f,e;if(n.type(u)!=="string"||(o=l(u))){if(u=i(o||u),!c.rgba&&u._rgba[3]!==1){e=r==="backgroundColor"?t.parentNode:t;do f=n.curCSS(e,"backgroundColor");while((f===""||f==="transparent")&&(e=e.parentNode)&&e.style);u=u.blend(f&&f!=="transparent"?f:"_default")}u=u.toRgbaString()}t.style[r]=u}};n.fx.step[r]=function(t){t.colorInit||(t.start=i(t.elem,r),t.end=i(t.end),t.colorInit=!0);n.cssHooks[r].set(t.elem,t.start.transition(t.end,t.pos))}});n(function(){var t=document.createElement("div"),n=t.style;n.cssText="background-color:rgba(1,1,1,.5)";c.rgba=n.backgroundColor.indexOf("rgba")>-1});f=n.Color.names={aqua:"#00ffff",azure:"#f0ffff",beige:"#f5f5dc",black:"#000000",blue:"#0000ff",brown:"#a52a2a",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkviolet:"#9400d3",fuchsia:"#ff00ff",gold:"#ffd700",green:"#008000",indigo:"#4b0082",khaki:"#f0e68c",lightblue:"#add8e6",lightcyan:"#e0ffff",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightyellow:"#ffffe0",lime:"#00ff00",magenta:"#ff00ff",maroon:"#800000",navy:"#000080",olive:"#808000",orange:"#ffa500",pink:"#ffc0cb",purple:"#800080",violet:"#800080",red:"#ff0000",silver:"#c0c0c0",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery);
/*!
 * jquery.Jcrop.js v0.9.12
 *
 * Microsoft grants you the right to use these JavaScript files for the sole purpose of either: 
 * (i) interacting through your browser with the Microsoft website, subject to the website's terms of use; or 
 * (ii) using the files as included with a Microsoft product subject to that product's license terms. 
 * Microsoft reserves all other rights to the files not expressly granted by Microsoft, whether by implication, estoppel or otherwise. 
 * The notices and licenses below are for informational purposes only.
 *
 * Author: Kelly Hallman <khallman@gmail.com>
 * Copyright (c) 2008-2013 Tapmodo Interactive LLC
 *
 * Provided for Informational Purposes Only
 *
 * MIT License
 * Permission is hereby granted, free of charge, to any person 
 * obtaining a copy of this software and associated documentation 
 * files (the "Software"), to deal in the Software without 
 * restriction, including without limitation the rights to use, 
 * copy, modify, merge, publish, distribute, sublicense, and/or sell 
 * copies of the Software, and to permit persons to whom the 
 * Software is furnished to do so, subject to the following 
 * conditions:
 *
 * The above copyright notice and this permission notice shall be 
 * included in all copies or substantial portions of the Software. 
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 
 * OR OTHER DEALINGS IN THE SOFTWARE.
 */
(function(n){n.Jcrop=function(t,i){function c(n){return Math.round(n)+"px"}function ft(n){return r.baseClass+"-"+n}function bi(){return n.fx.step.hasOwnProperty("backgroundColor")}function et(t){var i=n(t).offset();return[i.left,i.top]}function nt(n){return[n.pageX-b[0],n.pageY-b[1]]}function ri(t){typeof t!="object"&&(t={});r=n.extend(r,t);n.each(["onChange","onSelect","onRelease","onDblClick"],function(n,t){typeof r[t]!="function"&&(r[t]=function(){})})}function ui(n,t,i){if(b=et(e),p.setCursor(n==="move"?n:n+"-resize"),n==="move")return p.activateHandlers(di(t),pt,i);var u=s.getFixed(),r=fi(n),f=s.getCorner(fi(r));s.setPressed(s.getCorner(r));s.setCurrent(f);p.activateHandlers(ki(n,u),pt,i)}function ki(n,t){return function(i){if(r.aspectRatio)switch(n){case"e":i[1]=t.y+1;break;case"w":i[1]=t.y+1;break;case"n":i[0]=t.x+1;break;case"s":i[0]=t.x+1}else switch(n){case"e":i[1]=t.y2;break;case"w":i[1]=t.y2;break;case"n":i[0]=t.x2;break;case"s":i[0]=t.x2}s.setCurrent(i);u.update()}}function di(n){var t=n;return kt.watchKeys(),function(n){s.moveOffset([n[0]-t[0],n[1]-t[1]]);t=n;u.update()}}function fi(n){switch(n){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function ei(n){return function(t){return r.disabled?!1:n==="move"&&!r.allowMove?!1:(b=et(e),ut=!0,ui(n,nt(t)),t.stopPropagation(),t.preventDefault(),!1)}}function oi(n,t,i){var r=n.width(),u=n.height();r>t&&t>0&&(r=t,u=t/n.width()*n.height());u>i&&i>0&&(u=i,r=i/n.height()*n.width());h=n.width()/r;a=n.height()/u;n.width(r).height(u)}function ot(n){return{x:n.x*h,y:n.y*a,x2:n.x2*h,y2:n.y2*a,w:n.w*h,h:n.h*a}}function pt(){var n=s.getFixed();n.w>r.minSelect[0]&&n.h>r.minSelect[1]?(u.enableHandles(),u.done()):u.release();p.setCursor(r.allowSelect?"crosshair":"default")}function si(n){if(r.disabled||!r.allowSelect)return!1;ut=!0;b=et(e);u.disableHandles();p.setCursor("crosshair");var t=nt(n);return s.setPressed(t),u.update(),p.activateHandlers(gi,pt,n.type.substring(0,5)==="touch"),kt.watchKeys(),n.stopPropagation(),n.preventDefault(),!1}function gi(n){s.setCurrent(n);u.update()}function hi(){var t=n("<div><\/div>").addClass(ft("tracker"));return ti&&t.css({opacity:0,backgroundColor:"white"}),t}function nr(n){w.removeClass().addClass(ft("holder")).addClass(n)}function tr(n,t){function b(){window.setTimeout(k,d)}var l=n[0]/h,v=n[1]/a,p=n[2]/h,w=n[3]/a,k;if(!bt){var o=s.flipCoords(l,v,p,w),c=s.getFixed(),e=[c.x,c.y,c.x2,c.y2],i=e,d=r.animationDelay,g=o[0]-e[0],nt=o[1]-e[1],tt=o[2]-e[2],it=o[3]-e[3],f=0,rt=r.swingSpeed;l=i[0];v=i[1];p=i[2];w=i[3];u.animMode(!0);k=function(){return function(){f+=(100-f)/rt;i[0]=Math.round(l+f/100*g);i[1]=Math.round(v+f/100*nt);i[2]=Math.round(p+f/100*tt);i[3]=Math.round(w+f/100*it);f>=99.8&&(f=100);f<100?(yi(i),b()):(u.done(),u.animMode(!1),typeof t=="function"&&t.call(y))}}();b()}}function vi(n){yi([n[0]/h,n[1]/a,n[2]/h,n[3]/a]);r.onSelect.call(y,ot(s.getFixed()));u.enableHandles()}function yi(n){s.setPressed([n[0],n[1]]);s.setCurrent([n[2],n[3]]);u.refresh();u.update()}function ir(){return ot(s.getFixed())}function rr(){return s.getFixed()}function ur(n){ri(n);gt()}function pi(){r.disabled=!0;u.disableHandles();u.setCursor("default");p.setCursor("default")}function wi(){r.disabled=!1;gt()}function fr(){u.done();p.activateHandlers(null,null)}function er(){w.remove();l.show();l.css("visibility","visible");n(t).removeData("Jcrop")}function or(n,t){u.release();pi();var i=new Image;i.onload=function(){var u=i.width,s=i.height,h=r.boxWidth,c=r.boxHeight;e.width(u).height(s);e.attr("src",n);k.attr("src",n);oi(e,h,c);o=e.width();f=e.height();k.width(o).height(f);d.width(o+rt*2).height(f+rt*2);w.width(o).height(f);g.resize(o,f);wi();typeof t=="function"&&t.call(y)};i.src=n}function dt(n,t,i){var u=t||r.bgColor;r.bgFade&&bi()&&r.fadeTime&&!i?n.animate({backgroundColor:u},{queue:!1,duration:r.fadeTime}):n.css("backgroundColor",u)}function gt(n){r.allowResize?n?u.enableOnly():u.enableHandles():u.disableHandles();p.setCursor(r.allowSelect?"crosshair":"default");u.setCursor(r.allowMove?"move":"default");r.hasOwnProperty("trueSize")&&(h=r.trueSize[0]/o,a=r.trueSize[1]/f);r.hasOwnProperty("setSelect")&&(vi(r.setSelect),u.done(),delete r.setSelect);g.refresh();r.bgColor!=li&&(dt(r.shade?g.getShades():w,r.shade?r.shadeColor||r.bgColor:r.bgColor),li=r.bgColor);st!=r.bgOpacity&&(st=r.bgOpacity,r.shade?g.refresh():u.setBgOpacity(st));ht=r.maxSize[0]||0;ct=r.maxSize[1]||0;lt=r.minSize[0]||0;at=r.minSize[1]||0;r.hasOwnProperty("outerImage")&&(e.attr("src",r.outerImage),delete r.outerImage);u.refresh()}var r=n.extend({},n.Jcrop.defaults),b,ni=navigator.userAgent.toLowerCase(),ti=/msie/.test(ni),ii=/msie [1-6]\./.test(ni),vt,e,y;typeof t!="object"&&(t=n(t)[0]);typeof i!="object"&&(i={});ri(i);var wt={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},l=n(t),ci=!0;t.tagName=="IMG"?(l[0].width!=0&&l[0].height!=0?(l.width(l[0].width),l.height(l[0].height)):(vt=new Image,vt.src=l[0].src,l.width(vt.width),l.height(vt.height)),e=l.clone().removeAttr("id").css(wt).show(),e.width(l.width()),e.height(l.height()),l.after(e).hide()):(e=l.css(wt).show(),ci=!1,r.shade===null&&(r.shade=!0));oi(e,r.boxWidth,r.boxHeight);var o=e.width(),f=e.height(),w=n("<div />").width(o).height(f).addClass(ft("holder")).css({position:"relative",backgroundColor:r.bgColor}).insertAfter(l).append(e);r.addClass&&w.addClass(r.addClass);var k=n("<div />"),yt=n("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),tt=n("<div />").width("100%").height("100%").css("zIndex",320),it=n("<div />").css({position:"absolute",zIndex:600}).dblclick(function(){var n=s.getFixed();r.onDblClick.call(y,n)}).insertBefore(e).append(yt,tt);ci&&(k=n("<img />").attr("src",e.attr("src")).css(wt).width(o).height(f),yt.append(k));ii&&it.css({overflowY:"hidden"});var rt=r.boundary,d=hi().width(o+rt*2).height(f+rt*2).css({position:"absolute",top:c(-rt),left:c(-rt),zIndex:290}).mousedown(si),li=r.bgColor,st=r.bgOpacity,ht,ct,lt,at,h,a,ut,bt,ai;b=et(e);var v=function(){function n(){var i={},u=["touchstart","touchmove","touchend"],f=document.createElement("div"),t,n,r;try{for(t=0;t<u.length;t++)n=u[t],n="on"+n,r=n in f,r||(f.setAttribute(n,"return;"),r=typeof f[n]=="function"),i[u[t]]=r;return i.touchstart&&i.touchend&&i.touchmove||!!navigator.msMaxTouchPoints}catch(e){return!1}}function t(){return r.touchSupport===!0||r.touchSupport===!1?r.touchSupport:n()}return{createDragger:function(n){return function(t){return r.disabled?!1:n==="move"&&!r.allowMove?!1:(b=et(e),ut=!0,ui(n,nt(v.cfilter(t)),!0),t.stopPropagation(),t.preventDefault(),!1)}},newSelection:function(n){return si(v.cfilter(n))},cfilter:function(n){return n.pageX=n.originalEvent.changedTouches[0].pageX,n.pageY=n.originalEvent.changedTouches[0].pageY,n},isSupported:n(),support:t()}}(),s=function(){function w(r){r=y(r);u=n=r[0];i=t=r[1];e={reset:!0,w:0,h:0}}function b(r){r=y(r);c=r[0]-u;l=r[1]-i;u=r[0];i=r[1];e.reset&&(e.w=u-n,e.h=i-t,e.reset=!1)}function k(){return[c,l]}function d(r){var e=r[0],s=r[1];0>n+e&&(e-=e+n);0>t+s&&(s-=s+t);f<i+s&&(s+=f-(i+s));o<u+e&&(e+=o-(u+e));n+=e;u+=e;t+=s;i+=s}function g(n){var t=v();switch(n){case"ne":return[t.x2,t.y];case"nw":return[t.x,t.y];case"se":return[t.x2,t.y2];case"sw":return[t.x,t.y2]}}function v(){var b=u-n,k=i-t;if(r.preventSelectionFlipping&&(b*e.w<=0&&(b=e.w,u=b+n),k*e.h<=0&&(k=e.h,i=k+t)),e.w=b,e.h=k,!r.aspectRatio)return nt();var v=r.aspectRatio,g=r.minSize[0]/h,d=r.maxSize[0]/h,tt=r.maxSize[1]/a,it=Math.abs(b),rt=Math.abs(k),ut=it/rt,c,l,y,w;return d===0&&(d=o*10),tt===0&&(tt=f*10),ut<v?(l=i,y=rt*v,c=b<0?n-y:y+n,c<0?(c=0,w=Math.abs((c-n)/v),l=k<0?t-w:w+t):c>o&&(c=o,w=Math.abs((c-n)/v),l=k<0?t-w:w+t)):(c=u,w=it/v,l=k<0?t-w:t+w,l<0?(l=0,y=Math.abs((l-t)*v),c=b<0?n-y:y+n):l>f&&(l=f,y=Math.abs(l-t)*v,c=b<0?n-y:y+n)),c>n?(c-n<g?c=n+g:c-n>d&&(c=n+d),l=l>t?t+(c-n)/v:t-(c-n)/v):c<n&&(n-c<g?c=n-g:n-c>d&&(c=n-d),l=l>t?t+(n-c)/v:t-(n-c)/v),c<0?(n-=c,c=0):c>o&&(n-=c-o,c=o),l<0?(t-=l,l=0):l>f&&(t-=l-f,l=f),p(s(n,t,c,l))}function y(n){return n[0]<0&&(n[0]=0),n[1]<0&&(n[1]=0),n[0]>o&&(n[0]=o),n[1]>f&&(n[1]=f),[Math.round(n[0]),Math.round(n[1])]}function s(n,t,i,r){var u=n,f=i,e=t,o=r;return i<n&&(u=i,f=n),r<t&&(e=r,o=t),[u,e,f,o]}function nt(){var e=u-n,c=i-t,r;return ht&&Math.abs(e)>ht/h&&(u=e>0?n+ht/h:n-ht/h),ct&&Math.abs(c)>ct/a&&(i=c>0?t+ct/a:t-ct/a),at&&Math.abs(c)<at/a&&(i=c>0?t+at/a:t-at/a),lt&&Math.abs(e)<lt/h&&(u=e>0?n+lt/h:n-lt/h),n<0&&(u-=n,n-=n),t<0&&(i-=t,t-=t),u<0&&(n-=u,u-=u),i<0&&(t-=i,i-=i),u>o&&(r=u-o,n-=r,u-=r),i>f&&(r=i-f,t-=r,i-=r),n>o&&(r=n-f,i-=r,t-=r),t>f&&(r=t-f,i-=r,t-=r),p(s(n,t,u,i))}function p(n){return{x:n[0],y:n[1],x2:n[2],y2:n[3],w:n[2]-n[0],h:n[3]-n[1]}}var n=0,t=0,u=0,i=0,e={reset:!0,w:0,h:0},c,l;return{flipCoords:s,setPressed:w,setCurrent:b,getOffset:k,moveOffset:d,getCorner:g,getFixed:v}}(),g=function(){function nt(n,t){i.left.css({height:c(t)});i.right.css({height:c(t)})}function v(){return y(s.getFixed())}function y(n){i.top.css({left:c(n.x),width:c(n.w),height:c(n.y)});i.bottom.css({top:c(n.y2),left:c(n.x),width:c(n.w),height:c(f-n.y2)});i.right.css({left:c(n.x2),width:c(o-n.x2)});i.left.css({width:c(n.x)})}function l(){return n("<div />").css({position:"absolute",backgroundColor:r.shadeColor||r.bgColor}).appendTo(t)}function p(){h||(h=!0,t.insertBefore(e),v(),u.setBgOpacity(1,0,1),k.hide(),b(r.shadeColor||r.bgColor,1),u.isAwake()?a(r.bgOpacity,1):a(1,1))}function b(n,t){dt(g(),n,t)}function d(){h&&(t.remove(),k.show(),h=!1,u.isAwake()?u.setBgOpacity(r.bgOpacity,1,1):(u.setBgOpacity(1,1,1),u.disableHandles()),dt(w,0,1))}function a(n,i){h&&(r.bgFade&&!i?t.animate({opacity:1-n},{queue:!1,duration:r.fadeTime}):t.css({opacity:1-n}))}function tt(){r.shade?p():d();u.isAwake()&&a(r.bgOpacity)}function g(){return t.children()}var h=!1,t=n("<div />").css({position:"absolute",zIndex:240,opacity:0}),i={top:l(),left:l().height(f),right:l().height(f),bottom:l()};return{update:v,updateRaw:y,getShades:g,setBgColor:b,enable:p,disable:d,resize:nt,refresh:tt,opacity:a}}(),u=function(){function et(t){var i=n("<div />").css({position:"absolute",opacity:r.borderOpacity}).addClass(ft(t));return yt.append(i),i}function l(t,i){var r=n("<div />").mousedown(ei(t)).css({cursor:t+"-resize",position:"absolute",zIndex:i}).addClass("ord-"+t);return v.support&&r.bind("touchstart.jcrop",v.createDragger(t)),tt.append(r),r}function ht(n){var t=r.handleSize,i=l(n,h++).css({opacity:r.handleOpacity}).addClass(ft("handle"));return v.isSupported&&i.addClass("touch"),t&&i.width(t).height(t),i}function ct(n){return l(n,h++).addClass("jcrop-dragbar")}function lt(n){for(var t=0;t<n.length;t++)ut[n[t]]=ct(n[t])}function at(n){for(var t,i=0;i<n.length;i++){switch(n[i]){case"n":t="hline";break;case"s":t="hline bottom";break;case"e":t="vline right";break;case"w":t="vline"}nt[n[i]]=et(t)}}function vt(n){for(var t=0;t<n.length;t++)rt[n[t]]=ht(n[t])}function pt(n,t){r.shade||k.css({top:c(-t),left:c(-n)});it.css({top:c(t),left:c(n)})}function wt(n,t){it.width(Math.round(n)).height(Math.round(t))}function a(){var n=s.getFixed();s.setPressed([n.x,n.y]);s.setCurrent([n.x2,n.y2]);p()}function p(n){if(t)return w(n)}function w(n){var i=s.getFixed();wt(i.w,i.h);pt(i.x,i.y);r.shade&&g.updateRaw(i);t||kt();n?r.onSelect.call(y,ot(i)):r.onChange.call(y,ot(i))}function o(n,i,u){(t||i)&&(r.bgFade&&!u?e.animate({opacity:n},{queue:!1,duration:r.fadeTime}):e.css("opacity",n))}function kt(){it.show();r.shade?g.opacity(st):o(st,!0);t=!0}function dt(){u();it.hide();r.shade?g.opacity(1):o(1);t=!1;r.onRelease.call(y)}function gt(){i&&tt.show()}function b(){return i=!0,r.allowResize?(tt.show(),!0):void 0}function u(){i=!1;tt.hide()}function d(n){n?(bt=!0,u()):(bt=!1,b())}function ni(){d(!1);a()}var t,h=370,nt={},rt={},ut={},i=!1,f;return r.dragEdges&&n.isArray(r.createDragbars)&&lt(r.createDragbars),n.isArray(r.createHandles)&&vt(r.createHandles),r.drawBorders&&n.isArray(r.createBorders)&&at(r.createBorders),n(document).bind("touchstart.jcrop-ios",function(t){n(t.currentTarget).hasClass("jcrop-tracker")&&t.stopPropagation()}),f=hi().mousedown(ei("move")).css({cursor:"move",position:"absolute",zIndex:360}),v.support&&f.bind("touchstart.jcrop",v.createDragger("move")),yt.append(f),u(),{updateVisible:p,update:w,release:dt,refresh:a,isAwake:function(){return t},setCursor:function(n){f.css("cursor",n)},enableHandles:b,enableOnly:function(){i=!0},showHandles:gt,disableHandles:u,animMode:d,setBgOpacity:o,done:ni}}(),p=function(){function c(t){d.css({zIndex:450});t?n(document).bind("touchmove.jcrop",p).bind("touchend.jcrop",w):o&&n(document).bind("mousemove.jcrop",h).bind("mouseup.jcrop",i)}function l(){d.css({zIndex:290});n(document).unbind(".jcrop")}function h(n){return t(nt(n)),!1}function i(n){return n.preventDefault(),n.stopPropagation(),ut&&(ut=!1,f(nt(n)),u.isAwake()&&r.onSelect.call(y,ot(s.getFixed())),l(),t=function(){},f=function(){}),!1}function a(n,i,r){return ut=!0,t=n,f=i,c(r),!1}function p(n){return t(nt(v.cfilter(n))),!1}function w(n){return i(v.cfilter(n))}function b(n){d.css("cursor",n)}var t=function(){},f=function(){},o=r.trackDocument;return o||d.mousemove(h).mouseup(i).mouseout(i),e.before(d),{activateHandlers:a,setCursor:b}}(),kt=function(){function o(){r.keySupport&&(t.show(),t.focus())}function h(){t.hide()}function i(n,t,i){r.allowMove&&(s.moveOffset([t,i]),u.updateVisible(!0));n.preventDefault();n.stopPropagation()}function c(n){if(n.ctrlKey||n.metaKey)return!0;ai=n.shiftKey?!0:!1;var t=ai?1:10;switch(n.keyCode){case 37:i(n,-t,0);break;case 39:i(n,t,0);break;case 38:i(n,0,-t);break;case 40:i(n,0,t);break;case 27:r.allowSelect&&u.release();break;case 9:return!0}return!1}var t=n('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),f=n("<div />").css({position:"absolute",overflow:"hidden"}).append(t);return r.keySupport&&(t.keydown(c).blur(h),ii||!r.fixedSupport?(t.css({position:"absolute",left:"-20px"}),f.append(t).insertBefore(e)):t.insertBefore(e)),{watchKeys:o}}();return v.support&&d.bind("touchstart.jcrop",v.newSelection),tt.hide(),gt(!0),y={setImage:or,animateTo:tr,setSelect:vi,setOptions:ur,tellSelect:ir,tellScaled:rr,setClass:nr,disable:pi,enable:wi,cancel:fr,release:u.release,destroy:er,focus:kt.watchKeys,getBounds:function(){return[o*h,f*a]},getWidgetSize:function(){return[o,f]},getScaleFactor:function(){return[h,a]},getOptions:function(){return r},ui:{holder:w,selection:it}},ti&&w.bind("selectstart",function(){return!1}),l.data("Jcrop",y),y};n.fn.Jcrop=function(t,i){var r;return this.each(function(){if(n(this).data("Jcrop")){if(t==="api")return n(this).data("Jcrop");n(this).data("Jcrop").setOptions(t)}else this.tagName=="IMG"?n.Jcrop.Loader(this,function(){n(this).css({display:"block",visibility:"hidden"});r=n.Jcrop(this,t);n.isFunction(i)&&i.call(r)}):(n(this).css({display:"block",visibility:"hidden"}),r=n.Jcrop(this,t),n.isFunction(i)&&i.call(r))}),this};n.Jcrop.Loader=function(t,i,r){function e(){f.complete?(u.unbind(".jcloader"),n.isFunction(i)&&i.call(f)):window.setTimeout(e,50)}var u=n(t),f=u[0];u.bind("load.jcloader",e).bind("error.jcloader",function(){u.unbind(".jcloader");n.isFunction(r)&&r.call(f)});f.complete&&n.isFunction(i)&&(u.unbind(".jcloader"),i.call(f))};n.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,bgFade:!1,borderOpacity:.4,handleOpacity:.5,handleSize:null,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges:!0,fixedSupport:!0,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],preventSelectionFlipping:!1,onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}})(jQuery);profileDataModule=angular.module("profileDataModule",[]);profileDataModule.constant("areaConfig",areaConfig);profileDataModule.constant(profileMarketizationServiceConfigDependencyName,profileMarketizationServiceConfigDependencyValue),function(n){var t;(function(n){n.areaModuleName="profileModule";var t=angular.module(n.areaModuleName,["ui.router","ngRoute","profileDataModule","ngSanitize","commonModule","oneui","unhandledExceptionHandlerModule","clientReliabilityModule","captchaModule"]);t.run(["areaConfig","telemetryService","$rootScope","$state","$window","$document","commonConfig",function(n,t,i,r,u,f,e){i.$on("$stateChangeStart",function(t,i){i.allowAnonymous||e.isAuthenticated||(u.location.href=r.href("landing.profile"),t.preventDefault());var o=i.title||n.baseTitle;f[0].title=o});n.consts={ariaMessageCodes:{nameChanged:"nameChanged",pictureChanged:"pictureChanged",editPictureHint:"editPictureHint",editPictureCropZoomIn:"editPictureCropZoomIn",editPictureCropZoomOut:"editPictureCropZoomOut",editPictureCropShiftUp:"editPictureCropShiftUp",editPictureCropShiftDown:"editPictureCropShiftDown",editPictureCropShiftLeft:"editPictureCropShiftLeft",editPictureCropShiftRight:"editPictureCropShiftRight"},biConsts:{areaName:"Profile",permissionLinkRequestBIConst:{scenarioName:"PermissionLinkRequest",firstStep:"OpenForm",typingInEmail:"TypingInEmail",submit:"Submit"},unsubscribeBIConst:{scenarioName:"Unsubscribe",landing:"Landing",submit:"Submit"},unsubscribeEndUserBIConst:{scenarioName:"UnsubscribeEndUser",landing:"Landing",submit:"Submit"},contactInfoBIConst:{deleteEmailScenarioName:"ContactInfoDeleteEmail",deleteEmailStarting:"OpenDialog",deleteEmailError:"Error",deletePhoneScenarioName:"ContactInfoDeletePhone",deletePhoneStarting:"OpenDialog",deletePhoneError:"Error",deleteMMXPhoneScenarioName:"ContactInfoDeleteMMXPhone",deleteMMXPhoneStarting:"OpenDialog",deleteMMXPhoneError:"Error",deleteMMXPhoneDone:"Done"},communicationPermissionsBIConst:{scenarioName:"CommunicationPermissions",firstStep:"OpenPage",userEditingListOfTopics:"EditList",submit:"Submit"},communicationPermissionsEndUserBIConst:{scenarioName:"CommunicationPermissionsEndUser",firstStep:"OpenPage",userEditingListOfTopics:"EditList",submit:"Submit"},targetedSubscribeBIConst:{scenarioName:"TargetedSubscribe",firstStep:"OpenPage"},doubleOptInConfirmation:{scenarioName:"DoubleOptInConfirmation",landing:"Landing",gotoUnsubscribePage:"GotoUnsubscribePage"},preferredLanguageSelector:{scenarioName:"PreferredLanguageSelector",landing:"landing",selectingLanguage:"selectingLanguage",confirmingSelection:"confirmingSelection",setPreferredLanguageError:"setPreferredLanguageError"},msaDisplayLanguageSelector:{scenarioName:"MsaDisplayLanguageSelector",landing:"landing",selectingLanguage:"selectingLanguage",confirmingSelection:"confirmingSelection",setMsaDisplayLanguageError:"setMsaDisplayLanguageError"}},lightweightAccrualLevelConst:{nameOnly:"NameOnly",nameAndBirthday:"NameAndBirthday"},rpsPolicyConst:{configuration:"Configuration",lbi:"Lbi",mbi:"Mbi",mbiSsl:"MbiSsl",hbi:"Hbi",hbiSa:"HbiSa",hbiTest:"HbiTest"},contactTypeConst:{email:"0",phone:"1",address:"2",endUser:"4"},topicStateConst:{optInImplicit:"0",optInExplicit:"1",optOut:"2"},topicStatusConst:{active:"0",expired:"1"},errorCode:{alreadyUnsubscribed:"alreadyUnsubscribed",requireLightweightAccrual:"requireLightweightAccrual",generic:"generic",communicationGeneric:"communicationGeneric",topicExpired:"topicExpired",topicNotFound:"topicNotFound",noParamsCommunications:"noParamsCommunications",noParamsDoubleOptIn:"noParamsDoubleOptIn",noParamsUnsubscribe:"noParamsUnsubscribe"},stateConst:{communicationsPage:"communications-page",errorPage:"error-page",landingContactInfo:"landing.contact-info",landingProfile:"landing.profile",redirect:"redirect",unsubscribePageForm:"unsubscribe-page-form",unsubscribePageSuccess:"unsubscribe-page-success"},profileReactLandingPageUrl:"/profile"}}])})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){angular.module(t.areaModuleName).config(["areaConfig","$stateProvider","$urlRouterProvider","$locationProvider",function(t,i,r,u){var f={},e;u.html5Mode(!0);t.baseTitle=document.title;f.landing={views:{"banner-view":{template:"<landing><\/landing>"}},data:{requiredComponents:[]}};f["landing.profile"]={url:"^/",views:{"profile-landing@landing":{template:"<profile-page><\/profile-page>"},"alert-view@landing.profile":{template:"<profile-alert profile-info='$ctrl.model'><\/profile-alert>"},"personal-view@landing.profile":{template:"<personal-section profile-info='$ctrl.model'><\/personal-section>"}},data:{requiredComponents:["profile.profile-info"]},title:t.baseTitle+" | "+t.content.profileHeader.yourInfo};f["landing.profile.preferred-language-selector"]={url:"^/preferred-language-selector?sru",views:{"preferred-language-selector-core@landing.profile":{template:"<preferred-language-selector><\/preferred-language-selector>"}},params:{sru:null},data:{requiredComponents:["profile.profile-page.preferred-language-selector"]}};f["landing.profile.preferred-language-selector.landing"]={views:{"modalContent@":{template:"<preferred-language-selector-dialog><\/preferred-language-selector-dialog>"}},data:{requiredComponents:["profile.profile-page.preferred-language-selector"]}};f["landing.profile.preferred-language-selector.confirming"]={views:{"modalContent@":{template:"<preferred-language-selector-confirm-dialog><\/preferred-language-selector-confirm-dialog>"}},data:{requiredComponents:[]},title:t.baseTitle+" | "+t.content.profileHeader.yourInfo};f["landing.profile.preferred-language-selector.error"]={views:{"modalContent@":{template:"<notification-dialog id='language-selector-error-dialog' data-bi-id='landing.profile.preferred-language-selector.error'><\/notification-dialog>"}},data:{requiredComponents:[]}};f["landing.profile.preferred-language-changed"]={url:"^/preferred-language-changed?lang&sru",views:{"preferred-language-selector-core@landing.profile":{template:"<preferred-language-changed><\/preferred-language-changed>"}},params:{lang:null,sru:null},data:{requiredComponents:[]}};f["landing.profile.preferred-language-changed.notification-dialog"]={views:{"modalContent@":{template:"<notification-dialog data-bi-id='profile.profile-page.preferred-language-changed'><\/notification-dialog>"}},data:{requiredComponents:[]}};f["landing.profile.msa-display-language-selector"]={url:"^/msa-display-language-selector?sru",views:{"msa-display-language-selector-core@landing.profile":{template:"<msa-display-language-selector><\/msa-display-language-selector>"}},params:{sru:null},data:{requiredComponents:["profile.profile-page.msa-display-language-selector"]}};f["landing.profile.msa-display-language-selector.landing"]={views:{"modalContent@":{template:"<msa-display-language-selector-dialog><\/msa-display-language-selector-dialog>"}},data:{requiredComponents:["profile.profile-page.msa-display-language-selector"]}};f["landing.profile.msa-display-language-selector.confirming"]={views:{"modalContent@":{template:"<msa-display-language-selector-confirm-dialog><\/msa-display-language-selector-confirm-dialog>"}},data:{requiredComponents:[]},title:t.baseTitle+" | "+t.content.profileHeader.yourInfo};f["landing.profile.msa-display-language-selector.error"]={views:{"modalContent@":{template:"<notification-dialog id='language-selector-error-dialog' data-bi-id='landing.profile.msa-display-language-selector.error'><\/notification-dialog>"}},data:{requiredComponents:[]}};f["landing.profile.msa-display-language-changed"]={url:"^/msa-display-language-changed?lang&sru",views:{"msa-display-language-selector-core@landing.profile":{template:"<msa-display-language-changed><\/msa-display-language-changed>"}},params:{lang:null,sru:null},data:{requiredComponents:[]}};f["landing.profile.msa-display-language-changed.notification-dialog"]={views:{"modalContent@":{template:"<notification-dialog data-bi-id='profile.profile-page.msa-display-language-changed'><\/notification-dialog>"}},data:{requiredComponents:[]}};f["landing.contact-info"]={url:"^/contact-info",views:{"profile-landing@landing":{template:"<contact-info><\/contact-info>"}},data:{requiredComponents:["profile.contact-info",]},title:t.baseTitle+" | "+t.content.profileHeader.contactInfoTabText};f["landing.contact-info.remove-dialog"]={views:{"modalContent@":{template:"<remove-dialog><\/remove-dialog>"}},data:{requiredComponents:[]}};f["landing.contact-info.mmx-phone-remove-dialog"]={views:{"modalContent@":{template:"<mmx-phone-remove-dialog><\/mmx-phone-remove-dialog>"}},data:{requiredComponents:[]}};f["landing.contact-info.notification-dialog"]={views:{"modalContent@":{template:"<notification-dialog data-bi-id='profile.contact-info.notification-dialog'><\/notification-dialog>"}},data:{requiredComponents:[]}};f["landing.profile.edit-name"]={url:"^/edit-name",views:{"alert-view@landing.profile":{template:""},"personal-view@landing.profile":{template:"<edit-name><\/edit-name>"}},data:{requiredComponents:["profile.edit-name",n.Utilities.isInFlight("ProCaptcha")&&"captcha.component"].filter(Boolean)},title:t.baseTitle+" | "+t.strings.landing_changeNameButton};f["edit-picture"]={url:"^/edit-picture",views:{"":{template:"<edit-picture><\/edit-picture>"}},data:{requiredComponents:["profile.edit-picture","profile.picture-editor"]},title:t.baseTitle+" | "+t.strings.changePictureButton};f["communications-page"]={url:"^/communications?CTID",views:{"":{template:"<communications-page><\/communications-page>"}},params:{CTID:null,ECID:null,K:null,CMID:null,D:null},data:{requiredComponents:["profile.communications-page"]},allowAnonymous:!0,title:t.baseTitle+" | "+t.content.communicationsPage.communicationHeader.title};f["communications-page.notification-dialog"]={views:{"modalContent@":{template:"<notification-dialog data-bi-id='profile.communications-page.notification-dialog'><\/notification-dialog>"}},data:{requiredComponents:[]},allowAnonymous:!0};f["permissions-link-request-form"]={url:"^/permissions-link-request",views:{"":{template:"<permissions-link-request-form><\/permissions-link-request-form>"}},data:{requiredComponents:[]},allowAnonymous:!0};f["permissions-link-request-success"]={url:"^/permissions-link-request-success",views:{"":{template:"<permissions-link-request-success><\/permissions-link-request-success>"}},params:{email:null},data:{requiredComponents:[]},allowAnonymous:!0};f["plc-services-decom-page"]={url:"^/services-discontinued",template:"<plc-services-decom-page><\/plc-services-decom-page>",data:{requiredComponents:[]},allowAnonymous:!0};f["unsubscribe-page-form"]=n.Utilities.isInFlight("ProIWUnsub")?{url:"^/unsubscribe?CTID",template:"<unsubscribe-page-form-v2><\/unsubscribe-page-form-v2>",params:{CTID:null,ECID:null,K:null,CMID:null,D:null,TID:null,PID:null},data:{requiredComponents:["profile.unsubscribe-page-form-v2"],optionalComponents:["profile.unsubscribe-section-msa","profile.unsubscribe-section-iw"]},allowAnonymous:!0,title:t.baseTitle+" | "+t.content.unsubscribePage.title}:{url:"^/unsubscribe?CTID",template:"<unsubscribe-page-form-v1><\/unsubscribe-page-form-v1>",params:{CTID:null,ECID:null,K:null,CMID:null,D:null,TID:null,PID:null},data:{requiredComponents:["profile.unsubscribe-page-form-v1"]},allowAnonymous:!0,title:t.baseTitle+" | "+t.content.unsubscribePage.title};f["unsubscribe-page-form.notification-dialog"]={views:{"modalContent@":{template:"<notification-dialog data-bi-id='profile.unsubscribe-page.notification-dialog'><\/notification-dialog>"}},data:{requiredComponents:[]},allowAnonymous:!0};f["unsubscribe-page-success"]={url:"^/unsubscribe-success",template:"<unsubscribe-page-success><\/unsubscribe-page-success>",params:{alreadyComplete:!1,topicTitle:""},data:{requiredComponents:[]},allowAnonymous:!0,title:t.baseTitle+" | "+t.content.unsubscribePage.title};f["targeted-subscribe-form"]={url:"^/subscribe?TID&MK&tid&mk",template:"<targeted-subscribe-form><\/targeted-subscribe-form>",data:{requiredComponents:["profile.targeted-subscribe-form"]}};f["targeted-subscribe-success"]={url:"^/subscribe-success",template:"<targeted-subscribe-success><\/targeted-subscribe-success>",data:{requiredComponents:[]}};f["double-opt-in-confirmation"]={url:"^/subscribe-confirm",template:"<double-opt-in-confirmation><\/double-opt-in-confirmation>",data:{requiredComponents:["profile.double-optin-confirmation"]},allowAnonymous:!0};f["error-page"]={url:"^/error/?errorCode",template:"<error-page><\/error-page>",params:{errorCode:null,title:"",errorMessages:[],tokens:[]},data:{requiredComponents:[]},allowAnonymous:!0};f.redirect={url:"^/redirecting",template:"<redirect><\/redirect>",params:{redirectUrl:""}};for(e in f)f.hasOwnProperty(e)&&i.state(e,f[e]);r.when("/edit/name","/edit-name");r.when("/edit/picture","/edit-picture");r.otherwise("/")}])})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e,o,s){this.$q=n;this.areaConfig=t;this.$state=i;this.$params=r;this.$cookies=u;this.$timeout=f;this.communicationsService=e;this.$meeModal=o;this.telemetry=s;this.profileBIConst=this.areaConfig.consts.biConsts;this.communicationPermissionsBIConst=this.profileBIConst.communicationPermissionsBIConst;this.stateConst=this.areaConfig.consts.stateConst}return i.prototype.componentOnInit=function(){var t=this,n=this.$cookies.getObject("profileCommunication");return(n?this.$cookies.remove("profileCommunication",{path:"/"}):n=this.$params,this.isEndUser=n.CTID&&n.CTID===this.areaConfig.consts.contactTypeConst.endUser,this.isEndUser?(this.content=this.areaConfig.content.iwCommunicationsPage,this.communicationPermissionsBIConst=this.profileBIConst.communicationPermissionsEndUserBIConst):this.content=this.areaConfig.content.communicationsPage,this.userLandedBI(),this.unsubAll=!1,!n||!(n.CMID||n.D||n.ECID||n.K||n.PID||n.TID))?this.$q.resolve().then(function(){t.noParamsBI();t.showAlert(t.content.loadErrorNotificationDialog)}):this.communicationsService.getTopicPermissionsEncrypted(n).then(function(n){t.initializeModel(n.data)}).catch(function(n){return t.errorBI(n),t.showAlert(t.content.loadErrorNotificationDialog),t.$q.reject(n)})},i.prototype.initializeModel=function(n){this.model=n;this.headerModel={contactValue:this.model.decryptedContactValue,hasAnyTopics:this.model.topics.length>=1,isEmail:this.model.contactType==="Email"&&!this.isEndUser,isPhone:this.model.contactType==="Phone"&&!this.isEndUser};this.footerModel={showUnsubscribeAll:this.model.topics.length>=2,showButtons:this.model.topics.length>=1,isSendingRequest:!1};this.originalListOfTopics=angular.copy(this.model.topics)},i.prototype.getInstrumentationComponentName=function(){return"profile.communications-page"},i.prototype.save=function(){var n=this;return this.footerModel.isSendingRequest=!0,this.communicationsService.setTopicPermissionsEncrypted(this.model).then(function(){n.savedBI();n.showAlert(n.content.saveSuccessNotificationDialog)}).catch(function(t){return n.errorBI(t),n.showAlert(n.content.saveErrorNotificationDialog,"communications-page",!0),n.$q.reject(t)}).finally(function(){n.footerModel.isSendingRequest=!1})},i.prototype.cancel=function(){this.cancelBI();this.isEndUser?this.$state.go(this.stateConst.redirect,{redirectUrl:this.content.externalRedirectLink.url}):n.Utilities.isInFlight("ProReact")?this.$state.go(this.stateConst.redirect,{redirectUrl:this.areaConfig.consts.profileReactLandingPageUrl}):this.$state.go(this.stateConst.landingContactInfo)},i.prototype.unsubAllCheckboxChecked=function(){var n=this;this.userEditingListBI();this.unsubAll=!this.unsubAll;this.model.topics.forEach(function(t){t.isAllowed=!n.unsubAll})},i.prototype.showAlert=function(t,i,r){var u=this,f=i?i:this.stateConst.landingContactInfo;n.Utilities.isInFlight("ProReact")&&f===this.stateConst.landingContactInfo&&(f=undefined);this.$meeModal.show("#profile-dialog","communications-page.notification-dialog",{stateIdOnLastGoBack:f,stateIdOnDismiss:f,data:{content:t,tokens:[],confirmAction:function(){u.isEndUser&&!r&&u.$timeout().then(function(){u.$state.go(u.stateConst.redirect,{redirectUrl:u.content.externalRedirectLink.url})});n.Utilities.isInFlight("ProReact")?(u.$meeModal.hide(),u.$timeout(function(){u.$state.go(u.stateConst.redirect,{redirectUrl:u.areaConfig.consts.profileReactLandingPageUrl})})):u.$meeModal.hide(f)}}})},i.prototype.hasChanges=function(){if(!this.model||!this.model.topics||!this.originalListOfTopics)return!1;for(var n in this.originalListOfTopics)if(this.originalListOfTopics[n].isAllowed!=this.model.topics[n].isAllowed)return!0;return!1},i.prototype.userEditingListBI=function(){this.bi.isUserEditingList||(this.bi.isUserEditingList=!0,this.telemetry.portalScenarios.endStep({area:this.profileBIConst.areaName,name:this.communicationPermissionsBIConst.scenarioName,isSuccess:!0,step:this.bi.currentStep,next:this.communicationPermissionsBIConst.userEditingListOfTopics}),this.bi.currentStep=this.communicationPermissionsBIConst.userEditingListOfTopics)},i.prototype.userLandedBI=function(){this.bi={scenarioId:"",isUserEditingList:!1,currentStep:this.communicationPermissionsBIConst.firstStep};this.telemetry.portalScenarios.beginMultiStepScenario(this.profileBIConst.areaName,this.communicationPermissionsBIConst.scenarioName,this.bi.currentStep)},i.prototype.cancelBI=function(){this.telemetry.portalScenarios.cancelMultiStepScenario({area:this.profileBIConst.areaName,name:this.communicationPermissionsBIConst.scenarioName,step:this.bi.currentStep,isSuccess:!0})},i.prototype.savedBI=function(){this.telemetry.portalScenarios.endMultiStepScenario({area:this.profileBIConst.areaName,name:this.communicationPermissionsBIConst.scenarioName,step:this.bi.currentStep,isSuccess:!0})},i.prototype.errorBI=function(n){var t=n.jqXHR.responseJSON||{};this.telemetry.portalScenarios.endMultiStepScenario({area:this.profileBIConst.areaName,name:this.communicationPermissionsBIConst.scenarioName,step:this.bi.currentStep,error:t.error||"generic",isSuccess:!1})},i.prototype.noParamsBI=function(){this.telemetry.portalScenarios.endMultiStepScenario({area:this.profileBIConst.areaName,name:this.communicationPermissionsBIConst.scenarioName,step:this.bi.currentStep,error:this.areaConfig.consts.errorCode.noParamsCommunications,isSuccess:!1})},i.$inject=["$q","areaConfig","$state","$stateParams","$cookies","$timeout","communicationsService","$meeModal","telemetryService"],__decorate([n.OneUI.Angular.MonitorOperationProgress("load-topics")],i.prototype,"componentOnInit",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("save")],i.prototype,"save",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.areaModuleName,"communicationsPage",{templateUrl:"/Areas/Profile/Scripts/Components/CommunicationsPage/communications-page.html",bindings:{}})],i)}();t.CommunicationsPageComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){this.unsubAllCheckbox={id:"cb-unsubAll",isSelected:!1,label:""}}return i.prototype.componentOnInit=function(){},i.prototype.getInstrumentationComponentName=function(){return"profile.communications-page.page-footer-section"},i.prototype.getSaveButtonDataBIId=function(){return this.getInstrumentationComponentName()+".save-button"},i.prototype.getCancelButtonDataBIId=function(){return this.getInstrumentationComponentName()+".cancel-button"},i.prototype.isSaveButtonDisabled=function(){return this.model?!this.model.showButtons||this.model.isSendingRequest||!this.hasChanges:!0},i.$inject=[],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"pageFooterSection",{templateUrl:"/Areas/Profile/Scripts/Components/CommunicationsPage/PageFooterSection/page-footer-section.html",bindings:{model:"<",content:"<",hasChanges:"<",save:"&",cancel:"&",unsubAll:"&"}})],i)}();t.PageFooterSectionComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return i.prototype.componentOnInit=function(){},i.prototype.getInstrumentationComponentName=function(){return"profile.communications-page.page-header-section"},i.$inject=[],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"pageHeaderSection",{templateUrl:"/Areas/Profile/Scripts/Components/CommunicationsPage/PageHeaderSection/page-header-section.html",bindings:{model:"<",content:"<"}})],i)}();t.PageHeaderSectionComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.areaConfig=n}return i.prototype.componentOnInit=function(){},i.prototype.getInstrumentationComponentName=function(){return"profile.communications-page.permissions-section"},i.$inject=["areaConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"permissionsSection",{templateUrl:"/Areas/Profile/Scripts/Components/CommunicationsPage/PermissionsSection/permissions-section.html",bindings:{topics:"<",unsubAll:"<",editTopicList:"&"}})],i)}();t.PermissionsSectionComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u){this.$q=n;this.areaConfig=t;this.$state=i;this.$meeModal=r;this.contactInfoService=u;this.profileBIConst=this.areaConfig.consts.biConsts;this.contactInfoBIConst=this.profileBIConst.contactInfoBIConst}return i.prototype.componentOnInit=function(){return this.content=this.areaConfig.content.contactInfo,this.content.mmxPhoneEntry.learnToUnlinkLink.url,this.reloadData()},i.prototype.reloadData=function(n){var t=this;return this.hasEmail=!1,this.hasMSAPhone=!1,this.hasMMXPhone=!1,this.contactInfoService.getContactInfo(n).then(function(n){var i=n.data;t.emails=i.emails;t.msaPhones=i.msaPhones;t.hasEmail=i.emails.length!=0;t.mmxPhones=i.mmxPhones;t.hasMMXPhone=i.mmxPhones.length!=0;t.hasMSAPhone=i.msaPhones.length!=0;t.hasPhone=t.hasMSAPhone||t.hasMMXPhone;t.emailSetSubtitle=t.hasEmail?t.content.emailSet.subtitleTexts:t.content.emailSet.emptyListMessages;t.phoneSetSubtitle=t.hasPhone?t.content.phoneSet.subtitleTexts:t.content.phoneSet.emptyListMessages})},i.prototype.goToCommunicationPermissionsPage=function(n){this.$state.go("communications-page",{CTID:n.CTID,ECID:n.ECID,K:n.K,CMID:n.CMID,D:n.D})},i.prototype.deleteEmail=function(n){var t=this;return this.contactInfoService.deleteEmail(n.email).then(function(){t.reloadData({refreshCache:!0});t.$meeModal.hide({stateId:"landing.contact-info",bi:{success:!0}})}).catch(function(i){var r=i.jqXHR.responseJSON||{},u={success:!1,step:t.contactInfoBIConst.deleteEmailError,error:r.error||"generic"};return t.setupDeleteNotificationDialog(t.content.removeEmailDialog,[{key:"email",value:n.email}]),t.$meeModal.switchTo("landing.contact-info.notification-dialog",u),t.$q.reject(i)})},i.prototype.deleteEmailClicked=function(n){var t=this;this.$meeModal.show("#profile-dialog","landing.contact-info.remove-dialog",{stateIdOnLastGoBack:"landing.contact-info",data:{content:this.content.removeEmailDialog,displayValue:n.email,confirmAction:function(){return t.deleteEmail(n)}},trackBi:!0,bi:{area:this.profileBIConst.areaName,scenario:this.contactInfoBIConst.deleteEmailScenarioName,firstStep:this.contactInfoBIConst.deleteEmailStarting}})},i.prototype.deletePhone=function(n){var t=this;return this.contactInfoService.deletePhone(n.id).then(function(){t.reloadData({refreshCache:!0});t.$meeModal.hide({stateId:"landing.contact-info",bi:{success:!0}})}).catch(function(i){var r=i.jqXHR.responseJSON||{},u={success:!1,step:t.contactInfoBIConst.deletePhoneError,error:r.error||"generic"};return t.setupDeleteNotificationDialog(t.content.removePhoneDialog,[{key:"phone",value:n.number}]),t.$meeModal.switchTo("landing.contact-info.notification-dialog",u),t.$q.reject(i)})},i.prototype.deletePhoneClicked=function(n){var t=this;this.$meeModal.show("#profile-dialog","landing.contact-info.remove-dialog",{stateIdOnLastGoBack:"landing.contact-info",data:{content:this.content.removePhoneDialog,displayValue:n.number,confirmAction:function(){return t.deletePhone(n)}},trackBi:!0,bi:{area:this.profileBIConst.areaName,scenario:this.contactInfoBIConst.deletePhoneScenarioName,firstStep:this.contactInfoBIConst.deletePhoneStarting}})},i.prototype.deleteMMXPhone=function(){var n=this;return this.contactInfoService.deleteMMXPhone().then(function(){n.reloadData({refreshCache:!0});var t={success:!0,step:n.contactInfoBIConst.deleteMMXPhoneDone},i={content:{title:n.content.mmxPhoneRemoveDialog.phoneRemovedConfirmed,messages:n.content.mmxPhoneRemoveDialog.phoneRemovedConfirmedParagraphs,confirmText:n.content.mmxPhoneRemoveDialog.confirmText},tokens:[],confirmAction:function(){n.$meeModal.hide({stateId:"landing.contact-info",bi:{success:!0}})},notificationDialogOptions:{showTitle:!0}};n.$meeModal.setData(i);n.$meeModal.switchTo("landing.contact-info.notification-dialog",t)}).catch(function(t){var i=t.jqXHR.responseJSON||{},r={success:!1,step:n.contactInfoBIConst.deleteMMXPhoneError,error:i.error||"generic"},u={content:{title:n.content.mmxPhoneRemoveDialog.tryAgain,messages:n.content.mmxPhoneRemoveDialog.failedToRemovePhoneParagraphs,confirmText:n.content.mmxPhoneRemoveDialog.confirmErrorText},tokens:[],confirmAction:function(){n.$meeModal.hide({stateId:"landing.contact-info",bi:{success:!1}})},notificationDialogOptions:{showTitle:!0}};return n.$meeModal.setData(u),n.$meeModal.switchTo("landing.contact-info.notification-dialog",r),n.$q.reject(t)})},i.prototype.deleteMMXPhoneClicked=function(){var n=this;this.$meeModal.show("#profile-dialog","landing.contact-info.mmx-phone-remove-dialog",{stateIdOnLastGoBack:"landing.contact-info",data:{confirmAction:function(){return n.deleteMMXPhone()}},trackBi:!0,bi:{area:this.profileBIConst.areaName,scenario:this.contactInfoBIConst.deleteMMXPhoneScenarioName,firstStep:this.contactInfoBIConst.deleteMMXPhoneStarting}})},i.prototype.getInstrumentationComponentName=function(){return"profile.contact-info"},i.prototype.getLearnToConnectLinkBIId=function(){return this.getInstrumentationComponentName()+".learn-to-connect-link"},i.prototype.setupDeleteNotificationDialog=function(n,t){var i=this,r={content:n.errorNotificationDialog,tokens:t,confirmAction:function(){i.$meeModal.hide("landing.contact-info")},notificationDialogOptions:{showTitle:!0}};this.$meeModal.setData(r)},i.$inject=["$q","areaConfig","$state","$meeModal","contactInfoService"],__decorate([n.OneUI.Angular.MonitorOperationProgress("load-contact-info")],i.prototype,"reloadData",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("modalOperation"),n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("deleteEmail")],i.prototype,"deleteEmail",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("modalOperation"),n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("deletePhone")],i.prototype,"deletePhone",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("modalOperation"),n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("deleteMMXPhone")],i.prototype,"deleteMMXPhone",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.areaModuleName,"contactInfo",{templateUrl:"/Areas/Profile/Scripts/Components/ContactInfo/contact-info.html"})],i)}();t.ContactInfoComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.areaConfig=n}return i.prototype.componentOnInit=function(){},i.prototype.getInstrumentationComponentName=function(){return"profile.contact-info.contact-info-set"},i.$inject=["areaConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"contactInfoSet",{templateUrl:"/Areas/Profile/Scripts/Components/ContactInfo/ContactInfoSet/contact-info-set.html",transclude:{subtitle:"?subtitle",entries:"?entries"},bindings:{content:"<"}})],i)}();t.ContactInfoSetComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.areaConfig=n;this.content=this.areaConfig.content.contactInfo.emailEntry}return i.prototype.$onInit=function(){this.manageCommunicationPermissionsAria=this.content.manageCommunicationPermissionsAria.replace("{email}",this.model.email);this.removeEmailAria=this.content.removeEmailAria.replace("{email}",this.model.email);this.manageMsaLinkTextAria=this.content.manageMsaLinkAria.replace("{email}",this.model.email)},i.prototype.getInstrumentationComponentName=function(){return"profile.contact-info.email-entry"},i.prototype.goToCommunicationPermissionsPage=function(n){n.preventDefault();this.onCommunicationPermissionsPageClicked({$event:this.model.managePermissionsUrlParams})},i.prototype.removeEmail=function(n){n.preventDefault();this.onDeleteClicked({$event:this.model})},i.prototype.getManageCommunicationPermissionsDataBIId=function(){return this.getInstrumentationComponentName()+".manage-communication-permissions"},i.prototype.getManageMsaDataBIId=function(){return this.getInstrumentationComponentName()+".manage-msa"},i.prototype.getRemoveEmailDataBIId=function(){return this.getInstrumentationComponentName()+".remove-email"},i.$inject=["areaConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"emailEntry",{templateUrl:"/Areas/Profile/Scripts/Components/ContactInfo/EmailEntry/email-entry.html",bindings:{model:"<email",onDeleteClicked:"&",onCommunicationPermissionsPageClicked:"&"}})],i)}();t.EmailEntryComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.areaConfig=n;this.content=this.areaConfig.content.contactInfo.mmxPhoneEntry}return i.prototype.$onInit=function(){this.removePhoneAria=this.content.removePhoneAria.replace("{phone}",this.model.number)},i.prototype.getInstrumentationComponentName=function(){return"profile.contact-info.mmx-phone-entry"},i.prototype.getRemoveLinkBIId=function(){return this.getInstrumentationComponentName()+".remove-link"},i.prototype.getLearnToUnlinkLinkBIId=function(){return this.getInstrumentationComponentName()+".learn-to-unlink-link"},i.prototype.removePhone=function(){this.onDeleteClicked({$event:this.model})},i.$inject=["areaConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"mmxPhoneEntry",{templateUrl:"/Areas/Profile/Scripts/Components/ContactInfo/MMXPhoneEntry/mmx-phone-entry.html",bindings:{model:"<phone",onDeleteClicked:"&"}})],i)}();t.MMXPhoneEntryComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.areaConfig=n;this.$meeModal=t;this.isConfirmRemovalCheckboxChecked=!1;this.model=this.$meeModal.getData();this.content=this.areaConfig.content.contactInfo.mmxPhoneRemoveDialog}return i.prototype.$onInit=function(){},i.prototype.cancel=function(){this.$meeModal.hide({stateId:"landing.contact-info",bi:{success:!0,cancel:!0}})},i.prototype.confirm=function(){this.model.confirmAction()},i.prototype.getInstrumentationComponentName=function(){return"profile.contact-info.mmx-phone-remove-dialog"},i.prototype.getConfirmButtonDataBIId=function(){return this.getInstrumentationComponentName()+".confirm-button"},i.prototype.getCancelButtonDataBIId=function(){return this.getInstrumentationComponentName()+".cancel-button"},i.$inject=["areaConfig","$meeModal"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"mmxPhoneRemoveDialog",{templateUrl:"/Areas/Profile/Scripts/Components/ContactInfo/MMXPhoneRemoveDialog/mmx-phone-remove-dialog.html"})],i)}();t.MMXPhoneRemoveDialogComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.areaConfig=n;this.content=this.areaConfig.content.contactInfo.phoneEntry}return i.prototype.$onInit=function(){this.manageCommunicationPermissionsAria=this.content.manageCommunicationPermissionsAria.replace("{phone}",this.model.number);this.removePhoneAria=this.content.removePhoneAria.replace("{phone}",this.model.number);this.manageMsaPhoneLinkAria=this.content.manageMsaPhoneLink.ariaLabel.replace("{phone}",this.model.number)},i.prototype.getInstrumentationComponentName=function(){return"profile.contact-info.phone-entry"},i.prototype.removePhone=function(n){n.preventDefault();this.onDeleteClicked({$event:this.model})},i.prototype.getManageMsaPhoneDataBIId=function(){return this.getInstrumentationComponentName()+".manage-msa-phone"},i.$inject=["areaConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"phoneEntry",{templateUrl:"/Areas/Profile/Scripts/Components/ContactInfo/PhoneEntry/phone-entry.html",bindings:{model:"<phone",onDeleteClicked:"&"}})],i)}();t.PhoneEntryComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.$meeModal=n;this.model=this.$meeModal.getData();this.content=this.model.content;this.displayValue=this.model.displayValue}return i.prototype.componentOnInit=function(){},i.prototype.getInstrumentationComponentName=function(){return"profile.contact-info.remove-dialog"},i.prototype.getConfirmButtonDataBIId=function(){return this.getInstrumentationComponentName()+".confirm-button"},i.prototype.getCancelButtonDataBIId=function(){return this.getInstrumentationComponentName()+".cancel-button"},i.prototype.cancel=function(){this.$meeModal.hide({stateId:"landing.contact-info",bi:{success:!0,cancel:!0}})},i.prototype.confirm=function(){this.model.confirmAction()},i.$inject=["$meeModal"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"removeDialog",{templateUrl:"/Areas/Profile/Scripts/Components/ContactInfo/RemoveDialog/remove-dialog.html"})],i)}();t.RemoveDialogComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f){this.$q=n;this.areaConfig=t;this.$state=i;this.$cookies=r;this.communicationsService=u;this.telemetry=f;this.profileBIConst=this.areaConfig.consts.biConsts;this.doubleOptInConfirmationBIConst=this.profileBIConst.doubleOptInConfirmation}return i.prototype.componentOnInit=function(){var n=this;return(this.userLandedBI(),this.params=this.$cookies.getObject("profileCommunication"),this.params&&(this.$cookies.remove("profileCommunication",{path:"/"}),this.params&&(this.params.TID&&this.params.PID||this.$state.go("landing.profile"))),!this.params||!(this.params.CMID||this.params.CTID||this.params.D||this.params.ECID||this.params.K||this.params.PID||this.params.TID))?this.$q.resolve().then(function(){n.noParamsBI();n.$state.go("landing.profile")}):(this.content=this.areaConfig.content.doubleOptIn,this.communicationsService.subscribeEncrypted(this.params).then(function(t){n.model=t.data;n.content.confirmParagraph=n.content.confirmParagraph.replace("{email}",n.model.decryptedContactValue);n.content.confirmParagraph=n.content.confirmParagraph.replace("{topic}",n.model.topic.name)}).catch(function(t){var r=t.jqXHR.responseJSON||{},i=r.error;n.errorBI(t);switch(i){case n.areaConfig.consts.errorCode.topicNotFound:return window.portalQos.reportClientError({code:i,category:"MeePortal.Profile.DoubleOptInConfirmation.CannotFindTopic",data:{topicId:n.params.TID,market:n.params.MK}}),n.$state.go("error-page",{errorCode:n.areaConfig.consts.errorCode.topicNotFound}),n.$q.resolve();case n.areaConfig.consts.errorCode.topicExpired:return window.portalQos.reportClientError({code:i,category:"MeePortal.Profile.DoubleOptInConfirmation.TopicExpired",data:{topicId:n.params.TID,market:n.params.MK}}),n.$state.go("error-page",{errorCode:n.areaConfig.consts.errorCode.topicExpired}),n.$q.resolve();default:return n.$state.go("error-page",{errorCode:n.areaConfig.consts.errorCode.communicationGeneric}),n.$q.reject(t)}}))},i.prototype.getInstrumentationComponentName=function(){return"profile.double-optin-confirmation"},i.prototype.getUnsubscribePageDataBIId=function(){return this.getInstrumentationComponentName()+".unsubscribe-page"},i.prototype.goToUnsubscribePageLinkClicked=function(){this.goToUnsubscribePageBI();this.goToUnsubscribePage()},i.prototype.goToUnsubscribePage=function(){return this.$state.go("unsubscribe-page-form",{CTID:this.params.CTID,ECID:this.params.ECID,K:this.params.K,CMID:this.params.CMID,D:this.params.D,TID:this.params.TID,PID:this.params.PID})},i.prototype.userLandedBI=function(){this.bi={scenarioId:"",currentStep:this.doubleOptInConfirmationBIConst.landing};this.telemetry.portalScenarios.beginMultiStepScenario(this.profileBIConst.areaName,this.doubleOptInConfirmationBIConst.scenarioName,this.bi.currentStep)},i.prototype.goToUnsubscribePageBI=function(){this.telemetry.portalScenarios.endMultiStepScenario({area:this.profileBIConst.areaName,name:this.doubleOptInConfirmationBIConst.scenarioName,step:this.doubleOptInConfirmationBIConst.gotoUnsubscribePage,isSuccess:!0})},i.prototype.errorBI=function(n){var t=n.jqXHR.responseJSON||{};this.telemetry.portalScenarios.endMultiStepScenario({area:this.profileBIConst.areaName,name:this.doubleOptInConfirmationBIConst.scenarioName,step:this.bi.currentStep,error:t.error||"generic",isSuccess:!1})},i.prototype.noParamsBI=function(){this.telemetry.portalScenarios.endMultiStepScenario({area:this.profileBIConst.areaName,name:this.doubleOptInConfirmationBIConst.scenarioName,step:this.bi.currentStep,error:this.areaConfig.consts.errorCode.noParamsDoubleOptIn,isSuccess:!1})},i.$inject=["$q","areaConfig","$state","$cookies","communicationsService","telemetryService"],__decorate([n.OneUI.Angular.MonitorOperationProgress("double-optin-confirmation")],i.prototype,"componentOnInit",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.areaModuleName,"doubleOptInConfirmation",{templateUrl:"/Areas/Profile/Scripts/Components/DoubleOptInConfirmation/double-opt-in-confirmation.html",bindings:{}})],i)}();t.DoubleOptInConfirmation=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(i,r,u,f,e,o,s,h,c,l,a){var v=this;this.$q=i;this.areaConfig=r;this.profileAppService=u;this.personalInfoService=f;this.mocks=e;this.telemetry=o;this.$window=s;this.$timeout=h;this.sharedCmsComponents=c;this.componentRegistryService=l;this.$meeErrors=a;this.captchaId="ProfileEditName";this.standardEditNameTagId="StandardEditNameTagId";this.nameConflictResolutionTagId="NameConflictResolutionTagId";this.editNameError="EditNameError";this.cancel=function(){v.telemetry.portalScenarios.cancelMultiStepScenario({area:v.areaName,name:v.bi.scenarioId,step:v.bi.currentStep,isSuccess:!v.bi.serverErrorOccurred});v.closeEditor()};this.contactSupport=function(n){n.preventDefault();v.$window.open(n.delegateTarget.href,"contactSupport","width=320,height=530,scrollbars=yes,resize=yes",!0)};this.closeEditor=function(){v.profileAppService.goBack();v.$timeout(function(){$(t.PersonalSectionComponent.editNameButtonId).focus()})};this.isNameIssue=!1;this.areaName=this.areaConfig.consts.biConsts.areaName;this.captchaEnabled=n.Utilities.isInFlight("ProCaptcha");this.hasLegacyName=!1}return i.prototype.componentOnInit=function(){var n=this;return this.strings=this.areaConfig.strings,this.links=this.areaConfig.links,this.errorCode={generic:"editName_generic",nameEmpty:"editName_empty",profanity:"editName_profanity",invalidCaptcha:"editName_invalidCaptcha",dependenciesIssue:"editName_dependenciesIssue"},this.market=this.profileAppService.market,this.saveInProgress=!1,this.performTicketRefreshOnSave=!0,this.profanityFailureCount=0,this.mocks.setupEditNameMocks(this),this.reloadProfileInfo().then(function(){var i=!n.model.firstName||!n.model.lastName?"AddName":"EditName",t;n.profileAppService.hasLegacyName(n.model)&&(n.hasLegacyName=!0,i="ResolveConflict");t="OpenEditor";n.bi={scenarioId:n.telemetry.portalScenarios.beginMultiStepScenario(n.areaName,i,t),currentStep:t}})},i.prototype.getNameEditor=function(){return this.hasLegacyName?this.componentRegistryService.getInstanceById(this.nameConflictResolutionTagId):this.componentRegistryService.getInstanceById(this.standardEditNameTagId)},i.prototype.reloadProfileInfo=function(n){var t=this;return this.resetError(),this.personalInfoService.getPersonalInfo(n).then(function(n){t.model=n.data})},i.prototype.saveName=function(){var n=this,t,i;this.resetError();var f=this.getNameEditor(),r=f.getUserName(),u=this.validateInput(r);return u.isValid?(t={firstName:r.firstName,lastName:r.lastName},this.captchaEnabled&&(i=u.captcha,t.hipSolution=i.solution,t.hipId=i.hid,t.hipFlowId=i.flowId),this.saveInProgress=!0,this.personalInfoService.updateName(t).then(function(){n.telemetry.portalScenarios.endMultiStepScenario({area:n.areaName,name:n.bi.scenarioId,step:n.bi.currentStep,isSuccess:!0});n.profileAppService.pushAnnouncement(n.areaConfig.consts.ariaMessageCodes.nameChanged);n.reloadProfileInfo();n.closeEditorAndRefreshLoginTicket()}).catch(function(t){var r=t.jqXHR,u=r.responseJSON||{},i=n.errorCode[u.error]||n.errorCode.generic;return n.setError(n.profileAppService.errorMessageForCode(i)),n.errorCode.profanity===i&&(n.profanityFailureCount++,n.profanityFailureCount>2&&(n.isNameIssue=!0)),n.bi.serverErrorOccurred=r.status>=500,n.telemetry.portalScenarios.endStep({area:n.areaName,name:n.bi.scenarioId,isSuccess:!1,step:n.bi.currentStep,next:n.bi.currentStep,error:i}),n.captchaEnabled&&n.reloadCaptcha(),n.bi.serverErrorOccurred?n.$q.reject(t):n.$q.resolve()}).finally(function(){n.saveInProgress=!1})):this.$q.resolve()},i.prototype.nameChanged=function(){var t=this.getNameEditor(),n=t.getUserName();this.hasChanges=this.hasLegacyName?!!n.firstName&&!!n.lastName:this.model.firstName!==n.firstName||this.model.lastName!==n.lastName;this.notifyUserIsEditingName()},i.prototype.reloadCaptcha=function(){var n=this.componentRegistryService.getInstanceById(this.captchaId);n.reload()},i.prototype.closeEditorAndRefreshLoginTicket=function(){this.performTicketRefreshOnSave?this.$window.location.href=this.areaConfig.refreshLoginTicketAndReturnToProfileUrl:this.closeEditor()},i.prototype.validateInput=function(n){var t={isValid:!0,captcha:null},r,i;return n.firstName?n.lastName?this.captchaEnabled&&(r=this.componentRegistryService.getInstanceById(this.captchaId),i=r.verify(),t.captcha=i,!i.isSuccess)?(this.setError(this.profileAppService.errorMessageForCode(this.errorCode.invalidCaptcha)),t.isValid=!1,t):t:(this.setError(this.profileAppService.errorMessageForCode(this.errorCode.nameEmpty)),t.isValid=!1,t):(this.setError(this.profileAppService.errorMessageForCode(this.errorCode.nameEmpty)),t.isValid=!1,t)},i.prototype.notifyUserIsEditingName=function(){if(!this.bi.isUserEditingName){this.bi.isUserEditingName=!0;var n="Editing";this.telemetry.portalScenarios.endStep({area:this.areaName,name:this.bi.scenarioId,isSuccess:!0,step:this.bi.currentStep,next:n});this.bi.currentStep=n}},i.prototype.hasError=function(){return!!this.$meeErrors.getError(this.editNameError)},i.prototype.setError=function(n){this.$meeErrors.setError(this.editNameError,n)},i.prototype.resetError=function(){this.$meeErrors.reset(this.editNameError)},i.prototype.getInstrumentationComponentName=function(){return"profile.edit-name"},i.prototype.getProfanityContactSupportDataBIId=function(){return this.getInstrumentationComponentName()+".profanity-contact-support"},i.prototype.getSaveButtonDataBIId=function(){return this.getInstrumentationComponentName()+".save-button"},i.prototype.getCancelButtonDataBIId=function(){return this.getInstrumentationComponentName()+".cancel-button"},i.$inject=["$q","areaConfig","profileAppService","personalInfoService","profileMocksService","telemetryService","$window","$timeout","sharedCmsComponents","componentRegistryService","$meeErrors"],__decorate([n.OneUI.Angular.MonitorOperationProgress("load-personal-info")],i.prototype,"reloadProfileInfo",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("saveName")],i.prototype,"saveName",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("reloadCaptcha")],i.prototype,"reloadCaptcha",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.areaModuleName,"editName",{templateUrl:"/Areas/Profile/Scripts/Components/EditName/edit-name.html"})],i)}();t.EditNameComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r){this.areaConfig=n;this.profileAppService=t;this.sharedCmsComponents=i;this.componentRegistryService=r;this.componentClassName="NameConflictResolutionComponent";this.canUserEnterNewName=!1;this.legacyNameSelection="LegacyName";this.currentNameSelection="CurrentName";this.newNameSelection="NewName";this.strings=this.areaConfig.strings;this.content=this.areaConfig.content.editNamePage}return i.prototype.$onInit=function(){this.market=this.profileAppService.market;this.componentRegistryService.register(this.componentClassName,this.componentId,this);this.saveInProgress=!1;this.selection=this.legacyNameSelection;this.onControlChange()},i.prototype.onControlChange=function(){this.canUserEnterNewName=this.selection===this.newNameSelection;this.onChanged({$event:null})},i.prototype.getUserName=function(){return this.selection===this.currentNameSelection?{firstName:this.model.firstName,lastName:this.model.lastName}:this.selection===this.legacyNameSelection?{firstName:this.model.firstNameLegacy,lastName:this.model.lastNameLegacy}:this.selection===this.newNameSelection?{firstName:this.newFirstName,lastName:this.newLastName}:{firstName:"",lastName:""}},i.$inject=["areaConfig","profileAppService","sharedCmsComponents","componentRegistryService"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"nameConflictResolution",{templateUrl:"/Areas/Profile/Scripts/Components/EditName/NameConflictResolution/name-conflict-resolution.html",bindings:{componentId:"<",model:"<profileInfo",onChanged:"&"}})],i)}();t.NameConflictResolutionComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r){this.$scope=n;this.areaConfig=t;this.profileAppService=i;this.componentRegistryService=r;this.componentClassName="StandardEditNameComponent";this.market=this.profileAppService.market;this.strings=this.areaConfig.strings}return i.prototype.$onInit=function(){this.componentRegistryService.register(this.componentClassName,this.componentId,this);this.firstName=this.model.firstName;this.lastName=this.model.lastName},i.prototype.nameChanged=function(n){this.onChanged({$event:n})},i.prototype.getUserName=function(){return{firstName:this.firstName,lastName:this.lastName}},i.$inject=["$scope","areaConfig","profileAppService","componentRegistryService"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"standardEditName",{templateUrl:"/Areas/Profile/Scripts/Components/EditName/StandardEditName/standard-edit-name.html",bindings:{componentId:"<",model:"<profileInfo",onChanged:"&"}})],i)}();t.StandardEditNameComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e,o,s,h,c,l,a){this.$scope=n;this.$q=t;this.areaConfig=i;this.personalInfoService=r;this.telemetry=u;this.profileAppService=f;this.$location=e;this.$window=o;this.$timeout=s;this.mocks=h;this.sharedCmsComponents=c;this.$promise=l;this.$meeErrors=a;this.editPictureError="EditPictureError";this.isDirty=!1;this.pictureIsDownloading=!1;this.pictureIsSaving=!1;this.pictureIsRemoving=!1;this.pictureIsUploading=!1;this.userDeletedPicture=!1;this.userUploadedNewPicture=!1;this.areaName=this.areaConfig.consts.biConsts.areaName}return i.prototype.componentOnInit=function(){var n=this;return this.strings=this.areaConfig.strings,this.links=this.areaConfig.links,this.errorCode={generic:"editPic_general",saveFailed:"editPic_saveFailed",removeFailed:"editPic_removeFailed",uploadFailed:"editPic_uploadFailed",fileTooBig:"editPic_fileTooBig",badFile:"editPic_badFile",uploadTimeout:"editPic_timeout"},this.market=this.profileAppService.market,this.switchToEditorMode(),this.$scope.$on("pictureDownloadComplete",function(){return n.setupMocks()}),this.startSyncScenario(),this.reloadProfileInfo().then(function(){n.sendLandingBI()})},i.prototype.reloadProfileInfo=function(n){var t=this;return this.resetError(),this.personalInfoService.getPersonalInfo(n).then(function(n){var i=n.data;return t.model={cropArea:i.profilePictureCropArea,profilePictureUrl:i.profilePictureUrl,profileTileUrl:i.profileTileUrl},t.biSync.data["awa-mee_custom1"]=t.model.profilePictureUrl?"edit":"add",t.telemetry.portalScenarios.endStep({area:t.areaName,name:t.biSync.scenarioId,isSuccess:!0,step:t.biSync.currentStep,next:t.biSync.steps.loaded,data:t.biSync.data}),t.biSync.currentStep=t.biSync.steps.loaded,t.$promise.resolve(n)}).catch(function(n){var r=n.jqXHR,u=r.responseJSON||{},i=t.errorCode[u.error]||t.errorCode.generic;return t.setError(t.profileAppService.errorMessageForCode(i)),t.bi.serverErrorOccurred=r.status>=500,t.telemetry.portalScenarios.endStep({area:t.areaName,name:t.biSync.scenarioId,isSuccess:!1,step:t.biSync.currentStep,next:t.biSync.currentStep,error:i}),t.$promise.reject(i)})},i.prototype.setPicturePickerClickHandler=function(n){this.selectPicture=n},i.prototype.getInstrumentationComponentName=function(){return"profile.edit-picture"},i.prototype.getRemovePictureButtonDataBIId=function(){return this.getInstrumentationComponentName()+".remove-picture-button"},i.prototype.getUploadButtonDataBIId=function(){return this.getInstrumentationComponentName()+".upload-button"},i.prototype.getSaveButtonDataBIId=function(){return this.getInstrumentationComponentName()+".save-button"},i.prototype.getCancelButtonDataBIId=function(){return this.getInstrumentationComponentName()+".cancel-button"},i.prototype.getConfirmRemoveYesDataBIId=function(){return this.getInstrumentationComponentName()+".confirm-remove-yes"},i.prototype.getConfirmRemoveNoDataBIId=function(){return this.getInstrumentationComponentName()+".confirm-remove-no"},i.prototype.savePicture=function(){var n=this;return this.pictureIsSaving=!0,this.resetError(),this.bi.serverErrorOccurred=!1,this.personalInfoService.updatePicture({cropArea:this.model.cropArea,useUploadedPicture:this.userUploadedNewPicture}).then(function(t){var i=t.data;return n.isDirty=!1,n.reloadProfileInfo().then(function(){n.dropCacheBusterCookie();n.telemetry.portalScenarios.endMultiStepScenario({area:n.areaName,name:n.bi.scenarioId,isSuccess:!0,step:n.bi.currentStep});n.telemetry.portalScenarios.endMultiStepScenario({area:n.areaName,name:n.biSync.scenarioId,isSuccess:!0,step:n.biSync.currentStep});n.refreshMeControlPicture();n.profileAppService.pushAnnouncement(n.areaConfig.consts.ariaMessageCodes.pictureChanged);n.closeEditor()})}).catch(function(t){var r=t.jqXHR,u=r.responseJSON||{},i=n.errorCode[u.error]||n.errorCode.generic;return n.setError(n.profileAppService.errorMessageForCode(i)),n.bi.serverErrorOccurred=r.status>=500,n.telemetry.portalScenarios.endStep({area:n.areaName,name:n.bi.scenarioId,isSuccess:!1,step:n.bi.currentStep,next:n.bi.currentStep,error:i}),n.telemetry.portalScenarios.endStep({area:n.areaName,name:n.biSync.scenarioId,isSuccess:!1,step:n.biSync.currentStep,next:n.biSync.currentStep,error:i}),n.$q.reject(t)}).finally(function(){n.pictureIsSaving=!1})},i.prototype.confirmRemovePicture=function(){var n=this;this.pictureIsRemoving=!0;this.resetError();this.bi.serverErrorOccurred=!1;this.personalInfoService.deletePicture().then(function(){n.isDirty=!1;n.userDeletedPicture=!0;n.reloadProfileInfo().then(function(){n.dropCacheBusterCookie();n.telemetry.portalScenarios.endStep({area:n.areaName,name:n.bi.scenarioId,isSuccess:!0,step:n.bi.currentStep,next:n.bi.steps.editing});n.bi.currentStep=n.bi.steps.editing;n.telemetry.portalScenarios.endStep({area:n.areaName,name:n.biSync.scenarioId,isSuccess:!0,step:n.biSync.currentStep,next:n.biSync.steps.editing,data:n.biSync.data});n.biSync.currentStep=n.biSync.steps.editing;n.refreshMeControlPicture()}).catch(function(){n.$window.location.reload()})}).catch(function(t){var r=t.jqXHR,u=r.responseJSON||{},i=n.errorCode[u.error]||n.errorCode.generic;n.setError(n.profileAppService.errorMessageForCode(i));n.bi.serverErrorOccurred=r.status>=500;n.telemetry.portalScenarios.endStep({area:n.areaName,name:n.bi.scenarioId,isSuccess:!1,step:n.bi.currentStep,next:n.bi.steps.editing,error:i});n.bi.currentStep=n.bi.steps.editing;n.telemetry.portalScenarios.endStep({area:n.areaName,name:n.biSync.scenarioId,isSuccess:!1,step:n.biSync.currentStep,next:n.biSync.steps.editing,error:i,data:n.biSync.data});n.biSync.currentStep=n.biSync.steps.editing}).finally(function(){n.pictureIsRemoving=!1;n.switchToEditorMode()})},i.prototype.cancel=function(){var n=this;this.resetError();this.userUploadedNewPicture?(this.userUploadedNewPicture=!1,this.isDirty=!1,this.reloadProfileInfo().then(function(){n.telemetry.portalScenarios.cancelStep({area:n.areaName,name:n.bi.scenarioId,isSuccess:!n.bi.serverErrorOccurred,step:n.bi.currentStep,next:n.bi.steps.editing});n.bi.currentStep=n.bi.steps.editing;n.telemetry.portalScenarios.cancelStep({area:n.areaName,name:n.biSync.scenarioId,isSuccess:!n.bi.serverErrorOccurred,step:n.biSync.currentStep,next:n.biSync.steps.editing,data:n.biSync.data});n.biSync.currentStep=n.biSync.steps.editing;n.$scope.$emit("uploadComplete")}).catch(function(){n.$window.location.reload()})):(!this.bi.serverErrorOccurred&&this.userDeletedPicture?(this.telemetry.portalScenarios.endMultiStepScenario({area:this.areaName,name:this.bi.scenarioId,isSuccess:!0,step:this.bi.currentStep}),this.telemetry.portalScenarios.endMultiStepScenario({area:this.areaName,name:this.biSync.scenarioId,isSuccess:!0,step:this.biSync.currentStep})):(this.telemetry.portalScenarios.cancelMultiStepScenario({area:this.areaName,name:this.bi.scenarioId,isSuccess:!this.bi.serverErrorOccurred,step:this.bi.currentStep}),this.telemetry.portalScenarios.cancelMultiStepScenario({area:this.areaName,name:this.biSync.scenarioId,isSuccess:!this.bi.serverErrorOccurred,step:this.biSync.currentStep})),this.closeEditor())},i.prototype.operationIsInProgress=function(){return!!(this.pictureIsDownloading||this.pictureIsUploading||this.pictureIsSaving||this.pictureIsRemoving)},i.prototype.removePicture=function(n){n.preventDefault();this.editorMode="removeConfirmation";this.bi.notifyUserIsEditingPicture();this.telemetry.portalScenarios.endStep({area:this.areaName,name:this.bi.scenarioId,isSuccess:!0,step:this.bi.currentStep,next:this.bi.steps.confirmRemove});this.bi.currentStep=this.bi.steps.confirmRemove;this.telemetry.portalScenarios.endStep({area:this.areaName,name:this.biSync.scenarioId,isSuccess:!0,step:this.biSync.currentStep,next:this.biSync.steps.confirmRemove,data:this.biSync.data});this.biSync.currentStep=this.biSync.steps.confirmRemove},i.prototype.declineRemovePicture=function(){this.switchToEditorMode();this.telemetry.portalScenarios.cancelStep({area:this.areaName,name:this.bi.scenarioId,isSuccess:!0,step:this.bi.currentStep,next:this.bi.steps.editing});this.bi.currentStep=this.bi.steps.editing;this.telemetry.portalScenarios.cancelStep({area:this.areaName,name:this.biSync.scenarioId,isSuccess:!0,step:this.biSync.currentStep,next:this.biSync.steps.editing,data:this.biSync.data});this.biSync.currentStep=this.biSync.steps.editing},i.prototype.switchToEditorMode=function(){this.editorMode="editor"},i.prototype.closeEditor=function(){this.$scope.$emit("uploadComplete");this.profileAppService.goBack();this.$timeout(function(){$(t.ProfilePictureSectionComponent.editPictureButtonId).focus()})},i.prototype.dropCacheBusterCookie=function(){var t=new Date,n;t.setDate(t.getDate()+1);n=this.$location.host().split(".");n.splice(0,n.length-2);document.cookie="upck="+(Math.random()*65535).toFixed(0).toString()+";expires="+t.toUTCString()+";domain=."+n.join(".")+";path=/"},i.prototype.refreshMeControlPicture=function(){this.$window.MSA&&this.$window.MSA&&this.$window.MSA.MeControl.API&&this.$window.MSA.MeControl.API.refreshUserPicture&&this.$window.MSA.MeControl.API.refreshUserPicture()},i.prototype.notifyUserIsEditingPicture=function(n){n.isUserEditingPicture||(n.isUserEditingPicture=!0,this.telemetry.portalScenarios.endStep({area:this.areaName,name:n.scenarioId,isSuccess:!0,step:n.currentStep,next:n.steps.editing}),n.currentStep=n.steps.editing,this.telemetry.portalScenarios.endStep({area:this.areaName,name:this.biSync.scenarioId,isSuccess:!0,step:this.biSync.currentStep,next:this.biSync.steps.editing,data:this.biSync.data}),this.biSync.currentStep=this.biSync.steps.editing)},i.prototype.setupMocks=function(){var n=this;this.$timeout(function(){n.mocks.setupEditPictureMocks(n)})},i.prototype.sendLandingBI=function(){var n=this,i=this.model.profilePictureUrl?"EditPicture":"AddPicture",t="OpenEditor";this.bi={scenarioId:this.telemetry.portalScenarios.beginMultiStepScenario(this.areaName,i,t),currentStep:t,notifyUserIsEditingPicture:function(){return n.notifyUserIsEditingPicture(n.bi)},steps:{loaded:"Loaded",editing:"Editing",confirmRemove:"ConfirmRemove",uploading:"Uploading",uploaded:"Uploaded"}}},i.prototype.startSyncScenario=function(){var n="OpenEditor";this.biSync={scenarioId:this.telemetry.portalScenarios.beginMultiStepScenario(this.areaName,"EditPictureSync",n),currentStep:n,notifyUserIsEditingPicture:function(){},steps:{loaded:"Loaded",editing:"Editing",confirmRemove:"ConfirmRemove",uploading:"Uploading",uploaded:"Uploaded"},data:{}}},i.prototype.setError=function(n){this.$meeErrors.setError(this.editPictureError,n)},i.prototype.resetError=function(){this.$meeErrors.reset(this.editPictureError)},i.$inject=["$scope","$q","areaConfig","personalInfoService","telemetryService","profileAppService","$location","$window","$timeout","profileMocksService","sharedCmsComponents","$q","$meeErrors"],__decorate([n.OneUI.Angular.MonitorOperationProgress("load-personal-info")],i.prototype,"reloadProfileInfo",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("save-picture")],i.prototype,"savePicture",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.areaModuleName,"editPicture",{templateUrl:"/Areas/Profile/Scripts/Components/EditPicture/edit-picture.html"})],i)}();t.EditPictureComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e){var o=this;this.$q=n;this.$scope=t;this.areaConfig=i;this.mocks=r;this.$window=u;this.$timeout=f;this.profileAppService=e;this.pictureIsDownloading=!1;this.pictureIsUploading=!1;this.userUploadedNewPicture=!1;this.isDirty=!1;this.cropAreaChangeDelta=10;this.$postLink=function(){o.$pictureEditorOwner=$("#picture-editor-owner");o.$pictureEditor=$("#picture-editor");o.$pictureEditor.on("load",o.profilePictureDownloaded);o.$pictureEditor.on("error",o.profilePictureDownloadError);if(!o.$window.ActiveXObject||o.$window.document.addEventListener)angular.element(o.$window).on("resize",o.windowResize)};this.$onDestroy=function(){o.clearResizeTimer();o.removeCurrentCropper();o.destroyKeyboardFriendlyCropper();o.componentLoadedTelemetryReported||(o.componentLoadedDefer.resolve(),o.componentLoadedTelemetryReported=!0)};this.windowResize=function(){o.clearResizeTimer();o.resizeTimer=o.$timeout(o.onResize,150,!1)};this.operationIsInProgressChanged=function(){if(o.currentCropper){var n=o.operationIsInProgress();n!=o.previousOperationIsInProgress&&(o.previousOperationIsInProgress=n,o.currentCropper.setOptions({allowMove:!n,allowResize:!n}))}};this.editorModeChanged=function(n){o.currentCropper&&(n=="removeConfirmation"?($(".jcrop-holder > div:first-child",o.$pictureEditorOwner).css("display","none"),$(".jcrop-holder > img",o.$pictureEditorOwner).css("opacity","1.0")):($(".jcrop-holder > div:first-child",o.$pictureEditorOwner).css("display","block"),$(".jcrop-holder > img",o.$pictureEditorOwner).css("opacity",o.expectedPictureOpacity.toString())))};this.profilePictureUrlChanged=function(n){n?o.pictureDownloadStarted():(o.componentLoadedTelemetryReported||(o.componentLoadedDefer.resolve(),o.componentLoadedTelemetryReported=!0),o.removeCurrentCropper())};this.profilePictureDownloaded=function(n){var t=$(n.delegateTarget);if(!t[0].complete){setTimeout(function(){return o.profilePictureDownloaded(n)},100);return}t.show();o.model.realUserpicSizePx={width:t[0].clientWidth,height:t[0].clientHeight};o.initializeCropper(o.pictureDownloadComplete)};this.profilePictureDownloadError=function(n){o.model.profilePictureUrl&&(o.componentLoadedDefer.reject({error:n,model:o.model}),o.componentLoadedTelemetryReported=!0);o.$timeout(function(){o.model.profileTileUrl="";o.model.profilePictureUrl="";o.model.cropArea=null});o.pictureDownloadComplete()};this.cropChanged=function(n){o.$timeout(function(){(o.model.cropArea={x:Math.floor(n.x),y:Math.floor(n.y),width:Math.floor(n.w),height:Math.floor(n.h)},o.model.cropArea.x<0&&(o.model.cropArea.x=0),o.model.cropArea.y<0&&(o.model.cropArea.y=0),o.model.cropArea.x+o.model.cropArea.width>o.model.realUserpicSizePx.width&&(o.model.cropArea.width=o.model.realUserpicSizePx.width-o.model.cropArea.x),o.model.cropArea.y+o.model.cropArea.height>o.model.realUserpicSizePx.height&&(o.model.cropArea.height=o.model.realUserpicSizePx.height-o.model.cropArea.y),o.model.cropArea.width=o.model.cropArea.height=Math.min(o.model.cropArea.width,o.model.cropArea.height),o.isCropperInitialized)&&(o.isDirty=!0,o.bi.notifyUserIsEditingPicture())})};this.initializeCropArea=function(){var n=angular.copy(o.model.cropArea),i,f,e,s,h;n&&(n.x<0||n.y<0||n.width<=0||n.height<=0?n=null:n.width!=n.height&&(n.width=n.height=Math.min(n.width,n.height)));var r=o.jcropArrayToCoordinates(o.currentCropper.getBounds()),u=o.jcropArrayToCoordinates(o.currentCropper.getScaleFactor()),t={};if(t.y=t.x=Math.min(r.x,r.y,o.areaConfig.minimumProfilePictureCropSizePx*u.x,o.areaConfig.minimumProfilePictureCropSizePx*u.y),n&&(t.y=t.x=Math.min(n.height,n.width,t.x)),o.currentCropper.setOptions({minSize:[t.x,t.y],trueSize:[o.model.realUserpicSizePx.width,o.model.realUserpicSizePx.height]}),!n){i={};i.y=i.x=Math.min(r.x,r.y,o.areaConfig.preferredProfilePictureCropSizePx*u.x,o.areaConfig.preferredProfilePictureCropSizePx*u.y);f=(r.x-i.x)/2;e=(r.y-i.y)/2;o.currentCropper.setSelect([f,e,f+i.x,e+i.y]);return}s=n.x;h=n.y;o.currentCropper.setSelect([s,h,s+n.width,h+n.height])};this.pictureDownloadStarted=function(){o.pictureIsDownloading=!0;o.currentCropper&&o.removeCurrentCropper();o.$pictureEditor.hide()};this.pictureDownloadComplete=function(){o.$timeout(function(){o.pictureIsDownloading=!1;o.isDirty=!1||o.userUploadedNewPicture;o.componentLoadedTelemetryReported||(o.componentLoadedDefer.resolve(),o.componentLoadedTelemetryReported=!0);o.$scope.$emit("pictureDownloadComplete")})};this.initializeCropper=function(n){o.isCropperInitialized=!1;var t=function(t){o.currentCropper=t;o.initializeCropArea();n&&n();o.isCropperInitialized=!0;o.setupKeyboardFriendlyCropper()};o.$pictureEditor.Jcrop({boxWidth:Math.min(o.model.realUserpicSizePx.width,o.$pictureEditorOwner.width()),boxHeight:0,boundary:0,preventSelectionFlipping:!0,bgOpacity:o.expectedPictureOpacity,handleOpacity:1,trackDocument:!0,allowSelect:!1,createHandles:["n","e","s","w"],drawBorders:!1,aspectRatio:1,onSelect:o.cropChanged},function(){t(this)})};this.removeCurrentCropper=function(){o.currentCropper&&(o.currentCropper.destroy(),o.currentCropper=null);o.$pictureEditor.css({height:"auto",width:"auto"})};this.onResize=function(){o.clearResizeTimer();o.currentCropper&&(o.removeCurrentCropper(),o.initializeCropper())};this.clearResizeTimer=function(){o.resizeTimer&&(o.$timeout.cancel(o.resizeTimer),o.resizeTimer=null)};this.jcropArrayToCoordinates=function(n){return{x:n[0],y:n[1]}};this.componentLoadedDefer=this.$q.defer();this.isCropperInitialized=!1}return i.prototype.componentOnInit=function(){return this.previousOperationIsInProgress=this.operationIsInProgress(),this.componentLoadedTelemetryReported=!1,this.expectedPictureOpacity=.2,this.$scope.$watch("$ctrl.model.profilePictureUrl",this.profilePictureUrlChanged),this.$scope.$watch("$ctrl.editorMode",this.editorModeChanged),this.$scope.$watch(this.operationIsInProgressChanged),this.componentLoadedDefer.promise},i.prototype.increaseCropArea=function(){var t=Math.min(this.currentCropper.getOptions().trueSize[0],this.currentCropper.getOptions().trueSize[1]),n=this.currentCropper.tellSelect();(n.x=n.x-this.cropAreaChangeDelta/2,n.y=n.y-this.cropAreaChangeDelta/2,n.h=n.h+this.cropAreaChangeDelta,n.w=n.w+this.cropAreaChangeDelta,n.h>t)||(this.currentCropper.setSelect([n.x,n.y,n.x+n.w,n.y+n.h]),this.announceCropperMovement(this.areaConfig.consts.ariaMessageCodes.editPictureCropZoomOut))},i.prototype.decreaseCropArea=function(){var t=Math.min(this.currentCropper.getOptions().minSize[0],this.currentCropper.getOptions().minSize[1]),n=this.currentCropper.tellSelect();(n.x=n.x+this.cropAreaChangeDelta/2,n.y=n.y+this.cropAreaChangeDelta/2,n.h=n.h-this.cropAreaChangeDelta,n.w=n.w-this.cropAreaChangeDelta,n.h<t)||(this.currentCropper.setSelect([n.x,n.y,n.x+n.w,n.y+n.h]),this.announceCropperMovement(this.areaConfig.consts.ariaMessageCodes.editPictureCropZoomIn))},i.prototype.destroyKeyboardFriendlyCropper=function(){this.jcropKeyManager&&(this.jcropKeyManager.removeEventListener("focus",this.cropperGotFocusListener),this.jcropKeyManager.removeEventListener("blur",this.cropperLostFocusListener),this.jcropKeyManager.removeEventListener("keydown",this.captureCropperKeyPressListener))},i.prototype.setupKeyboardFriendlyCropper=function(){var n=this;angular.element(".jcrop-keymgr").prop("tabindex","0");this.jcropKeyManager=angular.element(".jcrop-keymgr")[0];this.cropperGotFocusListener=function(){n.cropperGotFocus()};this.cropperLostFocusListener=function(){n.cropperLostFocus()};this.captureCropperKeyPressListener=function(t){n.captureCropperKeyPress(t)};this.jcropKeyManager.addEventListener("focus",this.cropperGotFocusListener);this.jcropKeyManager.addEventListener("blur",this.cropperLostFocusListener);this.jcropKeyManager.addEventListener("keydown",this.captureCropperKeyPressListener)},i.prototype.captureCropperKeyPress=function(n){n.key==="+"||n.keyCode===187?this.increaseCropArea():n.key==="-"||n.keyCode===189?this.decreaseCropArea():n.ctrlKey&&n.key==="ArrowUp"?this.increaseCropArea():n.ctrlKey&&n.key==="ArrowRight"?this.increaseCropArea():n.ctrlKey&&n.key==="ArrowLeft"?this.decreaseCropArea():n.ctrlKey&&n.key==="ArrowDown"?this.decreaseCropArea():n.key==="ArrowUp"?this.announceCropperMovement(this.areaConfig.consts.ariaMessageCodes.editPictureCropShiftUp):n.key==="ArrowRight"?this.announceCropperMovement(this.areaConfig.consts.ariaMessageCodes.editPictureCropShiftRight):n.key==="ArrowLeft"?this.announceCropperMovement(this.areaConfig.consts.ariaMessageCodes.editPictureCropShiftLeft):n.key==="ArrowDown"&&this.announceCropperMovement(this.areaConfig.consts.ariaMessageCodes.editPictureCropShiftDown)},i.prototype.cropperGotFocus=function(){$(".jcrop-holder").addClass("selected");this.profileAppService.instantAnnounceMessage(this.areaConfig.consts.ariaMessageCodes.editPictureHint)},i.prototype.cropperLostFocus=function(){$(".jcrop-holder").removeClass("selected")},i.prototype.getInstrumentationComponentName=function(){return"profile.picture-editor"},i.prototype.announceCropperMovement=function(n){this.profileAppService.instantAnnounceMessage(n)},i.$inject=["$q","$scope","areaConfig","profileMocksService","$window","$timeout","profileAppService"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.areaModuleName,"pictureEditor",{bindings:{operationIsInProgress:"&",model:"=",editorMode:"=",pictureIsDownloading:"=",pictureIsUploading:"=",userUploadedNewPicture:"=",bi:"=",biSync:"=",isDirty:"=",strings:"<"},template:'<div id="picture-editor-owner">\n                <img id="picture-editor" \n                     alt="{{$ctrl.strings.profilePicture}}"\n                     ng-src="{{$ctrl.model.profilePictureUrl}}" \n                     ng-hide="!$ctrl.model.profilePictureUrl || $ctrl.pictureIsUploading" />\n                <div class="mee-no-picture" ng-if="!$ctrl.model.profilePictureUrl || $ctrl.pictureIsDownloading">\n                    <div data-mee-no-picture><\/div>\n                <\/div>\n            <\/div>'})],i)}();t.PictureEditorComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i=function(){function i(i,r,u,f,e,o,s){var h=this;this.$scope=i;this.areaConfig=r;this.profileAppService=u;this.personalInfoService=f;this.telemetry=e;this.logger=o;this.$timeout=s;this.pictureIsUploading=!1;this.userUploadedNewPicture=!1;this.isDirty=!1;this.$onInit=function(){h.$scope.$on("uploadComplete",h.removeFileSizeBiDimension)};this.$postLink=function(){h.$picturePicker=$("#picture-picker");h.$uploadForm=$("#picture-upload-form");h.$uploadTarget=$("#picture-upload-target");h.$currentCv=$("#current-cv");h.$picturePicker.change(h.onPictureSelected);h.$uploadTarget.load(h.onPictureUploaded);h.setPicturePickerClickHandler({selectPicture:h.callClickOnPicker})};this.callClickOnPicker=function(){h.bi.notifyUserIsEditingPicture();h.$picturePicker.click()};this.onPictureSelected=function(){h.$picturePicker.val()&&(h.pictureUploadStarted(),h.uploadPicture())};this.uploadPicture=function(){if(!h.areaConfig.uploadTimeoutSec){h.logger.debug("picturePickerDirective.onPictureSelected","Special case for mocks: no timeout - no upload should happen.");return}t.uploadedPicture=null;var n=h.$picturePicker[0];if(n.files&&n.files.length&&n.files[0].size&&(h.selectedFileSizeBytes=n.files[0].size,h.selectedFileSizeBytes>h.areaConfig.uploadFileSizeLimitMb*1048576)){t.uploadedPicture={error:{code:"fileTooBig",blameServer:!1}};h.$timeout(h.onPictureUploaded,0,!1);return}try{h.telemetry.portalCv.incrementCv();h.$currentCv.val(h.telemetry.portalCv.getCurrentCvValue());h.$uploadForm.submit()}catch(i){t.uploadedPicture={error:{code:"generic",blameServer:!1}};h.$timeout(h.onPictureUploaded,0,!1)}};this.onPictureUploaded=function(){var f;if(h.pictureIsUploading){h.$timeout.cancel(h.uploadTimer);var u=!!(typeof t.uploadedPicture!="undefined"&&t.uploadedPicture),e=!!(u&&t.uploadedPicture.success),o=421,r=200,i="";e||(r=o,i=h.errorCode.generic,u&&t.uploadedPicture.error&&(r=t.uploadedPicture.error.blameServer?500:400,i=h.errorCode[t.uploadedPicture.error.code||"generic"]||i));f=h.getFileSizeBucket(h.selectedFileSizeBytes);h.personalInfoService.reportPictureUploaded({endpointUri:h.getUploadPictureEndpointUrl(),latencyMs:Date.now()-h.uploadStartTime,isQosImpacting:!e&&(o===r||r>499),statusCode:r,errorCode:i,fileSizeBucket:f});h.createFileSizeBiDimension();angular.element("meta[name='ms.fsize']").attr("content",f);h.$timeout(function(){if(h.pictureIsUploading=!1,u){if(t.uploadedPicture.success){h.resetError();h.model.cropArea=null;h.model.profileTileUrl=null;h.model.profilePictureUrl=t.uploadedPicture.success.profilePictureUrl||"";h.userUploadedNewPicture=!0;h.isDirty=!0;h.telemetry.portalScenarios.endStep({area:"Profile",name:h.bi.scenarioId,isSuccess:!0,step:h.bi.currentStep,next:h.bi.steps.uploaded});h.bi.currentStep=h.bi.steps.uploaded;h.telemetry.portalScenarios.endStep({area:"Profile",name:h.biSync.scenarioId,isSuccess:!0,step:h.biSync.currentStep,next:h.biSync.steps.uploaded,data:h.biSync.data});h.biSync.currentStep=h.biSync.steps.uploaded;return}if(t.uploadedPicture.error){if(h.errorCode.fileTooBig==i){var r=n.Utilities.formatString(h.profileAppService.errorMessageForCode(i),h.areaConfig.uploadFileSizeLimitMb);h.setError({errorMessage:r})}else h.setError({errorMessage:h.profileAppService.errorMessageForCode(i)});h.bi.serverErrorOccurred=!!t.uploadedPicture.error.blameServer;h.telemetry.portalScenarios.endStep({area:"Profile",name:h.bi.scenarioId,isSuccess:!1,step:h.bi.currentStep,next:h.bi.steps.editing,error:i});h.bi.currentStep=h.bi.steps.editing;h.telemetry.portalScenarios.endStep({area:"Profile",name:h.biSync.scenarioId,isSuccess:!1,step:h.biSync.currentStep,next:h.biSync.steps.editing,error:i,data:h.biSync.data});h.biSync.currentStep=h.biSync.steps.editing;return}}h.setError({errorMessage:h.profileAppService.errorMessageForCode(h.errorCode.generic)});h.telemetry.portalScenarios.endStep({area:"Profile",name:h.bi.scenarioId,isSuccess:!1,step:h.bi.currentStep,next:h.bi.steps.editing,error:h.errorCode.generic});h.bi.currentStep=h.bi.steps.editing;h.telemetry.portalScenarios.endStep({area:"Profile",name:h.biSync.scenarioId,isSuccess:!1,step:h.biSync.currentStep,next:h.biSync.steps.editing,error:h.errorCode.generic,data:h.biSync.data});h.biSync.currentStep=h.biSync.steps.editing})}};this.onPictureUploadTimeout=function(){t.uploadedPicture={error:{code:"uploadTimeout",blameServer:!1}};h.onPictureUploaded()};this.pictureUploadStarted=function(){h.pictureIsUploading=!0;h.resetError();h.bi.serverErrorOccurred=!1;h.telemetry.portalScenarios.endStep({area:"Profile",name:h.bi.scenarioId,isSuccess:!0,step:h.bi.currentStep,next:h.bi.steps.uploading});h.bi.currentStep=h.bi.steps.uploading;h.telemetry.portalScenarios.endStep({area:"Profile",name:h.biSync.scenarioId,isSuccess:!0,step:h.biSync.currentStep,next:h.biSync.steps.uploading,data:h.biSync.data});h.biSync.currentStep=h.biSync.steps.uploading;h.uploadStartTime=Date.now();h.uploadTimer=h.$timeout(h.onPictureUploadTimeout,h.areaConfig.uploadTimeoutSec*1e3,!1);h.selectedFileSizeBytes=null};this.getUploadPictureEndpointUrl=function(){return h.areaConfig.serviceEndpointRoot+"v1/personal-info/picture"};this.getFileSizeBucket=function(n){if(typeof n=="undefined"||null===n)return"Unknown";var t=n/1048576;return t<1?"0_1_MB":t<2?"1_2_MB":t<3?"2_3_MB":t<4?"3_4_MB":t<5?"4_5_MB":t<10?"5_10_MB":t<15?"10_15_MB":t<20?"15_20_MB":t<25?"20_25_MB":"25_x_MB"};this.createFileSizeBiDimension=function(){angular.element("meta[name='ms.fsize']").length||angular.element("head").append($("<meta name='ms.fsize'>"))};this.removeFileSizeBiDimension=function(){angular.element("meta[name='ms.fsize']").length&&angular.element("meta[name='ms.fsize']").remove()};this.getAntiforgeryToken=function(){return h.personalInfoService.getAntiforgeryToken()}}return i.$inject=["$scope","areaConfig","profileAppService","personalInfoService","telemetryService","loggingService","$timeout"],i}();angular.module(t.areaModuleName).component("meePicturePicker",{bindings:{model:"=",operationIsInProgress:"&",editorMode:"<",setPicturePickerClickHandler:"&",errorCode:"=",pictureIsUploading:"=",userUploadedNewPicture:"=",isDirty:"=",bi:"=",biSync:"=",setError:"&",resetError:"&"},controller:i,template:'<form id="picture-upload-form" method= "post" enctype="multipart/form-data" target="picture-upload-target" action="{{$ctrl.getUploadPictureEndpointUrl()}}">\n                <input id="picture-picker" name="pictureFile" ng-disabled="$ctrl.operationIsInProgress() || $ctrl.editorMode != \'editor\'" class="ie10lte" type="file" accept="image/jpeg,image/tiff,image/gif,image/png" />\n                <input id="{{$ctrl.getAntiforgeryToken().name}}" name="{{$ctrl.getAntiforgeryToken().name}}" type="hidden" value="{{$ctrl.getAntiforgeryToken().value}}" />\n                <input id="current-cv" name="{{$ctrl.telemetry.portalCv.getCorrelationVectorFormFieldName()}}" type="hidden" value="" />\n             <\/form>\n             <iframe id="picture-upload-target" name="picture-upload-target" style="width:0; height:0; visibility:hidden; overflow:hidden;"><\/iframe>'})})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u){this.$q=n;this.areaConfig=t;this.permissionsLinkRequestService=i;this.$state=r;this.telemetry=u;this.content=t.content.permissionsLinkRequest;this.sendingRequest=!1;this.profileBIConst=this.areaConfig.consts.biConsts;this.permissionLinkRequestBIConst=this.profileBIConst.permissionLinkRequestBIConst}return i.prototype.$onInit=function(){this.bi={scenarioId:"",isUserTypingInEmail:!1,currentStep:this.permissionLinkRequestBIConst.firstStep};this.telemetry.portalScenarios.beginMultiStepScenario(this.profileBIConst.areaName,this.permissionLinkRequestBIConst.scenarioName,this.bi.currentStep)},i.prototype.notifyUserIsTypingInEmail=function(){this.bi.isUserTypingInEmail||(this.bi.isUserTypingInEmail=!0,this.telemetry.portalScenarios.endStep({area:this.profileBIConst.areaName,name:this.permissionLinkRequestBIConst.scenarioName,isSuccess:!0,step:this.bi.currentStep,next:this.permissionLinkRequestBIConst.typingInEmail}),this.bi.currentStep=this.permissionLinkRequestBIConst.typingInEmail)},i.prototype.isSubmitButtonDisabled=function(){return this.sendingRequest?!0:!n.Utilities.isEmailValid(this.email)},i.prototype.getInstrumentationComponentName=function(){return"profile.permissions-link-request-form"},i.prototype.getSubmitButtonDataBIId=function(){return this.getInstrumentationComponentName()+".submit-button"},i.prototype.sendPermissionsLinkRequest=function(){var n=this;return this.telemetry.portalScenarios.endStep({area:this.profileBIConst.areaName,name:this.permissionLinkRequestBIConst.scenarioName,isSuccess:!0,step:this.bi.currentStep,next:this.permissionLinkRequestBIConst.submit}),this.bi.currentStep=this.permissionLinkRequestBIConst.submit,this.sendingRequest=!0,this.permissionsLinkRequestService.sendPermissionsLinkRequest(this.email).then(function(){n.telemetry.portalScenarios.endMultiStepScenario({area:n.profileBIConst.areaName,name:n.permissionLinkRequestBIConst.scenarioName,step:n.bi.currentStep,isSuccess:!0});n.$state.go("permissions-link-request-success",{email:n.email})}).catch(function(t){var i=t.jqXHR.responseJSON||{};return n.telemetry.portalScenarios.endMultiStepScenario({area:n.profileBIConst.areaName,name:n.permissionLinkRequestBIConst.scenarioName,step:n.bi.currentStep,error:i.error||"generic",isSuccess:!1}),n.$q.reject(t).finally(function(){n.$state.go("error-page",{title:n.content.errorTitle,errorMessages:n.content.errorMessages,tokens:[{key:"email",value:n.email}]})})})},i.$inject=["$q","areaConfig","permissionsLinkRequestService","$state","telemetryService"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("sendPermissionsLinkRequest")],i.prototype,"sendPermissionsLinkRequest",null),__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"permissionsLinkRequestForm",{templateUrl:"/Areas/Profile/Scripts/Components/PermissionsLinkRequestForm/permissions-link-request-form.html"})],i)}();t.PermissionsLinkRequestFormComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.areaConfig=n;this.params=t;this.content=n.content.permissionsLinkRequest}return i.prototype.$onInit=function(){this.successMessages=[];for(var n in this.content.successMessages)this.successMessages[n]=this.content.successMessages[n].replace("{email}",this.params.email)},i.$inject=["areaConfig","$stateParams"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"permissionsLinkRequestSuccess",{templateUrl:"/Areas/Profile/Scripts/Components/PermissionsLinkRequestSuccess/permissions-link-request-success.html"})],i)}();t.PermissionsLinkRequestSuccessComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.areaConfig=n;this.content=n.content.plcServicesDecomPage}return i.prototype.getInstrumentationComponentName=function(){return"profile.plc-services-decom-page"},i.prototype.getMoreInfoDataBIId=function(){return this.getInstrumentationComponentName()+".more-info"},i.$inject=["areaConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"plcServicesDecomPage",{templateUrl:"/Areas/Profile/Scripts/Components/PlcServicesDecomPage/plc-services-decom-page.html"})],i)}();t.PlcServicesDecomPageComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return i.prototype.getInstrumentationComponentName=function(){return"profile.banner"},i.$inject=[],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"profileBanner",{templateUrl:"/Areas/Profile/Scripts/Components/ProfileBanner/profile-banner.html"})],i)}();t.ProfileBannerComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.areaConfig=n;this.content=this.areaConfig.content.banner.addressColumn;this.model={title:this.content.manageYourAddresses,infoText:this.content.billingAndShippingInfo,callToActionLink:this.content.manageAddressLink}}return i.prototype.getInstrumentationComponentName=function(){return"profile.banner.address"},i.$inject=["areaConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"bannerAddress",{templateUrl:"/Areas/Profile/Scripts/Components/ProfileBanner/BannerAddress/banner-address.html"})],i)}();t.BannerAddressComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.areaConfig=n;this.content=this.areaConfig.content.banner.authenticatorColumn;this.model={title:this.content.goPasswordless,infoText:this.content.microsoftAuthenticator,callToActionLink:this.content.learnMoreLink}}return i.prototype.getInstrumentationComponentName=function(){return"profile.banner.authenticator"},i.$inject=["areaConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"bannerAuthenticator",{templateUrl:"/Areas/Profile/Scripts/Components/ProfileBanner/BannerAuthenticator/banner-authenticator.html"})],i)}();t.BannerAuthenticatorComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.areaConfig=n;this.content=this.areaConfig.content.banner.changePasswordColumn;this.model={title:this.content.changeYourPassword,infoText:this.content.makeYourPasswordStronger,callToActionLink:this.content.changePasswordLink}}return i.prototype.getInstrumentationComponentName=function(){return"profile.banner.change-password"},i.$inject=["areaConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"bannerChangePassword",{templateUrl:"/Areas/Profile/Scripts/Components/ProfileBanner/BannerChangePassword/banner-change-password.html"})],i)}();t.BannerChangePasswordComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.areaConfig=n;this.content=this.areaConfig.content.banner.yourInfoColumn;this.model={title:this.content.yourInfo}}return i.$inject=["areaConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"bannerYourInfo",{templateUrl:"/Areas/Profile/Scripts/Components/ProfileBanner/BannerYourInfo/banner-your-info.html"})],i)}();t.BannerYourInfoComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r){this.areaConfig=n;this.profileAppService=t;this.personalInfoService=i;this.sharedCmsComponents=r}return i.prototype.componentOnInit=function(){var n=this;return this.profileAppService.announceMessage(),this.personalInfoService.getPersonalInfo().then(function(t){n.model=t.data})},i.prototype.getInstrumentationComponentName=function(){return"profile.profile-info"},i.$inject=["areaConfig","profileAppService","personalInfoService","sharedCmsComponents"],__decorate([n.OneUI.Angular.MonitorOperationProgress("load-personal-info")],i.prototype,"componentOnInit",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.areaModuleName,"profilePage",{templateUrl:"/Areas/Profile/Scripts/Components/ProfilePage/profile-page.html"})],i)}();t.ProfilePageComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u){this.$params=n;this.areaConfig=t;this.$meeModal=i;this.$state=r;this.$timeout=u}return i.prototype.$onInit=function(){var n=this,i=this.$params.lang,r=this.areaConfig.msaSupportedLanguages[i],t;this.content=this.areaConfig.content.profilePage.preferredLanguageSelector.languageChangedDialog;this.content.title=this.content.title.replace("{0}",r);this.content.messages=this.$params.sru?this.areaConfig.content.profilePage.preferredLanguageSelector.goBackToThePageYouWereWorkingOnLede:this.areaConfig.content.profilePage.preferredLanguageSelector.seeLanguageOnOtherMicrosoftSitesLede;t={content:this.content,tokens:[],confirmAction:function(){!n.$params.sru||n.$timeout().then(function(){n.$state.go("redirect",{redirectUrl:n.areaConfig.redirectUrls.successReturnUrl})});n.$meeModal.hide("landing.profile")},notificationDialogOptions:{showTitle:!0}};this.$meeModal.show("#profile-dialog","landing.profile.msa-display-language-changed.notification-dialog",{stateIdOnLastGoBack:"landing.profile",stateIdOnDismiss:"landing.profile",data:t})},i.prototype.getComponentName=function(){return"profile.profile-page.msa-display-language-changed"},i.$inject=["$stateParams","areaConfig","$meeModal","$state","$timeout"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"msaDisplayLanguageChanged",{template:""})],i)}();t.MsaDisplayLanguageChanged=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f){this.areaConfig=n;this.$window=t;this.personalInfoService=i;this.$meeModal=r;this.$params=u;this.$q=f}return i.prototype.componentOnInit=function(){var n=this;return this.profileBIConst=this.areaConfig.consts.biConsts,this.msaDisplayLanguageSelectorBIConst=this.profileBIConst.msaDisplayLanguageSelector,this.personalInfoService.getPersonalInfo().then(function(t){n.$meeModal.show("#profile-dialog","landing.profile.msa-display-language-selector.landing",{stateIdOnLastGoBack:"landing.profile",stateIdOnDismiss:"landing.profile",data:{languageSelected:function(){return n.languageSelected()},languageConfirmed:function(){return n.languageConfirmed()},goBackToLanguageSelection:function(){return n.goBackToLanguageSelection()},cancel:function(){return n.$meeModal.hide("landing.profile",{success:!0,cancel:!0})},serviceIsoCode:t.data.msaDisplayLanguage,selectedIsoCode:null},trackBi:!0,bi:{area:n.profileBIConst.areaName,scenario:n.msaDisplayLanguageSelectorBIConst.scenarioName,firstStep:n.msaDisplayLanguageSelectorBIConst.landing}})})},i.prototype.languageSelected=function(){var n={success:!1,step:this.msaDisplayLanguageSelectorBIConst.confirmingSelection};this.$meeModal.switchTo("landing.profile.msa-display-language-selector.confirming",n)},i.prototype.goBackToLanguageSelection=function(){var n={success:!1,step:this.msaDisplayLanguageSelectorBIConst.landing};this.$meeModal.switchTo("landing.profile.msa-display-language-selector.landing",n)},i.prototype.languageConfirmed=function(){var n=this,t;return t=this.$meeModal.getData(),this.personalInfoService.setMsaDisplayLanguage(t.selectedIsoCode,this.$params.sru).then(function(t){var i=t.data;n.$meeModal.hide({stateId:"landing.profile",bi:{success:!0}});n.$window.location.href=i.refreshTicketUrl}).catch(function(t){var i=t.jqXHR.responseJSON||{},r={success:!1,step:n.msaDisplayLanguageSelectorBIConst.setMsaDisplayLanguageError,error:i.error||"generic"},u={content:n.areaConfig.content.profilePage.preferredLanguageSelector.setPreferredLanguageErrorDialog,tokens:[],confirmAction:function(){n.$meeModal.hide({stateId:"landing.profile",bi:{success:!1}})},notificationDialogOptions:{showTitle:!0}};return n.$meeModal.setData(u),n.$meeModal.switchTo("landing.profile.msa-display-language-selector.error",r),n.$q.reject(t)})},i.prototype.getInstrumentationComponentName=function(){return"profile.profile-page.msa-display-language-selector"},i.$inject=["areaConfig","$window","personalInfoService","$meeModal","$stateParams","$q"],__decorate([n.OneUI.Angular.MonitorOperationProgress("modalOperation"),n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("languageConfirmed")],i.prototype,"languageConfirmed",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.areaModuleName,"msaDisplayLanguageSelector",{template:""})],i)}();t.MsaDisplayLanguageSelector=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.areaConfig=n;this.$meeModal=t}return i.prototype.$onInit=function(){this.content=this.areaConfig.content.profilePage.preferredLanguageSelector;this.model=this.$meeModal.getData();var n=this.areaConfig.msaSupportedLanguages[this.model.selectedIsoCode];this.title=this.content.confirmDialogTitle.replace("{0}",n)},i.prototype.getComponentName=function(){return"profile.profile-page.msa-display-language-selector.msa-display-language-selector-confirm-dialog"},i.prototype.languageConfirm=function(){this.model.languageConfirmed()},i.prototype.goBackToLanguageSelection=function(){this.model.goBackToLanguageSelection()},i.prototype.getPreviousLinkBIId=function(){return this.getComponentName()+".previous"},i.prototype.getConfirmLinkBIId=function(){return this.getComponentName()+".confirm"},i.$inject=["areaConfig","$meeModal"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"msaDisplayLanguageSelectorConfirmDialog",{templateUrl:"/Areas/Profile/Scripts/Components/ProfilePage/MsaDisplayLanguageSelector/MsaDisplayLanguageSelectorConfirmDialog/msa-display-language-selector-confirm-dialog.html"})],i)}();t.MsaDisplayLanguageSelectorConfirmDialog=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.areaConfig=n;this.$meeModal=t;this.firstLocalSelectionId="msa-display-languages-first-list-item"}return i.prototype.$onInit=function(){this.content=this.areaConfig.content.profilePage.preferredLanguageSelector;this.model=this.$meeModal.getData()},i.prototype.languageClicked=function(n){this.model.serviceIsoCode!==n&&(this.model.selectedIsoCode=n)},i.prototype.languageSelected=function(){this.$meeModal.setData(this.model);this.model.languageSelected()},i.prototype.isLocaleChecked=function(n){return this.model.selectedIsoCode===n},i.prototype.isServiceLocale=function(n){return this.model.serviceIsoCode===n},i.prototype.isSelected=function(){return this.model.selectedIsoCode!==null},i.prototype.getLocaleSelectionId=function(n,t){return t?this.firstLocalSelectionId:"msa-display-languages-"+n+"-list-item"},i.prototype.cancel=function(){this.model.cancel()},i.prototype.getComponentName=function(){return"profile.profile-page.msa-display-language-selector.msa-display-language-selector-dialog"},i.prototype.getCancelButtonBIId=function(){return this.getComponentName()+".cancel"},i.prototype.getSelectButtonBIId=function(){return this.getComponentName()+".select"},i.$inject=["areaConfig","$meeModal"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"msaDisplayLanguageSelectorDialog",{templateUrl:"/Areas/Profile/Scripts/Components/ProfilePage/MsaDisplayLanguageSelector/MsaDisplayLanguageSelectorDialog/msa-display-language-selector-dialog.html"})],i)}();t.MsaDisplayLanguageSelectorDialog=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.areaConfig=n}r=i;i.prototype.$onInit=function(){this.strings=this.areaConfig.strings;this.links=this.areaConfig.links;this.xboxLink=this.areaConfig.content.profilePage.xboxLink;this.skypeLink=this.areaConfig.content.profilePage.skypeLink;this.displayMsaDisplayLanguageSelector=!0};i.prototype.getComponentName=function(){return"profile.profile-page.personal-section"};i.prototype.getEditNameDataBIId=function(){return this.getComponentName()+".edit-name"};i.prototype.getAddNameDataBIId=function(){return this.getComponentName()+".add-name"};i.prototype.getManageLoginLinkDataBIId=function(){return this.getComponentName()+".manage-login"};i.prototype.getXboxLinkDataBIId=function(){return this.getComponentName()+".xbox"};i.prototype.getSkypeLinkDataBIId=function(){return this.getComponentName()+".skype"};i.prototype.getEditNameButtonId=function(){return r.editNameButtonId};var r;return i.$inject=["areaConfig"],i.editNameButtonId="edit-name-button",r=__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"personalSection",{templateUrl:"/Areas/Profile/Scripts/Components/ProfilePage/PersonalSection/personal-section-view.html",bindings:{model:"<profileInfo"}})],i)}();t.PersonalSectionComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.areaConfig=n}return i.prototype.$onInit=function(){this.model={xboxLink:this.areaConfig.content.profilePage.xboxLink,skypeLink:this.areaConfig.content.profilePage.skypeLink,githubLink:this.areaConfig.content.profilePage.githubLink,linkedinLink:this.areaConfig.content.profilePage.linkedinLink}},i.prototype.getComponentName=function(){return"profile.profile-page.personal-section.external-profiles"},i.prototype.getXboxLinkDataBIId=function(){return this.getComponentName()+".xbox"},i.prototype.getSkypeLinkDataBIId=function(){return this.getComponentName()+".skype"},i.prototype.getGithubLinkDataBIId=function(){return this.getComponentName()+".github"},i.prototype.getLinkedinLinkDataBIId=function(){return this.getComponentName()+".linkedin"},i.$inject=["areaConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"externalProfiles",{templateUrl:"/Areas/Profile/Scripts/Components/ProfilePage/PersonalSection/ExternalProfiles/external-profiles.html",bindings:{profileInfo:"<"}})],i)}();t.ExternalProfilesComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.areaConfig=n;n.content.profilePage.changeDisplayLanguageLink.url;n.content.profilePage.changeDisplayLanguageLink.text}return i.prototype.$onInit=function(){this.model={displayLanguage:this.areaConfig.content.profilePage.displayLanguage,changeDisplayLanguageLink:this.areaConfig.content.profilePage.changeDisplayLanguageLink}},i.prototype.getMsaDisplayLanguage=function(){return!this.profileInfo||!this.profileInfo.msaDisplayLanguage?"":this.areaConfig.msaSupportedLanguages[this.profileInfo.msaDisplayLanguage]},i.prototype.getComponentName=function(){return"profile.profile-page.personal-section.msa-display-language-section"},i.prototype.getChangeDisplayLanguageDataBIId=function(){return this.getComponentName()+".change-display-language"},i.$inject=["areaConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"msaDisplayLanguageSection",{templateUrl:"/Areas/Profile/Scripts/Components/ProfilePage/PersonalSection/MsaDisplayLanguageSection/msa-display-language-section.html",bindings:{profileInfo:"<"}})],i)}();t.MsaDisplayLanguageSectionComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.areaConfig=n;n.content.profilePage.changeDisplayLanguageLink.url;n.content.profilePage.changeDisplayLanguageLink.text}return i.prototype.$onInit=function(){this.model={displayLanguage:this.areaConfig.content.profilePage.displayLanguage,changeDisplayLanguageLink:this.areaConfig.content.profilePage.changeDisplayLanguageLink}},i.prototype.getPreferredLanguage=function(){return!this.profileInfo||!this.profileInfo.msaDisplayLanguage?"":this.areaConfig.msaSupportedLanguages[this.profileInfo.msaDisplayLanguage]},i.prototype.getComponentName=function(){return"profile.profile-page.personal-section.preferred-language-section"},i.prototype.getChangeDisplayLanguageDataBIId=function(){return this.getComponentName()+".change-display-language"},i.$inject=["areaConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"preferredLanguageSection",{templateUrl:"/Areas/Profile/Scripts/Components/ProfilePage/PersonalSection/PreferredLanguageSection/preferred-language-section.html",bindings:{profileInfo:"<"}})],i)}();t.PreferredLanguageSectionComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u){this.$params=n;this.areaConfig=t;this.$meeModal=i;this.$state=r;this.$timeout=u}return i.prototype.$onInit=function(){var n=this,i=this.$params.lang,r=this.areaConfig.msaSupportedLanguages[i],t;this.content=this.areaConfig.content.profilePage.preferredLanguageSelector.languageChangedDialog;this.content.title=this.content.title.replace("{0}",r);this.content.messages=this.$params.sru?this.areaConfig.content.profilePage.preferredLanguageSelector.goBackToThePageYouWereWorkingOnLede:this.areaConfig.content.profilePage.preferredLanguageSelector.seeLanguageOnOtherMicrosoftSitesLede;t={content:this.content,tokens:[],confirmAction:function(){!n.$params.sru||n.$timeout().then(function(){n.$state.go("redirect",{redirectUrl:n.areaConfig.redirectUrls.successReturnUrl})});n.$meeModal.hide("landing.profile")},notificationDialogOptions:{showTitle:!0}};this.$meeModal.show("#profile-dialog","landing.profile.preferred-language-changed.notification-dialog",{stateIdOnLastGoBack:"landing.profile",stateIdOnDismiss:"landing.profile",data:t})},i.prototype.getComponentName=function(){return"profile.profile-page.preferred-language-changed"},i.$inject=["$stateParams","areaConfig","$meeModal","$state","$timeout"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"preferredLanguageChanged",{template:""})],i)}();t.PreferredLanguageChanged=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f){this.areaConfig=n;this.$window=t;this.personalInfoService=i;this.$meeModal=r;this.$params=u;this.$q=f}return i.prototype.componentOnInit=function(){var n=this;return this.profileBIConst=this.areaConfig.consts.biConsts,this.preferredLanguageSelectorBIConst=this.profileBIConst.preferredLanguageSelector,this.personalInfoService.getPersonalInfo().then(function(t){n.$meeModal.show("#profile-dialog","landing.profile.preferred-language-selector.landing",{stateIdOnLastGoBack:"landing.profile",stateIdOnDismiss:"landing.profile",data:{languageSelected:function(){return n.languageSelected()},languageConfirmed:function(){return n.languageConfirmed()},goBackToLanguageSelection:function(){return n.goBackToLanguageSelection()},cancel:function(){return n.$meeModal.hide("landing.profile")},serviceIsoCode:t.data.msaDisplayLanguage,selectedIsoCode:null},trackBi:!0,bi:{area:n.profileBIConst.areaName,scenario:n.preferredLanguageSelectorBIConst.scenarioName,firstStep:n.preferredLanguageSelectorBIConst.landing}})})},i.prototype.languageSelected=function(){var n={success:!1,step:this.preferredLanguageSelectorBIConst.confirmingSelection};this.$meeModal.switchTo("landing.profile.preferred-language-selector.confirming",n)},i.prototype.goBackToLanguageSelection=function(){var n={success:!1,step:this.preferredLanguageSelectorBIConst.landing};this.$meeModal.switchTo("landing.profile.preferred-language-selector.landing",n)},i.prototype.languageConfirmed=function(){var n=this,t;return t=this.$meeModal.getData(),this.personalInfoService.setMsaDisplayLanguage(t.selectedIsoCode,this.$params.sru).then(function(t){var i=t.data;n.$meeModal.stayInCurrentState({success:!0});n.$window.location.href=i.refreshTicketUrl}).catch(function(t){var i=t.jqXHR.responseJSON||{},r={success:!1,step:n.preferredLanguageSelectorBIConst.setPreferredLanguageError,error:i.error||"generic"},u={content:n.areaConfig.content.profilePage.preferredLanguageSelector.setPreferredLanguageErrorDialog,tokens:[],confirmAction:function(){n.$meeModal.hide({stateId:"landing.profile",bi:{success:!1}})},notificationDialogOptions:{showTitle:!0}};return n.$meeModal.setData(u),n.$meeModal.switchTo("landing.profile.preferred-language-selector.error",r),n.$q.reject(t)})},i.prototype.getInstrumentationComponentName=function(){return"profile.profile-page.preferred-language-selector"},i.$inject=["areaConfig","$window","personalInfoService","$meeModal","$stateParams","$q"],__decorate([n.OneUI.Angular.MonitorOperationProgress("modalOperation"),n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("languageConfirmed")],i.prototype,"languageConfirmed",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.areaModuleName,"preferredLanguageSelector",{template:""})],i)}();t.PreferredLanguageSelector=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.areaConfig=n;this.$meeModal=t}return i.prototype.$onInit=function(){this.content=this.areaConfig.content.profilePage.preferredLanguageSelector;this.model=this.$meeModal.getData();var n=this.areaConfig.msaSupportedLanguages[this.model.selectedIsoCode];this.title=this.content.confirmDialogTitle.replace("{0}",n)},i.prototype.getComponentName=function(){return"profile.profile-page.preferred-language-selector.preferred-language-selector-confirm-dialog"},i.prototype.languageConfirm=function(){this.model.languageConfirmed()},i.prototype.goBackToLanguageSelection=function(){this.model.goBackToLanguageSelection()},i.prototype.getPreviousLinkBIId=function(){return this.getComponentName()+".alert-link"},i.prototype.getConfirmLinkBIId=function(){return this.getComponentName()+".alert-link"},i.$inject=["areaConfig","$meeModal"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"preferredLanguageSelectorConfirmDialog",{templateUrl:"/Areas/Profile/Scripts/Components/ProfilePage/PreferredLanguageSelector/PreferredLanguageSelectorConfirmDialog/preferred-language-selector-confirm-dialog.html"})],i)}();t.PreferredLanguageSelectorConfirmDialog=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.areaConfig=n;this.$meeModal=t;this.firstLocalSelectionId="preferred-languages-first-list-item"}return i.prototype.$onInit=function(){this.content=this.areaConfig.content.profilePage.preferredLanguageSelector;this.model=this.$meeModal.getData()},i.prototype.languageClicked=function(n){this.model.serviceIsoCode!==n&&(this.model.selectedIsoCode=n)},i.prototype.languageSelected=function(){this.$meeModal.setData(this.model);this.model.languageSelected()},i.prototype.isLocaleChecked=function(n){return this.model.selectedIsoCode===n},i.prototype.isServiceLocale=function(n){return this.model.serviceIsoCode===n},i.prototype.isSelected=function(){return this.model.selectedIsoCode!==null},i.prototype.getLocaleSelectionId=function(n,t){return t?this.firstLocalSelectionId:"preferred-languages-"+n+"-list-item"},i.prototype.cancel=function(){this.model.cancel()},i.prototype.getComponentName=function(){return"profile.profile-page.preferred-language-selector.preferred-language-selector-dialog"},i.prototype.getCancelButtonBIId=function(){return this.getComponentName()+".cancel"},i.prototype.getSelectButtonBIId=function(){return this.getComponentName()+".select"},i.$inject=["areaConfig","$meeModal"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"preferredLanguageSelectorDialog",{templateUrl:"/Areas/Profile/Scripts/Components/ProfilePage/PreferredLanguageSelector/PreferredLanguageSelectorDialog/preferred-language-selector-dialog.html"})],i)}();t.PreferredLanguageSelectorDialog=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.areaConfig=n;this.profileAppService=t;this.model={hasAlert:!1,alertText:"",alertActionLink:null}}return i.prototype.$onChanges=function(){this.profileModel&&this.profileAppService.hasLegacyName(this.profileModel)&&(this.model={hasAlert:!0,alertText:this.areaConfig.content.profilePage.nameConflictAlert,alertActionLink:this.areaConfig.content.profilePage.nameConflictActionLink})},i.prototype.getComponentName=function(){return"profile.profile-page.profile-alert"},i.prototype.getAlertLinkDataBIId=function(){return this.getComponentName()+".alert-link"},i.$inject=["areaConfig","profileAppService"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"profileAlert",{templateUrl:"/Areas/Profile/Scripts/Components/ProfilePage/ProfileAlert/profile-alert.html",bindings:{profileModel:"<profileInfo"}})],i)}();t.ProfileAlertComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){var t=this;this.areaConfig=n;this.removeUserTile=function(){t.model.profileTileUrl=""};this.content=n.content.profilePage}r=i;i.prototype.$onInit=function(){this.strings=this.areaConfig.strings};i.prototype.getComponentName=function(){return"profile.profile-page.profile-pic-section"};i.prototype.getEditPictureDataBIId=function(){return this.getComponentName()+".edit-picture"};i.prototype.getEditPictureButtonId=function(){return r.editPictureButtonId};var r;return i.$inject=["areaConfig"],i.editPictureButtonId="edit-picture-button",r=__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"profilePictureSection",{templateUrl:"/Areas/Profile/Scripts/Components/ProfilePage/ProfilePicSection/profile-picture-view.html",bindings:{model:"<profileInfo"}})],i)}();t.ProfilePictureSectionComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.areaConfig=n;this.content=n.content.profilePage}return i.prototype.getComponentName=function(){return"profile.profile-page.secondary-profile-info"},i.prototype.getBirthdayInfoBIId=function(){return this.getComponentName()+".birthday"},i.prototype.getRegionInfoBIId=function(){return this.getComponentName()+".region"},i.$inject=["areaConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"secondaryProfileInfo",{templateUrl:"/Areas/Profile/Scripts/Components/ProfilePage/SecondaryProfileInfo/secondary-profile-info.html",bindings:{model:"<profileInfo"}})],i)}();t.SecondaryProfileInfoComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(){}return i.prototype.getAddLinkBIId=function(){return this.biId+".add"},i.prototype.getEditLinkBIId=function(){return this.biId+".edit"},i.$inject=[],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"personalInfoField",{templateUrl:"/Areas/Profile/Scripts/Components/ProfilePage/SecondaryProfileInfo/PersonalInfoField/personal-info-field.html",bindings:{biId:"@",icon:"@",value:"<",descriptionString:"<",addValueString:"<",editValueString:"<",link:"<"}})],i)}();t.PersonalInfoFieldComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.areaConfig=n;this.model=t}return i.prototype.$onInit=function(){var n,i,t;this.model&&(this.model.errorCode||this.model.title)||(this.model.errorCode=this.areaConfig.consts.errorCode.generic);this.model.errorCode&&(this.model.title=this.areaConfig.content.errorPages[this.model.errorCode].title,this.model.errorMessages=this.areaConfig.content.errorPages[this.model.errorCode].errorMessages);this.messages=this.model.errorMessages;for(n in this.messages)for(i in this.model.tokens)t=this.model.tokens[i],this.messages[n]=this.messages[n].replace("{"+t.key+"}",t.value)},i.prototype.getInstrumentationComponentName=function(){return"profile.error-page"},i.$inject=["areaConfig","$stateParams"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"errorPage",{templateUrl:"/Areas/Profile/Scripts/Components/Shared/ErrorPage/error-page.html"})],i)}();t.ErrorPageComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.areaConfig=n}return i.prototype.$onInit=function(){this.content=this.areaConfig.content.profileHeader},i.$inject=["areaConfig"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"landing",{templateUrl:"/Areas/Profile/Scripts/Components/Shared/Landing/profile-landing.html"})],i)}();t.ProfileLandingComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n){this.$meeModal=n;this.model=this.$meeModal.getData();this.content=this.model.content;this.messages=this.model.content.messages}return i.prototype.$onInit=function(){var n,i,t;this.model.notificationDialogOptions||(this.model.notificationDialogOptions={showTitle:!1});for(n in this.messages)for(i in this.model.tokens)t=this.model.tokens[i],this.messages[n]=this.messages[n].replace("{"+t.key+"}",t.value)},i.prototype.confirm=function(){this.model.confirmAction()},i.$inject=["$meeModal"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"notificationDialog",{templateUrl:"/Areas/Profile/Scripts/Components/Shared/NotificationDialog/notification-dialog.html",bindings:{biId:"@"}})],i)}();t.NotificationDialogComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r){this.$params=n;this.$window=t;this.$timeout=i;this.sharedCmsComponents=r}return i.prototype.$onInit=function(){var n=this;this.$timeout().then(function(){n.$window.location.assign(n.$params.redirectUrl)})},i.prototype.getInstrumentationComponentName=function(){return"profile.redirect"},i.$inject=["$stateParams","$window","$timeout","sharedCmsComponents"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"redirect",{templateUrl:"/Areas/Profile/Scripts/Components/Shared/Redirect/redirect.html"})],i)}();t.RedirectComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(t){var i=function(){function t(t,i,r,u,f){var e=this;this.areaConfig=t;this.market=i;this.$window=r;this.$state=u;this.$meeA11y=f;this.goBack=function(){e.areaConfig.returnUrl?e.$window.location.href=e.areaConfig.returnUrl:e.$state.go("landing.profile")};this.errorMessageForCode=function(t){return t?e.areaConfig.errors.hasOwnProperty(t)?e.areaConfig.errors[t]:n.Utilities.formatString(e.areaConfig.strings.unknownError,t):""}}return t.prototype.hasLegacyName=function(n){return!!n.fullNameLegacy},t.prototype.pushAnnouncement=function(n){this.$window.sessionStorage&&this.$window.sessionStorage.setItem(t.narratorAnnouncerKey,n)},t.prototype.announceMessage=function(){var n,i;this.$window.sessionStorage&&(n=this.$window.sessionStorage.getItem(t.narratorAnnouncerKey),n)&&(i=this.areaConfig.content.ariaMessages[n],i)&&(this.$meeA11y.announcer.announce(i,"assertive"),this.$window.sessionStorage.removeItem(t.narratorAnnouncerKey))},t.prototype.instantAnnounceMessage=function(n){var t=this.areaConfig.content.ariaMessages[n];t&&this.$meeA11y.announcer.announce(t,"assertive")},t.$inject=["areaConfig","marketizationService","$window","$state","$meeA11y"],t.narratorAnnouncerKey="profileLandingAnnouncingMessage",t}();t.ProfileAppService=i;angular.module(t.areaModuleName).service("profileAppService",i)})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(){this.UxGroup={Emails:"emails",Phones:"phones",Addresses:"addresses",CommBilling:"comm.billing",CommSecurity:"comm.security",Marketing:"mkt",MarketingMsft:"mkt.msft",MarketingPartners:"mkt.partners",getItemsInGroup:this.UxGroup_GetItemsInGroup,getFirstItemInGroup:this.UxGroup_GetFirstItemInGroup,isMemberOf:this.UxGroup_IsMemberOf};this.CommVenueIdConverters={fromEmail:this.CommVenueIdConverter_FromEmail,fromPhone:this.CommVenueIdConverter_FromPhone,fromAddress:this.CommVenueIdConverter_FromAddress}}return n.prototype.UxGroup_GetItemsInGroup=function(n,t){var i=[];return $.each(n,function(n,r){-1!=$.inArray(t,r.memberOf)&&i.push(r)}),i},n.prototype.UxGroup_GetFirstItemInGroup=function(n,t){var i=this.UxGroup_GetItemsInGroup(n,t);return i.length?i[0]:null},n.prototype.UxGroup_IsMemberOf=function(n,t){return-1!=$.inArray(t,n.memberOf)},n.prototype.CommVenueIdConverter_FromEmail=function(n){return{id:n.id,label:n.email,isSelected:!1}},n.prototype.CommVenueIdConverter_FromPhone=function(n){return{id:n.id,label:n.number,isSelected:!1}},n.prototype.CommVenueIdConverter_FromAddress=function(n){return{id:n.id,label:n.id,isSelected:!1}},n}();n.ProfileCategoriesService=t;angular.module(n.areaModuleName).service("ProfileCategoriesService",t)})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n,t,i){this.areaConfig=n;this.ajax=t;this.telemetry=i;this.requestRoot=this.areaConfig.serviceEndpointRoot+"v1/communications/"}return n.prototype.getTopicPermissionsEncrypted=function(t){return this.ajax.post({serviceName:n.serviceName,operationName:"GLOBAL.PROFILE.COMMUNICATIONS.GETTOPICS",parentOperationName:"GetTopicsAsync",url:this.requestRoot+"encrypted/get-permissions",dataType:"auto",data:t})},n.prototype.getTopicInfo=function(t,i){return this.ajax.get({serviceName:n.serviceName,operationName:"GLOBAL.PROFILE.COMMUNICATIONS.GETTOPICINFO",parentOperationName:"GetTopicInfo",url:this.requestRoot+"topics",dataType:"auto",data:{tid:t,mk:i}})},n.prototype.setTopicPermissionsEncrypted=function(t){return this.ajax.post({serviceName:n.serviceName,operationName:"GLOBAL.PROFILE.COMMUNICATIONS.UPDATETOPICS",parentOperationName:"UpdateTopicsAsync",url:this.requestRoot+"encrypted/set-permissions",dataType:"auto",data:t})},n.prototype.subscribeEncrypted=function(t){return this.ajax.post({serviceName:n.serviceName,operationName:"GLOBAL.PROFILE.COMMUNICATIONS.SUBSCRIBE",parentOperationName:"EncryptedSubscribe",url:this.requestRoot+"encrypted/subscribe",dataType:"auto",data:t})},n.prototype.updatePermissions=function(t){return this.ajax.post({serviceName:n.serviceName,operationName:"GLOBAL.PROFILE.COMMUNICATIONS.UPDATEPERMISSIONS",parentOperationName:"UpdateTopicsAsync",url:this.requestRoot+"permissions",dataType:"auto",data:t})},n.$inject=["areaConfig","portalAjaxServiceAngular","telemetryService"],n.serviceName="MeePortal",n}();n.CommunicationsService=t;angular.module(n.areaModuleName).service("communicationsService",t)})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n,t,i,r){this.$q=n;this.areaConfig=t;this.ajax=i;this.telemetry=r;this.requestRoot=this.areaConfig.serviceEndpointRoot+"v1/contact-info/"}return n.prototype.getContactInfo=function(t){var r=this,i=t||{refreshCache:!1,includeEmails:!0,includePhones:!0,includeAddresses:!0,includePermissionLink:!0};return(i.refreshCache&&(this.cachedResponse=null),this.cachedPromise)?this.cachedPromise:this.cachedResponse?this.$q.resolve(this.cachedResponse):(this.cachedPromise=this.ajax.get({serviceName:n.serviceName,operationName:"GLOBAL.PROFILE.CONTACTINFO.GETCONTACTINFO",parentOperationName:"GetContactInfo",url:this.requestRoot,data:{includeEmails:!!i.includeEmails,includePhones:!!i.includePhones,includeAddresses:!!i.includeAddresses,includePermissionLink:!!i.includePermissionLink}}),this.cachedPromise.then(function(n){r.cachedResponse=n}).finally(function(){r.cachedPromise=null}),this.cachedPromise)},n.prototype.deleteEmail=function(t){return this.ajax.del({dataType:"auto",serviceName:n.serviceName,operationName:"GLOBAL.PROFILE.CONTACTINFO.DELETEEMAIL",parentOperationName:"DeleteEmail",url:this.requestRoot+"email",data:{email:t}})},n.prototype.deletePhone=function(t){return this.ajax.del({dataType:"auto",serviceName:n.serviceName,operationName:"GLOBAL.PROFILE.CONTACTINFO.DELETEPHONE",parentOperationName:"DeletePhone",url:this.requestRoot+"phone",data:{phone:t}})},n.prototype.deleteMMXPhone=function(){return this.ajax.del({dataType:"auto",serviceName:n.serviceName,operationName:"GLOBAL.PROFILE.CONTACTINFO.DELETEMMXPHONE",parentOperationName:"DeleteMMXPhone",url:this.requestRoot+"mmx-phone"})},n.$inject=["$q","areaConfig","portalAjaxServiceAngular","telemetryService"],n.serviceName="MeePortal",n}();angular.module(n.areaModuleName).service("contactInfoService",t)})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n,t,i){this.areaConfig=n;this.ajax=t;this.telemetry=i}return n.prototype.getLightweightAccrualUrl=function(t,i,r){return r===void 0&&(r=null),this.ajax.get({dataType:"auto",serviceName:n.serviceName,operationName:"GLOBAL.PROFILE.LIGHTWEIGHTACCRUALURL",parentOperationName:"GetLightweightAccrualUrl",url:this.areaConfig.serviceEndpointRoot+"v1/lightweight-accrual",data:{level:t,authenticationPolicy:i,returnUrl:r}})},n.$inject=["areaConfig","portalAjaxServiceAngular","telemetryService"],n.serviceName="MeePortal",n}();angular.module(n.areaModuleName).service("lightweightAccrualUrlService",t)})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n,t,i){this.areaConfig=n;this.ajax=t;this.telemetry=i}return n.prototype.sendPermissionsLinkRequest=function(t){return this.ajax.post({dataType:"auto",serviceName:n.serviceName,operationName:"GLOBAL.PROFILE.PERMISSIONSLINKREQUEST",parentOperationName:"PostPermissionsLinkRequest",url:this.areaConfig.serviceEndpointRoot+"v1/permissions-link-request",data:{email:t}})},n.$inject=["areaConfig","portalAjaxServiceAngular","telemetryService"],n.serviceName="MeePortal",n}();angular.module(n.areaModuleName).service("permissionsLinkRequestService",t)})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={})),function(n){var t;(function(n){var t=function(){function n(n,t,i,r){this.$q=n;this.areaConfig=t;this.ajax=i;this.telemetry=r;this.requestRoot=this.areaConfig.serviceEndpointRoot+"v1/personal-info/"}return n.prototype.getPersonalInfo=function(t){var i=this,r=t||{refreshCache:!1};return(r.refreshCache&&(this.cachedResponse=null),this.cachedPromise)?this.cachedPromise:this.cachedResponse?this.$q.resolve(this.cachedResponse):(this.cachedPromise=this.ajax.get({serviceName:n.serviceName,operationName:"GLOBAL.PROFILE.PERSONALINFO.GETPERSONALINFO",parentOperationName:"GetPersonalInfo",url:this.requestRoot}),this.cachedPromise.then(function(n){i.cachedResponse=n}).finally(function(){i.cachedPromise=null}),this.cachedPromise)},n.prototype.updateName=function(t){var i=this,r=this.ajax.put({serviceName:n.serviceName,operationName:"GLOBAL.PROFILE.PERSONALINFO.UPDATENAME",parentOperationName:"UpdateName",url:this.requestRoot+"name",data:t});return r.then(function(n){if(i.cachedResponse){var u=n.data,r=i.cachedResponse.data;r.firstName=t.firstName;r.lastName=t.lastName;r.fullName=u.fullName;r.yomiFirstName=t.yomiFirstName;r.yomiLastName=t.yomiLastName;r.yomiFullName=u.yomiFullName}}),r},n.prototype.updatePicture=function(t){var i=this,r=this.ajax.put({serviceName:n.serviceName,operationName:"GLOBAL.PROFILE.PERSONALINFO.UPDATEPICTURE",parentOperationName:"UpdatePicture",url:this.requestRoot+"picture",data:t});return r.then(function(n){if(i.cachedResponse){var u=n.data,r=i.cachedResponse.data;r.profilePictureUrl=u.profilePictureUrl;r.profileTileUrl=u.profileTileUrl;r.profilePictureCropArea=t.cropArea}}),r},n.prototype.deletePicture=function(){var t=this,i=this.ajax.del({dataType:"auto",serviceName:n.serviceName,operationName:"GLOBAL.PROFILE.PERSONALINFO.DELETEPICTURE",parentOperationName:"DeletePicture",url:this.requestRoot+"picture"});return i.then(function(){if(t.cachedResponse){var n=t.cachedResponse.data;n.profilePictureUrl="";n.profileTileUrl="";n.profilePictureCropArea=null}}),i},n.prototype.reportPictureUploaded=function(t){this.telemetry.portalQos.reportOutgoingApi({serviceName:n.serviceName,operationName:"GLOBAL.PROFILE.PERSONALINFO.UPLOADPICTURE",currentOperationName:"UploadPicture",requestUri:t.endpointUri,latencyMs:t.latencyMs,isSuccess:!t.isQosImpacting,httpMethod:"POST",serviceErrorCode:t.statusCode,httpStatusCode:t.statusCode.toString(),errorMessage:t.errorCode,customData:t.fileSizeBucket})},n.prototype.getAntiforgeryToken=function(){return this.ajax.getAntiforgeryToken()},n.prototype.setMsaDisplayLanguage=function(t,i){return this.ajax.put({dataType:"auto",serviceName:n.serviceName,operationName:"GLOBAL.PROFILE.PERSONALINFO.SETMSADISPLAYLANGUAGE",parentOperationName:"SetMsaDisplayLanguage",url:this.requestRoot+"msa-display-language",data:{localeIsoCode:t,sru:i}})},n.$inject=["$q","areaConfig","portalAjaxServiceAngular","telemetryService"],n.serviceName="MeePortal",n}();angular.module(n.areaModuleName).service("personalInfoService",t)})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e,o,s,h,c){this.$params=n;this.$window=t;this.$q=i;this.areaConfig=r;this.$state=u;this.contactInfoService=f;this.communicationsService=e;this.telemetry=o;this.lightweightAccrualUrlService=s;this.sharedCmsComponents=h;this.$timeout=c;this.content=r.content.targetedSubscribePage;this.profileBIConst=this.areaConfig.consts.biConsts;this.targetedSubscribeBIConst=this.profileBIConst.targetedSubscribeBIConst;this.contactTypeConst=this.areaConfig.consts.contactTypeConst;this.lightweightAccrualLevelConst=this.areaConfig.consts.lightweightAccrualLevelConst;this.rpsPolicyConst=this.areaConfig.consts.rpsPolicyConst;this.topicStateConst=this.areaConfig.consts.topicStateConst;this.redirectUrls=r.redirectUrls}return i.prototype.componentOnInit=function(){var n=this,t,i;return this.userLandedBI(),this.explanationParagraphs=[],this.$params.TID=this.$params.TID||this.$params.tid,this.$params.MK=this.$params.MK||this.$params.mk,t=this.contactInfoService.getContactInfo().then(function(t){var i=t.data,r,u;if(i.emails.length<1)return n.lightweightAccrualUrlBI(),n.lightweightAccrualUrlService.getLightweightAccrualUrl(n.lightweightAccrualLevelConst.nameAndBirthday,n.rpsPolicyConst.configuration,n.$window.location.href).then(function(t){var i=t.data;n.$timeout(function(){n.$state.go("redirect",{redirectUrl:i.url})})});n.email=i.emails[0].email;for(r in i.emails)if(i.emails[r].isPrimary){n.email=i.emails[r].email;break}for(u in n.content.explanationParagraphs)n.explanationParagraphs[u]=n.content.explanationParagraphs[u].replace("{email}",n.email)}),i=this.communicationsService.getTopicInfo(this.$params.TID,this.$params.MK).then(function(t){n.topic=t.data.topicInfo[0]}).catch(function(t){var r=t.jqXHR.responseJSON||{},i=r.error;return n.areaConfig.consts.errorCode.topicNotFound==i?(n.errorBI(t),window.portalQos.reportClientError({code:i,category:"MeePortal.Profile.TargetedSubscribeFormComponent.CannotFindTopic",data:{topicId:n.$params.TID,market:n.$params.MK}}),n.$timeout(function(){n.$state.go("error-page",{errorCode:n.areaConfig.consts.errorCode.topicNotFound})}),n.$q.resolve()):n.areaConfig.consts.errorCode.topicExpired==i?(n.errorBI(t),window.portalQos.reportClientError({code:i,category:"MeePortal.Profile.TargetedSubscribeFormComponent.TopicExpired",data:{topicId:n.$params.TID,market:n.$params.MK}}),n.$timeout(function(){n.$state.go("error-page",{errorCode:n.areaConfig.consts.errorCode.topicExpired})}),n.$q.resolve()):n.$q.reject(t)}),this.$q.all([t,i]).catch(function(t){return n.errorBI(t),n.$q.reject(t)})},i.prototype.subscribeButtonClicked=function(){var n=this,t={ContactType:this.contactTypeConst.email,ContactValue:this.email,TopicSettings:[{CultureName:this.topic.culture,TopicId:this.topic.id,State:this.topicStateConst.optInExplicit}]};return this.communicationsService.updatePermissions(t).then(function(){return n.subscribedBI(),n.$timeout(function(){n.$state.go("redirect",{redirectUrl:n.buildRedirectUrl(n.redirectUrls.successReturnUrl)})}),n.$q.resolve({})}).catch(function(t){return n.errorBI(t),n.$q.reject(t)})},i.prototype.cancelButtonClicked=function(){this.cancelBI();this.$state.go("redirect",{redirectUrl:this.buildRedirectUrl(this.redirectUrls.cancelReturnUrl)})},i.prototype.getInstrumentationComponentName=function(){return"profile.targeted-subscribe-form"},i.prototype.getSubscribeButtonDataBIId=function(){return this.getInstrumentationComponentName()+".subscribe-button"},i.prototype.getCancelButtonDataBIId=function(){return this.getInstrumentationComponentName()+".cancel-button"},i.prototype.userLandedBI=function(){this.bi={scenarioId:"",currentStep:this.targetedSubscribeBIConst.firstStep};this.telemetry.portalScenarios.beginMultiStepScenario(this.profileBIConst.areaName,this.targetedSubscribeBIConst.scenarioName,this.bi.currentStep)},i.prototype.cancelBI=function(){this.telemetry.portalScenarios.cancelMultiStepScenario({area:this.profileBIConst.areaName,name:this.targetedSubscribeBIConst.scenarioName,step:this.bi.currentStep,isSuccess:!0})},i.prototype.lightweightAccrualUrlBI=function(){this.telemetry.portalScenarios.endMultiStepScenario({area:this.profileBIConst.areaName,name:this.targetedSubscribeBIConst.scenarioName,step:this.bi.currentStep,error:this.areaConfig.consts.errorCode.requireLightweightAccrual,isSuccess:!1})},i.prototype.subscribedBI=function(){this.telemetry.portalScenarios.endMultiStepScenario({area:this.profileBIConst.areaName,name:this.targetedSubscribeBIConst.scenarioName,step:this.bi.currentStep,isSuccess:!0})},i.prototype.errorBI=function(n){var t=n.jqXHR.responseJSON||{};this.telemetry.portalScenarios.endMultiStepScenario({area:this.profileBIConst.areaName,name:this.targetedSubscribeBIConst.scenarioName,step:this.bi.currentStep,error:t.error||"generic",isSuccess:!1})},i.prototype.buildRedirectUrl=function(n){return n+"?AMC_MK="+this.topic.culture+"&AMC_TID="+this.topic.id},i.$inject=["$stateParams","$window","$q","areaConfig","$state","contactInfoService","communicationsService","telemetryService","lightweightAccrualUrlService","sharedCmsComponents","$timeout"],__decorate([n.OneUI.Angular.MonitorOperationProgress("load-topic-description")],i.prototype,"componentOnInit",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("subscribe"),n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("subscribeButtonClicked")],i.prototype,"subscribeButtonClicked",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.areaModuleName,"targetedSubscribeForm",{templateUrl:"/Areas/Profile/Scripts/Components/targetedSubscribeForm/targeted-subscribe-form.html",bindings:{}})],i)}();t.TargetedSubscribeFormComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e,o){this.$q=n;this.areaConfig=t;this.$state=i;this.$cookies=r;this.communicationsService=u;this.telemetry=f;this.$params=e;this.$timeout=o;this.profileBIConst=this.areaConfig.consts.biConsts;this.unsubscribeBIConst=this.profileBIConst.unsubscribeBIConst}return i.prototype.componentOnInit=function(){var n=this;return(this.userLandedBI(),this.params=this.$cookies.getObject("profileCommunication"),this.params&&this.$cookies.remove("profileCommunication",{path:"/"}),!this.params||!(this.params.CMID||this.params.CTID||this.params.D||this.params.ECID||this.params.K||this.params.PID||this.params.TID))?this.$q.resolve().then(function(){n.noParamsBI();n.$timeout(function(){n.$state.go("landing.profile")})}):!this.params.TID||!this.params.PID?this.$q.resolve().then(function(){n.$timeout(function(){return n.goToCommunicationPermissionsPage()})}):(this.content=this.areaConfig.content.unsubscribePage,this.communicationsService.getTopicPermissionsEncrypted(this.params).then(function(t){if(n.model=t.data,n.model.topics.length!=0&&n.model.decryptedContactValue)if(n.model.topics[0].isAllowed)n.content.descriptionParagraph=n.content.descriptionParagraph.replace("{email}",n.model.decryptedContactValue),n.content.descriptionParagraph=n.content.descriptionParagraph.replace("{topic}",n.model.topics[0].name),n.content.descriptionParagraph=n.content.descriptionParagraph.replace("{button-text}",n.content.unsubscribeButtonText),n.content.descriptionMetaTextParagraph=n.content.descriptionMetaTextParagraph.replace("{click-here-link}",n.content.globalClickHereText);else return n.userAlreadyUnsubscribedBI(),n.$q.resolve().then(function(){n.$timeout(function(){n.$state.go("unsubscribe-page-success",n.getSuccessObj(!0,n.model.topics[0].name))})});else return n.goToErrorPage(null)}).catch(function(t){return n.errorBI(t),n.goToErrorPage(t)}))},i.prototype.unsubscribeButtonClicked=function(){var n=this;return this.model.topics[0].isAllowed=!1,this.communicationsService.setTopicPermissionsEncrypted(this.model).then(function(){return n.unsubscribedBI(),n.$q.resolve().then(function(){n.$timeout(function(){n.$state.go("unsubscribe-page-success",n.getSuccessObj(!1,n.model.topics[0].name))})})}).catch(function(t){return n.errorBI(t),n.goToErrorPage(t)})},i.prototype.cancelButtonClicked=function(){this.cancelBI();this.$state.go("landing.profile")},i.prototype.getInstrumentationComponentName=function(){return"profile.unsubscribe-page-form-v1"},i.prototype.getManageCommunicationPermissionsDataBIId=function(){return this.getInstrumentationComponentName()+".manage-communication-permissions"},i.prototype.getUnsubscribeButtonDataBIId=function(){return this.getInstrumentationComponentName()+".unsubscribe-button"},i.prototype.getCancelButtonDataBIId=function(){return this.getInstrumentationComponentName()+".cancel-button"},i.prototype.goToCommunicationPermissionsPageLinkClicked=function(n){n.preventDefault();this.goToCommunicationPermissionsPage()},i.prototype.goToErrorPage=function(n){var t=this;return this.$q.reject(n).catch(function(){return t.$timeout(function(){t.$state.go("error-page",{errorCode:t.areaConfig.consts.errorCode.communicationGeneric})}),t.$q.reject(n)})},i.prototype.goToCommunicationPermissionsPage=function(){return this.$state.go("communications-page",{CTID:this.params.CTID,ECID:this.params.ECID,K:this.params.K,CMID:this.params.CMID,D:this.params.D})},i.prototype.getSuccessObj=function(n,t){return{alreadyComplete:n,topicTitle:t}},i.prototype.userLandedBI=function(){this.bi={scenarioId:"",currentStep:this.unsubscribeBIConst.landing};this.telemetry.portalScenarios.beginMultiStepScenario(this.profileBIConst.areaName,this.unsubscribeBIConst.scenarioName,this.bi.currentStep)},i.prototype.userAlreadyUnsubscribedBI=function(){this.telemetry.portalScenarios.endMultiStepScenario({area:this.profileBIConst.areaName,name:this.unsubscribeBIConst.scenarioName,step:this.bi.currentStep,error:this.areaConfig.consts.errorCode.alreadyUnsubscribed,isSuccess:!0})},i.prototype.cancelBI=function(){this.telemetry.portalScenarios.cancelMultiStepScenario({area:this.profileBIConst.areaName,name:this.unsubscribeBIConst.scenarioName,step:this.bi.currentStep,isSuccess:!0})},i.prototype.unsubscribedBI=function(){this.telemetry.portalScenarios.endMultiStepScenario({area:this.profileBIConst.areaName,name:this.unsubscribeBIConst.scenarioName,step:this.bi.currentStep,isSuccess:!0})},i.prototype.errorBI=function(n){var t=n.jqXHR.responseJSON||{};this.telemetry.portalScenarios.endMultiStepScenario({area:this.profileBIConst.areaName,name:this.unsubscribeBIConst.scenarioName,step:this.bi.currentStep,error:t.error||"generic",isSuccess:!1})},i.prototype.noParamsBI=function(){this.telemetry.portalScenarios.endMultiStepScenario({area:this.profileBIConst.areaName,name:this.unsubscribeBIConst.scenarioName,step:this.bi.currentStep,error:this.areaConfig.consts.errorCode.noParamsUnsubscribe,isSuccess:!1})},i.$inject=["$q","areaConfig","$state","$cookies","communicationsService","telemetryService","$stateParams","$timeout"],__decorate([n.OneUI.Angular.MonitorOperationProgress("load-topic")],i.prototype,"componentOnInit",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("unsubscribe"),n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("unsubscribeButtonClicked")],i.prototype,"unsubscribeButtonClicked",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.areaModuleName,"unsubscribePageFormV1",{templateUrl:"/Areas/Profile/Scripts/Components/UnsubscribePageForm/unsubscribe-page-form-v1.html",bindings:{}})],i)}();t.UnsubscribePageFormComponentV1=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i,r,u,f,e){this.$q=n;this.areaConfig=t;this.$state=i;this.$cookies=r;this.communicationsService=u;this.telemetry=f;this.$params=e}return i.prototype.componentOnInit=function(){return this.profileBIConst=this.areaConfig.consts.biConsts,this.unsubscribeBIConst=this.profileBIConst.unsubscribeBIConst,this.unsubscribeEndUserBIConst=this.profileBIConst.unsubscribeEndUserBIConst,this.stateConst=this.areaConfig.consts.stateConst,this.params=this.$cookies.getObject("profileCommunication"),this.params?this.$cookies.remove("profileCommunication",{path:"/"}):this.params=this.$params,this.isEndUser=this.params.CTID&&this.params.CTID===this.areaConfig.consts.contactTypeConst.endUser,this.biConst=this.isEndUser?this.unsubscribeEndUserBIConst:this.unsubscribeBIConst,this.userLandedBI(),!this.params.TID||!this.params.PID?this.goToCommunicationPermissionsPage():void 0},i.prototype.loadTopics=function(n){var t=this;return this.communicationsService.getTopicPermissionsEncrypted(this.params).then(function(i){if(t.model=i.data,t.model.topics.length!=0&&t.model.decryptedContactValue)if(t.model.topics[0].isAllowed)n.onSuccess(t.model.topics[0].name,t.model.decryptedContactValue);else{t.userAlreadyUnsubscribedBI();n.onAlreadyUnsubscribed(t.model.topics[0].name)}else n.onEmpty()}).catch(function(i){return t.errorBI(i),n.onError(),t.$q.reject(i)})},i.prototype.unsubscribeButtonClicked=function(n){var t=this;return this.model.topics[0].isAllowed=!1,this.communicationsService.setTopicPermissionsEncrypted(this.model).then(function(){t.unsubscribedBI();n.onSuccess(t.model.topics[0].name)}).catch(function(i){return t.errorBI(i),n.onError(),t.$q.reject(i)})},i.prototype.cancelButtonClicked=function(n){this.cancelBI();n()},i.prototype.getInstrumentationComponentName=function(){return"profile.unsubscribe-page-form-v2"},i.prototype.manageEmptyNullParams=function(n){var t=this;if(!this.params||!(this.params.CMID||this.params.CTID||this.params.D||this.params.ECID||this.params.K||this.params.PID||this.params.TID))return this.$q.resolve().then(function(){t.noParamsBI();n()})},i.prototype.goToCommunicationPermissionsPage=function(){return this.$state.go(this.stateConst.communicationsPage,{CTID:this.params.CTID,ECID:this.params.ECID,K:this.params.K,CMID:this.params.CMID,D:this.params.D})},i.prototype.userLandedBI=function(){this.bi={scenarioId:"",currentStep:this.biConst.landing};this.telemetry.portalScenarios.beginMultiStepScenario(this.profileBIConst.areaName,this.biConst.scenarioName,this.bi.currentStep)},i.prototype.userAlreadyUnsubscribedBI=function(){this.telemetry.portalScenarios.endMultiStepScenario({area:this.profileBIConst.areaName,name:this.biConst.scenarioName,step:this.bi.currentStep,error:this.areaConfig.consts.errorCode.alreadyUnsubscribed,isSuccess:!0})},i.prototype.cancelBI=function(){this.telemetry.portalScenarios.cancelMultiStepScenario({area:this.profileBIConst.areaName,name:this.biConst.scenarioName,step:this.bi.currentStep,isSuccess:!0})},i.prototype.unsubscribedBI=function(){this.telemetry.portalScenarios.endMultiStepScenario({area:this.profileBIConst.areaName,name:this.biConst.scenarioName,step:this.bi.currentStep,isSuccess:!0})},i.prototype.errorBI=function(n){var t=n.jqXHR.responseJSON||{};this.telemetry.portalScenarios.endMultiStepScenario({area:this.profileBIConst.areaName,name:this.biConst.scenarioName,step:this.bi.currentStep,error:t.error||"generic",isSuccess:!1})},i.prototype.noParamsBI=function(){this.telemetry.portalScenarios.endMultiStepScenario({area:this.profileBIConst.areaName,name:this.biConst.scenarioName,step:this.bi.currentStep,error:this.areaConfig.consts.errorCode.noParamsUnsubscribe,isSuccess:!1})},i.$inject=["$q","areaConfig","$state","$cookies","communicationsService","telemetryService","$stateParams"],__decorate([n.OneUI.Angular.MonitorOperationProgress("load-topic")],i.prototype,"loadTopics",null),__decorate([n.OneUI.Angular.MonitorOperationProgress("unsubscribe"),n.Shared.Angular.ClientReliability.InstrumentedComponentOperation("unsubscribeButtonClicked")],i.prototype,"unsubscribeButtonClicked",null),__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.areaModuleName,"unsubscribePageFormV2",{templateUrl:"/Areas/Profile/Scripts/Components/UnsubscribePageForm/unsubscribe-page-form-v2.html",bindings:{}})],i)}();t.UnsubscribePageFormComponentV2=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t,i){var r=this;this.areaConfig=n;this.$state=t;this.$meeModal=i;this.ILoadTopicsIWArgs={onEmpty:function(){return r.genericError()},onAlreadyUnsubscribed:function(){return r.alreadyUnsubscribed()},onSuccess:function(n){return r.formatDescription(n)},onError:function(){return r.genericError()}};this.IUnsubscribeButtonIWArgs={onSuccess:function(){return r.unsubscribeSuccess()},onError:function(){return r.unsubscribeError()}}}return i.prototype.componentOnInit=function(){var n=this;this.stateConst=this.areaConfig.consts.stateConst;this.content=this.areaConfig.content.iwUnsubscribePage;this.formatNotificationDialogs();this.unsubscribeComponent.manageEmptyNullParams(function(){return n.redirect()});this.unsubscribeComponent.loadTopics(this.ILoadTopicsIWArgs)},i.prototype.unsubscribe=function(){this.unsubscribeComponent.unsubscribeButtonClicked(this.IUnsubscribeButtonIWArgs)},i.prototype.cancel=function(){var n=this;this.unsubscribeComponent.cancelButtonClicked(function(){return n.redirect()})},i.prototype.goToCommunications=function(n){n.preventDefault();this.unsubscribeComponent.goToCommunicationPermissionsPage()},i.prototype.getInstrumentationComponentName=function(){return"profile.unsubscribe-section-iw"},i.prototype.getManageCommunicationPermissionsDataBIId=function(){return this.getInstrumentationComponentName()+".manage-communication-permissions"},i.prototype.getUnsubscribeButtonDataBIId=function(){return this.getInstrumentationComponentName()+".unsubscribe-button"},i.prototype.getCancelButtonDataBIId=function(){return this.getInstrumentationComponentName()+".cancel-button"},i.prototype.alreadyUnsubscribed=function(){this.showAlert(this.alreadyUnsubNotificationDialog,!1)},i.prototype.formatDescription=function(n){this.content.descriptionParagraph=this.content.descriptionParagraph.replace("{topic}",n);this.content.descriptionParagraph=this.content.descriptionParagraph.replace("{button-text}",this.content.unsubscribeButtonText)},i.prototype.genericError=function(){this.showAlert(this.errorGetTopicsNotificationDialog,!1)},i.prototype.redirect=function(){this.$state.go(this.stateConst.redirect,{redirectUrl:this.content.externalRedirectLink.url})},i.prototype.unsubscribeSuccess=function(){this.showAlert(this.successNotificationDialog,!1)},i.prototype.unsubscribeError=function(){this.showAlert(this.errorNotificationDialog,!0)},i.prototype.showAlert=function(n,t){var i=this,r=this.stateConst.unsubscribePageForm;this.$meeModal.show("#profile-dialog","unsubscribe-page-form.notification-dialog",{stateIdOnLastGoBack:r,stateIdOnDismiss:r,data:{content:n,tokens:[],confirmAction:function(){i.$meeModal.hide(r).finally(function(){t||i.$state.go(i.stateConst.redirect,{redirectUrl:i.content.externalRedirectLink.url})})}}})},i.prototype.formatNotificationDialogs=function(){this.successNotificationDialog={confirmText:this.content.dialogCloseText,messages:[this.content.successTitle],title:""};this.errorNotificationDialog={confirmText:this.content.dialogCloseText,messages:this.content.modifyErrorParagraphs,title:""};this.alreadyUnsubNotificationDialog={confirmText:this.content.dialogCloseText,messages:this.content.alreadyUnsubscribedParagraphs,title:""};this.errorGetTopicsNotificationDialog={confirmText:this.content.dialogCloseText,messages:this.content.retrieveErrorParagraphs,title:""}},i.$inject=["areaConfig","$state","$meeModal"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.areaModuleName,"unsubscribeSectionIw",{templateUrl:"/Areas/Profile/Scripts/Components/UnsubscribePageForm/UnsubscribeSection/unsubscribe-section.html",require:{unsubscribeComponent:"^unsubscribePageFormV2"}})],i)}();t.UnsubscribeSectionIWComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){var i=this;this.areaConfig=n;this.$state=t;this.ILoadTopicsMsaArgs={onEmpty:function(){return i.goToErrorPage()},onAlreadyUnsubscribed:function(n){return i.alreadyUnsubscribed(n)},onSuccess:function(n,t){return i.formatDescription(n,t)},onError:function(){return i.goToErrorPage()}};this.IUnsubscribeButtonMsaArgs={onSuccess:function(n){return i.unsubscribeSuccess(n)},onError:function(){return i.goToErrorPage()}}}return i.prototype.componentOnInit=function(){var n=this;this.stateConst=this.areaConfig.consts.stateConst;this.content=this.areaConfig.content.unsubscribePage;this.unsubscribeComponent.manageEmptyNullParams(function(){return n.redirect()});this.unsubscribeComponent.loadTopics(this.ILoadTopicsMsaArgs)},i.prototype.unsubscribe=function(){this.unsubscribeComponent.unsubscribeButtonClicked(this.IUnsubscribeButtonMsaArgs)},i.prototype.cancel=function(){var n=this;this.unsubscribeComponent.cancelButtonClicked(function(){return n.redirect()})},i.prototype.goToCommunications=function(n){n.preventDefault();this.unsubscribeComponent.goToCommunicationPermissionsPage()},i.prototype.getInstrumentationComponentName=function(){return"profile.unsubscribe-section-msa"},i.prototype.getManageCommunicationPermissionsDataBIId=function(){return this.getInstrumentationComponentName()+".manage-communication-permissions"},i.prototype.getUnsubscribeButtonDataBIId=function(){return this.getInstrumentationComponentName()+".unsubscribe-button"},i.prototype.getCancelButtonDataBIId=function(){return this.getInstrumentationComponentName()+".cancel-button"},i.prototype.alreadyUnsubscribed=function(n){this.$state.go(this.stateConst.unsubscribePageSuccess,this.getSuccessObj(!0,n))},i.prototype.formatDescription=function(n,t){this.content.descriptionParagraph=this.content.descriptionParagraph.replace("{email}",t);this.content.descriptionParagraph=this.content.descriptionParagraph.replace("{topic}",n);this.content.descriptionParagraph=this.content.descriptionParagraph.replace("{button-text}",this.content.unsubscribeButtonText);this.content.descriptionMetaTextParagraph=this.content.descriptionMetaTextParagraph.replace("{click-here-link}",this.content.globalClickHereText)},i.prototype.redirect=function(){this.$state.go(this.stateConst.landingProfile)},i.prototype.unsubscribeSuccess=function(n){this.$state.go(this.stateConst.unsubscribePageSuccess,this.getSuccessObj(!1,n))},i.prototype.goToErrorPage=function(){this.$state.go(this.stateConst.errorPage,{errorCode:this.areaConfig.consts.errorCode.communicationGeneric})},i.prototype.getSuccessObj=function(n,t){return{alreadyComplete:n,topicTitle:t}},i.$inject=["areaConfig","$state"],__decorate([n.Shared.Angular.ClientReliability.InstrumentedComponent(t.areaModuleName,"unsubscribeSectionMsa",{templateUrl:"/Areas/Profile/Scripts/Components/UnsubscribePageForm/UnsubscribeSection/unsubscribe-section.html",require:{unsubscribeComponent:"^unsubscribePageFormV2"}})],i)}();t.UnsubscribeSectionMSAComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}));__decorate=this&&this.__decorate||function(n,t,i,r){var f=arguments.length,u=f<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,e,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(n,t,i,r);else for(o=n.length-1;o>=0;o--)(e=n[o])&&(u=(f<3?e(u):f>3?e(t,i,u):e(t,i))||u);return f>3&&u&&Object.defineProperty(t,i,u),u},function(n){var t;(function(t){var i=function(){function i(n,t){this.areaConfig=n;this.params=t;this.showMetaDesc=!1;t.alreadyComplete?(this.title=n.content.unsubscribePage.successType.titleAlreadyComplete,this.description=n.content.unsubscribePage.successType.descriptionAlreadyCompleteParagraph.replace("{topic}",t.topicTitle),this.showMetaDesc=!1):(this.title=n.content.unsubscribePage.successType.title,this.description=n.content.unsubscribePage.successType.descriptionParagraph.replace("{topic}",t.topicTitle),this.descriptionMeta=n.content.unsubscribePage.successType.descriptionMetaText,this.showMetaDesc=!0)}return i.prototype.getInstrumentationComponentName=function(){return"profile.unsubscribe-page-success"},i.$inject=["areaConfig","$stateParams"],__decorate([n.Shared.Angular.Decorators.Component(t.areaModuleName,"unsubscribePageSuccess",{templateUrl:"/Areas/Profile/Scripts/Components/UnsubscribePageSuccess/unsubscribe-page-success.html"})],i)}();t.UnsubscribePageSuccessComponent=i})(t=n.Profile||(n.Profile={}))}(MeePortal||(MeePortal={}))