(function(){function n(t,i,r){function u(f,o){var h,c,s;if(!i[f]){if(!t[f]){if(h="function"==typeof require&&require,!o&&h)return h(f,!0);if(e)return e(f,!0);c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c;}s=i[f]={exports:{}};t[f][0].call(s.exports,function(n){var i=t[f][1][n];return u(i||n)},s,s.exports,n,t,i,r)}return i[f].exports}for(var e="function"==typeof require&&require,f=0;f<r.length;f++)u(r[f]);return u}return n})()({1:[function(n,t,i){"use strict";var r,u;Object.defineProperty(i,"__esModule",{value:!0});r=n("./src/Api/Api");i.Api=r;u=n("./src/FloodgateEngine");i.FloodgateEngine=u.FloodgateEngine},{"./src/Api/Api":5,"./src/FloodgateEngine":17}],2:[function(n,t){"use strict";var i=function(){function n(n){var t;if(!n)throw new Error("trackingSet must not be null");if(n.getList().length>32)throw new Error("trackingSet list size must be less than 32");for(this.isOrdered=n.getIsOrdered(),this.trackedActivities=n.getList(),this.currentIndex=0,this.activationMask=0,this.currentActivationFlags=0,this.isActivationByInitPending=!1,this.currentCounts=new Array(this.trackedActivities.length),this.currentStartTimes=new Array(this.trackedActivities.length),this.currentSessionCounts=new Array(this.trackedActivities.length),t=0;t<this.trackedActivities.length;t++)this.currentCounts[t]=0,this.currentSessionCounts[t]=0;for(t=0;t<this.trackedActivities.length;t++)this.activationMask|=1<<t,this.trackedActivities[t].getCount()<1&&this.trackedActivities[t].setCount(1)}return n.prototype.getCount=function(n){return this.isValidIndex(n)?this.currentCounts[n]:0},n.prototype.getSessionCount=function(n){return this.isValidIndex(n)?this.currentSessionCounts[n]:0},n.prototype.getStartTime=function(n){return this.isValidIndex(n)?this.currentStartTimes[n]:null},n.prototype.moveSessionCountIntoBaseCount=function(n){if(!this.isValidIndex(n))return 0;var t=this.currentSessionCounts[n];return this.currentSessionCounts[n]=0,t},n.prototype.initCounts=function(n,t,i){i===void 0&&(i=!1);for(var r=0;r<this.trackedActivities.length;r++){if(this.isOrdered&&r>this.currentIndex)break;r<t.length&&t[r]&&(this.currentSessionCounts[r]=this.currentCounts[r]=t[r].tracker.getSessionCount(t[r].index),this.currentStartTimes[r]=t[r].tracker.getStartTime(t[r].index));this.trackedActivities[r].getIsAggregate()&&r<n.length&&(this.currentCounts[r]+=n[r]);this.hasCountCrossedThreshold(r)&&this.finishActivityAtIndex(r)}this.isActivated()&&!i&&(this.isActivationByInitPending=!0)},n.prototype.generateActivityIndexList=function(){for(var i,r=[],t=0;t<this.trackedActivities.length;t++)i=new n.ActivityIndex,i.activity=this.trackedActivities[t].getActivity(),i.index=t,r.push(i);return r},n.prototype.incrementActivity=function(t,i){if(!this.isValidIndex(t))return n.IncrementResult.Pending;if(i<0)throw new Error("increment must be non-negative");if(this.isOrdered&&t>this.currentIndex)return n.IncrementResult.Pending;var r=!this.hasCountCrossedThreshold(t);return(this.currentCounts[t]+=i,this.currentSessionCounts[t]+=i,this.isActivationByInitPending)?this.isPermittedIndexForActivationByInit(t)?this.commitActivation():n.IncrementResult.Pending:(r&&this.hasCountCrossedThreshold(t))?(this.finishActivityAtIndex(t),this.isActivated())?this.commitActivation():n.IncrementResult.SingleActivityActivated:n.IncrementResult.Pending},n.prototype.startTime=function(n,t){this.isValidIndex(n)&&(this.currentStartTimes[n]=t?t:new Date)},n.prototype.stopTime=function(n,t){var i,r;return this.isValidIndex(n)?(i=this.currentStartTimes[n],this.currentStartTimes[n]=null,!i)?0:(t=t?t:new Date,i>t)?0:(r=t.getTime()-i.getTime(),r/1e3):0},n.prototype.isValidIndex=function(n){return n<this.trackedActivities.length},n.prototype.isActivated=function(){return(this.currentActivationFlags&this.activationMask)===this.activationMask},n.prototype.finishActivityAtIndex=function(n){if(!this.isValidIndex(n))throw new Error("Index is not valid");this.currentActivationFlags|=1<<n;n+1<this.trackedActivities.length&&(this.currentIndex=n+1)},n.prototype.hasCountCrossedThreshold=function(n){if(!this.isValidIndex(n))throw new Error("Index is not valid");return this.currentCounts[n]>=this.trackedActivities[n].getCount()},n.prototype.isPermittedIndexForActivationByInit=function(n){return!this.isOrdered||n+1===this.currentCounts.length},n.prototype.commitActivation=function(){return this.isActivationByInitPending=!1,n.IncrementResult.AllActivitiesActivated},n}();(function(n){var t=function(){function n(){}return n}(),i;n.ActivityIndex=t,function(n){n[n.Pending=0]="Pending";n[n.SingleActivityActivated=1]="SingleActivityActivated";n[n.AllActivitiesActivated=2]="AllActivitiesActivated"}(i=n.IncrementResult||(n.IncrementResult={}))})(i||(i={}));t.exports=i},{}],3:[function(n,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function n(n,t,i){this.activity=n;this.count=t;this.isAggregate=i}return n.prototype.getActivity=function(){return this.activity},n.prototype.getCount=function(){return this.count},n.prototype.setCount=function(n){this.count=n},n.prototype.getIsAggregate=function(){return this.isAggregate},n}();i.ActivityTrackingData=r},{}],4:[function(n,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function n(n,t){this.isOrdered=n;this.list=t}return n.prototype.getIsOrdered=function(){return this.isOrdered},n.prototype.getList=function(){return this.list},n}();i.ActivityTrackingSet=r},{}],5:[function(n,t,i){"use strict";var r,u,f,e,o,s,h;Object.defineProperty(i,"__esModule",{value:!0});r=n("./../ISurveyInfo");i.ISurveyInfo=r;u=n("./IActivityListener");i.IActivityListener=u;f=n("./IFloodgateStorageProvider");i.IFloodgateStorageProvider=f;e=n("./IFloodgateStringProvider");i.IFloodgateStringProvider=e;o=n("./IPromptComponent");i.IPromptComponent=o;s=n("./ISurvey");i.ISurvey=s;h=n("./ISurveyComponent");i.ISurveyComponent=h},{"./../ISurveyInfo":23,"./IActivityListener":6,"./IFloodgateStorageProvider":7,"./IFloodgateStringProvider":8,"./IPromptComponent":9,"./ISurvey":10,"./ISurveyComponent":11}],6:[function(n,t){"use strict";var i;(function(n){var t=function(){function n(){}return n.AppLaunch="AppLaunch",n.AppUsageTime="AppUsageTime",n.AppResume="AppResume",n}();n.ActivityName=t})(i||(i={}));t.exports=i},{}],7:[function(n,t){"use strict";var i;(function(n){var t;(function(n){n[n.FloodgateSettings=0]="FloodgateSettings";n[n.SurveyActivationStats=1]="SurveyActivationStats";n[n.SurveyEventActivityStats=2]="SurveyEventActivityStats";n[n.CampaignDefinitions=3]="CampaignDefinitions";n[n.CampaignStates=4]="CampaignStates";n[n.GovernedChannelStates=5]="GovernedChannelStates"})(t=n.FileType||(n.FileType={}))})(i||(i={}));t.exports=i},{}],8:[function(n,t){"use strict";var i;(function(n){var t;(function(n){n[n.NpsPromptTitle=0]="NpsPromptTitle";n[n.NpsPromptQuestion=1]="NpsPromptQuestion";n[n.NpsPromptYesLabel=2]="NpsPromptYesLabel";n[n.NpsPromptNotNowLabel=3]="NpsPromptNotNowLabel";n[n.NpsRatingQuestion=4]="NpsRatingQuestion";n[n.Nps11RatingValue0=5]="Nps11RatingValue0";n[n.Nps11RatingValue1=6]="Nps11RatingValue1";n[n.Nps11RatingValue2=7]="Nps11RatingValue2";n[n.Nps11RatingValue3=8]="Nps11RatingValue3";n[n.Nps11RatingValue4=9]="Nps11RatingValue4";n[n.Nps11RatingValue5=10]="Nps11RatingValue5";n[n.Nps11RatingValue6=11]="Nps11RatingValue6";n[n.Nps11RatingValue7=12]="Nps11RatingValue7";n[n.Nps11RatingValue8=13]="Nps11RatingValue8";n[n.Nps11RatingValue9=14]="Nps11RatingValue9";n[n.Nps11RatingValue10=15]="Nps11RatingValue10";n[n.Nps5RatingValue1=16]="Nps5RatingValue1";n[n.Nps5RatingValue2=17]="Nps5RatingValue2";n[n.Nps5RatingValue3=18]="Nps5RatingValue3";n[n.Nps5RatingValue4=19]="Nps5RatingValue4";n[n.Nps5RatingValue5=20]="Nps5RatingValue5";n[n.NpsCommentQuestion=21]="NpsCommentQuestion";n[n.PsatPromptTitle=22]="PsatPromptTitle";n[n.PsatPromptQuestion=23]="PsatPromptQuestion";n[n.PsatPromptYesLabel=24]="PsatPromptYesLabel";n[n.PsatPromptNotNowLabel=25]="PsatPromptNotNowLabel";n[n.PsatRatingQuestion=26]="PsatRatingQuestion";n[n.PsatRatingValue1=27]="PsatRatingValue1";n[n.PsatRatingValue2=28]="PsatRatingValue2";n[n.PsatRatingValue3=29]="PsatRatingValue3";n[n.PsatRatingValue4=30]="PsatRatingValue4";n[n.PsatRatingValue5=31]="PsatRatingValue5";n[n.PsatCommentQuestion=32]="PsatCommentQuestion";n[n.BpsPromptTitle=33]="BpsPromptTitle";n[n.BpsPromptQuestion=34]="BpsPromptQuestion";n[n.BpsPromptYesLabel=35]="BpsPromptYesLabel";n[n.BpsPromptNotNowLabel=36]="BpsPromptNotNowLabel";n[n.BpsRatingQuestion=37]="BpsRatingQuestion";n[n.BpsRatingValue1=38]="BpsRatingValue1";n[n.BpsRatingValue2=39]="BpsRatingValue2";n[n.BpsCommentQuestion=40]="BpsCommentQuestion"})(t=n.StringType||(n.StringType={}))})(i||(i={}));t.exports=i},{}],9:[function(n,t){"use strict";var i;(function(n){var t;(function(n){n[n.Unselected=0]="Unselected";n[n.Yes=1]="Yes";n[n.No=2]="No"})(t=n.PromptButton||(n.PromptButton={}))})(i||(i={}));t.exports=i},{}],10:[function(n,t){"use strict";var i;(function(n){var t;(function(n){n[n.Feedback=0]="Feedback";n[n.Nps=1]="Nps";n[n.Psat=2]="Psat";n[n.Bps=3]="Bps";n[n.Fps=4]="Fps";n[n.Nlqs=5]="Nlqs"})(t=n.Type||(n.Type={}));n.DOM_FEEDBACKSURVEY_TAGNAME="FeedbackSurvey";n.DOM_NPS_TAGNAME="Nps";n.DOM_PSAT_TAGNAME="Psat";n.DOM_BPS_TAGNAME="Bps";n.DOM_FPS_TAGNAME="Fps";n.DOM_NLQS_TAGNAME="Nlqs"})(i||(i={}));t.exports=i},{}],11:[function(n,t){"use strict";var i;(function(n){var t;(function(n){n[n.Prompt="Prompt"]="Prompt";n[n.Comment="Comment"]="Comment";n[n.Rating="Rating"]="Rating"})(t=n.Type||(n.Type={}));n.DOM_PROMPT_TAGNAME="Prompt";n.DOM_COMMENT_TAGNAME="Comment";n.DOM_RATING_TAGNAME="Rating";n.JSON_PROMPT_KEYNAME="prompt";n.JSON_COMMENT_KEYNAME="comment";n.JSON_RATING_KEYNAME="rating"})(i||(i={}));t.exports=i},{}],12:[function(n,t,i){"use strict";function lt(n){var u=[],i,t,f,e,o;if(r.isNullOrUndefined(n))return{result:u,error:"Empty"};if(!Array.isArray(n))return{result:u,error:"Not an array"};for(i=[],t=0;t<n.length;t++)f=n[t],f?(e=ct.deserialize(f),e?u.push(e):i.push(t)):i.push(t);return o=i.length>0?"Invalid campaign definitions at indexes: "+i.toString():undefined,{result:u,error:o}}var u=this&&this.__extends||function(){var 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])};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)}}(),p,s,c,w,o,b,k,d,l,g,a,nt,f,v,tt,h,it,rt,ut,e,ft,et,ot,st,ht,ct,at;Object.defineProperty(i,"__esModule",{value:!0});var vt=n("../Api/IFloodgateStorageProvider"),yt=n("../FloodgateEngine"),pt=n("../GovernedChannel"),wt=n("../ISurveyInfo"),r=n("../Utils"),y=function(){function n(){}return n.deserialize=function(n){var t;return(n&&n.Type===0&&(t=p.deserialize(n)),t===undefined)?null:t},n.prototype.validate=function(){return!0},n}();i.CampaignLanguageRange=y;p=function(n){function t(){return n.call(this)||this}return u(t,n),t.deserialize=function(n){var i=new t;return(n&&(i.languageSubTag=n.Value),!i.validate())?null:i},t.prototype.isInRange=function(n){if(r.isNullOrUndefined(n))return!1;var t=r.extractLanguageSubtag(n);return r.isNullOrUndefined(t)?!1:t.toLocaleUpperCase()===this.languageSubTag.toLocaleUpperCase()},t.prototype.validate=function(){return n.prototype.validate.call(this)?r.isNullOrUndefined(this.languageSubTag)||!r.isString(this.languageSubTag)?!1:r.isValidLanguageSubTag(this.languageSubTag)?!0:!1:!1},t}(y);i.CampaignLanguageRangeLanguageSubtag=p;s=function(){function n(){}return n.deserialize=function(n){var t;if(r.isNullOrUndefined(n))return null;switch(n.Type){case 0:t=c.deserialize(n);break;case 1:t=w.deserialize(n)}return t===undefined?null:t},n.prototype.validate=function(){return!0},n}();i.CampaignScope=s;c=function(n){function t(){return n.call(this)||this}return u(t,n),t.deserialize=function(){return new t},t.prototype.isInScope=function(){return!0},t.prototype.validate=function(){return n.prototype.validate.call(this)?!0:!1},t}(s);i.CampaignScopeAny=c;w=function(n){function t(){return n.call(this)||this}return u(t,n),t.deserialize=function(n){var u=new t,i=[],f,e;if(r.isNullOrUndefined(n))return null;for(f in n.Languages)n.Languages.hasOwnProperty(f)&&(e=n.Languages[f],e&&i.push(y.deserialize(e)));return(i.length===0&&(i=null),u.languageRanges=i,!u.validate())?null:u},t.prototype.isInScope=function(n){var t,i;if(r.isNullOrUndefined(this.languageRanges))return!0;if(r.isNullOrUndefined(n)||!n.getLanguage())return!1;for(t in this.languageRanges)if(this.languageRanges.hasOwnProperty(t)&&(i=this.languageRanges[t],i.isInRange(n.getLanguage())))return!0;return!1},t.prototype.validate=function(){if(!n.prototype.validate.call(this))return!1;if(this.languageRanges)for(var t in this.languageRanges)if(this.languageRanges.hasOwnProperty(t)&&!this.languageRanges[t])return!1;return!0},t}(s);i.CampaignScopeEnvironmentCrossProduct=w;o=function(){function n(){}return n.deserialize=function(n){var t;if(r.isNullOrUndefined(n))return null;switch(n.Type){case 0:t=b.deserialize(n);break;case 1:t=k.deserialize(n)}return t===undefined?null:t},n.prototype.validate=function(){return!0},n}();i.CampaignDuration=o;b=function(n){function t(){return n.call(this)||this}return u(t,n),t.deserialize=function(n){var i=new t;return(n&&(i.intervalSeconds=n.IntervalSeconds),!i.validate())?null:i},t.prototype.asTimeIntervalSeconds=function(){return this.intervalSeconds},t.prototype.validate=function(){return n.prototype.validate.call(this)?r.isNumber(this.intervalSeconds)?!0:!1:!1},t}(o);i.CampaignDurationTimeInterval=b;k=function(n){function t(){return n.call(this)||this}return u(t,n),t.deserialize=function(){return new t},t.prototype.asTimeIntervalSeconds=function(){return null},t}(o);i.CampaignDurationSingleBuildChange=k;d=function(){function n(){}return n.deserialize=function(t){var i=new n,u,f,e;if(!r.isNullOrUndefined(t))for(i.additionalData=[],u=0,f=t;u<f.length;u++)e=f[u],e==="EmailAddress"&&i.additionalData.push(wt.AdditionalDataType.EmailAddress);return i.validate()?i:null},n.prototype.validate=function(){return r.isNullOrUndefined(this.additionalData)?!1:!0},n}();i.CampaignAdditionalDataRequested=d;l=function(){function n(){}return n.deserialize=function(n){var t;return(n&&n.Type===0&&(t=g.deserialize(n)),t===undefined)?null:t},n.prototype.validate=function(){return!0},n}();i.CampaignDistribution=l;g=function(n){function t(){return n.call(this)||this}return u(t,n),t.deserialize=function(n){var i=new t;return(n&&(i.maxDelaySeconds=n.MaxDelaySeconds,i.chunks=n.Chunks),!i.validate())?null:i},t.prototype.validate=function(){return n.prototype.validate.call(this)?!r.isNumber(this.maxDelaySeconds)||this.maxDelaySeconds<0?!1:!r.isNumber(this.chunks)||this.chunks<0?!1:!0:!1},t}(l);i.CampaignDistributionRamp=g;a=function(){function n(){}return n.deserialize=function(n){var t;return(n&&n.Type===0&&(t=nt.deserialize(n)),t===undefined)?null:t},n.prototype.getActiveSurveyTimeIntervalSeconds=function(){var n=this.nominationPeriod.asTimeIntervalSeconds();return r.isNumber(n)?n:this.fallbackSurveyDurationSeconds},n.prototype.calculateSurveyStartTimeFromDate=function(n){return n?n:new Date},n.prototype.calculateSurveyExpirationTimeFromSurveyStartTime=function(n){return n=n?n:new Date,r.addSecondsWithoutOverflow(n,this.getActiveSurveyTimeIntervalSeconds())},n.prototype.getCampaignCooldown=function(n){return n?this.cooldownPeriod:this.nominationPeriod},n.prototype.validate=function(){return r.isNullOrUndefined(this.nominationPeriod)?!1:(r.isNullOrUndefined(this.cooldownPeriod)&&(this.cooldownPeriod=this.nominationPeriod),!r.isNumber(this.nominationPeriod.asTimeIntervalSeconds())&&(!r.isNumber(this.fallbackSurveyDurationSeconds)||this.fallbackSurveyDurationSeconds<=0))?!1:!0},n}();i.CampaignNominationScheme=a;nt=function(n){function t(){return n.call(this)||this}return u(t,n),t.deserialize=function(n){var i=new t;return r.isNullOrUndefined(n)?null:(n.DistributionModel&&(i.distributionModel=l.deserialize(n.DistributionModel)),n.CooldownPeriod&&(i.cooldownPeriod=o.deserialize(n.CooldownPeriod)),n.NominationPeriod&&(i.nominationPeriod=o.deserialize(n.NominationPeriod)),i.fallbackSurveyDurationSeconds=n.FallbackSurveyDurationSeconds,i.percentageDenominator=n.PercentageDenominator,i.percentageNumerator=n.PercentageNumerator,!i.validate())?null:i},t.prototype.evaluateNominationRules=function(){var n=Math.random();return Math.floor(n*this.percentageDenominator)<this.percentageNumerator},t.prototype.validate=function(){return n.prototype.validate.call(this)?!r.isNumber(this.percentageDenominator)||!r.isNumber(this.percentageNumerator)?!1:this.percentageDenominator<=0||this.percentageNumerator<0?!1:this.percentageNumerator>this.percentageDenominator?!1:!0:!1},t}(a);i.CampaignNominationSchemeRatioPercentage=nt;f=function(){function n(){}return n.deserialize=function(n){var t;if(r.isNullOrUndefined(n))return null;switch(n.Type){case 0:t=v.deserialize(n);break;case 1:t=tt.deserialize(n)}return t===undefined?null:t},n.prototype.validate=function(){return!0},n}();i.CampaignSurveyEvent=f;v=function(n){function t(){return n.call(this)||this}return u(t,n),t.deserialize=function(n){var i=new t;return r.isNullOrUndefined(n)?null:(i.activity=n.Activity,i.count=n.Count,i.isAggregate=n.IsAggregate,!i.validate())?null:i},t.prototype.validate=function(){return n.prototype.validate.call(this)?r.isNullOrUndefined(this.activity)||!r.isString(this.activity)?!1:!r.isNumber(this.count)||this.count<=0?!1:r.isBoolean(this.isAggregate)?!0:!1:!1},t}(f);i.CampaignSurveyEventCountedActivity=v;tt=function(n){function t(){return n.call(this)||this}return u(t,n),t.deserialize=function(n){var u=new t,i=[],f,e;if(r.isNullOrUndefined(n))return null;for(f in n.Sequence)n.Sequence.hasOwnProperty(f)&&(e=n.Sequence[f],e&&i.push(v.deserialize(e)));return(i.length===0&&(i=null),u.sequence=i,!u.validate())?null:u},t.prototype.validate=function(){if(!n.prototype.validate.call(this)||r.isNullOrUndefined(this.sequence))return!1;for(var t in this.sequence)if(this.sequence.hasOwnProperty(t)&&!this.sequence[t])return!1;return!0},t}(f);i.CampaignSurveyEventCountedActivitySequence=tt;h=function(){function n(){}return n.deserialize=function(t){var i=new n;return r.isNullOrUndefined(t)?null:(i.prompt=it.deserialize(t.Prompt),i.rating=rt.deserialize(t.Rating),i.comment=ut.deserialize(t.Question),!i.validate())?null:i},n.prototype.validate=function(){return r.isNullOrUndefined(this.prompt)||r.isNullOrUndefined(this.rating)||r.isNullOrUndefined(this.comment)?!1:!0},n}();i.CampaignSurveyContent=h;it=function(){function n(){}return n.deserialize=function(t){var i=new n;return r.isNullOrUndefined(t)?null:(i.title=t.Title,i.question=t.Question,i.yesLabel=t.YesLabel,i.noLabel=t.NoLabel,!i.validate())?null:i},n.prototype.validate=function(){return r.isNullOrUndefined(this.title)||!r.isString(this.title)||r.isNullOrUndefined(this.question)||!r.isString(this.question)||r.isNullOrUndefined(this.yesLabel)||!r.isString(this.yesLabel)||r.isNullOrUndefined(this.noLabel)||!r.isString(this.noLabel)?!1:!0},n}();i.CampaignSurveyContentPrompt=it;rt=function(){function n(){}return n.deserialize=function(t){var i=new n;return r.isNullOrUndefined(t)?null:(i.isZeroBased=t.IsZeroBased,i.question=t.Question,i.ratingValuesAscending=t.RatingValuesAscending,!i.validate())?null:i},n.prototype.validate=function(){if(r.isNullOrUndefined(this.question)||!r.isString(this.question)||r.isNullOrUndefined(this.ratingValuesAscending)||!Array.isArray(this.ratingValuesAscending)||this.ratingValuesAscending.length<2||this.ratingValuesAscending.length>11)return!1;if(r.isNullOrUndefined(this.isZeroBased))this.isZeroBased=!1;else if(!r.isBoolean(this.isZeroBased))return!1;for(var n in this.ratingValuesAscending)if(this.ratingValuesAscending.hasOwnProperty(n)&&!r.isString(this.ratingValuesAscending[n]))return!1;return!0},n}();i.CampaignSurveyContentRating=rt;ut=function(){function n(){}return n.deserialize=function(t){var i=new n;return r.isNullOrUndefined(t)?null:(i.question=t.Question,!i.validate())?null:i},n.prototype.validate=function(){return r.isNullOrUndefined(this.question)||!r.isString(this.question)?!1:!0},n}();i.CampaignSurveyContentComment=ut;e=function(){function n(){}return n.deserialize=function(n){var t;if(r.isNullOrUndefined(n))return null;switch(n.Type){case 0:t=st.deserialize(n);break;case 1:t=ht.deserialize(n);break;case 2:t=ft.deserialize(n);break;case 3:t=et.deserialize(n);break;case 4:t=ot.deserialize(n)}return t===undefined?null:t},n.prototype.validate=function(){return r.isNullOrUndefined(this.activationEvent)?!1:!0},n}();i.CampaignSurveyTemplate=e;ft=function(n){function t(){return n.call(this)||this}return u(t,n),t.deserialize=function(n){var i=new t;return r.isNullOrUndefined(n)?null:(i.activationEvent=f.deserialize(n.ActivationEvent),i.content=h.deserialize(n.Content),!i.validate())?null:i},t.prototype.validate=function(){return!n.prototype.validate.call(this)||r.isNullOrUndefined(this.content)?!1:!0},t}(e);i.CampaignSurveyTemplateFps=ft;et=function(n){function t(){return n.call(this)||this}return u(t,n),t.deserialize=function(n){var i=new t;return r.isNullOrUndefined(n)?null:(i.activationEvent=f.deserialize(n.ActivationEvent),i.content=h.deserialize(n.Content),!i.validate())?null:i},t.prototype.validate=function(){return!n.prototype.validate.call(this)||r.isNullOrUndefined(this.content)?!1:!0},t}(e);i.CampaignSurveyTemplateNlqs=et;ot=function(n){function t(){return n.call(this)||this}return u(t,n),t.deserialize=function(n){var i=new t;return r.isNullOrUndefined(n)?null:(i.activationEvent=f.deserialize(n.ActivationEvent),i.content=h.deserialize(n.Content),!i.validate())?null:i},t.prototype.validate=function(){return!n.prototype.validate.call(this)||r.isNullOrUndefined(this.content)?!1:!0},t}(e);i.CampaignSurveyTemplateNps=ot;st=function(n){function t(){return n.call(this)||this}return u(t,n),t.deserialize=function(n){var i=new t;return r.isNullOrUndefined(n)?null:(i.activationEvent=f.deserialize(n.ActivationEvent),!i.validate())?null:i},t.prototype.validate=function(){return n.prototype.validate.call(this)?!0:!1},t}(e);i.CampaignSurveyTemplateNps5PointStatic=st;ht=function(n){function t(){return n.call(this)||this}return u(t,n),t.deserialize=function(n){var i=new t;return r.isNullOrUndefined(n)?null:(i.activationEvent=f.deserialize(n.ActivationEvent),!i.validate())?null:i},t.prototype.validate=function(){return n.prototype.validate.call(this)?!0:!1},t}(e);i.CampaignSurveyTemplateNps11PointStatic=ht;ct=function(){function n(){}return n.deserialize=function(t){var i=new n,u;return r.isNullOrUndefined(t)?null:(i.campaignId=t.CampaignId,i.governedChannelType=t.GovernedChannelType,i.startTime=t.StartTimeUtc,i.endTime=t.EndTimeUtc,u=d.deserialize(t.AdditionalDataRequested),i.additionalDataRequested=u?u.additionalData:[],t.SurveyTemplate&&(i.surveyTemplate=e.deserialize(t.SurveyTemplate)),t.NominationScheme&&(i.nominationScheme=a.deserialize(t.NominationScheme)),t.Scope&&(i.scope=s.deserialize(t.Scope)),!i.validate())?null:i},n.prototype.validate=function(){if((r.isNullOrUndefined(this.scope)&&(this.scope=new c),r.isNullOrUndefined(this.campaignId)||!r.isString(this.campaignId))||!r.isNumber(this.governedChannelType)||!r.isEnumValue(this.governedChannelType,pt.GovernedChannelType)||r.isNullOrUndefined(this.nominationScheme)||r.isNullOrUndefined(this.surveyTemplate))return!1;if(r.isNullOrUndefined(this.startTime))this.startTime=r.getDistantFuture();else if(r.isUtcDatetimeString(this.startTime))this.startTime=r.stringToDate(this.startTime);else return!1;if(r.isNullOrUndefined(this.endTime))this.endTime=r.getDistantFuture();else if(r.isUtcDatetimeString(this.endTime))this.endTime=r.stringToDate(this.endTime);else return!1;return!0},n}();i.CampaignDefinition=ct;i.FilterValidCampaignDefinitions=lt;at=function(){function n(n){if(r.isNullOrUndefined(n))throw new Error("storage must not be null");this.storage=n}return n.prototype.load=function(){var n=this.storage.read(vt.FileType.CampaignDefinitions),t;if(r.isNullOrUndefined(n))return[];try{t=JSON.parse(n)}catch(i){return yt.FloodgateEngine.getTelemetryLogger().log_CampaignLoad_Failed(i.toString()),[]}return lt(t).result},n}();i.FileSystemCampaignDefinitionProvider=at},{"../Api/IFloodgateStorageProvider":7,"../FloodgateEngine":17,"../GovernedChannel":19,"../ISurveyInfo":23,"../Utils":38}],13:[function(n,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=n("../Utils"),u=n("./CampaignDefinitionProvider"),f=n("./CampaignStateProvider"),e=n("./CampaignSurveyFactory"),o=function(){function n(n,t,i,u,f,e){if(!n)throw new Error("stateProvider must not be null");if(!t)throw new Error("definitionProvider must not be null");if(!i)throw new Error("stringProvider must not be null");if(r.isNullOrUndefined(f))throw new Error("currentBuildNumber must not be null");this.campaignStates={};this.campaignDefinitions={};this.stateProvider=n;this.definitionProvider=t;this.stringProvider=i;this.environmentProvider=u;this.currentBuildNumber=f;e=e?e:new Date;this.refreshSurveyDefinitionsPrivate(null,e)}return n.isStateUpForNomination=function(t,i,r,u){if(!t||!i)return!1;if(r=r?r:new Date,t.ForceCandidacy)return!0;var f=i.nominationScheme.getCampaignCooldown(t.IsCandidate&&t.DidCandidateTriggerSurvey);return f?n.hasBuildChangeDurationElapsed(f,t.LastNominationBuildNumber,u)?!0:n.hasTimeIntervalDurationElapsed(f,t.getCooldownStartDate(),r):!1},n.isDateInRange=function(n,t,i){return(n=n?n:new Date,t=t?t:r.getDistantPast(),i=i?i:r.getDistantFuture(),t.getTime()<=n.getTime()&&i.getTime()>=n.getTime())?!0:!1},n.hasTimeIntervalDurationElapsed=function(n,t,i){if(r.isNullOrUndefined(n)||!(n instanceof u.CampaignDurationTimeInterval)||!t||!i)return!1;var f=r.addSecondsWithoutOverflow(t,n.intervalSeconds);return i.getTime()>=f.getTime()},n.hasBuildChangeDurationElapsed=function(n,t,i){return r.isNullOrUndefined(n)||!(n instanceof u.CampaignDurationSingleBuildChange)?!1:r.isNullOrUndefined(t)||r.isNullOrUndefined(i)?t===null!=(i===null):!(t===i)},n.isCampaignInScope=function(t,i,r){return t?(i=i?i:new Date,!n.isDateInRangeWithDefinition(i,t))?!1:t.scope&&!t.scope.isInScope(r)?!1:!0:!1},n.isDateInRangeWithDefinition=function(t,i){return i?(t=t?t:new Date,n.isDateInRange(t,i.startTime?i.startTime:r.getDistantFuture(),i.endTime)):!1},n.prototype.getActiveSurveys=function(){var u={},r,t,n,i;for(r in this.campaignStates)if(this.campaignStates.hasOwnProperty(r)){if(t=this.campaignStates[r],!t.IsCandidate)continue;if(n=this.campaignDefinitions[t.CampaignId],!n)continue;if(i=e.CampaignSurveyFactory.makeSurvey(t,n.governedChannelType,n.surveyTemplate,this.stringProvider,n.additionalDataRequested),!i)continue;u[i.getSurveyInfo().getId()]=i}return u},n.prototype.onCampaignSurveyActivated=function(n,t){var i=this.campaignStates[n];i&&(t=t?t:new Date,i.markCurrentSurveyTakenOnDate(t,this.campaignDefinitions[n].nominationScheme.cooldownPeriod.asTimeIntervalSeconds()),this.saveCurrentState())},n.prototype.getCampaignStates=function(){return this.campaignStates},n.prototype.getCampaignDefinitions=function(){return this.campaignDefinitions},n.prototype.onSurveyActivated=function(n){if(n)this.onCampaignSurveyActivated(n.getBackEndId(),new Date)},n.prototype.refreshSurveyDefinitions=function(n){this.refreshSurveyDefinitionsPrivate(n,new Date)},n.prototype.getAppSurveys=function(){return this.getActiveSurveys()},n.prototype.saveCurrentState=function(){var n=r.makeArrayFromObjectValuesSortedByKeyString(this.campaignStates);this.stateProvider.save(n)},n.prototype.refreshSurveyDefinitionsPrivate=function(n,t){this.campaignStates={};this.campaignDefinitions={};this.loadAndFilterCampaignData(t,n);this.evaluateCampaigns(t)},n.prototype.loadAndFilterCampaignData=function(t,i){var l,s,h,o,e,u,f,c;t=t?t:new Date;l={};s=this.definitionProvider.load();for(e in s)if(s.hasOwnProperty(e)){if(f=s[e],l[f.campaignId]=f,i&&i.indexOf(f.governedChannelType)<0)continue;if(!n.isCampaignInScope(f,t,this.environmentProvider))continue;this.campaignDefinitions[f.campaignId]=f}h=this.stateProvider.load();o=[];for(e in h)h.hasOwnProperty(e)&&(u=h[e],this.campaignDefinitions.hasOwnProperty(u.CampaignId)||o.push(u),this.campaignStates[u.CampaignId]=u);for(e in o)if(o.hasOwnProperty(e)){if(u=o[e],!u)continue;f=l[u.CampaignId];c=!1;f?n.isStateUpForNomination(u,f,t,this.currentBuildNumber)&&(c=!0):u.LastNominationTimeUtc.getTime()<=r.subtractSecondsWithoutOverflow(t,u.DeleteAfterSecondsWhenStale).getTime()&&(c=!0);c&&delete this.campaignStates[u.CampaignId]}},n.prototype.evaluateCampaigns=function(t){var e,u,i,s;t=t?t:new Date;for(e in this.campaignDefinitions)if(this.campaignDefinitions.hasOwnProperty(e)&&(u=this.campaignDefinitions[e],i=this.campaignStates[u.campaignId],!i||n.isStateUpForNomination(i,u,t,this.currentBuildNumber))){var h=i?i.LastSurveyId:"",o=i?i.LastSurveyStartTimeUtc:r.getDistantPast(),c=i?i.LastSurveyExpirationTimeUtc:r.getDistantPast(),a=i?i.LastSurveyActivatedTimeUtc:r.getDistantPast(),v=i?i.LastCooldownEndTimeUtc:r.getDistantPast(),l=i&&i.ForceCandidacy||u.nominationScheme.evaluateNominationRules();l&&(h=r.guid(),o=u.nominationScheme.calculateSurveyStartTimeFromDate(t),c=u.nominationScheme.calculateSurveyExpirationTimeFromSurveyStartTime(o));s=new f.CampaignState(u.campaignId,t,this.currentBuildNumber,u.nominationScheme.getActiveSurveyTimeIntervalSeconds(),!1,l,!1,a,h,o,c,v);this.campaignStates[s.CampaignId]=s}},n}();i.CampaignManager=o},{"../Utils":38,"./CampaignDefinitionProvider":12,"./CampaignStateProvider":14,"./CampaignSurveyFactory":15}],14:[function(n,t,i){"use strict";var v,y,a,e;Object.defineProperty(i,"__esModule",{value:!0});var o=n("../Api/IFloodgateStorageProvider"),s=n("../Constants"),h=n("../FloodgateEngine"),u=n("../StateProviderHelpers"),r=n("../Utils"),f=o.FileType,c=u.StateListType,l=function(){function n(n,t,i,r,u,f,e,o,s,h,c,l){if(this.CampaignId=n,this.LastNominationTimeUtc=t,this.LastNominationBuildNumber=i,this.DeleteAfterSecondsWhenStale=r,this.ForceCandidacy=u,this.IsCandidate=f,this.DidCandidateTriggerSurvey=e,this.LastSurveyActivatedTimeUtc=o,this.LastSurveyId=s,this.LastSurveyStartTimeUtc=h,this.LastSurveyExpirationTimeUtc=c,this.LastCooldownEndTimeUtc=l,!this.validate())throw new Error("Constructor arguments are not valid");}return n.deserialize=function(t){var i;if(!t)return null;try{i=new n(t.CampaignId,t.LastNominationTimeUtc,t.LastNominationBuildNumber,t.DeleteAfterSecondsWhenStale,!1,t.IsCandidate,t.DidCandidateTriggerSurvey,t.LastSurveyActivatedTimeUtc,t.LastSurveyId,t.LastSurveyStartTimeUtc,t.LastSurveyExpirationTimeUtc,t.LastCooldownEndTimeUtc)}catch(r){return h.FloodgateEngine.getTelemetryLogger().log_Event(s.TelemetryEvent.CampaignState.Deserialize.Failed,{ErrorMessage:r.toString()}),null}return i},n.prototype.validate=function(){if(!this.CampaignId||!r.isString(this.CampaignId)||r.isNullOrUndefined(this.LastNominationBuildNumber)||!r.isString(this.LastNominationBuildNumber)||!r.isNumber(this.DeleteAfterSecondsWhenStale)||this.DeleteAfterSecondsWhenStale<0||!r.isBoolean(this.IsCandidate)||!r.isBoolean(this.DidCandidateTriggerSurvey)||this.IsCandidate&&(r.isNullOrUndefined(this.LastSurveyStartTimeUtc)||r.isNullOrUndefined(this.LastSurveyExpirationTimeUtc)||!r.isString(this.LastSurveyId))||this.DidCandidateTriggerSurvey&&r.isNullOrUndefined(this.LastSurveyActivatedTimeUtc))return!1;if(r.isNullOrUndefined(this.LastSurveyId))this.LastSurveyId="";else if(!r.isString(this.LastSurveyId))return!1;if(r.isUtcDatetimeString(this.LastNominationTimeUtc))this.LastNominationTimeUtc=r.stringToDate(this.LastNominationTimeUtc);else if(!r.isDate(this.LastNominationTimeUtc))return!1;if(r.isNullOrUndefined(this.LastSurveyActivatedTimeUtc))this.LastSurveyActivatedTimeUtc=r.getDistantPast();else if(r.isUtcDatetimeString(this.LastSurveyActivatedTimeUtc))this.LastSurveyActivatedTimeUtc=r.stringToDate(this.LastSurveyActivatedTimeUtc);else if(!r.isDate(this.LastSurveyActivatedTimeUtc))return!1;if(r.isNullOrUndefined(this.LastSurveyStartTimeUtc))this.LastSurveyStartTimeUtc=r.getDistantPast();else if(r.isUtcDatetimeString(this.LastSurveyStartTimeUtc))this.LastSurveyStartTimeUtc=r.stringToDate(this.LastSurveyStartTimeUtc);else if(!r.isDate(this.LastSurveyStartTimeUtc))return!1;if(r.isNullOrUndefined(this.LastSurveyExpirationTimeUtc))this.LastSurveyExpirationTimeUtc=r.getDistantPast();else if(r.isUtcDatetimeString(this.LastSurveyExpirationTimeUtc))this.LastSurveyExpirationTimeUtc=r.stringToDate(this.LastSurveyExpirationTimeUtc);else if(!r.isDate(this.LastSurveyExpirationTimeUtc))return!1;if(r.isNullOrUndefined(this.LastCooldownEndTimeUtc))this.LastCooldownEndTimeUtc=r.getDistantPast();else if(r.isUtcDatetimeString(this.LastCooldownEndTimeUtc))this.LastCooldownEndTimeUtc=r.stringToDate(this.LastCooldownEndTimeUtc);else if(!r.isDate(this.LastCooldownEndTimeUtc))return!1;return!0},n.prototype.markCurrentSurveyTakenOnDate=function(n,t){this.DidCandidateTriggerSurvey=!0;this.LastSurveyActivatedTimeUtc=n!=null?n:new Date;this.LastCooldownEndTimeUtc=r.addSecondsWithoutOverflow(this.LastSurveyActivatedTimeUtc,t)},n.prototype.getCooldownStartDate=function(){return this.IsCandidate?this.DidCandidateTriggerSurvey?this.LastSurveyActivatedTimeUtc:this.LastSurveyStartTimeUtc:this.LastNominationTimeUtc},n}();i.CampaignState=l;v=function(){function n(){}return n.make=function(n,t){return t?new a(n,t):new e(n)},n}();i.CampaignStateProviderFactory=v;y=function(){function n(){}return n}();a=function(){function n(n,t){if(!t)throw new Error("host-based storage must not be null");this.hostBasedStorage=t;n&&(this.fileBasedStateProvider=new e(n))}return n.prototype.load=function(){var i=this.getStatesFromHost(),n,t;return this.fileBasedStateProvider&&(n=this.fileBasedStateProvider.load()),t=u.MergeAndUpdateCampaignStates(n,i),t.find(c.Merged)},n.prototype.save=function(n){var r=this;if(n){var e=this.getStatesFromHost(),t=u.MergeAndUpdateCampaignStates(n,e),i=t.find(c.ToBeUpdated),o=t.find(c.Merged);i&&i.forEach(function(n){var t=u.makeSettingItemValue(JSON.stringify(n));r.hostBasedStorage.upsertSettingItem(f[f.CampaignStates],n.CampaignId,t)});this.fileBasedStateProvider&&this.fileBasedStateProvider.save(o)}},n.prototype.getStatesFromHost=function(){var r=[],n=this.hostBasedStorage.readSettingList(f[f.CampaignStates]),t,i;for(t in n)if(n.hasOwnProperty(t)){var c=n[t],e=u.extractSettingItemValueSubString(c),o={};try{o=JSON.parse(e);i=l.deserialize(o);i&&r.push(i)}catch(a){h.FloodgateEngine.getTelemetryLogger().log_Event(s.TelemetryEvent.HostBasedCampaignStateProvider.GetStatesFromHost.Failed,{ErrorMessage:"Json parsing/deserializing failed. "+a.toString()+".  Input:"+e})}}return r},n}();i.HostBasedCampaignStateProvider=a;e=function(){function n(n){if(!n)throw new Error("storage must not be null");this.storage=n}return n.prototype.load=function(){var t=this.storage.read(o.FileType.CampaignStates),n,i;if(!t)return[];try{return n=JSON.parse(t),i=[],n&&n.CampaignStates&&n.CampaignStates.forEach(function(n){var t=l.deserialize(n);t&&i.push(t)}),i}catch(r){return h.FloodgateEngine.getTelemetryLogger().log_Event(s.TelemetryEvent.FileBasedCampaignStateProvider.Load.Failed,{ErrorMessage:"Json parsing/deserializing failed. "+r.toString()+".  Input:"+t}),[]}},n.prototype.save=function(n){var t,i;n&&(t=new y,t.CampaignStates=n,i=JSON.stringify(t),this.storage.write(o.FileType.CampaignStates,i))},n}();i.FileBasedCampaignStateProvider=e},{"../Api/IFloodgateStorageProvider":7,"../Constants":16,"../FloodgateEngine":17,"../StateProviderHelpers":25,"../Utils":38}],15:[function(n,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var u=n("../SurveyEvents"),o=n("../Surveys/FpsSurvey"),s=n("../Surveys/NlqsSurvey"),f=n("../Surveys/NpsSurvey"),h=n("../Surveys/SurveyDataSource"),e=n("../Utils"),r=n("./CampaignDefinitionProvider"),c=function(){function n(){}return n.makeSurvey=function(t,i,u,e,h){return!t||!u||!e?null:u instanceof r.CampaignSurveyTemplateNps5PointStatic?f.make5Point(n.makeSurveyDataSourceData(t,i,u,h),e):u instanceof r.CampaignSurveyTemplateNps11PointStatic?f.make11Point(n.makeSurveyDataSourceData(t,i,u,h),e):u instanceof r.CampaignSurveyTemplateFps?o.makeFps(n.makeSurveyDataSourceData(t,i,u,h),e,u):u instanceof r.CampaignSurveyTemplateNlqs?s.makeNlqs(n.makeSurveyDataSourceData(t,i,u,h),e,u):u instanceof r.CampaignSurveyTemplateNps?f.makeCustom(n.makeSurveyDataSourceData(t,i,u,h),e,u):null},n.makeSurveyDataSourceData=function(t,i,r,u){if(!t||!r)return null;var f=new h.SurveyDataSourceData;return f.activationEvent=n.makeEvent(t,r.activationEvent),f.id=t.LastSurveyId,f.backEndIdentifier=t.CampaignId,f.expirationTimeUtc=e.dateToShortUtcString(t.LastSurveyExpirationTimeUtc),f.governedChannelType=i,f.startTimeUtc=e.dateToShortUtcString(t.LastSurveyStartTimeUtc),f.additionalDataRequested=u||[],f},n.makeCountedActivityEventData=function(n){if(!n)return null;var t=new u.CountedActivityEventData;return t.activity=n.activity,t.count=n.count,t.isAggregate=n.isAggregate,t},n.makeCountedActivityEvent=function(t,i){if(!t||!i)return null;var r=n.makeCountedActivityEventData(i);return r?new u.CountedActivityEvent(r):null},n.makeCountedActivitySequenceEvent=function(t,i){var r,f,e,s,o;if(!t||!i)return null;for(r=new u.CountedActivitySequenceEventData,r.sequence=[],f=0,e=i.sequence;f<e.length;f++){if(s=e[f],o=n.makeCountedActivityEventData(s),!o)return null;r.sequence.push(o)}return new u.CountedActivitySequenceEvent(r)},n.makeEvent=function(t,i){return i instanceof r.CampaignSurveyEventCountedActivity?n.makeCountedActivityEvent(t,i):i instanceof r.CampaignSurveyEventCountedActivitySequence?n.makeCountedActivitySequenceEvent(t,i):null},n}();i.CampaignSurveyFactory=c},{"../SurveyEvents":30,"../Surveys/FpsSurvey":34,"../Surveys/NlqsSurvey":35,"../Surveys/NpsSurvey":36,"../Surveys/SurveyDataSource":37,"../Utils":38,"./CampaignDefinitionProvider":12}],16:[function(n,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function n(){}var f,e,o,s,h,c,t,l,a,i,v,y,p,w,b,k,r,d,g,nt,tt,u,it,rt;return n.CampaignState=(f=function(){function n(){}return n}(),f.Deserialize=(e=function(){function n(){}return n}(),e.Failed="FloodgateCore_CampaignState_Deserialize_Failed",e),f),n.FileBasedCampaignStateProvider=(o=function(){function n(){}return n}(),o.Load=(s=function(){function n(){}return n}(),s.Failed="FloodgateCore_FileBasedCampaignStateProvider_Load_Failed",s),o),n.HostBasedCampaignStateProvider=(h=function(){function n(){}return n}(),h.GetStatesFromHost=(c=function(){function n(){}return n}(),c.Failed="FloodgateCore_HostBasedCampaignStateProvider_GetStatesFromHost_Failed",c),h),n.FloodgateEngine=(t=function(){function n(){}return n}(),t.Make=(l=function(){function n(){}return n}(),l.Failed="FloodgateCore_FloodgateEngine_Make_Failed",l),t.Start=(a=function(){function n(){}return n}(),a.Failed="FloodgateCore_FloodgateEngine_Start_Failed",a),t.OnSurveyActivated=(i=function(){function n(){}return n}(),i.ActivationStatsSuppressedSurvey="FloodgateCore_FloodgateEngine_OnSurveyActivated_ActivationStatsSuppressedSurvey",i.ClosedChannelType="FloodgateCore_FloodgateEngine_OnSurveyActivated_ClosedChannelType",i),t),n.GovernedChannelState=(v=function(){function n(){}return n}(),v.Deserialize=(y=function(){function n(){}return n}(),y.Failed="FloodgateCore_GovernedChannelState_Deserialize_Failed",y),v),n.FileBasedGovernedChannelStateProvider=(p=function(){function n(){}return n}(),p.Load=(w=function(){function n(){}return n}(),w.Failed="FloodgateCore_FileBasedGovernedChannelStateProvider_Load_Failed",w),p),n.HostBasedGovernedChannelStateProvider=(b=function(){function n(){}return n}(),b.GetStatesFromHost=(k=function(){function n(){}return n}(),k.Failed="FloodgateCore_HostBasedGovernedChannelStateProvider_GetStatesFromHost_Failed",k),b),n.SurveyStatCollectionActivation=(r=function(){function n(){}return n}(),r.FromJson=(d=function(){function n(){}return n}(),d.Failed="FloodgateCore_SurveyStatCollectionActivation_FromJson_Failed",d),r.ToJson=(g=function(){function n(){}return n}(),g.Failed="FloodgateCore_SurveyStatCollectionActivation_ToJson_Failed",g),r),n.HostBasedSurveyActivationStatsProvider=(nt=function(){function n(){}return n}(),nt.GetSurveyStatsFromHost=(tt=function(){function n(){}return n}(),tt.Failed="FloodgateCore_HostBasedSurveyActivationStatsProvider_GetSurveyStatsFromHost_Failed",tt),nt),n.SurveyStatCollectionEventActivity=(u=function(){function n(){}return n}(),u.FromJson=(it=function(){function n(){}return n}(),it.Failed="FloodgateCore_SurveyStatCollectionEventActivity_FromJson_Failed",it),u.ToJson=(rt=function(){function n(){}return n}(),rt.Failed="FloodgateCore_SurveyStatCollectionEventActivity_ToJson_Failed",rt),u),n}();i.TelemetryEvent=r},{}],17:[function(n,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=n("./Api/IFloodgateStorageProvider"),s=n("./Campaign/CampaignDefinitionProvider"),h=n("./Campaign/CampaignManager"),c=n("./Campaign/CampaignStateProvider"),f=n("./Constants"),o=n("./FloodgateSettings"),l=n("./GovernedChannel"),a=n("./GovernedChannelStateProvider"),v=n("./Governor"),y=n("./SurveyActivityListener"),e=n("./SurveyStatCollectionActivation"),u=n("./SurveyStatCollectionEventActivity"),p=function(){function n(){}return n.prototype.log_TriggerMet=function(){},n.prototype.log_UserSelected=function(){},n.prototype.log_CampaignLoad_Failed=function(){},n.prototype.log_Event=function(){},n}(),w=function(){function n(n,t,i,r,u,f,e){if(this.candidateSurveys={},this.launchedSurveys={},this.launchedLaunchers=[],!n)throw new Error("surveyClient must not be null");if(!t)throw new Error("activityListener must not be null");if(!i)throw new Error("launcherFactory must not be null");if(!r)throw new Error("onSurveyActivatedCallback must not be null");if(!u)throw new Error("storage must not be null");if(!f)throw new Error("governor must not be null");this.surveyClient=n;this.activityListener=t;this.launcherFactory=i;this.onSurveyActivatedCallback=r;this.storage=u;this.governor=f;this.surveyActivationStatsProvider=e;this.started=!1;this.loggedFirstStart=!1;this.setPendingSurveys(null);this.activityListener.clearSurveys();var o=this;this.activityListener.setCallback({run:function(n){o.onSurveyActivated(n)}})}return n.setTelemetryLogger=function(t){if(!t)throw new Error("telemetryLogger must not be null");n.telemetryLogger=t},n.getTelemetryLogger=function(){return n.telemetryLogger},n.make=function(t,i,r,u,o,l,p){try{var w=a.GovernedChannelStateProviderFactory.make(u,o),b=e.SurveyActivationStatsProviderFactory.make(u,o),k=c.CampaignStateProviderFactory.make(u,o);return new n(new h.CampaignManager(k,new s.FileSystemCampaignDefinitionProvider(u),l,p,t,new Date),new y({run:function(){}}),i,r,u,new v.Governor(w),b)}catch(d){this.telemetryLogger.log_Event(f.TelemetryEvent.FloodgateEngine.Make.Failed,{ErrorMessage:d.toString()})}},n.prototype.mergeAndSave=function(){this.saveSettings();this.saveSurveyActivationHistory();this.saveSurveyEventActivityHistory();this.surveyClient.saveCurrentState();this.governor.saveChannelStates()},n.prototype.start=function(){if(!this.started)try{this.floodgateSettings=o.FloodgateSettings.fromJson(this.readString(r.FileType.FloodgateSettings));this.previousSurveyActivationStats=this.surveyActivationStatsProvider.load();this.previousSurveyEventActivityStats=u.SurveyStatCollectionEventActivity.fromJson(this.readString(r.FileType.SurveyEventActivityStats));var i=this.governor.getAvailableChannelData(),t=[];i.forEach(function(n){n&&t.push(n.getType())});this.surveyClient.refreshSurveyDefinitions(t);this.setPendingSurveys(this.surveyClient.getAppSurveys());this.updateActivityListenerWithCurrentSurveyDefinitions();this.started=!0;this.loggedFirstStart||(this.loggedFirstStart=!0,this.getActivityListener().logActivity("FloodgateFirstStart"))}catch(e){n.getTelemetryLogger().log_Event(f.TelemetryEvent.FloodgateEngine.Start.Failed,{ErrorMessage:e.toString()})}},n.prototype.stop=function(){this.started&&(this.mergeAndSave(),this.setPendingSurveys(null),this.updateActivityListenerWithCurrentSurveyDefinitions(),this.started=!1)},n.prototype.getActivityListener=function(){return this.activityListener},n.prototype.saveSettings=function(){this.storage.fileLock(r.FileType.FloodgateSettings);try{this.writeString(r.FileType.FloodgateSettings,o.FloodgateSettings.toJson(this.floodgateSettings))}finally{this.storage.fileUnlock(r.FileType.FloodgateSettings)}},n.prototype.saveSurveyActivationHistory=function(){var t,u,f,n,i;this.storage.fileLock(r.FileType.SurveyActivationStats);try{t=this.surveyActivationStatsProvider.load();u=new e.SurveyStatCollectionActivation;for(f in this.launchedSurveys)this.launchedSurveys.hasOwnProperty(f)&&(n=new e.SurveyActivationStats,i=this.launchedSurveys[f],n.Type=i.getType(),n.ExpirationTimeUtc=i.getSurveyInfo().getExpirationTimeUtc(),n.ActivationTimeUtc=new Date,u.addStats(i.getSurveyInfo().getId(),n));t.accumulate(u);this.surveyActivationStatsProvider.save(t);this.previousSurveyActivationStats=t}finally{this.storage.fileUnlock(r.FileType.SurveyActivationStats)}},n.prototype.saveSurveyEventActivityHistory=function(){var f;this.storage.fileLock(r.FileType.SurveyEventActivityStats);try{var n=u.SurveyStatCollectionEventActivity.fromJson(this.readString(r.FileType.SurveyEventActivityStats)),e=new Date,i=new u.SurveyStatCollectionEventActivity,o=function(n){var f,o,h,r,s;if(t.candidateSurveys.hasOwnProperty(n)){if((f=new u.SurveyEventActivityStats,o=t.candidateSurveys[n],!o.getSurveyInfo().isActiveForDate(e))||(f.ExpirationTimeUtc=o.getSurveyInfo().getExpirationTimeUtc(),h=o.getSurveyInfo().getActivationEvent().getTrackingSet(),r=[],h.getList().forEach(function(n){n&&n.getIsAggregate()&&r.push(n.getActivity())}),r.length===0))return"continue";for(f.Counts=new Array(r.length),s=0;s<r.length;s++)f.Counts[s]=t.activityListener.moveSessionCountIntoBaseCount(r[s]);i.addStats(o.getSurveyInfo().getId(),f)}},t=this;for(f in this.candidateSurveys)o(f);n.accumulate(i);this.writeString(r.FileType.SurveyEventActivityStats,u.SurveyStatCollectionEventActivity.toJson(n));this.previousSurveyEventActivityStats=n}finally{this.storage.fileUnlock(r.FileType.SurveyEventActivityStats)}},n.prototype.setPendingSurveys=function(n){this.candidateSurveys=n?n:{}},n.prototype.updateActivityListenerWithCurrentSurveyDefinitions=function(){var r=[],i,t;for(i in this.candidateSurveys)if(this.candidateSurveys.hasOwnProperty(i)){if(t=this.candidateSurveys[i],this.previousSurveyActivationStats.getBySurveyId(t.getSurveyInfo().getId()))continue;if(!t.getSurveyInfo().isActiveForDate(new Date))continue;n.telemetryLogger.log_UserSelected(t.getSurveyInfo().getBackEndId(),t.getSurveyInfo().getId(),t.getType());r.push(t)}this.activityListener.setSurveys(r,this.previousSurveyEventActivityStats)},n.prototype.onSurveyActivated=function(t){var r,i,u;if(n.telemetryLogger.log_TriggerMet(t.getSurveyInfo().getBackEndId(),t.getSurveyInfo().getId(),t.getType()),r=!1,i=t.getSurveyInfo().getGovernedChannelType(),this.candidateSurveys[t.getSurveyInfo().getId()]&&t.getSurveyInfo().isActiveForDate(new Date)&&(this.governor.refreshChannelData(),this.governor.isChannelOpen(i)?(u=this.surveyActivationStatsProvider.load(),u.getBySurveyId(t.getSurveyInfo().getId())?n.getTelemetryLogger().log_Event(f.TelemetryEvent.FloodgateEngine.OnSurveyActivated.ActivationStatsSuppressedSurvey,{CampaignId:t.getSurveyInfo().getBackEndId(),SurveyId:t.getSurveyInfo().getId()}):Object.keys(this.launchedSurveys).length===0&&(this.launchedSurveys[t.getSurveyInfo().getId()]=t,r=!0)):n.getTelemetryLogger().log_Event(f.TelemetryEvent.FloodgateEngine.OnSurveyActivated.ClosedChannelType,{ClosedChannelType:l.GovernedChannelType[i]})),this.mergeAndSave(),this.activityListener.clearSurveys(),r){this.governor.startChannelCooldown(i);this.surveyClient.onSurveyActivated(t.getSurveyInfo());this.launchLauncher(t)}},n.prototype.readString=function(n){return this.storage.read(n)},n.prototype.writeString=function(n,t){this.storage.write(n,t)},n.prototype.launchLauncher=function(n){var t=this.launcherFactory.makeSurveyLauncher(n);if(t){this.launchedLaunchers.push(t);this.onSurveyActivatedCallback.onSurveyActivated(t)}},n.telemetryLogger=new p,n}();i.FloodgateEngine=w},{"./Api/IFloodgateStorageProvider":7,"./Campaign/CampaignDefinitionProvider":12,"./Campaign/CampaignManager":13,"./Campaign/CampaignStateProvider":14,"./Constants":16,"./FloodgateSettings":18,"./GovernedChannel":19,"./GovernedChannelStateProvider":20,"./Governor":21,"./SurveyActivityListener":26,"./SurveyStatCollectionActivation":32,"./SurveyStatCollectionEventActivity":33}],18:[function(n,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function n(){}return n.toJson=function(n){return JSON.stringify(n)},n.fromJson=function(n){return JSON.parse(n)},n}();i.FloodgateSettings=r},{}],19:[function(n,t,i){"use strict";var r,u,f;Object.defineProperty(i,"__esModule",{value:!0});r=n("./Utils"),function(n){n[n.Standard=0]="Standard";n[n.Urgent=1]="Urgent"}(u=i.GovernedChannelType||(i.GovernedChannelType={})),function(n){function t(){return n.Standard}n.getDefault=t}(u=i.GovernedChannelType||(i.GovernedChannelType={}));f=function(){function n(n,t,i,f){if(!r.isEnumValue(n,u))throw new Error("type is not a valid GovernedChannelType");if(!t)throw new Error("name must not be null or empty");if(i<0)throw new Error("cooldownSeconds must not be negative");this.type=n;this.name=t;this.cooldownSeconds=i;this.setCooldownStartTime(f)}return n.prototype.setCooldownStartTime=function(n){if(this.cooldownStartTime=n,r.isNullOrUndefined(this.cooldownStartTime)){this.cooldownEndTime=r.getDistantPast();return}this.cooldownSeconds!==0&&(this.cooldownEndTime=r.addSecondsWithoutOverflow(this.cooldownStartTime,this.cooldownSeconds))},n.prototype.isOpen=function(){return this.isOpenAtDate(new Date)},n.prototype.isOpenAtDate=function(n){return n?n>this.cooldownEndTime:!1},n.prototype.getType=function(){return this.type},n.prototype.getName=function(){return this.name},n.prototype.getCooldownSeconds=function(){return this.cooldownSeconds},n.prototype.getCooldownStartTime=function(){return this.cooldownStartTime},n.prototype.getCooldownEndTime=function(){return this.cooldownEndTime},n}();i.GovernedChannel=f},{"./Utils":38}],20:[function(n,t,i){"use strict";var a,v,l,e;Object.defineProperty(i,"__esModule",{value:!0});var y=n("./Api/IFloodgateStorageProvider"),o=n("./Constants"),s=n("./FloodgateEngine"),p=n("./GovernedChannel"),f=n("./StateProviderHelpers"),r=n("./Utils"),u=y.FileType,h=f.StateListType,c=function(){function n(n,t){if(this.ChannelType=n,this.CooldownStartTimeUtc=t,!this.validate())throw new Error("Constructor arguments are not valid");}return n.deserialize=function(t){var i;if(!t)return null;try{i=new n(t.ChannelType,t.CooldownStartTimeUtc)}catch(r){return s.FloodgateEngine.getTelemetryLogger().log_Event(o.TelemetryEvent.GovernedChannelState.Deserialize.Failed,{ErrorMessage:r.toString()}),null}return i},n.prototype.validate=function(){return r.isEnumValue(this.ChannelType,p.GovernedChannelType)?(r.isUtcDatetimeString(this.CooldownStartTimeUtc)?this.CooldownStartTimeUtc=r.stringToDate(this.CooldownStartTimeUtc):(r.isNullOrUndefined(this.CooldownStartTimeUtc)||!r.isDate(this.CooldownStartTimeUtc))&&(this.CooldownStartTimeUtc=r.getDistantPast()),!0):!1},n.prototype.getType=function(){return this.ChannelType},n.prototype.getCooldownStartTime=function(){return this.CooldownStartTimeUtc},n}();i.GovernedChannelState=c;a=function(){function n(){}return n.make=function(n,t){return t?new l(n,t):new e(n)},n}();i.GovernedChannelStateProviderFactory=a;v=function(){function n(){}return n}();l=function(){function n(n,t){if(!t)throw new Error("host-based storage must not be null");this.hostBasedStorage=t;n&&(this.fileBasedStateProvider=new e(n))}return n.prototype.load=function(){var i=this.getStatesFromHost(),n,t;return this.fileBasedStateProvider&&(n=this.fileBasedStateProvider.load()),t=f.MergeAndUpdateGovernedChannelStates(n,i),t.find(h.Merged)},n.prototype.save=function(n){var r=this;if(n){var e=this.getStatesFromHost(),t=f.MergeAndUpdateGovernedChannelStates(n,e),i=t.find(h.ToBeUpdated),o=t.find(h.Merged);i&&i.forEach(function(n){var t=f.makeSettingItemValue(JSON.stringify(n));r.hostBasedStorage.upsertSettingItem(u[u.GovernedChannelStates],String(n.getType()),t)});this.fileBasedStateProvider&&this.fileBasedStateProvider.save(o)}},n.prototype.getStatesFromHost=function(){var r=[],n=this.hostBasedStorage.readSettingList(u[u.GovernedChannelStates]),t,i;for(t in n)if(n.hasOwnProperty(t)){var l=n[t],e=f.extractSettingItemValueSubString(l),h={};try{h=JSON.parse(e);i=c.deserialize(h);i&&r.push(i)}catch(a){s.FloodgateEngine.getTelemetryLogger().log_Event(o.TelemetryEvent.HostBasedGovernedChannelStateProvider.GetStatesFromHost.Failed,{ErrorMessage:"Json parsing/deserializing failed. "+a.toString()+".  Input:"+e})}}return r},n}();i.HostBasedGovernedChannelStateProvider=l;e=function(){function n(n){if(!n)throw new Error("storage must not be null");this.storage=n}return n.prototype.load=function(){var t=this.storage.read(u.GovernedChannelStates),n,i;if(!t)return[];try{return n=JSON.parse(t),i=[],n&&n.ChannelStates&&n.ChannelStates.forEach(function(n){var t=c.deserialize(n);t&&i.push(t)}),i}catch(r){return s.FloodgateEngine.getTelemetryLogger().log_Event(o.TelemetryEvent.FileBasedGovernedChannelStateProvider.Load.Failed,{ErrorMessage:"Json parsing/deserializing failed. "+r.toString()+".  Input:"+t}),[]}},n.prototype.save=function(n){var t,i;n&&(t=new v,t.ChannelStates=n,i=JSON.stringify(t),this.storage.write(u.GovernedChannelStates,i))},n}();i.FileBasedGovernedChannelStateProvider=e},{"./Api/IFloodgateStorageProvider":7,"./Constants":16,"./FloodgateEngine":17,"./GovernedChannel":19,"./StateProviderHelpers":25,"./Utils":38}],21:[function(n,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=n("./GovernedChannel"),e=n("./GovernedChannelStateProvider"),u=n("./Utils"),f=function(){function n(n,t){this.name=n;this.cooldownSeconds=t}return n}(),o=function(){function n(n){if(!n)throw new Error("channelStateProvider must not be null");this.channelStateProvider=n;this.loadChannels()}return n.prototype.refreshChannelData=function(){this.loadChannels()},n.prototype.getAvailableChannelData=function(){var i=[],n,t;for(n in this.channels)this.channels.hasOwnProperty(n)&&(t=this.channels[n],t.isOpen()&&i.push(t));return i},n.prototype.isChannelOpen=function(n){if(u.isNullOrUndefined(n))throw new Error("type must not be null");return this.channels[n].isOpen()},n.prototype.startChannelCooldown=function(n,t){if(u.isNullOrUndefined(n))throw new Error("type must not be null");t=t?t:new Date;this.channels[n].setCooldownStartTime(t);this.saveChannelStates()},n.prototype.saveChannelStates=function(){var i=[],n,t,r;for(n in this.channels)this.channels.hasOwnProperty(n)&&(t=this.channels[n],r=new e.GovernedChannelState(t.getType(),t.getCooldownStartTime()),i.push(r));this.channelStateProvider.save(i)},n.prototype.loadChannels=function(){var i,t,u,f;this.loadChannelStatesFromProvider();for(i in r.GovernedChannelType)if(r.GovernedChannelType.hasOwnProperty(i)){if(t=Number(i),isNaN(t)||this.channels[t])continue;u=n.defaultChannelData[t];f=new r.GovernedChannel(t,u.name,u.cooldownSeconds,null);this.channels[t]=f}},n.prototype.loadChannelStatesFromProvider=function(){var t,i;this.channels=[];t=this.channelStateProvider.load();for(i in t)if(t.hasOwnProperty(i)){var u=t[i],f=u.getType(),e=n.defaultChannelData[f],o=new r.GovernedChannel(f,e.name,e.cooldownSeconds,u.getCooldownStartTime());this.channels[o.getType()]=o}},n.minute=60,n.hour=60*n.minute,n.day=24*n.hour,n.defaultChannelData=[new f(r.GovernedChannelType[r.GovernedChannelType.Standard],14*n.day),new f(r.GovernedChannelType[r.GovernedChannelType.Urgent],0),],n}();i.Governor=o},{"./GovernedChannel":19,"./GovernedChannelStateProvider":20,"./Utils":38}],22:[function(n,t){"use strict";var i;(function(n){var t;(function(n){n[n.CountedActivity="CountedActivity"]="CountedActivity";n[n.CountedActivitySequence="CountedActivitySequence"]="CountedActivitySequence"})(t=n.Type||(n.Type={}))})(i||(i={}));t.exports=i},{}],23:[function(n,t){"use strict";var i;(function(n){var t,i;(function(n){n[n.Default="Default"]="Default";n[n.Notification="Notification"]="Notification";n[n.Modal="Modal"]="Modal"})(t=n.LaunchType||(n.LaunchType={})),function(n){n[n.EmailAddress=0]="EmailAddress"}(i=n.AdditionalDataType||(n.AdditionalDataType={}));n.DOM_TYPE_TAGNAME="Type";n.DOM_TYPE_VALUE="Survey";n.DOM_ID_TAGNAME="SurveyID";n.JSON_SURVEY_KEYNAME="survey";n.JSON_ID_KEYNAME="surveyId"})(i||(i={}));t.exports=i},{}],24:[function(n,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function n(){}return n}();i.IndexedTracker=r},{}],25:[function(n,t,i){"use strict";function s(n){if(!n)return n;var t=n.indexOf(f)+f.length,i=n.indexOf(e);return t<0||i<0?n:n.substring(t,i)}function h(n){return n?f+n+e:f+e}function c(n,t){var i=new u,f,e;return!n&&!t?i:n?t?(f=[],e=[],n&&n.forEach(function(n){for(var u=-1,i,r=0;r<t.length;r++)if(i=t[r],i.getType()===n.getType()){u=r;break}if(u===-1){f.push(n);e.push(n);return}n.getCooldownStartTime()>i.getCooldownStartTime()?(f.push(n),e.push(n)):f.push(i);t.splice(u,1)}),t&&t.forEach(function(n){f.push(n)}),i.add(r.Merged,f),e.length>0&&i.add(r.ToBeUpdated,e),i):(i.add(r.Merged,n),i.add(r.ToBeUpdated,n),i):(i.add(r.Merged,t),i)}function l(n,t){var i=new u,f,e;return!n&&!t?i:n?t?(f=[],e=[],n&&n.forEach(function(n){for(var o=new Date,r=-1,i,u=0;u<t.length;u++)if(i=t[u],i.CampaignId===n.CampaignId){r=u;break}if(r===-1){f.push(n);e.push(n);return}if(i.LastCooldownEndTimeUtc>o){f.push(i);t.splice(r,1);return}if(n.LastCooldownEndTimeUtc>o){f.push(n);e.push(n);t.splice(r,1);return}n.getCooldownStartDate()>i.getCooldownStartDate()||n.getCooldownStartDate()===i.getCooldownStartDate()&&n.LastNominationTimeUtc>i.LastNominationTimeUtc?(f.push(n),e.push(n)):f.push(i);t.splice(r,1)}),t&&t.forEach(function(n){f.push(n)}),i.add(r.Merged,f),e.length>0&&i.add(r.ToBeUpdated,e),i):(i.add(r.Merged,n),i.add(r.ToBeUpdated,n),i):(i.add(r.Merged,t),i)}function a(n,t){var f=new u,l,v,i,a,y;if(!n&&!t)return f;if(!n)return f.add(r.Merged,t),f;if(!t)return f.add(r.Merged,n),f.add(r.ToBeUpdated,n),f;var h=new o.SurveyStatCollectionActivation,c=new o.SurveyStatCollectionActivation,e=n.getStats(),s=t.getStats();for(i in e)if(e.hasOwnProperty(i)){if(l=s[i],!l){h.addStats(i,e[i]);c.addStats(i,e[i]);continue}v=e[i];v.ActivationTimeUtc>l.ActivationTimeUtc?(h.addStats(i,e[i]),c.addStats(i,e[i])):h.addStats(i,s[i]);delete s[i]}for(i in s)s.hasOwnProperty(i)&&h.addStats(i,s[i]);f.add(r.Merged,h);a=c.getStats();for(y in a)if(a.hasOwnProperty(y)){f.add(r.ToBeUpdated,c);break}return f}var o,r,u,f,e;Object.defineProperty(i,"__esModule",{value:!0});o=n("../src/SurveyStatCollectionActivation"),function(n){n[n.Merged=0]="Merged";n[n.ToBeUpdated=1]="ToBeUpdated"}(r=i.StateListType||(i.StateListType={}));u=function(){function n(){this.items={};this.itemCount=0}return n.prototype.add=function(n,t){this.items[n]||this.itemCount++;this.items[n]=t},n.prototype.find=function(n){return this.items[n]},n.prototype.remove=function(n){var t=this.items[n];return t&&(delete this.items[n],this.itemCount--),t},n.prototype.count=function(){return this.itemCount},n}();i.ItemCollection=u;i.extractSettingItemValueSubString=s;i.makeSettingItemValue=h;i.MergeAndUpdateGovernedChannelStates=c;i.MergeAndUpdateCampaignStates=l;i.MergeAndUpdateSurveyActivationStats=a;f="<data>";e="<\/data>"},{"../src/SurveyStatCollectionActivation":32}],26:[function(n,t){"use strict";var r=n("./ActivityTracker"),u=n("./IndexedTracker"),f=n("./SurveyStatCollectionEventActivity"),i=function(){function n(n){if(!n)throw new Error("callback must not be null");this.trackedActivityMap={};this.callback=n}return n.prototype.logActivity=function(t,i){i===void 0&&(i=1);this.logActivity_private(t,n.LogActionType.Increment,i,null)},n.prototype.logActivityStartTime=function(t,i){this.logActivity_private(t,n.LogActionType.StartTime,0,i)},n.prototype.logActivityStopTime=function(t,i){this.logActivity_private(t,n.LogActionType.StopTime,0,i)},n.prototype.setSurveys=function(n,t){var s,h,p,c,b,a,g,e,v,y,nt,tt,o;if(t===void 0&&(t=new f.SurveyStatCollectionEventActivity),n&&n.length!==0&&t){for(s={},h=0,p=n;h<p.length;h++){var w=p[h],i=w.getSurveyInfo().getActivationEvent().getTrackingSet(),it=!1;for(c=0,b=i.getList();c<b.length;c++)if(e=b[c],s.hasOwnProperty(e.getActivity())){it=!0;break}if(!it){var k=t.getBySurveyId(w.getSurveyInfo().getId()),d=[i.getList().length],rt=new Array(i.getList().length),ut=0,l=0;for(a=0,g=i.getList();a<g.length;a++)e=g[a],d[l]=0,e.getIsAggregate()&&k&&ut<k.Counts.length&&(d[l]=k.Counts[ut++]),rt[l]=this.trackedActivityMap[e.getActivity()],l++;for(v=new r(i),v.initCounts(d,rt,!1),y=0,nt=v.generateActivityIndexList();y<nt.length;y++)tt=nt[y],o=new u.IndexedTracker,o.index=tt.index,o.survey=w,o.tracker=v,s[tt.activity]=o}}this.copyObject(this.trackedActivityMap,s)}},n.prototype.clearSurveys=function(){var n=this;Object.getOwnPropertyNames(this.trackedActivityMap).forEach(function(t){delete n.trackedActivityMap[t]})},n.prototype.getCount=function(n){var t;return(t=this.trackedActivityMap[n],!t)?0:t.tracker.getCount(t.index)},n.prototype.getSessionCount=function(n){var t;return(t=this.trackedActivityMap[n],!t)?0:t.tracker.getSessionCount(t.index)},n.prototype.moveSessionCountIntoBaseCount=function(n){var t;return(t=this.trackedActivityMap[n],!t)?0:t.tracker.moveSessionCountIntoBaseCount(t.index)},n.prototype.getSurvey=function(n){var t;return(t=this.trackedActivityMap[n],!t)?null:t.survey},n.prototype.setCallback=function(n){this.callback=n},n.prototype.logActivity_private=function(t,i,u,f){var e,o;if(e=this.trackedActivityMap[t],e){switch(i){case n.LogActionType.StartTime:e.tracker.startTime(e.index,f);return;case n.LogActionType.StopTime:u=e.tracker.stopTime(e.index,f);case n.LogActionType.Increment:break;default:return}o=e.tracker.incrementActivity(e.index,u);o===r.IncrementResult.AllActivitiesActivated&&this.executeCallback(e.survey)}},n.prototype.executeCallback=function(n){this.callback.run(n)},n.prototype.copyObject=function(n,t){Object.keys(t).forEach(function(i){n[i]=t[i]})},n}();(function(n){var t;(function(n){n[n.Increment=0]="Increment";n[n.StartTime=1]="StartTime";n[n.StopTime=2]="StopTime"})(t=n.LogActionType||(n.LogActionType={}))})(i||(i={}));t.exports=i},{"./ActivityTracker":2,"./IndexedTracker":24,"./SurveyStatCollectionEventActivity":33}],27:[function(n,t){"use strict";var i=n("./../Api/ISurveyComponent"),r=function(){function n(n){if(!n)throw new Error("data must not be null");if(!n.question)throw new Error("data.question must not be null or empty");this.data=n;this.userComment=""}return n.make=function(t){try{return new n(t)}catch(i){return null}},n.prototype.getType=function(){return i.Type.Comment},n.prototype.getQuestion=function(){return this.data.question},n.prototype.setSubmittedText=function(n){this.userComment=n},n.prototype.getSubmittedText=function(){return this.userComment},n.prototype.getDomElements=function(n){if(!n)throw new Error("Document must not be null");var t=n.createElement(i.DOM_COMMENT_TAGNAME);return t.appendChild(n.createTextNode(this.getSubmittedText())),[t]},n.prototype.getJsonElements=function(){var n={};return n[i.JSON_COMMENT_KEYNAME]=this.getSubmittedText(),n},n}();(function(n){var t=function(){function n(){}return n}();n.CommentComponentData=t})(r||(r={}));t.exports=r},{"./../Api/ISurveyComponent":11}],28:[function(n,t){"use strict";var i=n("./../Api/IPromptComponent"),r=n("./../Api/ISurveyComponent"),u=function(){function n(n){if(!n)throw new Error("data must not be null");if(!n.question)throw new Error("data.question must not be null or empty");if(!n.title)throw new Error("data.title must not be null or empty");if(!n.yesButtonLabel)throw new Error("data.yesButtonLabel must not be null or empty");if(!n.noButtonLabel)throw new Error("data.noButtonLabel must not be null or empty");this.data=n;this.selectedButton=i.PromptButton.Unselected}return n.make=function(t){try{return new n(t)}catch(i){return null}},n.prototype.getType=function(){return r.Type.Prompt},n.prototype.getTitle=function(){return this.data.title},n.prototype.getQuestion=function(){return this.data.question},n.prototype.getYesButtonText=function(){return this.data.yesButtonLabel},n.prototype.getNoButtonText=function(){return this.data.noButtonLabel},n.prototype.setButtonSelected=function(n){n&&(this.selectedButton=n)},n.prototype.getButtonSelected=function(){return this.selectedButton},n.prototype.getDomElements=function(n){if(!n)throw new Error("Document must not be null");var t=n.createElement(r.DOM_PROMPT_TAGNAME);return t.appendChild(n.createTextNode(this.promptButtonToString(this.getButtonSelected()))),[t]},n.prototype.getJsonElements=function(){var n={};return n[r.JSON_PROMPT_KEYNAME]=this.promptButtonToString(this.getButtonSelected()),n},n.prototype.promptButtonToString=function(n){switch(n){case i.PromptButton.Unselected:return"Unselected";case i.PromptButton.Yes:return"Yes";case i.PromptButton.No:return"No";default:return"Unknown"}},n}();(function(n){var t=function(){function n(){}return n}();n.PromptComponentData=t})(u||(u={}));t.exports=u},{"./../Api/IPromptComponent":9,"./../Api/ISurveyComponent":11}],29:[function(n,t){"use strict";var i=n("./../Api/ISurveyComponent"),r=function(){function n(n){if(!n)throw new Error("data must not be null");if(!n.question)throw new Error("data.question must not be null or empty");if(!n.ratingValuesAscending||n.ratingValuesAscending.length<2)throw new Error("data.ratingValuesAscending must not be null or have less than two choices");n.ratingValuesAscending.forEach(function(n){if(!n)throw new Error("rating values must not contain null or empty");});this.data=n;this.selectedIndex=-1}return n.make=function(t){try{return new n(t)}catch(i){return null}},n.prototype.getType=function(){return i.Type.Rating},n.prototype.getQuestion=function(){return this.data.question},n.prototype.getRatingValuesAscending=function(){return this.data.ratingValuesAscending},n.prototype.getSelectedRating=function(){return this.isRatingIndexValid(this.selectedIndex)?this.data.ratingValuesAscending[this.selectedIndex]:""},n.prototype.setSelectedRatingIndex=function(n){this.selectedIndex=this.isRatingIndexValid(n)?n:-1},n.prototype.getSelectedRatingIndex=function(){return this.selectedIndex},n.prototype.getDomElements=function(n){if(!n)throw new Error("Document must not be null");var t=n.createElement(i.DOM_RATING_TAGNAME);return this.isRatingIndexValid(this.getSelectedRatingIndex())?t.appendChild(n.createTextNode(this.getNormalizedRatingScore().toFixed(6))):t.appendChild(n.createTextNode("Not rated")),[t]},n.prototype.getJsonElements=function(){var n={};return n[i.JSON_RATING_KEYNAME]=this.isRatingIndexValid(this.getSelectedRatingIndex())?this.getNormalizedRatingScore():"Not rated",n},n.prototype.isRatingIndexValid=function(n){return n>=0&&n<this.data.ratingValuesAscending.length},n.prototype.getNormalizedRatingScore=function(){return this.isRatingIndexValid(this.getSelectedRatingIndex())?this.data.isZeroBased?this.selectedIndex/(this.data.ratingValuesAscending.length-1):(this.selectedIndex+1)/this.data.ratingValuesAscending.length:0},n}();(function(n){var t=function(){function n(){}return n}();n.RatingComponentData=t})(r||(r={}));t.exports=r},{"./../Api/ISurveyComponent":11}],30:[function(n,t,i){"use strict";var o,s,h;Object.defineProperty(i,"__esModule",{value:!0});var r=n("./ActivityTrackingData"),u=n("./ActivityTrackingSet"),f=n("./ISurveyEvent"),e=function(){function n(n){if(!n)throw new Error("data must not be null");if(n.count<=0)throw new Error("count must be greater than 0");if(!n.activity||n.activity.length===0)throw new Error("activity must not be null or an empty string");this.data=n}return n.make=function(t){try{return new n(t)}catch(i){return null}},n.prototype.getActivity=function(){return this.data.activity},n.prototype.getCount=function(){return this.data.count},n.prototype.isAggregate=function(){return this.data.isAggregate},n.prototype.getType=function(){return f.Type.CountedActivity},n.prototype.getTrackingSet=function(){var n=[];return n.push(new r.ActivityTrackingData(this.data.activity,this.data.count,this.data.isAggregate)),new u.ActivityTrackingSet(!1,n)},n}();i.CountedActivityEvent=e;o=function(){function n(){}return n}();i.CountedActivityEventData=o;s=function(){function n(n){var t,i,r;if(!n)throw new Error("data must not be null");if(!n.sequence)throw new Error("data.sequence must not be null");if(n.sequence.length===0)throw new Error("data.sequence size must be greater than 0");for(this.data=[],t=0,i=n.sequence;t<i.length;t++)r=i[t],this.data.push(new e(r))}return n.make=function(t){try{return new n(t)}catch(i){return null}},n.prototype.getSequence=function(){return this.data},n.prototype.getType=function(){return f.Type.CountedActivitySequence},n.prototype.getTrackingSet=function(){for(var n,i=[],t=0,f=this.data;t<f.length;t++)n=f[t],i.push(new r.ActivityTrackingData(n.getActivity(),n.getCount(),n.isAggregate()));return new u.ActivityTrackingSet(!0,i)},n}();i.CountedActivitySequenceEvent=s;h=function(){function n(){}return n.prototype.CountedActivitySequenceEventData=function(){},n}();i.CountedActivitySequenceEventData=h},{"./ActivityTrackingData":3,"./ActivityTrackingSet":4,"./ISurveyEvent":22}],31:[function(n,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function n(){this.Surveys={};this.Surveys={}}return n.prototype.addStats=function(n,t){this.Surveys[n]=t},n.prototype.getBySurveyId=function(n){return this.Surveys[n]},n.prototype.getStats=function(){return this.Surveys},n}();i.SurveyStatCollection=r},{}],32:[function(n,t,i){"use strict";var y=this&&this.__extends||function(){var 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])};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)}}(),v,a,h,c;Object.defineProperty(i,"__esModule",{value:!0});var l=n("./Api/IFloodgateStorageProvider"),u=l.FileType,p=n("./Api/ISurvey"),o=n("./Constants"),s=n("./FloodgateEngine"),r=n("./StateProviderHelpers"),w=n("./SurveyStatCollection"),f=n("./Utils"),e=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return y(t,n),t.fromJson=function(n){var i=new t,r;if(!n)return s.FloodgateEngine.getTelemetryLogger().log_Event(o.TelemetryEvent.SurveyStatCollectionActivation.FromJson.Failed,{ErrorMessage:"Input json is null or empty."}),i;try{r=JSON.parse(n)}catch(u){return s.FloodgateEngine.getTelemetryLogger().log_Event(o.TelemetryEvent.SurveyStatCollectionActivation.FromJson.Failed,{ErrorMessage:"Json parsing failed. "+u.toString()}),i}return i.deserialize(r)?i:new t},t.toJson=function(n){return n||(s.FloodgateEngine.getTelemetryLogger().log_Event(o.TelemetryEvent.SurveyStatCollectionActivation.ToJson.Failed,{ErrorMessage:"Input json is null or empty."}),n=new t),JSON.stringify(n)},t.prototype.accumulate=function(n){var t,i;if(n){t=n.getStats();for(i in t)t.hasOwnProperty(i)&&this.addStats(i,t[i])}},t.prototype.deserialize=function(n){var r=n.Surveys,u=new Date,t,i;for(t in r)r.hasOwnProperty(t)&&(i=new c,i.deserialize(r[t])&&i.ExpirationTimeUtc>u&&this.addStats(t,i));return this.validate()},t.prototype.validate=function(){return f.isObject(this.getStats())},t}(w.SurveyStatCollection);i.SurveyStatCollectionActivation=e;v=function(){function n(){}return n.make=function(n,t){return t?new a(n,t):new h(n)},n}();i.SurveyActivationStatsProviderFactory=v;a=function(){function n(n,t){if(!t)throw new Error("host-based storage must not be null");this.hostBasedStorage=t;n&&(this.fileBasedStorageProvider=new h(n))}return n.prototype.load=function(){var i=this.getSurveyStatsFromHost(),n=new e,t;return this.fileBasedStorageProvider&&(n=this.fileBasedStorageProvider.load()),t=r.MergeAndUpdateSurveyActivationStats(n,i),t.find(r.StateListType.Merged)},n.prototype.save=function(n){var t,i,o;if(n){var s=this.getSurveyStatsFromHost(),f=r.MergeAndUpdateSurveyActivationStats(n,s),e=f.find(r.StateListType.ToBeUpdated),h=f.find(r.StateListType.Merged);if(e){t=e.getStats();for(i in t)t.hasOwnProperty(i)&&(o=r.makeSettingItemValue(JSON.stringify(t[i])),this.hostBasedStorage.upsertSettingItem(u[u.SurveyActivationStats],i,o))}this.fileBasedStorageProvider&&this.fileBasedStorageProvider.save(h)}},n.prototype.getSurveyStatsFromHost=function(){var f=new e,t=this.hostBasedStorage.readSettingList(u[u.SurveyActivationStats]),n,a;for(n in t)if(t.hasOwnProperty(n)){var h=r.extractSettingItemValueSubString(t[n]),i=new c,l=void 0;try{l=JSON.parse(h);i.deserialize(l)}catch(v){s.FloodgateEngine.getTelemetryLogger().log_Event(o.TelemetryEvent.HostBasedSurveyActivationStatsProvider.GetSurveyStatsFromHost.Failed,{ErrorMessage:"Json parsing/deserializing failed. "+v.toString()+".  Input:"+h})}a=new Date;i.ExpirationTimeUtc<=a?this.hostBasedStorage.deleteSettingItem(u[u.SurveyActivationStats],n):f.addStats(n,i)}return f},n}();i.HostBasedSurveyActivationStatsProvider=a;h=function(){function n(n){if(!n)throw new Error("storage must not be null");this.storage=n}return n.prototype.load=function(){var n=this.storage.read(l.FileType.SurveyActivationStats);return n?e.fromJson(n):new e},n.prototype.save=function(n){if(n){var t=e.toJson(n);this.storage.write(l.FileType.SurveyActivationStats,t)}},n}();i.FileBasedSurveyActivationStatsProvider=h;c=function(){function n(){}return n.prototype.deserialize=function(n){return this.ActivationTimeUtc=n.ActivationTimeUtc,this.ExpirationTimeUtc=n.ExpirationTimeUtc,this.Type=n.Type,this.validate()},n.prototype.validate=function(){if(f.isUtcDatetimeString(this.ActivationTimeUtc))this.ActivationTimeUtc=f.stringToDate(this.ActivationTimeUtc);else return!1;if(f.isUtcDatetimeString(this.ExpirationTimeUtc))this.ExpirationTimeUtc=f.stringToDate(this.ExpirationTimeUtc);else return!1;return f.isEnumValue(this.Type,p.Type)},n}();i.SurveyActivationStats=c},{"./Api/IFloodgateStorageProvider":7,"./Api/ISurvey":10,"./Constants":16,"./FloodgateEngine":17,"./StateProviderHelpers":25,"./SurveyStatCollection":31,"./Utils":38}],33:[function(n,t,i){"use strict";var o=this&&this.__extends||function(){var 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])};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)}}(),u;Object.defineProperty(i,"__esModule",{value:!0});var f=n("./Constants"),e=n("./FloodgateEngine"),s=n("./SurveyStatCollection"),r=n("./Utils"),h=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return o(t,n),t.fromJson=function(n){var i=new t,r;if(!n)return e.FloodgateEngine.getTelemetryLogger().log_Event(f.TelemetryEvent.SurveyStatCollectionEventActivity.FromJson.Failed,{ErrorMessage:"Input json is null or empty."}),i;try{r=JSON.parse(n)}catch(u){return e.FloodgateEngine.getTelemetryLogger().log_Event(f.TelemetryEvent.SurveyStatCollectionEventActivity.FromJson.Failed,{ErrorMessage:"Json parsing failed. "+u.toString()}),i}return i.deserialize(r)?i:new t},t.toJson=function(n){return n||(e.FloodgateEngine.getTelemetryLogger().log_Event(f.TelemetryEvent.SurveyStatCollectionEventActivity.ToJson.Failed,{ErrorMessage:"Input json is null or empty."}),n=new t),JSON.stringify(n)},t.prototype.accumulate=function(n){var r,i,t,e,f;if(n){r=n.getStats();for(i in r)if(r.hasOwnProperty(i))for(t=this.getBySurveyId(i),t||(t=new u,t.Counts=[],this.addStats(i,t)),t.ExpirationTimeUtc=r[i].ExpirationTimeUtc,t.Counts.length<r[i].Counts.length&&(e=t.Counts.slice(),t.Counts=e),f=0;f<r[i].Counts.length;f++)t.Counts[f]||(t.Counts[f]=0),t.Counts[f]+=r[i].Counts[f]}},t.prototype.deserialize=function(n){var r=n.Surveys,f=new Date,t,i;for(t in r)r.hasOwnProperty(t)&&(i=new u,i.deserialize(r[t])&&i.ExpirationTimeUtc>f&&this.addStats(t,i));return this.validate()},t.prototype.validate=function(){return r.isObject(this.getStats())},t}(s.SurveyStatCollection);i.SurveyStatCollectionEventActivity=h;u=function(){function n(){}return n.prototype.deserialize=function(n){return this.ExpirationTimeUtc=n.ExpirationTimeUtc,this.Counts=n.Counts,this.validate()},n.prototype.validate=function(){var n,t;if(!this.Counts)return!1;for(n=0;n<this.Counts.length;n++){if(t=this.Counts[n],!r.isNumber(t))return!1;t<0&&(this.Counts[n]=0)}if(r.isUtcDatetimeString(this.ExpirationTimeUtc))this.ExpirationTimeUtc=r.stringToDate(this.ExpirationTimeUtc);else return!1;return!0},n}();i.SurveyEventActivityStats=u},{"./Constants":16,"./FloodgateEngine":17,"./SurveyStatCollection":31,"./Utils":38}],34:[function(n,t){"use strict";var f=n("../Api/ISurvey"),r=n("../Api/ISurveyComponent"),e=n("../SurveyComponents/CommentComponent"),o=n("../SurveyComponents/PromptComponent"),s=n("../SurveyComponents/RatingComponent"),i=n("../Utils"),h=n("./SurveyDataSource"),u=function(){function n(n){if(i.isNullOrUndefined(n))throw new Error("data must not be null");this.surveyInfo=new h(n.baseData);this.prompt=new o(n.promptData);this.question=new e(n.commentData);this.rating=new s(n.ratingData)}return n.make=function(t){try{return new n(t)}catch(i){return null}},n.makeFps=function(t,r,u){var l,h,f,c,a,y,v;if(i.isNullOrUndefined(t)||i.isNullOrUndefined(r)||i.isNullOrUndefined(u)||(l=[],h=u.content,i.isNullOrUndefined(h)||i.isNullOrUndefined(h.comment)||i.isNullOrUndefined(h.prompt)||i.isNullOrUndefined(h.rating)))return null;for(f=new n.FpsSurveyData,f.baseData=t,f.promptData=new o.PromptComponentData,f.ratingData=new s.RatingComponentData,f.commentData=new e.CommentComponentData,f.promptData.title=r.getCustomString(h.prompt.title),f.promptData.question=r.getCustomString(h.prompt.question),f.promptData.yesButtonLabel=r.getCustomString(h.prompt.yesLabel),f.promptData.noButtonLabel=r.getCustomString(h.prompt.noLabel),f.ratingData.question=r.getCustomString(h.rating.question),f.ratingData.isZeroBased=h.rating.isZeroBased,f.commentData.question=r.getCustomString(h.comment.question),c=0,a=h.rating.ratingValuesAscending;c<a.length;c++){if(y=a[c],v=r.getCustomString(y),i.isNullOrUndefined(v))return null;l.push(v)}return(f.ratingData.ratingValuesAscending=l,i.isNullOrUndefined(f.ratingData.question)||i.isNullOrUndefined(f.commentData.question)||i.isNullOrUndefined(f.promptData.title)||i.isNullOrUndefined(f.promptData.question)||i.isNullOrUndefined(f.promptData.yesButtonLabel)||i.isNullOrUndefined(f.promptData.noButtonLabel)||i.isNullOrUndefined(f.ratingData.ratingValuesAscending))?null:this.make(f)},n.prototype.getType=function(){return f.Type.Fps},n.prototype.getSurveyInfo=function(){return this.surveyInfo},n.prototype.getCommentComponent=function(){return this.question},n.prototype.getPromptComponent=function(){return this.prompt},n.prototype.getRatingComponent=function(){return this.rating},n.prototype.getComponent=function(n){switch(n){case r.Type.Comment:return this.getCommentComponent();case r.Type.Prompt:return this.getPromptComponent();case r.Type.Rating:return this.getRatingComponent();default:return null}},n.prototype.getDomElements=function(n){if(i.isNullOrUndefined(n))throw new Error("Document must not be null");var t=n.createElement(f.DOM_FPS_TAGNAME);return this.getSurveyInfo().getDomElements(n).forEach(function(n){i.isNullOrUndefined(n)||t.appendChild(n)}),this.getCommentComponent().getDomElements(n).forEach(function(n){i.isNullOrUndefined(n)||t.appendChild(n)}),this.getRatingComponent().getDomElements(n).forEach(function(n){i.isNullOrUndefined(n)||t.appendChild(n)}),[t]},n.prototype.getJsonElements=function(){var n={};return n=i.overrideValues(this.getSurveyInfo().getJsonElements(),n),n=i.overrideValues(this.getCommentComponent().getJsonElements(),n),i.overrideValues(this.getRatingComponent().getJsonElements(),n)},n}();(function(n){var t=function(){function n(){}return n}();n.FpsSurveyData=t})(u||(u={}));t.exports=u},{"../Api/ISurvey":10,"../Api/ISurveyComponent":11,"../SurveyComponents/CommentComponent":27,"../SurveyComponents/PromptComponent":28,"../SurveyComponents/RatingComponent":29,"../Utils":38,"./SurveyDataSource":37}],35:[function(n,t){"use strict";var f=n("../Api/ISurvey"),r=n("../Api/ISurveyComponent"),e=n("../SurveyComponents/CommentComponent"),o=n("../SurveyComponents/PromptComponent"),s=n("../SurveyComponents/RatingComponent"),i=n("../Utils"),h=n("./SurveyDataSource"),u=function(){function n(n){if(i.isNullOrUndefined(n))throw new Error("data must not be null");this.surveyInfo=new h(n.baseData);this.prompt=new o(n.promptData);this.question=new e(n.commentData);this.rating=new s(n.ratingData)}return n.make=function(t){try{return new n(t)}catch(i){return null}},n.makeNlqs=function(t,r,u){var l,h,f,c,a,y,v;if(i.isNullOrUndefined(t)||i.isNullOrUndefined(r)||i.isNullOrUndefined(u)||(l=[],h=u.content,i.isNullOrUndefined(h)||i.isNullOrUndefined(h.comment)||i.isNullOrUndefined(h.prompt)||i.isNullOrUndefined(h.rating)))return null;for(f=new n.NlqsSurveyData,f.baseData=t,f.promptData=new o.PromptComponentData,f.ratingData=new s.RatingComponentData,f.commentData=new e.CommentComponentData,f.promptData.title=r.getCustomString(h.prompt.title),f.promptData.question=r.getCustomString(h.prompt.question),f.promptData.yesButtonLabel=r.getCustomString(h.prompt.yesLabel),f.promptData.noButtonLabel=r.getCustomString(h.prompt.noLabel),f.ratingData.question=r.getCustomString(h.rating.question),f.ratingData.isZeroBased=h.rating.isZeroBased,f.commentData.question=r.getCustomString(h.comment.question),c=0,a=h.rating.ratingValuesAscending;c<a.length;c++){if(y=a[c],v=r.getCustomString(y),i.isNullOrUndefined(v))return null;l.push(v)}return(f.ratingData.ratingValuesAscending=l,i.isNullOrUndefined(f.ratingData.question)||i.isNullOrUndefined(f.commentData.question)||i.isNullOrUndefined(f.promptData.title)||i.isNullOrUndefined(f.promptData.question)||i.isNullOrUndefined(f.promptData.yesButtonLabel)||i.isNullOrUndefined(f.promptData.noButtonLabel)||i.isNullOrUndefined(f.ratingData.ratingValuesAscending))?null:this.make(f)},n.prototype.getType=function(){return f.Type.Nlqs},n.prototype.getSurveyInfo=function(){return this.surveyInfo},n.prototype.getCommentComponent=function(){return this.question},n.prototype.getPromptComponent=function(){return this.prompt},n.prototype.getRatingComponent=function(){return this.rating},n.prototype.getComponent=function(n){switch(n){case r.Type.Comment:return this.getCommentComponent();case r.Type.Prompt:return this.getPromptComponent();case r.Type.Rating:return this.getRatingComponent();default:return null}},n.prototype.getDomElements=function(n){if(i.isNullOrUndefined(n))throw new Error("Document must not be null");var t=n.createElement(f.DOM_NLQS_TAGNAME);return this.getSurveyInfo().getDomElements(n).forEach(function(n){i.isNullOrUndefined(n)||t.appendChild(n)}),this.getCommentComponent().getDomElements(n).forEach(function(n){i.isNullOrUndefined(n)||t.appendChild(n)}),this.getRatingComponent().getDomElements(n).forEach(function(n){i.isNullOrUndefined(n)||t.appendChild(n)}),[t]},n.prototype.getJsonElements=function(){var n={};return n=i.overrideValues(this.getSurveyInfo().getJsonElements(),n),n=i.overrideValues(this.getCommentComponent().getJsonElements(),n),i.overrideValues(this.getRatingComponent().getJsonElements(),n)},n}();(function(n){var t=function(){function n(){}return n}();n.NlqsSurveyData=t})(u||(u={}));t.exports=u},{"../Api/ISurvey":10,"../Api/ISurveyComponent":11,"../SurveyComponents/CommentComponent":27,"../SurveyComponents/PromptComponent":28,"../SurveyComponents/RatingComponent":29,"../Utils":38,"./SurveyDataSource":37}],36:[function(n,t){"use strict";var i=n("../Api/IFloodgateStringProvider"),h=n("../Api/ISurvey"),o=n("../Api/ISurveyComponent"),u=n("../SurveyComponents/CommentComponent"),f=n("../SurveyComponents/PromptComponent"),e=n("../SurveyComponents/RatingComponent"),r=n("../Utils"),c=n("./SurveyDataSource"),s=function(){function n(n){if(!n)throw new Error("data must not be null");this.surveyInfo=new c(n.baseData);this.prompt=new f(n.promptData);this.question=new u(n.commentData);this.rating=new e(n.ratingData)}return n.make=function(t){try{return new n(t)}catch(i){return null}},n.makeCustom=function(t,i,o){var l,h,s,c,a,y,v;if(r.isNullOrUndefined(t)||r.isNullOrUndefined(i)||r.isNullOrUndefined(o)||(l=[],h=o.content,r.isNullOrUndefined(h)||r.isNullOrUndefined(h.comment)||r.isNullOrUndefined(h.prompt)||r.isNullOrUndefined(h.rating)))return null;for(s=new n.NpsSurveyData,s.baseData=t,s.promptData=new f.PromptComponentData,s.ratingData=new e.RatingComponentData,s.commentData=new u.CommentComponentData,s.promptData.title=i.getCustomString(h.prompt.title),s.promptData.question=i.getCustomString(h.prompt.question),s.promptData.yesButtonLabel=i.getCustomString(h.prompt.yesLabel),s.promptData.noButtonLabel=i.getCustomString(h.prompt.noLabel),s.ratingData.question=i.getCustomString(h.rating.question),s.ratingData.isZeroBased=h.rating.isZeroBased,s.commentData.question=i.getCustomString(h.comment.question),c=0,a=h.rating.ratingValuesAscending;c<a.length;c++){if(y=a[c],v=i.getCustomString(y),r.isNullOrUndefined(v))return null;l.push(v)}return(s.ratingData.ratingValuesAscending=l,r.isNullOrUndefined(s.ratingData.question)||r.isNullOrUndefined(s.commentData.question)||r.isNullOrUndefined(s.promptData.title)||r.isNullOrUndefined(s.promptData.question)||r.isNullOrUndefined(s.promptData.yesButtonLabel)||r.isNullOrUndefined(s.promptData.noButtonLabel)||r.isNullOrUndefined(s.ratingData.ratingValuesAscending))?null:this.make(s)},n.make5Point=function(t,r){var o,s;return!t||!r?null:(o=new n.NpsSurveyData,o.baseData=t,o.ratingData=new e.RatingComponentData,o.ratingData.isZeroBased=!1,o.commentData=new u.CommentComponentData,o.promptData=new f.PromptComponentData,o.ratingData.question=r.loadStringResource(i.StringType.NpsRatingQuestion),o.commentData.question=r.loadStringResource(i.StringType.NpsCommentQuestion),o.promptData.title=r.loadStringResource(i.StringType.NpsPromptTitle),o.promptData.question=r.loadStringResource(i.StringType.NpsPromptQuestion),o.promptData.yesButtonLabel=r.loadStringResource(i.StringType.NpsPromptYesLabel),o.promptData.noButtonLabel=r.loadStringResource(i.StringType.NpsPromptNotNowLabel),s=new Array(5),s[0]=r.loadStringResource(i.StringType.Nps5RatingValue1),s[1]=r.loadStringResource(i.StringType.Nps5RatingValue2),s[2]=r.loadStringResource(i.StringType.Nps5RatingValue3),s[3]=r.loadStringResource(i.StringType.Nps5RatingValue4),s[4]=r.loadStringResource(i.StringType.Nps5RatingValue5),!o.ratingData.question||!o.commentData.question||!o.promptData.title||!o.promptData.question||!o.promptData.yesButtonLabel||!o.promptData.noButtonLabel||!s[0]||!s[1]||!s[2]||!s[3]||!s[4])?null:(o.ratingData.ratingValuesAscending=s,this.make(o))},n.make11Point=function(t,r){var s,o;return!t||!r?null:(s=new n.NpsSurveyData,s.baseData=t,s.ratingData=new e.RatingComponentData,s.ratingData.isZeroBased=!0,s.commentData=new u.CommentComponentData,s.promptData=new f.PromptComponentData,s.ratingData.question=r.loadStringResource(i.StringType.NpsRatingQuestion),s.commentData.question=r.loadStringResource(i.StringType.NpsCommentQuestion),s.promptData.title=r.loadStringResource(i.StringType.NpsPromptTitle),s.promptData.question=r.loadStringResource(i.StringType.NpsPromptQuestion),s.promptData.yesButtonLabel=r.loadStringResource(i.StringType.NpsPromptYesLabel),s.promptData.noButtonLabel=r.loadStringResource(i.StringType.NpsPromptNotNowLabel),o=new Array(11),o[0]=r.loadStringResource(i.StringType.Nps11RatingValue0),o[1]=r.loadStringResource(i.StringType.Nps11RatingValue1),o[2]=r.loadStringResource(i.StringType.Nps11RatingValue2),o[3]=r.loadStringResource(i.StringType.Nps11RatingValue3),o[4]=r.loadStringResource(i.StringType.Nps11RatingValue4),o[5]=r.loadStringResource(i.StringType.Nps11RatingValue5),o[6]=r.loadStringResource(i.StringType.Nps11RatingValue6),o[7]=r.loadStringResource(i.StringType.Nps11RatingValue7),o[8]=r.loadStringResource(i.StringType.Nps11RatingValue8),o[9]=r.loadStringResource(i.StringType.Nps11RatingValue9),o[10]=r.loadStringResource(i.StringType.Nps11RatingValue10),!s.ratingData.question||!s.commentData.question||!s.promptData.title||!s.promptData.question||!s.promptData.yesButtonLabel||!s.promptData.noButtonLabel||!o[0]||!o[1]||!o[2]||!o[3]||!o[4]||!o[5]||!o[6]||!o[7]||!o[8]||!o[9]||!o[10])?null:(s.ratingData.ratingValuesAscending=o,this.make(s))},n.prototype.getType=function(){return h.Type.Nps},n.prototype.getSurveyInfo=function(){return this.surveyInfo},n.prototype.getCommentComponent=function(){return this.question},n.prototype.getPromptComponent=function(){return this.prompt},n.prototype.getRatingComponent=function(){return this.rating},n.prototype.getComponent=function(n){switch(n){case o.Type.Comment:return this.getCommentComponent();case o.Type.Prompt:return this.getPromptComponent();case o.Type.Rating:return this.getRatingComponent();default:return null}},n.prototype.getDomElements=function(n){if(!n)throw new Error("Document must not be null");var t=n.createElement(h.DOM_NPS_TAGNAME);return this.getSurveyInfo().getDomElements(n).forEach(function(n){n&&t.appendChild(n)}),this.getCommentComponent().getDomElements(n).forEach(function(n){n&&t.appendChild(n)}),this.getRatingComponent().getDomElements(n).forEach(function(n){n&&t.appendChild(n)}),[t]},n.prototype.getJsonElements=function(){var n={};return n=r.overrideValues(this.getSurveyInfo().getJsonElements(),n),n=r.overrideValues(this.getCommentComponent().getJsonElements(),n),r.overrideValues(this.getRatingComponent().getJsonElements(),n)},n}();(function(n){var t=function(){function n(){}return n}();n.NpsSurveyData=t})(s||(s={}));t.exports=s},{"../Api/IFloodgateStringProvider":8,"../Api/ISurvey":10,"../Api/ISurveyComponent":11,"../SurveyComponents/CommentComponent":27,"../SurveyComponents/PromptComponent":28,"../SurveyComponents/RatingComponent":29,"../Utils":38,"./SurveyDataSource":37}],37:[function(n,t){"use strict";var f=n("../GovernedChannel"),r=n("../ISurveyInfo"),i=n("../Utils"),u=function(){function n(n){if(i.isNullOrUndefined(n))throw new Error("data must not be null");if(i.isNullOrUndefined(n.id)||n.id==="")throw new Error("data.id must not be null or empty");if(i.isNullOrUndefined(n.governedChannelType)&&(n.governedChannelType=f.GovernedChannelType.getDefault()),i.isNullOrUndefined(n.expirationTimeUtc)||n.expirationTimeUtc==="")throw new Error("data.expirationTimeUtc must not be null or empty");if(i.isNullOrUndefined(n.activationEvent))throw new Error("data.activationEvent must not be null");(i.isNullOrUndefined(n.backEndIdentifier)||n.backEndIdentifier==="")&&(n.backEndIdentifier=n.id);this.data=n}return n.prototype.getId=function(){return this.data.id},n.prototype.getBackEndId=function(){return this.data.backEndIdentifier},n.prototype.getGovernedChannelType=function(){return this.data.governedChannelType},n.prototype.getRawStartTimeUtc=function(){return this.data.startTimeUtc},n.prototype.getStartTimeUtc=function(){if(i.isNullOrUndefined(this.data.startTimeUtc))return i.getDistantPast();var n=new Date(this.data.startTimeUtc);return i.isDate(n)?n:i.getDistantFuture()},n.prototype.getExpirationTimeUtc=function(){if(i.isNullOrUndefined(this.data.expirationTimeUtc))return i.getDistantPast();var n=new Date(this.data.expirationTimeUtc);return i.isDate(n)?n:i.getDistantPast()},n.prototype.getRawExpirationTimeUtc=function(){return this.data.expirationTimeUtc},n.prototype.isActiveForDate=function(n){return i.isNullOrUndefined(n)?!1:n>=this.getStartTimeUtc()&&n<=this.getExpirationTimeUtc()},n.prototype.getActivationEvent=function(){return this.data.activationEvent},n.prototype.getPreferredLaunchType=function(){return this.data.preferredLaunchType},n.prototype.isAdditionalDataRequested=function(n){for(var r,t=0,i=this.data.additionalDataRequested;t<i.length;t++)if(r=i[t],r===n)return!0;return!1},n.prototype.getDomElements=function(n){var t,i;if(!n)throw new Error("Document must not be null");return t=n.createElement(r.DOM_TYPE_TAGNAME),t.appendChild(n.createTextNode(r.DOM_TYPE_VALUE)),i=n.createElement(r.DOM_ID_TAGNAME),i.appendChild(n.createTextNode(this.getBackEndId())),[t,i]},n.prototype.getJsonElements=function(){var t={},n;return t[r.JSON_ID_KEYNAME]=this.getBackEndId(),n={},n[r.JSON_SURVEY_KEYNAME]=t,n},n}();(function(n){var t=function(){function n(){this.preferredLaunchType=r.LaunchType.Default}return n}();n.SurveyDataSourceData=t})(u||(u={}));t.exports=u},{"../GovernedChannel":19,"../ISurveyInfo":23,"../Utils":38}],38:[function(n,t,i){"use strict";function h(n,t,i){switch(t.toLowerCase()){case"h":case"hour":return new Date(n.getTime()+i*36e5);case"m":case"minute":return new Date(n.getTime()+i*6e4);case"s":case"second":return new Date(n.getTime()+i*1e3);default:throw new Error("Invalid interval value of "+t);}}function u(n){return Object.prototype.toString.call(n)==="[object Date]"&&!isNaN(n.getTime())?!0:!1}function c(n,t){return n in t}function l(n){return n!==null&&!isNaN(n)&&isFinite(n)}function e(n){return n===null||n===undefined}function a(n){return n!==null&&n!==undefined&&typeof n=="object"}function f(n){return typeof n=="string"}function v(n){return typeof n=="boolean"}function y(){return new Date(-116444736e5)}function p(){return new Date(640922112e5)}function w(n,t){if(!n)return null;if(t<0)return o(n,-1*t);var r=n.getTime()+t*1e3;return r<i.MAX_DATE_MILLISECONDS?new Date(r):new Date(i.MAX_DATE_MILLISECONDS)}function o(n,t){if(!n)return null;if(t<0)return t=-t,this.addSecondsWithoutOverflow(n,t);var r=n.getTime()-t*1e3;return r>i.MIN_DATE_MILLISECONDS?new Date(r):new Date(i.MIN_DATE_MILLISECONDS)}function k(n){if(!n)return!1;var t=s(n);return t?t===n:!1}function s(n){if(!n)return null;var t=n.match(b);return!t||t.length<1||!e(t[4])?null:t[0]}function d(){return(r()+r()+"-"+r()+"-4"+r().substr(0,3)+"-"+r()+"-"+r()+r()+r()).toLowerCase()}function r(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}function g(n){var t=Object.keys(n),i,r,u;t.sort();i=[];for(r in t)t.hasOwnProperty(r)&&(u=t[r],i.push(n[u]));return i}function nt(n){if(!f(n))return null;var t=n?new Date(n):null;return u(t)?t:null}function tt(n,t){var r,i;if(!t)return t;if(r=t,n)for(i in n)n.hasOwnProperty(i)&&(r[i]=n[i]);return r}function it(n){if(!f(n))return!1;return/^(\d{4}\-\d\d\-\d\dT\d\d:\d\d:\d\d(\.\d\d\d)?Z)$/.test(n)}function rt(n){function t(n){return n<10?"0"+n:n.toString()}return u(n)?n.getUTCFullYear()+"-"+t(n.getUTCMonth()+1)+"-"+t(n.getUTCDate())+"T"+t(n.getUTCHours())+":"+t(n.getUTCMinutes())+":"+t(n.getUTCSeconds())+"Z":null}Object.defineProperty(i,"__esModule",{value:!0});i.timeAdd=h;i.isDate=u;i.isEnumValue=c;i.isNumber=l;i.isNullOrUndefined=e;i.isObject=a;i.isString=f;i.isBoolean=v;i.getDistantPast=y;i.getDistantFuture=p;i.MAX_DATE_MILLISECONDS=864e13;i.MIN_DATE_MILLISECONDS=-864e13;i.addSecondsWithoutOverflow=w;i.subtractSecondsWithoutOverflow=o;var b="^((?:[a-zA-Z]{2,3}(?:-[a-zA-Z]{3}){0,3})|(?:[a-zA-Z]{4,8}))(?:-([a-zA-Z]{4}))?(?:-([a-zA-Z]{2}|[0-9]{3}))?(-.*)?$";i.isValidLanguageSubTag=k;i.extractLanguageSubtag=s;i.guid=d;i.makeArrayFromObjectValuesSortedByKeyString=g;i.stringToDate=nt;i.overrideValues=tt;i.isUtcDatetimeString=it;i.dateToShortUtcString=rt},{}],39:[function(n,t,i){(function(r,u){(function(n,r){typeof i=="object"&&typeof t!="undefined"?t.exports=r():typeof define=="function"&&define.amd?define(r):n.ES6Promise=r()})(this,function(){"use strict";function wt(n){var t=typeof n;return n!==null&&(t==="object"||t==="function")}function b(n){return typeof n=="function"}function bt(n){d=n}function kt(n){o=n}function ni(){return function(){return r.nextTick(c)}}function ti(){return typeof k!="undefined"?function(){k(c)}:g()}function ii(){var n=0,i=new ct(c),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function ri(){var n=new MessageChannel;return n.port1.onmessage=c,function(){return n.port2.postMessage(0)}}function g(){var n=setTimeout;return function(){return n(c,1)}}function c(){for(var t,i,n=0;n<h;n+=2)t=s[n],i=s[n+1],t(i),s[n]=undefined,s[n+1]=undefined;h=0}function ui(){try{var n=Function("return this")().require("vertx");return k=n.runOnLoop||n.runOnContext,ti()}catch(t){return g()}}function tt(n,t){var u=this,i=new this.constructor(l),r,f;return i[y]===undefined&&yt(i),r=u._state,r?(f=arguments[r-1],o(function(){return vt(r,i,f,u._result)})):rt(u,i,n,t),i}function it(n){var i=this,t;return n&&typeof n=="object"&&n.constructor===i?n:(t=new i(l),w(t,n),t)}function l(){}function fi(){return new TypeError("You cannot resolve a promise with itself")}function ei(){return new TypeError("A promises callback cannot return that same promise.")}function lt(n){try{return n.then}catch(t){return e.error=t,e}}function oi(n,t,i,r){try{n.call(t,i,r)}catch(u){return u}}function si(n,t,r){o(function(n){var u=!1,e=oi(r,t,function(i){u||(u=!0,t!==i?w(n,i):f(n,i))},function(t){u||(u=!0,i(n,t))},"Settle: "+(n._label||" unknown promise"));!u&&e&&(u=!0,i(n,e))},n)}function hi(n,t){t._state===p?f(n,t._result):t._state===v?i(n,t._result):rt(t,undefined,function(t){return w(n,t)},function(t){return i(n,t)})}function at(n,t,r){t.constructor===n.constructor&&r===tt&&t.constructor.resolve===it?hi(n,t):r===e?(i(n,e.error),e.error=null):r===undefined?f(n,t):b(r)?si(n,t,r):f(n,t)}function w(n,t){n===t?i(n,fi()):wt(t)?at(n,t,lt(t)):f(n,t)}function ci(n){n._onerror&&n._onerror(n._result);ut(n)}function f(n,t){n._state===a&&(n._result=t,n._state=p,n._subscribers.length!==0&&o(ut,n))}function i(n,t){n._state===a&&(n._state=v,n._result=t,o(ci,n))}function rt(n,t,i,r){var u=n._subscribers,f=u.length;n._onerror=null;u[f]=t;u[f+p]=i;u[f+v]=r;f===0&&n._state&&o(ut,n)}function ut(n){var i=n._subscribers,f=n._state,t;if(i.length!==0){var r=void 0,u=void 0,e=n._result;for(t=0;t<i.length;t+=3)r=i[t],u=i[t+f],r?vt(f,r,u,e):u(e);n._subscribers.length=0}}function li(n,t){try{return n(t)}catch(i){return e.error=i,e}}function vt(n,t,r,u){var h=b(r),o=void 0,c=void 0,s=void 0,l=void 0;if(h){if(o=li(r,u),o===e?(l=!0,c=o.error,o.error=null):s=!0,t===o){i(t,ei());return}}else o=u,s=!0;t._state!==a||(h&&s?w(t,o):l?i(t,c):n===p?f(t,o):n===v&&i(t,o))}function ai(n,t){try{t(function(t){w(n,t)},function(t){i(n,t)})}catch(r){i(n,r)}}function vi(){return ft++}function yt(n){n[y]=ft++;n._state=undefined;n._result=undefined;n._subscribers=[]}function yi(){return new Error("Array Methods must be provided an Array")}function pi(n){return new pt(this,n).promise}function wi(n){var t=this;return ot(n)?new t(function(i,r){for(var f=n.length,u=0;u<f;u++)t.resolve(n[u]).then(i,r)}):new t(function(n,t){return t(new TypeError("You must pass an array to race."))})}function bi(n){var r=this,t=new r(l);return i(t,n),t}function ki(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");}function di(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");}function gi(){var n=void 0,i,r;if(typeof u!="undefined")n=u;else if(typeof self!="undefined")n=self;else try{n=Function("return this")()}catch(f){throw new Error("polyfill failed because global object is unavailable in this environment");}if(i=n.Promise,i){r=null;try{r=Object.prototype.toString.call(i.resolve())}catch(f){}if(r==="[object Promise]"&&!i.cast)return}n.Promise=t}var et=void 0,s,nt,y,ft,pt,t;et=Array.isArray?Array.isArray:function(n){return Object.prototype.toString.call(n)==="[object Array]"};var ot=et,h=0,k=void 0,d=void 0,o=function(n,t){s[h]=n;s[h+1]=t;h+=2;h===2&&(d?d(c):nt())};var st=typeof window!="undefined"?window:undefined,ht=st||{},ct=ht.MutationObserver||ht.WebKitMutationObserver,dt=typeof self=="undefined"&&typeof r!="undefined"&&{}.toString.call(r)==="[object process]",gt=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";s=new Array(1e3);nt=void 0;nt=dt?ni():ct?ii():gt?ri():st===undefined&&typeof n=="function"?ui():g();y=Math.random().toString(36).substring(2);var a=void 0,p=1,v=2,e={error:null};return ft=0,pt=function(){function n(n,t){this._instanceConstructor=n;this.promise=new n(l);this.promise[y]||yt(this.promise);ot(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),this.length===0?f(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),this._remaining===0&&f(this.promise,this._result))):i(this.promise,yi())}return n.prototype._enumerate=function(n){for(var t=0;this._state===a&&t<n.length;t++)this._eachEntry(n[t],t)},n.prototype._eachEntry=function(n,i){var r=this._instanceConstructor,e=r.resolve,u,f;e===it?(u=lt(n),u===tt&&n._state!==a?this._settledAt(n._state,i,n._result):typeof u!="function"?(this._remaining--,this._result[i]=n):r===t?(f=new r(l),at(f,n,u),this._willSettleAt(f,i)):this._willSettleAt(new r(function(t){return t(n)}),i)):this._willSettleAt(e(n),i)},n.prototype._settledAt=function(n,t,r){var u=this.promise;u._state===a&&(this._remaining--,n===v?i(u,r):this._result[t]=r);this._remaining===0&&f(u,this._result)},n.prototype._willSettleAt=function(n,t){var i=this;rt(n,undefined,function(n){return i._settledAt(p,t,n)},function(n){return i._settledAt(v,t,n)})},n}(),t=function(){function n(t){this[y]=vi();this._result=this._state=undefined;this._subscribers=[];l!==t&&(typeof t!="function"&&ki(),this instanceof n?ai(this,t):di())}return n.prototype.catch=function(n){return this.then(null,n)},n.prototype.finally=function(n){var t=this,i=t.constructor;return b(n)?t.then(function(t){return i.resolve(n()).then(function(){return t})},function(t){return i.resolve(n()).then(function(){throw t;})}):t.then(n,n)},n}(),t.prototype.then=tt,t.all=pi,t.race=wi,t.resolve=it,t.reject=bi,t._setScheduler=bt,t._setAsap=kt,t._asap=o,t.polyfill=gi,t.Promise=t,t})}).call(this,n("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{_process:40}],40:[function(n,t){function c(){throw new Error("setTimeout has not been defined");}function l(){throw new Error("clearTimeout has not been defined");}function a(n){if(r===setTimeout)return setTimeout(n,0);if((r===c||!r)&&setTimeout)return r=setTimeout,setTimeout(n,0);try{return r(n,0)}catch(t){try{return r.call(null,n,0)}catch(t){return r.call(this,n,0)}}}function p(n){if(u===clearTimeout)return clearTimeout(n);if((u===l||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(n);try{return u(n)}catch(t){try{return u.call(null,n)}catch(t){return u.call(this,n)}}}function w(){s&&o&&(s=!1,o.length?f=o.concat(f):h=-1,f.length&&v())}function v(){var t,n;if(!s){for(t=a(w),s=!0,n=f.length;n;){for(o=f,f=[];++h<n;)o&&o[h].run();h=-1;n=f.length}o=null;s=!1;p(t)}}function y(n,t){this.fun=n;this.array=t}function e(){}var i=t.exports={},r,u;(function(){try{r=typeof setTimeout=="function"?setTimeout:c}catch(n){r=c}try{u=typeof clearTimeout=="function"?clearTimeout:l}catch(n){u=l}})();var f=[],s=!1,o,h=-1;i.nextTick=function(n){var i=new Array(arguments.length-1),t;if(arguments.length>1)for(t=1;t<arguments.length;t++)i[t-1]=arguments[t];f.push(new y(n,i));f.length!==1||s||a(v)};y.prototype.run=function(){this.fun.apply(null,this.array)};i.title="browser";i.browser=!0;i.env={};i.argv=[];i.version="";i.versions={};i.on=e;i.addListener=e;i.once=e;i.off=e;i.removeListener=e;i.removeAllListeners=e;i.emit=e;i.prependListener=e;i.prependOnceListener=e;i.listeners=function(){return[]};i.binding=function(){throw new Error("process.binding is not supported");};i.cwd=function(){return"/"};i.chdir=function(){throw new Error("process.chdir is not supported");};i.umask=function(){return 0}},{}],41:[function(n,t,i){"use strict";function a(n){var t=document.createElement("link"),i;t.rel="stylesheet";t.type="text/css";t.href=n;i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(t,i)}function v(n){return new s.Promise(function(t,i){var r=document.createElement("script"),u,f;r.async=!0;r.readyState?r.onreadystatechange=function(){(r.readyState==="loaded"||r.readyState==="complete")&&(r.onreadystatechange=null,t())}:r.onload=function(){t()};r.onerror=function(){i()};r.src=n;u=window.origin;u&&u!=="null"&&(r.crossOrigin="anonymous");f=document.getElementsByTagName("script")[0];f.parentNode.insertBefore(r,f)})}function y(n){h.initialize(n.environment,l,e["default"],n.telemetryGroup?n.telemetryGroup.audienceGroup:undefined,n.appId.toString(),n.sessionId,n.build);c.initialize(n.primaryColour,n.secondaryColour)}function p(n){f.setUIStrings(n)}function w(){return new s.Promise(function(n,t){var i,s;if(u)n();else{if(!r.get().OfficeBrowserFeedback.initOptions){t("Window.OfficeBrowserFeedback.initOptions not set");return}r.get().OfficeBrowserFeedback.sdkVersion=e["default"];o.get().setCommonInitOptions(r.get().OfficeBrowserFeedback.initOptions);i=o.get().getCommonInitOptions();a(i.stylesUrl);s=i.intlUrl+i.locale.toLowerCase()+"/"+i.intlFilename;v(s).then(function(){if(!f.getUIStrings()){t("UiStrings were not loaded from "+s);return}y(i);u=!0;n()})["catch"](function(){t("Script load failed for "+s)})}})}function b(){u=!1}i.__esModule=!0;var f=n("./UIStrings/UIStrings"),e=n("./Version"),o=n("./Configuration/Configuration"),r=n("./Window/Window"),h=n("./Logging/Logging"),c=n("./Theme"),s=n("es6-promise"),l="OfficeFeedbackSDK",u=!1;i.initialize=w;i.reset=b;r.setSetUiStrings(p)},{"./Configuration/Configuration":44,"./Logging/Logging":56,"./Theme":62,"./UIStrings/UIStrings":67,"./Version":87,"./Window/Window":89,"es6-promise":39}],42:[function(n,t,i){"use strict";function v(){return new s.Promise(function(n,t){if(!o["default"].isStorageAvailable()){t("window.localStorage is not available.");return}h?n():l.initialize().then(function(){var i,f;if(r.get().OfficeBrowserFeedback.floodgate=r.get().OfficeBrowserFeedback.floodgate||{},i=r.get().OfficeBrowserFeedback.floodgate.initOptions,i=i||{},i.campaignDefinitions!==undefined){if(f=ut.FilterValidCampaignDefinitions(i.campaignDefinitions),f.error){t("floodgate.initOptions.campaignDefinitions error: "+f.error);return}(new o["default"]).write(ft.IFloodgateStorageProvider.FileType.CampaignDefinitions,JSON.stringify(i.campaignDefinitions))}u.get().setFloodgateInitOptions(r.get().OfficeBrowserFeedback.floodgate.initOptions);a.FloodgateEngine.setTelemetryLogger(new rt["default"]);h=!0;n()})["catch"](function(n){t("Initialization failed: {"+n+"}")})})}function y(){return new s.Promise(function(n,t){try{f=a.FloodgateEngine.make(u.get().getCommonInitOptions().build?u.get().getCommonInitOptions().build:"",new d["default"],u.get().getFloodgateInitOptions().onSurveyActivatedCallback,new o["default"],u.get().getFloodgateInitOptions().settingStorageCallback,new it["default"],new tt["default"]);f.start()}catch(i){t("Failed to start floodgate engine: "+i.toString());return}n()})}function p(){f&&f.stop()}function w(){return f}function c(n){return new s.Promise(function(t,i){if(e){i("Control already open");return}u.get().setFloodgateSurvey(n?n:new nt["default"]);k.createSurvey(function(){e=!1});e=!0;t()})}function b(n){return c(new g["default"](n))}function et(){l.reset();h=!1;e=!1}i.__esModule=!0;var l=n("./App_Common"),k=n("./UI/UI"),u=n("./Configuration/Configuration"),r=n("./Window/Window"),d=n("./FloodgateCore/AdaptiveSurveyLauncherFactory"),g=n("./FloodgateCore/UISurvey/CustomUISurvey"),nt=n("./FloodgateCore/UISurvey/DummyUISurvey"),tt=n("./FloodgateCore/FloodgateEnvironmentProvider"),o=n("./FloodgateCore/FloodgateStorageProvider"),it=n("./FloodgateCore/FloodgateStringProvider"),rt=n("./FloodgateCore/FloodgateTelemetryLogger"),a=n("@ms-ofb/officefloodgatecore"),ut=n("@ms-ofb/officefloodgatecore/dist/src/Campaign/CampaignDefinitionProvider"),ft=n("@ms-ofb/officefloodgatecore/dist/src/Api/Api"),s=n("es6-promise"),h=!1,e=!1,f;i.initialize=v;i.start=y;i.stop=p;i.getEngine=w;i.showSurvey=c;i.showCustomSurvey=b;i.reset=et;r.setFloodgateShowCustomSurvey(b);r.setFloodgateShowSurvey(c);r.setFloodgateGetEngine(w);r.setFloodgateInitialize(v);r.setFloodgateStart(y);r.setFloodgateStop(p)},{"./App_Common":41,"./Configuration/Configuration":44,"./FloodgateCore/AdaptiveSurveyLauncherFactory":46,"./FloodgateCore/FloodgateEnvironmentProvider":47,"./FloodgateCore/FloodgateStorageProvider":48,"./FloodgateCore/FloodgateStringProvider":49,"./FloodgateCore/FloodgateTelemetryLogger":50,"./FloodgateCore/UISurvey/CustomUISurvey":51,"./FloodgateCore/UISurvey/DummyUISurvey":52,"./UI/UI":84,"./Window/Window":89,"@ms-ofb/officefloodgatecore":1,"@ms-ofb/officefloodgatecore/dist/src/Api/Api":5,"@ms-ofb/officefloodgatecore/dist/src/Campaign/CampaignDefinitionProvider":12,"es6-promise":39}],43:[function(n,t,i){"use strict";function h(){return new o.Promise(function(n,t){s?n():c.initialize().then(function(){if(!e.get().OfficeBrowserFeedback.initOptions){t("Window.OfficeBrowserFeedback.initOptions not set");return}u.get().setInAppFeedbackInitOptions(e.get().OfficeBrowserFeedback.initOptions);s=!0;n()})["catch"](function(n){t("Initialization failed: {"+n+"}")})})}function a(n){return new o.Promise(function(t,i){if(r){i("Control already open");return}h().then(function(){u.get().setInAppFeedbackLaunchOptions(n);l.createBellyBandMulti(function(){r=!1});f.getLogger().logEvent(f.EventIds.InApp.UI.Picker.Shown.VALUE,{IsBugEnabled:u.get().getInAppFeedbackInitOptions().bugForm,IsIdeaEnabled:u.get().getInAppFeedbackInitOptions().userVoice!==undefined});r=!0;t()})["catch"](function(n){i("Initialization failed: {"+n+"}")})})}function v(n,t){return new o.Promise(function(i,e){if(r){e("Control already open");return}var o=u.validateFeedbackType(n);h().then(function(){u.get().setInAppFeedbackLaunchOptions(t);l.createBellyBandSingle(function(){r=!1},o);f.getLogger().logEvent(f.EventIds.InApp.UI.Form.Shown.VALUE,{FeedbackType:o});r=!0;i()})["catch"](function(n){e("Initialization failed: {"+n+"}")})})}function y(){c.reset();s=!1;r=!1}var r;i.__esModule=!0;var c=n("./App_Common"),u=n("./Configuration/Configuration"),f=n("./Logging/Logging"),l=n("./UI/UI"),e=n("./Window/Window"),o=n("es6-promise"),s=!1;i.initialize=h;r=!1;i.multiFeedback=a;i.singleFeedback=v;i.reset=y;e.setMultiFeedback(a);e.setSingleFeedback(v)},{"./App_Common":41,"./Configuration/Configuration":44,"./Logging/Logging":56,"./UI/UI":84,"./Window/Window":89,"es6-promise":39}],44:[function(n,t,i){"use strict";function s(){return e}function h(n){if(r.expectString(n,"feedbackType"),n===u.FeedbackType[u.FeedbackType.Smile])return u.FeedbackType.Smile;if(n===u.FeedbackType[u.FeedbackType.Frown])return u.FeedbackType.Frown;if(n===u.FeedbackType[u.FeedbackType.Bug])return u.FeedbackType.Bug;throw"feedbackType should be one of Smile, Frown or Bug";}var e;i.__esModule=!0;var r=n("./../Utils"),u=n("./../Constants"),o=n("./../Localization"),f=function(){function n(){}return n.validateCategoryOptions=function(n){var i,u,t;if(!n)return{show:!1};if(r.expectBoolean(n.show,"categories.show"),n.customCategories)for(r.expectArray(n.customCategories,"categories.customCategories"),i=0,u=n.customCategories;i<u.length;i++)if(t=u[i],r.expectString(t,"custom category '"+t+"'"),t.length>20)throw"custom category '"+t+"' too long, max 20 characters.";return n},n.prototype.getCommonInitOptions=function(){return this.commonInitOptions},n.prototype.getInAppFeedbackInitOptions=function(){return this.inAppFeedbackInitOptions},n.prototype.getInAppFeedbackLaunchOptions=function(){return this.inAppFeedbackLaunchOptions},n.prototype.getFloodgateInitOptions=function(){return this.floodgateInitOptions},n.prototype.getFloodgateSurvey=function(){return this.floodgateSurvey},n.prototype.setCommonInitOptions=function(n){var t,u,i;if(r.expectObject(n,"passedInitOptions"),t={appId:n.appId,applicationGroup:n.applicationGroup||{},build:n.build,cid:n.cid,environment:n.environment,intlFilename:n.intlFilename,intlUrl:n.intlUrl,locale:n.locale,onError:n.onError,originalLocale:n.locale,primaryColour:n.primaryColour,secondaryColour:n.secondaryColour,sessionId:n.sessionId,stylesUrl:n.stylesUrl,telemetryGroup:n.telemetryGroup||{},userEmail:n.userEmail,userEmailConsentDefault:n.userEmailConsentDefault,webGroup:n.webGroup||{}},r.expectNumber(t.appId,"initOptions.appId"),!(t.appId%1==0&&t.appId>0))throw"initOptions.appId is not a positive integer: "+t.appId;if(r.expectString(t.stylesUrl,"initOptions.stylesUrl"),r.expectString(t.intlUrl,"initOptions.intlUrl"),t.intlFilename!==undefined?r.expectString(t.intlFilename,"initOptions.intlFilename"):t.intlFilename="officebrowserfeedbackstrings.js",r.expectNumber(t.environment,"initOptions.environment"),!(t.environment===1||t.environment===0))throw"initOptions.environment has a bad value: "+t.environment;t.userEmail!==undefined&&r.expectString(t.userEmail,"initOptions.userEmail");t.userEmailConsentDefault!==undefined&&r.expectBoolean(t.userEmailConsentDefault,"initOptions.userEmailConsentDefault");t.sessionId!==undefined?r.expectString(t.sessionId,"initOptions.sessionId"):t.sessionId="00000000-0000-0000-0000-000000000000";t.telemetryGroup.processSessionId=t.sessionId;t.cid!==undefined&&(r.expectString(t.cid,"initOptions.cid"),t.applicationGroup.extendedManifestData=JSON.stringify({cid:t.cid}));t.build!==undefined?(r.expectString(t.build,"initOptions.build"),u="^[0-9]{1,9}(\\.[0-9]{1,9})?(\\.[0-9]{1,9})?(\\.[0-9]{1,9})?$",new RegExp(u).test(t.build)||(t.build="0.0.0.0")):t.build="0.0.0.0";t.telemetryGroup.officeBuild=t.build;i=new RegExp("^#[0-9a-f]{3}([0-9a-f]{3})?$","i");t.primaryColour!==undefined&&(i.test(t.primaryColour)||(t.primaryColour=undefined));t.secondaryColour!==undefined&&(i.test(t.secondaryColour)||(t.secondaryColour=undefined));t.locale!==undefined?(r.expectString(t.locale,"initOptions.locale"),t.locale=o.validate(t.locale)):t.locale="en";t.onError===undefined&&(t.onError=function(){return});this.commonInitOptions=t},n.prototype.setInAppFeedbackInitOptions=function(n){r.expectObject(n,"passedInitOptions");var t={bugForm:n.bugForm,onDismiss:n.onDismiss,screenshot:n.screenshot,userEmail:n.userEmail,userVoice:n.userVoice!==undefined?{url:n.userVoice.url}:undefined};t.onDismiss===undefined&&(t.onDismiss=function(){return});t.bugForm!==undefined?r.expectBoolean(t.bugForm,"initOptions.bugForm"):t.bugForm=!1;t.userEmail!==undefined&&r.expectString(t.userEmail,"initOptions.userEmail");t.screenshot!==undefined?r.expectBoolean(t.screenshot,"initOptions.screenshot"):t.screenshot=!0;t.userVoice!==undefined&&(r.expectObject(t.userVoice,"initOptions.userVoice"),r.expectString(t.userVoice.url,"initOptions.userVoice.url"));this.inAppFeedbackInitOptions=t},n.prototype.setInAppFeedbackLaunchOptions=function(t){if(!this.commonInitOptions)throw"commonInitOptions not set";t||(t={});this.commonInitOptions.applicationGroup=r.overrideValues(t.applicationGroup,this.commonInitOptions.applicationGroup);this.commonInitOptions.telemetryGroup=r.overrideValues(t.telemetryGroup,this.commonInitOptions.telemetryGroup);this.commonInitOptions.webGroup=r.overrideValues(t.webGroup,this.commonInitOptions.webGroup);t.categories=n.validateCategoryOptions(t.categories);this.inAppFeedbackLaunchOptions=t},n.prototype.setFloodgateInitOptions=function(n){var t,i;r.expectObject(n,"passedInitOptions");t={autoDismiss:n.autoDismiss,campaignDefinitions:n.campaignDefinitions,onDismiss:n.onDismiss,onSurveyActivatedCallback:n.onSurveyActivatedCallback,settingStorageCallback:n.settingStorageCallback,uIStringGetter:n.uIStringGetter};t.autoDismiss===undefined&&(t.autoDismiss=u.AutoDismissValues.NoAutoDismiss);t.onDismiss===undefined&&(t.onDismiss=function(){return});t.onSurveyActivatedCallback===undefined&&(i={onSurveyActivated:function(n){n.launch()}},t.onSurveyActivatedCallback=i);t.uIStringGetter===undefined&&(t.uIStringGetter=function(n){return n});this.floodgateInitOptions=t},n.prototype.setFloodgateSurvey=function(n){this.floodgateSurvey=n},n}();i.Configuration=f;e=new f;i.get=s;i.validateFeedbackType=h},{"./../Constants":45,"./../Localization":54,"./../Utils":86}],45:[function(n,t,i){"use strict";var r,u,f,e,o,s,l,a,v,h,c;i.__esModule=!0;r=function(){function n(){}return n.AriaLabel="aria-label",n.Class="class",n.DataHtml2CanvasIgnore="data-html2canvas-ignore",n.Disabled="disabled",n.Fill="fill",n.For="for",n.Form="form",n.Height="height",n.HRef="href",n.Id="id",n.MaxLength="maxlength",n.Name="name",n.Placeholder="placeholder",n.Points="points",n.Rel="rel",n.Role="role",n.Source="src",n.Stroke="stroke",n.TabIndex="tabindex",n.Target="target",n.Transform="transform",n.Type="type",n.Value="value",n.ViewBox="viewBox",n.Width="width",n.xlinkHref="xlink:href",n.X="x",n.Y="y",n}();i.AttributeName=r;u=function(){function n(){}return n.BlankWindow="_blank",n.Button="button",n.Checkbox="checkbox",n.Checked="checked",n.False="false",n.Zero="0",n.Polite="polite",n.Radio="radio",n.Submit="submit",n.Text="text",n.TextAreaMaxLength="1000",n.True="true",n.Unchecked="unchecked",n.NoReferrer="noreferrer",n}();i.AttributeValue=u;f=function(){function n(){}return n.CLCID="CLCID",n}();i.UrlParameters=f;e=function(){function n(){}return n.CheckBox="obf-CheckBox",n.FontSubtitle="obf-FontSubtitle",n.FontText="obf-FontText",n.FontSubText="obf-FontSubText",n.FontSubSubText="obf-FontSubSubText",n.Hidden="obf-Hidden",n.Link="obf-Link",n.MarginLeft60px="obf-MarginLeft60px",n.NarrowLayout="obf-NarrowLayout",n.PrivacyStatementLinkDiv="obf-PrivacyStatementLinkDiv",n.Rtl="obf-Rtl",n.Spinner="obf-Spinner",n.SpinnerCircle="obf-SpinnerCircle",n.SubmitButton="obf-SubmitButton",n.TextInput="obf-TextInput",n.Visible="obf-Visible",n.Rating="obf-Rating",n.RatingGraphic="obf-RatingGraphic",n.RatingGraphicFilled="obf-RatingGraphic-Filled",n.ChoiceGroup="obf-ChoiceGroup",n.ChoiceGroupIcon="obf-ChoiceGroupIcon",n.OverallAnchor="obf-OverallAnchor",n.OverallAnchorActive="obf-OverallAnchorActive",n.OverallImage="obf-OverallImage",n.OverallText="obf-OverallText",n.SingleLayout="obf-SingleLayout",n.ShowRightBorder="obf-ShowRightBorder",n.SlideLeft="obf-slideLeft",n.TextAlignLeft="obf-TextAlignLeft",n.FormContainer="obf-FormContainer",n.FormQuestionMiddleText="obf-FormQuestionMiddleText",n.FormMiddleText="obf-FormMiddleText",n.FormCategoriesDropdown="obf-FormCategoriesDropdown",n.FormComment="obf-FormComment",n.FormRatingContainer="obf-FormRatingContainer",n.FormRatingLabel="obf-FormRatingLabel",n.FormRating="obf-FormRating",n.FormEmailInput="obf-FormEmailInput",n.FormBottomContainer="obf-FormBottomContainer",n.FormSubmitButtonContainer="obf-FormSubmitButtonContainer",n.FormScreenshotContainer="obf-FormScreenshotContainer",n.FormScreenshotLabel="obf-FormScreenshotLabel",n.FormScreenshotCheckbox="obf-FormScreenshotCheckbox",n.TFormEmailCheckbox="obf-TFormEmailCheckbox",n.TFormEmailLabel="obf-TFormEmailLabel ",n.EmailCheckBoxLabel="obf-EmailCheckBoxLabel",n.Toast="obf-Toast",n}();i.Classes=e;o=function(){function n(){}return n.ColumnSeparatorDiv="obf-ColumnSeparatorDiv",n.OverallAnchorsContainer="obf-OverallAnchorsContainer",n.OverallFrownAnchor="obf-OverallFrownAnchor",n.OverallFrownDiv="obf-OverallFrownDiv",n.OverallFrownImage="obf-OverallFrownImage",n.OverallFrownText="obf-OverallFrownText",n.OverallSmileAnchor="obf-OverallSmileAnchor",n.OverallSmileDiv="obf-OverallSmileDiv",n.OverallSmileImage="obf-OverallSmileImage",n.OverallSmileText="obf-OverallSmileText",n.OverallIdeaAnchor="obf-OverallIdeaAnchor",n.OverallIdeaDiv="obf-OverallIdeaDiv",n.OverallIdeaImage="obf-OverallIdeaImage",n.OverallIdeaText="obf-OverallIdeaText",n.OverallBugAnchor="obf-OverallBugAnchor",n.OverallBugDiv="obf-OverallBugDiv",n.OverallBugImage="obf-OverallBugImage",n.OverallBugText="obf-OverallBugText",n.QuestionLeftText="obf-QuestionLeftText",n.LeftFormContainer="obf-LeftFormContainer",n.MainContainer="obf-MainContainer",n.MainContentHolder="obf-MainContentHolder",n.MiddleFormContainer="obf-MiddleFormContainer",n.OverlayBackground="obf-OverlayBackground",n.PrivacyStatementLink="obf-PrivacyStatementLink",n.FirstTabbable="obf-FirstTabbable",n.LastTabbable="obf-LastTabbable",n.SingleFormContainer="obf-SingleFormContainer",n.SingleFormQuestionMiddleText="obf-SingleFormQuestionMiddleText",n.SingleFormCategoriesDropdown="obf-SingleFormCategoriesDropdown",n.SingleFormComment="obf-SingleFormComment",n.SingleFormEmailInput="obf-SingleFormEmailInput",n.SingleFormRating="obf-SingleFormRating",n.SingleFormScreenshotCheckbox="obf-SingleFormScreenshotCheckbox",n.SingleFormSubmitButton="obf-SingleFormSubmitButton",n.SingleFormSubmitButtonSpinner="obf-SingleFormSubmitButtonSpinner",n.BasicFormContainer="obf-BasicFormContainer",n.BasicFormQuestionMiddleText="obf-BasicFormQuestionMiddleText",n.BasicFormCategoriesDropdown="obf-BasicFormCategoriesDropdown",n.BasicFormComment="obf-BasicFormComment",n.BasicFormEmailInput="obf-BasicFormEmailInput",n.BasicFormRating="obf-BasicFormRating",n.BasicFormScreenshotCheckbox="obf-BasicFormScreenshotCheckbox",n.BasicFormSubmitButton="obf-BasicFormSubmitButton",n.BasicFormSubmitButtonSpinner="obf-BasicFormSubmitButtonSpinner",n.UserVoiceFormContainer="obf-UserVoiceFormContainer",n.UserVoiceFormGoButton="obf-UserVoiceFormGoButton",n.ToastContainer="obf-ToastContainer",n.ToastCancel="obf-ToastCancel",n.TPromptContainer="obf-TPromptContainer",n.TPromptTitle="obf-TPromptTitle",n.TPromptText="obf-TPromptText",n.TFormContainer="obf-TFormContainer",n.TFormTitle="obf-TFormTitle",n.TFormRating="obf-TFormRating",n.TFormComment="obf-TFormComment",n.TFormEmailTextBox="obf-TFormEmailTextBox",n.TFormEmailCheckBox="obf-TFormEmailCheckBox",n.TFormEmailLabel="obf-TFormEmailLabel",n.TFormSubmitButton="obf-TFormSubmitButton",n.TFormSubmitButtonSpinner="obf-TFormSubmitButtonSpinner",n.TFormSubmitButtonContainer="obf-TFormSubmitButtonContainer",n}();i.IDs=o;s=function(){function n(){}return n.Esc=27,n.Tab=9,n}();i.Keys=s,function(n){n[n.Smile=0]="Smile";n[n.Frown=1]="Frown";n[n.Idea=2]="Idea";n[n.Bug=3]="Bug"}(l=i.FeedbackType||(i.FeedbackType={})),function(n){n[n.Production=0]="Production";n[n.Int=1]="Int"}(a=i.Environment||(i.Environment={})),function(n){n[n.NoAutoDismiss=0]="NoAutoDismiss";n[n.SevenSeconds=1]="SevenSeconds";n[n.FourteenSeconds=2]="FourteenSeconds";n[n.TwentyOneSeconds=3]="TwentyOneSeconds";n[n.TwentyEightSeconds=4]="TwentyEightSeconds"}(v=i.AutoDismissValues||(i.AutoDismissValues={}));h=function(){function n(){}return n.Anchor="A",n.Button="button",n.Defs="defs",n.Div="div",n.FieldSet="fieldset",n.Form="form",n.Img="img",n.Input="input",n.Label="label",n.Legend="legend",n.Option="option",n.Polygon="polygon",n.Select="select",n.Span="span",n.Svg="svg",n.TextArea="textarea",n.Use="use",n}();i.Tags=h;c=function(){function n(){}return n.PrivacyStatementLink="http://go.microsoft.com/fwlink/?LinkID=390004",n}();i.Urls=c},{}],46:[function(n,t,i){"use strict";var r;i.__esModule=!0;var u=n("./../FloodgateCore/UISurvey/UISurvey"),f=n("./../Window/Window"),e=function(){function n(){}return n.prototype.makeSurveyLauncher=function(n){return new r(n)},n}();i["default"]=e;r=function(){function n(n){this.survey=n}return n.prototype.launch=function(){f.get().OfficeBrowserFeedback.floodgate.showSurvey(new u["default"](this.survey))},n}()},{"./../FloodgateCore/UISurvey/UISurvey":53,"./../Window/Window":89}],47:[function(n,t,i){"use strict";i.__esModule=!0;var r=n("./../Configuration/Configuration"),u=function(){function n(){}return n.prototype.getLanguage=function(){return r.get().getCommonInitOptions().originalLocale},n}();i["default"]=u},{"./../Configuration/Configuration":44}],48:[function(n,t,i){"use strict";var o;i.__esModule=!0;var s=n("@ms-ofb/officefloodgatecore/dist/src/Api/Api"),f=n("./../Window/Window"),e=n("./../Logging/Logging"),u=s.IFloodgateStorageProvider.FileType,r={};r[u.CampaignDefinitions.toString()]="obf-CampaignDefinitions";r[u.CampaignStates.toString()]="obf-CampaignStates";r[u.FloodgateSettings.toString()]="obf-FloodgateSettings";r[u.GovernedChannelStates.toString()]="obf-GovernedChannelStates";r[u.SurveyActivationStats.toString()]="obf-SurveyActivationStats";r[u.SurveyEventActivityStats.toString()]="obf-SurveyEventActivityStats";o=function(){function n(){}return n.isStorageAvailable=function(){try{var t="__storage_test__";return f.get().localStorage.setItem(t,t),f.get().localStorage.removeItem(t),!0}catch(n){return n instanceof DOMException&&(n.code===22||n.code===1014||n.name==="QuotaExceededError"||n.name==="NS_ERROR_DOM_QUOTA_REACHED")&&f.get().localStorage.length!==0}},n.prototype.fileLock=function(){return},n.prototype.fileUnlock=function(){return},n.prototype.read=function(n){if(!(n in u)||!r.hasOwnProperty(n.toString()))return"";var t=r[n],i;try{i=f.get().localStorage.getItem(t)}catch(o){return e.getLogger().logEvent(e.EventIds.Survey.Floodgate.FileRead.Failed.VALUE,{ErrorMessage:o.toString(),FileName:t}),""}return i},n.prototype.write=function(n,t){if(n in u&&r.hasOwnProperty(n.toString())){var i=r[n];try{f.get().localStorage.setItem(i,t)}catch(o){e.getLogger().logEvent(e.EventIds.Survey.Floodgate.FileWrite.Failed.VALUE,{ErrorMessage:o.toString(),FileName:i});return}}},n}();i["default"]=o},{"./../Logging/Logging":56,"./../Window/Window":89,"@ms-ofb/officefloodgatecore/dist/src/Api/Api":5}],49:[function(n,t,i){"use strict";i.__esModule=!0;var r=n("@ms-ofb/officefloodgatecore/dist/src/Api/Api"),u=n("./../UIStrings/UIStrings"),f=n("./../Configuration/Configuration"),e=function(){function n(){}return n.prototype.loadStringResource=function(n){var t=u.getUIStrings();switch(n){case r.IFloodgateStringProvider.StringType.Nps11RatingValue0:return t.Floodgate.Nps.Rating.Points11Value0;case r.IFloodgateStringProvider.StringType.Nps11RatingValue1:return t.Floodgate.Nps.Rating.Points11Value1;case r.IFloodgateStringProvider.StringType.Nps11RatingValue2:return t.Floodgate.Nps.Rating.Points11Value2;case r.IFloodgateStringProvider.StringType.Nps11RatingValue3:return t.Floodgate.Nps.Rating.Points11Value3;case r.IFloodgateStringProvider.StringType.Nps11RatingValue4:return t.Floodgate.Nps.Rating.Points11Value4;case r.IFloodgateStringProvider.StringType.Nps11RatingValue5:return t.Floodgate.Nps.Rating.Points11Value5;case r.IFloodgateStringProvider.StringType.Nps11RatingValue6:return t.Floodgate.Nps.Rating.Points11Value6;case r.IFloodgateStringProvider.StringType.Nps11RatingValue7:return t.Floodgate.Nps.Rating.Points11Value7;case r.IFloodgateStringProvider.StringType.Nps11RatingValue8:return t.Floodgate.Nps.Rating.Points11Value8;case r.IFloodgateStringProvider.StringType.Nps11RatingValue9:return t.Floodgate.Nps.Rating.Points11Value9;case r.IFloodgateStringProvider.StringType.Nps11RatingValue10:return t.Floodgate.Nps.Rating.Points11Value10;case r.IFloodgateStringProvider.StringType.Nps5RatingValue1:return t.Floodgate.Nps.Rating.Points5Value1;case r.IFloodgateStringProvider.StringType.Nps5RatingValue2:return t.Floodgate.Nps.Rating.Points5Value2;case r.IFloodgateStringProvider.StringType.Nps5RatingValue3:return t.Floodgate.Nps.Rating.Points5Value3;case r.IFloodgateStringProvider.StringType.Nps5RatingValue4:return t.Floodgate.Nps.Rating.Points5Value4;case r.IFloodgateStringProvider.StringType.Nps5RatingValue5:return t.Floodgate.Nps.Rating.Points5Value5;case r.IFloodgateStringProvider.StringType.NpsRatingQuestion:return t.Floodgate.Nps.Rating.Question;case r.IFloodgateStringProvider.StringType.NpsCommentQuestion:return t.Floodgate.Nps.Comment.Question;case r.IFloodgateStringProvider.StringType.NpsPromptNotNowLabel:return t.Floodgate.Nps.Prompt.No;case r.IFloodgateStringProvider.StringType.NpsPromptQuestion:return t.Floodgate.Nps.Prompt.Question;case r.IFloodgateStringProvider.StringType.NpsPromptTitle:return t.Floodgate.Nps.Prompt.Title;case r.IFloodgateStringProvider.StringType.NpsPromptYesLabel:return t.Floodgate.Nps.Prompt.Yes;default:return""}},n.prototype.getCustomString=function(n){return f.get().getFloodgateInitOptions().uIStringGetter(n)},n}();i["default"]=e},{"./../Configuration/Configuration":44,"./../UIStrings/UIStrings":67,"@ms-ofb/officefloodgatecore/dist/src/Api/Api":5}],50:[function(n,t,i){"use strict";i.__esModule=!0;var r=n("../Logging/Logging"),u=function(){function n(){}return n.prototype.log_TriggerMet=function(n,t,i){r.getLogger().logEvent(r.EventIds.Survey.Floodgate.TriggerMet.VALUE,{CampaignId:n,SurveyId:t,SurveyType:i})},n.prototype.log_UserSelected=function(n,t,i){r.getLogger().logEvent(r.EventIds.Survey.Floodgate.UserSelected.VALUE,{CampaignId:n,SurveyId:t,SurveyType:i})},n.prototype.log_CampaignLoad_Failed=function(n){r.getLogger().logEvent(r.EventIds.Survey.Floodgate.CampaignLoad.Failed.VALUE,{ErrorMessage:n})},n.prototype.log_Event=function(n,t){var i={name:n};r.getLogger().logEvent(i,t)},n}();i["default"]=u},{"../Logging/Logging":56}],51:[function(n,t,i){"use strict";i.__esModule=!0;var r=n("../../Utils"),u=function(){function n(n){this.comment="";this.ratingIndex=-1;this.showPrompt=n.showPrompt;this.showEmailRequest=r.isBoolean(n.showEmailRequest)?n.showEmailRequest:!1;this.survey=n}return n.prototype.getPromptQuestion=function(){return this.survey.promptQuestion},n.prototype.getTitle=function(){return this.survey.title},n.prototype.getPromptYesButtonText=function(){return this.survey.promptYesButtonText},n.prototype.getPromptNoButtonText=function(){return this.survey.promptNoButtonText},n.prototype.getRatingValuesAscending=function(){return this.survey.ratingValuesAscending},n.prototype.getRatingQuestion=function(){return this.survey.ratingQuestion},n.prototype.getCommentQuestion=function(){return this.survey.commentQuestion},n.prototype.setValues=function(n,t){this.comment=t;this.ratingIndex=this.isRatingIndexValid(n)?n:-1},n.prototype.getJsonElements=function(){var n={};return n.comment=this.comment,n.rating=this.getNormalizedRatingScore(),n.survey={surveyId:this.getCampaignId()},n},n.prototype.getSurveyType=function(){return this.survey.surveyType},n.prototype.getCampaignId=function(){return this.survey.campaignId},n.prototype.getId=function(){return this.getCampaignId()},n.prototype.isRatingIndexValid=function(n){return n>=0&&n<this.survey.ratingValuesAscending.length},n.prototype.getNormalizedRatingScore=function(){return this.isRatingIndexValid(this.ratingIndex)?this.survey.isZeroBased?this.ratingIndex/(this.survey.ratingValuesAscending.length-1):(this.ratingIndex+1)/this.survey.ratingValuesAscending.length:-1},n}();i["default"]=u},{"../../Utils":86}],52:[function(n,t,i){"use strict";i.__esModule=!0;var r=n("../../Utils"),u=n("@ms-ofb/officefloodgatecore/dist/src/Api/Api"),f=function(){function n(){this.showPrompt=!0;this.showEmailRequest=!0;this.comment=""}return n.prototype.getPromptQuestion=function(){return"Prompt question?"},n.prototype.getTitle=function(){return"Title"},n.prototype.getPromptYesButtonText=function(){return"Yes"},n.prototype.getPromptNoButtonText=function(){return"No"},n.prototype.getRatingValuesAscending=function(){return["worst","worse","ok","better","best"]},n.prototype.getRatingQuestion=function(){return"Rating question?"},n.prototype.getCommentQuestion=function(){return"Comment question?"},n.prototype.setValues=function(n,t){t&&(this.comment=t);r.isInteger(n)&&n>=0&&n<=4&&(this.rating=n/4)},n.prototype.getJsonElements=function(){var n={};return this.comment&&(n.comment=this.comment),this.rating&&(n.rating=this.rating),n},n.prototype.getSurveyType=function(){return u.ISurvey.Type.Nps},n.prototype.getCampaignId=function(){return"10000000-0000-0000-0000-000000000000"},n.prototype.getId=function(){return"00000000-0000-0000-0000-000000000000"},n}();i["default"]=f},{"../../Utils":86,"@ms-ofb/officefloodgatecore/dist/src/Api/Api":5}],53:[function(n,t,i){"use strict";i.__esModule=!0;var r=n("@ms-ofb/officefloodgatecore/dist/src/Api/Api"),u=function(){function n(n){if(this.showPrompt=!0,this.showEmailRequest=!1,n)this.survey=n;else throw Error("survey must not be null");var t=n.getComponent(r.ISurveyComponent.Type.Prompt),i=n.getComponent(r.ISurveyComponent.Type.Comment),u=n.getComponent(r.ISurveyComponent.Type.Rating);if(t)this.prompt=t;else throw Error("prompt component must not be null");if(this.showEmailRequest=n.getSurveyInfo().isAdditionalDataRequested(r.ISurveyInfo.AdditionalDataType.EmailAddress),i)this.comment=i;else throw Error("comment component must not be null");if(u)this.rating=u;else throw Error("rating component must not be null");}return n.prototype.getPromptQuestion=function(){return this.prompt.getQuestion()},n.prototype.getTitle=function(){return this.prompt.getTitle()},n.prototype.getPromptYesButtonText=function(){return this.prompt.getYesButtonText()},n.prototype.getPromptNoButtonText=function(){return this.prompt.getNoButtonText()},n.prototype.getRatingValuesAscending=function(){return this.rating.getRatingValuesAscending()},n.prototype.getRatingQuestion=function(){return this.rating.getQuestion()},n.prototype.getCommentQuestion=function(){return this.comment.getQuestion()},n.prototype.setValues=function(n,t){this.rating.setSelectedRatingIndex(n);this.comment.setSubmittedText(t)},n.prototype.getJsonElements=function(){return this.survey.getJsonElements()},n.prototype.getSurveyType=function(){return this.survey.getType()},n.prototype.getCampaignId=function(){return this.survey.getSurveyInfo().getBackEndId()},n.prototype.getId=function(){return this.survey.getSurveyInfo().getId()},n}();i["default"]=u},{"@ms-ofb/officefloodgatecore/dist/src/Api/Api":5}],54:[function(n,t,i){"use strict";function f(n){var i=n.toLocaleUpperCase(),f,o,h,e,s,t;if(i in u)return u[i];for(f=0,o=r;f<o.length;f++)if(t=o[f],t.toUpperCase()===i)return t;for(h=i.split("-")[0],e=0,s=r;e<s.length;e++)if(t=s[e],t.toUpperCase()===h)return t;return"en"}i.__esModule=!0;var r=["af","am","ar","as","az","be","bg","bn-BD","bn-IN","bs","ca","ca-Es-VALENCIA","chr-Cher","cs","cy","da","de","el","en-GB","es","es-MX","et","eu","fa","fi","fil","fr","fr-CA","ga","gd","gl","gu","ha-Latn-NG","he","hi","hr","hu","hy","id","is","it","ja","ka","kk","km-KH","kn","ko","kok","ky","lb","lo","lt","lv","mi","mk","ml","mn","mr","ms","mt","nb-NO","ne","nl","nn-NO","or","pa","pl","prs","pt-BR","pt-PT","quz","ro","ru","sd","si","sk","sl","sq","sr-Cyrl-BA","sr-Cyrl-RS","sr-Latn-RS","sv","sw","ta","te","th","tk","tr","tt","ug","uk","ur","uz-Latn-UZ","vi","zh-Hans","zh-Hant",],u={"ZH-CN":"zh-Hans","ZH-HK":"zh-Hant","ZH-MO":"zh-Hant","ZH-SG":"zh-Hans","ZH-TW":"zh-Hant"};i.validate=f},{}],55:[function(n,t,i){"use strict";i.__esModule=!0;var r=function(){function t(){}var c,i,l,a,r,v,y,u,f,p,w,e,b,k,n,d,g,nt,tt,it,rt,ut,ft,o,et,ot,s,h,st,ht,ct,lt,at,vt;return t.InApp=(c=function(){function n(){}return n}(),c.UI=(i=function(){function n(){}return n}(),i.Picker=(l=function(){function n(){}return n}(),l.Shown=(a=function(){function n(){}return n}(),a.VALUE={name:"InApp_UI_Picker_Shown"},a),l),i.Form=(r=function(){function n(){}return n}(),r.Shown=(v=function(){function n(){}return n}(),v.VALUE={name:"InApp_UI_Form_Shown"},v),r.Submit=(y=function(){function n(){}return n}(),y.VALUE={name:"InApp_UI_Form_Submit"},y),r),i),c),t.Survey=(u=function(){function n(){}return n}(),u.UI=(f=function(){function n(){}return n}(),f.Prompt=(p=function(){function n(){}return n}(),p.Shown=(w=function(){function n(){}return n}(),w.VALUE={name:"Survey_UI_Prompt_Shown"},w),p),f.Form=(e=function(){function n(){}return n}(),e.Shown=(b=function(){function n(){}return n}(),b.VALUE={name:"Survey_UI_Form_Shown"},b),e.Submit=(k=function(){function n(){}return n}(),k.VALUE={name:"Survey_UI_Form_Submit"},k),e),f),u.Floodgate=(n=function(){function n(){}return n}(),n.TriggerMet=(d=function(){function n(){}return n}(),d.VALUE={name:"Survey_Floodgate_TriggerMet"},d),n.UserSelected=(g=function(){function n(){}return n}(),g.VALUE={name:"Survey_Floodgate_UserSelected"},g),n.CampaignLoad=(nt=function(){function n(){}return n}(),nt.Failed=(tt=function(){function n(){}return n}(),tt.VALUE={name:"Survey_Floodgate_CampaignLoad_Failed"},tt),nt),n.FileWrite=(it=function(){function n(){}return n}(),it.Failed=(rt=function(){function n(){}return n}(),rt.VALUE={name:"Survey_Floodgate_FileWrite_Failed"},rt),it),n.FileRead=(ut=function(){function n(){}return n}(),ut.Failed=(ft=function(){function n(){}return n}(),ft.VALUE={name:"Survey_Floodgate_FileRead_Failed"},ft),ut),n),u),t.Shared=(o=function(){function n(){}return n}(),o.Upload=(et=function(){function n(){}return n}(),et.Failed=(ot=function(){function n(){}return n}(),ot.VALUE={name:"Shared_Upload_Failed"},ot),et),o.Screenshot=(s=function(){function n(){}return n}(),s.Render=(h=function(){function n(){}return n}(),h.Failed=(st=function(){function n(){}return n}(),st.VALUE={name:"Shared_Screenshot_Render_Failed"},st),h.Success=(ht=function(){function n(){}return n}(),ht.VALUE={name:"Shared_Screenshot_Render_Success"},ht),h),s.GetContent=(ct=function(){function n(){}return n}(),ct.Failed=(lt=function(){function n(){}return n}(),lt.DefaultImage=(at=function(){function n(){}return n}(),at.Returned=(vt=function(){function n(){}return n}(),vt.VALUE={name:"Shared_Screenshot_GetContent_Failed_DefaultImage_Returned"},vt),at),lt),ct),s),o),t}();i.EventIds=r},{}],56:[function(n,t,i){"use strict";function a(n,t,i,s,l,a,v){e=new u(c["default"].create(o.getTenantToken(n),f,new r.App(t,i),new r.Session(h.guid()),new r.Host(l,a,v),new r.Release(s)))}function v(){return e}var f,e,u,o;i.__esModule=!0;var s=n("./../Constants"),r=n("./Telemetry/Contracts"),h=n("./../Utils"),c=n("./Telemetry/TelemetryLoggerFactory"),l=n("./Constants");i.EventIds=l.EventIds;f="Office_Feedback";i.initialize=a;i.getLogger=v;u=function(){function n(n){if(!n)throw new Error("telemetryLogger must not be null");this.telemetryLogger=n}return n.prototype.logEvent=function(t,i){if(!t)throw new Error("eventId must not be null");i=i||{};i[n.EVENT_ID]=t.name;this.telemetryLogger.logEvent(n.EVENT_NAME,i)},n.EVENT_NAME="SDK",n.EVENT_ID="EventId",n}();i.Logger=u;o=function(){function n(){}return n.getTenantToken=function(t){return t===s.Environment.Production?n.TENANT_TOKEN_PRODUCTION:n.TENANT_TOKEN_PRE_PRODUCTION},n.TENANT_TOKEN_PRODUCTION="d79e824386c4441cb8c1d4ae15690526-bd443309-5494-444a-aba9-0af9eef99f84-7360",n.TENANT_TOKEN_PRE_PRODUCTION="2bf6a2ffddca4a80a892a0b182132961-625cb102-8b0c-480e-af53-92e48695d08d-7736",n}()},{"./../Constants":45,"./../Utils":86,"./Constants":55,"./Telemetry/Contracts":59,"./Telemetry/TelemetryLoggerFactory":60}],57:[function(n,t,i){"use strict";function u(){return r.AWT}i.__esModule=!0;var r=n("./../../thirdparty/aria-webjs-compact-sdk-1.2.2");i.AWT=u},{"./../../thirdparty/aria-webjs-compact-sdk-1.2.2":90}],58:[function(n,t,i){"use strict";i.__esModule=!0;var r=n("./Aria"),u=n("./Contracts"),f=function(){function n(n,t,i,u,f,e){if(!n)throw new Error("tenantToken must not be null");if(!t)throw new Error("namespace must not be null");if(!i)throw new Error("app must not be null");if(!u)throw new Error("session must not be null");r.AWT().initialize(n);this.namespace=t;this.oesApp=i;this.oesSession=u;this.oesHost=f;this.oesRelease=e;this.sequence=1}return n.setApp=function(n,t){n["App.Name"]=t.getName();n["App.Platform"]=t.getPlatform();n["App.Version"]=t.getVersion()},n.setSession=function(n,t){n["Session.Id"]=t.getId()},n.setHost=function(n,t){t&&(n["Host.Id"]=t.getId(),n["Host.Version"]=t.getVersion())},n.setEvent=function(n,t){n["Event.Name"]=t.getName();n["Event.Id"]=t.getId();n["Event.Source"]=t.getSource();n["Event.SchemaVersion"]=t.getSchemaVersion();n["Event.Sequence"]=t.getSequence()},n.setRelease=function(n,t){t&&(n["Release.AudienceGroup"]=t.getAudienceGroup())},n.prototype.logEvent=function(t,i){var o,f,e;if(!t)throw new Error("eventName must not be null");if(o=new u.Event(this.namespace+n.EVENT_NAME_DELIMITER+t,this.oesSession.getId(),this.sequence),f={},i!=null)for(e in i)i.hasOwnProperty(e)&&(f[n.CUSTOM_PROPERTIES_FIELD_PREFIX+e]=i[e]);n.setApp(f,this.oesApp);n.setSession(f,this.oesSession);n.setHost(f,this.oesHost);n.setRelease(f,this.oesRelease);n.setEvent(f,o);r.AWT().logEvent({name:o.getName(),properties:f});this.sequence++},n.EVENT_NAME_DELIMITER="_",n.CUSTOM_PROPERTIES_FIELD_PREFIX="Data.",n}();i["default"]=f},{"./Aria":57,"./Contracts":59}],59:[function(n,t,i){"use strict";var r,u,f,e,o;i.__esModule=!0;r=function(){function n(n,t){if(!n)throw new Error("name must not be null");if(!t)throw new Error("version must not be null");this.name=n;this.version=t}return n.prototype.getName=function(){return this.name},n.prototype.getPlatform=function(){return n.PLATFORM},n.prototype.getVersion=function(){return this.version},n.PLATFORM="Web",n}();i.App=r;u=function(){function n(n){if(!n)throw new Error("id must not be null");this.id=n}return n.prototype.getId=function(){return this.id},n}();i.Session=u;f=function(){function n(n,t,i){this.id=n;this.sessionId=t;this.version=i}return n.prototype.getId=function(){return this.id},n.prototype.getSessionId=function(){return this.sessionId},n.prototype.getVersion=function(){return this.version},n}();i.Host=f;e=function(){function n(t,i,r){if(!t)throw new Error("name must not be null");if(!i)throw new Error("sessionId must not be null");if(!r&&r!==0||r<0)throw new Error("sequence must not be negative");this.name=t;this.id=i+n.ID_DELIMITER+r;this.sequence=r}return n.prototype.getName=function(){return this.name},n.prototype.getId=function(){return this.id},n.prototype.getSource=function(){return n.SOURCE},n.prototype.getSchemaVersion=function(){return n.SCHEMA_VERSION},n.prototype.getSequence=function(){return this.sequence},n.ID_DELIMITER=".",n.SOURCE="MsoThin",n.SCHEMA_VERSION=1,n}();i.Event=e;o=function(){function n(n){this.audienceGroup=n}return n.prototype.getAudienceGroup=function(){return this.audienceGroup},n}();i.Release=o},{}],60:[function(n,t,i){"use strict";i.__esModule=!0;var r=n("./AriaTelemetryLogger"),u=function(){function n(){}return n.create=function(n,t,i,u,f,e){return new r["default"](n,t,i,u,f,e)},n}();i["default"]=u},{"./AriaTelemetryLogger":58}],61:[function(n,t,i){"use strict";function u(){var n=r.get().OfficeBrowserFeedback.html2canvas();return n(document.body,{background:"#ffffff"})}i.__esModule=!0;var r=n("./Window/Window");i.createScreenShot=u},{"./Window/Window":89}],62:[function(n,t,i){"use strict";function e(n,t){n===void 0&&(n=undefined);t===void 0&&(t=undefined);n||(n=u);t||(t=f);var i=document.createElement("style");i.textContent="."+r.Classes.OverallAnchor+":hover { background-color: "+t+" } "+("."+r.Classes.OverallAnchorActive+" { background-color: "+n+" } ")+("."+r.Classes.SpinnerCircle+" { background-color: "+n+" } ")+("."+r.Classes.ChoiceGroup+" input[type=radio]:checked+label>."+r.Classes.ChoiceGroupIcon+" { border-color: "+n+" } ")+("."+r.Classes.ChoiceGroup+" input[type=radio]:hover+label>."+r.Classes.ChoiceGroupIcon+" { border-color: "+t+" } ")+("."+r.Classes.ChoiceGroup+" input[type=radio]:checked+label>."+r.Classes.ChoiceGroupIcon+">span { background-color: "+n+" } ")+("."+r.Classes.SubmitButton+" { background-color: "+n+" } ")+("."+r.Classes.SubmitButton+":hover { background-color: "+t+" } ")+("."+r.Classes.Link+" { color: "+n+" } ")+("."+r.Classes.Link+":hover { color: "+t+" } ")+("#"+r.IDs.TPromptTitle+" { color: "+n+" } ")+("#"+r.IDs.TFormTitle+" { color: "+n+" } ");document.body.appendChild(i)}i.__esModule=!0;var r=n("./Constants"),u="#0167B0",f="#194789";i.initialize=e},{"./Constants":45}],63:[function(n,t,i){"use strict";function f(n){return n==="Survey"?n:r.FeedbackType[n]}i.__esModule=!0;var r=n("./../../Constants"),u=function(){function n(n,t,i,r,u,e,o,s){this.manifestData={appId:t,application:e,clientFeedbackId:u,manifestType:n,source:"Client",submitTime:i,telemetry:o,type:f(r),web:s}}return n.prototype.setComment=function(n){this.manifestData.comment=n},n.prototype.setEmail=function(n){this.manifestData.email=n},n.prototype.setCategory=function(n){this.manifestData.telemetry=this.manifestData.telemetry||{};this.manifestData.telemetry.featureArea=n},n.prototype.setValues=function(n){if(n)for(var t in n)if(n.hasOwnProperty(t)){if(this.manifestData.hasOwnProperty(t))throw Error("Key '"+t+"' already exists in manifest.");this.manifestData[t]=n[t]}},n.prototype.getContent=function(){return new Blob([JSON.stringify(this.manifestData)],{type:"application/json"})},n}();i.Manifest=u},{"./../../Constants":45}],64:[function(n,t,i){"use strict";i.__esModule=!0;var r=n("./../../Logging/Logging"),u=function(){function n(n){this.screenshot=n}return n.prototype.getContent=function(){var t,i,u,n;try{t=this.screenshot.toDataURL("image/jpeg").split(",")[1]}catch(f){r.getLogger().logEvent(r.EventIds.Shared.Screenshot.GetContent.Failed.DefaultImage.Returned.VALUE,{ErrorMessage:f.toString()});t="iVBORw0KGgoAAAANSUhEUgAAAN0AAAA+AQMAAACV2ox1AAAABGdBTUEAALGPC/xhBQAAAAZQTFRFAAAA////pdmf3QAAAAlwSFlzAAAOwgAADsIBFShKgAAAAjtJREFUSMfV1M1rE0EUAHDBa5r8A9vkL6giFiI0JH+Ih9KLx8TaukkJugShHgrJzYvkVPQkUqgwSePLEELaU+zBg8JKVvSQQNydlsadwCQzziRZ82ETxYMfc3gD8+MxjzcfV8T80f0vkQ8i68tAPSMSQ0PkI6QDpEPkZBHy1Wp1/zjni2lrZq2T2uikDG17A54Hr0vsvwXIl3WXt02zeIHQBSq3DxHk7VO55zIFgLLrcmaaQBGiqCwQArBVQTbNZODNBB5Ee2EEr5eGiDG4k5mcqcy+Ksh+N8K2+bRI1Z68fRMVoV+XmcFwpQJZGohpkds1WtjppGLaq51a2b8yp310UW9/H8VfRj68CIKRsWCFPCCEM419S4bSAOmPmdb3TBrQ4lmnt9n4/Hiv5fTunsOzXbJfLR2rU3Fd5ugOe9mw0lvNOCNxyDdIHkpHCv0S3a+MS0yT+4wkAKx1gBJeVxeMRhSeNZpXJfY+zqAVl+g0mCFRJMgs6oy9+MCMrWZaJJwiWFjuWcIShf+Wk2W9e59OHu21WPdsswZNLKs9wV77mJiaMVbBQ+/1jGZDofFLuOBU/jzG6OQKnkLOZ5EvwolMX2Q19TAX9MWyy/aNarewfZptechdLn8B3TatB/YXB2j4MKw3jTHKX4AO0CbqaSddMokHUbr0PpSXmFG4O4WIu86asCVihfoM6nUmse5gGkbJOyThVesX4UI0d00LBYMr55VuIZl8MkY1uOiTy9v3c+ShuXj5+NdQdL8B+5gmw8WZuREAAAAASUVORK5CYII="}for(i=atob(t),u=[],n=0;n<i.length;n++)u.push(i.charCodeAt(n));return new Blob([new Uint8Array(u)],{type:"image/jpeg"})},n}();i.Screenshot=u},{"./../../Logging/Logging":56}],65:[function(n,t,i){"use strict";function o(n,t,i,f,e){var o=function(f){return new r.Promise(function(r,s){var h=new XMLHttpRequest;h.open(n,t,!0);h.timeout=u;h.onload=function(){e(h,r,s)};h.ontimeout=function(){f>0?o(f-1).then(r,s):s(new Error("Request to '"+t+"' timed out. timeout: "+u))};h.onerror=function(){f>0?o(f-1).then(r,s):s(new Error("Request to '"+t+"' errored. "+h.status+": "+h.responseText))};h.send(i)})};return o(f)}function s(n,t,i,u){if(t===undefined)return r.Promise.reject(new Error("Manifest cannot be undefined"));var s=new FormData;return s.append("Manifest",t),i&&s.append("Screenshot",i),u&&s.append("Diagnostics",u),o("POST",n?e:f,s,2,function(n,t,i){n.status!==200&&i(new Error("Non-200 response with status code: "+n.status+", response: "+n.responseText));t()})}var r,u,f,e;i.__esModule=!0;r=n("es6-promise");u=4e3;f="https://petrol-int.office.microsoft.com/v1/feedback";e="https://petrol.office.microsoft.com/v1/feedback";i.send=s},{"es6-promise":39}],66:[function(n,t,i){"use strict";i.__esModule=!0;var u=n("./../Constants"),f=n("./../Utils"),r=n("./../Logging/Logging"),e=n("./Petrol"),o=n("./Files/Screenshot"),s=n("../Configuration/Configuration"),h=n("./Files/Manifest"),c=function(){function n(n,t,i,r,u,e,o){this.manifest=new h.Manifest(t,i,(new Date).toISOString(),r,f.guid(),u,e,o);this.environment=n}return n.prototype.setComment=function(n){this.manifest.setComment(n)},n.prototype.setEmail=function(n){this.manifest.setEmail(n)},n.prototype.setCategory=function(n){this.manifest.setCategory(n)},n.prototype.setScreenshot=function(n){this.screenshot=new o.Screenshot(n)},n.prototype.setManifestValues=function(n){this.manifest.setValues(n)},n.prototype.submit=function(){var t=this.manifest.getContent(),n=undefined;return this.screenshot&&(n=this.screenshot.getContent()),e.send(this.environment===u.Environment.Production,t,n)["catch"](function(n){s.get().getCommonInitOptions().onError("Payload submission failed: "+n.message);r.getLogger().logEvent(r.EventIds.Shared.Upload.Failed.VALUE,{ErrorMessage:n.message})})},n}();i.Transporter=c},{"../Configuration/Configuration":44,"./../Constants":45,"./../Logging/Logging":56,"./../Utils":86,"./Files/Manifest":63,"./Files/Screenshot":64,"./Petrol":65}],67:[function(n,t,i){"use strict";function u(n){r=n}function f(){return r}i.__esModule=!0;var r;i.setUIStrings=u;i.getUIStrings=f},{}],68:[function(n,t,i){"use strict";function y(n){var t={},i;t[r.FeedbackType.Smile]=e;t[r.FeedbackType.Frown]=e;t[r.FeedbackType.Idea]=f.get().getInAppFeedbackInitOptions().userVoice&&f.get().getCommonInitOptions().locale==="en"?v:e;f.get().getInAppFeedbackInitOptions().bugForm&&(t[r.FeedbackType.Bug]=e);c(h.elementFromJson(s.generateMulti(t)));i=a.isNarrow();o.registerMulti(t,i,function(t){u.setElementVisibility(r.IDs.OverlayBackground,!1);u.deleteElementById(r.IDs.OverlayBackground);f.get().getInAppFeedbackInitOptions().onDismiss(t);n()});i&&u.addClassById(r.IDs.OverlayBackground,r.Classes.NarrowLayout)}function p(n,t){c(h.elementFromJson(s.generateSingle()));o.registerSingle(t,function(t){u.setElementVisibility(r.IDs.OverlayBackground,!1);u.deleteElementById(r.IDs.OverlayBackground);f.get().getInAppFeedbackInitOptions().onDismiss(t);n()});u.addClassById(r.IDs.OverlayBackground,r.Classes.SingleLayout)}function c(n){document.body.insertBefore(n,document.body.firstChild);u.setElementVisibility(r.IDs.OverlayBackground,!0);u.getInternetExplorerVersion()>9||u.getInternetExplorerVersion()===-1?setTimeout(l,900):l()}function l(){u.setElementVisibility(r.IDs.MainContentHolder,!0);document.getElementById(r.IDs.OverallSmileAnchor)?document.getElementById(r.IDs.OverallSmileAnchor).focus():document.getElementById(r.IDs.SingleFormComment)&&document.getElementById(r.IDs.SingleFormComment).focus()}function w(){return}i.__esModule=!0;var r=n("./../../Constants"),o=n("./Events"),s=n("./Layout"),h=n("./../Renderer"),u=n("./../Utils"),a=n("./../../WindowProperties"),e=n("./FormTemplates/BasicFormTemplate"),v=n("./FormTemplates/UserVoiceFormTemplate"),f=n("./../../Configuration/Configuration");i.createMulti=y;i.createSingle=p;i.dismiss=w},{"./../../Configuration/Configuration":44,"./../../Constants":45,"./../../WindowProperties":88,"./../Renderer":79,"./../Utils":85,"./Events":69,"./FormTemplates/BasicFormTemplate":70,"./FormTemplates/UserVoiceFormTemplate":73,"./Layout":74}],69:[function(n,t,i){"use strict";function c(n){ut();y(n)}function f(n,t,i){u.registerListener(n,t,i);l.push({event:t,id:n,listener:i})}function tt(){for(var t,n=0,i=l;n<i.length;n++)t=i[n],u.unregisterListener(t.id,t.event,t.listener);l=[]}function it(n,t){t===void 0&&(t=function(){return});e=n;f(r.IDs.SingleFormSubmitButton,"click",b(r.IDs.SingleFormSubmitButton,r.IDs.SingleFormSubmitButtonSpinner,r.IDs.SingleFormComment,r.IDs.SingleFormEmailInput,r.IDs.SingleFormScreenshotCheckbox,r.IDs.SingleFormCategoriesDropdown));p(t)}function rt(n,t,i){i===void 0&&(i=function(){return});v=t;h=n;f(r.IDs.OverallSmileAnchor,"click",ht);f(r.IDs.OverallFrownAnchor,"click",ct);f(r.IDs.OverallIdeaAnchor,"click",lt);f(r.IDs.OverallBugAnchor,"click",at);f(r.IDs.BasicFormSubmitButton,"click",b(r.IDs.BasicFormSubmitButton,r.IDs.BasicFormSubmitButtonSpinner,r.IDs.BasicFormComment,r.IDs.BasicFormEmailInput,r.IDs.BasicFormScreenshotCheckbox,r.IDs.BasicFormCategoriesDropdown));f(r.IDs.UserVoiceFormGoButton,"click",yt);p(i)}function p(n){y=n;u.addEventListenerHelper(window,"keyup",w);f(r.IDs.OverlayBackground,"click",et);f(r.IDs.MainContainer,"click",ot);f(r.IDs.MainContainer,"keyup",ft);f(r.IDs.PrivacyStatementLink,"click",st)}function ut(){u.removeEventListenerHelper(window,"keyup",w);tt()}function ft(n){var t=n.keyCode||n.which;t===r.Keys.Tab&&(document.activeElement.id===r.IDs.FirstTabbable&&n.shiftKey||document.activeElement.id===r.IDs.LastTabbable&&!n.shiftKey)&&(n.stopPropagation(),nt.cycleTabFocus(document.activeElement))}function w(n){n.keyCode===r.Keys.Esc&&(n.preventDefault(),n.stopPropagation(),c(!1))}function et(n){n.preventDefault();n.stopPropagation();c(!1)}function ot(n){n.stopPropagation()}function st(n){n.stopPropagation()}function a(n,t){n.preventDefault();n.stopPropagation();u.replaceClassesById(r.IDs.OverallSmileAnchor,r.Classes.OverallAnchorActive);u.replaceClassesById(r.IDs.OverallFrownAnchor,r.Classes.OverallAnchorActive);u.replaceClassesById(r.IDs.OverallIdeaAnchor,r.Classes.OverallAnchorActive);u.replaceClassesById(r.IDs.OverallBugAnchor,r.Classes.OverallAnchorActive);u.addClassById(t,r.Classes.OverallAnchorActive);o.getLogger().logEvent(o.EventIds.InApp.UI.Form.Shown.VALUE,{FeedbackType:e});var i=h[e];vt(i.containerId);i.onSelect(e)}function ht(n){e=r.FeedbackType.Smile;a(n,r.IDs.OverallSmileAnchor)}function ct(n){e=r.FeedbackType.Frown;a(n,r.IDs.OverallFrownAnchor)}function lt(n){e=r.FeedbackType.Idea;a(n,r.IDs.OverallIdeaAnchor)}function at(n){e=r.FeedbackType.Bug;a(n,r.IDs.OverallBugAnchor)}function vt(n){for(var t in h)h.hasOwnProperty(t)&&u.setElementVisibility(h[t].containerId,!1);v?(u.setElementVisibility(r.IDs.LeftFormContainer,!1),u.setElementVisibility(r.IDs.MiddleFormContainer,!0),u.setElementVisibility(n,!0)):(u.addClassById(r.IDs.ColumnSeparatorDiv,r.Classes.ShowRightBorder),u.setElementVisibility(r.IDs.MiddleFormContainer,!0),u.setElementVisibility(n,!0),u.addClassById(r.IDs.LeftFormContainer,r.Classes.SlideLeft),u.addClassById(r.IDs.MiddleFormContainer,r.Classes.SlideLeft))}function b(n,t,i,r,f,h){return function(l){var v,p,b;l.preventDefault();l.stopPropagation();u.setElementVisibility(n,!1);var it=new g.Spinner(t),a=new k.Transporter(s.get().getCommonInitOptions().environment,"Sas",s.get().getCommonInitOptions().appId,e,s.get().getCommonInitOptions().applicationGroup,s.get().getCommonInitOptions().telemetryGroup,s.get().getCommonInitOptions().webGroup),y=document.getElementById(i),rt=y&&!!y.value;rt&&a.setComment(y.value);v=document.getElementById(r);p=v&&!!v.value;p&&a.setEmail(v.value);var nt=document.getElementById(f),tt=nt&&nt.checked,w=document.getElementById(h),ut=w&&w.selectedIndex>0;ut&&a.setCategory(w.value);o.getLogger().logEvent(o.EventIds.InApp.UI.Form.Submit.VALUE,{FeedbackType:e,IsEmailIncluded:p,IsScreenshotIncluded:tt});tt?(b=performance.now(),d.createScreenShot().then(function(n){var t=performance.now();o.getLogger().logEvent(o.EventIds.Shared.Screenshot.Render.Success.VALUE,{TimeMilliseconds:t-b});a.setScreenshot(n);a.submit()})["catch"](function(n){var t=performance.now();o.getLogger().logEvent(o.EventIds.Shared.Screenshot.Render.Failed.VALUE,{ErrorMessage:n,TimeMilliseconds:t-b});a.submit()})):a.submit();it.destroy();c(!0)}}function yt(n){n.preventDefault();n.stopPropagation();window.open(document.getElementById(r.IDs.UserVoiceFormGoButton).getAttribute(r.AttributeName.Source));c(!1)}var l;i.__esModule=!0;var k=n("./../../Transport/Transport"),s=n("./../../Configuration/Configuration"),r=n("./../../Constants"),o=n("./../../Logging/Logging"),d=n("./../../Screenshot"),g=n("./../SpinnerControl"),u=n("./../Utils"),nt=n("./TabFocus"),v=!1,y,e=undefined,h;l=[];i.registerSingle=it;i.registerMulti=rt},{"./../../Configuration/Configuration":44,"./../../Constants":45,"./../../Logging/Logging":56,"./../../Screenshot":61,"./../../Transport/Transport":66,"./../SpinnerControl":80,"./../Utils":85,"./TabFocus":75}],70:[function(n,t,i){"use strict";function h(){var n=f.get().getInAppFeedbackLaunchOptions().categories;return{children:[{attributes:[{name:r.AttributeName.For,value:r.IDs.BasicFormComment}],classes:[r.Classes.FontSubtitle,r.Classes.TextAlignLeft,r.Classes.FormQuestionMiddleText,],id:r.IDs.BasicFormQuestionMiddleText,tag:r.Tags.Label},{attributes:[{name:r.AttributeName.Id,value:r.IDs.BasicFormCategoriesDropdown}],brs:n.show,children:o.generate(n?n.customCategories:null),classes:[r.Classes.FontSubText,r.Classes.FormCategoriesDropdown,r.Classes.TextInput],tag:r.Tags.Select},{attributes:[{name:r.AttributeName.Placeholder,value:u.getUIStrings().Form.CommentPlaceholder},{name:r.AttributeName.MaxLength,value:r.AttributeValue.TextAreaMaxLength},],classes:[r.Classes.FontSubText,r.Classes.FormComment,r.Classes.TextInput],id:r.IDs.BasicFormComment,tag:r.Tags.TextArea},{brs:!1,children:[{attributes:[{name:r.AttributeName.For,value:r.IDs.BasicFormRating}],classes:[r.Classes.FontText,r.Classes.TextAlignLeft,r.Classes.FormRatingLabel],innerText:u.getUIStrings().Form.RatingLabel,tag:r.Tags.Label},s.generate(r.IDs.BasicFormRating),],classes:[r.Classes.FormRatingContainer]},{attributes:[{name:r.AttributeName.Type,value:r.AttributeValue.Text},{name:r.AttributeName.Placeholder,value:u.getUIStrings().Form.EmailPlaceholder},{name:r.AttributeName.AriaLabel,value:u.getUIStrings().Form.EmailPlaceholder},{name:r.AttributeName.Name,value:r.IDs.BasicFormEmailInput},{name:r.AttributeName.MaxLength,value:r.AttributeValue.TextAreaMaxLength},{name:r.AttributeName.Value,value:f.get().getInAppFeedbackInitOptions().userEmail?f.get().getInAppFeedbackInitOptions().userEmail:""},],classes:[r.Classes.FontSubText,r.Classes.FormEmailInput,r.Classes.TextInput],id:r.IDs.BasicFormEmailInput,tag:r.Tags.Input},{children:[{children:[{attributes:[{name:r.AttributeName.Type,value:r.AttributeValue.Checkbox},{name:r.AttributeName.Value,value:r.AttributeValue.Unchecked},],brs:f.get().getInAppFeedbackInitOptions().screenshot,classes:[r.Classes.FormScreenshotCheckbox,r.Classes.CheckBox],id:r.IDs.BasicFormScreenshotCheckbox,tag:r.Tags.Input},{attributes:[{name:r.AttributeName.For,value:r.IDs.BasicFormScreenshotCheckbox}],brs:f.get().getInAppFeedbackInitOptions().screenshot,classes:[r.Classes.FontText,r.Classes.TextAlignLeft,r.Classes.FormScreenshotLabel],innerText:u.getUIStrings().Form.ScreenshotLabel,tag:r.Tags.Label},],classes:[r.Classes.FormScreenshotContainer]},{children:[{classes:[r.Classes.FontSubText,r.Classes.SubmitButton,],id:r.IDs.BasicFormSubmitButton,innerText:u.getUIStrings().Form.Submit,tag:r.Tags.Button},{classes:[r.Classes.Spinner,r.Classes.Hidden],id:r.IDs.BasicFormSubmitButtonSpinner,tag:r.Tags.Div},],classes:[r.Classes.FormSubmitButtonContainer]},],classes:[r.Classes.FormBottomContainer]},],classes:[r.Classes.Hidden,r.Classes.MarginLeft60px],id:i.containerId}}function c(n){switch(n){case r.FeedbackType.Smile:document.getElementById(r.IDs.BasicFormQuestionMiddleText).textContent=u.getUIStrings().SmileForm.Title;break;case r.FeedbackType.Frown:document.getElementById(r.IDs.BasicFormQuestionMiddleText).textContent=u.getUIStrings().FrownForm.Title;break;case r.FeedbackType.Idea:document.getElementById(r.IDs.BasicFormQuestionMiddleText).textContent=u.getUIStrings().IdeaForm.Title;break;case r.FeedbackType.Bug:document.getElementById(r.IDs.BasicFormQuestionMiddleText).textContent=u.getUIStrings().BugForm.Title}document.getElementById(r.IDs.BasicFormComment).focus()}i.__esModule=!0;var u=n("./../../../UIStrings/UIStrings"),e=n("./FormTemplateType"),o=n("./../../CategoriesDropdown"),s=n("./../../RatingControl"),r=n("./../../../Constants"),f=n("./../../../Configuration/Configuration");i.generate=h;i.containerId=r.IDs.BasicFormContainer;i.onSelect=c;i.type=e.FormTemplateType.Basic},{"./../../../Configuration/Configuration":44,"./../../../Constants":45,"./../../../UIStrings/UIStrings":67,"./../../CategoriesDropdown":76,"./../../RatingControl":78,"./FormTemplateType":71}],71:[function(n,t,i){"use strict";i.__esModule=!0;var r;(function(n){n[n.Single=0]="Single";n[n.Basic=1]="Basic";n[n.UserVoice=2]="UserVoice"})(r=i.FormTemplateType||(i.FormTemplateType={}))},{}],72:[function(n,t,i){"use strict";function h(){var n=f.get().getInAppFeedbackLaunchOptions().categories;return{children:[{attributes:[{name:r.AttributeName.For,value:r.IDs.SingleFormComment}],classes:[r.Classes.FontSubtitle,r.Classes.TextAlignLeft,r.Classes.FormQuestionMiddleText,],id:r.IDs.SingleFormQuestionMiddleText,innerText:u.getUIStrings().SingleForm.Title,tag:r.Tags.Label},{attributes:[{name:r.AttributeName.Id,value:r.IDs.SingleFormCategoriesDropdown}],brs:n.show,children:o.generate(n?n.customCategories:null),classes:[r.Classes.FontSubText,r.Classes.FormCategoriesDropdown,r.Classes.TextInput],tag:r.Tags.Select},{attributes:[{name:r.AttributeName.Placeholder,value:u.getUIStrings().Form.CommentPlaceholder},{name:r.AttributeName.MaxLength,value:r.AttributeValue.TextAreaMaxLength},],classes:[r.Classes.FontSubText,r.Classes.FormComment,r.Classes.TextInput],id:r.IDs.SingleFormComment,tag:r.Tags.TextArea},{brs:!1,children:[{attributes:[{name:r.AttributeName.For,value:r.IDs.SingleFormRating}],classes:[r.Classes.FontSubText,r.Classes.TextAlignLeft,r.Classes.FormRatingLabel,],innerText:u.getUIStrings().Form.RatingLabel,tag:r.Tags.Label},s.generate(r.IDs.SingleFormRating),],classes:[r.Classes.FormRatingContainer]},{attributes:[{name:r.AttributeName.Type,value:r.AttributeValue.Text},{name:r.AttributeName.Placeholder,value:u.getUIStrings().Form.EmailPlaceholder},{name:r.AttributeName.AriaLabel,value:u.getUIStrings().Form.EmailPlaceholder},{name:r.AttributeName.Name,value:r.IDs.SingleFormEmailInput},{name:r.AttributeName.MaxLength,value:r.AttributeValue.TextAreaMaxLength},{name:r.AttributeName.Value,value:f.get().getInAppFeedbackInitOptions().userEmail?f.get().getInAppFeedbackInitOptions().userEmail:""},],classes:[r.Classes.FontSubText,r.Classes.FormEmailInput,r.Classes.TextInput],id:r.IDs.SingleFormEmailInput,tag:r.Tags.Input},{children:[{attributes:[{name:r.AttributeName.HRef,value:r.Urls.PrivacyStatementLink},{name:r.AttributeName.Target,value:r.AttributeValue.BlankWindow},{name:r.AttributeName.Rel,value:r.AttributeValue.NoReferrer},],classes:[r.Classes.Link],id:r.IDs.PrivacyStatementLink,innerText:u.getUIStrings().PrivacyStatement,tag:r.Tags.Anchor},],classes:[r.Classes.FontSubSubText,r.Classes.TextAlignLeft,r.Classes.PrivacyStatementLinkDiv]},{children:[{children:[{attributes:[{name:r.AttributeName.Type,value:r.AttributeValue.Checkbox},{name:r.AttributeName.Value,value:r.AttributeValue.Unchecked},],brs:f.get().getInAppFeedbackInitOptions().screenshot,classes:[r.Classes.FormScreenshotCheckbox,r.Classes.CheckBox],id:r.IDs.SingleFormScreenshotCheckbox,tag:r.Tags.Input},{attributes:[{name:r.AttributeName.For,value:r.IDs.SingleFormScreenshotCheckbox}],brs:f.get().getInAppFeedbackInitOptions().screenshot,classes:[r.Classes.FontText,r.Classes.TextAlignLeft,r.Classes.FormScreenshotLabel],innerText:u.getUIStrings().Form.ScreenshotLabel,tag:r.Tags.Label},],classes:[r.Classes.FormScreenshotContainer]},{children:[{classes:[r.Classes.FontSubText,r.Classes.SubmitButton,],id:r.IDs.SingleFormSubmitButton,innerText:u.getUIStrings().Form.Submit,tag:r.Tags.Button},{classes:[r.Classes.Spinner,r.Classes.Hidden],id:r.IDs.SingleFormSubmitButtonSpinner,tag:r.Tags.Div},],classes:[r.Classes.FormSubmitButtonContainer]},],classes:[r.Classes.FormBottomContainer]},],id:i.containerId}}function c(){document.getElementById(r.IDs.SingleFormComment).focus()}i.__esModule=!0;var u=n("./../../../UIStrings/UIStrings"),e=n("./FormTemplateType"),o=n("./../../CategoriesDropdown"),s=n("./../../RatingControl"),f=n("./../../../Configuration/Configuration"),r=n("./../../../Constants");i.generate=h;i.containerId=r.IDs.SingleFormContainer;i.onSelect=c;i.type=e.FormTemplateType.Single},{"./../../../Configuration/Configuration":44,"./../../../Constants":45,"./../../../UIStrings/UIStrings":67,"./../../CategoriesDropdown":76,"./../../RatingControl":78,"./FormTemplateType":71}],73:[function(n,t,i){"use strict";function o(){var n=e.get().getInAppFeedbackInitOptions().userVoice;return{children:[{classes:[r.Classes.FontSubtitle,r.Classes.TextAlignLeft,r.Classes.FormQuestionMiddleText],innerText:u.getUIStrings().UserVoiceForm.Title},{classes:[r.Classes.FontText,r.Classes.TextAlignLeft,r.Classes.FormMiddleText],innerText:u.getUIStrings().UserVoiceForm.Text},{children:[{children:[{attributes:[{name:r.AttributeName.Source,value:n.url},],classes:[r.Classes.SubmitButton,r.Classes.FontSubText,],id:r.IDs.UserVoiceFormGoButton,innerText:u.getUIStrings().UserVoiceForm.Button,tag:r.Tags.Button},],classes:[r.Classes.FormSubmitButtonContainer]},],classes:[r.Classes.FormBottomContainer]},],classes:[r.Classes.Hidden,r.Classes.MarginLeft60px],id:i.containerId}}function s(){document.getElementById(r.IDs.UserVoiceFormGoButton).focus()}i.__esModule=!0;var u=n("./../../../UIStrings/UIStrings"),f=n("./FormTemplateType"),r=n("./../../../Constants"),e=n("./../../../Configuration/Configuration");i.generate=o;i.containerId=r.IDs.UserVoiceFormContainer;i.onSelect=s;i.type=f.FormTemplateType.UserVoice},{"./../../../Configuration/Configuration":44,"./../../../Constants":45,"./../../../UIStrings/UIStrings":67,"./FormTemplateType":71}],74:[function(n,t,i){"use strict";function s(n){return{attributes:[{name:r.AttributeName.DataHtml2CanvasIgnore,value:r.AttributeValue.True}],children:[{attributes:[{name:r.AttributeName.Role,value:"dialog"},{name:"aria-modal",value:"true"},{name:"aria-describedby",value:r.IDs.QuestionLeftText},],children:[{attributes:[{name:r.AttributeName.TabIndex,value:r.AttributeValue.Zero}],id:r.IDs.FirstTabbable},{children:[{children:[{classes:[r.Classes.FontSubtitle,r.Classes.TextAlignLeft],id:r.IDs.QuestionLeftText,innerText:u.getUIStrings().FeedbackSubtitle},{children:[{children:l(n),id:r.IDs.OverallAnchorsContainer},],id:r.IDs.ColumnSeparatorDiv},{children:[{attributes:[{name:r.AttributeName.HRef,value:r.Urls.PrivacyStatementLink},{name:r.AttributeName.Target,value:r.AttributeValue.BlankWindow},{name:r.AttributeName.Rel,value:r.AttributeValue.NoReferrer},],classes:[r.Classes.Link],id:r.IDs.PrivacyStatementLink,innerText:u.getUIStrings().PrivacyStatement,tag:r.Tags.Anchor},],classes:[r.Classes.FontSubSubText,r.Classes.TextAlignLeft,r.Classes.PrivacyStatementLinkDiv]},],classes:[r.Classes.FormContainer],id:r.IDs.LeftFormContainer},{children:c(n),classes:[r.Classes.FormContainer,r.Classes.Hidden],id:r.IDs.MiddleFormContainer},],classes:[r.Classes.Hidden],id:r.IDs.MainContentHolder,tag:r.Tags.Form},{attributes:[{name:r.AttributeName.TabIndex,value:r.AttributeValue.Zero}],id:r.IDs.LastTabbable},],id:r.IDs.MainContainer},],classes:[e.isRightToLeft()?r.Classes.Rtl:""],id:r.IDs.OverlayBackground}}function h(){return{attributes:[{name:r.AttributeName.DataHtml2CanvasIgnore,value:r.AttributeValue.True}],children:[{children:[{attributes:[{name:r.AttributeName.TabIndex,value:r.AttributeValue.Zero}],id:r.IDs.FirstTabbable},{children:[{children:[o.generate()],classes:[r.Classes.FormContainer],id:r.IDs.MiddleFormContainer},],classes:[r.Classes.Hidden],id:r.IDs.MainContentHolder,tag:r.Tags.Form},{attributes:[{name:r.AttributeName.TabIndex,value:r.AttributeValue.Zero}],id:r.IDs.LastTabbable},],id:r.IDs.MainContainer},],classes:[r.Classes.SingleLayout,e.isRightToLeft()?r.Classes.Rtl:""],id:r.IDs.OverlayBackground}}function c(n){var i={children:[]},r={},t,u;for(t in n)n.hasOwnProperty(t)&&(u=!(n[t].containerId in r),u&&(i.children.push(n[t].generate()),r[n[t].containerId]=!0));return i.children}function l(n){var t={children:[]};return r.FeedbackType.Smile in n&&t.children.push(f(r.IDs.OverallSmileAnchor,r.IDs.OverallSmileImage,'<svg viewBox="0 0 72 72" width="24px" height="24px" focusable="false"><path d="M36 1C16.7 1 1 16.7 1 36s15.7 35 35 35c19.3 0 35-15.7 35-35S55.3 1 36 1ZM49.3 18.3c2.3 0 4.2 2.7 4.2 6 0 3.3-1.9 6-4.2 6 -2.3 0-4.2-2.7-4.2-6C45.1 21 47 18.3 49.3 18.3ZM22.9 18.3c2.3 0 4.2 2.7 4.2 6 0 3.3-1.9 6-4.2 6 -2.3 0-4.2-2.7-4.2-6C18.7 21 20.6 18.3 22.9 18.3ZM36 58.6c-8.5 0-16-4.1-20.9-10.4l3.5-3.6c3.5 4.5 9.9 7.6 17.4 7.6 7.4 0 13.9-3.1 17.4-7.6l3.6 3.6C52.1 54.4 44.4 58.6 36 58.6Z"/><\/svg>',r.IDs.OverallSmileText,u.getUIStrings().SmileForm.Anchor)),r.FeedbackType.Frown in n&&t.children.push(f(r.IDs.OverallFrownAnchor,r.IDs.OverallFrownImage,'<svg viewBox="0 0 72 72" width="24px" height="24px" focusable="false"><path d="M36 1C16.7 1 1 16.7 1 36s15.7 35 35 35c19.3 0 35-15.7 35-35S55.3 1 36 1ZM49.3 18.3c2.3 0 4.2 2.7 4.2 6 0 3.3-1.9 6-4.2 6 -2.3 0-4.2-2.7-4.2-6C45.1 21 47 18.3 49.3 18.3ZM22.9 18.3c2.3 0 4.2 2.7 4.2 6 0 3.3-1.9 6-4.2 6 -2.3 0-4.2-2.7-4.2-6C18.7 21 20.6 18.3 22.9 18.3ZM52.8 57.9c-3.3-4.4-9.6-7.3-16.7-7.3 -7.2 0-13.4 3-16.7 7.3l-3.4-3.4c4.7-6.1 11.9-10 20.1-10 8.2 0 15.5 4 20.2 10L52.8 57.9Z"/><\/svg>',r.IDs.OverallFrownText,u.getUIStrings().FrownForm.Anchor)),r.FeedbackType.Idea in n&&t.children.push(f(r.IDs.OverallIdeaAnchor,r.IDs.OverallIdeaImage,'<svg viewBox="0 0 72 72" width="24px" height="24px" focusable="false"><path d="M42.3 62H29.2c-1.1 0-2 0.9-2 2s1.9 2 3 2h11.1c1.1 0 3-0.9 3-2S43.4 62 42.3 62ZM36 1.1C25 1.1 14.8 7 14.8 20.6c0 2.2 0.8 4.4 0.7 4.1 1.2 2.9 2.7 5.6 6.3 10.9 4.2 6.3 4.7 7.6 4.8 11.1v1.3c0 1.3 1 3 2.7 3h13.5c1.7 0 2.8-1.7 2.8-3v-1.5c0.1-3.5 0.1-4.7 4.2-10.9 3.6-5.4 5.7-8.4 6.8-11 0 0 0.6-1.6 0.6-4.1C57.2 6.9 47 1.1 36 1.1ZM31.9 11.9c-3.2 0-5.6 4.2-5.5 6.2 0.2 4-4.4 3.8-4.4 0.6 0-5.3 2.8-10.3 8.5-10.9C34.6 7.3 34.6 11.9 31.9 11.9ZM43.6 55h-15c-1.1 0-2 0.9-2 2v1c0 1.1 0.9 2 2 2h15c1.1 0 2-0.9 2-2v-1C45.6 55.9 44.7 55 43.6 55ZM39.1 68h-6c-0.8 0-1.5 0.7-1.5 1.5s1.2 1.5 2 1.5h5c0.8 0 2-0.7 2-1.5S39.9 68 39.1 68Z"/><\/svg>',r.IDs.OverallIdeaText,u.getUIStrings().IdeaForm.Anchor)),r.FeedbackType.Bug in n&&t.children.push(f(r.IDs.OverallBugAnchor,r.IDs.OverallBugImage,'<svg viewBox="150 100 1748 1748" width="24px" height="24px" focusable="false"><path d="M1824 1088q0 26-19 45t-45 19h-224q0 171-67 290l208 209q19 19 19 45t-19 45q-18 19-45 19t-45-19l-198-197q-5 5-15 13t-42 28.5-65 36.5-82 29-97 13v-896h-128v896q-51 0-101.5-13.5t-87-33-66-39-43.5-32.5l-15-14-183 207q-20 21-48 21-24 0-43-16-19-18-20.5-44.5t15.5-46.5l202-227q-58-114-58-274h-224q-26 0-45-19t-19-45 19-45 45-19h224v-294l-173-173q-19-19-19-45t19-45 45-19 45 19l173 173h844l173-173q19-19 45-19t45 19 19 45-19 45l-173 173v294h224q26 0 45 19t19 45zm-480-576h-640q0-133 93.5-226.5t226.5-93.5 226.5 93.5 93.5 226.5z"/><\/svg>',r.IDs.OverallBugText,u.getUIStrings().BugForm.Anchor)),t.children}function f(n,t,i,u,f){return{attributes:[{name:r.AttributeName.Type,value:r.AttributeValue.Button},],children:[{classes:[r.Classes.OverallImage],id:t,innerHTML:i,tag:r.Tags.Div},{classes:[r.Classes.FontSubtitle,r.Classes.OverallText],id:u,innerText:f},],classes:[r.Classes.OverallAnchor,r.Classes.TextAlignLeft],id:n,tag:r.Tags.Button}}i.__esModule=!0;var r=n("./../../Constants"),u=n("./../../UIStrings/UIStrings"),e=n("./../Utils"),o=n("./FormTemplates/SingleFormTemplate");i.generateMulti=s;i.generateSingle=h},{"./../../Constants":45,"./../../UIStrings/UIStrings":67,"./../Utils":85,"./FormTemplates/SingleFormTemplate":72}],75:[function(n,t,i){"use strict";function f(n){var f=e(),t,i;if(n.id===r.IDs.LastTabbable){for(t=0;t<f.length;t++)if(i=f[t],i.id!==r.IDs.FirstTabbable&&u(i)){i.focus();return}}else if(n.id===r.IDs.FirstTabbable)for(t=f.length-1;t>=0;t--)if(i=f[t],i.id!==r.IDs.LastTabbable&&u(i)){i.focus();return}}function e(){return document.getElementById(r.IDs.MainContainer).querySelectorAll("a[href], area[href], input:not([disabled]):not([tabindex='-1']), button:not([disabled]):not([tabindex='-1']), select:not([disabled]):not([tabindex='-1']), textarea:not([disabled]):not([tabindex ='-1']), object, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]")}function u(n){if(!n.parentElement)return!1;if(/\S/.test(n.parentElement.id)){if(n.parentElement.className.indexOf(r.Classes.Visible)>=0)return!0;if(n.parentElement.className.indexOf(r.Classes.Hidden)>=0)return!1}return u(n.parentElement)}i.__esModule=!0;var r=n("./../../Constants");i.cycleTabFocus=f},{"./../../Constants":45}],76:[function(n,t,i){"use strict";function f(n){for(var e,o=n?n:[],i=[{attributes:[{name:"selected",value:"true"}],innerText:u.getUIStrings().Form.CategoryPlaceholder,tag:r.Tags.Option}],t=0,f=o;t<f.length;t++)e=f[t],i.push({innerText:e,tag:r.Tags.Option});return i}i.__esModule=!0;var u=n("./../UIStrings/UIStrings"),r=n("./../Constants");i.generate=f},{"./../Constants":45,"./../UIStrings/UIStrings":67}],77:[function(n,t,i){"use strict";function u(n,t,i){for(var e,o={children:[{classes:[r.Classes.FontSubText],innerText:t,tag:r.Tags.Legend},],tag:r.Tags.FieldSet},u=0,s=i;u<s.length;u++)e=s[u],Array.prototype.push.apply(o.children,f(e[0].toString(),e[1],n));return{children:[o],classes:[r.Classes.ChoiceGroup],id:n}}function f(n,t,i){return[{attributes:[{name:r.AttributeName.Type,value:r.AttributeValue.Radio},{name:r.AttributeName.Value,value:n},{name:r.AttributeName.Name,value:i},],id:n,tag:r.Tags.Input},{attributes:[{name:r.AttributeName.For,value:n}],children:[{children:[{tag:r.Tags.Span}],classes:[r.Classes.ChoiceGroupIcon],tag:r.Tags.Span},{classes:["obf-ChoiceGroupLabel"],innerHTML:t,tag:r.Tags.Span},],classes:[r.Classes.FontSubText],tag:r.Tags.Label},]}i.__esModule=!0;var r=n("./../Constants");i.generateRadioGroup=u},{"./../Constants":45}],78:[function(n,t,i){"use strict";function b(n){return{children:[l,{attributes:[{name:r.AttributeName.Type,value:"radio"},{name:r.AttributeName.Name,value:n},{name:r.AttributeName.Value,value:"1"},],tag:r.Tags.Input},a,{attributes:[{name:r.AttributeName.Type,value:"radio"},{name:r.AttributeName.Name,value:n},{name:r.AttributeName.Value,value:"2"},],tag:r.Tags.Input},v,{attributes:[{name:r.AttributeName.Type,value:"radio"},{name:r.AttributeName.Name,value:n},{name:r.AttributeName.Value,value:"3"},],tag:r.Tags.Input},y,{attributes:[{name:r.AttributeName.Type,value:"radio"},{name:r.AttributeName.Name,value:n},{name:r.AttributeName.Value,value:"4"},],tag:r.Tags.Input},p,{attributes:[{name:r.AttributeName.Type,value:"radio"},{name:r.AttributeName.Name,value:n},{name:r.AttributeName.Value,value:"5"},],tag:r.Tags.Input},w,],classes:[r.Classes.Rating],id:n,tag:r.Tags.Span}}i.__esModule=!0;var r=n("./../Constants"),u="obf-star",f={children:[{attributes:[{name:r.AttributeName.Id,value:u},{name:r.AttributeName.X,value:"0"},{name:r.AttributeName.Y,value:"0"},{name:r.AttributeName.Width,value:"105"},{name:r.AttributeName.Height,value:"100"},{name:r.AttributeName.Points,value:"52.5, 80.3 84, 100 76.3, 63 105, 38 67.2, 35 52.5, 0 37.8, 35 0, 38 28.7, 63 20, 100 52.5, 80.3"},],id:u,tag:r.Tags.Polygon},],tag:r.Tags.Defs},e={attributes:[{name:r.AttributeName.xlinkHref,value:"#"+u}],tag:r.Tags.Use},o={attributes:[{name:r.AttributeName.xlinkHref,value:"#"+u},{name:r.AttributeName.Transform,value:"translate(105 0)"},],tag:r.Tags.Use},s={attributes:[{name:r.AttributeName.xlinkHref,value:"#"+u},{name:r.AttributeName.Transform,value:"translate(210 0)"},],tag:r.Tags.Use},h={attributes:[{name:r.AttributeName.xlinkHref,value:"#"+u},{name:r.AttributeName.Transform,value:"translate(315 0)"},],tag:r.Tags.Use},c={attributes:[{name:r.AttributeName.xlinkHref,value:"#"+u},{name:r.AttributeName.Transform,value:"translate(420 0)"},],tag:r.Tags.Use},l={attributes:[{name:r.AttributeName.ViewBox,value:"0 0 525 100"}],children:[f,e,o,s,h,c],classes:[r.Classes.RatingGraphic],tag:r.Tags.Svg},a={attributes:[{name:r.AttributeName.ViewBox,value:"0 0 105 100"}],children:[f,e],classes:[r.Classes.RatingGraphic,r.Classes.RatingGraphicFilled],tag:r.Tags.Svg},v={attributes:[{name:r.AttributeName.ViewBox,value:"0 0 210 100"}],children:[f,e,o],classes:[r.Classes.RatingGraphic,r.Classes.RatingGraphicFilled],tag:r.Tags.Svg},y={attributes:[{name:r.AttributeName.ViewBox,value:"0 0 315 100"}],children:[f,e,o,s],classes:[r.Classes.RatingGraphic,r.Classes.RatingGraphicFilled],tag:r.Tags.Svg},p={attributes:[{name:r.AttributeName.ViewBox,value:"0 0 420 100"}],children:[f,e,o,s,h],classes:[r.Classes.RatingGraphic,r.Classes.RatingGraphicFilled],tag:r.Tags.Svg},w={attributes:[{name:r.AttributeName.ViewBox,value:"0 0 525 100"}],children:[f,e,o,s,h,c],classes:[r.Classes.RatingGraphic,r.Classes.RatingGraphicFilled],tag:r.Tags.Svg};i.generate=b},{"./../Constants":45}],79:[function(n,t,i){"use strict";function u(n,t){var i,e,o,f,s,h;if(typeof n.brs=="undefined"&&(n.brs=!0),!n.brs)return null;if(n.tag||(n.tag=r.Tags.Div),n.tag===r.Tags.Svg&&(t=!0),i=t?document.createElementNS("http://www.w3.org/2000/svg",n.tag):document.createElement(n.tag),n.attributes)for(e=void 0,f=0;f<n.attributes.length;f++)e=n.attributes[f],e.name===r.AttributeName.xlinkHref?i.setAttributeNS("http://www.w3.org/1999/xlink",r.AttributeName.HRef,e.value):i.setAttribute(e.name,e.value);if(n.id&&(i.id=n.id),n.classes&&(o=n.classes.join(" "),t?i.setAttribute(r.AttributeName.Class,o):i.className=o),n.innerText&&!t&&(i.textContent=n.innerText),n.innerHTML&&!t&&(i.innerHTML=n.innerHTML),n.children)for(f=0;f<n.children.length;f++)s=n.children[f],s&&(h=u(s,t),h&&i.appendChild(h));return i}i.__esModule=!0;var r=n("./../Constants");i.elementFromJson=u},{"./../Constants":45}],80:[function(n,t,i){"use strict";function a(n){var t=v(n.element)-o;t<=0&&(t=1);s(n.element,t)}function v(n){return parseFloat(window.getComputedStyle(n).getPropertyValue("opacity"))}function s(n,t){n.style.opacity=t.toString()}function y(){var n=document.createElement("div");return n.classList.add(h.Classes.SpinnerCircle),n.style.width=n.style.height=r*e+"px",n}i.__esModule=!0;var h=n("./../Constants"),f=n("./Utils"),c=90,u=8,e=.2,r=34,o=1/u,l=function(){function n(n){this.circleObjects=[];this.spinnerId=n;this.spinner=document.getElementById(this.spinnerId);this.createCirclesAndArrange();this.initializeOpacities();this.start();f.setElementVisibility(n,!0)}return n.prototype.destroy=function(){f.setElementVisibility(this.spinnerId,!1);this.stop()},n.prototype.start=function(){var n=this;this.stop();this.interval=setInterval(function(){for(var t=n.circleObjects.length;t--;)a(n.circleObjects[t])},c)},n.prototype.stop=function(){clearInterval(this.interval)},n.prototype.createCirclesAndArrange=function(){for(var t=0,i=r*e,h=2*Math.PI/u,f=u,o,s=(r-i)*.5;f--;){var n=y(),c=Math.round(r*.5+s*Math.cos(t)-n.clientWidth*.5)-i*.5,l=Math.round(r*.5+s*Math.sin(t)-n.clientHeight*.5)-i*.5;this.spinner.appendChild(n);n.style.left=c+"px";n.style.top=l+"px";t+=h;o={element:n,j:f};this.circleObjects.push(o)}},n.prototype.initializeOpacities=function(){var n=0,r=1,t,i;for(n;n<u;n++)i=this.circleObjects[n],t=o*r++,s(i.element,t)},n}();i.Spinner=l},{"./../Constants":45,"./Utils":85}],81:[function(n,t,i){"use strict";function s(n){b();l(n)}function b(){k()}function o(n,t,i){f.registerListener(n,t,i);h.push({event:t,id:n,listener:i})}function k(){for(var t,n=0,i=h;n<i.length;n++)t=i[n],f.unregisterListener(t.id,t.event,t.listener);h=[]}function d(n){var h,i,y,t;for(n===void 0&&(n=function(){return}),l=n,c=!0,o(r.IDs.ToastContainer,"keyup",g),o(r.IDs.ToastCancel,"click",nt),o(r.IDs.TPromptContainer,"click",tt),o(r.IDs.TFormSubmitButton,"click",rt),o(r.IDs.TFormEmailCheckBox,"click",a),a(null),h=document.querySelectorAll('input[name="'+r.IDs.TFormRating+'"]'),i=0;i<h.length;++i)f.registerListenerToElement(h[i],"click",it);if(u.get().getFloodgateSurvey().showPrompt?e.getLogger().logEvent(e.EventIds.Survey.UI.Prompt.Shown.VALUE,{CampaignId:u.get().getFloodgateSurvey().getCampaignId(),SurveyId:u.get().getFloodgateSurvey().getId(),SurveyType:u.get().getFloodgateSurvey().getSurveyType()}):v(),y=u.get().getFloodgateInitOptions().autoDismiss,y!==r.AutoDismissValues.NoAutoDismiss){t=void 0;switch(y){case r.AutoDismissValues.SevenSeconds:t=7e3;break;case r.AutoDismissValues.FourteenSeconds:t=14e3;break;case r.AutoDismissValues.TwentyOneSeconds:t=21e3;break;case r.AutoDismissValues.TwentyEightSeconds:t=28e3}t!==undefined&&setTimeout(function(){c&&s(!1)},t)}}function a(){var n=document.getElementById(r.IDs.TFormEmailCheckBox),t;n&&(t=document.getElementById(r.IDs.TFormEmailTextBox),t.value=n.checked?u.get().getCommonInitOptions().userEmail:null,t.disabled=!n.checked)}function g(n){n.keyCode===r.Keys.Esc&&(n.preventDefault(),n.stopPropagation(),s(!1))}function nt(n){n.preventDefault();n.stopPropagation();s(!1)}function tt(n){n.preventDefault();n.stopPropagation();v()}function v(){c=!1;f.setElementVisibility(r.IDs.TPromptContainer,!1);f.setElementVisibility(r.IDs.TFormContainer,!0);e.getLogger().logEvent(e.EventIds.Survey.UI.Form.Shown.VALUE,{CampaignId:u.get().getFloodgateSurvey().getCampaignId(),SurveyId:u.get().getFloodgateSurvey().getId(),SurveyType:u.get().getFloodgateSurvey().getSurveyType()})}function it(){document.getElementById(r.IDs.TFormSubmitButton).disabled=!1}function rt(n){var o,h;n.preventDefault();n.stopPropagation();f.setElementVisibility(r.IDs.TFormSubmitButton,!1);var c=new p.Spinner(r.IDs.TFormSubmitButtonSpinner),t=new y.Transporter(u.get().getCommonInitOptions().environment,w.ISurvey.Type[u.get().getFloodgateSurvey().getSurveyType()],u.get().getCommonInitOptions().appId,"Survey",u.get().getCommonInitOptions().applicationGroup,u.get().getCommonInitOptions().telemetryGroup,u.get().getCommonInitOptions().webGroup),i=document.getElementById(r.IDs.TFormComment),l=i&&!!i.value,a=document.querySelector('input[name="'+r.IDs.TFormRating+'"]:checked');u.get().getFloodgateSurvey().setValues(Number(a.value),l?i.value:"");t.setManifestValues(u.get().getFloodgateSurvey().getJsonElements());o=document.getElementById(r.IDs.TFormEmailCheckBox);h=document.getElementById(r.IDs.TFormEmailTextBox);o&&o.checked&&h.value!==""&&t.setEmail(h.value);t.submit();c.destroy();s(!0);e.getLogger().logEvent(e.EventIds.Survey.UI.Form.Submit.VALUE,{CampaignId:u.get().getFloodgateSurvey().getCampaignId(),SurveyId:u.get().getFloodgateSurvey().getId(),SurveyType:u.get().getFloodgateSurvey().getSurveyType()})}var h;i.__esModule=!0;var y=n("./../../Transport/Transport"),r=n("./../../Constants"),f=n("./../Utils"),p=n("./../SpinnerControl"),e=n("./../../Logging/Logging"),u=n("./../../Configuration/Configuration"),w=n("@ms-ofb/officefloodgatecore/dist/src/Api/Api"),l,c;h=[];i.register=d},{"./../../Configuration/Configuration":44,"./../../Constants":45,"./../../Logging/Logging":56,"./../../Transport/Transport":66,"./../SpinnerControl":80,"./../Utils":85,"@ms-ofb/officefloodgatecore/dist/src/Api/Api":5}],82:[function(n,t,i){"use strict";function h(){return{attributes:[{name:r.AttributeName.DataHtml2CanvasIgnore,value:r.AttributeValue.True},{name:r.AttributeName.Role,value:"dialog"},{name:"aria-labelledby",value:r.IDs.TPromptTitle},{name:"aria-describedby",value:r.IDs.TPromptText},],children:[{attributes:[{name:r.AttributeName.Type,value:r.AttributeValue.Button},{name:r.AttributeName.AriaLabel,value:e.getUIStrings().CloseLabel},],id:r.IDs.ToastCancel,innerHTML:'<svg viewBox="4 4 16 16" width="16px" height="16px" focusable="false"><path d="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z" fill="#000"/><\/svg>',tag:r.Tags.Button},c(),a(),],classes:[r.Classes.Toast,s.isRightToLeft()?r.Classes.Rtl:""],id:r.IDs.ToastContainer}}function c(){return{attributes:[{name:"aria-labelledby",value:r.IDs.TPromptTitle}],children:[{classes:[r.Classes.FontText,r.Classes.TextAlignLeft,],id:r.IDs.TPromptTitle,innerText:f.get().getFloodgateSurvey().getTitle()},{classes:[r.Classes.FontSubText,r.Classes.TextAlignLeft,],id:r.IDs.TPromptText,innerText:f.get().getFloodgateSurvey().getPromptQuestion()},],id:r.IDs.TPromptContainer,tag:r.Tags.Button}}function l(){var n=f.get().getCommonInitOptions().userEmailConsentDefault;return n?u.AttributeValue.Checked:u.AttributeValue.Unchecked}function a(){return{children:[{classes:[r.Classes.FontText,r.Classes.TextAlignLeft,],id:r.IDs.TFormTitle,innerText:f.get().getFloodgateSurvey().getTitle()},v(),{attributes:[{name:r.AttributeName.Placeholder,value:f.get().getFloodgateSurvey().getCommentQuestion()},{name:r.AttributeName.AriaLabel,value:f.get().getFloodgateSurvey().getCommentQuestion()},{name:r.AttributeName.MaxLength,value:r.AttributeValue.TextAreaMaxLength},],classes:[r.Classes.FontSubText,r.Classes.TextInput],id:r.IDs.TFormComment,tag:r.Tags.TextArea},{brs:f.get().getFloodgateSurvey().showEmailRequest,children:[{attributes:[{name:u.AttributeName.Type,value:u.AttributeValue.Checkbox},{name:l(),value:""},],classes:[u.Classes.TFormEmailCheckbox,u.Classes.CheckBox],id:u.IDs.TFormEmailCheckBox,tag:u.Tags.Input},{attributes:[{name:u.AttributeName.For,value:u.IDs.TFormEmailCheckBox}],classes:[u.Classes.FontSubText,u.Classes.TextAlignLeft,u.Classes.TFormEmailLabel],innerText:e.getUIStrings().Form.EmailCheckBoxLabel,tag:u.Tags.Label},{attributes:[{name:u.AttributeName.Type,value:u.AttributeValue.Text},{name:u.AttributeName.Placeholder,value:e.getUIStrings().Form.EmailPlaceholder},{name:u.AttributeName.AriaLabel,value:e.getUIStrings().Form.EmailPlaceholder},{name:u.AttributeName.Name,value:u.IDs.BasicFormEmailInput},{name:u.AttributeName.MaxLength,value:u.AttributeValue.TextAreaMaxLength},{name:u.AttributeName.Value,value:f.get().getCommonInitOptions().userEmailConsentDefault?f.get().getCommonInitOptions().userEmail:""},],classes:[u.Classes.FontSubText,u.Classes.FormEmailInput,u.Classes.TextInput],id:u.IDs.TFormEmailTextBox,tag:u.Tags.Input},]},{children:[{attributes:[{name:r.AttributeName.HRef,value:r.Urls.PrivacyStatementLink},{name:r.AttributeName.Target,value:r.AttributeValue.BlankWindow},{name:r.AttributeName.Rel,value:r.AttributeValue.NoReferrer},],classes:[r.Classes.Link],innerText:e.getUIStrings().PrivacyStatement,tag:r.Tags.Anchor},],classes:[r.Classes.FontSubSubText,r.Classes.TextAlignLeft,r.Classes.PrivacyStatementLinkDiv]},{children:[{attributes:[{name:r.AttributeName.Disabled,value:r.AttributeValue.True}],classes:[r.Classes.FontSubText,r.Classes.SubmitButton,],id:r.IDs.TFormSubmitButton,innerText:e.getUIStrings().Form.Submit,tag:r.Tags.Button},{classes:[r.Classes.Spinner,r.Classes.Hidden],id:r.IDs.TFormSubmitButtonSpinner,tag:r.Tags.Div},],id:r.IDs.TFormSubmitButtonContainer},],classes:[r.Classes.Hidden],id:r.IDs.TFormContainer}}function v(){for(var e,t=[],s=f.get().getFloodgateSurvey().getRatingValuesAscending(),i=0,n=0,u=s;n<u.length;n++)e=u[n],t.push([i,e]),i++;return o.generateRadioGroup(r.IDs.TFormRating,f.get().getFloodgateSurvey().getRatingQuestion(),t.reverse())}i.__esModule=!0;var o=n("./../ChoiceGroupControl"),f=n("./../../Configuration/Configuration"),r=n("./../../Constants"),e=n("./../../UIStrings/UIStrings"),s=n("./../Utils"),u=n("./../../Constants");i.generate=h},{"./../../Configuration/Configuration":44,"./../../Constants":45,"./../../UIStrings/UIStrings":67,"./../ChoiceGroupControl":77,"./../Utils":85}],83:[function(n,t,i){"use strict";function h(n){c(s.elementFromJson(o.generate()));e.register(function(t){u.setElementVisibility(r.IDs.ToastContainer,!1);u.deleteElementById(r.IDs.ToastContainer);f.get().getFloodgateInitOptions().onDismiss(f.get().getFloodgateSurvey().getCampaignId(),t);n()})}function c(n){document.body.insertBefore(n,document.body.firstChild);u.setElementVisibility(r.IDs.ToastContainer,!0)}i.__esModule=!0;var r=n("./../../Constants"),e=n("./Events"),o=n("./Layout"),s=n("./../Renderer"),u=n("./../Utils"),f=n("./../../Configuration/Configuration");i.createSurvey=h},{"./../../Configuration/Configuration":44,"./../../Constants":45,"./../Renderer":79,"./../Utils":85,"./Events":81,"./Layout":82}],84:[function(n,t,i){"use strict";var r,u,f;i.__esModule=!0;r=n("./BellyBand/BellyBand");i.createBellyBandMulti=r.createMulti;u=n("./BellyBand/BellyBand");i.createBellyBandSingle=u.createSingle;f=n("./Toast/Toast");i.createSurvey=f.createSurvey},{"./BellyBand/BellyBand":68,"./Toast/Toast":83}],85:[function(n,t,i){"use strict";function h(n,t){var i=t?r.Classes.Hidden:r.Classes.Visible,u=t?r.Classes.Visible:r.Classes.Hidden;o(n,i,u)}function c(n){var t=document.getElementById(n);t!=null&&t.parentNode!=null&&t.parentNode.removeChild(t)}function f(n,t){var i=document.getElementById(n);i&&(i.className.match(new RegExp("\\b"+t+"\\b"))||(i.className=i.className+" "+t))}function e(n,t){var i=document.getElementById(n);i&&(i.className=i.className.split(new RegExp("\\b"+t+"\\b","i")).join(" "),i.className=i.className.split(/\s+/).join(" "))}function o(n,t,i){e(n,t);f(n,i)}function l(n,t,i){var r=document.getElementById(n);r&&r.setAttribute(t,i)}function u(n,t,i){n.addEventListener?n.addEventListener(t,i,!1):n.attachEvent&&n.attachEvent("on"+t,i)}function s(n,t,i){n.removeEventListener?n.removeEventListener(t,i,!1):n.detachEvent&&n.detachEvent("on"+t,i)}function a(n,t,i){var r=document.getElementById(n);r&&u(r,t,i)}function v(n,t,i){n&&u(n,t,i)}function y(n,t,i){var r=document.getElementById(n);r&&s(r,t,i)}function p(){var n=-1,t=window.navigator.userAgent,i;return t.indexOf("Trident")>-1&&(i=new RegExp("Trident/([0-9]{1,}[.0-9]{0,})"),i.exec(t)!=null&&(n=parseFloat(RegExp.$1)+4)),n}function w(){return getComputedStyle(document.documentElement).direction==="rtl"}i.__esModule=!0;var r=n("./../Constants");i.setElementVisibility=h;i.deleteElementById=c;i.addClassById=f;i.deleteClassById=e;i.replaceClassesById=o;i.setAttributeOnHtmlElement=l;i.addEventListenerHelper=u;i.removeEventListenerHelper=s;i.registerListener=a;i.registerListenerToElement=v;i.unregisterListener=y;i.getInternetExplorerVersion=p;i.isRightToLeft=w},{"./../Constants":45}],86:[function(n,t,i){"use strict";function e(n){return typeof n=="number"}function o(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n}function u(n){return typeof n=="string"}function s(n){return!h(n)&&typeof n=="object"}function f(n){return typeof n=="boolean"}function h(n){return n==null}function c(n){return u(n)&&/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(n)}function l(n,t){if(!s(n))throw t+" is not an object: "+n;}function a(n,t){if(!e(n))throw t+" is not a number: "+n;}function v(n,t){if(!u(n))throw t+" is not a string: "+n;}function y(n,t){if(!f(n))throw t+" is not a boolean: "+n;}function p(n,t){if(!c(n))throw t+" is not a guid: "+n;}function w(n,t){if(!Array.isArray(n))throw t+" is not an array: "+n;}function b(){return(r()+r()+"-"+r()+"-4"+r().substr(0,3)+"-"+r()+"-"+r()+r()+r()).toLowerCase()}function r(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}function k(n,t){var r,i;if(!t)return t;if(r=t,n)for(i in n)n.hasOwnProperty(i)&&(r[i]=n[i]);return r}i.__esModule=!0;i.isInteger=o;i.isBoolean=f;i.expectObject=l;i.expectNumber=a;i.expectString=v;i.expectBoolean=y;i.expectGuid=p;i.expectArray=w;i.guid=b;i.overrideValues=k},{}],87:[function(n,t,i){"use strict";i.__esModule=!0;i["default"]="1.3.0"},{}],88:[function(n,t,i){"use strict";function r(){return window.innerWidth?window.innerWidth<800:!0}i.__esModule=!0;i.isNarrow=r},{}],89:[function(n,t,i){"use strict";function r(){return window}function u(n){window.OfficeBrowserFeedback=window.OfficeBrowserFeedback||{};window.OfficeBrowserFeedback.setUiStrings=n}function f(n){window.OfficeBrowserFeedback=window.OfficeBrowserFeedback||{};window.OfficeBrowserFeedback.singleFeedback=n}function e(n){window.OfficeBrowserFeedback=window.OfficeBrowserFeedback||{};window.OfficeBrowserFeedback.multiFeedback=n}function o(n){window.OfficeBrowserFeedback=window.OfficeBrowserFeedback||{};window.OfficeBrowserFeedback.floodgate=window.OfficeBrowserFeedback.floodgate||{};window.OfficeBrowserFeedback.floodgate.showSurvey=n}function s(n){window.OfficeBrowserFeedback=window.OfficeBrowserFeedback||{};window.OfficeBrowserFeedback.floodgate=window.OfficeBrowserFeedback.floodgate||{};window.OfficeBrowserFeedback.floodgate.showCustomSurvey=n}function h(n){window.OfficeBrowserFeedback=window.OfficeBrowserFeedback||{};window.OfficeBrowserFeedback.floodgate=window.OfficeBrowserFeedback.floodgate||{};window.OfficeBrowserFeedback.floodgate.initialize=n}function c(n){window.OfficeBrowserFeedback=window.OfficeBrowserFeedback||{};window.OfficeBrowserFeedback.floodgate=window.OfficeBrowserFeedback.floodgate||{};window.OfficeBrowserFeedback.floodgate.start=n}function l(n){window.OfficeBrowserFeedback=window.OfficeBrowserFeedback||{};window.OfficeBrowserFeedback.floodgate=window.OfficeBrowserFeedback.floodgate||{};window.OfficeBrowserFeedback.floodgate.stop=n}function a(n){window.OfficeBrowserFeedback=window.OfficeBrowserFeedback||{};window.OfficeBrowserFeedback.floodgate=window.OfficeBrowserFeedback.floodgate||{};window.OfficeBrowserFeedback.floodgate.getEngine=n}i.__esModule=!0;i.get=r;i.setSetUiStrings=u;i.setSingleFeedback=f;i.setMultiFeedback=e;i.setFloodgateShowSurvey=o;i.setFloodgateShowCustomSurvey=s;i.setFloodgateInitialize=h;i.setFloodgateStart=c;i.setFloodgateStop=l;i.setFloodgateGetEngine=a},{}],90:[function(n,t,i){(function(n,r){var u,f;if(typeof i=="object"&&typeof t=="object")t.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{u=r();for(f in u)(typeof i=="object"?i:n)[f]=u[f]}})(this,function(){return function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var i={};return t.m=n,t.c=i,t.i=function(n){return n},t.d=function(n,i,r){t.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:r})},t.n=function(n){var i=n&&n.__esModule?function(){return n["default"]}:function(){return n};return t.d(i,"a",i),i},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=15)}([function(n,t){"use strict";var i,r,u;Object.defineProperty(t,"__esModule",{value:!0});i=function(){function n(n){this.low=0;this.high=0;this.low=parseInt(n,10);this.low<0&&(this.high=-1)}return n.prototype.Equals=function(t){var i=new n(t);return this.low===i.low&&this.high===i.high},n}();t.Int64=i;r=function(){function n(n){this.low=0;this.high=0;this.low=parseInt(n,10)}return n.prototype.Equals=function(t){var i=new n(t);return this.low===i.low&&this.high===i.high},n}();t.UInt64=r;u=function(){function n(){}return n.ToByte=function(n){return this.ToUInt8(n)},n.ToInt16=function(n){var t=(n&32768)<<16>>16;return n&32767|t},n.ToInt32=function(n){var t=n&2147483648;return n&2147483647|t},n.ToUInt8=function(n){return n&255},n.ToUInt32=function(n){return n&4294967295},n}();t.Number=u},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i;(function(n){n[n.NotSet=0]="NotSet";n[n.DistinguishedName=1]="DistinguishedName";n[n.GenericData=2]="GenericData";n[n.IPV4Address=3]="IPV4Address";n[n.IPv6Address=4]="IPv6Address";n[n.MailSubject=5]="MailSubject";n[n.PhoneNumber=6]="PhoneNumber";n[n.QueryString=7]="QueryString";n[n.SipAddress=8]="SipAddress";n[n.SmtpAddress=9]="SmtpAddress";n[n.Identity=10]="Identity";n[n.Uri=11]="Uri";n[n.Fqdn=12]="Fqdn";n[n.IPV4AddressLegacy=13]="IPV4AddressLegacy"})(i=t.AWTPiiKind||(t.AWTPiiKind={}))},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(9),f=i(1),u=i(3),e=function(){function n(){}return n.getPayloadBlob=function(n,t){var f=new r.IO.MemoryStream,i=new r.CompactBinaryProtocolWriter(f);return i.WriteFieldBegin(r.BondDataType.BT_MAP,3),i.WriteMapContainerBegin(t,r.BondDataType.BT_STRING,r.BondDataType.BT_LIST),Object.keys(n).forEach(function(t){var f,e;for(i.WriteString(t),f=n[t],i.WriteContainerBegin(1,r.BondDataType.BT_STRUCT),i.WriteFieldBegin(r.BondDataType.BT_STRING,2),i.WriteString("act_default_source"),i.WriteFieldBegin(r.BondDataType.BT_STRING,5),i.WriteString(u.newGuid()),i.WriteFieldBegin(r.BondDataType.BT_INT64,6),i.WriteInt64(u.numberToBondInt64(Date.now())),i.WriteFieldBegin(r.BondDataType.BT_LIST,8),i.WriteContainerBegin(f.length,r.BondDataType.BT_STRUCT),e=0;e<f.length;++e)i.WriteBlob(f[e]);i.WriteStructEnd(!1)}),i.WriteStructEnd(!1),f.GetBuffer()},n.getEventBlob=function(n){var o=new r.IO.MemoryStream,t=new r.CompactBinaryProtocolWriter(o),i,e;return t.WriteFieldBegin(r.BondDataType.BT_STRING,1),t.WriteString(n.id),t.WriteFieldBegin(r.BondDataType.BT_INT64,3),t.WriteInt64(u.numberToBondInt64(n.timestamp)),t.WriteFieldBegin(r.BondDataType.BT_STRING,5),t.WriteString(n.type),t.WriteFieldBegin(r.BondDataType.BT_STRING,6),t.WriteString(n.name),i=[],e=[],Object.keys(n.properties).forEach(function(t){var r=n.properties[t];r.pii===f.AWTPiiKind.NotSet?i.push(t):e.push(t)}),i.length&&(t.WriteFieldBegin(r.BondDataType.BT_MAP,13),t.WriteMapContainerBegin(i.length,r.BondDataType.BT_STRING,r.BondDataType.BT_STRING),i.forEach(function(i){t.WriteString(i);t.WriteString(n.properties[i].value)})),e.length&&(t.WriteFieldBegin(r.BondDataType.BT_MAP,30),t.WriteMapContainerBegin(e.length,r.BondDataType.BT_STRING,r.BondDataType.BT_STRUCT),e.forEach(function(i){t.WriteString(i);t.WriteFieldBegin(r.BondDataType.BT_INT32,1);t.WriteInt32(1);t.WriteFieldBegin(r.BondDataType.BT_INT32,2);t.WriteInt32(n.properties[i].pii);t.WriteFieldBegin(r.BondDataType.BT_STRING,3);t.WriteString(n.properties[i].value);t.WriteStructEnd(!1)})),t.WriteStructEnd(!1),o.GetBuffer()},n.base64Encode=function(n){return r.Encoding.Base64.GetString(n)},n}();t.default=e},function(n,t,i){"use strict";function f(n){var t=new r.Int64("0");return t.low=n&4294967295,t.high=Math.floor(n/4294967296),t}function e(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(u,function(n){var t=Math.random()*16|0,i=n==="x"?t:t&3|8;return i.toString(16)})}function o(n){return!isNaN(n)&&n!==null&&n>=0&&n<=13?!0:!1}Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),u=/[xy]/g;t.numberToBondInt64=f;t.newGuid=e;t.isPii=o},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Version="1.2.2";t.FullVersionString="AWT-Web-CJS-"+t.Version},function(n,t,i){"use strict";var r,u;Object.defineProperty(t,"__esModule",{value:!0});r=i(1);t.AWTPiiKind=r.AWTPiiKind;u=i(13);t.AWT=u.default;t.AWT_COLLECTOR_URL_UNITED_STATES="https://us.pipe.aria.microsoft.com/Collector/3.0/";t.AWT_COLLECTOR_URL_GERMANY="https://de.pipe.aria.microsoft.com/Collector/3.0/";t.AWT_COLLECTOR_URL_JAPAN="https://jp.pipe.aria.microsoft.com/Collector/3.0/";t.AWT_COLLECTOR_URL_AUSTRALIA="https://au.pipe.aria.microsoft.com/Collector/3.0/";t.AWT_COLLECTOR_URL_EUROPE="https://eu.pipe.aria.microsoft.com/Collector/3.0/"},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i;(function(n){n[n.BT_STOP=0]="BT_STOP";n[n.BT_STOP_BASE=1]="BT_STOP_BASE";n[n.BT_UINT8=3]="BT_UINT8";n[n.BT_UINT32=5]="BT_UINT32";n[n.BT_UINT64=6]="BT_UINT64";n[n.BT_STRING=9]="BT_STRING";n[n.BT_STRUCT=10]="BT_STRUCT";n[n.BT_LIST=11]="BT_LIST";n[n.BT_MAP=13]="BT_MAP";n[n.BT_INT32=16]="BT_INT32";n[n.BT_INT64=17]="BT_INT64";n[n.BT_UNAVAILABLE=127]="BT_UNAVAILABLE"})(i=t.BondDataType||(t.BondDataType={}))},function(n,t,i){"use strict";var r,u,f,e,o,s;Object.defineProperty(t,"__esModule",{value:!0});r=i(0);u=function(){function n(){}return n.GetBytes=function(n){for(var t,i=[],r=0;r<n.length;++r)t=n.charCodeAt(r),t<128?i.push(t):t<2048?i.push(192|t>>6,128|t&63):t<55296||t>=57344?i.push(224|t>>12,128|t>>6&63,128|t&63):(t=65536+((t&1023)<<10|n.charCodeAt(++r)&1023),i.push(240|t>>18,128|t>>12&63,128|t>>6&63,128|t&63));return i},n}();t.Utf8=u;f=function(){function n(){}return n.GetString=function(n){for(var u,f,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=[],e=n.length%3,o=function(n){return[t.charAt(n>>18&63),t.charAt(n>>12&63),t.charAt(n>>6&63),t.charAt(n&63)].join("")},r=0,s=n.length-e;r<s;r+=3)u=(n[r]<<16)+(n[r+1]<<8)+n[r+2],i.push(o(u));switch(e){case 1:u=n[n.length-1];i.push(t.charAt(u>>2));i.push(t.charAt(u<<4&63));i.push("==");break;case 2:f=(n[n.length-2]<<8)+n[n.length-1];i.push(t.charAt(f>>10));i.push(t.charAt(f>>4&63));i.push(t.charAt(f<<2&63));i.push("=")}return i.join("")},n}();t.Base64=f;e=function(){function n(){}return n.GetBytes=function(n){for(var t=[];n&4294967168;)t.push(n&127|128),n>>>=7;return t.push(n&127),t},n}();t.Varint=e;o=function(){function n(){}return n.GetBytes=function(n){for(var t=n.low,i=n.high,r=[];i||4294967168&t;)r.push(t&127|128),t=(i&127)<<25|t>>>7,i>>>=7;return r.push(t&127),r},n}();t.Varint64=o;s=function(){function n(){}return n.EncodeZigzag32=function(n){return n=r.Number.ToInt32(n),n<<1^n>>31},n.EncodeZigzag64=function(n){var f=n.low,e=n.high,i=e<<1|f>>>31,u=f<<1,t;return e&2147483648&&(i=~i,u=~u),t=new r.UInt64("0"),t.low=u,t.high=i,t},n}();t.Zigzag=s},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),u=function(){function n(){this._buffer=[]}return n.prototype.WriteByte=function(n){this._buffer.push(r.Number.ToByte(n))},n.prototype.Write=function(n,t,i){while(i--)this.WriteByte(n[t++])},n.prototype.GetBuffer=function(){return this._buffer},n}();t.MemoryStream=u},function(n,t,i){"use strict";var f,r,e,u,o;Object.defineProperty(t,"__esModule",{value:!0});f=i(6);t.BondDataType=f.BondDataType;r=i(7);t.Encoding=r;e=i(8);t.IO=e;u=i(0);t.Int64=u.Int64;t.UInt64=u.UInt64;t.Number=u.Number;o=function(){function n(n){this._stream=n}return n.prototype.WriteBlob=function(n){this._stream.Write(n,0,n.length)},n.prototype.WriteContainerBegin=function(n,t){this.WriteUInt8(t);this.WriteUInt32(n)},n.prototype.WriteMapContainerBegin=function(n,t,i){this.WriteUInt8(t);this.WriteUInt8(i);this.WriteUInt32(n)},n.prototype.WriteFieldBegin=function(n,t){t<=5?this._stream.WriteByte(n|t<<5):t<=255?(this._stream.WriteByte(n|192),this._stream.WriteByte(t)):(this._stream.WriteByte(n|224),this._stream.WriteByte(t),this._stream.WriteByte(t>>8))},n.prototype.WriteInt32=function(n){n=r.Zigzag.EncodeZigzag32(n);this.WriteUInt32(n)},n.prototype.WriteInt64=function(n){this.WriteUInt64(r.Zigzag.EncodeZigzag64(n))},n.prototype.WriteString=function(n){if(n==="")this.WriteUInt32(0);else{var t=r.Utf8.GetBytes(n);this.WriteUInt32(t.length);this._stream.Write(t,0,t.length)}},n.prototype.WriteStructEnd=function(n){this.WriteUInt8(n?f.BondDataType.BT_STOP_BASE:f.BondDataType.BT_STOP)},n.prototype.WriteUInt32=function(n){var t=r.Varint.GetBytes(u.Number.ToUInt32(n));this._stream.Write(t,0,t.length)},n.prototype.WriteUInt64=function(n){var t=r.Varint64.GetBytes(n);this._stream.Write(t,0,t.length)},n.prototype.WriteUInt8=function(n){this._stream.WriteByte(u.Number.ToUInt8(n))},n}();t.CompactBinaryProtocolWriter=o},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=1e3,r=function(){function n(){this._killedTokenDictionary={}}return n.prototype.setKillSwitchTenants=function(n,t){var f=this,r,u;if(n&&t)try{if(r=n.split(","),t==="this-request-only")return r;u=parseInt(t,10)*i;r.forEach(function(n){f._killedTokenDictionary[n]=Date.now()+u})}catch(e){return[]}return[]},n.prototype.isTenantKilled=function(n){return this._killedTokenDictionary[n]!==undefined&&this._killedTokenDictionary[n]>Date.now()?!0:(delete this._killedTokenDictionary[n],!1)},n}();t.default=r},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(2),u=function(){function n(n,t){this._maxRequestSize=n;this._outboundQueue=t;this._currentBatch={};this._currentBatchSize=0}return n.prototype.addEventToBatch=function(n){var t=r.default.getEventBlob(n);t.length>this._maxRequestSize||(this._currentBatchSize+t.length>this._maxRequestSize?this.flushBatch():(this._currentBatch[n.tenantToken]===undefined&&(this._currentBatch[n.tenantToken]=[]),this._currentBatch[n.tenantToken].push(t),this._currentBatchSize+=t.length))},n.prototype.flushBatch=function(){this._currentBatchSize>0&&(this._outboundQueue.push(this._currentBatch),this._currentBatch={},this._currentBatchSize=0)},n}();t.default=u},function(n,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=.8,u=1.2,i=3e3,f=12e4,e=function(){function n(){}return n.shouldRetryForStatus=function(n){return!(n>=300&&n<500&&n!==408||n===501||n===505)},n.getMillisToBackoffForRetry=function(n){var t=0,e=i*r,o=i*u,s=Math.floor(Math.random()*(o-e))+e;return t=Math.pow(4,n)*s,Math.min(t,f)},n}();t.default=e},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=i(1),r=i(14),u=i(3),s=i(4),e="allTkns",o=/^[a-zA-Z0-9]([a-zA-Z0-9]|_){2,98}[a-zA-Z0-9]$/,h=/\./g,c=/^[a-zA-Z0-9](([a-zA-Z0-9|_|\.]){0,98}[a-zA-Z0-9])?$/,l=function(){function n(){}return n.initialize=function(n,t){if(t===void 0&&(t={}),this._isInitialized)throw"Already Initialized";this._defaultTenantToken=n;this._overrideValuesFromConfig(t);r.default.initialize(this._config);this._isInitialized=!0},n.flush=function(n){this._isInitialized&&!this._isDestroyed&&r.default.flush(n)},n.flushAndTeardown=function(){this._isInitialized&&!this._isDestroyed&&(this._isDestroyed=!0,r.default.flushAndTeardown())},n.setContext=function(n,t,i){(i===void 0&&(i=e),t=this._sanitizeProperty(n,t),t!==null)&&(this._contextProperties[i]||(this._contextProperties[i]={}),this._contextProperties[i][n]=t)},n.logEvent=function(n){var i=this,t;if(this._isInitialized){if(!n.name||!n.properties)return;if(n.name=n.name.toLowerCase(),n.name.replace(h,"_"),t="",n.type?(n.type.toLowerCase(),t="custom."):n.type="custom",!o.test(n.name)||!o.test(n.type))return;if(n.type=t+n.type,isNaN(n.timestamp)&&(n.timestamp=(new Date).getTime()),n.tenantToken||(n.tenantToken=this._defaultTenantToken),n.id=u.newGuid(),Object.keys(n.properties).forEach(function(t){n.properties[t]=i._sanitizeProperty(t,n.properties[t]);n.properties[t]===null&&delete n.properties[t]}),this._addContextIfAbsent(n,n.tenantToken),this._addContextIfAbsent(n,e),Object.keys(n.properties).length===0)return;this._setDefaultProperty(n,"EventInfo.InitId",this._getInitId(n.tenantToken));this._setDefaultProperty(n,"EventInfo.Sequence",this._getSequenceId(n.tenantToken));this._setDefaultProperty(n,"EventInfo.SdkVersion",s.FullVersionString);this._setDefaultProperty(n,"EventInfo.Name",n.name);this._setDefaultProperty(n,"EventInfo.Time",new Date(n.timestamp).toISOString());r.default.sendEvent(n)}},n._overrideValuesFromConfig=function(n){n.collectorUrl&&(this._config.collectorUrl=n.collectorUrl);n.sendingTimer>1e3&&(this._config.sendingTimer=n.sendingTimer)},n._getInitId=function(n){return this._initIdMap[n]===undefined&&(this._initIdMap[n]=u.newGuid()),this._initIdMap[n]},n._getSequenceId=function(n){return this._sequenceIdMap[n]===undefined&&(this._sequenceIdMap[n]=0),(++this._sequenceIdMap[n]).toString()},n._setDefaultProperty=function(n,t,i){n.properties[t]={value:i,pii:f.AWTPiiKind.NotSet}},n._addContextIfAbsent=function(n,t){if(this._contextProperties[t]){var i=this._contextProperties[t];Object.keys(i).forEach(function(t){n.properties[t]||(n.properties[t]=i[t])})}},n._sanitizeProperty=function(n,t){return((typeof t=="string"||typeof t=="number"||typeof t=="boolean")&&(t={value:t}),!c.test(n)||t===undefined||t===null||t.value===null||t.value===undefined||t.value==="")?null:(typeof t.pii=="undefined"&&(t.pii=f.AWTPiiKind.NotSet),t.value=t.value.toString(),u.isPii(t.pii)?t:null)},n._isInitialized=!1,n._isDestroyed=!1,n._contextProperties={},n._sequenceIdMap={},n._initIdMap={},n._config={collectorUrl:"https://browser.pipe.aria.microsoft.com/Collector/3.0/",sendingTimer:1e3},n}();t.default=l},function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var e=i(11),r=i(2),u=i(12),o=i(10),s=i(4),f=250,h=2936012,c=4,l=function(){function n(){}return n.initialize=function(n){this._inboundQueues.push([]);this._recordBatcher=new e.default(h,this._outboundQueue);this._newEventsAllowed=!0;typeof Uint8Array=="undefined"&&(this._urlString+="&content-encoding=base64");this._sendingTimer=n.sendingTimer;this._urlString=n.collectorUrl+this._urlString+"&x-apikey="},n.sendEvent=function(n){var t=this;this._newEventsAllowed&&(this._inboundQueues[this._inboundQueues.length-1].push(n),!this._running&&this._timeout<0&&!this._isCurrentlyFlushing&&(this._timeout=setTimeout(function(){return t._batchAndSendEvents(!1)},this._sendingTimer)))},n.flushAndTeardown=function(){this._newEventsAllowed=!1;this._batchAndSendEvents(!0)},n.flush=function(n){this._inboundQueues.push([]);this._isCurrentlyFlushing?this._flushQueue.push(n):(this._isCurrentlyFlushing=!0,this._flush(n))},n._batchAndSendEvents=function(n){for(this._running=!0;this._inboundQueues[0].length>0&&this._outboundQueue.length<1;)this._recordBatcher.addEventToBatch(this._inboundQueues[0].pop());this._outboundQueue.length===0&&this._recordBatcher.flushBatch();this._sendRequest(this._outboundQueue.pop(),0,n)},n._retryRequestIfNeeded=function(n,t,i,r,f){var s=this,e=!0,o;n&&typeof n.status!="undefined"&&(o=this._killSwitch.setKillSwitchTenants(n.getResponseHeader("kill-tokens"),n.getResponseHeader("kill-duration-seconds")),o.forEach(function(n){delete t[n];i--}),(!u.default.shouldRetryForStatus(n.status)||i<=0)&&(e=!1));e&&f<c?setTimeout(function(){return s._sendRequest(t,f+1,!1)},u.default.getMillisToBackoffForRetry(f)):this._handleRequestFinished(null)},n._sendRequest=function(n,t,i){var o=this,s;try{var u=new XMLHttpRequest,e=0,f="";Object.keys(n).forEach(function(t){o._killSwitch.isTenantKilled(t)?delete n[t]:(f.length>0&&(f+=","),f+=t,e++)});u.open("POST",this._urlString+f,!i);i||(u.ontimeout=function(){o._retryRequestIfNeeded(u,n,e,f,t)},u.onerror=function(){o._retryRequestIfNeeded(u,n,e,f,t)},u.onload=function(){o._handleRequestFinished(u)});e>0?(s=r.default.getPayloadBlob(n,e),typeof Uint8Array=="undefined"?u.send(r.default.base64Encode(s)):u.send(new Uint8Array(s))):i&&this._handleRequestFinished(null)}catch(h){this._handleRequestFinished(null)}},n._handleRequestFinished=function(n){var t=this;n&&this._killSwitch.setKillSwitchTenants(n.getResponseHeader("kill-tokens"),n.getResponseHeader("kill-duration-seconds"));this._inboundQueues[0].length>0?this._timeout=setTimeout(function(){return t._batchAndSendEvents(!1)},this._sendingTimer):(this._timeout=-1,this._running=!1)},n._flush=function(n){var t=this;this._running||(this._timeout>-1&&(clearTimeout(this._timeout),this._timeout=-1),this._inboundQueues[0].length>0&&this._batchAndSendEvents(!1));this._checkPrimaryInboundQueueEmpty(function(){t._inboundQueues.shift();n!==null&&n!==undefined&&n();t._flushQueue.length>0?setTimeout(function(){return t._flush(t._flushQueue.shift())},t._sendingTimer):(t._isCurrentlyFlushing=!1,t._inboundQueues[0].length>0&&(t._timeout=setTimeout(function(){return t._batchAndSendEvents(!1)},t._sendingTimer)))})},n._checkPrimaryInboundQueueEmpty=function(n){var t=this;this._inboundQueues[0].length===0?this._checkOutboundQueueEmptyAndSent(n):setTimeout(function(){return t._checkPrimaryInboundQueueEmpty(n)},f)},n._checkOutboundQueueEmptyAndSent=function(n){var t=this;this._running?setTimeout(function(){return t._checkOutboundQueueEmptyAndSent(n)},f):n()},n._outboundQueue=[],n._inboundQueues=[],n._newEventsAllowed=!1,n._killSwitch=new o.default,n._isCurrentlyFlushing=!1,n._flushQueue=[],n._running=!1,n._timeout=-1,n._urlString="?qsp=true&content-type=application%2Fbond-compact-binary&client-id=NO_AUTH&sdk-version="+s.FullVersionString,n}();t.default=l},function(n,t,i){n.exports=i(5)}])})},{}],91:[function(n){(function(t){var i=n("es6-promise").Promise;!function(n){window.OfficeBrowserFeedback.html2canvas=n}(function(){var r;return function u(t,i,r){function f(e,s){var c,l,h;if(!i[e]){if(!t[e]){if(c=typeof n=="function"&&n,!s&&c)return c(e,!0);if(o)return o(e,!0);l=new Error("Cannot find module '"+e+"'");throw l.code="MODULE_NOT_FOUND",l;}h=i[e]={exports:{}};t[e][0].call(h.exports,function(n){var i=t[e][1][n];return f(i?i:n)},h,h.exports,u,t,i,r)}return i[e].exports}for(var o=typeof n=="function"&&n,e=0;e<r.length;e++)f(r[e]);return f}({1:[function(n,i,u){(function(n){(function(t){function s(n){throw RangeError(vt[n]);}function nt(n,t){for(var i=n.length;i--;)n[i]=t(n[i]);return n}function tt(n,t){return nt(n.split(at),t).join(".")}function it(n){for(var r=[],i=0,f=n.length,t,u;i<f;)t=n.charCodeAt(i++),t>=55296&&t<=56319&&i<f?(u=n.charCodeAt(i++),(u&64512)==56320?r.push(((t&1023)<<10)+(u&1023)+65536):(r.push(t),i--)):r.push(t);return r}function rt(n){return nt(n,function(n){var t="";return n>65535&&(n-=65536,t+=a(n>>>10&1023|55296),n=56320|n&1023),t+a(n)}).join("")}function yt(n){return n-48<10?n-22:n-65<26?n-65:n-97<26?n-97:f}function ut(n,t){return n+22+75*(n<26)-((t!=0)<<5)}function ft(n,t,i){var r=0;for(n=i?e(n/ht):n>>1,n+=e(n/t);n>w*l>>1;r+=f)n=e(n/w);return e(r+(w+1)*n/(n+st))}function et(n){var v=[],ut=n.length,r,t=0,b=d,y=k,i,u,w,nt,o,c,a,tt,it;for(i=n.lastIndexOf(g),i<0&&(i=0),u=0;u<i;++u)n.charCodeAt(u)>=128&&s("not-basic"),v.push(n.charCodeAt(u));for(w=i>0?i+1:0;w<ut;){for(nt=t,o=1,c=f;;c+=f){if(w>=ut&&s("invalid-input"),a=yt(n.charCodeAt(w++)),(a>=f||a>e((h-t)/o))&&s("overflow"),t+=a*o,tt=c<=y?p:c>=y+l?l:c-y,a<tt)break;it=f-tt;o>e(h/it)&&s("overflow");o*=it}r=v.length+1;y=ft(t-nt,r,nt==0);e(t/r)>h-b&&s("overflow");b+=e(t/r);t%=r;v.splice(t++,0,b)}return rt(v)}function ot(n){var r,u,v,et,y,t,o,w,b,nt,i,c=[],tt,rt,ot,st;for(n=it(n),tt=n.length,r=d,u=0,y=k,t=0;t<tt;++t)i=n[t],i<128&&c.push(a(i));for(v=et=c.length,et&&c.push(g);v<tt;){for(o=h,t=0;t<tt;++t)i=n[t],i>=r&&i<o&&(o=i);for(rt=v+1,o-r>e((h-u)/rt)&&s("overflow"),u+=(o-r)*rt,r=o,t=0;t<tt;++t)if(i=n[t],i<r&&++u>h&&s("overflow"),i==r){for(w=u,b=f;;b+=f){if(nt=b<=y?p:b>=y+l?l:b-y,w<nt)break;st=w-nt;ot=f-nt;c.push(a(ut(nt+st%ot,0)));w=e(st/ot)}c.push(a(ut(w,0)));y=ft(u,rt,v==et);u=0;++v}++u;++r}return c.join("")}function pt(n){return tt(n,function(n){return ct.test(n)?et(n.slice(4).toLowerCase()):n})}function wt(n){return tt(n,function(n){return lt.test(n)?"xn--"+ot(n):n})}var v=typeof u=="object"&&u,b=typeof i=="object"&&i&&i.exports==v&&i,c=typeof n=="object"&&n;(c.global===c||c.window===c)&&(t=c);var o,h=2147483647,f=36,p=1,l=26,st=38,ht=700,k=72,d=128,g="-",ct=/^xn--/,lt=/[^ -~]/,at=/\x2E|\u3002|\uFF0E|\uFF61/g,vt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=f-p,e=Math.floor,a=String.fromCharCode,y;if(o={version:"1.2.4",ucs2:{decode:it,encode:rt},decode:et,encode:ot,toASCII:wt,toUnicode:pt},typeof r=="function"&&typeof r.amd=="object"&&r.amd)r("punycode",function(){return o});else if(v&&!v.nodeType)if(b)b.exports=o;else for(y in o)o.hasOwnProperty(y)&&(v[y]=o[y]);else t.punycode=o})(this)}).call(this,typeof t!="undefined"?t:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],2:[function(n,t){function e(n,t,i){n.defaultView&&(t!==n.defaultView.pageXOffset||i!==n.defaultView.pageYOffset)&&n.defaultView.scrollTo(t,i)}function o(n,t){try{t&&(t.width=n.width,t.height=n.height,t.getContext("2d").putImageData(n.getContext("2d").getImageData(0,0,n.width,n.height),0,0))}catch(i){f("Unable to copy canvas content from",n,i)}}function r(n,t){for(var i=n.nodeType===3?document.createTextNode(n.nodeValue):n.cloneNode(!1),u=n.firstChild;u;)(t===!0||u.nodeType!==1||u.nodeName!=="SCRIPT")&&i.appendChild(r(u,t)),u=u.nextSibling;return n.nodeType===1&&(i._scrollTop=n.scrollTop,i._scrollLeft=n.scrollLeft,n.nodeName==="CANVAS"?o(n,i):(n.nodeName==="TEXTAREA"||n.nodeName==="SELECT")&&(i.value=n.value)),i}function u(n){if(n.nodeType===1){n.scrollTop=n._scrollTop;n.scrollLeft=n._scrollLeft;for(var t=n.firstChild;t;)u(t),t=t.nextSibling}}var f=n("./log");t.exports=function(n,t,f,o,s,h,c){var a=r(n.documentElement,s.javascriptEnabled),l=t.createElement("iframe");return l.className="html2canvas-container",l.style.visibility="hidden",l.style.position="fixed",l.style.left="-10000px",l.style.top="0px",l.style.border="0",l.width=f,l.height=o,l.scrolling="no",t.body.appendChild(l),new i(function(t){var i=l.contentWindow.document;l.contentWindow.onload=l.onload=function(){var n=setInterval(function(){i.body.childNodes.length>0&&(u(i.documentElement),clearInterval(n),s.type==="view"&&(l.contentWindow.scrollTo(h,c),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(l.contentWindow.scrollY!==c||l.contentWindow.scrollX!==h)&&(i.documentElement.style.top=-c+"px",i.documentElement.style.left=-h+"px",i.documentElement.style.position="absolute")),t(l))},50)};i.open();i.write("<!DOCTYPE html><html><\/html>");e(n,h,c);i.replaceChild(i.adoptNode(a),i.documentElement);i.close()})}},{"./log":13}],3:[function(n,t){function i(n){this.r=0;this.g=0;this.b=0;this.a=null;var t=this.fromArray(n)||this.namedColor(n)||this.rgb(n)||this.rgba(n)||this.hex6(n)||this.hex3(n)}var r,u,f,e,o;i.prototype.darken=function(n){var t=1-n;return new i([Math.round(this.r*t),Math.round(this.g*t),Math.round(this.b*t),this.a])};i.prototype.isTransparent=function(){return this.a===0};i.prototype.isBlack=function(){return this.r===0&&this.g===0&&this.b===0};i.prototype.fromArray=function(n){return Array.isArray(n)&&(this.r=Math.min(n[0],255),this.g=Math.min(n[1],255),this.b=Math.min(n[2],255),n.length>3&&(this.a=n[3])),Array.isArray(n)};r=/^#([a-f0-9]{3})$/i;i.prototype.hex3=function(n){var t=null;return(t=n.match(r))!==null&&(this.r=parseInt(t[1][0]+t[1][0],16),this.g=parseInt(t[1][1]+t[1][1],16),this.b=parseInt(t[1][2]+t[1][2],16)),t!==null};u=/^#([a-f0-9]{6})$/i;i.prototype.hex6=function(n){var t=null;return(t=n.match(u))!==null&&(this.r=parseInt(t[1].substring(0,2),16),this.g=parseInt(t[1].substring(2,4),16),this.b=parseInt(t[1].substring(4,6),16)),t!==null};f=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;i.prototype.rgb=function(n){var t=null;return(t=n.match(f))!==null&&(this.r=Number(t[1]),this.g=Number(t[2]),this.b=Number(t[3])),t!==null};e=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?\.?\d+)\s*\)$/;i.prototype.rgba=function(n){var t=null;return(t=n.match(e))!==null&&(this.r=Number(t[1]),this.g=Number(t[2]),this.b=Number(t[3]),this.a=Number(t[4])),t!==null};i.prototype.toString=function(){return this.a!==null&&this.a!==1?"rgba("+[this.r,this.g,this.b,this.a].join(",")+")":"rgb("+[this.r,this.g,this.b].join(",")+")"};i.prototype.namedColor=function(n){n=n.toLowerCase();var t=o[n];if(t)this.r=t[0],this.g=t[1],this.b=t[2];else if(n==="transparent")return this.r=this.g=this.b=this.a=0,!0;return!!t};i.prototype.isColor=!0;o={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};t.exports=i},{}],4:[function(n,t){function f(n,t){var f=d++,e,s,r;return(t=t||{},t.logging&&(u.options.logging=!0,u.options.start=Date.now()),t.async=typeof t.async=="undefined"?!0:t.async,t.allowTaint=typeof t.allowTaint=="undefined"?!1:t.allowTaint,t.removeContainer=typeof t.removeContainer=="undefined"?!0:t.removeContainer,t.javascriptEnabled=typeof t.javascriptEnabled=="undefined"?!1:t.javascriptEnabled,t.imageTimeout=typeof t.imageTimeout=="undefined"?1e4:t.imageTimeout,t.renderer=typeof t.renderer=="function"?t.renderer:o,t.strict=!!t.strict,typeof n=="string")?typeof t.proxy!="string"?i.reject("Proxy must be used when rendering url"):(e=t.width!=null?t.width:window.innerWidth,s=t.height!=null?t.height:window.innerHeight,b(rt(n),t.proxy,document,e,s,t).then(function(n){return c(n.contentWindow.document.documentElement,n,t,e,s)})):(r=(n===undefined?[document.documentElement]:n.length?n:[n])[0],r.setAttribute(h+f,f),g(r.ownerDocument,t,r.ownerDocument.defaultView.innerWidth,r.ownerDocument.defaultView.innerHeight,f).then(function(n){if(typeof t.onrendered=="function"){u("options.onrendered is deprecated, html2canvas returns a Promise containing the canvas");t.onrendered(n)}return n}))}function g(n,t,r,f,e){return w(n,n,r,f,t,n.defaultView.pageXOffset,n.defaultView.pageYOffset).then(function(o){var s,l;u("Document cloned");s=h+e;l="["+s+"='"+e+"']";n.querySelector(l).removeAttribute(s);var a=o.contentWindow,v=a.document.querySelector(l),y=typeof t.onclone=="function"?i.resolve(t.onclone(a.document)):i.resolve(!0);return y.then(function(){return c(v,o,t,r,f)})})}function c(n,t,i,r,f){var o=t.contentWindow,h=new a(o.document),c=new v(i,h),s=k(n),p=i.type==="view"?r:tt(o.document),w=i.type==="view"?f:it(o.document),e=new i.renderer(p,w,c,i,document),b=new y(n,e,h,c,i);return b.ready.then(function(){u("Finished rendering");var r;return r=i.type==="view"?l(e.canvas,{width:e.canvas.width,height:e.canvas.height,top:0,left:0,x:0,y:0}):n===o.document.body||n===o.document.documentElement||i.canvas!=null?e.canvas:l(e.canvas,{width:i.width!=null?i.width:s.width,height:i.height!=null?i.height:s.height,top:s.top,left:s.left,x:0,y:0}),nt(t,i),r})}function nt(n,t){t.removeContainer&&(n.parentNode.removeChild(n),u("Cleaned up container"))}function l(n,t){var i=document.createElement("canvas"),e=Math.min(n.width-1,Math.max(0,t.left)),s=Math.min(n.width,Math.max(1,t.left+t.width)),o=Math.min(n.height-1,Math.max(0,t.top)),h=Math.min(n.height,Math.max(1,t.top+t.height)),r,f;return i.width=t.width,i.height=t.height,r=s-e,f=h-o,u("Cropping canvas at:","left:",t.left,"top:",t.top,"width:",r,"height:",f),u("Resulting crop with width",t.width,"and height",t.height,"with x",e,"and y",o),i.getContext("2d").drawImage(n,e,o,r,f,t.x,t.y,r,f),i}function tt(n){return Math.max(Math.max(n.body.scrollWidth,n.documentElement.scrollWidth),Math.max(n.body.offsetWidth,n.documentElement.offsetWidth),Math.max(n.body.clientWidth,n.documentElement.clientWidth))}function it(n){return Math.max(Math.max(n.body.scrollHeight,n.documentElement.scrollHeight),Math.max(n.body.offsetHeight,n.documentElement.offsetHeight),Math.max(n.body.clientHeight,n.documentElement.clientHeight))}function rt(n){var t=document.createElement("a");return t.href=n,t.href=t.href,t}var a=n("./support"),o=n("./renderers/canvas"),v=n("./imageloader"),y=n("./nodeparser"),p=n("./nodecontainer"),u=n("./log"),s=n("./utils"),w=n("./clone"),b=n("./proxy").loadUrlDocument,k=s.getBounds,h="data-html2canvas-node",d=0,e;f.CanvasRenderer=o;f.NodeContainer=p;f.log=u;f.utils=s;e=typeof document=="undefined"||typeof Object.create!="function"||typeof document.createElement("canvas").getContext!="function"?function(){return i.reject("No canvas support")}:f;t.exports=e;typeof r=="function"&&r.amd&&r("html2canvas",[],function(){return e})},{"./clone":2,"./imageloader":11,"./log":13,"./nodecontainer":14,"./nodeparser":15,"./proxy":16,"./renderers/canvas":20,"./support":22,"./utils":26}],5:[function(n,t){function r(n){if(this.src=n,u("DummyImageContainer for",n),!this.promise||!this.image){u("Initiating DummyImageContainer");r.prototype.image=new Image;var t=this.image;r.prototype.promise=new i(function(n,i){t.onload=n;t.onerror=i;t.src=f();t.complete===!0&&n(t)})}}var u=n("./log"),f=n("./utils").smallImage;t.exports=r},{"./log":13,"./utils":26}],6:[function(n,t){function r(n,t){var r=document.createElement("div"),u=document.createElement("img"),f=document.createElement("span"),e="Hidden Text",o,s;r.style.visibility="hidden";r.style.fontFamily=n;r.style.fontSize=t;r.style.margin=0;r.style.padding=0;document.body.appendChild(r);u.src=i();u.width=1;u.height=1;u.style.margin=0;u.style.padding=0;u.style.verticalAlign="baseline";f.style.fontFamily=n;f.style.fontSize=t;f.style.margin=0;f.style.padding=0;f.appendChild(document.createTextNode(e));r.appendChild(f);r.appendChild(u);o=u.offsetTop-f.offsetTop+1;r.removeChild(f);r.appendChild(document.createTextNode(e));r.style.lineHeight="normal";u.style.verticalAlign="super";s=u.offsetTop-r.offsetTop+1;document.body.removeChild(r);this.baseline=o;this.lineWidth=1;this.middle=s}var i=n("./utils").smallImage;t.exports=r},{"./utils":26}],7:[function(n,t){function i(){this.data={}}var r=n("./font");i.prototype.getMetrics=function(n,t){return this.data[n+"-"+t]===undefined&&(this.data[n+"-"+t]=new r(n,t)),this.data[n+"-"+t]};t.exports=i},{"./font":6}],8:[function(n,t){function r(t,r,u){this.image=null;this.src=t;var e=this,o=f(t);this.promise=(r?new i(function(n){t.contentWindow.document.URL==="about:blank"||t.contentWindow.document.documentElement==null?t.contentWindow.onload=t.onload=function(){n(t)}:n(t)}):this.proxyLoad(u.proxy,o,u)).then(function(t){var i=n("./core");return i(t.contentWindow.document.documentElement,{type:"view",width:t.width,height:t.height,proxy:u.proxy,javascriptEnabled:u.javascriptEnabled,removeContainer:u.removeContainer,allowTaint:u.allowTaint,imageTimeout:u.imageTimeout/2})}).then(function(n){return e.image=n})}var u=n("./utils"),f=u.getBounds,e=n("./proxy").loadUrlDocument;r.prototype.proxyLoad=function(n,t,i){var r=this.src;return e(r.src,n,r.ownerDocument,t.width,t.height,i)};t.exports=r},{"./core":4,"./proxy":16,"./utils":26}],9:[function(n,t){function r(n){this.src=n.value;this.colorStops=[];this.type=null;this.x0=.5;this.y0=.5;this.x1=.5;this.y1=.5;this.promise=i.resolve(!0)}r.TYPES={LINEAR:1,RADIAL:2};r.REGEXP_COLORSTOP=/^\s*(rgba?\(\s*\d{1,3},\s*\d{1,3},\s*\d{1,3}(?:,\s*[0-9\.]+)?\s*\)|[a-z]{3,20}|#[a-f0-9]{3,6})(?:\s+(\d{1,3}(?:\.\d+)?)(%|px)?)?(?:\s|$)/i;t.exports=r},{}],10:[function(n,t){function r(n,t){this.src=n;this.image=new Image;var r=this;this.tainted=null;this.promise=new i(function(i,u){r.image.onload=i;r.image.onerror=u;t&&(r.image.crossOrigin="anonymous");r.image.src=n;r.image.complete===!0&&i(r.image)})}t.exports=r},{}],11:[function(n,t){function r(n,t){this.link=null;this.options=n;this.support=t;this.origin=this.getOrigin(window.location.href)}var u=n("./log"),f=n("./imagecontainer"),e=n("./dummyimagecontainer"),s=n("./proxyimagecontainer"),h=n("./framecontainer"),o=n("./svgcontainer"),c=n("./svgnodecontainer"),l=n("./lineargradientcontainer"),a=n("./webkitgradientcontainer"),v=n("./utils").bind;r.prototype.findImages=function(n){var t=[];return n.reduce(function(n,t){switch(t.node.nodeName){case"IMG":return n.concat([{args:[t.node.src],method:"url"}]);case"svg":case"IFRAME":return n.concat([{args:[t.node],method:t.node.nodeName}])}return n},[]).forEach(this.addImage(t,this.loadImage),this),t};r.prototype.findBackgroundImage=function(n,t){return t.parseBackgroundImages().filter(this.hasImageBackground).forEach(this.addImage(n,this.loadImage),this),n};r.prototype.addImage=function(n,t){return function(i){i.args.forEach(function(r){this.imageExists(n,r)||(n.splice(0,0,t.call(this,i)),u("Added image #"+n.length,typeof r=="string"?r.substring(0,100):r))},this)}};r.prototype.hasImageBackground=function(n){return n.method!=="none"};r.prototype.loadImage=function(n){if(n.method==="url"){var t=n.args[0];return!this.isSVG(t)||this.support.svg||this.options.allowTaint?t.match(/data:image\/.*;base64,/i)?new f(t.replace(/url\(['"]{0,}|['"]{0,}\)$/ig,""),!1):this.isSameOrigin(t)||this.options.allowTaint===!0||this.isSVG(t)?new f(t,!1):this.support.cors&&!this.options.allowTaint&&this.options.useCORS?new f(t,!0):this.options.proxy?new s(t,this.options.proxy):new e(t):new o(t)}return n.method==="linear-gradient"?new l(n):n.method==="gradient"?new a(n):n.method==="svg"?new c(n.args[0],this.support.svg):n.method==="IFRAME"?new h(n.args[0],this.isSameOrigin(n.args[0].src),this.options):new e(n)};r.prototype.isSVG=function(n){return n.substring(n.length-3).toLowerCase()==="svg"||o.prototype.isInline(n)};r.prototype.imageExists=function(n,t){return n.some(function(n){return n.src===t})};r.prototype.isSameOrigin=function(n){return this.getOrigin(n)===this.origin};r.prototype.getOrigin=function(n){var t=this.link||(this.link=document.createElement("a"));return t.href=n,t.href=t.href,t.protocol+t.hostname+t.port};r.prototype.getPromise=function(n){return this.timeout(n,this.options.imageTimeout)["catch"](function(){var t=new e(n.src);return t.promise.then(function(t){n.image=t})})};r.prototype.get=function(n){var t=null;return this.images.some(function(i){return(t=i).src===n})?t:null};r.prototype.fetch=function(n){return this.images=n.reduce(v(this.findBackgroundImage,this),this.findImages(n)),this.images.forEach(function(n,t){n.promise.then(function(){u("Succesfully loaded image #"+(t+1),n)},function(i){u("Failed loading image #"+(t+1),n,i)})}),this.ready=i.all(this.images.map(this.getPromise,this)),u("Finished searching images"),this};r.prototype.timeout=function(n,t){var r,f=i.race([n.promise,new i(function(i,f){r=setTimeout(function(){u("Timed out loading image",n);f(n)},t)})]).then(function(n){return clearTimeout(r),n});return f["catch"](function(){clearTimeout(r)}),f};t.exports=r},{"./dummyimagecontainer":5,"./framecontainer":8,"./imagecontainer":10,"./lineargradientcontainer":12,"./log":13,"./proxyimagecontainer":17,"./svgcontainer":23,"./svgnodecontainer":24,"./utils":26,"./webkitgradientcontainer":27}],12:[function(n,t){function r(n){i.apply(this,arguments);this.type=i.TYPES.LINEAR;var t=r.REGEXP_DIRECTION.test(n.args[0])||!i.REGEXP_COLORSTOP.test(n.args[0]);t?n.args[0].split(/\s+/).reverse().forEach(function(n,t){var r,u,i;switch(n){case"left":this.x0=0;this.x1=1;break;case"top":this.y0=0;this.y1=1;break;case"right":this.x0=1;this.x1=0;break;case"bottom":this.y0=1;this.y1=0;break;case"to":r=this.y0;u=this.x0;this.y0=this.y1;this.x0=this.x1;this.x1=u;this.y1=r;break;case"center":break;default:if(i=parseFloat(n,10)*.01,isNaN(i))break;t===0?(this.y0=i,this.y1=1-this.y0):(this.x0=i,this.x1=1-this.x0)}},this):(this.y0=0,this.y1=1);this.colorStops=n.args.slice(t?1:0).map(function(n){var t=n.match(i.REGEXP_COLORSTOP),r=+t[2],f=r===0?"%":t[3];return{color:new u(t[1]),stop:f==="%"?r/100:null}});this.colorStops[0].stop===null&&(this.colorStops[0].stop=0);this.colorStops[this.colorStops.length-1].stop===null&&(this.colorStops[this.colorStops.length-1].stop=1);this.colorStops.forEach(function(n,t){n.stop===null&&this.colorStops.slice(t).some(function(i,r){return i.stop!==null?(n.stop=(i.stop-this.colorStops[t-1].stop)/(r+1)+this.colorStops[t-1].stop,!0):!1},this)},this)}var i=n("./gradientcontainer"),u=n("./color");r.prototype=Object.create(i.prototype);r.REGEXP_DIRECTION=/^\s*(?:to|left|right|top|bottom|center|\d{1,3}(?:\.\d+)?%?)(?:\s|$)/i;t.exports=r},{"./color":3,"./gradientcontainer":9}],13:[function(n,t){var i=function(){i.options.logging&&window.console&&window.console.log&&Function.prototype.bind.call(window.console.log,window.console).apply(window.console,[Date.now()-i.options.start+"ms","html2canvas:"].concat([].slice.call(arguments,0)))};i.options={logging:!1};t.exports=i},{}],14:[function(n,t){function i(n,t){this.node=n;this.parent=t;this.stack=null;this.bounds=null;this.borders=null;this.clip=[];this.backgroundClip=[];this.offsetBounds=null;this.visible=null;this.computedStyles=null;this.colors={};this.styles={};this.backgroundImages=null;this.transformData=null;this.transformMatrix=null;this.isPseudoElement=!1;this.opacity=null}function h(n){var t=n.options[n.selectedIndex||0];return t?t.text||"":""}function c(n){if(n&&n[1]==="matrix")return n[2].split(",").map(function(n){return parseFloat(n.trim())});if(n&&n[1]==="matrix3d"){var t=n[2].split(",").map(function(n){return parseFloat(n.trim())});return[t[0],t[1],t[4],t[5],t[12],t[13]]}}function r(n){return n.toString().indexOf("%")!==-1}function l(n){return n.replace("px","")}function a(n){return parseFloat(n)}var f=n("./color"),u=n("./utils"),e=u.getBounds,o=u.parseBackgrounds,s=u.offsetBounds;i.prototype.cloneTo=function(n){n.visible=this.visible;n.borders=this.borders;n.bounds=this.bounds;n.clip=this.clip;n.backgroundClip=this.backgroundClip;n.computedStyles=this.computedStyles;n.styles=this.styles;n.backgroundImages=this.backgroundImages;n.opacity=this.opacity};i.prototype.getOpacity=function(){return this.opacity===null?this.opacity=this.cssFloat("opacity"):this.opacity};i.prototype.assignStack=function(n){this.stack=n;n.children.push(this)};i.prototype.isElementVisible=function(){return this.node.nodeType===Node.TEXT_NODE?this.parent.visible:this.css("display")!=="none"&&this.css("visibility")!=="hidden"&&!this.node.hasAttribute("data-html2canvas-ignore")&&(this.node.nodeName!=="INPUT"||this.node.getAttribute("type")!=="hidden")};i.prototype.css=function(n){return this.computedStyles||(this.computedStyles=this.isPseudoElement?this.parent.computedStyle(this.before?":before":":after"):this.computedStyle(null)),this.styles[n]||(this.styles[n]=this.computedStyles[n])};i.prototype.prefixedCss=function(n){var t=this.css(n);return t===undefined&&["webkit","moz","ms","o"].some(function(i){return t=this.css(i+n.substr(0,1).toUpperCase()+n.substr(1)),t!==undefined},this),t===undefined?null:t};i.prototype.computedStyle=function(n){return this.node.ownerDocument.defaultView.getComputedStyle(this.node,n)};i.prototype.cssInt=function(n){var t=parseInt(this.css(n),10);return isNaN(t)?0:t};i.prototype.color=function(n){return this.colors[n]||(this.colors[n]=new f(this.css(n)))};i.prototype.cssFloat=function(n){var t=parseFloat(this.css(n));return isNaN(t)?0:t};i.prototype.fontWeight=function(){var n=this.css("fontWeight");switch(parseInt(n,10)){case 401:n="bold";break;case 400:n="normal"}return n};i.prototype.parseClip=function(){var n=this.css("clip").match(this.CLIP);return n?{top:parseInt(n[1],10),right:parseInt(n[2],10),bottom:parseInt(n[3],10),left:parseInt(n[4],10)}:null};i.prototype.parseBackgroundImages=function(){return this.backgroundImages||(this.backgroundImages=o(this.css("backgroundImage")))};i.prototype.cssList=function(n,t){var i=(this.css(n)||"").split(",");return i=i[t||0]||i[0]||"auto",i=i.trim().split(" "),i.length===1&&(i=[i[0],r(i[0])?"auto":i[0]]),i};i.prototype.parseBackgroundSize=function(n,t,i){var u=this.cssList("backgroundSize",i),f,o,s,e;if(r(u[0]))f=n.width*parseFloat(u[0])/100;else{if(/contain|cover/.test(u[0]))return s=n.width/n.height,e=t.width/t.height,s<e^u[0]==="contain"?{width:n.height*e,height:n.height}:{width:n.width,height:n.width/e};f=parseInt(u[0],10)}return o=u[0]==="auto"&&u[1]==="auto"?t.height:u[1]==="auto"?f/t.width*t.height:r(u[1])?n.height*parseFloat(u[1])/100:parseInt(u[1],10),u[0]==="auto"&&(f=o/t.height*t.width),{width:f,height:o}};i.prototype.parseBackgroundPosition=function(n,t,i,u){var f=this.cssList("backgroundPosition",i),e,o;return e=r(f[0])?(n.width-(u||t).width)*(parseFloat(f[0])/100):parseInt(f[0],10),o=f[1]==="auto"?e/t.width*t.height:r(f[1])?(n.height-(u||t).height)*parseFloat(f[1])/100:parseInt(f[1],10),f[0]==="auto"&&(e=o/t.height*t.width),{left:e,top:o}};i.prototype.parseBackgroundRepeat=function(n){return this.cssList("backgroundRepeat",n)[0]};i.prototype.parseTextShadows=function(){var r=this.css("textShadow"),u=[],t,i,n;if(r&&r!=="none")for(t=r.match(this.TEXT_SHADOW_PROPERTY),i=0;t&&i<t.length;i++)n=t[i].match(this.TEXT_SHADOW_VALUES),u.push({color:new f(n[0]),offsetX:n[1]?parseFloat(n[1].replace("px","")):0,offsetY:n[2]?parseFloat(n[2].replace("px","")):0,blur:n[3]?n[3].replace("px",""):0});return u};i.prototype.parseTransform=function(){if(!this.transformData)if(this.hasTransform()){var t=this.parseBounds(),n=this.prefixedCss("transformOrigin").split(" ").map(l).map(a);n[0]+=t.left;n[1]+=t.top;this.transformData={origin:n,matrix:this.parseTransformMatrix()}}else this.transformData={origin:[0,0],matrix:[1,0,0,1,0,0]};return this.transformData};i.prototype.parseTransformMatrix=function(){if(!this.transformMatrix){var n=this.prefixedCss("transform"),t=n?c(n.match(this.MATRIX_PROPERTY)):null;this.transformMatrix=t?t:[1,0,0,1,0,0]}return this.transformMatrix};i.prototype.parseBounds=function(){return this.bounds||(this.bounds=this.hasTransform()?s(this.node):e(this.node))};i.prototype.hasTransform=function(){return this.parseTransformMatrix().join(",")!=="1,0,0,1,0,0"||this.parent&&this.parent.hasTransform()};i.prototype.getValue=function(){var n=this.node.value||"";return this.node.tagName==="SELECT"?n=h(this.node):this.node.type==="password"&&(n=Array(n.length+1).join("•")),n.length===0?this.node.placeholder||"":n};i.prototype.MATRIX_PROPERTY=/(matrix|matrix3d)\((.+)\)/;i.prototype.TEXT_SHADOW_PROPERTY=/((rgba|rgb)\([^\)]+\)(\s-?\d+px){0,})/g;i.prototype.TEXT_SHADOW_VALUES=/(-?\d+px)|(#.+)|(rgb\(.+\))|(rgba\(.+\))/g;i.prototype.CLIP=/^rect\((\d+)px,? (\d+)px,? (\d+)px,? (\d+)px\)$/;t.exports=i},{"./color":3,"./utils":26}],15:[function(n,t){function r(n,t,r,e,o){var s,h;u("Starting NodeParser");this.renderer=t;this.options=o;this.range=null;this.support=r;this.renderQueue=[];this.stack=new d(!0,1,n.ownerDocument,null);s=new b(n,null);o.background&&t.rectangle(0,0,t.width,t.height,new f(o.background));n===n.ownerDocument.documentElement&&(h=new b(s.color("backgroundColor").isTransparent()?n.ownerDocument.body:n.ownerDocument.documentElement,null),t.rectangle(0,0,t.width,t.height,h.color("backgroundColor")));s.visibile=s.isElementVisible();this.createPseudoHideStyles(n.ownerDocument);this.disableAnimations(n.ownerDocument);this.nodes=rt([s].concat(this.getChildren(s)).filter(function(n){return n.visible=n.isElementVisible()}).map(this.getPseudoElements,this));this.fontMetrics=new lt;u("Fetched nodes, total:",this.nodes.length);u("Calculate overflow clips");this.calculateOverflowClips();u("Start fetching images");this.images=e.fetch(this.nodes.filter(a));this.ready=this.images.ready.then(g(function(){return u("Images loaded, starting parsing"),u("Creating stacking contexts"),this.createStackingContexts(),u("Sorting stacking contexts"),this.sortStackingContexts(this.stack),this.parse(this.stack),u("Render queue created with "+this.renderQueue.length+" items"),new i(g(function(n){o.async?typeof o.async=="function"?o.async.call(this,this.renderQueue,n):this.renderQueue.length>0?(this.renderIndex=0,this.asyncRenderer(this.renderQueue,n)):n():(this.renderQueue.forEach(this.paint,this),n())},this))},this))}function ut(n){return n.parent&&n.parent.clip.length}function pt(n){return n.replace(/(\-[a-z])/g,function(n){return n.toUpperCase().replace("-","")})}function ft(){}function et(n,t,i,r){return n.map(function(u,f){if(u.width>0){var o=t.left,e=t.top,s=t.width,h=t.height-n[2].width;switch(f){case 0:h=n[0].width;u.args=w({c1:[o,e],c2:[o+s,e],c3:[o+s-n[1].width,e+h],c4:[o+n[3].width,e+h]},r[0],r[1],i.topLeftOuter,i.topLeftInner,i.topRightOuter,i.topRightInner);break;case 1:o=t.left+t.width-n[1].width;s=n[1].width;u.args=w({c1:[o+s,e],c2:[o+s,e+h+n[2].width],c3:[o,e+h],c4:[o,e+n[0].width]},r[1],r[2],i.topRightOuter,i.topRightInner,i.bottomRightOuter,i.bottomRightInner);break;case 2:e=e+t.height-n[2].width;h=n[2].width;u.args=w({c1:[o+s,e+h],c2:[o,e+h],c3:[o+n[3].width,e],c4:[o+s-n[3].width,e]},r[2],r[3],i.bottomRightOuter,i.bottomRightInner,i.bottomLeftOuter,i.bottomLeftInner);break;case 3:s=n[3].width;u.args=w({c1:[o,e+h+n[2].width],c2:[o,e],c3:[o+s,e+n[0].width],c4:[o+s,e+h]},r[3],r[0],i.bottomLeftOuter,i.bottomLeftInner,i.topLeftOuter,i.topLeftInner)}}return u})}function e(n,t,i,r){var h=4*((Math.sqrt(2)-1)/3),e=i*h,o=r*h,u=n+i,f=t+r;return{topLeft:s({x:n,y:f},{x:n,y:f-o},{x:u-e,y:t},{x:u,y:t}),topRight:s({x:n,y:t},{x:n+e,y:t},{x:u,y:f-o},{x:u,y:f}),bottomRight:s({x:u,y:t},{x:u,y:t+o},{x:n+e,y:f},{x:n,y:f}),bottomLeft:s({x:u,y:f},{x:u-e,y:f},{x:n,y:t+o},{x:n,y:t})}}function ot(n,t,i){var f=n.left,o=n.top,r=n.width,u=n.height,v=t[0][0]<r/2?t[0][0]:r/2,y=t[0][1]<u/2?t[0][1]:u/2,s=t[1][0]<r/2?t[1][0]:r/2,p=t[1][1]<u/2?t[1][1]:u/2,h=t[2][0]<r/2?t[2][0]:r/2,c=t[2][1]<u/2?t[2][1]:u/2,w=t[3][0]<r/2?t[3][0]:r/2,l=t[3][1]<u/2?t[3][1]:u/2,a=r-s,b=u-c,k=r-h,d=u-l;return{topLeftOuter:e(f,o,v,y).topLeft.subdivide(.5),topLeftInner:e(f+i[3].width,o+i[0].width,Math.max(0,v-i[3].width),Math.max(0,y-i[0].width)).topLeft.subdivide(.5),topRightOuter:e(f+a,o,s,p).topRight.subdivide(.5),topRightInner:e(f+Math.min(a,r+i[3].width),o+i[0].width,a>r+i[3].width?0:s-i[3].width,p-i[0].width).topRight.subdivide(.5),bottomRightOuter:e(f+k,o+b,h,c).bottomRight.subdivide(.5),bottomRightInner:e(f+Math.min(k,r-i[3].width),o+Math.min(b,u+i[0].width),Math.max(0,h-i[1].width),c-i[2].width).bottomRight.subdivide(.5),bottomLeftOuter:e(f,o+d,w,l).bottomLeft.subdivide(.5),bottomLeftInner:e(f+i[3].width,o+d,Math.max(0,w-i[3].width),l-i[2].width).bottomLeft.subdivide(.5)}}function s(n,t,i,r){var u=function(n,t,i){return{x:n.x+(t.x-n.x)*i,y:n.y+(t.y-n.y)*i}};return{start:n,startControl:t,endControl:i,end:r,subdivide:function(f){var e=u(n,t,f),o=u(t,i,f),h=u(i,r,f),c=u(e,o,f),l=u(o,h,f),a=u(c,l,f);return[s(n,e,c,a),s(a,l,h,r)]},curveTo:function(n){n.push(["bezierCurve",t.x,t.y,i.x,i.y,r.x,r.y])},curveToReversed:function(r){r.push(["bezierCurve",i.x,i.y,t.x,t.y,n.x,n.y])}}}function w(n,t,i,r,u,f,e){var o=[];return t[0]>0||t[1]>0?(o.push(["line",r[1].start.x,r[1].start.y]),r[1].curveTo(o)):o.push(["line",n.c1[0],n.c1[1]]),i[0]>0||i[1]>0?(o.push(["line",f[0].start.x,f[0].start.y]),f[0].curveTo(o),o.push(["line",e[0].end.x,e[0].end.y]),e[0].curveToReversed(o)):(o.push(["line",n.c2[0],n.c2[1]]),o.push(["line",n.c3[0],n.c3[1]])),t[0]>0||t[1]>0?(o.push(["line",u[1].end.x,u[1].end.y]),u[1].curveToReversed(o)):o.push(["line",n.c4[0],n.c4[1]]),o}function o(n,t,i,r,u,f,e){t[0]>0||t[1]>0?(n.push(["line",r[0].start.x,r[0].start.y]),r[0].curveTo(n),r[1].curveTo(n)):n.push(["line",f,e]);(i[0]>0||i[1]>0)&&n.push(["line",u[0].start.x,u[0].start.y])}function wt(n){return n.cssInt("zIndex")<0}function bt(n){return n.cssInt("zIndex")>0}function st(n){return n.cssInt("zIndex")===0}function ht(n){return["inline","inline-block","inline-table"].indexOf(n.css("display"))!==-1}function ct(n){return n instanceof d}function kt(n){return n.node.data.trim().length>0}function dt(n){return/^(normal|none|0px)$/.test(n.parent.css("letterSpacing"))}function gt(n){return["TopLeft","TopRight","BottomRight","BottomLeft"].map(function(t){var r=n.css("border"+t+"Radius"),i=r.split(" ");return i.length<=1&&(i[1]=i[0]),i.map(fi)})}function ni(n){return n.nodeType===Node.TEXT_NODE||n.nodeType===Node.ELEMENT_NODE}function ti(n){var t=n.css("position"),i=["absolute","relative","fixed"].indexOf(t)!==-1?n.css("zIndex"):"auto";return i!=="auto"}function c(n){return n.css("position")!=="static"}function tt(n){return n.css("float")!=="none"}function ii(n){return["inline-block","inline-table"].indexOf(n.css("display"))!==-1}function l(n){var t=this;return function(){return!n.apply(t,arguments)}}function a(n){return n.node.nodeType===Node.ELEMENT_NODE}function v(n){return n.isPseudoElement===!0}function it(n){return n.node.nodeType===Node.TEXT_NODE}function ri(n){return function(t,i){return t.cssInt("zIndex")+n.indexOf(t)/n.length-(i.cssInt("zIndex")+n.indexOf(i)/n.length)}}function ui(n){return n.getOpacity()<1}function fi(n){return parseInt(n,10)}function ei(n){return n.width}function oi(n){return n.node.nodeType!==Node.ELEMENT_NODE||["SCRIPT","HEAD","TITLE","OBJECT","BR","OPTION"].indexOf(n.node.nodeName)===-1}function rt(n){return[].concat.apply([],n)}function si(n){var t=n.substr(0,1);return t===n.substr(n.length-1)&&t.match(/'|"/)?n.substr(1,n.length-2):n}function hi(n){for(var r=[],t=0,u=!1,i;n.length;)ci(n[t])===u?(i=n.splice(0,t),i.length&&r.push(y.ucs2.encode(i)),u=!u,t=0):t++,t>=n.length&&(i=n.splice(0,t),i.length&&r.push(y.ucs2.encode(i)));return r}function ci(n){return[32,13,10,9,45].indexOf(n)!==-1}function li(n){return/[^\u0000-\u00ff]/.test(n)}var u=n("./log"),y=n("punycode"),b=n("./nodecontainer"),k=n("./textcontainer"),h=n("./pseudoelementcontainer"),lt=n("./fontmetrics"),f=n("./color"),d=n("./stackingcontext"),p=n("./utils"),g=p.bind,at=p.getBounds,vt=p.parseBackgrounds,yt=p.offsetBounds,nt;r.prototype.calculateOverflowClips=function(){this.nodes.forEach(function(n){if(a(n)){v(n)&&n.appendToDOM();n.borders=this.parseBorders(n);var i=n.css("overflow")==="hidden"?[n.borders.clip]:[],t=n.parseClip();t&&["absolute","fixed"].indexOf(n.css("position"))!==-1&&i.push([["rect",n.bounds.left+t.left,n.bounds.top+t.top,t.right-t.left,t.bottom-t.top]]);n.clip=ut(n)?n.parent.clip.concat(i):i;n.backgroundClip=n.css("overflow")!=="hidden"?n.clip.concat([n.borders.clip]):n.clip;v(n)&&n.cleanDOM()}else it(n)&&(n.clip=ut(n)?n.parent.clip:[]);v(n)||(n.bounds=null)},this)};r.prototype.asyncRenderer=function(n,t,i){i=i||Date.now();this.paint(n[this.renderIndex++]);n.length===this.renderIndex?t():i+20>Date.now()?this.asyncRenderer(n,t,i):setTimeout(g(function(){this.asyncRenderer(n,t)},this),0)};r.prototype.createPseudoHideStyles=function(n){this.createStyles(n,"."+h.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+':before { content: "" !important; display: none !important; }.'+h.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER+':after { content: "" !important; display: none !important; }')};r.prototype.disableAnimations=function(n){this.createStyles(n,"* { -webkit-animation: none !important; -moz-animation: none !important; -o-animation: none !important; animation: none !important; -webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; transition: none !important;}")};r.prototype.createStyles=function(n,t){var i=n.createElement("style");i.innerHTML=t;n.body.appendChild(i)};r.prototype.getPseudoElements=function(n){var t=[[n]],i,r;return n.node.nodeType===Node.ELEMENT_NODE&&(i=this.getPseudoElement(n,":before"),r=this.getPseudoElement(n,":after"),i&&t.push(i),r&&t.push(r)),rt(t)};r.prototype.getPseudoElement=function(n,t){var i=n.computedStyle(t),u,o,s;if(!i||!i.content||i.content==="none"||i.content==="-moz-alt-content"||i.display==="none")return null;var f=si(i.content),c=f.substr(0,3)==="url",r=document.createElement(c?"img":"html2canvaspseudoelement"),e=new h(r,n,t);for(u=i.length-1;u>=0;u--)o=pt(i.item(u)),r.style[o]=i[o];return r.className=h.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+" "+h.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER,c?(r.src=vt(f)[0].args[0],[e]):(s=document.createTextNode(f),r.appendChild(s),[e,new k(s,e)])};r.prototype.getChildren=function(n){return rt([].filter.call(n.node.childNodes,ni).map(function(t){var i=[t.nodeType===Node.TEXT_NODE?new k(t,n):new b(t,n)].filter(oi);return t.nodeType===Node.ELEMENT_NODE&&i.length&&t.tagName!=="TEXTAREA"?i[0].isElementVisible()?i.concat(this.getChildren(i[0])):[]:i},this))};r.prototype.newStackingContext=function(n,t){var i=new d(t,n.getOpacity(),n.node,n.parent),r;n.cloneTo(i);r=t?i.getParentStack(this):i.parent.stack;r.contexts.push(i);n.stack=i};r.prototype.createStackingContexts=function(){this.nodes.forEach(function(n){a(n)&&(this.isRootElement(n)||ui(n)||ti(n)||this.isBodyWithTransparentRoot(n)||n.hasTransform())?this.newStackingContext(n,!0):a(n)&&(c(n)&&st(n)||ii(n)||tt(n))?this.newStackingContext(n,!1):n.assignStack(n.parent.stack)},this)};r.prototype.isBodyWithTransparentRoot=function(n){return n.node.nodeName==="BODY"&&n.parent.color("backgroundColor").isTransparent()};r.prototype.isRootElement=function(n){return n.parent===null};r.prototype.sortStackingContexts=function(n){n.contexts.sort(ri(n.contexts.slice(0)));n.contexts.forEach(this.sortStackingContexts,this)};r.prototype.parseTextBounds=function(n){return function(t,i,r){var u,f,e;if(n.parent.css("textDecoration").substr(0,4)!=="none"||t.trim().length!==0){if(this.support.rangeBounds&&!n.parent.hasTransform())return u=r.slice(0,i).join("").length,this.getRangeBounds(n.node,u,t.length);if(n.node&&typeof n.node.data=="string")return f=n.node.splitText(t.length),e=this.getWrapperBounds(n.node,n.parent.hasTransform()),n.node=f,e}else(!this.support.rangeBounds||n.parent.hasTransform())&&(n.node=n.node.splitText(t.length));return{}}};r.prototype.getWrapperBounds=function(n,t){var i=n.ownerDocument.createElement("html2canvaswrapper"),r=n.parentNode,f=n.cloneNode(!0),u;return i.appendChild(n.cloneNode(!0)),r.replaceChild(i,n),u=t?yt(i):at(i),r.replaceChild(f,i),u};r.prototype.getRangeBounds=function(n,t,i){var r=this.range||(this.range=n.ownerDocument.createRange());return r.setStart(n,t),r.setEnd(n,t+i),r.getBoundingClientRect()};r.prototype.parse=function(n){var r=n.contexts.filter(wt),i=n.children.filter(a),t=i.filter(l(tt)),u=t.filter(l(c)).filter(l(ht)),f=i.filter(l(c)).filter(tt),e=t.filter(l(c)).filter(ht),o=n.contexts.concat(t.filter(c)).filter(st),s=n.children.filter(it).filter(kt),h=n.contexts.filter(bt);r.concat(u).concat(f).concat(e).concat(o).concat(s).concat(h).forEach(function(n){this.renderQueue.push(n);ct(n)&&(this.parse(n),this.renderQueue.push(new ft))},this)};r.prototype.paint=function(n){try{n instanceof ft?this.renderer.ctx.restore():it(n)?(v(n.parent)&&n.parent.appendToDOM(),this.paintText(n),v(n.parent)&&n.parent.cleanDOM()):this.paintNode(n)}catch(t){if(u(t),this.options.strict)throw t;}};r.prototype.paintNode=function(n){ct(n)&&(this.renderer.setOpacity(n.opacity),this.renderer.ctx.save(),n.hasTransform()&&this.renderer.setTransform(n.parseTransform()));n.node.nodeName==="INPUT"&&n.node.type==="checkbox"?this.paintCheckbox(n):n.node.nodeName==="INPUT"&&n.node.type==="radio"?this.paintRadio(n):this.paintElement(n)};r.prototype.paintElement=function(n){var t=n.parseBounds();this.renderer.clip(n.backgroundClip,function(){this.renderer.renderBackground(n,t,n.borders.borders.map(ei))},this);this.renderer.clip(n.clip,function(){this.renderer.renderBorders(n.borders.borders)},this);this.renderer.clip(n.backgroundClip,function(){var i,r;switch(n.node.nodeName){case"svg":case"IFRAME":i=this.images.get(n.node);i?this.renderer.renderImage(n,t,n.borders,i):u("Error loading <"+n.node.nodeName+">",n.node);break;case"IMG":r=this.images.get(n.node.src);r?this.renderer.renderImage(n,t,n.borders,r):u("Error loading <img>",n.node.src);break;case"CANVAS":this.renderer.renderImage(n,t,n.borders,{image:n.node});break;case"SELECT":case"INPUT":case"TEXTAREA":this.paintFormValue(n)}},this)};r.prototype.paintCheckbox=function(n){var r=n.parseBounds(),i=Math.min(r.width,r.height),t={width:i-1,height:i-1,top:r.top,left:r.left},u=[3,3],e=[u,u,u,u],o=[1,1,1,1].map(function(n){return{color:new f("#A5A5A5"),width:n}}),s=ot(t,e,o);this.renderer.clip(n.backgroundClip,function(){this.renderer.rectangle(t.left+1,t.top+1,t.width-2,t.height-2,new f("#DEDEDE"));this.renderer.renderBorders(et(o,t,s,e));n.node.checked&&(this.renderer.font(new f("#424242"),"normal","normal","bold",i-3+"px","arial"),this.renderer.text("✔",t.left+i/6,t.top+i-1))},this)};r.prototype.paintRadio=function(n){var t=n.parseBounds(),i=Math.min(t.width,t.height)-2;this.renderer.clip(n.backgroundClip,function(){this.renderer.circleStroke(t.left+1,t.top+1,i,new f("#DEDEDE"),1,new f("#A5A5A5"));n.node.checked&&this.renderer.circle(Math.ceil(t.left+i/4)+1,Math.ceil(t.top+i/4)+1,Math.floor(i/2),new f("#424242"))},this)};r.prototype.paintFormValue=function(n){var f=n.getValue(),r;if(f.length>0){var i=n.node.ownerDocument,t=i.createElement("html2canvaswrapper");["lineHeight","textAlign","fontFamily","fontWeight","fontSize","color","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","borderLeftStyle","borderTopStyle","borderLeftWidth","borderTopWidth","boxSizing","whiteSpace","wordWrap"].forEach(function(i){try{t.style[i]=n.css(i)}catch(r){u("html2canvas: Parse: Exception caught in renderFormValue: "+r.message)}});r=n.parseBounds();t.style.position="fixed";t.style.left=r.left+"px";t.style.top=r.top+"px";t.textContent=f;i.body.appendChild(t);this.paintText(new k(t.firstChild,n));i.body.removeChild(t)}};r.prototype.paintText=function(n){n.applyTextTransform();var i=y.ucs2.decode(n.node.data),r=(!this.options.letterRendering||dt(n))&&!li(n.node.data)?hi(i):i.map(function(n){return y.ucs2.encode([n])}),e=n.parent.fontWeight(),u=n.parent.css("fontSize"),f=n.parent.css("fontFamily"),t=n.parent.parseTextShadows();this.renderer.font(n.parent.color("color"),n.parent.css("fontStyle"),n.parent.css("fontVariant"),e,u,f);t.length?this.renderer.fontShadow(t[0].color,t[0].offsetX,t[0].offsetY,t[0].blur):this.renderer.clearShadow();this.renderer.clip(n.parent.clip,function(){r.map(this.parseTextBounds(n),this).forEach(function(t,i){t&&(this.renderer.text(r[i],t.left,t.bottom),this.renderTextDecoration(n.parent,t,this.fontMetrics.getMetrics(f,u)))},this)},this)};r.prototype.renderTextDecoration=function(n,t,i){switch(n.css("textDecoration").split(" ")[0]){case"underline":this.renderer.rectangle(t.left,Math.round(t.top+i.baseline+i.lineWidth),t.width,1,n.color("color"));break;case"overline":this.renderer.rectangle(t.left,Math.round(t.top),t.width,1,n.color("color"));break;case"line-through":this.renderer.rectangle(t.left,Math.ceil(t.top+i.middle+i.lineWidth),t.width,1,n.color("color"))}};nt={inset:[["darken",.6],["darken",.1],["darken",.1],["darken",.6]]};r.prototype.parseBorders=function(n){var t=n.parseBounds(),i=gt(n),r=["Top","Right","Bottom","Left"].map(function(t,i){var e=n.css("border"+t+"Style"),r=n.color("border"+t+"Color"),u;return e==="inset"&&r.isBlack()&&(r=new f([255,255,255,r.a])),u=nt[e]?nt[e][i]:null,{width:n.cssInt("border"+t+"Width"),color:u?r[u[0]](u[1]):r,args:null}}),u=ot(t,i,r);return{clip:this.parseBackgroundClip(n,u,r,i,t),borders:et(r,t,u,i)}};r.prototype.parseBackgroundClip=function(n,t,i,r,u){var e=n.css("backgroundClip"),f=[];switch(e){case"content-box":case"padding-box":o(f,r[0],r[1],t.topLeftInner,t.topRightInner,u.left+i[3].width,u.top+i[0].width);o(f,r[1],r[2],t.topRightInner,t.bottomRightInner,u.left+u.width-i[1].width,u.top+i[0].width);o(f,r[2],r[3],t.bottomRightInner,t.bottomLeftInner,u.left+u.width-i[1].width,u.top+u.height-i[2].width);o(f,r[3],r[0],t.bottomLeftInner,t.topLeftInner,u.left+i[3].width,u.top+u.height-i[2].width);break;default:o(f,r[0],r[1],t.topLeftOuter,t.topRightOuter,u.left,u.top);o(f,r[1],r[2],t.topRightOuter,t.bottomRightOuter,u.left+u.width,u.top);o(f,r[2],r[3],t.bottomRightOuter,t.bottomLeftOuter,u.left+u.width,u.top+u.height);o(f,r[3],r[0],t.bottomLeftOuter,t.topLeftOuter,u.left,u.top+u.height)}return f};t.exports=r},{"./color":3,"./fontmetrics":7,"./log":13,"./nodecontainer":14,"./pseudoelementcontainer":18,"./stackingcontext":21,"./textcontainer":25,"./utils":26,punycode:1}],16:[function(n,t,r){function f(n,t,r){var c="withCredentials"in new XMLHttpRequest,u,f;return t?(u=o(c),f=s(t,n,u),c?h(f):e(r,f,u).then(function(n){return a(n.content)})):i.reject("No proxy configured")}function y(n,t,r){var u="crossOrigin"in new Image,f=o(u),h=s(t,n,f);return u?i.resolve(h):e(r,h,f).then(function(n){return"data:"+n.type+";base64,"+n.content})}function e(n,t,r){return new i(function(i,u){var f=n.createElement("script"),e=function(){delete window.OfficeBrowserFeedback.html2canvas.proxy[r];n.body.removeChild(f)};window.OfficeBrowserFeedback.html2canvas.proxy[r]=function(n){e();i(n)};f.src=t;f.onerror=function(n){e();u(n)};n.body.appendChild(f)})}function o(n){return n?"":"html2canvas_"+Date.now()+"_"+ ++v+"_"+Math.round(Math.random()*1e5)}function s(n,t,i){return n+"?url="+encodeURIComponent(t)+(i.length?"&callback=html2canvas.proxy."+i:"")}function p(n){return function(t){var e=new DOMParser,i,r,f;try{i=e.parseFromString(t,"text/html")}catch(o){u("DOMParser not supported, falling back to createHTMLDocument");i=document.implementation.createHTMLDocument("");try{i.open();i.write(t);i.close()}catch(s){u("createHTMLDocument write not supported, falling back to document.body.innerHTML");i.body.innerHTML=t}}return r=i.querySelector("base"),r&&r.href.host||(f=i.createElement("base"),f.href=n,i.head.insertBefore(f,i.head.firstChild)),i}}function w(n,t,i,r,u,e){return new f(n,t,window.document).then(p(n)).then(function(n){return l(n,i,r,u,e,0,0)})}var h=n("./xhr"),c=n("./utils"),u=n("./log"),l=n("./clone"),a=c.decode64,v=0;r.Proxy=f;r.ProxyURL=y;r.loadUrlDocument=w},{"./clone":2,"./log":13,"./utils":26,"./xhr":28}],17:[function(n,t){function u(n,t){var f=document.createElement("a"),u;f.href=n;n=f.href;this.src=n;this.image=new Image;u=this;this.promise=new i(function(i,f){u.image.crossOrigin="Anonymous";u.image.onload=i;u.image.onerror=f;new r(n,t,document).then(function(n){u.image.src=n})["catch"](f)})}var r=n("./proxy").ProxyURL;t.exports=u},{"./proxy":16}],18:[function(n,t){function i(n,t,i){r.call(this,n,t);this.isPseudoElement=!0;this.before=i===":before"}var r=n("./nodecontainer");i.prototype.cloneTo=function(n){i.prototype.cloneTo.call(this,n);n.isPseudoElement=!0;n.before=this.before};i.prototype=Object.create(r.prototype);i.prototype.appendToDOM=function(){this.before?this.parent.node.insertBefore(this.node,this.parent.node.firstChild):this.parent.node.appendChild(this.node);this.parent.node.className+=" "+this.getHideClass()};i.prototype.cleanDOM=function(){this.node.parentNode.removeChild(this.node);this.parent.node.className=this.parent.node.className.replace(this.getHideClass(),"")};i.prototype.getHideClass=function(){return this["PSEUDO_HIDE_ELEMENT_CLASS_"+(this.before?"BEFORE":"AFTER")]};i.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE="___html2canvas___pseudoelement_before";i.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER="___html2canvas___pseudoelement_after";t.exports=i},{"./nodecontainer":14}],19:[function(n,t){function i(n,t,i,r,u){this.width=n;this.height=t;this.images=i;this.options=r;this.document=u}var r=n("./log");i.prototype.renderImage=function(n,t,i,r){var f=n.cssInt("paddingLeft"),e=n.cssInt("paddingTop"),h=n.cssInt("paddingRight"),c=n.cssInt("paddingBottom"),u=i.borders,o=t.width-(u[1].width+u[3].width+f+h),s=t.height-(u[0].width+u[2].width+e+c);this.drawImage(r,0,0,r.image.width||o,r.image.height||s,t.left+f+u[3].width,t.top+e+u[0].width,o,s)};i.prototype.renderBackground=function(n,t,i){t.height>0&&t.width>0&&(this.renderBackgroundColor(n,t),this.renderBackgroundImage(n,t,i))};i.prototype.renderBackgroundColor=function(n,t){var i=n.color("backgroundColor");i.isTransparent()||this.rectangle(t.left,t.top,t.width,t.height,i)};i.prototype.renderBorders=function(n){n.forEach(this.renderBorder,this)};i.prototype.renderBorder=function(n){n.color.isTransparent()||n.args===null||this.drawShape(n.args,n.color)};i.prototype.renderBackgroundImage=function(n,t,i){var u=n.parseBackgroundImages();u.reverse().forEach(function(u,f,e){var o,s;switch(u.method){case"url":o=this.images.get(u.args[0]);o?this.renderBackgroundRepeating(n,t,o,e.length-(f+1),i):r("Error loading background-image",u.args[0]);break;case"linear-gradient":case"gradient":s=this.images.get(u.value);s?this.renderBackgroundGradient(s,t,i):r("Error loading background-image",u.args[0]);break;case"none":break;default:r("Unknown background-image type",u.args[0])}},this)};i.prototype.renderBackgroundRepeating=function(n,t,i,r,u){var f=n.parseBackgroundSize(t,i.image,r),e=n.parseBackgroundPosition(t,i.image,r,f),o=n.parseBackgroundRepeat(r);switch(o){case"repeat-x":case"repeat no-repeat":this.backgroundRepeatShape(i,e,f,t,t.left+u[3],t.top+e.top+u[0],99999,f.height,u);break;case"repeat-y":case"no-repeat repeat":this.backgroundRepeatShape(i,e,f,t,t.left+e.left+u[3],t.top+u[0],f.width,99999,u);break;case"no-repeat":this.backgroundRepeatShape(i,e,f,t,t.left+e.left+u[3],t.top+e.top+u[0],f.width,f.height,u);break;default:this.renderBackgroundRepeat(i,e,f,{top:t.top,left:t.left},u[3],u[0])}};t.exports=i},{"./log":13}],20:[function(n,t){function i(n,t){r.apply(this,arguments);this.canvas=this.options.canvas||this.document.createElement("canvas");this.options.canvas||(this.canvas.width=n,this.canvas.height=t);this.ctx=this.canvas.getContext("2d");this.taintCtx=this.document.createElement("canvas").getContext("2d");this.ctx.textBaseline="bottom";this.variables={};f("Initialized CanvasRenderer with size",n,"x",t)}function e(n){return n.length>0}var r=n("../renderer"),u=n("../lineargradientcontainer"),f=n("../log");i.prototype=Object.create(r.prototype);i.prototype.setFillStyle=function(n){return this.ctx.fillStyle=typeof n=="object"&&!!n.isColor?n.toString():n,this.ctx};i.prototype.rectangle=function(n,t,i,r,u){this.setFillStyle(u).fillRect(n,t,i,r)};i.prototype.circle=function(n,t,i,r){this.setFillStyle(r);this.ctx.beginPath();this.ctx.arc(n+i/2,t+i/2,i/2,0,Math.PI*2,!0);this.ctx.closePath();this.ctx.fill()};i.prototype.circleStroke=function(n,t,i,r,u,f){this.circle(n,t,i,r);this.ctx.strokeStyle=f.toString();this.ctx.stroke()};i.prototype.drawShape=function(n,t){this.shape(n);this.setFillStyle(t).fill()};i.prototype.taints=function(n){if(n.tainted===null){this.taintCtx.drawImage(n.image,0,0);try{this.taintCtx.getImageData(0,0,1,1);n.tainted=!1}catch(t){this.taintCtx=document.createElement("canvas").getContext("2d");n.tainted=!0}}return n.tainted};i.prototype.drawImage=function(n,t,i,r,u,f,e,o,s){(!this.taints(n)||this.options.allowTaint)&&this.ctx.drawImage(n.image,t,i,r,u,f,e,o,s)};i.prototype.clip=function(n,t,i){this.ctx.save();n.filter(e).forEach(function(n){this.shape(n).clip()},this);t.call(i);this.ctx.restore()};i.prototype.shape=function(n){return this.ctx.beginPath(),n.forEach(function(n,t){n[0]==="rect"?this.ctx.rect.apply(this.ctx,n.slice(1)):this.ctx[t===0?"moveTo":n[0]+"To"].apply(this.ctx,n.slice(1))},this),this.ctx.closePath(),this.ctx};i.prototype.font=function(n,t,i,r,u,f){this.setFillStyle(n).font=[t,i,r,u,f].join(" ").split(",")[0]};i.prototype.fontShadow=function(n,t,i,r){this.setVariable("shadowColor",n.toString()).setVariable("shadowOffsetY",t).setVariable("shadowOffsetX",i).setVariable("shadowBlur",r)};i.prototype.clearShadow=function(){this.setVariable("shadowColor","rgba(0,0,0,0)")};i.prototype.setOpacity=function(n){this.ctx.globalAlpha=n};i.prototype.setTransform=function(n){this.ctx.translate(n.origin[0],n.origin[1]);this.ctx.transform.apply(this.ctx,n.matrix);this.ctx.translate(-n.origin[0],-n.origin[1])};i.prototype.setVariable=function(n,t){return this.variables[n]!==t&&(this.variables[n]=this.ctx[n]=t),this};i.prototype.text=function(n,t,i){this.ctx.fillText(n,t,i)};i.prototype.backgroundRepeatShape=function(n,t,i,r,u,f,e,o,s){var h=[["line",Math.round(u),Math.round(f)],["line",Math.round(u+e),Math.round(f)],["line",Math.round(u+e),Math.round(o+f)],["line",Math.round(u),Math.round(o+f)]];this.clip([h],function(){this.renderBackgroundRepeat(n,t,i,r,s[3],s[0])},this)};i.prototype.renderBackgroundRepeat=function(n,t,i,r,u,f){var e=Math.round(r.left+t.left+u),o=Math.round(r.top+t.top+f);this.setFillStyle(this.ctx.createPattern(this.resizeImage(n,i),"repeat"));this.ctx.translate(e,o);this.ctx.fill();this.ctx.translate(-e,-o)};i.prototype.renderBackgroundGradient=function(n,t){if(n instanceof u){var i=this.ctx.createLinearGradient(t.left+t.width*n.x0,t.top+t.height*n.y0,t.left+t.width*n.x1,t.top+t.height*n.y1);n.colorStops.forEach(function(n){i.addColorStop(n.stop,n.color.toString())});this.rectangle(t.left,t.top,t.width,t.height,i)}};i.prototype.resizeImage=function(n,t){var i=n.image,u,r;return i.width===t.width&&i.height===t.height?i:(r=document.createElement("canvas"),r.width=t.width,r.height=t.height,u=r.getContext("2d"),u.drawImage(i,0,0,i.width,i.height,0,0,t.width,t.height),r)};t.exports=i},{"../lineargradientcontainer":12,"../log":13,"../renderer":19}],21:[function(n,t){function i(n,t,i,u){r.call(this,i,u);this.ownStacking=n;this.contexts=[];this.children=[];this.opacity=(this.parent?this.parent.stack.opacity:1)*t}var r=n("./nodecontainer");i.prototype=Object.create(r.prototype);i.prototype.getParentStack=function(n){var t=this.parent?this.parent.stack:null;return t?t.ownStacking?t:t.getParentStack(n):n.stack};t.exports=i},{"./nodecontainer":14}],22:[function(n,t){function i(n){this.rangeBounds=this.testRangeBounds(n);this.cors=this.testCORS();this.svg=this.testSVG()}i.prototype.testRangeBounds=function(n){var i,t,r,u,f=!1;return n.createRange&&(i=n.createRange(),i.getBoundingClientRect&&(t=n.createElement("boundtest"),t.style.height="123px",t.style.display="block",n.body.appendChild(t),i.selectNode(t),r=i.getBoundingClientRect(),u=r.height,u===123&&(f=!0),n.body.removeChild(t))),f};i.prototype.testCORS=function(){return typeof(new Image).crossOrigin!="undefined"};i.prototype.testSVG=function(){var n=new Image,t=document.createElement("canvas"),i=t.getContext("2d");n.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'><\/svg>";try{i.drawImage(n,0,0);t.toDataURL()}catch(r){return!1}return!0};t.exports=i},{}],23:[function(n,t){function r(n){this.src=n;this.image=null;var t=this;this.promise=this.hasFabric().then(function(){return t.isInline(n)?i.resolve(t.inlineFormatting(n)):u(n)}).then(function(n){return new i(function(i){window.OfficeBrowserFeedback.html2canvas.svg.fabric.loadSVGFromString(n,t.createCanvas.call(t,i))})})}var u=n("./xhr"),f=n("./utils").decode64;r.prototype.hasFabric=function(){return!window.OfficeBrowserFeedback.html2canvas.svg||!window.OfficeBrowserFeedback.html2canvas.svg.fabric?i.reject(new Error("html2canvas.svg.js is not loaded, cannot render svg")):i.resolve()};r.prototype.inlineFormatting=function(n){return/^data:image\/svg\+xml;base64,/.test(n)?this.decode64(this.removeContentType(n)):this.removeContentType(n)};r.prototype.removeContentType=function(n){return n.replace(/^data:image\/svg\+xml(;base64)?,/,"")};r.prototype.isInline=function(n){return/^data:image\/svg\+xml/i.test(n)};r.prototype.createCanvas=function(n){var t=this;return function(i,r){var u=new window.OfficeBrowserFeedback.html2canvas.svg.fabric.StaticCanvas("c");t.image=u.lowerCanvasEl;u.setWidth(r.width).setHeight(r.height).add(window.OfficeBrowserFeedback.html2canvas.svg.fabric.util.groupSVGElements(i,r)).renderAll();n(u.lowerCanvasEl)}};r.prototype.decode64=function(n){return typeof atob=="function"?window.atob(n):f(n)};t.exports=r},{"./utils":26,"./xhr":28}],24:[function(n,t){function r(n,t){this.src=n;this.image=null;var r=this;this.promise=t?new i(function(t,i){r.image=new Image;r.image.onload=t;r.image.onerror=i;r.image.src="data:image/svg+xml,"+(new XMLSerializer).serializeToString(n);r.image.complete===!0&&t(r.image)}):this.hasFabric().then(function(){return new i(function(t){window.OfficeBrowserFeedback.html2canvas.svg.fabric.parseSVGDocument(n,r.createCanvas.call(r,t))})})}var u=n("./svgcontainer");r.prototype=Object.create(u.prototype);t.exports=r},{"./svgcontainer":23}],25:[function(n,t){function i(n,t){r.call(this,n,t)}function u(n,t,i){if(n.length>0)return t+i.toUpperCase()}var r=n("./nodecontainer");i.prototype=Object.create(r.prototype);i.prototype.applyTextTransform=function(){this.node.data=this.transform(this.parent.css("textTransform"))};i.prototype.transform=function(n){var t=this.node.data;switch(n){case"lowercase":return t.toLowerCase();case"capitalize":return t.replace(/(^|\s|:|-|\(|\))([a-z])/g,u);case"uppercase":return t.toUpperCase();default:return t}};t.exports=i},{"./nodecontainer":14}],26:[function(n,t,i){i.smallImage=function(){return"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"};i.bind=function(n,t){return function(){return n.apply(t,arguments)}};i.decode64=function(n){for(var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=n.length,s,e,r,u,f,o,h,c="",t=0;t<l;t+=4)s=i.indexOf(n[t]),e=i.indexOf(n[t+1]),r=i.indexOf(n[t+2]),u=i.indexOf(n[t+3]),f=s<<2|e>>4,o=(e&15)<<4|r>>2,h=(r&3)<<6|u,c+=r===64?String.fromCharCode(f):u===64||u===-1?String.fromCharCode(f,o):String.fromCharCode(f,o,h);return c};i.getBounds=function(n){if(n.getBoundingClientRect){var t=n.getBoundingClientRect(),i=n.offsetWidth==null?t.width:n.offsetWidth;return{top:t.top,bottom:t.bottom||t.top+t.height,right:t.left+i,left:t.left,width:i,height:n.offsetHeight==null?t.height:n.offsetHeight}}return{}};i.offsetBounds=function(n){var t=n.offsetParent?i.offsetBounds(n.offsetParent):{top:0,left:0};return{top:n.offsetTop+t.top,bottom:n.offsetTop+n.offsetHeight+t.top,right:n.offsetLeft+t.left+n.offsetWidth,left:n.offsetLeft+t.left,width:n.offsetWidth,height:n.offsetHeight}};i.parseBackgrounds=function(n){var a=" \r\n\t",t,i,o,h,u,l=[],r=0,s=0,f,e,c=function(){t&&(i.substr(0,1)==='"'&&(i=i.substr(1,i.length-2)),i&&e.push(i),t.substr(0,1)==="-"&&(h=t.indexOf("-",1)+1)>0&&(o=t.substr(0,h),t=t.substr(h)),l.push({prefix:o,method:t.toLowerCase(),value:u,args:e,image:null}));e=[];t=o=i=u=""};return e=[],t=o=i=u="",n.split("").forEach(function(n){if(r!==0||!(a.indexOf(n)>-1)){switch(n){case'"':f?f===n&&(f=null):f=n;break;case"(":if(f)break;else{if(r===0){r=1;u+=n;return}s++}break;case")":if(f)break;else if(r===1){if(s===0){r=0;u+=n;c();return}s--}break;case",":if(f)break;else{if(r===0){c();return}if(r===1&&s===0&&!t.match(/^url$/i)){e.push(i);i="";u+=n;return}}}u+=n;r===0?t+=n:i+=n}}),c(),l}},{}],27:[function(n,t){function r(n){i.apply(this,arguments);this.type=n.args[0]==="linear"?i.TYPES.LINEAR:i.TYPES.RADIAL}var i=n("./gradientcontainer");r.prototype=Object.create(i.prototype);t.exports=r},{"./gradientcontainer":9}],28:[function(n,t){function r(n){return new i(function(t,i){var r=new XMLHttpRequest;r.open("GET",n);r.onload=function(){r.status===200?t(r.responseText):i(new Error(r.statusText))};r.onerror=function(){i(new Error("Network Error"))};r.send()})}t.exports=r},{}]},{},[4])(4)})}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"es6-promise":39}]},{},[42,43,91]),function(n){occe.Floodgate=function(){"use strict";function t(){var u=[],e,t,o,f,r;occe.Resources.getSetting("OdcSup_FloodgateSurveyService_Rollout_Enabled").toLowerCase()==="true"?(e={"f7899ecb-b0e8-45d1-b325-301c2c3c443b":{Prompt:{Title:occe.Resources.getLocalizedString("L_Floodgate_Prompt_Title"),Question:occe.Resources.getLocalizedString("L_Floodgate_Prompt_Question"),YesLabel:occe.Resources.getLocalizedString("L_Floodgate_Prompt_YesLabel"),NoLabel:occe.Resources.getLocalizedString("L_Floodgate_Prompt_NoLabel")},Rating:{Question:occe.Resources.getLocalizedString("L_Floodgate_Rating_Question"),RatingValuesAscending:[occe.Resources.getLocalizedString("L_Floodgate_Rating_Value_1"),"2","3","4",occe.Resources.getLocalizedString("L_Floodgate_Rating_Value_5")]},Question:{Question:occe.Resources.getLocalizedString("L_Floodgate_FollowUpQuestion_Question")}},"8a3be85e-d31e-47cb-955a-9e6ab77a3ff8":{Prompt:{Title:occe.Resources.getLocalizedString("L_Floodgate_Prompt_Title"),Question:occe.Resources.getLocalizedString("L_Floodgate_Prompt_Question"),YesLabel:occe.Resources.getLocalizedString("L_Floodgate_Prompt_YesLabel"),NoLabel:occe.Resources.getLocalizedString("L_Floodgate_Prompt_NoLabel")},Rating:{Question:occe.Resources.getLocalizedString("L_Floodgate_Question_LanguageQuality"),RatingValuesAscending:[occe.Resources.getLocalizedString("L_Floodgate_Rating_Verbose_1"),occe.Resources.getLocalizedString("L_Floodgate_Rating_Verbose_2"),occe.Resources.getLocalizedString("L_Floodgate_Rating_Verbose_3"),occe.Resources.getLocalizedString("L_Floodgate_Rating_Verbose_4"),occe.Resources.getLocalizedString("L_Floodgate_Rating_Verbose_5")]},Question:{Question:occe.Resources.getLocalizedString("L_Floodgate_Question_TellUsMoreWhy")}}},t={CampaignId:occe.Resources.getSetting("OdcSup_FloodgateSurvey_CampaignId"),StartTimeUtc:occe.Resources.getSetting("OdcSup_FloodgateSurvey_StartTimeUtc"),EndTimeUtc:occe.Resources.getSetting("OdcSup_FloodgateSurvey_EndTimeUtc"),GovernedChannelType:parseInt(occe.Resources.getSetting("OdcSup_FloodgateSurvey_GovernedChannelType")),Scope:{Type:1},NominationScheme:{Type:0,PercentageNumerator:parseInt(occe.Resources.getSetting("OdcSup_FloodgateSurvey_NominationPercentage")),PercentageDenominator:100,NominationPeriod:{Type:0,IntervalSeconds:parseInt(occe.Resources.getSetting("OdcSup_FloodgateSurvey_NominationPeriod"))},CooldownPeriod:{Type:0,IntervalSeconds:parseInt(occe.Resources.getSetting("OdcSup_FloodgateSurvey_CooldownPeriod"))}},SurveyTemplate:{Type:2,ActivationEvent:{Type:0,Activity:"AppUsageTime",Count:parseInt(occe.Resources.getSetting("OdcSup_FloodgateSurvey_ActivationActivityCount")),IsAggregate:!0}}},t.SurveyTemplate.Content=e[t.CampaignId],u.push(t)):(o={CampaignId:"f7899ecb-b0e8-45d1-b325-301c2c3c443b",StartTimeUtc:"2018-12-07T00:00:00Z",EndTimeUtc:"9999-12-31T23:59:59Z",GovernedChannelType:0,Scope:{Type:1},NominationScheme:{Type:0,PercentageNumerator:parseInt(occe.Resources.getSetting("OdcSup_FloodgateSurvey_NominationPercentage")),PercentageDenominator:100,NominationPeriod:{Type:0,IntervalSeconds:parseInt(occe.Resources.getSetting("OdcSup_FloodgateSurvey_NominationPeriod"))},CooldownPeriod:{Type:0,IntervalSeconds:parseInt(occe.Resources.getSetting("OdcSup_FloodgateSurvey_CooldownPeriod"))}},SurveyTemplate:{Type:2,ActivationEvent:{Type:0,Activity:"AppUsageTime",Count:parseInt(occe.Resources.getSetting("OdcSup_FloodgateSurvey_TimeToNominate")),IsAggregate:!0},Content:{Prompt:{Title:occe.Resources.getLocalizedString("L_Floodgate_Prompt_Title"),Question:occe.Resources.getLocalizedString("L_Floodgate_Prompt_Question"),YesLabel:occe.Resources.getLocalizedString("L_Floodgate_Prompt_YesLabel"),NoLabel:occe.Resources.getLocalizedString("L_Floodgate_Prompt_NoLabel")},Rating:{Question:occe.Resources.getLocalizedString("L_Floodgate_Rating_Question"),RatingValuesAscending:[occe.Resources.getLocalizedString("L_Floodgate_Rating_Value_1"),"2","3","4",occe.Resources.getLocalizedString("L_Floodgate_Rating_Value_5")]},Question:{Question:occe.Resources.getLocalizedString("L_Floodgate_FollowUpQuestion_Question")}}}},u.push(o));window.OfficeBrowserFeedback=window.OfficeBrowserFeedback||{};window.OfficeBrowserFeedback.floodgate=window.OfficeBrowserFeedback.floodgate||{};window.OfficeBrowserFeedback.initOptions={appId:2258,stylesUrl:"/"+occe.Resources.getSetting("OdcSup_Content_Route_Prefix")+"/floodgate",intlUrl:"/"+occe.Resources.getSetting("OdcSup_Script_Route_Prefix")+"/floodgateintl/",environment:parseInt(occe.Resources.getSetting("OdcSup_FloodgateSurvey_Environment"))};OOGlobal!==null&&OOGlobal.Language!==null&&(window.OfficeBrowserFeedback.initOptions.locale=OOGlobal.Language);f=i();f!==null&&(window.OfficeBrowserFeedback.initOptions.sessionId=f);window.OfficeBrowserFeedback.initOptions.telemetryGroup={audienceGroup:occe.Resources.getMetadata("awa-env")};window.OfficeBrowserFeedback.floodgate.initOptions={campaignDefinitions:u};occe.Resources.getSetting("OdcSup_FloodgateSurveyService_Rollout_Enabled").toLowerCase()==="true"?window.OfficeBrowserFeedback.floodgate.initialize().then(function(){window.OfficeBrowserFeedback.floodgate.start();setInterval(function(){window.OfficeBrowserFeedback.floodgate.getEngine().getActivityListener().logActivity(occe.Resources.getSetting("OdcSup_FloodgateSurvey_ActivationActivity"),Math.round(occe.Resources.getSetting("OdcSup_FloodgateSurvey_ActivityInterval")/1e3))},parseInt(occe.Resources.getSetting("OdcSup_FloodgateSurvey_ActivityInterval")))}):window.OfficeBrowserFeedback.floodgate.initialize().then(function(){window.OfficeBrowserFeedback.floodgate.start();setInterval(function(){window.OfficeBrowserFeedback.floodgate.getEngine().getActivityListener().logActivity("AppUsageTime",Math.round(occe.Resources.getSetting("OdcSup_FloodgateSurvey_ActivityInterval")/1e3))},parseInt(occe.Resources.getSetting("OdcSup_FloodgateSurvey_ActivityInterval")))});r=n(window);r.focus(function(){window.OfficeBrowserFeedback.floodgate&&window.OfficeBrowserFeedback.floodgate.start()});r.blur(function(){window.OfficeBrowserFeedback.floodgate&&window.OfficeBrowserFeedback.floodgate.stop()});r.on("unload",function(){window.OfficeBrowserFeedback.floodgate&&window.OfficeBrowserFeedback.floodgate.stop()})}function i(){var t=occe.GetCookie("MSFPC"),n;return t===null?null:(n=/GUID=([a-f\d]{8})([a-f\d]{4})([a-f\d]{4})([a-f\d]{4})([a-f\d]{12})/.exec(t),n?n.slice(1).join("-"):null)}return{initializeFloodgate:t}}()}(jQuery),function(n){"use strict";n(function(){occe.Floodgate.initializeFloodgate()})}(jQuery)