/*! For license information please see officebrowserfeedback.min.js.LICENSE.txt */ !function(A){var e={};function t(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return A[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.m=A,t.c=e,t.d=function(A,e,n){t.o(A,e)||Object.defineProperty(A,e,{enumerable:!0,get:n})},t.r=function(A){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})},t.t=function(A,e){if(1&e&&(A=t(A)),8&e)return A;if(4&e&&"object"==typeof A&&A&&A.__esModule)return A;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:A}),2&e&&"string"!=typeof A)for(var r in A)t.d(n,r,function(e){return A[e]}.bind(null,r));return n},t.n=function(A){var e=A&&A.__esModule?function(){return A.default}:function(){return A};return t.d(e,"a",e),e},t.o=function(A,e){return Object.prototype.hasOwnProperty.call(A,e)},t.p="",t(t.s=58)}([function(A,e,t){"use strict";t.d(e,"a",(function(){return n})),t.d(e,"b",(function(){return r})),t.d(e,"c",(function(){return i})),t.d(e,"d",(function(){return o})),t.d(e,"e",(function(){return a})),t.d(e,"g",(function(){return s})),t.d(e,"f",(function(){return c})),t.d(e,"h",(function(){return u}));var n=function(){function A(){}return A.Alt="alt",A.AriaLabel="aria-label",A.AriaSelected="aria-selected",A.AriaOrientation="aria-orientation",A.AriaExpanded="aria-expanded",A.AriaControls="aria-controls",A.AriaHasPopups="aria-haspopup",A.AriaModal="aria-modal",A.AriaLabelledBy="aria-labelledby",A.AriaDescribedBy="aria-describedby",A.Class="class",A.DataHtml2CanvasIgnore="data-html2canvas-ignore",A.Disabled="disabled",A.Fill="fill",A.For="for",A.Preview="preview",A.Form="form",A.Height="height",A.HRef="href",A.Id="id",A.MaxLength="maxlength",A.Name="name",A.Placeholder="placeholder",A.Points="points",A.Rel="rel",A.Role="role",A.Source="src",A.Stroke="stroke",A.Style="style",A.TabIndex="tabindex",A.Target="target",A.Transform="transform",A.Type="type",A.Value="value",A.ViewBox="viewBox",A.Width="width",A.xlinkHref="xlink:href",A.X="x",A.Y="y",A}(),r=function(){function A(){}return A.BlankWindow="_blank",A.Button="button",A.Dialog="dialog",A.Tab="tab",A.TabList="tablist",A.TabPanel="tabpanel",A.Checkbox="checkbox",A.Checked="checked",A.False="false",A.Zero="0",A.Polite="polite",A.Radio="radio",A.Submit="submit",A.ScreenshotPreview="ScreenshotPreview",A.Text="text",A.TextAreaMaxLength="1000",A.True="true",A.Unchecked="unchecked",A.NoReferrer="noreferrer",A.AriaOrientationValueVertical="vertical",A}(),i=(function(){function A(){}A.CLCID="CLCID"}(),function(){function A(){}return A.AriaLiveTemplate="obf-AriaLiveTemplate",A.CheckBox="obf-CheckBox",A.FontTitle="obf-FontTitle",A.CloseButton="obf-CloseButton",A.FontSubtitle="obf-FontSubtitle",A.FontText="obf-FontText",A.FontSubText="obf-FontSubText",A.FontSubSubText="obf-FontSubSubText",A.Hidden="obf-Hidden",A.Link="obf-Link",A.MarginLeft60px="obf-MarginLeft60px",A.MarginLeft180px="obf-MarginLeft180px",A.NarrowLayout="obf-NarrowLayout",A.PrivacyStatementLinkDiv="obf-PrivacyStatementLinkDiv",A.PrivacyStatementLinkDivEudbUx="obf-PrivacyStatementLinkDivEudbUx",A.Rtl="obf-Rtl",A.Spinner="obf-Spinner",A.SpinnerCircle="obf-SpinnerCircle",A.SubmitButton="obf-SubmitButton",A.CancelButton="obf-CancelButton",A.TextInput="obf-TextInput",A.Visible="obf-Visible",A.Rating="obf-Rating",A.RatingGraphic="obf-RatingGraphic",A.RatingGraphicFilled="obf-RatingGraphic-Filled",A.ChoiceGroup="obf-ChoiceGroup",A.ChoiceGroupIcon="obf-ChoiceGroupIcon",A.OverallAnchor="obf-OverallAnchor",A.OverallAnchorActive="obf-OverallAnchorActive",A.OverallImage="obf-OverallImage",A.OverallText="obf-OverallText",A.SingleLayout="obf-SingleLayout",A.ShowRightBorder="obf-ShowRightBorder",A.SlideLeft="obf-slideLeft",A.TextAlignLeft="obf-TextAlignLeft",A.FormContainer="obf-FormContainer",A.FormWideContainer="obf-FormWideContainer",A.ThanksPanelTitle="obf-ThanksPanelTitle",A.ThanksPanelMessage="obf-ThanksPanelMessage",A.FormQuestionMiddleText="obf-FormQuestionMiddleText",A.FormMiddleText="obf-FormMiddleText",A.FormCategoriesDropdown="obf-FormCategoriesDropdown",A.FormComment="obf-FormComment",A.FormRatingContainer="obf-FormRatingContainer",A.FormRatingLabel="obf-FormRatingLabel",A.FormRating="obf-FormRating",A.FormEmailContainer="obf-FormEmailContainer",A.FormEmailInput="obf-FormEmailInput",A.FormEmailTextBox="obf-FormEmailTextBox",A.FormEmailCheckBox="obf-FormEmailCheckBox",A.FormEmailLabel="obf-FormEmailLabel",A.FormBottomContainer="obf-FormBottomContainer",A.FormSubmitButtonContainer="obf-FormSubmitButtonContainer",A.FormScreenshotContainer="obf-FormScreenshotContainer",A.FormScreenshotLabel="obf-FormScreenshotLabel",A.FormScreenshotCheckbox="obf-FormScreenshotCheckbox",A.FormScreenshotPreview="obf-FormScreenshotPreview",A.FormPrivacyConsentText="obf-TFormPrivacyConsentText",A.TFormEmailCheckbox="obf-TFormEmailCheckbox",A.TFormEmailLabel="obf-TFormEmailLabel ",A.EmailCheckBoxLabel="obf-EmailCheckBoxLabel",A.Toast="obf-Toast",A.ToastZoom="obf-ToastZoom",A}()),o=function(){function A(){}return A.CloseButton="obf-CloseButton",A.ColumnSeparatorDiv="obf-ColumnSeparatorDiv",A.OverallAnchorsContainer="obf-OverallAnchorsContainer",A.OverallFrownAnchor="obf-OverallFrownAnchor",A.OverallFrownDiv="obf-OverallFrownDiv",A.OverallFrownImage="obf-OverallFrownImage",A.OverallFrownText="obf-OverallFrownText",A.OverallSmileAnchor="obf-OverallSmileAnchor",A.OverallSmileDiv="obf-OverallSmileDiv",A.OverallSmileImage="obf-OverallSmileImage",A.OverallSmileText="obf-OverallSmileText",A.OverallIdeaAnchor="obf-OverallIdeaAnchor",A.OverallIdeaDiv="obf-OverallIdeaDiv",A.OverallIdeaImage="obf-OverallIdeaImage",A.OverallIdeaText="obf-OverallIdeaText",A.OverallBugAnchor="obf-OverallBugAnchor",A.OverallBugDiv="obf-OverallBugDiv",A.OverallBugImage="obf-OverallBugImage",A.OverallBugText="obf-OverallBugText",A.QuestionLeftText="obf-QuestionLeftText",A.LeftFormContainer="obf-LeftFormContainer",A.LeftPanelContainer="obf-LeftPanelContainer",A.MainContainer="obf-MainContainer",A.MainContentHolder="obf-MainContentHolder",A.MiddleFormContainer="obf-MiddleFormContainer",A.OverlayBackground="obf-OverlayBackground",A.PrivacyStatementLink="obf-PrivacyStatementLink",A.PrivacyConsentText="obf-PrivacyConsentText",A.FirstTabbable="obf-FirstTabbable",A.LastTabbable="obf-LastTabbable",A.EmailCheckBox="obf-EmailCheckBox",A.SingleFormContainer="obf-SingleFormContainer",A.SingleFormQuestionMiddleText="obf-SingleFormQuestionMiddleText",A.SingleFormCategoriesDropdown="obf-SingleFormCategoriesDropdown",A.SingleFormComment="obf-SingleFormComment",A.SingleFormEmailInput="obf-SingleFormEmailInput",A.SingleFormRating="obf-SingleFormRating",A.SingleFormScreenshotCheckbox="obf-SingleFormScreenshotCheckbox",A.SingleFormScreenshotPreview="obf-SingleFormScreenshotPreview",A.SingleFormSubmitButton="obf-SingleFormSubmitButton",A.SingleFormCancelButton="obf-SingleFormCancelButton",A.SingleFormSubmitButtonSpinner="obf-SingleFormSubmitButtonSpinner",A.BasicFormContainer="obf-BasicFormContainer",A.BasicFormQuestionMiddleText="obf-BasicFormQuestionMiddleText",A.BasicFormCategoriesDropdown="obf-BasicFormCategoriesDropdown",A.BasicFormComment="obf-BasicFormComment",A.BasicFormEmailInput="obf-BasicFormEmailInput",A.BasicFormRating="obf-BasicFormRating",A.BasicFormScreenshotCheckbox="obf-BasicFormScreenshotCheckbox",A.BasicFormScreenshotPreview="obf-BasicFormScreenshotPreview",A.BasicFormSubmitButton="obf-BasicFormSubmitButton",A.BasicFormCancelButton="obf-BasicFormCancelButton",A.BasicFormSubmitButtonSpinner="obf-BasicFormSubmitButtonSpinner",A.ThanksPanelContainer="obf-ThanksPanelContainer",A.ThanksPanelCloseButton="obf-ThanksPanelCloseButton",A.ThanksPanelDiscussion="obf-ThanksPanelDiscussion",A.ThanksPanelVerticalContainer="obf-ThanksPanelVerticalContainer",A.ThanksPanelInnerContainer="obf-ThanksPanelInnerContainer",A.ThanksPanelParagraph="obf-ThanksPanelParagraph",A.FeedbackPortalIdeaContainer="obf-FeedbackPortalIdeaContainer",A.OverallFeedbackPortalIdeaAnchor="obf-OverallFeedbackPortalIdeaAnchor",A.ToastContainer="obf-ToastContainer",A.ToastCancel="obf-ToastCancel",A.TPromptContainer="obf-TPromptContainer",A.TPromptTitle="obf-TPromptTitle",A.TPromptText="obf-TPromptText",A.TFormContainer="obf-TFormContainer",A.TFormTitle="obf-TFormTitle",A.TFormRating="obf-TFormRating",A.TFormRatingQuestion="obf-TFormRatingQuestion",A.TFormCommentQuestion="obf-TFormCommentQuestion",A.TFormComment="obf-TFormComment",A.TFormEmailTextBox="obf-TFormEmailTextBox",A.TFormEmailCheckBox="obf-TFormEmailCheckBox",A.TFormEmailLabel="obf-TFormEmailLabel",A.TFormSubmitButton="obf-TFormSubmitButton",A.TFormCancelButton="obf-TFormCancelButton",A.TFormSubmitButtonSpinner="obf-TFormSubmitButtonSpinner",A.TFormSubmitButtonContainer="obf-TFormSubmitButtonContainer",A}(),a=function(){function A(){}return A.Esc=27,A.Tab=9,A}(),s=function(){function A(){}return A.Anchor="A",A.Button="button",A.Defs="defs",A.Div="div",A.FieldSet="fieldset",A.Form="form",A.Img="img",A.Input="input",A.Label="label",A.Legend="legend",A.Option="option",A.Polygon="polygon",A.Select="select",A.Span="span",A.Svg="svg",A.TextArea="textarea",A.Use="use",A}(),c=function(){function A(){}return A.Button="Button",A}(),u=function(){function A(){}return A.PrivacyStatementLink="https://go.microsoft.com/fwlink/?LinkId=521839",A}();!function(){function A(){}A.No="1",A.Yes="2"}()},function(A,e,t){"use strict";t.d(e,"get",(function(){return c})),t.d(e,"validateFeedbackType",(function(){return u}));var n=t(2),r=t(3),i=t(30),o=t(4),a=t(0);t.d(e,"AgeGroup",(function(){return o.a})),t.d(e,"AuthenticationType",(function(){return o.b})),t.d(e,"CustomResources",(function(){return o.c}));t(28);var s=new(function(){function A(){this.feedbackSubmitted=!1}return A.validateCategoryOptions=function(A){if(!A)return{show:!1};if(n.c(A.show,"categories.show"),A.customCategories){n.b(A.customCategories,"categories.customCategories");for(var e=0,t=A.customCategories;e20)throw"custom category '"+r+"' too long, max 20 characters."}}return A},A.prototype.getFeedbackSubmitted=function(){return this.feedbackSubmitted},A.prototype.setFeedbackSubmitted=function(A){this.feedbackSubmitted=A},A.prototype.getCommonInitOptions=function(){return this.commonInitOptions},A.prototype.getInAppFeedbackInitOptions=function(){return this.inAppFeedbackInitOptions},A.prototype.getInAppFeedbackLaunchOptions=function(){return this.inAppFeedbackLaunchOptions},A.prototype.getFloodgateInitOptions=function(){return this.floodgateInitOptions},A.prototype.getFloodgateSurvey=function(){return this.floodgateSurvey},A.prototype.getSdkSessionId=function(){return this.sdkSessionId||(this.sdkSessionId=n.h()),this.sdkSessionId},A.prototype.getEventSampling=function(){return this.eventSampling},A.prototype.setCommonInitOptions=function(A){n.f(A,"passedInitOptions");var e={appId:A.appId,applicationGroup:A.applicationGroup||{},build:A.build,cid:A.cid,environment:A.environment,intlFilename:A.intlFilename,intlUrl:A.intlUrl,webSurfacesResourceBaseUrl:A.webSurfacesResourceBaseUrl,locale:A.locale,onError:A.onError,originalLocale:A.locale,primaryColour:A.primaryColour,secondaryColour:A.secondaryColour,sessionId:A.sessionId,stylesUrl:A.stylesUrl,telemetryGroup:A.telemetryGroup||{},userEmail:A.userEmail,webGroup:A.webGroup||{},eventSampling:A.eventSampling,petrolTimeout:A.petrolTimeout,isCommercialHost:A.isCommercialHost,customResourcesSetExternally:A.customResourcesSetExternally,emailPolicyValue:A.emailPolicyValue,screenshotPolicyValue:A.screenshotPolicyValue,ageGroup:A.ageGroup,authenticationType:A.authenticationType,applicationSettings:A.applicationSettings,webSurfacesSettings:A.webSurfacesSettings,privacyUrl:A.privacyUrl||a.h.PrivacyStatementLink,retentionDurationDays:A.retentionDurationDays};if(n.e(e.appId,"initOptions.appId"),!(e.appId%1==0&&e.appId>0))throw"initOptions.appId is not a positive integer: "+e.appId;if(void 0!==e.retentionDurationDays&&(n.e(e.retentionDurationDays,"initOptions.retentionDurationDays"),!(e.retentionDurationDays%1==0&&e.retentionDurationDays>0)))throw"initOptions.retentionDurationDays is not a positive integer: "+e.retentionDurationDays;var t=o.c.Strings|o.c.Css;if(void 0===e.customResourcesSetExternally)e.customResourcesSetExternally=o.c.None;else if("number"!=typeof e.customResourcesSetExternally||(e.customResourcesSetExternally|t)!==t)throw"initOptions.customResourcesSetExternally has an invalid value: "+e.customResourcesSetExternally;if((e.customResourcesSetExternally&o.c.Css)!==o.c.Css&&n.g(e.stylesUrl,"initOptions.stylesUrl"),(e.customResourcesSetExternally&o.c.Strings)!==o.c.Strings&&n.g(e.intlUrl,"initOptions.intlUrl"),void 0!==e.intlFilename?n.g(e.intlFilename,"initOptions.intlFilename"):e.intlFilename="officebrowserfeedbackstrings.js",n.e(e.environment,"initOptions.environment"),1!==e.environment&&0!==e.environment)throw"initOptions.environment has a bad value: "+e.environment;if(void 0!==e.userEmail?n.g(e.userEmail,"initOptions.userEmail"):e.userEmail="",void 0!==e.sessionId?n.g(e.sessionId,"initOptions.sessionId"):e.sessionId="00000000-0000-0000-0000-000000000000",e.telemetryGroup.processSessionId=e.sessionId,void 0!==e.cid&&(n.g(e.cid,"initOptions.cid"),e.applicationGroup.extendedManifestData=JSON.stringify({cid:e.cid})),void 0!==e.build){n.g(e.build,"initOptions.build");new RegExp("^[0-9]{1,9}(\\.[0-9]{1,9})?(\\.[0-9]{1,9})?(\\.[0-9]{1,9})?$").test(e.build)||(e.build="0.0.0.0")}else e.build="0.0.0.0";e.telemetryGroup.officeBuild=e.build;var r=new RegExp("^#[0-9a-f]{3}([0-9a-f]{3})?$","i");if(void 0!==e.primaryColour&&(r.test(e.primaryColour)||(e.primaryColour=void 0)),void 0!==e.secondaryColour&&(r.test(e.secondaryColour)||(e.secondaryColour=void 0)),void 0!==e.locale?(n.g(e.locale,"initOptions.locale"),e.locale=i.a(e.locale)):e.locale="en",void 0===e.onError&&(e.onError=function(A){}),void 0!==e.petrolTimeout&&n.e(e.petrolTimeout,"initOptions.petrolTimeout"),void 0!==e.authenticationType?n.d(e.authenticationType,o.b,"initOptions.authenticationType"):e.authenticationType=o.b.Unauthenticated,void 0!==e.ageGroup?n.d(e.ageGroup,o.a,"initOptions.ageGroup"):e.ageGroup=o.a.Undefined,this.eventSampling=this.parseEventSamplingOption(e.eventSampling),this.commonInitOptions=e,this.commonPolicyAllowAADC=this.determineAADCPolicy(e.authenticationType,e.ageGroup),void 0===e.isCommercialHost||null==e.isCommercialHost?e.isCommercialHost=!1:n.c(e.isCommercialHost,"initOptions.isCommercialHost"),void 0===e.emailPolicyValue)e.emailPolicyValue=0;else if("number"!=typeof e.emailPolicyValue||0!==e.emailPolicyValue&&1!==e.emailPolicyValue&&2!==e.emailPolicyValue)throw"initOptions.emailPolicyValue has an invalid value: "+e.emailPolicyValue;if(void 0===e.screenshotPolicyValue)e.screenshotPolicyValue=0;else if("number"!=typeof e.screenshotPolicyValue||0!==e.screenshotPolicyValue&&1!==e.screenshotPolicyValue&&2!==e.screenshotPolicyValue)throw"initOptions.screenshotPolicyValue has an invalid value: "+e.screenshotPolicyValue;void 0!==e.privacyUrl?n.g(e.privacyUrl,"initOptions.privacyUrl"):e.privacyUrl=a.h.PrivacyStatementLink},A.prototype.setInAppFeedbackInitOptions=function(A){n.f(A,"passedInitOptions");var e={bugForm:A.bugForm,onDismiss:A.onDismiss,screenshot:A.screenshot,showEmailAddress:A.showEmailAddress,userEmail:A.userEmail,transitionEnabled:A.transitionEnabled,isShowThanks:A.isShowThanks,sendFeedbackPolicyValue:A.sendFeedbackPolicyValue,feedbackForumUrl:void 0!==A.feedbackForumUrl?A.feedbackForumUrl:void 0,myFeedbackForumUrl:void 0!==A.myFeedbackForumUrl?A.myFeedbackForumUrl:void 0};if(void 0===e.onDismiss&&(e.onDismiss=function(A){}),void 0!==e.bugForm?n.c(e.bugForm,"initOptions.bugForm"):e.bugForm=!1,void 0!==e.userEmail&&n.g(e.userEmail,"initOptions.userEmail"),void 0!==e.screenshot?n.c(e.screenshot,"initOptions.screenshot"):e.screenshot=!0,void 0!==e.showEmailAddress?n.c(e.showEmailAddress,"initOptions.showEmailAddress"):e.showEmailAddress=!0,void 0!==e.feedbackForumUrl?n.g(e.feedbackForumUrl,"initOptions.feedbackForumUrl"):e.feedbackForumUrl=void 0,void 0!==e.isShowThanks?n.c(e.isShowThanks,"initOptions.isShowThanks"):e.isShowThanks=!0,void 0!==e.myFeedbackForumUrl?n.g(e.myFeedbackForumUrl,"initOptions.myFeedbackForumUrl"):e.myFeedbackForumUrl=void 0,void 0===e.transitionEnabled&&(e.transitionEnabled=!0),void 0===e.sendFeedbackPolicyValue)e.sendFeedbackPolicyValue=0;else if("number"!=typeof e.sendFeedbackPolicyValue||0!==e.sendFeedbackPolicyValue&&1!==e.sendFeedbackPolicyValue&&2!==e.sendFeedbackPolicyValue)throw"initOptions.sendFeedbackPolicyValue has an invalid value: "+e.sendFeedbackPolicyValue;this.inAppFeedbackInitOptions=e},A.prototype.setInAppFeedbackLaunchOptions=function(e){if(!this.commonInitOptions)throw"commonInitOptions not set";e||(e={}),this.commonInitOptions.applicationGroup=n.k(e.applicationGroup,this.commonInitOptions.applicationGroup),this.commonInitOptions.telemetryGroup=n.k(e.telemetryGroup,this.commonInitOptions.telemetryGroup),this.commonInitOptions.webGroup=n.k(e.webGroup,this.commonInitOptions.webGroup),e.categories=A.validateCategoryOptions(e.categories),this.inAppFeedbackLaunchOptions=e},A.prototype.setFloodgateInitOptions=function(A){n.f(A,"passedInitOptions");var e={autoDismiss:A.autoDismiss,campaignDefinitions:A.campaignDefinitions,campaignFlights:A.campaignFlights,campaignQueryParameters:A.campaignQueryParameters,onDismiss:A.onDismiss,onSurveyActivatedCallback:A.onSurveyActivatedCallback,settingStorageCallback:A.settingStorageCallback,uIStringGetter:A.uIStringGetter,authTokenCallback:A.authTokenCallback,surveyEnabled:A.surveyEnabled,showEmailAddress:A.showEmailAddress,augLoopCallback:A.augLoopCallback,customerVoiceSurveyParams:A.customerVoiceSurveyParams,surveyCSSParams:A.surveyCSSParams,governanceServiceEnabled:A.governanceServiceEnabled,governanceServiceConfig:A.governanceServiceConfig,personalizerEnabled:A.personalizerEnabled,messagingServiceSettings:A.messagingServiceSettings,isPriorityEnabled:A.isPriorityEnabled,isEudbUxEnabled:A.isEudbUxEnabled};if(void 0===e.autoDismiss&&(e.autoDismiss=0),void 0===e.onDismiss&&(e.onDismiss=function(A,e){}),void 0===e.onSurveyActivatedCallback){e.onSurveyActivatedCallback={onSurveyActivated:function(A,e,t){A.launch()}}}void 0===e.uIStringGetter&&(e.uIStringGetter=function(A){return A}),void 0===e.surveyEnabled?e.surveyEnabled=!0:n.c(e.surveyEnabled,"surveyEnabled"),void 0!==e.showEmailAddress?n.c(e.showEmailAddress,"initOptionsFloodgate.showEmailAddress"):e.showEmailAddress=!0,void 0!==e.governanceServiceEnabled?n.c(e.governanceServiceEnabled,"initOptionsFloodgate.governanceServiceEnable"):e.governanceServiceEnabled=!1,e.governanceServiceEnabled&&(e.governanceServiceConfig=this.parseGovernanceServiceConfig(void 0!==e.governanceServiceConfig?e.governanceServiceConfig:{})),void 0===e.customerVoiceSurveyParams?e.customerVoiceSurveyParams={cvFlights:"",isCVSurveyEnabled:!0,productName:"",uiHost:""}:n.i(e.customerVoiceSurveyParams.isCVSurveyEnabled)&&(e.customerVoiceSurveyParams.isCVSurveyEnabled=!0),void 0!==e.personalizerEnabled?n.c(e.personalizerEnabled,"initOptionsFloodgate.personalizerEnabled"):e.personalizerEnabled=!1,void 0!==e.isPriorityEnabled?n.c(e.isPriorityEnabled,"initOptionsFloodgate.isPriorityEnabled"):e.isPriorityEnabled=!0,void 0!==e.isEudbUxEnabled?n.c(e.isEudbUxEnabled,"initOptionsFloodgate.isEudbUxEnabled"):e.isEudbUxEnabled=!0,this.floodgateInitOptions=e},A.prototype.setFloodgateSurvey=function(A){this.floodgateSurvey=A},A.prototype.checkIfSurveysEnabled=function(){return(!this.floodgateInitOptions||this.floodgateInitOptions.surveyEnabled)&&this.commonPolicyAllowAADC},A.prototype.isFeedbackSurveyEnabledByAADC=function(){return this.commonPolicyAllowAADC},A.prototype.getCVSurveyFlights=function(){return this.floodgateInitOptions&&this.floodgateInitOptions.customerVoiceSurveyParams?this.floodgateInitOptions.customerVoiceSurveyParams.cvFlights:""},A.prototype.isCVSurveyEnabled=function(){return!this.floodgateInitOptions||!this.floodgateInitOptions.customerVoiceSurveyParams||this.floodgateInitOptions.customerVoiceSurveyParams.isCVSurveyEnabled},A.prototype.getProductName=function(){return this.floodgateInitOptions&&this.floodgateInitOptions.customerVoiceSurveyParams?this.floodgateInitOptions.customerVoiceSurveyParams.productName:""},A.prototype.getUIHost=function(){return this.floodgateInitOptions&&this.floodgateInitOptions.customerVoiceSurveyParams?this.floodgateInitOptions.customerVoiceSurveyParams.uiHost:""},A.prototype.getUIHostCVSurveyDispatcher=function(){return this.floodgateInitOptions&&this.floodgateInitOptions.customerVoiceSurveyParams?this.floodgateInitOptions.customerVoiceSurveyParams.uiHostCVSurveyDispatcher:""},A.prototype.getCSSPosition=function(){return this.floodgateInitOptions&&this.floodgateInitOptions.surveyCSSParams&&this.floodgateInitOptions.surveyCSSParams.cssPosition?this.floodgateInitOptions.surveyCSSParams.cssPosition:""},A.prototype.getCSSZIndex=function(){return this.floodgateInitOptions&&this.floodgateInitOptions.surveyCSSParams&&this.floodgateInitOptions.surveyCSSParams.cssZIndex?this.floodgateInitOptions.surveyCSSParams.cssZIndex:""},A.prototype.getCSSBottom=function(){return this.floodgateInitOptions&&this.floodgateInitOptions.surveyCSSParams&&this.floodgateInitOptions.surveyCSSParams.cssBottom?this.floodgateInitOptions.surveyCSSParams.cssBottom:""},A.prototype.getCSSRight=function(){return this.floodgateInitOptions&&this.floodgateInitOptions.surveyCSSParams&&this.floodgateInitOptions.surveyCSSParams.cssRight?this.floodgateInitOptions.surveyCSSParams.cssRight:""},A.prototype.getCSSVarString=function(){var A=[];return this.floodgateInitOptions&&this.floodgateInitOptions.surveyCSSParams&&(this.floodgateInitOptions.surveyCSSParams.cssPosition&&A.push("--obf-position:",this.floodgateInitOptions.surveyCSSParams.cssPosition,";"),this.floodgateInitOptions.surveyCSSParams.cssZIndex&&A.push("--obf-zIndex:",this.floodgateInitOptions.surveyCSSParams.cssZIndex,";"),this.floodgateInitOptions.surveyCSSParams.cssBottom&&A.push("--obf-bottom:",this.floodgateInitOptions.surveyCSSParams.cssBottom,";"),this.floodgateInitOptions.surveyCSSParams.cssRight&&A.push("--obf-right:",this.floodgateInitOptions.surveyCSSParams.cssRight,";")),A.join("")},A.prototype.determineAADCPolicy=function(A,e){return A===o.b.Unauthenticated||A===o.b.AAD||e!==o.a.MinorWithParentalConsent&&e!==o.a.MinorWithoutParentalConsent},A.prototype.getUserConsentGroup=function(){var A=this.commonInitOptions.authenticationType;if(A===o.b.Unauthenticated||A===o.b.AAD)return 1;switch(this.commonInitOptions.ageGroup){case o.a.Undefined:return 1;case o.a.MinorWithoutParentalConsent:case o.a.MinorWithParentalConsent:return 3;case o.a.Adult:return 1;case o.a.NotAdult:return 2;case o.a.MinorNoParentalConsentRequired:return 1;default:return 3}return 3},A.prototype.parseEventSamplingOption=function(A){var e={event:{}};if(void 0!==A)for(var t in A)if(A.hasOwnProperty(t))switch(A[t].type){case"Event":var r=A[t].sampleRate;if(n.e(r,"initOption.EventSampling.SampleRate"),n.g(A[t].name,"initOption.EventSampling.Name"),r<0||r>1)throw"initOption.EventSampling."+A[t].name+".SampleRate is out of range";e.event[A[t].name]=r;break;default:throw"initOption.EventSampling.Type value is not recognized"}return e},A.prototype.parseGovernanceServiceConfig=function(A){var e,t,n,r;return{forceServicelessSurveyDisplay:null!==(e=A.forceServicelessSurveyDisplay)&&void 0!==e&&e,retry:null!==(t=A.retry)&&void 0!==t?t:1,timeout:null!==(n=A.timeout)&&void 0!==n?n:1e3,simpleRequestEnabled:null!==(r=A.simpleRequestEnabled)&&void 0!==r&&r}},A}());function c(){return s}function u(A){if(n.g(A,"feedbackType"),A===r.a[r.a.Smile])return r.a.Smile;if(A===r.a[r.a.Frown])return r.a.Frown;if(A===r.a[r.a.Bug])return r.a.Bug;throw"feedbackType should be one of Smile, Frown or Bug"}},function(A,e,t){"use strict";t.d(e,"h",(function(){return r})),t.d(e,"k",(function(){return i})),t.d(e,"i",(function(){return o})),t.d(e,"j",(function(){return s})),t.d(e,"f",(function(){return g})),t.d(e,"e",(function(){return d})),t.d(e,"g",(function(){return B})),t.d(e,"c",(function(){return h})),t.d(e,"b",(function(){return p})),t.d(e,"d",(function(){return f})),t.d(e,"a",(function(){return m}));var n=t(11),r=n.Utils.guid,i=n.Utils.overrideValues,o=n.Utils.isNOU,a=n.Utils.isBoolean,s=n.Utils.isString,c=n.Utils.isObject,u=n.Utils.isEnumValue;function l(A){return"number"==typeof A}function g(A,e){if(!c(A))throw e+" is not an object: "+A}function d(A,e){if(!l(A))throw e+" is not a number: "+A}function B(A,e){if(!s(A))throw e+" is not a string: "+A}function h(A,e){if(!a(A))throw e+" is not a boolean: "+A}function p(A,e){if(!Array.isArray(A))throw e+" is not an array: "+A}function f(A,e,t){if(!l(A)||!u(A,e))throw t+" is not an enum: "+A}function m(A){try{for(var e=0;ee.MIN_DATE_MILLISECONDS?new Date(n):new Date(e.MIN_DATE_MILLISECONDS)}Object.defineProperty(e,"__esModule",{value:!0}),e.findHighestPriorityDefinition=e.safeParseObject=e.isValidUserId=e.fyShuffle=e.dateToShortUtcString=e.isUtcDatetimeString=e.overrideValues=e.stringToDate=e.makeArrayFromObjectValuesSortedByKeyString=e.guid=e.extractLanguageSubtag=e.isValidLanguageSubTag=e.subtractSecondsWithoutOverflow=e.addSecondsWithoutOverflow=e.MIN_DATE_MILLISECONDS=e.MAX_DATE_MILLISECONDS=e.getDistantFuture=e.getDistantPast=e.isBoolean=e.isString=e.isArray=e.isFunction=e.isObject=e.isNOU=e.isNumber=e.isEnumValue=e.isDate=e.timeAdd=void 0,e.timeAdd=function(A,e,t){switch(e.toLowerCase()){case"h":case"hour":return new Date(A.getTime()+36e5*t);case"m":case"minute":return new Date(A.getTime()+6e4*t);case"s":case"second":return new Date(A.getTime()+1e3*t);default:throw new Error("Invalid interval value of "+e)}},e.isDate=n,e.isEnumValue=function(A,e){return A in e},e.isNumber=function(A){return null!==A&&!isNaN(A)&&isFinite(A)},e.isNOU=r,e.isObject=function(A){return null!=A&&"object"==typeof A},e.isFunction=function(A){return null!=A&&"function"==typeof A},e.isArray=function(A){return null!=A&&Array.isArray(A)},e.isString=i,e.isBoolean=function(A){return"boolean"==typeof A},e.getDistantPast=function(){return new Date(-116444736e5)},e.getDistantFuture=function(){return new Date(640922112e5)},e.MAX_DATE_MILLISECONDS=864e13,e.MIN_DATE_MILLISECONDS=-864e13,e.addSecondsWithoutOverflow=function(A,t){if(!A)return null;if(t<0)return o(A,-1*t);var n=A.getTime()+1e3*t;return n0;){var t=Math.floor(Math.random()*(e+1)),n=A[e];A[e]=A[t],A[t]=n,e--}return A}},e.isValidUserId=function(A){return!!i(A)&&/^([a-z]{1,2}):\w+/.test(A)},e.safeParseObject=function(A,e){try{var t=!A||"{"!==A[0]&&"["!==A[0]?void 0:JSON.parse(A);return null!=t?t:e}catch(A){}return e},e.findHighestPriorityDefinition=function(A){var e=!1;return[A.reduce((function(A,t){var n=t.primaryPriority||0,r=A.primaryPriority||0;return n!==r&&(e=!0),n0&&r[r.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]0&&(this.setPendingSurveys(A),this.updateActivityListenerWithCurrentSurveyDefinitions())},A.prototype.shouldAcceptActivity=function(A){return 3===this.initializationStatus||A===B.FloodgateStartActivityName},A.prototype.onSurveyActivated=function(e,t){for(var n,r=0,i=this.getCurrentSurveyDefinitions();rthis.cooldownEndTime},A.prototype.getType=function(){return this.type},A.prototype.getName=function(){return this.name},A.prototype.getCooldownSeconds=function(){return this.cooldownSeconds},A.prototype.getCooldownStartTime=function(){return this.cooldownStartTime},A.prototype.getCooldownEndTime=function(){return this.cooldownEndTime},A}();e.GovernedChannel=i},function(A,e,t){"use strict";var n=t(7),r=t(12),i=t(17),o=t(5),a=o.getDistantFuture,s=o.getDistantPast,c=o.isNOU,u=o.isDate,l=function(){function A(A){if(c(A))throw new Error("data must not be null");if(c(A.id)||""===A.id)throw new Error("data.id must not be null or empty");if(c(A.governedChannelType)&&(A.governedChannelType=r.GovernedChannelType.getDefault()),c(A.expirationTimeUtc)||""===A.expirationTimeUtc)throw new Error("data.expirationTimeUtc must not be null or empty");if(c(A.activationEvent))throw new Error("data.activationEvent must not be null");(c(A.backEndIdentifier)||""===A.backEndIdentifier)&&(A.backEndIdentifier=A.id),c(A.launcherType)&&(A.launcherType=n.LAUNCHER_TYPE_DEFAULT),this.data=A}return A.prototype.getId=function(){return this.data.id},A.prototype.getBackEndId=function(){return this.data.backEndIdentifier},A.prototype.getGovernedChannelType=function(){return this.data.governedChannelType},A.prototype.getRawStartTimeUtc=function(){return this.data.startTimeUtc},A.prototype.getStartTimeUtc=function(){if(c(this.data.startTimeUtc))return s();var A=new Date(this.data.startTimeUtc);return u(A)?A:a()},A.prototype.getExpirationTimeUtc=function(){if(c(this.data.expirationTimeUtc))return s();var A=new Date(this.data.expirationTimeUtc);return u(A)?A:s()},A.prototype.getRawExpirationTimeUtc=function(){return this.data.expirationTimeUtc},A.prototype.isActiveForDate=function(A){return!c(A)&&(A>=this.getStartTimeUtc()&&A<=this.getExpirationTimeUtc())},A.prototype.getActivationEvent=function(){return this.data.activationEvent},A.prototype.getPreferredLaunchType=function(){return this.data.preferredLaunchType},A.prototype.isAdditionalDataRequested=function(A){if(c(this.data.additionalDataRequested))return!1;for(var e=0,t=this.data.additionalDataRequested;e0){var t=e.map((function(A){return A.getName()}));return a.FloodgateEngine.getTelemetryLogger().log_Event(o.TelemetryEvent.Floodgate.UserFactsSpecIsAMatch.Summary,{Count:e.length,Message:t.toString()}),!1}return!0},e.prototype.validate=function(){return!!A.prototype.validate.call(this)&&u.validateUserFacts(this.userFacts)},e}(v);e.CampaignScopeUserFactAll=Q;var U=function(){function A(){}return A.deserialize=function(A){var e;if(d(A))return null;switch(A.Type){case 0:e=S.deserialize(A);break;case 1:e=E.deserialize(A)}return void 0===e?null:e},A.prototype.validate=function(){return!0},A}();e.CampaignDuration=U;var S=function(A){function e(){return A.call(this)||this}return r(e,A),e.deserialize=function(A){var t=new e;return A&&(t.intervalSeconds=A.IntervalSeconds),t.validate()?t:null},e.prototype.asTimeIntervalSeconds=function(){return this.intervalSeconds},e.prototype.validate=function(){return!!A.prototype.validate.call(this)&&!!B(this.intervalSeconds)},e}(U);e.CampaignDurationTimeInterval=S;var E=function(A){function e(){return A.call(this)||this}return r(e,A),e.deserialize=function(A){return new e},e.prototype.asTimeIntervalSeconds=function(){return null},e}(U);e.CampaignDurationSingleBuildChange=E;var I=function(){function A(){}return A.deserialize=function(e){var t=new A;if(!d(e)){t.additionalData=[];for(var n=0,r=e;nthis.percentageDenominator)))},e}(H);e.CampaignNominationSchemeRatioPercentage=L;var D=function(){function A(){}return A.deserialize=function(A){var e;if(d(A))return null;switch(A.Type){case 0:e=O.deserialize(A);break;case 1:e=_.deserialize(A)}return void 0===e?null:e},A.prototype.validate=function(){return!0},A}();e.CampaignSurveyEvent=D;var O=function(A){function e(){return A.call(this)||this}return r(e,A),e.deserialize=function(A){var t=new e;return d(A)?null:(t.activity=A.Activity,t.count=A.Count,t.isAggregate=A.IsAggregate,t.validate()?t:null)},e.prototype.validate=function(){return!!A.prototype.validate.call(this)&&(!(d(this.activity)||!h(this.activity))&&(!(!B(this.count)||this.count<=0)&&!!g(this.isAggregate)))},e}(D);e.CampaignSurveyEventCountedActivity=O;var _=function(A){function e(){return A.call(this)||this}return r(e,A),e.deserialize=function(A){var t=new e,n=[];if(d(A))return null;for(var r in A.Sequence)if(A.Sequence.hasOwnProperty(r)){var i=A.Sequence[r];i&&n.push(O.deserialize(i))}return 0===n.length&&(n=null),t.sequence=n,t.validate()?t:null},e.prototype.validate=function(){if(!A.prototype.validate.call(this))return!1;if(d(this.sequence))return!1;for(var e in this.sequence)if(this.sequence.hasOwnProperty(e)&&!this.sequence[e])return!1;return!0},e}(D);e.CampaignSurveyEventCountedActivitySequence=_;var x=function(){function A(){}return A.deserialize=function(e,t){var n=new A;return d(e)?null:(n.prompt=K.deserialize(e.Prompt),n.rating=N.deserialize(e.Rating),n.comment=R.deserialize(e.Question),n.multipleChoice=M.deserialize(e.MultipleChoice),n.intercept=k.deserialize(e.Intercept),n.cvSurvey=P.deserialize(e.CVSurveyParams),n.validate(t)?n:null)},A.prototype.validate=function(A){return!d(this.intercept)||!d(this.prompt)&&(A?!d(this.rating)||!d(this.multipleChoice)||!d(this.comment):!d(this.rating)&&!d(this.comment))},A}();e.CampaignSurveyContent=x;var M=function(){function A(){}return A.deserialize=function(e){var t=new A;return d(e)?null:(t.question=e.Question,t.availableOptions=e.AvailableOptions,t.minNumberOfSelectedOptions=e.MinNumberOfSelectedOptions,t.maxNumberOfSelectedOptions=e.MaxNumberOfSelectedOptions,t.validate()?t:null)},A.prototype.validate=function(){if(d(this.question)||!h(this.question)||d(this.availableOptions)||!Array.isArray(this.availableOptions)||this.availableOptions.length<2||d(this.minNumberOfSelectedOptions)||!B(this.minNumberOfSelectedOptions)||d(this.maxNumberOfSelectedOptions)||!B(this.maxNumberOfSelectedOptions))return!1;for(var A in this.availableOptions)if(this.availableOptions.hasOwnProperty(A)&&!h(this.availableOptions[A]))return!1;return!0},A}();e.CampaignSurveyContentMultipleChoice=M;var P=function(){function A(){}return A.deserialize=function(e){var t=new A;return d(e)?null:(t.customerVoiceFormId=e.CustomerVoiceFormId,t.validate()?t:null)},A.prototype.validate=function(){return!d(this.customerVoiceFormId)&&h(this.customerVoiceFormId)},A}();e.CampaignSurveyContentCVSurvey=P;var K=function(){function A(){}return A.deserialize=function(e){var t=new A;return d(e)?null:(t.title=e.Title,t.question=e.Question,t.yesLabel=e.YesLabel,t.noLabel=e.NoLabel,t.validate()?t:null)},A.prototype.validate=function(){return!(d(this.title)||!h(this.title)||d(this.question)||!h(this.question)||d(this.yesLabel)||!h(this.yesLabel)||d(this.noLabel)||!h(this.noLabel))},A}();e.CampaignSurveyContentPrompt=K;var k=function(){function A(){}return A.deserialize=function(e){var t=new A;return d(e)?null:(t.title=e.Title,t.question=e.Question,t.url=e.Url,t.validate()?t:null)},A.prototype.validate=function(){return!(d(this.title)||!h(this.title)||d(this.question)||!h(this.question)||d(this.url)||!h(this.url))},A}();e.CampaignSurveyContentIntercept=k;var N=function(){function A(){}return A.deserialize=function(e){var t=new A;return d(e)?null:(t.isZeroBased=e.IsZeroBased,t.question=e.Question,t.ratingValuesAscending=e.RatingValuesAscending,t.validate()?t:null)},A.prototype.validate=function(){if(d(this.question)||!h(this.question)||d(this.ratingValuesAscending)||!Array.isArray(this.ratingValuesAscending)||this.ratingValuesAscending.length<2||this.ratingValuesAscending.length>11)return!1;if(d(this.isZeroBased))this.isZeroBased=!1;else if(!g(this.isZeroBased))return!1;for(var A in this.ratingValuesAscending)if(this.ratingValuesAscending.hasOwnProperty(A)&&!h(this.ratingValuesAscending[A]))return!1;return!0},A}();e.CampaignSurveyContentRating=N;var R=function(){function A(){}return A.deserialize=function(e){var t=new A;return d(e)?null:(t.question=e.Question,t.validate()?t:null)},A.prototype.validate=function(){return!(d(this.question)||!h(this.question))},A}();e.CampaignSurveyContentComment=R;var V=function(){function A(){}return A.deserialize=function(e){if(d(e))return null;var t=new A;return t.contentMetadata=e.ContentMetadata,t.validate()?t:null},A.prototype.validate=function(){return!(d(this.contentMetadata)||!c.isObject(this.contentMetadata))},A}();e.CampaignSurveyMetadata=V;var G=function(){function A(){}return A.deserialize=function(A){var e;if(d(A))return null;switch(A.Type){case 0:e=X.deserialize(A);break;case 1:e=Z.deserialize(A);break;case 2:e=J.deserialize(A);break;case 3:e=W.deserialize(A);break;case 4:e=Y.deserialize(A);break;case 22:e=z.deserialize(A);break;case 5:e=q.deserialize(A)}return d(e)?null:e},A.prototype.validate=function(){return!d(this.activationEvent)},A}();e.CampaignSurveyTemplate=G;var J=function(A){function e(){return A.call(this)||this}return r(e,A),e.deserialize=function(A){var t=new e;return d(A)?null:(t.activationEvent=D.deserialize(A.ActivationEvent),t.content=x.deserialize(A.Content,!0),t.validate()?t:null)},e.prototype.validate=function(){return!(!A.prototype.validate.call(this)||d(this.content))},e}(G);e.CampaignSurveyTemplateFps=J;var W=function(A){function e(){return A.call(this)||this}return r(e,A),e.deserialize=function(A){var t=new e;return d(A)?null:(t.activationEvent=D.deserialize(A.ActivationEvent),t.content=x.deserialize(A.Content),t.validate()?t:null)},e.prototype.validate=function(){return!(!A.prototype.validate.call(this)||d(this.content))},e}(G);e.CampaignSurveyTemplateNlqs=W;var Y=function(A){function e(){return A.call(this)||this}return r(e,A),e.deserialize=function(A){var t=new e;return d(A)?null:(t.activationEvent=D.deserialize(A.ActivationEvent),t.content=x.deserialize(A.Content),t.validate()?t:null)},e.prototype.validate=function(){return!(!A.prototype.validate.call(this)||d(this.content))},e}(G);e.CampaignSurveyTemplateNps=Y;var X=function(A){function e(){return A.call(this)||this}return r(e,A),e.deserialize=function(A){var t=new e;return d(A)?null:(t.activationEvent=D.deserialize(A.ActivationEvent),t.validate()?t:null)},e.prototype.validate=function(){return!!A.prototype.validate.call(this)},e}(G);e.CampaignSurveyTemplateNps5PointStatic=X;var Z=function(A){function e(){return A.call(this)||this}return r(e,A),e.deserialize=function(A){var t=new e;return d(A)?null:(t.activationEvent=D.deserialize(A.ActivationEvent),t.validate()?t:null)},e.prototype.validate=function(){return!!A.prototype.validate.call(this)},e}(G);e.CampaignSurveyTemplateNps11PointStatic=Z;var z=function(A){function e(){return A.call(this)||this}return r(e,A),e.deserialize=function(A){if(d(A))return null;var t=new e;return t.activationEvent=D.deserialize(A.ActivationEvent),t.metadata=V.deserialize(A.Metadata),t.maxLaunches=A.MaxLaunches,t.maxLaunchesPerSession=A.MaxLaunchesPerSession,t.preferredLaunchType=A.PreferredLaunchType,t.validate()?t:null},e.prototype.validate=function(){return!(!A.prototype.validate.call(this)||d(this.metadata))&&(!d(this.maxLaunches)&&(!B(this.maxLaunches)||this.maxLaunches<=0)||!d(this.maxLaunchesPerSession)&&(!B(this.maxLaunchesPerSession)||this.maxLaunchesPerSession<=0)?(a.FloodgateEngine.getTelemetryLogger().log_LocalError("Invalid Multi Launch settings",this.maxLaunches,this.maxLaunchesPerSession),!1):B(this.maxLaunches)&&B(this.maxLaunchesPerSession)&&this.maxLaunchesPerSession>this.maxLaunches?(a.FloodgateEngine.getTelemetryLogger().log_LocalError("Invalid Multi launch settings",this.maxLaunches,this.maxLaunchesPerSession),!1):!(!d(this.preferredLaunchType)&&!h(this.preferredLaunchType))||(a.FloodgateEngine.getTelemetryLogger().log_LocalError("Invalid launcher type",this.preferredLaunchType),!1))},e}(G);e.CampaignSurveyTemplateGenericMessagingSurface=z;var q=function(A){function e(){return A.call(this)||this}return r(e,A),e.deserialize=function(A){var t=new e;return d(A)?null:(t.activationEvent=D.deserialize(A.ActivationEvent),t.content=x.deserialize(A.Content),t.validate()?t:null)},e.prototype.validate=function(){return!(!A.prototype.validate.call(this)||d(this.content))},e}(G);e.CampaignSurveyTemplateIntercept=q;var j=function(){function A(){}return A.deserialize=function(e){var t=new A;if(d(e))return null;t.campaignId=e.CampaignId,t.governedChannelType=e.GovernedChannelType,t.startTime=e.StartTimeUtc,t.endTime=e.EndTimeUtc,t.launcherType=e.LauncherType,t.primaryPriority=e.PrimaryPriority,t.tags=e.Tags;var n=I.deserialize(e.AdditionalDataRequested);return t.additionalDataRequested=n?n.additionalData:[],e.SurveyTemplate&&(t.surveyTemplate=G.deserialize(e.SurveyTemplate)),e.NominationScheme&&(t.nominationScheme=H.deserialize(e.NominationScheme)),e.Scope&&(t.scope=v.deserialize(e.Scope)),d(e.BusinessLevel)||(t.businessLevel=e.BusinessLevel),t.validate()?t:(a.FloodgateEngine.getTelemetryLogger().log_LocalError("Invalid definition",e),null)},A.prototype.validate=function(){var A,e;if(d(this.scope)&&(this.scope=new w),d(this.campaignId)||!h(this.campaignId))return!1;if(!B(this.governedChannelType)||!c.isEnumValue(this.governedChannelType,s.GovernedChannelType))return!1;if(d(this.nominationScheme))return!1;if(d(this.surveyTemplate))return!1;if(!d(this.launcherType)&&!h(this.launcherType))return!1;if("customervoice"===this.launcherType&&d(null===(e=null===(A=this.surveyTemplate.content)||void 0===A?void 0:A.cvSurvey)||void 0===e?void 0:e.customerVoiceFormId))return!1;if(!d(this.primaryPriority)&&!B(this.primaryPriority))return!1;if(this.tags&&!Array.isArray(this.tags))return!1;if(d(this.startTime))this.startTime=l();else{if(!p(this.startTime))return!1;this.startTime=f(this.startTime)}if(d(this.endTime)||"string"==typeof this.endTime&&""===this.endTime)this.endTime=l();else{if(!p(this.endTime))return!1;this.endTime=f(this.endTime)}return!0},A}();function $(A){var e=[];if(d(A))return{result:e,error:"Empty"};if(!Array.isArray(A))return{result:e,error:"Not an array"};for(var t=[],n=0;n0?"Invalid campaign definitions at indexes: "+t.toString():void 0}}e.CampaignDefinition=j,e.FilterValidCampaignDefinitions=$;var AA=function(){function A(A){if(d(A))throw new Error("storage must not be null");this.storage=A}return A.prototype.load=function(){var A,e=this.storage.read(i.FileType.CampaignDefinitions);if(d(e))return[];try{A=JSON.parse(e)}catch(A){return a.FloodgateEngine.getTelemetryLogger().log_CampaignLoad_Failed(A.toString()),[]}return $(A).result},A.prototype.loadAsync=function(){var A=this.load();return new Promise((function(e,t){e(A)}))},A}();e.FileSystemCampaignDefinitionProvider=AA},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISurveyInfo=e.ISurveyComponent=e.ISurvey=e.IFloodgateSettingIdMap=e.IFloodgateStorageProvider=e.IActivityListener=void 0;var n=t(17);e.ISurveyInfo=n;var r=t(33);e.IActivityListener=r;var i=t(34);e.IFloodgateSettingIdMap=i;var o=t(6);e.IFloodgateStorageProvider=o;var a=t(7);e.ISurvey=a;var s=t(8);e.ISurveyComponent=s;var c=t(15);Object.defineProperty(e,"CampaignDefinition",{enumerable:!0,get:function(){return c.CampaignDefinition}})},function(A,e,t){"use strict";var n;!function(A){!function(A){A[A.None=0]="None",A[A.Critical=1]="Critical"}(A.BusinessLevel||(A.BusinessLevel={})),A.DOM_TYPE_TAGNAME="Type",A.DOM_TYPE_VALUE="Survey",A.DOM_ID_TAGNAME="SurveyID",A.JSON_SURVEY_KEYNAME="survey",A.JSON_ID_KEYNAME="surveyId"}(n||(n={})),A.exports=n},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeAndUpdateSurveyActivationStats=e.MergeAndUpdateCampaignStates=e.MergeAndUpdateGovernedChannelStates=e.makeSettingItemValue=e.extractSettingItemValueSubString=e.ItemCollection=void 0;var n=t(23),r=function(){function A(){this.items={},this.itemCount=0}return A.prototype.add=function(A,e){this.items[A]||this.itemCount++,this.items[A]=e},A.prototype.find=function(A){return this.items[A]},A.prototype.remove=function(A){var e=this.items[A];return e&&(delete this.items[A],this.itemCount--),e},A.prototype.count=function(){return this.itemCount},A}();e.ItemCollection=r,e.extractSettingItemValueSubString=function(A){if(!A)return A;var e=A.indexOf(i)+i.length,t=A.indexOf(o);return e<0||t<0?A:A.substring(e,t)},e.makeSettingItemValue=function(A){return A?i+A+o:i+o},e.MergeAndUpdateGovernedChannelStates=function(A,e){var t=new r;if(!A&&!e)return t;if(!A)return t.add(0,e),t;if(!e)return t.add(0,A),t.add(1,A),t;var n=[],i=[];return A&&A.forEach((function(A){for(var t,r=-1,o=0;ot.getCooldownStartTime()?(n.push(A),i.push(A)):n.push(t),e.splice(r,1)})),e&&e.forEach((function(A){n.push(A)})),t.add(0,n),i.length>0&&t.add(1,i),t},e.MergeAndUpdateCampaignStates=function(A,e){var t=new r;if(!A&&!e)return t;if(!A)return t.add(0,e),t;if(!e)return t.add(0,A),t.add(1,A),t;var n=[],i=[];return A&&A.forEach((function(A){for(var t,r=new Date,o=-1,a=0;ar?(n.push(t),void e.splice(o,1)):A.LastCooldownEndTimeUtc>r?(n.push(A),i.push(A),void e.splice(o,1)):(A.getCooldownStartDate()>t.getCooldownStartDate()||A.getCooldownStartDate()===t.getCooldownStartDate()&&A.LastNominationTimeUtc>t.LastNominationTimeUtc?(n.push(A),i.push(A)):n.push(t),void e.splice(o,1))})),e&&e.forEach((function(A){n.push(A)})),t.add(0,n),i.length>0&&t.add(1,i),t},e.MergeAndUpdateSurveyActivationStats=function(A,e){var t=new r;if(!A&&!e)return t;if(!A)return t.add(0,e),t;if(!e)return t.add(0,A),t.add(1,A),t;var i=new n.SurveyStatCollectionActivation,o=new n.SurveyStatCollectionActivation,a=A.getStats(),s=e.getStats();for(var c in a)if(a.hasOwnProperty(c)){var u=s[c];if(!u){i.addStats(c,a[c]),o.addStats(c,a[c]);continue}a[c].ActivationTimeUtc>u.ActivationTimeUtc?(i.addStats(c,a[c]),o.addStats(c,a[c])):i.addStats(c,s[c]),delete s[c]}for(var c in s)s.hasOwnProperty(c)&&i.addStats(c,s[c]);t.add(0,i);var l=o.getStats();for(var g in l)if(l.hasOwnProperty(g)){t.add(1,o);break}return t};var i="",o=""},function(A,e,t){"use strict";var n=t(8),r=function(){function A(A){if(!A)throw new Error("data must not be null");if(!A.question)throw new Error("data.question must not be null or empty");this.data=A,this.userComment=""}return A.make=function(e){try{return new A(e)}catch(A){return null}},A.prototype.getType=function(){return"Comment"},A.prototype.getQuestion=function(){return this.data.question},A.prototype.setSubmittedText=function(A){this.userComment=A},A.prototype.getSubmittedText=function(){return this.userComment},A.prototype.getDomElements=function(A){if(!A)throw new Error("Document must not be null");var e=A.createElement(n.DOM_COMMENT_TAGNAME);return e.appendChild(A.createTextNode(this.getSubmittedText())),[e]},A.prototype.getJsonElements=function(){var A={};return A[n.JSON_COMMENT_KEYNAME]=this.getSubmittedText(),A},A.prototype.getComponentJson=function(){var A;return(A={})[n.JSON_QUESTION_KEYNAME]=this.getQuestion(),A},A}();!function(A){var e=function(){};A.CommentComponentData=e}(r||(r={})),A.exports=r},function(A,e,t){"use strict";var n=t(8),r=function(){function A(A){if(!A)throw new Error("data must not be null");if(!A.question)throw new Error("data.question must not be null or empty");if(!A.title)throw new Error("data.title must not be null or empty");if(!A.yesButtonLabel)throw new Error("data.yesButtonLabel must not be null or empty");if(!A.noButtonLabel)throw new Error("data.noButtonLabel must not be null or empty");this.data=A,this.selectedButton=0}return A.make=function(e){try{return new A(e)}catch(A){return null}},A.prototype.getType=function(){return"Prompt"},A.prototype.getTitle=function(){return this.data.title},A.prototype.getQuestion=function(){return this.data.question},A.prototype.getYesButtonText=function(){return this.data.yesButtonLabel},A.prototype.getNoButtonText=function(){return this.data.noButtonLabel},A.prototype.setButtonSelected=function(A){A&&(this.selectedButton=A)},A.prototype.getButtonSelected=function(){return this.selectedButton},A.prototype.getDomElements=function(A){if(!A)throw new Error("Document must not be null");var e=A.createElement(n.DOM_PROMPT_TAGNAME);return e.appendChild(A.createTextNode(this.promptButtonToString(this.getButtonSelected()))),[e]},A.prototype.getJsonElements=function(){var A={};return A[n.JSON_PROMPT_KEYNAME]=this.promptButtonToString(this.getButtonSelected()),A},A.prototype.getComponentJson=function(){var A;return(A={})[n.JSON_TITLE_KEYNAME]=this.getTitle(),A[n.JSON_QUESTION_KEYNAME]=this.getQuestion(),A[n.JSON_PROMPTYESTEXT_KEYNAME]=this.getYesButtonText(),A[n.JSON_PROMPTNOTEXT_KEYNAME]=this.getNoButtonText(),A},A.prototype.promptButtonToString=function(A){switch(A){case 0:return"Unselected";case 1:return"Yes";case 2:return"No";default:return"Unknown"}},A}();!function(A){var e=function(){};A.PromptComponentData=e}(r||(r={})),A.exports=r},function(A,e,t){"use strict";var n=t(8),r=function(){function A(A){if(!A)throw new Error("data must not be null");if(!A.question)throw new Error("data.question must not be null or empty");if(!A.ratingValuesAscending||A.ratingValuesAscending.length<2)throw new Error("data.ratingValuesAscending must not be null or have less than two choices");A.ratingValuesAscending.forEach((function(A){if(!A)throw new Error("rating values must not contain null or empty")})),this.data=A,this.selectedIndex=-1}return A.make=function(e){try{return new A(e)}catch(A){return null}},A.prototype.getType=function(){return"Rating"},A.prototype.getQuestion=function(){return this.data.question},A.prototype.getRatingValuesAscending=function(){return this.data.ratingValuesAscending},A.prototype.getSelectedRating=function(){return this.isRatingIndexValid(this.selectedIndex)?this.data.ratingValuesAscending[this.selectedIndex]:""},A.prototype.setSelectedRatingIndex=function(A){this.isRatingIndexValid(A)?this.selectedIndex=A:this.selectedIndex=-1},A.prototype.getSelectedRatingIndex=function(){return this.selectedIndex},A.prototype.getDomElements=function(A){if(!A)throw new Error("Document must not be null");var e=A.createElement(n.DOM_RATING_TAGNAME);return this.isRatingIndexValid(this.getSelectedRatingIndex())?e.appendChild(A.createTextNode(this.getNormalizedRatingScore().toFixed(6))):e.appendChild(A.createTextNode("Not rated")),[e]},A.prototype.getJsonElements=function(){var A={};return this.isRatingIndexValid(this.getSelectedRatingIndex())?A[n.JSON_RATING_KEYNAME]=this.getNormalizedRatingScore():A[n.JSON_RATING_KEYNAME]="Not rated",A},A.prototype.getComponentJson=function(){var A;return(A={})[n.JSON_QUESTION_KEYNAME]=this.getQuestion(),A[n.JSON_RATINGOPTIONS_KEYNAME]=this.getRatingValuesAscending(),A},A.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:-1},A.prototype.isRatingIndexValid=function(A){return A>=0&&At&&this.addStats(n,r)}return this.validate()},e.prototype.validate=function(){return g.isObject(this.getStats())},e}(l.SurveyStatCollection);e.SurveyStatCollectionActivation=d;var B=function(){function A(){}return A.make=function(A,e){return e?new h(A,e):new p(A)},A}();e.SurveyActivationStatsProviderFactory=B;var h=function(){function A(A,e){if(!e)throw new Error("host-based storage must not be null");this.hostBasedStorage=e,A&&(this.fileBasedStorageProvider=new p(A))}return A.prototype.load=function(){var A=this.getSurveyStatsFromHost(),e=new d;return this.fileBasedStorageProvider&&(e=this.fileBasedStorageProvider.load()),u.MergeAndUpdateSurveyActivationStats(e,A).find(0)},A.prototype.save=function(A){if(A){var e=this.getSurveyStatsFromHost(),t=u.MergeAndUpdateSurveyActivationStats(A,e),n=t.find(1),r=t.find(0);if(n){var i=n.getStats();for(var a in i)if(i.hasOwnProperty(a)){var s=u.makeSettingItemValue(JSON.stringify(i[a]));this.hostBasedStorage.upsertSettingItem(o[o.SurveyActivationStats],a,s)}}this.fileBasedStorageProvider&&this.fileBasedStorageProvider.save(r)}},A.prototype.getSurveyStatsFromHost=function(){var A=new d,e=this.hostBasedStorage.readSettingList(o[o.SurveyActivationStats]),t=new Date;for(var n in e)if(e.hasOwnProperty(n)){var r=u.extractSettingItemValueSubString(e[n]),i=new f;try{var a=JSON.parse(r);i.deserialize(a)}catch(A){c.FloodgateEngine.getTelemetryLogger().log_Event(s.TelemetryEvent.HostBasedSurveyActivationStatsProvider.GetSurveyStatsFromHost.Failed,{ErrorMessage:"Json parsing/deserializing failed. "+A.toString()+". Input:"+r})}i.ExpirationTimeUtc<=t?this.hostBasedStorage.deleteSettingItem(o[o.SurveyActivationStats],n):A.addStats(n,i)}return A},A}();e.HostBasedSurveyActivationStatsProvider=h;var p=function(){function A(A){if(!A)throw new Error("storage must not be null");this.storage=A}return A.prototype.load=function(){var A=this.storage.read(i.FileType.SurveyActivationStats);return A?d.fromJson(A):new d},A.prototype.save=function(A){if(A){var e=d.toJson(A);this.storage.write(i.FileType.SurveyActivationStats,e)}},A}();e.FileBasedSurveyActivationStatsProvider=p;var f=function(){function A(){this.SurveyLaunchCount=0,this.SurveyLaunchCountPerSession=0}return A.prototype.deserialize=function(A){var e,t;return this.ActivationTimeUtc=A.ActivationTimeUtc,this.ExpirationTimeUtc=A.ExpirationTimeUtc,this.Type=A.Type,this.SurveyLaunchCount=null!==(e=A.SurveyLaunchCount)&&void 0!==e?e:0,this.SurveyLaunchCountPerSession=null!==(t=A.SurveyLaunchCountPerSession)&&void 0!==t?t:0,this.validate()},A.prototype.validate=function(){return!!g.isUtcDatetimeString(this.ActivationTimeUtc)&&(this.ActivationTimeUtc=g.stringToDate(this.ActivationTimeUtc),!!g.isUtcDatetimeString(this.ExpirationTimeUtc)&&(this.ExpirationTimeUtc=g.stringToDate(this.ExpirationTimeUtc),!(!g.isNumber(this.SurveyLaunchCount)||!g.isNumber(this.SurveyLaunchCountPerSession))&&g.isEnumValue(this.Type,a.Type)))},A}();e.SurveyActivationStats=f},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SurveyStatCollection=void 0;var n=function(){function A(){this.Surveys={},this.Surveys={}}return A.prototype.addStats=function(A,e){this.Surveys[A]=e},A.prototype.getBySurveyId=function(A){return this.Surveys[A]},A.prototype.getStats=function(){return this.Surveys},A}();e.SurveyStatCollection=n},function(A,e,t){"use strict";var n=t(8),r=function(){function A(A){if(!A)throw new Error("data must not be null");if(!A.customerVoiceFormId)throw new Error("data.formID must not be null or empty");this.data=A}return A.make=function(e){try{return new A(e)}catch(A){return null}},A.prototype.getType=function(){return"CVSurvey"},A.prototype.getFormId=function(){return this.data.customerVoiceFormId},A.prototype.getDomElements=function(A){if(!A)throw new Error("Document must not be null");return[A.createElement(n.DOM_CVSURVEY_TAGNAME)]},A.prototype.getJsonElements=function(){var A={};return A[n.JSON_CVSURVEY_KEYNAME]=this.getFormId(),A},A.prototype.getComponentJson=function(){var A;return(A={})[n.JSON_CVSURVEYFORMID_KEYNAME]=this.getFormId(),A},A}();!function(A){var e=function(){};A.CVSurveyComponentData=e}(r||(r={})),A.exports=r},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileBasedGovernedChannelStateProvider=e.HostBasedGovernedChannelStateProvider=e.GovernedChannelStateProviderFactory=e.GovernedChannelState=void 0;var n=t(6),r=t(9),i=t(10),o=t(12),a=t(18),s=t(5),c=n.FileType,u=function(){function A(A,e){if(this.ChannelType=A,this.CooldownStartTimeUtc=e,!this.validate())throw new Error("Constructor arguments are not valid")}return A.deserialize=function(e){var t;if(!e)return null;try{t=new A(e.ChannelType,e.CooldownStartTimeUtc)}catch(A){return i.FloodgateEngine.getTelemetryLogger().log_Event(r.TelemetryEvent.GovernedChannelState.Deserialize.Failed,{ErrorMessage:A.toString()}),null}return t},A.prototype.validate=function(){return!!s.isEnumValue(this.ChannelType,o.GovernedChannelType)&&(s.isUtcDatetimeString(this.CooldownStartTimeUtc)?this.CooldownStartTimeUtc=s.stringToDate(this.CooldownStartTimeUtc):!s.isNOU(this.CooldownStartTimeUtc)&&s.isDate(this.CooldownStartTimeUtc)||(this.CooldownStartTimeUtc=s.getDistantPast()),!0)},A.prototype.getType=function(){return this.ChannelType},A.prototype.getCooldownStartTime=function(){return this.CooldownStartTimeUtc},A}();e.GovernedChannelState=u;var l=function(){function A(){}return A.make=function(A,e){return e?new d(A,e):new B(A)},A}();e.GovernedChannelStateProviderFactory=l;var g=function(){},d=function(){function A(A,e){if(!e)throw new Error("host-based storage must not be null");this.hostBasedStorage=e,A&&(this.fileBasedStateProvider=new B(A))}return A.prototype.load=function(){var A,e=this.getStatesFromHost();return this.fileBasedStateProvider&&(A=this.fileBasedStateProvider.load()),a.MergeAndUpdateGovernedChannelStates(A,e).find(0)},A.prototype.save=function(A){var e=this;if(A){var t=this.getStatesFromHost(),n=a.MergeAndUpdateGovernedChannelStates(A,t),r=n.find(1),i=n.find(0);r&&r.forEach((function(A){var t=a.makeSettingItemValue(JSON.stringify(A));e.hostBasedStorage.upsertSettingItem(c[c.GovernedChannelStates],String(A.getType()),t)})),this.fileBasedStateProvider&&this.fileBasedStateProvider.save(i)}},A.prototype.getStatesFromHost=function(){var A=[],e=this.hostBasedStorage.readSettingList(c[c.GovernedChannelStates]);for(var t in e)if(e.hasOwnProperty(t)){var n=e[t],o=a.extractSettingItemValueSubString(n),s={};try{s=JSON.parse(o);var l=u.deserialize(s);l&&A.push(l)}catch(A){i.FloodgateEngine.getTelemetryLogger().log_Event(r.TelemetryEvent.HostBasedGovernedChannelStateProvider.GetStatesFromHost.Failed,{ErrorMessage:"Json parsing/deserializing failed. "+A.toString()+". Input:"+o})}}return A},A}();e.HostBasedGovernedChannelStateProvider=d;var B=function(){function A(A){if(!A)throw new Error("storage must not be null");this.storage=A}return A.prototype.load=function(){var A,e=this.storage.read(c.GovernedChannelStates);if(!e)return[];try{A=JSON.parse(e);var t=[];return A&&A.ChannelStates&&A.ChannelStates.forEach((function(A){var e=u.deserialize(A);e&&t.push(e)})),t}catch(A){return i.FloodgateEngine.getTelemetryLogger().log_Event(r.TelemetryEvent.FileBasedGovernedChannelStateProvider.Load.Failed,{ErrorMessage:"Json parsing/deserializing failed. "+A.toString()+". Input:"+e}),[]}},A.prototype.save=function(A){if(A){var e=new g;e.ChannelStates=A;var t=JSON.stringify(e);this.storage.write(c.GovernedChannelStates,t)}},A}();e.FileBasedGovernedChannelStateProvider=B},function(A,e,t){"use strict";var n,r=this&&this.__extends||(n=function(A,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,e){A.__proto__=e}||function(A,e){for(var t in e)e.hasOwnProperty(t)&&(A[t]=e[t])})(A,e)},function(A,e){function t(){this.constructor=A}n(A,e),A.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)});Object.defineProperty(e,"__esModule",{value:!0}),e.SurveyEventActivityStats=e.SurveyStatCollectionEventActivity=void 0;var i=t(9),o=t(10),a=t(24),s=t(5),c=function(A){function e(){return null!==A&&A.apply(this,arguments)||this}return r(e,A),e.fromJson=function(A){var t,n=new e;if(!A)return n;try{t=JSON.parse(A)}catch(A){return o.FloodgateEngine.getTelemetryLogger().log_Event(i.TelemetryEvent.SurveyStatCollectionEventActivity.FromJson.Failed,{ErrorMessage:"Json parsing failed. "+A.toString()}),n}return n.deserialize(t)?n:new e},e.toJson=function(A){return A||(o.FloodgateEngine.getTelemetryLogger().log_Event(i.TelemetryEvent.SurveyStatCollectionEventActivity.ToJson.Failed,{ErrorMessage:"Input json is null or empty."}),A=new e),JSON.stringify(A)},e.prototype.accumulate=function(A){if(A){var e=A.getStats();for(var t in e)if(e.hasOwnProperty(t)){var n=this.getBySurveyId(t);if(n||((n=new u).Counts=[],this.addStats(t,n)),n.ExpirationTimeUtc=e[t].ExpirationTimeUtc,n.Counts.lengtht&&this.addStats(n,r)}return this.validate()},e.prototype.validate=function(){return s.isObject(this.getStats())},e}(a.SurveyStatCollection);e.SurveyStatCollectionEventActivity=c;var u=function(){function A(){}return A.prototype.deserialize=function(A){return this.ExpirationTimeUtc=A.ExpirationTimeUtc,this.Counts=A.Counts,this.validate()},A.prototype.validate=function(){if(!this.Counts)return!1;for(var A=0;A0&&r[r.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]=55296&&r<=56319&&t>10),o%1024+56320)),(r+1===t||n.length>16384)&&(i+=String.fromCharCode.apply(String,n),n.length=0)}return i},u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l="undefined"==typeof Uint8Array?[]:new Uint8Array(256),g=0;g=0){if(A<55296||A>56319&&A<=65535)return e=((e=this.index[A>>5])<<2)+(31&A),this.data[e];if(A<=65535)return e=((e=this.index[2048+(A-55296>>5)])<<2)+(31&A),this.data[e];if(A>11),e=this.index[e],e+=A>>5&63,e=((e=this.index[e])<<2)+(31&A),this.data[e];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},A}(),m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",C="undefined"==typeof Uint8Array?[]:new Uint8Array(256),v=0;v>4,u[s++]=(15&n)<<4|r>>2,u[s++]=(3&r)<<6|63&i;return c}(A),o=Array.isArray(i)?function(A){for(var e=A.length,t=[],n=0;n0;){var o=n[--i];if(Array.isArray(A)?-1!==A.indexOf(o):A===o)for(var a=t;a<=n.length;){var s;if((s=n[++a])===e)return!0;if(s!==w)break}if(o!==w)break}return!1},eA=function(A,e){for(var t=A;t>=0;){var n=e[t];if(n!==w)return n;t--}return 0},tA=function(A,e,t,n,r){if(0===t[n])return"×";var i=n-1;if(Array.isArray(r)&&!0===r[i])return"×";var o=i-1,a=i+1,s=e[i],c=o>=0?e[o]:0,u=e[a];if(2===s&&3===u)return"×";if(-1!==X.indexOf(s))return"!";if(-1!==X.indexOf(u))return"×";if(-1!==Z.indexOf(u))return"×";if(8===eA(i,e))return"÷";if(11===W.get(A[i]))return"×";if((s===x||s===M)&&11===W.get(A[a]))return"×";if(7===s||7===u)return"×";if(9===s)return"×";if(-1===[w,y,F].indexOf(s)&&9===u)return"×";if(-1!==[Q,U,S,T,O].indexOf(u))return"×";if(eA(i,e)===b)return"×";if(AA(23,b,i,e))return"×";if(AA([Q,U],I,i,e))return"×";if(AA(12,12,i,e))return"×";if(s===w)return"÷";if(23===s||23===u)return"×";if(16===u||16===s)return"÷";if(-1!==[y,F,I].indexOf(u)||14===s)return"×";if(36===c&&-1!==$.indexOf(s))return"×";if(s===O&&36===u)return"×";if(u===E)return"×";if(-1!==Y.indexOf(u)&&s===H||-1!==Y.indexOf(s)&&u===H)return"×";if(s===D&&-1!==[k,x,M].indexOf(u)||-1!==[k,x,M].indexOf(s)&&u===L)return"×";if(-1!==Y.indexOf(s)&&-1!==z.indexOf(u)||-1!==z.indexOf(s)&&-1!==Y.indexOf(u))return"×";if(-1!==[D,L].indexOf(s)&&(u===H||-1!==[b,F].indexOf(u)&&e[a+1]===H)||-1!==[b,F].indexOf(s)&&u===H||s===H&&-1!==[H,O,T].indexOf(u))return"×";if(-1!==[H,O,T,Q,U].indexOf(u))for(var l=i;l>=0;){if((g=e[l])===H)return"×";if(-1===[O,T].indexOf(g))break;l--}if(-1!==[D,L].indexOf(u))for(l=-1!==[Q,U].indexOf(s)?o:i;l>=0;){var g;if((g=e[l])===H)return"×";if(-1===[O,T].indexOf(g))break;l--}if(N===s&&-1!==[N,R,P,K].indexOf(u)||-1!==[R,P].indexOf(s)&&-1!==[R,V].indexOf(u)||-1!==[V,K].indexOf(s)&&u===V)return"×";if(-1!==j.indexOf(s)&&-1!==[E,L].indexOf(u)||-1!==j.indexOf(u)&&s===D)return"×";if(-1!==Y.indexOf(s)&&-1!==Y.indexOf(u))return"×";if(s===T&&-1!==Y.indexOf(u))return"×";if(-1!==Y.concat(H).indexOf(s)&&u===b&&-1===J.indexOf(A[a])||-1!==Y.concat(H).indexOf(u)&&s===U)return"×";if(41===s&&41===u){for(var d=t[i],B=1;d>0&&41===e[--d];)B++;if(B%2!=0)return"×"}return s===x&&u===M?"×":"÷"},nA=function(A,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=function(A,e){void 0===e&&(e="strict");var t=[],n=[],r=[];return A.forEach((function(A,i){var o=W.get(A);if(o>50?(r.push(!0),o-=50):r.push(!1),-1!==["normal","auto","loose"].indexOf(e)&&-1!==[8208,8211,12316,12448].indexOf(A))return n.push(i),t.push(16);if(4===o||11===o){if(0===i)return n.push(i),t.push(_);var a=t[i-1];return-1===q.indexOf(a)?(n.push(n[i-1]),t.push(a)):(n.push(i),t.push(_))}return n.push(i),31===o?t.push("strict"===e?I:k):o===G||29===o?t.push(_):43===o?A>=131072&&A<=196605||A>=196608&&A<=262141?t.push(k):t.push(_):void t.push(o)})),[n,t,r]}(A,e.lineBreak),n=t[0],r=t[1],i=t[2];return"break-all"!==e.wordBreak&&"break-word"!==e.wordBreak||(r=r.map((function(A){return-1!==[H,_,G].indexOf(A)?k:A}))),[n,r,"keep-all"===e.wordBreak?i.map((function(e,t){return e&&A[t]>=19968&&A[t]<=40959})):void 0]},rA=function(){function A(A,e,t,n){this.codePoints=A,this.required="!"===e,this.start=t,this.end=n}return A.prototype.slice=function(){return c.apply(void 0,this.codePoints.slice(this.start,this.end))},A}(),iA=function(A){return A>=48&&A<=57},oA=function(A){return iA(A)||A>=65&&A<=70||A>=97&&A<=102},aA=function(A){return 10===A||9===A||32===A},sA=function(A){return function(A){return function(A){return A>=97&&A<=122}(A)||function(A){return A>=65&&A<=90}(A)}(A)||function(A){return A>=128}(A)||95===A},cA=function(A){return sA(A)||iA(A)||45===A},uA=function(A){return A>=0&&A<=8||11===A||A>=14&&A<=31||127===A},lA=function(A,e){return 92===A&&10!==e},gA=function(A,e,t){return 45===A?sA(e)||lA(e,t):!!sA(A)||!(92!==A||!lA(A,e))},dA=function(A,e,t){return 43===A||45===A?!!iA(e)||46===e&&iA(t):iA(46===A?e:A)},BA=function(A){var e=0,t=1;43!==A[e]&&45!==A[e]||(45===A[e]&&(t=-1),e++);for(var n=[];iA(A[e]);)n.push(A[e++]);var r=n.length?parseInt(c.apply(void 0,n),10):0;46===A[e]&&e++;for(var i=[];iA(A[e]);)i.push(A[e++]);var o=i.length,a=o?parseInt(c.apply(void 0,i),10):0;69!==A[e]&&101!==A[e]||e++;var s=1;43!==A[e]&&45!==A[e]||(45===A[e]&&(s=-1),e++);for(var u=[];iA(A[e]);)u.push(A[e++]);var l=u.length?parseInt(c.apply(void 0,u),10):0;return t*(r+a*Math.pow(10,-o))*Math.pow(10,s*l)},hA={type:2},pA={type:3},fA={type:4},mA={type:13},CA={type:8},vA={type:21},wA={type:9},yA={type:10},FA={type:11},QA={type:12},UA={type:14},SA={type:23},EA={type:1},IA={type:25},bA={type:24},TA={type:26},HA={type:27},LA={type:28},DA={type:29},OA={type:31},_A={type:32},xA=function(){function A(){this._value=[]}return A.prototype.write=function(A){this._value=this._value.concat(s(A))},A.prototype.read=function(){for(var A=[],e=this.consumeToken();e!==_A;)A.push(e),e=this.consumeToken();return A},A.prototype.consumeToken=function(){var A=this.consumeCodePoint();switch(A){case 34:return this.consumeStringToken(34);case 35:var e=this.peekCodePoint(0),t=this.peekCodePoint(1),n=this.peekCodePoint(2);if(cA(e)||lA(t,n)){var r=gA(e,t,n)?2:1;return{type:5,value:this.consumeName(),flags:r}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),mA;break;case 39:return this.consumeStringToken(39);case 40:return hA;case 41:return pA;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),UA;break;case 43:if(dA(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case 44:return fA;case 45:var i=A,o=this.peekCodePoint(0),a=this.peekCodePoint(1);if(dA(i,o,a))return this.reconsumeCodePoint(A),this.consumeNumericToken();if(gA(i,o,a))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();if(45===o&&62===a)return this.consumeCodePoint(),this.consumeCodePoint(),bA;break;case 46:if(dA(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var s=this.consumeCodePoint();if(42===s&&47===(s=this.consumeCodePoint()))return this.consumeToken();if(-1===s)return this.consumeToken()}break;case 58:return TA;case 59:return HA;case 60:if(33===this.peekCodePoint(0)&&45===this.peekCodePoint(1)&&45===this.peekCodePoint(2))return this.consumeCodePoint(),this.consumeCodePoint(),IA;break;case 64:var u=this.peekCodePoint(0),l=this.peekCodePoint(1),g=this.peekCodePoint(2);if(gA(u,l,g))return{type:7,value:this.consumeName()};break;case 91:return LA;case 92:if(lA(A,this.peekCodePoint(0)))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();break;case 93:return DA;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),CA;break;case 123:return FA;case 125:return QA;case 117:case 85:var d=this.peekCodePoint(0),B=this.peekCodePoint(1);return 43!==d||!oA(B)&&63!==B||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(A),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),wA;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),vA;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),yA;break;case-1:return _A}return aA(A)?(this.consumeWhiteSpace(),OA):iA(A)?(this.reconsumeCodePoint(A),this.consumeNumericToken()):sA(A)?(this.reconsumeCodePoint(A),this.consumeIdentLikeToken()):{type:6,value:c(A)}},A.prototype.consumeCodePoint=function(){var A=this._value.shift();return void 0===A?-1:A},A.prototype.reconsumeCodePoint=function(A){this._value.unshift(A)},A.prototype.peekCodePoint=function(A){return A>=this._value.length?-1:this._value[A]},A.prototype.consumeUnicodeRangeToken=function(){for(var A=[],e=this.consumeCodePoint();oA(e)&&A.length<6;)A.push(e),e=this.consumeCodePoint();for(var t=!1;63===e&&A.length<6;)A.push(e),e=this.consumeCodePoint(),t=!0;if(t)return{type:30,start:parseInt(c.apply(void 0,A.map((function(A){return 63===A?48:A}))),16),end:parseInt(c.apply(void 0,A.map((function(A){return 63===A?70:A}))),16)};var n=parseInt(c.apply(void 0,A),16);if(45===this.peekCodePoint(0)&&oA(this.peekCodePoint(1))){this.consumeCodePoint(),e=this.consumeCodePoint();for(var r=[];oA(e)&&r.length<6;)r.push(e),e=this.consumeCodePoint();return{type:30,start:n,end:parseInt(c.apply(void 0,r),16)}}return{type:30,start:n,end:n}},A.prototype.consumeIdentLikeToken=function(){var A=this.consumeName();return"url"===A.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:A}):{type:20,value:A}},A.prototype.consumeUrlToken=function(){var A=[];if(this.consumeWhiteSpace(),-1===this.peekCodePoint(0))return{type:22,value:""};var e=this.peekCodePoint(0);if(39===e||34===e){var t=this.consumeStringToken(this.consumeCodePoint());return 0===t.type&&(this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:t.value}):(this.consumeBadUrlRemnants(),SA)}for(;;){var n=this.consumeCodePoint();if(-1===n||41===n)return{type:22,value:c.apply(void 0,A)};if(aA(n))return this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:c.apply(void 0,A)}):(this.consumeBadUrlRemnants(),SA);if(34===n||39===n||40===n||uA(n))return this.consumeBadUrlRemnants(),SA;if(92===n){if(!lA(n,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),SA;A.push(this.consumeEscapedCodePoint())}else A.push(n)}},A.prototype.consumeWhiteSpace=function(){for(;aA(this.peekCodePoint(0));)this.consumeCodePoint()},A.prototype.consumeBadUrlRemnants=function(){for(;;){var A=this.consumeCodePoint();if(41===A||-1===A)return;lA(A,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},A.prototype.consumeStringSlice=function(A){for(var e="";A>0;){var t=Math.min(5e4,A);e+=c.apply(void 0,this._value.splice(0,t)),A-=t}return this._value.shift(),e},A.prototype.consumeStringToken=function(A){for(var e="",t=0;;){var n=this._value[t];if(-1===n||void 0===n||n===A)return{type:0,value:e+=this.consumeStringSlice(t)};if(10===n)return this._value.splice(0,t),EA;if(92===n){var r=this._value[t+1];-1!==r&&void 0!==r&&(10===r?(e+=this.consumeStringSlice(t),t=-1,this._value.shift()):lA(n,r)&&(e+=this.consumeStringSlice(t),e+=c(this.consumeEscapedCodePoint()),t=-1))}t++}},A.prototype.consumeNumber=function(){var A=[],e=4,t=this.peekCodePoint(0);for(43!==t&&45!==t||A.push(this.consumeCodePoint());iA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0);var n=this.peekCodePoint(1);if(46===t&&iA(n))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;iA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0),n=this.peekCodePoint(1);var r=this.peekCodePoint(2);if((69===t||101===t)&&((43===n||45===n)&&iA(r)||iA(n)))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;iA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());return[BA(A),e]},A.prototype.consumeNumericToken=function(){var A=this.consumeNumber(),e=A[0],t=A[1],n=this.peekCodePoint(0),r=this.peekCodePoint(1),i=this.peekCodePoint(2);return gA(n,r,i)?{type:15,number:e,flags:t,unit:this.consumeName()}:37===n?(this.consumeCodePoint(),{type:16,number:e,flags:t}):{type:17,number:e,flags:t}},A.prototype.consumeEscapedCodePoint=function(){var A=this.consumeCodePoint();if(oA(A)){for(var e=c(A);oA(this.peekCodePoint(0))&&e.length<6;)e+=c(this.consumeCodePoint());aA(this.peekCodePoint(0))&&this.consumeCodePoint();var t=parseInt(e,16);return 0===t||function(A){return A>=55296&&A<=57343}(t)||t>1114111?65533:t}return-1===A?65533:A},A.prototype.consumeName=function(){for(var A="";;){var e=this.consumeCodePoint();if(cA(e))A+=c(e);else{if(!lA(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),A;A+=c(this.consumeEscapedCodePoint())}}},A}(),MA=function(){function A(A){this._tokens=A}return A.create=function(e){var t=new xA;return t.write(e),new A(t.read())},A.parseValue=function(e){return A.create(e).parseComponentValue()},A.parseValues=function(e){return A.create(e).parseComponentValues()},A.prototype.parseComponentValue=function(){for(var A=this.consumeToken();31===A.type;)A=this.consumeToken();if(32===A.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(A);var e=this.consumeComponentValue();do{A=this.consumeToken()}while(31===A.type);if(32===A.type)return e;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},A.prototype.parseComponentValues=function(){for(var A=[];;){var e=this.consumeComponentValue();if(32===e.type)return A;A.push(e),A.push()}},A.prototype.consumeComponentValue=function(){var A=this.consumeToken();switch(A.type){case 11:case 28:case 2:return this.consumeSimpleBlock(A.type);case 19:return this.consumeFunction(A)}return A},A.prototype.consumeSimpleBlock=function(A){for(var e={type:A,values:[]},t=this.consumeToken();;){if(32===t.type||WA(t,A))return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue()),t=this.consumeToken()}},A.prototype.consumeFunction=function(A){for(var e={name:A.value,values:[],type:18};;){var t=this.consumeToken();if(32===t.type||3===t.type)return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue())}},A.prototype.consumeToken=function(){var A=this._tokens.shift();return void 0===A?_A:A},A.prototype.reconsumeToken=function(A){this._tokens.unshift(A)},A}(),PA=function(A){return 15===A.type},KA=function(A){return 17===A.type},kA=function(A){return 20===A.type},NA=function(A){return 0===A.type},RA=function(A,e){return kA(A)&&A.value===e},VA=function(A){return 31!==A.type},GA=function(A){return 31!==A.type&&4!==A.type},JA=function(A){var e=[],t=[];return A.forEach((function(A){if(4===A.type){if(0===t.length)throw new Error("Error parsing function args, zero tokens for arg");return e.push(t),void(t=[])}31!==A.type&&t.push(A)})),t.length&&e.push(t),e},WA=function(A,e){return 11===e&&12===A.type||28===e&&29===A.type||2===e&&3===A.type},YA=function(A){return 17===A.type||15===A.type},XA=function(A){return 16===A.type||YA(A)},ZA=function(A){return A.length>1?[A[0],A[1]]:[A[0]]},zA={type:17,number:0,flags:4},qA={type:16,number:50,flags:4},jA={type:16,number:100,flags:4},$A=function(A,e,t){var n=A[0],r=A[1];return[Ae(n,e),Ae(void 0!==r?r:n,t)]},Ae=function(A,e){if(16===A.type)return A.number/100*e;if(PA(A))switch(A.unit){case"rem":case"em":return 16*A.number;case"px":default:return A.number}return A.number},ee=function(A,e){if(15===e.type)switch(e.unit){case"deg":return Math.PI*e.number/180;case"grad":return Math.PI/200*e.number;case"rad":return e.number;case"turn":return 2*Math.PI*e.number}throw new Error("Unsupported angle type")},te=function(A){return 15===A.type&&("deg"===A.unit||"grad"===A.unit||"rad"===A.unit||"turn"===A.unit)},ne=function(A){switch(A.filter(kA).map((function(A){return A.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[zA,zA];case"to top":case"bottom":return re(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[zA,jA];case"to right":case"left":return re(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[jA,jA];case"to bottom":case"top":return re(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[jA,zA];case"to left":case"right":return re(270)}return 0},re=function(A){return Math.PI*A/180},ie=function(A,e){if(18===e.type){var t=Be[e.name];if(void 0===t)throw new Error('Attempting to parse an unsupported color function "'+e.name+'"');return t(A,e.values)}if(5===e.type){if(3===e.value.length){var n=e.value.substring(0,1),r=e.value.substring(1,2),i=e.value.substring(2,3);return se(parseInt(n+n,16),parseInt(r+r,16),parseInt(i+i,16),1)}if(4===e.value.length){n=e.value.substring(0,1),r=e.value.substring(1,2),i=e.value.substring(2,3);var o=e.value.substring(3,4);return se(parseInt(n+n,16),parseInt(r+r,16),parseInt(i+i,16),parseInt(o+o,16)/255)}if(6===e.value.length)return n=e.value.substring(0,2),r=e.value.substring(2,4),i=e.value.substring(4,6),se(parseInt(n,16),parseInt(r,16),parseInt(i,16),1);if(8===e.value.length)return n=e.value.substring(0,2),r=e.value.substring(2,4),i=e.value.substring(4,6),o=e.value.substring(6,8),se(parseInt(n,16),parseInt(r,16),parseInt(i,16),parseInt(o,16)/255)}if(20===e.type){var a=pe[e.value.toUpperCase()];if(void 0!==a)return a}return pe.TRANSPARENT},oe=function(A){return 0==(255&A)},ae=function(A){var e=255&A,t=255&A>>8,n=255&A>>16,r=255&A>>24;return e<255?"rgba("+r+","+n+","+t+","+e/255+")":"rgb("+r+","+n+","+t+")"},se=function(A,e,t,n){return(A<<24|e<<16|t<<8|Math.round(255*n)<<0)>>>0},ce=function(A,e){if(17===A.type)return A.number;if(16===A.type){var t=3===e?1:255;return 3===e?A.number/100*t:Math.round(A.number/100*t)}return 0},ue=function(A,e){var t=e.filter(GA);if(3===t.length){var n=t.map(ce),r=n[0],i=n[1],o=n[2];return se(r,i,o,1)}if(4===t.length){var a=t.map(ce),s=(r=a[0],i=a[1],o=a[2],a[3]);return se(r,i,o,s)}return 0};function le(A,e,t){return t<0&&(t+=1),t>=1&&(t-=1),t<1/6?(e-A)*t*6+A:t<.5?e:t<2/3?6*(e-A)*(2/3-t)+A:A}var ge,de=function(A,e){var t=e.filter(GA),n=t[0],r=t[1],i=t[2],o=t[3],a=(17===n.type?re(n.number):ee(A,n))/(2*Math.PI),s=XA(r)?r.number/100:0,c=XA(i)?i.number/100:0,u=void 0!==o&&XA(o)?Ae(o,1):1;if(0===s)return se(255*c,255*c,255*c,1);var l=c<=.5?c*(s+1):c+s-c*s,g=2*c-l,d=le(g,l,a+1/3),B=le(g,l,a),h=le(g,l,a-1/3);return se(255*d,255*B,255*h,u)},Be={hsl:de,hsla:de,rgb:ue,rgba:ue},he=function(A,e){return ie(A,MA.create(e).parseComponentValue())},pe={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},fe={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(A,e){return e.map((function(A){if(kA(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},me={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Ce=function(A,e){var t=ie(A,e[0]),n=e[1];return n&&XA(n)?{color:t,stop:n}:{color:t,stop:null}},ve=function(A,e){var t=A[0],n=A[A.length-1];null===t.stop&&(t.stop=zA),null===n.stop&&(n.stop=jA);for(var r=[],i=0,o=0;oi?r.push(s):r.push(i),i=s}else r.push(null)}var c=null;for(o=0;oA.optimumDistance)?{optimumCorner:e,optimumDistance:a}:A}),{optimumDistance:r?1/0:-1/0,optimumCorner:null}).optimumCorner},Qe=function(A,e){var t=re(180),n=[];return JA(e).forEach((function(e,r){if(0===r){var i=e[0];if(20===i.type&&-1!==["top","left","right","bottom"].indexOf(i.value))return void(t=ne(e));if(te(i))return void(t=(ee(A,i)+re(270))%re(360))}var o=Ce(A,e);n.push(o)})),{angle:t,stops:n,type:1}},Ue=function(A,e){var t=0,n=3,r=[],i=[];return JA(e).forEach((function(e,o){var a=!0;if(0===o?a=e.reduce((function(A,e){if(kA(e))switch(e.value){case"center":return i.push(qA),!1;case"top":case"left":return i.push(zA),!1;case"right":case"bottom":return i.push(jA),!1}else if(XA(e)||YA(e))return i.push(e),!1;return A}),a):1===o&&(a=e.reduce((function(A,e){if(kA(e))switch(e.value){case"circle":return t=0,!1;case"ellipse":return t=1,!1;case"contain":case"closest-side":return n=0,!1;case"farthest-side":return n=1,!1;case"closest-corner":return n=2,!1;case"cover":case"farthest-corner":return n=3,!1}else if(YA(e)||XA(e))return Array.isArray(n)||(n=[]),n.push(e),!1;return A}),a)),a){var s=Ce(A,e);r.push(s)}})),{size:n,shape:t,stops:r,position:i,type:2}},Se=function(A,e){if(22===e.type){var t={url:e.value,type:0};return A.cache.addImage(e.value),t}if(18===e.type){var n=Ee[e.name];if(void 0===n)throw new Error('Attempting to parse an unsupported image function "'+e.name+'"');return n(A,e.values)}throw new Error("Unsupported image type "+e.type)},Ee={"linear-gradient":function(A,e){var t=re(180),n=[];return JA(e).forEach((function(e,r){if(0===r){var i=e[0];if(20===i.type&&"to"===i.value)return void(t=ne(e));if(te(i))return void(t=ee(A,i))}var o=Ce(A,e);n.push(o)})),{angle:t,stops:n,type:1}},"-moz-linear-gradient":Qe,"-ms-linear-gradient":Qe,"-o-linear-gradient":Qe,"-webkit-linear-gradient":Qe,"radial-gradient":function(A,e){var t=0,n=3,r=[],i=[];return JA(e).forEach((function(e,o){var a=!0;if(0===o){var s=!1;a=e.reduce((function(A,e){if(s)if(kA(e))switch(e.value){case"center":return i.push(qA),A;case"top":case"left":return i.push(zA),A;case"right":case"bottom":return i.push(jA),A}else(XA(e)||YA(e))&&i.push(e);else if(kA(e))switch(e.value){case"circle":return t=0,!1;case"ellipse":return t=1,!1;case"at":return s=!0,!1;case"closest-side":return n=0,!1;case"cover":case"farthest-side":return n=1,!1;case"contain":case"closest-corner":return n=2,!1;case"farthest-corner":return n=3,!1}else if(YA(e)||XA(e))return Array.isArray(n)||(n=[]),n.push(e),!1;return A}),a)}if(a){var c=Ce(A,e);r.push(c)}})),{size:n,shape:t,stops:r,position:i,type:2}},"-moz-radial-gradient":Ue,"-ms-radial-gradient":Ue,"-o-radial-gradient":Ue,"-webkit-radial-gradient":Ue,"-webkit-gradient":function(A,e){var t=re(180),n=[],r=1;return JA(e).forEach((function(e,t){var i=e[0];if(0===t){if(kA(i)&&"linear"===i.value)return void(r=1);if(kA(i)&&"radial"===i.value)return void(r=2)}if(18===i.type)if("from"===i.name){var o=ie(A,i.values[0]);n.push({stop:zA,color:o})}else if("to"===i.name)o=ie(A,i.values[0]),n.push({stop:jA,color:o});else if("color-stop"===i.name){var a=i.values.filter(GA);if(2===a.length){o=ie(A,a[1]);var s=a[0];KA(s)&&n.push({stop:{type:16,number:100*s.number,flags:s.flags},color:o})}}})),1===r?{angle:(t+re(180))%re(360),stops:n,type:r}:{size:3,shape:0,stops:n,position:[],type:r}}},Ie={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(A,e){if(0===e.length)return[];var t=e[0];return 20===t.type&&"none"===t.value?[]:e.filter((function(A){return GA(A)&&function(A){return!(20===A.type&&"none"===A.value||18===A.type&&!Ee[A.name])}(A)})).map((function(e){return Se(A,e)}))}},be={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(A,e){return e.map((function(A){if(kA(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},Te={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(A,e){return JA(e).map((function(A){return A.filter(XA)})).map(ZA)}},He={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(A,e){return JA(e).map((function(A){return A.filter(kA).map((function(A){return A.value})).join(" ")})).map(Le)}},Le=function(A){switch(A){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}};!function(A){A.AUTO="auto",A.CONTAIN="contain",A.COVER="cover"}(ge||(ge={}));var De,Oe={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(A,e){return JA(e).map((function(A){return A.filter(_e)}))}},_e=function(A){return kA(A)||XA(A)},xe=function(A){return{name:"border-"+A+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Me=xe("top"),Pe=xe("right"),Ke=xe("bottom"),ke=xe("left"),Ne=function(A){return{name:"border-radius-"+A,initialValue:"0 0",prefix:!1,type:1,parse:function(A,e){return ZA(e.filter(XA))}}},Re=Ne("top-left"),Ve=Ne("top-right"),Ge=Ne("bottom-right"),Je=Ne("bottom-left"),We=function(A){return{name:"border-"+A+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(A,e){switch(e){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Ye=We("top"),Xe=We("right"),Ze=We("bottom"),ze=We("left"),qe=function(A){return{name:"border-"+A+"-width",initialValue:"0",type:0,prefix:!1,parse:function(A,e){return PA(e)?e.number:0}}},je=qe("top"),$e=qe("right"),At=qe("bottom"),et=qe("left"),tt={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},nt={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(A,e){switch(e){case"rtl":return 1;case"ltr":default:return 0}}},rt={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(A,e){return e.filter(kA).reduce((function(A,e){return A|it(e.value)}),0)}},it=function(A){switch(A){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},ot={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(A,e){switch(e){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},at={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(A,e){return 20===e.type&&"normal"===e.value?0:17===e.type||15===e.type?e.number:0}};!function(A){A.NORMAL="normal",A.STRICT="strict"}(De||(De={}));var st,ct={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){switch(e){case"strict":return De.STRICT;case"normal":default:return De.NORMAL}}},ut={name:"line-height",initialValue:"normal",prefix:!1,type:4},lt=function(A,e){return kA(A)&&"normal"===A.value?1.2*e:17===A.type?e*A.number:XA(A)?Ae(A,e):e},gt={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(A,e){return 20===e.type&&"none"===e.value?null:Se(A,e)}},dt={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(A,e){switch(e){case"inside":return 0;case"outside":default:return 1}}},Bt={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(A,e){switch(e){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},ht=function(A){return{name:"margin-"+A,initialValue:"0",prefix:!1,type:4}},pt=ht("top"),ft=ht("right"),mt=ht("bottom"),Ct=ht("left"),vt={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(A,e){return e.filter(kA).map((function(A){switch(A.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}}))}},wt={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){switch(e){case"break-word":return"break-word";case"normal":default:return"normal"}}},yt=function(A){return{name:"padding-"+A,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Ft=yt("top"),Qt=yt("right"),Ut=yt("bottom"),St=yt("left"),Et={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(A,e){switch(e){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},It={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(A,e){switch(e){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},bt={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(A,e){return 1===e.length&&RA(e[0],"none")?[]:JA(e).map((function(e){for(var t={color:pe.TRANSPARENT,offsetX:zA,offsetY:zA,blur:zA},n=0,r=0;r1?1:0],this.overflowWrap=cn(A,wt,e.overflowWrap),this.paddingTop=cn(A,Ft,e.paddingTop),this.paddingRight=cn(A,Qt,e.paddingRight),this.paddingBottom=cn(A,Ut,e.paddingBottom),this.paddingLeft=cn(A,St,e.paddingLeft),this.paintOrder=cn(A,tn,e.paintOrder),this.position=cn(A,It,e.position),this.textAlign=cn(A,Et,e.textAlign),this.textDecorationColor=cn(A,Nt,null!==(t=e.textDecorationColor)&&void 0!==t?t:e.color),this.textDecorationLine=cn(A,Rt,null!==(n=e.textDecorationLine)&&void 0!==n?n:e.textDecoration),this.textShadow=cn(A,bt,e.textShadow),this.textTransform=cn(A,Tt,e.textTransform),this.transform=cn(A,Ht,e.transform),this.transformOrigin=cn(A,_t,e.transformOrigin),this.visibility=cn(A,xt,e.visibility),this.webkitTextStrokeColor=cn(A,nn,e.webkitTextStrokeColor),this.webkitTextStrokeWidth=cn(A,rn,e.webkitTextStrokeWidth),this.wordBreak=cn(A,Mt,e.wordBreak),this.zIndex=cn(A,Pt,e.zIndex)}return A.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},A.prototype.isTransparent=function(){return oe(this.backgroundColor)},A.prototype.isTransformed=function(){return null!==this.transform},A.prototype.isPositioned=function(){return 0!==this.position},A.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},A.prototype.isFloating=function(){return 0!==this.float},A.prototype.isInlineLevel=function(){return Xt(this.display,4)||Xt(this.display,33554432)||Xt(this.display,268435456)||Xt(this.display,536870912)||Xt(this.display,67108864)||Xt(this.display,134217728)},A}(),an=function(A,e){this.content=cn(A,Zt,e.content),this.quotes=cn(A,$t,e.quotes)},sn=function(A,e){this.counterIncrement=cn(A,zt,e.counterIncrement),this.counterReset=cn(A,qt,e.counterReset)},cn=function(A,e,t){var n=new xA,r=null!=t?t.toString():e.initialValue;n.write(r);var i=new MA(n.read());switch(e.type){case 2:var o=i.parseComponentValue();return e.parse(A,kA(o)?o.value:e.initialValue);case 0:return e.parse(A,i.parseComponentValue());case 1:return e.parse(A,i.parseComponentValues());case 4:return i.parseComponentValue();case 3:switch(e.format){case"angle":return ee(A,i.parseComponentValue());case"color":return ie(A,i.parseComponentValue());case"image":return Se(A,i.parseComponentValue());case"length":var a=i.parseComponentValue();return YA(a)?a:zA;case"length-percentage":var s=i.parseComponentValue();return XA(s)?s:zA;case"time":return Kt(A,i.parseComponentValue())}}},un=function(A,e){var t=function(A){switch(A.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}}(A);return 1===t||e===t},ln=function(A,e){this.context=A,this.textNodes=[],this.elements=[],this.flags=0,un(e,3),this.styles=new on(A,window.getComputedStyle(e,null)),lr(e)&&(this.styles.animationDuration.some((function(A){return A>0}))&&(e.style.animationDuration="0s"),null!==this.styles.transform&&(e.style.transform="none")),this.bounds=a(this.context,e),un(e,4)&&(this.flags|=16)},gn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dn="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Bn=0;Bn=0){if(A<55296||A>56319&&A<=65535)return e=((e=this.index[A>>5])<<2)+(31&A),this.data[e];if(A<=65535)return e=((e=this.index[2048+(A-55296>>5)])<<2)+(31&A),this.data[e];if(A>11),e=this.index[e],e+=A>>5&63,e=((e=this.index[e])<<2)+(31&A),this.data[e];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},A}(),fn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mn="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Cn=0;Cn>10),o%1024+56320)),(r+1===t||n.length>16384)&&(i+=String.fromCharCode.apply(String,n),n.length=0)}return i},Sn=function(A,e){var t,n,r,i=function(A){var e,t,n,r,i,o=.75*A.length,a=A.length,s=0;"="===A[A.length-1]&&(o--,"="===A[A.length-2]&&o--);var c="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(o):new Array(o),u=Array.isArray(c)?c:new Uint8Array(c);for(e=0;e>4,u[s++]=(15&n)<<4|r>>2,u[s++]=(3&r)<<6|63&i;return c}(A),o=Array.isArray(i)?function(A){for(var e=A.length,t=[],n=0;n=55296&&r<=56319&&t=t)return{done:!0,value:null};for(var A="×";no.x||r.y>o.y;return o=r,0===e||a}));return A.body.removeChild(e),a}(document);return Object.defineProperty(Dn,"SUPPORT_WORD_BREAKING",{value:A}),A},get SUPPORT_SVG_DRAWING(){var A=function(A){var e=new Image,t=A.createElement("canvas"),n=t.getContext("2d");if(!n)return!1;e.src="data:image/svg+xml,";try{n.drawImage(e,0,0),t.toDataURL()}catch(A){return!1}return!0}(document);return Object.defineProperty(Dn,"SUPPORT_SVG_DRAWING",{value:A}),A},get SUPPORT_FOREIGNOBJECT_DRAWING(){var A="function"==typeof Array.from&&"function"==typeof window.fetch?function(A){var e=A.createElement("canvas");e.width=100,e.height=100;var t=e.getContext("2d");if(!t)return Promise.reject(!1);t.fillStyle="rgb(0, 255, 0)",t.fillRect(0,0,100,100);var n=new Image,r=e.toDataURL();n.src=r;var i=Hn(100,100,0,0,n);return t.fillStyle="red",t.fillRect(0,0,100,100),Ln(i).then((function(e){t.drawImage(e,0,0);var n=t.getImageData(0,0,100,100).data;t.fillStyle="red",t.fillRect(0,0,100,100);var i=A.createElement("div");return i.style.backgroundImage="url("+r+")",i.style.height="100px",Tn(n)?Ln(Hn(100,100,0,0,i)):Promise.reject(!1)})).then((function(A){return t.drawImage(A,0,0),Tn(t.getImageData(0,0,100,100).data)})).catch((function(){return!1}))}(document):Promise.resolve(!1);return Object.defineProperty(Dn,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:A}),A},get SUPPORT_CORS_IMAGES(){var A=void 0!==(new Image).crossOrigin;return Object.defineProperty(Dn,"SUPPORT_CORS_IMAGES",{value:A}),A},get SUPPORT_RESPONSE_TYPE(){var A="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(Dn,"SUPPORT_RESPONSE_TYPE",{value:A}),A},get SUPPORT_CORS_XHR(){var A="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Dn,"SUPPORT_CORS_XHR",{value:A}),A},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var A=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(Dn,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:A}),A}},On=function(A,e){this.text=A,this.bounds=e},_n=function(A,e){var t=e.ownerDocument;if(t){var n=t.createElement("html2canvaswrapper");n.appendChild(e.cloneNode(!0));var r=e.parentNode;if(r){r.replaceChild(n,e);var i=a(A,n);return n.firstChild&&r.replaceChild(n.firstChild,n),i}}return o.EMPTY},xn=function(A,e,t){var n=A.ownerDocument;if(!n)throw new Error("Node has no owner document");var r=n.createRange();return r.setStart(A,e),r.setEnd(A,e+t),r},Mn=function(A){if(Dn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(A)).map((function(A){return A.segment}))}return function(A){for(var e,t=bn(A),n=[];!(e=t.next()).done;)e.value&&n.push(e.value.slice());return n}(A)},Pn=function(A,e){return 0!==e.letterSpacing?Mn(A):function(A,e){if(Dn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(t.segment(A)).map((function(A){return A.segment}))}return kn(A,e)}(A,e)},Kn=[32,160,4961,65792,65793,4153,4241],kn=function(A,e){for(var t,n=function(A,e){var t=s(A),n=nA(t,e),r=n[0],i=n[1],o=n[2],a=t.length,c=0,u=0;return{next:function(){if(u>=a)return{done:!0,value:null};for(var A="×";u0)if(Dn.SUPPORT_RANGE_BOUNDS){var r=xn(n,a,e.length).getClientRects();if(r.length>1){var s=Mn(e),c=0;s.forEach((function(e){i.push(new On(e,o.fromDOMRectList(A,xn(n,c+a,e.length).getClientRects()))),c+=e.length}))}else i.push(new On(e,o.fromDOMRectList(A,r)))}else{var u=n.splitText(e.length);i.push(new On(e,_n(A,n))),n=u}else Dn.SUPPORT_RANGE_BOUNDS||(n=n.splitText(e.length));a+=e.length})),i}(A,this.text,t,e)},Rn=function(A,e){switch(e){case 1:return A.toLowerCase();case 3:return A.replace(Vn,Gn);case 2:return A.toUpperCase();default:return A}},Vn=/(^|\s|:|-|\(|\))([a-z])/g,Gn=function(A,e,t){return A.length>0?e+t.toUpperCase():A},Jn=function(A){function t(e,t){var n=A.call(this,e,t)||this;return n.src=t.currentSrc||t.src,n.intrinsicWidth=t.naturalWidth,n.intrinsicHeight=t.naturalHeight,n.context.cache.addImage(n.src),n}return e(t,A),t}(ln),Wn=function(A){function t(e,t){var n=A.call(this,e,t)||this;return n.canvas=t,n.intrinsicWidth=t.width,n.intrinsicHeight=t.height,n}return e(t,A),t}(ln),Yn=function(A){function t(e,t){var n=A.call(this,e,t)||this,r=new XMLSerializer,i=a(e,t);return t.setAttribute("width",i.width+"px"),t.setAttribute("height",i.height+"px"),n.svg="data:image/svg+xml,"+encodeURIComponent(r.serializeToString(t)),n.intrinsicWidth=t.width.baseVal.value,n.intrinsicHeight=t.height.baseVal.value,n.context.cache.addImage(n.svg),n}return e(t,A),t}(ln),Xn=function(A){function t(e,t){var n=A.call(this,e,t)||this;return n.value=t.value,n}return e(t,A),t}(ln),Zn=function(A){function t(e,t){var n=A.call(this,e,t)||this;return n.start=t.start,n.reversed="boolean"==typeof t.reversed&&!0===t.reversed,n}return e(t,A),t}(ln),zn=[{type:15,flags:0,unit:"px",number:3}],qn=[{type:16,flags:0,number:50}],jn="password",$n=function(A){function t(e,t){var n,r,i,a=A.call(this,e,t)||this;switch(a.type=t.type.toLowerCase(),a.checked=t.checked,a.value=0===(r=(n=t).type===jn?new Array(n.value.length+1).join("•"):n.value).length?n.placeholder||"":r,"checkbox"!==a.type&&"radio"!==a.type||(a.styles.backgroundColor=3739148031,a.styles.borderTopColor=a.styles.borderRightColor=a.styles.borderBottomColor=a.styles.borderLeftColor=2779096575,a.styles.borderTopWidth=a.styles.borderRightWidth=a.styles.borderBottomWidth=a.styles.borderLeftWidth=1,a.styles.borderTopStyle=a.styles.borderRightStyle=a.styles.borderBottomStyle=a.styles.borderLeftStyle=1,a.styles.backgroundClip=[0],a.styles.backgroundOrigin=[0],a.bounds=(i=a.bounds).width>i.height?new o(i.left+(i.width-i.height)/2,i.top,i.height,i.height):i.width0)t.textNodes.push(new Nn(A,r,t.styles));else if(ur(r))if(Ur(r)&&r.assignedNodes)r.assignedNodes().forEach((function(e){return rr(A,e,t,n)}));else{var o=ir(A,r);o.styles.isVisible()&&(ar(r,o,n)?o.flags|=4:sr(o.styles)&&(o.flags|=2),-1!==nr.indexOf(r.tagName)&&(o.flags|=8),t.elements.push(o),r.slot,r.shadowRoot?rr(A,r.shadowRoot,o,n):Fr(r)||pr(r)||Qr(r)||rr(A,r,o,n))}},ir=function(A,e){return vr(e)?new Jn(A,e):mr(e)?new Wn(A,e):pr(e)?new Yn(A,e):dr(e)?new Xn(A,e):Br(e)?new Zn(A,e):hr(e)?new $n(A,e):Qr(e)?new Ar(A,e):Fr(e)?new er(A,e):wr(e)?new tr(A,e):new ln(A,e)},or=function(A,e){var t=ir(A,e);return t.flags|=4,rr(A,e,t,t),t},ar=function(A,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||fr(A)&&t.styles.isTransparent()},sr=function(A){return A.isPositioned()||A.isFloating()},cr=function(A){return A.nodeType===Node.TEXT_NODE},ur=function(A){return A.nodeType===Node.ELEMENT_NODE},lr=function(A){return ur(A)&&void 0!==A.style&&!gr(A)},gr=function(A){return"object"==typeof A.className},dr=function(A){return"LI"===A.tagName},Br=function(A){return"OL"===A.tagName},hr=function(A){return"INPUT"===A.tagName},pr=function(A){return"svg"===A.tagName},fr=function(A){return"BODY"===A.tagName},mr=function(A){return"CANVAS"===A.tagName},Cr=function(A){return"VIDEO"===A.tagName},vr=function(A){return"IMG"===A.tagName},wr=function(A){return"IFRAME"===A.tagName},yr=function(A){return"STYLE"===A.tagName},Fr=function(A){return"TEXTAREA"===A.tagName},Qr=function(A){return"SELECT"===A.tagName},Ur=function(A){return"SLOT"===A.tagName},Sr=function(A){return A.tagName.indexOf("-")>0},Er=function(){function A(){this.counters={}}return A.prototype.getCounterValue=function(A){var e=this.counters[A];return e&&e.length?e[e.length-1]:1},A.prototype.getCounterValues=function(A){var e=this.counters[A];return e||[]},A.prototype.pop=function(A){var e=this;A.forEach((function(A){return e.counters[A].pop()}))},A.prototype.parse=function(A){var e=this,t=A.counterIncrement,n=A.counterReset,r=!0;null!==t&&t.forEach((function(A){var t=e.counters[A.counter];t&&0!==A.increment&&(r=!1,t.length||t.push(1),t[Math.max(0,t.length-1)]+=A.increment)}));var i=[];return r&&n.forEach((function(A){var t=e.counters[A.counter];i.push(A.counter),t||(t=e.counters[A.counter]=[]),t.push(A.reset)})),i},A}(),Ir={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},br={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Tr={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},Hr={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Lr=function(A,e,t,n,r,i){return At?Mr(A,r,i.length>0):n.integers.reduce((function(e,t,r){for(;A>=t;)A-=t,e+=n.values[r];return e}),"")+i},Dr=function(A,e,t,n){var r="";do{t||A--,r=n(A)+r,A/=e}while(A*e>=e);return r},Or=function(A,e,t,n,r){var i=t-e+1;return(A<0?"-":"")+(Dr(Math.abs(A),i,n,(function(A){return c(Math.floor(A%i)+e)}))+r)},_r=function(A,e,t){void 0===t&&(t=". ");var n=e.length;return Dr(Math.abs(A),n,!1,(function(A){return e[Math.floor(A%n)]}))+t},xr=function(A,e,t,n,r,i){if(A<-9999||A>9999)return Mr(A,4,r.length>0);var o=Math.abs(A),a=r;if(0===o)return e[0]+a;for(var s=0;o>0&&s<=4;s++){var c=o%10;0===c&&Xt(i,1)&&""!==a?a=e[c]+a:c>1||1===c&&0===s||1===c&&1===s&&Xt(i,2)||1===c&&1===s&&Xt(i,4)&&A>100||1===c&&s>1&&Xt(i,8)?a=e[c]+(s>0?t[s-1]:"")+a:1===c&&s>0&&(a=t[s-1]+a),o=Math.floor(o/10)}return(A<0?n:"")+a},Mr=function(A,e,t){var n=t?". ":"",r=t?"、":"",i=t?", ":"",o=t?" ":"";switch(e){case 0:return"•"+o;case 1:return"◦"+o;case 2:return"◾"+o;case 5:var a=Or(A,48,57,!0,n);return a.length<4?"0"+a:a;case 4:return _r(A,"〇一二三四五六七八九",r);case 6:return Lr(A,1,3999,Ir,3,n).toLowerCase();case 7:return Lr(A,1,3999,Ir,3,n);case 8:return Or(A,945,969,!1,n);case 9:return Or(A,97,122,!1,n);case 10:return Or(A,65,90,!1,n);case 11:return Or(A,1632,1641,!0,n);case 12:case 49:return Lr(A,1,9999,br,3,n);case 35:return Lr(A,1,9999,br,3,n).toLowerCase();case 13:return Or(A,2534,2543,!0,n);case 14:case 30:return Or(A,6112,6121,!0,n);case 15:return _r(A,"子丑寅卯辰巳午未申酉戌亥",r);case 16:return _r(A,"甲乙丙丁戊己庚辛壬癸",r);case 17:case 48:return xr(A,"零一二三四五六七八九","十百千萬","負",r,14);case 47:return xr(A,"零壹貳參肆伍陸柒捌玖","拾佰仟萬","負",r,15);case 42:return xr(A,"零一二三四五六七八九","十百千萬","负",r,14);case 41:return xr(A,"零壹贰叁肆伍陆柒捌玖","拾佰仟萬","负",r,15);case 26:return xr(A,"〇一二三四五六七八九","十百千万","マイナス",r,0);case 25:return xr(A,"零壱弐参四伍六七八九","拾百千万","マイナス",r,7);case 31:return xr(A,"영일이삼사오육칠팔구","십백천만","마이너스",i,7);case 33:return xr(A,"零一二三四五六七八九","十百千萬","마이너스",i,0);case 32:return xr(A,"零壹貳參四五六七八九","拾百千","마이너스",i,7);case 18:return Or(A,2406,2415,!0,n);case 20:return Lr(A,1,19999,Hr,3,n);case 21:return Or(A,2790,2799,!0,n);case 22:return Or(A,2662,2671,!0,n);case 22:return Lr(A,1,10999,Tr,3,n);case 23:return _r(A,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return _r(A,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return Or(A,3302,3311,!0,n);case 28:return _r(A,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",r);case 29:return _r(A,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",r);case 34:return Or(A,3792,3801,!0,n);case 37:return Or(A,6160,6169,!0,n);case 38:return Or(A,4160,4169,!0,n);case 39:return Or(A,2918,2927,!0,n);case 40:return Or(A,1776,1785,!0,n);case 43:return Or(A,3046,3055,!0,n);case 44:return Or(A,3174,3183,!0,n);case 45:return Or(A,3664,3673,!0,n);case 46:return Or(A,3872,3881,!0,n);case 3:default:return Or(A,48,57,!0,n)}},Pr=function(A){if(!A)return"";var e="";return A.split("").forEach((function(A){"&"==A?A="&":"'"==A?A="'":'"'==A?A=""":"<"==A?A="<":">"==A&&(A=">"),e+=A})),e},Kr=function(A){return A?"":""};window.trustedTypes&&(vn=window.trustedTypes.createPolicy("html2canvas",{createHTML:function(A,e){return Kr(e)}}));var kr,Nr=function(){function A(A,e,t){if(this.context=A,this.options=t,this.scrolledElements=[],this.referenceElement=e,this.counters=new Er,this.quoteDepth=0,!e.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(e.ownerDocument.documentElement,!1)}return A.prototype.toIFrame=function(A,e){var t=this,i=Vr(A,e);if(!i.contentWindow)return Promise.reject("Unable to find iframe window");var o,a=A.defaultView.pageXOffset,s=A.defaultView.pageYOffset,c=i.contentWindow,u=c.document,l=Wr(i).then((function(){return n(t,void 0,void 0,(function(){var A,t;return r(this,(function(n){switch(n.label){case 0:return this.scrolledElements.forEach(zr),c&&(c.scrollTo(e.left,e.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||c.scrollY===e.top&&c.scrollX===e.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(c.scrollX-e.left,c.scrollY-e.top,0,0))),A=this.options.onclone,void 0===(t=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:u.fonts&&u.fonts.ready?[4,u.fonts.ready]:[3,2];case 1:n.sent(),n.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Jr(u)]:[3,4];case 3:n.sent(),n.label=4;case 4:return"function"==typeof A?[2,Promise.resolve().then((function(){return A(u,t)})).then((function(){return i}))]:[2,i]}}))}))}));return u.open(),u.write((o=document.doctype,void 0!==vn?vn.createHTML("",o):Kr(o))),Zr(this.referenceElement.ownerDocument,a,s),u.replaceChild(u.adoptNode(this.documentElement),u.documentElement),u.close(),l},A.prototype.createElementClone=function(A){if(un(A,2),mr(A))return this.createCanvasClone(A);if(Cr(A))return this.createVideoClone(A);if(yr(A))return this.createStyleClone(A);var e=A.cloneNode(!1);return vr(e)&&(vr(A)&&A.currentSrc&&A.currentSrc!==A.src&&(e.src=A.currentSrc,e.srcset=""),"lazy"===e.loading&&(e.loading="eager")),Sr(e)?this.createCustomElementClone(e):e},A.prototype.createCustomElementClone=function(A){var e=document.createElement("html2canvascustomelement");return Xr(A.style,e),e},A.prototype.createStyleClone=function(A){try{var e=A.sheet;if(e&&e.cssRules){var t=[].slice.call(e.cssRules,0).reduce((function(A,e){return e&&"string"==typeof e.cssText?A+e.cssText:A}),""),n=A.cloneNode(!1);return n.textContent=t,n}}catch(A){if(this.context.logger.error("Unable to access cssRules property",A),"SecurityError"!==A.name)throw A}return A.cloneNode(!1)},A.prototype.createCanvasClone=function(A){var e;if(this.options.inlineImages&&A.ownerDocument){var t=A.ownerDocument.createElement("img");try{return t.src=A.toDataURL(),t}catch(e){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",A)}}var n=A.cloneNode(!1);try{n.width=A.width,n.height=A.height;var r=A.getContext("2d"),i=n.getContext("2d");if(i)if(!this.options.allowTaint&&r)i.putImageData(r.getImageData(0,0,A.width,A.height),0,0);else{var o=null!==(e=A.getContext("webgl2"))&&void 0!==e?e:A.getContext("webgl");if(o){var a=o.getContextAttributes();!1===(null==a?void 0:a.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",A)}i.drawImage(A,0,0)}return n}catch(e){this.context.logger.info("Unable to clone canvas as it is tainted",A)}return n},A.prototype.createVideoClone=function(A){var e=A.ownerDocument.createElement("canvas");e.width=A.offsetWidth,e.height=A.offsetHeight;var t=e.getContext("2d");try{return t&&(t.drawImage(A,0,0,e.width,e.height),this.options.allowTaint||t.getImageData(0,0,e.width,e.height)),e}catch(e){this.context.logger.info("Unable to clone video as it is tainted",A)}var n=A.ownerDocument.createElement("canvas");return n.width=A.offsetWidth,n.height=A.offsetHeight,n},A.prototype.appendChildNode=function(A,e,t){ur(e)&&("SCRIPT"===e.tagName||e.hasAttribute("data-html2canvas-ignore")||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(e))||this.options.copyStyles&&ur(e)&&yr(e)||A.appendChild(this.cloneNode(e,t))},A.prototype.cloneChildNodes=function(A,e,t){for(var n=this,r=A.shadowRoot?A.shadowRoot.firstChild:A.firstChild;r;r=r.nextSibling)if(ur(r)&&Ur(r)&&"function"==typeof r.assignedNodes){var i=r.assignedNodes();i.length&&i.forEach((function(A){return n.appendChildNode(e,A,t)}))}else this.appendChildNode(e,r,t)},A.prototype.cloneNode=function(A,e){if(cr(A))return document.createTextNode(A.data);if(!A.ownerDocument)return A.cloneNode(!1);var t=A.ownerDocument.defaultView;if(t&&ur(A)&&(lr(A)||gr(A))){var n=this.createElementClone(A);n.style.transitionProperty="none";var r=t.getComputedStyle(A),i=t.getComputedStyle(A,":before"),o=t.getComputedStyle(A,":after");this.referenceElement===A&&lr(n)&&(this.clonedReferenceElement=n),fr(n)&&$r(n);var a=this.counters.parse(new sn(this.context,r)),s=this.resolvePseudoContent(A,n,i,kr.BEFORE);Sr(A)&&(e=!0),Cr(A)||this.cloneChildNodes(A,n,e),s&&n.insertBefore(s,n.firstChild);var c=this.resolvePseudoContent(A,n,o,kr.AFTER);return c&&n.appendChild(c),this.counters.pop(a),(r&&(this.options.copyStyles||gr(A))&&!wr(A)||e)&&Xr(r,n),0===A.scrollTop&&0===A.scrollLeft||this.scrolledElements.push([n,A.scrollLeft,A.scrollTop]),(Fr(A)||Qr(A))&&(Fr(n)||Qr(n))&&(n.value=A.value),n}return A.cloneNode(!1)},A.prototype.resolvePseudoContent=function(A,e,t,n){var r=this;if(t){var i=t.content,o=e.ownerDocument;if(o&&i&&"none"!==i&&"-moz-alt-content"!==i&&"none"!==t.display){this.counters.parse(new sn(this.context,t));var a=new an(this.context,t),s=o.createElement("html2canvaspseudoelement");Xr(t,s),a.content.forEach((function(e){if(0===e.type)s.appendChild(o.createTextNode(e.value));else if(22===e.type){var t=o.createElement("img");t.src=e.value,t.style.opacity="1",s.appendChild(t)}else if(18===e.type){if("attr"===e.name){var n=e.values.filter(kA);n.length&&s.appendChild(o.createTextNode(A.getAttribute(n[0].value)||""))}else if("counter"===e.name){var i=e.values.filter(GA),c=i[0],u=i[1];if(c&&kA(c)){var l=r.counters.getCounterValue(c.value),g=u&&kA(u)?Bt.parse(r.context,u.value):3;s.appendChild(o.createTextNode(Mr(l,g,!1)))}}else if("counters"===e.name){var d=e.values.filter(GA),B=(c=d[0],d[1]);if(u=d[2],c&&kA(c)){var h=r.counters.getCounterValues(c.value),p=u&&kA(u)?Bt.parse(r.context,u.value):3,f=B&&0===B.type?B.value:"",m=h.map((function(A){return Mr(A,p,!1)})).join(f);s.appendChild(o.createTextNode(m))}}}else if(20===e.type)switch(e.value){case"open-quote":s.appendChild(o.createTextNode(An(a.quotes,r.quoteDepth++,!0)));break;case"close-quote":s.appendChild(o.createTextNode(An(a.quotes,--r.quoteDepth,!1)));break;default:s.appendChild(o.createTextNode(e.value))}})),s.className=qr+" "+jr;var c=n===kr.BEFORE?" "+qr:" "+jr;return gr(e)?e.className.baseValue+=c:e.className+=c,s}}},A.destroy=function(A){return!!A.parentNode&&(A.parentNode.removeChild(A),!0)},A}();!function(A){A[A.BEFORE=0]="BEFORE",A[A.AFTER=1]="AFTER"}(kr||(kr={}));var Rr,Vr=function(A,e){var t=A.createElement("iframe");return t.className="html2canvas-container",t.style.visibility="hidden",t.style.position="fixed",t.style.left="-10000px",t.style.top="0px",t.style.border="0",t.width=e.width.toString(),t.height=e.height.toString(),t.scrolling="no",t.setAttribute("data-html2canvas-ignore","true"),A.body.appendChild(t),t},Gr=function(A){return new Promise((function(e){A.complete?e():A.src?(A.onload=e,A.onerror=e):e()}))},Jr=function(A){return Promise.all([].slice.call(A.images,0).map(Gr))},Wr=function(A){return new Promise((function(e,t){var n=A.contentWindow;if(!n)return t("No window assigned for iframe");var r=n.document;n.onload=A.onload=function(){n.onload=A.onload=null;var t=setInterval((function(){r.body.childNodes.length>0&&"complete"===r.readyState&&(clearInterval(t),e(A))}),50)}}))},Yr=["all","d","content"],Xr=function(A,e){for(var t=A.length-1;t>=0;t--){var n=A.item(t);-1===Yr.indexOf(n)&&e.style.setProperty(n,A.getPropertyValue(n))}return e},Zr=function(A,e,t){A&&A.defaultView&&(e!==A.defaultView.pageXOffset||t!==A.defaultView.pageYOffset)&&A.defaultView.scrollTo(e,t)},zr=function(A){var e=A[0],t=A[1],n=A[2];e.scrollLeft=t,e.scrollTop=n},qr="___html2canvas___pseudoelement_before",jr="___html2canvas___pseudoelement_after",$r=function(A){Ai(A,"."+qr+':before{\n content: "" !important;\n display: none !important;\n}\n .'+jr+':after{\n content: "" !important;\n display: none !important;\n}')},Ai=function(A,e){var t=A.ownerDocument;if(t){var n=t.createElement("style");n.textContent=e,A.appendChild(n)}},ei=function(){function A(){}return A.getOrigin=function(e){var t=A._link;return t?(t.href=e,t.href=t.href,t.protocol+t.hostname+t.port):"about:blank"},A.isSameOrigin=function(e){return A.getOrigin(e)===A._origin},A.setContext=function(e){A._link=e.document.createElement("a"),A._origin=A.getOrigin(e.location.href)},A._origin="about:blank",A}(),ti=function(){function A(A,e){this.context=A,this._options=e,this._cache={}}return A.prototype.addImage=function(A){var e=Promise.resolve();return this.has(A)?e:ci(A)||oi(A)?((this._cache[A]=this.loadImage(A)).catch((function(){})),e):e},A.prototype.match=function(A){return this._cache[A]},A.prototype.loadImage=function(A){return n(this,void 0,void 0,(function(){var e,t,n,i,o=this;return r(this,(function(r){switch(r.label){case 0:return e=ei.isSameOrigin(A),t=!ai(A)&&!0===this._options.useCORS&&Dn.SUPPORT_CORS_IMAGES&&!e,n=!ai(A)&&!e&&!ci(A)&&"string"==typeof this._options.proxy&&Dn.SUPPORT_CORS_XHR&&!t,e||!1!==this._options.allowTaint||ai(A)||ci(A)||n||t?(i=A,n?[4,this.proxy(i)]:[3,2]):[2];case 1:i=r.sent(),r.label=2;case 2:return this.context.logger.debug("Added image "+A.substring(0,256)),[4,new Promise((function(A,e){var n=new Image;n.onload=function(){return A(n)},n.onerror=e,(si(i)||t)&&(n.crossOrigin="anonymous"),n.src=i,!0===n.complete&&setTimeout((function(){return A(n)}),500),o._options.imageTimeout>0&&setTimeout((function(){return e("Timed out ("+o._options.imageTimeout+"ms) loading image")}),o._options.imageTimeout)}))];case 3:return[2,r.sent()]}}))}))},A.prototype.has=function(A){return void 0!==this._cache[A]},A.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},A.prototype.proxy=function(A){var e=this,t=this._options.proxy;if(!t)throw new Error("No proxy defined");var n=A.substring(0,256);return new Promise((function(r,i){var o=Dn.SUPPORT_RESPONSE_TYPE?"blob":"text",a=new XMLHttpRequest;a.onload=function(){if(200===a.status)if("text"===o)r(a.response);else{var A=new FileReader;A.addEventListener("load",(function(){return r(A.result)}),!1),A.addEventListener("error",(function(A){return i(A)}),!1),A.readAsDataURL(a.response)}else i("Failed to proxy resource "+n+" with status code "+a.status)},a.onerror=i;var s=t.indexOf("?")>-1?"&":"?";if(a.open("GET",""+t+s+"url="+encodeURIComponent(A)+"&responseType="+o),"text"!==o&&a instanceof XMLHttpRequest&&(a.responseType=o),e._options.imageTimeout){var c=e._options.imageTimeout;a.timeout=c,a.ontimeout=function(){return i("Timed out ("+c+"ms) proxying "+n)}}a.send()}))},A}(),ni=/^data:image\/svg\+xml/i,ri=/^data:image\/.*;base64,/i,ii=/^data:image\/.*/i,oi=function(A){return Dn.SUPPORT_SVG_DRAWING||!ui(A)},ai=function(A){return ii.test(A)},si=function(A){return ri.test(A)},ci=function(A){return"blob"===A.substr(0,4)},ui=function(A){return"svg"===A.substr(-3).toLowerCase()||ni.test(A)},li=function(){function A(A,e){this.type=0,this.x=A,this.y=e}return A.prototype.add=function(e,t){return new A(this.x+e,this.y+t)},A}(),gi=function(A,e,t){return new li(A.x+(e.x-A.x)*t,A.y+(e.y-A.y)*t)},di=function(){function A(A,e,t,n){this.type=1,this.start=A,this.startControl=e,this.endControl=t,this.end=n}return A.prototype.subdivide=function(e,t){var n=gi(this.start,this.startControl,e),r=gi(this.startControl,this.endControl,e),i=gi(this.endControl,this.end,e),o=gi(n,r,e),a=gi(r,i,e),s=gi(o,a,e);return t?new A(this.start,n,o,s):new A(s,a,i,this.end)},A.prototype.add=function(e,t){return new A(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},A.prototype.reverse=function(){return new A(this.end,this.endControl,this.startControl,this.start)},A}(),Bi=function(A){return 1===A.type},hi=function(A){var e=A.styles,t=A.bounds,n=$A(e.borderTopLeftRadius,t.width,t.height),r=n[0],i=n[1],o=$A(e.borderTopRightRadius,t.width,t.height),a=o[0],s=o[1],c=$A(e.borderBottomRightRadius,t.width,t.height),u=c[0],l=c[1],g=$A(e.borderBottomLeftRadius,t.width,t.height),d=g[0],B=g[1],h=[];h.push((r+a)/t.width),h.push((d+u)/t.width),h.push((i+B)/t.height),h.push((s+l)/t.height);var p=Math.max.apply(Math,h);p>1&&(r/=p,i/=p,a/=p,s/=p,u/=p,l/=p,d/=p,B/=p);var f=t.width-a,m=t.height-l,C=t.width-u,v=t.height-B,w=e.borderTopWidth,y=e.borderRightWidth,F=e.borderBottomWidth,Q=e.borderLeftWidth,U=Ae(e.paddingTop,A.bounds.width),S=Ae(e.paddingRight,A.bounds.width),E=Ae(e.paddingBottom,A.bounds.width),I=Ae(e.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=r>0||i>0?pi(t.left+Q/3,t.top+w/3,r-Q/3,i-w/3,Rr.TOP_LEFT):new li(t.left+Q/3,t.top+w/3),this.topRightBorderDoubleOuterBox=r>0||i>0?pi(t.left+f,t.top+w/3,a-y/3,s-w/3,Rr.TOP_RIGHT):new li(t.left+t.width-y/3,t.top+w/3),this.bottomRightBorderDoubleOuterBox=u>0||l>0?pi(t.left+C,t.top+m,u-y/3,l-F/3,Rr.BOTTOM_RIGHT):new li(t.left+t.width-y/3,t.top+t.height-F/3),this.bottomLeftBorderDoubleOuterBox=d>0||B>0?pi(t.left+Q/3,t.top+v,d-Q/3,B-F/3,Rr.BOTTOM_LEFT):new li(t.left+Q/3,t.top+t.height-F/3),this.topLeftBorderDoubleInnerBox=r>0||i>0?pi(t.left+2*Q/3,t.top+2*w/3,r-2*Q/3,i-2*w/3,Rr.TOP_LEFT):new li(t.left+2*Q/3,t.top+2*w/3),this.topRightBorderDoubleInnerBox=r>0||i>0?pi(t.left+f,t.top+2*w/3,a-2*y/3,s-2*w/3,Rr.TOP_RIGHT):new li(t.left+t.width-2*y/3,t.top+2*w/3),this.bottomRightBorderDoubleInnerBox=u>0||l>0?pi(t.left+C,t.top+m,u-2*y/3,l-2*F/3,Rr.BOTTOM_RIGHT):new li(t.left+t.width-2*y/3,t.top+t.height-2*F/3),this.bottomLeftBorderDoubleInnerBox=d>0||B>0?pi(t.left+2*Q/3,t.top+v,d-2*Q/3,B-2*F/3,Rr.BOTTOM_LEFT):new li(t.left+2*Q/3,t.top+t.height-2*F/3),this.topLeftBorderStroke=r>0||i>0?pi(t.left+Q/2,t.top+w/2,r-Q/2,i-w/2,Rr.TOP_LEFT):new li(t.left+Q/2,t.top+w/2),this.topRightBorderStroke=r>0||i>0?pi(t.left+f,t.top+w/2,a-y/2,s-w/2,Rr.TOP_RIGHT):new li(t.left+t.width-y/2,t.top+w/2),this.bottomRightBorderStroke=u>0||l>0?pi(t.left+C,t.top+m,u-y/2,l-F/2,Rr.BOTTOM_RIGHT):new li(t.left+t.width-y/2,t.top+t.height-F/2),this.bottomLeftBorderStroke=d>0||B>0?pi(t.left+Q/2,t.top+v,d-Q/2,B-F/2,Rr.BOTTOM_LEFT):new li(t.left+Q/2,t.top+t.height-F/2),this.topLeftBorderBox=r>0||i>0?pi(t.left,t.top,r,i,Rr.TOP_LEFT):new li(t.left,t.top),this.topRightBorderBox=a>0||s>0?pi(t.left+f,t.top,a,s,Rr.TOP_RIGHT):new li(t.left+t.width,t.top),this.bottomRightBorderBox=u>0||l>0?pi(t.left+C,t.top+m,u,l,Rr.BOTTOM_RIGHT):new li(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=d>0||B>0?pi(t.left,t.top+v,d,B,Rr.BOTTOM_LEFT):new li(t.left,t.top+t.height),this.topLeftPaddingBox=r>0||i>0?pi(t.left+Q,t.top+w,Math.max(0,r-Q),Math.max(0,i-w),Rr.TOP_LEFT):new li(t.left+Q,t.top+w),this.topRightPaddingBox=a>0||s>0?pi(t.left+Math.min(f,t.width-y),t.top+w,f>t.width+y?0:Math.max(0,a-y),Math.max(0,s-w),Rr.TOP_RIGHT):new li(t.left+t.width-y,t.top+w),this.bottomRightPaddingBox=u>0||l>0?pi(t.left+Math.min(C,t.width-Q),t.top+Math.min(m,t.height-F),Math.max(0,u-y),Math.max(0,l-F),Rr.BOTTOM_RIGHT):new li(t.left+t.width-y,t.top+t.height-F),this.bottomLeftPaddingBox=d>0||B>0?pi(t.left+Q,t.top+Math.min(v,t.height-F),Math.max(0,d-Q),Math.max(0,B-F),Rr.BOTTOM_LEFT):new li(t.left+Q,t.top+t.height-F),this.topLeftContentBox=r>0||i>0?pi(t.left+Q+I,t.top+w+U,Math.max(0,r-(Q+I)),Math.max(0,i-(w+U)),Rr.TOP_LEFT):new li(t.left+Q+I,t.top+w+U),this.topRightContentBox=a>0||s>0?pi(t.left+Math.min(f,t.width+Q+I),t.top+w+U,f>t.width+Q+I?0:a-Q+I,s-(w+U),Rr.TOP_RIGHT):new li(t.left+t.width-(y+S),t.top+w+U),this.bottomRightContentBox=u>0||l>0?pi(t.left+Math.min(C,t.width-(Q+I)),t.top+Math.min(m,t.height+w+U),Math.max(0,u-(y+S)),l-(F+E),Rr.BOTTOM_RIGHT):new li(t.left+t.width-(y+S),t.top+t.height-(F+E)),this.bottomLeftContentBox=d>0||B>0?pi(t.left+Q+I,t.top+v,Math.max(0,d-(Q+I)),B-(F+E),Rr.BOTTOM_LEFT):new li(t.left+Q+I,t.top+t.height-(F+E))};!function(A){A[A.TOP_LEFT=0]="TOP_LEFT",A[A.TOP_RIGHT=1]="TOP_RIGHT",A[A.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",A[A.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(Rr||(Rr={}));var pi=function(A,e,t,n,r){var i=(Math.sqrt(2)-1)/3*4,o=t*i,a=n*i,s=A+t,c=e+n;switch(r){case Rr.TOP_LEFT:return new di(new li(A,c),new li(A,c-a),new li(s-o,e),new li(s,e));case Rr.TOP_RIGHT:return new di(new li(A,e),new li(A+o,e),new li(s,c-a),new li(s,c));case Rr.BOTTOM_RIGHT:return new di(new li(s,e),new li(s,e+a),new li(A+o,c),new li(A,c));case Rr.BOTTOM_LEFT:default:return new di(new li(s,c),new li(s-o,c),new li(A,e+a),new li(A,e))}},fi=function(A){return[A.topLeftBorderBox,A.topRightBorderBox,A.bottomRightBorderBox,A.bottomLeftBorderBox]},mi=function(A){return[A.topLeftPaddingBox,A.topRightPaddingBox,A.bottomRightPaddingBox,A.bottomLeftPaddingBox]},Ci=function(A,e,t){this.offsetX=A,this.offsetY=e,this.matrix=t,this.type=0,this.target=6},vi=function(A,e){this.path=A,this.target=e,this.type=1},wi=function(A){this.opacity=A,this.type=2,this.target=6},yi=function(A){return 1===A.type},Fi=function(A,e){return A.length===e.length&&A.some((function(A,t){return A===e[t]}))},Qi=function(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},Ui=function(){function A(A,e){if(this.container=A,this.parent=e,this.effects=[],this.curves=new hi(this.container),this.container.styles.opacity<1&&this.effects.push(new wi(this.container.styles.opacity)),null!==this.container.styles.transform){var t=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,r=this.container.styles.transform;this.effects.push(new Ci(t,n,r))}if(0!==this.container.styles.overflowX){var i=fi(this.curves),o=mi(this.curves);Fi(i,o)?this.effects.push(new vi(i,6)):(this.effects.push(new vi(i,2)),this.effects.push(new vi(o,4)))}}return A.prototype.getEffects=function(A){for(var e=-1===[2,3].indexOf(this.container.styles.position),t=this.parent,n=this.effects.slice(0);t;){var r=t.effects.filter((function(A){return!yi(A)}));if(e||0!==t.container.styles.position||!t.parent){if(n.unshift.apply(n,r),e=-1===[2,3].indexOf(t.container.styles.position),0!==t.container.styles.overflowX){var i=fi(t.curves),o=mi(t.curves);Fi(i,o)||n.unshift(new vi(o,6))}}else n.unshift.apply(n,r);t=t.parent}return n.filter((function(e){return Xt(e.target,A)}))},A}(),Si=function(A,e,t,n){A.container.elements.forEach((function(r){var i=Xt(r.flags,4),o=Xt(r.flags,2),a=new Ui(r,A);Xt(r.styles.display,2048)&&n.push(a);var s=Xt(r.flags,8)?[]:n;if(i||o){var c=i||r.styles.isPositioned()?t:e,u=new Qi(a);if(r.styles.isPositioned()||r.styles.opacity<1||r.styles.isTransformed()){var l=r.styles.zIndex.order;if(l<0){var g=0;c.negativeZIndex.some((function(A,e){return l>A.element.container.styles.zIndex.order?(g=e,!1):g>0})),c.negativeZIndex.splice(g,0,u)}else if(l>0){var d=0;c.positiveZIndex.some((function(A,e){return l>=A.element.container.styles.zIndex.order?(d=e+1,!1):d>0})),c.positiveZIndex.splice(d,0,u)}else c.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else r.styles.isFloating()?c.nonPositionedFloats.push(u):c.nonPositionedInlineLevel.push(u);Si(a,u,i?u:t,s)}else r.styles.isInlineLevel()?e.inlineLevel.push(a):e.nonInlineLevel.push(a),Si(a,e,t,s);Xt(r.flags,8)&&Ei(r,s)}))},Ei=function(A,e){for(var t=A instanceof Zn?A.start:1,n=A instanceof Zn&&A.reversed,r=0;r0&&A.intrinsicHeight>0){var n=Li(A),r=mi(e);this.path(r),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(t,0,0,A.intrinsicWidth,A.intrinsicHeight,n.left,n.top,n.width,n.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(A){return n(this,void 0,void 0,(function(){var e,n,i,a,s,c,u,l,g,d,B,h,p,f,m,C,v,w;return r(this,(function(r){switch(r.label){case 0:this.applyEffects(A.getEffects(4)),e=A.container,n=A.curves,i=e.styles,a=0,s=e.textNodes,r.label=1;case 1:return a0&&Q>0&&(m=n.ctx.createPattern(h,"repeat"),n.renderRepeat(v,m,S,E))):function(A){return 2===A.type}(t)&&(C=Di(A,e,[null,null,null]),v=C[0],w=C[1],y=C[2],F=C[3],Q=C[4],U=0===t.position.length?[qA]:t.position,S=Ae(U[0],F),E=Ae(U[U.length-1],Q),I=function(A,e,t,n,r){var i=0,o=0;switch(A.size){case 0:0===A.shape?i=o=Math.min(Math.abs(e),Math.abs(e-n),Math.abs(t),Math.abs(t-r)):1===A.shape&&(i=Math.min(Math.abs(e),Math.abs(e-n)),o=Math.min(Math.abs(t),Math.abs(t-r)));break;case 2:if(0===A.shape)i=o=Math.min(ye(e,t),ye(e,t-r),ye(e-n,t),ye(e-n,t-r));else if(1===A.shape){var a=Math.min(Math.abs(t),Math.abs(t-r))/Math.min(Math.abs(e),Math.abs(e-n)),s=Fe(n,r,e,t,!0),c=s[0],u=s[1];o=a*(i=ye(c-e,(u-t)/a))}break;case 1:0===A.shape?i=o=Math.max(Math.abs(e),Math.abs(e-n),Math.abs(t),Math.abs(t-r)):1===A.shape&&(i=Math.max(Math.abs(e),Math.abs(e-n)),o=Math.max(Math.abs(t),Math.abs(t-r)));break;case 3:if(0===A.shape)i=o=Math.max(ye(e,t),ye(e,t-r),ye(e-n,t),ye(e-n,t-r));else if(1===A.shape){a=Math.max(Math.abs(t),Math.abs(t-r))/Math.max(Math.abs(e),Math.abs(e-n));var l=Fe(n,r,e,t,!1);c=l[0],u=l[1],o=a*(i=ye(c-e,(u-t)/a))}}return Array.isArray(A.size)&&(i=Ae(A.size[0],n),o=2===A.size.length?Ae(A.size[1],r):i),[i,o]}(t,S,E,F,Q),b=I[0],T=I[1],b>0&&T>0&&(H=n.ctx.createRadialGradient(w+S,y+E,0,w+S,y+E,b),ve(t.stops,2*b).forEach((function(A){return H.addColorStop(A.stop,ae(A.color))})),n.path(v),n.ctx.fillStyle=H,b!==T?(L=A.bounds.left+.5*A.bounds.width,D=A.bounds.top+.5*A.bounds.height,_=1/(O=T/b),n.ctx.save(),n.ctx.translate(L,D),n.ctx.transform(1,0,0,O,0,0),n.ctx.translate(-L,-D),n.ctx.fillRect(w,_*(y-D)+D,F,Q*_),n.ctx.restore()):n.ctx.fill())),r.label=6;case 6:return e--,[2]}}))},n=this,i=0,o=A.styles.backgroundImage.slice(0).reverse(),s.label=1;case 1:return i0?2!==c.style?[3,5]:[4,this.renderDashedDottedBorder(c.color,c.width,o,A.curves,2)]:[3,11]:[3,13];case 4:return r.sent(),[3,11];case 5:return 3!==c.style?[3,7]:[4,this.renderDashedDottedBorder(c.color,c.width,o,A.curves,3)];case 6:return r.sent(),[3,11];case 7:return 4!==c.style?[3,9]:[4,this.renderDoubleBorder(c.color,c.width,o,A.curves)];case 8:return r.sent(),[3,11];case 9:return[4,this.renderSolidBorder(c.color,o,A.curves)];case 10:r.sent(),r.label=11;case 11:o++,r.label=12;case 12:return a++,[3,3];case 13:return[2]}}))}))},t.prototype.renderDashedDottedBorder=function(A,e,t,i,o){return n(this,void 0,void 0,(function(){var n,a,s,c,u,l,g,d,B,h,p,f,m,C,v,w;return r(this,(function(r){return this.ctx.save(),n=function(A,e){switch(e){case 0:return bi(A.topLeftBorderStroke,A.topRightBorderStroke);case 1:return bi(A.topRightBorderStroke,A.bottomRightBorderStroke);case 2:return bi(A.bottomRightBorderStroke,A.bottomLeftBorderStroke);case 3:default:return bi(A.bottomLeftBorderStroke,A.topLeftBorderStroke)}}(i,t),a=Ii(i,t),2===o&&(this.path(a),this.ctx.clip()),Bi(a[0])?(s=a[0].start.x,c=a[0].start.y):(s=a[0].x,c=a[0].y),Bi(a[1])?(u=a[1].end.x,l=a[1].end.y):(u=a[1].x,l=a[1].y),g=0===t||2===t?Math.abs(s-u):Math.abs(c-l),this.ctx.beginPath(),3===o?this.formatPath(n):this.formatPath(a.slice(0,2)),d=e<3?3*e:2*e,B=e<3?2*e:e,3===o&&(d=e,B=e),h=!0,g<=2*d?h=!1:g<=2*d+B?(d*=p=g/(2*d+B),B*=p):(f=Math.floor((g+B)/(d+B)),m=(g-f*d)/(f-1),B=(C=(g-(f+1)*d)/f)<=0||Math.abs(B-m)=A.getTime()},A.hasTimeIntervalDurationElapsed=function(A,e,t){if(B(A)||!(A instanceof o.CampaignDurationTimeInterval))return!1;if(!e||!t)return!1;var n=i.addSecondsWithoutOverflow(e,A.intervalSeconds);return t.getTime()>=n.getTime()},A.hasBuildChangeDurationElapsed=function(A,e,t){return!B(A)&&A instanceof o.CampaignDurationSingleBuildChange&&(B(e)||B(t)?null===e!=(null===t):!(e===t))},A.isCampaignInScope=function(e,t,n,r){return!!e&&(t=t||new Date,!!A.isDateInRangeWithDefinition(t,e)&&!(e.scope&&((e.scope instanceof o.CampaignScopeUserFactAny||e.scope instanceof o.CampaignScopeUserFactAll)&&e.scope.setUserFactsProvider(r),e.scope instanceof o.CampaignScopeEnvironmentCrossProduct&&e.scope.setEnvironmentProvider(n),!e.scope.isInScope())))},A.isDateInRangeWithDefinition=function(e,t){return!!t&&(e=e||new Date,A.isDateInRange(e,t.startTime?t.startTime:l(),t.endTime))},A.prototype.getActiveSurveys=function(){var A={},e=this.getPrioritizedCampaigns();for(var t in this.campaignStates)if(this.campaignStates.hasOwnProperty(t)){var n=this.campaignStates[t];if(!n.IsCandidate)continue;var r=e[n.CampaignId];if(!r)continue;var i=s.CampaignSurveyFactory.makeSurvey(n,r,this.stringProvider);if(!i)continue;A[i.getSurveyInfo().getId()]=i}return A},A.prototype.onCampaignSurveyActivated=function(A,e,t){var n=this.campaignStates[A];if(n){e=e||new Date;var r=this.campaignDefinitions[A].nominationScheme.cooldownPeriod.asTimeIntervalSeconds();n.markCurrentSurveyTakenOnDate(e,r,t),this.saveCurrentState()}},A.prototype.getCampaignStates=function(){return this.campaignStates},A.prototype.getCampaignDefinitions=function(){return this.campaignDefinitions},A.prototype.getUserFacts=function(){return this.userFacts},A.prototype.onSurveyActivated=function(A,e){A&&this.onCampaignSurveyActivated(A.getBackEndId(),new Date,e)},A.prototype.refreshSurveyDefinitions=function(A,e){this.refreshSurveyDefinitionsPrivate(A,e||new Date)},A.prototype.refreshSurveyDefinitionsAsync=function(A,e){var t=this;return new Promise((function(n,r){t.refreshSurveyDefinitionsPrivateAsync(A,e||new Date).then((function(){n()})).catch((function(A){r(A)}))}))},A.prototype.getAppSurveys=function(){return this.getActiveSurveys()},A.prototype.saveCurrentState=function(){var A=i.makeArrayFromObjectValuesSortedByKeyString(this.campaignStates);this.stateProvider.save(A)},A.prototype.refreshSurveyDefinitionsPrivate=function(A,e){this.needRefreshSurveyDefinitions()?(this.lastCampaignRefreshTime=new Date,this.campaignDefinitions={},this.userFacts=[],this.loadFilterCampaigns(e,A)):this.FilterCampaignsOnRestart(e,A),this.campaignStates={},this.LoadFilterCampaignStates(e),this.evaluateCampaigns(e)},A.prototype.refreshSurveyDefinitionsPrivateAsync=function(A,e){var t;this.campaignStates={},this.campaignDefinitions={},this.userFacts=[],this.lastCampaignRefreshTime=null!==(t=this.lastCampaignRefreshTime)&&void 0!==t?t:new Date;var n=this;return new Promise((function(t,r){n.loadAndFilterCampaignDataAsync(e,A).then((function(){n.evaluateCampaigns(e),t()})).catch((function(A){r(A)}))}))},A.prototype.loadAndFilterCampaignDataAsync=function(A,e){A=A||new Date;for(var t=[],r=[],i=this.userFactsProvider&&this.userFactsProvider.loadAsync(),o=0,a=Object.keys(this.definitionProviders);o0?r.tags:[""]).forEach((function(A){var e=A+"_"+r.governedChannelType;t[e]=t[e]||[],t[e].push(r)}))))})),Object.keys(t).forEach((function(n){var o;if(A.isPriorityEnabled||!n.endsWith("_"+r.GovernedChannelType.Standard)){var a=t[n];if(!(a.length<=1)){var s=i.findHighestPriorityDefinition(a),c=s[0],u=s[1],l=null!==(o=c.primaryPriority)&&void 0!==o?o:0;u&&a.forEach((function(A){var t=A.primaryPriority;!B(A.primaryPriority)&&t>l&&delete e[A.campaignId]}))}}})),e},A.prototype.evaluateCampaigns=function(e){for(var t in e=e||new Date,this.campaignDefinitions)if(this.campaignDefinitions.hasOwnProperty(t)){var n=this.campaignDefinitions[t],r=this.campaignStates[n.campaignId];if(!r||A.isStateUpForNomination(r,n,e,this.currentBuildNumber)){var o=r?r.LastSurveyId:"",s=r?r.LastSurveyStartTimeUtc:g(),c=r?r.LastSurveyExpirationTimeUtc:g(),u=r?r.LastSurveyActivatedTimeUtc:g(),l=r?r.LastCooldownEndTimeUtc:g(),d=r&&r.ForceCandidacy||n.nominationScheme.evaluateNominationRules();d&&(o=i.guid(),s=n.nominationScheme.calculateSurveyStartTimeFromDate(e),c=n.nominationScheme.calculateSurveyExpirationTimeFromSurveyStartTime(s));var B=new a.CampaignState(n.campaignId,e,this.currentBuildNumber,n.nominationScheme.getActiveSurveyTimeIntervalSeconds(),!1,d,!1,u,o,s,c,l);this.campaignStates[B.CampaignId]=B}}},A.prototype.needRefreshSurveyDefinitions=function(){return!this.lastCampaignRefreshTime},A.prototype.FilterCampaignsOnRestart=function(e,t){for(var n in this.campaignDefinitions)if(this.campaignDefinitions.hasOwnProperty(n)){var r=this.campaignDefinitions[n];if(t&&t.indexOf(r.governedChannelType)<0&&r.businessLevel!==u.BusinessLevel.Critical){delete this.campaignDefinitions[r.campaignId];continue}if(!A.isCampaignInScope(r,e,this.environmentProvider,this.userFactsProvider)){delete this.campaignDefinitions[r.campaignId];continue}}},A.prototype.LoadFilterCampaignStates=function(e){var t=this.stateProvider.load(),n=[];for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];this.campaignDefinitions.hasOwnProperty(o.CampaignId)||n.push(o),this.campaignStates[o.CampaignId]=o}for(var r in n)if(n.hasOwnProperty(r)){if(!(o=n[r]))continue;var a=this.campaignDefinitions[o.CampaignId],s=!1;a?A.isStateUpForNomination(o,a,e,this.currentBuildNumber)&&(s=!0):o.LastNominationTimeUtc.getTime()<=i.subtractSecondsWithoutOverflow(e,o.DeleteAfterSecondsWhenStale).getTime()&&(s=!0),s&&delete this.campaignStates[o.CampaignId]}},A}();e.CampaignManager=h},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CampaignSurveyFactory=void 0;var n=t(7),r=t(37),i=t(40),o=t(41),a=t(43),s=t(44),c=t(46),u=t(47),l=t(13),g=t(5),d=t(15),B=g.dateToShortUtcString,h=g.isNOU,p=function(){function A(){}return A.makeSurvey=function(e,t,n){if(!(e&&t&&t.surveyTemplate&&n))return null;var r=A.makeSurveyDataSourceData(e,t),i=t.surveyTemplate;return i instanceof d.CampaignSurveyTemplateNps5PointStatic?u.make5Point(r,n):i instanceof d.CampaignSurveyTemplateNps11PointStatic?u.make11Point(r,n):i instanceof d.CampaignSurveyTemplateFps?o.makeFps(r,n,i):i instanceof d.CampaignSurveyTemplateNlqs?c.makeNlqs(r,n,i):i instanceof d.CampaignSurveyTemplateNps?u.makeCustom(r,n,i):i instanceof d.CampaignSurveyTemplateGenericMessagingSurface?a.makeCustom(r):i instanceof d.CampaignSurveyTemplateIntercept?s.makeIntercept(r,n,i):null},A.makeSurveyDataSourceData=function(e,t){if(!e||!t||!t.surveyTemplate)return null;var r=t.surveyTemplate,i=new l.SurveyDataSourceData;return i.activationEvent=A.makeEvent(e,r.activationEvent),i.metadata=A.makeMetadata(r.metadata),i.id=e.LastSurveyId,i.backEndIdentifier=e.CampaignId,i.expirationTimeUtc=B(e.LastSurveyExpirationTimeUtc),i.governedChannelType=t.governedChannelType,i.startTimeUtc=B(e.LastSurveyStartTimeUtc),i.additionalDataRequested=t.additionalDataRequested||[],i.launcherType=t.launcherType||n.LAUNCHER_TYPE_DEFAULT,i.preferredLaunchType=t.surveyTemplate.preferredLaunchType||"Default",i.businessLevel=t.businessLevel,h(r.maxLaunches)||(i.maxLaunches=r.maxLaunches),h(r.maxLaunchesPerSession)||(i.maxLaunchesPerSession=r.maxLaunchesPerSession),i},A.makeCountedActivityEventData=function(A){if(!A)return null;var e=new r.CountedActivityEventData;return e.activity=A.activity,e.count=A.count,e.isAggregate=A.isAggregate,e},A.makeCountedActivityEvent=function(e,t){if(!e||!t)return null;var n=A.makeCountedActivityEventData(t);return n?new r.CountedActivityEvent(n):null},A.makeCountedActivitySequenceEvent=function(e,t){if(!e||!t)return null;var n=new r.CountedActivitySequenceEventData;n.sequence=[];for(var i=0,o=t.sequence;i=this.getMinNumberofSelectedOptions()},A.prototype.ValidateMaxNumberofSelectedOptions=function(){var A=0;return this.optionStates.forEach((function(e){e&&A++})),A<=this.getMaxNumberofSelectedOptions()},A.prototype.getDomElements=function(A){if(!A)throw new Error("Document must not be null");var e=A.createElement(n.DOM_MULTIPLECHOICE_TAGNAME);return e.appendChild(A.createTextNode(this.getOptionSelectedStates().toString())),[e]},A.prototype.getJsonElements=function(){var A={};return A[n.JSON_MULTIPLECHOICE_KEYNAME]=this.getOptionSelectedStates().toString(),A},A.prototype.getComponentJson=function(){var A;return(A={})[n.JSON_QUESTION_KEYNAME]=this.getQuestion(),A[n.JSON_RATINGOPTIONS_KEYNAME]=this.getAvailableOptions(),A},A}();!function(A){var e=function(){};A.MultipleChoiceComponentData=e}(r||(r={})),A.exports=r},function(A,e,t){"use strict";var n,r=this&&this.__extends||(n=function(A,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,e){A.__proto__=e}||function(A,e){for(var t in e)e.hasOwnProperty(t)&&(A[t]=e[t])})(A,e)},function(A,e){function t(){this.constructor=A}n(A,e),A.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}),i=t(7),o=t(5),a=t(14),s=t(13),c=o.isNOU,u=function(A){function e(e){var t=A.call(this)||this;if(!e)throw new Error("data must not be null");if(t.surveyInfo=new s(e.baseData),c(t.surveyInfo.getMetadata()))throw new Error("metadata must not be null");return t}return r(e,A),e.make=function(A){try{return new e(A)}catch(A){return null}},e.makeCustom=function(A){if(c(A))return null;var t=new e.GenericMessagingSurfaceSurveyData;return t.baseData=A,this.make(t)},e.prototype.getType=function(){return i.Type.GenericMessagingSurface},e.prototype.getSurveyInfo=function(){return this.surveyInfo},e.prototype.getComponent=function(A){return null},e.prototype.getDomElements=function(A){return[]},e.prototype.getJsonElements=function(){return{}},e}(a.Survey);!function(A){var e=function(){};A.GenericMessagingSurfaceSurveyData=e}(u||(u={})),A.exports=u},function(A,e,t){"use strict";var n,r=this&&this.__extends||(n=function(A,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,e){A.__proto__=e}||function(A,e){for(var t in e)e.hasOwnProperty(t)&&(A[t]=e[t])})(A,e)},function(A,e){function t(){this.constructor=A}n(A,e),A.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}),i=t(7),o=t(45),a=t(5),s=t(14),c=t(13),u=a.isNOU,l=function(A){function e(e){var t=A.call(this)||this;if(u(e))throw new Error("data must not be null");return t.surveyInfo=new c(e.baseData),t.intercept=new o(e.interceptData),t}return r(e,A),e.make=function(A){try{return new e(A)}catch(A){return null}},e.makeIntercept=function(A,t,n){if(u(A)||u(t)||u(n))return null;var r=n.content;if(u(r)||u(r.intercept))return null;var i=new e.InterceptSurveyData;return i.baseData=A,i.interceptData=new o.InterceptComponentData,i.interceptData.title=t.getCustomString(r.intercept.title),i.interceptData.question=t.getCustomString(r.intercept.question),i.interceptData.url=t.getCustomString(r.intercept.url),u(i.interceptData.title)||u(i.interceptData.question)||u(i.interceptData.url)?null:this.make(i)},e.prototype.getType=function(){return i.Type.Intercept},e.prototype.getSurveyInfo=function(){return this.surveyInfo},e.prototype.getInterceptComponent=function(){return this.intercept},e.prototype.getComponent=function(A){return"Intercept"===A?this.getInterceptComponent():null},e.prototype.getDomElements=function(A){return[]},e.prototype.getJsonElements=function(){return{}},e}(s.Survey);!function(A){var e=function(){};A.InterceptSurveyData=e}(l||(l={})),A.exports=l},function(A,e,t){"use strict";var n=t(8),r=function(){function A(A){if(!A)throw new Error("data must not be null");if(!A.question)throw new Error("data.question must not be null or empty");if(!A.title)throw new Error("data.title must not be null or empty");if(!A.url)throw new Error("data.url must not be null or empty");this.data=A}return A.make=function(e){try{return new A(e)}catch(A){return null}},A.prototype.getType=function(){return"Intercept"},A.prototype.getTitle=function(){return this.data.title},A.prototype.getQuestion=function(){return this.data.question},A.prototype.getUrl=function(){return this.data.url},A.prototype.getDomElements=function(A){if(!A)throw new Error("Document must not be null");return[A.createElement(n.DOM_INTERCEPT_TAGNAME)]},A.prototype.getJsonElements=function(){var A;return(A={})[n.JSON_INTERCEPT_KEYNAME]="",A},A.prototype.getComponentJson=function(){var A;return(A={})[n.JSON_TITLE_KEYNAME]=this.getTitle(),A[n.JSON_QUESTION_KEYNAME]=this.getQuestion(),A[n.JSON_INTERCEPTURL_KEYNAME]=this.getUrl(),A},A}();!function(A){var e=function(){};A.InterceptComponentData=e}(r||(r={})),A.exports=r},function(A,e,t){"use strict";var n,r=this&&this.__extends||(n=function(A,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,e){A.__proto__=e}||function(A,e){for(var t in e)e.hasOwnProperty(t)&&(A[t]=e[t])})(A,e)},function(A,e){function t(){this.constructor=A}n(A,e),A.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}),i=t(7),o=t(19),a=t(20),s=t(21),c=t(5),u=t(14),l=t(13),g=c.isNOU,d=c.overrideValues,B=function(A){function e(e){var t=A.call(this)||this;if(g(e))throw new Error("data must not be null");return t.surveyInfo=new l(e.baseData),t.prompt=new a(e.promptData),t.question=new o(e.commentData),t.rating=new s(e.ratingData),t}return r(e,A),e.make=function(A){try{return new e(A)}catch(A){return null}},e.makeNlqs=function(A,t,n){if(g(A)||g(t)||g(n))return null;var r=[],i=n.content;if(g(i)||g(i.comment)||g(i.prompt)||g(i.rating))return null;var c=new e.NlqsSurveyData;c.baseData=A,c.promptData=new a.PromptComponentData,c.ratingData=new s.RatingComponentData,c.commentData=new o.CommentComponentData,c.promptData.title=t.getCustomString(i.prompt.title),c.promptData.question=t.getCustomString(i.prompt.question),c.promptData.yesButtonLabel=t.getCustomString(i.prompt.yesLabel),c.promptData.noButtonLabel=t.getCustomString(i.prompt.noLabel),c.ratingData.question=t.getCustomString(i.rating.question),c.ratingData.isZeroBased=i.rating.isZeroBased,c.commentData.question=t.getCustomString(i.comment.question);for(var u=0,l=i.rating.ratingValuesAscending;u0){var T=this.loggerCallback&&this.loggerCallback();T&&T.log_Error(r.TelemetryEvent.SurveyActivity.SetActivityTrackingContracts.DuplicateSurveyID,"Duplicate surveyId passed in activityTrackingContracts. Duplicate count: "+t)}this.copyObject(this.trackedActivityMap,a)}},A.prototype.clearSurveys=function(){var A=this;Object.getOwnPropertyNames(this.trackedActivityMap).forEach((function(e){delete A.trackedActivityMap[e]}))},A.prototype.saveSessionTrackingActivity=function(A){u[A]=this.trackedActivityMap[A]},A.prototype.getCount=function(A,e){var t=this.getIndexedTracker(A,e);return t?t.tracker.getCount(t.index):0},A.prototype.getSessionCount=function(A,e){var t=this.getIndexedTracker(A,e);return t?t.tracker.getSessionCount(t.index):0},A.prototype.moveSessionCountIntoBaseCount=function(A,e){var t=this.getIndexedTracker(A,e);return t?t.tracker.moveSessionCountIntoBaseCount(t.index):0},A.prototype.getSurveyIds=function(A){if(!a.isNOU(A)){var e=this.trackedActivityMap[A];if(e)return e.map((function(A){return A.surveyId}))}},A.prototype.setCallback=function(A){this.callback=A},A.prototype.UpdateActivityTrackingContracts=function(A){if(a.isNOU(A)||0===Object.keys(A).length)this.clearSurveys();else for(var e in this.trackedActivityMap)if(this.trackedActivityMap.hasOwnProperty(e))for(var t=this.trackedActivityMap[e],n=t.length-1;n>=0;--n)A.hasOwnProperty(t[n].surveyId)||t.splice(n,1)},A.prototype.getIndexedTracker=function(A,e){var t=this.trackedActivityMap[A];if(t){for(var n,r=0,i=t;r0){var u=s.slice(0,25).map((function(A){return A.activityName})),l=this.loggerCallback&&this.loggerCallback();l&&l.log_Event(r.TelemetryEvent.SurveyActivity.LogActivity.EventsReprocessed,{ActivityNames:JSON.stringify(u),Count:s.length,Dropped:c-s.length},.05),s.map((function(A){return a.logActivity_core(A.activityName,A.logType,A.increment,A.timestamp,o)}))}c=0,this.resetQueuedActivities()}this.logActivity_core(e,t,n,i,o)},A.prototype.logActivity_core=function(A,e,t,n,r){var i=this.trackedActivityMap[A];if(i&&0!==i.length){var o=[];if(i.length>1){o=new Array(i.length);for(var s=0;s32)throw new Error("trackingSet list size must be less than 32");this.isOrdered=A.getIsOrdered(),this.trackedActivities=A.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);for(var e=0;ethis.currentIndex);n++)nthis.currentIndex)return 0;var t=!this.hasCountCrossedThreshold(A);return this.currentCounts[A]+=e,this.currentSessionCounts[A]+=e,this.isActivationByInitPending?this.isPermittedIndexForActivationByInit(A)?this.commitActivation():0:t&&this.hasCountCrossedThreshold(A)?(this.finishActivityAtIndex(A),this.isActivated()?this.commitActivation():1):0},A.prototype.startTime=function(A,e){this.isValidIndex(A)&&(this.currentStartTimes[A]=e||new Date)},A.prototype.stopTime=function(A,e){if(!this.isValidIndex(A))return 0;var t=this.currentStartTimes[A];if(this.currentStartTimes[A]=null,!t)return 0;if(t>(e=e||new Date))return 0;var n=(e.getTime()-t.getTime())/1e3;return n%1==0&&(n+=.001),n},A.prototype.isValidIndex=function(A){return A=this.trackedActivities[A].getCount()},A.prototype.isPermittedIndexForActivationByInit=function(A){return!this.isOrdered||A+1===this.currentCounts.length},A.prototype.commitActivation=function(){return this.isActivationByInitPending=!1,2},A}();!function(A){var e=function(){};A.ActivityIndex=e}(n||(n={})),A.exports=n},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndexedTracker=void 0;var n=function(){};e.IndexedTracker=n},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActivityTrackingContract=void 0;var n=function(A,e){this.surveyId=A,this.trackingSet=e};e.ActivityTrackingContract=n},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasSurveyReachedMaxLaunches=e.hasSurveyReachedMaxLaunchesPerSession=e.isCriticalSurvey=e.isBusinessCriticalSurvey=e.isMultiLaunchSurvey=void 0;var n=t(16),r=t(5);function i(A){var e=null==A?void 0:A.getMaxLaunches();return r.isNumber(e)&&e>1}function o(A){var e=null==A?void 0:A.getBusinessLevel();return!r.isNOU(e)&&e===n.ISurveyInfo.BusinessLevel.Critical}e.isMultiLaunchSurvey=i,e.isBusinessCriticalSurvey=o,e.isCriticalSurvey=function(A){return i(A)||o(A)},e.hasSurveyReachedMaxLaunchesPerSession=function(A,e){var t;return!i(A)||!r.isNumber(A.getMaxLaunchesPerSession())||(null!==(t=e[A.getId()])&&void 0!==t?t:0)>=A.getMaxLaunchesPerSession()},e.hasSurveyReachedMaxLaunches=function(A,e){return!i(A)||((null==e?void 0:e.SurveyLaunchCount)||0)>=A.getMaxLaunches()}},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateUserFacts=e.deserializeUserFacts=void 0;var n=t(56);e.deserializeUserFacts=function(A){var e=[];for(var t in A.UserFacts)if(A.UserFacts.hasOwnProperty(t)){var r=A.UserFacts[t];r&&e.push(n.UserFact.deserialize(r))}return 0===e.length&&(e=null),e},e.validateUserFacts=function(A){if(A)for(var e in A)if(A.hasOwnProperty(e)&&!A[e])return!1;return!0}},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserFact=void 0;var n=t(9),r=t(10),i=t(5),o=i.isNOU,a=i.isNumber,s=i.isArray,c=[0,1,2,3,4,5],u=function(){function A(A){this.input=A}return A.deserialize=function(e){return this.validate(e)?new A(e):null},A.validate=function(A){if(!A)return r.FloodgateEngine.getTelemetryLogger().log_Error(n.TelemetryEvent.Floodgate.UserFactsSpecDeserialization.Failed,"Input is null or undefined for user fact"),!1;if(!A.Value&&A.Values&&(A.Value=A.Values),o(A.Name)||o(A.Type)||o(A.Value))return r.FloodgateEngine.getTelemetryLogger().log_Error(n.TelemetryEvent.Floodgate.UserFactsSpecDeserialization.Failed,"Either of the required parameters Name: "+A.Name+", Type: "+A.Type+" or Value: "+A.Value+" are not provided for the user fact"),!1;if(!this.validateUserFactType(A.Type))return r.FloodgateEngine.getTelemetryLogger().log_Error(n.TelemetryEvent.Floodgate.UserFactsSpecDeserialization.Failed,"Invalid UserFactType value "+A.Type+" is provided for user fact"),!1;if(6===A.Type)return r.FloodgateEngine.getTelemetryLogger().log_Error(n.TelemetryEvent.Floodgate.UserFactsSpecDeserialization.Failed,"Unsupported UserFactType value "+A.Type+" is provided for user fact"),!1;if(A.LatencyType&&!this.validateLatencyType(A.LatencyType))return r.FloodgateEngine.getTelemetryLogger().log_Error(n.TelemetryEvent.Floodgate.UserFactsSpecDeserialization.Failed,"Invalid LatencyType value "+A.LatencyType+" is provided for user fact of type "+A.Type),!1;if(A.LatencyType&&0!==A.LatencyType&&o(A.LatencyDurationInSeconds))return r.FloodgateEngine.getTelemetryLogger().log_Error(n.TelemetryEvent.Floodgate.UserFactsSpecDeserialization.Failed,"LatencyDurationInSeconds value "+A.LatencyDurationInSeconds+" is not provided for user fact of type "+A.Type),!1;if(A.LatencyDurationInSeconds&&!a(A.LatencyDurationInSeconds))return r.FloodgateEngine.getTelemetryLogger().log_Error(n.TelemetryEvent.Floodgate.UserFactsSpecDeserialization.Failed,"Invalid LatencyDurationInSeconds value "+A.LatencyDurationInSeconds+" is provided for user fact of type "+A.Type),!1;if(1===A.Type&&o(A.IntervalType))return r.FloodgateEngine.getTelemetryLogger().log_Error(n.TelemetryEvent.Floodgate.UserFactsSpecDeserialization.Failed,"Required parameter intervalType is not provided for user fact of type "+A.Type),!1;var e=this.getComparatorTypes(A.Type);return!(A.Comparator&&!function(A,e){return-1!==e.indexOf(A)}(A.Comparator,e))||(r.FloodgateEngine.getTelemetryLogger().log_Error(n.TelemetryEvent.Floodgate.UserFactsSpecIsAMatch.Failed,"Unsupported comparator type for user fact of type "+A.Type),!1)},A.getComparatorTypes=function(A){switch(A){case 0:return[0,1];case 4:return[0,1,6,7,8,9];case 5:return[6,7,8,9];case 1:case 2:case 3:case 6:return c}return c},A.validateLatencyType=function(A){return 0===A||3===A||1===A||2===A},A.validateUserFactType=function(A){return 0===A||2===A||3===A||4===A||1===A||5===A||6===A},A.prototype.isAMatch=function(A){if(!A||!A.userFactValue)return!1;if(!this.isLatencyAcceptable(A))return!1;try{var e=this.getType();return 0===e?function(A,e,t){var n=JSON.parse(e.userFactValue.toLowerCase());return l(!!A,!!n,t)}(this.getValue(),A,this.getComparator()):2===e?function(A,e,t){var n=Date.parse(e.userFactValue);if(!d(n,e.userFactValue,e.userFactName))return!1;var r=Date.parse(A);if(!d(r,A,null,2))return!1;return l(r,n,t)}(this.getValue(),A,this.getComparator()):3===e?function(A,e,t){var n=parseInt(e.userFactValue,10);if(!d(n,e.userFactValue,e.userFactName))return!1;return l(A,n,t)}(this.getValue(),A,this.getComparator()):4===e?function(A,e,t){return l(A.toLowerCase(),e.userFactValue.toLowerCase(),t)}(this.getValue(),A,this.getComparator()):1===e?function(A,e,t,i){var o=Date.parse(e.userFactValue);if(!d(o,e.userFactValue,e.userFactName))return!1;var a=Date.now(),s=0===i?a-o:o-a;if(s<0)return r.FloodgateEngine.getTelemetryLogger().log_Event(n.TelemetryEvent.Floodgate.UserFactsSpecIsAMatch.Mismatch,{ErrorMessage:"Interval type not acceptable - { Spec: "+A+', Name: "'+e.userFactName+'" }',TimeMilliseconds:s,Type:""+i}),!1;return l(864e5*A,s,t)}(this.getValue(),A,this.getComparator(),this.getIntervalType()):5===e?function(A,e,t){return l(A,e.userFactValue,t)}(this.getValue(),A,this.getComparator()):(r.FloodgateEngine.getTelemetryLogger().log_Error(n.TelemetryEvent.Floodgate.UserFactsSpecIsAMatch.Failed,"Unsupported type of user fact was provided "+e),!1)}catch(A){return r.FloodgateEngine.getTelemetryLogger().log_Error(n.TelemetryEvent.Floodgate.UserFactsSpecIsAMatch.Failed,A),!1}},A.prototype.getType=function(){return this.input.Type},A.prototype.getName=function(){return this.input.Name},A.prototype.getValue=function(){return this.input.Value},A.prototype.getComparator=function(){return this.input.Comparator||0},A.prototype.getLatencyType=function(){return this.input.LatencyType||0},A.prototype.getLatencyDurationInSeconds=function(){return this.input.LatencyDurationInSeconds},A.prototype.getIntervalType=function(){return this.input.IntervalType},A.prototype.isLatencyAcceptable=function(A){var e=this.getType();return!(!o(this.getLatencyDurationInSeconds())&&!function(A,e,t){var n;switch(A){case 0:break;case 1:n=t.sourceDateTime;break;case 2:n=t.storageDateTime;break;case 3:n=t.clientIngestionDateTime}if(!o(n)){var r=Date.parse(n);return Date.now()-r<=1e3*e}return!0}(this.getLatencyType(),this.getLatencyDurationInSeconds(),A))||(r.FloodgateEngine.getTelemetryLogger().log_Event(n.TelemetryEvent.Floodgate.UserFactsSpecIsAMatch.Mismatch,{ErrorMessage:'Latency duration not acceptable - { Name: "'+A.userFactName+'" }',TimeMilliseconds:this.getLatencyDurationInSeconds(),Type:""+e}),!1)},A}();function l(A,e,t){switch(t){case 0:return e===A;case 1:return e!==A;case 2:return e>A;case 3:return e>=A;case 4:return e>16},A.ToInt32=function(A){return 2147483647&A|2147483648&A},A.ToUInt8=function(A){return 255&A},A.ToUInt32=function(A){return 4294967295&A},A}();e.Number=i},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(A){A[A.NotSet=0]="NotSet",A[A.DistinguishedName=1]="DistinguishedName",A[A.GenericData=2]="GenericData",A[A.IPV4Address=3]="IPV4Address",A[A.IPv6Address=4]="IPv6Address",A[A.MailSubject=5]="MailSubject",A[A.PhoneNumber=6]="PhoneNumber",A[A.QueryString=7]="QueryString",A[A.SipAddress=8]="SipAddress",A[A.SmtpAddress=9]="SmtpAddress",A[A.Identity=10]="Identity",A[A.Uri=11]="Uri",A[A.Fqdn=12]="Fqdn",A[A.IPV4AddressLegacy=13]="IPV4AddressLegacy"}(e.AWTPiiKind||(e.AWTPiiKind={}))},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=t(9),r=t(1),i=t(3),o=function(){function A(){}return A.getPayloadBlob=function(A,e){var t=new n.IO.MemoryStream,r=new n.CompactBinaryProtocolWriter(t);return r.WriteFieldBegin(n.BondDataType.BT_MAP,3),r.WriteMapContainerBegin(e,n.BondDataType.BT_STRING,n.BondDataType.BT_LIST),Object.keys(A).forEach((function(e){r.WriteString(e);var t=A[e];r.WriteContainerBegin(1,n.BondDataType.BT_STRUCT),r.WriteFieldBegin(n.BondDataType.BT_STRING,2),r.WriteString("act_default_source"),r.WriteFieldBegin(n.BondDataType.BT_STRING,5),r.WriteString(i.newGuid()),r.WriteFieldBegin(n.BondDataType.BT_INT64,6),r.WriteInt64(i.numberToBondInt64(Date.now())),r.WriteFieldBegin(n.BondDataType.BT_LIST,8),r.WriteContainerBegin(t.length,n.BondDataType.BT_STRUCT);for(var o=0;o=0&&A<=13}},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Version="1.2.2",e.FullVersionString="AWT-Web-CJS-"+e.Version},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=t(1);e.AWTPiiKind=n.AWTPiiKind;var r=t(13);e.AWT=r.default,e.AWT_COLLECTOR_URL_UNITED_STATES="https://us.pipe.aria.microsoft.com/Collector/3.0/",e.AWT_COLLECTOR_URL_GERMANY="https://de.pipe.aria.microsoft.com/Collector/3.0/",e.AWT_COLLECTOR_URL_JAPAN="https://jp.pipe.aria.microsoft.com/Collector/3.0/",e.AWT_COLLECTOR_URL_AUSTRALIA="https://au.pipe.aria.microsoft.com/Collector/3.0/",e.AWT_COLLECTOR_URL_EUROPE="https://eu.pipe.aria.microsoft.com/Collector/3.0/"},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(A){A[A.BT_STOP=0]="BT_STOP",A[A.BT_STOP_BASE=1]="BT_STOP_BASE",A[A.BT_UINT8=3]="BT_UINT8",A[A.BT_UINT32=5]="BT_UINT32",A[A.BT_UINT64=6]="BT_UINT64",A[A.BT_STRING=9]="BT_STRING",A[A.BT_STRUCT=10]="BT_STRUCT",A[A.BT_LIST=11]="BT_LIST",A[A.BT_MAP=13]="BT_MAP",A[A.BT_INT32=16]="BT_INT32",A[A.BT_INT64=17]="BT_INT64",A[A.BT_UNAVAILABLE=127]="BT_UNAVAILABLE"}(e.BondDataType||(e.BondDataType={}))},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=t(0),r=function(){function A(){}return A.GetBytes=function(A){for(var e=[],t=0;t>6,128|63&n):n<55296||n>=57344?e.push(224|n>>12,128|n>>6&63,128|63&n):(n=65536+((1023&n)<<10|1023&A.charCodeAt(++t)),e.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return e},A}();e.Utf8=r;var i=function(){function A(){}return A.GetString=function(A){for(var e,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=[],r=A.length%3,i=0,o=A.length-r;i>18&63),t.charAt(e>>12&63),t.charAt(e>>6&63),t.charAt(63&e)].join(""))}switch(r){case 1:a=A[A.length-1],n.push(t.charAt(a>>2)),n.push(t.charAt(a<<4&63)),n.push("==");break;case 2:var s=(A[A.length-2]<<8)+A[A.length-1];n.push(t.charAt(s>>10)),n.push(t.charAt(s>>4&63)),n.push(t.charAt(s<<2&63)),n.push("=")}return n.join("")},A}();e.Base64=i;var o=function(){function A(){}return A.GetBytes=function(A){for(var e=[];4294967168&A;)e.push(127&A|128),A>>>=7;return e.push(127&A),e},A}();e.Varint=o;var a=function(){function A(){}return A.GetBytes=function(A){for(var e=A.low,t=A.high,n=[];t||4294967168&e;)n.push(127&e|128),e=(127&t)<<25|e>>>7,t>>>=7;return n.push(127&e),n},A}();e.Varint64=a;var s=function(){function A(){}return A.EncodeZigzag32=function(A){return(A=n.Number.ToInt32(A))<<1^A>>31},A.EncodeZigzag64=function(A){var e=A.low,t=A.high,r=t<<1|e>>>31,i=e<<1;2147483648&t&&(r=~r,i=~i);var o=new n.UInt64("0");return o.low=i,o.high=r,o},A}();e.Zigzag=s},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=t(0),r=function(){function A(){this._buffer=[]}return A.prototype.WriteByte=function(A){this._buffer.push(n.Number.ToByte(A))},A.prototype.Write=function(A,e,t){for(;t--;)this.WriteByte(A[e++])},A.prototype.GetBuffer=function(){return this._buffer},A}();e.MemoryStream=r},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=t(6);e.BondDataType=n.BondDataType;var r=t(7);e.Encoding=r;var i=t(8);e.IO=i;var o=t(0);e.Int64=o.Int64,e.UInt64=o.UInt64,e.Number=o.Number;var a=function(){function A(A){this._stream=A}return A.prototype.WriteBlob=function(A){this._stream.Write(A,0,A.length)},A.prototype.WriteContainerBegin=function(A,e){this.WriteUInt8(e),this.WriteUInt32(A)},A.prototype.WriteMapContainerBegin=function(A,e,t){this.WriteUInt8(e),this.WriteUInt8(t),this.WriteUInt32(A)},A.prototype.WriteFieldBegin=function(A,e){e<=5?this._stream.WriteByte(A|e<<5):e<=255?(this._stream.WriteByte(192|A),this._stream.WriteByte(e)):(this._stream.WriteByte(224|A),this._stream.WriteByte(e),this._stream.WriteByte(e>>8))},A.prototype.WriteInt32=function(A){A=r.Zigzag.EncodeZigzag32(A),this.WriteUInt32(A)},A.prototype.WriteInt64=function(A){this.WriteUInt64(r.Zigzag.EncodeZigzag64(A))},A.prototype.WriteString=function(A){if(""===A)this.WriteUInt32(0);else{var e=r.Utf8.GetBytes(A);this.WriteUInt32(e.length),this._stream.Write(e,0,e.length)}},A.prototype.WriteStructEnd=function(A){this.WriteUInt8(A?n.BondDataType.BT_STOP_BASE:n.BondDataType.BT_STOP)},A.prototype.WriteUInt32=function(A){var e=r.Varint.GetBytes(o.Number.ToUInt32(A));this._stream.Write(e,0,e.length)},A.prototype.WriteUInt64=function(A){var e=r.Varint64.GetBytes(A);this._stream.Write(e,0,e.length)},A.prototype.WriteUInt8=function(A){this._stream.WriteByte(o.Number.ToUInt8(A))},A}();e.CompactBinaryProtocolWriter=a},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function A(){this._killedTokenDictionary={}}return A.prototype.setKillSwitchTenants=function(A,e){var t=this;if(A&&e)try{var n=A.split(",");if("this-request-only"===e)return n;var r=1e3*parseInt(e,10);n.forEach((function(A){t._killedTokenDictionary[A]=Date.now()+r}))}catch(A){return[]}return[]},A.prototype.isTenantKilled=function(A){return void 0!==this._killedTokenDictionary[A]&&this._killedTokenDictionary[A]>Date.now()||(delete this._killedTokenDictionary[A],!1)},A}();e.default=n},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=t(2),r=function(){function A(A,e){this._maxRequestSize=A,this._outboundQueue=e,this._currentBatch={},this._currentBatchSize=0}return A.prototype.addEventToBatch=function(A){var e=n.default.getEventBlob(A);e.length>this._maxRequestSize||(this._currentBatchSize+e.length>this._maxRequestSize?this.flushBatch():(void 0===this._currentBatch[A.tenantToken]&&(this._currentBatch[A.tenantToken]=[]),this._currentBatch[A.tenantToken].push(e),this._currentBatchSize+=e.length))},A.prototype.flushBatch=function(){this._currentBatchSize>0&&(this._outboundQueue.push(this._currentBatch),this._currentBatch={},this._currentBatchSize=0)},A}();e.default=r},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function A(){}return A.shouldRetryForStatus=function(A){return!(A>=300&&A<500&&408!==A||501===A||505===A)},A.getMillisToBackoffForRetry=function(A){var e,t=Math.floor(1200*Math.random())+2400;return e=Math.pow(4,A)*t,Math.min(e,12e4)},A}();e.default=n},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=t(1),r=t(14),i=t(3),o=t(4),a=/^[a-zA-Z0-9]([a-zA-Z0-9]|_){2,98}[a-zA-Z0-9]$/,s=/\./g,c=/^[a-zA-Z0-9](([a-zA-Z0-9|_|\.]){0,98}[a-zA-Z0-9])?$/,u=function(){function A(){}return A.initialize=function(A,e){if(void 0===e&&(e={}),this._isInitialized)throw"Already Initialized";this._defaultTenantToken=A,this._overrideValuesFromConfig(e),r.default.initialize(this._config),this._isInitialized=!0},A.flush=function(A){this._isInitialized&&!this._isDestroyed&&r.default.flush(A)},A.flushAndTeardown=function(){this._isInitialized&&!this._isDestroyed&&(this._isDestroyed=!0,r.default.flushAndTeardown())},A.setContext=function(A,e,t){void 0===t&&(t="allTkns"),null!==(e=this._sanitizeProperty(A,e))&&(this._contextProperties[t]||(this._contextProperties[t]={}),this._contextProperties[t][A]=e)},A.logEvent=function(A){var e=this;if(this._isInitialized){if(!A.name||!A.properties)return;A.name=A.name.toLowerCase(),A.name.replace(s,"_");var t="";if(A.type?(A.type.toLowerCase(),t="custom."):A.type="custom",!a.test(A.name)||!a.test(A.type))return;if(A.type=t+A.type,isNaN(A.timestamp)&&(A.timestamp=(new Date).getTime()),A.tenantToken||(A.tenantToken=this._defaultTenantToken),A.id=i.newGuid(),Object.keys(A.properties).forEach((function(t){A.properties[t]=e._sanitizeProperty(t,A.properties[t]),null===A.properties[t]&&delete A.properties[t]})),this._addContextIfAbsent(A,A.tenantToken),this._addContextIfAbsent(A,"allTkns"),0===Object.keys(A.properties).length)return;this._setDefaultProperty(A,"EventInfo.InitId",this._getInitId(A.tenantToken)),this._setDefaultProperty(A,"EventInfo.Sequence",this._getSequenceId(A.tenantToken)),this._setDefaultProperty(A,"EventInfo.SdkVersion",o.FullVersionString),this._setDefaultProperty(A,"EventInfo.Name",A.name),this._setDefaultProperty(A,"EventInfo.Time",new Date(A.timestamp).toISOString()),r.default.sendEvent(A)}},A._overrideValuesFromConfig=function(A){A.collectorUrl&&(this._config.collectorUrl=A.collectorUrl),A.sendingTimer>1e3&&(this._config.sendingTimer=A.sendingTimer)},A._getInitId=function(A){return void 0===this._initIdMap[A]&&(this._initIdMap[A]=i.newGuid()),this._initIdMap[A]},A._getSequenceId=function(A){return void 0===this._sequenceIdMap[A]&&(this._sequenceIdMap[A]=0),(++this._sequenceIdMap[A]).toString()},A._setDefaultProperty=function(A,e,t){A.properties[e]={value:t,pii:n.AWTPiiKind.NotSet}},A._addContextIfAbsent=function(A,e){if(this._contextProperties[e]){var t=this._contextProperties[e];Object.keys(t).forEach((function(e){A.properties[e]||(A.properties[e]=t[e])}))}},A._sanitizeProperty=function(A,e){return"string"!=typeof e&&"number"!=typeof e&&"boolean"!=typeof e||(e={value:e}),c.test(A)&&null!=e&&null!==e.value&&void 0!==e.value&&""!==e.value?(void 0===e.pii&&(e.pii=n.AWTPiiKind.NotSet),e.value=e.value.toString(),i.isPii(e.pii)?e:null):null},A._isInitialized=!1,A._isDestroyed=!1,A._contextProperties={},A._sequenceIdMap={},A._initIdMap={},A._config={collectorUrl:"https://browser.pipe.aria.microsoft.com/Collector/3.0/",sendingTimer:1e3},A}();e.default=u},function(A,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=t(11),r=t(2),i=t(12),o=t(10),a=t(4),s=function(){function A(){}return A.initialize=function(A){this._inboundQueues.push([]),this._recordBatcher=new n.default(2936012,this._outboundQueue),this._newEventsAllowed=!0,"undefined"==typeof Uint8Array&&(this._urlString+="&content-encoding=base64"),this._sendingTimer=A.sendingTimer,this._urlString=A.collectorUrl+this._urlString+"&x-apikey="},A.sendEvent=function(A){var e=this;this._newEventsAllowed&&(this._inboundQueues[this._inboundQueues.length-1].push(A),!this._running&&this._timeout<0&&!this._isCurrentlyFlushing&&(this._timeout=setTimeout((function(){return e._batchAndSendEvents(!1)}),this._sendingTimer)))},A.flushAndTeardown=function(){this._newEventsAllowed=!1,this._batchAndSendEvents(!0)},A.flush=function(A){this._inboundQueues.push([]),this._isCurrentlyFlushing?this._flushQueue.push(A):(this._isCurrentlyFlushing=!0,this._flush(A))},A._batchAndSendEvents=function(A){for(this._running=!0;this._inboundQueues[0].length>0&&this._outboundQueue.length<1;)this._recordBatcher.addEventToBatch(this._inboundQueues[0].pop());0===this._outboundQueue.length&&this._recordBatcher.flushBatch(),this._sendRequest(this._outboundQueue.pop(),0,A)},A._retryRequestIfNeeded=function(A,e,t,n,r){var o=this,a=!0;A&&void 0!==A.status&&(this._killSwitch.setKillSwitchTenants(A.getResponseHeader("kill-tokens"),A.getResponseHeader("kill-duration-seconds")).forEach((function(A){delete e[A],t--})),(!i.default.shouldRetryForStatus(A.status)||t<=0)&&(a=!1)),a&&r<4?setTimeout((function(){return o._sendRequest(e,r+1,!1)}),i.default.getMillisToBackoffForRetry(r)):this._handleRequestFinished(null)},A._sendRequest=function(A,e,t){var n=this;try{var i=new XMLHttpRequest,o=0,a="";if(Object.keys(A).forEach((function(e){n._killSwitch.isTenantKilled(e)?delete A[e]:(a.length>0&&(a+=","),a+=e,o++)})),i.open("POST",this._urlString+a,!t),t||(i.ontimeout=function(){n._retryRequestIfNeeded(i,A,o,a,e)},i.onerror=function(){n._retryRequestIfNeeded(i,A,o,a,e)},i.onload=function(){n._handleRequestFinished(i)}),o>0){var s=r.default.getPayloadBlob(A,o);"undefined"==typeof Uint8Array?i.send(r.default.base64Encode(s)):i.send(new Uint8Array(s))}else t&&this._handleRequestFinished(null)}catch(A){this._handleRequestFinished(null)}},A._handleRequestFinished=function(A){var e=this;A&&this._killSwitch.setKillSwitchTenants(A.getResponseHeader("kill-tokens"),A.getResponseHeader("kill-duration-seconds")),this._inboundQueues[0].length>0?this._timeout=setTimeout((function(){return e._batchAndSendEvents(!1)}),this._sendingTimer):(this._timeout=-1,this._running=!1)},A._flush=function(A){var e=this;this._running||(this._timeout>-1&&(clearTimeout(this._timeout),this._timeout=-1),this._inboundQueues[0].length>0&&this._batchAndSendEvents(!1)),this._checkPrimaryInboundQueueEmpty((function(){e._inboundQueues.shift(),null!=A&&A(),e._flushQueue.length>0?setTimeout((function(){return e._flush(e._flushQueue.shift())}),e._sendingTimer):(e._isCurrentlyFlushing=!1,e._inboundQueues[0].length>0&&(e._timeout=setTimeout((function(){return e._batchAndSendEvents(!1)}),e._sendingTimer)))}))},A._checkPrimaryInboundQueueEmpty=function(A){var e=this;0===this._inboundQueues[0].length?this._checkOutboundQueueEmptyAndSent(A):setTimeout((function(){return e._checkPrimaryInboundQueueEmpty(A)}),250)},A._checkOutboundQueueEmptyAndSent=function(A){var e=this;this._running?setTimeout((function(){return e._checkOutboundQueueEmptyAndSent(A)}),250):A()},A._outboundQueue=[],A._inboundQueues=[],A._newEventsAllowed=!1,A._killSwitch=new o.default,A._isCurrentlyFlushing=!1,A._flushQueue=[],A._running=!1,A._timeout=-1,A._urlString="?qsp=true&content-type=application%2Fbond-compact-binary&client-id=NO_AUTH&sdk-version="+a.FullVersionString,A}();e.default=s},function(A,e,t){A.exports=t(5)}])},A.exports=n()},function(A,e,t){"use strict";t.r(e),t.d(e,"initialize",(function(){return Je})),t.d(e,"multiFeedback",(function(){return Ye})),t.d(e,"singleFeedback",(function(){return Xe})),t.d(e,"getFeedbackStatus",(function(){return Ze})),t.d(e,"reset",(function(){return ze}));var n={};t.r(n),t.d(n,"generate",(function(){return fe})),t.d(n,"containerId",(function(){return me})),t.d(n,"onSelect",(function(){return Ce})),t.d(n,"isEmailEnabled",(function(){return ve})),t.d(n,"isScreenshotEnabled",(function(){return we})),t.d(n,"type",(function(){return ye}));var r={};t.r(r),t.d(r,"generate",(function(){return Le})),t.d(r,"containerId",(function(){return De})),t.d(r,"onSelect",(function(){return Oe})),t.d(r,"type",(function(){return _e}));var i={};t.r(i),t.d(i,"generate",(function(){return xe})),t.d(i,"containerId",(function(){return Me})),t.d(i,"onSelect",(function(){return Pe})),t.d(i,"type",(function(){return Ke}));t(31);var o=t(1),a=window,s=a.OfficeBrowserFeedback=a.OfficeBrowserFeedback||{};s.floodgate=s.floodgate||{};function c(){return a}function u(){return a}var l=function(){function A(A,e){if(!A)throw new Error("name must not be null");if(!e)throw new Error("version must not be null");this.name=A,this.version=e}return A.prototype.getName=function(){return this.name},A.prototype.getPlatform=function(){return A.PLATFORM},A.prototype.getVersion=function(){return this.version},A.PLATFORM="Web",A}(),g=function(){function A(A){if(!A)throw new Error("id must not be null");this.id=A}return A.prototype.getId=function(){return this.id},A}(),d=function(){function A(A,e,t,n){this.id=A,this.locale=e,this.sessionId=t,this.version=n}return A.prototype.getId=function(){return this.id},A.prototype.getLocale=function(){return this.locale},A.prototype.getSessionId=function(){return this.sessionId},A.prototype.getVersion=function(){return this.version},A}(),B=function(){function A(e,t,n,r){if(!e)throw new Error("name must not be null");if(!t)throw new Error("sessionId must not be null");if(!n&&0!==n||n<0)throw new Error("sequence must not be negative");this.name=e,this.id=t+A.ID_DELIMITER+n,this.sequence=n,this.sampleRate=r}return A.prototype.getName=function(){return this.name},A.prototype.getId=function(){return this.id},A.prototype.getSource=function(){return A.SOURCE},A.prototype.getSchemaVersion=function(){return A.SCHEMA_VERSION},A.prototype.getSequence=function(){return this.sequence},A.prototype.getSampleRate=function(){return this.sampleRate},A.ID_DELIMITER=".",A.SOURCE="MsoThin",A.SCHEMA_VERSION=1,A}(),h=function(){function A(A){this.audienceGroup=A}return A.prototype.getAudienceGroup=function(){return this.audienceGroup},A}(),p=function(){function A(A,e){this.name=A,this.version=e}return A.prototype.getName=function(){return this.name},A.prototype.getVersion=function(){return this.version},A}(),f=function(){function A(A){this.id=A}return A.prototype.getId=function(){return this.id},A}(),m=function(){function A(A,e){this.tenantId=e,this.primaryIdentityHash=A?A.trim():A,this.primaryIdentitySpace=this.generatePrimaryIdentitySpace()}return A.prototype.getTenantId=function(){return this.tenantId},A.prototype.getPrimaryIdentityHash=function(){return this.primaryIdentityHash},A.prototype.getPrimaryIdentitySpace=function(){return this.primaryIdentitySpace},A.prototype.generatePrimaryIdentitySpace=function(){if(this.primaryIdentityHash){if(this.primaryIdentityHash.startsWith("a:"))return"UserObjectId";if(this.primaryIdentityHash.startsWith("p:"))return"MsaPuid";if(this.primaryIdentityHash.startsWith("ap:"))return"OrgIdPuid"}},A}(),C=t(2),v=t(57);function w(){return v.AWT}var y,F=function(){function A(A,e,t,n,r,i,o,a,s){if(!A)throw new Error("tenantToken must not be null");if(!e)throw new Error("namespace must not be null");if(!t)throw new Error("app must not be null");if(!n)throw new Error("session must not be null");w().initialize(A),this.namespace=e,this.oesApp=t,this.oesSession=n,this.oesHost=r,this.oesRelease=i,this.oesBrowser=o,this.oesDevice=a,this.oesUser=s,this.sequence=1}return A.setApp=function(A,e){A["App.Name"]=e.getName(),A["App.Platform"]=e.getPlatform(),A["App.Version"]=e.getVersion()},A.setSession=function(A,e){A["Session.Id"]=e.getId()},A.setHost=function(A,e){e&&(A["Host.Id"]=e.getId(),A["Host.SessionId2"]=e.getSessionId(),A["Host.Version"]=e.getVersion(),A["Host.Locale"]=e.getLocale())},A.setEvent=function(A,e){A["Event.Name"]=e.getName(),A["Event.Id"]=e.getId(),A["Event.Source"]=e.getSource(),A["Event.SchemaVersion"]=e.getSchemaVersion(),A["Event.Sequence"]=e.getSequence(),A["Event.SampleRate"]=e.getSampleRate()},A.setRelease=function(A,e){e&&(A["Release.AudienceGroup"]=e.getAudienceGroup())},A.setBrowser=function(A,e){e&&(A["Browser.Name"]=e.getName(),A["Browser.Version"]=e.getVersion())},A.setDevice=function(A,e){e&&(A["Device.Id"]=e.getId())},A.setUser=function(A,e){e&&(A["User.PrimaryIdentityHash"]=e.getPrimaryIdentityHash(),A["User.PrimaryIdentitySpace"]=e.getPrimaryIdentitySpace(),A["User.TenantId"]=e.getTenantId())},A.prototype.logEvent=function(e,t,n){if(void 0===n&&(n=1),!e)throw new Error("eventName must not be null");var r=new B(this.namespace+A.EVENT_NAME_DELIMITER+e,this.oesSession.getId(),this.sequence,n),i={};if(null!=t)for(var o in t)t.hasOwnProperty(o)&&(i[A.CUSTOM_PROPERTIES_FIELD_PREFIX+o]=t[o]);A.setApp(i,this.oesApp),A.setSession(i,this.oesSession),A.setHost(i,this.oesHost),A.setRelease(i,this.oesRelease),A.setEvent(i,r),A.setBrowser(i,this.oesBrowser),A.setDevice(i,this.oesDevice),A.setUser(i,this.oesUser),w().logEvent({name:r.getName(),properties:i}),this.sequence++},A.EVENT_NAME_DELIMITER="_",A.CUSTOM_PROPERTIES_FIELD_PREFIX="Data.",A}(),Q=function(){function A(){}return A.create=function(A,e,t,n,r,i,o,a,s){return new F(A,e,t,n,r,i,o,a,s)},A}(),U=t(16).IFloodgateStorageProvider.FileType,S=((y={})[U.CampaignDefinitions]="obf-CampaignDefinitions",y[U.CampaignStates]="obf-CampaignStates",y[U.FloodgateSettings]="obf-FloodgateSettings",y[U.GovernedChannelStates]="obf-GovernedChannelStates",y[U.SurveyActivationStats]="obf-SurveyActivationStats",y[U.SurveyEventActivityStats]="obf-SurveyEventActivityStats",y[U.TmsCache_CampaignContent]="obf-TmsCampaignContent",y[U.TmsCache_MessageMetadata]="obf-TmsMessageMetadata",y[U.TmsCache_UserGovernance]="obf-TmsUserGovernance",y[U.Tms_DynamicSettings]="obf-TmsDynamicSettings",y[U.LogLevelSettings]="obf-LogLevelSettings",y[U.UserFacts]="obf-UserFacts",y[U.DebugOverrides]="obf-DebugOverrides",y),E=function(){function A(){}return A.isStorageAvailable=function(){try{var A="__storage_test__";return u().localStorage.setItem(A,A),u().localStorage.removeItem(A),!0}catch(A){return A instanceof DOMException&&(22===A.code||1014===A.code||"QuotaExceededError"===A.name||"NS_ERROR_DOM_QUOTA_REACHED"===A.name)&&0!==u().localStorage.length}},A.safeReadObject=function(A,e){if(void 0===e&&(e=void 0),!(A in U))return e;try{var t=S[A],n=u().localStorage.getItem(t),r=!n||"{"!==n[0]&&"["!==n[0]?n:JSON.parse(n);return null!=r?r:e}catch(A){}return e},A.prototype.fileLock=function(A){},A.prototype.fileUnlock=function(A){},A.prototype.read=function(A){if(!(A in U))return"";var e,t=S[A];try{e=u().localStorage.getItem(t)}catch(A){return M().logEvent(b.SURVEY_FLOODGATE_FILEREAD_FAILED,2,{ErrorMessage:A.toString(),FileName:t}),""}return e},A.prototype.write=function(A,e){if(A in U){var t=S[A];try{u().localStorage.setItem(t,e)}catch(A){return void M().logEvent(b.SURVEY_FLOODGATE_FILEWRITE_FAILED,2,{ErrorMessage:A.toString(),FileName:t})}}},A}(),I=t(6),b=function(){function A(){}var e,t,n,r,i,o,a,s,c,u,l,g,d,B,h,p,f,m,C,v,w,y,F,Q,U,S,E,I,b,T,H,L,D,O,_,x,M,P,K,k,N,R,V,G,J;return A.InApp=((e=function(){}).UI=((t=function(){}).Picker=((n=function(){}).Shown=((r=function(){}).VALUE={name:"InApp_UI_Picker_Shown"},r),n),t.Form=((i=function(){}).Shown=((o=function(){}).VALUE={name:"InApp_UI_Form_Shown"},o),i.Submit=((a=function(){}).VALUE={name:"InApp_UI_Form_Submit"},a),i),t),e),A.SURVEY_FLOODGATE_CAMPAIGNLOAD_FAILED={name:"Survey_Floodgate_CampaignLoad_Failed"},A.SURVEY_FLOODGATE_FILEREAD_FAILED={name:"Survey_Floodgate_FileRead_Failed"},A.SURVEY_FLOODGATE_FILEWRITE_FAILED={name:"Survey_Floodgate_FileWrite_Failed"},A.SURVEY_FLOODGATE_TRIGGERMET={name:"Survey_Floodgate_TriggerMet"},A.SURVEY_FLOODGATE_USERSELECTED={name:"Survey_Floodgate_UserSelected"},A.SURVEY_UI_FORM_SHOWN={name:"Survey_UI_Form_Shown"},A.SURVEY_UI_FORM_DISPATCHER_IMPLEMENTED={name:"Survey_UI_Form_Dispatcher_Implemented"},A.SURVEY_UI_FORM_SUBMIT={name:"Survey_UI_Form_Submit"},A.SURVEY_UI_FORM_SECONDARY_SUBMIT={name:"Survey_UI_Form_Secondary_Submit"},A.SURVEY_UI_FORM_SUBMIT_ERROR={name:"Survey_UI_Form_Submit_Error"},A.SURVEY_UI_FORM_USERCLOSED={name:"Survey_UI_Form_UserClosed"},A.SURVEY_UI_THANKYOUPAGE_USERCLOSED={name:"Survey_UI_ThankYouPage_UserClosed"},A.SURVEY_UI_FORM_NO_RETURN_TYPE={name:"Survey_UI_Form_No_Return_Type"},A.SURVEY_UI_PROMPT_AUTODISMISSED={name:"Survey_UI_Prompt_AutoDismissed"},A.SURVEY_UI_THANKYOUPAGE_AUTODISMISSED={name:"Survey_UI_ThankYouPage_AutoDismissed"},A.SURVEY_UI_PROMPT_SHOWN={name:"Survey_UI_Prompt_Shown"},A.SURVEY_UI_PROMPT_USERCLOSED={name:"Survey_UI_Prompt_UserClosed"},A.SURVEY_UI_ADDITIONALPROMPT_USERCLOSED={name:"Survey_UI_AdditionalPrompt_UserClosed"},A.SURVEY_UI_PROMPT_CLICKED={name:"Survey_UI_Prompt_Clicked"},A.SURVEY_UI_ADDITIONALPROMPT_CLICKED={name:"Survey_UI_AdditionalPrompt_Clicked"},A.SURVEY_UI_REDIRECTIONFAILURE={name:"Survey_UI_RedirectionFailure"},A.GOVERNANCE_SERVICEFAILURE={name:"Gorvenance_ServiceFailure"},A.GOVERNANCE_SERVICERESULT={name:"Gorvenance_ServiceResult"},A.DYNAMICTRANSPORT_POST_ERROR={name:"DynamicTransport_Post_Error"},A.FEEDBACK_SURVEYSDISABLED_AADC={name:"Feedback_SurveysDisabled_AADC"},A.SURVEY_UI_DISABLED_AADC={name:"Survey_UI_Prevented_AADC"},A.PERSONALIZER_SERVICEREWARDRESULT={name:"Personalizer_ServiceRewardResult"},A.PERSONALIZER_CLIENTFAILURE={name:"Personalizer_ClientFailure"},A.APPDATA_JSON_PARSE_ERROR={name:"AppData_JSON_Parse_Error"},A.SURVEY_RENDER_OVERRIDE_ERROR={name:"Survey_Render_Override_Error"},A.SURVEY_RENDER_OVERRIDE_SUCCESS={name:"Survey_Render_Override_Success"},A.SURVEY_EVENT_KEY_ERROR={name:"Survey_Event_Key_Error"},A.Shared=((s=function(){}).Upload=((c=function(){}).Failed=((u=function(){}).VALUE={name:"Shared_Upload_Failed"},u),c.Prevented=((l=function(){}).VALUE={name:"Shared_Upload_Prevented_AADC"},l),c),s.Screenshot=((g=function(){}).Render=((d=function(){}).Failed=((B=function(){}).VALUE={name:"Shared_Screenshot_Render_Failed"},B),d.Success=((h=function(){}).VALUE={name:"Shared_Screenshot_Render_Success"},h),d),g.GetContent=((p=function(){}).Failed=((f=function(){}).DefaultImage=((m=function(){}).Returned=((C=function(){}).VALUE={name:"Shared_Screenshot_GetContent_Failed_DefaultImage_Returned"},C),m),f),p),g),s),A.WebSurfaces=((v=function(){}).Common=((w=function(){}).Error=((y=function(){}).VALUE={name:"WebSurfaces_Common_Error"},y),w.Info=((F=function(){}).VALUE={name:"WebSurfaces_Common_Info"},F),w),v.CampaignMetadataAggregator=((Q=function(){}).Error=((U=function(){}).VALUE={name:"WebSurfaces_CampaignMetadataAggregator_Error"},U),Q.Requests=((S=function(){}).VALUE={name:"WebSurfaces_CampaignMetadataAggregator_Requests"},S),Q),v.SetCampaignAction=((E=function(){}).Error=((I=function(){}).VALUE={name:"WebSurfaces_SetCampaignAction_Error"},I),E.Requests=((b=function(){}).VALUE={name:"WebSurfaces_SetCampaignAction_Requests"},b),E),v),A.UserFacts=((T=function(){}).Common=((H=function(){}).Error=((L=function(){}).VALUE={name:"UserFacts_Common_Error"},L),H.Info=((D=function(){}).VALUE={name:"UserFacts_Common_Info"},D),H),T.LocalFact=((O=function(){}).Error=((_=function(){}).VALUE={name:"UserFacts_LocalFact_Error"},_),O),T.Messaging=((x=function(){}).Requests=((M=function(){}).VALUE={name:"UserFacts_Messaging_Requests"},M),x),T.AugLoop=((P=function(){}).Requests=((K=function(){}).VALUE={name:"UserFacts_AugLoop_Requests"},K),P.Error=((k=function(){}).VALUE={name:"UserFacts_AugLoop_Error"},k),P),T.Provider=((N=function(){}).Info=((R=function(){}).VALUE={name:"UserFacts_Provider_Summary"},R),N),T),A.Common=((V=function(){}).Error=((G=function(){}).VALUE={name:"Common_Error"},G),V.Info=((J=function(){}).VALUE={name:"Common_Info"},J),V),A}(),T=C.i,H=function(){function A(A){this.useLocalStorage=!1,this.cachedItems={},this.initialize(A)}return A.prototype.setContentItem=function(A,e,t){var n=this.createItem(A,e,t);return this.setItem(n),n},A.prototype.getItemContent=function(A){var e=this.getItem(A);return e&&e.content},A.prototype.has=function(A){return A in this.cachedItems},A.prototype.isItemExpired=function(A){var e=this.getItem(A);return!e||!e.expiryDate||e.expiryDate."+J.c.ChoiceGroupIcon+" { border-color: "+A+" } ."+J.c.ChoiceGroup+" input[type=radio]:hover+label>."+J.c.ChoiceGroupIcon+" { border-color: "+e+" } ."+J.c.ChoiceGroup+" input[type=radio]:checked+label>."+J.c.ChoiceGroupIcon+">span { background-color: "+A+" } ."+J.c.SubmitButton+" { background-color: "+A+" } ."+J.c.SubmitButton+":hover { background-color: "+e+" } ."+J.c.CancelButton+" { background-color: "+A+" } ."+J.c.CancelButton+":hover { background-color: "+e+" } ."+J.c.Link+" { color: "+A+" } ."+J.c.Link+":hover { color: "+e+" } ."+J.c.ThanksPanelTitle+" { color: "+A+" } #"+J.d.TPromptTitle+" { color: "+A+" } #"+J.d.TFormTitle+" { color: "+A+" } ",document.body.appendChild(t)}(t.primaryColour,t.secondaryColour),(t.customResourcesSetExternally&o.CustomResources.Strings)===o.CustomResources.Strings)G()||e("Expected custom strings to be set by host but UIStrings.getUIStrings() is null or undefined"),q=!0,A();else{var r=t.intlUrl+t.locale.toLowerCase()+"/"+t.intlFilename;(i=r,void 0===a&&(a=window.origin),new Promise((function(A,e){var t=document.createElement("script");t.async=!0,t.readyState?t.onreadystatechange=function(){"loaded"!==t.readyState&&"complete"!==t.readyState||(t.onreadystatechange=null,A())}:t.onload=function(){A()},t.onerror=function(){e()},t.src=i,a&&"null"!==a&&(t.crossOrigin="anonymous");var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n)}))).then((function(){G()?(q=!0,A()):e("UiStrings were not loaded from "+r)})).catch((function(A){e("Script load failed for "+r+". "+A)}))}}var i,a}))}Z=function(A){!function(A){P=A}(A)},s.setUiStrings=Z,function(A){s.createScreenshot=A}(X),c().OfficeBrowserFeedback.html2canvas=z;var $=t(3);function AA(A,e,t,n){if(void 0===e)return Promise.reject(new Error("Manifest cannot be undefined"));var r,i,a,s,c,u,l,g=new FormData;return g.append("Manifest",e),t&&g.append("Screenshot",t),n&&g.append("Diagnostics",n),r="POST",i=A?"https://petrol.office.microsoft.com/v1/feedback":"https://petrol-int.office.microsoft.com/v1/feedback",a=g,s=2,c=function(A,e,t){200!==A.status&&t(new Error("Non-200 response with status code: "+A.status+", response: "+A.responseText)),e()},u=function(A,e){return new Promise((function(t,n){var o=new XMLHttpRequest;o.open(r,i,!0),o.timeout=e,o.onload=function(){c(o,t,n)},o.ontimeout=function(){A>0?u(A-1,2*e).then(t,n):n(new Error("Request to '"+i+"' timed out. timeout: "+o.timeout))},o.onerror=function(){A>0?u(A-1,e).then(t,n):n(new Error("Request to '"+i+"' errored. "+o.status+" - "+o.statusText+" : "+o.responseText))},o.send(a)}))},l=o.get().getCommonInitOptions().petrolTimeout?o.get().getCommonInitOptions().petrolTimeout:8e3,u(s,l)}var eA=function(){function A(A){this.screenshot=A}return A.prototype.getContent=function(){var A;try{A=this.screenshot.toDataURL("image/jpeg").split(",")[1]}catch(e){M().logEvent(b.Shared.Screenshot.GetContent.Failed.DefaultImage.Returned.VALUE,2,{ErrorMessage:e.toString()}),A="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(var e=atob(A),t=[],n=0;n-1&&(null!=new RegExp("Trident/([0-9]{1,}[.0-9]{0,})").exec(e)&&(A=parseFloat(RegExp.$1),A+=4));return A}function BA(){return"rtl"===getComputedStyle(document.documentElement).direction}function hA(A,e){var t=document.getElementById(A),n=t&&t.checked,r=document.getElementById(e);if(n){iA(e,!0);var i=performance.now();X(document.body).then((function(A){var e=performance.now();M().logEvent(b.Shared.Screenshot.Render.Success.VALUE,1,{TimeMilliseconds:e-i}),r.src=A.toDataURL()})).catch((function(A){var e=performance.now();M().logEvent(b.Shared.Screenshot.Render.Failed.VALUE,2,{ErrorMessage:A,TimeMilliseconds:e-i})}))}else iA(e,!1)}var pA=function(){function A(A){this.circleObjects=[],this.spinnerId=A,this.spinner=document.getElementById(this.spinnerId),this.createCirclesAndArrange(),this.initializeOpacities(),this.start(),iA(A,!0)}return A.prototype.destroy=function(){iA(this.spinnerId,!1),this.stop()},A.prototype.start=function(){var A=this;this.stop(),this.interval=setInterval((function(){for(var e=A.circleObjects.length;e--;)fA(A.circleObjects[e])}),90)},A.prototype.stop=function(){clearInterval(this.interval)},A.prototype.createCirclesAndArrange=function(){for(var A,e=0,t=2*Math.PI/8,n=8;n--;){var r=CA(),i=Math.round(17+13.6*Math.cos(e)-.5*r.clientWidth)-34*.2*.5,o=Math.round(17+13.6*Math.sin(e)-.5*r.clientHeight)-34*.2*.5;this.spinner.appendChild(r),r.style.left=i+"px",r.style.top=o+"px",e+=t,A={element:r,j:n},this.circleObjects.push(A)}},A.prototype.initializeOpacities=function(){for(var A,e=0,t=1;e<8;e++){A=1/8*t++,mA(this.circleObjects[e].element,A)}},A}();function fA(A){var e,t=(e=A.element,parseFloat(window.getComputedStyle(e).getPropertyValue("opacity"))-1/8);t<=0&&(t=1),mA(A.element,t)}function mA(A,e){A.style.opacity=e.toString()}function CA(){var A=document.createElement("div");return A.classList.add(J.c.SpinnerCircle),A.style.width=A.style.height=34*.2+"px",A}function vA(A){var e=document.getElementById(J.d.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]");if(A.id===J.d.LastTabbable)for(var t=0;t=0;t--){var n;if((n=e[t]).id!==J.d.LastTabbable&&wA(n))return void n.focus()}}function wA(A){if(!A.parentElement)return!1;if(/\S/.test(A.parentElement.id)){if(A.parentElement.className.indexOf(J.c.Visible)>=0)return!0;if(A.parentElement.className.indexOf(J.c.Hidden)>=0)return!1}return wA(A.parentElement)}var yA,FA,QA,UA=!1,SA=!0,EA=void 0,IA=void 0,bA=[J.d.OverallSmileAnchor,J.d.OverallFrownAnchor,J.d.OverallIdeaAnchor,J.d.OverallBugAnchor];function TA(A){var e;for(e=0;e0&&c.setCategory(p.value),M().logEvent(b.InApp.UI.Form.Submit.VALUE,1,{FeedbackType:EA,IsEmailIncluded:d,IsScreenshotIncluded:h}),h){var f=performance.now();X(document.body).then((function(A){var e=performance.now();M().logEvent(b.Shared.Screenshot.Render.Success.VALUE,1,{TimeMilliseconds:e-f}),c.setScreenshot(A),c.submit()})).catch((function(A){var e=performance.now();M().logEvent(b.Shared.Screenshot.Render.Failed.VALUE,2,{ErrorMessage:A,TimeMilliseconds:e-f}),c.submit()}))}else c.submit();s.destroy(),o.get().setFeedbackSubmitted(!0),o.get().getInAppFeedbackInitOptions().isShowThanks?function(A){EA=void 0,IA=0,WA(J.d.ThanksPanelContainer,!1),NA(A,void 0)}(i):HA()}}function ZA(A){WA(J.d.ThanksPanelContainer,!0),HA()}function zA(A){A.preventDefault(),A.stopPropagation(),window.open(o.get().getInAppFeedbackInitOptions().feedbackForumUrl),HA()}function qA(A,e){return function(t){hA(A,e)}}function jA(){HA()}function $A(A){var e=document.getElementById(J.d.EmailCheckBox);if(e){var t=document.getElementById(J.d.SingleFormEmailInput);t||(t=document.getElementById(J.d.BasicFormEmailInput)),t.value=e.checked?o.get().getCommonInitOptions().userEmail:null,t.disabled=!e.checked}}function Ae(A){var e=document.getElementById(J.d.BasicFormComment),t=e&&!!e.value;document.getElementById(J.d.BasicFormSubmitButton).disabled=!t}function ee(A){var e=document.getElementById(J.d.SingleFormComment),t=e&&!!e.value;document.getElementById(J.d.SingleFormSubmitButton).disabled=!t}function te(A){for(var e=A||[],t=[{attributes:[{name:"selected",value:"true"}],innerText:G().Form.CategoryPlaceholder,tag:J.g.Option}],n=0,r=e;n',J.d.OverallSmileText,G().SmileForm.Anchor)),$.a.Frown in A&&e.children.push(Ee(J.d.OverallFrownAnchor,J.d.OverallFrownImage,'',J.d.OverallFrownText,G().FrownForm.Anchor)),$.a.IdeaRedirect in A&&e.children.push(Ee(J.d.OverallFeedbackPortalIdeaAnchor,J.d.OverallIdeaImage,'',J.d.OverallIdeaText,G().IdeaForm.Anchor)),$.a.Idea in A&&e.children.push(Ee(J.d.OverallIdeaAnchor,J.d.OverallIdeaImage,'',J.d.OverallIdeaText,G().IdeaForm.Anchor)),$.a.Bug in A&&e.children.push(Ee(J.d.OverallBugAnchor,J.d.OverallBugImage,'',J.d.OverallBugText,G().BugForm.Anchor)),e.children}function Ee(A,e,t,n,r){return{attributes:[{name:J.a.Type,value:J.b.Button},{name:J.a.Role,value:J.b.Tab},{name:J.a.AriaLabel,value:r},{name:J.a.AriaSelected,value:J.b.False}],children:[{classes:[J.c.OverallImage],id:e,innerHTML:t,tag:J.g.Div},{classes:[J.c.FontSubtitle,J.c.OverallText],id:n,innerText:r}],classes:[J.c.OverallAnchor,J.c.TextAlignLeft],id:A,tag:J.g.Button}}function Ie(A,e){if(void 0===A.brs&&(A.brs=!0),!A.brs)return null;var t;if(A.tag||(A.tag=J.g.Div),A.tag===J.g.Svg&&(e=!0),t=e?document.createElementNS("http://www.w3.org/2000/svg",A.tag):document.createElement(A.tag),A.attributes)for(var n=void 0,r=0;r'+e+""}function He(){var A,e,t,n,r,i=(null===(A=G().ThanksPanel)||void 0===A?void 0:A.AppreciateText)+"

";if(o.get().getCommonInitOptions().ageGroup===be.a.Undefined||o.get().getCommonInitOptions().ageGroup===be.a.Adult){if(o.get().getInAppFeedbackInitOptions().myFeedbackForumUrl)i=i+" "+((null===(e=G().ThanksPanel)||void 0===e?void 0:e.MyFeedbackDescription)+"\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t"+Te(o.get().getInAppFeedbackInitOptions().myFeedbackForumUrl,null===(t=G().ThanksPanel)||void 0===t?void 0:t.MyFeedbackLinkText)+"\n\t\t\t\t\t\t\t\t

");if(o.get().getInAppFeedbackInitOptions().feedbackForumUrl)i=i+" "+((null===(n=G().ThanksPanel)||void 0===n?void 0:n.FeedbackPortalDescription)+"\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t"+Te(o.get().getInAppFeedbackInitOptions().feedbackForumUrl,null===(r=G().ThanksPanel)||void 0===r?void 0:r.FeedbackPortalLinkText)+"\n\t\t\t\t\t\t\t\t

")}return i}function Le(){var A,e,t,n,r,i,a=o.get().getCommonInitOptions().primaryColour;return{children:[{tag:J.g.Div,id:J.d.ThanksPanelInnerContainer,children:[{innerHTML:"
",tag:J.g.Div},{id:J.d.ThanksPanelDiscussion,innerHTML:'\n\t\n\t\t\n\t\n\tcommentsOffice\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n',tag:J.g.Div},{id:J.d.ThanksPanelVerticalContainer,tag:J.g.Div,children:[{classes:[J.c.FontTitle,J.c.TextAlignLeft,J.c.FormQuestionMiddleText,J.c.ThanksPanelTitle],innerText:null===(A=G().ThanksPanel)||void 0===A?void 0:A.Title,tag:J.g.Div},{classes:[J.c.FontSubText,J.c.TextAlignLeft,J.c.ThanksPanelMessage],innerHTML:He(),tag:J.g.Div,id:J.d.ThanksPanelParagraph},{classes:[J.c.SubmitButton],id:J.d.ThanksPanelCloseButton,innerText:null===(e=G().ThanksPanel)||void 0===e?void 0:e.Close,ariaLabel:null===(t=G().ThanksPanel)||void 0===t?void 0:t.Close,tag:J.g.Button,role:J.f.Button,attributes:[{name:"aria-label",value:(null===(n=G().ThanksPanel)||void 0===n?void 0:n.Title)+" "+(null===(r=G().ThanksPanel)||void 0===r?void 0:r.AppreciateText)+" "+(null===(i=G().ThanksPanel)||void 0===i?void 0:i.Close)},{name:"type",value:"button"}]}]},{innerHTML:"
",tag:J.g.Div}]}],classes:[J.c.Hidden],id:De}}var De=J.d.ThanksPanelContainer;function Oe(A){0===A&&document.getElementById(J.d.ThanksPanelCloseButton).focus()}var _e=0;function xe(){}var Me=J.d.FeedbackPortalIdeaContainer;function Pe(A){}var Ke=LA.FeedbackPortalIdea;function ke(A){var e={};o.get().getInAppFeedbackInitOptions().isShowThanks&&(e[0]=r);var t={},a=o.get().getInAppFeedbackInitOptions().transitionEnabled;t[$.a.Smile]=n,t[$.a.Frown]=n,void 0!==o.get().getInAppFeedbackInitOptions().feedbackForumUrl?t[$.a.IdeaRedirect]=i:t[$.a.Idea]=n,o.get().getInAppFeedbackInitOptions().bugForm&&(t[$.a.Bug]=n),Re(Ie(function(A,e){return{attributes:[{name:J.a.DataHtml2CanvasIgnore,value:J.b.True}],children:[{attributes:[{name:J.a.Role,value:J.b.Dialog},{name:J.a.AriaModal,value:J.b.True}],children:[{attributes:[{name:J.a.Role,value:J.b.TabList},{name:J.a.AriaDescribedBy,value:J.d.QuestionLeftText},{name:J.a.AriaLabel,value:G().FeedbackSubtitle},{name:J.a.AriaOrientation,value:J.b.AriaOrientationValueVertical}],children:[{attributes:[{name:J.a.TabIndex,value:J.b.Zero}],id:J.d.FirstTabbable},{attributes:[{name:J.a.Type,value:J.b.Button},{name:J.a.AriaLabel,value:G().CloseLabel}],id:J.d.CloseButton,classes:[J.c.CloseButton],innerHTML:'',tag:J.g.Button},{children:[{classes:[J.c.FormWideContainer,J.c.Hidden],children:Ue(e),id:J.d.LeftPanelContainer,tag:J.g.Div},{children:[{classes:[J.c.FontSubtitle,J.c.TextAlignLeft],id:J.d.QuestionLeftText,innerText:G().FeedbackSubtitle},{children:[{children:Se(A),id:J.d.OverallAnchorsContainer}],id:J.d.ColumnSeparatorDiv}],classes:[J.c.FormContainer],id:J.d.LeftFormContainer},{children:Qe(A),classes:[J.c.FormContainer,o.get().getInAppFeedbackInitOptions().transitionEnabled?J.c.Hidden:J.c.Visible],attributes:[{name:J.a.Role,value:J.b.TabPanel},{name:J.a.AriaExpanded,value:J.b.False}],id:J.d.MiddleFormContainer}],classes:[J.c.Hidden],id:J.d.MainContentHolder,tag:J.g.Form},{attributes:[{name:J.a.TabIndex,value:J.b.Zero}],id:J.d.LastTabbable}],id:J.d.MainContainer}],classes:[BA()?J.c.Rtl:""],id:J.d.OverlayBackground}]}}(t,e)));var s,c=!window.innerWidth||window.innerWidth<800;void 0===(s=function(e){iA(J.d.OverlayBackground,!1),oA(J.d.OverlayBackground),o.get().getInAppFeedbackInitOptions().onDismiss(e),A()})&&(s=function(A){}),UA=c,FA=t,QA=e,SA=a,OA(J.d.OverallSmileAnchor,"click",RA),OA(J.d.OverallFrownAnchor,"click",VA),OA(J.d.OverallIdeaAnchor,"click",GA),OA(J.d.OverallBugAnchor,"click",JA),OA(J.d.CloseButton,"click",(function(){HA()})),OA(J.d.BasicFormSubmitButton,"click",XA(J.d.BasicFormSubmitButton,J.d.BasicFormSubmitButtonSpinner,J.d.BasicFormComment,J.d.BasicFormEmailInput,J.d.BasicFormScreenshotCheckbox,J.d.BasicFormScreenshotPreview,J.d.BasicFormCategoriesDropdown)),OA(J.d.BasicFormScreenshotCheckbox,"click",qA(J.d.BasicFormScreenshotCheckbox,J.d.BasicFormScreenshotPreview)),OA(J.d.OverallFeedbackPortalIdeaAnchor,"click",zA),OA(J.d.ThanksPanelCloseButton,"click",(function(A){return ZA()})),OA(J.d.BasicFormCancelButton,"click",jA),_A(s),SA||(aA(J.d.MainContentHolder,J.c.MarginLeft180px),aA(J.d.ColumnSeparatorDiv,J.c.ShowRightBorder)),c&&aA(J.d.OverlayBackground,J.c.NarrowLayout)}function Ne(A,e){var t={};o.get().getInAppFeedbackInitOptions().isShowThanks&&(t[0]=r),Re(Ie(function(A){var e;return{attributes:[{name:J.a.DataHtml2CanvasIgnore,value:J.b.True}],children:[{attributes:[{name:J.a.Role,value:J.b.Dialog},{name:J.a.AriaModal,value:J.b.True}],children:[{children:[{attributes:[{name:J.a.TabIndex,value:J.b.Zero}],id:J.d.FirstTabbable},{attributes:[{name:J.a.Type,value:J.b.Button},{name:J.a.AriaLabel,value:G().CloseLabel}],id:J.d.CloseButton,classes:[J.c.CloseButton],innerHTML:'',tag:J.g.Button},{children:[{children:[(e=o.get().getInAppFeedbackLaunchOptions().categories,{children:[{attributes:[{name:J.a.For,value:J.d.SingleFormComment}],classes:[J.c.FontSubtitle,J.c.TextAlignLeft,J.c.FormQuestionMiddleText],id:J.d.SingleFormQuestionMiddleText,innerText:G().FeedbackSubtitle,tag:J.g.Label},{attributes:[{name:J.a.Id,value:J.d.SingleFormCategoriesDropdown}],brs:e.show,children:te(e?e.customCategories:null),classes:[J.c.FontSubText,J.c.FormCategoriesDropdown,J.c.TextInput],tag:J.g.Select},{attributes:[{name:J.a.Placeholder,value:G().Form.CommentPlaceholder},{name:J.a.MaxLength,value:J.b.TextAreaMaxLength}],classes:[J.c.FontSubText,J.c.FormComment,J.c.TextInput],id:J.d.SingleFormComment,tag:J.g.TextArea},{brs:!1,children:[{attributes:[{name:J.a.For,value:J.d.SingleFormRating}],classes:[J.c.FontSubText,J.c.TextAlignLeft,J.c.FormRatingLabel],innerText:G().Form.RatingLabel,tag:J.g.Label},pe(J.d.SingleFormRating)],classes:[J.c.FormRatingContainer]},{brs:ve(),children:[{attributes:[{name:J.a.Type,value:J.b.Checkbox},{name:J.b.Unchecked,value:""}],classes:[J.c.FormEmailCheckBox,J.c.CheckBox],id:J.d.EmailCheckBox,tag:J.g.Input},{attributes:[{name:J.a.For,value:J.d.EmailCheckBox}],classes:[J.c.FontSubText,J.c.TextAlignLeft,J.c.FormEmailLabel],innerText:G().Form.EmailCheckBoxLabel,tag:J.g.Label},{attributes:[{name:J.a.Type,value:J.b.Text},{name:J.a.Placeholder,value:G().Form.EmailPlaceholder},{name:J.a.AriaLabel,value:G().Form.EmailPlaceholder},{name:J.a.Name,value:J.d.SingleFormEmailInput},{name:J.a.MaxLength,value:J.b.TextAreaMaxLength},{name:J.a.Value,value:o.get().getInAppFeedbackInitOptions().userEmail?o.get().getInAppFeedbackInitOptions().userEmail:""}],classes:[J.c.FontSubText,J.c.FormEmailInput,J.c.TextInput],id:J.d.SingleFormEmailInput,tag:J.g.Input}],classes:[J.c.FormEmailContainer]},{children:[{attributes:[{name:J.a.Type,value:J.b.Checkbox},{name:J.a.Value,value:J.b.Unchecked}],brs:we(),classes:[J.c.FormScreenshotCheckbox,J.c.CheckBox],id:J.d.SingleFormScreenshotCheckbox,tag:J.g.Input},{attributes:[{name:J.a.For,value:J.d.SingleFormScreenshotCheckbox}],brs:we(),classes:[J.c.FontText,J.c.TextAlignLeft,J.c.FormScreenshotLabel],innerText:G().Form.ScreenshotLabel,tag:J.g.Label},{attributes:[{name:J.a.Preview,value:J.b.ScreenshotPreview}],brs:o.get().getInAppFeedbackInitOptions().screenshot,id:J.d.SingleFormScreenshotPreview,classes:[J.c.FormScreenshotPreview],tag:J.g.Img}],classes:[J.c.FormScreenshotContainer]},{children:[{classes:[J.c.FontSubSubText,J.c.TextAlignLeft],innerText:G().Form.PrivacyLabel,tag:J.g.Label},{classes:[J.c.FontSubSubText,J.c.TextAlignLeft],innerText:o.get().getCommonInitOptions().isCommercialHost?G().Form.PrivacyConsent+" ":"",tag:J.g.Label},{attributes:[{name:J.a.HRef,value:o.get().getCommonInitOptions().privacyUrl},{name:J.a.Target,value:J.b.BlankWindow},{name:J.a.Rel,value:J.b.NoReferrer}],classes:[J.c.Link],id:J.d.PrivacyStatementLink,innerText:G().PrivacyStatement,tag:J.g.Anchor}],classes:[J.c.FontSubSubText,J.c.TextAlignLeft,J.c.PrivacyStatementLinkDiv]},{children:[{attributes:[{name:J.a.Type,value:J.b.Button},{name:J.a.AriaLabel,value:G().Form.Cancel}],classes:[J.c.CancelButton],id:J.d.SingleFormCancelButton,innerText:G().Form.Cancel,tag:J.g.Button},{attributes:[{name:J.a.Disabled,value:J.b.True}],classes:[J.c.SubmitButton],id:J.d.SingleFormSubmitButton,innerText:G().Form.Submit,tag:J.g.Button},{classes:[J.c.Spinner,J.c.Hidden],id:J.d.SingleFormSubmitButtonSpinner,tag:J.g.Div}],classes:[J.c.FormSubmitButtonContainer]}],id:Fe})],classes:[J.c.FormContainer],id:J.d.MiddleFormContainer}].concat(Ue(A)),classes:[J.c.Hidden],id:J.d.MainContentHolder,tag:J.g.Form},{attributes:[{name:J.a.TabIndex,value:J.b.Zero}],id:J.d.LastTabbable}],id:J.d.MainContainer}],classes:[J.c.SingleLayout,BA()?J.c.Rtl:""],id:J.d.OverlayBackground}]}}(t))),function(A,e,t){void 0===t&&(t=function(A){}),EA=A,QA=e,OA(J.d.SingleFormSubmitButton,"click",XA(J.d.SingleFormSubmitButton,J.d.SingleFormSubmitButtonSpinner,J.d.SingleFormComment,J.d.SingleFormEmailInput,J.d.SingleFormScreenshotCheckbox,J.d.SingleFormScreenshotPreview,J.d.SingleFormCategoriesDropdown)),OA(J.d.SingleFormScreenshotCheckbox,"click",qA(J.d.SingleFormScreenshotCheckbox,J.d.SingleFormScreenshotPreview)),OA(J.d.CloseButton,"click",(function(){HA()})),OA(J.d.ThanksPanelCloseButton,"click",(function(A){return ZA(A)})),OA(J.d.SingleFormCancelButton,"click",jA),_A(t)}(e,t,(function(e){iA(J.d.OverlayBackground,!1),oA(J.d.OverlayBackground),o.get().getInAppFeedbackInitOptions().onDismiss(e),A()})),aA(J.d.OverlayBackground,J.c.SingleLayout),hA(J.d.SingleFormScreenshotCheckbox,J.d.SingleFormScreenshotPreview)}function Re(A){document.body.insertBefore(A,document.body.firstChild),iA(J.d.OverlayBackground,!0),dA()>9||-1===dA()?setTimeout(Ve,900):Ve()}function Ve(){iA(J.d.MainContentHolder,!0),document.getElementById(J.d.OverallSmileAnchor)?(document.getElementById(J.d.OverallSmileAnchor).focus(),hA(J.d.BasicFormScreenshotCheckbox,J.d.BasicFormScreenshotPreview)):document.getElementById(J.d.SingleFormComment)&&(document.getElementById(J.d.SingleFormComment).focus(),hA(J.d.SingleFormScreenshotCheckbox,J.d.SingleFormScreenshotPreview))}var Ge=!1;function Je(){return new Promise((function(A,e){if(Ge)A();else{try{V()}catch(A){e("CommonApp initialization failed: {"+A+"}")}j().then((function(){o.get().setInAppFeedbackInitOptions(c().OfficeBrowserFeedback.initOptions),Ge=!0,A()})).catch((function(A){e("Initialization failed: {"+A+"}")}))}}))}var We=!1;function Ye(A){return new Promise((function(e,t){We?t("Control already open"):Je().then((function(){o.get().setInAppFeedbackLaunchOptions(A),ke((function(){We=!1})),M().logEvent(b.InApp.UI.Picker.Shown.VALUE,1,{IsBugEnabled:o.get().getInAppFeedbackInitOptions().bugForm}),We=!0,e()})).catch((function(A){t("Initialization failed: {"+A+"}")}))}))}function Xe(A,e){return new Promise((function(t,n){if(We)n("Control already open");else{var r=o.validateFeedbackType(A);Je().then((function(){o.get().setInAppFeedbackLaunchOptions(e),Ne((function(){We=!1}),r),M().logEvent(b.InApp.UI.Form.Shown.VALUE,1,{FeedbackType:r}),We=!0,t()})).catch((function(A){n("Initialization failed: {"+A+"}")}))}}))}function Ze(){return c().OfficeBrowserFeedback.initOptions.isCommercialHost&&2===c().OfficeBrowserFeedback.initOptions.sendFeedbackPolicyValue?1:o.get().determineAADCPolicy(c().OfficeBrowserFeedback.initOptions.authenticationType,c().OfficeBrowserFeedback.initOptions.ageGroup)?0:2}function ze(){N=!1,q=!1,Ge=!1,We=!1}!function(A){s.multiFeedback=A}(Ye),function(A){s.singleFeedback=A}(Xe),function(A){s.getFeedbackStatus=A}(Ze)}]); //# sourceMappingURL=officebrowserfeedback.min.js.map