/* Minification failed. Returning unminified contents.
(630,37-38): run-time error JS1195: Expected expression: >
(636,10-11): run-time error JS1195: Expected expression: )
(637,5-6): run-time error JS1002: Syntax error: }
(639,49-50): run-time error JS1002: Syntax error: }
(641,11-12): run-time error JS1195: Expected expression: )
(641,12-13): run-time error JS1004: Expected ';': {
(641,552-553): run-time error JS1195: Expected expression: )
(641,568-569): run-time error JS1004: Expected ';': {
(641,6205-6206): run-time error JS1195: Expected expression: )
(643,18-19): run-time error JS1004: Expected ';': {
(782,1-6): run-time error JS1195: Expected expression: class
(783,1-2): run-time error JS1002: Syntax error: }
(786,14-24): run-time error JS1197: Too many errors. The file might not be a JavaScript file: SinglePost
 */
var Environment;
(function (Environment) {
    var Configuration = /** @class */ (function () {
        function Configuration() {
            this.PassleWebRoot = 'www.passle.net';
            this.ClientWebAPIRoot = 'clientapi.passle.net';
            this.ClientWebSDKRoot = 'sdk.passle.net';
            this.FacebookAppId = '291505782785530';
            this.GoogleAnalyticsId = 'UA-35515402-1';
        }
        return Configuration;
    }());
    Environment.Configuration = Configuration;
})(Environment || (Environment = {}));
var PassleEnvironmentConfig = new Environment.Configuration();
;
var Passel;
(function (Passel) {
    var API;
    (function (API) {
        var Core;
        (function (Core) {
            var BulkImport;
            (function (BulkImport) {
                var BulkImportStatus;
                (function (BulkImportStatus) {
                    BulkImportStatus[BulkImportStatus["Uploaded"] = 0] = "Uploaded";
                    BulkImportStatus[BulkImportStatus["Queued"] = 1] = "Queued";
                    BulkImportStatus[BulkImportStatus["InProgress"] = 2] = "InProgress";
                    BulkImportStatus[BulkImportStatus["Complete"] = 3] = "Complete";
                })(BulkImportStatus = BulkImport.BulkImportStatus || (BulkImport.BulkImportStatus = {}));
            })(BulkImport = Core.BulkImport || (Core.BulkImport = {}));
        })(Core = API.Core || (API.Core = {}));
    })(API = Passel.API || (Passel.API = {}));
})(Passel || (Passel = {}));
(function (Passel) {
    var API;
    (function (API) {
        var Domain;
        (function (Domain) {
            var EmbeddedObjects;
            (function (EmbeddedObjects) {
                var EmbeddedObjectType;
                (function (EmbeddedObjectType) {
                    EmbeddedObjectType[EmbeddedObjectType["None"] = 0] = "None";
                    EmbeddedObjectType[EmbeddedObjectType["YoutubeVideo"] = 1] = "YoutubeVideo";
                    EmbeddedObjectType[EmbeddedObjectType["VimeoVideo"] = 2] = "VimeoVideo";
                    EmbeddedObjectType[EmbeddedObjectType["SlideSharePresentation"] = 3] = "SlideSharePresentation";
                    EmbeddedObjectType[EmbeddedObjectType["DailyMotionVideo"] = 4] = "DailyMotionVideo";
                    EmbeddedObjectType[EmbeddedObjectType["Buto"] = 5] = "Buto";
                    EmbeddedObjectType[EmbeddedObjectType["SoundCloud"] = 6] = "SoundCloud";
                    EmbeddedObjectType[EmbeddedObjectType["PodBean"] = 7] = "PodBean";
                })(EmbeddedObjectType = EmbeddedObjects.EmbeddedObjectType || (EmbeddedObjects.EmbeddedObjectType = {}));
            })(EmbeddedObjects = Domain.EmbeddedObjects || (Domain.EmbeddedObjects = {}));
        })(Domain = API.Domain || (API.Domain = {}));
    })(API = Passel.API || (Passel.API = {}));
})(Passel || (Passel = {}));
(function (Passel) {
    var API;
    (function (API) {
        var Domain;
        (function (Domain) {
            var Models;
            (function (Models) {
                var ImageSource;
                (function (ImageSource) {
                    ImageSource[ImageSource["Unknown"] = 0] = "Unknown";
                    ImageSource[ImageSource["ScrapedFromPage"] = 1] = "ScrapedFromPage";
                    ImageSource[ImageSource["FromOpenGraphTags"] = 2] = "FromOpenGraphTags";
                    ImageSource[ImageSource["FromFlickr"] = 3] = "FromFlickr";
                    ImageSource[ImageSource["UploadedByUser"] = 4] = "UploadedByUser";
                    ImageSource[ImageSource["Pixabay"] = 5] = "Pixabay";
                    ImageSource[ImageSource["PDFGeneratedThumbnail"] = 6] = "PDFGeneratedThumbnail";
                    ImageSource[ImageSource["GettyiStock"] = 7] = "GettyiStock";
                    ImageSource[ImageSource["VideoGeneratedThumbnail"] = 8] = "VideoGeneratedThumbnail";
                })(ImageSource = Models.ImageSource || (Models.ImageSource = {}));
                var UserType;
                (function (UserType) {
                    UserType[UserType["Standard"] = 0] = "Standard";
                    UserType[UserType["LegacySubscriber"] = 1] = "LegacySubscriber";
                    UserType[UserType["SystemAdministrator"] = 2] = "SystemAdministrator";
                    UserType[UserType["Subscriber"] = 3] = "Subscriber";
                })(UserType = Models.UserType || (Models.UserType = {}));
            })(Models = Domain.Models || (Domain.Models = {}));
        })(Domain = API.Domain || (API.Domain = {}));
    })(API = Passel.API || (Passel.API = {}));
})(Passel || (Passel = {}));
(function (Passel) {
    var API;
    (function (API) {
        var Domain;
        (function (Domain) {
            var Models;
            (function (Models) {
                var AppFeatures;
                (function (AppFeatures_1) {
                    var AppFeatures;
                    (function (AppFeatures) {
                        AppFeatures[AppFeatures["None"] = 0] = "None";
                        AppFeatures[AppFeatures["SendISTATOYToApp"] = 1] = "SendISTATOYToApp";
                    })(AppFeatures = AppFeatures_1.AppFeatures || (AppFeatures_1.AppFeatures = {}));
                })(AppFeatures = Models.AppFeatures || (Models.AppFeatures = {}));
            })(Models = Domain.Models || (Domain.Models = {}));
        })(Domain = API.Domain || (API.Domain = {}));
    })(API = Passel.API || (Passel.API = {}));
})(Passel || (Passel = {}));
(function (Passel) {
    var API;
    (function (API) {
        var Domain;
        (function (Domain) {
            var Models;
            (function (Models) {
                var Bookmark;
                (function (Bookmark) {
                    var BookmarkStep;
                    (function (BookmarkStep) {
                        BookmarkStep[BookmarkStep["None"] = 0] = "None";
                        BookmarkStep[BookmarkStep["Options"] = 1] = "Options";
                        BookmarkStep[BookmarkStep["Publish"] = 2] = "Publish";
                        BookmarkStep[BookmarkStep["RequestApproval"] = 3] = "RequestApproval";
                        BookmarkStep[BookmarkStep["TwitterPicker"] = 4] = "TwitterPicker";
                    })(BookmarkStep = Bookmark.BookmarkStep || (Bookmark.BookmarkStep = {}));
                })(Bookmark = Models.Bookmark || (Models.Bookmark = {}));
            })(Models = Domain.Models || (Domain.Models = {}));
        })(Domain = API.Domain || (API.Domain = {}));
    })(API = Passel.API || (Passel.API = {}));
})(Passel || (Passel = {}));
(function (Passel) {
    var API;
    (function (API) {
        var Domain;
        (function (Domain) {
            var Models;
            (function (Models) {
                var Client;
                (function (Client) {
                    var ClientType;
                    (function (ClientType) {
                        ClientType[ClientType["StandardClient"] = 0] = "StandardClient";
                        ClientType[ClientType["TestClient"] = 1] = "TestClient";
                        ClientType[ClientType["NonPayingClient"] = 2] = "NonPayingClient";
                    })(ClientType = Client.ClientType || (Client.ClientType = {}));
                })(Client = Models.Client || (Models.Client = {}));
            })(Models = Domain.Models || (Domain.Models = {}));
        })(Domain = API.Domain || (API.Domain = {}));
    })(API = Passel.API || (Passel.API = {}));
})(Passel || (Passel = {}));
(function (Passel) {
    var API;
    (function (API) {
        var Domain;
        (function (Domain) {
            var Models;
            (function (Models) {
                var CustomDesignTemplate;
                (function (CustomDesignTemplate) {
                    var FeaturedItemPosition;
                    (function (FeaturedItemPosition) {
                        FeaturedItemPosition[FeaturedItemPosition["None"] = 0] = "None";
                        FeaturedItemPosition[FeaturedItemPosition["ContentBottom"] = 1] = "ContentBottom";
                        FeaturedItemPosition[FeaturedItemPosition["ContentTop"] = 2] = "ContentTop";
                        FeaturedItemPosition[FeaturedItemPosition["Header"] = 3] = "Header";
                    })(FeaturedItemPosition = CustomDesignTemplate.FeaturedItemPosition || (CustomDesignTemplate.FeaturedItemPosition = {}));
                })(CustomDesignTemplate = Models.CustomDesignTemplate || (Models.CustomDesignTemplate = {}));
            })(Models = Domain.Models || (Domain.Models = {}));
        })(Domain = API.Domain || (API.Domain = {}));
    })(API = Passel.API || (Passel.API = {}));
})(Passel || (Passel = {}));
(function (Passel) {
    var API;
    (function (API) {
        var Domain;
        (function (Domain) {
            var Models;
            (function (Models) {
                var ISTATOY;
                (function (ISTATOY) {
                    var ISTATOYShareStatus;
                    (function (ISTATOYShareStatus) {
                        ISTATOYShareStatus[ISTATOYShareStatus["None"] = 0] = "None";
                        ISTATOYShareStatus[ISTATOYShareStatus["SentSuccessfully"] = 1] = "SentSuccessfully";
                        ISTATOYShareStatus[ISTATOYShareStatus["NotSentUserUnsubscribed"] = 2] = "NotSentUserUnsubscribed";
                        ISTATOYShareStatus[ISTATOYShareStatus["NotSentPostNotFound"] = 3] = "NotSentPostNotFound";
                        ISTATOYShareStatus[ISTATOYShareStatus["NotSentErrorOccurred"] = 4] = "NotSentErrorOccurred";
                    })(ISTATOYShareStatus = ISTATOY.ISTATOYShareStatus || (ISTATOY.ISTATOYShareStatus = {}));
                })(ISTATOY = Models.ISTATOY || (Models.ISTATOY = {}));
            })(Models = Domain.Models || (Domain.Models = {}));
        })(Domain = API.Domain || (API.Domain = {}));
    })(API = Passel.API || (Passel.API = {}));
})(Passel || (Passel = {}));
(function (Passel) {
    var API;
    (function (API) {
        var Domain;
        (function (Domain) {
            var Models;
            (function (Models) {
                var ISTATOY_Old;
                (function (ISTATOY_Old) {
                    var ISTATOYSource;
                    (function (ISTATOYSource) {
                        ISTATOYSource[ISTATOYSource["Bookmark"] = 0] = "Bookmark";
                        ISTATOYSource[ISTATOYSource["PostView"] = 1] = "PostView";
                    })(ISTATOYSource = ISTATOY_Old.ISTATOYSource || (ISTATOY_Old.ISTATOYSource = {}));
                })(ISTATOY_Old = Models.ISTATOY_Old || (Models.ISTATOY_Old = {}));
            })(Models = Domain.Models || (Domain.Models = {}));
        })(Domain = API.Domain || (API.Domain = {}));
    })(API = Passel.API || (Passel.API = {}));
})(Passel || (Passel = {}));
(function (Passel) {
    var API;
    (function (API) {
        var Domain;
        (function (Domain) {
            var Models;
            (function (Models) {
                var MediaLibrary;
                (function (MediaLibrary) {
                    var MediaType;
                    (function (MediaType) {
                        MediaType[MediaType["None"] = 0] = "None";
                        MediaType[MediaType["Image"] = 1] = "Image";
                        MediaType[MediaType["Video"] = 2] = "Video";
                        MediaType[MediaType["Audio"] = 3] = "Audio";
                        MediaType[MediaType["Embed"] = 4] = "Embed";
                        MediaType[MediaType["Font"] = 5] = "Font";
                        MediaType[MediaType["Document"] = 6] = "Document";
                    })(MediaType = MediaLibrary.MediaType || (MediaLibrary.MediaType = {}));
                })(MediaLibrary = Models.MediaLibrary || (Models.MediaLibrary = {}));
            })(Models = Domain.Models || (Domain.Models = {}));
        })(Domain = API.Domain || (API.Domain = {}));
    })(API = Passel.API || (Passel.API = {}));
})(Passel || (Passel = {}));
(function (Passel) {
    var API;
    (function (API) {
        var Domain;
        (function (Domain) {
            var Models;
            (function (Models) {
                var Messages;
                (function (Messages) {
                    var MessageAttachmentType;
                    (function (MessageAttachmentType) {
                        MessageAttachmentType[MessageAttachmentType["None"] = 0] = "None";
                        MessageAttachmentType[MessageAttachmentType["RecipientsEIScore"] = 1] = "RecipientsEIScore";
                        MessageAttachmentType[MessageAttachmentType["AllUsersEIScore"] = 2] = "AllUsersEIScore";
                        MessageAttachmentType[MessageAttachmentType["PassleUsersEIScore"] = 3] = "PassleUsersEIScore";
                    })(MessageAttachmentType = Messages.MessageAttachmentType || (Messages.MessageAttachmentType = {}));
                })(Messages = Models.Messages || (Models.Messages = {}));
            })(Models = Domain.Models || (Domain.Models = {}));
        })(Domain = API.Domain || (API.Domain = {}));
    })(API = Passel.API || (Passel.API = {}));
})(Passel || (Passel = {}));
(function (Passel) {
    var API;
    (function (API) {
        var Domain;
        (function (Domain) {
            var Models;
            (function (Models) {
                var Newsletter;
                (function (Newsletter) {
                    var NewsletterType;
                    (function (NewsletterType) {
                        NewsletterType[NewsletterType["Unknown"] = 0] = "Unknown";
                        NewsletterType[NewsletterType["Internal"] = 1] = "Internal";
                        NewsletterType[NewsletterType["External"] = 2] = "External";
                        NewsletterType[NewsletterType["LinkedIn"] = 3] = "LinkedIn";
                        NewsletterType[NewsletterType["ThirdParty"] = 4] = "ThirdParty";
                    })(NewsletterType = Newsletter.NewsletterType || (Newsletter.NewsletterType = {}));
                })(Newsletter = Models.Newsletter || (Models.Newsletter = {}));
            })(Models = Domain.Models || (Domain.Models = {}));
        })(Domain = API.Domain || (API.Domain = {}));
    })(API = Passel.API || (Passel.API = {}));
})(Passel || (Passel = {}));
(function (Passel) {
    var API;
    (function (API) {
        var Domain;
        (function (Domain) {
            var Models;
            (function (Models) {
                var PassleFiles;
                (function (PassleFiles) {
                    var TranscodingStatus;
                    (function (TranscodingStatus) {
                        TranscodingStatus[TranscodingStatus["NotStarted"] = 0] = "NotStarted";
                        TranscodingStatus[TranscodingStatus["InProgress"] = 1] = "InProgress";
                        TranscodingStatus[TranscodingStatus["Complete"] = 2] = "Complete";
                        TranscodingStatus[TranscodingStatus["Failed"] = 3] = "Failed";
                    })(TranscodingStatus = PassleFiles.TranscodingStatus || (PassleFiles.TranscodingStatus = {}));
                })(PassleFiles = Models.PassleFiles || (Models.PassleFiles = {}));
            })(Models = Domain.Models || (Domain.Models = {}));
        })(Domain = API.Domain || (API.Domain = {}));
    })(API = Passel.API || (Passel.API = {}));
})(Passel || (Passel = {}));
(function (Passel) {
    var API;
    (function (API) {
        var Domain;
        (function (Domain) {
            var Models;
            (function (Models) {
                var Passles;
                (function (Passles) {
                    var CookieControlStatus;
                    (function (CookieControlStatus) {
                        CookieControlStatus[CookieControlStatus["None"] = 0] = "None";
                        CookieControlStatus[CookieControlStatus["Disabled"] = 1] = "Disabled";
                        CookieControlStatus[CookieControlStatus["EnabledForNonPassleUsers"] = 2] = "EnabledForNonPassleUsers";
                        CookieControlStatus[CookieControlStatus["EnabledForEveryone"] = 3] = "EnabledForEveryone";
                    })(CookieControlStatus = Passles.CookieControlStatus || (Passles.CookieControlStatus = {}));
                    var HostingType;
                    (function (HostingType) {
                        HostingType[HostingType["PassleHosting"] = 0] = "PassleHosting";
                        HostingType[HostingType["CNamePassleHosting"] = 1] = "CNamePassleHosting";
                        HostingType[HostingType["RemoteHosting"] = 2] = "RemoteHosting";
                    })(HostingType = Passles.HostingType || (Passles.HostingType = {}));
                })(Passles = Models.Passles || (Models.Passles = {}));
            })(Models = Domain.Models || (Domain.Models = {}));
        })(Domain = API.Domain || (API.Domain = {}));
    })(API = Passel.API || (Passel.API = {}));
})(Passel || (Passel = {}));
(function (Passel) {
    var API;
    (function (API) {
        var Domain;
        (function (Domain) {
            var Models;
            (function (Models) {
                var PreviewState;
                (function (PreviewState_1) {
                    var PreviewState;
                    (function (PreviewState) {
                        PreviewState[PreviewState["Unknown"] = 0] = "Unknown";
                        PreviewState[PreviewState["Error"] = 1] = "Error";
                        PreviewState[PreviewState["Success"] = 2] = "Success";
                        PreviewState[PreviewState["Ignored"] = 3] = "Ignored";
                    })(PreviewState = PreviewState_1.PreviewState || (PreviewState_1.PreviewState = {}));
                })(PreviewState = Models.PreviewState || (Models.PreviewState = {}));
            })(Models = Domain.Models || (Domain.Models = {}));
        })(Domain = API.Domain || (API.Domain = {}));
    })(API = Passel.API || (Passel.API = {}));
})(Passel || (Passel = {}));
(function (Passel) {
    var API;
    (function (API) {
        var Domain;
        (function (Domain) {
            var Models;
            (function (Models) {
                var PreviewType;
                (function (PreviewType_1) {
                    var PreviewType;
                    (function (PreviewType) {
                        PreviewType[PreviewType["Passle"] = 0] = "Passle";
                        PreviewType[PreviewType["Post"] = 1] = "Post";
                        PreviewType[PreviewType["Profile"] = 2] = "Profile";
                    })(PreviewType = PreviewType_1.PreviewType || (PreviewType_1.PreviewType = {}));
                })(PreviewType = Models.PreviewType || (Models.PreviewType = {}));
            })(Models = Domain.Models || (Domain.Models = {}));
        })(Domain = API.Domain || (API.Domain = {}));
    })(API = Passel.API || (Passel.API = {}));
})(Passel || (Passel = {}));
(function (Passel) {
    var API;
    (function (API) {
        var Domain;
        (function (Domain) {
            var Models;
            (function (Models) {
                var Reporting;
                (function (Reporting) {
                    var ReportFileType;
                    (function (ReportFileType) {
                        ReportFileType[ReportFileType["None"] = 0] = "None";
                        ReportFileType[ReportFileType["CSVUserOverviewReport"] = 1] = "CSVUserOverviewReport";
                        ReportFileType[ReportFileType["CSVUserActivityReport"] = 2] = "CSVUserActivityReport";
                        ReportFileType[ReportFileType["CSVUserDetailsReport"] = 3] = "CSVUserDetailsReport";
                        ReportFileType[ReportFileType["CSVPostDetailsReport"] = 4] = "CSVPostDetailsReport";
                        ReportFileType[ReportFileType["CSVPostStatisticsReport"] = 5] = "CSVPostStatisticsReport";
                        ReportFileType[ReportFileType["CSVPassleFollowersReport"] = 6] = "CSVPassleFollowersReport";
                        ReportFileType[ReportFileType["ClientSuccessStatsReport"] = 7] = "ClientSuccessStatsReport";
                        ReportFileType[ReportFileType["TableDataReport"] = 8] = "TableDataReport";
                        ReportFileType[ReportFileType["CSVApprovalProcessReport"] = 9] = "CSVApprovalProcessReport";
                        ReportFileType[ReportFileType["CSVSuggestionSentReport"] = 10] = "CSVSuggestionSentReport";
                        ReportFileType[ReportFileType["CSVClientGroupDigestsRport"] = 11] = "CSVClientGroupDigestsRport";
                        ReportFileType[ReportFileType["CSVClientGroupSubscribersReport"] = 12] = "CSVClientGroupSubscribersReport";
                        ReportFileType[ReportFileType["CSVClientUserMilestoneReport"] = 13] = "CSVClientUserMilestoneReport";
                    })(ReportFileType = Reporting.ReportFileType || (Reporting.ReportFileType = {}));
                })(Reporting = Models.Reporting || (Models.Reporting = {}));
            })(Models = Domain.Models || (Domain.Models = {}));
        })(Domain = API.Domain || (API.Domain = {}));
    })(API = Passel.API || (Passel.API = {}));
})(Passel || (Passel = {}));
(function (Passel) {
    var API;
    (function (API) {
        var Domain;
        (function (Domain) {
            var Models;
            (function (Models) {
                var Tracking;
                (function (Tracking) {
                    var ClientSideEventAction;
                    (function (ClientSideEventAction) {
                        ClientSideEventAction[ClientSideEventAction["None"] = 0] = "None";
                        ClientSideEventAction[ClientSideEventAction["Click"] = 1] = "Click";
                        ClientSideEventAction[ClientSideEventAction["ClickLink"] = 2] = "ClickLink";
                        ClientSideEventAction[ClientSideEventAction["ClickExternalLink"] = 3] = "ClickExternalLink";
                        ClientSideEventAction[ClientSideEventAction["Load"] = 4] = "Load";
                        ClientSideEventAction[ClientSideEventAction["UploadFile"] = 5] = "UploadFile";
                        ClientSideEventAction[ClientSideEventAction["PlayVideo"] = 6] = "PlayVideo";
                        ClientSideEventAction[ClientSideEventAction["PlayAudio"] = 7] = "PlayAudio";
                        ClientSideEventAction[ClientSideEventAction["PrintPost"] = 8] = "PrintPost";
                    })(ClientSideEventAction = Tracking.ClientSideEventAction || (Tracking.ClientSideEventAction = {}));
                    var ClientSideEventCategory;
                    (function (ClientSideEventCategory) {
                        ClientSideEventCategory[ClientSideEventCategory["None"] = 0] = "None";
                        ClientSideEventCategory[ClientSideEventCategory["ShareButton"] = 1] = "ShareButton";
                        ClientSideEventCategory[ClientSideEventCategory["Email"] = 2] = "Email";
                        ClientSideEventCategory[ClientSideEventCategory["Page"] = 3] = "Page";
                        ClientSideEventCategory[ClientSideEventCategory["TopNavigation"] = 4] = "TopNavigation";
                        ClientSideEventCategory[ClientSideEventCategory["SideNavigation"] = 4] = "SideNavigation";
                        ClientSideEventCategory[ClientSideEventCategory["PostContent"] = 5] = "PostContent";
                        ClientSideEventCategory[ClientSideEventCategory["TwitterPicker"] = 6] = "TwitterPicker";
                        ClientSideEventCategory[ClientSideEventCategory["MediaLibrary"] = 7] = "MediaLibrary";
                        ClientSideEventCategory[ClientSideEventCategory["Dropzone"] = 8] = "Dropzone";
                        ClientSideEventCategory[ClientSideEventCategory["TweetThanks"] = 9] = "TweetThanks";
                        ClientSideEventCategory[ClientSideEventCategory["TertiaryNavigation"] = 10] = "TertiaryNavigation";
                        ClientSideEventCategory[ClientSideEventCategory["Notifications"] = 11] = "Notifications";
                        ClientSideEventCategory[ClientSideEventCategory["PassleHeader"] = 12] = "PassleHeader";
                        ClientSideEventCategory[ClientSideEventCategory["Breadcrumbs"] = 13] = "Breadcrumbs";
                        ClientSideEventCategory[ClientSideEventCategory["MediaPlayer"] = 14] = "MediaPlayer";
                        ClientSideEventCategory[ClientSideEventCategory["ProfilePage"] = 15] = "ProfilePage";
                        ClientSideEventCategory[ClientSideEventCategory["PostPage"] = 16] = "PostPage";
                    })(ClientSideEventCategory = Tracking.ClientSideEventCategory || (Tracking.ClientSideEventCategory = {}));
                })(Tracking = Models.Tracking || (Models.Tracking = {}));
            })(Models = Domain.Models || (Domain.Models = {}));
        })(Domain = API.Domain || (API.Domain = {}));
    })(API = Passel.API || (Passel.API = {}));
})(Passel || (Passel = {}));
(function (Passel) {
    var API;
    (function (API) {
        var Models;
        (function (Models) {
            var ProcessingStatus;
            (function (ProcessingStatus) {
                ProcessingStatus[ProcessingStatus["ProcessingNotStarted"] = 0] = "ProcessingNotStarted";
                ProcessingStatus[ProcessingStatus["ProcessingInProgress"] = 1] = "ProcessingInProgress";
                ProcessingStatus[ProcessingStatus["ProcessingComplete"] = 2] = "ProcessingComplete";
                ProcessingStatus[ProcessingStatus["ProcessingFailed"] = 3] = "ProcessingFailed";
                ProcessingStatus[ProcessingStatus["ProcessingFailedRetryRequested"] = 4] = "ProcessingFailedRetryRequested";
                ProcessingStatus[ProcessingStatus["ProcessingCancelled"] = 5] = "ProcessingCancelled";
            })(ProcessingStatus = Models.ProcessingStatus || (Models.ProcessingStatus = {}));
        })(Models = API.Models || (API.Models = {}));
    })(API = Passel.API || (Passel.API = {}));
})(Passel || (Passel = {}));
(function (Passel) {
    var API;
    (function (API) {
        var Website;
        (function (Website) {
            var Plugins;
            (function (Plugins) {
                var CookieControl;
                (function (CookieControl) {
                    var CookieControlUIMode;
                    (function (CookieControlUIMode) {
                        CookieControlUIMode[CookieControlUIMode["Open"] = 0] = "Open";
                        CookieControlUIMode[CookieControlUIMode["Minimised"] = 1] = "Minimised";
                        CookieControlUIMode[CookieControlUIMode["Accepted"] = 2] = "Accepted";
                    })(CookieControlUIMode = CookieControl.CookieControlUIMode || (CookieControl.CookieControlUIMode = {}));
                })(CookieControl = Plugins.CookieControl || (Plugins.CookieControl = {}));
            })(Plugins = Website.Plugins || (Website.Plugins = {}));
        })(Website = API.Website || (API.Website = {}));
    })(API = Passel.API || (Passel.API = {}));
})(Passel || (Passel = {}));
;
var ClientSideEventAction = Passel.API.Domain.Models.Tracking.ClientSideEventAction;
var ClientSideEventCategory = Passel.API.Domain.Models.Tracking.ClientSideEventCategory;
;
var PassleFunctions;
(function (PassleFunctions) {
    function GetParameterByName(name) {
        name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
        var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(location.search);
        return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
    }
    PassleFunctions.GetParameterByName = GetParameterByName;
    function RemoveParameterByName(name, reloadPage) {
        if (reloadPage === void 0) { reloadPage = false; }
        if (!reloadPage && typeof (history.pushState) == "undefined") {
            return;
        }
        var url = document.location.href;
        var hashFragment = document.location.hash;
        url.replace(hashFragment, '');
        var urlParts = url.split('?');
        if (urlParts.length == 1)
            return;
        url = urlParts[0] + '?';
        var params = urlParts[1].split('&');
        params.forEach(function (value) {
            var v = value.split('=');
            if (v[0] != name)
                url += value + '&';
        });
        url = url.replace(/&$/, '');
        url = url.replace(/\?$/, '');
        if (hashFragment) {
            url += hashFragment;
        }
        if (reloadPage) {
            document.location.href = url;
        }
        else {
            var obj = { Page: document.title, Url: url };
            window.history.replaceState(obj, obj.Page, obj.Url);
        }
    }
    PassleFunctions.RemoveParameterByName = RemoveParameterByName;
    function IsValidEmailAddress(email) {
        var re = /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;
        return re.test(email.toLowerCase());
    }
    PassleFunctions.IsValidEmailAddress = IsValidEmailAddress;
    function IsValidUrl(url) {
        try {
            var newUrl = new URL(url);
            return !!newUrl.host;
        }
        catch (error) {
            /*
             * URL regex found to match almost all possible cases for a URL.
             * Results of testing this regex against others for a number of possible values
             * can be seen in this table:
             * https://mathiasbynens.be/demo/url-regex
             */
            var re = /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;
            return re.test(url);
        }
    }
    PassleFunctions.IsValidUrl = IsValidUrl;
    function AddParameterToUrl(url, parameterName, parameterValue) {
        if (url.indexOf("?")) {
            return url + "&" + parameterName + "=" + parameterValue;
        }
        else {
            return url + "?" + parameterName + "=" + parameterValue;
        }
    }
    PassleFunctions.AddParameterToUrl = AddParameterToUrl;
    function JsonCopy(src) {
        return JSON.parse(JSON.stringify(src));
    }
    PassleFunctions.JsonCopy = JsonCopy;
    function CapitalizeString(text) {
        return text.toLowerCase().replace(/(^| )(\w)/g, function (s) { return s.toUpperCase(); });
    }
    PassleFunctions.CapitalizeString = CapitalizeString;
    function UsingFirefox() {
        return window.navigator.userAgent.toLowerCase().indexOf("firefox") > -1;
    }
    PassleFunctions.UsingFirefox = UsingFirefox;
    function ResizeIframe(obj) {
        obj.style.height = obj.contentWindow.document.body.scrollHeight + 20 + 'px';
    }
    PassleFunctions.ResizeIframe = ResizeIframe;
    //the datetime has to be passed in ISO format
    function ConvertUTCToLocalTime(dateTime) {
        return moment.utc(dateTime).local();
    }
    PassleFunctions.ConvertUTCToLocalTime = ConvertUTCToLocalTime;
    function ConvertLocalToUTCTime(dateTime, currentFormat) {
        var localTime = moment(dateTime, currentFormat);
        localTime = moment.tz(localTime, moment.tz.guess());
        return localTime.utc();
    }
    PassleFunctions.ConvertLocalToUTCTime = ConvertLocalToUTCTime;
    function CapitalizeFirstLetter(s) {
        return s[0].toUpperCase() + s.toLowerCase().slice(1);
    }
    PassleFunctions.CapitalizeFirstLetter = CapitalizeFirstLetter;
    function DecodeHtml(s) {
        return $("<div/>").html(s).text();
    }
    PassleFunctions.DecodeHtml = DecodeHtml;
    function UsingSafari() {
        var userAgent = window.navigator.userAgent.toLowerCase();
        return userAgent.indexOf("safari") > -1 && userAgent.indexOf("chrome") == -1;
    }
    PassleFunctions.UsingSafari = UsingSafari;
    function SetFocusAtTheEndOfText(identifier) {
        var text = $(identifier).val();
        $(identifier).focus().val('').val(text);
    }
    PassleFunctions.SetFocusAtTheEndOfText = SetFocusAtTheEndOfText;
    function GetStringValueFromEnum(enumType, enumValue) {
        for (var enumMember in enumType) {
            if (enumType[enumMember] == enumValue)
                return enumMember;
        }
    }
    PassleFunctions.GetStringValueFromEnum = GetStringValueFromEnum;
})(PassleFunctions || (PassleFunctions = {}));
;
$.ajaxSetup({
    cache: false
});
var ClientWebFunctions;
(function (ClientWebFunctions) {
    function UpdateCounter(elementId, value) {
        var $counter = $('#' + elementId);
        var count = parseInt($counter.text(), 10) + value;
        if (count > 0) {
            $counter.parent().addClass('has-number');
        }
        else {
            $counter.parent().removeClass('has-number');
        }
        $counter.text(count < 0 ? 0 : count);
    }
    ClientWebFunctions.UpdateCounter = UpdateCounter;
    function LocaliseDates() {
        var datesToConvert = $('.localised-date').not('.localised');
        datesToConvert.each((date) => {
            var $date = $(date);
            var utcDate = $date.attr('datetime');
            var format = $date.attr('data-localtime-format');
            var localDate = $.localtime.toLocalTime(utcDate, format);
            $date.html(localDate).addClass('localised');
        });
    }
    ClientWebFunctions.LocaliseDates = LocaliseDates;
})(ClientWebFunctions || (ClientWebFunctions = {}));
;
(function(){var a=false,b=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.PortholeClass=function(){};PortholeClass.extend=function(g){var f=this.prototype;a=true;var e=new this();a=false;for(var d in g){e[d]=typeof g[d]=="function"&&typeof f[d]=="function"&&b.test(g[d])?(function(h,i){return function(){var k=this._super;this._super=f[h];var j=i.apply(this,arguments);this._super=k;return j}})(d,g[d]):g[d]}function c(){if(!a&&this.init){this.init.apply(this,arguments)}}c.prototype=e;c.prototype.constructor=c;c.extend=arguments.callee;return c}})();(function(c){var b={debug:false,trace:function(d){if(this.debug&&c.console!==undefined){c.console.log("Porthole: "+d)}},error:function(d){if(c.console!==undefined){c.console.error("Porthole: "+d)}}};b.WindowProxy=function(){};b.WindowProxy.prototype={post:function(e,d){},addEventListener:function(d){},removeEventListener:function(d){}};b.WindowProxyBase=PortholeClass.extend({init:function(d){if(d===undefined){d=""}this.targetWindowName=d;this.origin=c.location.protocol+"//"+c.location.host;this.eventListeners=[]},getTargetWindowName:function(){return this.targetWindowName},getOrigin:function(){return this.origin},getTargetWindow:function(){return b.WindowProxy.getTargetWindow(this.targetWindowName)},post:function(e,d){if(d===undefined){d="*"}this.dispatchMessage({data:e,sourceOrigin:this.getOrigin(),targetOrigin:d,sourceWindowName:c.name,targetWindowName:this.getTargetWindowName()})},addEventListener:function(d){this.eventListeners.push(d);return d},removeEventListener:function(g){var d;try{d=this.eventListeners.indexOf(g);this.eventListeners.splice(d,1)}catch(h){this.eventListeners=[]}},dispatchEvent:function(f){var d;for(d=0;d<this.eventListeners.length;d++){try{this.eventListeners[d](f)}catch(g){}}}});b.WindowProxyLegacy=b.WindowProxyBase.extend({init:function(d,e){this._super(e);if(d!==null){this.proxyIFrameName=this.targetWindowName+"ProxyIFrame";this.proxyIFrameLocation=d;this.proxyIFrameElement=this.createIFrameProxy()}else{this.proxyIFrameElement=null;b.trace("proxyIFrameUrl is null, window will be a receiver only");this.post=function(){throw new Error("Receiver only window")}}},createIFrameProxy:function(){var d=document.createElement("iframe");d.setAttribute("id",this.proxyIFrameName);d.setAttribute("name",this.proxyIFrameName);d.setAttribute("src",this.proxyIFrameLocation);d.setAttribute("frameBorder","1");d.setAttribute("scrolling","auto");d.setAttribute("width",30);d.setAttribute("height",30);d.setAttribute("style","position: absolute; left: -100px; top:0px;");if(d.style.setAttribute){d.style.setAttribute("cssText","position: absolute; left: -100px; top:0px;")}document.body.appendChild(d);return d},dispatchMessage:function(e){var d=c.encodeURIComponent;if(this.proxyIFrameElement){var f=this.proxyIFrameLocation+"#"+d(b.WindowProxy.serialize(e));this.proxyIFrameElement.setAttribute("src",f);this.proxyIFrameElement.height=this.proxyIFrameElement.height>50?50:100}}});b.WindowProxyHTML5=b.WindowProxyBase.extend({init:function(d,e){this._super(e);this.eventListenerCallback=null},dispatchMessage:function(d){this.getTargetWindow().postMessage(b.WindowProxy.serialize(d),d.targetOrigin)},addEventListener:function(e){if(this.eventListeners.length===0){var d=this;if(c.addEventListener){this.eventListenerCallback=function(f){d.eventListener(d,f)};c.addEventListener("message",this.eventListenerCallback,false)}else{if(c.attachEvent){this.eventListenerCallback=function(f){d.eventListener(d,c.event)};c.attachEvent("onmessage",this.eventListenerCallback)}}}return this._super(e)},removeEventListener:function(d){this._super(d);if(this.eventListeners.length===0){if(c.removeEventListener){c.removeEventListener("message",this.eventListenerCallback)}else{if(c.detachEvent){if(typeof c.onmessage==="undefined"){c.onmessage=null}c.detachEvent("onmessage",this.eventListenerCallback)}}this.eventListenerCallback=null}},eventListener:function(e,d){var f=b.WindowProxy.unserialize(d.data);if(f&&(e.targetWindowName===""||f.sourceWindowName==e.targetWindowName)){e.dispatchEvent(new b.MessageEvent(f.data,d.origin,e))}}});if(!c.postMessage){b.trace("Using legacy browser support");b.WindowProxy=b.WindowProxyLegacy.extend({})}else{b.trace("Using built-in browser support");b.WindowProxy=b.WindowProxyHTML5.extend({})}b.WindowProxy.serialize=function(d){if(typeof JSON==="undefined"){throw new Error("Porthole serialization depends on JSON!")}return JSON.stringify(d)};b.WindowProxy.unserialize=function(g){if(typeof JSON==="undefined"){throw new Error("Porthole unserialization dependens on JSON!")}try{var d=JSON.parse(g)}catch(f){return false}return d};b.WindowProxy.getTargetWindow=function(d){if(d===""){return parent}else{if(d==="top"||d==="parent"){return c[d]}}return c.frames[d]};b.MessageEvent=function a(f,d,e){this.data=f;this.origin=d;this.source=e};b.WindowProxyDispatcher={forwardMessageEvent:function(i){var g,h=c.decodeURIComponent,f,d;if(document.location.hash.length>0){g=b.WindowProxy.unserialize(h(document.location.hash.substr(1)));f=b.WindowProxy.getTargetWindow(g.targetWindowName);d=b.WindowProxyDispatcher.findWindowProxyObjectInWindow(f,g.sourceWindowName);if(d){if(d.origin===g.targetOrigin||g.targetOrigin==="*"){d.dispatchEvent(new b.MessageEvent(g.data,g.sourceOrigin,d))}else{b.error("Target origin "+d.origin+" does not match desired target of "+g.targetOrigin)}}else{b.error("Could not find window proxy object on the target window")}}},findWindowProxyObjectInWindow:function(d,g){var f;if(d){for(f in d){if(Object.prototype.hasOwnProperty.call(d,f)){try{if(d[f]!==null&&typeof d[f]==="object"&&d[f] instanceof d.Porthole.WindowProxy&&d[f].getTargetWindowName()===g){return d[f]}}catch(h){}}}}return null},start:function(){if(c.addEventListener){c.addEventListener("resize",b.WindowProxyDispatcher.forwardMessageEvent,false)}else{if(c.attachEvent&&c.postMessage!=="undefined"){c.attachEvent("onresize",b.WindowProxyDispatcher.forwardMessageEvent)}else{if(document.body.attachEvent){c.attachEvent("onresize",b.WindowProxyDispatcher.forwardMessageEvent)}else{b.error("Cannot attach resize event")}}}}};if(typeof c.exports!=="undefined"){c.exports.Porthole=b}else{c.Porthole=b}})(this);;
//fgnass.github.com/spin.js#v2.0.1
!function (a, b) { "object" == typeof exports ? module.exports = b() : "function" == typeof define && define.amd ? define(b) : a.Spinner = b() }(this, function () { "use strict"; function a(a, b) { var c, d = document.createElement(a || "div"); for (c in b) d[c] = b[c]; return d } function b(a) { for (var b = 1, c = arguments.length; c > b; b++) a.appendChild(arguments[b]); return a } function c(a, b, c, d) { var e = ["opacity", b, ~~(100 * a), c, d].join("-"), f = .01 + c / d * 100, g = Math.max(1 - (1 - a) / b * (100 - f), a), h = j.substring(0, j.indexOf("Animation")).toLowerCase(), i = h && "-" + h + "-" || ""; return l[e] || (m.insertRule("@" + i + "keyframes " + e + "{0%{opacity:" + g + "}" + f + "%{opacity:" + a + "}" + (f + .01) + "%{opacity:1}" + (f + b) % 100 + "%{opacity:" + a + "}100%{opacity:" + g + "}}", m.cssRules.length), l[e] = 1), e } function d(a, b) { var c, d, e = a.style; for (b = b.charAt(0).toUpperCase() + b.slice(1), d = 0; d < k.length; d++) if (c = k[d] + b, void 0 !== e[c]) return c; return void 0 !== e[b] ? b : void 0 } function e(a, b) { for (var c in b) a.style[d(a, c) || c] = b[c]; return a } function f(a) { for (var b = 1; b < arguments.length; b++) { var c = arguments[b]; for (var d in c) void 0 === a[d] && (a[d] = c[d]) } return a } function g(a, b) { return "string" == typeof a ? a : a[b % a.length] } function h(a) { this.opts = f(a || {}, h.defaults, n) } function i() { function c(b, c) { return a("<" + b + ' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">', c) } m.addRule(".spin-vml", "behavior:url(#default#VML)"), h.prototype.lines = function (a, d) { function f() { return e(c("group", { coordsize: k + " " + k, coordorigin: -j + " " + -j }), { width: k, height: k }) } function h(a, h, i) { b(m, b(e(f(), { rotation: 360 / d.lines * a + "deg", left: ~~h }), b(e(c("roundrect", { arcsize: d.corners }), { width: j, height: d.width, left: d.radius, top: -d.width >> 1, filter: i }), c("fill", { color: g(d.color, a), opacity: d.opacity }), c("stroke", { opacity: 0 })))) } var i, j = d.length + d.width, k = 2 * j, l = 2 * -(d.width + d.length) + "px", m = e(f(), { position: "absolute", top: l, left: l }); if (d.shadow) for (i = 1; i <= d.lines; i++) h(i, -2, "progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)"); for (i = 1; i <= d.lines; i++) h(i); return b(a, m) }, h.prototype.opacity = function (a, b, c, d) { var e = a.firstChild; d = d.shadow && d.lines || 0, e && b + d < e.childNodes.length && (e = e.childNodes[b + d], e = e && e.firstChild, e = e && e.firstChild, e && (e.opacity = c)) } } var j, k = ["webkit", "Moz", "ms", "O"], l = {}, m = function () { var c = a("style", { type: "text/css" }); return b(document.getElementsByTagName("head")[0], c), c.sheet || c.styleSheet }(), n = { lines: 12, length: 7, width: 5, radius: 10, rotate: 0, corners: 1, color: "#000", direction: 1, speed: 1, trail: 100, opacity: .25, fps: 20, zIndex: 2e9, className: "spinner", top: "50%", left: "50%", position: "absolute" }; h.defaults = {}, f(h.prototype, { spin: function (b) { this.stop(); { var c = this, d = c.opts, f = c.el = e(a(0, { className: d.className }), { position: d.position, width: 0, zIndex: d.zIndex }); d.radius + d.length + d.width } if (e(f, { left: d.left, top: d.top }), b && b.insertBefore(f, b.firstChild || null), f.setAttribute("role", "progressbar"), c.lines(f, c.opts), !j) { var g, h = 0, i = (d.lines - 1) * (1 - d.direction) / 2, k = d.fps, l = k / d.speed, m = (1 - d.opacity) / (l * d.trail / 100), n = l / d.lines; !function o() { h++; for (var a = 0; a < d.lines; a++) g = Math.max(1 - (h + (d.lines - a) * n) % l * m, d.opacity), c.opacity(f, a * d.direction + i, g, d); c.timeout = c.el && setTimeout(o, ~~(1e3 / k)) }() } return c }, stop: function () { var a = this.el; return a && (clearTimeout(this.timeout), a.parentNode && a.parentNode.removeChild(a), this.el = void 0), this }, lines: function (d, f) { function h(b, c) { return e(a(), { position: "absolute", width: f.length + f.width + "px", height: f.width + "px", background: b, boxShadow: c, transformOrigin: "left", transform: "rotate(" + ~~(360 / f.lines * k + f.rotate) + "deg) translate(" + f.radius + "px,0)", borderRadius: (f.corners * f.width >> 1) + "px" }) } for (var i, k = 0, l = (f.lines - 1) * (1 - f.direction) / 2; k < f.lines; k++) i = e(a(), { position: "absolute", top: 1 + ~(f.width / 2) + "px", transform: f.hwaccel ? "translate3d(0,0,0)" : "", opacity: f.opacity, animation: j && c(f.opacity, f.trail, l + k * f.direction, f.lines) + " " + 1 / f.speed + "s linear infinite" }), f.shadow && b(i, e(h("#000", "0 0 4px #000"), { top: "2px" })), b(d, b(i, h(g(f.color, k), "0 0 1px rgba(0,0,0,.1)"))); return d }, opacity: function (a, b, c) { b < a.childNodes.length && (a.childNodes[b].style.opacity = c) } }); var o = e(a("group"), { behavior: "url(#default#VML)" }); return !d(o, "transform") && o.adj ? i() : j = d(o, "animation"), h });;
/**
 * Copyright (c) 2011-2014 Felix Gnass
 * Licensed under the MIT license
 */

/*

Basic Usage:
============

$('#el').spin(); // Creates a default Spinner using the text color of #el.
$('#el').spin({ ... }); // Creates a Spinner using the provided options.

$('#el').spin(false); // Stops and removes the spinner.

Using Presets:
==============

$('#el').spin('small'); // Creates a 'small' Spinner using the text color of #el.
$('#el').spin('large', '#fff'); // Creates a 'large' white Spinner.

Adding a custom preset:
=======================

$.fn.spin.presets.flower = {
  lines: 9
  length: 10
  width: 20
  radius: 0
}

$('#el').spin('flower', 'red');

//NOTE: This requires spin.js (or spin.min.js) to also be present on the page or it won't work -DS

*/

(function (factory) {

    if (typeof exports == 'object') {
        // CommonJS
        factory(require('jquery'), require('spin'))
    }
    else if (typeof define == 'function' && define.amd) {
        // AMD, register as anonymous module
        define(['jquery', 'spin'], factory)
    }
    else {
        // Browser globals
        if (!window.Spinner) throw new Error('Spin.js not present')
        factory(window.jQuery, window.Spinner)
    }

}(function ($, Spinner) {

    $.fn.spin = function (opts, color) {

        return this.each(function () {
            var $this = $(this),
              data = $this.data();

            if (data.spinner) {
                data.spinner.stop();
                delete data.spinner;
            }
            if (opts !== false) {
                opts = $.extend(
                  { color: color || $this.css('color') },
                  $.fn.spin.presets[opts] || opts
                )
                data.spinner = new Spinner(opts).spin(this)
            }
        })
    }

    $.fn.spin.presets = {
        tiny: { lines: 8, length: 2, width: 2, radius: 3 },
        small: { lines: 8, length: 4, width: 3, radius: 5 },
        large: { lines: 10, length: 8, width: 4, radius: 8 }
    }

}));;
/*
 *  webui popover plugin  - v1.1.1
 *  A lightWeight popover plugin with jquery ,enchance the  popover plugin of bootstrap with some awesome new features. It works well with bootstrap ,but bootstrap is not necessary!
 *  https://github.com/sandywalker/webui-popover
 *
 *  Made by Sandy Duan
 *  Under MIT License
 */
!function(a,b,c){function d(b,c){this.$element=a(b),("string"===a.type(c.delay)||"number"===a.type(c.delay))&&(c.delay={show:c.delay,hide:c.delay}),this.options=a.extend({},h,c),this._defaults=h,this._name=e,this._targetclick=!1,this.init()}var e="webuiPopover",f="webui-popover",g="webui.popover",h={placement:"auto",width:"auto",height:"auto",trigger:"click",style:"",delay:{show:null,hide:null},async:{before:null,success:null},cache:!0,multi:!1,arrow:!0,title:"",content:"",closeable:!1,padding:!0,url:"",type:"html",constrains:null,animation:null,template:'<div class="webui-popover"><div class="arrow"></div><div class="webui-popover-inner"><a href="#" class="close">x</a><h3 class="webui-popover-title"></h3><div class="webui-popover-content"><i class="fa fa-refresh"></i> <p>&nbsp;</p></div></div></div>'};d.prototype={init:function(){"click"===this.options.trigger?this.$element.off("click").on("click",a.proxy(this.toggle,this)):this.$element.off("mouseenter mouseleave").on("mouseenter",a.proxy(this.mouseenterHandler,this)).on("mouseleave",a.proxy(this.mouseleaveHandler,this)),this._poped=!1,this._inited=!0},destroy:function(){this.hide(),this.$element.data("plugin_"+e,null),this.$element.off("click"===this.options.trigger?"click":"mouseenter mouseleave"),this.$target&&this.$target.remove()},hide:function(b){b&&(b.preventDefault(),b.stopPropagation()),this.xhr&&(this.xhr.abort(),this.xhr=null);var c=a.Event("hide."+g);this.$element.trigger(c),this.$target&&this.$target.removeClass("in").hide(),this.$element.trigger("hidden."+g)},toggle:function(a){a&&(a.preventDefault(),a.stopPropagation()),this[this.getTarget().hasClass("in")?"hide":"show"]()},hideAll:function(){a("div.webui-popover").not(".webui-popover-fixed").removeClass("in").hide()},show:function(){var a=this.getTarget().removeClass().addClass(f);if(this.options.multi||this.hideAll(),!this.options.cache||!this._poped){if(this.content="",this.setTitle(this.getTitle()),this.options.closeable||a.find(".close").off("click").remove(),this.isAsync())return this.setContentASync(this.options.content),void this.displayContent();this.setContent(this.getContent()),a.show()}this.displayContent(),this.bindBodyEvents()},displayContent:function(){var b=this.getElementPosition(),d=this.getTarget().removeClass().addClass(f),e=this.getContentElement(),h=d[0].offsetWidth,i=d[0].offsetHeight,j="bottom",k=a.Event("show."+g);this.$element.trigger(k),"auto"!==this.options.width&&d.width(this.options.width),"auto"!==this.options.height&&e.height(this.options.height),this.options.arrow||d.find(".arrow").remove(),d.remove().css({top:-1e3,left:-1e3,display:"block"}),this.getAnimation()&&d.addClass(this.getAnimation()),d.appendTo(c.body),h=d[0].offsetWidth,i=d[0].offsetHeight,j=this.getPlacement(b),this.initTargetEvents();var l=this.getTargetPositin(b,j,h,i);if(this.$target.css(l.position).addClass(j).addClass("in"),"iframe"===this.options.type){var m=d.find("iframe");m.width(d.width()).height(m.parent().height())}if(this.options.style&&this.$target.addClass(f+"-"+this.options.style),this.options.padding||(e.css("height",e.outerHeight()),this.$target.addClass("webui-no-padding")),this.options.arrow||this.$target.css({margin:0}),this.options.arrow){var n=this.$target.find(".arrow");n.removeAttr("style"),l.arrowOffset&&n.css(l.arrowOffset)}this._poped=!0,this.$element.trigger("shown."+g)},isTargetLoaded:function(){return 0===this.getTarget().find("i.glyphicon-refresh").length},getTarget:function(){return this.$target||(this.$target=a(this.options.template)),this.$target},getTitleElement:function(){return this.getTarget().find("."+f+"-title")},getContentElement:function(){return this.getTarget().find("."+f+"-content")},getTitle:function(){return this.$element.attr("data-title")||this.options.title||this.$element.attr("title")},getUrl:function(){return this.$element.attr("data-url")||this.options.url},getDelayShow:function(){var a=this.$element.attr("data-delay-show");return"undefined"!=typeof a?a:this.options.delay.show||100},getHideDelay:function(){var a=this.$element.attr("data-delay-hide");return"undefined"!=typeof a?a:this.options.delay.hide||100},getConstrains:function(){var a=this.$element.attr("data-contrains");return"undefined"!=typeof a?a:this.options.constrains},getAnimation:function(){var a=this.$element.attr("data-animation");return a||this.options.animation},setTitle:function(a){var b=this.getTitleElement();a?b.html(a):b.remove()},hasContent:function(){return this.getContent()},getContent:function(){if(this.getUrl())"iframe"===this.options.type&&(this.content=a('<iframe frameborder="0"></iframe>').attr("src",this.getUrl()));else if(!this.content){var b="";b=a.isFunction(this.options.content)?this.options.content.apply(this.$element[0],arguments):this.options.content,this.content=this.$element.attr("data-content")||b}return this.content},setContent:function(a){var b=this.getTarget();this.getContentElement().html(a),this.$target=b},isAsync:function(){return"async"===this.options.type},setContentASync:function(b){var c=this;this.xhr=a.ajax({url:this.getUrl(),type:"GET",cache:this.options.cache,beforeSend:function(a){c.options.async.before&&c.options.async.before(c,a)},success:function(d){c.bindBodyEvents(),c.content=b&&a.isFunction(b)?b.apply(c.$element[0],[d]):d,c.setContent(c.content);var e=c.getContentElement();e.removeAttr("style"),c.displayContent(),c.options.async.success&&c.options.async.success(c,d),this.xhr=null}})},bindBodyEvents:function(){a("body").off("keyup.webui-popover").on("keyup.webui-popover",a.proxy(this.escapeHandler,this)),a("body").off("click.webui-popover").on("click.webui-popover",a.proxy(this.bodyClickHandler,this))},mouseenterHandler:function(){var a=this;a._timeout&&clearTimeout(a._timeout),a._enterTimeout=setTimeout(function(){a.getTarget().is(":visible")||a.show()},this.getDelayShow())},mouseleaveHandler:function(){var a=this;clearTimeout(a._enterTimeout),a._timeout=setTimeout(function(){a.hide()},this.getHideDelay())},escapeHandler:function(a){27===a.keyCode&&this.hideAll()},bodyClickHandler:function(){this._targetclick?this._targetclick=!1:this.hideAll()},targetClickHandler:function(){this._targetclick=!0},initTargetEvents:function(){"click"!==this.options.trigger&&this.$target.off("mouseenter mouseleave").on("mouseenter",a.proxy(this.mouseenterHandler,this)).on("mouseleave",a.proxy(this.mouseleaveHandler,this)),this.$target.find(".close").off("click").on("click",a.proxy(this.hide,this)),this.$target.off("click.webui-popover").on("click.webui-popover",a.proxy(this.targetClickHandler,this))},getPlacement:function(a){var b,d=c.documentElement,e=c.body,f=d.clientWidth,g=d.clientHeight,h=Math.max(e.scrollTop,d.scrollTop),i=Math.max(e.scrollLeft,d.scrollLeft),j=Math.max(0,a.left-i),k=Math.max(0,a.top-h);if(b="function"==typeof this.options.placement?this.options.placement.call(this,this.getTarget()[0],this.$element[0]):this.$element.data("placement")||this.options.placement,"auto"===b){var l="horizontal"===this.getConstrains(),m="vertical"===this.getConstrains();b=f/3>j?g/3>k?l?"right-bottom":"bottom-right":2*g/3>k?m?g/2>=k?"bottom-right":"top-right":"right":l?"right-top":"top-right":2*f/3>j?g/3>k?l?f/2>=j?"right-bottom":"left-bottom":"bottom":2*g/3>k?l?f/2>=j?"right":"left":g/2>=k?"bottom":"top":l?f/2>=j?"right-top":"left-top":"top":g/3>k?l?"left-bottom":"bottom-left":2*g/3>k?m?g/2>=k?"bottom-left":"top-left":"left":l?"left-top":"top-left"}return b},getElementPosition:function(){return a.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTargetPositin:function(a,b,c,d){var e=a,f=this.$element.outerWidth(),g=this.$element.outerHeight(),h={},i=null,j=this.options.arrow?20:0,k=j+10>f?j:0,l=j+10>g?j:0;switch(b){case"bottom":h={top:e.top+e.height,left:e.left+e.width/2-c/2};break;case"top":h={top:e.top-d,left:e.left+e.width/2-c/2};break;case"left":h={top:e.top+e.height/2-d/2,left:e.left-c};break;case"right":h={top:e.top+e.height/2-d/2,left:e.left+e.width};break;case"top-right":h={top:e.top-d,left:e.left-k},i={left:f/2+k};break;case"top-left":h={top:e.top-d,left:e.left-c+e.width+k},i={left:c-f/2-k};break;case"bottom-right":h={top:e.top+e.height,left:e.left-k},i={left:f/2+k};break;case"bottom-left":h={top:e.top+e.height,left:e.left-c+e.width+k},i={left:c-f/2-k};break;case"right-top":h={top:e.top-d+e.height+l,left:e.left+e.width},i={top:d-g/2-l};break;case"right-bottom":h={top:e.top-l,left:e.left+e.width},i={top:g/2+l};break;case"left-top":h={top:e.top-d+e.height+l,left:e.left-c},i={top:d-g/2-l};break;case"left-bottom":h={top:e.top-l,left:e.left-c},i={top:g/2+l}}return{position:h,arrowOffset:i}}},a.fn[e]=function(b){return this.each(function(){var c=a.data(this,"plugin_"+e);c?"destroy"===b?c.destroy():"string"==typeof b&&c[b]():(b?"string"==typeof b?"destroy"!==b&&(c=new d(this,null),c[b]()):"object"==typeof b&&(c=new d(this,b)):c=new d(this,null),a.data(this,"plugin_"+e,c))})}}(jQuery,window,document);;
/*! jQuery localtime - v0.9.1 - 2014-01-11
* https://github.com/GregDThomas/jquery-localtime
* Copyright (c) 2014 Greg Thomas; Licensed Apache-2.0 */
(function (e) { "use strict"; e.localtime = function () { var a = { localtime: "yyyy-MM-dd HH:mm:ss" }, t = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], r = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], c = ["th", "st", "nd", "rd"], s = function (e) { return e >= 13 ? e - 12 : "0" === e ? 12 : e }, i = function (e, i) { var o = "" + e.getFullYear(), n = "" + (e.getMonth() + 1), l = "" + e.getDate(), m = e.getDay(), d = "" + e.getHours(), u = "" + e.getMinutes(), b = "" + e.getSeconds(), f = "" + e.getMilliseconds(), k = e.getTimezoneOffset(), h = k > 0 ? "-" : "+"; if (k = Math.abs(k), void 0 === i) { var y; for (y in a) if (a.hasOwnProperty(y)) { i = a[y]; break } if (void 0 === i) return "" + e } for (var g = "", p = "", M = 0; i.length > M; M++) if (p += i.charAt(M), "'" === p) for (M++; i.length > M; M++) { var T = i.charAt(M); if ("'" === T) { p = ""; break } g += T } else if ("\\" === p && i.length - 1 > M && "'" === i.charAt(M + 1)) M++, g += "'", p = ""; else if (M === i.length - 1 || i.charAt(M) !== i.charAt(M + 1)) { switch (p) { case "d": g += l; break; case "dd": g += ("0" + l).slice(-2); break; case "ddd": g += r[m].substr(0, 3); break; case "ddddd": g += r[m]; break; case "M": g += n; break; case "MM": g += ("0" + n).slice(-2); break; case "MMM": g += t[n - 1].substr(0, 3); break; case "MMMMM": g += t[n - 1]; break; case "yy": g += o.slice(-2); break; case "yyyy": g += o; break; case "H": g += d; break; case "HH": g += ("0" + d).slice(-2); break; case "h": g += s(d); break; case "hh": g += ("0" + s(d)).slice(-2); break; case "m": g += u; break; case "mm": g += ("0" + u).slice(-2); break; case "s": g += b; break; case "ss": g += ("0" + b).slice(-2); break; case "S": g += f; break; case "SS": g += ("0" + f).slice(-2); break; case "SSS": g += ("00" + f).slice(-3); break; case "o": switch (l) { case "11": case "12": case "13": g += c[0]; break; default: var v = l % 10; v > 3 && (v = 0), g += c[v] } break; case "a": case "TT": g += d >= 12 ? "PM" : "AM"; break; case "tt": g += d >= 12 ? "pm" : "am"; break; case "T": g += d >= 12 ? "P" : "A"; break; case "t": g += d >= 12 ? "p" : "a"; break; case "z": g += h + parseInt(k / 60, 10); break; case "zz": g += h + ("0" + parseInt(k / 60, 10)).slice(-2); break; case "zzz": g += h + ("0" + parseInt(k / 60, 10)).slice(-2) + ":" + ("0" + k % 60).slice(-2); break; default: g += p } p = "" } return g }; return { setFormat: function (e) { a = "object" == typeof e ? e : { localtime: e } }, getFormat: function () { return a }, parseISOTimeString: function (a) { a = e.trim("" + a); var t = /^(\d{4})-([01]\d)-([0-3]\d)[T| ]([0-2]\d):([0-5]\d)(?::([0-5]\d)(?:\.(\d{3}))?)?Z$/.exec(a); if (t) { var r = parseInt(t[1], 10), c = parseInt(t[2], 10) - 1, s = parseInt(t[3], 10), i = parseInt(t[4], 10), o = parseInt(t[5], 10), n = t[6] ? parseInt(t[6], 10) : 0, l = t[7] ? parseInt(t[7], 10) : 0, m = new Date(Date.UTC(r, c, s, i, o, n, l)); if (m.getUTCFullYear() !== r || m.getUTCMonth() !== c || m.getUTCDate() !== s) throw Error(t[1] + "-" + t[2] + "-" + t[3] + " is not a valid date"); if (m.getUTCHours() !== i) throw Error(t[4] + ":" + t[5] + " is not a valid time"); return m } throw Error(a + " is not a supported date/time string") }, toLocalTime: function (a, t) { return "[object Date]" !== Object.prototype.toString.call(a) && (a = e.localtime.parseISOTimeString(a)), "" === t && (t = void 0), i(a, t) }, formatObject: function (a, t) { a.is(":input") ? a.val(e.localtime.toLocalTime(a.val(), t)) : a.is("time") ? a.text(e.localtime.toLocalTime(a.attr("datetime"), t)) : a.text(e.localtime.toLocalTime(a.text(), t)) }, formatPage: function () { e.localtime.format() }, format: function (a) { var t, r, c = function () { e.localtime.formatObject(e(this), t) }, s = e.localtime.getFormat(); for (r in s) s.hasOwnProperty(r) && (t = s[r], e("." + r, a).each(c)); e("[data-localtime-format]", a).each(function () { e.localtime.formatObject(e(this), e(this).attr("data-localtime-format")) }) } } }() })(jQuery), jQuery(document).ready(function (e) { "use strict"; e.localtime.format() });;
/*!
	Autosize 3.0.20
	license: MIT
	http://www.jacklmoore.com/autosize
*/
!function(e,t){if("function"==typeof define&&define.amd)define(["exports","module"],t);else if("undefined"!=typeof exports&&"undefined"!=typeof module)t(exports,module);else{var n={exports:{}};t(n.exports,n),e.autosize=n.exports}}(this,function(e,t){"use strict";function n(e){function t(){var t=window.getComputedStyle(e,null);"vertical"===t.resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),s="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(s)&&(s=0),l()}function n(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function o(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function r(){var t=e.style.height,n=o(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="auto";var i=e.scrollHeight+s;return 0===e.scrollHeight?void(e.style.height=t):(e.style.height=i+"px",u=e.clientWidth,n.forEach(function(e){e.node.scrollTop=e.scrollTop}),void(r&&(document.documentElement.scrollTop=r)))}function l(){r();var t=Math.round(parseFloat(e.style.height)),o=window.getComputedStyle(e,null),i=Math.round(parseFloat(o.height));if(i!==t?"visible"!==o.overflowY&&(n("visible"),r(),i=Math.round(parseFloat(window.getComputedStyle(e,null).height))):"hidden"!==o.overflowY&&(n("hidden"),r(),i=Math.round(parseFloat(window.getComputedStyle(e,null).height))),a!==i){a=i;var l=d("autosize:resized");try{e.dispatchEvent(l)}catch(e){}}}if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!i.has(e)){var s=null,u=e.clientWidth,a=null,p=function(){e.clientWidth!==u&&l()},c=function(t){window.removeEventListener("resize",p,!1),e.removeEventListener("input",l,!1),e.removeEventListener("keyup",l,!1),e.removeEventListener("autosize:destroy",c,!1),e.removeEventListener("autosize:update",l,!1),Object.keys(t).forEach(function(n){e.style[n]=t[n]}),i.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",c,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",l,!1),window.addEventListener("resize",p,!1),e.addEventListener("input",l,!1),e.addEventListener("autosize:update",l,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",i.set(e,{destroy:c,update:l}),t()}}function o(e){var t=i.get(e);t&&t.destroy()}function r(e){var t=i.get(e);t&&t.update()}var i="function"==typeof Map?new Map:function(){var e=[],t=[];return{has:function(t){return e.indexOf(t)>-1},get:function(n){return t[e.indexOf(n)]},set:function(n,o){e.indexOf(n)===-1&&(e.push(n),t.push(o))},delete:function(n){var o=e.indexOf(n);o>-1&&(e.splice(o,1),t.splice(o,1))}}}(),d=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){d=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?(l=function(e){return e},l.destroy=function(e){return e},l.update=function(e){return e}):(l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return n(e,t)}),e},l.destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],r),e}),t.exports=l});;
/// <reference path="../modules/global/passleevents.ts" />
var CurrentUser = /** @class */ (function () {
    function CurrentUser(Shortcode, UserType, MemberPassleShortcodes, ContentSharerPassleShortcodes, UserCreatedDate, UserTypeDescription, ClientShortcode, IsPassleEmployee, Passles, ISTATOYEnabled, CanEdit, SubscriberIds) {
        var _this = this;
        this.Shortcode = Shortcode;
        this.UserType = UserType;
        this.MemberPassleShortcodes = MemberPassleShortcodes;
        this.ContentSharerPassleShortcodes = ContentSharerPassleShortcodes;
        this.UserCreatedDate = UserCreatedDate;
        this.UserTypeDescription = UserTypeDescription;
        this.ClientShortcode = ClientShortcode;
        this.IsPassleEmployee = IsPassleEmployee;
        this.Passles = Passles;
        this.ISTATOYEnabled = ISTATOYEnabled;
        this.CanEdit = CanEdit;
        this.SubscriberIds = SubscriberIds;
        this.IsMember = function (passleShortcode) {
            return _this.MemberPassleShortcodes.indexOf(passleShortcode) != -1;
        };
        this.IsContentSharer = function (passleShortcode) {
            return _this.ContentSharerPassleShortcodes.indexOf(passleShortcode) != -1;
        };
        this.ContentPublisherPassles = function () {
            return _this.Passles.filter(function (p) { return p.Permissions.CanPublish; });
        };
    }
    return CurrentUser;
}());
var UserPassle = /** @class */ (function () {
    function UserPassle(Shortcode, Title, Permissions) {
        this.Shortcode = Shortcode;
        this.Title = Title;
        this.Permissions = Permissions;
    }
    return UserPassle;
}());
;
class PostViewType {
}
PostViewType.None = 0;
PostViewType.GridView = 1;
PostViewType.SinglePost = 2;
PostViewType.Dashboard = 3;
PostViewType.Following = 4;
PostViewType.PassleTagSearch = 5;
PostViewType.FollowingTagSearch = 6;
PostViewType.DashboardTagSearch = 7;
PostViewType.GlobalTagSearch = 8;
PostViewType.XMLFeed = 9;
PostViewType.XMLFeedSinglePost = 10;
PostViewType.WordpressPluginMiniFeed = 11;
PostViewType.WordpressPluginFullFeed = 12;
PostViewType.WordpressPluginFeedSinglePost = 13;
PostViewType.JQueryPluginGridView = 14;
PostViewType.JQueryPluginSinglePost = 15;
PostViewType.GridViewLoadMore = 16;
PostViewType.ProfilePage = 17;
PostViewType.PostViewRecommendedPosts = 18;
PostViewType.PreviewSinglePost = 19;
;
;
var PassleWebFunctions;
(function (PassleWebFunctions) {
    class PostAuthenticationAction {
        constructor(PostAuthenticationActionType, PostId) {
            this.PostAuthenticationActionType = PostAuthenticationActionType;
            this.PostId = PostId;
        }
    }
    PassleWebFunctions.PostAuthenticationAction = PostAuthenticationAction;
    let PostAuthenticationActionType;
    (function (PostAuthenticationActionType) {
        PostAuthenticationActionType[PostAuthenticationActionType["None"] = 0] = "None";
        PostAuthenticationActionType[PostAuthenticationActionType["Follow"] = 1] = "Follow";
        PostAuthenticationActionType[PostAuthenticationActionType["SharePostByEmail"] = 2] = "SharePostByEmail";
    })(PostAuthenticationActionType = PassleWebFunctions.PostAuthenticationActionType || (PassleWebFunctions.PostAuthenticationActionType = {}));
    ;
    PassleWebFunctions.CurrentUserLikedPosts = [];
    PassleWebFunctions.AuthenticationComplete = false;
    var PassleWebRoot;
    var AuthTokenSessionKey = '_authToken';
    var AuthenticationCallback = () => { };
    var PortholeGeneralProxy = null;
    var PortholeClientWebPostMessageReceiverProxy = null;
    var PassleShortcode = '';
    var PostShortcode = '';
    var UserShortcode = '';
    function SetAuthenticationCallback(callback) {
        AuthenticationCallback = callback;
    }
    PassleWebFunctions.SetAuthenticationCallback = SetAuthenticationCallback;
    function Initialise(passleShortcode, userShortcode, postShortcode) {
        PassleShortcode = passleShortcode;
        UserShortcode = userShortcode;
        PostShortcode = postShortcode;
        PassleWebRoot = PassleEnvironmentConfig.PassleWebRoot;
        SubscribeToEvents();
        PortholeGeneralProxy = new Porthole.WindowProxy(PassleWebRoot + '/portholeproxy', 'passle-web-iframe');
        PortholeClientWebPostMessageReceiverProxy = new Porthole.WindowProxy(PassleWebRoot + '/portholeproxy', 'passle-web-post-message-receiver');
        PortholeGeneralProxy.addEventListener(function (e) {
            PostMessageListener(e);
        });
        PortholeClientWebPostMessageReceiverProxy.addEventListener(function (e) {
            PostMessageListener(e);
        });
        window.addEventListener('message', function (e) {
            if (e.data && e.data.MessageType) {
                PostMessageListener(e);
            }
        });
        InjectHiddenIFrame("passle-web-iframe-container", "passleweb-message-dispatcher", "Porthole/ClientWebMessageReceiver", () => {
            $('#passleweb-message-dispatcher').on('load', function () {
                GlobalDeferred.PortholeInitialised.resolve(true);
            });
        }, 'passle-web-post-message-receiver');
    }
    PassleWebFunctions.Initialise = Initialise;
    function SubscribeToEvents() {
        GlobalEvents.AuthenticateUser.on((data) => {
            TryAuthenticateUserWithPassleWeb(data.PassleShortcode, data.PersonShortcode, data.PostShortcode);
        });
        GlobalEvents.UserAuthenticationComplete.on(() => {
            PassleWebFunctions.AuthenticationComplete = true;
            AuthenticationCallback();
            AuthenticationCallback = () => { };
        });
        GlobalEvents.UserAuthenticationComplete.on((data) => {
            GlobalDeferred.UserAuthenticationComplete.resolve(data);
        });
    }
    function IsMobileView() {
        return (window.innerWidth < 979);
    }
    PassleWebFunctions.IsMobileView = IsMobileView;
    function PassleWebDocumentDimensions(msg) {
        if (PassleWebFunctions.IsMobileView()) {
            $('#passleweb-iframe-container').css("height", (msg.Height + 16) + "px");
        }
    }
    PassleWebFunctions.PassleWebDocumentDimensions = PassleWebDocumentDimensions;
    function InjectHiddenIFrame(containerId, iFrameId, iFrameSource, callback, name = "passle-web-iframe") {
        ensureContainerExists(containerId);
        $('#' + containerId).append('<iframe class="hide" name="' + name + '" id="' + iFrameId + '" src="https://' + PassleWebRoot + '/' + iFrameSource + '"></iframe>');
        if (callback)
            callback();
    }
    PassleWebFunctions.InjectHiddenIFrame = InjectHiddenIFrame;
    function ShowPassleWebLogin() {
        OpenAuthWindow('https://' + PassleWebRoot + "/ClientWebAPIAccount/Login", "LoginAuthWindow");
    }
    PassleWebFunctions.ShowPassleWebLogin = ShowPassleWebLogin;
    function LogUserCookieOption(version, accepted) {
        var sourceUrl = `ClientWebAPIAccount/StoreCookieOptions?passleId=${PassleShortcode}&version=${version}&accepted=${accepted}`;
        InjectHiddenIFrame("user-cookie-options", "user-cokkie-options-stored", sourceUrl);
    }
    PassleWebFunctions.LogUserCookieOption = LogUserCookieOption;
    function OpenAuthWindow(url, windowName) {
        var windowObjectReference;
        windowObjectReference = window.open(url, windowName, null);
    }
    function ensureContainerExists(containerId) {
        if ($('#' + containerId).length == 0) {
            var containerHtml = "<div id='" + containerId + "' style='display:none;'></div>";
            $("body").append(containerHtml);
        }
    }
    function TryAuthenticateUserWithPassleWeb(passleShortcode, personShortcode, postShortcode) {
        passleShortcode = passleShortcode ? passleShortcode : "";
        personShortcode = personShortcode ? personShortcode : "";
        postShortcode = postShortcode ? postShortcode : "";
        const authEndpoint = `https://${PassleWebRoot}/CrossDomainAuthentication/UserAuthJsonp?passleShortcode=${passleShortcode}&personShortcode=${personShortcode}&postShortcode=${postShortcode}`;
        $.ajax({
            url: authEndpoint,
            type: 'GET',
            dataType: 'jsonp',
            xhrFields: {
                withCredentials: true
            },
            success: (data) => {
                var user = data['User'];
                PassleWebFunctions.CurrentUserObj = user == null ? null : new CurrentUser(user.Shortcode, user.UserType, user.MemberPassleShortcodes, user.ContentSharerPassleShortcodes, user.UserCreatedDate, user.UserTypeDescription, user.ClientShortcode, user.IsPassleEmployee, user.Passles, user.ISTATOYEnabled, user.CanEdit, user.SubscriberIds);
                PassleWebFunctions.CurrentUserLikedPosts = data['LikedPostShortcodes'];
                GlobalEvents.UserAuthenticationComplete.trigger({ authenticationRequestCompleted: true, user: PassleWebFunctions.CurrentUserObj, currentUserlikedPostShortcodes: PassleWebFunctions.CurrentUserLikedPosts });
                var subscriberIds = data['SubscriberIds'];
                var trackingEventData = new PassleEvents.UserTrackingDataAvailableEventData(PassleWebFunctions.CurrentUserObj, postShortcode, personShortcode, passleShortcode, subscriberIds);
                PassleGlobalEvents.UserTrackingDataAvailable.trigger(trackingEventData);
                var clientWebTrackingEventData = new PassleEvents.ClientWebTrackingDataAvailableEventData(PassleWebFunctions.CurrentUserObj == null ? "" : PassleWebFunctions.CurrentUserObj.Shortcode, subscriberIds, postShortcode, personShortcode, passleShortcode);
                PassleGlobalEvents.ClientWebTrackingDataAvailable.trigger(clientWebTrackingEventData);
            }
        });
        window.setTimeout(() => {
            if (!PassleWebFunctions.AuthenticationComplete) {
                GlobalEvents.UserAuthenticationComplete.trigger({ authenticationRequestCompleted: false, user: null, currentUserlikedPostShortcodes: [] });
            }
        }, 10000);
    }
    PassleWebFunctions.TryAuthenticateUserWithPassleWeb = TryAuthenticateUserWithPassleWeb;
    function PostMessageListener(event) {
        var thisObj = this;
        if (GetHost(event.origin) !== GetHost(PassleWebRoot)) {
            return;
        }
        try {
            var msg = event.data;
            switch (msg['MessageType']) {
                case 'PassleWebEmailResponse':
                    var success = msg['Successful'];
                    var _ISTATOYShareStatus = msg['ISTATOYShareStatus'];
                    GlobalEvents.EmailRequestComplete.trigger(new ClientWebEvents.EmailEventData(success, _ISTATOYShareStatus));
                    break;
                case 'PassleWebNewsletterSubscribeResponse':
                    var success = msg['Successful'];
                    GlobalEvents.NewsletterSubscribeRequestComplete.trigger(success);
                    break;
                case 'PassleWebLikeResponse':
                    var success = msg['Successful'];
                    GlobalEvents.LikeRequestComplete.trigger(new ClientWebEvents.LikeEventData(msg['PostShortcode'], msg['Like'], success));
                    break;
                case 'PassleWebRepostResponse':
                    var success = msg['Successful'];
                    GlobalEvents.RepostRequestComplete.trigger(new ClientWebEvents.RepostEventData(msg['PostShortcode'], msg['NewPostUrl'], msg['PreviouslyReposted'], success));
                    break;
                case 'PassleWebRegistrationResponse':
                    var success = msg['Successful'];
                    if (success) {
                        TryAuthenticateUserWithPassleWeb(PassleShortcode, UserShortcode, PostShortcode);
                        PostAuthenticationActionComplete(msg);
                    }
                    break;
                case 'PassleWebLoginResponse':
                    var success = msg['Successful'];
                    if (success) {
                        TryAuthenticateUserWithPassleWeb(PassleShortcode, UserShortcode, PostShortcode);
                        PostAuthenticationActionComplete(msg);
                    }
                    break;
                case 'PassleWebNotAuthenticated':
                    GlobalEvents.NotAuthenticated.trigger();
                    break;
                case 'PassleWebDocumentDimensions':
                    PassleWebDocumentDimensions(msg);
                    break;
                case 'LogPageRequestAndPostViewsReponse':
                    var pageRequestId = msg['PageRequestId'];
                    $('#page-request-id').val(pageRequestId);
                    GlobalDeferred.PageRequestLoggingComplete.resolve(pageRequestId);
                    break;
                case 'UserAuthResponse':
                    break;
                case 'PassleWebRequestApprovalResponse':
                    GlobalEvents.ApprovalRequested.trigger();
                    break;
                case 'PassleWebGetApproverListResponse':
                    var success = msg['Successful'];
                    GlobalEvents.ApproverListRequested.trigger(new ClientWebEvents.ApproverListEventData(msg['PassleShortcode'], msg['Approvers'], success));
                    break;
                case 'PassleWebApproveResponse':
                    GlobalEvents.PostApproved.trigger();
                    break;
                case 'PassleWebDeclineResponse':
                    GlobalEvents.PostDeclined.trigger();
                    break;
                case 'PassleWebPublishResponse':
                    GlobalEvents.PostMadeLive.trigger();
                    break;
                case 'PassleWebAddTagResponse':
                    GlobalEvents.TagAddedToPost.trigger();
                    break;
                case 'PassleWebThankResponse':
                    var success = msg['Successful'];
                    GlobalEvents.ThankRequestComplete.trigger(new ClientWebEvents.ThankEventData(success, msg['Message']));
                    break;
                case 'PassleWebUserMessageResponse':
                    var success = msg['Successful'];
                    GlobalEvents.UserMessageRequestComplete.trigger(new ClientWebEvents.UserMessageRequestCompleteEventData(success));
                    break;
                case 'PassleWebAccessDeniedResponse':
                    var requestedAction = msg['RequestedAction'];
                    console.log('Access was denied for the following action: ' + requestedAction);
                default:
                    console.log('message not recognised ' + msg['MessageType']);
            }
        }
        catch (err) {
            if (window.console) {
                console.log("Error parsing postmessage");
                console.log(err);
            }
        }
    }
    function PostAuthenticationActionComplete(msg) {
        var action = msg['PostAuthenticationAction'];
        var actionSuccess = msg['PostAuthenticationActionSuccess'];
        var actionPassleId = msg['PostAuthenticationActionPassleShortcode'];
        var actionPostId = msg['PostAuthenticationActionPostShortcode'];
        switch (action) {
            case PostAuthenticationActionType.Follow:
                if (actionSuccess) {
                    GlobalEvents.FollowRequestComplete.trigger(new ClientWebEvents.FollowRequestCompleteEventData(actionSuccess, actionPassleId));
                }
                break;
            case PostAuthenticationActionType.SharePostByEmail:
                GlobalEvents.PostAuthenticationSharePostByEmail.trigger();
                break;
        }
    }
    function GetHost(urlRoot) {
        return urlRoot.replace('http://', '').replace('https://', '');
    }
})(PassleWebFunctions || (PassleWebFunctions = {}));
;
// Module
var AjaxFunctions;
(function (AjaxFunctions) {
    function AjaxSaveUpdate(model, controller, action, errorIsFatal, callBack, onError, onComplete) {
        if (errorIsFatal === void 0) { errorIsFatal = false; }
        if (callBack === void 0) { callBack = function (data) { }; }
        if (onError === void 0) { onError = function () { }; }
        if (onComplete === void 0) { onComplete = function () { }; }
        var headers = {};
        if (model && model.requestHeaders) {
            headers = model.requestHeaders;
            delete model.requestHeaders;
        }
        var request = {
            url: '/' + controller + '/' + action,
            type: 'POST',
            traditional: true,
            dataType: "json",
            contentType: 'application/json',
            cache: false,
            data: JSON.stringify(model),
            complete: function () {
                onComplete();
            },
            headers: headers,
            success: function (result) {
                if (result.Error == true) {
                    HandleAjaxError(errorIsFatal, onError, controller, action, model, result);
                }
                else {
                    callBack(result);
                }
            },
            error: function (err) {
                HandleAjaxError(errorIsFatal, onError, controller, action, model, err);
            }
        };
        return $.ajax(request);
    }
    AjaxFunctions.AjaxSaveUpdate = AjaxSaveUpdate;
    function AjaxPostData(model, controller, action, errorIsFatal, callBack, onError, root, withCredentials) {
        if (errorIsFatal === void 0) { errorIsFatal = false; }
        if (callBack === void 0) { callBack = null; }
        if (onError === void 0) { onError = null; }
        if (root === void 0) { root = ''; }
        if (withCredentials === void 0) { withCredentials = false; }
        var headers = {};
        if (model && model.requestHeaders) {
            headers = model.requestHeaders;
            delete model.requestHeaders;
        }
        var url = root + '/' + controller + '/' + action;
        var data = model;
        if (Object.prototype.toString.call(model) == "[object Object]") {
            data = new FormData();
            Object.keys(model).forEach(function (k) { return data.append(k, model[k] || ''); });
        }
        var request = new XMLHttpRequest();
        request.open("POST", url);
        Object.keys(headers).forEach(function (h) { return request.setRequestHeader(h, headers[h]); });
        request.onload = function (result) {
            if (result.error == true) {
                HandleAjaxError(errorIsFatal, onError, controller, action, model, request.response);
            }
            else {
                if (callBack) {
                    callBack(JSON.parse(request.response));
                }
            }
        };
        request.onerror = function (err) { return HandleAjaxError(errorIsFatal, onError, controller, action, model, err); };
        request.send(data);
    }
    AjaxFunctions.AjaxPostData = AjaxPostData;
    function AjaxFetchData(model, controller, action, errorIsFatal, callBack, onError, root, withCredentials) {
        if (errorIsFatal === void 0) { errorIsFatal = false; }
        if (callBack === void 0) { callBack = function (data) { }; }
        if (onError === void 0) { onError = function () { }; }
        if (root === void 0) { root = ''; }
        if (withCredentials === void 0) { withCredentials = false; }
        return $.ajax({
            url: root + '/' + controller + '/' + action,
            type: 'GET',
            traditional: true,
            data: model,
            xhrFields: { withCredentials: withCredentials },
            success: function (result) {
                if (result.error == true) {
                    HandleAjaxError(errorIsFatal, onError, controller, action, model, result);
                }
                else {
                    callBack(result);
                }
            },
            error: function (result) {
                HandleAjaxError(errorIsFatal, onError, controller, action, model, result);
            }
        });
    }
    AjaxFunctions.AjaxFetchData = AjaxFetchData;
    function AjaxInjectPartialIntoElement(model, controller, action, selector, errorIsFatal, callBack, onError, replaceElement, append) {
        if (errorIsFatal === void 0) { errorIsFatal = false; }
        if (callBack === void 0) { callBack = function (data) { }; }
        if (onError === void 0) { onError = function () { }; }
        if ($(selector).length == 0) {
            return;
        }
        AjaxFunctions.AjaxFetchData(model, controller, action, false, function (data) {
            if (replaceElement) {
                $(selector).replaceWith(data);
            }
            else {
                if (append) {
                    $(selector).append(data);
                }
                else {
                    $(selector).html(data);
                }
            }
            if (callBack) {
                callBack(data);
            }
        }, onError);
    }
    AjaxFunctions.AjaxInjectPartialIntoElement = AjaxInjectPartialIntoElement;
    function AjaxShowModalForPartial(model, controller, action, modalId, errorIsFatal, callBack, onError) {
        if (errorIsFatal === void 0) { errorIsFatal = false; }
        if (callBack === void 0) { callBack = function (data) { }; }
        if (onError === void 0) { onError = function () { }; }
        var selector = "#" + modalId;
        /*If the modal doesn't exist, create it*/
        if (!$(selector).length) {
            var modalDiv = document.createElement("div");
            modalDiv.id = modalId;
            modalDiv.className = "modal-window modal hide";
            document.body.appendChild(modalDiv);
        }
        AjaxInjectPartialIntoElement(model, controller, action, selector, false, function (data) {
            $(selector).removeClass("hide").modal();
            callBack(data);
        });
    }
    AjaxFunctions.AjaxShowModalForPartial = AjaxShowModalForPartial;
    // Problems with cross domain ajax on IE<=9
    function AjaxCrossDomainPost(model, controller, action, errorIsFatal, callBack, onError, onComplete, remoteRoot) {
        if (errorIsFatal === void 0) { errorIsFatal = false; }
        if (callBack === void 0) { callBack = function (data) { }; }
        if (onError === void 0) { onError = function () { }; }
        if (onComplete === void 0) { onComplete = function () { }; }
        if (remoteRoot === void 0) { remoteRoot = ''; }
        $.ajax({
            url: remoteRoot + '/' + controller + '/' + action,
            type: 'POST',
            traditional: true,
            data: model,
            complete: function () {
                onComplete();
            },
            success: function (result) {
                if (result.error == true) {
                    HandleAjaxError(errorIsFatal, onError, controller, action, model, result);
                }
                else {
                    callBack(result);
                }
            },
            error: function (err) {
                if (console)
                    console.log(err);
                HandleAjaxError(errorIsFatal, onError, controller, action, model, err);
            }
        });
    }
    AjaxFunctions.AjaxCrossDomainPost = AjaxCrossDomainPost;
    function HandleAjaxError(errorIsFatal, onError, controller, action, model, result) {
        if (onError) {
            onError();
        }
        if (errorIsFatal) {
            window.location.href = '/Error/Index';
        }
        if (result)
            console.log(result);
        throw "Error occurred in ajax call - controller : " + controller + ' action : ' + action + ' model : ' + JSON.stringify(model);
    }
})(AjaxFunctions || (AjaxFunctions = {}));
;
var CWAjaxFunctions;
(function (CWAjaxFunctions) {
    function LogPostViews(pageRequestId, postViewType, postShortcodes, passleShortcode, statsLoggingContainterId, controller, action) {
        var logContainers = $('.post-view-log-container').length;
        var containerId = 'post-view-log-container' + logContainers;
        $("#" + statsLoggingContainterId).append('<div id="' + containerId + '" class="post-view-log-container"></div>');
        if (passleShortcode && postShortcodes.length > 0) {
            var model = {
                passleShortcode: passleShortcode,
                postShortcodes: postShortcodes,
                postViewType: postViewType,
                c: controller,
                a: action,
                url: window.location.href,
                pageRequestId: pageRequestId
            };
            AjaxFunctions.AjaxInjectPartialIntoElement(model, "Statistics", "_LogPageRequestAndPostViews", "#" + containerId, false);
        }
    }
    CWAjaxFunctions.LogPostViews = LogPostViews;
})(CWAjaxFunctions || (CWAjaxFunctions = {}));
;
var SessionStorage;
(function (SessionStorage) {
    function SetSessionStorageItem(key, value) {
        try {
            sessionStorage.setItem(key, value);
        }
        catch (err) {
            ReportSessionStorageError(err);
            return '';
        }
    }
    SessionStorage.SetSessionStorageItem = SetSessionStorageItem;
    function GetSessionStorageItem(key) {
        try {
            return sessionStorage.getItem(key);
        }
        catch (err) {
            ReportSessionStorageError(err);
            return '';
        }
    }
    SessionStorage.GetSessionStorageItem = GetSessionStorageItem;
    function RemoveSessionStorageItem(key) {
        try {
            return sessionStorage.removeItem(key);
        }
        catch (err) {
            ReportSessionStorageError(err);
        }
    }
    SessionStorage.RemoveSessionStorageItem = RemoveSessionStorageItem;
    function ReportSessionStorageError(err) {
        if (window.console) {
            console.log("Error using sessionStorage");
            console.log(err);
        }
    }
})(SessionStorage || (SessionStorage = {}));
;
class Page {
    constructor(pageType) {
        this.InitializePage();
        this.PageSubscribeToEvents();
        EventTracking.TrackPageLoad(pageType || "Page");
    }
    PageSubscribeToEvents() {
        var thisObj = this;
        GlobalEvents.UserActionRequiresPassleUserAuthentication.on(() => {
            PassleWebFunctions.ShowPassleWebLogin();
        });
        GlobalEvents.NotAuthenticated.on(() => {
            PassleWebFunctions.ShowPassleWebLogin();
            GlobalEvents.AuthenticateUser.trigger(new ClientWebEvents.AuthenticateUserEventData(thisObj.PassleShortcode, thisObj.PersonShortcode, thisObj.PostShortcode));
        });
    }
    InitializePage() {
        var thisObj = this;
        thisObj.PassleShortcode = $('#passle-shortcode').val() || "";
        thisObj.PersonShortcode = $('#person-shortcode').val() || "";
        thisObj.PostShortcode = $('#post-shortcode').val() || "";
        PassleWebFunctions.Initialise(thisObj.PassleShortcode, thisObj.PersonShortcode, thisObj.PostShortcode);
        GlobalEvents.AuthenticateUser.trigger(new ClientWebEvents.AuthenticateUserEventData(thisObj.PassleShortcode, thisObj.PersonShortcode, thisObj.PostShortcode));
        window.addEventListener('error', function (e) {
            let errorMsg = "";
            if (e["error"]) {
                if (e["error"].stack) {
                    errorMsg = e["error"].stack;
                }
                else {
                    errorMsg = e["error"].toString();
                }
            }
            console.log(errorMsg);
        });
        thisObj.InMobileApp = $("#InMobileApp").val() === "true";
        if (thisObj.InMobileApp) {
            PassleFunctions.RemoveParameterByName("LinkSource");
            $("a").attr('href', function (i, h) {
                return h + (h.indexOf('?') != -1 ? "&LinkSource=PassleApp" : "?LinkSource=PassleApp");
            });
        }
        $("body").on("click", ".show-more", thisObj.showMoreAuthors.bind(thisObj));
        $("body").on('click', ".show-less", thisObj.showLessAuthors.bind(thisObj));
    }
    showMoreAuthors(e) {
        const post = $(e.currentTarget).closest(".passle-article");
        post.find(".extra-authors").removeClass("hidden");
        post.find(".show-more").addClass("hidden");
        post.find(".show-less").removeClass("hidden");
    }
    showLessAuthors(e) {
        const post = $(e.currentTarget).closest(".passle-article");
        post.find(".extra-authors").addClass("hidden");
        post.find(".show-more").removeClass("hidden");
        post.find(".show-less").addClass("hidden");
    }
}
;
var Component = /** @class */ (function () {
    function Component() {
        this.PopulateProperties();
    }
    Component.prototype.Initialise = function () {
        this.BindUIEvents();
        this.SubscribeToEvents();
    };
    Component.prototype.PopulateProperties = function () {
    };
    Component.prototype.BindUIEvents = function () {
    };
    Component.prototype.SubscribeToEvents = function () {
    };
    return Component;
}());
;
/// <reference path="../modules/global/passleevents.ts" />
var EventTracking;
(function (EventTracking) {
    var TrackedEvent = /** @class */ (function () {
        function TrackedEvent(EventAction, EventCategory, EventLabel, Properties) {
            if (Properties === void 0) { Properties = {}; }
            this.EventAction = EventAction;
            this.EventCategory = EventCategory;
            this.EventLabel = EventLabel;
            this.Properties = Properties;
            this.GetLocationDetails = function () {
                return new EventLocation(location.href, document.title);
            };
            this.Location = this.GetLocationDetails();
            this.TimeStamp = new Date();
        }
        return TrackedEvent;
    }());
    EventTracking.TrackedEvent = TrackedEvent;
    var EventUser = /** @class */ (function () {
        function EventUser(UserShortcode) {
            this.UserShortcode = UserShortcode;
        }
        return EventUser;
    }());
    EventTracking.EventUser = EventUser;
    var EventLocation = /** @class */ (function () {
        function EventLocation(LocationUrl, LocationTitle) {
            this.LocationUrl = LocationUrl;
            this.LocationTitle = LocationTitle;
        }
        return EventLocation;
    }());
    EventTracking.EventLocation = EventLocation;
})(EventTracking || (EventTracking = {}));
;
/// <reference path="../../models/currentuser.ts" />
var PassleEvents;
(function (PassleEvents) {
    var EventHandler = /** @class */ (function () {
        function EventHandler(handlerFunction, order) {
            this.handlerFunction = handlerFunction;
            this.order = order;
        }
        return EventHandler;
    }());
    PassleEvents.EventHandler = EventHandler;
    var EventHandlerWithData = /** @class */ (function () {
        function EventHandlerWithData(handlerFunction, order) {
            this.handlerFunction = handlerFunction;
            this.order = order;
        }
        return EventHandlerWithData;
    }());
    PassleEvents.EventHandlerWithData = EventHandlerWithData;
    var Event = /** @class */ (function () {
        function Event() {
            this.handlers = [];
        }
        Event.prototype.on = function (handler) {
            var eventHandler = new EventHandler(handler, 50);
            this.handlers.push(eventHandler);
        };
        Event.prototype.onOrdered = function (order, handler) {
            var eventHandler = new EventHandler(handler, order);
            this.handlers.push(eventHandler);
        };
        Event.prototype.off = function (handler) {
            this.handlers = this.handlers.filter(function (h) { return h.handlerFunction !== handler; });
        };
        Event.prototype.trigger = function () {
            if (this.handlers) {
                var orderedHandlers = this.handlers.sort(function (a, b) { return a.order - b.order; });
                orderedHandlers.forEach(function (h) {
                    try {
                        h.handlerFunction();
                    }
                    catch (err) {
                        if (window.console) {
                            console.log("Error executing handler for event subscriber");
                            console.log(err);
                        }
                    }
                });
            }
        };
        return Event;
    }());
    PassleEvents.Event = Event;
    var EventWithData = /** @class */ (function () {
        function EventWithData() {
            this.handlers = [];
        }
        EventWithData.prototype.on = function (handler) {
            var eventHandler = new EventHandlerWithData(handler, 50);
            this.handlers.push(eventHandler);
        };
        EventWithData.prototype.onOrdered = function (order, handler) {
            var eventHandler = new EventHandlerWithData(handler, order);
            this.handlers.push(eventHandler);
        };
        EventWithData.prototype.off = function (handler) {
            this.handlers = this.handlers.filter(function (h) { return h.handlerFunction !== handler; });
        };
        EventWithData.prototype.trigger = function (data) {
            if (this.handlers) {
                var orderedHandlers = this.handlers.sort(function (a, b) { return a.order - b.order; });
                orderedHandlers.forEach(function (h) {
                    try {
                        h.handlerFunction(data);
                    }
                    catch (err) {
                        if (window.console) {
                            console.log("Error executing handler for event subscriber");
                            console.log(err);
                        }
                    }
                });
            }
        };
        return EventWithData;
    }());
    PassleEvents.EventWithData = EventWithData;
    var Global = /** @class */ (function () {
        function Global() {
            this.CurrentUserDataAvailable = new EventWithData();
            this.ClientHostingDataAvailable = new EventWithData();
            this.UserTrackingDataAvailable = new EventWithData();
            this.ClientWebTrackingDataAvailable = new EventWithData();
            this.ClientWebLikePostRequestComplete = new EventWithData();
            this.InitDebugEventLogging = new Event();
            this.NewPostsLoaded = new Event();
        }
        return Global;
    }());
    PassleEvents.Global = Global;
    var CurrentUserData = /** @class */ (function () {
        function CurrentUserData(likedPostShortcodes) {
            this.likedPostShortcodes = likedPostShortcodes;
        }
        return CurrentUserData;
    }());
    PassleEvents.CurrentUserData = CurrentUserData;
    var ClientHostingDataAvailableEventData = /** @class */ (function () {
        function ClientHostingDataAvailableEventData(profilePath, postPath) {
            this.profilePath = profilePath;
            this.postPath = postPath;
        }
        return ClientHostingDataAvailableEventData;
    }());
    PassleEvents.ClientHostingDataAvailableEventData = ClientHostingDataAvailableEventData;
    var UserTrackingDataAvailableEventData = /** @class */ (function () {
        function UserTrackingDataAvailableEventData(currentUser, postShortcode, profilePersonShortcode, passleShortcode, subscriberIds) {
            this.currentUser = currentUser;
            this.postShortcode = postShortcode;
            this.profilePersonShortcode = profilePersonShortcode;
            this.passleShortcode = passleShortcode;
            this.subscriberIds = subscriberIds;
        }
        return UserTrackingDataAvailableEventData;
    }());
    PassleEvents.UserTrackingDataAvailableEventData = UserTrackingDataAvailableEventData;
    var ClientWebTrackingDataAvailableEventData = /** @class */ (function () {
        function ClientWebTrackingDataAvailableEventData(userShortcode, subscriberIds, postShortcode, profilePersonShortcode, passleShortcode) {
            this.userShortcode = userShortcode;
            this.subscriberIds = subscriberIds;
            this.postShortcode = postShortcode;
            this.profilePersonShortcode = profilePersonShortcode;
            this.passleShortcode = passleShortcode;
        }
        return ClientWebTrackingDataAvailableEventData;
    }());
    PassleEvents.ClientWebTrackingDataAvailableEventData = ClientWebTrackingDataAvailableEventData;
    var ClientWebLikePostRequestCompleteEventData = /** @class */ (function () {
        function ClientWebLikePostRequestCompleteEventData(postShortcode, like, success) {
            this.postShortcode = postShortcode;
            this.like = like;
            this.success = success;
        }
        return ClientWebLikePostRequestCompleteEventData;
    }());
    PassleEvents.ClientWebLikePostRequestCompleteEventData = ClientWebLikePostRequestCompleteEventData;
})(PassleEvents || (PassleEvents = {}));
var PassleGlobalEvents = new PassleEvents.Global();
;
/// <reference path="../../../models/trackedevent.ts" />
var EventTracking;
(function (EventTracking) {
    var Tracker = /** @class */ (function () {
        function Tracker() {
        }
        Tracker.prototype.TrackEvent = function (event) {
            if (this.CheckServiceIsAvailable()) {
                this.SendEvent(event);
            }
            else {
                this.HandleServiceUnavailable();
            }
        };
        Tracker.prototype.Initialise = function (user, subscriberIds) {
            if (this.CheckServiceIsAvailable()) {
                this.InitialiseService(user, subscriberIds);
            }
            else {
                this.HandleServiceUnavailable();
            }
        };
        Tracker.prototype.HandleServiceUnavailable = function () {
        };
        return Tracker;
    }());
    EventTracking.Tracker = Tracker;
})(EventTracking || (EventTracking = {}));
;
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/// <reference path="tracker.ts" />
var EventTracking;
(function (EventTracking) {
    var GoogleAnalyticsTracker = /** @class */ (function (_super) {
        __extends(GoogleAnalyticsTracker, _super);
        function GoogleAnalyticsTracker() {
            return _super !== null && _super.apply(this, arguments) || this;
        }
        GoogleAnalyticsTracker.prototype.SendEvent = function (event) {
            if (!(event.EventAction == Passel.API.Domain.Models.Tracking.ClientSideEventAction.Load && event.EventCategory == Passel.API.Domain.Models.Tracking.ClientSideEventCategory.Page)) {
                var category = PassleFunctions.GetStringValueFromEnum(Passel.API.Domain.Models.Tracking.ClientSideEventCategory, event.EventCategory);
                var action = PassleFunctions.GetStringValueFromEnum(Passel.API.Domain.Models.Tracking.ClientSideEventAction, event.EventAction);
                if (typeof window['dataLayer'] != 'undefined') {
                    //this means Google Tag Manager is enabled, so we fire events through that
                    window['dataLayer'].push({
                        'action': action,
                        'category': category,
                        'label': event.EventLabel,
                        'event': 'PassleClientWebGAEvent'
                    });
                }
            }
        };
        GoogleAnalyticsTracker.prototype.InitialiseService = function (user, subscriberIds) {
        };
        GoogleAnalyticsTracker.prototype.CheckServiceIsAvailable = function () {
            return (typeof ga != "undefined" || typeof window['dataLayer'] != 'undefined');
        };
        return GoogleAnalyticsTracker;
    }(EventTracking.Tracker));
    EventTracking.GoogleAnalyticsTracker = GoogleAnalyticsTracker;
})(EventTracking || (EventTracking = {}));
;
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var EventTracking;
(function (EventTracking) {
    var PassleTracker = /** @class */ (function (_super) {
        __extends(PassleTracker, _super);
        function PassleTracker() {
            return _super !== null && _super.apply(this, arguments) || this;
        }
        PassleTracker.prototype.SendEvent = function (event) {
            var category = PassleFunctions.GetStringValueFromEnum(Passel.API.Domain.Models.Tracking.ClientSideEventCategory, event.EventCategory);
            var model = {
                clientCategory: event.EventCategory,
                eventAction: event.EventAction,
                label: event.EventLabel,
                personId: this.UserShortcode,
                subscriberIds: this.SubscriberIds && Object.prototype.toString.call(this.SubscriberIds) === "[object Array]" ? this.SubscriberIds.join(",") : this.SubscriberIds,
                passleShortcode: event.PassleShortcode,
                postShortcode: event.PostShortcode,
                profilePersonShortcode: event.ProfilePersonShortcode
            };
            AjaxFunctions.AjaxPostData(model, "EventTrackingAjax", "RegisterClientSideEvent", false, null, null, "https://" + PassleEnvironmentConfig.PassleWebRoot);
        };
        PassleTracker.prototype.InitialiseService = function (user, subscriberIds) {
            if (user) {
                this.UserShortcode = user.UserShortcode;
            }
            this.SubscriberIds = subscriberIds;
        };
        PassleTracker.prototype.CheckServiceIsAvailable = function () {
            return true;
        };
        return PassleTracker;
    }(EventTracking.Tracker));
    EventTracking.PassleTracker = PassleTracker;
})(EventTracking || (EventTracking = {}));
;
var EventTracking;
(function (EventTracking) {
    var Trackers = [new EventTracking.GoogleAnalyticsTracker(), new EventTracking.PassleTracker()];
    var QueuedEvents = [];
    var User = null;
    var AuthenticationComplete = false;
    EventTracking.PostShortcode = "";
    EventTracking.ProfilePersonShortcode = "";
    EventTracking.PassleShortcode = "";
    var SubscriberIds = [];
    var profilePath = "u";
    var postPath = "post";
    var profileLinkRegex = CreatePathRegex(profilePath);
    var postLinkRegex = CreatePathRegex(postPath);
    var logEventsToConsole = false;
    SubscribeToEvents();
    InitialiseClickTracking();
    TrackEmailLinkClick();
    function InitialiseTrackers(user, subscriberIds) {
        Trackers.forEach(function (tracker) {
            tracker.Initialise(user, subscriberIds);
        });
    }
    function CreatePathRegex(postOrProfilePathName) {
        return new RegExp("/?/?.*/" + postOrProfilePathName + "/[a-zA-Z0-9]+(/[a-zA-Z0-9\\-]+)?", "gm");
    }
    function UpdatePathRegexes(profilePathString, postPathString) {
        profilePath = profilePathString;
        postPath = postPathString;
        profileLinkRegex = CreatePathRegex(profilePath);
        postLinkRegex = CreatePathRegex(postPath);
    }
    function IsProfileUrl(url) {
        return url.match(profileLinkRegex);
    }
    function IsPostUrl(url) {
        return url.match(postLinkRegex);
    }
    function InitialiseClickTracking() {
        document.addEventListener('click', function (ev) {
            var target = ev.target;
            var el = target.closest('a');
            if (!el)
                return;
            var clicked = false;
            if (el.hasAttribute('data-click-event-label')) {
                var action = Passel.API.Domain.Models.Tracking.ClientSideEventAction[el.getAttribute('data-click-event-action')];
                var category = Passel.API.Domain.Models.Tracking.ClientSideEventCategory[el.getAttribute('data-click-event-category')];
                var label = el.getAttribute('data-click-event-label');
                if (action && category) {
                    var event = new EventTracking.TrackedEvent(action, category, label);
                    RegisterEvent(event);
                    return;
                }
            }
            var href = (el.href || "").toLowerCase();
            var passleContentContainers = document.getElementsByClassName('passle-content');
            for (var ii = 0; ii < passleContentContainers.length; ii++) {
                if (passleContentContainers[ii].contains(el)) {
                    if (IsProfileUrl(href)) {
                        RegisterEvent(new EventTracking.TrackedEvent(Passel.API.Domain.Models.Tracking.ClientSideEventAction.ClickLink, Passel.API.Domain.Models.Tracking.ClientSideEventCategory.ProfilePage, href, { href: href, text: el.innerHTML }));
                        return;
                    }
                    else if (IsPostUrl(href)) {
                        RegisterEvent(new EventTracking.TrackedEvent(Passel.API.Domain.Models.Tracking.ClientSideEventAction.ClickLink, Passel.API.Domain.Models.Tracking.ClientSideEventCategory.PostPage, href, { href: href, text: el.innerHTML }));
                        return;
                    }
                    else {
                        RegisterEvent(new EventTracking.TrackedEvent(Passel.API.Domain.Models.Tracking.ClientSideEventAction.ClickLink, Passel.API.Domain.Models.Tracking.ClientSideEventCategory.Page, href, { href: href, text: el.innerHTML }));
                        return;
                    }
                }
            }
            // Fire a default TrackedEvent if the click doesn't match the above
            RegisterEvent(new EventTracking.TrackedEvent(Passel.API.Domain.Models.Tracking.ClientSideEventAction.ClickExternalLink, Passel.API.Domain.Models.Tracking.ClientSideEventCategory.Page, href, { href: href, text: el.innerHTML }));
        });
    }
    function SubscribeToEvents() {
        PassleGlobalEvents.ClientWebTrackingDataAvailable.on(function (userTrackingData) {
            if (userTrackingData.userShortcode) {
                User = new EventTracking.EventUser(userTrackingData.userShortcode);
            }
            else {
                User = null;
            }
            EventTracking.PostShortcode = userTrackingData.postShortcode;
            EventTracking.ProfilePersonShortcode = userTrackingData.profilePersonShortcode;
            EventTracking.PassleShortcode = userTrackingData.passleShortcode;
            SubscriberIds = userTrackingData.subscriberIds;
            InitialiseTrackers(User, SubscriberIds);
            if (QueuedEvents.length > 0) {
                QueuedEvents.forEach(function (event) {
                    HandoffEvent(event, User);
                });
            }
            AuthenticationComplete = true;
        });
        PassleGlobalEvents.ClientHostingDataAvailable.on(function (hostingData) {
            UpdatePathRegexes(hostingData.profilePath, hostingData.postPath);
        });
        PassleGlobalEvents.InitDebugEventLogging.on(function () {
            logEventsToConsole = true;
        });
    }
    function RegisterEvent(event) {
        if (AuthenticationComplete) {
            HandoffEvent(event, User);
        }
        else {
            QueuedEvents.push(event);
        }
    }
    EventTracking.RegisterEvent = RegisterEvent;
    function HandoffEvent(event, user) {
        event.User = user;
        event.PassleShortcode = EventTracking.PassleShortcode;
        event.PostShortcode = EventTracking.PostShortcode;
        event.ProfilePersonShortcode = EventTracking.ProfilePersonShortcode;
        Trackers.forEach(function (tracker) {
            tracker.TrackEvent(event);
            if (logEventsToConsole)
                LogEventToConsole(event, tracker);
        });
    }
    function LogEventToConsole(event, tracker) {
        var trackerName = tracker.constructor['name'];
        var time = event.TimeStamp.toUTCString();
        var action = ClientSideEventAction[event.EventAction];
        var category = ClientSideEventCategory[event.EventCategory];
        var label = event.EventLabel;
        console.log("[PASSLE] - [" + trackerName + "] - " + time + " - Action: " + action + ", Category: " + category + ", Label: " + label);
    }
    function TrackEmailLinkClick() {
        var trackingClickEventId = PassleFunctions.GetParameterByName("tceid");
        if (trackingClickEventId) {
            PassleFunctions.RemoveParameterByName("tceid");
            var additionalProperties = {
                url: location.href,
                title: document.title,
                trackingClickEventId: trackingClickEventId
            };
            RegisterEvent(new EventTracking.TrackedEvent(Passel.API.Domain.Models.Tracking.ClientSideEventAction.ClickLink, Passel.API.Domain.Models.Tracking.ClientSideEventCategory.Email, "Email link", additionalProperties));
        }
    }
    function TrackPageLoad(pageType) {
        var additionalProperties = {
            url: location.href,
            title: document.title,
            referrer: document.referrer,
            pageType: pageType || ""
        };
        RegisterEvent(new EventTracking.TrackedEvent(Passel.API.Domain.Models.Tracking.ClientSideEventAction.Load, Passel.API.Domain.Models.Tracking.ClientSideEventCategory.Page, pageType, additionalProperties));
    }
    EventTracking.TrackPageLoad = TrackPageLoad;
})(EventTracking || (EventTracking = {}));
;
var ClientWebEvents;
(function (ClientWebEvents) {
    class Global {
        constructor() {
            this.UserAuthenticationComplete = new PassleEvents.EventWithData();
            this.FollowRequestComplete = new PassleEvents.EventWithData();
            this.UnFollowRequestComplete = new PassleEvents.EventWithData();
            this.NewsletterSubscribeRequestComplete = new PassleEvents.EventWithData();
            this.UserActionRequiresPassleUserAuthentication = new PassleEvents.Event();
            this.UserLikedPost = new PassleEvents.Event();
            this.UserRepostedPost = new PassleEvents.Event();
            this.NotAuthenticated = new PassleEvents.Event();
            this.NewPostsLoaded = new PassleEvents.Event();
            this.PostLikedDuringAuthentication = new PassleEvents.Event();
            this.LikeRequestComplete = new PassleEvents.EventWithData();
            this.ThankRequestComplete = new PassleEvents.EventWithData();
            this.ThankClicked = new PassleEvents.EventWithData();
            this.RepostRequestComplete = new PassleEvents.EventWithData();
            this.EmailRequestComplete = new PassleEvents.EventWithData();
            this.AuthenticateUser = new PassleEvents.EventWithData();
            this.ApprovalRequested = new PassleEvents.Event();
            this.ApproverListRequested = new PassleEvents.EventWithData();
            this.PostApproved = new PassleEvents.Event();
            this.PostDeclined = new PassleEvents.Event();
            this.PostMadeLive = new PassleEvents.Event();
            this.TagAddedToPost = new PassleEvents.Event();
            this.UserMessageRequestComplete = new PassleEvents.EventWithData();
            this.TwitterWidgetScriptLoaded = new PassleEvents.Event();
            this.PostAuthenticationSharePostByEmail = new PassleEvents.Event();
            this.TestEvent = new PassleEvents.Event();
        }
    }
    ClientWebEvents.Global = Global;
    class GlobalDeferred {
        constructor() {
            this.PluginInitialised = $.Deferred();
            this.PluginPageScriptInitialised = $.Deferred();
            this.PortholeInitialised = $.Deferred();
            this.PageRequestLoggingComplete = $.Deferred();
            this.UserAuthenticationComplete = $.Deferred();
        }
    }
    ClientWebEvents.GlobalDeferred = GlobalDeferred;
    class LikeEventData {
        constructor(PostShortcode, Like, Success) {
            this.PostShortcode = PostShortcode;
            this.Like = Like;
            this.Success = Success;
        }
    }
    ClientWebEvents.LikeEventData = LikeEventData;
    class RepostEventData {
        constructor(PostShortcode, NewPostUrl, PreviouslyReposted, Success) {
            this.PostShortcode = PostShortcode;
            this.NewPostUrl = NewPostUrl;
            this.PreviouslyReposted = PreviouslyReposted;
            this.Success = Success;
        }
    }
    ClientWebEvents.RepostEventData = RepostEventData;
    class ThankEventData {
        constructor(Success, Message) {
            this.Success = Success;
            this.Message = Message;
        }
    }
    ClientWebEvents.ThankEventData = ThankEventData;
    class ThankClickedEventData {
        constructor(PostShortcode) {
            this.PostShortcode = PostShortcode;
        }
    }
    ClientWebEvents.ThankClickedEventData = ThankClickedEventData;
    class AuthenticateUserEventData {
        constructor(PassleShortcode, PersonShortcode, PostShortcode) {
            this.PassleShortcode = PassleShortcode;
            this.PersonShortcode = PersonShortcode;
            this.PostShortcode = PostShortcode;
        }
    }
    ClientWebEvents.AuthenticateUserEventData = AuthenticateUserEventData;
    class AuthenticationCompleteEventData {
        constructor(authenticationRequestCompleted, user, currentUserlikedPostShortcodes) {
            this.authenticationRequestCompleted = authenticationRequestCompleted;
            this.user = user;
            this.currentUserlikedPostShortcodes = currentUserlikedPostShortcodes;
        }
    }
    ClientWebEvents.AuthenticationCompleteEventData = AuthenticationCompleteEventData;
    class EmailEventData {
        constructor(Success, ISTATOYShareStatus) {
            this.Success = Success;
            this.ISTATOYShareStatus = ISTATOYShareStatus;
        }
    }
    ClientWebEvents.EmailEventData = EmailEventData;
    class FollowRequestCompleteEventData {
        constructor(Success, PassleShortcode) {
            this.Success = Success;
            this.PassleShortcode = PassleShortcode;
        }
    }
    ClientWebEvents.FollowRequestCompleteEventData = FollowRequestCompleteEventData;
    class ApproverListEventData {
        constructor(PassleShortcode, Approvers, Success) {
            this.PassleShortcode = PassleShortcode;
            this.Approvers = Approvers;
            this.Success = Success;
        }
    }
    ClientWebEvents.ApproverListEventData = ApproverListEventData;
    class UserMessageRequestCompleteEventData {
        constructor(Success) {
            this.Success = Success;
        }
    }
    ClientWebEvents.UserMessageRequestCompleteEventData = UserMessageRequestCompleteEventData;
})(ClientWebEvents || (ClientWebEvents = {}));
var GlobalEvents = new ClientWebEvents.Global();
var GlobalDeferred = new ClientWebEvents.GlobalDeferred();
;
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var ModalComponent = /** @class */ (function (_super) {
    __extends(ModalComponent, _super);
    function ModalComponent(onShowCallback, onHideCallback, html) {
        var _this = _super.call(this) || this;
        var thisObj = _this;
        _this.onShowCallback = onShowCallback;
        _this.onHideCallback = onHideCallback;
        _this.$overlay = $("<div/>").addClass("modal-overlay modal-overlay--hidden").appendTo("body").on("click", _this, _this.Hide);
        _this.$closeButton = $("<div class=\"header-close\"><button class=\"modal__close\" title=\"Close\"><i class=\"fa-light fa-xmark\"></i>").on("click", _this, _this.Hide);
        if (html) {
            _this.CreateBody(html);
        }
        return _this;
    }
    ModalComponent.prototype.Hide = function (event) {
        var thisObj = this;
        event.data.$modal.addClass("modal--hidden");
        event.data.$overlay.addClass("modal-overlay--hidden");
        if (event.data.onHideCallback)
            event.data.onHideCallback();
    };
    ModalComponent.prototype.Show = function () {
        var thisObj = this;
        thisObj.$modal.removeClass("modal--hidden");
        thisObj.$overlay.removeClass("modal-overlay--hidden");
        if (thisObj.onShowCallback)
            thisObj.onShowCallback();
    };
    ModalComponent.prototype.Destroy = function () {
        var thisObj = this;
        thisObj.$modal.remove();
        thisObj.$overlay.remove();
    };
    ModalComponent.prototype.CreateBody = function (html) {
        var thisObj = this;
        thisObj.$closeButton = $("<button class=\"modal-window__title-close\" title=\"Close\"><i class=\"fa-solid fa-xmark\"></i></button>").on("click", thisObj, thisObj.Hide);
        thisObj.$header = $("");
        thisObj.$header = thisObj.$header.append(thisObj.$closeButton);
        thisObj.$body = $("<div class='modal__body'>" + html + "</div>");
        thisObj.$body = thisObj.$body.append(thisObj.$closeButton);
        thisObj.$modal = $("<div/>").addClass("modal-window modal--hidden modal--content").append(thisObj.$body).append(thisObj.$header).appendTo("body");
    };
    ModalComponent.SMALL_MODAL_TEXT_MAX = 300;
    return ModalComponent;
}(Component));
;
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var EmbeddedViewModalType;
(function (EmbeddedViewModalType) {
    EmbeddedViewModalType[EmbeddedViewModalType["html"] = 0] = "html";
    EmbeddedViewModalType[EmbeddedViewModalType["iframe"] = 1] = "iframe";
})(EmbeddedViewModalType || (EmbeddedViewModalType = {}));
var EmbeddedViewModalComponent = /** @class */ (function (_super) {
    __extends(EmbeddedViewModalComponent, _super);
    function EmbeddedViewModalComponent(html, modalType, onShowCallback, onHideCallback) {
        var _this = _super.call(this, onShowCallback, onHideCallback) || this;
        _this.Create(html, modalType);
        return _this;
    }
    EmbeddedViewModalComponent.prototype.Create = function (html, modalType) {
        if (modalType === void 0) { modalType = EmbeddedViewModalType.html; }
        var thisObj = this;
        thisObj.$closeButton = $("<div><button class=\"modal__close\" title=\"Close\"><img width='20' src='/Content/images/SVG/close.svg'></button></div>").on("click", thisObj, thisObj.Hide);
        thisObj.$header = $("<div class='modal__passle_title'><div class='title_image'><img class='modal__passle_logo' src=\"/Content/images/SVG/passle_logo_white.svg\"/></div></div>");
        thisObj.$header = thisObj.$header.append(thisObj.$closeButton);
        thisObj.$body = $("<div class='modal__body'>" + html + "</div>");
        var modalTypeClass = "modal--" + EmbeddedViewModalType[modalType];
        thisObj.$modal = $("<div/>").addClass("modal-window modal--hidden").addClass(modalTypeClass).append(thisObj.$header).append(thisObj.$body).appendTo("body");
    };
    return EmbeddedViewModalComponent;
}(ModalComponent));
;
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var LikeModalComponent = /** @class */ (function (_super) {
    __extends(LikeModalComponent, _super);
    function LikeModalComponent(html, onShowCallback, onHideCallback) {
        var _this = _super.call(this, onShowCallback, onHideCallback) || this;
        _this.Create(html);
        return _this;
    }
    LikeModalComponent.prototype.Create = function (html) {
        var thisObj = this;
        thisObj.$closeButton = $("<button class=\"modal-window__title-close\" title=\"Close\"><i class=\"fa-solid fa-xmark\"></i></button>").on("click", thisObj, thisObj.Hide);
        thisObj.$header = $("<div class='modal__title modal-window__title'/>");
        thisObj.$header = thisObj.$header.append(thisObj.$closeButton);
        thisObj.$body = $("<div class='modal__body'>" + html + "</div>");
        thisObj.$modal = $("<div/>").addClass("modal-window modal--hidden modal--like").append(thisObj.$header).append(thisObj.$body).appendTo("body");
    };
    return LikeModalComponent;
}(ModalComponent));
;
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var MessageModalType;
(function (MessageModalType) {
    MessageModalType[MessageModalType["success"] = 0] = "success";
    MessageModalType[MessageModalType["error"] = 1] = "error";
    MessageModalType[MessageModalType["warning"] = 2] = "warning";
    MessageModalType[MessageModalType["notification"] = 3] = "notification";
    MessageModalType[MessageModalType["form"] = 4] = "form";
})(MessageModalType || (MessageModalType = {}));
var MessageModalComponent = /** @class */ (function (_super) {
    __extends(MessageModalComponent, _super);
    function MessageModalComponent(type, title, message, confirmButtonText, onConfirmCallback, onCancelCallback, hideCancelButton, largeMode, cancelButtonText, onHideCallback) {
        var _this = _super.call(this) || this;
        _this.largeMode = largeMode;
        _this.Create(type, title, message, confirmButtonText, hideCancelButton, cancelButtonText);
        _this.onConfirmCallback = onConfirmCallback;
        _this.onCancelCallback = onCancelCallback;
        _this.onHideCallback = onHideCallback;
        return _this;
    }
    MessageModalComponent.prototype.Create = function (modalType, title, message, confirmButtonText, hideCancelButton, cancelButtonText) {
        var thisObj = this;
        if (modalType == MessageModalType.notification) {
            hideCancelButton = true;
        }
        var confirmButton = "<button class=\"button data-confirm\" data-confirm>" + (confirmButtonText ? confirmButtonText : 'OK') + "</button>";
        var cancelButton = hideCancelButton ? '' : "<button class=\"button button--link data-cancel\" data-cancel>" + (cancelButtonText ? cancelButtonText : 'Cancel') + "</button>";
        thisObj.$body = $("\n            <h2 class=\"modal__title\">" + title + "</h2>\n            <div class=\"modal__body\">" + message + "</div>\n            <div class=\"modal__footer\">\n                " + cancelButton + "\n                " + confirmButton + "\n            </div>\n        ");
        thisObj.$header = $("<div class='modal__header'><span class='header-icon'></span></div>");
        thisObj.$header = thisObj.$header.append(thisObj.$closeButton);
        var modalTypeClass = "modal--" + MessageModalType[modalType];
        thisObj.$modal = $("<div/>").addClass("modal-window modal--message modal--hidden").addClass(modalTypeClass).append(thisObj.$header).append(thisObj.$body).appendTo("body");
        if (thisObj.largeMode === true || (thisObj.largeMode === undefined && message.length > ModalComponent.SMALL_MODAL_TEXT_MAX)) {
            thisObj.$modal.addClass("modal--large");
        }
        thisObj.SetConfirmButtonFunctionality();
        thisObj.SetCancelButtonFunctionality();
        thisObj.SetHideButtonFunctionality();
        thisObj.Show();
    };
    MessageModalComponent.prototype.SetConfirmButtonFunctionality = function () {
        var thisObj = this;
        thisObj.$modal.find("[data-confirm]").one("click", function () {
            if (typeof thisObj.onConfirmCallback == 'function') {
                var response = thisObj.onConfirmCallback();
                if (response === false) {
                    thisObj.SetConfirmButtonFunctionality();
                    return;
                }
            }
            thisObj.Destroy();
        });
    };
    MessageModalComponent.prototype.SetCancelButtonFunctionality = function () {
        var thisObj = this;
        thisObj.$modal.find("[data-cancel]").one("click", function () {
            if (typeof thisObj.onCancelCallback == 'function')
                thisObj.onCancelCallback();
            thisObj.Destroy();
        });
    };
    MessageModalComponent.prototype.SetHideButtonFunctionality = function () {
        var thisObj = this;
        thisObj.$overlay.off("click", thisObj.Hide).one("click", function () {
            if (thisObj.onHideCallback) {
                thisObj.onHideCallback();
            }
            thisObj.Destroy();
        });
    };
    return MessageModalComponent;
}(ModalComponent));
;
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/// <reference path="./MessageModal.ts" />
var ActionResultMessageModalComponent = /** @class */ (function (_super) {
    __extends(ActionResultMessageModalComponent, _super);
    function ActionResultMessageModalComponent(success, message) {
        var _this = this;
        if (!message) {
            message = success ? "Action made successfully!" : "There was an error when executing the action. Please refresh the page and try again or contact the support team.";
        }
        _this = _super.call(this, success ? MessageModalType.success : MessageModalType.error, success ? "Success!" : "Oops...", message, null, null, null, true) || this;
        return _this;
    }
    return ActionResultMessageModalComponent;
}(MessageModalComponent));
;
class ShareButtons extends Component {
    constructor(Container, IncludeISTATOY = false) {
        super();
        this.Container = Container;
        this.IncludeISTATOY = IncludeISTATOY;
        this.BindContainerUIEvents();
        this.ShareURLs = new ShareURLs();
        this.Initialise();
    }
    SubscribeToEvents() {
        var thisObj = this;
        GlobalDeferred.UserAuthenticationComplete.then((data) => {
            if (thisObj.IncludeISTATOY) {
                var sharingPostFromEmail = location.href.indexOf("sharebyemail") >= 0;
                thisObj.SetupISTATOYButtons();
                if (sharingPostFromEmail)
                    this.ISTATOYButton.OpenISTATOY($("[data-postshortcode]").attr('data-postshortcode'), $("[data-istatoysource]").attr("data-istatoysource"));
            }
        });
    }
    SetupISTATOYButtons() {
        var thisObj = this;
        if (thisObj.IncludeISTATOY) {
            if (thisObj.ISTATOYButton) {
                thisObj.ISTATOYButton.InitialiseButtons();
            }
            else {
                thisObj.ISTATOYButton = new ISTATOYButton(thisObj.Container);
            }
        }
    }
    BindContainerUIEvents() {
        var thisObj = this;
        $('body').on('click', '.passle-post-block .action-share', function (e) {
            e.preventDefault();
            var postShortCode = $(this).attr('data-postshortcode');
            var $buttonContainer = $("div[data-post-shortcode=" + postShortCode + "] .share-buttons-container");
            $('.email-container').css("display", "inline-block");
            if ($buttonContainer.css("display") != "none") {
                $buttonContainer.slideUp();
            }
            else {
                $(".passle-post-block .repost-form-container").slideUp();
                $(".passle-post-block .share-buttons-container").slideUp();
                $buttonContainer.slideDown();
            }
        });
        thisObj.Container.on('click', '.social-sharing-button', function (e) {
            e.preventDefault();
            thisObj.HandleShareButton($(this));
        });
    }
    HandleShareButton($button) {
        var thisObj = this;
        var network = $button.attr('data-network');
        var data = thisObj.GetDataFromAttributes($button.closest('.data-container'));
        const url = thisObj.ShareURLs.GetPostShareURL(network, data);
        switch (network) {
            case "linkedin":
                thisObj.OpenPopupWindow(url, 500, 567);
                break;
            case "twitter":
                thisObj.OpenPopupWindow(url, 420, 550);
                break;
            case "facebook":
            case "xing":
                thisObj.OpenPopupWindow(url, 600, 555);
                break;
        }
    }
    OpenPopupWindow(url, height, width) {
        var w = window.open(url, '_blank', 'height=' + height + ', width=' + width + ', toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no');
    }
    GetDataFromAttributes($dc) {
        var data = {
            authorFullName: $dc.attr("data-authorfullname"),
            shortcode: $dc.attr('data-postshortcode'),
            title: $dc.attr('data-title'),
            twitterScreenname: $dc.attr('data-twitterscreenname'),
            tags: $dc.attr('data-tags').split(','),
            url: $dc.attr("data-url")
        };
        return data;
    }
    ParseShareTitle(title) {
        title = encodeURIComponent(title);
        title = title.replace(/'/g, "%27");
        return title;
    }
}
;
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var ISTATOYButton = /** @class */ (function (_super) {
    __extends(ISTATOYButton, _super);
    function ISTATOYButton(container) {
        var _this = _super.call(this) || this;
        _this.ButtonSelector = "istatoy-button-placeholder";
        _this.Container = container;
        _this.BindUIEvents();
        return _this;
    }
    ISTATOYButton.prototype.BindUIEvents = function () {
        var thisObj = this;
        thisObj.InitialiseButtons();
    };
    ISTATOYButton.prototype.InitialiseButtons = function () {
        var thisObj = this;
        var buttons = thisObj.Container.find("." + thisObj.ButtonSelector + ":empty");
        buttons.each(function (index, element) {
            var placeholder = $(this);
            var postShortcode = placeholder.attr('data-postshortcode');
            var istatoySource = placeholder.attr('data-istatoysource');
            var istatoyButtons = $("<a href='#' class='istatoy-button web-istatoy'  ><i class='istatoy-icon' title='Email' /></a>");
            istatoyButtons.attr('data-postshortcode', postShortcode);
            istatoyButtons.attr('data-istatoysource', istatoySource);
            istatoyButtons.on('click', function () {
                thisObj.OpenISTATOY(postShortcode, istatoySource);
            });
            placeholder.replaceWith(istatoyButtons);
        });
    };
    ISTATOYButton.prototype.OpenISTATOY = function (postShortcode, istatoySource) {
        var thisObj = this;
        var src = "https://" + PassleEnvironmentConfig.PassleWebRoot + "/istatoy?postShortcode=" + postShortcode + "&istatoySource=" + istatoySource;
        window.open(src, '');
    };
    return ISTATOYButton;
}(Component));
;
class FragmentAction {
    constructor(Fragment, Action, ActionData) {
        this.Fragment = Fragment;
        this.Action = Action;
        this.ActionData = ActionData;
    }
}
;
/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),c[0]._type=a,a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");b.length>0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">&times;</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"â’¶":"A","ï¼¡":"A","Ã€":"A","Ã":"A","Ã‚":"A","áº¦":"A","áº¤":"A","áºª":"A","áº¨":"A","Ãƒ":"A","Ä€":"A","Ä‚":"A","áº°":"A","áº®":"A","áº´":"A","áº²":"A","È¦":"A","Ç ":"A","Ã„":"A","Çž":"A","áº¢":"A","Ã…":"A","Çº":"A","Ç":"A","È€":"A","È‚":"A","áº ":"A","áº¬":"A","áº¶":"A","á¸€":"A","Ä„":"A","Èº":"A","â±¯":"A","êœ²":"AA","Ã†":"AE","Ç¼":"AE","Ç¢":"AE","êœ´":"AO","êœ¶":"AU","êœ¸":"AV","êœº":"AV","êœ¼":"AY","â’·":"B","ï¼¢":"B","á¸‚":"B","á¸„":"B","á¸†":"B","Éƒ":"B","Æ‚":"B","Æ":"B","â’¸":"C","ï¼£":"C","Ä†":"C","Äˆ":"C","ÄŠ":"C","ÄŒ":"C","Ã‡":"C","á¸ˆ":"C","Æ‡":"C","È»":"C","êœ¾":"C","â’¹":"D","ï¼¤":"D","á¸Š":"D","ÄŽ":"D","á¸Œ":"D","á¸":"D","á¸’":"D","á¸Ž":"D","Ä":"D","Æ‹":"D","ÆŠ":"D","Æ‰":"D","ê¹":"D","Ç±":"DZ","Ç„":"DZ","Ç²":"Dz","Ç…":"Dz","â’º":"E","ï¼¥":"E","Ãˆ":"E","Ã‰":"E","ÃŠ":"E","á»€":"E","áº¾":"E","á»„":"E","á»‚":"E","áº¼":"E","Ä’":"E","á¸”":"E","á¸–":"E","Ä”":"E","Ä–":"E","Ã‹":"E","áºº":"E","Äš":"E","È„":"E","È†":"E","áº¸":"E","á»†":"E","È¨":"E","á¸œ":"E","Ä˜":"E","á¸˜":"E","á¸š":"E","Æ":"E","ÆŽ":"E","â’»":"F","ï¼¦":"F","á¸ž":"F","Æ‘":"F","ê»":"F","â’¼":"G","ï¼§":"G","Ç´":"G","Äœ":"G","á¸ ":"G","Äž":"G","Ä ":"G","Ç¦":"G","Ä¢":"G","Ç¤":"G","Æ“":"G","êž ":"G","ê½":"G","ê¾":"G","â’½":"H","ï¼¨":"H","Ä¤":"H","á¸¢":"H","á¸¦":"H","Èž":"H","á¸¤":"H","á¸¨":"H","á¸ª":"H","Ä¦":"H","â±§":"H","â±µ":"H","êž":"H","â’¾":"I","ï¼©":"I","ÃŒ":"I","Ã":"I","ÃŽ":"I","Ä¨":"I","Äª":"I","Ä¬":"I","Ä°":"I","Ã":"I","á¸®":"I","á»ˆ":"I","Ç":"I","Èˆ":"I","ÈŠ":"I","á»Š":"I","Ä®":"I","á¸¬":"I","Æ—":"I","â’¿":"J","ï¼ª":"J","Ä´":"J","Éˆ":"J","â“€":"K","ï¼«":"K","á¸°":"K","Ç¨":"K","á¸²":"K","Ä¶":"K","á¸´":"K","Æ˜":"K","â±©":"K","ê€":"K","ê‚":"K","ê„":"K","êž¢":"K","â“":"L","ï¼¬":"L","Ä¿":"L","Ä¹":"L","Ä½":"L","á¸¶":"L","á¸¸":"L","Ä»":"L","á¸¼":"L","á¸º":"L","Å":"L","È½":"L","â±¢":"L","â± ":"L","êˆ":"L","ê†":"L","êž€":"L","Ç‡":"LJ","Çˆ":"Lj","â“‚":"M","ï¼­":"M","á¸¾":"M","á¹€":"M","á¹‚":"M","â±®":"M","Æœ":"M","â“ƒ":"N","ï¼®":"N","Ç¸":"N","Åƒ":"N","Ã‘":"N","á¹„":"N","Å‡":"N","á¹†":"N","Å…":"N","á¹Š":"N","á¹ˆ":"N","È ":"N","Æ":"N","êž":"N","êž¤":"N","ÇŠ":"NJ","Ç‹":"Nj","â“„":"O","ï¼¯":"O","Ã’":"O","Ã“":"O","Ã”":"O","á»’":"O","á»":"O","á»–":"O","á»”":"O","Ã•":"O","á¹Œ":"O","È¬":"O","á¹Ž":"O","ÅŒ":"O","á¹":"O","á¹’":"O","ÅŽ":"O","È®":"O","È°":"O","Ã–":"O","Èª":"O","á»Ž":"O","Å":"O","Ç‘":"O","ÈŒ":"O","ÈŽ":"O","Æ ":"O","á»œ":"O","á»š":"O","á» ":"O","á»ž":"O","á»¢":"O","á»Œ":"O","á»˜":"O","Çª":"O","Ç¬":"O","Ã˜":"O","Ç¾":"O","Æ†":"O","ÆŸ":"O","êŠ":"O","êŒ":"O","Æ¢":"OI","êŽ":"OO","È¢":"OU","â“…":"P","ï¼°":"P","á¹”":"P","á¹–":"P","Æ¤":"P","â±£":"P","ê":"P","ê’":"P","ê”":"P","â“†":"Q","ï¼±":"Q","ê–":"Q","ê˜":"Q","ÉŠ":"Q","â“‡":"R","ï¼²":"R","Å”":"R","á¹˜":"R","Å˜":"R","È":"R","È’":"R","á¹š":"R","á¹œ":"R","Å–":"R","á¹ž":"R","ÉŒ":"R","â±¤":"R","êš":"R","êž¦":"R","êž‚":"R","â“ˆ":"S","ï¼³":"S","áºž":"S","Åš":"S","á¹¤":"S","Åœ":"S","á¹ ":"S","Å ":"S","á¹¦":"S","á¹¢":"S","á¹¨":"S","È˜":"S","Åž":"S","â±¾":"S","êž¨":"S","êž„":"S","â“‰":"T","ï¼´":"T","á¹ª":"T","Å¤":"T","á¹¬":"T","Èš":"T","Å¢":"T","á¹°":"T","á¹®":"T","Å¦":"T","Æ¬":"T","Æ®":"T","È¾":"T","êž†":"T","êœ¨":"TZ","â“Š":"U","ï¼µ":"U","Ã™":"U","Ãš":"U","Ã›":"U","Å¨":"U","á¹¸":"U","Åª":"U","á¹º":"U","Å¬":"U","Ãœ":"U","Ç›":"U","Ç—":"U","Ç•":"U","Ç™":"U","á»¦":"U","Å®":"U","Å°":"U","Ç“":"U","È”":"U","È–":"U","Æ¯":"U","á»ª":"U","á»¨":"U","á»®":"U","á»¬":"U","á»°":"U","á»¤":"U","á¹²":"U","Å²":"U","á¹¶":"U","á¹´":"U","É„":"U","â“‹":"V","ï¼¶":"V","á¹¼":"V","á¹¾":"V","Æ²":"V","êž":"V","É…":"V","ê ":"VY","â“Œ":"W","ï¼·":"W","áº€":"W","áº‚":"W","Å´":"W","áº†":"W","áº„":"W","áºˆ":"W","â±²":"W","â“":"X","ï¼¸":"X","áºŠ":"X","áºŒ":"X","â“Ž":"Y","ï¼¹":"Y","á»²":"Y","Ã":"Y","Å¶":"Y","á»¸":"Y","È²":"Y","áºŽ":"Y","Å¸":"Y","á»¶":"Y","á»´":"Y","Æ³":"Y","ÉŽ":"Y","á»¾":"Y","â“":"Z","ï¼º":"Z","Å¹":"Z","áº":"Z","Å»":"Z","Å½":"Z","áº’":"Z","áº”":"Z","Æµ":"Z","È¤":"Z","â±¿":"Z","â±«":"Z","ê¢":"Z","â“":"a","ï½":"a","áºš":"a","Ã ":"a","Ã¡":"a","Ã¢":"a","áº§":"a","áº¥":"a","áº«":"a","áº©":"a","Ã£":"a","Ä":"a","Äƒ":"a","áº±":"a","áº¯":"a","áºµ":"a","áº³":"a","È§":"a","Ç¡":"a","Ã¤":"a","ÇŸ":"a","áº£":"a","Ã¥":"a","Ç»":"a","ÇŽ":"a","È":"a","Èƒ":"a","áº¡":"a","áº­":"a","áº·":"a","á¸":"a","Ä…":"a","â±¥":"a","É":"a","êœ³":"aa","Ã¦":"ae","Ç½":"ae","Ç£":"ae","êœµ":"ao","êœ·":"au","êœ¹":"av","êœ»":"av","êœ½":"ay","â“‘":"b","ï½‚":"b","á¸ƒ":"b","á¸…":"b","á¸‡":"b","Æ€":"b","Æƒ":"b","É“":"b","â“’":"c","ï½ƒ":"c","Ä‡":"c","Ä‰":"c","Ä‹":"c","Ä":"c","Ã§":"c","á¸‰":"c","Æˆ":"c","È¼":"c","êœ¿":"c","â†„":"c","â““":"d","ï½„":"d","á¸‹":"d","Ä":"d","á¸":"d","á¸‘":"d","á¸“":"d","á¸":"d","Ä‘":"d","ÆŒ":"d","É–":"d","É—":"d","êº":"d","Ç³":"dz","Ç†":"dz","â“”":"e","ï½…":"e","Ã¨":"e","Ã©":"e","Ãª":"e","á»":"e","áº¿":"e","á»…":"e","á»ƒ":"e","áº½":"e","Ä“":"e","á¸•":"e","á¸—":"e","Ä•":"e","Ä—":"e","Ã«":"e","áº»":"e","Ä›":"e","È…":"e","È‡":"e","áº¹":"e","á»‡":"e","È©":"e","á¸":"e","Ä™":"e","á¸™":"e","á¸›":"e","É‡":"e","É›":"e","Ç":"e","â“•":"f","ï½†":"f","á¸Ÿ":"f","Æ’":"f","ê¼":"f","â“–":"g","ï½‡":"g","Çµ":"g","Ä":"g","á¸¡":"g","ÄŸ":"g","Ä¡":"g","Ç§":"g","Ä£":"g","Ç¥":"g","É ":"g","êž¡":"g","áµ¹":"g","ê¿":"g","â“—":"h","ï½ˆ":"h","Ä¥":"h","á¸£":"h","á¸§":"h","ÈŸ":"h","á¸¥":"h","á¸©":"h","á¸«":"h","áº–":"h","Ä§":"h","â±¨":"h","â±¶":"h","É¥":"h","Æ•":"hv","â“˜":"i","ï½‰":"i","Ã¬":"i","Ã­":"i","Ã®":"i","Ä©":"i","Ä«":"i","Ä­":"i","Ã¯":"i","á¸¯":"i","á»‰":"i","Ç":"i","È‰":"i","È‹":"i","á»‹":"i","Ä¯":"i","á¸­":"i","É¨":"i","Ä±":"i","â“™":"j","ï½Š":"j","Äµ":"j","Ç°":"j","É‰":"j","â“š":"k","ï½‹":"k","á¸±":"k","Ç©":"k","á¸³":"k","Ä·":"k","á¸µ":"k","Æ™":"k","â±ª":"k","ê":"k","êƒ":"k","ê…":"k","êž£":"k","â“›":"l","ï½Œ":"l","Å€":"l","Äº":"l","Ä¾":"l","á¸·":"l","á¸¹":"l","Ä¼":"l","á¸½":"l","á¸»":"l","Å¿":"l","Å‚":"l","Æš":"l","É«":"l","â±¡":"l","ê‰":"l","êž":"l","ê‡":"l","Ç‰":"lj","â“œ":"m","ï½":"m","á¸¿":"m","á¹":"m","á¹ƒ":"m","É±":"m","É¯":"m","â“":"n","ï½Ž":"n","Ç¹":"n","Å„":"n","Ã±":"n","á¹…":"n","Åˆ":"n","á¹‡":"n","Å†":"n","á¹‹":"n","á¹‰":"n","Æž":"n","É²":"n","Å‰":"n","êž‘":"n","êž¥":"n","ÇŒ":"nj","â“ž":"o","ï½":"o","Ã²":"o","Ã³":"o","Ã´":"o","á»“":"o","á»‘":"o","á»—":"o","á»•":"o","Ãµ":"o","á¹":"o","È­":"o","á¹":"o","Å":"o","á¹‘":"o","á¹“":"o","Å":"o","È¯":"o","È±":"o","Ã¶":"o","È«":"o","á»":"o","Å‘":"o","Ç’":"o","È":"o","È":"o","Æ¡":"o","á»":"o","á»›":"o","á»¡":"o","á»Ÿ":"o","á»£":"o","á»":"o","á»™":"o","Ç«":"o","Ç­":"o","Ã¸":"o","Ç¿":"o","É”":"o","ê‹":"o","ê":"o","Éµ":"o","Æ£":"oi","È£":"ou","ê":"oo","â“Ÿ":"p","ï½":"p","á¹•":"p","á¹—":"p","Æ¥":"p","áµ½":"p","ê‘":"p","ê“":"p","ê•":"p","â“ ":"q","ï½‘":"q","É‹":"q","ê—":"q","ê™":"q","â“¡":"r","ï½’":"r","Å•":"r","á¹™":"r","Å™":"r","È‘":"r","È“":"r","á¹›":"r","á¹":"r","Å—":"r","á¹Ÿ":"r","É":"r","É½":"r","ê›":"r","êž§":"r","êžƒ":"r","â“¢":"s","ï½“":"s","ÃŸ":"s","Å›":"s","á¹¥":"s","Å":"s","á¹¡":"s","Å¡":"s","á¹§":"s","á¹£":"s","á¹©":"s","È™":"s","ÅŸ":"s","È¿":"s","êž©":"s","êž…":"s","áº›":"s","â“£":"t","ï½”":"t","á¹«":"t","áº—":"t","Å¥":"t","á¹­":"t","È›":"t","Å£":"t","á¹±":"t","á¹¯":"t","Å§":"t","Æ­":"t","Êˆ":"t","â±¦":"t","êž‡":"t","êœ©":"tz","â“¤":"u","ï½•":"u","Ã¹":"u","Ãº":"u","Ã»":"u","Å©":"u","á¹¹":"u","Å«":"u","á¹»":"u","Å­":"u","Ã¼":"u","Çœ":"u","Ç˜":"u","Ç–":"u","Çš":"u","á»§":"u","Å¯":"u","Å±":"u","Ç”":"u","È•":"u","È—":"u","Æ°":"u","á»«":"u","á»©":"u","á»¯":"u","á»­":"u","á»±":"u","á»¥":"u","á¹³":"u","Å³":"u","á¹·":"u","á¹µ":"u","Ê‰":"u","â“¥":"v","ï½–":"v","á¹½":"v","á¹¿":"v","Ê‹":"v","êŸ":"v","ÊŒ":"v","ê¡":"vy","â“¦":"w","ï½—":"w","áº":"w","áºƒ":"w","Åµ":"w","áº‡":"w","áº…":"w","áº˜":"w","áº‰":"w","â±³":"w","â“§":"x","ï½˜":"x","áº‹":"x","áº":"x","â“¨":"y","ï½™":"y","á»³":"y","Ã½":"y","Å·":"y","á»¹":"y","È³":"y","áº":"y","Ã¿":"y","á»·":"y","áº™":"y","á»µ":"y","Æ´":"y","É":"y","á»¿":"y","â“©":"z","ï½š":"z","Åº":"z","áº‘":"z","Å¼":"z","Å¾":"z","áº“":"z","áº•":"z","Æ¶":"z","È¥":"z","É€":"z","â±¬":"z","ê£":"z","Î†":"Î‘","Îˆ":"Î•","Î‰":"Î—","ÎŠ":"Î™","Îª":"Î™","ÎŒ":"ÎŸ","ÎŽ":"Î¥","Î«":"Î¥","Î":"Î©","Î¬":"Î±","Î­":"Îµ","Î®":"Î·","Î¯":"Î¹","ÏŠ":"Î¹","Î":"Î¹","ÏŒ":"Î¿","Ï":"Ï…","Ï‹":"Ï…","Î°":"Ï…","Ï‰":"Ï‰","Ï‚":"Ïƒ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");
if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple"))return a.selected=!1,c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var l=e.createTag(b);if(null!=l){var m=e.option(l);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(g,l)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){var c=(this._lastTag,this.$element.find("option[data-select2-tag]"));c.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){function e(b){var c=g._normalizeItem(b),d=g.$element.find("option").filter(function(){return a(this).val()===c.id});if(!d.length){var e=g.option(c);e.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([e])}f(c)}function f(a){g.trigger("select",{data:a})}var g=this;c.term=c.term||"";var h=this.tokenizer(c,this.options,e);h.term!==c.term&&(this.$search.length&&(this.$search.val(h.term),this.$search.focus()),c.term=h.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("focus",function(){c.isOpen()&&e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},a.prototype._handleSelectOnClose=function(a,b){if(b&&null!=b.originalSelect2Event){var c=b.originalSelect2Event;if("select"===c._type||"unselect"===c._type)return}var d=this.getHighlightedResults();if(!(d.length<1)){var e=d.data("data");null!=e.element&&e.element.selected||null==e.element&&e.selected||this.trigger("select",{data:e})}},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more resultsâ€¦"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searchingâ€¦"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e<b.addedNodes.length;e++){var f=b.addedNodes[e];f.selected&&(c=!0)}else b.removedNodes&&b.removedNodes.length>0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null;
},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,f=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=c[b].apply(c,f)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});;
/**
 * @license Copyright (c) 2015-2018 Radiant Media Player 
 * Radiant Media Player 5.0.9 | https://www.radiantmediaplayer.com
 * Terms of service: https://www.radiantmediaplayer.com/terms-of-service.html
 * Contact information: https://www.radiantmediaplayer.com/contact.html
 */
!function r(n, o, l) { function d(e, t) { if (!o[e]) { if (!n[e]) { var i = "function" == typeof require && require; if (!t && i) return i(e, !0); if (h) return h(e, !0); var a = new Error("Cannot find module '" + e + "'"); throw a.code = "MODULE_NOT_FOUND", a } var s = o[e] = { exports: {} }; n[e][0].call(s.exports, function (t) { return d(n[e][1][t] || t) }, s, s.exports, r, n, o, l) } return o[e].exports } for (var h = "function" == typeof require && require, t = 0; t < l.length; t++)d(l[t]); return d }({
    1: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var l = s(t("../fw/fw")), d = s(t("../fw/env")), h = s(t("../core/ui/core-ui")), a = s(t("../core/utils/error")); function s(t) { return t && t.__esModule ? t : { default: t } } var c = {}, o = 20; c.destroy = function () { this.dom.container && (this.dom.container.removeEventListener("ready", this.onReadyMain360), this.dom.container.removeEventListener("playing", this.onPlayingUpdate360UI)); try { this.requestAnimation360 && window.cancelAnimationFrame(this.requestAnimation360), this.texture360 && this.texture360.dispose(), this.scene360 && this.mesh360 && this.scene360.remove(this.mesh360) } catch (t) { l.default.trace(t) } l.default.removeElement(this.canvas360) }, c.resize = function () { if (this.renderer360 && this.camera360) { var t = -1, e = -1; if (this.isInFullscreen) { if (this.hasNativeFullscreenSupport) t = l.default.getScreenWidth(), e = l.default.getScreenHeight(); else if (this.fullWindowMode) { var i = d.default.getViewportSize(); -1 < i.width && -1 < i.height && (t = i.width, e = i.height) } } else t = this.width, e = this.height; 0 < t && 0 < e && (this.renderer360.setSize(t, e), this.camera360.aspect = t / e, this.camera360.updateProjectionMatrix()) } }; var r = function (t) { t && ("mousedown" === t.type ? (this.dragStart.x = l.default.getPosX(t), this.dragStart.y = l.default.getPosY(t)) : "touchstart" === t.type && (t.preventDefault(), this.dragStart.x = l.default.getPosXTouch(t), this.dragStart.y = l.default.getPosYTouch(t)), l.default.addClass(this.canvas360, "rmp-canvas-360-grabbing"), this.mouseDown = !0) }, n = function () { l.default.removeClass(this.canvas360, "rmp-canvas-360-grabbing"), this.mouseDown = !1 }, u = function (t) { if (!this.progressiveMoveInprogress && this.mouseDown) { var e, i, a = void 0, s = void 0; "mousemove" === t.type ? (a = l.default.getPosX(t), s = l.default.getPosY(t)) : "touchmove" === t.type && (a = l.default.getPosXTouch(t), s = l.default.getPosYTouch(t)), e = this.dragStart.x - a, i = this.dragStart.y - s, this.dragStart.x = a, this.dragStart.y = s; var r = this.getPlayerWidth() / this.getPlayerHeight(), n = 1; l.default.hasClass(this.dom.container, "rmp-extrasmall") ? n = 2 : l.default.hasClass(this.dom.container, "rmp-small") && (n = 1.5), this.lon += .1 * e * n, this.lat += .1 * i * r * n } }, f = function () { this.camera360 && (this.fov > this.video360MaxFocalLength ? this.fov = this.video360MaxFocalLength : this.fov < this.video360MinFocalLength && (this.fov = this.video360MinFocalLength), this.camera360.fov = this.fov, this.camera360.updateProjectionMatrix()) }, p = function () { this.dom.content.addEventListener("mousedown", r.bind(this)), this.dom.content.addEventListener("mouseup", n.bind(this)), this.dom.content.addEventListener("mouseleave", n.bind(this)), this.dom.content.addEventListener("mousemove", u.bind(this)), this.dom.content.addEventListener("wheel", function (t) { t && (t.stopPropagation(), t.preventDefault()), this.progressiveMoveInprogress || t && t.wheelDeltaY && (0 < t.wheelDeltaY ? this.fov -= 10 : this.fov += 10, f.call(this)) }.bind(this)), this.dom.content.addEventListener("touchstart", r.bind(this)), this.dom.content.addEventListener("touchend", n.bind(this)), this.dom.content.addEventListener("touchmove", u.bind(this), !!d.default.hasPassiveEventListeners && { passive: !0 }) }; c.setCamLatLongFov = function (t, e, i, a, s) { var r = this; if (!this.progressiveMoveInprogress) { if (this.progressiveMoveInprogress = !0, s && (s.stopPropagation(), "touchend" === s.type && s.preventDefault()), h.default.showChrome.call(this), a) return this.lon = e, this.lat = t, this.fov = i, f.call(this), void (this.progressiveMoveInprogress = !1); 0 !== e && (this.lon += e / o), 0 !== t && (this.lat -= t / o), 0 !== i && (this.fov -= i / o, f.call(this)); var n = 1; l.default.clearInterval(this.progressiveInterval), this.progressiveInterval = setInterval(function () { 0 !== e && (r.lon += e / o), 0 !== t && (r.lat -= t / o), 0 !== i && (r.fov -= i / o, f.call(r)), ++n === o && (r.progressiveMoveInprogress = !1, l.default.clearInterval(r.progressiveInterval)) }, o) } }; var m = function () { var e = this; this.dom.container.removeEventListener("ready", this.onReadyMain360), this.onPlayingUpdate360UI = function () { this.dom.container.removeEventListener("playing", this.onPlayingUpdate360UI); var t = this.dom.container.querySelector(".rmp-360-ui-text"); null !== t && l.default.removeElement(t), l.default.show(this.dom.ui360); var e = document.createElement("div"); e.className = "rmp-360-ui-button rmp-360-ui-top rmp-i rmp-i-up", l.default.addEvent(["touchend", "click"], e, c.setCamLatLongFov.bind(this, 20, 0, 0, !1)), this.dom.ui360.appendChild(e); var i = document.createElement("div"); i.className = "rmp-360-ui-button rmp-360-ui-bottom rmp-i rmp-i-down", l.default.addEvent(["touchend", "click"], i, c.setCamLatLongFov.bind(this, -20, 0, 0, !1)), this.dom.ui360.appendChild(i); var a = document.createElement("div"); a.className = "rmp-360-ui-button rmp-360-ui-left rmp-i rmp-i-left", l.default.addEvent(["touchend", "click"], a, c.setCamLatLongFov.bind(this, 0, -20, 0, !1)), this.dom.ui360.appendChild(a); var s = document.createElement("div"); s.className = "rmp-360-ui-button rmp-360-ui-right rmp-i rmp-i-right", l.default.addEvent(["touchend", "click"], s, c.setCamLatLongFov.bind(this, 0, 20, 0, !1)), this.dom.ui360.appendChild(s); var r = document.createElement("div"); r.className = "rmp-360-ui-button rmp-360-ui-plus rmp-i rmp-i-plus-360", l.default.addEvent(["touchend", "click"], r, c.setCamLatLongFov.bind(this, 0, 0, 10, !1)), this.dom.ui360.appendChild(r); var n = document.createElement("div"); n.className = "rmp-360-ui-button rmp-360-ui-minus rmp-i rmp-i-minus-360", l.default.addEvent(["touchend", "click"], n, c.setCamLatLongFov.bind(this, 0, 0, -10, !1)), this.dom.ui360.appendChild(n); var o = document.createElement("div"); o.className = "rmp-360-ui-button rmp-360-ui-reset rmp-i rmp-i-reset-360", l.default.addEvent(["touchend", "click"], o, c.setCamLatLongFov.bind(this, this.video360InitialLat, this.video360InitialLon, this.video360FocalLength, !0)), this.dom.ui360.appendChild(o) }.bind(this), this.dom.container.addEventListener("playing", this.onPlayingUpdate360UI); var t = this.getPlayerWidth(), i = this.getPlayerHeight(), a = t / i; this.lat = this.video360InitialLat, this.lon = this.video360InitialLon, this.fov = this.video360FocalLength, this.camera360 = new THREE.PerspectiveCamera(this.video360FocalLength, a, 1, 1100), this.camera360.target = new THREE.Vector3(0, 0, 0), this.scene360 = new THREE.Scene; var s = 2 * Math.round(60 / a / 2), r = new THREE.SphereBufferGeometry(500, 60, s); r.scale(-1, 1, 1), this.texture360 = new THREE.VideoTexture(this.dom.video); var n = new THREE.MeshBasicMaterial({ map: this.texture360 }); this.texture360.minFilter = THREE.LinearFilter, this.texture360.format = THREE.RGBFormat, this.mesh360 = new THREE.Mesh(r, n), this.scene360.add(this.mesh360), this.renderer360 = new THREE.WebGLRenderer, this.renderer360.setPixelRatio(d.default.devicePixelRatio), this.renderer360.setSize(t, i), this.canvas360 = this.renderer360.domElement, this.canvas360.className = "rmp-canvas-360", this.dom.content.insertBefore(this.canvas360, this.dom.poster), l.default.hide(this.dom.video), this.dom.ui360 = document.createElement("div"), l.default.addEvent(["touchend", "click"], this.dom.ui360, function (t) { t && (t.stopPropagation(), "touchend" === t.type && t.preventDefault()), h.default.showChrome.call(this) }.bind(this)), d.default.isMobile || (this.dom.ui360.addEventListener("mouseenter", function (t) { t && t.stopPropagation(), e.forceResetTimer = !0 }), this.dom.ui360.addEventListener("mouseleave", function (t) { t && t.stopPropagation(), e.forceResetTimer = !1 })), this.dom.ui360.className = "rmp-360-ui rmp-color-bg", l.default.hide(this.dom.ui360), this.dom.container.appendChild(this.dom.ui360); var o = document.createElement("div"); o.className = "rmp-360-ui-text rmp-color-bg", o.textContent = "360", this.dom.container.appendChild(o), p.call(this), this.animate360 = function () { this.requestAnimation360 = window.requestAnimationFrame(this.animate360), this.lat = Math.max(-85, Math.min(85, this.lat)); var t = THREE.Math.degToRad(90 - this.lat), e = THREE.Math.degToRad(this.lon), i = 50 * Math.sin(t); this.camera360.position.x = i * Math.cos(e), this.camera360.position.y = 50 * Math.cos(t), this.camera360.position.z = i * Math.sin(e), this.camera360.lookAt(this.camera360.target), this.renderer360.render(this.scene360, this.camera360) }.bind(this), this.animate360() }, v = function () { this.onReadyMain360 = m.bind(this), this.get5Ready() ? this.onReadyMain360() : this.dom.container.addEventListener("ready", this.onReadyMain360) }; c.load = function () { if ("undefined" != typeof THREE) v.call(this); else { var t = "https://cdn.radiantmediatechs.com/rmp/5.0.9/three/three.min.js"; 0, l.default.getScript(t, v.bind(this), a.default.fatal.bind(this, "failed to load required lib three.js (360 video)", 500, null)) } }, i.default = c }, { "../core/ui/core-ui": 41, "../core/utils/error": 44, "../fw/env": 52, "../fw/fw": 53 }], 2: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); a(t("../fw/fw")); var o = a(t("../core/utils/error")); function a(t) { return t && t.__esModule ? t : { default: t } } var s = {}, r = void 0, n = function (t, e, i) { i.addEventListener(t, function () { e(arguments[0]) }) }; s.filterDrm = function () { if ("string" == typeof this.fpsDrm.certificatePath && "" !== this.fpsDrm.certificatePath && "string" == typeof this.fpsDrm.processSpcPath && "" !== this.fpsDrm.processSpcPath) { var t = "text"; "string" == typeof this.fpsDrm.licenseResponseType && -1 < ["blob", "json", "text", "arraybuffer"].indexOf(this.fpsDrm.licenseResponseType) && (t = this.fpsDrm.licenseResponseType), this.fpsDrm.licenseResponseType = t; var e = []; Array.isArray(this.fpsDrm.licenseRequestHeaders) && (e = this.fpsDrm.licenseRequestHeaders), this.fpsDrm.licenseRequestHeaders = e; var i = [{ name: "Pragma", value: "Cache-Control: no-cache" }, { name: "Cache-Control", value: "max-age=0" }]; Array.isArray(this.fpsDrm.certificateRequestHeaders) && (i = this.fpsDrm.certificateRequestHeaders), this.fpsDrm.certificateRequestHeaders = i; var a = function (t) { var e, i = (e = new Uint16Array(t.buffer), String.fromCharCode.apply(null, e)), a = document.createElement("a"); return a.href = i, a.hostname }; "function" == typeof this.fpsDrm.extractContentId && (a = this.fpsDrm.extractContentId), this.fpsDrm.extractContentId = a; var s = function (t, e) { return "spc=" + function (t) { for (var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", i = "", a = void 0, s = void 0, r = void 0, n = void 0, o = void 0, l = void 0, d = void 0, h = 0; h < t.length;)n = (a = t[h++]) >> 2, o = (3 & a) << 4 | (s = h < t.length ? t[h++] : Number.NaN) >> 4, l = (15 & s) << 2 | (r = h < t.length ? t[h++] : Number.NaN) >> 6, d = 63 & r, Number.isNaN(s) ? l = d = 64 : Number.isNaN(r) && (d = 64), i += e.charAt(n) + e.charAt(o) + e.charAt(l) + e.charAt(d); return i }(t) + "&assetId=" + encodeURIComponent(e.contentId) }; "function" == typeof this.fpsDrm.licenseRequestMessage && (s = this.fpsDrm.licenseRequestMessage), this.fpsDrm.licenseRequestMessage = s; var r = function (t) { var e = t.target, i = e.session, a = e.responseText.trim(); "<ckc>" === a.substr(0, 5) && "</ckc>" === a.substr(-6) && (a = a.slice(5, -6)); var s = function (t) { for (var e = window.atob(t), i = e.length, a = new Uint8Array(new ArrayBuffer(i)), s = 0; s < i; s++)a[s] = e.charCodeAt(s); return a }(a); i.update(s) }; return "function" == typeof this.fpsDrm.licenseRequestLoaded && (r = this.fpsDrm.licenseRequestLoaded), this.fpsDrm.licenseRequestLoaded = r, !0 } return !1 }; var l = function (t, e, i) { "string" == typeof e && (e = function (t) { for (var e = new ArrayBuffer(2 * t.length), i = new Uint16Array(e), a = 0, s = t.length; a < s; a++)i[a] = t.charCodeAt(a); return i }(e)); var a = 0, s = new ArrayBuffer(t.byteLength + 4 + e.byteLength + 4 + i.byteLength), r = new DataView(s); new Uint8Array(s, a, t.byteLength).set(t), a += t.byteLength, r.setUint32(a, e.byteLength, !0), a += 4; var n = new Uint16Array(s, a, e.length); return n.set(e), a += n.byteLength, r.setUint32(a, i.byteLength, !0), a += 4, new Uint8Array(s, a, i.byteLength).set(i), new Uint8Array(s, 0, s.byteLength) }, d = function (t) { var e = t.target, i = t.message, a = new XMLHttpRequest; a.responseType = this.fpsDrm.licenseResponseType, a.session = e, a.addEventListener("load", this.fpsDrm.licenseRequestLoaded.bind(this), !1), a.addEventListener("error", function (t) { var e = null; t && (e = t), o.default.fatal.call(this, "FPS license request failed", 604, e) }.bind(this), !1); var s = this.fpsDrm.licenseRequestMessage(i, e); a.open("POST", this.fpsDrm.processSpcPath, !0); for (var r = 0, n = this.fpsDrm.licenseRequestHeaders.length; r < n; r++)"string" == typeof this.fpsDrm.licenseRequestHeaders[r].name && "" !== this.fpsDrm.licenseRequestHeaders[r].name && "string" == typeof this.fpsDrm.licenseRequestHeaders[r].value && "" !== this.fpsDrm.licenseRequestHeaders[r].value && a.setRequestHeader(this.fpsDrm.licenseRequestHeaders[r].name, this.fpsDrm.licenseRequestHeaders[r].value); a.send(s) }, h = function (t) { var e = null; t && (e = t), o.default.warning.call(this, "FPS decryption key error was encountered", 6e3, e) }, c = function (t) { 0 }, u = function (t) { var e = null; t && (e = t), o.default.warning.call(this, "FPS video playback error occured", 6001, e) }, f = function (t, e) { var i = e.initData; var a = this.fpsDrm.extractContentId(i); if (i = l(i, a, t), this.dom.video.webkitKeys || (!function () { window.WebKitMediaKeys.isTypeSupported("com.apple.fps.1_0", "video/mp4") ? r = "com.apple.fps.1_0" : o.default.fatal.call(this, "FPS key System not supported", 601, null) }(), this.dom.video.webkitSetMediaKeys(new window.WebKitMediaKeys(r))), this.dom.video.webkitKeys) { var s = this.dom.video.webkitKeys.createSession("video/mp4", i); s ? (s.contentId = a, n("webkitkeymessage", d.bind(this), s), n("webkitkeyadded", c, s), n("webkitkeyerror", h, s)) : o.default.fatal.call(this, "FPS could not create key session", 603, null) } else o.default.fatal.call(this, "FPS could not create MediaKeys", 602, null) }; s.init = function () { var t = new XMLHttpRequest; t.responseType = "arraybuffer", t.addEventListener("load", function (t) { var e = t.target, i = new Uint8Array(e.response); this.dom.video.addEventListener("webkitneedkey", f.bind(this, i)), this.dom.video.addEventListener("error", u), this.dom.video.src = this.startingBitratePath }.bind(this)), t.addEventListener("error", function (t) { var e = null; t && (e = t), o.default.fatal.call(this, "FPS failed to retrieve the FPS server certificate", 600, e) }.bind(this)), t.open("GET", this.fpsDrm.certificatePath, !0); for (var e = 0, i = this.fpsDrm.certificateRequestHeaders.length; e < i; e++)"string" == typeof this.fpsDrm.certificateRequestHeaders[e].name && "" !== this.fpsDrm.certificateRequestHeaders[e].name && "string" == typeof this.fpsDrm.certificateRequestHeaders[e].value && "" !== this.fpsDrm.certificateRequestHeaders[e].value && t.setRequestHeader(this.fpsDrm.certificateRequestHeaders[e].name, this.fpsDrm.certificateRequestHeaders[e].value); t.send() }, i.default = s }, { "../core/utils/error": 44, "../fw/fw": 53 }], 3: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var b = d(t("../fw/fw")), o = d(t("../fw/env")), S = d(t("../core/ui/core-ui")), E = d(t("../core/utils/error")), A = d(t("../core/modules/quality")), C = d(t("../vtt/captions")), a = d(t("../core/utils/utils")), k = d(t("../core/modules/modules")), l = d(t("../../../../rmp-connection/js/rmp-connection")), s = d(t("../cast/cast")), r = d(t("../ads/ima-dai")), n = d(t("../analytics/mux")); function d(t) { return t && t.__esModule ? t : { default: t } } var w = { destroy: function () { try { this.hlsJS && (this.hlsJS.destroy(), this.hlsJS.bufferTimer = void 0, b.default.clearInterval(this.hlsJS.bufferTimer)), b.default.clearInterval(this.hlsJSAbrInterval), b.default.clearTimeout(this.hlsJSErrorRetryTimeout) } catch (t) { b.default.trace(t) } } }, P = function (t, e) { e && (e.stopPropagation(), "touchend" === e.type && e.preventDefault()), this.hlsJS.audioTrack = t, k.default.setActiveLevel.call(this, "audio", t), this.googleCast && s.default.setAudioTrack.call(this, t) }, h = function (t, e) { e && (e.stopPropagation(), "touchend" === e.type && e.preventDefault()), this.setBitrate(t - 1) }, _ = function (t) { b.default.createCustomEvent("hlserror", this.dom.container, t), E.default.fatal.call(this, "hls.js error - cannot recover", 201, t) }, c = function () { var t = void 0; this.hlsJS && this.hlsJS.subtitleTracks && 0 < this.hlsJS.subtitleTracks.length ? (t = this.hlsJS.subtitleTracks, this.hlsJS.subtitleDisplay = !0) : this.dom.video && this.dom.video.textTracks && 0 < this.dom.video.textTracks.length && (t = this.dom.video.textTracks, this.hlsJSCEA = !0), t && (this.textTracks = t, this.textTracks = b.default.filterTextTracks(this.textTracks), 0 < this.textTracks.length && (b.default.clearInterval(this.hlsJSCCInterval), C.default.appendUI.call(this))) }, L = function () { this.hlsJS.off(Hls.Events.MANIFEST_PARSED, this.hlsManifestParsed), function () { var t = this.hlsJS.levels; if (Array.isArray(t) && 0 < t.length && (A.default.setUpAbrUI.call(this), this.dom.qualityAuto)) { b.default.addEvent(["touchend", "click"], this.dom.qualityAuto, h.bind(this, 0)); for (var e = 0, i = t.length; e < i; e++) { var a = document.createElement("div"); b.default.setClass(a, "rmp-overlay-level rmp-color-bg rmp-q" + (e + 1)); var s = ""; t[e] && (this.hlsJSUseManifestRenditionName && "string" == typeof t[e].name && "" !== t[e].name ? s += t[e].name : (t[e].bitrate || t[e].height) && (t[e].height && 0 < t[e].height && (s += t[e].height + "p", t[e].bitrate && 1e4 < t[e].bitrate && (s += " " + this.uiSeparator + " ")), t[e].bitrate && 1e4 < t[e].bitrate && (s += Math.round(t[e].bitrate / 1e3).toString() + " kbps"))), "" === s && (s += "Level " + (e + 1)), b.default.setText(a, s), b.default.addEvent(["touchend", "click"], a, h.bind(this, e + 1)), this.dom.qualityOverlayLevelsArea.appendChild(a) } } }.call(this), this.hlsJSEnableCaptions && function () { var t = this; c.call(this), b.default.clearInterval(this.hlsJSCCInterval), this.hlsJSCCInterval = setInterval(c.bind(this), 1e3), this.hlsJS.on(Hls.Events.SUBTITLE_TRACK_SWITCH, function () { b.default.createStdEvent("hlssubtitletrackswitch", t.dom.container) }) }.call(this), b.default.createStdEvent("hlsmanifestparsed", this.dom.container) }, T = function () { var t = -1; try { t = this.hlsJS.currentLevel } catch (t) { b.default.trace(t) } if (-1 < t && this.dom.qualityOverlayLevelsArea) { var e = this.dom.qualityOverlayLevelsArea.querySelectorAll(".rmp-overlay-level"); if (0 < e.length) { for (var i = 0, a = e.length; i < a; i++)b.default.removeClass(e[i], "rmp-abr-active"); b.default.addClass(e[t + 1], "rmp-abr-active") } } }; w.initFinised = function () { this.initHLSJS = function () { this.hlsJS.loadSource(this.startingBitratePath) }.bind(this), this.hlsJS.attachMedia(this.dom.video), this.readingHlsHevc ? a.default.checkStreams.call(this, this.initHLSJS, this.backupSrc, "hlsHevc") : a.default.checkStreams.call(this, this.initHLSJS, this.backupSrc, "hls"), this.msePreloadCompleted = !0, this.muxData && !this.muxDataHlsJSMonitored && n.default.initHlsJS.call(this), b.default.createStdEvent("hlsinstancecreated", this.dom.container) }; var u = function () { var h = this; if ("undefined" == typeof Hls) E.default.fatal.call(this, "failed to load required lib hls.js", 200, null); else { var t = function () { var t = !1; this.hasCC && (this.hlsJSEnableCaptions = !1); var e = l.default.getBandwidthEstimate(); e <= 0 && (e = o.default.fallbackArbitraryBWEstimate); var i = { capLevelToPlayerSize: this.hlsJSCapLevelToPlayerSize, debug: t, maxBufferLength: this.hlsJSMaxBufferLength, autoStartLoad: !0, maxBufferSize: this.hlsJSMaxBufferSize, minAutoBitrate: this.hlsJSMinAutoBitrate, liveSyncDuration: this.hlsJSLiveSyncDuration, maxAudioFramesDrift: this.hlsJSMaxAudioFramesDrift, enableCEA708Captions: this.hlsJSEnableCaptions, enableWebVTT: this.hlsJSEnableCaptions, abrEwmaDefaultEstimate: e, abrBandWidthFactor: this.hlsJSAbrBandWidthFactor, abrBandWidthUpFactor: this.hlsJSAbrBandWidthUpFactor }; if ("mp4a.40.2" !== this.hlsJSDefaultAudioCodec && "mp4a.40.5" !== this.hlsJSDefaultAudioCodec || (i.defaultAudioCodec = this.hlsJSDefaultAudioCodec), this.isVod && (i.levelLoadingMaxRetry = 2, i.fragLoadingMaxRetry = 3), this.hlsJSXhrWithCredentials && (i.xhrSetup = function (t) { t.withCredentials = !0 }), null !== this.hlsJSXhrSetup && (i.xhrSetup = this.hlsJSXhrSetup), this.hlsJSAppleAppStoreCompliance && (i.minAutoBitrate = 192001, this.hlsJSStartLevel = -1), !b.default.isEmptyObject(this.hlsJSCustomConfig)) for (var a = Object.keys(this.hlsJSCustomConfig), s = 0, r = a.length; s < r; s++) { var n = a[s]; i[n] = this.hlsJSCustomConfig[n] } return i }.call(this); if (this.hlsJS = new Hls(t), this.hasStreamroot && "undefined" != typeof HlsjsDnaWrapper && (this.streamrootWrapper = new HlsjsDnaWrapper(this.hlsJS, this.streamrootConfig.streamrootKey, this.streamrootConfig.dnaConfig)), this.hlsJSStartLevel < 0 ? this.hlsJS.startLevel = -1 : this.hlsJS.startLevel = parseInt(this.hlsJSStartLevel), this.hlsManifestParsed = L.bind(this), this.hlsJS.on(Hls.Events.MANIFEST_PARSED, this.hlsManifestParsed), this.hlsJSStopDownloadWhilePaused && (this.hlsOnFirstPlaying = function () { this.dom.container.removeEventListener("playing", this.hlsOnFirstPlaying), this.hlsOnPauseStopLoad = function () { this.hlsStopLoad() }.bind(this), this.dom.container.addEventListener("pause", this.hlsOnPauseStopLoad), this.hlsOnPlayStartLoad = function () { this.hlsStartLoad() }.bind(this), this.dom.container.addEventListener("play", this.hlsOnPlayStartLoad) }.bind(this), this.dom.container.addEventListener("playing", this.hlsOnFirstPlaying)), this.hlsJS.on(Hls.Events.FRAG_LOADED, function (t, e) { e && void 0 !== e.frag && (h.hlsFragmentData = e.frag, b.default.createStdEvent("hlsfragmentloaded", h.dom.container)) }), T.call(this), b.default.clearInterval(this.hlsJSAbrInterval), this.hlsJSAbrInterval = setInterval(T.bind(this), 1e3), this.hlsJS.on(Hls.Events.LEVEL_SWITCHING, function () { b.default.createStdEvent("hlslevelswitching", h.dom.container) }), this.hlsJS.on(Hls.Events.LEVEL_SWITCHED, function () { b.default.createStdEvent("hlslevelswitched", h.dom.container) }), this.hlsJS.on(Hls.Events.LEVEL_LOADED, function (t, e) { if (void 0 !== e.details && (h.hlsLevelData = e.details, b.default.createStdEvent("hlslevelloaded", h.dom.container), h.hlsLevelData.fragments && h.hlsLevelData.fragments[0])) { var i = h.hlsLevelData.fragments[0]; i.programDateTime && "function" == typeof i.programDateTime.getTime && (h.hlsEpochProgramDateTime = i.programDateTime.getTime(), i.rawProgramDateTime && (h.hlsRawProgramDateTime = i.rawProgramDateTime), b.default.createStdEvent("hlsprogramdatetimeavailable", h.dom.container)) } }), this.hlsJS.on(Hls.Events.MANIFEST_LOADED, function (t, e) { void 0 !== e.levels && (h.hlsManifestData = e.levels, b.default.createStdEvent("hlsmanifestloaded", h.dom.container)) }), this.hlsJS.on(Hls.Events.FRAG_PARSING_METADATA, function (t, e) { e && e.samples ? (h.hlsID3TagData = e.samples, b.default.createStdEvent("hlsid3tagparsingcompleted", h.dom.container)) : h.hlsID3TagData = null }), this.hlsJS.on(Hls.Events.FRAG_CHANGED, function (t, e) { e && void 0 !== e.frag && (h.hlsFragmentBeingPlayed = e.frag, b.default.createStdEvent("hlsfragmentbeingplayedchanged", h.dom.container)) }), this.hlsJS.on(Hls.Events.AUDIO_TRACK_SWITCHING, function () { b.default.createStdEvent("hlsaudiotrackswitching", h.dom.container) }), this.hlsJS.on(Hls.Events.AUDIO_TRACK_SWITCHED, function () { b.default.createStdEvent("hlsaudiotrackswitched", h.dom.container) }), this.hlsJSAttachMultiAudio = function () { this.hlsJS.off(Hls.Events.AUDIO_TRACKS_UPDATED, this.hlsJSAttachMultiAudio); var t = this.hlsJS.audioTracks; if (Array.isArray(t) && 1 < t.length) { k.default.append.call(this, "audio"), k.default.appendOverlay.call(this, "audio"), k.default.deferredShow.call(this, "audio"); var e = void 0; if (1 === t.filter(function (t) { return !0 === t.default }).length) for (var i = 0; i < t.length; i++) { var a = void 0; "AUDIO" === t[i].type && !0 === t[i].default && 0 !== i && (a = t.splice(i, 1)), a && a[0] && t.unshift(a[0]) } for (var s = 0; s < t.length; s++)"AUDIO" === t[s].type && (e = document.createElement("div"), 0 === s ? b.default.setClass(e, "rmp-overlay-level rmp-color-bg rmp-overlay-level-active") : b.default.setClass(e, "rmp-overlay-level rmp-color-bg"), this.hlsJSUseManifestRenditionName && "string" == typeof t[s].name && "" !== t[s].name ? b.default.setText(e, t[s].name) : "string" == typeof t[s].lang && "" !== t[s].lang ? b.default.setText(e, t[s].lang) : b.default.setText(e, "Audio " + s), b.default.addEvent(["touchend", "click"], e, P.bind(this, s)), this.dom.audioOverlayLevelsArea.appendChild(e)) } }.bind(this), this.hlsJS.on(Hls.Events.AUDIO_TRACKS_UPDATED, this.hlsJSAttachMultiAudio), this.isLiveDvr && this.hlsJS.on(Hls.Events.LEVEL_LOADED, function (t, e) { e && e.details && "number" == typeof e.details.totalduration && (h.hlsJSLevelDuration = e.details.totalduration) }), this.hlsJS.on(Hls.Events.FRAG_BUFFERED, function (t, e) { if (e && b.default.isObject(e.stats)) { var i = e.stats; "number" == typeof i.bwEstimate && 0 < i.bwEstimate && (h.bwEstimate = Math.round(i.bwEstimate)) } }), this.adImaDai) return void r.default.init.call(this); var c = 0, u = 0, f = 0, p = null; this.hlsJSUnstalledBuffer = function () { this.dom.container.removeEventListener("playing", this.hlsJSUnstalledBuffer), S.default.hideLoadingSpin.call(this), b.default.createStdEvent("buffernotstalledanymore", this.dom.container) }.bind(this); var m = [Hls.ErrorDetails.MANIFEST_LOAD_ERROR, Hls.ErrorDetails.MANIFEST_LOAD_TIMEOUT], v = [Hls.ErrorDetails.LEVEL_LOAD_ERROR, Hls.ErrorDetails.LEVEL_LOAD_TIMEOUT, Hls.ErrorDetails.FRAG_LOAD_ERROR, Hls.ErrorDetails.FRAG_LOAD_TIMEOUT], g = 0, y = null; this.hlsJS.on(Hls.Events.ERROR, function (t, e) { if (b.default.isObject(e) && "boolean" == typeof e.fatal && e.details && e.type) { var i = e.fatal, a = e.type, s = e.details; if (!i && s === Hls.ErrorDetails.BUFFER_STALLED_ERROR) return S.default.showLoadingSpin.call(h), h.dom.container.addEventListener("playing", h.hlsJSUnstalledBuffer), void b.default.createStdEvent("bufferstalled", h.dom.container); if (i) if (a === Hls.ErrorTypes.NETWORK_ERROR) { 0; var r = -1 < m.indexOf(s), n = -1 < v.indexOf(s); if ((h.isLive || h.isLiveDvr && h.dvrLiveMode) && (r || n)) if (g < h.liveRetries) { if (null === y && (y = function () { this.hlsJS.off(Hls.Events.LEVEL_LOADED, this.hlsJSOnLiveRetriesSuccess), this.hlsJS.off(Hls.Events.MANIFEST_LOADED, this.hlsJSOnLiveRetriesSuccess), this.hlsJS.off(Hls.Events.FRAG_LOADED, this.hlsJSOnLiveRetriesSuccess), g = 0, y = null }, h.hlsJSOnLiveRetriesSuccess = y.bind(h), h.hlsJS.on(Hls.Events.LEVEL_LOADED, h.hlsJSOnLiveRetriesSuccess), h.hlsJS.on(Hls.Events.MANIFEST_LOADED, h.hlsJSOnLiveRetriesSuccess), h.hlsJS.on(Hls.Events.FRAG_LOADED, h.hlsJSOnLiveRetriesSuccess)), r) { if (!h.hasLoadedMetadata) return void _.call(h, e); b.default.clearTimeout(h.hlsJSErrorRetryTimeout), h.hlsJSErrorRetryTimeout = setTimeout(function () { h.dom.quality && A.default.destroy.call(h), h.dom.audio && k.default.destroy.call(h, "audio"), h.dom.captions && C.default.destroy.call(h), h.hlsJS.loadSource(h.startingBitratePath) }, 400) } else b.default.clearTimeout(h.hlsJSErrorRetryTimeout), h.hlsJSErrorRetryTimeout = setTimeout(function () { h.hlsJS.startLoad() }, 400); g++ } else _.call(h, e); else if (r || s === Hls.ErrorDetails.MANIFEST_PARSING_ERROR) _.call(h, e); else if (n) { var o = h.getBitrates(); if (s === Hls.ErrorDetails.LEVEL_LOAD_ERROR && 1 === o.length) f = 0, _.call(h, e); else if (f < 3) { 0 === f && null === p && (p = function () { 0 < f && (f = 0) }, h.hlsJS.on(Hls.Events.LEVEL_LOADED, p)), f++; var l = b.default.getRandomInt(0, o.length); 0, h.hlsJS.currentLevel = l } else f = 0, _.call(h, e) } else b.default.clearTimeout(h.hlsJSErrorRetryTimeout), h.hlsJSErrorRetryTimeout = setTimeout(function () { h.hlsJS.startLoad() }, 400) } else if (a === Hls.ErrorTypes.MEDIA_ERROR) { if (s === Hls.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR) return void _.call(h, e); var d = b.default.getNow(); 0 === c || 3e3 < d - c ? (c = b.default.getNow(), h.hlsJS.recoverMediaError()) : 0 === u || 3e3 < d - u ? (u = b.default.getNow(), h.hlsJS.swapAudioCodec(), h.hlsJS.recoverMediaError()) : _.call(h, e) } else _.call(h, e); else b.default.createCustomEvent("hlswarning", h.dom.container, e), E.default.warning.call(h, "hls.js warning", 2e3, e) } }), w.initFinised.call(this) } }, f = function () { if ("undefined" != typeof Hls) u.call(this); else { var t = "https://cdn.radiantmediatechs.com/rmp/5.0.9/hls/hls.min.js"; 0, b.default.getScript(t, u.bind(this), E.default.fatal.bind(this, "failed to load required lib hls.js", 200, null)) } }; w.init = function () { if (this.msePreloadRequested) this.msePreloadRequested = !1; else if (!b.default.isEmptyObject(this.streamrootConfig) && this.streamrootConfig.streamrootKey && "hlsjs" === this.streamrootConfig.type) if (this.hasStreamroot = !0, "undefined" != typeof HlsjsDnaWrapper) f.call(this); else { b.default.getScript("https://cdn.streamroot.io/hlsjs-dna-wrapper/1/stable/hlsjs-dna-wrapper.js", f.bind(this), f.bind(this)) } else f.call(this) }, i.default = w }, { "../../../../rmp-connection/js/rmp-connection": 253, "../ads/ima-dai": 8, "../analytics/mux": 13, "../cast/cast": 22, "../core/modules/modules": 30, "../core/modules/quality": 31, "../core/ui/core-ui": 41, "../core/utils/error": 44, "../core/utils/utils": 46, "../fw/env": 52, "../fw/fw": 53, "../vtt/captions": 57 }], 4: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var u = f(t("../fw/fw")), a = f(t("../core/modules/quality")), s = f(t("../vtt/captions")), r = f(t("./shaka/configuration")), n = f(t("../core/ui/core-ui")), o = f(t("../core/utils/utils")), l = f(t("../core/utils/error")), d = f(t("../core/modules/modules")), h = f(t("../cast/cast")), c = f(t("../api/offline")); function f(t) { return t && t.__esModule ? t : { default: t } } var p = {}, m = function (t, e) { e && (e.stopPropagation(), "touchend" === e.type && e.preventDefault()), n.default.showChrome.call(this), this.setBitrate(t - 1) }, v = function (t, e) { e && (e.stopPropagation(), "touchend" === e.type && e.preventDefault()), n.default.showChrome.call(this), this.setAudioTrack(t), this.googleCast && h.default.setAudioTrack.call(this, t) }, g = function () { var t = this.shakaPlayer.getVariantTracks(), e = t.find(function (t) { return !0 === t.active }); return e ? e.language : t[0].language }, y = function () { var t = this.shakaPlayer.getVariantTracks(); if (0 < t.length && this.dom.qualityOverlayLevelsArea) { var e = this.dom.qualityOverlayLevelsArea.querySelectorAll(".rmp-overlay-level"); if (0 < e.length) { for (var i = 0, a = e.length; i < a; i++)u.default.removeClass(e[i], "rmp-abr-active"); for (var s = 0, r = t.length; s < r; s++) { var n = t[s]; if (n.active) { var o = this.shakaCurrentLevel; this.audioOnly ? n.audioBandwidth ? this.shakaCurrentLevel = n.audioBandwidth : n.bandwidth && (this.shakaCurrentLevel = n.bandwidth) : n.videoBandwidth ? this.shakaCurrentLevel = n.videoBandwidth : n.bandwidth && (this.shakaCurrentLevel = n.bandwidth), null !== o && this.shakaCurrentLevel === o || u.default.createStdEvent("shakalevelswitching", this.dom.container); for (var l = 0, d = e.length; l < d; l++) { var h = e[l], c = h.getAttribute("data-track-id"); if (c && parseInt(c) === n.id) { u.default.addClass(h, "rmp-abr-active"); break } } break } } } } }; p.setUpVideoRenditions = function () { this.shakaVideoRenditions = []; for (var e = g.call(this), t = this.variantsPerLng.filter(function (t) { return Object.keys(t)[0] === e }), i = 0, a = (t = void 0 !== t[0][e] ? t[0][e] : []).length; i < a; i++) { var s = t[i], r = document.createElement("div"); u.default.setClass(r, "rmp-overlay-level rmp-color-bg rmp-q" + (i + 1)), r.setAttribute("data-track-id", s.id), this.shakaVideoRenditions.push(s.id); var n = "", o = s.height; o && (n += o + "p"); var l = Math.round(s.bandwidth / 1e3); 10 < l && (n += " " + this.uiSeparator + " " + l.toString() + " kbps"), n || (n += "Level " + (i + 1)), u.default.setText(r, n), this.dom.qualityOverlayLevelsArea.appendChild(r) } (function () { if (this.dom.qualityOverlayLevelsArea) for (var t = this.dom.qualityOverlayLevelsArea.querySelectorAll(".rmp-overlay-level"), e = 0, i = t.length; e < i; e++)u.default.addEvent(["touchend", "click"], t[e], m.bind(this, e)) }).call(this), y.call(this) }; var b = function () { (function () { var a = this; this.variantsAudioLng = this.shakaPlayer.getAudioLanguages(); var s = this.shakaPlayer.getVariantTracks(); this.variantsPerLng = [], this.variantsAudioLng.forEach(function (e) { var t = s.filter(function (t) { return t.language === e }); t.sort(function (t, e) { return t.bandwidth - e.bandwidth }); var i = {}; i[e] = t, a.variantsPerLng.push(i) }), this.hasCC || (this.shakaTextTracks = this.shakaPlayer.getTextTracks()) }).call(this), 0 < this.variantsPerLng.length && (a.default.setUpAbrUI.call(this), p.setUpVideoRenditions.call(this), 1 < this.variantsPerLng.length && function () { d.default.append.call(this, "audio"), d.default.appendOverlay.call(this, "audio"), d.default.deferredShow.call(this, "audio"); for (var t = g.call(this), e = 0; e < this.variantsAudioLng.length; e++) { var i = this.variantsAudioLng[e], a = document.createElement("div"); i === t ? u.default.setClass(a, "rmp-overlay-level rmp-color-bg rmp-overlay-level-active") : u.default.setClass(a, "rmp-overlay-level rmp-color-bg"); var s = "Audio " + e; "und" !== i && (s = i), u.default.setText(a, s), u.default.addEvent(["touchend", "click"], a, v.bind(this, e)), this.dom.audioOverlayLevelsArea.appendChild(a) } }.call(this), !this.hasCC && 0 < this.shakaTextTracks.length && (this.textTracks = u.default.filterTextTracks(this.shakaTextTracks), 0 < this.textTracks.length && s.default.appendUI.call(this))) }, S = 0, E = function (t) { if (t) { var e = t; t && t.detail && (e = t.detail), e && "number" == typeof e.severity && (2 === e.severity ? (u.default.createCustomEvent("shakaerror", this.dom.container, e), l.default.fatal.call(this, "Shaka player error - cannot recover", 301, e)) : 1 === e.severity && (1 === e.category && this.isLive && this.hasLoadedMetadata ? S < this.liveRetries ? (0 === S && (this.shakaOnPlayingResetRetriesCount = function () { this.dom.container.removeEventListener("playing", this.shakaOnPlayingResetRetriesCount), S = 0 }.bind(this), this.dom.container.addEventListener("playing", this.shakaOnPlayingResetRetriesCount)), S++) : (this.dom.container.removeEventListener("playing", this.shakaOnPlayingResetRetriesCount), u.default.createCustomEvent("shakaerror", this.dom.container, e), l.default.fatal.call(this, "Shaka player error - cannot recover", 301, e)) : (u.default.createStdEvent("shakawarning", this.dom.container, e), l.default.warning.call(this, "Shaka player warning", 3e3, e)))) } }; p.destroy = function () { this.shakaPlayer && (this.shakaPlayer.removeEventListener("error", this.shakaError), this.shakaPlayer.removeEventListener("adaptation", this.shakaAdaptationChanged), this.shakaPlayer.removeEventListener("buffering", this.shakaBuffering), this.shakaPlayer.removeEventListener("trackschanged", this.shakaTracksChanged), this.shakaPlayer.removeEventListener("buffering", this.shakaUnstalledBuffer)), this.dom.container && this.dom.container.removeEventListener("playing", this.shakaOnPlayingResetRetriesCount) }; var A = function () { this.shakaPlayer = new shaka.Player(this.dom.video), this.hasStreamroot && "undefined" != typeof ShakaPlayerDnaWrapper && (this.streamrootWrapper = new ShakaPlayerDnaWrapper(this.shakaPlayer, this.streamrootConfig.streamrootKey, this.streamrootConfig.dnaConfig)); var t = void 0; t = u.default.isEmptyObject(this.shakaCustomConfig) ? r.default.initial.call(this) : this.shakaCustomConfig, this.shakaPlayer.configure(t), null !== this.shakaCustomRequestFilter ? this.shakaPlayer.getNetworkingEngine().registerRequestFilter(this.shakaCustomRequestFilter) : u.default.isEmptyObject(this.shakaRequestConfiguration) || r.default.request.call(this), this.shakaError = E.bind(this), this.shakaPlayer.addEventListener("error", this.shakaError), this.shakaAdaptationChanged = function () { this.shakaPlayer.getConfiguration().abr.enabled && y.call(this) }.bind(this), this.shakaPlayer.addEventListener("adaptation", this.shakaAdaptationChanged), this.shakaBuffering = function (t) { t && "buffering" === t.type && t.buffering && (this.firstBufferStalledEvent || (n.default.showLoadingSpin.call(this), this.shakaPlayer.addEventListener("buffering", this.shakaUnstalledBuffer), u.default.createStdEvent("bufferstalled", this.dom.container)), this.firstBufferStalledEvent = !1) }.bind(this), this.shakaUnstalledBuffer = function (t) { this.shakaPlayer.removeEventListener("buffering", this.shakaUnstalledBuffer), t && "buffering" === t.type && !t.buffering && (n.default.hideLoadingSpin.call(this), u.default.createStdEvent("buffernotstalledanymore", this.dom.container)) }.bind(this), this.shakaPlayer.addEventListener("buffering", this.shakaBuffering), this.shakaTracksChanged = function () { this.dom.quality && a.default.destroy.call(this), this.dom.audio && d.default.destroy.call(this, "audio"), this.hasCC || this.dom.captions && s.default.destroy.call(this), b.call(this), u.default.createStdEvent("shakatrackschanged", this.dom.container) }.bind(this), this.shakaPlayer.addEventListener("trackschanged", this.shakaTracksChanged), this.shakaOffline && this.isVod && (this.hasDownloadSupport() ? c.default.init.call(this) : l.default.warning.call(this, "offline storage is not supported in this environment", 3007, null)), this.shakaPlayer.load(this.startingBitratePath).catch(this.shakaError), this.msePreloadCompleted = !0, u.default.createStdEvent("shakainstancecreated", this.dom.container) }, C = function () { "undefined" != typeof shaka && (shaka.polyfill.installAll(), shaka.Player.isBrowserSupported()) ? this.readingDash ? o.default.checkStreams.call(this, A.bind(this), this.backupSrc, "dash") : this.readingHlsShaka && (this.readingHlsHevc ? o.default.checkStreams.call(this, A.bind(this), this.backupSrc, "hlsHevc") : o.default.checkStreams.call(this, A.bind(this), this.backupSrc, "hls")) : l.default.fatal.call(this, "failed to load required lib Shaka player", 300, null) }, k = function () { if ("undefined" != typeof shaka) C.call(this); else { var t = "https://cdn.radiantmediatechs.com/rmp/5.0.9/dash/shaka-player.compiled.js"; 0, u.default.getScript(t, C.bind(this), l.default.fatal.bind(this, "failed to load required lib Shaka player", 300, null)) } }; p.init = function () { if (this.msePreloadRequested) this.msePreloadRequested = !1; else if (!u.default.isEmptyObject(this.streamrootConfig) && this.streamrootConfig.streamrootKey && "shakaplayer" === this.streamrootConfig.type) if (this.hasStreamroot = !0, "undefined" != typeof ShakaPlayerDnaWrapper) k.call(this); else { u.default.getScript("https://cdn.streamroot.io/shakaplayer-dna-wrapper/1/stable/shakaplayer-dna-wrapper.js", k.bind(this), k.bind(this)) } else k.call(this) }, i.default = p }, { "../api/offline": 19, "../cast/cast": 22, "../core/modules/modules": 30, "../core/modules/quality": 31, "../core/ui/core-ui": 41, "../core/utils/error": 44, "../core/utils/utils": 46, "../fw/fw": 53, "../vtt/captions": 57, "./shaka/configuration": 5 }], 5: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var c = a(t("../../fw/fw")), n = a(t("../../fw/env")), o = a(t("../../../../../rmp-connection/js/rmp-connection")); function a(t) { return t && t.__esModule ? t : { default: t } } var s = {}, l = function (t) { var e = n.default.devicePixelRatio; e <= 1 && !this.getFullscreen() && (e = 1.25); var i = this.getPlayerWidth() * e, a = this.getPlayerHeight() * e; if (0 < i && 0 < a) { var s = { maxWidth: i, maxHeight: a }; return t ? (t.abr.restrictions = s, t) : { abr: { restrictions: s } } } return null }; s.initial = function () { var t = { abr: {}, drm: {}, manifest: {}, restrictions: {}, streaming: {} }, e = {}, i = {}, a = this.shakaStartLevel, s = null; if (a < 0 && 0 < (s = o.default.getBandwidthEstimate()) && (a = Math.round(1e3 * s * 1e3)), null === s && (a = n.default.fallbackArbitraryBWEstimate), t.abr.defaultBandwidthEstimate = a, t.abr.bandwidthDowngradeTarget = this.shakaBandwidthDowngradeTarget, t.abr.bandwidthUpgradeTarget = this.shakaBandwidthUpgradeTarget, this.shakaCapLevelToPlayerSize) { var r = l.call(this, t); r && (t = r), this.configureShakaCapLevelToPlayerSize = function () { var t = l.call(this, null); t && this.shakaPlayer.configure(t) }.bind(this, null), this.dom.container.addEventListener("resize", this.configureShakaCapLevelToPlayerSize) } if (t.preferredAudioLanguage = this.shakaPreferredAudioLanguage, t.streaming.bufferBehind = this.shakaStreamingBufferBehind, t.streaming.bufferingGoal = this.shakaStreamingBufferingGoal, t.streaming.rebufferingGoal = this.shakaStreamingRebufferingGoal, t.streaming.ignoreTextStreamFailures = this.shakaStreamingIgnoreTextStreamFailures, t.streaming.jumpLargeGaps = this.shakaJumpLargeGaps, t.streaming.smallGapLimit = this.shakaSmallGapLimit, 10 !== this.shakaManifestDashDefaultPresentationDelay && (t.manifest.dash = {}, t.manifest.dash.defaultPresentationDelay = this.shakaManifestDashDefaultPresentationDelay), c.default.isEmptyObject(this.shakaRetryParameters)) { t.manifest.retryParameters = { maxAttempts: 3 }, t.streaming.retryParameters = { maxAttempts: 4 } } else "number" == typeof this.shakaRetryParameters.maxAttempts && (e.maxAttempts = this.shakaRetryParameters.maxAttempts), "number" == typeof this.shakaRetryParameters.baseDelay && (e.baseDelay = this.shakaRetryParameters.baseDelay), "number" == typeof this.shakaRetryParameters.backoffFactor && (e.backoffFactor = this.shakaRetryParameters.backoffFactor), "number" == typeof this.shakaRetryParameters.fuzzFactor && (e.fuzzFactor = this.shakaRetryParameters.fuzzFactor), "number" == typeof this.shakaRetryParameters.timeout && (e.timeout = this.shakaRetryParameters.timeout), c.default.isEmptyObject(e) || (t.drm.retryParameters = e, t.manifest.retryParameters = e, t.streaming.retryParameters = e); return c.default.isEmptyObject(this.shakaDrm) || (c.default.isObject(this.shakaDrm.servers) && (t.drm.servers = this.shakaDrm.servers), c.default.isObject(this.shakaDrm.clearKeys) && (t.drm.clearKeys = this.shakaDrm.clearKeys), c.default.isObject(this.shakaDrm.advanced) && (t.drm.advanced = this.shakaDrm.advanced)), c.default.isEmptyObject(this.shakaRestrictions) || ("number" == typeof this.shakaRestrictions.minWidth && (i.minWidth = this.shakaRestrictions.minWidth), "number" == typeof this.shakaRestrictions.maxWidth && (i.maxWidth = this.shakaRestrictions.maxWidth), "number" == typeof this.shakaRestrictions.minHeight && (i.minHeight = this.shakaRestrictions.minHeight), "number" == typeof this.shakaRestrictions.maxHeight && (i.maxHeight = this.shakaRestrictions.maxHeight), "number" == typeof this.shakaRestrictions.minPixels && (i.minPixels = this.shakaRestrictions.minPixels), "number" == typeof this.shakaRestrictions.maxPixels && (i.maxPixels = this.shakaRestrictions.maxPixels), "number" == typeof this.shakaRestrictions.minAudioBandwidth && (i.minAudioBandwidth = this.shakaRestrictions.minAudioBandwidth), "number" == typeof this.shakaRestrictions.maxAudioBandwidth && (i.maxAudioBandwidth = this.shakaRestrictions.maxAudioBandwidth), "number" == typeof this.shakaRestrictions.minVideoBandwidth && (i.minVideoBandwidth = this.shakaRestrictions.minVideoBandwidth), "number" == typeof this.shakaRestrictions.maxVideoBandwidth && (i.maxVideoBandwidth = this.shakaRestrictions.maxVideoBandwidth), c.default.isEmptyObject(i) || (t.restrictions = i)), c.default.isEmptyObject(t.drm) && delete t.drm, c.default.isEmptyObject(t.manifest) && delete t.manifest, c.default.isEmptyObject(t.restrictions) && delete t.restrictions, t }, s.request = function () { var n = {}, o = !1, l = ""; c.default.isObject(this.shakaRequestConfiguration.license) && (c.default.isObject(this.shakaRequestConfiguration.license.headers) && (n = this.shakaRequestConfiguration.license.headers), "boolean" == typeof this.shakaRequestConfiguration.license.credentials && (o = this.shakaRequestConfiguration.license.credentials), "string" == typeof this.shakaRequestConfiguration.license.parameters && (l = this.shakaRequestConfiguration.license.parameters)); var d = !1; c.default.isObject(this.shakaRequestConfiguration.manifest) && "boolean" == typeof this.shakaRequestConfiguration.manifest.credentials && (d = this.shakaRequestConfiguration.manifest.credentials); var h = !1; c.default.isObject(this.shakaRequestConfiguration.segment) && "boolean" == typeof this.shakaRequestConfiguration.segment.credentials && (h = this.shakaRequestConfiguration.segment.credentials), this.shakaPlayer.getNetworkingEngine().registerRequestFilter(function (t, e) { if (t === shaka.net.NetworkingEngine.RequestType.LICENSE) { if (!c.default.isEmptyObject(n)) for (var i = Object.keys(n), a = 0, s = i.length; a < s; a++) { var r = i[a]; e.headers[r] = n[r] } "" !== l && (e.uris[0] += l), o && (e.allowCrossSiteCredentials = !0) } t === shaka.net.NetworkingEngine.RequestType.MANIFEST && d && (e.allowCrossSiteCredentials = !0), t === shaka.net.NetworkingEngine.RequestType.SEGMENT && h && (e.allowCrossSiteCredentials = !0) }) }, i.default = s }, { "../../../../../rmp-connection/js/rmp-connection": 253, "../../fw/env": 52, "../../fw/fw": 53 }], 6: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var g = l(t("../fw/fw")), y = l(t("../fw/env")), a = l(t("../core/ui/core-ui")), s = l(t("./ima-ads")), r = l(t("./rmp-vast")), n = l(t("../core/modules/modules")), o = l(t("../core/accessible/accessible")); function l(t) { return t && t.__esModule ? t : { default: t } } function d(t) { if (Array.isArray(t)) { for (var e = 0, i = Array(t.length); e < t.length; e++)i[e] = t[e]; return i } return Array.from(t) } var h = { destroy: function () { g.default.removeEvent("ended", this.dom.container, this.onEndedWaitForPlay), g.default.removeEvent("play", this.dom.container, this.onRePlayLoadAdTag), g.default.removeEvent("adloaded", this.dom.container, this.onAdLoadedAfterReload) } }, c = function () { this.dom.container.removeEventListener("ended", this.onEndedWaitForPlay), this.onRePlayLoadAdTag = function () { this.dom.container.removeEventListener("play", this.onRePlayLoadAdTag), this.adTagWaterfall = [].concat(d(this.originalAdTagWaterfall)), this.adTagUrl = this.originalAdTagUrl, "ima" === this.adParser ? this.contentCompleteCalled = !1 : this.rmpVast.setContentPlayerCompleted(!1), this.loadAds(this.adTagUrl), this.dom.container.addEventListener("ended", this.onEndedWaitForPlay) }.bind(this), this.dom.container.addEventListener("play", this.onRePlayLoadAdTag) }; h.onEndedReloadAdTag = function () { this.onEndedWaitForPlay = c.bind(this), this.dom.container.addEventListener("ended", this.onEndedWaitForPlay) }; var u = function (t) { t && (t.stopPropagation(), "touchend" === t.type && t.preventDefault()), g.default.removeEvent(["touchend", "click"], this.dom.overlayButton, this.onInteractionReloadAdTag), y.default.isMobile && g.default.removeEvent(["touchend", "click"], this.dom.centralMobileUI, this.onInteractionReloadAdTag), this.adTagWaterfall = [].concat(d(this.originalAdTagWaterfall)), this.adTagUrl = this.originalAdTagUrl, this.loadAds(this.adTagUrl), this.onAdLoadedAfterReload = function () { this.dom.container.removeEventListener("adloaded", this.onAdLoadedAfterReload), g.default.removeClass(this.dom.overlayButtonIcon, "rmp-i-replay"), g.default.addClass(this.dom.overlayButtonIcon, "rmp-i-play"), y.default.isMobile && (g.default.removeClass(this.dom.centralMobileUIIcon, "rmp-i-replay"), g.default.removeClass(this.dom.centralMobileUI, "rmp-mobile-show-play"), g.default.addClass(this.dom.centralMobileUIIcon, "rmp-i-pause")), g.default.show(this.dom.outline) }.bind(this), this.dom.container.addEventListener("adloaded", this.onAdLoadedAfterReload) }; h.endedOutStreamUI = function () { "" !== this.endOfVideoPoster && this.setPoster(this.endOfVideoPoster), "" !== this.poster && g.default.show(this.dom.poster), g.default.hide(this.dom.outline), this.adTagReloadOnEnded ? (g.default.removeClass(this.dom.overlayButtonIcon, "rmp-i-play"), g.default.addClass(this.dom.overlayButtonIcon, "rmp-i-replay"), a.default.showCentralPlay.call(this), this.onInteractionReloadAdTag = u.bind(this), g.default.addEvent(["touchend", "click"], this.dom.overlayButton, this.onInteractionReloadAdTag), y.default.isMobile && (g.default.removeClass(this.dom.centralMobileUIIcon, "rmp-i-play"), g.default.removeClass(this.dom.centralMobileUIIcon, "rmp-i-pause"), g.default.addClass(this.dom.centralMobileUIIcon, "rmp-i-replay"), g.default.addClass(this.dom.centralMobileUI, "rmp-mobile-show-play"), g.default.addEvent(["touchend", "click"], this.dom.centralMobileUI, this.onInteractionReloadAdTag))) : (a.default.hideCentralPlay.call(this), a.default.hideLoadingSpin.call(this), g.default.removeEvent(["touchend", "click"], this.dom.playPause, this.initiatePlayback), g.default.removeEvent(["touchend", "click"], this.dom.overlayButton, this.initiatePlayback), y.default.isMobile && (g.default.hide(this.dom.centralMobileUI), g.default.removeEvent(["touchend", "click"], this.dom.centralMobileUI, this.initiatePlayback))) }, h.createControlBarAdInfo = function () { this.dom.adInfo = document.createElement("div"), g.default.setClass(this.dom.adInfo, "rmp-ad-info"), g.default.hide(this.dom.adInfo), !y.default.isMobile || "ima" !== this.adParser || "s3" !== this.skin && "s4" !== this.skin || g.default.addClass(this.dom.adInfo, "rmp-no-display"), this.dom.outline.appendChild(this.dom.adInfo), "" !== this.labels.ads.controlBarCustomMessage && (this.dom.adMessage = document.createElement("span"), g.default.setClass(this.dom.adMessage, "rmp-ad-info-message"), g.default.setText(this.dom.adMessage, this.labels.ads.controlBarCustomMessage), this.dom.adInfo.appendChild(this.dom.adMessage)) }; var f = function () { var t = this.getAdCurrentTime(); if (t > 1e3 * this.adSkipOffset) g.default.clearInterval(this.adSkipInterval), this.dom.adSkipWaiting.style.display = "none", this.dom.adSkipMessage.style.display = "block", this.dom.skipIcon.style.display = "block"; else if (-1 < t) { var e = Math.round((1e3 * this.adSkipOffset - t) / 1e3); 0 < e && (this.dom.adSkipWaiting.textContent = this.labels.ads.skipWaitingMessage + " " + e + "s") } }, p = function () { if (!this.rmpVast.getIsSkippableAd() && !this.isVpaidCreative()) { if (void 0 === this.dom.adSkipButton) if (this.dom.adSkipButton = document.createElement("div"), this.dom.adSkipButton.className = "rmp-ad-skip", o.default.makeAccessible.call(this, this.dom.adSkipButton, "Ad skip button", !0), this.dom.adSkipWaiting = document.createElement("div"), this.dom.adSkipWaiting.className = "rmp-ad-skip-waiting", this.dom.adSkipMessage = document.createElement("div"), this.dom.adSkipMessage.className = "rmp-ad-skip-message", this.dom.adSkipMessage.textContent = this.labels.ads.skipMessage, this.dom.skipIcon = document.createElement("div"), this.dom.skipIcon.className = "rmp-ad-skip-icon", g.default.addEvent(["touchend", "click"], this.dom.adSkipButton, function (t) { t && (t.stopPropagation(), "touchend" === t.type && t.preventDefault()), this.getAdCurrentTime() > 1e3 * this.adSkipOffset && (g.default.createStdEvent("adskipped", this.dom.container), this.stopAds()) }.bind(this)), this.dom.adSkipButton.appendChild(this.dom.adSkipWaiting), this.dom.adSkipButton.appendChild(this.dom.adSkipMessage), this.dom.adSkipButton.appendChild(this.dom.skipIcon), "ima" === this.adParser) this.dom.adContainer.appendChild(this.dom.adSkipButton); else { var t = this.dom.container.querySelector(".rmp-ad-container"); null !== t && t.appendChild(this.dom.adSkipButton) } this.dom.adSkipButton.style.display = "block", this.adSkipOffset <= 0 ? (this.dom.adSkipWaiting.style.display = "none", this.dom.adSkipMessage.style.display = "block", this.dom.skipIcon.style.display = "block") : (this.dom.adSkipWaiting.style.display = "block", this.dom.adSkipMessage.style.display = "none", this.dom.skipIcon.style.display = "none"), 0 < this.adSkipOffset && (f.call(this), g.default.clearInterval(this.adSkipInterval), this.adSkipInterval = setInterval(f.bind(this), 1e3)) } }, m = function () { g.default.removeClass(this.dom.outline, "rmp-no-display"), a.default.enableCentralUI.call(this) }, v = function () { g.default.addClass(this.dom.outline, "rmp-no-display"), a.default.disableCentralUI.call(this) }; h.setAdUI = function (t) { if (t && !this.hasAdUI) { if (!this.adOutStream && (n.default.closeAll.call(this), n.default.hide.call(this), g.default.hide([this.dom.seekBar, this.dom.duration, this.dom.timeElapsed]), this.dom.logoImg && g.default.hide(this.dom.logoImg), this.dom.quickRewind && g.default.hide(this.dom.quickRewind), this.hasRelated && g.default.hide(this.dom.relatedSkip), this.hasPlaylist && (g.default.hide(this.dom.playlistLeftArrow), g.default.hide(this.dom.playlistRightArrow)), this.video360)) { var e = this.dom.container.querySelector(".rmp-360-ui-text"); null !== e && g.default.removeElement(e), g.default.hide(this.dom.ui360), g.default.show(this.dom.adContainer) } g.default.addClass(this.dom.contentTitle, "rmp-no-display"), this.dom.adInfo || h.createControlBarAdInfo.call(this), !1 === this.adCountDown && "" === this.labels.ads.controlBarCustomMessage || g.default.show(this.dom.adInfo), this.adSkipButton && "ima" !== this.adParser && p.call(this), this.isVPAID && h.setVPAIDUI.call(this, !0), function () { /adsense/i.test(this.adSystem) && /(text|image\/)/i.test(this.adContentType) && v.call(this) }.call(this), a.default.showChrome.call(this), this.hasAdUI = !0 } else !t && this.hasAdUI && (this.adOutStream || (n.default.show.call(this), this.isLive ? g.default.setText(this.dom.timeElapsedText, this.labels.hint.live) : g.default.show([this.dom.seekBar, this.dom.duration]), g.default.show(this.dom.timeElapsed), this.dom.quickRewind && g.default.show(this.dom.quickRewind), this.hasRelated && g.default.show(this.dom.relatedSkip), this.hasPlaylist && (g.default.show(this.dom.playlistLeftArrow), g.default.show(this.dom.playlistRightArrow)), this.video360 && (g.default.hide(this.dom.adContainer), g.default.show(this.dom.ui360))), g.default.hide(this.dom.adInfo), this.isVPAID && h.setVPAIDUI.call(this, !1), g.default.removeClass(this.dom.contentTitle, "rmp-no-display"), this.dom.logoImg && g.default.show(this.dom.logoImg), m.call(this), g.default.clearInterval(this.adCountdownInterval), this.adSkipButton && "ima" !== this.adParser && function () { g.default.clearInterval(this.adSkipInterval), this.dom.adSkipButton && (this.dom.adSkipButton.style.display = "none") }.call(this), this.hasAdUI = !1) }, h.updateVPAIDStatus = function (t) { var e = this.getAdContentType(); /\/javascript/i.test(e) && (this.isVPAID = !0, t && h.setVPAIDUI.call(this, !0)) }, h.setVPAIDUI = function (t) { t ? this.adVpaidControls ? g.default.addClass(this.dom.outline, "rmp-force-show") : v.call(this) : this.adVpaidControls ? g.default.removeClass(this.dom.outline, "rmp-force-show") : m.call(this) }, h.udpatePlayPause = function () { this.getAdPaused() ? (g.default.addClass(this.dom.playPause, "rmp-i-play"), g.default.removeClass(this.dom.playPause, "rmp-i-pause"), y.default.isMobile && (g.default.removeClass(this.dom.centralMobileUIIcon, "rmp-i-pause"), g.default.addClass(this.dom.centralMobileUIIcon, "rmp-i-play"), g.default.addClass(this.dom.centralMobileUI, "rmp-mobile-show-play")), a.default.showChrome.call(this), a.default.showCentralPlay.call(this)) : (g.default.removeClass(this.dom.playPause, "rmp-i-play"), g.default.addClass(this.dom.playPause, "rmp-i-pause"), y.default.isMobile && (g.default.removeClass(this.dom.centralMobileUIIcon, "rmp-i-play"), g.default.removeClass(this.dom.centralMobileUI, "rmp-mobile-show-play"), g.default.addClass(this.dom.centralMobileUIIcon, "rmp-i-pause")), a.default.hideCentralPlay.call(this)) }, h.playPause = function () { "ima" === this.adParser ? this.getAdPaused() ? s.default.resumeAds.call(this) : s.default.pauseAds.call(this) : this.getAdPaused() ? r.default.resumeAds.call(this) : r.default.pauseAds.call(this) }; var b = function () { var t = -1; if ("ima" === this.adParser) try { t = this.adsManager.getRemainingTime() } catch (t) { g.default.trace(t) } else t = (this.getAdDuration() - this.getAdCurrentTime()) / 1e3; "number" == typeof t && 0 <= t && (t = g.default.readableTime(Math.round(t)), g.default.setText(this.dom.adCountdown, "(" + t + ")")) }; h.addCountDown = function () { this.dom.adCountdown || (this.dom.adCountdown = document.createElement("span"), g.default.setClass(this.dom.adCountdown, "rmp-ad-info-countdown"), this.dom.adInfo.appendChild(this.dom.adCountdown)), b.call(this), g.default.clearInterval(this.adCountdownInterval), this.adCountdownInterval = setInterval(b.bind(this), 1e3) }; h.onAdBlockDetection = function () { var t = this; g.default.addClass(this.dom.container, "rmp-ad-block-detected"), this.googleCast = !1, this.airplay = !1, this.dom.container.addEventListener("playing", function () { t.pause(), t.showPoster() }), function () { var t = document.createElement("div"); t.className = "rmp-ad-block-container", t.addEventListener("click", function (t) { t.preventDefault(), t.stopPropagation() }); var e = document.createElement("div"); e.className = "rmp-ad-block-text", e.textContent = this.adBlockerDetectedMessage, t.appendChild(e), this.dom.container.appendChild(t), g.default.fadeIn(t), g.default.show(this.dom.poster) }.call(this) }, h.replaceAdTagVar = function (t) { var i = t; if (!/__.+__/i.test(i)) return i; var a = [], e = ""; window.location && window.location.hostname && (e = window.location.hostname.toLowerCase()), a.push(g.default.RFC3986EncodeURIComponent(e)); var s = this.height; this.isInFullscreen && (s = g.default.getScreenHeight()), ("number" != typeof s || s <= 0) && (s = ""), a.push(g.default.RFC3986EncodeURIComponent(Math.round(s).toString())); var r = this.width; this.isInFullscreen && (r = g.default.getScreenWidth()), ("number" != typeof r || r <= 0) && (r = ""), a.push(g.default.RFC3986EncodeURIComponent(Math.round(r).toString())); for (var n = "", o = 0; o < 12; o++)n += g.default.getRandomInt(0, 9).toString(); a.push(g.default.RFC3986EncodeURIComponent(n)); var l = ""; document.URL && (l = document.URL), a.push(g.default.RFC3986EncodeURIComponent(l)); var d = Date.now(); ("number" != typeof d || d <= 0) && (d = ""), a.push(g.default.RFC3986EncodeURIComponent(d.toString())); var h = ""; document.referrer && (h = document.referrer), a.push(g.default.RFC3986EncodeURIComponent(h)); var c = ""; y.default.isMobile && (c = "mobile"), a.push(g.default.RFC3986EncodeURIComponent(c)); var u = ""; "ima" === this.adParser && (u = this.adParser), a.push(g.default.RFC3986EncodeURIComponent(u)); var f = ""; "" !== this.contentTitle && (f = this.contentTitle), a.push(g.default.RFC3986EncodeURIComponent(f)); var p = ""; "" !== this.contentDescription && (p = this.contentDescription), a.push(g.default.RFC3986EncodeURIComponent(p)); var m = this.getDuration(); m = -1 !== m && this.isVod ? Math.round(m / 1e3).toString() : "", a.push(g.default.RFC3986EncodeURIComponent(m)); var v = this.getCurrentTime(); return v = -1 !== v && this.isVod ? Math.round(v / 1e3).toString() : "", a.push(g.default.RFC3986EncodeURIComponent(v)), ["__domain__", "__player-height__", "__player-width__", "__random-number__", "__page-url__", "__timestamp__", "__referrer__", "__mobile__", "__ima__", "__item-title__", "__item-description__", "__item-duration__", "__current-time__"].forEach(function (t, e) { i = i.replace(t, a[e]) }), i }, i.default = h }, { "../core/accessible/accessible": 23, "../core/modules/modules": 30, "../core/ui/core-ui": 41, "../fw/env": 52, "../fw/fw": 53, "./ima-ads": 7, "./rmp-vast": 9 }], 7: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var s = c(t("../fw/fw")), r = c(t("../fw/env")), a = c(t("../core/ready")), n = c(t("../core/volume/volume")), o = c(t("../core/resize/resize")), l = c(t("../core/ui/core-ui")), d = c(t("../core/utils/utils")), h = c(t("./ads-helpers")); function c(t) { return t && t.__esModule ? t : { default: t } } var u = {}, f = function () { if (null !== this.adsManager && "function" == typeof this.adsManager.destroy) try { this.adsManager.destroy() } catch (t) { s.default.trace(t) } }; u.contentCompleteAds = function () { if (null !== this.adsLoader && "function" == typeof this.adsLoader.contentComplete) try { this.adsLoader.contentComplete() } catch (t) { s.default.trace(t) } }; var p = function () { this.adShowRemainingTime && (s.default.hide(this.dom.adCurrentTime), s.default.clearInterval(this.adRemainingTimeBarInterval)), this.isVod && this.dom.video.addEventListener("ended", this.ended), this.readingPDorNative && this.dom.video.addEventListener("error", this.generateError, !0), h.default.setAdUI.call(this, !1) }; u.resetAdsForNewRequest = function () { this.adOnStage = !1, this.adPaused = !1, this.isVPAID = !1, this.getAdOnStage() && this.getAdLinear() && p.call(this), f.call(this) }, u.requestAds = function (t) { if (this.get5Ready() && this.ads && this.adParserLoaded && "string" == typeof t && null !== this.adsLoader) { l.default.showLoadingSpin.call(this); try { var e = t.trim(), i = new google.ima.AdsRequest; /^<\?xml.+\?>/i.test(e) ? i.adsResponse = e : i.adTagUrl = e, i.linearAdSlotWidth = this.width, i.linearAdSlotHeight = this.height, i.nonLinearAdSlotWidth = this.width, i.nonLinearAdSlotHeight = this.height, i.vastLoadTimeout = this.adLoadVastTimeout, this.adForceNonLinearFullSlot && (i.forceNonLinearFullSlot = !0), 0 < this.adContentDuration && (i.contentDuration = this.adContentDuration), "" !== this.adContentKeywords && (i.contentKeywords = this.adContentKeywords), "" !== this.adContentTitle && (i.contentTitle = this.adContentTitle), i.setAdWillAutoPlay(this.autoplay), i.setAdWillPlayMuted(this.muted), this.adsLoader.requestAds(i) } catch (t) { s.default.trace(t), this.play() } } else this.play() }; var m = function () { if (this.adPaused = !1, this.adOnStage = !1, p.call(this), this.adOutStream) return h.default.endedOutStreamUI.call(this), void s.default.createStdEvent("adcontentresumerequested", this.dom.container); if (!this.contentCompleteCalled) { if (this.firstPreroll && (this.firstPreroll = !1, this.adAutoplayOnlyPreroll)) return s.default.show(this.dom.poster), void l.default.restorePlayUI.call(this); d.default.playPromise.call(this) } s.default.createStdEvent("adcontentresumerequested", this.dom.container) }, v = function () { Array.isArray(this.adTagWaterfall) && "string" == typeof this.adTagWaterfall[0] && "" !== this.adTagWaterfall[0] ? (this.adTagUrl = h.default.replaceAdTagVar.call(this, this.adTagWaterfall[0]), 0 < this.adTagWaterfall.length && this.adTagWaterfall.shift(), u.resetAdsForNewRequest.call(this), u.requestAds.call(this, this.adTagUrl), s.default.createStdEvent("adclientsidewaterfallrequested", this.dom.container)) : (f.call(this), m.call(this)) }, g = [201, 202, 203, 600, 601, 603, 604], y = function (t) { var e = t.getError(); void 0 !== e && (this.adErrorCode = e.getErrorCode(), this.adErrorMessage = e.getMessage(), this.adErrorType = e.getType(), this.adVastErrorCode = e.getVastErrorCode(), -1 < g.indexOf(this.adVastErrorCode)) || (l.default.hideLoadingSpin.call(this), s.default.createStdEvent("aderror", this.dom.container), void 0 !== e && (this.adErrorType === google.ima.AdError.Type.AD_LOAD ? s.default.createStdEvent("adloaderror", this.dom.container) : this.adErrorType === google.ima.AdError.Type.AD_PLAY && s.default.createStdEvent("adplayerror", this.dom.container)), v.call(this)) }, b = function (t) { this.adOnStage = !0, this.isVPAID = !1, l.default.hideLoadingSpin.call(this), l.default.showChrome.call(this), o.default.resizeAds.call(this), s.default.removeClass(this.dom.adContainer, "rmp-ad-overlay"); var e = t.isLinear(); "boolean" == typeof e && (this.isLinear = !!e), this.adID = t.getAdId(), this.adCreativeAdId = t.getCreativeAdId(), this.adCreativeId = t.getCreativeId(), this.adDealId = t.getDealId(), this.adSystem = t.getAdSystem(), this.adAdvertiserName = t.getAdvertiserName(), this.adMediaUrl = t.getMediaUrl(), this.adSurveyUrl = t.getSurveyUrl(), this.adUniversalAdIdRegistry = t.getUniversalAdIdRegistry(), this.adUniversalAdIdValue = t.getUniversalAdIdValue(), this.adApiFramework = t.getApiFramework(), this.adContentType = t.getContentType(), this.adDescription = t.getDescription(), this.adDuration = t.getDuration(), this.adTraffickingParameters = t.getTraffickingParameters(), this.adTraffickingParametersString = t.getTraffickingParametersString(), this.adNonLinearHeight = t.getHeight(), this.adNonLinearWidth = t.getWidth(), this.adTitle = t.getTitle(), this.adWrapperAdIds = t.getWrapperAdIds(), this.adWrapperAdSystems = t.getWrapperAdSystems(), this.adWrapperCreativeIds = t.getWrapperCreativeIds(), this.currentAdForCompanion = t, this.isLinear && (this.muted ? n.default.setVolumeAds.call(this, 0) : n.default.setVolumeAds.call(this, this.currentVolume)) }, S = function (t) { if (b.call(this, t), this.googleCast && this.castConnected || this.video360 && !this.isLinear) return this.video360 && s.default.hide(this.dom.adContainer), this.stopAds(), void this.play(); h.default.updateVPAIDStatus.call(this, this.isLinear), this.isLinear ? (this.adPaused = !1, h.default.udpatePlayPause.call(this), this.adCountDown && this.dom.adInfo && h.default.addCountDown.call(this), function (t) { if (this.adPodInfo = t.getAdPodInfo(), this.dom.adPod && s.default.setText(this.dom.adPod, ""), this.adPodInfo && this.dom.adInfo) { var e = this.adPodInfo.getTotalAds(); if ("number" == typeof e && 1 < e) { this.dom.adPod || (this.dom.adPod = document.createElement("span"), s.default.setClass(this.dom.adPod, "rmp-ad-info-pod"), this.dom.adCountdown ? this.dom.adInfo.insertBefore(this.dom.adPod, this.dom.adCountdown) : this.dom.adInfo.appendChild(this.dom.adPod)); var i = this.adPodInfo.getAdPosition(); "number" == typeof i && s.default.setText(this.dom.adPod, i + "/" + e) } } }.call(this, t), s.default.hide(this.dom.poster)) : this.adOutStream ? (this.stopAds(), v.call(this)) : (this.adNonLinearHeight + 40 < this.height && s.default.addClass(this.dom.adContainer, "rmp-ad-overlay"), this.adAutoAlign || s.default.addClass(this.dom.adContainer, "rmp-ad-no-auto-align"), d.default.playPromise.call(this)), s.default.createStdEvent("adstarted", this.dom.container) }, E = function (t) { if (s.default.isObject(t)) { 0; var e = t.getAd(); if (s.default.isObject(e) && t.type) switch (t.type) { case google.ima.AdEvent.Type.LOADED: (function (t) { b.call(this, t), s.default.createStdEvent("adloaded", this.dom.container) }).call(this, e); break; case google.ima.AdEvent.Type.STARTED: S.call(this, e); break; case google.ima.AdEvent.Type.COMPLETE: (function () { this.isLive || s.default.setText(this.dom.timeElapsedText, s.default.readableTime(s.default.getMediaCurrentTime(this.dom.video))), s.default.createStdEvent("adcomplete", this.dom.container) }).call(this); break; case google.ima.AdEvent.Type.ALL_ADS_COMPLETED: (function () { s.default.createStdEvent("adalladscompleted", this.dom.container), this.contentCompleteCalled && (this.contentCompleteCalled = !1, this.loop || (s.default.show(this.dom.poster), l.default.restorePlayUI.call(this)), !this.adDisableCustomPlaybackForIOS10Plus && r.default.isIos[0] && this.dom.video.src !== this.currentiOSSrc && (this.srcChangeAutoplay = !1, this.setSrc(this.currentiOSSrc))), this.adOutStream && r.default.isIphone && m.call(this) }).call(this); break; case google.ima.AdEvent.Type.RESUMED: (function () { this.adPaused = !1, h.default.udpatePlayPause.call(this), s.default.createStdEvent("adresumed", this.dom.container) }).call(this); break; case google.ima.AdEvent.Type.PAUSED: (function () { this.adPaused = !0, h.default.udpatePlayPause.call(this), s.default.createStdEvent("adpaused", this.dom.container) }).call(this); break; case google.ima.AdEvent.Type.CLICK: (function () { !this.adPauseOnClick || this.isVpaidCreative() || this.getAdPaused() || this.pause(), s.default.createStdEvent("adclick", this.dom.container) }).call(this); break; case google.ima.AdEvent.Type.AD_BREAK_READY: s.default.createStdEvent("adbreakready", this.dom.container); break; case google.ima.AdEvent.Type.AD_METADATA: s.default.createStdEvent("admetadata", this.dom.container); break; case google.ima.AdEvent.Type.DURATION_CHANGE: s.default.createStdEvent("addurationchange", this.dom.container); break; case google.ima.AdEvent.Type.FIRST_QUARTILE: s.default.createStdEvent("adfirstquartile", this.dom.container); break; case google.ima.AdEvent.Type.MIDPOINT: s.default.createStdEvent("admidpoint", this.dom.container); break; case google.ima.AdEvent.Type.THIRD_QUARTILE: s.default.createStdEvent("adthirdquartile", this.dom.container); break; case google.ima.AdEvent.Type.IMPRESSION: s.default.createStdEvent("adimpression", this.dom.container); break; case google.ima.AdEvent.Type.INTERACTION: s.default.createStdEvent("adinteraction", this.dom.container); break; case google.ima.AdEvent.Type.LINEAR_CHANGED: (function () { s.default.createStdEvent("adlinearchanged", this.dom.container) }).call(this); break; case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED: s.default.createStdEvent("adskippablestatechanged", this.dom.container); break; case google.ima.AdEvent.Type.SKIPPED: s.default.createStdEvent("adskipped", this.dom.container); break; case google.ima.AdEvent.Type.USER_CLOSE: s.default.createStdEvent("aduserclose", this.dom.container); break; case google.ima.AdEvent.Type.VOLUME_CHANGED: s.default.createStdEvent("advolumechanged", this.dom.container); break; case google.ima.AdEvent.Type.VOLUME_MUTED: s.default.createStdEvent("advolumemuted", this.dom.container); break; case google.ima.AdEvent.Type.LOG: (function (t) { var e = t.getAdData(); if (s.default.isObject(e) && e.adError) { var i = e.adError; this.adErrorCode = i.getErrorCode(), this.adErrorMessage = i.getMessage(), this.adErrorType = i.getType(), this.vastError = i.getVastErrorCode(), s.default.createStdEvent("adlog", this.dom.container) } }).call(this, t) } } }, A = function () { if (this.adsManager && this.dom.adCurrentTime) { var t = -1, e = -1; try { t = this.adsManager.getRemainingTime(), e = this.getAdDuration() } catch (t) { s.default.trace(t) } if (0 < t && 0 < e) { var i = Math.floor(100 * (1 - 1e3 * t / e)); i < 0 && (i = 0), this.dom.adCurrentTime && (this.dom.adCurrentTime.style.width = i + "%") } } }, C = function (t) { if (void 0 !== t) { for (var e = [google.ima.AdEvent.Type.AD_METADATA, google.ima.AdEvent.Type.LOG, google.ima.AdEvent.Type.ALL_ADS_COMPLETED, google.ima.AdEvent.Type.CLICK, google.ima.AdEvent.Type.COMPLETE, google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED, google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED, google.ima.AdEvent.Type.DURATION_CHANGE, google.ima.AdEvent.Type.FIRST_QUARTILE, google.ima.AdEvent.Type.IMPRESSION, google.ima.AdEvent.Type.INTERACTION, google.ima.AdEvent.Type.LINEAR_CHANGED, google.ima.AdEvent.Type.LOADED, google.ima.AdEvent.Type.MIDPOINT, google.ima.AdEvent.Type.PAUSED, google.ima.AdEvent.Type.RESUMED, google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED, google.ima.AdEvent.Type.SKIPPED, google.ima.AdEvent.Type.STARTED, google.ima.AdEvent.Type.THIRD_QUARTILE, google.ima.AdEvent.Type.USER_CLOSE, google.ima.AdEvent.Type.VOLUME_CHANGED, google.ima.AdEvent.Type.VOLUME_MUTED], i = 0, a = e.length; i < a; i++)t.addEventListener(e[i], E.bind(this)); t.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED, function () { !this.adDisableCustomPlaybackForIOS10Plus && r.default.isIos[0] && this.dom.video.src && (this.currentiOSSrc = this.dom.video.src), this.adShowRemainingTime && (void 0 === this.dom.adCurrentTime && (this.dom.adCurrentTime = document.createElement("div"), this.dom.adCurrentTime.className = "rmp-ad-current-time", this.dom.outline.appendChild(this.dom.adCurrentTime)), s.default.show(this.dom.adCurrentTime), this.dom.adCurrentTime.style.width = 0, A.call(this), s.default.clearInterval(this.adRemainingTimeBarInterval), this.adRemainingTimeBarInterval = setInterval(A.bind(this), 250)), this.isVod && s.default.removeEvent("ended", this.dom.video, this.ended), this.readingPDorNative && this.dom.video.removeEventListener("error", this.generateError, !0), h.default.setAdUI.call(this, !0), this.adOutStream || this.dom.video.paused || this.dom.video.pause(), s.default.createStdEvent("adcontentpauserequested", this.dom.container) }.bind(this)), t.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED, m.bind(this)), t.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, y.bind(this)); try { t.init(this.width, this.height, google.ima.ViewMode.NORMAL), t.start() } catch (t) { s.default.trace(t), this.play() } } }, k = function (t) { var e = new google.ima.AdsRenderingSettings, i = e.restoreCustomPlaybackStateOnAdBreakComplete = !0; (r.default.isIos[0] || r.default.isAndroid[0] && r.default.isAndroid[1] < 4) && (i = !1), this.adEnablePreloading && i ? e.enablePreloading = !0 : e.enablePreloading = !1, 0 < this.adLoadMediaTimeout && (e.loadVideoTimeout = this.adLoadMediaTimeout), this.adAutoAlign || (e.autoAlign = this.adAutoAlign), this.adUseStyledNonLinearAds && (e.useStyledNonLinearAds = !0), r.default.isMobile && this.adOutStreamSkin && (e.uiElements = []), this.adsManager = t.getAdsManager(this.dom.video, e), C.call(this, this.adsManager) }, w = function () { if (s.default.clearTimeout(this.imaLoadTimeout), !this.imaLoadCancel) { if ("undefined" != typeof google && void 0 !== google.ima) { if (this.adImaDai) return this.adParserLoaded = !0, h.default.createControlBarAdInfo.call(this), void a.default.fire.call(this); if (this.adParserLoaded = !0, this.dom.adContainer && this.dom.video) { google.ima.settings.setLocale(this.adLocale), google.ima.settings.setNumRedirects(this.adMaxNumRedirects), "enabled" === this.adVpaidMode ? google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED) : "insecure" === this.adVpaidMode ? google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.INSECURE) : google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.DISABLED), r.default.isIphone && google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.adDisableCustomPlaybackForIOS10Plus), google.ima.settings.setPlayerType("radiantmediaplayer"), google.ima.settings.setPlayerVersion(this.playerVersion); try { this.adDisplayContainer = new google.ima.AdDisplayContainer(this.dom.adContainer, this.dom.video), this.adsLoader = new google.ima.AdsLoader(this.adDisplayContainer), this.adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED, function (t) { var e = this; this.hasLoadedMetadata ? k.call(this, t) : (s.default.clearInterval(this.runAdsManagerInterval), this.runAdsManagerInterval = setInterval(function () { e.hasLoadedMetadata && (s.default.clearInterval(e.runAdsManagerInterval), k.call(e, t)) }, 10)), s.default.createStdEvent("adadsmanagerloaded", this.dom.container) }.bind(this)), this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, y.bind(this)) } catch (t) { return s.default.trace(t), void a.default.fire.call(this) } h.default.createControlBarAdInfo.call(this) } } a.default.fire.call(this) } }, P = function () { s.default.clearTimeout(this.imaLoadTimeout), this.imaLoadCancel || (this.adParserLoadError = !0, this.ads = !1, this.adAutoplayOnlyPreroll && d.default.autoplayFailureRestorePlayUI.call(this), s.default.createStdEvent("adloadererror", this.dom.container), a.default.fire.call(this), this.adOutStream && h.default.endedOutStreamUI.call(this)) }; u.init = function () { var t = this; if ("undefined" != typeof google && void 0 !== google.ima) w.call(this); else { var e = void 0; e = this.adImaTest ? "https://imasdk.googleapis.com/js/sdkloader/ima3_test.js" : this.adImaDai ? "https://imasdk.googleapis.com/js/sdkloader/ima3_dai.js" : "https://imasdk.googleapis.com/js/sdkloader/ima3.js", s.default.getScript(e, w.bind(this), P.bind(this)), s.default.clearTimeout(this.imaLoadTimeout), this.imaLoadTimeout = setTimeout(function () { P.call(t), t.imaLoadCancel = !0 }, this.ajaxInternalTimeout) } }, u.resumeAds = function () { if (this.adsManager) { 0; try { this.adsManager.resume() } catch (t) { s.default.trace(t) } } }, u.pauseAds = function () { if (this.adsManager) { 0; try { this.adsManager.pause() } catch (t) { s.default.trace(t) } } }, i.default = u }, { "../core/ready": 35, "../core/resize/resize": 36, "../core/ui/core-ui": 41, "../core/utils/utils": 46, "../core/volume/volume": 48, "../fw/env": 52, "../fw/fw": 53, "./ads-helpers": 6 }], 8: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var o = n(t("../fw/fw")), a = n(t("../abr/hls")), s = n(t("./ads-helpers")), r = n(t("../core/utils/error")); function n(t) { return t && t.__esModule ? t : { default: t } } var l = {}, d = function (t) { if (t && t.type) switch (t.type) { case google.ima.dai.api.StreamEvent.Type.STREAM_INITIALIZED: o.default.createStdEvent("adstreaminitialized", this.dom.container); break; case google.ima.dai.api.StreamEvent.Type.LOADED: 0, this.startingBitratePath = t.getStreamData().url, a.default.initFinised.call(this), o.default.createStdEvent("adloaded", this.dom.container); break; case google.ima.dai.api.StreamEvent.Type.ERROR: 0, o.default.createStdEvent("aderror", this.dom.container), this.adImaDaiBackupStream ? (this.startingBitratePath = this.adImaDaiBackupStream, a.default.initFinised.call(this)) : r.default.fatal.call(this, "IMA DAI backup stream not provided - cannot recover", 202, t); break; case google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED: this.adOnStage = !0, this.isLinear = !0, s.default.setAdUI.call(this, !0), this.dom.imaDaiClickElement.style.display = "block", o.default.createStdEvent("adbreakstarted", this.dom.container); break; case google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED: this.isLinear = !1, this.adOnStage = !1, s.default.setAdUI.call(this, !1), this.dom.imaDaiClickElement.style.display = "none", o.default.createStdEvent("adbreakended", this.dom.container); break; case google.ima.dai.api.StreamEvent.Type.AD_PROGRESS: (function (t) { if (t && "function" == typeof t.getStreamData) { var e = t.getStreamData().adProgressData, i = e.adPosition, a = e.totalAds, s = e.currentTime; this.imaDaiAdCurrentTime = s; var r = e.duration, n = Math.floor(r - s); this.adCountDown && 0 <= n && (n = o.default.readableTime(n), o.default.setText(this.dom.adCountdown, "(" + n + ")")), "number" == typeof a && 1 < a && (this.dom.adPod || (this.dom.adPod = document.createElement("span"), o.default.setClass(this.dom.adPod, "rmp-ad-info-pod"), this.dom.adCountdown ? this.dom.adInfo.insertBefore(this.dom.adPod, this.dom.adCountdown) : this.dom.adInfo.appendChild(this.dom.adPod)), "number" == typeof i && o.default.setText(this.dom.adPod, i + "/" + a)) } }).call(this, t), o.default.createStdEvent("adprogress", this.dom.container); break; case google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED: o.default.createStdEvent("adcuepointschanged", this.dom.container); break; case google.ima.dai.api.StreamEvent.Type.CLICK: this.adPauseOnClick && !this.getAdPaused() && this.pause(), o.default.createStdEvent("adclick", this.dom.container); break; case google.ima.dai.api.StreamEvent.Type.STARTED: (function (t) { if (t && (this.adCountDown && this.dom.adInfo && (this.dom.adCountdown || (this.dom.adCountdown = document.createElement("span"), o.default.setClass(this.dom.adCountdown, "rmp-ad-info-countdown"), this.dom.adInfo.appendChild(this.dom.adCountdown))), "function" == typeof t.getAd)) { var e = t.getAd(); this.adID = e.getAdId(), this.adPodInfo = e.getAdPodInfo(), this.adSystem = e.getAdSystem(), this.adAdvertiserName = e.getAdvertiserName(), this.adApiFramework = e.getApiFramework(), this.adCreativeAdId = e.getCreativeAdId(), this.adCreativeId = e.getCreativeId(), this.adDealId = e.getDealId(), this.adDescription = e.getDescription(), this.adDuration = e.getDuration(), this.adTitle = e.getTitle(), this.adWrapperAdIds = e.getWrapperAdIds(), this.adWrapperAdSystems = e.getWrapperAdSystems(), this.adWrapperCreativeIds = e.getWrapperCreativeIds(), this.currentAdForCompanion = e } }).call(this, t), o.default.createStdEvent("adstarted", this.dom.container); break; case google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE: o.default.createStdEvent("adfirstquartile", this.dom.container); break; case google.ima.dai.api.StreamEvent.Type.MIDPOINT: o.default.createStdEvent("admidpoint", this.dom.container); break; case google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE: o.default.createStdEvent("adthirdquartile", this.dom.container); break; case google.ima.dai.api.StreamEvent.Type.COMPLETE: o.default.createStdEvent("adcomplete", this.dom.container) } }, h = function () { this.adImaDaiBackupStream ? (this.startingBitratePath = this.adImaDaiBackupStream, a.default.initFinised.call(this)) : r.default.fatal.call(this, "IMA DAI backup stream not provided - cannot recover", 202, null) }; l.init = function () { var i = this; "undefined" != typeof google && void 0 !== google.ima && void 0 !== google.ima.dai ? this.adParserLoadError ? h.call(this) : (this.dom.imaDaiClickElement = document.createElement("div"), this.dom.imaDaiClickElement.className = "rmp-ima-dai-click-area", this.dom.content.appendChild(this.dom.imaDaiClickElement), this.imaDaiStreamManager = new google.ima.dai.api.StreamManager(this.dom.video), this.imaDaiStreamManager.setClickElement(this.dom.imaDaiClickElement), this.imaDaiStreamManager.addEventListener([google.ima.dai.api.StreamEvent.Type.STREAM_INITIALIZED, google.ima.dai.api.StreamEvent.Type.LOADED, google.ima.dai.api.StreamEvent.Type.ERROR, google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED, google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED, google.ima.dai.api.StreamEvent.Type.AD_PROGRESS, google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED, google.ima.dai.api.StreamEvent.Type.CLICK, google.ima.dai.api.StreamEvent.Type.STARTED, google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE, google.ima.dai.api.StreamEvent.Type.MIDPOINT, google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE, google.ima.dai.api.StreamEvent.Type.COMPLETE], d.bind(this), !1), this.hlsJS.on(Hls.Events.FRAG_PARSING_METADATA, function (t, e) { i.imaDaiStreamManager && e && e.samples.forEach(function (t) { i.imaDaiStreamManager.processMetadata("ID3", t.data, t.pts) }) }), this.imaDaiLive ? function (t, e, i, a) { var s = new google.ima.dai.api.LiveStreamRequest; s.assetKey = t, e && (s.apiKey = e), o.default.isEmptyObject(i) || (s.adTagParameters = i), a && (s.streamActivityMonitorId = a), this.imaDaiStreamManager.requestStream(s) }.call(this, this.adImaDaiLiveAssetKey, this.adImaDaiApiKey, this.adImaDaiAdTagParameters, this.adImaDaiStreamActivityMonitorId) : this.imaDaiVod && function (t, e, i, a, s) { var r = new google.ima.dai.api.VODStreamRequest; r.contentSourceId = t, r.videoId = e, i && (r.apiKey = i), o.default.isEmptyObject(a) || (r.adTagParameters = a), s && (r.streamActivityMonitorId = s), this.imaDaiStreamManager.requestStream(r) }.call(this, this.adImaDaiVodContentSourceId, this.adImaDaiVodVideoId, this.adImaDaiApiKey, this.adImaDaiAdTagParameters, this.adImaDaiStreamActivityMonitorId)) : setTimeout(function () { i.adParserLoadError ? h.call(i) : l.init.call(i) }, 100) }, i.default = l }, { "../abr/hls": 3, "../core/utils/error": 44, "../fw/fw": 53, "./ads-helpers": 6 }], 9: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a = c(t("../fw/fw")), s = c(t("../fw/env")), r = c(t("../core/ready")), n = c(t("../core/volume/volume")), o = c(t("../core/ui/core-ui")), l = c(t("../core/resize/resize")), d = c(t("./ads-helpers")), h = c(t("../../../../rmp-vast/js/src/module")); function c(t) { return t && t.__esModule ? t : { default: t } } var u = {}, f = function () { if (a.default.removeEvent("adstarted", this.dom.container, this.onRmpVastAdStarted), o.default.hideLoadingSpin.call(this), this.googleCast && this.castConnected) return this.stopAds(), void this.play(); l.default.resizeAds.call(this); var t = this.dom.container.querySelector(".rmp-ad-container"); null !== t && a.default.removeClass(t, "rmp-ad-overlay"); var e = this.getAdLinear(); if (d.default.updateVPAIDStatus.call(this, e), e) this.isVod && a.default.removeEvent("ended", this.dom.video, this.ended), d.default.udpatePlayPause.call(this), d.default.setAdUI.call(this, !0), this.adCountDown && this.dom.adInfo && d.default.addCountDown.call(this), null === this.adPodInfo && function () { if (this.adPodInfo = this.rmpVast.getAdPodInfo(), this.dom.adPod && a.default.setText(this.dom.adPod, ""), this.adPodInfo && this.dom.adInfo) { var t = this.adPodInfo.adPodLength; if ("number" == typeof t && 1 < t) { this.dom.adPod || (this.dom.adPod = document.createElement("span"), a.default.setClass(this.dom.adPod, "rmp-ad-info-pod"), this.dom.adCountdown ? this.dom.adInfo.insertBefore(this.dom.adPod, this.dom.adCountdown) : this.dom.adInfo.appendChild(this.dom.adPod)); var e = this.adPodInfo.adPodCurrentIndex; "number" == typeof e && a.default.setText(this.dom.adPod, e + 1 + "/" + t) } } }.call(this), this.muted ? n.default.setVolumeAds.call(this, 0) : n.default.setVolumeAds.call(this, this.currentVolume); else { var i = this.getAdMediaHeight(); -1 < i && i + 40 < this.height && t && a.default.addClass(t, "rmp-ad-overlay") } }; u.restoreContentUI = function () { (function () { this.rmpVast.getIsUsingContentPlayerForAds() || (a.default.removeEvent("adresumed", this.dom.container, this.onRmpVastAdPlayPause), a.default.removeEvent("adpaused", this.dom.container, this.onRmpVastAdPlayPause)), a.default.removeEvent("adstarted", this.dom.container, this.onRmpVastAdStarted), a.default.removeEvent("addestroyed", this.dom.container, this.onRmpVastAdDestroyed), a.default.removeEvent("aderror", this.dom.container, this.onRmpVastAdError), a.default.removeEvent("adinteraction", this.dom.container, this.onRmpVastAdInteraction), a.default.removeEvent("adlinearchange", this.dom.container, this.onRmpVastAdLinearChanged) }).call(this), o.default.hideLoadingSpin.call(this), d.default.setAdUI.call(this, !1), this.isVod && a.default.addEvent("ended", this.dom.video, this.ended) }; u.wireAdEvents = function () { this.rmpVast.getIsUsingContentPlayerForAds() || (this.onRmpVastAdPlayPause = function () { d.default.udpatePlayPause.call(this) }.bind(this), a.default.addEvent("adresumed", this.dom.container, this.onRmpVastAdPlayPause), a.default.addEvent("adpaused", this.dom.container, this.onRmpVastAdPlayPause)), this.onRmpVastAdStarted = f.bind(this), a.default.addEvent("adstarted", this.dom.container, this.onRmpVastAdStarted), this.onRmpVastAdDestroyed = function () { if (this.adPodInfo = this.rmpVast.getAdPodInfo(), this.adPodInfo && this.adPodInfo.adPodCurrentIndex + 1 !== this.adPodInfo.adPodLength) { var t = this.adPodInfo.adPodCurrentIndex, e = this.adPodInfo.adPodLength; return "number" == typeof t && "number" == typeof e && a.default.setText(this.dom.adPod, t + 2 + "/" + e), void a.default.addEvent("adstarted", this.dom.container, this.onRmpVastAdStarted) } if (this.adPodInfo = null, this.adErrorDetected && (this.adErrorDetected = !1, Array.isArray(this.adTagWaterfall) && "string" == typeof this.adTagWaterfall[0] && "" !== this.adTagWaterfall[0])) return this.adTagUrl = d.default.replaceAdTagVar.call(this, this.adTagWaterfall[0]), 0 < this.adTagWaterfall.length && this.adTagWaterfall.shift(), this.loadAds(this.adTagUrl), void a.default.createStdEvent("adclientsidewaterfallrequested", this.dom.container); this.adOutStream ? d.default.endedOutStreamUI.call(this) : (this.readingPDorNative && this.dom.video.addEventListener("error", this.generateError, !0), u.restoreContentUI.call(this)) }.bind(this), a.default.addEvent("addestroyed", this.dom.container, this.onRmpVastAdDestroyed), this.onRmpVastAdError = function () { var t = this.getAdErrorType(); t && ("adLoadError" === t ? a.default.createStdEvent("adloaderror", this.dom.container) : "adPlayError" === t && a.default.createStdEvent("adplayerror", this.dom.container)), this.adErrorDetected = !0 }.bind(this), a.default.addEvent("aderror", this.dom.container, this.onRmpVastAdError), this.onRmpVastAdInteraction = function () { a.default.createStdEvent("adinteraction", this.dom.container) }.bind(this), a.default.addEvent("adinteraction", this.dom.container, this.onRmpVastAdInteraction), this.onRmpVastAdLinearChanged = function () { a.default.createStdEvent("adlinearchanged", this.dom.container) }.bind(this), a.default.addEvent("adlinearchange", this.dom.container, this.onRmpVastAdLinearChanged) }; u.loadAds = function (t) { this.isVPAID = !1, o.default.showLoadingSpin.call(this), this.onAdTagStartLoading = function () { this.dom.container.removeEventListener("adtagstartloading", this.onAdTagStartLoading), this.readingPDorNative && this.dom.video.removeEventListener("error", this.generateError, !0), u.wireAdEvents.call(this) }.bind(this), this.dom.container.addEventListener("adtagstartloading", this.onAdTagStartLoading); var e = t.trim(); this.rmpVast.loadAds(e) }, u.init = function () { this.adParserLoaded = !0; var t = { ajaxTimeout: this.adLoadVastTimeout, creativeLoadTimeout: this.adLoadMediaTimeout, ajaxWithCredentials: this.adAjaxWithCredentials, maxNumRedirects: this.adMaxNumRedirects, pauseOnClick: this.adPauseOnClick, skipMessage: this.labels.ads.skipMessage, skipWaitingMessage: this.labels.ads.skipWaitingMessage, textForClickUIOnMobile: this.labels.ads.textForClickUIOnMobile, outstream: this.adOutStream }; if (this.adRmpVastEnableVpaid) { t.enableVpaid = this.adRmpVastEnableVpaid; var e = "normal"; this.isInFullscreen && (e = "fullscreen"); var i = 500; s.default.isMobile || (i = 750), t.vpaidSettings = { width: this.width, height: this.height, viewMode: e, desiredBitrate: i } } this.rmpVast = new h.default(this.id, t), d.default.createControlBarAdInfo.call(this), r.default.fire.call(this) }, u.resumeAds = function () { this.rmpVast && "function" == typeof this.rmpVast.play && this.rmpVast.play() }, u.pauseAds = function () { this.rmpVast && "function" == typeof this.rmpVast.pause && this.rmpVast.pause() }, i.default = u }, { "../../../../rmp-vast/js/src/module": 262, "../core/ready": 35, "../core/resize/resize": 36, "../core/ui/core-ui": 41, "../core/volume/volume": 48, "../fw/env": 52, "../fw/fw": 53, "./ads-helpers": 6 }], 10: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a = s(t("../fw/fw")), l = s(t("./ads-helpers")); function s(t) { return t && t.__esModule ? t : { default: t } } var r = {}, n = function () { var t = void 0; if (this.isVod) { var e = this.getCurrentTime(); -1 < e && (t = Math.round(e / 100) / 10) } else t = this.liveAdSchedulerCheckerIndex; var i = void 0, a = void 0; if (Array.isArray(this.adSchedule.midroll) && Array.isArray(this.adSchedule.midroll[0]) && (i = this.adSchedule.midroll[0][0], a = this.adSchedule.midroll[0][1], "number" == typeof i && "number" == typeof t && i < t && "string" == typeof a && "" !== a)) { if (this.adTagUrl = l.default.replaceAdTagVar.call(this, a), this.isVod) { this.dom.container.removeEventListener("timeupdate", this.adSchedulerChecker); var s = void 0, r = void 0, n = void 0; if (n = function () { this.dom.container.removeEventListener("adstarted", n), this.getAdLinear() || this.dom.container.addEventListener("timeupdate", this.adSchedulerChecker) }.bind(this), this.dom.container.addEventListener("adstarted", n), "ima" === this.adParser) s = function () { this.dom.container.removeEventListener("adstarted", n), this.dom.container.removeEventListener("aderror", r), this.dom.container.removeEventListener("adcontentresumerequested", s), this.dom.container.addEventListener("timeupdate", this.adSchedulerChecker) }.bind(this), this.dom.container.addEventListener("adcontentresumerequested", s), r = function () { this.dom.container.removeEventListener("adstarted", n), this.dom.container.removeEventListener("aderror", r), this.dom.container.removeEventListener("adcontentresumerequested", s), this.dom.container.addEventListener("timeupdate", this.adSchedulerChecker) }.bind(this), this.dom.container.addEventListener("aderror", r); else { var o = function () { this.dom.container.removeEventListener("adstarted", n), this.dom.container.removeEventListener("addestroyed", o), this.dom.container.addEventListener("timeupdate", this.adSchedulerChecker) }.bind(this); this.dom.container.addEventListener("addestroyed", o) } } this.loadAds(this.adTagUrl), this.adSchedule.midroll.shift() } }; r.destroy = function () { this.dom.container && (this.isVod && (this.dom.container.removeEventListener("timeupdate", this.adSchedulerChecker), this.dom.container.removeEventListener("ended", this.adSchedulerEnded)), this.dom.container.removeEventListener("play", this.playScheduler), this.dom.container.removeEventListener("pause", this.pauseScheduler)) }, r.init = function () { this.adScheduleInput && this.ads && (this.adSchedulerChecker = n.bind(this), this.isVod ? (this.dom.container.addEventListener("timeupdate", this.adSchedulerChecker), this.adSchedulerEnded = function () { a.default.removeEvent("ended", this.dom.container, this.adSchedulerEnded), this.adSchedule.postroll && (this.adTagUrl = l.default.replaceAdTagVar.call(this, this.adSchedule.postroll), this.loadAds(this.adTagUrl)) }.bind(this), this.dom.container.addEventListener("ended", this.adSchedulerEnded)) : (this.playScheduler = function () { var t = this; a.default.clearInterval(this.liveAdSchedulerChecker), this.liveAdSchedulerChecker = setInterval(function () { (!t.getAdOnStage() || t.getAdOnStage() && !t.getAdLinear()) && (t.liveAdSchedulerCheckerIndex++ , n.call(t)) }, 1e3) }.bind(this), this.dom.container.addEventListener("play", this.playScheduler), this.pauseScheduler = function () { a.default.clearInterval(this.liveAdSchedulerChecker) }.bind(this), this.dom.container.addEventListener("pause", this.pauseScheduler))) }, i.default = r }, { "../fw/fw": 53, "./ads-helpers": 6 }], 11: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a, s = t("../fw/fw"), h = (a = s) && a.__esModule ? a : { default: a }; var r = {}, n = function () { var t, e, i, a, s, r, n, o, l = this; if ("undefined" == typeof ga && (t = window, e = document, i = "ga", t.GoogleAnalyticsObject = i, t.ga = t.ga || function () { (t.ga.q = t.ga.q || []).push(arguments) }, t.ga.l = 1 * new Date, a = e.createElement("script"), s = e.getElementsByTagName("script")[0], a.async = 1, a.src = "https://www.google-analytics.com/analytics.js", s.parentNode.insertBefore(a, s)), "undefined" != typeof ga) { this.gaAnonymizeIp && ga("set", "anonymizeIp", !0), "" !== this.gaNamedTracker ? (ga("create", this.gaTrackingId, "auto", this.gaNamedTracker), this.gaCommand = this.gaNamedTracker + ".send") : ga("create", this.gaTrackingId, "auto"), 0 === this.gaEvents.length && (this.gaEvents = ["context", "ready", "playerstart", "error", "adimpression", "adloadererror", "aderror"]); var d = (r = this.gaEvents, n = ["context", "ready", "playerstart", "error", "adimpression", "adloadererror", "aderror", "adloaderror", "adplayerror", "enterfullscreen", "ended", "seeking", "adclick", "adclientsidewaterfallrequested"], o = [], r.forEach(function (t) { -1 < n.indexOf(t) && o.push(t) }), o); 0, d.forEach(function (t) { switch (t) { case "context": l.gaContext = !0; break; case "ready": l.logGaReady = function () { if (this.dom.container.removeEventListener("ready", this.logGaReady), ga(this.gaCommand, "event", this.gaCategory, "ready", this.gaLabel, { nonInteraction: this.gaNonInteractionEvents }), this.gaContext) { var t = this.getPlayerMode(), e = this.getStreamType(); if ("" === t || "" === e && "nosupport" !== t) return; var i = t; "nosupport" !== t && (i += "-" + e), ga(this.gaCommand, "event", this.gaCategory, i, this.gaLabel, { nonInteraction: this.gaNonInteractionEvents }) } }.bind(l), l.dom.container.addEventListener("ready", l.logGaReady); break; case "playerstart": l.logGaPlayerStart = function () { this.dom.container.removeEventListener("playing", this.logGaPlayerStart), this.dom.container.removeEventListener("adloaded", this.logGaPlayerStart), ga(this.gaCommand, "event", this.gaCategory, "playerstart", this.gaLabel, { nonInteraction: this.gaNonInteractionEvents }) }.bind(l), l.dom.container.addEventListener("playing", l.logGaPlayerStart), l.ads && l.dom.container.addEventListener("adloaded", l.logGaPlayerStart), l.logGaSrcChanged = function () { this.dom.container.removeEventListener("playing", this.logGaPlayerStart), this.dom.container.removeEventListener("adloaded", this.logGaPlayerStart), this.dom.container.addEventListener("playing", this.logGaPlayerStart), this.dom.container.addEventListener("adloaded", this.logGaPlayerStart) }.bind(l), l.dom.container.addEventListener("srcchanged", l.logGaSrcChanged); break; case "error": l.logGaError = function () { ga(this.gaCommand, "event", this.gaCategory, "error", this.gaLabel, { nonInteraction: this.gaNonInteractionEvents }) }.bind(l), l.dom.container.addEventListener("error", l.logGaError); break; case "adimpression": l.ads && (l.logGaAdImpression = function () { ga(this.gaCommand, "event", this.gaCategory, "adimpression", this.gaLabel, { nonInteraction: this.gaNonInteractionEvents }) }.bind(l), l.dom.container.addEventListener("adimpression", l.logGaAdImpression)); break; case "adloadererror": l.ads && (l.logGaAdLoaderError = function () { this.dom.container.removeEventListener("adloadererror", this.logGaAdLoaderError), ga(this.gaCommand, "event", this.gaCategory, "adloadererror", this.gaLabel, { nonInteraction: this.gaNonInteractionEvents }) }.bind(l), l.dom.container.addEventListener("adloadererror", l.logGaAdLoaderError)); break; case "aderror": l.ads && (l.logGaAdError = function () { ga(this.gaCommand, "event", this.gaCategory, "aderror", this.gaLabel, { nonInteraction: this.gaNonInteractionEvents }) }.bind(l), l.dom.container.addEventListener("aderror", l.logGaAdError)); break; case "adloaderror": l.ads && (l.logGaAdLoadError = function () { ga(this.gaCommand, "event", this.gaCategory, "adloaderror", this.gaLabel, { nonInteraction: this.gaNonInteractionEvents }) }.bind(l), l.dom.container.addEventListener("adloaderror", l.logGaAdLoadError)); break; case "adplayerror": l.ads && (l.logGaAdPlayError = function () { ga(this.gaCommand, "event", this.gaCategory, "adplayerror", this.gaLabel, { nonInteraction: this.gaNonInteractionEvents }) }.bind(l), l.dom.container.addEventListener("adplayerror", l.logGaAdPlayError)); break; case "enterfullscreen": l.logGaFullscreen = function () { ga(this.gaCommand, "event", this.gaCategory, "enterfullscreen", this.gaLabel, { nonInteraction: this.gaNonInteractionEvents }) }.bind(l), l.dom.container.addEventListener("enterfullscreen", l.logGaFullscreen); break; case "ended": l.isVod && (l.logGaEnded = function () { ga(this.gaCommand, "event", this.gaCategory, "ended", this.gaLabel, { nonInteraction: this.gaNonInteractionEvents }) }.bind(l), l.dom.container.addEventListener("ended", l.logGaEnded)); break; case "seeking": l.isVod && (l.logGaSeeking = function () { var t = this; this.isVod && !this.gaSeekingSending && (this.gaSeekingSending = !0, h.default.clearTimeout(this.logGaSeekingTimeout), this.logGaSeekingTimeout = setTimeout(function () { t.gaSeekingSending = !1 }, 400), ga(this.gaCommand, "event", this.gaCategory, "seeking", this.gaLabel, { nonInteraction: this.gaNonInteractionEvents })) }.bind(l), l.dom.container.addEventListener("seeking", l.logGaSeeking)); break; case "adclick": l.ads && (l.logGaAdClick = function () { ga(this.gaCommand, "event", this.gaCategory, "adclick", this.gaLabel, { nonInteraction: this.gaNonInteractionEvents }) }.bind(l), l.dom.container.addEventListener("adclick", l.logGaAdClick)); break; case "adclientsidewaterfallrequested": l.ads && (l.logGaAdClientSideWaterfallRequested = function () { ga(this.gaCommand, "event", this.gaCategory, "adclientsidewaterfallrequested", this.gaLabel, { nonInteraction: this.gaNonInteractionEvents }) }.bind(l), l.dom.container.addEventListener("adclientsidewaterfallrequested", l.logGaAdClientSideWaterfallRequested)) } }) } }; r.reset = function () { h.default.clearInterval(this.analyticsInterval), this.dom.container && (this.dom.container.removeEventListener("playing", this.analyticsPlay), this.dom.container.removeEventListener("pause", this.analyticsPause), this.dom.container.removeEventListener("waiting", this.analyticsPause), this.dom.container.removeEventListener("ready", this.logGaReady), this.dom.container.removeEventListener("playing", this.logGaPlayerStart), this.dom.container.removeEventListener("srcchanged", this.logGaSrcChanged), this.dom.container.removeEventListener("error", this.logGaError), this.ads && (this.dom.container.removeEventListener("adloaded", this.logGaPlayerStart), this.dom.container.removeEventListener("adimpression", this.logGaAdImpression), this.dom.container.removeEventListener("adloadererror", this.logGaAdLoaderError), this.dom.container.removeEventListener("aderror", this.logGaAdError), this.dom.container.removeEventListener("adloaderror", this.logGaAdLoadError), this.dom.container.removeEventListener("adplayerror", this.logGaAdPlayError), this.dom.container.removeEventListener("adclick", this.logGaAdClick), this.dom.container.removeEventListener("adclientsidewaterfallrequested", this.logGaAdClientSideWaterfallRequested)), this.dom.container.removeEventListener("enterfullscreen", this.logGaFullscreen), this.isVod && (this.dom.container.removeEventListener("ended", this.logGaEnded), this.dom.container.removeEventListener("seeking", this.logGaSeeking)), this.heatMap && this.dom.container.removeEventListener("timeupdate", this.updateHeatMap)) }, r.init = function () { if (this.analyticsPlay = function () { var t = this; h.default.clearInterval(this.analyticsInterval), this.analyticsInterval = setInterval(function () { t.changingSrc || t.getAdOnStage() && t.getAdLinear() || (t.analyticsSecondsPlayed = t.analyticsSecondsPlayed + .25) }, 250) }.bind(this), this.dom.container.addEventListener("playing", this.analyticsPlay), this.analyticsPause = function () { h.default.clearInterval(this.analyticsInterval) }.bind(this), this.dom.container.addEventListener("pause", this.analyticsPause), this.dom.container.addEventListener("waiting", this.analyticsPause), "" !== this.gaTrackingId && n.call(this), this.isVod && this.heatMap) { 100 < this.heatMapAccuracy ? this.heatMapAccuracy = 100 : this.heatMapAccuracy < 1 && (this.heatMapAccuracy = 1); for (var t = 0; t < this.heatMapAccuracy; t++)this.heatMapArray[t] = 0; this.updateHeatMap = function () { var t = this.getDuration(), e = this.getCurrentTime(); if (-1 < e && -1 < t) for (var i = 100 * e / t, a = 100 / this.heatMapAccuracy, s = 0; s < this.heatMapAccuracy; s++)s * a <= i && i < (s + 1) * a && (this.heatMapArray[s] = this.heatMapArray[s] + 1) }.bind(this), this.dom.container.addEventListener("timeupdate", this.updateHeatMap) } }, i.default = r }, { "../fw/fw": 53 }], 12: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var s = a(t("../fw/env")), r = a(t("../fw/fw")); function a(t) { return t && t.__esModule ? t : { default: t } } var n = {}, o = "https://www.rmp-data.com/ls/increment.php", l = ["a2VpdWR5dHNobEAxNDg4ODkxNTQy", "dW9wY2N0dmtpZ0AxNDkxMzg5"], d = function (t) { var e = t.match(/(http:\/\/|https:\/\/|\/\/)/i), i = void 0; if ("string" == typeof e[1] && "" !== e[1]) { var a = e[1], s = t.split(a); if ("string" == typeof s[1] && "" !== s[1]) { var r = s[1].split("/"); "string" == typeof r[0] && "" !== r[0] && (i = r[0]) } } return i && /^.+\..+$/i.test(i) ? i : null }, h = function (a, s, r) { return new Promise(function (t, e) { if ("undefined" != typeof XMLHttpRequest) { var i = new XMLHttpRequest; i.open("POST", s, !0), i.timeout = r, i.onloadend = function () { "number" == typeof i.status && 200 <= i.status && i.status < 300 ? t() : e() }, i.ontimeout = function () { e() }, i.send(a) } else e() }) }, c = function () { var t = 0; if ("plus" === this.licType && s.default.localStorage(this.allowLocalStorage)) { var e = window.localStorage.getItem("rmpBacklog"); null !== e && (e = JSON.parse(e)).value && (t = parseInt(e.value)) } return t }, u = function () { var t = this; if (s.default.isOnline()) { if (s.default.formData()) { 0; var e = new FormData; if (e.append("licType", this.licType), e.append("licenseKey", this.licenseKey), "file:" === s.default.getProtocol) { var i = "app"; this.appName && (i = i + "." + this.appName.replace(/\s/g, "-").toLowerCase()), e.append("hostname", i) } else s.default.isInIframe && -1 < l.indexOf(this.licenseKey) && "string" == typeof document.referrer && "" !== document.referrer && null !== d(document.referrer) ? e.append("hostname", d(document.referrer)) : e.append("hostname", this.ragnarok); e.append("version", this.playerVersion), e.append("cs", function (t) { var e = t.split("."); if (3 === e.length) { var i = parseInt(e[0]) + parseInt(e[1]) + parseInt(e[2]), a = [89, 251, 307, 523, 907, 1171, 1423], s = Math.floor(Math.random() * a.length); if ("number" == typeof a[s]) return i * a[s] } return 0 }(this.playerVersion)), h(e, o, this.ajaxInternalTimeout).then(function () { 0 }).catch(function () { r.default.clearTimeout(t.logRetryTimeout), t.logRetryTimeout = setTimeout(function () { h(e, o, t.ajaxInternalTimeout).then(function () { 0 }).catch(function () { 0 }) }, 1e4) }) } } else { var a = c.call(this); try { window.localStorage.setItem("rmpBacklog", JSON.stringify({ value: (a + 1).toString() })) } catch (t) { r.default.trace(t) } } }; n.destroy = function () { this.dom.container && (this.dom.container.removeEventListener("srcchanged", this.runLogsOnSrcChanged), this.dom.container.removeEventListener("playing", this.runLogs), this.dom.container.removeEventListener("adloaded", this.runLogs)) }, n.init = function () { if (this.ragnarok !== this.originLocal && this.ragnarok !== this.altLocal) { var t = Math.floor(10 * Math.random() + 1); if ("plus" === this.licType && (4 === t || 5 === t) || 5 === t) { this.runLogs = function () { n.destroy.call(this), this.dom.container.addEventListener("srcchanged", this.runLogsOnSrcChanged), this.appendFormDataAndSendLog() }.bind(this), this.runLogsOnSrcChanged = function () { this.dom.container.removeEventListener("srcchanged", this.runLogsOnSrcChanged), this.dom.container.addEventListener("playing", this.runLogs), this.dom.container.addEventListener("adloaded", this.runLogs) }.bind(this), this.appendFormDataAndSendLog = u.bind(this), this.dom.container.addEventListener("playing", this.runLogs), this.dom.container.addEventListener("adloaded", this.runLogs); var e = c.call(this); if ("plus" === this.licType && 0 < e && s.default.isOnline()) { for (var i = 0; i < e; i++)this.appendFormDataAndSendLog(); if (s.default.localStorage(this.allowLocalStorage)) try { window.localStorage.setItem("rmpBacklog", JSON.stringify({ value: "0" })) } catch (t) { r.default.trace(t) } } } } }, i.default = n }, { "../fw/env": 52, "../fw/fw": 53 }], 13: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a, s = t("../fw/fw"), r = (a = s) && a.__esModule ? a : { default: a }; var n = { destroy: function () { this.dom.container.removeEventListener("error", this.onHlsjsErrorEmitMuxError), window.mux.removeHLSJS("#" + this.id + " .rmp-video") }, detect: function () { void 0 === window.mux || r.default.isEmptyObject(this.muxDataSettings) || r.default.isEmptyObject(this.muxDataSettings.data) || "string" != typeof this.muxDataSettings.data.env_key || "" === this.muxDataSettings.data.env_key || (this.muxData = !0, this.muxDataSettings.data.player_init_time = Date.now(), this.muxDataSettings.data.player_name = "radiantmediaplayer", this.muxDataSettings.data.player_version = this.playerVersion) } }; n.initHlsJS = function () { this.muxDataHlsJSMonitored = !0; var t = {}; t.hlsjs = this.hlsJS, t.Hls = window.Hls, this.onHlsjsErrorEmitMuxError = function () { window.mux.emit("#" + this.id + " .rmp-video", "error", { player_error_code: this.errorData.code, player_error_message: this.errorData.message }) }.bind(this), this.dom.container.addEventListener("error", this.onHlsjsErrorEmitMuxError), window.mux.addHLSJS("#" + this.id + " .rmp-video", t) }, n.initHTML5 = function () { window.mux.monitor("#" + this.id + " .rmp-video", this.muxDataSettings) }, i.default = n }, { "../fw/fw": 53 }], 14: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a = o(t("../fw/fw")), s = o(t("../ads/ima-ads")), r = o(t("../ads/rmp-vast")), n = o(t("../ads/ads-helpers")); function o(t) { return t && t.__esModule ? t : { default: t } } var l = {}; l.attach = function (t) { t.prototype.getAdLinear = function () { if (this.getAdOnStage()) { if ("ima" === this.adParser) return this.isLinear; if ("rmp-vast" === this.adParser && this.rmpVast) return this.rmpVast.getAdLinear() } return !1 }, t.prototype.getAdSystem = function () { if (this.getAdOnStage()) { if ("ima" === this.adParser && "string" == typeof this.adSystem) return this.adSystem; if ("rmp-vast" === this.adParser && this.rmpVast) return this.rmpVast.getAdSystem() } return "" }, t.prototype.getAdContentType = function () { if (this.getAdOnStage()) { if ("ima" === this.adParser && "string" == typeof this.adContentType) return this.adContentType; if ("rmp-vast" === this.adParser && this.rmpVast) return this.rmpVast.getAdContentType() } return "" }, t.prototype.getAdTitle = function () { if (this.getAdOnStage()) { if ("ima" === this.adParser && "string" == typeof this.adTitle) return this.adTitle; if ("rmp-vast" === this.adParser && this.rmpVast) return this.rmpVast.getAdTitle() } return "" }, t.prototype.getAdDescription = function () { if (this.getAdOnStage()) { if ("ima" === this.adParser && "string" == typeof this.adDescription) return this.adDescription; if ("rmp-vast" === this.adParser && this.rmpVast) return this.rmpVast.getAdDescription() } return "" }, t.prototype.getAdMediaUrl = function () { if (this.getAdOnStage()) { if ("ima" === this.adParser && "string" == typeof this.adMediaUrl) return this.adMediaUrl; if ("rmp-vast" === this.adParser && this.rmpVast) return this.rmpVast.getAdMediaUrl() } return "" }, t.prototype.getAdMediaHeight = function () { if (this.getAdOnStage()) if ("ima" === this.adParser) { var t = void 0; if ("number" == typeof (t = this.getAdLinear() ? this.getPlayerHeight() : this.adNonLinearHeight)) return t } else if ("rmp-vast" === this.adParser && this.rmpVast) return this.rmpVast.getAdMediaHeight(); return -1 }, t.prototype.getAdMediaWidth = function () { if (this.getAdOnStage()) if ("ima" === this.adParser) { var t = void 0; if ("number" == typeof (t = this.getAdLinear() ? this.getPlayerWidth() : this.adNonLinearWidth)) return t } else if ("rmp-vast" === this.adParser && this.rmpVast) return this.rmpVast.getAdMediaWidth(); return -1 }, t.prototype.getAdCurrentTime = function () { if (this.getAdOnStage() && this.getAdLinear()) if ("ima" === this.adParser) if (this.adImaDai) { if (0 <= this.imaDaiAdCurrentTime) return Math.round(1e3 * this.imaDaiAdCurrentTime) } else { var t = this.getAdDuration(), e = this.adsManager.getRemainingTime(); if (a.default.isNumber(e) && 0 <= e && 0 <= t) return Math.round(t - 1e3 * e) } else if ("rmp-vast" === this.adParser && this.rmpVast) return this.rmpVast.getAdCurrentTime(); return -1 }, t.prototype.getAdDuration = function () { if (this.getAdOnStage() && this.getAdLinear()) { if ("ima" === this.adParser && a.default.isNumber(this.adDuration) && 0 <= this.adDuration) return 1e3 * this.adDuration; if ("rmp-vast" === this.adParser && this.rmpVast) return this.rmpVast.getAdDuration() } return -1 }, t.prototype.getAdOnStage = function () { if (this.ads && this.get5Ready()) { if ("ima" === this.adParser) return this.adOnStage; if ("rmp-vast" === this.adParser && this.rmpVast) return this.rmpVast.getAdOnStage() } return !1 }, t.prototype.getAdPaused = function () { if (this.getAdOnStage() && this.getAdLinear()) { if ("ima" === this.adParser) return this.adImaDai ? this.getPaused() : this.adPaused; if ("rmp-vast" === this.adParser && this.rmpVast) return this.rmpVast.getAdPaused() } return !1 }, t.prototype.getAdTagUrl = function () { if (this.ads && this.get5Ready()) { if (this.adScheduleInput && this.adSchedule.preroll && !this.getPlayerInitialized()) return n.default.replaceAdTagVar.call(this, this.adSchedule.preroll); if ("" !== this.adTagUrl) return this.adTagUrl } return "" }; t.prototype.loadAds = function (t) { var e = this; if (this.ads && this.get5Ready()) { if ("string" != typeof t) return void 0; if (this.googleCast && this.castConnected) return void 0; if (this.adTagUrl = n.default.replaceAdTagVar.call(this, t), this.adTagUrl = this.adTagUrl.trim(), "ima" === this.adParser) { if (!this.adDCInitialized) return; this.onContentResumeRequestedLoadAds = function () { this.dom.container.removeEventListener("adcontentresumerequested", this.onContentResumeRequestedLoadAds), s.default.resetAdsForNewRequest.call(this), s.default.requestAds.call(this, this.adTagUrl) }.bind(this), this.getAdOnStage() && this.getAdLinear() ? (this.dom.container.addEventListener("adcontentresumerequested", this.onContentResumeRequestedLoadAds), this.stopAds()) : this.onContentResumeRequestedLoadAds() } else if ("rmp-vast" === this.adParser && this.rmpVast) { if (!this.rmpVast.getInitialized()) return; r.default.restoreContentUI.call(this), setTimeout(function () { r.default.loadAds.call(e, e.adTagUrl) }, 1) } } }, t.prototype.stopAds = function () { if (this.ads && this.get5Ready()) if ("ima" === this.adParser) { if (this.adsManager) { this.adOnStage = !1; try { this.adsManager.stop() } catch (t) { a.default.trace(t) } } } else "rmp-vast" === this.adParser && this.rmpVast && (this.rmpVast.stopAds(), r.default.restoreContentUI.call(this)) }, t.prototype.getAdUI = function () { return this.hasAdUI }, t.prototype.setAdUI = function (t) { "boolean" == typeof t && this.get5Ready() && n.default.setAdUI.call(this, t) }, t.prototype.getAdErrorMessage = function () { if (this.get5Ready()) { if ("ima" === this.adParser && this.adErrorMessage) return this.adErrorMessage; if ("rmp-vast" === this.adParser && this.rmpVast) return this.rmpVast.getAdErrorMessage() } return "" }, t.prototype.getAdVastErrorCode = function () { if (this.get5Ready()) { if ("ima" === this.adParser && a.default.isNumber(this.adVastErrorCode)) return this.adVastErrorCode; if ("rmp-vast" === this.adParser && this.rmpVast) return this.rmpVast.getAdVastErrorCode() } return -1 }, t.prototype.getAdErrorType = function () { if (this.get5Ready()) { if ("ima" === this.adParser && this.adErrorType) return this.adErrorType; if ("rmp-vast" === this.adParser && this.rmpVast) return this.rmpVast.getAdErrorType() } return "" }, t.prototype.getAdPodInfo = function () { if (this.getAdOnStage()) { if ("ima" === this.adParser && a.default.isObject(this.adPodInfo)) return this.adPodInfo; if ("rmp-vast" === this.adParser) return this.rmpVast.getAdPodInfo() } return null }, t.prototype.getAdID = function () { return this.getAdOnStage() && "string" == typeof this.adID ? this.adID : "" }, t.prototype.getAdCreativeAdId = function () { return this.getAdOnStage() && "string" == typeof this.adCreativeAdId ? this.adCreativeAdId : "" }, t.prototype.getAdCreativeId = function () { return this.getAdOnStage() && "string" == typeof this.adCreativeId ? this.adCreativeId : "" }, t.prototype.getAdDealId = function () { return this.getAdOnStage() && "string" == typeof this.adDealId ? this.adDealId : "" }, t.prototype.getAdSurveyUrl = function () { return this.getAdOnStage() && "string" == typeof this.adSurveyUrl ? this.adSurveyUrl : "" }, t.prototype.getAdUniversalAdIdRegistry = function () { return this.getAdOnStage() && "string" == typeof this.adUniversalAdIdRegistry ? this.adUniversalAdIdRegistry : "" }, t.prototype.getAdUniversalAdIdValue = function () { return this.getAdOnStage() && "string" == typeof this.adUniversalAdIdValue ? this.adUniversalAdIdValue : "" }, t.prototype.getAdvertiserName = function () { return this.getAdOnStage() && "string" == typeof this.adAdvertiserName ? this.adAdvertiserName : "" }, t.prototype.getAdApiFramework = function () { return this.getAdOnStage() && "string" == typeof this.adApiFramework ? this.adApiFramework : "" }, t.prototype.getAdTraffickingParameters = function () { return this.getAdOnStage() && a.default.isObject(this.adTraffickingParameters) ? this.adTraffickingParameters : null }, t.prototype.getAdTraffickingParametersString = function () { return this.getAdOnStage() && "string" == typeof this.adTraffickingParametersString ? this.adTraffickingParametersString : "" }, t.prototype.getAdWrapperAdIds = function () { return this.getAdOnStage() && Array.isArray(this.adWrapperAdIds) ? this.adWrapperAdIds : null }, t.prototype.getAdWrapperAdSystems = function () { return this.getAdOnStage() && Array.isArray(this.adWrapperAdSystems) ? this.adWrapperAdSystems : null }, t.prototype.getAdWrapperCreativeIds = function () { return this.getAdOnStage() && Array.isArray(this.adWrapperCreativeIds) ? this.adWrapperCreativeIds : null }, t.prototype.getCompanionAds = function (t, e, i) { if (this.ads && this.get5Ready() && "ima" === this.adParser) if (this.adImaDai) { if ("function" == typeof this.currentAdForCompanion.getCompanionAds) return this.currentAdForCompanion.getCompanionAds() } else { var a = this.currentAdForCompanion.getCompanionAds(t, e, i); if (Array.isArray(a) && 0 < a.length) return a } return null }, t.prototype.getAdErrorCode = function () { return a.default.isNumber(this.adErrorCode) ? this.adErrorCode : -1 }, t.prototype.getAdParser = function () { return this.adParser }, t.prototype.getAdParserBlocked = function () { return this.adParserLoadError }, t.prototype.getAdBlockerDetected = function () { return "boolean" == typeof window.rmpGlobals.adBlockerDetected && window.rmpGlobals.adBlockerDetected }, t.prototype.isVpaidCreative = function () { return this.isVPAID } }, i.default = l }, { "../ads/ads-helpers": 6, "../ads/ima-ads": 7, "../ads/rmp-vast": 9, "../fw/fw": 53 }], 15: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var s = E(t("../fw/fw")), a = E(t("../fw/env")), r = E(t("../fw/defaults/input-defaults")), n = E(t("../core/volume/volume")), o = E(t("../core/resize/resize")), l = E(t("../ads/ima-ads")), d = E(t("../ads/rmp-vast")), h = E(t("../core/ui/core-ui")), c = E(t("../core/ui/logo")), u = E(t("../playlist/playlist")), f = E(t("../playlist/related")), p = E(t("../core/dvr/dvr")), m = E(t("../core/seek/seek")), v = E(t("../360/360")), g = E(t("../cast/cast")), y = E(t("../vtt/captions")), b = E(t("../vtt/thumbnails")), S = E(t("../core/modules/modules")); function E(t) { return t && t.__esModule ? t : { default: t } } var A = {}; A.attach = function (t) { t.prototype.getReady = function () { return this.playerReady }, t.prototype.get5Ready = function () { return this.isHTML5 && this.playerReady }, t.prototype.getEnvironment = function () { return a.default }, t.prototype.getFramework = function () { return s.default }, t.prototype.getPlayerSettings = function () { return r.default }, t.prototype.isStandalone = function () { return a.default.isStandalone }, t.prototype.isWebView = function () { return a.default.isWebView }, t.prototype.getPlayerVersion = function () { return this.playerVersion }, t.prototype.getAutoplayRequested = function () { return !!this.getReady() && this.autoplay }, t.prototype.getPreload = function () { return this.getReady() ? this.preload : "" }, t.prototype.getPaused = function () { if (this.get5Ready()) { if (g.default.castingAPIAvailable.call(this)) return this.remotePlayer.isPaused; if ("boolean" == typeof this.dom.video.paused) return this.dom.video.paused } return !1 }, t.prototype.getCurrentTime = function () { if (this.isLive) return -1; if (this.isLiveDvr) return this.dvrLiveMode ? -1 : 0 <= this.dvrCurrentTime ? 1e3 * this.dvrCurrentTime : -1; if (this.get5Ready() && g.default.castingAPIAvailable.call(this)) return g.default.getCurrentTime.call(this); if (this.getAdOnStage() && this.getAdLinear() && (a.default.isIos[0] || "rmp-vast" === this.adParser && a.default.isMacosSafari[0])) return -1; var t = s.default.getMediaCurrentTime(this.dom.video); return 0 <= t ? Math.round(1e3 * t) : -1 }, t.prototype.getDuration = function () { if (this.isLive) return -1; if (this.isLiveDvr) return 0 <= this.hlsJSLevelDuration ? Math.round(1e3 * this.hlsJSLevelDuration) : -1; if (this.get5Ready() && g.default.castingAPIAvailable.call(this)) return g.default.getDuration.call(this); if (this.getAdOnStage() && this.getAdLinear() && (a.default.isIos[0] || "rmp-vast" === this.adParser && a.default.isMacosSafari[0])) return -1; var t = s.default.getMediaDuration(this.dom.video); return 0 <= t ? Math.round(1e3 * t) : -1 }, t.prototype.getPlayerMode = function () { return this.playerReady ? this.isHTML5 ? "html5" : "nosupport" : "" }, t.prototype.getStreamType = function () { var t = ""; return this.get5Ready() && (this.readingDash ? t = "dash" : this.readingHlsHevc ? t = "hlsHevc" : this.readingHlsJS || this.readingHls || this.readingHlsShaka ? t = "hls" : this.readingMp4Hevc && this.readingMp4 ? t = "mp4Hevc" : this.readingMp4 && !this.readingWebM ? t = "mp4" : this.readingMp4 && this.readingWebM ? t = "webm" : this.readingM4a ? t = "m4a" : this.readingMp3 ? t = "mp3" : this.readingOgg ? t = "ogg" : this.readingOutstream && (t = "outstream")), t }, t.prototype.getBufferLength = function (t) { if ("string" != typeof t || "behind" !== t && "ahead" !== t) return -1; if (this.get5Ready()) { var e = this.getCurrentTime(); if (-1 < e && void 0 !== this.dom.video.buffered && "function" == typeof this.dom.video.buffered.start && "function" == typeof this.dom.video.buffered.end) { for (var i = this.dom.video.buffered, a = 0; a < i.length; ++a) { var s = 1e3 * i.start(a), r = 1e3 * i.end(a); if (s <= e && e <= r) return "behind" === t ? Math.round(e - s) : Math.round(r - e) } return -1 } } return -1 }, t.prototype.getLoop = function () { return !(!this.get5Ready() || "boolean" != typeof this.dom.video.loop) && this.dom.video.loop }, t.prototype.setLoop = function (t) { !this.isVod || this.ads && a.default.isIos[0] || "boolean" == typeof t && this.dom.video && (this.dom.video.loop = t) }, t.prototype.getControls = function () { return !!this.get5Ready() && this.controls }, t.prototype.setControls = function (t) { "boolean" == typeof t && this.get5Ready() && (t ? h.default.protoShowControls.call(this) : h.default.protoHideControls.call(this)) }, t.prototype.getControlsVisible = function () { if (this.get5Ready() && !this.hideControls) { if (s.default.hasClass(this.dom.container, "rmp-chrome")) return !0; if (s.default.hasClass(this.dom.container, "rmp-no-chrome")) return !1 } return !1 }, t.prototype.setControlsVisible = function (t) { "boolean" == typeof t && this.get5Ready() && !this.hideControls && (t ? h.default.showChrome.call(this) : h.default.hideChrome.call(this)) }, t.prototype.getFullscreen = function () { return !!this.get5Ready() && this.isInFullscreen }, t.prototype.setFullscreen = function (t) { if (this.get5Ready() && "boolean" == typeof t) { var e = this.getFullscreen(); if (e && t || !e && !t) return; o.default.fullscreenInteraction.call(this) } }, t.prototype.play = function () { if (this.get5Ready()) { if (g.default.castingAPIAvailable.call(this)) return void (this.remotePlayer.isPaused && this.remotePlayerController.playOrPause()); this.getAdOnStage() && this.getAdLinear() ? "ima" === this.adParser ? l.default.resumeAds.call(this) : d.default.resumeAds.call(this) : this.getPaused() && this.initiatePlayback() } }, t.prototype.pause = function () { if (this.get5Ready()) { if (g.default.castingAPIAvailable.call(this)) return void (this.remotePlayer.isPaused || this.remotePlayerController.playOrPause()); this.getAdOnStage() && this.getAdLinear() && !this.adImaDai ? "ima" === this.adParser ? l.default.pauseAds.call(this) : d.default.pauseAds.call(this) : this.getPaused() || this.initiatePlayback() } }; t.prototype.stop = function () { if (this.get5Ready()) { if (g.default.castingAPIAvailable.call(this)) return this.remotePlayer.isPaused || this.remotePlayerController.playOrPause(), this.isVod && (this.remotePlayer.currentTime = 0, this.remotePlayerController.seek(), this.dom.current.style.width = 0, this.dom.handle.style.left = 0, this.dom.timeElapsedText.textContent = "00:00"), void s.default.createStdEvent("stopcompleted", this.dom.container); null === this.postStop && (this.postStop = function () { this.ads && null !== this.postStop && ("ima" === this.adParser ? this.dom.container.removeEventListener("adalladscompleted", this.postStop) : "rmp-vast" === this.adParser && this.rmpVast && this.dom.container.removeEventListener("addestroyed", this.postStop)), this.getPaused() || this.pause(), this.isVod && this.seekTo(0), this.showPoster(), s.default.createStdEvent("stopcompleted", this.dom.container) }.bind(this)), this.getAdOnStage() ? "ima" === this.adParser ? this.getAdLinear() ? (this.dom.container.addEventListener("adalladscompleted", this.postStop), this.stopAds()) : (this.stopAds(), this.postStop()) : "rmp-vast" === this.adParser && this.rmpVast && (this.dom.container.addEventListener("addestroyed", this.postStop), this.stopAds()) : this.postStop() } }, t.prototype.seekTo = function (t) { if (this.get5Ready()) { if (!s.default.isNumber(t)) return void 0; if (this.isLive) return void 0; if (this.isLiveDvr) return void 0; if (this.getAdOnStage() && this.getAdLinear()) return void 0; if (0 <= t) { var e = Math.round(t / 1e3 * 100) / 100; if (g.default.castingAPIAvailable.call(this)) return this.remotePlayer.currentTime = e, void this.remotePlayerController.seek(); s.default.setMediaCurrentTime(this.dom.video, e) } } }, t.prototype.dvrSeekTo = function (t) { if (this.isLiveDvr && this.get5Ready()) { if (!s.default.isNumber(t)) return void 0; if (this.getAdOnStage() && this.getAdLinear()) return void 0; 0, t < 1e4 && (t = 1e4); var e = t / this.getDuration(); if (1 <= e) return; m.default.do.call(this, e) } }, t.prototype.dvrJumpToLive = function () { this.isLiveDvr && this.get5Ready() && p.default.setLiveMode.call(this, null) }, t.prototype.dvrIsLive = function () { return !(!this.get5Ready() || !this.isLiveDvr) && this.dvrLiveMode }, t.prototype.getVolume = function () { if (this.get5Ready()) { if (g.default.castingAPIAvailable.call(this)) return this.remotePlayer.volumeLevel; var t = void 0; if (t = this.getAdOnStage() && this.getAdLinear() ? n.default.getVolumeAds.call(this) : this.dom.video.volume, s.default.isNumber(t) && -2 !== t) return t } return -1 }, t.prototype.setVolume = function (t) { if (s.default.isNumber(t) && this.get5Ready()) { var e = void 0; if (e = t < 0 ? 0 : 1 < t ? 1 : t, this.currentVolume = e, this.getMute() && this.setMute(!1), g.default.castingAPIAvailable.call(this)) return this.remotePlayer.volumeLevel = this.currentVolume, this.remotePlayerController.setVolumeLevel(), void n.default.change.call(this); this.dom.video.volume = this.currentVolume, this.getAdOnStage() && this.getAdLinear() && n.default.setVolumeAds.call(this, this.currentVolume) } }, t.prototype.getMute = function () { return !!this.playerReady && (g.default.castingAPIAvailable.call(this) ? this.remotePlayer.isMuted : this.muted) }, t.prototype.setMute = function (t) { this.get5Ready() && (t ? n.default.protoMute.call(this) : n.default.protoUnmute.call(this)) }, t.prototype.getPlaybackRate = function () { return this.dom.video && "number" == typeof this.dom.video.playbackRate ? this.dom.video.playbackRate : -1 }, t.prototype.setPlaybackRate = function (t) { if (this.get5Ready()) { if (!s.default.isNumber(t)) return void 0; var e = this.getPaused(); !e && a.default.isIos[0] && this.pause(), this.dom.video.playbackRate = t, !e && a.default.isIos[0] && this.play() } }, t.prototype.getContentTitle = function () { return this.contentTitle }, t.prototype.setContentTitle = function (t) { if ("string" == typeof t && (this.contentTitle = t), this.dom.container && this.dom.container.setAttribute("aria-label", this.contentTitle), this.sharing) { var e = this.labels.hint.sharing + " " + this.uiSeparator + " " + this.contentTitle; s.default.setText(this.dom.sharingTitleWrapper, e) } s.default.setText(this.dom.contentTitle, this.contentTitle) }, t.prototype.getContentDescription = function () { return this.contentDescription }, t.prototype.setContentDescription = function (t) { "string" == typeof title && (this.contentDescription = t), s.default.setText(this.dom.contentDescription, this.contentDescription) }, t.prototype.getContentID = function () { return this.contentID }, t.prototype.setContentID = function (t) { "string" == typeof t && (this.contentID = t) }, t.prototype.getVideoTitle = function () { return this.videoTitle }, t.prototype.setVideoTitle = function (t) { this.useVideoTitle && "string" == typeof t && (this.videoTitle = t, this.dom.video && this.dom.video.setAttribute("title", this.videoTitle)) }, t.prototype.getAppName = function () { return this.appName }, t.prototype.showCaptions = function (t) { "string" == typeof t && this.get5Ready() && y.default.menuItemInteraction.call(this, t) }, t.prototype.hideCaptions = function () { this.get5Ready() && y.default.menuItemInteraction.call(this, "off") }, t.prototype.getCCVisibleLanguage = function () { if (this.get5Ready() && this.dom.captionsOverlayLevelsArea) for (var t = this.dom.captionsOverlayLevelsArea.querySelectorAll(".rmp-overlay-level"), e = 0, i = t.length; e < i; e++) { var a = t[e]; if (s.default.hasClass(a, "rmp-overlay-level-active")) return a.getAttribute("lang") } return "" }, t.prototype.getCaptionsData = function () { return this.get5Ready() ? y.default.getData.call(this) : null }, t.prototype.getCaptionsList = function () { return this.get5Ready() && this.hasCC && this.ccFilesReady ? this.loadedCCFiles : null }, t.prototype.setCaptionsList = function (t) { this.get5Ready() && s.default.isValidTextTracksSet(t) && (this.ccFiles = t, this.hasCC || y.default.prepare.call(this), y.default.destroy.call(this), y.default.initVttJS.call(this)) }, t.prototype.getPoster = function () { return this.playerReady ? this.poster : "" }, t.prototype.setPoster = function (t) { "string" == typeof t && this.dom.posterImg && (this.dom.posterImg.removeEventListener("load", this.onPosterLoad), this.dom.posterImg.removeEventListener("error", this.onPosterError), this.dom.posterImg.addEventListener("load", this.onPosterLoad), this.dom.posterImg.addEventListener("error", this.onPosterError), this.poster = t, this.dom.posterImg.src = this.poster) }, t.prototype.showPoster = function () { this.get5Ready() && s.default.show(this.dom.poster) }, t.prototype.hidePoster = function () { this.get5Ready() && s.default.hide(this.dom.poster) }, t.prototype.resize = function () { this.playerReady && o.default.resize.call(this) }, t.prototype.getPlayerWidth = function () { return s.default.getWidth(this.dom.container) }, t.prototype.getPlayerHeight = function () { return s.default.getHeight(this.dom.container) }, t.prototype.setPlayerSize = function (t, e) { if (!("number" != typeof t || t <= 0 || "number" != typeof e || e <= 0) && (!this.isInFullscreen || this.fullWindowMode) && !this.iframeMode && !this.autoHeightMode && this.playerReady) { this.width = t, this.height = e, this.audioOnly && (this.height = 40); var i = { width: t + "px", height: e + "px" }; s.default.setStyle(this.dom.container, i), o.default.auxResize.call(this, t) } }, t.prototype.getPlayerInitialized = function () { return this.playerInitialized }, t.prototype.getTimeViewed = function () { return this.get5Ready() && s.default.isNumber(this.analyticsSecondsPlayed) ? Math.round(1e3 * this.analyticsSecondsPlayed) : -1 }, t.prototype.getPercentViewed = function () { if (this.get5Ready() && this.isVod && s.default.isNumber(this.analyticsSecondsPlayed)) { var t = this.getDuration(); if (-1 < t) return Math.round(1e3 * this.analyticsSecondsPlayed * 100 / t) } return -1 }, t.prototype.getTimeReady = function () { return this.playerReady && s.default.isNumber(this.timeReady) && 0 < this.timeReady ? this.timeReady : -1 }, t.prototype.getStartUpTime = function () { return this.get5Ready() ? this.startUpTime : -1 }, t.prototype.getRawHeatMap = function () { return this.get5Ready() && this.isVod && this.heatMap ? this.heatMapArray : null }, t.prototype.getGALabel = function () { return "string" == typeof this.gaLabel && "" !== this.gaLabel ? this.gaLabel : "" }, t.prototype.setGALabel = function (t) { "string" == typeof t && "" !== t && (this.gaLabel = t) }, t.prototype.getGACategory = function () { return "string" == typeof this.gaCategory && "" !== this.gaCategory ? this.gaCategory : "" }, t.prototype.setGACategory = function (t) { "string" == typeof t && "" !== t && (this.gaCategory = t) }, t.prototype.sendGAEvent = function (t) { this.get5Ready() && "undefined" != typeof ga && "string" == typeof t && "" !== t && ga(this.gaCommand, "event", this.gaCategory, t, this.gaLabel, { nonInteraction: this.gaNonInteractionEvents }) }, t.prototype.getLogo = function () { if (this.logoAppended) { var t = ""; "" !== this.logo && (t = this.logo); var e = ""; return "" !== this.logoLoc && (e = this.logoLoc), { img: t, loc: e } } return null }, t.prototype.setLogo = function (t) { if (!s.default.isEmptyObject(t) && "string" == typeof t.img) { if ("string" == typeof t.loc && (this.logoLoc = t.loc), this.logo = t.img, "" === this.logo) return void (this.logoAppended && s.default.hide(this.dom.logoImg)); s.default.show(this.dom.logoImg), this.logoAppended ? c.default.update.call(this) : (c.default.init.call(this), c.default.append.call(this)) } }, t.prototype.getThumbnails = function () { return this.seekBarThumbnailsLoc }, t.prototype.setThumbnails = function (t) { "string" == typeof t && "" !== t && (b.default.destroy.call(this), this.seekBarThumbnailsLoc = t, b.default.init.call(this)) }, t.prototype.getWaitingUI = function () { return !!s.default.hasClass(this.dom.container, "rmp-waiting") }, t.prototype.setWaitingUI = function (t) { this.get5Ready() && "boolean" == typeof t && (t && !this.getWaitingUI() ? h.default.showLoadingSpin.call(this) : !t && this.getWaitingUI() && h.default.hideLoadingSpin.call(this)) }, t.prototype.getCurrentPlaylistItemIndex = function () { return this.currentPlaylistIndex }, t.prototype.setPlaylistItem = function (t) { this.get5Ready() && "number" == typeof t && 0 <= t && u.default.load.call(this, t, null) }, t.prototype.isPlaylist = function () { return this.hasPlaylist }, t.prototype.getPlaylistData = function () { return this.isPlaylist() && 0 < this.playlistList.length && s.default.isObject(this.playlistList[0]) ? this.playlistList : null }, t.prototype.setPlaylistData = function (t) { this.isPlaylist() && ("string" == typeof t && "" !== t || Array.isArray(t) && s.default.isObject(t[0])) && u.default.setData.call(this, t, !1) }, t.prototype.getCurrentRelatedItemIndex = function () { return this.currentRelatedIndex }, t.prototype.setRelatedItem = function (t) { this.get5Ready() && "number" == typeof t && 0 <= t && f.default.load.call(this, t, null) }, t.prototype.isRelated = function () { return this.hasRelated }, t.prototype.getRelatedData = function () { return this.isRelated() && 0 < this.relatedList.length && s.default.isObject(this.relatedList[0]) ? this.relatedList : null }, t.prototype.setRelatedData = function (t) { this.isRelated() && ("string" == typeof t && "" !== t || Array.isArray(t) && s.default.isObject(t[0])) && f.default.setData.call(this, t, !1) }, t.prototype.getCamLat = function () { return this.lat }, t.prototype.getCamLon = function () { return this.lon }, t.prototype.getCamFov = function () { return this.fov }, t.prototype.setCamLatLongFov = function (t, e, i) { this.get5Ready() && "number" == typeof t && "number" == typeof e && "number" == typeof i && v.default.setCamLatLongFov.call(this, t, e, i, !0) }, t.prototype.resetCamLatLongFov = function () { this.get5Ready() && v.default.setCamLatLongFov.call(this, this.video360InitialLat, this.video360InitialLon, this.video360FocalLength, !0) }, t.prototype.getChapters = function () { return this.get5Ready() && 0 < this.chaptersArray.length ? this.chaptersArray : null }, t.prototype.seekToChapter = function (t) { this.get5Ready() && 0 < this.chaptersArray.length && "number" == typeof t && -1 < t && (null !== this.getChapters() && void 0 !== this.chaptersArray[t] && this.seekTo(this.chaptersArray[t].start)) }, t.prototype.getCastMediaLoaded = function () { return this.castMediaLoaded }, t.prototype.getCastConnected = function () { return this.castConnected }, t.prototype.getCastUrl = function () { return this.castUrl }, t.prototype.getHlsManifestData = function () { return this.get5Ready() && this.readingHlsJS ? this.hlsManifestData : null }, t.prototype.getHlsLevelData = function () { return this.get5Ready() && this.readingHlsJS ? this.hlsLevelData : null }, t.prototype.getHlsFragmentData = function () { return this.get5Ready() && this.readingHlsJS ? this.hlsFragmentData : null }, t.prototype.getHlsFragmentBeingPlayedData = function () { return this.get5Ready() && this.readingHlsJS ? this.hlsFragmentBeingPlayed : null }, t.prototype.getHlsEpochProgramDateTime = function () { return this.hlsEpochProgramDateTime }, t.prototype.getHlsRawProgramDateTime = function () { return this.get5Ready() && this.readingHlsJS ? this.hlsRawProgramDateTime : null }, t.prototype.getHlsId3TagSamples = function () { return this.get5Ready() && this.readingHlsJS ? this.hlsID3TagData : null }, t.prototype.getHlsBwEstimate = function () { return this.bwEstimate }, t.prototype.hlsStartLoad = function () { null !== this.hlsJS && this.hlsJS.startLoad() }, t.prototype.hlsStopLoad = function () { null !== this.hlsJS && this.hlsJS.stopLoad() }, t.prototype.getHlsJSInstance = function () { return this.hlsJS }, t.prototype.getShakaPlayerInstance = function () { return this.shakaPlayer }, t.prototype.getHtmlMediaElement = function () { return this.dom.video ? this.dom.video : null }, t.prototype.getErrorData = function () { return this.errorData }, t.prototype.setModuleOverlayVisible = function (t, e) { "boolean" == typeof e && "string" == typeof t && -1 < S.default.types.indexOf(t) && this.dom[t + "Overlay"] && (e && !s.default.isVisible(this.dom[t + "Overlay"]) ? S.default.open.call(this, t, null) : !e && s.default.isVisible(this.dom[t + "Overlay"]) && S.default.close.call(this, t, 400, null)) }, t.prototype.getModuleOverlayVisible = function (t) { return !!("string" == typeof t && -1 < S.default.types.indexOf(t) && this.dom[t + "Overlay"]) && s.default.isVisible(this.dom[t + "Overlay"]) } }, i.default = A }, { "../360/360": 1, "../ads/ima-ads": 7, "../ads/rmp-vast": 9, "../cast/cast": 22, "../core/dvr/dvr": 26, "../core/modules/modules": 30, "../core/resize/resize": 36, "../core/seek/seek": 39, "../core/ui/core-ui": 41, "../core/ui/logo": 43, "../core/volume/volume": 48, "../fw/defaults/input-defaults": 51, "../fw/env": 52, "../fw/fw": 53, "../playlist/playlist": 55, "../playlist/related": 56, "../vtt/captions": 57, "../vtt/thumbnails": 58 }], 16: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var c = a(t("../fw/fw")), u = a(t("../abr/shaka")), f = a(t("../core/modules/modules")); function a(t) { return t && t.__esModule ? t : { default: t } } var s = { attach: function (t) { t.prototype.getAudioTracks = function () { if (!this.get5Ready()) return null; var i = []; if (this.readingHlsJS && this.hlsJS && Array.isArray(this.hlsJS.audioTracks) && 0 < this.hlsJS.audioTracks.length) { var a = this.hlsJS.audioTrack; return this.hlsJS.audioTracks.forEach(function (t, e) { t.id === a ? i.push({ language: t.lang, active: !0, id: e }) : i.push({ language: t.lang, active: !1, id: e }) }), i } if ((this.readingDash || this.readingHlsShaka) && this.shakaPlayer) { var t = this.shakaPlayer.getAudioLanguages(), e = this.shakaPlayer.getVariantTracks().find(function (t) { return !0 === t.active }); if (e) { var s = e.language; t.forEach(function (t, e) { t === s ? i.push({ language: t, active: !0, id: e }) : i.push({ language: t, active: !1, id: e }) }) } return i } return null }, t.prototype.setAudioTrack = function (e) { if (this.get5Ready() && "number" == typeof e) if (this.readingHlsJS && this.hlsJS && Array.isArray(this.hlsJS.audioTracks) && 1 < this.hlsJS.audioTracks.length && c.default.isObject(this.hlsJS.audioTracks[e])) this.hlsJS.audioTrack = e, f.default.setActiveLevel.call(this, "audio", e); else if ((this.readingDash || this.readingHlsShaka) && this.shakaPlayer) { var t = this.getAudioTracks().find(function (t) { return t.id === e }); if (t) { if (this.shakaPlayer.selectAudioLanguage(t.language), this.abrAutoMode = !0, this.shakaPlayer.configure({ abr: { enabled: !0 } }), f.default.setActiveLevel.call(this, "audio", e), this.dom.qualityOverlayLevelsArea) { for (var i = this.dom.qualityOverlayLevelsArea.querySelectorAll(".rmp-overlay-level"), a = [], s = 0, r = i.length; s < r; s++) { var n = i[s]; c.default.hasClass(n, "rmp-q0") ? c.default.addClass(n, "rmp-overlay-level-active") : a.push(n) } a.forEach(function (t) { c.default.removeElement(t) }), 0 < this.variantsPerLng.length && u.default.setUpVideoRenditions.call(this) } if (!this.hasCC && 0 < this.shakaTextTracks.length && this.dom.captionsOverlayLevelsArea) { this.defaultTrack = 0; for (var o = this.dom.captionsOverlayLevelsArea.querySelectorAll(".rmp-overlay-level"), l = 0, d = o.length; l < d; l++)c.default.removeClass(o[l], "rmp-overlay-level-active"); var h = this.dom.container.querySelector(".captions-off"); null !== h && c.default.addClass(h, "rmp-overlay-level-active"), this.shakaPlayer.setTextTrackVisibility(!1) } c.default.createStdEvent("shakaaudiotrackswitching", this.dom.container) } } } } }; i.default = s }, { "../abr/shaka": 4, "../core/modules/modules": 30, "../fw/fw": 53 }], 17: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var l = a(t("../fw/fw")), d = a(t("../core/modules/quality")), h = a(t("../core/modules/modules")); function a(t) { return t && t.__esModule ? t : { default: t } } var s = { attach: function (t) { t.prototype.getBitrates = function () { var r = this; if (!this.get5Ready()) return null; var n = []; if ((this.readingDash || this.readingHlsShaka) && this.shakaPlayer) return this.shakaPlayer.getVariantTracks().forEach(function (t) { for (var e = {}, i = 0, a = r.shakaVideoRenditions.length; i < a; i++) { var s = r.shakaVideoRenditions[i]; if (t.id === s) { e.id = i, e.active = !1, t.active && (e.active = !0), t.bandwidth && (e.bandwidth = t.bandwidth), t.width && (e.width = t.width), t.height && (e.height = t.height), t.videoCodec && (e.videoCodec = t.videoCodec), t.audioCodec && (e.audioCodec = t.audioCodec), n.push(e); break } } }), n; if (this.readingHlsJS && this.hlsJS) { if (Array.isArray(this.hlsJS.levels) && 0 < this.hlsJS.levels.length) { var a = this.hlsJS.currentLevel; return this.hlsJS.levels.forEach(function (t, e) { var i = {}; i.id = e, i.active = !1, e === a && (i.active = !0), t.bitrate && (i.bitrate = t.bitrate), t.width && (i.width = t.width), t.height && (i.height = t.height), t.videoCodec && (i.videoCodec = t.videoCodec), t.audioCodec && (i.audioCodec = t.audioCodec), n.push(i) }), n } } else { if (this.readingMp4) { var s = this.getCurrentBitrateIndex(); return this.src.mp4.forEach(function (t, e) { var i = !1; e === s && (i = !0), n.push({ active: i, id: e }) }), n } if (this.readingM4a || this.readingMp3 || this.readingOgg) return n.push({ active: !0, id: 0 }), n } return null }, t.prototype.setBitrate = function (t) { if ("number" == typeof t && this.get5Ready() && (!this.getAdOnStage() || !this.getAdLinear())) { var e = this.getBitrates(); if (!(-1 !== t && void 0 === e[t] || this.readingMp4 && -1 === t)) if (this.readingMp4) d.default.setMp4Bitrate.call(this, t); else if ((this.readingDash || this.readingHlsShaka) && this.shakaPlayer) { if (-1 === t) this.abrAutoMode = !0, this.shakaPlayer.configure({ abr: { enabled: !0 } }); else { this.abrAutoMode = !1, this.shakaPlayer.configure({ abr: { enabled: !1 } }); var i = this.shakaVideoRenditions[t], a = this.shakaPlayer.getVariantTracks().find(function (t) { return t.id === i }); a && (this.shakaPlayer.selectVariantTrack(a, !0), l.default.createStdEvent("shakalevelswitching", this.dom.container)) } if (this.dom.qualityOverlayLevelsArea) { var s = this.dom.qualityOverlayLevelsArea.querySelectorAll(".rmp-overlay-level"); if (0 < s.length && s[t + 1]) { for (var r = 0, n = s.length; r < n; r++)l.default.removeClass(s[r], "rmp-abr-active"); l.default.addClass(s[t + 1], "rmp-abr-active") } h.default.setActiveLevel.call(this, "quality", t + 1) } } else if (this.readingHlsJS && this.hlsJS) { if (-1 === t) { this.abrAutoMode = !0; try { this.hlsJS.nextLevel = -1 } catch (t) { l.default.trace(t) } } else { var o = this.hlsJS.levels; if (o && o.length && 0 <= t && t < o.length) { this.abrAutoMode = !1; try { this.hlsJS.nextLevel = t } catch (t) { l.default.trace(t) } } else 0 } h.default.setActiveLevel.call(this, "quality", t + 1) } } }, t.prototype.getAbrAutoMode = function () { return !!this.get5Ready() && (this.readingMse ? this.abrAutoMode : !!this.readingHls || (this.readingMp4 || this.readingM4a || this.readingMp3 || this.readingOgg, !1)) }, t.prototype.getCurrentBitrateIndex = function () { if (!this.get5Ready()) return -2; if (this.readingMse || this.readingHls) { if (this.getAbrAutoMode()) return -1; var t = this.getBitrates(); if (t) return t.find(function (t) { return !0 === t.active }).id } else { if (this.readingMp4) { var e = this.getSrc(), i = this.src.mp4.findIndex(function (t) { return t === e }); return -1 === i && (i = 0), i } if (this.readingM4a || this.readingMp3 || this.readingOgg) return 0 } return -2 } } }; i.default = s }, { "../core/modules/modules": 30, "../core/modules/quality": 31, "../fw/fw": 53 }], 18: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var n = a(t("../fw/fw")), o = a(t("../fw/env")), l = a(t("../ads/ima-ads")), d = a(t("../ads/scheduler")), h = a(t("../ads/ads-helpers")), c = a(t("../analytics/logs")), u = a(t("../cast/cast")), f = a(t("../cast/airplay")), p = a(t("../abr/shaka")), m = a(t("../abr/hls")), v = a(t("../core/utils/viewable")), g = a(t("../vtt/captions")), y = a(t("../vtt/thumbnails")), b = a(t("../360/360")), S = a(t("../core/dom")), E = a(t("../analytics/analytics")), A = a(t("../analytics/mux")), C = a(t("../core/utils/utils")), k = a(t("../core/utils/error")); function a(t) { return t && t.__esModule ? t : { default: t } } var s = {}; s.attach = function (t) { var i = function () { var t = this; setTimeout(function () { t.destroyRunning = !1, n.default.createStdEvent("destroycompleted", t.dom.container) }, 1) }, a = function () { var t = this; h.default.destroy.call(this), this.dom.container.removeEventListener("adcontentresumerequested", this.castInit), this.adScheduleInput && d.default.destroy.call(this), C.default.clearAdAutoplayEvents.call(this), "ima" === this.adParser && null === this.postImaAdDestroy && (this.postImaAdDestroy = function () { this.dom.container.removeEventListener("adcontentresumerequested", this.postImaAdDestroy), l.default.resetAdsForNewRequest.call(this); try { this.adsLoader.destroy(), this.adDisplayContainer.destroy() } catch (t) { n.default.trace(t) } this.adsDestroyed = !0 }.bind(this)), "ima" === this.adParser ? this.getAdOnStage() ? this.getAdLinear() ? (this.dom.container.addEventListener("adcontentresumerequested", this.postImaAdDestroy), this.stopAds()) : (this.stopAds(), this.postImaAdDestroy()) : this.postImaAdDestroy() : this.getAdOnStage() ? this.getAdLinear() ? (this.dom.container.addEventListener("addestroyed", function () { t.adsDestroyed = !0 }), this.stopAds()) : (this.stopAds(), this.adsDestroyed = !0) : this.adsDestroyed = !0 }, s = function () { (function () { o.default.isMobile && (this.dom.container.removeEventListener("playing", this.onMobileStartAutoHideCentralUI), this.dom.container.removeEventListener("adloaded", this.onMobileStartAutoHideCentralUI), this.dom.container.removeEventListener("aderror", this.onMobileStartAutoHideCentralUI)), this.ads && (o.default.isIos[0] && !this.hideFullscreen && (this.dom.container.removeEventListener("adloaded", this.onIosStartShowFS), this.dom.container.removeEventListener("aderror", this.onIosStartShowFS), this.dom.container.removeEventListener("playing", this.onIosStartShowFS)), "ima" === this.adParser && o.default.isIphone && this.adDisableCustomPlaybackForIOS10Plus && (this.dom.container.removeEventListener("adcontentpauserequested", this.onIphone10PlusHideFS), this.dom.container.removeEventListener("adcontentresumerequested", this.onIphone10PlusHideFS))), this.dom.container.removeEventListener("srcchanged", this.appendFormDataAndSendLog), this.dom.container.removeEventListener("loadedmetadata", this.afterSrcSwitch), this.dom.container.removeEventListener("contextmenu", n.default.contextMenuInteraction), this.dom.container.removeEventListener("mousemove", this.showChrome), this.dom.container.removeEventListener("touchend", this.containerTouch), this.dom.container.removeEventListener("click", this.containerClick), this.dom.container.removeEventListener("playing", this.setAudioTrackFn), this.dom.container.removeEventListener("resize", this.configureShakaCapLevelToPlayerSize), this.processInitiatePlayback && this.dom.container.removeEventListener("loadedmetadata", this.processInitiatePlayback), this.dom.container.removeEventListener("playing", this.unstalledBuffer), this.dom.container.removeEventListener("playing", this.hlsJSUnstalledBuffer), g.default.destroy.call(this), this.dom.container.removeEventListener("playing", this.startUpLogPlaying), this.dom.container.removeEventListener("adloaded", this.startUpLogPlaying), this.dom.container.removeEventListener("loadedmetadata", this.afterMp4BitrateSwitch), this.hlsJSStopDownloadWhilePaused && (this.dom.container.removeEventListener("playing", this.hlsOnFirstPlaying), this.dom.container.removeEventListener("pause", this.hlsOnPauseStopLoad), this.dom.container.removeEventListener("play", this.hlsOnPlayStartLoad)), this.hasChapters && this.dom.container.removeEventListener("loadedmetadata", this.onLoadedmetadaAddChapters) }).call(this), this.video360 && b.default.destroy.call(this), this.dom.video && function () { S.default.destroyVideo.call(this), this.dom.video.removeEventListener("ended", this.ended), null !== this.hlsResizeLevelSwitch && this.dom.video.removeEventListener("resize", this.hlsResizeLevelSwitch), this.readingPDorNative && this.dom.video.removeEventListener("error", this.generateError, !0) }.call(this), function () { var e = this; if (this.readingDash || this.readingHlsShaka) { if (null === this.shakaPlayer) return void i.call(this); p.default.destroy.call(this), this.shakaPlayer.destroy().then(function () { i.call(e) }).catch(function (t) { n.default.trace(t), i.call(e) }) } else if (this.readingHlsJS) { if (null === this.hlsJS) return void i.call(this); m.default.destroy.call(this), i.call(this) } else this.readingPDorNative ? (n.default.clearNativeHtml5Buffer(this.dom.video), i.call(this)) : this.readingOutstream && i.call(this) }.call(this) }, r = function () { var t = this; if (document.removeEventListener("fullscreenchange", this.fullscreenchange), document.removeEventListener("fullscreenerror", this.fullscreenerror), document.removeEventListener("mouseup", this.mouseupDoc), document.removeEventListener("mousemove", this.mousemoveDoc), function () { n.default.clearTimeout(this.imaLoadTimeout), n.default.clearTimeout(this.throttledResizeTimeout), n.default.clearTimeout(this.cssLinkTimeout), n.default.clearTimeout(this.logRetryTimeout), n.default.clearTimeout(this.logGaSeekingTimeout), n.default.clearTimeout(this.prerollMaskRemovalTimeout), n.default.clearTimeout(this.orientationChangeResizeTimeout), n.default.clearTimeout(this.siteCheckerRetryTimeout), n.default.clearTimeout(this.rmpPlusCheckerRetryTimeout), n.default.clearTimeout(this.hlsJSErrorRetryTimeout), n.default.clearInterval(this.progressiveInterval), n.default.clearInterval(this.hlsJSCCInterval), n.default.clearInterval(this.hlsJSAbrInterval), n.default.clearInterval(this.adSkipInterval), n.default.clearInterval(this.adCountdownInterval), n.default.clearInterval(this.adRemainingTimeBarInterval), n.default.clearInterval(this.runAdsManagerInterval), n.default.clearInterval(this.liveAdSchedulerChecker), n.default.clearInterval(this.analyticsInterval), n.default.clearInterval(this.setSrcResetAdInterval), n.default.clearInterval(this.chromeTimer) }.call(this), v.default.destroy.call(this), this.googleCast && u.default.destroy.call(this), f.default.destroy.call(this), 0 < this.offsetStartPosition && this.isVod && this.dom.container && this.dom.container.removeEventListener("playing", this.onStartSeekToOffset), this.dummyThumbnailsImg && y.default.destroy.call(this), this.ads) { a.call(this); var e = setInterval(function () { t.adsDestroyed && (n.default.clearInterval(e), s.call(t)) }, 10) } else s.call(this) }; t.prototype.destroy = function () { var t = this; if (this.playerReady) if (this.destroyRunning) k.default.warning.call(this, "destroy currently running - wait for completion before invoking", 1004, null); else if (this.destroyRunning = !0, n.default.removeEvent("resize", window, this.throttledResize), n.default.removeEvent("orientationchange", window, this.throttledResize), n.default.removeEvent("online", window, this.windowOnline), n.default.removeEvent("offline", window, this.windowOffline), this.disableKeyboardControl || (n.default.removeEvent("keyup", document, this.addTabKeyDetection), n.default.removeEvent("blur", this.dom.container, this.removeFocusToContainer), n.default.removeEvent("keyup", this.dom.container, this.bindKeyboard), n.default.removeEvent("keydown", this.dom.container, n.default.preventKeyDown)), c.default.destroy.call(this), this.isHTML5) if (E.default.reset.call(this), this.muxData && this.readingHlsJS && A.default.destroy.call(this), this.getFullscreen() && (this.proceedDestroy = !1, this.exitFSDestroy = function () { this.exitFSDestroy && this.dom.container.removeEventListener("exitfullscreen", this.exitFSDestroy), this.proceedDestroy = !0 }.bind(this), this.dom.container.addEventListener("exitfullscreen", this.exitFSDestroy), this.setFullscreen(!1)), this.proceedDestroy) r.call(this); else var e = setInterval(function () { t.proceedDestroy && (n.default.clearInterval(e), r.call(t)) }, 10); else i.call(this) } }, i.default = s }, { "../360/360": 1, "../abr/hls": 3, "../abr/shaka": 4, "../ads/ads-helpers": 6, "../ads/ima-ads": 7, "../ads/scheduler": 10, "../analytics/analytics": 11, "../analytics/logs": 12, "../analytics/mux": 13, "../cast/airplay": 21, "../cast/cast": 22, "../core/dom": 25, "../core/utils/error": 44, "../core/utils/utils": 46, "../core/utils/viewable": 47, "../fw/env": 52, "../fw/fw": 53, "../vtt/captions": 57, "../vtt/thumbnails": 58 }], 19: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a = n(t("../fw/fw")), s = n(t("../fw/env")), r = n(t("../core/utils/error")); function n(t) { return t && t.__esModule ? t : { default: t } } var o = {}, l = function (t, e) { this.shakaOfflineDownloadProgress = e, a.default.createStdEvent("downloadprogress", this.dom.container) }, d = function (t) { var e = t.length; return 1 === e ? t[0] : t[Math.floor(e / 2)] }; o.init = function () { window.rmpStorage = new shaka.offline.Storage(this.shakaPlayer); var t = { progressCallback: l.bind(this), usePersistentLicense: this.shakaUsePersistentLicense }; -4 !== this.shakaOfflinePreferredTrackQuality && (t.trackSelectionCallback = function (t) { var e = void 0, i = t.filter(function (t) { return "variant" === t.type }); if (0 === i.length) return [t[0]]; var a = this.shakaPlayer.getVariantTracks().find(function (t) { return !0 === t.active }); if (!a) return [d(i)]; var s = a.language, r = i.filter(function (t) { return t.language === s }).sort(function (t, e) { return t.bandwidth > e.bandwidth }); if (0 === r.length) return [d(i)]; switch (this.shakaOfflinePreferredTrackQuality) { case -3: e = r[r.length - 1]; break; case -2: e = r[0]; break; case -1: e = d(r); break; default: e = 0 <= this.shakaOfflinePreferredTrackQuality && r[this.shakaOfflinePreferredTrackQuality] ? r[this.shakaOfflinePreferredTrackQuality] : d(r) }return [e] }.bind(this)), window.rmpStorage.configure(t) }, o.attach = function (t) { t.prototype.isOnline = function () { return s.default.isOnline() }, t.prototype.hasDownloadSupport = function () { return !!("undefined" != typeof shaka && shaka.offline && shaka.offline.Storage && shaka.offline.Storage.support()) }, t.prototype.getDownloadedList = function () { return this.hasDownloadSupport() ? this.shakaOfflineList : (r.default.warning.call(this, "offline storage is not supported in this environment", 3007, null), null) }, t.prototype.listDownloadedContent = function () { var e = this; this.hasDownloadSupport() ? window.rmpStorage ? window.rmpStorage.list().then(function (t) { e.shakaOfflineList = t, a.default.createStdEvent("downloadlistavailable", e.dom.container) }).catch(function (t) { r.default.warning.call(e, "could not list offline downloaded content", 3003, t) }) : r.default.warning.call(this, "storage has not been initialized", 3001, null) : r.default.warning.call(this, "offline storage is not supported in this environment", 3007, null) }, t.prototype.download = function (t) { var e = this; if (this.hasDownloadSupport()) if (window.rmpStorage) { var i = {}; a.default.isObject(t) && (i = t), this.shakaOfflineDownloadProgress = 0, a.default.createStdEvent("downloadstarted", this.dom.container), window.rmpStorage.store(this.startingBitratePath, i).then(function () { l.call(e, null, 1), a.default.createStdEvent("downloadcompleted", e.dom.container) }).catch(function (t) { l.call(e, null, -1), r.default.warning.call(e, "could not download offline content", 3002, t) }) } else r.default.warning.call(this, "storage has not been initialized", 3001, null); else r.default.warning.call(this, "offline storage is not supported in this environment", 3007, null) }, t.prototype.getDownloadProgress = function () { return this.hasDownloadSupport() ? this.shakaOfflineDownloadProgress : (r.default.warning.call(this, "offline storage is not supported in this environment", 3007, null), -1) }, t.prototype.loadDownload = function (t) { this.hasDownloadSupport() ? window.rmpStorage ? t && t.offlineUri ? this.setSrc(t.offlineUri) : r.default.warning.call(this, "could not load offline content - invalid input", 3005, null) : r.default.warning.call(this, "storage has not been initialized", 3001, null) : r.default.warning.call(this, "offline storage is not supported in this environment", 3007, null) }, t.prototype.removeDownload = function (t) { var e = this; this.hasDownloadSupport() ? window.rmpStorage ? window.rmpStorage.remove(t.offlineUri).then(function () { a.default.createStdEvent("downloadremoved", e.dom.container) }).catch(function (t) { r.default.warning.call(e, "could not remove offline downloaded content", 3004, t) }) : r.default.warning.call(this, "storage has not been initialized", 3001, null) : r.default.warning.call(this, "offline storage is not supported in this environment", 3007, null) } }, i.default = o }, { "../core/utils/error": 44, "../fw/env": 52, "../fw/fw": 53 }], 20: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var o = a(t("../fw/fw")), l = a(t("../abr/shaka")), d = a(t("../abr/hls")), h = a(t("../core/ui/core-ui")), c = a(t("../core/modules/modules")), u = a(t("../core/modules/quality")), f = a(t("../vtt/captions")), p = a(t("../ads/ima-ads")), m = a(t("../vtt/thumbnails")), v = a(t("../core/utils/error")); function a(t) { return t && t.__esModule ? t : { default: t } } var s = {}; s.attach = function (t) { var a = function () { this.changingSrc = !1, o.default.createStdEvent("srcchanged", this.dom.container) }, s = function () { "ima" === this.adParser ? (this.contentCompleteCalled = !1, this.getAdLinear() ? (this.setSrcResetIMA = function () { this.dom.container.removeEventListener("adcontentresumerequested", this.setSrcResetIMA), p.default.resetAdsForNewRequest.call(this), this.setSrcAdReset = !0 }.bind(this), this.dom.container.addEventListener("adcontentresumerequested", this.setSrcResetIMA), this.stopAds()) : (p.default.resetAdsForNewRequest.call(this), this.setSrcAdReset = !0)) : (this.rmpVast.setContentPlayerCompleted(!1), this.setSrcResetRmpVast = function () { this.dom.container.removeEventListener("addestroyed", this.setSrcResetRmpVast), this.setSrcAdReset = !0 }.bind(this), this.dom.container.addEventListener("addestroyed", this.setSrcResetRmpVast), this.stopAds()) }, r = function () { this.dom.video.src = this.startingBitratePath; try { this.dom.video.load() } catch (t) { o.default.trace(t) } }, n = function () { var e = this; this.dom.container.addEventListener("loadedmetadata", this.afterSrcSwitch), this.dom.container.addEventListener("error", this.afterSrcSwitch), this.readingHlsJS ? (d.default.destroy.call(this), d.default.init.call(this)) : this.readingDash || this.readingHlsShaka ? this.shakaPlayer ? (l.default.destroy.call(this), this.shakaPlayer.destroy().then(function () { l.default.init.call(e) }).catch(function (t) { o.default.trace(t), l.default.init.call(e) })) : l.default.init.call(this) : r.call(this) }; t.prototype.setSrc = function (t) { var e = this; if (this.get5Ready() && !(this.video360 || this.readingFps || this.readingOutstream)) if (this.changingSrc) v.default.warning.call(this, "setSrc currently running - wait for completion before invoking", 1005, null); else { var i = function (t) { var e = this.getStreamType(), i = "", a = !1; if ("string" == typeof t) a = !0; else if (!o.default.isObject(t)) return i; switch (e) { case "hlsHevc": a ? i = t : t.hlsHevc && (i = t.hlsHevc); break; case "hls": a ? i = t : t.hls && (i = t.hls); break; case "dash": a ? i = t : t.dash && (i = t.dash); break; case "mp4": a ? i = t : t.mp4 && t.mp4[0] && (i = t.mp4[0]); break; case "mp4Hevc": a ? i = t : t.mp4Hevc && t.mp4Hevc[0] && (i = t.mp4Hevc[0]); break; case "webm": a ? i = t : t.webm && t.webm[0] && (i = t.webm[0]); break; case "m4a": a ? i = t : t.m4a && (i = t.m4a); break; case "mp3": a ? i = t : t.mp3 && (i = t.mp3); break; case "ogg": a ? i = t : t.ogg && (i = t.ogg) }return i }.call(this, t); if ("" !== i) { if (this.readingMse && this.msePreloadRequested) { if (!this.msePreloadCompleted) return void 0; this.msePreloadRequested = !1 } if (this.changingSrc = !0, o.default.createStdEvent("srcchanging", this.dom.container), this.castUrl = i, this.startingBitratePath = i, c.default.show.call(this), this.readingMp4 && o.default.isObject(t) && (Array.isArray(t.webm) && 0 < t.webm.length || Array.isArray(t.mp4) && 0 < t.mp4.length) && (Array.isArray(t.webm) && this.readingWebM ? this.src.mp4 = t.webm : Array.isArray(t.mp4) && (this.src.mp4 = t.mp4), this.initialBitrate = o.default.filterInitialBitrate(this.initialBitrate, this.src.mp4), this.startingBitratePath = this.src.mp4[this.initialBitrate], this.castUrl = this.startingBitratePath), this.afterSrcSwitch ? (this.dom.container.removeEventListener("loadedmetadata", this.afterSrcSwitch), this.dom.container.removeEventListener("error", this.afterSrcSwitch)) : this.afterSrcSwitch = function (t) { this.dom.container.removeEventListener("loadedmetadata", this.afterSrcSwitch), this.dom.container.removeEventListener("error", this.afterSrcSwitch), t && t.type && ("loadedmetadata" === t.type ? (this.srcChangeAutoplay ? this.play() : (h.default.showCentralPlay.call(this), this.showPoster()), this.googleCast && this.castConnected && this.loadCastMedia(), a.call(this)) : "error" === t.type && (this.changingSrc = !1)) }.bind(this), function () { this.abrAutoMode || !this.readingMse && !this.readingHls || (this.abrAutoMode = !0), this.readingMse || (this.dom.video.preload = "auto"), this.analyticsSecondsPlayed = 0 }.call(this), function () { this.hasChapters && (this.dom.container.removeEventListener("loadedmetadata", this.onLoadedmetadaAddChapters), c.default.destroy.call(this, "chapters"), this.hasChapters = !1, this.chaptersArray = []), this.hasThumbnails && m.default.destroy.call(this); var t = this.dom.container.querySelector(".rmp-error"); null !== t && o.default.removeElement(t), h.default.enableCentralUI.call(this), h.default.showLoadingSpin.call(this), h.default.showChrome.call(this), c.default.closeAll.call(this), this.setSrcPDModule || (this.dom.quality && u.default.destroy.call(this), this.dom.audio && c.default.destroy.call(this, "audio"), this.dom.captions && f.default.destroy.call(this), this.isVod && this.dom.current && this.dom.handle && this.dom.timeElapsedText && (this.dom.current.style.width = 0, this.dom.handle.style.left = 0, this.dom.timeElapsedText.textContent = "00:00"), this.readingMp4 && 1 < this.src.mp4.length && (u.default.setUpMP4UI.call(this), o.default.show(this.dom.quality))) }.call(this), this.getPlayerInitialized()) this.getAdOnStage() ? (s.call(this), o.default.clearInterval(this.setSrcResetAdInterval), this.setSrcResetAdInterval = setInterval(function () { e.setSrcAdReset && (o.default.clearInterval(e.setSrcResetAdInterval), e.setSrcAdReset = !1, n.call(e)) }, 10)) : n.call(this); else { if (this.readingPDorNative) r.call(this), h.default.showCentralPlay.call(this); else if (this.readingHlsJS) this.msePreloadCompleted ? (d.default.destroy.call(this), h.default.showCentralPlay.call(this), d.default.init.call(this), this.msePreloadRequested = !0) : h.default.showCentralPlay.call(this); else if (this.readingDash || this.readingHlsShaka) { if (this.msePreloadCompleted) return l.default.destroy.call(this), void this.shakaPlayer.destroy().then(function () { h.default.showCentralPlay.call(e), l.default.init.call(e), e.msePreloadRequested = !0, a.call(e) }).catch(function (t) { o.default.trace(t), h.default.showCentralPlay.call(e), l.default.init.call(e), e.msePreloadRequested = !0, a.call(e) }); h.default.showCentralPlay.call(this) } a.call(this) } } } }, t.prototype.getSrc = function () { return this.startingBitratePath }, t.prototype.isChangingSrc = function () { return this.changingSrc } }, i.default = s }, { "../abr/hls": 3, "../abr/shaka": 4, "../ads/ima-ads": 7, "../core/modules/modules": 30, "../core/modules/quality": 31, "../core/ui/core-ui": 41, "../core/utils/error": 44, "../fw/fw": 53, "../vtt/captions": 57, "../vtt/thumbnails": 58 }], 21: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a = r(t("../fw/fw")), s = r(t("../core/modules/modules")); function r(t) { return t && t.__esModule ? t : { default: t } } var n = { destroy: function () { this.dom.video && this.dom.video.removeEventListener("webkitplaybacktargetavailabilitychanged", this.onAirPlayAvailabilityChanged), this.dom.airplay && this.dom.airplay.removeEventListener("click", this.onAirPlayClick), this.dom.container && this.dom.container.removeEventListener("loadedmetadata", this.onLoadedmetadataShowAirPlay) } }, o = function (t) { if (t) switch (t.availability) { case "available": 0, this.dom.airplay || (s.default.append.call(this, "airplay"), this.onAirPlayClick = function (t) { t && (t.stopPropagation(), "touchend" === t.type && t.preventDefault()); try { this.dom.video.webkitShowPlaybackTargetPicker() } catch (t) { a.default.trace(t) } }.bind(this), this.dom.airplay.addEventListener("click", this.onAirPlayClick), a.default.addClass(this.dom.container, "rmp-airplay-available")), this.hasLoadedMetadata ? s.default.deferredShow.call(this, "airplay") : (this.onLoadedmetadataShowAirPlay = function () { this.dom.container.removeEventListener("loadedmetadata", this.onLoadedmetadataShowAirPlay), s.default.deferredShow.call(this, "airplay") }.bind(this), this.dom.container.addEventListener("loadedmetadata", this.onLoadedmetadataShowAirPlay)); break; default: a.default.hide(this.dom.airplay) } }; n.init = function () { "undefined" != typeof WebKitPlaybackTargetAvailabilityEvent && (this.onAirPlayAvailabilityChanged = o.bind(this), this.dom.video.addEventListener("webkitplaybacktargetavailabilitychanged", this.onAirPlayAvailabilityChanged)) }, i.default = n }, { "../core/modules/modules": 30, "../fw/fw": 53 }], 22: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var h = l(t("../fw/fw")), a = l(t("../fw/env")), s = l(t("../core/ui/core-ui")), c = l(t("../core/events")), r = l(t("../core/volume/volume")), n = l(t("../core/modules/modules")), o = l(t("../core/utils/error")); function l(t) { return t && t.__esModule ? t : { default: t } } var u = {}, d = !1, f = void 0, p = !1, m = "", v = !1, g = "", y = h.default.nullFn, b = h.default.nullFn, S = h.default.nullFn, E = h.default.nullFn, A = h.default.nullFn, C = h.default.nullFn, k = h.default.nullFn, w = h.default.nullFn, P = h.default.nullFn, _ = h.default.nullFn, L = h.default.nullFn, T = null, I = null, M = [], x = function () { this.setVolume(this.currentVolume), h.default.removeClass(this.dom.container, "rmp-casting"), h.default.hide(f) }; u.destroy = function () { if (this.castConnected) { x.call(this); try { I.endSession() } catch (t) { h.default.trace(t) } } this.remotePlayerController && (this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.PLAYER_STATE_CHANGED, y), this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED, b), this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.VOLUME_LEVEL_CHANGED, S), this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED, E), this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED, A), this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.IS_MUTED_CHANGED, _), this.isVod && (this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED, k), this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.DURATION_CHANGED, w))), T && (T.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED, L), T.removeEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED, C)), this.dom.container && (this.dom.container.removeEventListener("playing", P), this.dom.container.removeEventListener("ready", this.castReady), this.dom.container.removeEventListener("playing", this.onPlayingSetupRemotePlayer)) }, u.castingAPIAvailable = function () { return !!(this.googleCast && this.castMediaLoaded && this.remotePlayer && this.remotePlayerController) }, u.connectedAPIAvailable = function () { return !!(this.googleCast && this.castConnected && this.remotePlayer && this.remotePlayerController) }, u.setAudioTrack = function (t) { if (this.castMediaLoaded && this.castMedia && 0 < M.length) { var e = M.filter(function (t) { return "AUDIO" === t.type }); if (e[t] && "number" == typeof e[t].trackId) { var i = e[t].trackId; 0; var a = new chrome.cast.media.EditTracksInfoRequest([i]); this.castMedia.editTracksInfo(a, h.default.log, h.default.trace) } } }; u.setTextTrack = function (t) { if (this.castMediaLoaded && this.castMedia && 0 < M.length) { var e = M.filter(function (t) { return "TEXT" === t.type }); if (e[t] && "number" == typeof e[t].trackId) { var i = e[t].trackId, a = function () { var t = new chrome.cast.media.TextTrackStyle; return t.foregroundColor = "#" + this.googleCastCCForegroundColor, t.backgroundColor = "#" + this.googleCastCCBackgroundColor, t.fontScale = this.googleCastCCFontScale, t }.call(this); 0; var s = new chrome.cast.media.EditTracksInfoRequest([i], a); this.castMedia.editTracksInfo(s, h.default.log, h.default.trace) } } }, u.getDuration = function () { var t = void 0; return this.remotePlayer.duration ? t = this.remotePlayer.duration : this.remotePlayer.mediaInfo && this.remotePlayer.mediaInfo.duration && (t = this.remotePlayer.mediaInfo.duration), t ? Math.round(1e3 * t) : -1 }, u.getCurrentTime = function () { return "number" == typeof this.remotePlayer.currentTime && 0 <= this.remotePlayer.currentTime ? Math.round(1e3 * this.remotePlayer.currentTime) : -1 }; var D = function () { var t = void 0; this.remotePlayer && ("LOADING" === this.remotePlayerState || "BUFFERING" === this.remotePlayerState ? s.default.showLoadingSpin.call(this) : "LOADED" !== this.remotePlayerState && "ENDED" !== this.remotePlayerState && "IDLE" !== this.remotePlayerState && "PLAYING" !== this.remotePlayerState && "PAUSED" !== this.remotePlayerState || s.default.hideLoadingSpin.call(this), t = this.remotePlayerState), t || (t = "STANDBY"), f || (f = document.createElement("div"), h.default.hide(f), h.default.setClass(f, "rmp-cast-diplay-message"), this.dom.container.appendChild(f)), h.default.show(f); var e = g + " " + t; I && (e += " on " + I.getCastDevice().friendlyName), h.default.setText(f, e) }, R = function () { (function () { this.getAdOnStage() && this.stopAds(), h.default.addClass(this.dom.container, "rmp-casting") }).call(this), (I = T.getCurrentSession()) && (this.castConnected = !0, d ? (this.castMedia = I.getMediaSession(), this.castMedia ? (this.pause(), this.castMediaLoaded = !0) : this.loadCastMedia()) : this.loadCastMedia(), d = !1) }, O = function () { this.remotePlayer.isConnected ? this.getPlayerInitialized() ? R.call(this) : (this.initiatePlayback(), this.onPlayingSetupRemotePlayer = function () { this.dom.container.removeEventListener("playing", this.onPlayingSetupRemotePlayer), R.call(this) }.bind(this), this.dom.container.addEventListener("playing", this.onPlayingSetupRemotePlayer)) : function () { if (this.remotePlayerState = "", this.castMediaLoaded = !1, this.castConnected = !1, I.endSession(), x.call(this), !p && (this.remotePlayer.savedPlayerState.isPaused || this.play(), this.isVod && this.remotePlayer && this.remotePlayer.savedPlayerState && this.remotePlayer.savedPlayerState.currentTime)) { var t = this.remotePlayer.savedPlayerState.currentTime; h.default.isNumber(t) && 0 <= t && this.seekTo(1e3 * t) } }.call(this) }, j = function () { h.default.addClass(this.dom.container, "rmp-cast-available"), n.default.append.call(this, "cast"), h.default.addEvent(["touchend", "click"], this.dom.cast, function (t) { t && t.stopPropagation(), s.default.showChrome.call(this) }.bind(this)), n.default.deferredShow.call(this, "cast"), a.default.isMobile && !this.getPlayerInitialized() && (P = function () { this.dom.container.removeEventListener("playing", P), n.default.deferredShow.call(this, "cast") }.bind(this), h.default.hide(this.dom.cast), this.dom.container.addEventListener("playing", P)), this.readingDash ? m = "application/dash+xml" : this.readingHls || this.readingHlsJS || this.readingHlsShaka ? m = "application/vnd.apple.mpegurl" : this.readingMp4 && !this.readingWebM ? m = "video/mp4" : this.readingMp4 && this.readingWebM ? m = "video/webm" : this.audioOnly && this.readingM4a ? m = "audio/mp4" : this.audioOnly && this.readingMp3 ? m = "audio/mp3" : this.audioOnly && this.readingOgg && (m = "audio/ogg"), this.castUrl = this.startingBitratePath, this.loadCastMedia = function () { var d = this; p = !1, this.pause(); var t = new chrome.cast.media.MediaInfo(this.castUrl, m); t.metadata = new chrome.cast.media.GenericMediaMetadata, "MOVIE" === this.googleCastMetadataType || "TV_SHOW" === this.googleCastMetadataType ? t.metadata.metadataType = this.googleCastMetadataType : t.metadata.metadataType = chrome.cast.media.MetadataType.GENERIC, g = "" === this.googleCastContentTitle ? this.contentTitle : this.googleCastContentTitle, t.metadata.title = g; var e = void 0; if (this.googleCastPoster ? e = this.googleCastPoster : this.poster && (e = this.poster), t.metadata.images = [{ url: e }], "" !== this.googleCastReleaseDate && (t.metadata.subtitle = this.googleCastReleaseDate), this.isVod ? t.streamType = chrome.cast.media.StreamType.BUFFERED : t.streamType = chrome.cast.media.StreamType.LIVE, t.customData = {}, this.hasCC) { for (var i = [], a = 0, s = this.ccFiles.length; a < s; a++)i[a] = new chrome.cast.media.Track(a + 1, chrome.cast.media.TrackType.TEXT), i[a].trackContentId = this.ccFiles[a][2], i[a].trackContentType = "text/vtt", i[a].subtype = chrome.cast.media.TextTrackType.SUBTITLES, i[a].name = this.ccFiles[a][1], i[a].language = this.ccFiles[a][0], i[a].customData = null; t.streamType = chrome.cast.media.StreamType.BUFFERED, t.textTrackStyle = new chrome.cast.media.TextTrackStyle, t.textTrackStyle.foregroundColor = "#" + this.googleCastCCForegroundColor, t.textTrackStyle.backgroundColor = "#" + this.googleCastCCBackgroundColor, t.textTrackStyle.fontScale = this.googleCastCCFontScale, t.duration = null, t.tracks = i } this.remotePlayerState = "LOADING", D.call(this); var r = new chrome.cast.media.LoadRequest(t); this.hasCC && 0 < this.defaultTrack && (r.activeTrackIds = [this.defaultTrack]), I.loadMedia(r).then(function () { d.remotePlayerState = "LOADED", D.call(d); var t = d.getCurrentTime(); if (d.isVod && 0 < t && (d.remotePlayer.currentTime = t / 1e3, d.remotePlayerController.seek()), c.default.play.call(d), d.castMedia = I.getMediaSession(), M = d.castMedia.media.tracks, d.castMediaLoaded = !0, d.dom.captions && d.dom.captionsOverlayLevelsArea) { for (var e = d.dom.captionsOverlayLevelsArea.querySelectorAll(".rmp-overlay-level"), i = 0, a = 0, s = e.length; a < s; a++)if (h.default.hasClass(e[a], "rmp-overlay-level-active")) { i = a; break } 0 < i && u.setTextTrack.call(d, i - 1) } if (d.dom.audio && d.dom.audioOverlayLevelsArea) { for (var r = d.dom.audioOverlayLevelsArea.querySelectorAll(".rmp-overlay-level"), n = 0, o = 0, l = r.length; o < l; o++)if (h.default.hasClass(r[o], "rmp-overlay-level-active")) { n = o; break } 0 < n && u.setAudioTrack.call(d, n) } h.default.createStdEvent("castmedialoaded", d.dom.container) }).catch(function (t) { d.castMediaLoaded = !1, d.castConnected = !1, p = !0, x.call(d), I.endSession(), h.default.createStdEvent("castmediaerror", d.dom.container); var e = null; t && (e = t), o.default.warning.call(d, "castSession.loadMedia failed on receiving device", 7001, e) }) }.bind(this), y = function () { if (this.remotePlayer && this.remotePlayer.playerState) { switch (this.remotePlayer.playerState) { case "BUFFERING": this.remotePlayerState = "BUFFERING", h.default.createStdEvent("waiting", this.dom.container); break; case "PLAYING": this.remotePlayerState = "PLAYING", h.default.createStdEvent("playing", this.dom.container); break; case "IDLE": this.remotePlayerState = "IDLE"; break; case "PAUSED": this.remotePlayerState = "PAUSED" }D.call(this) } }.bind(this), b = O.bind(this), S = function () { this.remotePlayer && (r.default.change.call(this), h.default.createStdEvent("volumechange", this.dom.container)) }.bind(this), E = function () { }.bind(this), A = function () { this.remotePlayer && (this.remotePlayer.isPaused ? c.default.pause.call(this) : c.default.play.call(this)) }.bind(this), this.isVod && (k = function () { c.default.timeupdate.call(this) }.bind(this), w = function () { (this.remotePlayer.duration || this.remotePlayer.mediaInfo && this.remotePlayer.mediaInfo.duration) && c.default.durationchange.call(this) }.bind(this)), _ = function () { r.default.change.call(this), h.default.createStdEvent("volumechange", this.dom.container) }.bind(this), function () { var t = this; this.remotePlayer = new cast.framework.RemotePlayer, this.remotePlayerController = new cast.framework.RemotePlayerController(this.remotePlayer), this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED, b), this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED, function () { t.isVod && !t.remotePlayer.isMediaLoaded && t.castMediaLoaded && (t.castMediaLoaded = !1, t.remotePlayerState = "ENDED", D.call(t), c.default.pause.call(t), t.seekTo(0), h.default.createStdEvent("ended", t.dom.container)) }), this.isVod && (this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED, k), this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.DURATION_CHANGED, w)), this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED, A), this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.VOLUME_LEVEL_CHANGED, S), this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.MEDIA_INFO_CHANGED, E), this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.PLAYER_STATE_CHANGED, y) }.call(this) }; C = function (t) { if (t) switch (t.sessionState) { case cast.framework.SessionState.NO_SESSION: case cast.framework.SessionState.SESSION_STARTING: case cast.framework.SessionState.SESSION_STARTED: case cast.framework.SessionState.SESSION_START_FAILED: case cast.framework.SessionState.SESSION_ENDING: case cast.framework.SessionState.SESSION_ENDED: 0; break; case cast.framework.SessionState.SESSION_RESUMED: 0, d = !0 } }; var V = function () { if (this.dom.container.removeEventListener("adcontentresumerequested", this.castInit), "undefined" != typeof cast && void 0 !== cast.framework && void 0 !== cast.framework.CastContext && (h.default.createStdEvent("castapiavailable", this.dom.container), T = cast.framework.CastContext.getInstance())) { var t = this.googleCastReceiverAppId; "cast-default" === t && (t = chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID), T.setOptions({ receiverApplicationId: t, autoJoinPolicy: chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED }), L = function (t) { if (t) switch (t.castState) { case cast.framework.CastState.NO_DEVICES_AVAILABLE: break; case cast.framework.CastState.NOT_CONNECTED: case cast.framework.CastState.CONNECTED: v || (v = !0, j.call(this)); break; case cast.framework.CastState.CONNECTING: } }.bind(this), T.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED, L), T.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED, C); var e = T.getCastState(); 0, e !== cast.framework.CastState.NO_DEVICES_AVAILABLE && (v = !0, j.call(this)) } }; u.ready = function () { if (this.dom.container.removeEventListener("ready", this.castReady), this.googleCast) if (chrome.cast && chrome.cast.isAvailable) V.call(this); else { window.__onGCastApiAvailable = function (t) { t && chrome.cast && (this.castInit = V.bind(this), this.getAdOnStage() && this.getAdLinear() ? this.dom.container.addEventListener("adcontentresumerequested", this.castInit) : this.castInit(), delete window.__onGCastApiAvailable) }.bind(this), h.default.getScript("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1", function () { }, o.default.warning.bind(this, "failed to load cast_sender.js dependency", 7e3, null)) } }, i.default = u }, { "../core/events": 27, "../core/modules/modules": 30, "../core/ui/core-ui": 41, "../core/utils/error": 44, "../core/volume/volume": 48, "../fw/env": 52, "../fw/fw": 53 }], 23: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var s = a(t("../../fw/fw")), l = a(t("../ui/core-ui")), d = a(t("../resize/resize")), h = a(t("../../cast/cast")), c = a(t("../volume/volume")); function a(t) { return t && t.__esModule ? t : { default: t } } var r = {}, n = function (t) { t && (t.id === this.id ? s.default.addClass(t, "rmp-container-focus") : s.default.addClass(t, "rmp-focus")) }, o = function (t) { t && (t.id === this.id ? s.default.removeClass(t, "rmp-container-focus") : s.default.removeClass(t, "rmp-focus")) }; r.makeAccessible = function (i, t, e) { var a = this; i && (i.tabIndex = 0, i === this.dom.seekBar ? i.setAttribute("role", "progressbar") : i.setAttribute("role", "button"), t && i.setAttribute("aria-label", t), e && i.addEventListener("keyup", function (t) { var e = t.which; 13 !== e && 32 !== e || (t.stopPropagation(), t.preventDefault(), s.default.createStdEvent("click", i)) }), i.addEventListener("blur", function () { o.call(a, i) })) }; r.init = function () { this.dom.container.setAttribute("tabindex", "0"), this.dom.container.setAttribute("role", "application"); var t = "Media content"; "" !== this.contentTitle && (t = this.contentTitle), this.dom.container.setAttribute("aria-label", t), "" !== this.contentDescription && this.dom.container.setAttribute("aria-describedby", "media-description-for-" + this.id), this.disableKeyboardControl || (this.addTabKeyDetection = function (t) { if (t && 9 === t.which) { var e = document.activeElement; o.call(this, this.dom.container), o.call(this, this.dom.playPause), o.call(this, this.dom.volume), o.call(this, this.dom.seekBar), o.call(this, this.dom.fullscreen), this.dom.container && e === this.dom.container ? n.call(this, this.dom.container) : this.dom.playPause && e === this.dom.playPause ? n.call(this, this.dom.playPause) : this.dom.volume && e === this.dom.volume ? n.call(this, this.dom.volume) : this.dom.seekBar && e === this.dom.seekBar ? n.call(this, this.dom.seekBar) : this.dom.fullscreen && e === this.dom.fullscreen ? n.call(this, this.dom.fullscreen) : this.dom.adSkipButton && e === this.dom.adSkipButton && n.call(this, this.dom.adSkipButton) } }.bind(this), document.addEventListener("keyup", this.addTabKeyDetection), this.removeFocusToContainer = o.bind(this, this.dom.container), this.dom.container.addEventListener("blur", this.removeFocusToContainer), this.bindKeyboard = function (t) { var e = this.getCurrentTime(), i = this.getVolume(); l.default.showChrome.call(this); var a = void 0, s = void 0; switch (t.which) { case 32: t.preventDefault(), (this.getAdOnStage() && this.getAdLinear() ? this.getAdPaused() : this.getPaused()) ? this.play() : this.pause(); break; case 70: t.preventDefault(), this.hideFullscreen || this.castConnected || this.audioOnly || d.default.fullscreenInteraction.call(this); break; case 37: if (t.preventDefault(), this.hasAdUI) break; if (this.isVod && !this.hideSeekBar && -1 < e) { var r = e - 1e4; h.default.castingAPIAvailable.call(this) ? (this.remotePlayer.currentTime = r / 1e3, this.remotePlayerController.seek()) : this.seekTo(r) } break; case 39: if (t.preventDefault(), this.hasAdUI) break; if (this.isVod && !this.hideSeekBar && -1 < e) { var n = e + 1e4; h.default.castingAPIAvailable.call(this) ? (this.remotePlayer.currentTime = n / 1e3, this.remotePlayerController.seek()) : this.seekTo(n) } break; case 38: t.preventDefault(), a = i <= .9 ? i + .1 : 1, h.default.castingAPIAvailable.call(this) ? (this.remotePlayer.isMuted && this.remotePlayerController.muteOrUnmute(), this.remotePlayer.volumeLevel = a, this.remotePlayerController.setVolumeLevel()) : (this.getMute() && this.setMute(!1), this.setVolume(a), this.currentVolume = this.getVolume()), c.default.writeToLocalStorage.call(this, this.currentVolume); break; case 40: t.preventDefault(), s = .1 < i ? i - .1 : 0, h.default.castingAPIAvailable.call(this) ? (this.remotePlayer.isMuted && this.remotePlayerController.muteOrUnmute(), this.remotePlayer.volumeLevel = s, this.remotePlayerController.setVolumeLevel()) : (this.getMute() && this.setMute(!1), this.setVolume(s), this.currentVolume = this.getVolume()), c.default.writeToLocalStorage.call(this, this.currentVolume); break; case 77: if (t.preventDefault(), h.default.castingAPIAvailable.call(this)) this.remotePlayerController.muteOrUnmute(); else { var o = 0; this.getMute() ? (this.setMute(!1), o = this.getVolume()) : this.setMute(!0), c.default.writeToLocalStorage.call(this, o) } } }.bind(this), this.dom.container.addEventListener("keyup", this.bindKeyboard), this.dom.container.addEventListener("keydown", s.default.preventKeyDown)), this.dom.video.setAttribute("tabindex", "-1") }, i.default = r }, { "../../cast/cast": 22, "../../fw/fw": 53, "../resize/resize": 36, "../ui/core-ui": 41, "../volume/volume": 48 }], 24: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a = n(t("../../fw/fw")), s = n(t("../../fw/env")), r = n(t("../ui/core-ui")); function n(t) { return t && t.__esModule ? t : { default: t } } var o = {}; o.init = function () { var t = document.createElement("div"); a.default.setClass(t, "rmp-i rmp-i-minus"), this.dom.outline.appendChild(t), a.default.addEvent(["click", "touchend"], t, function (t) { t && (t.stopPropagation(), "touchend" === t.type && t.preventDefault()), r.default.showChrome.call(this), this.currentVolume = this.getVolume(), this.currentVolume <= 0 || (this.currentVolume <= 1 && 0 < this.currentVolume && (this.currentVolume = this.currentVolume - .1, this.currentVolume < 0 && (this.currentVolume = 0)), this.setVolume(this.currentVolume)) }.bind(this)); var e = document.createElement("div"); a.default.setClass(e, "rmp-i rmp-i-plus"), this.dom.outline.appendChild(e), a.default.addEvent(["click", "touchend"], e, function (t) { t && (t.stopPropagation(), "touchend" === t.type && t.preventDefault()), r.default.showChrome.call(this), this.currentVolume = this.getVolume(), 1 <= this.currentVolume || (this.currentVolume < 1 && 0 <= this.currentVolume && (this.currentVolume += .1, 1 < this.currentVolume && (this.currentVolume = 1)), this.setVolume(this.currentVolume)) }.bind(this)), s.default.isIos[0] && a.default.hide([t, e]) }, i.default = o }, { "../../fw/env": 52, "../../fw/fw": 53, "../ui/core-ui": 41 }], 25: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var r = P(t("../fw/fw")), s = P(t("../fw/env")), n = P(t("../vtt/thumbnails")), o = P(t("./modules/chapters")), l = P(t("./playback")), d = P(t("./ready")), h = P(t("./audio-only/audio-only")), c = P(t("./events")), u = P(t("./seek/seek")), f = P(t("./modules/quality")), p = P(t("./modules/speed")), m = P(t("./modules/sharing")), v = P(t("./volume/volume")), g = P(t("../ads/scheduler")), y = P(t("./resize/resize")), b = P(t("./accessible/accessible")), S = P(t("./ui/indicator")), E = P(t("./ui/core-ui")), A = P(t("./utils/error")), C = P(t("./dvr/dvr")), a = P(t("../abr/hls")), k = P(t("../abr/shaka")), w = P(t("../analytics/mux")); function P(t) { return t && t.__esModule ? t : { default: t } } var _ = { destroyVideo: function () { this.dom.video && (this.dom.video.removeEventListener("loadstart", this.loadstartFn), this.dom.video.removeEventListener("durationchange", this.durationchangeFn), this.dom.video.removeEventListener("loadedmetadata", this.loadedmetadataFn), this.dom.video.removeEventListener("loadeddata", this.loadeddataFn), this.dom.video.removeEventListener("progress", this.progressFn), this.dom.video.removeEventListener("playing", this.playingFn), this.dom.video.removeEventListener("waiting", this.waitingFn), this.dom.video.removeEventListener("seeking", this.seekingFn), this.dom.video.removeEventListener("seeked", this.seekedFn), this.dom.video.removeEventListener("pause", this.pauseFn), this.dom.video.removeEventListener("play", this.playFn), this.dom.video.removeEventListener("timeupdate", this.timeupdateFn), this.dom.video.removeEventListener("webkitbeginfullscreen", this.webkitbeginfullscreenFn), this.dom.video.removeEventListener("webkitendfullscreen", this.webkitendfullscreenFn), this.dom.video.removeEventListener("volumechange", this.volumechangeFn)) } }, L = function () { this.dom.centralMobileUI = document.createElement("div"), this.dom.centralMobileUI.className = "rmp-mobile-central-ui rmp-mobile-show-play rmp-color-bg", this.dom.centralMobileUIIcon = document.createElement("span"), this.dom.centralMobileUIIcon.className = "rmp-i rmp-i-play", this.dom.centralMobileUI.appendChild(this.dom.centralMobileUIIcon), this.dom.container.appendChild(this.dom.centralMobileUI), this.onMobileStartAutoHideCentralUI = function () { this.dom.container.removeEventListener("playing", this.onMobileStartAutoHideCentralUI), this.dom.container.removeEventListener("adloaded", this.onMobileStartAutoHideCentralUI), this.dom.container.removeEventListener("aderror", this.onMobileStartAutoHideCentralUI), r.default.removeClass(this.dom.centralMobileUI, "rmp-mobile-show-play") }.bind(this), this.dom.container.addEventListener("playing", this.onMobileStartAutoHideCentralUI), this.dom.container.addEventListener("adloaded", this.onMobileStartAutoHideCentralUI), this.dom.container.addEventListener("aderror", this.onMobileStartAutoHideCentralUI) }; _.prepare = function () { (this.readingDash || this.readingHlsJS || this.readingHlsShaka) && (this.readingMse = !0), (this.readingMse || this.readingOutstream) && (this.readingPDorNative = !1), this.readingMse && s.default.isMacosSafari[0] && this.ads && "rmp-vast" === this.adParser && (this.ads = !1), s.default.isMobile && (r.default.addClass(this.dom.container, "rmp-hide-central-play"), L.call(this)), function () { if (this.dom.loadingSpin = document.createElement("div"), this.dom.loadingSpin.className = "rmp-loading-spin rmp-color-bg", "s1" === this.skin || "s3" === this.skin) { var t = document.createElement("div"); t.className = "rmp-loading-spin-bounce rmpBounce1 rmp-color-bg-button"; var e = document.createElement("div"); e.className = "rmp-loading-spin-bounce rmpBounce2 rmp-color-bg-button", this.dom.loadingSpin.appendChild(t), this.dom.loadingSpin.appendChild(e) } else { var i = document.createElement("div"); i.className = "rmp-loading-spin-circle"; for (var a = 1; a < 13; a++) { var s = document.createElement("div"); s.className = "rmp-circle rmp-circle-" + a, i.appendChild(s) } this.dom.loadingSpin.appendChild(i) } this.dom.container.appendChild(this.dom.loadingSpin), r.default.hideAria(this.dom.loadingSpin) }.call(this), function () { this.dom.overlayButton = document.createElement("div"), this.dom.overlayButton.className = "rmp-overlay-button rmp-color-bg", this.dom.overlayButtonIcon = document.createElement("span"), this.dom.overlayButtonIcon.className = "rmp-i rmp-i-play", this.dom.overlayButton.appendChild(this.dom.overlayButtonIcon), this.dom.container.appendChild(this.dom.overlayButton), r.default.hideAria(this.dom.overlayButton) }.call(this), this.hideControls && E.default.protoHideControls.call(this), this.hideCentralPlayButton && r.default.addClass(this.dom.container, "rmp-hide-central-play"), this.hideCentralBuffering && r.default.addClass(this.dom.container, "rmp-hide-central-buffering"), this.hideExternalPlayerLabels && r.default.addClass(this.dom.container, "rmp-no-hint"), this.dom.video.controls = !1, this.loop && (this.dom.video.loop = "loop"), "" !== this.crossorigin && this.dom.video.setAttribute("crossorigin", this.crossorigin), this.dom.video.setAttribute("x-webkit-airplay", "allow"), this.audioOnly || ("boolean" == typeof this.dom.video.playsInline ? s.default.isIpad && this.ads && "ima" === this.adParser || this.dom.video.setAttribute("playsinline", !0) : s.default.isMobile && this.dom.video.setAttribute("webkit-playsinline", !0)), s.default.isAndroidWebView && (this.dom.video.poster = r.default.blackFrame), this.readingPDorNative ? this.dom.video.preload = this.preload : "none" !== this.preload && (this.readingHlsJS ? (a.default.init.call(this), this.msePreloadRequested = !0) : (this.readingDash || this.readingHlsShaka) && (k.default.init.call(this), this.msePreloadRequested = !0)), this.dom.video.defaultPlaybackRate = 1, this.useVideoTitle && this.dom.video.setAttribute("title", this.videoTitle), this.loadstartFn = c.default.loadstart.bind(this), this.dom.video.addEventListener("loadstart", this.loadstartFn), this.durationchangeFn = c.default.durationchange.bind(this), this.dom.video.addEventListener("durationchange", this.durationchangeFn), this.loadedmetadataFn = c.default.loadedmetadata.bind(this), this.dom.video.addEventListener("loadedmetadata", this.loadedmetadataFn), this.loadeddataFn = c.default.loadeddata.bind(this), this.dom.video.addEventListener("loadeddata", this.loadeddataFn), this.progressFn = c.default.progress.bind(this), this.dom.video.addEventListener("progress", this.progressFn), this.playingFn = c.default.playing.bind(this), this.dom.video.addEventListener("playing", this.playingFn), this.waitingFn = c.default.waiting.bind(this), this.unstalledBuffer = function () { this.dom.container.removeEventListener("playing", this.unstalledBuffer), E.default.hideLoadingSpin.call(this), r.default.createStdEvent("buffernotstalledanymore", this.dom.container) }.bind(this), this.dom.video.addEventListener("waiting", this.waitingFn), this.seekingFn = c.default.seeking.bind(this), this.dom.video.addEventListener("seeking", this.seekingFn), this.seekedFn = c.default.seeked.bind(this), this.dom.video.addEventListener("seeked", this.seekedFn), this.isVod && (this.ended = c.default.ended.bind(this), this.dom.video.addEventListener("ended", this.ended)), c.default.auxiliaryEvents.call(this), this.dom.content = document.createElement("div"), r.default.addClass(this.dom.content, "rmp-content"), r.default.hideAria(this.dom.content), this.dom.content.appendChild(this.dom.video), this.dom.container.insertBefore(this.dom.content, this.dom.container.firstChild), "" !== this.contentDescription && (this.dom.contentDescription = document.createElement("label"), r.default.hide(this.dom.contentDescription), r.default.setText(this.dom.contentDescription, this.contentDescription), this.dom.contentDescription.id = "media-description-for-" + this.id, this.dom.content.appendChild(this.dom.contentDescription)), this.muxData && w.default.initHTML5.call(this), r.default.createStdEvent("htmlmediaelementappendedtodom", this.dom.container) }; var T = function () { this.dom.container.removeEventListener("adloaded", this.onIosStartShowFS), this.dom.container.removeEventListener("aderror", this.onIosStartShowFS), this.dom.container.removeEventListener("playing", this.onIosStartShowFS), r.default.removeClass(this.dom.fullscreen, "rmp-no-display"), "ima" === this.adParser && s.default.isIphone && this.adDisableCustomPlaybackForIOS10Plus && (this.onIphone10PlusHideFS = function (t) { t && ("adcontentpauserequested" === t.type ? r.default.addClass(this.dom.fullscreen, "rmp-no-display") : "adcontentresumerequested" === t.type && r.default.removeClass(this.dom.fullscreen, "rmp-no-display")) }.bind(this), this.dom.container.addEventListener("adcontentpauserequested", this.onIphone10PlusHideFS), this.dom.container.addEventListener("adcontentresumerequested", this.onIphone10PlusHideFS)) }; _.append = function () { var e = this; r.default.addClass(this.dom.container, "rmp-preparing"), this.dom.container.addEventListener("contextmenu", r.default.contextMenuInteraction), this.readingPDorNative && (this.generateError = A.default.mediaTag.bind(this), this.dom.video.addEventListener("error", this.generateError, !0)); var t = ""; if (t += '<div class="rmp-outline rmp-color-bg rmp-force-invisibility"><div class="rmp-play-pause rmp-i rmp-i-play"></div><div class="rmp-time-elapsed rmp-color-bg"><span class="rmp-time-elapsed-text"></span></div>', t += '<div class="rmp-seek-bar"><div class="rmp-time-total"><div class="rmp-loaded"></div><div class="rmp-current rmp-color-bg-button"></div>', s.default.isMobile || this.isLive || (t += '<div class="rmp-indicator rmp-color-bg"><span class="rmp-time-indicator"></span></div>'), t += '<div class="rmp-handle rmp-color-bg-button"></div></div></div> <div class="rmp-duration rmp-color-bg"></div>', t += '<div class="rmp-volume rmp-i rmp-i-volume-up"><div class="rmp-background-volume rmp-color-bg"><div class="rmp-volume-bar"></div><div class="rmp-current-volume rmp-color-bg-button"><div class="rmp-handle-volume rmp-color-bg-button"></div></div></div></div><div class="rmp-fullscreen rmp-i rmp-i-resize-full"></div></div>', this.dom.container.insertAdjacentHTML("beforeend", t), this.ads && "ima" === this.adParser && !this.adImaDai) { this.dom.video.parentNode.insertAdjacentHTML("afterend", '<div class="rmp-ad-container"></div>'), this.dom.adContainer = this.dom.container.getElementsByClassName("rmp-ad-container")[0] } this.dom.outline = this.dom.container.getElementsByClassName("rmp-outline")[0], (this.readingMse && this.msePreloadRequested || this.readingPDorNative && "none" !== this.preload) && r.default.removeClass(this.dom.outline, "rmp-force-invisibility"), this.dom.playPause = this.dom.container.getElementsByClassName("rmp-play-pause")[0], b.default.makeAccessible.call(this, this.dom.playPause, "Play", !1), this.dom.volume = this.dom.container.getElementsByClassName("rmp-volume")[0], b.default.makeAccessible.call(this, this.dom.volume, "Volume", !0), this.dom.fullscreen = this.dom.container.getElementsByClassName("rmp-fullscreen")[0], this.hideFullscreen && r.default.addClass(this.dom.fullscreen, "rmp-no-display"), s.default.isIos[0] && this.ads && !this.hideFullscreen && (r.default.addClass(this.dom.fullscreen, "rmp-no-display"), this.onIosStartShowFS = T.bind(this), this.dom.container.addEventListener("adloaded", this.onIosStartShowFS), this.dom.container.addEventListener("aderror", this.onIosStartShowFS), this.dom.container.addEventListener("playing", this.onIosStartShowFS)), this.dom.timeElapsed = this.dom.container.getElementsByClassName("rmp-time-elapsed")[0], this.dom.timeElapsedText = this.dom.container.getElementsByClassName("rmp-time-elapsed-text")[0], this.isLiveDvr && (r.default.addEvent(["touchend", "click"], this.dom.timeElapsed, C.default.setLiveMode.bind(this)), C.default.resyncAfterLivePause.call(this)), r.default.hideAria(this.dom.timeElapsed), this.dom.seekBar = this.dom.container.getElementsByClassName("rmp-seek-bar")[0], this.hideSeekBar && r.default.addClass(this.dom.seekBar, "rmp-no-display"), b.default.makeAccessible.call(this, this.dom.seekBar, "Seek", !1), this.dom.duration = this.dom.container.getElementsByClassName("rmp-duration")[0], r.default.hideAria(this.dom.duration), this.pauseFn = c.default.pause.bind(this), this.dom.video.addEventListener("pause", this.pauseFn), this.playFn = c.default.play.bind(this), this.dom.video.addEventListener("play", this.playFn), this.isLive || (this.dom.current = this.dom.container.getElementsByClassName("rmp-current")[0], this.dom.handle = this.dom.container.getElementsByClassName("rmp-handle")[0], this.dom.timetotal = this.dom.container.getElementsByClassName("rmp-time-total")[0], this.dom.seekBar.addEventListener("touchend", u.default.touchend.bind(this)), this.dom.seekBar.addEventListener("touchmove", u.default.touchmove.bind(this), !!s.default.hasPassiveEventListeners && { passive: !0 }), this.mouseupDoc = u.default.mouseupDoc.bind(this), this.mousemoveDoc = u.default.mousemoveDoc.bind(this), this.dom.timetotal.addEventListener("mousedown", function (t) { t && t.stopPropagation(), e.draggingTimeCursor = !0, document.addEventListener("mouseup", e.mouseupDoc), document.addEventListener("mousemove", e.mousemoveDoc) })), this.timeupdateFn = c.default.timeupdate.bind(this), this.dom.video.addEventListener("timeupdate", this.timeupdateFn), this.dom.currentVolume = this.dom.container.getElementsByClassName("rmp-current-volume")[0]; var i = this.dom.container.querySelector(".rmp-background-volume"); this.dom.volumeBar = this.dom.container.getElementsByClassName("rmp-volume-bar")[0], r.default.addEvent(["touchend", "click"], this.dom.volume, v.default.volumeInteraction.bind(this)), this.volumechangeFn = v.default.change.bind(this), this.dom.video.addEventListener("volumechange", this.volumechangeFn); var a = !0; (this.permanentMuted || s.default.isMobile || this.adOutStreamSkin) && (a = !1), a && (this.dom.volume.addEventListener("mouseenter", function (t) { t && t.stopPropagation(), r.default.fadeIn(i) }), this.dom.volume.addEventListener("mouseleave", function (t) { t && t.stopPropagation(), r.default.fadeOut(i) })), i.addEventListener("click", v.default.setHtml5Volume.bind(this)), this.readingMp4 && 1 < this.src.mp4.length && f.default.setUpMP4UI.call(this), this.nav && p.default.init.call(this), this.sharing && this.sharingUrl && m.default.init.call(this), this.hasNativeFullscreenSupport ? (!s.default.isIos[0] || s.default.isIos[0] && s.default.isIpad && 11 < s.default.isIos[1] ? (this.fullscreenchange = y.default.fullscreenchange.bind(this), document.addEventListener("fullscreenchange", this.fullscreenchange), this.fullscreenerror = y.default.fullscreenerror.bind(this), document.addEventListener("fullscreenerror", this.fullscreenerror)) : (this.webkitbeginfullscreenFn = y.default.webkitbeginfullscreen.bind(this), this.dom.video.addEventListener("webkitbeginfullscreen", this.webkitbeginfullscreenFn), this.webkitendfullscreenFn = y.default.webkitendfullscreen.bind(this), this.dom.video.addEventListener("webkitendfullscreen", this.webkitendfullscreenFn)), r.default.addEvent(["touchend", "click"], this.dom.fullscreen, y.default.fullscreenButtonInteraction.bind(this))) : this.fullWindowMode && r.default.addEvent(["touchend", "click"], this.dom.fullscreen, y.default.fullscreenButtonInteraction.bind(this)), b.default.makeAccessible.call(this, this.dom.fullscreen, "Enter fullscreen", !0), s.default.isMobile || this.isLive || (this.dom.indicator = this.dom.container.getElementsByClassName("rmp-indicator")[0], S.default.init.call(this)), this.showChrome = E.default.showChrome.bind(this), this.dom.container.addEventListener("mousemove", this.showChrome), this.initiatePlayback = l.default.init.bind(this), r.default.addEvent(["touchend", "click"], this.dom.playPause, this.initiatePlayback), r.default.addEvent(["touchend", "click"], this.dom.overlayButton, this.initiatePlayback), s.default.isMobile && r.default.addEvent(["touchend", "click"], this.dom.centralMobileUI, this.initiatePlayback), this.containerTouch = function (t) { t && t.stopPropagation(), this.touchRmp = !0, E.default.showChrome.call(this) }.bind(this), r.default.addEvent("touchend", this.dom.container, this.containerTouch), this.containerClick = function (t) { if (this.get5Ready() && !this.touchRmp) { if (t && t.stopPropagation(), this.getAdOnStage() && this.getAdLinear()) return; if (this.video360 && !this.firstPlay) return; this.initiatePlayback() } }.bind(this), r.default.addEvent("click", this.dom.container, this.containerClick), r.default.addEvent(["touchend", "click"], this.dom.outline, function (t) { t && (t.stopPropagation(), "touchend" === t.type && t.preventDefault()), E.default.showChrome.call(this) }.bind(this)), s.default.isMobile || (this.dom.outline.addEventListener("mouseenter", function (t) { t && t.stopPropagation(), e.forceResetTimer = !0 }), this.dom.outline.addEventListener("mouseleave", function (t) { t && t.stopPropagation(), e.forceResetTimer = !1 })), this.audioOnly && h.default.init.call(this), this.ads && this.adScheduleInput && g.default.init.call(this), this.isVod && ("" !== this.chaptersLoc && o.default.init.call(this), "" !== this.seekBarThumbnailsLoc && r.default.cssPropertySupport("backgroundImage") && r.default.cssPropertySupport("backgroundPosition") ? n.default.init.call(this) : this.seekBarThumbnailsLoc = "", 0 < this.quickRewind && function () { r.default.addClass(this.dom.container, "rmp-quick-rewind-ui"), this.dom.quickRewind = document.createElement("div"); var t = "5"; 7.5 < this.quickRewind && this.quickRewind < 20 ? t = "10" : 20 < this.quickRewind && (t = "30"), this.dom.quickRewind.className = "rmp-quick-rewind rmp-i rmp-i-quick-rewind-" + t, r.default.addEvent(["touchend", "click"], this.dom.quickRewind, function (t, e) { if (e && (e.stopPropagation(), "touchend" === e.type && e.preventDefault()), "number" == typeof t && 0 < t) { var i = this.getCurrentTime(), a = 1e3 * t; a < i && this.seekTo(i - a) } }.bind(this, parseInt(t))), this.dom.outline.appendChild(this.dom.quickRewind) }.call(this)), d.default.init.call(this) }, i.default = _ }, { "../abr/hls": 3, "../abr/shaka": 4, "../ads/scheduler": 10, "../analytics/mux": 13, "../fw/env": 52, "../fw/fw": 53, "../vtt/thumbnails": 58, "./accessible/accessible": 23, "./audio-only/audio-only": 24, "./dvr/dvr": 26, "./events": 27, "./modules/chapters": 28, "./modules/quality": 31, "./modules/sharing": 32, "./modules/speed": 33, "./playback": 34, "./ready": 35, "./resize/resize": 36, "./seek/seek": 39, "./ui/core-ui": 41, "./ui/indicator": 42, "./utils/error": 44, "./volume/volume": 48 }], 26: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a, s = t("../../fw/fw"), r = (a = s) && a.__esModule ? a : { default: a }; var n = { setLiveModeUI: function () { this.dvrLiveMode = !0, this.dom.current.style.width = "100%", this.dom.handle.style.left = "100%", r.default.removeClass(this.dom.container, "rmp-dvr-rec"), r.default.setText(this.dom.duration, this.labels.hint.live) }, setLiveMode: function (t) { if (t && (t.stopPropagation(), "touchend" === t.type && t.preventDefault()), !this.dvrLiveMode) { n.setLiveModeUI.call(this); var e = this.hlsJS.liveSyncPosition; ("number" != typeof e || e <= 0) && (e = this.hlsJSLevelDuration), 0 < e && r.default.setMediaCurrentTime(this.dom.video, e) } }, resyncAfterLivePause: function () { var e = 0; this.pauseDvr = function () { this.dvrLiveMode && (e = r.default.getMediaCurrentTime(this.dom.video), this.dom.container.removeEventListener("pause", this.pauseDvr), this.dom.container.addEventListener("playing", this.playingDvr), this.dom.container.addEventListener("seeking", this.seekingDvr)) }.bind(this), this.playingDvr = function () { this.dom.container.removeEventListener("seeking", this.seekingDvr), this.dom.container.removeEventListener("playing", this.playingDvr); var t = r.default.getMediaDuration(this.dom.video) - this.hlsJSLevelDuration; r.default.isNumber(t) && r.default.isNumber(e) && this.dvrSeekTo(1e3 * (e - t)), this.dom.container.addEventListener("pause", this.pauseDvr) }.bind(this), this.seekingDvr = function () { this.dom.container.removeEventListener("seeking", this.seekingDvr), this.dom.container.removeEventListener("playing", this.playingDvr), this.dom.container.addEventListener("pause", this.pauseDvr) }.bind(this), this.dom.container.addEventListener("pause", this.pauseDvr) } }; i.default = n }, { "../../fw/fw": 53 }], 27: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var d = c(t("../fw/fw")), a = c(t("../fw/env")), s = c(t("./ui/core-ui")), r = c(t("./dvr/dvr")), n = c(t("../ads/ima-ads")), o = c(t("../playlist/related")), l = c(t("../playlist/playlist")), h = c(t("../cast/cast")); function c(t) { return t && t.__esModule ? t : { default: t } } var u = {}, f = function () { var t = this.dom.video, e = d.default.getMediaDuration(t), i = 0, a = t.buffered, s = t.buffered.length, r = d.default.getMediaCurrentTime(t), n = 0; try { for (var o = s - 1; 0 <= o; o--)if (r >= a.start(o)) { n = o; break } 0 < s && d.default.isNumber(e) && (i = a.end(n) / e * 100) } catch (t) { return void d.default.trace(t) } if (d.default.isNumber(i)) { var l = { width: i + "%" }; d.default.setStyle(this.dom.loaded, l) } }; u.loadstart = function () { d.default.createStdEvent("loadstart", this.dom.container) }, u.durationchange = function () { var t = this.getDuration(); -1 < t && (t /= 1e3, this.isLiveDvr || d.default.setText(this.dom.duration, d.default.readableTime(t))), this.isLiveDvr && this.dvrLiveMode && d.default.setText(this.dom.duration, this.labels.hint.live), this.firstDurationChange && !h.default.connectedAPIAvailable.call(this) && (this.firstDurationChange = !1, this.isVod ? d.default.setText(this.dom.timeElapsedText, "00:00") : (d.default.setText(this.dom.timeElapsedText, this.labels.hint.live), this.isLiveDvr && r.default.setLiveModeUI.call(this))), d.default.createStdEvent("durationchange", this.dom.container) }, u.loadedmetadata = function () { this.hasLoadedMetadata = !0, d.default.createStdEvent("loadedmetadata", this.dom.container) }, u.loadeddata = function () { void 0 === this.dom.loaded && (this.dom.loaded = this.dom.container.getElementsByClassName("rmp-loaded")[0]), f.call(this), d.default.createStdEvent("loadeddata", this.dom.container) }, u.progress = function () { void 0 === this.dom.loaded && (this.dom.loaded = this.dom.container.getElementsByClassName("rmp-loaded")[0]), f.call(this), d.default.createStdEvent("progress", this.dom.container) }, u.playing = function () { s.default.hideLoadingSpin.call(this), d.default.createStdEvent("playing", this.dom.container) }, u.waiting = function () { s.default.showLoadingSpin.call(this), d.default.createStdEvent("waiting", this.dom.container), this.readingMse || (this.firstBufferStalledEvent || (this.dom.container.addEventListener("playing", this.unstalledBuffer), d.default.createStdEvent("bufferstalled", this.dom.container)), this.firstBufferStalledEvent = !1) }, u.seeking = function () { d.default.createStdEvent("seeking", this.dom.container) }, u.seeked = function () { s.default.hideLoadingSpin.call(this), s.default.showChrome.call(this), d.default.createStdEvent("seeked", this.dom.container) }; u.ended = function () { this.loop || (this.getPaused() || this.pause(), this.ads && ("ima" === this.adParser && (this.contentCompleteCalled = !0, n.default.contentCompleteAds.call(this)), this.onAdStartedPostRollUpdateCentralUI = function () { this.dom.container.removeEventListener("adstarted", this.onAdStartedPostRollUpdateCentralUI), this.isVod && (d.default.hasClass(this.dom.overlayButtonIcon, "rmp-i-replay") && (d.default.removeClass(this.dom.overlayButtonIcon, "rmp-i-replay"), d.default.addClass(this.dom.overlayButtonIcon, "rmp-i-play")), a.default.isMobile && d.default.hasClass(this.dom.centralMobileUIIcon, "rmp-i-replay") && (d.default.removeClass(this.dom.centralMobileUIIcon, "rmp-i-replay"), d.default.addClass(this.dom.centralMobileUIIcon, "rmp-i-pause"))) }.bind(this), this.dom.container.addEventListener("adstarted", this.onAdStartedPostRollUpdateCentralUI)), this.dom.poster && ("" !== this.endOfVideoPoster && this.endOfVideoPoster !== this.poster && this.setPoster(this.endOfVideoPoster), d.default.show(this.dom.poster)), d.default.removeClass(this.dom.overlayButtonIcon, "rmp-i-play"), d.default.addClass(this.dom.overlayButtonIcon, "rmp-i-replay"), a.default.isMobile && (d.default.removeClass(this.dom.centralMobileUIIcon, "rmp-i-play"), d.default.removeClass(this.dom.centralMobileUIIcon, "rmp-i-pause"), d.default.addClass(this.dom.centralMobileUIIcon, "rmp-i-replay"))), this.hasRelated && this.relatedUpNextAutoplay && (this.relatedEndedLoop || !this.relatedEndedLoop && void 0 !== this.relatedList[this.currentRelatedIndex + 1]) && (d.default.removeClass(this.dom.relatedSkipPreview, "rmp-force-show"), o.default.load.call(this, this.currentRelatedIndex + 1, null)), this.hasPlaylist && this.playlistUpNextAutoplay && (this.playlistEndedLoop || !this.playlistEndedLoop && void 0 !== this.playlistList[this.currentPlaylistIndex + 1]) && l.default.load.call(this, this.currentPlaylistIndex + 1, null), d.default.createStdEvent("ended", this.dom.container) }, u.auxiliaryEvents = function () { var e = this;["canplay", "canplaythrough", "ratechange"].forEach(function (t) { e.dom.video.addEventListener(t, function () { d.default.createStdEvent(t, e.dom.container) }) }) }, u.pause = function () { d.default.addClass(this.dom.playPause, "rmp-i-play"), d.default.removeClass(this.dom.playPause, "rmp-i-pause"), a.default.isMobile && (d.default.removeClass(this.dom.centralMobileUIIcon, "rmp-i-pause"), d.default.addClass(this.dom.centralMobileUIIcon, "rmp-i-play"), d.default.addClass(this.dom.centralMobileUI, "rmp-mobile-show-play")), s.default.showCentralPlay.call(this), s.default.showChrome.call(this), d.default.updateAriaLabel(this.dom.playPause, "Play"), d.default.createStdEvent("pause", this.dom.container) }, u.play = function () { d.default.addClass(this.dom.playPause, "rmp-i-pause"), d.default.removeClass(this.dom.playPause, "rmp-i-play"), a.default.isMobile && (d.default.removeClass(this.dom.centralMobileUI, "rmp-mobile-show-play"), d.default.removeClass(this.dom.centralMobileUIIcon, "rmp-i-play"), d.default.addClass(this.dom.centralMobileUIIcon, "rmp-i-pause")), this.isVod && (d.default.hasClass(this.dom.overlayButtonIcon, "rmp-i-replay") && (d.default.removeClass(this.dom.overlayButtonIcon, "rmp-i-replay"), d.default.addClass(this.dom.overlayButtonIcon, "rmp-i-play")), a.default.isMobile && d.default.hasClass(this.dom.centralMobileUIIcon, "rmp-i-replay") && (d.default.removeClass(this.dom.centralMobileUIIcon, "rmp-i-replay"), d.default.addClass(this.dom.centralMobileUIIcon, "rmp-i-pause"))), d.default.hide(this.dom.poster), s.default.hideCentralPlay.call(this), d.default.updateAriaLabel(this.dom.playPause, "Pause"), d.default.createStdEvent("play", this.dom.container) }, u.timeupdate = function () { if (this.isLive || this.isLiveDvr && this.dvrLiveMode) d.default.createStdEvent("timeupdate", this.dom.container); else { if (this.dom.video && this.dom.current && this.dom.handle && this.dom.timeElapsedText && !this.draggingTimeCursor && !this.touchDown) { var t = void 0, e = void 0; if (h.default.castingAPIAvailable.call(this)) { var i = h.default.getCurrentTime.call(this); e = -1 < i ? Math.round(i / 1e3) : i, t = Math.round(h.default.getDuration.call(this) / 1e3) } else if (t = d.default.getMediaDuration(this.dom.video), e = d.default.getMediaCurrentTime(this.dom.video), this.isLiveDvr) { var a = t - this.hlsJSLevelDuration; t = this.hlsJSLevelDuration, e -= a } if (d.default.isNumber(t) && 0 < t && d.default.isNumber(e) && 0 <= e) { var s = 100 / t * e; this.dom.current.style.width = s + "%", this.dom.handle.style.left = s + "%"; var r = void 0, n = void 0; this.isLiveDvr ? (n = this.dom.duration, r = "-" + d.default.readableTime(t - e), this.dvrCurrentTime = e) : (n = this.dom.timeElapsedText, r = d.default.readableTime(e)), d.default.setText(n, r) } } if (!h.default.connectedAPIAvailable.call(this) && this.hasRelated && 0 < this.relatedUpNextOffset) { var o = this.getCurrentTime(), l = this.getDuration(); if (-1 < o && -1 < l) l - o <= 1e3 * this.relatedUpNextOffset ? this.getAdOnStage() && this.getAdLinear() ? d.default.removeClass(this.dom.relatedSkipPreview, "rmp-force-show") : (d.default.createStdEvent("mousemove", this.dom.container), d.default.addClass(this.dom.relatedSkipPreview, "rmp-force-show")) : d.default.removeClass(this.dom.relatedSkipPreview, "rmp-force-show") } d.default.createStdEvent("timeupdate", this.dom.container) } }, i.default = u }, { "../ads/ima-ads": 7, "../cast/cast": 22, "../fw/env": 52, "../fw/fw": 53, "../playlist/playlist": 55, "../playlist/related": 56, "./dvr/dvr": 26, "./ui/core-ui": 41 }], 28: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var p = a(t("../../fw/fw")), m = a(t("./modules")); function a(t) { return t && t.__esModule ? t : { default: t } } var s = {}, v = function (t, e) { e && (e.stopPropagation(), "touchend" === e.type && e.preventDefault()), this.seekTo(t) }, r = function (t) { for (var e = t.split(/\r\n|\r|\n/g), i = /^\s*$/, a = [], s = 0, r = e.length; s < r; s++)i.test(e[s]) || a.push(e[s]); if (/WEBVTT/i.test(a[0])) { a.shift(); for (var n = /^\s*\d*?:?\d*?:?\d+(\.\d+)?\s*-->\s*\d*?:?\d*?:?\d+(\.\d+)?\s*$/, o = 0, l = a.length; o < l; o++)if (a[o] && a[o + 1] && n.test(a[o])) { var d = a[o].split("--\x3e"), h = a[o + 1]; if (2 === d.length) { var c = d[0].trim(), u = d[1].trim(), f = c.replace(/\.\d+/i, ""); /^00:/i.test(f) && 5 < f.length && (f = f.replace(/^00:/i, "")), this.chaptersArray.push({ start: 1e3 * p.default.dateToSeconds(c), end: 1e3 * p.default.dateToSeconds(u), title: h + " " + this.uiSeparator + " " + f }) } } 0, this.onLoadedmetadaAddChapters = function () { this.dom.container.removeEventListener("loadedmetadata", this.onLoadedmetadaAddChapters); var t = this.getDuration(); if (0 < t && 0 < this.chaptersArray.length) { m.default.append.call(this, "chapters"), m.default.appendOverlay.call(this, "chapters"), m.default.deferredShow.call(this, "chapters"); for (var e = 0, i = this.chaptersArray.length; e < i; e++) { var a = this.chaptersArray[e].start; if (!(t <= a)) { var s = document.createElement("div"); p.default.setClass(s, "rmp-overlay-level rmp-color-bg rmp-chapters-text"), p.default.setText(s, this.chaptersArray[e].title), p.default.addEvent(["touchend", "click"], s, v.bind(this, a)), this.dom.chaptersOverlayLevelsArea.appendChild(s) } } this.hasChapters = !0 } }.bind(this), this.hasLoadedMetadata ? this.onLoadedmetadaAddChapters() : this.dom.container.addEventListener("loadedmetadata", this.onLoadedmetadaAddChapters) } }; s.init = function () { var e = this; p.default.ajax(this.chaptersLoc, this.ajaxTimeout, this.ajaxWithCredentials, "GET").then(function (t) { "string" == typeof t && r.call(e, t) }).catch(function (t) { p.default.trace(t) }) }, i.default = s }, { "../../fw/fw": 53, "./modules": 30 }], 29: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var d = a(t("../../fw/fw")), h = a(t("../ui/core-ui")), c = a(t("../accessible/accessible")); function a(t) { return t && t.__esModule ? t : { default: t } } var s = {}, n = function (t, e, i, a) { this.dom[t] = document.createElement("div"); var s = t.toLowerCase(); s = s.replace(/\s+/g, "-"), this.dom[t].className = "rmp-" + s + " rmp-module rmp-color-bg"; var r = document.createElement("div"); r.className = "rmp-module-button"; var n = document.createElement("span"); n.className = "rmp-custom-module-icon"; var o = ".rmp-" + s + " .rmp-custom-module-icon {background-image: url(" + e + ")}"; o += ".rmp-" + s + " .rmp-custom-module-icon:hover {background-image: url(" + i + ")}", d.default.appendStyle(o), r.appendChild(n), this.dom[t].appendChild(r), this.dom.container.appendChild(this.dom[t]); var l = h.default.appendHint(t); this.dom[t].appendChild(l), c.default.makeAccessible.call(this, this.dom[t], t, !0), d.default.addEvent(["touchend", "click"], this.dom[t], function (t, e) { e && (e.stopPropagation(), "touchend" === e.type && e.preventDefault()), h.default.showChrome.call(this), t() }.bind(this, a)) }; s.filter = function () { var e = []; this.customModule.forEach(function (t) { "string" == typeof t.hint && "string" == typeof t.svg && "function" == typeof t.callback && ("string" != typeof t.svgHover && (t.svgHover = t.svg), e.push(t)) }), this.customModule = e }, s.init = function () { var r = this; this.customModule.forEach(function (t) { var e = t.hint, i = t.svg, a = t.svgHover, s = t.callback; n.call(r, e, i, a, s) }) }, i.default = s }, { "../../fw/fw": 53, "../accessible/accessible": 23, "../ui/core-ui": 41 }], 30: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var r = s(t("../../fw/fw")), n = s(t("../../fw/env")), o = s(t("../ui/core-ui")), a = s(t("../resize/resize")); function s(t) { return t && t.__esModule ? t : { default: t } } var l = { types: ["quality", "sharing", "audio", "captions", "speed", "related", "chapters"], destroy: function (t) { r.default.removeElement(this.dom[t]), r.default.removeElement(this.dom[t + "Overlay"]) } }; l.open = function (t, e) { var i = this; e && (e.stopPropagation(), "touchend" === e.type && e.preventDefault()), this.getPaused() ? (r.default.removeClass(this.dom[t + "OverlayPlayPause"], "rmp-i-pause"), r.default.addClass(this.dom[t + "OverlayPlayPause"], "rmp-i-play")) : (r.default.removeClass(this.dom[t + "OverlayPlayPause"], "rmp-i-play"), r.default.addClass(this.dom[t + "OverlayPlayPause"], "rmp-i-pause")), function () { r.default.addClass(this.dom.logoImg, "rmp-no-display"), r.default.addClass(this.dom.contentTitle, "rmp-no-display"); for (var t = this.dom.container.querySelectorAll(".rmp-hint"), e = 0, i = t.length; e < i; e++)r.default.hide(t[e]); l.hide.call(this), r.default.addClass(this.dom.outline, "rmp-no-display"), o.default.disableCentralUI.call(this), this.googleCast && this.castConnected && r.default.addClass(this.dom.container, "rmp-casting-module-overlay-open"), this.video360 && r.default.addClass(this.dom.ui360, "rmp-no-display") }.call(this), "related" === t ? (a.default.related.call(this), setTimeout(function () { a.default.related.call(i) }, 401)) : setTimeout(function () { a.default.closeModule.call(i, t) }, 401), r.default.fadeIn(this.dom[t + "Overlay"]) }; var d = function () { for (var t = this.dom.container.querySelectorAll(".rmp-hint"), e = 0, i = t.length; e < i; e++)r.default.show(t[e]); r.default.removeClass(this.dom.logoImg, "rmp-no-display"), r.default.removeClass(this.dom.contentTitle, "rmp-no-display"), l.show.call(this), r.default.removeClass(this.dom.outline, "rmp-no-display"), o.default.enableCentralUI.call(this), this.googleCast && r.default.removeClass(this.dom.container, "rmp-casting-module-overlay-open"), this.video360 && r.default.removeClass(this.dom.ui360, "rmp-no-display"), o.default.showChrome.call(this) }; l.close = function (t, e, i) { var a = this; i && (i.stopPropagation(), "touchend" === i.type && i.preventDefault()), 1 === e ? (r.default.hide(this.dom[t + "Overlay"]), r.default.fadeOut(this.dom[t + "Overlay"]), setTimeout(function () { r.default.show(a.dom[t + "Overlay"]) }, 401), d.call(this)) : (r.default.fadeOut(this.dom[t + "Overlay"]), setTimeout(function () { d.call(a) }, e)) }, l.playPause = function (t, e) { e && (e.stopPropagation(), "touchend" === e.type && e.preventDefault()), this.getPaused() ? (r.default.removeClass(this.dom[t + "OverlayPlayPause"], "rmp-i-play"), r.default.addClass(this.dom[t + "OverlayPlayPause"], "rmp-i-pause"), this.play()) : (r.default.removeClass(this.dom[t + "OverlayPlayPause"], "rmp-i-pause"), r.default.addClass(this.dom[t + "OverlayPlayPause"], "rmp-i-play"), this.pause()) }, l.closeAll = function () { for (var t = 0, e = l.types.length; t < e; t++)l.close.call(this, l.types[t], 1, null) }, l.hide = function () { for (var t = this.dom.container.querySelectorAll(".rmp-module"), e = 0, i = t.length; e < i; e++)r.default.addClass(t[e], "rmp-no-display") }, l.show = function () { for (var t = this.dom.container.querySelectorAll(".rmp-module"), e = 0, i = t.length; e < i; e++)r.default.removeClass(t[e], "rmp-no-display") }; l.deferredShow = function (t) { (function () { for (var t = 0, e = l.types.length; t < e; t++)if (r.default.isVisible(this.dom[l.types[t] + "Overlay"])) return !0; return !1 }.call(this) || this.getAdOnStage() && this.getAdLinear()) && r.default.addClass(this.dom[t], "rmp-no-display"), r.default.show(this.dom[t]) }, l.append = function (t) { var e = this; this.dom[t] = document.createElement("div"), n.default.isMobile || (this.dom[t].addEventListener("mouseenter", function (t) { t && t.stopPropagation(), e.forceResetTimer = !0 }), this.dom[t].addEventListener("mouseleave", function (t) { t && t.stopPropagation(), e.forceResetTimer = !1 })), this.dom[t].className = "rmp-" + t + " rmp-module rmp-color-bg"; var i = document.createElement("div"); i.className = "rmp-module-button"; var a = void 0; "cast" === t ? a = document.createElement("google-cast-launcher") : (a = document.createElement("span")).className = "rmp-i rmp-i-" + t, i.appendChild(a), this.dom[t].appendChild(i), this.dom.container.appendChild(this.dom[t]), r.default.hideAria(this.dom[t]), r.default.hide(this.dom[t]); var s = o.default.appendHint(this.labels.hint[t]); this.dom[t].appendChild(s) }, l.appendOverlay = function (t) { this.dom[t + "Overlay"] = document.createElement("div"), this.dom[t + "Overlay"].className = "rmp-module-overlay", r.default.hideAria(this.dom[t + "Overlay"]), this.dom[t + "Overlay"].addEventListener("touchend", r.default.stopPropagation), this.dom[t + "Overlay"].addEventListener("click", r.default.stopPropagation), this.dom.container.appendChild(this.dom[t + "Overlay"]), this.dom[t + "OverlayWrapper"] = document.createElement("div"), this.dom[t + "OverlayWrapper"].className = "rmp-overlay-wrapper", this.dom[t + "Overlay"].appendChild(this.dom[t + "OverlayWrapper"]); var e = document.createElement("div"); e.className = "rmp-overlay-title"; var i = this.labels.hint[t]; "sharing" === t && "" !== this.contentTitle && (i += " " + this.uiSeparator + " " + this.contentTitle); var a = document.createElement("span"); a.className = "rmp-overlay-title-text", r.default.setText(a, i), e.appendChild(a), this.dom[t + "OverlayWrapper"].appendChild(e), this.dom[t + "OverlayPlayPause"] = document.createElement("span"), this.dom[t + "OverlayPlayPause"].className = "rmp-i rmp-module-overlay-icons rmp-module-overlay-play-pause", r.default.addEvent(["touchend", "click"], this.dom[t + "OverlayPlayPause"], l.playPause.bind(this, t)), this.dom[t + "Overlay"].appendChild(this.dom[t + "OverlayPlayPause"]); var s = document.createElement("span"); s.className = "rmp-i rmp-i-close rmp-module-overlay-icons rmp-module-overlay-close", r.default.addEvent(["touchend", "click"], s, l.close.bind(this, t, 400)), this.dom[t + "Overlay"].appendChild(s), this.dom[t + "OverlayLevelsArea"] = document.createElement("div"), "related" !== t && (this.dom[t + "OverlayLevelsArea"].className = "rmp-overlay-levels-area"), this.dom[t + "OverlayWrapper"].appendChild(this.dom[t + "OverlayLevelsArea"]), r.default.addEvent(["touchend", "click"], this.dom[t], l.open.bind(this, t)) }, l.setActiveLevel = function (t, e) { if (this.dom[t + "OverlayLevelsArea"]) { var i = this.dom[t + "OverlayLevelsArea"].querySelectorAll(".rmp-overlay-level"); if (0 < i.length) { for (var a = 0, s = i.length; a < s; a++)r.default.removeClass(i[a], "rmp-overlay-level-active"); r.default.addClass(i[e], "rmp-overlay-level-active"), o.default.showChrome.call(this) } } }, i.default = l }, { "../../fw/env": 52, "../../fw/fw": 53, "../resize/resize": 36, "../ui/core-ui": 41 }], 31: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var s = a(t("../../fw/fw")), r = a(t("./modules")); function a(t) { return t && t.__esModule ? t : { default: t } } var n = { destroy: function () { this.readingMp4 ? this.dom.container && this.dom.container.removeEventListener("srcchanged", this.afterMp4BitrateSwitch) : this.readingHlsJS ? this.dom.container && this.dom.container.removeEventListener("playing", this.hlsJSUnstalledBuffer) : (this.readingDash || this.readingHlsShaka) && this.shakaPlayer && this.shakaPlayer.removeEventListener("buffering", this.shakaUnstalledBuffer), r.default.destroy.call(this, "quality") } }; n.setMp4Bitrate = function (t) { this.dom.container.removeEventListener("srcchanged", this.afterMp4BitrateSwitch); var e = this.getCurrentTime(); -1 === e && (e = 0), this.afterMp4BitrateSwitch = function (t, e) { this.dom.container.removeEventListener("srcchanged", this.afterMp4BitrateSwitch), r.default.setActiveLevel.call(this, "quality", e), this.getPlayerInitialized() && (this.play(), 0 < t && this.seekTo(t)) }.bind(this, e, t), this.dom.container.addEventListener("srcchanged", this.afterMp4BitrateSwitch), this.setSrcPDModule = !0, this.setSrc(this.src.mp4[t]), this.setSrcPDModule = !1 }; n.setUpMP4UI = function () { var t = function (t, e) { var i = t; if (1 < e && 1 === i.length && "auto" === i[0]) switch (e) { case 2: i = ["Low", "High"]; break; case 3: i = ["Low", "Medium", "High"]; break; case 4: i = ["Low", "Medium", "High", "Highest"]; break; case 5: i = ["Lowest", "Medium", "High", "Higher", "Highest"]; break; case 6: default: i = ["Lowest", "Lower", "Medium", "High", "Higher", "Highest"] }return i }(this.labels.bitrates.renditions, this.src.mp4.length); r.default.append.call(this, "quality"), r.default.appendOverlay.call(this, "quality"); for (var e = 0; e < this.src.mp4.length; e++) { var i = document.createElement("div"); e === this.initialBitrate ? (s.default.setClass(i, "rmp-overlay-level rmp-overlay-level-active rmp-color-bg rmp-q" + e), i.setAttribute("data-src", this.src.mp4[this.initialBitrate])) : (s.default.setClass(i, "rmp-overlay-level rmp-color-bg rmp-q" + e), i.setAttribute("data-src", this.src.mp4[e])); var a = void 0; a = t[e] ? t[e].toString() : "Bitrate " + e, s.default.setText(i, a), s.default.addEvent(["touchend", "click"], i, n.setMp4Bitrate.bind(this, e)), this.dom.qualityOverlayLevelsArea.appendChild(i) } }, n.setUpAbrUI = function () { r.default.append.call(this, "quality"), r.default.appendOverlay.call(this, "quality"), r.default.deferredShow.call(this, "quality"), this.dom.qualityAuto = document.createElement("div"), this.dom.qualityAuto.className = "rmp-overlay-level rmp-color-bg rmp-overlay-level-active rmp-q0", this.dom.qualityAuto.textContent = this.labels.bitrates.auto, this.dom.qualityOverlayLevelsArea.appendChild(this.dom.qualityAuto) }, i.default = n }, { "../../fw/fw": 53, "./modules": 30 }], 32: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var S = s(t("../../fw/fw")), E = s(t("../../fw/env")), a = s(t("./modules")), A = s(t("../utils/utils")); function s(t) { return t && t.__esModule ? t : { default: t } } var r = {}; r.init = function () { var t = function (t) { for (var e = ["facebook", "twitter", "googleplus", "linkedin", "reddit", "email"], i = [], a = 0, s = t.length; a < s; a++)-1 === e.indexOf(t[a]) && i.push(a); if (0 < i.length) for (var r = i.length - 1; 0 <= r; r--)t.splice(i[r], 1); return t }(this.sharingNetworks); a.default.append.call(this, "sharing"), a.default.appendOverlay.call(this, "sharing"), function (t) { var e = document.createElement("div"); if (e.className = "rmp-sharing-social", -1 < t.indexOf("facebook")) { var i = document.createElement("span"); i.className = "rmp-i rmp-i-facebook rmp-sharing-social-icons"; var a = "https://www.facebook.com/sharer/sharer.php?u=" + encodeURIComponent(this.sharingUrl); S.default.addEvent(["touchend", "click"], i, A.default.openUrl.bind(this, a)), e.appendChild(i) } if (-1 < t.indexOf("twitter")) { var s = document.createElement("span"); s.className = "rmp-i rmp-i-twitter rmp-sharing-social-icons"; var r = "https://twitter.com/share?url=" + encodeURIComponent(this.sharingUrl); S.default.addEvent(["touchend", "click"], s, A.default.openUrl.bind(this, r)), e.appendChild(s) } if (-1 < t.indexOf("linkedin")) { var n = document.createElement("span"); n.className = "rmp-i rmp-i-linkedin rmp-sharing-social-icons"; var o = "https://www.linkedin.com/shareArticle?mini=true&url=" + encodeURIComponent(this.sharingUrl); S.default.addEvent(["touchend", "click"], n, A.default.openUrl.bind(this, o)), e.appendChild(n) } if (-1 < t.indexOf("googleplus")) { var l = document.createElement("span"); l.className = "rmp-i rmp-i-gplus rmp-sharing-social-icons"; var d = "https://plus.google.com/share?url=" + encodeURIComponent(this.sharingUrl); S.default.addEvent(["touchend", "click"], l, A.default.openUrl.bind(this, d)), e.appendChild(l) } if (-1 < t.indexOf("reddit")) { var h = document.createElement("span"); h.className = "rmp-i rmp-i-reddit rmp-sharing-social-icons"; var c = "https://www.reddit.com/submit?url=" + encodeURIComponent(this.sharingUrl); S.default.addEvent(["touchend", "click"], h, A.default.openUrl.bind(this, c)), e.appendChild(h) } if (-1 < t.indexOf("email")) { var u = document.createElement("span"); u.className = "rmp-i rmp-i-email rmp-sharing-social-icons", S.default.addEvent(["touchend", "click"], u, function () { window.location.href = "mailto:?body=" + encodeURIComponent(this.sharingUrl) }.bind(this)), e.appendChild(u) } this.dom.sharingOverlayLevelsArea.appendChild(e); var f = document.createElement("div"); f.className = "rmp-sharing-link"; var p = '<span class="rmp-i rmp-i-link"></span>'; if (p += '<label for="rmp-sharing-link-' + this.id + '">Link to media</label>', p += '<input class="rmp-sharing-input" aria-label="Link to media" id="rmp-sharing-link-' + this.id + '" type="text" value="' + this.sharingUrl + '">', f.innerHTML = p, this.dom.sharingOverlayLevelsArea.appendChild(f), "" !== this.sharingCode) { this.sharingCode = this.sharingCode.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"); var m = document.createElement("div"); m.className = "rmp-sharing-code"; var v = '<span class="rmp-i rmp-i-code"></span>'; v += '<label for="rmp-sharing-code-' + this.id + '">Embed code for media</label>', v += '<input class="rmp-sharing-input" aria-label="Embed code for media" id="rmp-sharing-code-' + this.id + '" type="text" value="' + this.sharingCode + '">', m.innerHTML = v, this.dom.sharingOverlayLevelsArea.appendChild(m) } if (!E.default.isMobile && this.dom.sharingOverlay) for (var g = this.dom.sharingOverlay.querySelectorAll(".rmp-sharing-input"), y = 0, b = g.length; y < b; y++)S.default.addEvent("click", g[y], S.default.selectText.bind(null, g[y])) }.call(this, t) }, i.default = r }, { "../../fw/env": 52, "../../fw/fw": 53, "../utils/utils": 46, "./modules": 30 }], 33: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var o = s(t("../../fw/fw")), l = s(t("../ui/core-ui")), a = s(t("./modules")); function s(t) { return t && t.__esModule ? t : { default: t } } var r = {}, n = function (t, e) { e && (e.stopPropagation(), "touchend" === e.type && e.preventDefault()); var i = this.dom.speedOverlayLevelsArea.querySelectorAll(".rmp-overlay-level"); if (0 < i.length && i[t]) { var a = i[t], s = a.textContent; if ("string" == typeof s && "" !== s) { s = parseFloat(s.replace("x", "")), this.setPlaybackRate(s); for (var r = 0, n = i.length; r < n; r++)o.default.removeClass(i[r], "rmp-overlay-level-active"); o.default.addClass(a, "rmp-overlay-level-active") } l.default.showChrome.call(this) } }; r.init = function () { a.default.append.call(this, "speed"), a.default.appendOverlay.call(this, "speed"); for (var t = 0, e = this.navRates.length; t < e; t++) { var i = document.createElement("div"); 1 === this.navRates[t] ? o.default.setClass(i, "rmp-overlay-level rmp-color-bg rmp-overlay-level-active") : o.default.setClass(i, "rmp-overlay-level rmp-color-bg"), o.default.setText(i, "x" + this.navRates[t]), o.default.addEvent(["touchend", "click"], i, n.bind(this, t)), this.dom.speedOverlayLevelsArea.appendChild(i) } }, i.default = r }, { "../../fw/fw": 53, "../ui/core-ui": 41, "./modules": 30 }], 34: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a = f(t("../fw/fw")), s = f(t("../fw/env")), r = f(t("../abr/hls")), n = f(t("../abr/shaka")), o = f(t("../ads/ima-ads")), l = f(t("../ads/rmp-vast")), d = f(t("../ads/ads-helpers")), h = f(t("./ui/core-ui")), c = f(t("./utils/utils")), u = f(t("../cast/cast")); function f(t) { return t && t.__esModule ? t : { default: t } } var p = {}, m = function () { this.onAdAutoplaySuccess = function () { var t = this.getAdLinear(); null !== t && (t || !t && "rmp-vast" === this.adParser) && c.default.fireAutoplaySuccess.call(this) }.bind(this), this.dom.container.addEventListener("adstarted", this.onAdAutoplaySuccess), this.onAdAutoplayFailed = function () { c.default.autoplayFailureRestorePlayUI.call(this) }.bind(this), this.dom.container.addEventListener("adinitialplayrequestfailed", this.onAdAutoplayFailed), this.dom.container.addEventListener("adinitialplayrequestsucceeded", this.onAdAutoplaySuccess) }, v = function () { this.startUpLogPlaying = function () { var t = this; a.default.removeEvent("playing", this.dom.container, this.startUpLogPlaying), a.default.removeEvent("adloaded", this.dom.container, this.startUpLogPlaying), setTimeout(function () { t.startUpPlaying = a.default.getNow(), 0 < t.startUpPlay && t.startUpPlaying > t.startUpPlay && (t.startUpTime = t.startUpPlaying - t.startUpPlay), t.firstFrameReached = !0, a.default.createStdEvent("firstframe", t.dom.container), a.default.createStdEvent("startuptimeavailable", t.dom.container) }, 1) }.bind(this), this.dom.container.addEventListener("playing", this.startUpLogPlaying), this.dom.container.addEventListener("adloaded", this.startUpLogPlaying), this.ads && !this.adImaDai ? (this.autoplay && m.call(this), function () { this.emptyInitAdTagUrl ? c.default.playPromise.call(this) : (this.adScheduleInput && (this.adTagUrl = d.default.replaceAdTagVar.call(this, this.adSchedule.preroll)), "ima" === this.adParser ? o.default.requestAds.call(this, this.adTagUrl) : l.default.loadAds.call(this, this.adTagUrl)) }.call(this)) : c.default.playPromise.call(this) }, g = function () { if (this.googleCast) { if (u.default.castingAPIAvailable.call(this)) return void this.remotePlayerController.playOrPause(); if (this.castConnected && "ENDED" === this.remotePlayerState) return void this.loadCastMedia() } if (this.firstPlay) return this.firstPlay = !1, void v.call(this); this.dom.video.paused ? c.default.playPromise.call(this) : this.dom.video.pause() }, y = function () { var t = this; null !== this.processInitiatePlayback && this.dom.container.removeEventListener("loadedmetadata", this.processInitiatePlayback), this.video360 && this.firstPlay && "undefined" == typeof THREE ? setTimeout(function () { y.call(t) }, 10) : this.ads && this.firstPlay && this.adParserLoaded ? g.call(this) : this.getAdOnStage() && this.getAdLinear() && !this.adImaDai ? d.default.playPause.call(this) : this.adOutStream || g.call(this) }; p.init = function (t) { if (t && (t.stopPropagation(), "touchend" === t.type && t.preventDefault()), this.get5Ready()) { if (this.firstPlay) { if (this.ads && !this.adParserLoaded) return void 0; this.startUpPlay = a.default.getNow(), a.default.removeClass(this.dom.outline, "rmp-force-invisibility") } this.playerInitialized || (this.playerInitialized = !0, a.default.hide(this.dom.poster), h.default.showLoadingSpin.call(this), this.ads ? "ima" === this.adParser && this.adDisplayContainer ? (this.adDisplayContainer.initialize(), this.adDCInitialized = !0, s.default.isMobile ? this.dom.video.load() : this.readingMse || this.hasLoadedMetadata || this.dom.video.load()) : "rmp-vast" === this.adParser && this.rmpVast && (this.rmpVast.initialize(), s.default.isMacosSafari[0] || s.default.isMobile || this.readingMse || this.hasLoadedMetadata || this.dom.video.load()) : this.ads || (s.default.isMobile || s.default.isMacosSafari[0] && !this.readingMse || s.default.isMacosSafari[0] && this.readingHlsJS && !this.hasLoadedMetadata ? this.dom.video.load() : this.readingMse || this.hasLoadedMetadata || this.dom.video.load()), this.readingHlsJS ? r.default.init.call(this) : (this.readingDash || this.readingHlsShaka) && n.default.init.call(this)), this.hasLoadedMetadata ? y.call(this) : null === this.processInitiatePlayback && (this.processInitiatePlayback = y.bind(this), this.dom.container.addEventListener("loadedmetadata", this.processInitiatePlayback)) } }, i.default = p }, { "../abr/hls": 3, "../abr/shaka": 4, "../ads/ads-helpers": 6, "../ads/ima-ads": 7, "../ads/rmp-vast": 9, "../cast/cast": 22, "../fw/env": 52, "../fw/fw": 53, "./ui/core-ui": 41, "./utils/utils": 46 }], 35: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a = v(t("../fw/fw")), s = v(t("../fw/env")), r = v(t("../vtt/captions")), n = v(t("../ads/ima-ads")), o = v(t("../ads/rmp-vast")), l = v(t("../ads/ads-helpers")), d = v(t("./resize/resize")), h = v(t("./ui/core-ui")), c = v(t("./ui/logo")), u = v(t("./modules/custom")), f = v(t("../cast/airplay")), p = v(t("./modules/modules")), m = v(t("./utils/utils")); function v(t) { return t && t.__esModule ? t : { default: t } } var g = { dispatchEvent: function () { this.fadeInPlayer && a.default.fadeIn(this.dom.container), a.default.removeClass(this.dom.container, "rmp-preparing"), g.updateTime.call(this), a.default.createStdEvent("ready", this.dom.container) }, updateTime: function () { this.timeReady = a.default.getNow() - this.refTime } }; g.minimalFire = function () { this.playerReady || (this.playerReady = !0, d.default.resize.call(this), g.dispatchEvent.call(this)) }, g.fire = function () { if (!this.playerReady) { this.playerReady = !0, d.default.resize.call(this); var t = "00:00"; if (this.dom.timeElapsed && this.dom.timeElapsedText && (this.isVod || (a.default.addClass(this.dom.timeElapsed, "rmp-i rmp-i-live"), t = this.labels.hint.live), this.dom.timeElapsedText.textContent = t), this.dom.duration) { var e = this.dom.duration.textContent; "string" == typeof e && "" !== e || (this.dom.duration.textContent = t) } if (s.default.isMobile && (this.initialVolume = 1, this.rememberVolume = !1), this.allowLocalStorage || (this.rememberVolume = !1), this.muted) this.setMute(!0); else if (this.rememberVolume && 1 === this.initialVolume && s.default.localStorage(this.allowLocalStorage) && null !== window.localStorage.getItem("rmpVolume")) { var i = JSON.parse(window.localStorage.getItem("rmpVolume")); i.value && (0 === (i = parseFloat(i.value)) ? this.setMute(!0) : i <= 1 && 0 < i && this.setVolume(i)) } else this.initialVolume < 1 && 0 <= this.initialVolume && this.setVolume(this.initialVolume); this.autoplay ? (this.initialAutoplayRequest = !0, this.initiatePlayback()) : h.default.showCentralPlay.call(this), 0 < this.offsetStartPosition && this.isVod && (this.onStartSeekToOffset = function () { this.dom.container.removeEventListener("playing", this.onStartSeekToOffset), this.seekTo(this.offsetStartPosition) }.bind(this), this.dom.container.addEventListener("playing", this.onStartSeekToOffset)), this.adOutStream && (p.default.hide.call(this), a.default.hide([this.dom.seekBar, this.dom.duration, this.dom.timeElapsed])), g.dispatchEvent.call(this), this.adBlockerDetection && !0 === window.rmpGlobals.adBlockerDetected && a.default.createStdEvent("adblockerdetected", this.dom.container), this.hasCC && r.default.initVttJS.call(this) } }; var y = function () { if (this.adBlockerDetection && !0 === window.rmpGlobals.adBlockerDetected && this.adBlockerDetectedPreventPlayback) return a.default.removeElement(this.dom.prerollMask), l.default.onAdBlockDetection.call(this), this.autoplay && m.default.fireAutoplayFailure.call(this), this.offsetStartPosition = 0, void g.fire.call(this); this.dom.prerollMask && (this.onAdOnStageUpdatePrerollMask = function () { var t = this; a.default.removeEvent(["playing", "adloaded", "adstarted", "aderror", "adloadererror", "autoplayfailure"], this.dom.container, this.onAdOnStageUpdatePrerollMask), a.default.clearTimeout(this.prerollMaskRemovalTimeout), this.prerollMaskRemovalTimeout = setTimeout(function () { a.default.hide(t.dom.prerollMask), a.default.removeElement(t.dom.prerollMask) }, 401), a.default.fadeOut(this.dom.prerollMask) }.bind(this), a.default.addEvent(["playing", "adloaded", "adstarted", "aderror", "adloadererror", "autoplayfailure"], this.dom.container, this.onAdOnStageUpdatePrerollMask)), "ima" === this.adParser ? n.default.init.call(this) : o.default.init.call(this) }; g.init = function () { if (this.audioOnly || (this.ads && !this.emptyInitAdTagUrl && h.default.appendPrerollMask.call(this), h.default.appendPoster.call(this)), this.nav && a.default.show(this.dom.speed), this.sharing && a.default.show(this.dom.sharing), this.hasRelated && a.default.show(this.dom.related), this.hasPlaylist && a.default.show([this.dom.playlistLeftArrow, this.dom.playlistRightArrow]), this.readingMp4 && a.default.show(this.dom.quality), void 0 !== this.dom.audio && a.default.show(this.dom.audio), this.airplay && !this.readingDash && f.default.init.call(this), "" !== this.logo && c.default.append.call(this), "" !== this.contentTitle && h.default.appendContentTitle.call(this), Array.isArray(this.customModule) && 0 < this.customModule.length && a.default.isObject(this.customModule[0]) ? (u.default.filter.call(this), 0 < this.customModule.length && u.default.init.call(this)) : this.customModule = [], a.default.createStdEvent("mousemove", this.dom.container), this.ads) if (this.adBlockerDetection) { if ("boolean" == typeof window.rmpGlobals.adBlockerDetected) return void y.call(this); if ("undefined" == typeof fuckAdBlock || "function" != typeof fuckAdBlock.setOption) return window.rmpGlobals.adBlockerDetected = !0, void y.call(this); var t = { debug: !1, checkOnLoad: !1, resetOnEnd: !0, loopCheckTime: 50, loopMaxNumber: 5 }; 0, fuckAdBlock.setOption(t), this.onAdBlockDetected = function () { window.rmpGlobals.adBlockerDetected = !0, y.call(this) }.bind(this), this.onNoAdBlockDetected = function () { window.rmpGlobals.adBlockerDetected = !1, y.call(this) }.bind(this), fuckAdBlock.onDetected(this.onAdBlockDetected), fuckAdBlock.onNotDetected(this.onNoAdBlockDetected), fuckAdBlock.check(!0) } else y.call(this); else g.fire.call(this) }, i.default = g }, { "../ads/ads-helpers": 6, "../ads/ima-ads": 7, "../ads/rmp-vast": 9, "../cast/airplay": 21, "../fw/env": 52, "../fw/fw": 53, "../vtt/captions": 57, "./modules/custom": 29, "./modules/modules": 30, "./resize/resize": 36, "./ui/core-ui": 41, "./ui/logo": 43, "./utils/utils": 46 }], 36: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var C = n(t("../../fw/fw")), o = n(t("../../fw/env")), a = n(t("../ui/core-ui")), s = n(t("../utils/error")), r = n(t("../../360/360")); function n(t) { return t && t.__esModule ? t : { default: t } } var l = {}, d = function () { C.default.removeClass(this.dom.container, "rmp-medium"), C.default.removeClass(this.dom.container, "rmp-small"), C.default.removeClass(this.dom.container, "rmp-extrasmall") }; l.auxResize = function (t) { if (this.isHTML5) { if (t <= 0) return; 0 < t && t < 375 ? (d.call(this), C.default.addClass(this.dom.container, "rmp-extrasmall")) : 0 < t && t < 480 ? (d.call(this), C.default.addClass(this.dom.container, "rmp-small")) : (d.call(this), C.default.addClass(this.dom.container, "rmp-medium")), this.getAdOnStage() && l.resizeAds.call(this), this.video360 && r.default.resize.call(this), this.hasRelated && l.related.call(this), C.default.createStdEvent("resize", this.dom.container) } }, l.resizeAds = function () { var t = -1, e = -1; if (this.isInFullscreen) if (this.hasNativeFullscreenSupport) t = C.default.getScreenWidth(), e = C.default.getScreenHeight(); else if (this.fullWindowMode) { var i = o.default.getViewportSize(); t = i.width, e = i.height } if ("rmp-vast" === this.adParser && this.rmpVast && "function" == typeof this.rmpVast.resizeAd) this.isInFullscreen ? 0 < t && 0 < e && (this.hasNativeFullscreenSupport ? this.rmpVast.resizeAd(t, e, "fullscreen") : this.fullWindowMode && this.rmpVast.resizeAd(t, e, "normal")) : this.rmpVast.resizeAd(this.width, this.height, "normal"); else if ("ima" === this.adParser && this.adsManager && "function" == typeof this.adsManager.resize) try { this.isInFullscreen ? 0 < t && 0 < e && (this.hasNativeFullscreenSupport ? this.adsManager.resize(t, e, google.ima.ViewMode.FULLSCREEN) : this.fullWindowMode && this.adsManager.resize(t, e, google.ima.ViewMode.NORMAL)) : this.adsManager.resize(this.width, this.height, google.ima.ViewMode.NORMAL) } catch (t) { C.default.trace(t) } }, l.closeModule = function (t) { var e = this.getPlayerWidth(), i = this.dom[t + "OverlayLevelsArea"].clientWidth, a = Math.round(e); if (this.dom[t + "Overlay"]) { var s = this.dom[t + "Overlay"].querySelector(".rmp-module-overlay-close"); null !== s && (s.style.right = i < a ? (12 + a - i).toString() + "px" : "12px") } }; l.related = function () { if (this.get5Ready() && this.dom.relatedOverlayLevelsArea && this.dom.relatedOverlay) { for (var t = this.dom.relatedOverlayLevelsArea.querySelectorAll(".rmp-related-item"), e = [], i = 0, a = 0, s = t.length; a < s; a++)a !== this.currentRelatedIndex ? (e.push(t[a]), C.default.show(t[a])) : C.default.hide(t[a]); (function (t) { if (this.dom.relatedOverlay) { for (var e = this.dom.relatedOverlay.querySelectorAll(".rmp-related-up-next"), i = 0, a = e.length; i < a; i++)C.default.hide(e[i]); var s = this.currentRelatedIndex + 1; if (void 0 === t[this.currentRelatedIndex + 1] && (s = 0), t[s]) { var r = t[s].querySelector(".rmp-related-up-next"); null !== r && C.default.show(r) } } }).call(this, t); var r = this.dom.relatedOverlay.querySelector(".rmp-overlay-title"), n = 12; null !== r && (n += C.default.getHeight(r)); var o = this.getPlayerWidth(), l = this.dom.relatedOverlayLevelsArea.clientWidth, d = o, h = Math.round(o), c = this.dom.relatedOverlay.querySelector(".rmp-module-overlay-close"); null !== c && (l < h ? ("number" == typeof l && 0 < l && (d = l), c.style.right = (12 + h - l).toString() + "px") : c.style.right = "12px"); var u = 2; C.default.hasClass(this.dom.container, "rmp-medium") && (u = 3); var f = (d - 24 - 12 * (u - 1)) / u, p = 9 * f / 16; if (0 < f && 0 < p) { for (var m = 1, v = 0, g = e.length; v < g; v++) { u * m <= v && m++; var y = e[v], b = v - (m - 1) * u, S = n + 12 + p * (m - 1) + 12 * (m - 1), E = { left: b * f + 12 * (b + 1) + "px", top: S + "px", width: f + "px", height: p + "px" }; C.default.setStyle(y, E), i = S + p } var A = this.dom.relatedOverlayLevelsArea.querySelector(".rmp-related-item-bottom-margin"); null !== A && (A.style.top = i.toString() + "px") } } }, l.fullscreenchange = function () { this.isInFullscreen ? (this.isInFullscreen = !1, C.default.removeClass(this.dom.fullscreen, "rmp-i-resize-small"), C.default.removeClass(this.dom.container, "rmp-fullscreen-on"), C.default.addClass(this.dom.fullscreen, "rmp-i-resize-full"), C.default.updateAriaLabel(this.dom.fullscreen, "Enter fullscreen"), l.resize.call(this), C.default.createStdEvent("exitfullscreen", this.dom.container)) : (this.isInFullscreen = !0, C.default.removeClass(this.dom.fullscreen, "rmp-i-resize-full"), C.default.addClass(this.dom.fullscreen, "rmp-i-resize-small"), C.default.addClass(this.dom.container, "rmp-fullscreen-on"), C.default.updateAriaLabel(this.dom.fullscreen, "Exit fullscreen"), l.auxResize.call(this, C.default.getScreenWidth()), C.default.createStdEvent("enterfullscreen", this.dom.container)) }, l.fullscreenerror = function (t) { C.default.createStdEvent("fullscreenerror", this.dom.container); var e = null; t && (e = t), s.default.warning.call(this, "fullscreenerror", 1003, e) }, l.webkitbeginfullscreen = function () { this.isInFullscreen = !0, C.default.createStdEvent("enterfullscreen", this.dom.container) }, l.webkitendfullscreen = function () { this.isInFullscreen = !1, l.resize.call(this), C.default.createStdEvent("exitfullscreen", this.dom.container) }, l.resize = function (t) { if (this.isInFullscreen) { if (this.fullWindowMode) { var e = o.default.getViewportSize(); return void (-1 < e.width && -1 < e.height && this.setPlayerSize(e.width, e.height)) } o.default.isIos[0] || l.auxResize.call(this, C.default.getScreenWidth()) } else { var i = this.dom.container.parentNode; if (i) if (this.iframeMode) { if (this.width = C.default.getTrueWidth(i), this.height = C.default.getTrueHeight(i), t) { C.default.setStyle(this.dom.container, { width: "100%", height: "100%" }) } l.auxResize.call(this, this.width) } else { var a = 0, s = 0, r = C.default.getTrueWidth(i); 0, r >= this.initialWidth ? (a = this.initialWidth, s = this.initialHeight) : s = (a = r) / this.initialAspectRatio, 0 === a || 0 === s ? (this.autoHeightMode && (this.autoHeightMode = !1, this.initialWidth = 640, this.initialHeight = 360, this.initialAspectRatio = 1.7777777778), this.width = this.initialWidth, this.height = this.initialHeight, a = this.initialWidth + "px", s = this.initialHeight + "px") : (this.width = a, this.height = s, this.autoHeightMode ? a = "100%" : (this.audioOnly && (s = 40), a += "px"), s += "px"); var n = { width: a, height: s }; C.default.setStyle(this.dom.container, n), l.auxResize.call(this, this.width) } } }, l.fullscreenInteraction = function () { var t = this; if (this.hasNativeFullscreenSupport) this.isInFullscreen ? this.ads && "rmp-vast" === this.adParser && this.getAdOnStage() && this.getAdLinear() && this.rmpVast && "function" == typeof this.rmpVast.getVastPlayer ? o.default.exitFullscreen(this.rmpVast.getVastPlayer()) : o.default.exitFullscreen(this.dom.video) : this.ads && "rmp-vast" === this.adParser && this.getAdOnStage() && this.getAdLinear() && this.rmpVast && "function" == typeof this.rmpVast.getVastPlayer ? o.default.requestFullscreen(this.dom.container, this.rmpVast.getVastPlayer()) : o.default.requestFullscreen(this.dom.container, this.dom.video); else if (this.fullWindowMode) { var e = -1, i = -1; if (this.isInFullscreen) this.isInFullscreen = !1, e = this.initialWidth, i = this.initialHeight, C.default.removeClass(this.dom.fullscreen, "rmp-i-resize-small"), C.default.addClass(this.dom.fullscreen, "rmp-i-resize-full"), C.default.removeClass(this.dom.container, "rmp-full-window-on"), C.default.updateAriaLabel(this.dom.fullscreen, "Enter fullscreen"), C.default.createStdEvent("exitfullscreen", this.dom.container), this.setPlayerSize(e, i), setTimeout(function () { l.resize.call(t) }, 1); else { var a = o.default.getViewportSize(); if (!(-1 < a.width && -1 < a.height)) return; e = a.width, i = a.height, this.isInFullscreen = !0, C.default.removeClass(this.dom.fullscreen, "rmp-i-resize-full"), C.default.addClass(this.dom.fullscreen, "rmp-i-resize-small"), C.default.addClass(this.dom.container, "rmp-full-window-on"), C.default.updateAriaLabel(this.dom.fullscreen, "Exit fullscreen"), C.default.createStdEvent("enterfullscreen", this.dom.container), this.setPlayerSize(e, i) } } }, l.fullscreenButtonInteraction = function (t) { t && (t.stopPropagation(), "touchend" === t.type && t.preventDefault()), a.default.showChrome.call(this), l.fullscreenInteraction.call(this) }; l.initialSizing = function () { this.throttledResize = function (t) { var e = this; t && ("orientationchange" === t.type ? (C.default.clearTimeout(this.orientationChangeResizeTimeout), this.orientationChangeResizeTimeout = setTimeout(function () { l.resize.call(e) }, 200)) : "resize" === t.type && null === this.throttledResizeTimeout && (C.default.clearTimeout(this.throttledResizeTimeout), this.throttledResizeTimeout = setTimeout(function () { l.resize.call(e), e.throttledResizeTimeout = null }, 66))) }.bind(this), window.addEventListener("resize", this.throttledResize), window.addEventListener("orientationchange", this.throttledResize), this.iframeMode && this.autoHeightMode && (this.autoHeightMode = !1); var t = this.dom.container.parentNode; this.iframeMode ? (this.width = C.default.getTrueWidth(t), this.height = C.default.getTrueHeight(t)) : this.autoHeightMode ? (this.width = C.default.getTrueWidth(t), this.height = this.width / this.autoHeightModeRatio) : (this.width = parseInt(this.width, 10), this.height = parseInt(this.height, 10)), this.initialWidth = this.width, this.initialHeight = this.height, this.initialAspectRatio = this.initialWidth / this.initialHeight, this.autoHeightMode && (this.initialWidth = 999999, this.initialAspectRatio = this.autoHeightModeRatio), l.resize.call(this, !0) }, i.default = l }, { "../../360/360": 1, "../../fw/env": 52, "../../fw/fw": 53, "../ui/core-ui": 41, "../utils/error": 44 }], 37: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var l = a(t("../../fw/fw")), d = a(t("../ready")), h = a(t("../utils/utils")); function a(t) { return t && t.__esModule ? t : { default: t } } var s = { init: function () { this.dom.video = null, this.isHTML5 = !1, this.googleCast = !1; var t = document.createElement("div"); l.default.setClass(t, "rmp-no-play"); var e = document.createElement("div"); l.default.setClass(e, "rmp-no-play-text"); var i = document.createElement("div"); l.default.setText(i, this.labels.error.noSupportMessage), e.appendChild(i); var a = void 0; if (this.hasMp4 && (a = this.src.mp4[0]), !this.audioOnly && a && this.isVod && "" !== this.labels.error.noSupportDownload) { var s = document.createElement("div"), r = document.createElement("a"); r.href = a, r.download = "true", l.default.setClass(r, "rmp-dl-link"), l.default.setText(r, this.labels.error.noSupportDownload), s.appendChild(r), e.appendChild(s) } if (!this.audioOnly && "" !== this.labels.error.noSupportInstallChrome) { var n = document.createElement("div"), o = void 0; "" !== this.labels.error.noSupportInstallChromeLink ? ((o = document.createElement("a")).href = this.labels.error.noSupportInstallChromeLink, o.target = "_blank", l.default.setClass(o, "rmp-dl-link")) : o = document.createElement("span"), l.default.setText(o, this.labels.error.noSupportInstallChrome), n.appendChild(o), e.appendChild(n) } t.appendChild(e), this.dom.container.appendChild(t), this.autoplay && h.default.fireAutoplayFailure.call(this), d.default.minimalFire.call(this) } }; i.default = s }, { "../../fw/fw": 53, "../ready": 35, "../utils/utils": 46 }], 38: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a = l(t("../../fw/fw")), s = l(t("../../fw/env")), r = l(t("./runNoSupport")), n = l(t("../../core/utils/utils")), o = l(t("../../core/dom")); function l(t) { return t && t.__esModule ? t : { default: t } } var d = {}, h = function () { a.default.createStdEvent("hlslevelswitching", this.dom.container) }, c = function () { s.default.isIos[0] && 10 < s.default.isIos[1] || s.default.isMacosSafari[0] && 10 < s.default.isMacosSafari[1] ? function () { this.readingHls = !0, this.readingHlsHevc = !0, this.startingBitratePath = this.src.hlsHevc, n.default.createNativeSrc.call(this, "hlsHevc"), this.hlsResizeLevelSwitch = h.bind(this), this.dom.video.addEventListener("resize", this.hlsResizeLevelSwitch) }.call(this) : this.okHlsJS && "hlsjs" === this.hlsEngine ? (this.readingHlsJS = !0, this.readingHlsHevc = !0, this.startingBitratePath = this.src.hlsHevc, o.default.prepare.call(this), o.default.append.call(this)) : this.okDash && "shakaplayer" === this.hlsEngine && (this.readingHlsShaka = !0, this.readingHlsHevc = !0, this.startingBitratePath = this.src.hlsHevc, o.default.prepare.call(this), o.default.append.call(this)) }, u = function () { this.readingMp4 = !0, this.readingWebM = !0, this.src.mp4 = this.src.webm, this.initialBitrate = a.default.filterInitialBitrate(this.initialBitrate, this.src.mp4), this.startingBitratePath = this.src.mp4[this.initialBitrate], n.default.createNativeSrc.call(this, "webm") }; d.init = function () { if (s.default.isAndroid[0] && void 0 !== this.dom.video.disableRemotePlayback && (this.dom.video.disableRemotePlayback = !0), this.adOutStream) (function () { this.hasLoadedMetadata = !0, this.readingOutstream = !0, o.default.prepare.call(this), o.default.append.call(this) }).call(this); else if (this.hasDash && this.okDash && this.dashFirst) this.readingDash = !0, this.startingBitratePath = this.src.dash, o.default.prepare.call(this), o.default.append.call(this); else if (this.hasFps && this.okFps) (function () { this.preload = "auto", this.readingHls = !0, this.readingFps = !0, this.startingBitratePath = this.src.fps, n.default.createNativeSrc.call(this, "hls"), this.hlsResizeLevelSwitch = h.bind(this), this.dom.video.addEventListener("resize", this.hlsResizeLevelSwitch) }).call(this); else if (!this.audioOnly && this.hasHlsHevc && this.okHlsHevc) c.call(this); else if (this.hasHls && this.okHlsJS && "hlsjs" === this.hlsEngine) this.readingHlsJS = !0, this.startingBitratePath = this.src.hls, o.default.prepare.call(this), o.default.append.call(this); else if (this.hasHls && this.okDash && "shakaplayer" === this.hlsEngine) this.readingHlsShaka = !0, this.startingBitratePath = this.src.hls, o.default.prepare.call(this), o.default.append.call(this); else if (this.hasHls && this.okHls) (function () { this.readingHls = !0, this.startingBitratePath = this.src.hls, n.default.createNativeSrc.call(this, "hls"), this.hlsResizeLevelSwitch = h.bind(this), this.dom.video.addEventListener("resize", this.hlsResizeLevelSwitch) }).call(this); else if (this.hasDash && this.okDash && !this.dashFirst) this.readingDash = !0, this.startingBitratePath = this.src.dash, o.default.prepare.call(this), o.default.append.call(this); else if (this.audioOnly) if (this.okOgg && this.hasOgg) (function () { this.readingOgg = !0, this.startingBitratePath = this.src.ogg, n.default.createNativeSrc.call(this, "ogg") }).call(this); else if (this.okM4a && this.hasM4a) (function () { this.readingM4a = !0, this.startingBitratePath = this.src.m4a, n.default.createNativeSrc.call(this, "m4a") }).call(this); else { if (!this.okMp3 || !this.hasMp3) return void r.default.init.call(this); (function () { this.readingMp3 = !0, this.startingBitratePath = this.src.mp3, n.default.createNativeSrc.call(this, "mp3") }).call(this) } else this.okWebM && this.hasWebM && this.webmFirst ? u.call(this) : this.okMp4 && this.hasMp4 || this.okMp4Hevc && this.hasMp4Hevc ? function () { this.readingMp4 = !0, this.readingWebM = !1, this.okMp4Hevc && this.hasMp4Hevc && (this.src.mp4 = this.src.mp4Hevc, this.readingMp4Hevc = !0), this.initialBitrate = a.default.filterInitialBitrate(this.initialBitrate, this.src.mp4), this.startingBitratePath = this.src.mp4[this.initialBitrate], this.okMp4Hevc && this.hasMp4Hevc ? n.default.createNativeSrc.call(this, "mp4Hevc") : n.default.createNativeSrc.call(this, "mp4") }.call(this) : this.okWebM && this.hasWebM && !this.webmFirst ? u.call(this) : r.default.init.call(this) }, i.default = d }, { "../../core/dom": 25, "../../core/utils/utils": 46, "../../fw/env": 52, "../../fw/fw": 53, "./runNoSupport": 37 }], 39: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var o = s(t("../../fw/fw")), a = s(t("../ui/core-ui")), l = s(t("../../cast/cast")); function s(t) { return t && t.__esModule ? t : { default: t } } var r = { do: function (t) { var e = void 0, i = void 0, a = void 0; if (l.default.castingAPIAvailable.call(this)) { var s = l.default.getDuration.call(this); i = (e = -1 === s ? -1 : Math.round(s / 1e3)) * t } else if (this.isLiveDvr) { if (e = o.default.getMediaDuration(this.dom.video), !o.default.isNumber(e)) return; (a = e - this.hlsJSLevelDuration) <= 0 && (a = 0), i = this.hlsJSLevelDuration * t + a } else i = (e = o.default.getMediaDuration(this.dom.video)) * t; if (o.default.isNumber(e) && !(e <= 0) && o.default.isNumber(t) && !(i < 0 || e < i)) { this.isLiveDvr && (this.dvrLiveMode = !1, o.default.addClass(this.dom.container, "rmp-dvr-rec"), o.default.setText(this.dom.duration, "-"), o.default.setText(this.dom.timeElapsedText, this.labels.hint.live)); var r = { width: 100 * t + "%" }; o.default.setStyle(this.dom.current, r); var n = { left: 100 * t + "%" }; o.default.setStyle(this.dom.handle, n), l.default.castingAPIAvailable.call(this) ? (this.remotePlayer.currentTime = i, this.remotePlayerController.seek()) : o.default.setMediaCurrentTime(this.dom.video, i) } } }, n = function (t) { var e = void 0; e = 100 <= t ? 100 : t < 0 ? 0 : t; var i = this.getDuration(); if (-1 < i && this.dom.current && this.dom.handle && this.dom.timeElapsedText && this.dom.duration) { this.dom.current.style.width = e + "%", this.dom.handle.style.left = e + "%"; var a = void 0, s = void 0; this.isLiveDvr ? (s = this.dom.duration, a = "-" + o.default.readableTime((i - e / 100 * i) / 1e3)) : (s = this.dom.timeElapsedText, a = o.default.readableTime(e * (i / 1e3) / 100)), o.default.setText(s, a) } }; r.touchend = function (t) { if (t) { t.stopPropagation(), t.preventDefault(); var e = (o.default.getPosXTouch(t) - o.default.getAbsLeft(this.dom.seekBar)) / o.default.getWidth(this.dom.seekBar); if (!o.default.isNumber(e)) return; 1 <= e ? e = 1 : e < 0 && (e = 0), r.do.call(this, e), this.touchDown = !1 } }, r.touchmove = function (t) { t.preventDefault(), this.touchDown = !0, a.default.showChrome.call(this); var e = (o.default.getPosXTouch(t) - o.default.getAbsLeft(this.dom.seekBar)) / o.default.getWidth(this.dom.seekBar) * 100; o.default.isNumber(e) && n.call(this, e) }, r.mouseupDoc = function (t) { if (t) { t.stopPropagation(), this.draggingTimeCursor = !1, document.removeEventListener("mouseup", this.mouseupDoc), document.removeEventListener("mousemove", this.mousemoveDoc); var e = o.default.getPosX(t), i = o.default.getAbsLeft(this.dom.timetotal), a = o.default.getWidth(this.dom.timetotal), s = void 0; s = e < i ? 0 : i + a < e ? .99 : (e - i) / a, r.do.call(this, s) } }, r.mousemoveDoc = function (t) { var e = (o.default.getPosX(t) - o.default.getAbsLeft(this.dom.timetotal)) / o.default.getWidth(this.dom.timetotal) * 100; o.default.isNumber(e) && n.call(this, e) }, i.default = r }, { "../../cast/cast": 22, "../../fw/fw": 53, "../ui/core-ui": 41 }], 40: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a, s = t("../../fw/fw"), r = (a = s) && a.__esModule ? a : { default: a }; var n = {}; n.apply = function () { "" !== this.skinBackgroundColor && "s3" !== this.skin && (-1 === this.skinBackgroundColor.indexOf("rgba") && (this.skinBackgroundColor = "#" + this.skinBackgroundColor), function () { var t = ".rmp-color-bg:not(.rmp-overlay-level-active), .rmp-module-overlay-icons, .rmp-related-duration, .rmp-related-up-next, .rmp-related-title {background: " + this.skinBackgroundColor + ";} "; t += ".rmp-overlay-level { border-color: " + this.skinBackgroundColor + ";} ", t += ".rmp-overlay-level-active { color: " + this.skinBackgroundColor + ";} ", "s4" === this.skin && (t += ".rmp-play-pause, .rmp-ad-info, .rmp-quick-rewind, .rmp-volume, .rmp-fullscreen, .rmp-seek-bar, .rmp-time-elapsed, .rmp-duration, .rmp-related-skip-next, .rmp-overlay-title-text, .rmp-sharing-social-icons { background: " + this.skinBackgroundColor + ";} ", t += ".rmp-overlay-level-active.rmp-abr-active { border-color: " + this.skinBackgroundColor + ";} "), r.default.appendStyle(t) }.call(this)), "" !== this.skinButtonColor && (-1 === this.skinButtonColor.indexOf("rgba") && (this.skinButtonColor = "#" + this.skinButtonColor), function () { var t = ".rmp-color-button, .rmp-time-elapsed-text, .rmp-dvr-rec .rmp-i-live, .rmp-dvr-rec .rmp-i-live .rmp-time-elapsed-text, .rmp-live-dvr.rmp-dvr-rec .rmp-i-live:hover .rmp-time-elapsed-text {color: " + this.skinButtonColor + ";} "; t += ".rmp-color-bg-button, .rmp-circle::before, .rmp-overlay-level-active {background: " + this.skinButtonColor + ";} ", t += ".rmp-overlay-title-text {border-bottom-color: " + this.skinButtonColor + ";} ", "s3" === this.skin && (t += ".rmp-time-total, .rmp-volume-bar, .rmp-overlay-level, .rmp-overlay-level-active.rmp-abr-active { border-color: " + this.skinButtonColor + ";} ", this.hasPlaylist && (t += ".rmp-playlist-side-menu {background: " + this.skinButtonColor + ";}")), this.hasRelated && (t += ".rmp-related-item  {border-color: " + this.skinButtonColor + ";} ", t += ".rmp-related-skip-preview-title, .rmp-related-skip-preview-up-next {color: " + this.skinButtonColor + " !important;}"), r.default.appendStyle(t) }.call(this)), "" !== this.skinAccentColor && (-1 === this.skinAccentColor.indexOf("rgba") && (this.skinAccentColor = "#" + this.skinAccentColor), function () { var t = ".rmp-i:hover, .rmp-module:hover .rmp-i, .rmp-i-live, .rmp-dvr-rec .rmp-i-live:hover, .rmp-i-live, .rmp-overlay-level:hover:not(.rmp-overlay-level-active) {color: " + this.skinAccentColor + ";} "; "s3" === this.skin && (t += ".rmp-overlay-level-active { color: " + this.skinAccentColor + ";} ", t += ".rmp-loaded { background-color: " + this.skinAccentColor + ";} "), t += ".rmp-abr-active {border-color: " + this.skinAccentColor + ";} ", this.hasPlaylist && (t += ".rmp-playlist-item-active .rmp-playlist-item-number {color: " + this.skinAccentColor + ";} ", t += ".rmp-playlist-item-active .rmp-playlist-item-thumbnail {border-color: " + this.skinAccentColor + ";} ", t += ".rmp-playlist-side-menu::-webkit-scrollbar-thumb {background: " + this.skinAccentColor + ";} "), this.hasRelated && (t += ".rmp-related-item:hover {border-color: " + this.skinAccentColor + ";} "), this.ads && (t += ".rmp-ad-current-time {background: " + this.skinAccentColor + ";} "), r.default.appendStyle(t) }.call(this)), this.googleCast && function () { if ("" === this.skinButtonColor) switch (this.skin) { case "s1": case "s2": case "s3": this.skinButtonColor = "rgba(255, 255, 255, 1)"; break; case "s4": this.skinButtonColor = "rgba(0, 0, 0, 1)"; break; default: this.skinButtonColor = "rgba(255, 255, 255, 1)" }if ("" === this.skinAccentColor) switch (this.skin) { case "s1": case "s4": this.skinAccentColor = "rgba(33, 150, 243, 1)"; break; case "s2": this.skinAccentColor = "rgba(255, 193, 7, 1)"; break; case "s3": this.skinAccentColor = "rgba(244, 67, 54, 1)"; break; default: this.skinAccentColor = "rgba(33, 150, 243, 1)" }var t = "google-cast-launcher {--disconnected-color: " + this.skinButtonColor + ";--connected-color: " + this.skinAccentColor + ";} "; t += "google-cast-launcher:hover {--disconnected-color: " + this.skinAccentColor + ";}", r.default.appendStyle(t) }.call(this) }, i.default = n }, { "../../fw/fw": 53 }], 41: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a = n(t("../../fw/fw")), s = n(t("../../fw/env")), r = n(t("../utils/error")); function n(t) { return t && t.__esModule ? t : { default: t } } var o = {}, l = function () { var t = this; a.default.clearInterval(this.chromeTimer), this.chromeTimer = setInterval(function () { !function () { var t = !1; return this.forceResetTimer && (t = !0), this.getAdOnStage() ? this.getAdLinear() && this.getAdPaused() ? t = !0 : !this.getAdLinear() && this.getPaused() && (t = !0) : this.getPaused() && (t = !0), t }.call(t) ? o.hideChrome.call(t) : l.call(t) }, this.delayToFade) }; o.hideChrome = function () { a.default.removeClass(this.dom.container, "rmp-chrome"), a.default.addClass(this.dom.container, "rmp-no-chrome") }, o.showChrome = function () { a.default.removeClass(this.dom.container, "rmp-no-chrome"), a.default.addClass(this.dom.container, "rmp-chrome"), l.call(this) }, o.showCentralPlay = function () { a.default.fadeIn(this.dom.overlayButton), o.hideLoadingSpin.call(this) }, o.hideCentralPlay = function () { a.default.fadeOut(this.dom.overlayButton) }, o.disableCentralUI = function () { s.default.isMobile ? a.default.addClass(this.dom.centralMobileUI, "rmp-no-display") : a.default.addClass(this.dom.overlayButton, "rmp-no-display"), a.default.addClass(this.dom.loadingSpin, "rmp-no-display") }, o.enableCentralUI = function () { s.default.isMobile ? a.default.removeClass(this.dom.centralMobileUI, "rmp-no-display") : a.default.removeClass(this.dom.overlayButton, "rmp-no-display"), a.default.removeClass(this.dom.loadingSpin, "rmp-no-display") }, o.showLoadingSpin = function () { a.default.addClass(this.dom.container, "rmp-waiting"), a.default.fadeIn(this.dom.loadingSpin), o.hideCentralPlay.call(this) }, o.hideLoadingSpin = function () { a.default.removeClass(this.dom.container, "rmp-waiting"), a.default.fadeOut(this.dom.loadingSpin) }, o.protoHideControls = function () { a.default.addClass(this.dom.container, "rmp-hide-controls"), this.controls = !1 }, o.protoShowControls = function () { a.default.removeClass(this.dom.container, "rmp-hide-controls"), o.showChrome.call(this), this.controls = !0 }, o.restorePlayUI = function () { a.default.addClass(this.dom.playPause, "rmp-i-play"), a.default.removeClass(this.dom.playPause, "rmp-i-pause"), s.default.isMobile && (a.default.removeClass(this.dom.centralMobileUIIcon, "rmp-i-pause"), a.default.addClass(this.dom.centralMobileUIIcon, "rmp-i-play"), a.default.addClass(this.dom.centralMobileUI, "rmp-mobile-show-play")), o.showCentralPlay.call(this), a.default.createStdEvent("mousemove", this.dom.container) }, o.appendHint = function (t) { var e = document.createElement("div"); return a.default.setClass(e, "rmp-hint rmp-color-bg"), a.default.setText(e, t), e }, o.appendContentTitle = function () { this.dom.contentTitle = document.createElement("div"), this.dom.contentTitle.className = "rmp-title rmp-color-bg", a.default.hideAria(this.dom.contentTitle), a.default.setText(this.dom.contentTitle, this.contentTitle), this.dom.container && this.dom.outline && this.dom.container.insertBefore(this.dom.contentTitle, this.dom.outline) }, o.appendPrerollMask = function () { this.dom.prerollMask = document.createElement("div"), a.default.setClass(this.dom.prerollMask, "rmp-ad-preroll-mask"), this.dom.prerollMask.style.backgroundColor = "#" + this.backgroundColor, this.dom.content.appendChild(this.dom.prerollMask) }; o.appendPoster = function () { if (this.dom.poster = document.createElement("div"), a.default.setClass(this.dom.poster, "rmp-poster"), this.dom.poster.style.backgroundColor = "#" + this.backgroundColor, this.dom.content.appendChild(this.dom.poster), this.autoplay && a.default.hide(this.dom.poster), this.dom.posterImg = document.createElement("img"), this.dom.posterImg.alt = "Media player poster frame", a.default.setClass(this.dom.posterImg, "rmp-poster-img"), a.default.cssPropertySupport("objectFit")) switch (this.posterScaleMode) { case "letterbox": a.default.addClass(this.dom.posterImg, "rmp-object-fit-contain"); break; case "zoom": a.default.addClass(this.dom.posterImg, "rmp-object-fit-cover"); break; case "stretch": a.default.addClass(this.dom.posterImg, "rmp-object-fit-fill"); break; case "none": a.default.addClass(this.dom.posterImg, "rmp-object-fit-none"); break; default: a.default.addClass(this.dom.posterImg, "rmp-object-fit-contain") } else a.default.addClass(this.dom.posterImg, "rmp-poster-img-no-object-fit"); this.onPosterLoad = function () { this.dom.posterImg.removeEventListener("load", this.onPosterLoad), this.dom.posterImg.removeEventListener("error", this.onPosterError), this.dom.poster.contains(this.dom.posterImg) || this.dom.poster.appendChild(this.dom.posterImg) }.bind(this), this.onPosterError = function (t) { this.dom.posterImg.removeEventListener("load", this.onPosterLoad), this.dom.posterImg.removeEventListener("error", this.onPosterError); var e = null; t && (e = t), r.default.warning.call(this, "failed to load poster at " + this.poster, 1001, e) }.bind(this), this.dom.posterImg.addEventListener("load", this.onPosterLoad), this.dom.posterImg.addEventListener("error", this.onPosterError); var t = a.default.blackFrame; "" !== this.poster && (t = this.poster), this.dom.posterImg.src = t }, i.default = o }, { "../../fw/env": 52, "../../fw/fw": 53, "../utils/error": 44 }], 42: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a, s = t("../../fw/fw"), g = (a = s) && a.__esModule ? a : { default: a }; var r = {}; r.init = function () { g.default.addEvent("mousemove", this.dom.timetotal, function (t) { if (this.dom.indicator) { var e = this.getDuration(); if (e <= 0) return; e /= 1e3; var i = g.default.getPosX(t) - g.default.getAbsLeft(this.dom.timetotal), a = g.default.getWidth(this.dom.timetotal); i < 0 ? i = 0 : a <= i && (i = a); var s = i / a, r = void 0; e <= (r = this.isLiveDvr ? e - s * e : s * e) ? r = e : r <= 0 && (r = 0); var n = void 0; if (n = this.isLiveDvr ? "-" + g.default.readableTime(r) : g.default.readableTime(r), this.dom.timeIndicator || (this.dom.timeIndicator = this.dom.indicator.firstChild), g.default.setText(this.dom.timeIndicator, n), this.dom.indicator.style.left = i + "px", this.dom.thumbnailsImg) for (var o = 0, l = this.thumbnailsArray.length; o < l; o++) { var d = this.thumbnailsArray[o]; if (null !== d[0] && null !== d[1] && "string" == typeof d[2] && r >= d[0] && r < d[1]) { if (1 < this.thumbnailURIs.length) { for (var h = void 0, c = 0, u = this.thumbnailURIsTimestamps.length; c < u; c++)r >= this.thumbnailURIsTimestamps[c] && (h = this.thumbnailURIs[c]); h && h !== this.currentThumbnailURI && (this.currentThumbnailURI = h, this.dom.thumbnailsImg.style.backgroundImage = 'url("' + this.currentThumbnailURI + '")') } var f = d[2].split(","), p = f[0].trim(), m = f[1].trim(), v = f[3].trim(); this.dom.thumbnailsImg.style.backgroundPosition = "-" + p + "px -" + m + "px", this.dom.thumbnailsImg.style.height = v + "px", this.dom.thumbnailsImg.style.top = "-" + v + "px" } } } }.bind(this)), g.default.addEvent("mouseenter", this.dom.timetotal, function () { this.hasLoadedMetadata && g.default.fadeIn(this.dom.indicator) }.bind(this)), g.default.addEvent("mouseleave", this.dom.timetotal, function () { this.hasLoadedMetadata && g.default.fadeOut(this.dom.indicator) }.bind(this)) }, i.default = r }, { "../../fw/fw": 53 }], 43: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a = n(t("../../fw/fw")), s = n(t("../utils/error")), r = n(t("../utils/utils")); function n(t) { return t && t.__esModule ? t : { default: t } } var o = { init: function () { this.audioOnly && (this.logo = ""), "" !== this.logo && "bottomleft" !== this.logoPosition && "topleft" !== this.logoPosition && "topright" !== this.logoPosition && "bottomright" !== this.logoPosition && (this.logoPosition = "topleft") } }; o.append = function () { /(\.png|\.jpg|\.gif)/i.test(this.logo) && (this.dom.logoImg = document.createElement("img"), this.dom.logoImg.alt = "Media player logo", this.logoWatermark ? this.dom.logoImg.className = "rmp-logo rmp-force-show" : this.dom.logoImg.className = "rmp-logo", "8px" !== this.logoMargin && (this.dom.logoImg.style.margin = this.logoMargin), "topleft" === this.logoPosition ? a.default.addClass(this.dom.logoImg, "rmp-logo-top-left") : "bottomleft" === this.logoPosition ? a.default.addClass(this.dom.logoImg, "rmp-logo-bottom-left") : "topright" === this.logoPosition ? a.default.addClass(this.dom.logoImg, "rmp-logo-top-right") : "bottomright" === this.logoPosition && a.default.addClass(this.dom.logoImg, "rmp-logo-bottom-right"), this.onLogoLoad = function () { this.dom.logoImg.removeEventListener("load", this.onLogoLoad), this.dom.logoImg.removeEventListener("error", this.onLogoError), this.logoAppended || (this.dom.container.insertBefore(this.dom.logoImg, this.dom.outline.nextSibling), this.logoAppended = !0) }.bind(this), this.onLogoError = function (t) { this.dom.logoImg.removeEventListener("load", this.onLogoLoad), this.dom.logoImg.removeEventListener("error", this.onLogoError), a.default.removeEvent(["touchend", "click"], this.dom.logoImg, this.openLogoUrl); var e = null; t && (e = t), s.default.warning.call(this, "failed to load logo at " + this.logo, 1e3, e) }.bind(this), this.dom.logoImg.addEventListener("load", this.onLogoLoad), this.dom.logoImg.addEventListener("error", this.onLogoError), this.openLogoUrl = r.default.openUrl.bind(this, this.logoLoc), a.default.addEvent(["touchend", "click"], this.dom.logoImg, this.openLogoUrl), this.dom.logoImg.src = this.logo) }, o.update = function () { this.dom.logoImg.removeEventListener("load", this.onLogoLoad), this.dom.logoImg.removeEventListener("error", this.onLogoError), a.default.removeEvent(["touchend", "click"], this.dom.logoImg, this.openLogoUrl), this.dom.logoImg.addEventListener("load", this.onLogoLoad), this.dom.logoImg.addEventListener("error", this.onLogoError), this.openLogoUrl = r.default.openUrl.bind(this, this.logoLoc), a.default.addEvent(["touchend", "click"], this.dom.logoImg, this.openLogoUrl), this.dom.logoImg.src = this.logo }, i.default = o }, { "../../fw/fw": 53, "../utils/error": 44, "../utils/utils": 46 }], 44: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var s = a(t("../../fw/fw")), r = a(t("../ui/core-ui")), n = a(t("../modules/modules")), o = a(t("../ready")), l = a(t("../../abr/shaka")), d = a(t("../../abr/hls")); function a(t) { return t && t.__esModule ? t : { default: t } } var h = { errorLayout: function () { var e = this; this.playerReady || o.default.minimalFire.call(this); var t = this.dom.container.querySelector(".rmp-error"); if (null !== t && s.default.removeElement(t), (t = document.createElement("div")).className = "rmp-error", "" !== this.labels.error.customErrorMessage) { var i = document.createElement("div"); i.className = "rmp-error-text", s.default.setText(i, this.labels.error.customErrorMessage), t.appendChild(i) } this.dom.content.appendChild(t); var a = !1; (this.readingMp4 && 1 < this.src.mp4.length || this.hasPlaylist || this.hasRelated) && (a = !0), this.changingSrc && (this.changingSrc = !1), n.default.closeAll.call(this), a || (n.default.hide.call(this), this.readingPDorNative && this.dom.video && this.dom.video.removeEventListener("error", this.generateError, !0)), r.default.disableCentralUI.call(this), s.default.hide(this.dom.poster), this.readingHlsJS ? (d.default.destroy.call(this), s.default.createStdEvent("error", this.dom.container)) : this.readingDash || this.readingHlsShaka ? this.shakaPlayer ? (l.default.destroy.call(this), this.shakaPlayer.destroy().then(function () { s.default.createStdEvent("error", e.dom.container) }).catch(function (t) { s.default.trace(t), s.default.createStdEvent("error", e.dom.container) })) : s.default.createStdEvent("error", this.dom.container) : (s.default.clearNativeHtml5Buffer(this.dom.video), s.default.createStdEvent("error", this.dom.container)) } }; h.isFatal = function (t) { var e = t; if (e && s.default.isObject(e.error) && "number" == typeof e.error.code) { var i = e.error.code; if ("string" == typeof e.error.message && e.error.message, 4 === i) return !0 } return !1 }, h.fatal = function (t, e, i) { this.errorData = { code: e, message: t, event: i, fatal: !0 }, h.errorLayout.call(this) }, h.warning = function (t, e, i) { this.errorData = { code: e, message: t, event: i, fatal: !1 }, s.default.createStdEvent("warning", this.dom.container) }, h.mediaTag = function (t) { t && t.target && h.isFatal(t.target) && h.fatal.call(this, "error on HTML5 media element", 100, t) }, i.default = h }, { "../../abr/hls": 3, "../../abr/shaka": 4, "../../fw/fw": 53, "../modules/modules": 30, "../ready": 35, "../ui/core-ui": 41 }], 45: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var g = s(t("../../fw/fw")), l = s(t("../../fw/env")), a = s(t("../ready")); function s(t) { return t && t.__esModule ? t : { default: t } } var y = {}, d = "https://cdn.radiantmediatechs.com/rmp/rr/vgs.json", h = "https://cdn.radiantmediatechs.com/rmp/rr/vgt.json", c = "https://cdn.radiantmediatechs.com/rmp/rr/vgrp.json", b = !1, S = !1, u = { "=": "a", "+": "b", y: "c", z: "d", v: "e", u: "f", d: "g", b: "h", s: "i", q: "j", a: "k", c: "l", i: "m", k: "n", e: "o", g: "p", n: "q", o: "r", 0: "s", 7: "t", 8: "u", 9: "v", 4: "w", 5: "x", 6: "y", 1: "z", 2: ".", 3: "-" }, E = function (t, e) { if (l.default.localStorage(e)) { var i = { value: t, timestamp: (new Date).getTime().toString() }; window.localStorage.setItem("rmpLU", JSON.stringify(i)) } }; y.endPlayer = function (t) { this.licenseFailedDestroyRequested = !0, a.default.minimalFire.call(this), this.licenseDestroyCompleted = function () { var t = document.getElementById(this.id); t && (t.removeEventListener("destroycompleted", this.licenseDestroyCompleted), g.default.removeElement(t)) }.bind(this), this.dom.container.addEventListener("destroycompleted", this.licenseDestroyCompleted), g.default.log("player", "invalid license for Radiant Media Player"), this.destroy() }; var f = function (t) { var e = this; if (l.default.localStorage(this.allowLocalStorage) && null !== window.localStorage.getItem("rmpLU")) { var i = JSON.parse(window.localStorage.getItem("rmpLU")), a = parseInt(i.timestamp); if (g.default.isNumber(a)) { var s = i.value, r = parseInt(i.timestamp), n = (new Date).getTime(); if ("true" === s && n < r + 36e5) return } } this.licUrl = t + "?rdm=" + Math.floor((new Date).getTime() / 36e5); var o = function (t) { var e = void 0; this.isLicValid = "true"; try { e = JSON.parse(t) } catch (t) { return g.default.trace(t), void E("false", this.allowLocalStorage) } if (e && Array.isArray(e.sites) && this.ragnarok) for (var i = e.sites, a = 0, s = i.length; a < s; a++)if (-1 < this.ragnarok.indexOf(i[a])) { y.endPlayer.call(this, "RMP Edition auth failed"), this.isLicValid = "false"; break } E(this.isLicValid, this.allowLocalStorage) }.bind(this); g.default.ajax(this.licUrl, this.ajaxInternalTimeout, !1, "GET").then(o).catch(function (t) { g.default.clearTimeout(e.siteCheckerRetryTimeout), e.siteCheckerRetryTimeout = setTimeout(function () { g.default.ajax(e.licUrl, e.ajaxInternalTimeout, !1, "GET").then(o).catch(function (t) { E("false", e.allowLocalStorage) }) }, 1e4) }) }, p = function (t) { var e = void 0, i = [], a = [], s = ""; try { e = JSON.parse(t) } catch (t) { return g.default.trace(t), void E(this.isLicValid, this.allowLocalStorage) } if (e && Array.isArray(e.sites)) for (var r = e.sites, n = 0, o = r.length; n < o; n++)if (r[n].license) { var l = r[n].license; if ((l = l.split("").reverse().join("")) === this.licenseKey) { this.isLicValid = "true", b ? Array.isArray(r[n].appWhitelist) && 0 < r[n].appWhitelist.length && (a = r[n].appWhitelist) : Array.isArray(r[n].blacklist) && 0 < r[n].blacklist.length ? (i = r[n].blacklist, s = "blacklist") : Array.isArray(r[n].whitelist) && 0 < r[n].whitelist.length && (i = r[n].whitelist, s = "whitelist"); break } } if ("false" === this.isLicValid) return E(this.isLicValid, this.allowLocalStorage), void y.endPlayer.call(this, "PLATFORM Edition auth failed"); if (S) return this.isLicValid = "true", void E(this.isLicValid, this.allowLocalStorage); if (!b && 0 < i.length) { if ("blacklist" === s) { this.isLicValid = "true"; for (var d = 0, h = i.length; d < h; d++)if (-1 < this.ragnarok.indexOf(i[d])) { this.isLicValid = "false"; break } } else if ("whitelist" === s) { this.isLicValid = "false"; for (var c = 0, u = i.length; c < u; c++)if (-1 < this.ragnarok.indexOf(i[c])) { this.isLicValid = "true"; break } } } else if (b && 0 < a.length && "string" == typeof a[0] && "" !== a[0]) { var f = this.dom.container.getAttribute("data-rwlan"); if (f) { this.isLicValid = "false"; var p = void 0; try { p = window.atob(f) } catch (t) { p = null, g.default.log(null, t) } if (p) for (var m = 0, v = a.length; m < v; m++)if (-1 < p.indexOf(a[m])) { this.isLicValid = "true"; break } } else this.isLicValid = "false" } "false" === this.isLicValid && y.endPlayer.call(this, "PLATFORM Edition auth failed"), E(this.isLicValid, this.allowLocalStorage) }, m = ["streams.rip", "liluka-site.eu", "www.liluka-site.eu"]; y.isValidSiteKey = function (t, e) { var i = void 0; if ("function" != typeof window.atob) return 2; try { if (d !== window.atob("aHR0cHM6Ly9jZG4ucmFkaWFudG1lZGlhdGVjaHMuY29tL3JtcC9yci92Z3MuanNvbg==") || h !== window.atob("aHR0cHM6Ly9jZG4ucmFkaWFudG1lZGlhdGVjaHMuY29tL3JtcC9yci92Z3QuanNvbg==") || c !== window.atob("aHR0cHM6Ly9jZG4ucmFkaWFudG1lZGlhdGVjaHMuY29tL3JtcC9yci92Z3JwLmpzb24=")) return 0; i = window.atob(t) } catch (t) { return 0 } "file:" === l.default.getProtocol ? b = !0 : S = function (t) { if (!t) return !1; if (t === this.originLocal && /host$/.test(t) || t === this.rmpDev && /\.rmp$/.test(t)) return !0; if (/^\d+\.\d+\.\d+\.\d+$/i.test(t) && (t === this.altLocal || /^192\.168\./i.test(t) || /^172\.[1-3]/i.test(t) || /^10\./i.test(t))) return !0; return !1 }.call(this, e); if (/^\D{10}@\d+$/i.test(i)) return "a2VpdWR5dHNobEAxNDg4ODkxNTQy" === this.licenseKey && -1 < m.indexOf(this.ragnarok) ? 0 : (this.licType = "plus", function (t) { var e = this; if (l.default.localStorage(this.allowLocalStorage) && null !== window.localStorage.getItem("rmpLU")) { var i = JSON.parse(window.localStorage.getItem("rmpLU")), a = parseInt(i.timestamp); if (g.default.isNumber(a)) { var s = i.value, r = parseInt(i.timestamp), n = (new Date).getTime(); if ("true" === s && n < r + 36e5) return } } this.licUrl = t + "?rdm=" + Math.floor((new Date).getTime() / 36e5), g.default.ajax(this.licUrl, this.ajaxInternalTimeout, !1, "GET").then(p.bind(this)).catch(function (t) { g.default.clearTimeout(e.rmpPlusCheckerRetryTimeout), e.rmpPlusCheckerRetryTimeout = setTimeout(function () { g.default.ajax(e.licUrl, e.ajaxInternalTimeout, !1, "GET").then(p.bind(e)).catch(function (t) { E("false", e.allowLocalStorage) }) }, 1e4) }) }.call(this, c), 3); if (!/\*_%.+/i.test(i)) return 0; var a = !1; -1 < (i = (i = i.replace("*_%", "")).replace("%_*", "")).indexOf("?") && ("rom5dasis30db0A" === i.split("?")[1] && (a = !0, i = i.replace("?rom5dasis30db0A", ""))); var s = function (t) { var e = void 0; if (-1 < t.indexOf("!")) { e = t.split("!"); var i = { s: 0, c: 1, o: 2, g: 3, i: 4, k: 5, m: 6, e: 7, q: 8, a: 9 }, a = e[0].replace(/[scogikmeqa]/g, function (t) { return i[t] }); if (/^\d+$/.test(a)) { var s = parseInt(a, 10), r = new Date, n = r.getTime(); return (r = Math.round(n / 1e3)) + 1382400 < s ? [!0, e[1], "expired"] : s < r ? [!0, e[1], "expired"] : [!0, e[1], "notexpired"] } return [!0, e[1], "expired"] } return [!1, null, "notexpired"] }.call(this, i), r = s[0]; if (r && (this.licType = "trial", i = s[1], "expired" === s[2])) return g.default.log("license", "trial has expired"), 0; if (b && !r) return 0; if (S) { if (a || r) return 2; if (!a) return 1 } var n = i.replace(/[=+yzvudbsqacikegno0789456123]/g, function (t) { return u[t] }); r ? b || f.call(this, h, n) : f.call(this, d, n); var o = !1; b ? o = !0 : -1 < e.replace(/\d/g, "").indexOf(n) && (o = !0); return (r || a) && o ? 2 : a || r || !o ? 0 : 1 }; y.ck = function () { var t = y.isValidSiteKey.call(this, this.licenseKey, this.ragnarok); return 0 !== t && (1 === t ? !(this.video360 || this.ads || !g.default.isEmptyObject(this.shakaDrm) || this.hasRelated) : 2 === t || (3 === t || void 0)) }, i.default = y }, { "../../fw/env": 52, "../../fw/fw": 53, "../ready": 35 }], 46: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var l = h(t("../../fw/fw")), a = h(t("../../fw/env")), r = h(t("../../fw/defaults/input-defaults")), s = h(t("../ui/core-ui")), n = h(t("../../core/dom")), o = h(t("../../abr/fps")), d = h(t("./error")); function h(t) { return t && t.__esModule ? t : { default: t } } var c = { openUrl: function (t, e) { e && e.stopPropagation(), s.default.showChrome.call(this), "touchend" !== e.type && "string" == typeof t && "" !== t && (this.getPaused() || this.pause(), window.open(t, "_blank")) } }; c.checkStreams = function (a, t, s) { if (l.default.isEmptyObject(t) || Array.isArray(t) && t.length < 1) a(); else { var e = t; Array.isArray(t) ? e.unshift(this.src) : e = [this.src, t]; var r = []; e.forEach(function (t) { l.default.srcExists(t[s], s) && r.push(t) }); var n = 0, o = function () { var t = this, e = r[n], i = e[s]; (function (t, e) { var i = t; Array.isArray(t) && ("string" == typeof t[this.initialBitrate] ? i = t[this.initialBitrate] : "string" == typeof t[0] && (this.initialBitrate = 0, i = t[this.initialBitrate])), this.src = e, this.startingBitratePath = i, this.castUrl = i }).call(this, i, e), l.default.ajax(this.startingBitratePath, this.ajaxTimeout, this.ajaxWithCredentials, "HEAD").then(function () { a() }).catch(function () { n === r.length - 1 ? a() : (n++ , d.default.warning.call(t, "URI " + t.startingBitratePath + " is unavailable - trying next", 1007, null), o.call(t)) }) }; o.call(this) } }; var u = function (t) { var e = {}; for (var i in r.default.labels) if (Object.prototype.hasOwnProperty.call(r.default.labels, i)) if (void 0 === e[i] && (e[i] = {}), typeof t[i] == typeof r.default.labels[i]) { var a = r.default.labels[i]; for (var s in a) typeof t[i][s] == typeof a[s] ? e[i][s] = t[i][s] : e[i][s] = r.default.labels[i][s] } else e[i] = r.default.labels[i]; return e }; c.filterInput = function (t) { var e = {}; for (var i in r.default) Object.prototype.hasOwnProperty.call(r.default, i) && (void 0 !== t[i] ? "shakaCustomRequestFilter" === i || "hlsJSXhrSetup" === i ? "function" == typeof t[i] ? e[i] = t[i] : e[i] = null : typeof t[i] != typeof r.default[i] ? e[i] = r.default[i] : e[i] = "labels" === i ? u(t[i]) : t[i] : e[i] = r.default[i], "string" == typeof e[i] && (e[i] = e[i].trim())); for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && (this[a] = e[a]) }, c.resetSrc = function () { this.hasMp4 = !1, this.hasMp4Hevc = !1, this.hasWebM = !1, this.hasHls = !1, this.hasHlsHevc = !1, this.hasDash = !1, this.hasFps = !1, this.hasM4a = !1, this.hasMp3 = !1, this.okOgg = !1 }, c.detectSrc = function () { l.default.srcExists(this.src.mp4, "mp4") && (this.hasMp4 = !0, this.isVod || (this.hasMp4 = !1)), l.default.srcExists(this.src.mp4Hevc, "mp4Hevc") && (this.hasMp4Hevc = !0, this.isVod || (this.hasMp4Hevc = !1)), l.default.srcExists(this.src.webm, "webm") && (this.hasWebM = !0, this.isVod || (this.hasWebM = !1)), l.default.srcExists(this.src.hls, "hls") && (this.hasHls = !0), l.default.srcExists(this.src.hlsHevc, "hlsHevc") && (this.hasHlsHevc = !0), l.default.srcExists(this.src.dash, "dash") && (this.hasDash = !0, this.isLiveDvr && (this.hasDash = !1)), l.default.isEmptyObject(this.shakaDrm) || (this.hasDash && (this.dashFirst = !0, (this.hasHls || this.hasHlsHevc) && (this.hlsEngine = "hlsjs")), a.default.isMacosSafari[0] && (this.okDash = !1, this.hlsEngine = "hlsjs")), l.default.srcExists(this.src.fps, "fps") && (this.hasFps = !0, this.airplay = !1) }, c.detectAudioSrc = function () { l.default.srcExists(this.src.m4a, "m4a") && (this.hasM4a = !0, this.isVod || (this.hasM4a = !1)), l.default.srcExists(this.src.mp3, "mp3") && (this.hasMp3 = !0, this.isVod || (this.hasMp3 = !1)), l.default.srcExists(this.src.ogg, "ogg") && (this.hasOgg = !0, this.isVod || (this.hasOgg = !1)), l.default.srcExists(this.src.hls, "hls") && (this.hasHls = !0), l.default.srcExists(this.src.dash, "dash") && (this.hasDash = !0, this.isLiveDvr && (this.hasDash = !1)) }; c.createNativeSrc = function (t) { n.default.prepare.call(this), c.checkStreams.call(this, function () { this.readingFps ? o.default.init.call(this) : this.dom.video.src = this.startingBitratePath, n.default.append.call(this) }.bind(this), this.backupSrc, t) }; c.getCSS = function () { var t = "https://cdn.radiantmediatechs.com/rmp/5.0.9/css/rmp-" + this.skin + ".min.css"; this.cssLink = document.createElement("link"), this.cssLink.id = "rmp-dress-code", this.cssLink.type = "text/css", this.cssLink.rel = "stylesheet", this.cssLink.href = t, l.default.addEventListenerCSS ? (this.onLoadedCSS = function (t) { l.default.clearTimeout(this.cssLinkTimeout), this.cssLoaded || (this.cssLoaded = !0, l.default.addEventListenerCSS && (this.cssLink.removeEventListener("load", this.onLoadedCSS), this.cssLink.removeEventListener("error", this.onLoadedCSS)), this.initConfig()) }.bind(this), this.cssLink.addEventListener("load", this.onLoadedCSS), this.cssLink.addEventListener("error", this.onLoadedCSS), l.default.clearTimeout(this.cssLinkTimeout), this.cssLinkTimeout = setTimeout(this.onLoadedCSS, 2500), l.default.appendToHead(this.cssLink)) : (l.default.appendToHead(this.cssLink), this.initConfig()) }, c.clearAdAutoplayEvents = function () { this.dom.container.removeEventListener("adstarted", this.onAdAutoplaySuccess), this.dom.container.removeEventListener("adinitialplayrequestsucceeded", this.onAdAutoplaySuccess), this.dom.container.removeEventListener("adinitialplayrequestfailed", this.onAdAutoplayFailed) }, c.fireAutoplayFailure = function () { this.autoplay = !1, l.default.createStdEvent("autoplayfailure", this.dom.container) }, c.autoplayFailureRestorePlayUI = function () { this.initialAutoplayRequest = !1, this.ads && c.clearAdAutoplayEvents.call(this), l.default.show(this.dom.poster), s.default.restorePlayUI.call(this), c.fireAutoplayFailure.call(this) }, c.fireAutoplaySuccess = function () { this.initialAutoplayRequest = !1, this.ads && c.clearAdAutoplayEvents.call(this), l.default.createStdEvent("autoplaysuccess", this.dom.container) }, c.playPromise = function () { var e = this, i = !1; this.autoplay && this.initialAutoplayRequest && (i = !0, this.initialAutoplayRequest = !1); var t = this.dom.video.play(); void 0 !== t ? t.then(function () { i && c.fireAutoplaySuccess.call(e) }).catch(function (t) { i ? c.autoplayFailureRestorePlayUI.call(e) : s.default.restorePlayUI.call(e) }) : i && c.fireAutoplaySuccess.call(this) }, c.assignPlaybackCapabilities = function () { this.okDash = a.default.okDash, this.okHls = a.default.okHls, this.okHlsHevc = a.default.okHlsHevc, this.okHlsJS = a.default.okHlsJS, "hlsjs" === this.hlsEngine && (a.default.isAndroid[0] && a.default.isAndroid[1] < 5 && (this.okHls || (this.okHls = !0), this.forceNativeHlsOverHlsJS = !0), this.forceNativeHlsOverHlsJS && this.okHlsJS && this.okHls && (this.okHlsJS = !1), a.default.isMacosSafari[0] && !this.forceHlsJSOnMacOSSafari && this.okHls && (this.okHlsJS = !1)), this.isLiveDvr && (!this.okHlsJS && l.default.srcExists(this.src.hls, "hls") && this.okHls || l.default.srcExists(this.src.hlsHevc, "hlsHevc") && this.okHlsHevc) && (this.isLiveDvr = !1, this.isLive = !0), this.okFps = a.default.okFps, this.okWebM = a.default.testWebM(this.webmCodecs, a.default.html5Video), this.okMp4 = a.default.okMp4, this.okMp4Hevc = a.default.hasHevcSupport, this.audioOnly && (this.okM4a = a.default.okM4a, this.okMp3 = a.default.okMp3, this.okOgg = a.default.testOgg(this.oggCodec, a.default.html5Audio)) }, i.default = c }, { "../../abr/fps": 2, "../../core/dom": 25, "../../fw/defaults/input-defaults": 51, "../../fw/env": 52, "../../fw/fw": 53, "../ui/core-ui": 41, "./error": 44 }], 47: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a, s = t("../../fw/fw"), r = (a = s) && a.__esModule ? a : { default: a }; var n = { destroy: function () { if ((this.viewableAutoplay || this.viewablePlayPause) && this.viewableObserver) { 0; try { this.viewableObserver.disconnect() } catch (t) { r.default.trace(t) } } } }, o = function () { this.dom.container.removeEventListener("ready", this.attachViewableObserver); var t = { root: null, rootMargin: "0px", threshold: [this.viewableThreshold] }; this.viewablePreviousRatio = this.viewableThreshold, this.viewableObserver = new window.IntersectionObserver(function (t) { var i = this; t.forEach(function (t) { var e = i.getPlayerInitialized(); t.intersectionRatio > i.viewablePreviousRatio ? i.viewablePlayPause ? i.play() : i.viewableAutoplay && !e && (i.play(), n.destroy.call(i)) : i.viewablePlayPause && e && i.pause(), i.viewablePreviousRatio = t.intersectionRatio }) }.bind(this), t), this.viewableObserver.observe(this.dom.container) }; n.set = function () { this.attachViewableObserver = o.bind(this), this.dom.container.addEventListener("ready", this.attachViewableObserver) }, i.default = n }, { "../../fw/fw": 53 }], 48: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a = o(t("../../fw/fw")), s = o(t("../../fw/env")), r = o(t("../ui/core-ui")), n = o(t("../../cast/cast")); function o(t) { return t && t.__esModule ? t : { default: t } } var l = { getVolumeAds: function () { return "ima" === this.adParser && this.adsManager && "function" == typeof this.adsManager.getVolume ? this.adsManager.getVolume() : "rmp-vast" === this.adParser && this.rmpVast && "function" == typeof this.rmpVast.getVolume ? this.rmpVast.getVolume() : -2 }, setVolumeAds: function (t) { "ima" === this.adParser && this.adsManager && "function" == typeof this.adsManager.setVolume ? this.adsManager.setVolume(t) : "rmp-vast" === this.adParser && this.rmpVast && "function" == typeof this.rmpVast.setVolume && this.rmpVast.setVolume(t) }, protoMute: function () { this.currentVolume = this.getVolume(), n.default.castingAPIAvailable.call(this) ? (this.remotePlayerController.muteOrUnmute(), l.change.call(this)) : (this.muted = !0, this.dom.video.muted = !0, this.getAdOnStage() && this.getAdLinear() && ("ima" === this.adParser ? l.setVolumeAds.call(this, 0) : "rmp-vast" === this.adParser && this.rmpVast && "function" == typeof this.rmpVast.setMute && this.rmpVast.setMute(!0))), this.dom.currentVolume.style.height = "0px", a.default.addClass(this.dom.volume, "rmp-i-volume-off"), a.default.removeClass(this.dom.volume, "rmp-i-volume-up") }, protoUnmute: function () { if (n.default.castingAPIAvailable.call(this)) this.remotePlayerController.muteOrUnmute(), l.change.call(this); else { if (this.permanentMuted) return; this.muted = !1, this.dom.video.muted = !1, this.getAdOnStage() && this.getAdLinear() && "rmp-vast" === this.adParser && this.rmpVast && "function" == typeof this.rmpVast.setMute && this.rmpVast.setMute(!1), 0 < this.currentVolume && this.currentVolume < 1 ? this.setVolume(this.currentVolume) : this.setVolume(1) } a.default.addClass(this.dom.volume, "rmp-i-volume-up"), a.default.removeClass(this.dom.volume, "rmp-i-volume-off") }, writeToLocalStorage: function (t) { if (this.rememberVolume && s.default.localStorage(this.allowLocalStorage)) { var e = { value: t.toString() }; try { window.localStorage.setItem("rmpVolume", JSON.stringify(e)) } catch (t) { a.default.trace(t) } } }, volumeInteraction: function (t) { t && (t.stopPropagation(), "touchend" === t.type && t.preventDefault()), r.default.showChrome.call(this); var e = 0; this.getMute() ? (this.setMute(!1), e = this.getVolume()) : this.setMute(!0), l.writeToLocalStorage.call(this, e) }, change: function () { var t = this.getMute(); this.volumeBarHeight = t ? 0 : a.default.getHeight(this.dom.volumeBar); var e = 0; n.default.castingAPIAvailable.call(this) ? a.default.isNumber(this.remotePlayer.volumeLevel) && (e = this.remotePlayer.volumeLevel * this.volumeBarHeight) : (a.default.isNumber(this.dom.video.volume) && (e = this.dom.video.volume * this.volumeBarHeight), a.default.createStdEvent("volumechange", this.dom.container)), this.dom.currentVolume && 0 <= e && (this.dom.currentVolume.style.height = e + "px") }, setHtml5Volume: function (t) { if (t) { t.stopPropagation(), this.volumeBarHeight = a.default.getHeight(this.dom.volumeBar); var e = a.default.getAbsTop(this.dom.volumeBar), i = 1 - (a.default.getPosY(t) - e) / this.volumeBarHeight; if (i < .1 ? i = 0 : .9 < i && (i = 1), this.currentVolume = i, l.writeToLocalStorage.call(this, this.currentVolume), n.default.castingAPIAvailable.call(this)) return this.remotePlayer.volumeLevel = i, this.remotePlayerController.setVolumeLevel(), this.remotePlayer.isMuted && this.remotePlayerController.muteOrUnmute(), void l.change.call(this); this.getMute() && this.setMute(!1), this.dom.video.volume = this.currentVolume, this.getAdOnStage() && this.getAdLinear() && l.setVolumeAds.call(this, i) } } }; i.default = l }, { "../../cast/cast": 22, "../../fw/env": 52, "../../fw/fw": 53, "../ui/core-ui": 41 }], 49: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a = {}, s = new Blob([new Uint8Array([255, 227, 24, 196, 0, 0, 0, 3, 72, 1, 64, 0, 0, 4, 132, 16, 31, 227, 192, 225, 76, 255, 67, 12, 255, 221, 27, 255, 228, 97, 73, 63, 255, 195, 131, 69, 192, 232, 223, 255, 255, 207, 102, 239, 255, 255, 255, 101, 158, 206, 70, 20, 59, 255, 254, 95, 70, 149, 66, 4, 16, 128, 0, 2, 2, 32, 240, 138, 255, 36, 106, 183, 255, 227, 24, 196, 59, 11, 34, 62, 80, 49, 135, 40, 0, 253, 29, 191, 209, 200, 141, 71, 7, 255, 252, 152, 74, 15, 130, 33, 185, 6, 63, 255, 252, 195, 70, 203, 86, 53, 15, 255, 255, 247, 103, 76, 121, 64, 32, 47, 255, 34, 227, 194, 209, 138, 76, 65, 77, 69, 51, 46, 57, 55, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 255, 227, 24, 196, 73, 13, 153, 210, 100, 81, 135, 56, 0, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170])], { type: "audio/mpeg" }), r = new Blob([new Uint8Array([0, 0, 0, 28, 102, 116, 121, 112, 105, 115, 111, 109, 0, 0, 2, 0, 105, 115, 111, 109, 105, 115, 111, 50, 109, 112, 52, 49, 0, 0, 0, 8, 102, 114, 101, 101, 0, 0, 2, 239, 109, 100, 97, 116, 33, 16, 5, 32, 164, 27, 255, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 33, 16, 5, 32, 164, 27, 255, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 167, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, 0, 0, 2, 194, 109, 111, 111, 118, 0, 0, 0, 108, 109, 118, 104, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 232, 0, 0, 0, 47, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 1, 236, 116, 114, 97, 107, 0, 0, 0, 92, 116, 107, 104, 100, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 101, 100, 116, 115, 0, 0, 0, 28, 101, 108, 115, 116, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 47, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 100, 109, 100, 105, 97, 0, 0, 0, 32, 109, 100, 104, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, 68, 0, 0, 8, 0, 85, 196, 0, 0, 0, 0, 0, 45, 104, 100, 108, 114, 0, 0, 0, 0, 0, 0, 0, 0, 115, 111, 117, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 111, 117, 110, 100, 72, 97, 110, 100, 108, 101, 114, 0, 0, 0, 1, 15, 109, 105, 110, 102, 0, 0, 0, 16, 115, 109, 104, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 100, 105, 110, 102, 0, 0, 0, 28, 100, 114, 101, 102, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 12, 117, 114, 108, 32, 0, 0, 0, 1, 0, 0, 0, 211, 115, 116, 98, 108, 0, 0, 0, 103, 115, 116, 115, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 87, 109, 112, 52, 97, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 16, 0, 0, 0, 0, 172, 68, 0, 0, 0, 0, 0, 51, 101, 115, 100, 115, 0, 0, 0, 0, 3, 128, 128, 128, 34, 0, 2, 0, 4, 128, 128, 128, 20, 64, 21, 0, 0, 0, 0, 1, 244, 0, 0, 1, 243, 249, 5, 128, 128, 128, 2, 18, 16, 6, 128, 128, 128, 1, 2, 0, 0, 0, 24, 115, 116, 116, 115, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 4, 0, 0, 0, 0, 28, 115, 116, 115, 99, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 28, 115, 116, 115, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 115, 0, 0, 1, 116, 0, 0, 0, 20, 115, 116, 99, 111, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 44, 0, 0, 0, 98, 117, 100, 116, 97, 0, 0, 0, 90, 109, 101, 116, 97, 0, 0, 0, 0, 0, 0, 0, 33, 104, 100, 108, 114, 0, 0, 0, 0, 0, 0, 0, 0, 109, 100, 105, 114, 97, 112, 112, 108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 105, 108, 115, 116, 0, 0, 0, 37, 169, 116, 111, 111, 0, 0, 0, 29, 100, 97, 116, 97, 0, 0, 0, 1, 0, 0, 0, 0, 76, 97, 118, 102, 53, 54, 46, 52, 48, 46, 49, 48, 49])], { type: "video/mp4" }); function n(t) { return Object.assign({ muted: !1, timeout: 250, inline: !1 }, t) } function o(t, e) { var i = t.muted, a = t.timeout, s = t.inline, r = e(), n = r.element, o = r.source, l = void 0, d = void 0, h = void 0; return !0 === (n.muted = i) && n.setAttribute("muted", "muted"), !0 === s && n.setAttribute("playsinline", "playsinline"), n.src = o, new Promise(function (i) { l = n.play(), d = setTimeout(function () { h(!1, new Error("Timeout " + a + " ms has been reached")) }, a), h = function (t) { var e = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : null; clearTimeout(d), i({ result: t, error: e }) }, void 0 !== l ? l.then(function () { return h(!0) }).catch(function (t) { return h(!1, t) }) : h(!0) }) } a.video = function (t) { return o(t = n(t), function () { return { element: document.createElement("video"), source: URL.createObjectURL(r) } }) }, a.audio = function (t) { return o(t = n(t), function () { return { element: document.createElement("audio"), source: URL.createObjectURL(s) } }) }, i.default = a }, {}], 50: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a = function () { return null }, s = "string" == typeof window.rmpGetRagnarok ? window.rmpGetRagnarok : window.location && window.location.hostname ? window.location.hostname.toLowerCase() : null, r = { set: function () { this.playerVersion = "5.0.9", this.playerReady = !1, this.hasLoadedMetadata = !1, this.timeReady = 0, this.isInFullscreen = !1, this.isVod = !0, this.isHTML5 = !0, this.setSrcPDModule = !1, this.startingBitratePath = "", this.firstPlay = !0, this.draggingTimeCursor = !1, this.touchDown = !1, this.mouseupDoc = a, this.mousemoveDoc = a, this.throttledResize = a, this.firstFrameReached = !1, this.useVideoTitle = !1, this.msePreloadRequested = !1, this.msePreloadCompleted = !1, this.abrAutoMode = !0, this.changingSrc = !1, this.afterMp4BitrateSwitch = a, this.afterSrcSwitch = null, this.currentVolume = 1, this.volumeBarHeight = 0, this.initialAspectRatio = 1.7777777778, this.initialWidth = -1, this.initialHeight = -1, this.hasNativeFullscreenSupport = !1, this.fullWindowMode = !1, this.throttledResizeTimeout = null, this.onPosterLoad = a, this.onPosterError = a, this.logoAppended = !1, this.onLogoLoad = a, this.onLogoError = a, this.openLogoUrl = a, this.windowOnline = a, this.windowOffline = a, this.readingMp4 = !1, this.readingMp4Hevc = !1, this.readingWebM = !1, this.readingM4a = !1, this.readingMp3 = !1, this.readingOgg = !1, this.readingDash = !1, this.readingHlsJS = !1, this.readingHlsShaka = !1, this.readingHls = !1, this.readingHlsHevc = !1, this.readingPDorNative = !0, this.readingOutstream = !1, this.readingMse = !1, this.hasMp4 = !1, this.hasMp4Hevc = !1, this.hasWebM = !1, this.hasM4a = !1, this.hasMp3 = !1, this.hasOgg = !1, this.hasHls = !1, this.hasHlsHevc = !1, this.hasFps = !1, this.hasDash = !1, this.okDash = !1, this.okHlsJS = !1, this.okFps = !1, this.okHls = !1, this.okWebM = !1, this.okMp4 = !1, this.okMp4Hevc = !1, this.okM4a = !1, this.okMp3 = !1, this.okOgg = !1, this.viewablePreviousRatio = .5, this.viewableObserver = null, this.attachViewableObserver = a, this.processInitiatePlayback = null, this.initiatePlayback = a, this.bindKeyboard = a, this.showChrome = a, this.containerTouch = a, this.containerClick = a, this.removeFocusToContainer = a, this.addTabKeyDetection = a, this.controls = !0, this.fullscreenchange = a, this.fullscreenerror = a, this.unstalledBuffer = a, this.firstBufferStalledEvent = !0, this.licenseFailedDestroyRequested = !1, this.destroyRunning = !1, this.onStartSeekToOffset = a, this.forceResetTimer = !1, this.chromeTimer = null, this.touchRmp = !1, this.cssLink = null, this.cssLinkTimeout = null, this.initConfig = a, this.cssLoaded = !1, this.onLoadedCSS = a, this.loadstartFn = a, this.durationchangeFn = a, this.loadedmetadataFn = a, this.loadeddataFn = a, this.progressFn = a, this.playingFn = a, this.waitingFn = a, this.seekingFn = a, this.seekedFn = a, this.pauseFn = a, this.playFn = a, this.timeupdateFn = a, this.webkitbeginfullscreenFn = a, this.webkitendfullscreenFn = a, this.volumechangeFn = a, this.onMobileStartAutoHideCentralUI = a, this.setSrcResetAdInterval = null, this.logRetryTimeout = null, this.logGaSeekingTimeout = null, this.prerollMaskRemovalTimeout = null, this.orientationChangeResizeTimeout = null, this.siteCheckerRetryTimeout = null, this.postStop = null, this.firstDurationChange = !0, this.startUpPlay = 0, this.startUpPlaying = 0, this.ended = a, this.generateError = a, this.errorData = null, this.adDisplayContainer = null, this.adOnStage = !1, this.adsManager = null, this.adsLoader = null, this.contentCompleteCalled = !1, this.isLinear = !1, this.adPaused = !1, this.adDCInitialized = !1, this.adID = "", this.adCreativeAdId = "", this.adCreativeId = "", this.adDealId = "", this.adSystem = "", this.adAdvertiserName = "", this.adMediaUrl = "", this.adSurveyUrl = "", this.adUniversalAdIdRegistry = "unknown", this.adUniversalAdIdValue = "unknown", this.adApiFramework = "", this.adContentType = "", this.adDescription = "", this.adDuration = -1, this.adTraffickingParameters = null, this.adTraffickingParametersString = "", this.adNonLinearHeight = -1, this.adNonLinearWidth = -1, this.adTitle = "", this.adWrapperAdIds = null, this.adWrapperAdSystems = null, this.adWrapperCreativeIds = null, this.hasAdUI = !1, this.playerInitialized = !1, this.emptyInitAdTagUrl = !1, this.adScheduleInput = !1, this.currentAdForCompanion = null, this.adPodInfo = null, this.adErrorCode = -1, this.adErrorMessage = "", this.adErrorType = "", this.adVastErrorCode = -1, this.originalAdTagUrl = null, this.originalAdTagWaterfall = [], this.isVPAID = !1, this.adCountdownInterval = null, this.onEndedWaitForPlay = a, this.onRePlayLoadAdTag = a, this.onAdLoadedAfterReload = a, this.adRemainingTimeBarInterval = null, this.firstPreroll = !0, this.currentiOSSrc = "", this.onIosStartShowFS = a, this.onIphone10PlusHideFS = a, this.onAdBlockDetected = null, this.onNoAdBlockDetected = null, this.imaLoadTimeout = null, this.imaLoadCancel = !1, this.adSkipInterval = null, this.onContentResumeRequestedLoadAds = a, this.onAdStartedPostRollUpdateCentralUI = a, this.onAdOnStageUpdatePrerollMask = a, this.setSrcAdReset = !1, this.setSrcResetIMA = a, this.runAdsManagerInterval = null, this.adOutStreamSkin = !1, this.postImaAdDestroy = null, this.imaDaiStreamManager = null, this.imaDaiLive = !1, this.imaDaiVod = !1, this.imaDaiAdCurrentTime = -1, this.rmpVast = null, this.onRmpVastAdStarted = a, this.onRmpVastAdDestroyed = a, this.onRmpVastAdError = a, this.onRmpVastAdInteraction = a, this.onRmpVastAdLinearChanged = a, this.onRmpVastAdPlayPause = a, this.adErrorDetected = !1, this.onAdTagStartLoading = a, this.setSrcResetRmpVast = a, this.initialAutoplayRequest = !1, this.onAdAutoplayFailed = a, this.onAdAutoplaySuccess = a, this.liveAdSchedulerChecker = null, this.liveAdSchedulerCheckerIndex = 0, this.adSchedulerChecker = a, this.adSchedulerEnded = a, this.playScheduler = a, this.pauseScheduler = a, this.adParserLoaded = !1, this.adParserLoadError = !1, this.analyticsSecondsPlayed = 0, this.startUpTime = -1, this.heatMapArray = [], this.startUpLogPlaying = a, this.appendFormDataAndSendLog = a, this.logGaReady = a, this.logGaPlayerStart = a, this.logGaSrcChanged = a, this.logGaError = a, this.logGaAdImpression = a, this.logGaAdLoaderError = a, this.logGaAdError = a, this.logGaAdLoadError = a, this.logGaAdPlayError = a, this.logGaFullscreen = a, this.logGaEnded = a, this.logGaSeeking = a, this.logGaAdClick = a, this.logGaAdClientSideWaterfallRequested = a, this.gaContext = !1, this.analyticsInterval = null, this.analyticsPlay = a, this.analyticsPause = a, this.updateHeatMap = null, this.gaCommand = "send", this.gaSeekingSending = !1, this.runLogs = a, this.runLogsOnSrcChanged = a, this.licUrl = "", this.isLicValid = "false", this.shakaPlayer = null, this.shakaVideoRenditions = [], this.shakaTextTracks = [], this.shakaError = a, this.shakaAdaptationChanged = a, this.shakaBuffering = a, this.shakaUnstalledBuffer = a, this.shakaTracksChanged = a, this.shakaCurrentLevel = null, this.configureShakaCapLevelToPlayerSize = a, this.shakaOnPlayingResetRetriesCount = a, this.shakaOfflineList = null, this.shakaOfflineDownloadProgress = -1, this.hlsJS = null, this.hlsID3TagData = null, this.hlsEpochProgramDateTime = -1, this.hlsRawProgramDateTime = null, this.hlsFragmentData = null, this.hlsFragmentBeingPlayed = null, this.hlsLevelData = null, this.hlsManifestData = null, this.hlsJSLevelDuration = -1, this.hlsOnPauseStopLoad = a, this.hlsOnPlayStartLoad = a, this.hlsOnFirstPlaying = a, this.hlsJSUnstalledBuffer = null, this.hlsManifestParsed = a, this.hlsJSAttachMultiAudio = a, this.hlsJSOnLiveRetriesSuccess = a, this.initHLSJS = a, this.bwEstimate = -1, this.hlsJSCEA = !1, this.hlsJSAbrInterval = null, this.hlsJSErrorRetryTimeout = null, this.hlsResizeLevelSwitch = null, this.exitFSDestroy = null, this.proceedDestroy = !0, this.adsDestroyed = !1, this.dvrLiveMode = !0, this.dvrCurrentTime = -1, this.pauseDvr = a, this.playingDvr = a, this.seekingDvr = a, this.castReady = a, this.castInit = a, this.castMedia = null, this.remotePlayer = null, this.remotePlayerController = null, this.castMediaLoaded = !1, this.castConnected = !1, this.castUrl = "", this.loadCastMedia = a, this.remotePlayerState = "", this.googleCastCCForegroundColor = "FFFFFF99", this.googleCastCCBackgroundColor = "00000070", this.googleCastCCFontScale = .9, this.onAirPlayClick = a, this.onAirPlayAvailabilityChanged = a, this.onLoadedmetadataShowAirPlay = a, this.defaultTrack = 0, this.textTracks = [], this.hasCC = !1, this.addNativeVTT = a, this.updateCues = a, this.updateCuesResize = a, this.ccData = null, this.ccCues = [], this.ccEnabled = !1, this.loadedCCFiles = [], this.ccFilesReady = !1, this.hlsJSCCInterval = null, this.startIndexCC = 0, this.loadVTTFiles = a, this.lat = 0, this.lon = 0, this.mouseDown = !1, this.dragStart = {}, this.progressiveInterval = null, this.progressiveMoveInprogress = !1, this.animate360 = a, this.onReadyMain360 = a, this.onPlayingUpdate360UI = a, this.requestAnimation360 = null, this.texture360 = null, this.renderer360 = null, this.camera360 = null, this.scene360 = null, this.mesh360 = null, this.canvas360 = null, this.streamrootWrapper = null, this.hasStreamroot = !1, this.thumbnailsArray = [], this.thumbnailURIs = [], this.thumbnailURIsTimestamps = [], this.currentThumbnailURI = "", this.hasThumbnails = !1, this.dummyThumbnailsImg = null, this.onThumbnailsLoad = a, this.onThumbnailsError = a, this.chaptersArray = [], this.hasChapters = !1, this.onLoadedmetadaAddChapters = a, this.licType = "rmp", this.hasRelated = !1, this.relatedList = [], this.currentRelatedIndex = 0, this.relatedOnSrcChangedLoadAd = a, this.hasPlaylist = !1, this.playlistList = [], this.currentPlaylistIndex = 0, this.playlistOnSrcChangedLoadAd = a, this.ajaxInternalTimeout = 1e4, this.refTime = 0, this.ragnarok = s, this.rmpDev = "site.rmp", this.originLocal = "localhost", this.altLocal = "127.0.0.1", this.muxData = !1, this.muxDataHlsJSMonitored = !1, this.onHlsjsErrorEmitMuxError = a } }; i.default = r }, {}], 51: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a = { licenseKey: "", width: 640, height: 360, iframeMode: !1, iframeAllowed: !0, autoHeightMode: !1, autoHeightModeRatio: 1.7777777778, backgroundColor: "000000", skin: "s1", skinBackgroundColor: "", skinButtonColor: "", skinAccentColor: "", hideControls: !1, hideCentralPlayButton: !1, hideCentralBuffering: !1, hideSeekBar: !1, hideFullscreen: !1, autoplay: !1, detectAutoplayCapabilities: !0, viewableAutoplay: !1, viewablePlayPause: !1, viewableThreshold: .5, srcChangeAutoplay: !0, poster: "", endOfVideoPoster: "", posterScaleMode: "letterbox", scaleMode: "letterbox", loop: !1, muted: !1, permanentMuted: !1, initialVolume: 1, rememberVolume: !0, disableKeyboardControl: !1, preload: "none", delayToFade: 2500, contentTitle: "", contentDescription: "", contentID: "", videoTitle: "", appName: "", logo: "", logoLoc: "", logoWatermark: !1, logoPosition: "topleft", logoMargin: "8px", sharing: !1, sharingUrl: "", sharingCode: "", sharingNetworks: ["facebook", "twitter", "email"], audioOnly: !1, debugLevel: 1, debugOverlayEnv: !1, pathToRmpFiles: ".", offsetStartPosition: 0, quickRewind: 0, fadeInPlayer: !0, uiSeparator: "-", ajaxWithCredentials: !1, ajaxTimeout: 1e4, allowLocalStorage: !0, dashFirst: !1, shakaStartLevel: -1, shakaStreamingBufferBehind: 30, shakaStreamingBufferingGoal: 20, shakaStreamingRebufferingGoal: 4, shakaStreamingIgnoreTextStreamFailures: !1, shakaRetryParameters: {}, shakaRestrictions: {}, shakaDrm: {}, shakaRequestConfiguration: {}, shakaPreferredAudioLanguage: "", shakaCapLevelToPlayerSize: !0, shakaOffline: !1, shakaOfflinePreferredTrackQuality: -1, shakaUsePersistentLicense: !0, shakaJumpLargeGaps: !1, shakaSmallGapLimit: .5, shakaBandwidthDowngradeTarget: .95, shakaBandwidthUpgradeTarget: .75, shakaCustomConfig: {}, shakaCustomRequestFilter: null, shakaManifestDashDefaultPresentationDelay: 10, hlsJSCapLevelToPlayerSize: !0, hlsJSMaxBufferLength: 30, hlsJSMaxBufferSize: 0, hlsJSStartLevel: -1, hlsJSXhrWithCredentials: !1, hlsJSXhrSetup: null, hlsJSEnableCaptions: !0, hlsJSDefaultAudioCodec: "auto", hlsJSLiveSyncDuration: 30, hlsJSMinAutoBitrate: 0, hlsJSAppleAppStoreCompliance: !1, hlsJSStopDownloadWhilePaused: !1, hlsJSAbrBandWidthFactor: .95, hlsJSAbrBandWidthUpFactor: .75, hlsJSMaxAudioFramesDrift: 1, hlsJSCustomConfig: {}, forceHlsJSOnMacOSSafari: !1, forceNativeHlsOverHlsJS: !1, hlsEngine: "hlsjs", hlsJSUseManifestRenditionName: !1, fpsDrm: {}, bitrates: {}, backupBitrates: {}, src: {}, backupSrc: {}, initialBitrate: 0, labels: { bitrates: { auto: "Auto", renditions: ["auto"] }, hint: { sharing: "Share", quality: "Quality", speed: "Speed", captions: "Captions", audio: "Audio", chapters: "Chapters", live: "Live", cast: "Cast", airplay: "AirPlay", playlist: "Playlist", related: "Related", upNext: "Up Next" }, captions: { off: "Off" }, error: { customErrorMessage: "This content is currently unavailable", noSupportMessage: "No playback support", noSupportDownload: "You may download video here", noSupportInstallChrome: "Using the latest version of Google Chrome may help to view this content", noSupportInstallChromeLink: "https://www.google.com/chrome/" }, ads: { controlBarCustomMessage: "Ad", skipMessage: "Skip ad", skipWaitingMessage: "Skip ad in", textForClickUIOnMobile: "Learn more" } }, hideExternalPlayerLabels: !1, webmCodecs: { video: "vp8", audio: "vorbis" }, oggCodec: "vorbis", webmFirst: !1, isLive: !1, liveRetries: 1 / 0, isLiveDvr: !1, ccFiles: [], crossorigin: "", ccFontSize: -1, ccFSFontSize: -1, ccTextColor: "FFFFFF", ccBackgroundColor: "000000", ccBackgroundAlpha: .85, ccParser: "vtt.js", gaTrackingId: "", gaCategory: "RMP", gaLabel: "RMP label", gaNamedTracker: "", gaEvents: [], gaAnonymizeIp: !1, gaNonInteractionEvents: !1, heatMap: !1, heatMapAccuracy: 20, seekBarThumbnailsLoc: "", chaptersLoc: "", nav: !1, navRates: [.25, .5, 1, 1.5, 2, 4], googleCast: !0, googleCastReceiverAppId: "C899A03E", googleCastPoster: "", googleCastMetadataType: "GENERIC", googleCastContentTitle: "", googleCastReleaseDate: "", airplay: !0, ads: !1, adTagUrl: "", adSkipButton: !1, adSkipOffset: 5, adsResponse: "", adAutoplayOnlyPreroll: !1, adImaTest: !1, adTagWaterfall: [], adLocale: "en", adUseStyledNonLinearAds: !0, adSchedule: {}, adVpaidMode: "insecure", adVpaidControls: !1, adContentDuration: 0, adContentKeywords: "", adContentTitle: "", adForceNonLinearFullSlot: !1, adTagReloadOnEnded: !1, adShowRemainingTime: !1, adAutoAlign: !0, adDisableCustomPlaybackForIOS10Plus: !1, adEnablePreloading: !1, adImaDai: !1, adImaDaiVodContentSourceId: "", adImaDaiVodVideoId: "", adImaDaiLiveAssetKey: "", adImaDaiApiKey: "", adImaDaiBackupStream: "", adImaDaiAdTagParameters: {}, adImaDaiStreamActivityMonitorId: "", adOutStream: !1, adOutStreamMutedAutoplay: !0, adAjaxWithCredentials: !0, adRmpVastEnableVpaid: !0, adLoadMediaTimeout: 8e3, adLoadVastTimeout: 5e3, adMaxNumRedirects: 4, adCountDown: !1, adPauseOnClick: !0, adParser: "ima", adBlockerDetection: !1, adBlockerDetectedPreventPlayback: !1, adBlockerDetectedMessage: "Ad-blocker software detected. To view this content please disable your ad-blocker.", relatedLoc: "", relatedData: [], relatedUpNextOffset: 10, relatedUpNextAutoplay: !0, relatedEndedLoop: !1, playlistLoc: "", playlistData: [], playlistUpNextAutoplay: !0, playlistEndedLoop: !1, video360: !1, video360FocalLength: 65, video360MaxFocalLength: 115, video360MinFocalLength: 25, video360InitialLat: 0, video360InitialLon: 0, video360FallbackBitrates: {}, video360FallbackSrc: {}, customModule: [], streamrootConfig: {}, muxDataSettings: {}, muxDataUseListData: !0 }; i.default = a }, {}], 52: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a, s = t("./fw"), r = (a = s) && a.__esModule ? a : { default: a }; var n = {}; window.MediaSource = window.MediaSource || window.WebKitMediaSource; var o, l, d, m = document.createElement("video"), v = void 0 !== m.canPlayType, g = document.createElement("audio"), y = void 0 !== g.canPlayType, h = !!(void 0 !== window.ontouchstart || window.DocumentTouch && document instanceof window.DocumentTouch), c = window.navigator && window.navigator.userAgent ? window.navigator.userAgent : null, u = window.location && window.location.protocol ? window.location.protocol.toLowerCase() : null, f = function (t) { if (null !== c) { var e = c.match(t); if (Array.isArray(e) && void 0 !== e[1]) return parseInt(e[1], 10) } return -1 }, p = /os\s+(\d+)_(\d+)/i, b = function () { if (null !== c) { var t = c.match(p); if (Array.isArray(t) && void 0 !== t[1] && void 0 !== t[2]) return parseInt(t[2], 10) } return -1 }(), S = /os\s+(\d+)/i, E = (o = [!1, -1], h && /(ipad|iphone|ipod)/i.test(c) && (o = [!0, f(S)]), o), A = /(iphone|ipod)/i, C = /ipad/i, k = /(macintosh|mac\s+os)/i, w = !(E[0] || !k.test(c)), P = /version\/(\d+)/i, _ = /(chrome|chromium|android|crios|fxios)/i, L = (l = !1, d = -1, /safari\/[.0-9]*/i.test(c) && !_.test(c) && (l = !0, d = f(P)), [l, d]), T = [!1, -1]; w && L[0] && (T = [!0, L[1]]); var I, M = /android/i, x = /android\s*(\d+)/i, D = (I = [!1, -1], E[0] || !h || M.test(c) && (I = [!0, f(x)]), I), R = !1; (E[0] || D[0]) && (R = !0); var O = !!(E[0] && window.navigator && void 0 !== window.navigator.standalone && window.navigator.standalone) || !(!D[0] || "function" != typeof window.matchMedia || !window.matchMedia("(display-mode: standalone)").matches), j = /(samsungbrowser\/|firefox\/|opr\/)/i, V = /chrome\/[.0-9]*/i, F = /wv/, N = /version\/[.0-9]*/i, U = /(version\/|safari\/|crios|fxios)/i; n.isAndroidWebView = !(j.test(c) || !D[0] || O || !(D[1] < 5 && N.test(c)) && !(5 <= D[1] && V.test(c) && F.test(c))), n.isIosWebView = !(!E[0] || U.test(c) || O); var B = !1; (n.isAndroidWebView || n.isIosWebView) && (B = !0), n.isWebView = B; var H, W, q, J = /samsungbrowser\//i, z = /samsungbrowser\/(\d+)/i, G = 'video/mp4; codecs="avc1.42E01E,mp4a.40.2"', K = function () { if (v && "" !== m.canPlayType(G)) return !0; return !1 }, Q = K(), Y = /vp9|vp09\./i, X = !(!v || void 0 === window.MediaSource || "function" != typeof window.MediaSource.isTypeSupported), $ = void 0 !== window.MediaKeys || void 0 !== window.WebKitMediaKeys || void 0 !== window.MSMediaKeys, Z = 'video/mp4; codecs="hvc1.1.6.L63.90,mp4a.40.29"', tt = 'video/mp4; codecs="hev1.1.6.L63.90,mp4a.40.29"', et = (H = 1, "number" == typeof window.devicePixelRatio && 1 < window.devicePixelRatio && (H = window.devicePixelRatio), H); n.getViewportSize = function () { var t = -1, e = -1; return r.default.isNumber(window.innerWidth) && 0 < window.innerWidth && r.default.isNumber(window.innerHeight) && 0 < window.innerHeight && (t = window.innerWidth, e = window.innerHeight), { width: t, height: e } }, c && (n.userAgent = c), n.isInIframe = function () { try { if (window.parent !== window) return !0 } catch (t) { return r.default.trace(t), !1 } return !1 }(), n.isSamsungInternet = (W = [!1, -1], D[0] && J.test(c) && (W = [!0, f(z)]), W), n.okMp4 = K(), n.testWebM = function (t) { var e = "vp8", i = "vorbis"; t && t.video && t.audio && (Y.test(t.video) && (e = t.video), "opus" === t.audio && (i = t.audio)); var a = 'video/webm; codecs="' + e + ", " + i + '"'; if (v && "" !== m.canPlayType(a)) return !0; return !1 }, n.okWebM = function () { if (v && "" !== m.canPlayType('video/webm; codecs="vp8,vorbis"')) return !0; return !1 }(), n.hasHevcSupport = !E[0] && !T[0] && !(!v || "" === m.canPlayType(Z) && "" === m.canPlayType(tt)), n.hasMseHevcSupport = !(!X || !window.MediaSource.isTypeSupported(Z) && !window.MediaSource.isTypeSupported(tt)), n.okM4a = function () { var t = !1; y && "" !== g.canPlayType('audio/mp4; codecs="mp4a.40.2"') && (t = !0); return t }(), n.okMp3 = function () { var t = !1; y && "" !== g.canPlayType("audio/mpeg") && (t = !0); return t }(), n.testOgg = function (t) { var e = "vorbis"; if ("opus" === t && (e = t), y) { var i = 'audio/ogg; codecs="' + e + '"'; if ("" !== g.canPlayType(i)) return !0 } return !1 }, n.okHls = function () { if (v && Q) { var t = m.canPlayType("application/vnd.apple.mpegurl"), e = m.canPlayType("application/x-mpegurl"); if ("" !== t || "" !== e) return !0 } return !1 }(), n.okHlsJS = !(!X || !window.MediaSource.isTypeSupported(G)), n.okHlsHevc = function (t, e, i, a) { if (v) { if (E[0] && 10 < E[1]) return !0; if (T[0] && 10 < T[1] && i) return !0; if (i && e || t && (a || i)) return !0 } return !1 }(n.okHls, n.okHlsJS, n.hasMseHevcSupport, n.hasHevcSupport), n.okDash = !(!X || void 0 === window.Promise || void 0 === window.Uint8Array || void 0 === Array.prototype.forEach || T[0] && T[1] < 9), n.okFps = !!(v && $ && (T[0] && 9 <= T[1] || E[0] && 10 < E[1])), n.ok360 = function () { var e = !1; try { var t = document.createElement("canvas"), i = t.getContext("webgl") || t.getContext("experimental-webgl") || t.getContext("webgl2"); "function" == typeof window.requestAnimationFrame && "function" == typeof window.cancelAnimationFrame && i && i instanceof window.WebGLRenderingContext && (e = !0) } catch (t) { r.default.trace(t) } if (e) { var a = void 0; try { a = !!window.MSInputMethodContext && !!document.documentMode } catch (t) { return r.default.trace(t), e } (E[0] && (E[1] < 11 || 11 === E[1] && b < 3) || T[0] && T[1] < 11 || a) && (e = !1) } return e }(), n.hasIntersectionObserver = void 0 !== window.IntersectionObserver, n.html5Video = v, n.html5Audio = y, n.getProtocol = u, n.isIos = E, n.isIphone = !(!h || !A.test(c)), n.isIpad = !(!h || !C.test(c)), n.isMacosSafari = T, n.isAndroid = D, n.isMobile = R, n.isStandalone = O, n.okMse = X, n.okEme = $, n.devicePixelRatio = et, n.fallbackArbitraryBWEstimate = function () { var t = 7e5; R ? (t = 35e4, 3 <= et && (t = 525e3)) : 3840 <= Math.max(r.default.getScreenWidth(), r.default.getScreenHeight()) && (t = 14e5); return t }(), n.hasPassiveEventListeners = function () { var t = !1; try { var e = Object.defineProperty({}, "passive", { get: function () { return t = !0 } }); window.addEventListener("testPassive", null, e), window.removeEventListener("testPassive", null, e) } catch (t) { r.default.trace(t) } return t }(), n.localStorage = function (t) { if (!t) return !1; try { if (window.localStorage) { var e = window.localStorage, i = "__storage_test__"; return e.setItem(i, i), e.removeItem(i), !0 } return !1 } catch (t) { return r.default.trace(t), !1 } }, n.formData = function () { if (void 0 !== window.FormData) try { return (new FormData).append("test", "test"), !0 } catch (t) { return !1 } return !1 }, n.isOnline = function () { return !window.navigator || "boolean" != typeof window.navigator.onLine || !1 !== window.navigator.onLine }, n.hasNativeFullscreenSupport = !(!(q = document.documentElement) || void 0 === q.requestFullscreen && void 0 === q.webkitRequestFullscreen && void 0 === q.mozRequestFullScreen && void 0 === q.msRequestFullscreen && void 0 === m.webkitEnterFullscreen), n.requestFullscreen = function (t, e) { if (t && e) try { void 0 !== t.requestFullscreen ? t.requestFullscreen() : void 0 !== t.webkitRequestFullscreen ? t.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT) : void 0 !== t.mozRequestFullScreen ? t.mozRequestFullScreen() : void 0 !== t.msRequestFullscreen ? t.msRequestFullscreen() : e && void 0 !== e.webkitEnterFullscreen && e.webkitEnterFullscreen() } catch (t) { r.default.trace(t) } }, n.exitFullscreen = function (t) { try { void 0 !== document.exitFullscreen ? document.exitFullscreen() : void 0 !== document.webkitExitFullscreen ? document.webkitExitFullscreen() : void 0 !== document.mozCancelFullScreen ? document.mozCancelFullScreen() : void 0 !== document.msExitFullscreen ? document.msExitFullscreen() : t && void 0 !== t.webkitExitFullscreen && t.webkitExitFullscreen() } catch (t) { r.default.trace(t) } }, n.canPlayType = function (t, e, i, a, s, r) { var n = "video"; -1 < ["video", "audio"].indexOf(e) && (n = e); var o = "mp4"; -1 < ["mp4", "webm", "mp3", "m4a", "mp2t", "ogg", "oga"].indexOf(i) && (o = i); var l = void 0; "string" == typeof s && "" !== s && (l = s); var d = void 0; "string" == typeof a && "" !== a && (d = a); var h = void 0; "string" == typeof r && "" !== r && (h = r); var c = "native"; -1 < ["native", "mse"].indexOf(t) && (c = t); var u = void 0; switch (n) { case "video": if (!v) return !1; u = m; break; case "audio": if (!y) return !1; u = g }var f = n + "/" + o; if ("video" === n && d && l) f += '; codecs="' + d + ", " + l + '"'; else if ("video" === n && d && !l) f += '; codecs="' + d + '"'; else { if ("audio" !== n || !l) return null; f += '; codecs="' + l + '"' } h && (f += '; eotf="' + h + '"'); var p = !1; "native" === c ? "" !== u.canPlayType(f) && (p = !0) : X && window.MediaSource.isTypeSupported(f) && (p = !0); return p }, i.default = n }, { "./fw": 53 }], 53: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var u = { blackFrame: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=", nullFn: function () { return null } }, a = function (t) { return document[t] ? document[t] : null !== document.querySelector(t) ? document.querySelector(t) : null }, s = function () { if ("number" == typeof window.pageXOffset) return window.pageXOffset; if (document.documentElement && "number" == typeof document.documentElement.scrollLeft && 0 < document.documentElement.scrollLeft) return document.documentElement.scrollLeft; var t = a("body"); return t && "number" == typeof t.scrollLeft && 0 < t.scrollLeft ? t.scrollLeft : 0 }, r = function () { if ("number" == typeof window.pageYOffset) return window.pageYOffset; if (document.documentElement && "number" == typeof document.documentElement.scrollTop && 0 < document.documentElement.scrollTop) return document.documentElement.scrollTop; var t = a("body"); return t && "number" == typeof t.scrollTop && 0 < t.scrollTop ? t.scrollTop : 0 }; u.getPosX = function (t) { if (t) { if ("number" == typeof t.pageX) return t.pageX; if ("number" == typeof t.clientX) return t.clientX + s() } return 0 }, u.getPosXTouch = function (t) { return t && t.changedTouches && t.changedTouches[0] && u.isNumber(t.changedTouches[0].pageX) ? t.changedTouches[0].pageX : 0 }, u.getPosY = function (t) { if (t) { if ("number" == typeof t.pageY) return t.pageY; if ("number" == typeof t.clientY) return t.clientY + r() } return 0 }, u.getPosYTouch = function (t) { return t && t.changedTouches && t.changedTouches[0] && u.isNumber(t.changedTouches[0].pageY) ? t.changedTouches[0].pageY : 0 }, u.isNumber = function (t) { return !(void 0 === t || "number" != typeof t || !Number.isFinite(t)) }, u.setStyle = function (t, e) { if (t && u.isObject(e)) for (var i = Object.keys(e), a = 0, s = i.length; a < s; a++) { var r = i[a]; t.style[r] = e[r] } }, u.getComputedStyle = function (t, e) { var i = ""; if (t && "function" == typeof window.getComputedStyle) { var a = window.getComputedStyle(t, null); a && (i = (i = a.getPropertyValue(e)).toString().toLowerCase()) } return i }; var o = function (t, e) { var i = u.getComputedStyle(t, e) || 0; return -1 < (i = i.toString()).indexOf("px") && (i = i.replace("px", "")), parseFloat(i) }; u.getWidth = function (t) { return t ? "number" == typeof t.offsetWidth && 0 !== t.offsetWidth ? t.offsetWidth : o(t, "width") : 0 }, u.getTrueWidth = function (t) { var e = 0; if (t && 0 < (e = u.getWidth(t))) { var i = 0, a = o(t, "padding-left"); 0 < a && (i += a); var s = o(t, "padding-right"); 0 < s && (i += s); var r = o(t, "border-left-width"); 0 < r && (i += r); var n = o(t, "border-right-width"); 0 < n && (i += n), e -= i } return e }, u.getHeight = function (t) { return t ? "number" == typeof t.offsetHeight && 0 !== t.offsetHeight ? t.offsetHeight : o(t, "height") : 0 }, u.getTrueHeight = function (t) { var e = 0; if (t && 0 < (e = u.getHeight(t))) { var i = 0, a = o(t, "padding-top"); 0 < a && (i += a); var s = o(t, "padding-bottom"); 0 < s && (i += s); var r = o(t, "border-top-width"); 0 < r && (i += r); var n = o(t, "border-bottom-width"); 0 < n && (i += n), e -= i } return e }, u.getAbsLeft = function (t) { return t && t.getBoundingClientRect().left + s() || 0 }, u.getAbsTop = function (t) { return t && t.getBoundingClientRect().top + r() || 0 }, u.setText = function (t, e) { t && "string" == typeof e && (t.textContent = e) }, u.setClass = function (t, e) { t && void 0 !== t.className && "string" == typeof e && "" !== e && (t.className = e) }, u.addClass = function (t, e) { t && void 0 !== t.className && "string" == typeof e && "" !== e && ("" !== t.className ? -1 === t.className.indexOf(e) && (t.className = (t.className + " " + e).replace(/\s\s+/g, " ")) : t.className = e) }, u.removeClass = function (t, e) { t && void 0 !== t.className && "string" == typeof e && "" !== e && -1 < t.className.indexOf(e) && (t.className = t.className.replace(e, "").replace(/\s\s+/g, " ")) }, u.hasClass = function (t, e) { return !!(t && "string" == typeof t.className && "string" == typeof e && "" !== e && -1 < t.className.indexOf(e)) }, u.removeElement = function (t) { if (t && t.parentNode) try { t.parentNode.removeChild(t) } catch (t) { u.trace(t) } }, u.createStdEvent = function (t, e) { var i = void 0; if (e) if ("function" == typeof window.Event) try { i = new Event(t), e.dispatchEvent(i) } catch (t) { u.trace(t) } else try { (i = document.createEvent("Event")).initEvent(t, !0, !0), e.dispatchEvent(i) } catch (t) { u.trace(t) } }, u.createCustomEvent = function (t, e, i) { if (e && "function" == typeof window.CustomEvent) try { var a = new CustomEvent(t, { detail: i }); e.dispatchEvent(a) } catch (t) { u.trace(t) } }, u.removeEvent = function (t, e, i) { "function" == typeof i && e && (Array.isArray(t) ? t.forEach(function (t) { e.removeEventListener(t, i) }) : e.removeEventListener(t, i)) }, u.addEvent = function (t, e, i) { "function" == typeof i && e && (Array.isArray(t) ? t.forEach(function (t) { e.addEventListener(t, i) }) : e.addEventListener(t, i)) }, u.appendToHead = function (t) { try { var e = a("head"); e || (e = a("body")), e && t && e.appendChild(t) } catch (t) { u.trace(t) } }, u.isVisible = function (t) { return !(!t || "visible" !== t.style.visibility) }, u.show = function (t) { if (Array.isArray(t)) for (var e = 0, i = t.length; e < i; e++)t[e] && (t[e].style.display = "block"); else t && (t.style.display = "block") }, u.fadeIn = function (t) { t && (1 === t.style.opacity && "visible" === t.style.visibility || setTimeout(function () { u.setStyle(t, { opacity: 1, visibility: "visible" }) }, 1)) }, u.hide = function (t) { if (Array.isArray(t)) for (var e = 0, i = t.length; e < i; e++)t[e] && (t[e].style.display = "none"); else t && (t.style.display = "none") }, u.fadeOut = function (t) { t && (0 === t.style.opacity && "hidden" === t.style.visibility || setTimeout(function () { u.setStyle(t, { opacity: 0, visibility: "hidden" }) }, 1)) }, u.readableTime = function (t) { if ("number" == typeof t && 0 <= t) { var e = Math.floor(t % 60), i = Math.floor(1 * t / 60), a = 0; return 59 < i && (a = Math.floor(1 * t / 3600), i = Math.floor(1 * t / 3600 % 1 * 60), e = Math.floor(t % 60)), e < 10 && (e = "0" + e), i < 10 && (i = "0" + i), 0 < a ? a += ":" : 0 === a && (a = ""), a + i + ":" + e } return "" }, u.dateToSeconds = function (t) { var e = t.match(/(\d+:)?(\d+):(\d+)\.(\d+)/); if (!(1 < e.length)) return null; e.shift(); var i = 0; if (e[0]) { var a = e[0]; -1 < a.indexOf(":") && (a = a.replace(":", "")), i += 60 * parseInt(a) * 60 } return e[1] && (i += 60 * parseInt(e[1])), e[2] && (i += parseInt(e[2])), e[3] && (i += parseInt(e[3]) / 1e3), i }, u.hexToRgb = function (t) { var e = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t); return e ? { r: parseInt(e[1], 16), g: parseInt(e[2], 16), b: parseInt(e[3], 16) } : null }, u.srcExists = function (t, e) { if ("mp4" === e || "webm" === e || "mp4Hevc" === e) { if (Array.isArray(t) && "string" == typeof t[0] && "" !== t[0]) return !0 } else if ("string" == typeof t && "" !== t) return !0; return !1 }, u.filterInitialBitrate = function (t, e) { return t < 0 || "string" != typeof e[t] ? 0 : t }, u.isObject = function (t) { return null != t && "object" == typeof t }, u.isEmptyObject = function (t) { return !(!u.isObject(t) || 0 !== Object.keys(t).length) }, u.ajax = function (a, s, r, n) { return new Promise(function (t, e) { if ("undefined" != typeof XMLHttpRequest) { var i = new XMLHttpRequest; i.open(n, a, !0), i.timeout = s, r && (i.withCredentials = !0), i.onloadend = function () { "number" == typeof i.status && 200 <= i.status && i.status < 300 ? "HEAD" === n ? t() : "string" == typeof i.responseText && "" !== i.responseText ? t(i.responseText) : e() : e() }, i.ontimeout = function () { e() }, i.send(null) } else e() }) }, u.getFQURL = function (t, e) { var i = t.split("/"), a = e.split("/"); i.pop(); for (var s = 0; s < a.length; s++)"." !== a[s] && (".." === a[s] ? i.pop() : i.push(a[s])); return i.join("/") }, u.getNow = function () { return window.performance && window.performance.now ? Math.round(window.performance.now()) : window.Date ? Date.now() : void 0 }, u.getRandomInt = function (t, e) { var i = Math.ceil(t), a = Math.floor(e); return Math.floor(Math.random() * (a - i)) + i }, u.cssPropertySupport = function (t) { var e = !1, i = document.createElement("div"); try { i && "string" == typeof t && void 0 !== i.style[t] && (e = !0) } catch (t) { u.trace(t) } return i = null, e }; var n = function (t) { if (t && t.type) { var e = t.type.replace(/^(webkit|moz|MS)/, "").toLowerCase(); u.createStdEvent(e, document) } }; u.polyfillFullscreenEvents = function () { document.addEventListener("webkitfullscreenchange", n), document.addEventListener("webkitfullscreenerror", n), document.addEventListener("mozfullscreenchange", n), document.addEventListener("mozfullscreenerror", n), document.addEventListener("MSFullscreenChange", n), document.addEventListener("MSFullscreenError", n) }, u.stopPropagation = function (t) { t && t.stopPropagation() }, u.contextMenuInteraction = function (t) { t && (t.stopPropagation(), t.preventDefault()) }, u.selectText = function (t, e) { e && e.stopPropagation(), t && t.select() }, u.updateAriaLabel = function (t, e) { e && t && t.setAttribute("aria-label", e) }, u.hideAria = function (t) { t && t.setAttribute("aria-hidden", "true") }; var l = !(u.preventKeyDown = function (t) { if (t) { var e = t.which; e && (32 !== e && 70 !== e && 37 !== e && 39 !== e && 38 !== e && 40 !== e && 77 !== e || t.preventDefault()) } }); window.console && "function" == typeof window.console.log && (l = !0); u.log = function (t, e) { l && void 0 !== e && ("string" == typeof e && t ? window.console.log("rmp (" + t + "): " + e) : window.console.log(e)) }; window.console && window.console.trace, u.trace = function (t) { 0 }, u.appendStyle = function (t) { if (t) { var e = document.createElement("style"); e.type = "text/css", e.appendChild(document.createTextNode(t)), u.appendToHead(e) } }, u.RFC3986EncodeURIComponent = function (t) { return encodeURIComponent(t).replace(/[!'()*]/g, function (t) { return "%" + t.charCodeAt(0).toString(16) }) }, u.getScreenWidth = function () { return window.screen && "number" == typeof window.screen.width && 0 < window.screen.width ? window.screen.width : -1 }, u.getScreenHeight = function () { return window.screen && "number" == typeof window.screen.height && 0 < window.screen.height ? window.screen.height : -1 }, u.filterTextTracks = function (t) { var e = []; if (!t || t.length < 1) return e; for (var i = /(captions|subtitles|subtitle)/i, a = 0, s = t.length; a < s; a++) { var r = t[a]; ("string" == typeof r.kind && i.test(r.kind) || "string" == typeof r.type && i.test(r.type)) && e.push(r) } return e }, u.isValidTextTracksSet = function (t) { return !!(Array.isArray(t) && Array.isArray(t[0]) && t[0][0] && t[0][1] && t[0][2]) }, u.clearTimeout = function (t) { t && clearTimeout(t) }, u.clearInterval = function (t) { t && clearInterval(t) }, u.addEventListenerCSS = function () { var t = document.createElement("link"), e = !1; return t.addEventListener && (e = !0), t = null, e }, u.getScript = function (t, e, i) { if ("string" == typeof t && "function" == typeof e && "function" == typeof i) { var a = document.createElement("script"); void 0 !== a.onload && void 0 !== a.onerror && (void 0 !== a.async && (a.async = !0), a.onload = e, a.onerror = i), a.src = t, u.appendToHead(a) } }, u.filterPlaylist = function (t) { for (var e = t, i = [], a = void 0, s = 0, r = e.length; s < r; s++)if (u.isObject(e[s].src) || u.isObject(e[s].bitrates)) { if (u.isObject(e[s].bitrates) && !u.isObject(e[s].src)) { var n = e[s].bitrates; e[s].src = n } if (u.srcExists(e[s].src.hlsHevc, "hlsHevc")) a = "hlsHevc"; else if (u.srcExists(e[s].src.hls, "hls")) a = "hls"; else if (u.srcExists(e[s].src.dash, "dash")) a = "dash"; else if (u.srcExists(e[s].src.mp4Hevc, "mp4Hevc")) a = "mp4Hevc"; else if (u.srcExists(e[s].src.mp4, "mp4")) a = "mp4"; else { if (!u.srcExists(e[s].src.webm, "webm")) { i.push(s); continue } a = "webm" } for (var o = ["contentTitle", "contentDescription", "poster", "thumbnail", "adTagUrl", "contentDuration", "src", "seekBarThumbnailsLoc"], l = 0, d = o.length; l < d; l++) { var h = o[l]; if ("contentTitle" === h || "contentDescription" === h) "string" == typeof e[s][h] && "" !== e[s][h] || (e[s][h] = "contentTitle" === h ? "Video " + (s + 1) : "Playlist item " + (s + 1)); else if ("thumbnail" === h || "poster" === h || "adTagUrl" === h || "contentDuration" === h || "related" === h || "seekBarThumbnailsLoc" === h) { if ("string" != typeof e[s][h] || "" === e[s][h]) { "thumbnail" === h && "string" == typeof e[s].poster && "" !== e[s].poster ? e[s].thumbnail = e[s].poster : e[s][h] = ""; continue } } else if ("src" === h) { if ("string" != typeof e[s][h][a] && !Array.isArray(e[s][h][a])) { i.push(s); continue } } else if ("adTagWaterfall" === h && (!Array.isArray(e[s][h]) || "string" != typeof e[s][h][0] || "" === e[s][h][0])) { delete e[s][h]; continue } } } else i.push(s); if (0 < i.length) for (var c = i.length - 1; 0 <= c; c--)e.splice(i[c], 1); return e }, u.setMediaCurrentTime = function (t, e) { if (t && u.isNumber(e) && 0 <= e) try { t.currentTime = e } catch (t) { u.trace(t) } }, u.getMediaCurrentTime = function (t) { return void 0 !== t.currentTime && u.isNumber(t.currentTime) && 0 <= t.currentTime ? t.currentTime : -1 }, u.getMediaDuration = function (t) { return void 0 !== t.duration && u.isNumber(t.duration) && 0 <= t.duration ? t.duration : -1 }, u.clearNativeHtml5Buffer = function (t) { try { t && (t.removeAttribute("src"), t.load()) } catch (t) { u.trace(t) } }, i.default = u }, {}], 54: [function (t, e, i) { "use strict"; t("core-js/modules/es6.typed.array-buffer"), t("core-js/modules/es6.typed.data-view"), t("core-js/modules/es6.typed.int8-array"), t("core-js/modules/es6.typed.uint8-array"), t("core-js/modules/es6.typed.uint8-clamped-array"), t("core-js/modules/es6.typed.int16-array"), t("core-js/modules/es6.typed.uint16-array"), t("core-js/modules/es6.typed.int32-array"), t("core-js/modules/es6.typed.uint32-array"), t("core-js/modules/es6.typed.float32-array"), t("core-js/modules/es6.typed.float64-array"), t("core-js/modules/es6.map"), t("core-js/modules/es6.set"), t("core-js/modules/es6.weak-map"), t("core-js/modules/es6.weak-set"), t("core-js/modules/es6.reflect.apply"), t("core-js/modules/es6.reflect.construct"), t("core-js/modules/es6.reflect.define-property"), t("core-js/modules/es6.reflect.delete-property"), t("core-js/modules/es6.reflect.get"), t("core-js/modules/es6.reflect.get-own-property-descriptor"), t("core-js/modules/es6.reflect.get-prototype-of"), t("core-js/modules/es6.reflect.has"), t("core-js/modules/es6.reflect.is-extensible"), t("core-js/modules/es6.reflect.own-keys"), t("core-js/modules/es6.reflect.prevent-extensions"), t("core-js/modules/es6.reflect.set"), t("core-js/modules/es6.reflect.set-prototype-of"), t("core-js/modules/es6.promise"), t("core-js/modules/es6.symbol"), t("core-js/modules/es6.object.freeze"), t("core-js/modules/es6.object.seal"), t("core-js/modules/es6.object.prevent-extensions"), t("core-js/modules/es6.object.is-frozen"), t("core-js/modules/es6.object.is-sealed"), t("core-js/modules/es6.object.is-extensible"), t("core-js/modules/es6.object.get-own-property-descriptor"), t("core-js/modules/es6.object.get-prototype-of"), t("core-js/modules/es6.object.keys"), t("core-js/modules/es6.object.get-own-property-names"), t("core-js/modules/es6.object.assign"), t("core-js/modules/es6.object.is"), t("core-js/modules/es6.object.set-prototype-of"), t("core-js/modules/es6.function.name"), t("core-js/modules/es6.string.raw"), t("core-js/modules/es6.string.from-code-point"), t("core-js/modules/es6.string.code-point-at"), t("core-js/modules/es6.string.repeat"), t("core-js/modules/es6.string.starts-with"), t("core-js/modules/es6.string.ends-with"), t("core-js/modules/es6.string.includes"), t("core-js/modules/es6.regexp.flags"), t("core-js/modules/es6.regexp.match"), t("core-js/modules/es6.regexp.replace"), t("core-js/modules/es6.regexp.split"), t("core-js/modules/es6.regexp.search"), t("core-js/modules/es6.array.from"), t("core-js/modules/es6.array.of"), t("core-js/modules/es6.array.copy-within"), t("core-js/modules/es6.array.find"), t("core-js/modules/es6.array.find-index"), t("core-js/modules/es6.array.fill"), t("core-js/modules/es6.array.iterator"), t("core-js/modules/es6.number.is-finite"), t("core-js/modules/es6.number.is-integer"), t("core-js/modules/es6.number.is-safe-integer"), t("core-js/modules/es6.number.is-nan"), t("core-js/modules/es6.number.epsilon"), t("core-js/modules/es6.number.min-safe-integer"), t("core-js/modules/es6.number.max-safe-integer"), t("core-js/modules/es6.math.acosh"), t("core-js/modules/es6.math.asinh"), t("core-js/modules/es6.math.atanh"), t("core-js/modules/es6.math.cbrt"), t("core-js/modules/es6.math.clz32"), t("core-js/modules/es6.math.cosh"), t("core-js/modules/es6.math.expm1"), t("core-js/modules/es6.math.fround"), t("core-js/modules/es6.math.hypot"), t("core-js/modules/es6.math.imul"), t("core-js/modules/es6.math.log1p"), t("core-js/modules/es6.math.log10"), t("core-js/modules/es6.math.log2"), t("core-js/modules/es6.math.sign"), t("core-js/modules/es6.math.sinh"), t("core-js/modules/es6.math.tanh"), t("core-js/modules/es6.math.trunc"), t("core-js/modules/web.timers"), t("core-js/modules/web.immediate"), t("core-js/modules/web.dom.iterable"); var r = s(t("./fw/env")), n = s(t("./fw/fw")), a = s(t("./analytics/analytics")), o = s(t("./analytics/mux")), l = s(t("./core/utils/license")), d = s(t("./360/360")), h = s(t("./playlist/related")), c = s(t("./playlist/playlist")), u = s(t("./core/accessible/accessible")), f = s(t("./core/run-player/runPlayer")), p = s(t("./core/resize/resize")), m = s(t("./fw/defaults/inner-defaults")), v = s(t("./core/utils/utils")), g = s(t("./core/utils/viewable")), y = s(t("./core/ui/logo")), b = s(t("./analytics/logs")), S = s(t("./core/ui/colors")), E = s(t("./abr/fps")), A = s(t("./ads/ads-helpers")), C = s(t("./cast/cast")), k = s(t("./vtt/captions")), w = s(t("./api/api")), P = s(t("./api/ads")), _ = s(t("./api/bitrates")), L = s(t("./api/src")), T = s(t("./api/audio")), I = s(t("./api/destroy")), M = s(t("./api/offline")), x = s(t("./fw/autoplay")); function s(t) { return t && t.__esModule ? t : { default: t } } !function () { if ("undefined" != typeof window && void 0 !== window.document && void 0 === window.RadiantMP) { n.default.isObject(window.rmpGlobals) || (window.rmpGlobals = {}, window.rmpGlobals.castApiInitialized = !1, window.rmpGlobals.adBlockerDetected = null), window.RadiantMP = function (t) { "string" == typeof t && "" !== t && (this.id = t, this.dom = {}, this.dom.container = document.getElementById(this.id), m.default.set.call(this)) }, w.default.attach(window.RadiantMP), P.default.attach(window.RadiantMP), _.default.attach(window.RadiantMP), L.default.attach(window.RadiantMP), T.default.attach(window.RadiantMP), I.default.attach(window.RadiantMP), M.default.attach(window.RadiantMP), n.default.polyfillFullscreenEvents(); var t = function () { if (p.default.initialSizing.call(this), this.audioOnly ? this.dom.video = document.createElement("audio") : this.dom.video = document.createElement("video"), r.default.isIos[0] && ("" !== this.videoTitle && (this.useVideoTitle = !0), this.useVideoTitle || "" === this.contentTitle || (this.videoTitle = this.contentTitle, this.useVideoTitle = !0)), n.default.cssPropertySupport("objectFit") && !this.audioOnly) switch (this.scaleMode) { case "letterbox": n.default.addClass(this.dom.video, "rmp-object-fit-contain"); break; case "zoom": n.default.addClass(this.dom.video, "rmp-object-fit-cover"); break; case "stretch": n.default.addClass(this.dom.video, "rmp-object-fit-fill"); break; case "none": n.default.addClass(this.dom.video, "rmp-object-fit-none"); break; default: n.default.addClass(this.dom.video, "rmp-object-fit-contain") }if (S.default.apply.call(this), n.default.addClass(this.dom.video, "rmp-video"), "auto" !== this.preload && "metadata" !== this.preload && (this.preload = "none"), this.autoplay && (this.preload = "auto"), r.default.isMobile && (this.preload = "none", n.default.addClass(this.dom.container, "rmp-mobile"), this.seekBarThumbnailsLoc = "", this.delayToFade = Math.round(1.333 * this.delayToFade)), this.ads && this.adImaDai && (this.adParser = "ima", this.isLive && this.adImaDaiLiveAssetKey ? this.imaDaiLive = !0 : this.adImaDaiVodContentSourceId && this.adImaDaiVodVideoId ? this.imaDaiVod = !0 : this.ads = !1, (r.default.isIos[0] || r.default.isMacosSafari[0] && !this.forceHlsJSOnMacOSSafari) && (this.ads = !1, this.adImaDaiBackupStream ? this.src = { hls: this.adImaDaiBackupStream } : this.src = {})), this.ads) { if (this.adImaDai && (this.hlsEngine = "hlsjs"), "rmp-vast" !== this.adParser && (this.adParser = "ima"), this.adSkipButton && "ima" === this.adParser && (this.adSkipButton = !1), this.adOutStream && (this.googleCast = !1, this.src = {}, this.adAutoplayOnlyPreroll = !1, this.adSchedule = {}, this.airplay = !1), !n.default.isEmptyObject(this.adSchedule)) { if (Array.isArray(this.adSchedule.midrollRepeat) && "number" == typeof this.adSchedule.midrollRepeat[0] && "string" == typeof this.adSchedule.midrollRepeat[1]) { this.adSchedule.midroll = []; for (var t = 0; t < 50; t++)this.adSchedule.midroll[t] = [this.adSchedule.midrollRepeat[0] * (t + 1), this.adSchedule.midrollRepeat[1]]; delete this.adSchedule.midrollRepeat } Array.isArray(this.adSchedule.preroll) && (this.adSchedule.preroll = this.adSchedule.preroll[0]), Array.isArray(this.adSchedule.postroll) && (this.adSchedule.postroll = this.adSchedule.postroll[0]), (this.adSchedule.preroll || this.adSchedule.postroll || Array.isArray(this.adSchedule.midroll) && Array.isArray(this.adSchedule.midroll[0]) && 2 === this.adSchedule.midroll[0].length) && (this.adScheduleInput = !0, this.adTagUrl = "", this.adTagWaterfall = [], this.adTagReloadOnEnded = !1, this.adSchedule.postroll && this.loop && delete this.adSchedule.postroll, this.adSchedule.preroll || (this.emptyInitAdTagUrl = !0, this.adSchedule.preroll = ""), this.adSchedule.postroll || (this.adSchedule.postroll = ""), Array.isArray(this.adSchedule.midroll) && Array.isArray(this.adSchedule.midroll[0]) && 2 === this.adSchedule.midroll[0].length && this.adSchedule.midroll.sort(function (t, e) { return t[0] - e[0] })) } this.adAutoplayOnlyPreroll && "rmp-vast" === this.adParser && (this.adAutoplayOnlyPreroll = !1), r.default.isIos[0] && this.loop && (this.loop = !1), "" !== this.adTagUrl && (this.adTagUrl = A.default.replaceAdTagVar.call(this, this.adTagUrl)), "" !== this.adTagUrl || "" === this.adsResponse || this.adScheduleInput || this.hasRelated || this.hasPlaylist || (this.adTagUrl = this.adsResponse), this.adTagReloadOnEnded && (this.originalAdTagUrl = this.adTagUrl, this.originalAdTagWaterfall = [].concat(function (t) { if (Array.isArray(t)) { for (var e = 0, i = Array(t.length); e < t.length; e++)i[e] = t[e]; return i } return Array.from(t) }(this.adTagWaterfall)), this.adOutStream || A.default.onEndedReloadAdTag.call(this)), this.hasRelated || this.hasPlaylist || this.adScheduleInput || "" !== this.adTagUrl || (this.emptyInitAdTagUrl = !0) } r.default.hasIntersectionObserver && (this.viewableAutoplay || this.viewablePlayPause) && ((r.default.isMobile || r.default.isMacosSafari[0]) && (this.muted = !0), g.default.set.call(this)), (this.isLive || this.isLiveDvr) && (this.isVod = !1, this.loop = !1, this.ccFiles = [], this.isLive && n.default.addClass(this.dom.container, "rmp-live"), this.isLiveDvr && (n.default.addClass(this.dom.container, "rmp-live-dvr"), this.hlsEngine = "hlsjs")), this.dom.ccItems = [], n.default.isValidTextTracksSet(this.ccFiles) && k.default.prepare.call(this), this.audioOnly ? (n.default.addClass(this.dom.container, "rmp-audio-only"), this.labels.error.noSupportDownload = "", this.labels.error.noSupportInstallChrome = "", this.sharing = !1, this.contentTitle = "", this.seekBarThumbnailsLoc = "", this.ccFiles = [], this.hasCC = !1, this.nav = !1, this.ads && (this.adParser = "ima"), v.default.detectAudioSrc.call(this)) : this.hasRelated || this.hasPlaylist || this.adOutStream || v.default.detectSrc.call(this), this.sharing && "" === this.sharingUrl && (this.sharingUrl = document.URL), r.default.isIos[0] && r.default.isIos[1] < 10 && this.loop && (this.loop = !1), y.default.init.call(this), n.default.isEmptyObject(this.fpsDrm) || E.default.filterDrm.call(this) || (this.hasFps = !1), this.video360 && (r.default.ok360 ? (r.default.isIos[0] ? (this.ads && "ima" === this.adParser ? this.adDisableCustomPlaybackForIOS10Plus = !0 : this.ads = !1, this.fullWindowMode = !0) : r.default.isMacosSafari[0] && this.ads && "rmp-vast" === this.adParser && (this.ads = !1), this.googleCast = !1, this.airplay = !1, this.hlsJSCapLevelToPlayerSize = !1, this.shakaCapLevelToPlayerSize = !1, this.adAutoplayOnlyPreroll = !1, this.crossorigin = "anonymous", d.default.load.call(this)) : n.default.isEmptyObject(this.video360FallbackSrc) ? (v.default.resetSrc.call(this), this.video360 = !1) : (this.src = this.video360FallbackSrc, this.video360 = !1, v.default.resetSrc.call(this), v.default.detectSrc.call(this))), this.hasNativeFullscreenSupport = r.default.hasNativeFullscreenSupport, this.fullWindowMode && (this.hasNativeFullscreenSupport = !1), r.default.isInIframe && (this.fullWindowMode = !1), u.default.init.call(this), function () { this.licenseFailedDestroyRequested || (this.hasRelated ? h.default.init.call(this) : this.hasPlaylist ? c.default.init.call(this) : (a.default.init.call(this), b.default.init.call(this), f.default.init.call(this))) }.call(this) }, s = function () { ("" !== this.relatedLoc || Array.isArray(this.relatedData) && n.default.isObject(this.relatedData[0])) && (this.hasRelated = !0, "" !== this.relatedLoc && Array.isArray(this.relatedData) && n.default.isObject(this.relatedData[0]) && (this.relatedLoc = ""), this.quickRewind = 0, this.srcChangeAutoplay || (this.relatedUpNextAutoplay = !1), this.relatedUpNextAutoplay && (this.loop = !1)), ("" !== this.playlistLoc || Array.isArray(this.playlistData) && n.default.isObject(this.playlistData[0])) && (this.hasPlaylist = !0, "" !== this.playlistLoc && Array.isArray(this.playlistData) && n.default.isObject(this.playlistData[0]) && (this.playlistLoc = ""), this.autoHeightMode = !0, this.srcChangeAutoplay || (this.playlistUpNextAutoplay = !1), this.playlistUpNextAutoplay && (this.loop = !1)), (this.hasPlaylist || this.hasRelated) && (this.video360 && (this.video360 = !1), this.audioOnly && (this.audioOnly = !1), this.isLiveDvr && (this.isLive = !0, this.isLiveDvr = !1), this.adSchedule = {}, this.backupSrc = {}, this.chaptersLoc = ""), this.audioOnly && (this.video360 && (this.video360 = !1), this.hlsJSCapLevelToPlayerSize = !1, this.shakaCapLevelToPlayerSize = !1, this.quickRewind = 0, this.iframeMode = !1, this.autoHeightMode = !1, this.height = 40), function () { this.audioOnly && ("s1" !== this.skin && "s2" !== this.skin && (this.skin = "s1"), "" === this.skinBackgroundColor && (this.skinBackgroundColor = "212121")), "s1" !== this.skin && "s2" !== this.skin && "s3" !== this.skin && "s4" !== this.skin && (this.skin = "s1"), this.initConfig = t.bind(this), null === document.getElementById("rmp-dress-code") ? v.default.getCSS.call(this) : this.initConfig() }.call(this) }; window.RadiantMP.prototype.init = function (t) { var i = this; if (null !== this.dom.container) if (this.refTime = n.default.getNow(), v.default.filterInput.call(this, t), n.default.isEmptyObject(this.src) && !n.default.isEmptyObject(this.bitrates) && (this.src = this.bitrates), n.default.isEmptyObject(this.backupSrc) && !n.default.isEmptyObject(this.backupBitrates) && (this.backupSrc = this.backupBitrates), n.default.isEmptyObject(this.video360FallbackSrc) && !n.default.isEmptyObject(this.video360FallbackBitrates) && (this.video360FallbackSrc = this.video360FallbackBitrates), "string" == typeof this.src.mp4 && "" !== this.src.mp4 && (this.src.mp4 = [this.src.mp4]), "string" == typeof this.src.webm && "" !== this.src.webm && (this.src.webm = [this.src.webm]), "" !== this.licenseKey) { if (n.default.addClass(this.dom.container, "rmp-container rmp-color-button"), this.fadeInPlayer) { n.default.setStyle(this.dom.container, { opacity: 0, visibility: "hidden" }), n.default.addClass(this.dom.container, "rmp-container-fade-in") } if ("/" !== this.pathToRmpFiles.substr(this.pathToRmpFiles.length - 1) && (this.pathToRmpFiles = this.pathToRmpFiles + "/"), !r.default.isInIframe || this.iframeAllowed) if (l.default.ck.call(this)) { this.windowOnline = function () { n.default.createStdEvent("online", this.dom.container) }.bind(this), window.addEventListener("online", this.windowOnline); if (this.windowOffline = function () { n.default.createStdEvent("offline", this.dom.container) }.bind(this), window.addEventListener("offline", this.windowOffline), this.isLive && this.isLiveDvr && (this.isLiveDvr = !1), v.default.assignPlaybackCapabilities.call(this), r.default.isStandalone ? n.default.addClass(this.dom.container, "rmp-standalone") : r.default.isWebView && n.default.addClass(this.dom.container, "rmp-webview"), this.audioOnly ? this.dom.container.style.backgroundColor = "transparent" : "000000" !== this.backgroundColor && (this.dom.container.style.backgroundColor = "#" + this.backgroundColor), this.adOutStream && (this.ads || (this.ads = !0), "outstream" === this.skin && (this.adOutStreamSkin = !0, n.default.addClass(this.dom.container, "rmp-ad-outstream"), this.skin = "s1", this.skinBackgroundColor = "", this.adShowRemainingTime = !0)), this.permanentMuted && (this.googleCast = !1, this.muted = !0), void 0 === window.chrome && (this.googleCast = !1), this.googleCast && (window.rmpGlobals.castApiInitialized || (window.rmpGlobals.castApiInitialized = !0, this.castReady = C.default.ready.bind(this), this.dom.container.addEventListener("ready", this.castReady)), "" !== this.contentTitle && "" === this.googleCastContentTitle && (this.googleCastContentTitle = this.contentTitle)), o.default.detect.call(this), this.adAutoplayOnlyPreroll && !this.autoplay && (this.autoplay = !0), this.autoplay && this.adOutStream && this.adOutStreamMutedAutoplay && (this.muted = !0), this.autoplay && this.detectAutoplayCapabilities) { if (r.default.isMobile) { if (r.default.isIos[0] && r.default.isIos[1] <= 9) return v.default.fireAutoplayFailure.call(this), void s.call(this); if (r.default.isAndroid[0] && r.default.isSamsungInternet[0] && 7 <= r.default.isSamsungInternet[1]) return this.muted = !0, void s.call(this); r.default.isWebView || (this.muted = !0) } var a = "video"; this.audioOnly && (a = "audio"), this.muted ? x.default[a]({ inline: !0, muted: !0 }).then(function (t) { var e = t.result; t.error; !1 === e && v.default.fireAutoplayFailure.call(i), s.call(i) }) : x.default[a]({ inline: !0 }).then(function (t) { var e = t.result; t.error; !1 === e ? x.default[a]({ inline: !0, muted: !0 }).then(function (t) { var e = t.result; t.error; !1 === e ? v.default.fireAutoplayFailure.call(i) : i.muted = !0, s.call(i) }) : s.call(i) }) } else s.call(this) } else l.default.endPlayer.call(this, "license key check failed"); else l.default.endPlayer.call(this, "iframe embedding not allowed") } else n.default.log("license", "no license key provided - exit") }, Array.isArray(window.rmpAsyncPlayers) && n.default.isObject(window.rmpAsyncPlayers[0]) && "string" == typeof window.rmpAsyncPlayers[0].asyncElementID && "" !== window.rmpAsyncPlayers[0].asyncElementID && (window.rmpAsyncPlayerInstances = [], window.rmpAsyncPlayers.forEach(function (t) { var e = t.asyncElementID, i = document.getElementById(e); if (null !== i) { var a = new window.RadiantMP(e); 0, window.rmpAsyncPlayerInstances.push(a), n.default.createStdEvent("rmpasyncplayerinstanceavailable", i), delete t.asyncElementID, a.init(t) } })) } }() }, { "./360/360": 1, "./abr/fps": 2, "./ads/ads-helpers": 6, "./analytics/analytics": 11, "./analytics/logs": 12, "./analytics/mux": 13, "./api/ads": 14, "./api/api": 15, "./api/audio": 16, "./api/bitrates": 17, "./api/destroy": 18, "./api/offline": 19, "./api/src": 20, "./cast/cast": 22, "./core/accessible/accessible": 23, "./core/resize/resize": 36, "./core/run-player/runPlayer": 38, "./core/ui/colors": 40, "./core/ui/logo": 43, "./core/utils/license": 45, "./core/utils/utils": 46, "./core/utils/viewable": 47, "./fw/autoplay": 49, "./fw/defaults/inner-defaults": 50, "./fw/env": 52, "./fw/fw": 53, "./playlist/playlist": 55, "./playlist/related": 56, "./vtt/captions": 57, "core-js/modules/es6.array.copy-within": 163, "core-js/modules/es6.array.fill": 164, "core-js/modules/es6.array.find": 166, "core-js/modules/es6.array.find-index": 165, "core-js/modules/es6.array.from": 167, "core-js/modules/es6.array.iterator": 168, "core-js/modules/es6.array.of": 169, "core-js/modules/es6.function.name": 170, "core-js/modules/es6.map": 171, "core-js/modules/es6.math.acosh": 172, "core-js/modules/es6.math.asinh": 173, "core-js/modules/es6.math.atanh": 174, "core-js/modules/es6.math.cbrt": 175, "core-js/modules/es6.math.clz32": 176, "core-js/modules/es6.math.cosh": 177, "core-js/modules/es6.math.expm1": 178, "core-js/modules/es6.math.fround": 179, "core-js/modules/es6.math.hypot": 180, "core-js/modules/es6.math.imul": 181, "core-js/modules/es6.math.log10": 182, "core-js/modules/es6.math.log1p": 183, "core-js/modules/es6.math.log2": 184, "core-js/modules/es6.math.sign": 185, "core-js/modules/es6.math.sinh": 186, "core-js/modules/es6.math.tanh": 187, "core-js/modules/es6.math.trunc": 188, "core-js/modules/es6.number.epsilon": 189, "core-js/modules/es6.number.is-finite": 190, "core-js/modules/es6.number.is-integer": 191, "core-js/modules/es6.number.is-nan": 192, "core-js/modules/es6.number.is-safe-integer": 193, "core-js/modules/es6.number.max-safe-integer": 194, "core-js/modules/es6.number.min-safe-integer": 195, "core-js/modules/es6.object.assign": 196, "core-js/modules/es6.object.freeze": 197, "core-js/modules/es6.object.get-own-property-descriptor": 198, "core-js/modules/es6.object.get-own-property-names": 199, "core-js/modules/es6.object.get-prototype-of": 200, "core-js/modules/es6.object.is": 204, "core-js/modules/es6.object.is-extensible": 201, "core-js/modules/es6.object.is-frozen": 202, "core-js/modules/es6.object.is-sealed": 203, "core-js/modules/es6.object.keys": 205, "core-js/modules/es6.object.prevent-extensions": 206, "core-js/modules/es6.object.seal": 207, "core-js/modules/es6.object.set-prototype-of": 208, "core-js/modules/es6.promise": 209, "core-js/modules/es6.reflect.apply": 210, "core-js/modules/es6.reflect.construct": 211, "core-js/modules/es6.reflect.define-property": 212, "core-js/modules/es6.reflect.delete-property": 213, "core-js/modules/es6.reflect.get": 216, "core-js/modules/es6.reflect.get-own-property-descriptor": 214, "core-js/modules/es6.reflect.get-prototype-of": 215, "core-js/modules/es6.reflect.has": 217, "core-js/modules/es6.reflect.is-extensible": 218, "core-js/modules/es6.reflect.own-keys": 219, "core-js/modules/es6.reflect.prevent-extensions": 220, "core-js/modules/es6.reflect.set": 222, "core-js/modules/es6.reflect.set-prototype-of": 221, "core-js/modules/es6.regexp.flags": 223, "core-js/modules/es6.regexp.match": 224, "core-js/modules/es6.regexp.replace": 225, "core-js/modules/es6.regexp.search": 226, "core-js/modules/es6.regexp.split": 227, "core-js/modules/es6.set": 228, "core-js/modules/es6.string.code-point-at": 229, "core-js/modules/es6.string.ends-with": 230, "core-js/modules/es6.string.from-code-point": 231, "core-js/modules/es6.string.includes": 232, "core-js/modules/es6.string.raw": 233, "core-js/modules/es6.string.repeat": 234, "core-js/modules/es6.string.starts-with": 235, "core-js/modules/es6.symbol": 236, "core-js/modules/es6.typed.array-buffer": 237, "core-js/modules/es6.typed.data-view": 238, "core-js/modules/es6.typed.float32-array": 239, "core-js/modules/es6.typed.float64-array": 240, "core-js/modules/es6.typed.int16-array": 241, "core-js/modules/es6.typed.int32-array": 242, "core-js/modules/es6.typed.int8-array": 243, "core-js/modules/es6.typed.uint16-array": 244, "core-js/modules/es6.typed.uint32-array": 245, "core-js/modules/es6.typed.uint8-array": 246, "core-js/modules/es6.typed.uint8-clamped-array": 247, "core-js/modules/es6.weak-map": 248, "core-js/modules/es6.weak-set": 249, "core-js/modules/web.dom.iterable": 250, "core-js/modules/web.immediate": 251, "core-js/modules/web.timers": 252 }], 55: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var d = h(t("../fw/fw")), a = h(t("../core/utils/utils")), s = h(t("../core/run-player/runPlayer")), r = h(t("../analytics/analytics")), n = h(t("../analytics/logs")), o = h(t("../core/utils/error")), l = h(t("../ads/ads-helpers")); function h(t) { return t && t.__esModule ? t : { default: t } } function c(t) { if (Array.isArray(t)) { for (var e = 0, i = Array(t.length); e < t.length; e++)i[e] = t[e]; return i } return Array.from(t) } var u = {}, f = function (t) { if (this.dom.playlistContainer) { for (var e = this.dom.playlistContainer.querySelectorAll(".rmp-playlist-item"), i = 0, a = e.length; i < a; i++)d.default.removeClass(e[i], "rmp-playlist-item-active"); d.default.addClass(e[t], "rmp-playlist-item-active") } }; u.load = function (t, e) { if (e && e.stopPropagation(), !this.changingSrc && (this.currentPlaylistIndex = t, void 0 === this.playlistList[this.currentPlaylistIndex] && (this.currentPlaylistIndex = 0, this.dom.playlistSideMenu.scrollTop = 0), d.default.isObject(this.playlistList[this.currentPlaylistIndex]))) { var i = this.playlistList[this.currentPlaylistIndex]; this.ads && ("string" == typeof i.adTagUrl && "" !== i.adTagUrl ? (this.adTagUrl = l.default.replaceAdTagVar.call(this, i.adTagUrl), i.adTagWaterfall ? this.adTagWaterfall = [].concat(c(i.adTagWaterfall)) : this.adTagWaterfall = []) : this.adTagUrl = null), this.setPoster(i.poster), this.setContentTitle(i.contentTitle), this.setContentDescription(i.contentDescription), "" !== this.gaTrackingId && this.setGALabel(i.contentTitle), this.muxData && this.muxDataUseListData && (this.muxDataSettings.data.video_title = i.contentTitle, window.mux.emit("#" + this.id + " .rmp-video", "videochange", { video_title: this.muxDataSettings.data.video_title })), this.useVideoTitle && this.setVideoTitle(i.contentTitle), f.call(this, this.currentPlaylistIndex); var a = this.getStreamType(), s = i.src[a]; Array.isArray(s) && "string" == typeof s[0] && (s = s[0]), this.getPlayerInitialized() && this.ads && (this.dom.container.addEventListener("srcchanged", this.playlistOnSrcChangedLoadAd), this.dom.container.addEventListener("error", this.playlistOnSrcChangeError)), this.setSrc(s), i.seekBarThumbnailsLoc && this.setThumbnails(i.seekBarThumbnailsLoc) } }; var p = function (t) { if (d.default.isObject(this.playlistList[t])) { var e = this.playlistList[t], i = document.createElement("div"); i.className = "rmp-playlist-item"; var a = document.createElement("div"); a.className = "rmp-playlist-item-number", d.default.setText(a, (t + 1).toString()), i.appendChild(a); var s = document.createElement("div"); s.className = "rmp-playlist-item-thumbnail-wrapper"; var r = document.createElement("img"); r.className = "rmp-playlist-item-thumbnail", r.alt = e.contentTitle, r.src = e.thumbnail, s.appendChild(r), i.appendChild(s); var n = document.createElement("div"); n.className = "rmp-playlist-item-text-area"; var o = document.createElement("div"); o.className = "rmp-playlist-item-title", d.default.setText(o, e.contentTitle), n.appendChild(o); var l = document.createElement("div"); l.className = "rmp-playlist-item-description", d.default.setText(l, e.contentDescription), n.appendChild(l), i.appendChild(n), d.default.addEvent("click", i, u.load.bind(this, t)), this.dom.playlistSideMenu.appendChild(i) } }, m = function (t, e) { e && (e.stopPropagation(), "touchend" === e.type && e.preventDefault()); var i = this.currentPlaylistIndex - 1; t && (i = this.currentPlaylistIndex + 1), u.load.call(this, i, null) }, v = function (t) { if (this.playlistList = d.default.filterPlaylist(t), this.dom.playlistSideMenu) { for (var e = this.dom.playlistSideMenu.querySelectorAll(".rmp-playlist-item"), i = 0, a = e.length; i < a; i++)d.default.removeElement(e[i]); for (var s = 0, r = this.playlistList.length; s < r; s++)p.call(this, s); u.load.call(this, 0, null) } }; u.setData = function (t) { var i = this; if ("string" == typeof t) this.playlistLoc = t; else if (Array.isArray(t)) return void v.call(this, t); d.default.ajax(this.playlistLoc, this.ajaxTimeout, this.ajaxWithCredentials, "GET").then(function (t) { var e = void 0; try { e = JSON.parse(t), Array.isArray(e.playlist) && v.call(i, e.playlist) } catch (t) { d.default.trace(t) } }).catch(function (t) { d.default.trace(t) }) }; var g = function () { if (this.dom.playlistContainer = this.dom.container.parentNode.parentNode, d.default.hasClass(this.dom.playlistContainer, "rmp-playlist-container")) { d.default.addClass(this.dom.container, "rmp-playlist-ui"), function () { this.dom.playlistLeftArrow = document.createElement("div"), this.dom.playlistLeftArrow.className = "rmp-playlist-left-arrow rmp-color-bg"; var t = document.createElement("span"); t.className = "rmp-i rmp-i-previous", this.dom.playlistLeftArrow.appendChild(t), d.default.hide(this.dom.playlistLeftArrow), this.dom.container.appendChild(this.dom.playlistLeftArrow), d.default.addEvent(["touchend", "click"], this.dom.playlistLeftArrow, m.bind(this, !1)), this.dom.playlistRightArrow = document.createElement("div"), this.dom.playlistRightArrow.className = "rmp-playlist-right-arrow rmp-color-bg"; var e = document.createElement("span"); e.className = " rmp-i rmp-i-next", this.dom.playlistRightArrow.appendChild(e), d.default.hide(this.dom.playlistRightArrow), this.dom.container.appendChild(this.dom.playlistRightArrow), d.default.addEvent(["touchend", "click"], this.dom.playlistRightArrow, m.bind(this, !0)) }.call(this), this.dom.playlistSideMenu = document.createElement("div"), this.dom.playlistSideMenu.className = "rmp-playlist-side-menu rmp-color-bg rmp-color-button"; var t = document.createElement("div"); t.className = "rmp-playlist-header", d.default.setText(t, this.labels.hint.playlist), this.dom.playlistSideMenu.appendChild(t); for (var e = 0, i = this.playlistList.length; e < i; e++)p.call(this, e); this.dom.playlistContainer.appendChild(this.dom.playlistSideMenu), f.call(this, 0) } else o.default.warning.call(this, "cannot append playlist layout - missing rmp-playlist-container container", 1006, null) }, y = function () { o.default.fatal.call(this, "error loading or parsing input playlist", 101, null) }, b = function (t) { if (this.playlistList = d.default.filterPlaylist(t), 0 < this.playlistList.length && d.default.isObject(this.playlistList[0])) { g.call(this); var e = this.playlistList[0]; this.src = e.src, this.poster = e.poster, this.seekBarThumbnailsLoc = e.seekBarThumbnailsLoc, this.ads && (this.adTagUrl = l.default.replaceAdTagVar.call(this, e.adTagUrl), "" === e.adTagUrl && (this.emptyInitAdTagUrl = !0), e.adTagWaterfall && (this.adTagWaterfall = [].concat(c(e.adTagWaterfall)))), this.contentTitle = e.contentTitle, this.contentDescription = e.contentDescription, "" !== this.gaTrackingId && this.setGALabel(this.contentTitle), this.muxData && this.muxDataUseListData && (this.muxDataSettings.data.video_title = this.contentTitle), this.useVideoTitle && this.setVideoTitle(this.contentTitle), this.playlistOnSrcChangedLoadAd = function () { this.dom.container.removeEventListener("srcchanged", this.playlistOnSrcChangedLoadAd), this.dom.container.removeEventListener("error", this.playlistOnSrcChangeError), this.adTagUrl && this.loadAds(this.adTagUrl) }.bind(this), this.playlistOnSrcChangeError = function () { this.dom.container.removeEventListener("srcchanged", this.playlistOnSrcChangedLoadAd), this.dom.container.removeEventListener("error", this.playlistOnSrcChangeError) }.bind(this), a.default.detectSrc.call(this), r.default.init.call(this), n.default.init.call(this), s.default.init.call(this) } else y.call(this) }; u.init = function () { var i = this; "" === this.playlistLoc ? b.call(this, this.playlistData) : d.default.ajax(this.playlistLoc, this.ajaxTimeout, this.ajaxWithCredentials, "GET").then(function (t) { var e = void 0; try { e = JSON.parse(t) } catch (t) { d.default.trace(t), y.call(i) } Array.isArray(e.playlist) ? b.call(i, e.playlist) : y.call(i) }).catch(function (t) { d.default.trace(t), y.call(i) }) }, i.default = u }, { "../ads/ads-helpers": 6, "../analytics/analytics": 11, "../analytics/logs": 12, "../core/run-player/runPlayer": 38, "../core/utils/error": 44, "../core/utils/utils": 46, "../fw/fw": 53 }], 56: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var o = f(t("../fw/fw")), a = f(t("../fw/env")), s = f(t("../core/utils/utils")), r = f(t("../core/ui/core-ui")), n = f(t("../core/run-player/runPlayer")), l = f(t("../analytics/analytics")), d = f(t("../analytics/logs")), h = f(t("../core/utils/error")), c = f(t("../ads/ads-helpers")), u = f(t("../core/modules/modules")); function f(t) { return t && t.__esModule ? t : { default: t } } function p(t) { if (Array.isArray(t)) { for (var e = 0, i = Array(t.length); e < t.length; e++)i[e] = t[e]; return i } return Array.from(t) } var m = {}, v = function () { if (o.default.isObject(this.relatedList[this.currentRelatedIndex])) { var t = this.relatedList[this.currentRelatedIndex]; this.ads && ("string" == typeof t.adTagUrl && "" !== t.adTagUrl ? (this.adTagUrl = c.default.replaceAdTagVar.call(this, t.adTagUrl), t.adTagWaterfall ? this.adTagWaterfall = [].concat(p(t.adTagWaterfall)) : this.adTagWaterfall = []) : this.adTagUrl = null); var e = t.poster; this.setPoster(e), this.setContentTitle(t.contentTitle), this.setContentDescription(t.contentDescription), "" !== this.gaTrackingId && this.setGALabel(t.contentTitle), this.muxData && this.muxDataUseListData && (this.muxDataSettings.data.video_title = t.contentTitle, window.mux.emit("#" + this.id + " .rmp-video", "videochange", { video_title: this.muxDataSettings.data.video_title })), this.useVideoTitle && this.setVideoTitle(t.contentTitle), r.default.hideCentralPlay.call(this); var i = t.src[this.getStreamType()]; Array.isArray(i) && "string" == typeof i[0] && (i = i[0]), this.getPlayerInitialized() ? this.ads && (this.dom.container.addEventListener("srcchanged", this.relatedOnSrcChangedLoadAd), this.dom.container.addEventListener("error", this.relatedOnSrcChangeError)) : u.default.closeAll.call(this), this.setSrc(i), function () { o.default.removeClass(this.dom.relatedSkipPreview, "rmp-force-show"); var t = this.currentRelatedIndex + 1; this.relatedList[t] || (t = 0), this.dom.relatedSkipImg.src = this.relatedList[t].thumbnail, o.default.setText(this.dom.relatedSkipText, this.relatedList[t].contentTitle) }.call(this), t.seekBarThumbnailsLoc && this.setThumbnails(t.seekBarThumbnailsLoc) } }, g = function () { var t = document.createElement("div"); t.className = "rmp-related-item-bottom-margin", this.dom.relatedOverlayLevelsArea.appendChild(t) }, y = function (t) { if (o.default.isObject(this.relatedList[t])) { var e = this.relatedList[t], i = document.createElement("div"); i.className = "rmp-related-item"; var a = document.createElement("img"); a.className = "rmp-related-thumbnail", a.alt = e.contentTitle, a.src = e.thumbnail, i.appendChild(a); var s = document.createElement("div"); if (s.className = "rmp-related-title", o.default.setText(s, e.contentTitle), i.appendChild(s), e.contentDuration) { var r = document.createElement("div"); r.className = "rmp-related-duration", o.default.setText(r, e.contentDuration), i.appendChild(r) } var n = document.createElement("div"); n.className = "rmp-related-up-next", o.default.setText(n, this.labels.hint.upNext), o.default.hide(n), i.appendChild(n), i.addEventListener("click", m.load.bind(this, t)), this.dom.relatedOverlayLevelsArea.appendChild(i) } }, b = function (t) { if (this.dom.relatedOverlayLevelsArea) { this.relatedList = o.default.filterPlaylist(t), this.currentRelatedIndex = 0; for (var e = this.dom.relatedOverlayLevelsArea.querySelectorAll(".rmp-related-item"), i = 0, a = e.length; i < a; i++)o.default.removeElement(e[i]); var s = this.dom.relatedOverlayLevelsArea.querySelector(".rmp-related-item-bottom-margin"); null !== s && o.default.removeElement(s); for (var r = 0, n = this.relatedList.length; r < n; r++)y.call(this, r); g.call(this), v.call(this) } }; m.setData = function (t, e) { var i = this; if (e) this.relatedLoc = this.relatedList[this.currentRelatedIndex].related; else if ("string" == typeof t) this.relatedLoc = t; else if (Array.isArray(t)) return void b.call(this, t); o.default.ajax(this.relatedLoc, this.ajaxTimeout, this.ajaxWithCredentials, "GET").then(function (t) { var e = void 0; try { e = JSON.parse(t), Array.isArray(e.playlist) && b.call(i, e.playlist) } catch (t) { o.default.trace(t) } }).catch(function (t) { o.default.trace(t) }) }, m.load = function (t, e) { e && e.stopPropagation(), this.changingSrc || (this.currentRelatedIndex = t, void 0 === this.relatedList[this.currentRelatedIndex] && (this.currentRelatedIndex = 0), this.relatedList[this.currentRelatedIndex].related ? m.setData.call(this, null, !0) : v.call(this)) }; var S = function (t) { t && (t.stopPropagation(), "touchend" === t.type && t.preventDefault()), m.load.call(this, this.currentRelatedIndex + 1, null) }, E = function () { h.default.fatal.call(this, "error loading or parsing input related", 102, null) }, A = function (t) { if (this.relatedList = o.default.filterPlaylist(t), 0 < this.relatedList.length && o.default.isObject(this.relatedList[0])) { (function () { o.default.addClass(this.dom.container, "rmp-related-ui"), u.default.append.call(this, "related"), u.default.appendOverlay.call(this, "related"); for (var t = 0, e = this.relatedList.length; t < e; t++)y.call(this, t); g.call(this) }).call(this); var e = this.relatedList[0]; this.src = e.src, this.poster = e.poster, this.seekBarThumbnailsLoc = e.seekBarThumbnailsLoc, this.ads && (this.adTagUrl = c.default.replaceAdTagVar.call(this, e.adTagUrl), "" === e.adTagUrl && (this.emptyInitAdTagUrl = !0), e.adTagWaterfall && (this.adTagWaterfall = [].concat(p(e.adTagWaterfall)))), this.contentTitle = e.contentTitle, this.contentDescription = e.contentDescription, "" !== this.gaTrackingId && this.setGALabel(this.contentTitle), this.muxData && this.muxDataUseListData && (this.muxDataSettings.data.video_title = this.contentTitle), this.useVideoTitle && this.setVideoTitle(this.contentTitle), this.relatedOnSrcChangedLoadAd = function () { this.dom.container.removeEventListener("srcchanged", this.relatedOnSrcChangedLoadAd), this.dom.container.removeEventListener("error", this.relatedOnSrcChangeError), this.adTagUrl && this.loadAds(this.adTagUrl) }.bind(this), this.relatedOnSrcChangeError = function () { this.dom.container.removeEventListener("srcchanged", this.relatedOnSrcChangedLoadAd), this.dom.container.removeEventListener("error", this.relatedOnSrcChangeError) }.bind(this), s.default.detectSrc.call(this), l.default.init.call(this), d.default.init.call(this), n.default.init.call(this), function () { var e = this, t = this.currentRelatedIndex + 1; if (void 0 === this.relatedList[t] && (t = 0), this.dom.outline) { this.dom.relatedSkip = document.createElement("div"), this.dom.relatedSkip.className = "rmp-related-skip-next rmp-i rmp-i-skip-next", o.default.addEvent(["touchend", "click"], this.dom.relatedSkip, S.bind(this)), this.dom.outline.appendChild(this.dom.relatedSkip), this.dom.relatedSkipPreview = document.createElement("div"), this.dom.relatedSkipPreview.className = "rmp-related-skip-preview", o.default.addEvent(["touchend", "click"], this.dom.relatedSkipPreview, S.bind(this)), this.dom.relatedSkip.appendChild(this.dom.relatedSkipPreview), this.dom.relatedSkipImg = document.createElement("img"), this.dom.relatedSkipImg.alt = "Next playlist item image preview", this.dom.relatedSkipImg.className = "rmp-related-skip-preview-img", this.dom.relatedSkipImg.src = this.relatedList[t].thumbnail, this.dom.relatedSkipPreview.appendChild(this.dom.relatedSkipImg), this.dom.relatedSkipText = document.createElement("div"), this.dom.relatedSkipText.className = "rmp-related-skip-preview-title rmp-color-bg", o.default.setText(this.dom.relatedSkipText, this.relatedList[t].contentTitle), this.dom.relatedSkipPreview.appendChild(this.dom.relatedSkipText); var i = document.createElement("div"); i.className = "rmp-related-skip-preview-up-next rmp-color-bg", o.default.setText(i, this.labels.hint.upNext), this.dom.relatedSkipPreview.appendChild(i), a.default.isMobile || (this.dom.relatedSkip.addEventListener("mouseenter", function (t) { t && t.stopPropagation(), e.forceResetTimer = !0, o.default.fadeIn(e.dom.relatedSkipPreview) }), this.dom.relatedSkip.addEventListener("mouseleave", function (t) { t && t.stopPropagation(), e.forceResetTimer = !1, o.default.fadeOut(e.dom.relatedSkipPreview) })) } }.call(this) } else E.call(this) }; m.init = function () { var i = this; "" === this.relatedLoc ? A.call(this, this.relatedData) : o.default.ajax(this.relatedLoc, this.ajaxTimeout, this.ajaxWithCredentials, "GET").then(function (t) { var e = void 0; try { e = JSON.parse(t) } catch (t) { o.default.trace(t), E.call(i) } Array.isArray(e.playlist) ? A.call(i, e.playlist) : E.call(i) }).catch(function (t) { o.default.trace(t), E.call(i) }) }, i.default = m }, { "../ads/ads-helpers": 6, "../analytics/analytics": 11, "../analytics/logs": 12, "../core/modules/modules": 30, "../core/run-player/runPlayer": 38, "../core/ui/core-ui": 41, "../core/utils/error": 44, "../core/utils/utils": 46, "../fw/env": 52, "../fw/fw": 53 }], 57: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var p = n(t("../fw/fw")), a = n(t("../fw/env")), r = n(t("../core/accessible/accessible")), l = n(t("../core/ui/core-ui")), m = n(t("../core/modules/modules")), s = n(t("../core/utils/error")), d = n(t("../cast/cast")); function n(t) { return t && t.__esModule ? t : { default: t } } var o = { prepare: function () { a.default.isIos[0] && (this.ccParser = "native"), this.hasCC = !0, this.googleCastCCForegroundColor = this.ccTextColor + "99"; var t = this.ccBackgroundAlpha; 1 <= t && (t = .99), this.googleCastCCBackgroundColor = this.ccBackgroundColor + (100 * t).toString(), this.googleCastCCFontScale = .9 * this.ccFontSize / 18 } }, h = function () { if (this.textTracks && 0 < this.textTracks.length) for (var t = 0; t < this.textTracks.length; t++)this.textTracks[t] && "hidden" !== this.textTracks[t].mode && (this.textTracks[t].mode = "hidden") }, c = function (t) { this.textTracks[t] && "showing" !== this.textTracks[t].mode && (h.call(this), this.textTracks[t].mode = "showing") }, v = function () { this.shakaPlayer && this.shakaPlayer.setTextTrackVisibility(!1) }, u = function (t) { this.shakaPlayer && (this.shakaPlayer.selectTextTrack(t), this.shakaPlayer.setTextTrackVisibility(!0)) }, f = function (t) { this.hlsJSCEA ? c.call(this, t) : this.hlsJS && (this.hlsJS.subtitleTrack = t) }, g = function () { this.hasCC ? "vtt.js" === this.ccParser ? (this.ccEnabled = !1, p.default.hide(this.dom.ccArea), this.ccData = null) : h.call(this) : this.readingDash || this.readingHlsShaka ? v.call(this) : this.readingHlsJS && function () { this.hlsJSCEA ? h.call(this) : this.hlsJS && (this.hlsJS.subtitleTrack = -1) }.call(this), function () { if (this.googleCast && this.castMediaLoaded) try { var t = new chrome.cast.media.EditTracksInfoRequest([]); this.castMedia.editTracksInfo(t, p.default.trace, p.default.trace) } catch (t) { p.default.trace(t) } }.call(this) }; o.destroy = function () { g.call(this), this.dom.container && (this.dom.container.removeEventListener("playing", this.addNativeVTT), this.dom.container.removeEventListener("timeupdate", this.updateCues), this.dom.container.removeEventListener("resize", this.updateCuesResize)), this.hasCC && "native" === this.ccParser && 0 < this.textTracks.length && (this.startIndexCC += this.textTracks.length), p.default.clearInterval(this.hlsJSCCInterval), this.textTracks = [], m.default.destroy.call(this, "captions"), this.ccCues = [], this.defaultTrack = 0, this.loadedCCFiles = [], this.addNativeVTT = p.default.nullFn, this.updateCues = p.default.nullFn, this.updateCuesResize = p.default.nullFn }, o.getData = function () { return this.hasCC && "vtt.js" === this.ccParser ? this.ccData : null }; var y = function (t) { if ("string" == typeof t) try { this.ccCues = []; var e = new WebVTT.Parser(window, WebVTT.StringDecoder()); e.oncue = function (t) { this.ccCues.push(t) }.bind(this), e.onparsingerror = function (t) { var e = null; t && (e = t), s.default.warning.call(this, "vtt.js parsing error", 4001, e) }, e.parse(t), e.flush() } catch (t) { p.default.trace(t) } }; o.menuItemInteraction = function (t) { if (this.dom.captionsOverlayLevelsArea) { var e = null, i = null; if (t && t.type && t.target ? (t.stopPropagation(), "touchend" === t.type && t.preventDefault(), i = (e = t.target).getAttribute("lang")) : "string" == typeof t && "" !== t && (i = t, e = this.dom.captionsOverlayLevelsArea.querySelector('[lang="' + i + '"]')), null !== e && null !== i) { l.default.showChrome.call(this); for (var a = this.dom.captionsOverlayLevelsArea.querySelectorAll(".rmp-overlay-level"), s = 0, r = a.length; s < r; s++)p.default.removeClass(a[s], "rmp-overlay-level-active"); for (var n = 0, o = this.loadedCCFiles.length; n < o; n++) { if (p.default.hasClass(e, "captions-off")) { this.defaultTrack = 0, p.default.addClass(e, "rmp-overlay-level-active"), g.call(this), p.default.createStdEvent("texttrackchanged", this.dom.container); break } if (this.loadedCCFiles[n][0] === i) { this.defaultTrack = n + 1, p.default.addClass(e, "rmp-overlay-level-active"), this.hasCC ? "native" === this.ccParser ? c.call(this, n) : (this.ccEnabled = !0, p.default.show(this.dom.ccArea), y.call(this, this.loadedCCFiles[n][2]), this.ccData = this.ccCues) : this.readingDash || this.readingHlsShaka ? u.call(this, this.shakaTextTracks[n]) : this.readingHlsJS && f.call(this, n), this.googleCast && d.default.setTextTrack.call(this, n), p.default.createStdEvent("texttrackchanged", this.dom.container); break } } } } }; var b = function (t, e, i, a) { var s = document.createElement("div"); return s.className = t + " rmp-overlay-level rmp-color-bg", 0 < e.length && s.setAttribute("lang", e), a === this.defaultTrack && (p.default.addClass(s, "rmp-overlay-level-active"), "captions-off" !== t && -1 < a - 1 && (this.hasCC ? "native" === this.ccParser ? c.call(this, a - 1) : (this.ccEnabled = !0, p.default.show(this.dom.ccArea), y.call(this, this.loadedCCFiles[a - 1][2]), this.ccData = this.ccCues) : this.readingDash || this.readingHlsShaka ? u.call(this, this.shakaTextTracks[a - 1]) : this.readingHlsJS && f.call(this, a - 1), p.default.createStdEvent("texttrackchanged", this.dom.container))), s.appendChild(document.createTextNode(i)), this.dom.ccItems.push(s), r.default.makeAccessible.call(this, s, t, !0), p.default.addEvent(["touchend", "click"], s, o.menuItemInteraction.bind(this)), s }; o.appendUI = function () { if (this.hasCC) { for (var t = 0, e = this.loadedCCFiles.length; t < e; t++)null === this.loadedCCFiles[t] && this.loadedCCFiles.splice(t, 1); if (this.loadedCCFiles.length < 1) return; "vtt.js" === this.ccParser && (this.dom.ccArea = document.createElement("div"), this.dom.ccArea.className = "rmp-cc-area", p.default.hide(this.dom.ccArea), this.dom.content.insertBefore(this.dom.ccArea, this.dom.video.nextSibling)), this.ccFilesReady = !0, p.default.createStdEvent("alltexttracksloaded", this.dom.container), function () { var t = ""; if (0 < this.ccFontSize) { var e = this.ccFontSize, i = this.ccFSFontSize; this.ccFSFontSize < this.ccFontSize && (i = e), t += ".rmp-cc-cue, .rmp-content > video::cue {font-size: " + e + "px;} ", t += ".rmp-fullscreen-on .rmp-cc-cue, .rmp-fullscreen-on > .rmp-content > video::cue {font-size: " + i + "px;} " } if ("FFFFFF" !== this.ccTextColor || "000000" !== this.ccBackgroundColor || .8 !== this.ccBackgroundAlpha) { var a = p.default.hexToRgb("#" + this.ccBackgroundColor); a = "rgba(" + a.r + ", " + a.g + ", " + a.b + ", " + this.ccBackgroundAlpha + ")", t += ".rmp-cc-cue {color: #" + this.ccTextColor + " !important; background: " + a + " !important;;} ", t += ".rmp-content > video::cue {color: #" + this.ccTextColor + ";} ", t += ".rmp-content > video::-webkit-media-text-track-display-backdrop {background: " + a + " !important;} " } p.default.appendStyle(t) }.call(this) } if (m.default.append.call(this, "captions"), m.default.appendOverlay.call(this, "captions"), m.default.deferredShow.call(this, "captions"), !this.hasCC && this.readingMse && 0 < this.textTracks.length) for (var i = 0, a = this.textTracks.length; i < a; i++) { var s = this.textTracks[i]; this.loadedCCFiles[i] = []; var r = s.language || s.lang; r || (r = "lng-" + (i + 1)), this.loadedCCFiles[i].push(r); var n = s.label || s.name; if (n || (n = r), this.loadedCCFiles[i].push(n), this.readingHlsJS) { var o = this.hlsJS.subtitleTracks.findIndex(function (t) { return !0 === t.default }); -1 < o && o === i && (this.loadedCCFiles[i].push(""), this.loadedCCFiles[i].push("default")) } } for (var l = 0, d = this.loadedCCFiles.length; l < d; l++)if ("string" == typeof this.loadedCCFiles[l][3] && "default" === this.loadedCCFiles[l][3]) { this.defaultTrack = l + 1; break } this.dom.captionsOverlayLevelsArea.appendChild(b.call(this, "captions-off", "off", this.labels.captions.off, 0)); for (var h = 0, c = this.loadedCCFiles.length; h < c; h++) { var u = this.loadedCCFiles[h][0], f = this.loadedCCFiles[h][1]; this.dom.captionsOverlayLevelsArea.appendChild(b.call(this, "captions-" + u, u, f, h + 1)) } this.hasCC || (this.readingDash || this.readingHlsShaka) && 0 === this.defaultTrack && v.call(this) }; var S = function (i) { var a = this; return p.default.ajax(this.ccFiles[i][2], this.ajaxTimeout, this.ajaxWithCredentials, "GET").then(function (t) { if ("string" == typeof t) { var e = ""; "string" == typeof a.ccFiles[i][3] && "default" === a.ccFiles[i][3] && (e = a.ccFiles[i][3]), a.loadedCCFiles[i] = [a.ccFiles[i][0], a.ccFiles[i][1], t, e], p.default.createStdEvent("texttrackloaded", a.dom.container) } }).catch(function (t) { a.loadedCCFiles[i] = null, p.default.createStdEvent("texttrackloaderror", a.dom.container); var e = null; t && (e = t), s.default.warning.call(a, "failed to load text track at " + a.ccFiles[i][2], 4002, e) }) }, E = function (t) { var e = this.getCurrentTime(); if (-1 < e) { e /= 1e3; for (var i = [], a = 0, s = this.ccCues.length; a < s; a++) { var r = this.ccCues[a].startTime, n = this.ccCues[a].endTime; r <= e && e <= n && i.push(this.ccCues[a]) } i[0] && this.ccEnabled ? (p.default.show(this.dom.ccArea), this.dom.ccArea.style.width = this.getPlayerWidth() + "px", this.dom.ccArea.style.height = this.getPlayerHeight() + "px", WebVTT.processCues(window, i, this.dom.ccArea, t)) : p.default.hide(this.dom.ccArea) } }, A = function () { if (this.loadVTTFiles = function () { var t = this; this.updateCues = E.bind(this, !1), this.updateCuesResize = E.bind(this, !0), this.dom.container.addEventListener("timeupdate", this.updateCues), this.dom.container.addEventListener("resize", this.updateCuesResize); for (var e = [], i = 0, a = this.ccFiles.length; i < a; i++)e[i] = S.call(this, i); Promise.all(e).then(function () { o.appendUI.call(t) }) }.bind(this), "undefined" != typeof WebVTT) this.loadVTTFiles(); else { 0; var t = "https://cdn.radiantmediatechs.com/rmp/5.0.9/vtt/vtt.min.js"; 0, p.default.getScript(t, this.loadVTTFiles, s.default.warning.bind(this, "failed to load vtt.js", 4e3, null)) } }; o.initVttJS = function () { "native" === this.ccParser ? (this.addNativeVTT = function () { this.dom.container.removeEventListener("playing", this.addNativeVTT), this.dom.container.removeEventListener("adloaded", this.addNativeVTT); for (var t = 0; t < this.ccFiles.length; t++) { var e = document.createElement("track"); "string" == typeof this.ccFiles[t][0] && "string" == typeof this.ccFiles[t][1] && "string" == typeof this.ccFiles[t][2] && (e.srclang = this.ccFiles[t][0], e.label = this.ccFiles[t][1], e.src = this.ccFiles[t][2], e.kind = "captions", this.dom.video.appendChild(e)), "string" == typeof this.ccFiles[t][3] && "default" === this.ccFiles[t][3] && (this.defaultTrack = t + 1) } if (this.textTracks = p.default.filterTextTracks(this.dom.video.textTracks), 0 < this.textTracks.length) { if (0 < this.startIndexCC) for (var i = 0; i < this.startIndexCC; i++)this.textTracks.shift(); this.loadedCCFiles = this.ccFiles, h.call(this), o.appendUI.call(this) } }.bind(this), this.firstFrameReached ? this.addNativeVTT() : (this.dom.container.addEventListener("playing", this.addNativeVTT), this.dom.container.addEventListener("adloaded", this.addNativeVTT))) : "vtt.js" === this.ccParser && A.call(this) }, i.default = o }, { "../cast/cast": 22, "../core/accessible/accessible": 23, "../core/modules/modules": 30, "../core/ui/core-ui": 41, "../core/utils/error": 44, "../fw/env": 52, "../fw/fw": 53 }], 58: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var v = a(t("../fw/fw")), g = a(t("../core/utils/error")); function a(t) { return t && t.__esModule ? t : { default: t } } var s = {}, r = function (t) { for (var e = t.split(/\r\n|\r|\n/g), i = /^\s*$/, a = [], s = 0, r = e.length; s < r; s++)i.test(e[s]) || a.push(e[s]); if (/WEBVTT/i.test(a[0])) { a.shift(), this.thumbnailURIs = [], this.thumbnailURIsTimestamps = []; for (var n = /^(https?:)?\/\//i, o = /^\s*\d*?:?\d*?:?\d+(\.\d+)?\s*-->\s*\d*?:?\d*?:?\d+(\.\d+)?\s*$/, l = 0, d = a.length; l < d; l++)if (a[l] && a[l + 1] && o.test(a[l])) { var h = a[l].split("--\x3e"), c = a[l + 1].split("#xywh="); if (2 === h.length && 2 === c.length) { var u = h[0].trim(), f = h[1].trim(), p = [v.default.dateToSeconds(u), v.default.dateToSeconds(f)], m = c[0]; n.test(m) || (m = v.default.getFQURL(this.seekBarThumbnailsLoc, m)), -1 === this.thumbnailURIs.indexOf(m) && (this.thumbnailURIs.push(m), this.thumbnailURIsTimestamps.push(v.default.dateToSeconds(u))), p.push(c[1]), this.thumbnailsArray.push(p) } } 0, this.dummyThumbnailsImg = document.createElement("img"), this.currentThumbnailURI = this.thumbnailURIs[0], this.onThumbnailsLoad = function (t) { this.dummyThumbnailsImg.removeEventListener("load", this.onThumbnailsLoad), this.dummyThumbnailsImg.removeEventListener("error", this.onThumbnailsError), this.dummyThumbnailsImg = null, this.hasThumbnails = !0, this.dom.thumbnailsImg = document.createElement("div"), v.default.setClass(this.dom.thumbnailsImg, "rmp-thumbnails"), v.default.addClass(this.dom.seekBar, "rmp-seek-bar-thumbnails"), this.dom.thumbnailsImg.style.backgroundImage = 'url("' + t + '")', this.dom.indicator.appendChild(this.dom.thumbnailsImg) }.bind(this, this.currentThumbnailURI), this.onThumbnailsError = function (t) { this.dummyThumbnailsImg.removeEventListener("load", this.onThumbnailsLoad), this.dummyThumbnailsImg.removeEventListener("error", this.onThumbnailsError); var e = this.dummyThumbnailsImg = null; t && (e = t), g.default.warning.call(this, "failed to load seek-bar thumbnails at " + this.thumbnailURIs[0], 1002, e) }.bind(this), this.dummyThumbnailsImg.addEventListener("load", this.onThumbnailsLoad), this.dummyThumbnailsImg.addEventListener("error", this.onThumbnailsError), this.dummyThumbnailsImg.src = this.currentThumbnailURI } }; s.destroy = function () { this.dummyThumbnailsImg && (this.dummyThumbnailsImg.removeEventListener("load", this.onThumbnailsLoad), this.dummyThumbnailsImg.removeEventListener("error", this.onThumbnailsError), this.dummyThumbnailsImg = null), v.default.removeClass(this.dom.seekBar, "rmp-seek-bar-thumbnails"), v.default.removeElement(this.dom.thumbnailsImg), this.hasThumbnails = !1 }, s.init = function () { var i = this; v.default.ajax(this.seekBarThumbnailsLoc, this.ajaxTimeout, this.ajaxWithCredentials, "GET").then(function (t) { "string" == typeof t && r.call(i, t) }).catch(function (t) { var e = null; t && (e = t), g.default.warning.call(i, "failed to load VTT thumbnail file at " + i.seekBarThumbnailsLoc, 1008, e) }) }, i.default = s }, { "../core/utils/error": 44, "../fw/fw": 53 }], 59: [function (t, e, i) { e.exports = function (t) { if ("function" != typeof t) throw TypeError(t + " is not a function!"); return t } }, {}], 60: [function (t, e, i) { var a = t("./_wks")("unscopables"), s = Array.prototype; null == s[a] && t("./_hide")(s, a, {}), e.exports = function (t) { s[a][t] = !0 } }, { "./_hide": 91, "./_wks": 161 }], 61: [function (t, e, i) { e.exports = function (t, e, i, a) { if (!(t instanceof e) || void 0 !== a && a in t) throw TypeError(i + ": incorrect invocation!"); return t } }, {}], 62: [function (t, e, i) { var a = t("./_is-object"); e.exports = function (t) { if (!a(t)) throw TypeError(t + " is not an object!"); return t } }, { "./_is-object": 100 }], 63: [function (t, e, i) { "use strict"; var d = t("./_to-object"), h = t("./_to-absolute-index"), c = t("./_to-length"); e.exports = [].copyWithin || function (t, e) { var i = d(this), a = c(i.length), s = h(t, a), r = h(e, a), n = 2 < arguments.length ? arguments[2] : void 0, o = Math.min((void 0 === n ? a : h(n, a)) - r, a - s), l = 1; for (r < s && s < r + o && (l = -1, r += o - 1, s += o - 1); 0 < o--;)r in i ? i[s] = i[r] : delete i[s], s += l, r += l; return i } }, { "./_to-absolute-index": 146, "./_to-length": 150, "./_to-object": 151 }], 64: [function (t, e, i) { "use strict"; var o = t("./_to-object"), l = t("./_to-absolute-index"), d = t("./_to-length"); e.exports = function (t) { for (var e = o(this), i = d(e.length), a = arguments.length, s = l(1 < a ? arguments[1] : void 0, i), r = 2 < a ? arguments[2] : void 0, n = void 0 === r ? i : l(r, i); s < n;)e[s++] = t; return e } }, { "./_to-absolute-index": 146, "./_to-length": 150, "./_to-object": 151 }], 65: [function (t, e, i) { var l = t("./_to-iobject"), d = t("./_to-length"), h = t("./_to-absolute-index"); e.exports = function (o) { return function (t, e, i) { var a, s = l(t), r = d(s.length), n = h(i, r); if (o && e != e) { for (; n < r;)if ((a = s[n++]) != a) return !0 } else for (; n < r; n++)if ((o || n in s) && s[n] === e) return o || n || 0; return !o && -1 } } }, { "./_to-absolute-index": 146, "./_to-iobject": 149, "./_to-length": 150 }], 66: [function (t, e, i) { var b = t("./_ctx"), S = t("./_iobject"), E = t("./_to-object"), A = t("./_to-length"), a = t("./_array-species-create"); e.exports = function (c, t) { var u = 1 == c, f = 2 == c, p = 3 == c, m = 4 == c, v = 6 == c, g = 5 == c || v, y = t || a; return function (t, e, i) { for (var a, s, r = E(t), n = S(r), o = b(e, i, 3), l = A(n.length), d = 0, h = u ? y(t, l) : f ? y(t, 0) : void 0; d < l; d++)if ((g || d in n) && (s = o(a = n[d], d, r), c)) if (u) h[d] = s; else if (s) switch (c) { case 3: return !0; case 5: return a; case 6: return d; case 2: h.push(a) } else if (m) return !1; return v ? -1 : p || m ? m : h } } }, { "./_array-species-create": 68, "./_ctx": 77, "./_iobject": 96, "./_to-length": 150, "./_to-object": 151 }], 67: [function (t, e, i) { var a = t("./_is-object"), s = t("./_is-array"), r = t("./_wks")("species"); e.exports = function (t) { var e; return s(t) && ("function" != typeof (e = t.constructor) || e !== Array && !s(e.prototype) || (e = void 0), a(e) && null === (e = e[r]) && (e = void 0)), void 0 === e ? Array : e } }, { "./_is-array": 98, "./_is-object": 100, "./_wks": 161 }], 68: [function (t, e, i) { var a = t("./_array-species-constructor"); e.exports = function (t, e) { return new (a(t))(e) } }, { "./_array-species-constructor": 67 }], 69: [function (t, e, i) { "use strict"; var r = t("./_a-function"), n = t("./_is-object"), o = t("./_invoke"), l = [].slice, d = {}; e.exports = Function.bind || function (e) { var i = r(this), a = l.call(arguments, 1), s = function () { var t = a.concat(l.call(arguments)); return this instanceof s ? function (t, e, i) { if (!(e in d)) { for (var a = [], s = 0; s < e; s++)a[s] = "a[" + s + "]"; d[e] = Function("F,a", "return new F(" + a.join(",") + ")") } return d[e](t, i) }(i, t.length, t) : o(i, t, e) }; return n(i.prototype) && (s.prototype = i.prototype), s } }, { "./_a-function": 59, "./_invoke": 95, "./_is-object": 100 }], 70: [function (t, e, i) { var s = t("./_cof"), r = t("./_wks")("toStringTag"), n = "Arguments" == s(function () { return arguments }()); e.exports = function (t) { var e, i, a; return void 0 === t ? "Undefined" : null === t ? "Null" : "string" == typeof (i = function (t, e) { try { return t[e] } catch (t) { } }(e = Object(t), r)) ? i : n ? s(e) : "Object" == (a = s(e)) && "function" == typeof e.callee ? "Arguments" : a } }, { "./_cof": 71, "./_wks": 161 }], 71: [function (t, e, i) { var a = {}.toString; e.exports = function (t) { return a.call(t).slice(8, -1) } }, {}], 72: [function (t, e, i) { "use strict"; var n = t("./_object-dp").f, o = t("./_object-create"), l = t("./_redefine-all"), d = t("./_ctx"), h = t("./_an-instance"), c = t("./_for-of"), a = t("./_iter-define"), s = t("./_iter-step"), r = t("./_set-species"), u = t("./_descriptors"), f = t("./_meta").fastKey, p = t("./_validate-collection"), m = u ? "_s" : "size", v = function (t, e) { var i, a = f(e); if ("F" !== a) return t._i[a]; for (i = t._f; i; i = i.n)if (i.k == e) return i }; e.exports = { getConstructor: function (t, r, i, a) { var s = t(function (t, e) { h(t, s, r, "_i"), t._t = r, t._i = o(null), t._f = void 0, t._l = void 0, t[m] = 0, null != e && c(e, i, t[a], t) }); return l(s.prototype, { clear: function () { for (var t = p(this, r), e = t._i, i = t._f; i; i = i.n)i.r = !0, i.p && (i.p = i.p.n = void 0), delete e[i.i]; t._f = t._l = void 0, t[m] = 0 }, delete: function (t) { var e = p(this, r), i = v(e, t); if (i) { var a = i.n, s = i.p; delete e._i[i.i], i.r = !0, s && (s.n = a), a && (a.p = s), e._f == i && (e._f = a), e._l == i && (e._l = s), e[m]-- } return !!i }, forEach: function (t) { p(this, r); for (var e, i = d(t, 1 < arguments.length ? arguments[1] : void 0, 3); e = e ? e.n : this._f;)for (i(e.v, e.k, this); e && e.r;)e = e.p }, has: function (t) { return !!v(p(this, r), t) } }), u && n(s.prototype, "size", { get: function () { return p(this, r)[m] } }), s }, def: function (t, e, i) { var a, s, r = v(t, e); return r ? r.v = i : (t._l = r = { i: s = f(e, !0), k: e, v: i, p: a = t._l, n: void 0, r: !1 }, t._f || (t._f = r), a && (a.n = r), t[m]++ , "F" !== s && (t._i[s] = r)), t }, getEntry: v, setStrong: function (t, i, e) { a(t, i, function (t, e) { this._t = p(t, i), this._k = e, this._l = void 0 }, function () { for (var t = this, e = t._k, i = t._l; i && i.r;)i = i.p; return t._t && (t._l = i = i ? i.n : t._t._f) ? s(0, "keys" == e ? i.k : "values" == e ? i.v : [i.k, i.v]) : (t._t = void 0, s(1)) }, e ? "entries" : "values", !e, !0), r(i) } } }, { "./_an-instance": 61, "./_ctx": 77, "./_descriptors": 79, "./_for-of": 88, "./_iter-define": 104, "./_iter-step": 106, "./_meta": 113, "./_object-create": 117, "./_object-dp": 118, "./_redefine-all": 133, "./_set-species": 137, "./_validate-collection": 158 }], 73: [function (t, e, i) { "use strict"; var n = t("./_redefine-all"), o = t("./_meta").getWeak, s = t("./_an-object"), l = t("./_is-object"), d = t("./_an-instance"), h = t("./_for-of"), a = t("./_array-methods"), c = t("./_has"), u = t("./_validate-collection"), r = a(5), f = a(6), p = 0, m = function (t) { return t._l || (t._l = new v) }, v = function () { this.a = [] }, g = function (t, e) { return r(t.a, function (t) { return t[0] === e }) }; v.prototype = { get: function (t) { var e = g(this, t); if (e) return e[1] }, has: function (t) { return !!g(this, t) }, set: function (t, e) { var i = g(this, t); i ? i[1] = e : this.a.push([t, e]) }, delete: function (e) { var t = f(this.a, function (t) { return t[0] === e }); return ~t && this.a.splice(t, 1), !!~t } }, e.exports = { getConstructor: function (t, i, a, s) { var r = t(function (t, e) { d(t, r, i, "_i"), t._t = i, t._i = p++ , t._l = void 0, null != e && h(e, a, t[s], t) }); return n(r.prototype, { delete: function (t) { if (!l(t)) return !1; var e = o(t); return !0 === e ? m(u(this, i)).delete(t) : e && c(e, this._i) && delete e[this._i] }, has: function (t) { if (!l(t)) return !1; var e = o(t); return !0 === e ? m(u(this, i)).has(t) : e && c(e, this._i) } }), r }, def: function (t, e, i) { var a = o(s(e), !0); return !0 === a ? m(t).set(e, i) : a[t._i] = i, t }, ufstore: m } }, { "./_an-instance": 61, "./_an-object": 62, "./_array-methods": 66, "./_for-of": 88, "./_has": 90, "./_is-object": 100, "./_meta": 113, "./_redefine-all": 133, "./_validate-collection": 158 }], 74: [function (t, e, i) { "use strict"; var g = t("./_global"), y = t("./_export"), b = t("./_redefine"), S = t("./_redefine-all"), E = t("./_meta"), A = t("./_for-of"), C = t("./_an-instance"), k = t("./_is-object"), w = t("./_fails"), P = t("./_iter-detect"), _ = t("./_set-to-string-tag"), L = t("./_inherit-if-required"); e.exports = function (a, t, e, i, s, r) { var n = g[a], o = n, l = s ? "set" : "add", d = o && o.prototype, h = {}, c = function (t) { var i = d[t]; b(d, t, "delete" == t ? function (t) { return !(r && !k(t)) && i.call(this, 0 === t ? 0 : t) } : "has" == t ? function (t) { return !(r && !k(t)) && i.call(this, 0 === t ? 0 : t) } : "get" == t ? function (t) { return r && !k(t) ? void 0 : i.call(this, 0 === t ? 0 : t) } : "add" == t ? function (t) { return i.call(this, 0 === t ? 0 : t), this } : function (t, e) { return i.call(this, 0 === t ? 0 : t, e), this }) }; if ("function" == typeof o && (r || d.forEach && !w(function () { (new o).entries().next() }))) { var u = new o, f = u[l](r ? {} : -0, 1) != u, p = w(function () { u.has(1) }), m = P(function (t) { new o(t) }), v = !r && w(function () { for (var t = new o, e = 5; e--;)t[l](e, e); return !t.has(-0) }); m || (((o = t(function (t, e) { C(t, o, a); var i = L(new n, t, o); return null != e && A(e, s, i[l], i), i })).prototype = d).constructor = o), (p || v) && (c("delete"), c("has"), s && c("get")), (v || f) && c(l), r && d.clear && delete d.clear } else o = i.getConstructor(t, a, s, l), S(o.prototype, e), E.NEED = !0; return _(o, a), h[a] = o, y(y.G + y.W + y.F * (o != n), h), r || i.setStrong(o, a, s), o } }, { "./_an-instance": 61, "./_export": 83, "./_fails": 85, "./_for-of": 88, "./_global": 89, "./_inherit-if-required": 94, "./_is-object": 100, "./_iter-detect": 105, "./_meta": 113, "./_redefine": 134, "./_redefine-all": 133, "./_set-to-string-tag": 138 }], 75: [function (t, e, i) { var a = e.exports = { version: "2.5.7" }; "number" == typeof __e && (__e = a) }, {}], 76: [function (t, e, i) { "use strict"; var a = t("./_object-dp"), s = t("./_property-desc"); e.exports = function (t, e, i) { e in t ? a.f(t, e, s(0, i)) : t[e] = i } }, { "./_object-dp": 118, "./_property-desc": 132 }], 77: [function (t, e, i) { var r = t("./_a-function"); e.exports = function (a, s, t) { if (r(a), void 0 === s) return a; switch (t) { case 1: return function (t) { return a.call(s, t) }; case 2: return function (t, e) { return a.call(s, t, e) }; case 3: return function (t, e, i) { return a.call(s, t, e, i) } }return function () { return a.apply(s, arguments) } } }, { "./_a-function": 59 }], 78: [function (t, e, i) { e.exports = function (t) { if (null == t) throw TypeError("Can't call method on  " + t); return t } }, {}], 79: [function (t, e, i) { e.exports = !t("./_fails")(function () { return 7 != Object.defineProperty({}, "a", { get: function () { return 7 } }).a }) }, { "./_fails": 85 }], 80: [function (t, e, i) { var a = t("./_is-object"), s = t("./_global").document, r = a(s) && a(s.createElement); e.exports = function (t) { return r ? s.createElement(t) : {} } }, { "./_global": 89, "./_is-object": 100 }], 81: [function (t, e, i) { e.exports = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",") }, {}], 82: [function (t, e, i) { var o = t("./_object-keys"), l = t("./_object-gops"), d = t("./_object-pie"); e.exports = function (t) { var e = o(t), i = l.f; if (i) for (var a, s = i(t), r = d.f, n = 0; s.length > n;)r.call(t, a = s[n++]) && e.push(a); return e } }, { "./_object-gops": 123, "./_object-keys": 126, "./_object-pie": 127 }], 83: [function (t, e, i) { var m = t("./_global"), v = t("./_core"), g = t("./_hide"), y = t("./_redefine"), b = t("./_ctx"), S = "prototype", E = function (t, e, i) { var a, s, r, n, o = t & E.F, l = t & E.G, d = t & E.S, h = t & E.P, c = t & E.B, u = l ? m : d ? m[e] || (m[e] = {}) : (m[e] || {})[S], f = l ? v : v[e] || (v[e] = {}), p = f[S] || (f[S] = {}); for (a in l && (i = e), i) r = ((s = !o && u && void 0 !== u[a]) ? u : i)[a], n = c && s ? b(r, m) : h && "function" == typeof r ? b(Function.call, r) : r, u && y(u, a, r, t & E.U), f[a] != r && g(f, a, n), h && p[a] != r && (p[a] = r) }; m.core = v, E.F = 1, E.G = 2, E.S = 4, E.P = 8, E.B = 16, E.W = 32, E.U = 64, E.R = 128, e.exports = E }, { "./_core": 75, "./_ctx": 77, "./_global": 89, "./_hide": 91, "./_redefine": 134 }], 84: [function (t, e, i) { var a = t("./_wks")("match"); e.exports = function (e) { var i = /./; try { "/./"[e](i) } catch (t) { try { return i[a] = !1, !"/./"[e](i) } catch (t) { } } return !0 } }, { "./_wks": 161 }], 85: [function (t, e, i) { e.exports = function (t) { try { return !!t() } catch (t) { return !0 } } }, {}], 86: [function (t, e, i) { "use strict"; var o = t("./_hide"), l = t("./_redefine"), d = t("./_fails"), h = t("./_defined"), c = t("./_wks"); e.exports = function (e, t, i) { var a = c(e), s = i(h, a, ""[e]), r = s[0], n = s[1]; d(function () { var t = {}; return t[a] = function () { return 7 }, 7 != ""[e](t) }) && (l(String.prototype, e, r), o(RegExp.prototype, a, 2 == t ? function (t, e) { return n.call(t, this, e) } : function (t) { return n.call(t, this) })) } }, { "./_defined": 78, "./_fails": 85, "./_hide": 91, "./_redefine": 134, "./_wks": 161 }], 87: [function (t, e, i) { "use strict"; var a = t("./_an-object"); e.exports = function () { var t = a(this), e = ""; return t.global && (e += "g"), t.ignoreCase && (e += "i"), t.multiline && (e += "m"), t.unicode && (e += "u"), t.sticky && (e += "y"), e } }, { "./_an-object": 62 }], 88: [function (t, e, i) { var u = t("./_ctx"), f = t("./_iter-call"), p = t("./_is-array-iter"), m = t("./_an-object"), v = t("./_to-length"), g = t("./core.get-iterator-method"), y = {}, b = {}; (i = e.exports = function (t, e, i, a, s) { var r, n, o, l, d = s ? function () { return t } : g(t), h = u(i, a, e ? 2 : 1), c = 0; if ("function" != typeof d) throw TypeError(t + " is not iterable!"); if (p(d)) { for (r = v(t.length); c < r; c++)if ((l = e ? h(m(n = t[c])[0], n[1]) : h(t[c])) === y || l === b) return l } else for (o = d.call(t); !(n = o.next()).done;)if ((l = f(o, h, n.value, e)) === y || l === b) return l }).BREAK = y, i.RETURN = b }, { "./_an-object": 62, "./_ctx": 77, "./_is-array-iter": 97, "./_iter-call": 102, "./_to-length": 150, "./core.get-iterator-method": 162 }], 89: [function (t, e, i) { var a = e.exports = "undefined" != typeof window && window.Math == Math ? window : "undefined" != typeof self && self.Math == Math ? self : Function("return this")(); "number" == typeof __g && (__g = a) }, {}], 90: [function (t, e, i) { var a = {}.hasOwnProperty; e.exports = function (t, e) { return a.call(t, e) } }, {}], 91: [function (t, e, i) { var a = t("./_object-dp"), s = t("./_property-desc"); e.exports = t("./_descriptors") ? function (t, e, i) { return a.f(t, e, s(1, i)) } : function (t, e, i) { return t[e] = i, t } }, { "./_descriptors": 79, "./_object-dp": 118, "./_property-desc": 132 }], 92: [function (t, e, i) { var a = t("./_global").document; e.exports = a && a.documentElement }, { "./_global": 89 }], 93: [function (t, e, i) { e.exports = !t("./_descriptors") && !t("./_fails")(function () { return 7 != Object.defineProperty(t("./_dom-create")("div"), "a", { get: function () { return 7 } }).a }) }, { "./_descriptors": 79, "./_dom-create": 80, "./_fails": 85 }], 94: [function (t, e, i) { var r = t("./_is-object"), n = t("./_set-proto").set; e.exports = function (t, e, i) { var a, s = e.constructor; return s !== i && "function" == typeof s && (a = s.prototype) !== i.prototype && r(a) && n && n(t, a), t } }, { "./_is-object": 100, "./_set-proto": 136 }], 95: [function (t, e, i) { e.exports = function (t, e, i) { var a = void 0 === i; switch (e.length) { case 0: return a ? t() : t.call(i); case 1: return a ? t(e[0]) : t.call(i, e[0]); case 2: return a ? t(e[0], e[1]) : t.call(i, e[0], e[1]); case 3: return a ? t(e[0], e[1], e[2]) : t.call(i, e[0], e[1], e[2]); case 4: return a ? t(e[0], e[1], e[2], e[3]) : t.call(i, e[0], e[1], e[2], e[3]) }return t.apply(i, e) } }, {}], 96: [function (t, e, i) { var a = t("./_cof"); e.exports = Object("z").propertyIsEnumerable(0) ? Object : function (t) { return "String" == a(t) ? t.split("") : Object(t) } }, { "./_cof": 71 }], 97: [function (t, e, i) { var a = t("./_iterators"), s = t("./_wks")("iterator"), r = Array.prototype; e.exports = function (t) { return void 0 !== t && (a.Array === t || r[s] === t) } }, { "./_iterators": 107, "./_wks": 161 }], 98: [function (t, e, i) { var a = t("./_cof"); e.exports = Array.isArray || function (t) { return "Array" == a(t) } }, { "./_cof": 71 }], 99: [function (t, e, i) { var a = t("./_is-object"), s = Math.floor; e.exports = function (t) { return !a(t) && isFinite(t) && s(t) === t } }, { "./_is-object": 100 }], 100: [function (t, e, i) { e.exports = function (t) { return "object" == typeof t ? null !== t : "function" == typeof t } }, {}], 101: [function (t, e, i) { var a = t("./_is-object"), s = t("./_cof"), r = t("./_wks")("match"); e.exports = function (t) { var e; return a(t) && (void 0 !== (e = t[r]) ? !!e : "RegExp" == s(t)) } }, { "./_cof": 71, "./_is-object": 100, "./_wks": 161 }], 102: [function (t, e, i) { var r = t("./_an-object"); e.exports = function (e, t, i, a) { try { return a ? t(r(i)[0], i[1]) : t(i) } catch (t) { var s = e.return; throw void 0 !== s && r(s.call(e)), t } } }, { "./_an-object": 62 }], 103: [function (t, e, i) { "use strict"; var a = t("./_object-create"), s = t("./_property-desc"), r = t("./_set-to-string-tag"), n = {}; t("./_hide")(n, t("./_wks")("iterator"), function () { return this }), e.exports = function (t, e, i) { t.prototype = a(n, { next: s(1, i) }), r(t, e + " Iterator") } }, { "./_hide": 91, "./_object-create": 117, "./_property-desc": 132, "./_set-to-string-tag": 138, "./_wks": 161 }], 104: [function (t, e, i) { "use strict"; var b = t("./_library"), S = t("./_export"), E = t("./_redefine"), A = t("./_hide"), C = t("./_iterators"), k = t("./_iter-create"), w = t("./_set-to-string-tag"), P = t("./_object-gpo"), _ = t("./_wks")("iterator"), L = !([].keys && "next" in [].keys()), T = "values", I = function () { return this }; e.exports = function (t, e, i, a, s, r, n) { k(i, e, a); var o, l, d, h = function (t) { if (!L && t in p) return p[t]; switch (t) { case "keys": case T: return function () { return new i(this, t) } }return function () { return new i(this, t) } }, c = e + " Iterator", u = s == T, f = !1, p = t.prototype, m = p[_] || p["@@iterator"] || s && p[s], v = m || h(s), g = s ? u ? h("entries") : v : void 0, y = "Array" == e && p.entries || m; if (y && (d = P(y.call(new t))) !== Object.prototype && d.next && (w(d, c, !0), b || "function" == typeof d[_] || A(d, _, I)), u && m && m.name !== T && (f = !0, v = function () { return m.call(this) }), b && !n || !L && !f && p[_] || A(p, _, v), C[e] = v, C[c] = I, s) if (o = { values: u ? v : h(T), keys: r ? v : h("keys"), entries: g }, n) for (l in o) l in p || E(p, l, o[l]); else S(S.P + S.F * (L || f), e, o); return o } }, { "./_export": 83, "./_hide": 91, "./_iter-create": 103, "./_iterators": 107, "./_library": 108, "./_object-gpo": 124, "./_redefine": 134, "./_set-to-string-tag": 138, "./_wks": 161 }], 105: [function (t, e, i) { var r = t("./_wks")("iterator"), n = !1; try { var a = [7][r](); a.return = function () { n = !0 }, Array.from(a, function () { throw 2 }) } catch (t) { } e.exports = function (t, e) { if (!e && !n) return !1; var i = !1; try { var a = [7], s = a[r](); s.next = function () { return { done: i = !0 } }, a[r] = function () { return s }, t(a) } catch (t) { } return i } }, { "./_wks": 161 }], 106: [function (t, e, i) { e.exports = function (t, e) { return { value: e, done: !!t } } }, {}], 107: [function (t, e, i) { e.exports = {} }, {}], 108: [function (t, e, i) { e.exports = !1 }, {}], 109: [function (t, e, i) { var a = Math.expm1; e.exports = !a || 22025.465794806718 < a(10) || a(10) < 22025.465794806718 || -2e-17 != a(-2e-17) ? function (t) { return 0 == (t = +t) ? t : -1e-6 < t && t < 1e-6 ? t + t * t / 2 : Math.exp(t) - 1 } : a }, {}], 110: [function (t, e, i) { var r = t("./_math-sign"), a = Math.pow, n = a(2, -52), o = a(2, -23), l = a(2, 127) * (2 - o), d = a(2, -126); e.exports = Math.fround || function (t) { var e, i, a = Math.abs(t), s = r(t); return a < d ? s * (a / d / o + 1 / n - 1 / n) * d * o : l < (i = (e = (1 + o / n) * a) - (e - a)) || i != i ? s * (1 / 0) : s * i } }, { "./_math-sign": 112 }], 111: [function (t, e, i) { e.exports = Math.log1p || function (t) { return -1e-8 < (t = +t) && t < 1e-8 ? t - t * t / 2 : Math.log(1 + t) } }, {}], 112: [function (t, e, i) { e.exports = Math.sign || function (t) { return 0 == (t = +t) || t != t ? t : t < 0 ? -1 : 1 } }, {}], 113: [function (t, e, i) { var a = t("./_uid")("meta"), s = t("./_is-object"), r = t("./_has"), n = t("./_object-dp").f, o = 0, l = Object.isExtensible || function () { return !0 }, d = !t("./_fails")(function () { return l(Object.preventExtensions({})) }), h = function (t) { n(t, a, { value: { i: "O" + ++o, w: {} } }) }, c = e.exports = { KEY: a, NEED: !1, fastKey: function (t, e) { if (!s(t)) return "symbol" == typeof t ? t : ("string" == typeof t ? "S" : "P") + t; if (!r(t, a)) { if (!l(t)) return "F"; if (!e) return "E"; h(t) } return t[a].i }, getWeak: function (t, e) { if (!r(t, a)) { if (!l(t)) return !0; if (!e) return !1; h(t) } return t[a].w }, onFreeze: function (t) { return d && c.NEED && l(t) && !r(t, a) && h(t), t } } }, { "./_fails": 85, "./_has": 90, "./_is-object": 100, "./_object-dp": 118, "./_uid": 156 }], 114: [function (t, e, i) { var o = t("./_global"), l = t("./_task").set, d = o.MutationObserver || o.WebKitMutationObserver, h = o.process, c = o.Promise, u = "process" == t("./_cof")(h); e.exports = function () { var i, a, s, t = function () { var t, e; for (u && (t = h.domain) && t.exit(); i;) { e = i.fn, i = i.next; try { e() } catch (t) { throw i ? s() : a = void 0, t } } a = void 0, t && t.enter() }; if (u) s = function () { h.nextTick(t) }; else if (!d || o.navigator && o.navigator.standalone) if (c && c.resolve) { var e = c.resolve(void 0); s = function () { e.then(t) } } else s = function () { l.call(o, t) }; else { var r = !0, n = document.createTextNode(""); new d(t).observe(n, { characterData: !0 }), s = function () { n.data = r = !r } } return function (t) { var e = { fn: t, next: void 0 }; a && (a.next = e), i || (i = e, s()), a = e } } }, { "./_cof": 71, "./_global": 89, "./_task": 145 }], 115: [function (t, e, i) { "use strict"; var s = t("./_a-function"); function a(t) { var i, a; this.promise = new t(function (t, e) { if (void 0 !== i || void 0 !== a) throw TypeError("Bad Promise constructor"); i = t, a = e }), this.resolve = s(i), this.reject = s(a) } e.exports.f = function (t) { return new a(t) } }, { "./_a-function": 59 }], 116: [function (t, e, i) { "use strict"; var u = t("./_object-keys"), f = t("./_object-gops"), p = t("./_object-pie"), m = t("./_to-object"), v = t("./_iobject"), s = Object.assign; e.exports = !s || t("./_fails")(function () { var t = {}, e = {}, i = Symbol(), a = "abcdefghijklmnopqrst"; return t[i] = 7, a.split("").forEach(function (t) { e[t] = t }), 7 != s({}, t)[i] || Object.keys(s({}, e)).join("") != a }) ? function (t, e) { for (var i = m(t), a = arguments.length, s = 1, r = f.f, n = p.f; s < a;)for (var o, l = v(arguments[s++]), d = r ? u(l).concat(r(l)) : u(l), h = d.length, c = 0; c < h;)n.call(l, o = d[c++]) && (i[o] = l[o]); return i } : s }, { "./_fails": 85, "./_iobject": 96, "./_object-gops": 123, "./_object-keys": 126, "./_object-pie": 127, "./_to-object": 151 }], 117: [function (a, t, e) { var s = a("./_an-object"), r = a("./_object-dps"), n = a("./_enum-bug-keys"), o = a("./_shared-key")("IE_PROTO"), l = function () { }, d = "prototype", h = function () { var t, e = a("./_dom-create")("iframe"), i = n.length; for (e.style.display = "none", a("./_html").appendChild(e), e.src = "javascript:", (t = e.contentWindow.document).open(), t.write("<script>document.F=Object<\/script>"), t.close(), h = t.F; i--;)delete h[d][n[i]]; return h() }; t.exports = Object.create || function (t, e) { var i; return null !== t ? (l[d] = s(t), i = new l, l[d] = null, i[o] = t) : i = h(), void 0 === e ? i : r(i, e) } }, { "./_an-object": 62, "./_dom-create": 80, "./_enum-bug-keys": 81, "./_html": 92, "./_object-dps": 119, "./_shared-key": 139 }], 118: [function (t, e, i) { var a = t("./_an-object"), s = t("./_ie8-dom-define"), r = t("./_to-primitive"), n = Object.defineProperty; i.f = t("./_descriptors") ? Object.defineProperty : function (t, e, i) { if (a(t), e = r(e, !0), a(i), s) try { return n(t, e, i) } catch (t) { } if ("get" in i || "set" in i) throw TypeError("Accessors not supported!"); return "value" in i && (t[e] = i.value), t } }, { "./_an-object": 62, "./_descriptors": 79, "./_ie8-dom-define": 93, "./_to-primitive": 152 }], 119: [function (t, e, i) { var n = t("./_object-dp"), o = t("./_an-object"), l = t("./_object-keys"); e.exports = t("./_descriptors") ? Object.defineProperties : function (t, e) { o(t); for (var i, a = l(e), s = a.length, r = 0; r < s;)n.f(t, i = a[r++], e[i]); return t } }, { "./_an-object": 62, "./_descriptors": 79, "./_object-dp": 118, "./_object-keys": 126 }], 120: [function (t, e, i) { var a = t("./_object-pie"), s = t("./_property-desc"), r = t("./_to-iobject"), n = t("./_to-primitive"), o = t("./_has"), l = t("./_ie8-dom-define"), d = Object.getOwnPropertyDescriptor; i.f = t("./_descriptors") ? d : function (t, e) { if (t = r(t), e = n(e, !0), l) try { return d(t, e) } catch (t) { } if (o(t, e)) return s(!a.f.call(t, e), t[e]) } }, { "./_descriptors": 79, "./_has": 90, "./_ie8-dom-define": 93, "./_object-pie": 127, "./_property-desc": 132, "./_to-iobject": 149, "./_to-primitive": 152 }], 121: [function (t, e, i) { var a = t("./_to-iobject"), s = t("./_object-gopn").f, r = {}.toString, n = "object" == typeof window && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; e.exports.f = function (t) { return n && "[object Window]" == r.call(t) ? function (t) { try { return s(t) } catch (t) { return n.slice() } }(t) : s(a(t)) } }, { "./_object-gopn": 122, "./_to-iobject": 149 }], 122: [function (t, e, i) { var a = t("./_object-keys-internal"), s = t("./_enum-bug-keys").concat("length", "prototype"); i.f = Object.getOwnPropertyNames || function (t) { return a(t, s) } }, { "./_enum-bug-keys": 81, "./_object-keys-internal": 125 }], 123: [function (t, e, i) { i.f = Object.getOwnPropertySymbols }, {}], 124: [function (t, e, i) { var a = t("./_has"), s = t("./_to-object"), r = t("./_shared-key")("IE_PROTO"), n = Object.prototype; e.exports = Object.getPrototypeOf || function (t) { return t = s(t), a(t, r) ? t[r] : "function" == typeof t.constructor && t instanceof t.constructor ? t.constructor.prototype : t instanceof Object ? n : null } }, { "./_has": 90, "./_shared-key": 139, "./_to-object": 151 }], 125: [function (t, e, i) { var n = t("./_has"), o = t("./_to-iobject"), l = t("./_array-includes")(!1), d = t("./_shared-key")("IE_PROTO"); e.exports = function (t, e) { var i, a = o(t), s = 0, r = []; for (i in a) i != d && n(a, i) && r.push(i); for (; e.length > s;)n(a, i = e[s++]) && (~l(r, i) || r.push(i)); return r } }, { "./_array-includes": 65, "./_has": 90, "./_shared-key": 139, "./_to-iobject": 149 }], 126: [function (t, e, i) { var a = t("./_object-keys-internal"), s = t("./_enum-bug-keys"); e.exports = Object.keys || function (t) { return a(t, s) } }, { "./_enum-bug-keys": 81, "./_object-keys-internal": 125 }], 127: [function (t, e, i) { i.f = {}.propertyIsEnumerable }, {}], 128: [function (t, e, i) { var s = t("./_export"), r = t("./_core"), n = t("./_fails"); e.exports = function (t, e) { var i = (r.Object || {})[t] || Object[t], a = {}; a[t] = e(i), s(s.S + s.F * n(function () { i(1) }), "Object", a) } }, { "./_core": 75, "./_export": 83, "./_fails": 85 }], 129: [function (t, e, i) { var a = t("./_object-gopn"), s = t("./_object-gops"), r = t("./_an-object"), n = t("./_global").Reflect; e.exports = n && n.ownKeys || function (t) { var e = a.f(r(t)), i = s.f; return i ? e.concat(i(t)) : e } }, { "./_an-object": 62, "./_global": 89, "./_object-gopn": 122, "./_object-gops": 123 }], 130: [function (t, e, i) { e.exports = function (t) { try { return { e: !1, v: t() } } catch (t) { return { e: !0, v: t } } } }, {}], 131: [function (t, e, i) { var a = t("./_an-object"), s = t("./_is-object"), r = t("./_new-promise-capability"); e.exports = function (t, e) { if (a(t), s(e) && e.constructor === t) return e; var i = r.f(t); return (0, i.resolve)(e), i.promise } }, { "./_an-object": 62, "./_is-object": 100, "./_new-promise-capability": 115 }], 132: [function (t, e, i) { e.exports = function (t, e) { return { enumerable: !(1 & t), configurable: !(2 & t), writable: !(4 & t), value: e } } }, {}], 133: [function (t, e, i) { var s = t("./_redefine"); e.exports = function (t, e, i) { for (var a in e) s(t, a, e[a], i); return t } }, { "./_redefine": 134 }], 134: [function (t, e, i) { var r = t("./_global"), n = t("./_hide"), o = t("./_has"), l = t("./_uid")("src"), a = "toString", s = Function[a], d = ("" + s).split(a); t("./_core").inspectSource = function (t) { return s.call(t) }, (e.exports = function (t, e, i, a) { var s = "function" == typeof i; s && (o(i, "name") || n(i, "name", e)), t[e] !== i && (s && (o(i, l) || n(i, l, t[e] ? "" + t[e] : d.join(String(e)))), t === r ? t[e] = i : a ? t[e] ? t[e] = i : n(t, e, i) : (delete t[e], n(t, e, i))) })(Function.prototype, a, function () { return "function" == typeof this && this[l] || s.call(this) }) }, { "./_core": 75, "./_global": 89, "./_has": 90, "./_hide": 91, "./_uid": 156 }], 135: [function (t, e, i) { e.exports = Object.is || function (t, e) { return t === e ? 0 !== t || 1 / t == 1 / e : t != t && e != e } }, {}], 136: [function (e, t, i) { var a = e("./_is-object"), s = e("./_an-object"), r = function (t, e) { if (s(t), !a(e) && null !== e) throw TypeError(e + ": can't set as prototype!") }; t.exports = { set: Object.setPrototypeOf || ("__proto__" in {} ? function (t, i, a) { try { (a = e("./_ctx")(Function.call, e("./_object-gopd").f(Object.prototype, "__proto__").set, 2))(t, []), i = !(t instanceof Array) } catch (t) { i = !0 } return function (t, e) { return r(t, e), i ? t.__proto__ = e : a(t, e), t } }({}, !1) : void 0), check: r } }, { "./_an-object": 62, "./_ctx": 77, "./_is-object": 100, "./_object-gopd": 120 }], 137: [function (t, e, i) { "use strict"; var a = t("./_global"), s = t("./_object-dp"), r = t("./_descriptors"), n = t("./_wks")("species"); e.exports = function (t) { var e = a[t]; r && e && !e[n] && s.f(e, n, { configurable: !0, get: function () { return this } }) } }, { "./_descriptors": 79, "./_global": 89, "./_object-dp": 118, "./_wks": 161 }], 138: [function (t, e, i) { var a = t("./_object-dp").f, s = t("./_has"), r = t("./_wks")("toStringTag"); e.exports = function (t, e, i) { t && !s(t = i ? t : t.prototype, r) && a(t, r, { configurable: !0, value: e }) } }, { "./_has": 90, "./_object-dp": 118, "./_wks": 161 }], 139: [function (t, e, i) { var a = t("./_shared")("keys"), s = t("./_uid"); e.exports = function (t) { return a[t] || (a[t] = s(t)) } }, { "./_shared": 140, "./_uid": 156 }], 140: [function (t, e, i) { var a = t("./_core"), s = t("./_global"), r = "__core-js_shared__", n = s[r] || (s[r] = {}); (e.exports = function (t, e) { return n[t] || (n[t] = void 0 !== e ? e : {}) })("versions", []).push({ version: a.version, mode: t("./_library") ? "pure" : "global", copyright: "© 2018 Denis Pushkarev (zloirock.ru)" }) }, { "./_core": 75, "./_global": 89, "./_library": 108 }], 141: [function (t, e, i) { var s = t("./_an-object"), r = t("./_a-function"), n = t("./_wks")("species"); e.exports = function (t, e) { var i, a = s(t).constructor; return void 0 === a || null == (i = s(a)[n]) ? e : r(i) } }, { "./_a-function": 59, "./_an-object": 62, "./_wks": 161 }], 142: [function (t, e, i) { var l = t("./_to-integer"), d = t("./_defined"); e.exports = function (o) { return function (t, e) { var i, a, s = String(d(t)), r = l(e), n = s.length; return r < 0 || n <= r ? o ? "" : void 0 : (i = s.charCodeAt(r)) < 55296 || 56319 < i || r + 1 === n || (a = s.charCodeAt(r + 1)) < 56320 || 57343 < a ? o ? s.charAt(r) : i : o ? s.slice(r, r + 2) : a - 56320 + (i - 55296 << 10) + 65536 } } }, { "./_defined": 78, "./_to-integer": 148 }], 143: [function (t, e, i) { var a = t("./_is-regexp"), s = t("./_defined"); e.exports = function (t, e, i) { if (a(e)) throw TypeError("String#" + i + " doesn't accept regex!"); return String(s(t)) } }, { "./_defined": 78, "./_is-regexp": 101 }], 144: [function (t, e, i) { "use strict"; var s = t("./_to-integer"), r = t("./_defined"); e.exports = function (t) { var e = String(r(this)), i = "", a = s(t); if (a < 0 || a == 1 / 0) throw RangeError("Count can't be negative"); for (; 0 < a; (a >>>= 1) && (e += e))1 & a && (i += e); return i } }, { "./_defined": 78, "./_to-integer": 148 }], 145: [function (t, e, i) { var a, s, r, n = t("./_ctx"), o = t("./_invoke"), l = t("./_html"), d = t("./_dom-create"), h = t("./_global"), c = h.process, u = h.setImmediate, f = h.clearImmediate, p = h.MessageChannel, m = h.Dispatch, v = 0, g = {}, y = "onreadystatechange", b = function () { var t = +this; if (g.hasOwnProperty(t)) { var e = g[t]; delete g[t], e() } }, S = function (t) { b.call(t.data) }; u && f || (u = function (t) { for (var e = [], i = 1; arguments.length > i;)e.push(arguments[i++]); return g[++v] = function () { o("function" == typeof t ? t : Function(t), e) }, a(v), v }, f = function (t) { delete g[t] }, "process" == t("./_cof")(c) ? a = function (t) { c.nextTick(n(b, t, 1)) } : m && m.now ? a = function (t) { m.now(n(b, t, 1)) } : p ? (r = (s = new p).port2, s.port1.onmessage = S, a = n(r.postMessage, r, 1)) : h.addEventListener && "function" == typeof postMessage && !h.importScripts ? (a = function (t) { h.postMessage(t + "", "*") }, h.addEventListener("message", S, !1)) : a = y in d("script") ? function (t) { l.appendChild(d("script"))[y] = function () { l.removeChild(this), b.call(t) } } : function (t) { setTimeout(n(b, t, 1), 0) }), e.exports = { set: u, clear: f } }, { "./_cof": 71, "./_ctx": 77, "./_dom-create": 80, "./_global": 89, "./_html": 92, "./_invoke": 95 }], 146: [function (t, e, i) { var a = t("./_to-integer"), s = Math.max, r = Math.min; e.exports = function (t, e) { return (t = a(t)) < 0 ? s(t + e, 0) : r(t, e) } }, { "./_to-integer": 148 }], 147: [function (t, e, i) { var a = t("./_to-integer"), s = t("./_to-length"); e.exports = function (t) { if (void 0 === t) return 0; var e = a(t), i = s(e); if (e !== i) throw RangeError("Wrong length!"); return i } }, { "./_to-integer": 148, "./_to-length": 150 }], 148: [function (t, e, i) { var a = Math.ceil, s = Math.floor; e.exports = function (t) { return isNaN(t = +t) ? 0 : (0 < t ? s : a)(t) } }, {}], 149: [function (t, e, i) { var a = t("./_iobject"), s = t("./_defined"); e.exports = function (t) { return a(s(t)) } }, { "./_defined": 78, "./_iobject": 96 }], 150: [function (t, e, i) { var a = t("./_to-integer"), s = Math.min; e.exports = function (t) { return 0 < t ? s(a(t), 9007199254740991) : 0 } }, { "./_to-integer": 148 }], 151: [function (t, e, i) { var a = t("./_defined"); e.exports = function (t) { return Object(a(t)) } }, { "./_defined": 78 }], 152: [function (t, e, i) { var s = t("./_is-object"); e.exports = function (t, e) { if (!s(t)) return t; var i, a; if (e && "function" == typeof (i = t.toString) && !s(a = i.call(t))) return a; if ("function" == typeof (i = t.valueOf) && !s(a = i.call(t))) return a; if (!e && "function" == typeof (i = t.toString) && !s(a = i.call(t))) return a; throw TypeError("Can't convert object to primitive value") } }, { "./_is-object": 100 }], 153: [function (t, e, i) { "use strict"; if (t("./_descriptors")) { var g = t("./_library"), y = t("./_global"), b = t("./_fails"), S = t("./_export"), E = t("./_typed"), a = t("./_typed-buffer"), u = t("./_ctx"), A = t("./_an-instance"), s = t("./_property-desc"), C = t("./_hide"), r = t("./_redefine-all"), n = t("./_to-integer"), k = t("./_to-length"), w = t("./_to-index"), o = t("./_to-absolute-index"), l = t("./_to-primitive"), d = t("./_has"), P = t("./_classof"), _ = t("./_is-object"), f = t("./_to-object"), p = t("./_is-array-iter"), L = t("./_object-create"), T = t("./_object-gpo"), I = t("./_object-gopn").f, m = t("./core.get-iterator-method"), h = t("./_uid"), c = t("./_wks"), v = t("./_array-methods"), M = t("./_array-includes"), x = t("./_species-constructor"), D = t("./es6.array.iterator"), R = t("./_iterators"), O = t("./_iter-detect"), j = t("./_set-species"), V = t("./_array-fill"), F = t("./_array-copy-within"), N = t("./_object-dp"), U = t("./_object-gopd"), B = N.f, H = U.f, W = y.RangeError, q = y.TypeError, J = y.Uint8Array, z = "ArrayBuffer", G = "Shared" + z, K = "BYTES_PER_ELEMENT", Q = "prototype", Y = Array[Q], X = a.ArrayBuffer, $ = a.DataView, Z = v(0), tt = v(2), et = v(3), it = v(4), at = v(5), st = v(6), rt = M(!0), nt = M(!1), ot = D.values, lt = D.keys, dt = D.entries, ht = Y.lastIndexOf, ct = Y.reduce, ut = Y.reduceRight, ft = Y.join, pt = Y.sort, mt = Y.slice, vt = Y.toString, gt = Y.toLocaleString, yt = c("iterator"), bt = c("toStringTag"), St = h("typed_constructor"), Et = h("def_constructor"), At = E.CONSTR, Ct = E.TYPED, kt = E.VIEW, wt = "Wrong length!", Pt = v(1, function (t, e) { return Mt(x(t, t[Et]), e) }), _t = b(function () { return 1 === new J(new Uint16Array([1]).buffer)[0] }), Lt = !!J && !!J[Q].set && b(function () { new J(1).set({}) }), Tt = function (t, e) { var i = n(t); if (i < 0 || i % e) throw W("Wrong offset!"); return i }, It = function (t) { if (_(t) && Ct in t) return t; throw q(t + " is not a typed array!") }, Mt = function (t, e) { if (!(_(t) && St in t)) throw q("It is not a typed array constructor!"); return new t(e) }, xt = function (t, e) { return Dt(x(t, t[Et]), e) }, Dt = function (t, e) { for (var i = 0, a = e.length, s = Mt(t, a); i < a;)s[i] = e[i++]; return s }, Rt = function (t, e, i) { B(t, e, { get: function () { return this._d[i] } }) }, Ot = function (t) { var e, i, a, s, r, n, o = f(t), l = arguments.length, d = 1 < l ? arguments[1] : void 0, h = void 0 !== d, c = m(o); if (null != c && !p(c)) { for (n = c.call(o), a = [], e = 0; !(r = n.next()).done; e++)a.push(r.value); o = a } for (h && 2 < l && (d = u(d, arguments[2], 2)), e = 0, i = k(o.length), s = Mt(this, i); e < i; e++)s[e] = h ? d(o[e], e) : o[e]; return s }, jt = function () { for (var t = 0, e = arguments.length, i = Mt(this, e); t < e;)i[t] = arguments[t++]; return i }, Vt = !!J && b(function () { gt.call(new J(1)) }), Ft = function () { return gt.apply(Vt ? mt.call(It(this)) : It(this), arguments) }, Nt = { copyWithin: function (t, e) { return F.call(It(this), t, e, 2 < arguments.length ? arguments[2] : void 0) }, every: function (t) { return it(It(this), t, 1 < arguments.length ? arguments[1] : void 0) }, fill: function (t) { return V.apply(It(this), arguments) }, filter: function (t) { return xt(this, tt(It(this), t, 1 < arguments.length ? arguments[1] : void 0)) }, find: function (t) { return at(It(this), t, 1 < arguments.length ? arguments[1] : void 0) }, findIndex: function (t) { return st(It(this), t, 1 < arguments.length ? arguments[1] : void 0) }, forEach: function (t) { Z(It(this), t, 1 < arguments.length ? arguments[1] : void 0) }, indexOf: function (t) { return nt(It(this), t, 1 < arguments.length ? arguments[1] : void 0) }, includes: function (t) { return rt(It(this), t, 1 < arguments.length ? arguments[1] : void 0) }, join: function (t) { return ft.apply(It(this), arguments) }, lastIndexOf: function (t) { return ht.apply(It(this), arguments) }, map: function (t) { return Pt(It(this), t, 1 < arguments.length ? arguments[1] : void 0) }, reduce: function (t) { return ct.apply(It(this), arguments) }, reduceRight: function (t) { return ut.apply(It(this), arguments) }, reverse: function () { for (var t, e = It(this).length, i = Math.floor(e / 2), a = 0; a < i;)t = this[a], this[a++] = this[--e], this[e] = t; return this }, some: function (t) { return et(It(this), t, 1 < arguments.length ? arguments[1] : void 0) }, sort: function (t) { return pt.call(It(this), t) }, subarray: function (t, e) { var i = It(this), a = i.length, s = o(t, a); return new (x(i, i[Et]))(i.buffer, i.byteOffset + s * i.BYTES_PER_ELEMENT, k((void 0 === e ? a : o(e, a)) - s)) } }, Ut = function (t, e) { return xt(this, mt.call(It(this), t, e)) }, Bt = function (t) { It(this); var e = Tt(arguments[1], 1), i = this.length, a = f(t), s = k(a.length), r = 0; if (i < s + e) throw W(wt); for (; r < s;)this[e + r] = a[r++] }, Ht = { entries: function () { return dt.call(It(this)) }, keys: function () { return lt.call(It(this)) }, values: function () { return ot.call(It(this)) } }, Wt = function (t, e) { return _(t) && t[Ct] && "symbol" != typeof e && e in t && String(+e) == String(e) }, qt = function (t, e) { return Wt(t, e = l(e, !0)) ? s(2, t[e]) : H(t, e) }, Jt = function (t, e, i) { return !(Wt(t, e = l(e, !0)) && _(i) && d(i, "value")) || d(i, "get") || d(i, "set") || i.configurable || d(i, "writable") && !i.writable || d(i, "enumerable") && !i.enumerable ? B(t, e, i) : (t[e] = i.value, t) }; At || (U.f = qt, N.f = Jt), S(S.S + S.F * !At, "Object", { getOwnPropertyDescriptor: qt, defineProperty: Jt }), b(function () { vt.call({}) }) && (vt = gt = function () { return ft.call(this) }); var zt = r({}, Nt); r(zt, Ht), C(zt, yt, Ht.values), r(zt, { slice: Ut, set: Bt, constructor: function () { }, toString: vt, toLocaleString: Ft }), Rt(zt, "buffer", "b"), Rt(zt, "byteOffset", "o"), Rt(zt, "byteLength", "l"), Rt(zt, "length", "e"), B(zt, bt, { get: function () { return this[Ct] } }), e.exports = function (t, c, e, r) { var u = t + ((r = !!r) ? "Clamped" : "") + "Array", i = "get" + t, n = "set" + t, f = y[u], o = f || {}, a = f && T(f), s = !f || !E.ABV, l = {}, d = f && f[Q], p = function (t, s) { B(t, s, { get: function () { return t = s, (e = this._d).v[i](t * c + e.o, _t); var t, e }, set: function (t) { return e = s, i = t, a = this._d, r && (i = (i = Math.round(i)) < 0 ? 0 : 255 < i ? 255 : 255 & i), void a.v[n](e * c + a.o, i, _t); var e, i, a }, enumerable: !0 }) }; s ? (f = e(function (t, e, i, a) { A(t, f, u, "_d"); var s, r, n, o, l = 0, d = 0; if (_(e)) { if (!(e instanceof X || (o = P(e)) == z || o == G)) return Ct in e ? Dt(f, e) : Ot.call(f, e); s = e, d = Tt(i, c); var h = e.byteLength; if (void 0 === a) { if (h % c) throw W(wt); if ((r = h - d) < 0) throw W(wt) } else if (h < (r = k(a) * c) + d) throw W(wt); n = r / c } else n = w(e), s = new X(r = n * c); for (C(t, "_d", { b: s, o: d, l: r, e: n, v: new $(s) }); l < n;)p(t, l++) }), d = f[Q] = L(zt), C(d, "constructor", f)) : b(function () { f(1) }) && b(function () { new f(-1) }) && O(function (t) { new f, new f(null), new f(1.5), new f(t) }, !0) || (f = e(function (t, e, i, a) { var s; return A(t, f, u), _(e) ? e instanceof X || (s = P(e)) == z || s == G ? void 0 !== a ? new o(e, Tt(i, c), a) : void 0 !== i ? new o(e, Tt(i, c)) : new o(e) : Ct in e ? Dt(f, e) : Ot.call(f, e) : new o(w(e)) }), Z(a !== Function.prototype ? I(o).concat(I(a)) : I(o), function (t) { t in f || C(f, t, o[t]) }), f[Q] = d, g || (d.constructor = f)); var h = d[yt], m = !!h && ("values" == h.name || null == h.name), v = Ht.values; C(f, St, !0), C(d, Ct, u), C(d, kt, !0), C(d, Et, f), (r ? new f(1)[bt] == u : bt in d) || B(d, bt, { get: function () { return u } }), l[u] = f, S(S.G + S.W + S.F * (f != o), l), S(S.S, u, { BYTES_PER_ELEMENT: c }), S(S.S + S.F * b(function () { o.of.call(f, 1) }), u, { from: Ot, of: jt }), K in d || C(d, K, c), S(S.P, u, Nt), j(u), S(S.P + S.F * Lt, u, { set: Bt }), S(S.P + S.F * !m, u, Ht), g || d.toString == vt || (d.toString = vt), S(S.P + S.F * b(function () { new f(1).slice() }), u, { slice: Ut }), S(S.P + S.F * (b(function () { return [1, 2].toLocaleString() != new f([1, 2]).toLocaleString() }) || !b(function () { d.toLocaleString.call([1, 2]) })), u, { toLocaleString: Ft }), R[u] = m ? h : v, g || m || C(d, yt, v) } } else e.exports = function () { } }, { "./_an-instance": 61, "./_array-copy-within": 63, "./_array-fill": 64, "./_array-includes": 65, "./_array-methods": 66, "./_classof": 70, "./_ctx": 77, "./_descriptors": 79, "./_export": 83, "./_fails": 85, "./_global": 89, "./_has": 90, "./_hide": 91, "./_is-array-iter": 97, "./_is-object": 100, "./_iter-detect": 105, "./_iterators": 107, "./_library": 108, "./_object-create": 117, "./_object-dp": 118, "./_object-gopd": 120, "./_object-gopn": 122, "./_object-gpo": 124, "./_property-desc": 132, "./_redefine-all": 133, "./_set-species": 137, "./_species-constructor": 141, "./_to-absolute-index": 146, "./_to-index": 147, "./_to-integer": 148, "./_to-length": 150, "./_to-object": 151, "./_to-primitive": 152, "./_typed": 155, "./_typed-buffer": 154, "./_uid": 156, "./_wks": 161, "./core.get-iterator-method": 162, "./es6.array.iterator": 168 }], 154: [function (t, e, i) { "use strict"; var a = t("./_global"), s = t("./_descriptors"), r = t("./_library"), n = t("./_typed"), o = t("./_hide"), l = t("./_redefine-all"), d = t("./_fails"), h = t("./_an-instance"), c = t("./_to-integer"), u = t("./_to-length"), f = t("./_to-index"), p = t("./_object-gopn").f, m = t("./_object-dp").f, v = t("./_array-fill"), g = t("./_set-to-string-tag"), y = "ArrayBuffer", b = "DataView", S = "prototype", E = "Wrong index!", A = a[y], C = a[b], k = a.Math, w = a.RangeError, P = a.Infinity, _ = A, L = k.abs, T = k.pow, I = k.floor, M = k.log, x = k.LN2, D = "byteLength", R = "byteOffset", O = s ? "_b" : "buffer", j = s ? "_l" : D, V = s ? "_o" : R; function F(t, e, i) { var a, s, r, n = new Array(i), o = 8 * i - e - 1, l = (1 << o) - 1, d = l >> 1, h = 23 === e ? T(2, -24) - T(2, -77) : 0, c = 0, u = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0; for ((t = L(t)) != t || t === P ? (s = t != t ? 1 : 0, a = l) : (a = I(M(t) / x), t * (r = T(2, -a)) < 1 && (a-- , r *= 2), 2 <= (t += 1 <= a + d ? h / r : h * T(2, 1 - d)) * r && (a++ , r /= 2), l <= a + d ? (s = 0, a = l) : 1 <= a + d ? (s = (t * r - 1) * T(2, e), a += d) : (s = t * T(2, d - 1) * T(2, e), a = 0)); 8 <= e; n[c++] = 255 & s, s /= 256, e -= 8); for (a = a << e | s, o += e; 0 < o; n[c++] = 255 & a, a /= 256, o -= 8); return n[--c] |= 128 * u, n } function N(t, e, i) { var a, s = 8 * i - e - 1, r = (1 << s) - 1, n = r >> 1, o = s - 7, l = i - 1, d = t[l--], h = 127 & d; for (d >>= 7; 0 < o; h = 256 * h + t[l], l-- , o -= 8); for (a = h & (1 << -o) - 1, h >>= -o, o += e; 0 < o; a = 256 * a + t[l], l-- , o -= 8); if (0 === h) h = 1 - n; else { if (h === r) return a ? NaN : d ? -P : P; a += T(2, e), h -= n } return (d ? -1 : 1) * a * T(2, h - e) } function U(t) { return t[3] << 24 | t[2] << 16 | t[1] << 8 | t[0] } function B(t) { return [255 & t] } function H(t) { return [255 & t, t >> 8 & 255] } function W(t) { return [255 & t, t >> 8 & 255, t >> 16 & 255, t >> 24 & 255] } function q(t) { return F(t, 52, 8) } function J(t) { return F(t, 23, 4) } function z(t, e, i) { m(t[S], e, { get: function () { return this[i] } }) } function G(t, e, i, a) { var s = f(+i); if (s + e > t[j]) throw w(E); var r = t[O]._b, n = s + t[V], o = r.slice(n, n + e); return a ? o : o.reverse() } function K(t, e, i, a, s, r) { var n = f(+i); if (n + e > t[j]) throw w(E); for (var o = t[O]._b, l = n + t[V], d = a(+s), h = 0; h < e; h++)o[l + h] = d[r ? h : e - h - 1] } if (n.ABV) { if (!d(function () { A(1) }) || !d(function () { new A(-1) }) || d(function () { return new A, new A(1.5), new A(NaN), A.name != y })) { for (var Q, Y = (A = function (t) { return h(this, A), new _(f(t)) })[S] = _[S], X = p(_), $ = 0; X.length > $;)(Q = X[$++]) in A || o(A, Q, _[Q]); r || (Y.constructor = A) } var Z = new C(new A(2)), tt = C[S].setInt8; Z.setInt8(0, 2147483648), Z.setInt8(1, 2147483649), !Z.getInt8(0) && Z.getInt8(1) || l(C[S], { setInt8: function (t, e) { tt.call(this, t, e << 24 >> 24) }, setUint8: function (t, e) { tt.call(this, t, e << 24 >> 24) } }, !0) } else A = function (t) { h(this, A, y); var e = f(t); this._b = v.call(new Array(e), 0), this[j] = e }, C = function (t, e, i) { h(this, C, b), h(t, A, b); var a = t[j], s = c(e); if (s < 0 || a < s) throw w("Wrong offset!"); if (a < s + (i = void 0 === i ? a - s : u(i))) throw w("Wrong length!"); this[O] = t, this[V] = s, this[j] = i }, s && (z(A, D, "_l"), z(C, "buffer", "_b"), z(C, D, "_l"), z(C, R, "_o")), l(C[S], { getInt8: function (t) { return G(this, 1, t)[0] << 24 >> 24 }, getUint8: function (t) { return G(this, 1, t)[0] }, getInt16: function (t) { var e = G(this, 2, t, arguments[1]); return (e[1] << 8 | e[0]) << 16 >> 16 }, getUint16: function (t) { var e = G(this, 2, t, arguments[1]); return e[1] << 8 | e[0] }, getInt32: function (t) { return U(G(this, 4, t, arguments[1])) }, getUint32: function (t) { return U(G(this, 4, t, arguments[1])) >>> 0 }, getFloat32: function (t) { return N(G(this, 4, t, arguments[1]), 23, 4) }, getFloat64: function (t) { return N(G(this, 8, t, arguments[1]), 52, 8) }, setInt8: function (t, e) { K(this, 1, t, B, e) }, setUint8: function (t, e) { K(this, 1, t, B, e) }, setInt16: function (t, e) { K(this, 2, t, H, e, arguments[2]) }, setUint16: function (t, e) { K(this, 2, t, H, e, arguments[2]) }, setInt32: function (t, e) { K(this, 4, t, W, e, arguments[2]) }, setUint32: function (t, e) { K(this, 4, t, W, e, arguments[2]) }, setFloat32: function (t, e) { K(this, 4, t, J, e, arguments[2]) }, setFloat64: function (t, e) { K(this, 8, t, q, e, arguments[2]) } }); g(A, y), g(C, b), o(C[S], n.VIEW, !0), i[y] = A, i[b] = C }, { "./_an-instance": 61, "./_array-fill": 64, "./_descriptors": 79, "./_fails": 85, "./_global": 89, "./_hide": 91, "./_library": 108, "./_object-dp": 118, "./_object-gopn": 122, "./_redefine-all": 133, "./_set-to-string-tag": 138, "./_to-index": 147, "./_to-integer": 148, "./_to-length": 150, "./_typed": 155 }], 155: [function (t, e, i) { for (var a, s = t("./_global"), r = t("./_hide"), n = t("./_uid"), o = n("typed_array"), l = n("view"), d = !(!s.ArrayBuffer || !s.DataView), h = d, c = 0, u = "Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(","); c < 9;)(a = s[u[c++]]) ? (r(a.prototype, o, !0), r(a.prototype, l, !0)) : h = !1; e.exports = { ABV: d, CONSTR: h, TYPED: o, VIEW: l } }, { "./_global": 89, "./_hide": 91, "./_uid": 156 }], 156: [function (t, e, i) { var a = 0, s = Math.random(); e.exports = function (t) { return "Symbol(".concat(void 0 === t ? "" : t, ")_", (++a + s).toString(36)) } }, {}], 157: [function (t, e, i) { var a = t("./_global").navigator; e.exports = a && a.userAgent || "" }, { "./_global": 89 }], 158: [function (t, e, i) { var a = t("./_is-object"); e.exports = function (t, e) { if (!a(t) || t._t !== e) throw TypeError("Incompatible receiver, " + e + " required!"); return t } }, { "./_is-object": 100 }], 159: [function (t, e, i) { var a = t("./_global"), s = t("./_core"), r = t("./_library"), n = t("./_wks-ext"), o = t("./_object-dp").f; e.exports = function (t) { var e = s.Symbol || (s.Symbol = r ? {} : a.Symbol || {}); "_" == t.charAt(0) || t in e || o(e, t, { value: n.f(t) }) } }, { "./_core": 75, "./_global": 89, "./_library": 108, "./_object-dp": 118, "./_wks-ext": 160 }], 160: [function (t, e, i) { i.f = t("./_wks") }, { "./_wks": 161 }], 161: [function (t, e, i) { var a = t("./_shared")("wks"), s = t("./_uid"), r = t("./_global").Symbol, n = "function" == typeof r; (e.exports = function (t) { return a[t] || (a[t] = n && r[t] || (n ? r : s)("Symbol." + t)) }).store = a }, { "./_global": 89, "./_shared": 140, "./_uid": 156 }], 162: [function (t, e, i) { var a = t("./_classof"), s = t("./_wks")("iterator"), r = t("./_iterators"); e.exports = t("./_core").getIteratorMethod = function (t) { if (null != t) return t[s] || t["@@iterator"] || r[a(t)] } }, { "./_classof": 70, "./_core": 75, "./_iterators": 107, "./_wks": 161 }], 163: [function (t, e, i) { var a = t("./_export"); a(a.P, "Array", { copyWithin: t("./_array-copy-within") }), t("./_add-to-unscopables")("copyWithin") }, { "./_add-to-unscopables": 60, "./_array-copy-within": 63, "./_export": 83 }], 164: [function (t, e, i) { var a = t("./_export"); a(a.P, "Array", { fill: t("./_array-fill") }), t("./_add-to-unscopables")("fill") }, { "./_add-to-unscopables": 60, "./_array-fill": 64, "./_export": 83 }], 165: [function (t, e, i) { "use strict"; var a = t("./_export"), s = t("./_array-methods")(6), r = "findIndex", n = !0; r in [] && Array(1)[r](function () { n = !1 }), a(a.P + a.F * n, "Array", { findIndex: function (t) { return s(this, t, 1 < arguments.length ? arguments[1] : void 0) } }), t("./_add-to-unscopables")(r) }, { "./_add-to-unscopables": 60, "./_array-methods": 66, "./_export": 83 }], 166: [function (t, e, i) { "use strict"; var a = t("./_export"), s = t("./_array-methods")(5), r = !0; "find" in [] && Array(1).find(function () { r = !1 }), a(a.P + a.F * r, "Array", { find: function (t) { return s(this, t, 1 < arguments.length ? arguments[1] : void 0) } }), t("./_add-to-unscopables")("find") }, { "./_add-to-unscopables": 60, "./_array-methods": 66, "./_export": 83 }], 167: [function (t, e, i) { "use strict"; var u = t("./_ctx"), a = t("./_export"), f = t("./_to-object"), p = t("./_iter-call"), m = t("./_is-array-iter"), v = t("./_to-length"), g = t("./_create-property"), y = t("./core.get-iterator-method"); a(a.S + a.F * !t("./_iter-detect")(function (t) { Array.from(t) }), "Array", { from: function (t) { var e, i, a, s, r = f(t), n = "function" == typeof this ? this : Array, o = arguments.length, l = 1 < o ? arguments[1] : void 0, d = void 0 !== l, h = 0, c = y(r); if (d && (l = u(l, 2 < o ? arguments[2] : void 0, 2)), null == c || n == Array && m(c)) for (i = new n(e = v(r.length)); h < e; h++)g(i, h, d ? l(r[h], h) : r[h]); else for (s = c.call(r), i = new n; !(a = s.next()).done; h++)g(i, h, d ? p(s, l, [a.value, h], !0) : a.value); return i.length = h, i } }) }, { "./_create-property": 76, "./_ctx": 77, "./_export": 83, "./_is-array-iter": 97, "./_iter-call": 102, "./_iter-detect": 105, "./_to-length": 150, "./_to-object": 151, "./core.get-iterator-method": 162 }], 168: [function (t, e, i) { "use strict"; var a = t("./_add-to-unscopables"), s = t("./_iter-step"), r = t("./_iterators"), n = t("./_to-iobject"); e.exports = t("./_iter-define")(Array, "Array", function (t, e) { this._t = n(t), this._i = 0, this._k = e }, function () { var t = this._t, e = this._k, i = this._i++; return !t || i >= t.length ? (this._t = void 0, s(1)) : s(0, "keys" == e ? i : "values" == e ? t[i] : [i, t[i]]) }, "values"), r.Arguments = r.Array, a("keys"), a("values"), a("entries") }, { "./_add-to-unscopables": 60, "./_iter-define": 104, "./_iter-step": 106, "./_iterators": 107, "./_to-iobject": 149 }], 169: [function (t, e, i) { "use strict"; var a = t("./_export"), s = t("./_create-property"); a(a.S + a.F * t("./_fails")(function () { function t() { } return !(Array.of.call(t) instanceof t) }), "Array", { of: function () { for (var t = 0, e = arguments.length, i = new ("function" == typeof this ? this : Array)(e); t < e;)s(i, t, arguments[t++]); return i.length = e, i } }) }, { "./_create-property": 76, "./_export": 83, "./_fails": 85 }], 170: [function (t, e, i) { var a = t("./_object-dp").f, s = Function.prototype, r = /^\s*function ([^ (]*)/; "name" in s || t("./_descriptors") && a(s, "name", { configurable: !0, get: function () { try { return ("" + this).match(r)[1] } catch (t) { return "" } } }) }, { "./_descriptors": 79, "./_object-dp": 118 }], 171: [function (t, e, i) { "use strict"; var a = t("./_collection-strong"), s = t("./_validate-collection"); e.exports = t("./_collection")("Map", function (t) { return function () { return t(this, 0 < arguments.length ? arguments[0] : void 0) } }, { get: function (t) { var e = a.getEntry(s(this, "Map"), t); return e && e.v }, set: function (t, e) { return a.def(s(this, "Map"), 0 === t ? 0 : t, e) } }, a, !0) }, { "./_collection": 74, "./_collection-strong": 72, "./_validate-collection": 158 }], 172: [function (t, e, i) { var a = t("./_export"), s = t("./_math-log1p"), r = Math.sqrt, n = Math.acosh; a(a.S + a.F * !(n && 710 == Math.floor(n(Number.MAX_VALUE)) && n(1 / 0) == 1 / 0), "Math", { acosh: function (t) { return (t = +t) < 1 ? NaN : 94906265.62425156 < t ? Math.log(t) + Math.LN2 : s(t - 1 + r(t - 1) * r(t + 1)) } }) }, { "./_export": 83, "./_math-log1p": 111 }], 173: [function (t, e, i) { var a = t("./_export"), s = Math.asinh; a(a.S + a.F * !(s && 0 < 1 / s(0)), "Math", { asinh: function t(e) { return isFinite(e = +e) && 0 != e ? e < 0 ? -t(-e) : Math.log(e + Math.sqrt(e * e + 1)) : e } }) }, { "./_export": 83 }], 174: [function (t, e, i) { var a = t("./_export"), s = Math.atanh; a(a.S + a.F * !(s && 1 / s(-0) < 0), "Math", { atanh: function (t) { return 0 == (t = +t) ? t : Math.log((1 + t) / (1 - t)) / 2 } }) }, { "./_export": 83 }], 175: [function (t, e, i) { var a = t("./_export"), s = t("./_math-sign"); a(a.S, "Math", { cbrt: function (t) { return s(t = +t) * Math.pow(Math.abs(t), 1 / 3) } }) }, { "./_export": 83, "./_math-sign": 112 }], 176: [function (t, e, i) { var a = t("./_export"); a(a.S, "Math", { clz32: function (t) { return (t >>>= 0) ? 31 - Math.floor(Math.log(t + .5) * Math.LOG2E) : 32 } }) }, { "./_export": 83 }], 177: [function (t, e, i) { var a = t("./_export"), s = Math.exp; a(a.S, "Math", { cosh: function (t) { return (s(t = +t) + s(-t)) / 2 } }) }, { "./_export": 83 }], 178: [function (t, e, i) { var a = t("./_export"), s = t("./_math-expm1"); a(a.S + a.F * (s != Math.expm1), "Math", { expm1: s }) }, { "./_export": 83, "./_math-expm1": 109 }], 179: [function (t, e, i) { var a = t("./_export"); a(a.S, "Math", { fround: t("./_math-fround") }) }, { "./_export": 83, "./_math-fround": 110 }], 180: [function (t, e, i) { var a = t("./_export"), l = Math.abs; a(a.S, "Math", { hypot: function (t, e) { for (var i, a, s = 0, r = 0, n = arguments.length, o = 0; r < n;)o < (i = l(arguments[r++])) ? (s = s * (a = o / i) * a + 1, o = i) : s += 0 < i ? (a = i / o) * a : i; return o === 1 / 0 ? 1 / 0 : o * Math.sqrt(s) } }) }, { "./_export": 83 }], 181: [function (t, e, i) { var a = t("./_export"), s = Math.imul; a(a.S + a.F * t("./_fails")(function () { return -5 != s(4294967295, 5) || 2 != s.length }), "Math", { imul: function (t, e) { var i = +t, a = +e, s = 65535 & i, r = 65535 & a; return 0 | s * r + ((65535 & i >>> 16) * r + s * (65535 & a >>> 16) << 16 >>> 0) } }) }, { "./_export": 83, "./_fails": 85 }], 182: [function (t, e, i) { var a = t("./_export"); a(a.S, "Math", { log10: function (t) { return Math.log(t) * Math.LOG10E } }) }, { "./_export": 83 }], 183: [function (t, e, i) { var a = t("./_export"); a(a.S, "Math", { log1p: t("./_math-log1p") }) }, { "./_export": 83, "./_math-log1p": 111 }], 184: [function (t, e, i) { var a = t("./_export"); a(a.S, "Math", { log2: function (t) { return Math.log(t) / Math.LN2 } }) }, { "./_export": 83 }], 185: [function (t, e, i) { var a = t("./_export"); a(a.S, "Math", { sign: t("./_math-sign") }) }, { "./_export": 83, "./_math-sign": 112 }], 186: [function (t, e, i) { var a = t("./_export"), s = t("./_math-expm1"), r = Math.exp; a(a.S + a.F * t("./_fails")(function () { return -2e-17 != !Math.sinh(-2e-17) }), "Math", { sinh: function (t) { return Math.abs(t = +t) < 1 ? (s(t) - s(-t)) / 2 : (r(t - 1) - r(-t - 1)) * (Math.E / 2) } }) }, { "./_export": 83, "./_fails": 85, "./_math-expm1": 109 }], 187: [function (t, e, i) { var a = t("./_export"), s = t("./_math-expm1"), r = Math.exp; a(a.S, "Math", { tanh: function (t) { var e = s(t = +t), i = s(-t); return e == 1 / 0 ? 1 : i == 1 / 0 ? -1 : (e - i) / (r(t) + r(-t)) } }) }, { "./_export": 83, "./_math-expm1": 109 }], 188: [function (t, e, i) { var a = t("./_export"); a(a.S, "Math", { trunc: function (t) { return (0 < t ? Math.floor : Math.ceil)(t) } }) }, { "./_export": 83 }], 189: [function (t, e, i) { var a = t("./_export"); a(a.S, "Number", { EPSILON: Math.pow(2, -52) }) }, { "./_export": 83 }], 190: [function (t, e, i) { var a = t("./_export"), s = t("./_global").isFinite; a(a.S, "Number", { isFinite: function (t) { return "number" == typeof t && s(t) } }) }, { "./_export": 83, "./_global": 89 }], 191: [function (t, e, i) { var a = t("./_export"); a(a.S, "Number", { isInteger: t("./_is-integer") }) }, { "./_export": 83, "./_is-integer": 99 }], 192: [function (t, e, i) { var a = t("./_export"); a(a.S, "Number", { isNaN: function (t) { return t != t } }) }, { "./_export": 83 }], 193: [function (t, e, i) { var a = t("./_export"), s = t("./_is-integer"), r = Math.abs; a(a.S, "Number", { isSafeInteger: function (t) { return s(t) && r(t) <= 9007199254740991 } }) }, { "./_export": 83, "./_is-integer": 99 }], 194: [function (t, e, i) { var a = t("./_export"); a(a.S, "Number", { MAX_SAFE_INTEGER: 9007199254740991 }) }, { "./_export": 83 }], 195: [function (t, e, i) { var a = t("./_export"); a(a.S, "Number", { MIN_SAFE_INTEGER: -9007199254740991 }) }, { "./_export": 83 }], 196: [function (t, e, i) { var a = t("./_export"); a(a.S + a.F, "Object", { assign: t("./_object-assign") }) }, { "./_export": 83, "./_object-assign": 116 }], 197: [function (t, e, i) { var a = t("./_is-object"), s = t("./_meta").onFreeze; t("./_object-sap")("freeze", function (e) { return function (t) { return e && a(t) ? e(s(t)) : t } }) }, { "./_is-object": 100, "./_meta": 113, "./_object-sap": 128 }], 198: [function (t, e, i) { var a = t("./_to-iobject"), s = t("./_object-gopd").f; t("./_object-sap")("getOwnPropertyDescriptor", function () { return function (t, e) { return s(a(t), e) } }) }, { "./_object-gopd": 120, "./_object-sap": 128, "./_to-iobject": 149 }], 199: [function (t, e, i) { t("./_object-sap")("getOwnPropertyNames", function () { return t("./_object-gopn-ext").f }) }, { "./_object-gopn-ext": 121, "./_object-sap": 128 }], 200: [function (t, e, i) { var a = t("./_to-object"), s = t("./_object-gpo"); t("./_object-sap")("getPrototypeOf", function () { return function (t) { return s(a(t)) } }) }, { "./_object-gpo": 124, "./_object-sap": 128, "./_to-object": 151 }], 201: [function (t, e, i) { var a = t("./_is-object"); t("./_object-sap")("isExtensible", function (e) { return function (t) { return !!a(t) && (!e || e(t)) } }) }, { "./_is-object": 100, "./_object-sap": 128 }], 202: [function (t, e, i) { var a = t("./_is-object"); t("./_object-sap")("isFrozen", function (e) { return function (t) { return !a(t) || !!e && e(t) } }) }, { "./_is-object": 100, "./_object-sap": 128 }], 203: [function (t, e, i) { var a = t("./_is-object"); t("./_object-sap")("isSealed", function (e) { return function (t) { return !a(t) || !!e && e(t) } }) }, { "./_is-object": 100, "./_object-sap": 128 }], 204: [function (t, e, i) { var a = t("./_export"); a(a.S, "Object", { is: t("./_same-value") }) }, { "./_export": 83, "./_same-value": 135 }], 205: [function (t, e, i) { var a = t("./_to-object"), s = t("./_object-keys"); t("./_object-sap")("keys", function () { return function (t) { return s(a(t)) } }) }, { "./_object-keys": 126, "./_object-sap": 128, "./_to-object": 151 }], 206: [function (t, e, i) { var a = t("./_is-object"), s = t("./_meta").onFreeze; t("./_object-sap")("preventExtensions", function (e) { return function (t) { return e && a(t) ? e(s(t)) : t } }) }, { "./_is-object": 100, "./_meta": 113, "./_object-sap": 128 }], 207: [function (t, e, i) { var a = t("./_is-object"), s = t("./_meta").onFreeze; t("./_object-sap")("seal", function (e) { return function (t) { return e && a(t) ? e(s(t)) : t } }) }, { "./_is-object": 100, "./_meta": 113, "./_object-sap": 128 }], 208: [function (t, e, i) { var a = t("./_export"); a(a.S, "Object", { setPrototypeOf: t("./_set-proto").set }) }, { "./_export": 83, "./_set-proto": 136 }], 209: [function (i, t, e) { "use strict"; var a, s, r, n, o = i("./_library"), l = i("./_global"), d = i("./_ctx"), h = i("./_classof"), c = i("./_export"), u = i("./_is-object"), f = i("./_a-function"), p = i("./_an-instance"), m = i("./_for-of"), v = i("./_species-constructor"), g = i("./_task").set, y = i("./_microtask")(), b = i("./_new-promise-capability"), S = i("./_perform"), E = i("./_user-agent"), A = i("./_promise-resolve"), C = "Promise", k = l.TypeError, w = l.process, P = w && w.versions, _ = P && P.v8 || "", L = l[C], T = "process" == h(w), I = function () { }, M = s = b.f, x = !!function () { try { var t = L.resolve(1), e = (t.constructor = {})[i("./_wks")("species")] = function (t) { t(I, I) }; return (T || "function" == typeof PromiseRejectionEvent) && t.then(I) instanceof e && 0 !== _.indexOf("6.6") && -1 === E.indexOf("Chrome/66") } catch (t) { } }(), D = function (t) { var e; return !(!u(t) || "function" != typeof (e = t.then)) && e }, R = function (h, i) { if (!h._n) { h._n = !0; var a = h._c; y(function () { for (var l = h._v, d = 1 == h._s, t = 0, e = function (t) { var e, i, a, s = d ? t.ok : t.fail, r = t.resolve, n = t.reject, o = t.domain; try { s ? (d || (2 == h._h && V(h), h._h = 1), !0 === s ? e = l : (o && o.enter(), e = s(l), o && (o.exit(), a = !0)), e === t.promise ? n(k("Promise-chain cycle")) : (i = D(e)) ? i.call(e, r, n) : r(e)) : n(l) } catch (t) { o && !a && o.exit(), n(t) } }; a.length > t;)e(a[t++]); h._c = [], h._n = !1, i && !h._h && O(h) }) } }, O = function (r) { g.call(l, function () { var t, e, i, a = r._v, s = j(r); if (s && (t = S(function () { T ? w.emit("unhandledRejection", a, r) : (e = l.onunhandledrejection) ? e({ promise: r, reason: a }) : (i = l.console) && i.error && i.error("Unhandled promise rejection", a) }), r._h = T || j(r) ? 2 : 1), r._a = void 0, s && t.e) throw t.v }) }, j = function (t) { return 1 !== t._h && 0 === (t._a || t._c).length }, V = function (e) { g.call(l, function () { var t; T ? w.emit("rejectionHandled", e) : (t = l.onrejectionhandled) && t({ promise: e, reason: e._v }) }) }, F = function (t) { var e = this; e._d || (e._d = !0, (e = e._w || e)._v = t, e._s = 2, e._a || (e._a = e._c.slice()), R(e, !0)) }, N = function (t) { var i, a = this; if (!a._d) { a._d = !0, a = a._w || a; try { if (a === t) throw k("Promise can't be resolved itself"); (i = D(t)) ? y(function () { var e = { _w: a, _d: !1 }; try { i.call(t, d(N, e, 1), d(F, e, 1)) } catch (t) { F.call(e, t) } }) : (a._v = t, a._s = 1, R(a, !1)) } catch (t) { F.call({ _w: a, _d: !1 }, t) } } }; x || (L = function (t) { p(this, L, C, "_h"), f(t), a.call(this); try { t(d(N, this, 1), d(F, this, 1)) } catch (t) { F.call(this, t) } }, (a = function (t) { this._c = [], this._a = void 0, this._s = 0, this._d = !1, this._v = void 0, this._h = 0, this._n = !1 }).prototype = i("./_redefine-all")(L.prototype, { then: function (t, e) { var i = M(v(this, L)); return i.ok = "function" != typeof t || t, i.fail = "function" == typeof e && e, i.domain = T ? w.domain : void 0, this._c.push(i), this._a && this._a.push(i), this._s && R(this, !1), i.promise }, catch: function (t) { return this.then(void 0, t) } }), r = function () { var t = new a; this.promise = t, this.resolve = d(N, t, 1), this.reject = d(F, t, 1) }, b.f = M = function (t) { return t === L || t === n ? new r(t) : s(t) }), c(c.G + c.W + c.F * !x, { Promise: L }), i("./_set-to-string-tag")(L, C), i("./_set-species")(C), n = i("./_core")[C], c(c.S + c.F * !x, C, { reject: function (t) { var e = M(this); return (0, e.reject)(t), e.promise } }), c(c.S + c.F * (o || !x), C, { resolve: function (t) { return A(o && this === n ? L : this, t) } }), c(c.S + c.F * !(x && i("./_iter-detect")(function (t) { L.all(t).catch(I) })), C, { all: function (t) { var n = this, e = M(n), o = e.resolve, l = e.reject, i = S(function () { var a = [], s = 0, r = 1; m(t, !1, function (t) { var e = s++, i = !1; a.push(void 0), r++ , n.resolve(t).then(function (t) { i || (i = !0, a[e] = t, --r || o(a)) }, l) }), --r || o(a) }); return i.e && l(i.v), e.promise }, race: function (t) { var e = this, i = M(e), a = i.reject, s = S(function () { m(t, !1, function (t) { e.resolve(t).then(i.resolve, a) }) }); return s.e && a(s.v), i.promise } }) }, { "./_a-function": 59, "./_an-instance": 61, "./_classof": 70, "./_core": 75, "./_ctx": 77, "./_export": 83, "./_for-of": 88, "./_global": 89, "./_is-object": 100, "./_iter-detect": 105, "./_library": 108, "./_microtask": 114, "./_new-promise-capability": 115, "./_perform": 130, "./_promise-resolve": 131, "./_redefine-all": 133, "./_set-species": 137, "./_set-to-string-tag": 138, "./_species-constructor": 141, "./_task": 145, "./_user-agent": 157, "./_wks": 161 }], 210: [function (t, e, i) { var a = t("./_export"), r = t("./_a-function"), n = t("./_an-object"), o = (t("./_global").Reflect || {}).apply, l = Function.apply; a(a.S + a.F * !t("./_fails")(function () { o(function () { }) }), "Reflect", { apply: function (t, e, i) { var a = r(t), s = n(i); return o ? o(a, e, s) : l.call(a, e, s) } }) }, { "./_a-function": 59, "./_an-object": 62, "./_export": 83, "./_fails": 85, "./_global": 89 }], 211: [function (t, e, i) { var a = t("./_export"), o = t("./_object-create"), l = t("./_a-function"), d = t("./_an-object"), h = t("./_is-object"), s = t("./_fails"), c = t("./_bind"), u = (t("./_global").Reflect || {}).construct, f = s(function () { function t() { } return !(u(function () { }, [], t) instanceof t) }), p = !s(function () { u(function () { }) }); a(a.S + a.F * (f || p), "Reflect", { construct: function (t, e) { l(t), d(e); var i = arguments.length < 3 ? t : l(arguments[2]); if (p && !f) return u(t, e, i); if (t == i) { switch (e.length) { case 0: return new t; case 1: return new t(e[0]); case 2: return new t(e[0], e[1]); case 3: return new t(e[0], e[1], e[2]); case 4: return new t(e[0], e[1], e[2], e[3]) }var a = [null]; return a.push.apply(a, e), new (c.apply(t, a)) } var s = i.prototype, r = o(h(s) ? s : Object.prototype), n = Function.apply.call(t, r, e); return h(n) ? n : r } }) }, { "./_a-function": 59, "./_an-object": 62, "./_bind": 69, "./_export": 83, "./_fails": 85, "./_global": 89, "./_is-object": 100, "./_object-create": 117 }], 212: [function (t, e, i) { var a = t("./_object-dp"), s = t("./_export"), r = t("./_an-object"), n = t("./_to-primitive"); s(s.S + s.F * t("./_fails")(function () { Reflect.defineProperty(a.f({}, 1, { value: 1 }), 1, { value: 2 }) }), "Reflect", { defineProperty: function (t, e, i) { r(t), e = n(e, !0), r(i); try { return a.f(t, e, i), !0 } catch (t) { return !1 } } }) }, { "./_an-object": 62, "./_export": 83, "./_fails": 85, "./_object-dp": 118, "./_to-primitive": 152 }], 213: [function (t, e, i) { var a = t("./_export"), s = t("./_object-gopd").f, r = t("./_an-object"); a(a.S, "Reflect", { deleteProperty: function (t, e) { var i = s(r(t), e); return !(i && !i.configurable) && delete t[e] } }) }, { "./_an-object": 62, "./_export": 83, "./_object-gopd": 120 }], 214: [function (t, e, i) { var a = t("./_object-gopd"), s = t("./_export"), r = t("./_an-object"); s(s.S, "Reflect", { getOwnPropertyDescriptor: function (t, e) { return a.f(r(t), e) } }) }, { "./_an-object": 62, "./_export": 83, "./_object-gopd": 120 }], 215: [function (t, e, i) { var a = t("./_export"), s = t("./_object-gpo"), r = t("./_an-object"); a(a.S, "Reflect", { getPrototypeOf: function (t) { return s(r(t)) } }) }, { "./_an-object": 62, "./_export": 83, "./_object-gpo": 124 }], 216: [function (t, e, i) { var n = t("./_object-gopd"), o = t("./_object-gpo"), l = t("./_has"), a = t("./_export"), d = t("./_is-object"), h = t("./_an-object"); a(a.S, "Reflect", { get: function t(e, i) { var a, s, r = arguments.length < 3 ? e : arguments[2]; return h(e) === r ? e[i] : (a = n.f(e, i)) ? l(a, "value") ? a.value : void 0 !== a.get ? a.get.call(r) : void 0 : d(s = o(e)) ? t(s, i, r) : void 0 } }) }, { "./_an-object": 62, "./_export": 83, "./_has": 90, "./_is-object": 100, "./_object-gopd": 120, "./_object-gpo": 124 }], 217: [function (t, e, i) { var a = t("./_export"); a(a.S, "Reflect", { has: function (t, e) { return e in t } }) }, { "./_export": 83 }], 218: [function (t, e, i) { var a = t("./_export"), s = t("./_an-object"), r = Object.isExtensible; a(a.S, "Reflect", { isExtensible: function (t) { return s(t), !r || r(t) } }) }, { "./_an-object": 62, "./_export": 83 }], 219: [function (t, e, i) { var a = t("./_export"); a(a.S, "Reflect", { ownKeys: t("./_own-keys") }) }, { "./_export": 83, "./_own-keys": 129 }], 220: [function (t, e, i) { var a = t("./_export"), s = t("./_an-object"), r = Object.preventExtensions; a(a.S, "Reflect", { preventExtensions: function (t) { s(t); try { return r && r(t), !0 } catch (t) { return !1 } } }) }, { "./_an-object": 62, "./_export": 83 }], 221: [function (t, e, i) { var a = t("./_export"), s = t("./_set-proto"); s && a(a.S, "Reflect", { setPrototypeOf: function (t, e) { s.check(t, e); try { return s.set(t, e), !0 } catch (t) { return !1 } } }) }, { "./_export": 83, "./_set-proto": 136 }], 222: [function (t, e, i) { var l = t("./_object-dp"), d = t("./_object-gopd"), h = t("./_object-gpo"), c = t("./_has"), a = t("./_export"), u = t("./_property-desc"), f = t("./_an-object"), p = t("./_is-object"); a(a.S, "Reflect", { set: function t(e, i, a) { var s, r, n = arguments.length < 4 ? e : arguments[3], o = d.f(f(e), i); if (!o) { if (p(r = h(e))) return t(r, i, a, n); o = u(0) } if (c(o, "value")) { if (!1 === o.writable || !p(n)) return !1; if (s = d.f(n, i)) { if (s.get || s.set || !1 === s.writable) return !1; s.value = a, l.f(n, i, s) } else l.f(n, i, u(0, a)); return !0 } return void 0 !== o.set && (o.set.call(n, a), !0) } }) }, { "./_an-object": 62, "./_export": 83, "./_has": 90, "./_is-object": 100, "./_object-dp": 118, "./_object-gopd": 120, "./_object-gpo": 124, "./_property-desc": 132 }], 223: [function (t, e, i) { t("./_descriptors") && "g" != /./g.flags && t("./_object-dp").f(RegExp.prototype, "flags", { configurable: !0, get: t("./_flags") }) }, { "./_descriptors": 79, "./_flags": 87, "./_object-dp": 118 }], 224: [function (t, e, i) { t("./_fix-re-wks")("match", 1, function (a, s, t) { return [function (t) { "use strict"; var e = a(this), i = null == t ? void 0 : t[s]; return void 0 !== i ? i.call(t, e) : new RegExp(t)[s](String(e)) }, t] }) }, { "./_fix-re-wks": 86 }], 225: [function (t, e, i) { t("./_fix-re-wks")("replace", 2, function (s, r, n) { return [function (t, e) { "use strict"; var i = s(this), a = null == t ? void 0 : t[r]; return void 0 !== a ? a.call(t, i, e) : n.call(String(i), t, e) }, n] }) }, { "./_fix-re-wks": 86 }], 226: [function (t, e, i) { t("./_fix-re-wks")("search", 1, function (a, s, t) { return [function (t) { "use strict"; var e = a(this), i = null == t ? void 0 : t[s]; return void 0 !== i ? i.call(t, e) : new RegExp(t)[s](String(e)) }, t] }) }, { "./_fix-re-wks": 86 }], 227: [function (e, t, i) { e("./_fix-re-wks")("split", 2, function (s, r, n) { "use strict"; var f = e("./_is-regexp"), p = n, m = [].push, t = "split", v = "length"; if ("c" == "abbc"[t](/(b)*/)[1] || 4 != "test"[t](/(?:)/, -1)[v] || 2 != "ab"[t](/(?:ab)*/)[v] || 4 != "."[t](/(.?)(.?)/)[v] || 1 < "."[t](/()()/)[v] || ""[t](/.?/)[v]) { var g = void 0 === /()??/.exec("")[1]; n = function (t, e) { var i = String(this); if (void 0 === t && 0 === e) return []; if (!f(t)) return p.call(i, t, e); var a, s, r, n, o, l = [], d = (t.ignoreCase ? "i" : "") + (t.multiline ? "m" : "") + (t.unicode ? "u" : "") + (t.sticky ? "y" : ""), h = 0, c = void 0 === e ? 4294967295 : e >>> 0, u = new RegExp(t.source, d + "g"); for (g || (a = new RegExp("^" + u.source + "$(?!\\s)", d)); (s = u.exec(i)) && !(h < (r = s.index + s[0][v]) && (l.push(i.slice(h, s.index)), !g && 1 < s[v] && s[0].replace(a, function () { for (o = 1; o < arguments[v] - 2; o++)void 0 === arguments[o] && (s[o] = void 0) }), 1 < s[v] && s.index < i[v] && m.apply(l, s.slice(1)), n = s[0][v], h = r, l[v] >= c));)u.lastIndex === s.index && u.lastIndex++; return h === i[v] ? !n && u.test("") || l.push("") : l.push(i.slice(h)), l[v] > c ? l.slice(0, c) : l } } else "0"[t](void 0, 0)[v] && (n = function (t, e) { return void 0 === t && 0 === e ? [] : p.call(this, t, e) }); return [function (t, e) { var i = s(this), a = null == t ? void 0 : t[r]; return void 0 !== a ? a.call(t, i, e) : n.call(String(i), t, e) }, n] }) }, { "./_fix-re-wks": 86, "./_is-regexp": 101 }], 228: [function (t, e, i) { "use strict"; var a = t("./_collection-strong"), s = t("./_validate-collection"); e.exports = t("./_collection")("Set", function (t) { return function () { return t(this, 0 < arguments.length ? arguments[0] : void 0) } }, { add: function (t) { return a.def(s(this, "Set"), t = 0 === t ? 0 : t, t) } }, a) }, { "./_collection": 74, "./_collection-strong": 72, "./_validate-collection": 158 }], 229: [function (t, e, i) { "use strict"; var a = t("./_export"), s = t("./_string-at")(!1); a(a.P, "String", { codePointAt: function (t) { return s(this, t) } }) }, { "./_export": 83, "./_string-at": 142 }], 230: [function (t, e, i) { "use strict"; var a = t("./_export"), n = t("./_to-length"), o = t("./_string-context"), l = "endsWith", d = ""[l]; a(a.P + a.F * t("./_fails-is-regexp")(l), "String", { endsWith: function (t) { var e = o(this, t, l), i = 1 < arguments.length ? arguments[1] : void 0, a = n(e.length), s = void 0 === i ? a : Math.min(n(i), a), r = String(t); return d ? d.call(e, r, s) : e.slice(s - r.length, s) === r } }) }, { "./_export": 83, "./_fails-is-regexp": 84, "./_string-context": 143, "./_to-length": 150 }], 231: [function (t, e, i) { var a = t("./_export"), r = t("./_to-absolute-index"), n = String.fromCharCode, s = String.fromCodePoint; a(a.S + a.F * (!!s && 1 != s.length), "String", { fromCodePoint: function (t) { for (var e, i = [], a = arguments.length, s = 0; s < a;) { if (e = +arguments[s++], r(e, 1114111) !== e) throw RangeError(e + " is not a valid code point"); i.push(e < 65536 ? n(e) : n(55296 + ((e -= 65536) >> 10), e % 1024 + 56320)) } return i.join("") } }) }, { "./_export": 83, "./_to-absolute-index": 146 }], 232: [function (t, e, i) { "use strict"; var a = t("./_export"), s = t("./_string-context"); a(a.P + a.F * t("./_fails-is-regexp")("includes"), "String", { includes: function (t) { return !!~s(this, t, "includes").indexOf(t, 1 < arguments.length ? arguments[1] : void 0) } }) }, { "./_export": 83, "./_fails-is-regexp": 84, "./_string-context": 143 }], 233: [function (t, e, i) { var a = t("./_export"), n = t("./_to-iobject"), o = t("./_to-length"); a(a.S, "String", { raw: function (t) { for (var e = n(t.raw), i = o(e.length), a = arguments.length, s = [], r = 0; r < i;)s.push(String(e[r++])), r < a && s.push(String(arguments[r])); return s.join("") } }) }, { "./_export": 83, "./_to-iobject": 149, "./_to-length": 150 }], 234: [function (t, e, i) { var a = t("./_export"); a(a.P, "String", { repeat: t("./_string-repeat") }) }, { "./_export": 83, "./_string-repeat": 144 }], 235: [function (t, e, i) { "use strict"; var a = t("./_export"), s = t("./_to-length"), r = t("./_string-context"), n = "startsWith", o = ""[n]; a(a.P + a.F * t("./_fails-is-regexp")(n), "String", { startsWith: function (t) { var e = r(this, t, n), i = s(Math.min(1 < arguments.length ? arguments[1] : void 0, e.length)), a = String(t); return o ? o.call(e, a, i) : e.slice(i, i + a.length) === a } }) }, { "./_export": 83, "./_fails-is-regexp": 84, "./_string-context": 143, "./_to-length": 150 }], 236: [function (t, e, i) { "use strict"; var a = t("./_global"), n = t("./_has"), s = t("./_descriptors"), r = t("./_export"), o = t("./_redefine"), l = t("./_meta").KEY, d = t("./_fails"), h = t("./_shared"), c = t("./_set-to-string-tag"), u = t("./_uid"), f = t("./_wks"), p = t("./_wks-ext"), m = t("./_wks-define"), v = t("./_enum-keys"), g = t("./_is-array"), y = t("./_an-object"), b = t("./_is-object"), S = t("./_to-iobject"), E = t("./_to-primitive"), A = t("./_property-desc"), C = t("./_object-create"), k = t("./_object-gopn-ext"), w = t("./_object-gopd"), P = t("./_object-dp"), _ = t("./_object-keys"), L = w.f, T = P.f, I = k.f, M = a.Symbol, x = a.JSON, D = x && x.stringify, R = "prototype", O = f("_hidden"), j = f("toPrimitive"), V = {}.propertyIsEnumerable, F = h("symbol-registry"), N = h("symbols"), U = h("op-symbols"), B = Object[R], H = "function" == typeof M, W = a.QObject, q = !W || !W[R] || !W[R].findChild, J = s && d(function () { return 7 != C(T({}, "a", { get: function () { return T(this, "a", { value: 7 }).a } })).a }) ? function (t, e, i) { var a = L(B, e); a && delete B[e], T(t, e, i), a && t !== B && T(B, e, a) } : T, z = function (t) { var e = N[t] = C(M[R]); return e._k = t, e }, G = H && "symbol" == typeof M.iterator ? function (t) { return "symbol" == typeof t } : function (t) { return t instanceof M }, K = function (t, e, i) { return t === B && K(U, e, i), y(t), e = E(e, !0), y(i), n(N, e) ? (i.enumerable ? (n(t, O) && t[O][e] && (t[O][e] = !1), i = C(i, { enumerable: A(0, !1) })) : (n(t, O) || T(t, O, A(1, {})), t[O][e] = !0), J(t, e, i)) : T(t, e, i) }, Q = function (t, e) { y(t); for (var i, a = v(e = S(e)), s = 0, r = a.length; s < r;)K(t, i = a[s++], e[i]); return t }, Y = function (t) { var e = V.call(this, t = E(t, !0)); return !(this === B && n(N, t) && !n(U, t)) && (!(e || !n(this, t) || !n(N, t) || n(this, O) && this[O][t]) || e) }, X = function (t, e) { if (t = S(t), e = E(e, !0), t !== B || !n(N, e) || n(U, e)) { var i = L(t, e); return !i || !n(N, e) || n(t, O) && t[O][e] || (i.enumerable = !0), i } }, $ = function (t) { for (var e, i = I(S(t)), a = [], s = 0; i.length > s;)n(N, e = i[s++]) || e == O || e == l || a.push(e); return a }, Z = function (t) { for (var e, i = t === B, a = I(i ? U : S(t)), s = [], r = 0; a.length > r;)!n(N, e = a[r++]) || i && !n(B, e) || s.push(N[e]); return s }; H || (o((M = function () { if (this instanceof M) throw TypeError("Symbol is not a constructor!"); var e = u(0 < arguments.length ? arguments[0] : void 0), i = function (t) { this === B && i.call(U, t), n(this, O) && n(this[O], e) && (this[O][e] = !1), J(this, e, A(1, t)) }; return s && q && J(B, e, { configurable: !0, set: i }), z(e) })[R], "toString", function () { return this._k }), w.f = X, P.f = K, t("./_object-gopn").f = k.f = $, t("./_object-pie").f = Y, t("./_object-gops").f = Z, s && !t("./_library") && o(B, "propertyIsEnumerable", Y, !0), p.f = function (t) { return z(f(t)) }), r(r.G + r.W + r.F * !H, { Symbol: M }); for (var tt = "hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","), et = 0; tt.length > et;)f(tt[et++]); for (var it = _(f.store), at = 0; it.length > at;)m(it[at++]); r(r.S + r.F * !H, "Symbol", { for: function (t) { return n(F, t += "") ? F[t] : F[t] = M(t) }, keyFor: function (t) { if (!G(t)) throw TypeError(t + " is not a symbol!"); for (var e in F) if (F[e] === t) return e }, useSetter: function () { q = !0 }, useSimple: function () { q = !1 } }), r(r.S + r.F * !H, "Object", { create: function (t, e) { return void 0 === e ? C(t) : Q(C(t), e) }, defineProperty: K, defineProperties: Q, getOwnPropertyDescriptor: X, getOwnPropertyNames: $, getOwnPropertySymbols: Z }), x && r(r.S + r.F * (!H || d(function () { var t = M(); return "[null]" != D([t]) || "{}" != D({ a: t }) || "{}" != D(Object(t)) })), "JSON", { stringify: function (t) { for (var e, i, a = [t], s = 1; arguments.length > s;)a.push(arguments[s++]); if (i = e = a[1], (b(e) || void 0 !== t) && !G(t)) return g(e) || (e = function (t, e) { if ("function" == typeof i && (e = i.call(this, t, e)), !G(e)) return e }), a[1] = e, D.apply(x, a) } }), M[R][j] || t("./_hide")(M[R], j, M[R].valueOf), c(M, "Symbol"), c(Math, "Math", !0), c(a.JSON, "JSON", !0) }, { "./_an-object": 62, "./_descriptors": 79, "./_enum-keys": 82, "./_export": 83, "./_fails": 85, "./_global": 89, "./_has": 90, "./_hide": 91, "./_is-array": 98, "./_is-object": 100, "./_library": 108, "./_meta": 113, "./_object-create": 117, "./_object-dp": 118, "./_object-gopd": 120, "./_object-gopn": 122, "./_object-gopn-ext": 121, "./_object-gops": 123, "./_object-keys": 126, "./_object-pie": 127, "./_property-desc": 132, "./_redefine": 134, "./_set-to-string-tag": 138, "./_shared": 140, "./_to-iobject": 149, "./_to-primitive": 152, "./_uid": 156, "./_wks": 161, "./_wks-define": 159, "./_wks-ext": 160 }], 237: [function (t, e, i) { "use strict"; var a = t("./_export"), s = t("./_typed"), r = t("./_typed-buffer"), d = t("./_an-object"), h = t("./_to-absolute-index"), c = t("./_to-length"), n = t("./_is-object"), o = t("./_global").ArrayBuffer, u = t("./_species-constructor"), f = r.ArrayBuffer, p = r.DataView, l = s.ABV && o.isView, m = f.prototype.slice, v = s.VIEW, g = "ArrayBuffer"; a(a.G + a.W + a.F * (o !== f), { ArrayBuffer: f }), a(a.S + a.F * !s.CONSTR, g, { isView: function (t) { return l && l(t) || n(t) && v in t } }), a(a.P + a.U + a.F * t("./_fails")(function () { return !new f(2).slice(1, void 0).byteLength }), g, { slice: function (t, e) { if (void 0 !== m && void 0 === e) return m.call(d(this), t); for (var i = d(this).byteLength, a = h(t, i), s = h(void 0 === e ? i : e, i), r = new (u(this, f))(c(s - a)), n = new p(this), o = new p(r), l = 0; a < s;)o.setUint8(l++, n.getUint8(a++)); return r } }), t("./_set-species")(g) }, { "./_an-object": 62, "./_export": 83, "./_fails": 85, "./_global": 89, "./_is-object": 100, "./_set-species": 137, "./_species-constructor": 141, "./_to-absolute-index": 146, "./_to-length": 150, "./_typed": 155, "./_typed-buffer": 154 }], 238: [function (t, e, i) { var a = t("./_export"); a(a.G + a.W + a.F * !t("./_typed").ABV, { DataView: t("./_typed-buffer").DataView }) }, { "./_export": 83, "./_typed": 155, "./_typed-buffer": 154 }], 239: [function (t, e, i) { t("./_typed-array")("Float32", 4, function (a) { return function (t, e, i) { return a(this, t, e, i) } }) }, { "./_typed-array": 153 }], 240: [function (t, e, i) { t("./_typed-array")("Float64", 8, function (a) { return function (t, e, i) { return a(this, t, e, i) } }) }, { "./_typed-array": 153 }], 241: [function (t, e, i) { t("./_typed-array")("Int16", 2, function (a) { return function (t, e, i) { return a(this, t, e, i) } }) }, { "./_typed-array": 153 }], 242: [function (t, e, i) { t("./_typed-array")("Int32", 4, function (a) { return function (t, e, i) { return a(this, t, e, i) } }) }, { "./_typed-array": 153 }], 243: [function (t, e, i) { t("./_typed-array")("Int8", 1, function (a) { return function (t, e, i) { return a(this, t, e, i) } }) }, { "./_typed-array": 153 }], 244: [function (t, e, i) { t("./_typed-array")("Uint16", 2, function (a) { return function (t, e, i) { return a(this, t, e, i) } }) }, { "./_typed-array": 153 }], 245: [function (t, e, i) { t("./_typed-array")("Uint32", 4, function (a) { return function (t, e, i) { return a(this, t, e, i) } }) }, { "./_typed-array": 153 }], 246: [function (t, e, i) { t("./_typed-array")("Uint8", 1, function (a) { return function (t, e, i) { return a(this, t, e, i) } }) }, { "./_typed-array": 153 }], 247: [function (t, e, i) { t("./_typed-array")("Uint8", 1, function (a) { return function (t, e, i) { return a(this, t, e, i) } }, !0) }, { "./_typed-array": 153 }], 248: [function (t, e, i) { "use strict"; var r, a = t("./_array-methods")(0), n = t("./_redefine"), s = t("./_meta"), o = t("./_object-assign"), l = t("./_collection-weak"), d = t("./_is-object"), h = t("./_fails"), c = t("./_validate-collection"), u = "WeakMap", f = s.getWeak, p = Object.isExtensible, m = l.ufstore, v = {}, g = function (t) { return function () { return t(this, 0 < arguments.length ? arguments[0] : void 0) } }, y = { get: function (t) { if (d(t)) { var e = f(t); return !0 === e ? m(c(this, u)).get(t) : e ? e[this._i] : void 0 } }, set: function (t, e) { return l.def(c(this, u), t, e) } }, b = e.exports = t("./_collection")(u, g, y, l, !0, !0); h(function () { return 7 != (new b).set((Object.freeze || Object)(v), 7).get(v) }) && (o((r = l.getConstructor(g, u)).prototype, y), s.NEED = !0, a(["delete", "has", "get", "set"], function (a) { var t = b.prototype, s = t[a]; n(t, a, function (t, e) { if (d(t) && !p(t)) { this._f || (this._f = new r); var i = this._f[a](t, e); return "set" == a ? this : i } return s.call(this, t, e) }) })) }, { "./_array-methods": 66, "./_collection": 74, "./_collection-weak": 73, "./_fails": 85, "./_is-object": 100, "./_meta": 113, "./_object-assign": 116, "./_redefine": 134, "./_validate-collection": 158 }], 249: [function (t, e, i) { "use strict"; var a = t("./_collection-weak"), s = t("./_validate-collection"); t("./_collection")("WeakSet", function (t) { return function () { return t(this, 0 < arguments.length ? arguments[0] : void 0) } }, { add: function (t) { return a.def(s(this, "WeakSet"), t, !0) } }, a, !1, !0) }, { "./_collection": 74, "./_collection-weak": 73, "./_validate-collection": 158 }], 250: [function (t, e, i) { for (var a = t("./es6.array.iterator"), s = t("./_object-keys"), r = t("./_redefine"), n = t("./_global"), o = t("./_hide"), l = t("./_iterators"), d = t("./_wks"), h = d("iterator"), c = d("toStringTag"), u = l.Array, f = { CSSRuleList: !0, CSSStyleDeclaration: !1, CSSValueList: !1, ClientRectList: !1, DOMRectList: !1, DOMStringList: !1, DOMTokenList: !0, DataTransferItemList: !1, FileList: !1, HTMLAllCollection: !1, HTMLCollection: !1, HTMLFormElement: !1, HTMLSelectElement: !1, MediaList: !0, MimeTypeArray: !1, NamedNodeMap: !1, NodeList: !0, PaintRequestList: !1, Plugin: !1, PluginArray: !1, SVGLengthList: !1, SVGNumberList: !1, SVGPathSegList: !1, SVGPointList: !1, SVGStringList: !1, SVGTransformList: !1, SourceBufferList: !1, StyleSheetList: !0, TextTrackCueList: !1, TextTrackList: !1, TouchList: !1 }, p = s(f), m = 0; m < p.length; m++) { var v, g = p[m], y = f[g], b = n[g], S = b && b.prototype; if (S && (S[h] || o(S, h, u), S[c] || o(S, c, g), l[g] = u, y)) for (v in a) S[v] || r(S, v, a[v], !0) } }, { "./_global": 89, "./_hide": 91, "./_iterators": 107, "./_object-keys": 126, "./_redefine": 134, "./_wks": 161, "./es6.array.iterator": 168 }], 251: [function (t, e, i) { var a = t("./_export"), s = t("./_task"); a(a.G + a.B, { setImmediate: s.set, clearImmediate: s.clear }) }, { "./_export": 83, "./_task": 145 }], 252: [function (t, e, i) { var a = t("./_global"), s = t("./_export"), r = t("./_user-agent"), n = [].slice, o = /MSIE .\./.test(r), l = function (s) { return function (t, e) { var i = 2 < arguments.length, a = !!i && n.call(arguments, 2); return s(i ? function () { ("function" == typeof t ? t : Function(t)).apply(this, a) } : t, e) } }; s(s.G + s.B + s.F * o, { setTimeout: l(a.setTimeout), setInterval: l(a.setInterval) }) }, { "./_export": 83, "./_global": 89, "./_user-agent": 157 }], 253: [function (t, e, i) {
        "use strict"; Object.defineProperty(i, "__esModule", { value: !0 });
        /**
         * @license Copyright (c) 2015-2018 Radiant Media Player 
         * rmp-connection 0.1.7 | https://github.com/radiantmediaplayer/rmp-connection
         */
        var a = {}, s = null; a.getBandwidthEstimate = function () { if ("undefined" == typeof window) return -1; if (void 0 !== navigator.onLine && !navigator.onLine) return -1; if (void 0 === navigator.connection) return -1; if ((s = "string" == typeof navigator.connection.type && "" !== navigator.connection.type ? navigator.connection.type : null) && "none" === s) return -1; if ("number" == typeof navigator.connection.downlink && 0 < navigator.connection.downlink) return navigator.connection.downlink; var t = function () { var t = [.025, .035, .35, 1.4]; if (s) switch (s) { case "bluetooth": case "cellular": t[3] = .7; break; case "ethernet": case "wifi": case "wimax": t[3] = 2.1 }return t }(); if ("string" == typeof navigator.connection.effectiveType && "" !== navigator.connection.effectiveType) switch (navigator.connection.effectiveType) { case "slow-2g": return t[0]; case "2g": return t[1]; case "3g": return t[2]; case "4g": return t[3] }if (s) switch (s) { case "ethernet": case "wifi": case "wimax": return 1.4; case "bluetooth": return .35 }return -1 }, i.default = a
    }, {}], 254: [function (t, e, i) {
        "use strict"; Object.defineProperty(i, "__esModule", { value: !0 });
        /**
         * @license Copyright (c) 2015-2018 Radiant Media Player 
         * rmp-connection 0.1.7 | https://github.com/radiantmediaplayer/rmp-connection
         */
        var a = {}, s = null; a.getBandwidthEstimate = function () { if ("undefined" == typeof window) return -1; if (void 0 !== navigator.onLine && !navigator.onLine) return -1; if (void 0 === navigator.connection) return -1; if ((s = "string" == typeof navigator.connection.type && "" !== navigator.connection.type ? navigator.connection.type : null) && "none" === s) return -1; if ("number" == typeof navigator.connection.downlink && 0 < navigator.connection.downlink) return navigator.connection.downlink; var t = function () { var t = [.025, .035, .35, 1.4]; if (s) switch (s) { case "bluetooth": case "cellular": t[3] = .7; break; case "ethernet": case "wifi": case "wimax": t[3] = 2.1 }return t }(); if ("string" == typeof navigator.connection.effectiveType && "" !== navigator.connection.effectiveType) switch (navigator.connection.effectiveType) { case "slow-2g": return t[0]; case "2g": return t[1]; case "3g": return t[2]; case "4g": return t[3] }if (s) switch (s) { case "ethernet": case "wifi": case "wimax": return 1.4; case "bluetooth": return .35 }return -1 }, i.default = a
    }, {}], 255: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a = l(t("../fw/fw")), s = l(t("../fw/env")), r = l(t("../players/vast-player")), n = l(t("../players/content-player")), o = l(t("../players/vpaid")); function l(t) { return t && t.__esModule ? t : { default: t } } var d = { attach: function (t) { t.prototype.play = function () { this.adOnStage && this.adIsLinear ? this.isVPAID ? o.default.resumeAd.call(this) : r.default.play.call(this) : n.default.play.call(this) }, t.prototype.pause = function () { this.adOnStage && this.adIsLinear ? this.isVPAID ? o.default.pauseAd.call(this) : r.default.pause.call(this) : n.default.pause.call(this) }, t.prototype.getAdPaused = function () { return !(!this.adOnStage || !this.adIsLinear) && (this.isVPAID ? o.default.getAdPaused.call(this) : this.vastPlayerPaused) }, t.prototype.setVolume = function (t) { if (a.default.isNumber(t)) { var e = 0; e = t < 0 ? 0 : 1 < t ? 1 : t, this.adOnStage && this.adIsLinear && (this.isVPAID && o.default.setAdVolume.call(this, e), r.default.setVolume.call(this, e)), n.default.setVolume.call(this, e) } }, t.prototype.getVolume = function () { return this.adOnStage && this.adIsLinear ? this.isVPAID ? o.default.getAdVolume.call(this) : r.default.getVolume.call(this) : n.default.getVolume.call(this) }, t.prototype.setMute = function (t) { "boolean" == typeof t && (this.adOnStage && this.adIsLinear && (this.isVPAID ? t ? o.default.setAdVolume.call(this, 0) : o.default.setAdVolume.call(this, 1) : r.default.setMute.call(this, t)), n.default.setMute.call(this, t)) }, t.prototype.getMute = function () { return this.adOnStage && this.adIsLinear ? this.isVPAID ? 0 === o.default.getAdVolume.call(this) : r.default.getMute.call(this) : n.default.getMute.call(this) }, t.prototype.stopAds = function () { this.adOnStage && (this.isVPAID ? o.default.stopAd.call(this) : r.default.resumeContent.call(this)) }, t.prototype.getAdTagUrl = function () { return this.adTagUrl }, t.prototype.getAdMediaUrl = function () { return this.adOnStage ? this.isVPAID ? o.default.getCreativeUrl.call(this) : this.adMediaUrl : null }, t.prototype.getAdLinear = function () { return this.adIsLinear }, t.prototype.getAdSystem = function () { return this.adSystem }, t.prototype.getAdContentType = function () { return this.adOnStage ? this.adIsLinear || this.isVPAID ? this.adContentType : this.nonLinearContentType : "" }, t.prototype.getAdTitle = function () { return this.adTitle }, t.prototype.getAdDescription = function () { return this.adDescription }, t.prototype.getAdDuration = function () { if (this.adOnStage && this.adIsLinear) { if (this.isVPAID) { var t = o.default.getAdDuration.call(this); return 0 < t && (t *= 1e3), t } return r.default.getDuration.call(this) } return -1 }, t.prototype.getAdCurrentTime = function () { if (this.adOnStage && this.adIsLinear) { if (this.isVPAID) { var t = o.default.getAdRemainingTime.call(this), e = o.default.getAdDuration.call(this); return -1 === t || -1 === e || e < t ? -1 : 1e3 * (e - t) } return r.default.getCurrentTime.call(this) } return -1 }, t.prototype.getAdRemainingTime = function () { if (this.adOnStage && this.adIsLinear) { if (this.isVPAID) return o.default.getAdRemainingTime.call(this); var t = r.default.getCurrentTime.call(this), e = r.default.getDuration.call(this); return -1 === t || -1 === e || e < t ? -1 : 1e3 * (e - t) } return -1 }, t.prototype.getAdOnStage = function () { return this.adOnStage }, t.prototype.getAdMediaWidth = function () { return this.adOnStage ? this.isVPAID ? o.default.getAdWidth.call(this) : this.adIsLinear ? this.adMediaWidth : this.nonLinearCreativeWidth : -1 }, t.prototype.getAdMediaHeight = function () { return this.adOnStage ? this.isVPAID ? o.default.getAdHeight.call(this) : this.adIsLinear ? this.adMediaHeight : this.nonLinearCreativeHeight : -1 }, t.prototype.getClickThroughUrl = function () { return this.clickThroughUrl }, t.prototype.getIsSkippableAd = function () { return this.isSkippableAd }, t.prototype.getContentPlayerCompleted = function () { return this.contentPlayerCompleted }, t.prototype.setContentPlayerCompleted = function (t) { "boolean" == typeof t && (this.contentPlayerCompleted = t) }, t.prototype.getAdErrorMessage = function () { return this.vastErrorMessage }, t.prototype.getAdVastErrorCode = function () { return this.vastErrorCode }, t.prototype.getAdErrorType = function () { return this.adErrorType }, t.prototype.getEnvironment = function () { return s.default }, t.prototype.getFramework = function () { return a.default }, t.prototype.getVastPlayer = function () { return this.vastPlayer }, t.prototype.getContentPlayer = function () { return this.contentPlayer }, t.prototype.getVpaidCreative = function () { return this.adOnStage && this.isVPAID ? o.default.getVpaidCreative.call(this) : null }, t.prototype.getIsUsingContentPlayerForAds = function () { return this.useContentPlayerForAds }, t.prototype.initialize = function () { this.rmpVastInitialized || r.default.init.call(this) }, t.prototype.getInitialized = function () { return this.rmpVastInitialized }, t.prototype.getAdPodInfo = function () { if (0 < this.adPodApiInfo.length) { var t = {}; return t.adPodCurrentIndex = this.adPodCurrentIndex, t.adPodLength = this.adPodApiInfo.length, t } return null }, t.prototype.resizeAd = function (t, e, i) { this.adOnStage && this.isVPAID && o.default.resizeAd.call(this, t, e, i) }, t.prototype.expandAd = function () { this.adOnStage && this.isVPAID && o.default.expandAd.call(this) }, t.prototype.collapseAd = function () { this.adOnStage && this.isVPAID && o.default.collapseAd.call(this) }, t.prototype.skipAd = function () { this.adOnStage && this.isVPAID && o.default.skipAd.call(this) }, t.prototype.getAdExpanded = function () { return this.adOnStage && this.isVPAID && o.default.getAdExpanded.call(this), !1 }, t.prototype.getAdSkippableState = function () { return this.adOnStage && this.isVPAID && o.default.getAdSkippableState.call(this), !1 }, t.prototype.getAdCompanions = function () { return this.adOnStage && this.isVPAID && o.default.getAdCompanions.call(this), "" } } }; i.default = d }, { "../fw/env": 260, "../fw/fw": 261, "../players/content-player": 263, "../players/vast-player": 264, "../players/vpaid": 265 }], 256: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var C = a(t("../fw/fw")), s = a(t("../tracking/ping")); function a(t) { return t && t.__esModule ? t : { default: t } } var r = { destroy: function () { var t = this.adContainer.querySelectorAll(".rmp-ad-container-icons"); if (0 < t.length) for (var e = 0, i = t.length; e < i; e++)C.default.removeElement(t[e]) } }, k = function (t) { for (var e = [], i = 0, a = this.icons.length; i < a; i++)this.icons[i].program !== t && e.push(this.icons[i]); this.icons = e }; r.parse = function (t) { for (var e = t[0].getElementsByTagName("Icon"), i = 0, a = e.length; i < a; i++) { var s = e[i], r = s.getAttribute("program"); if (null !== r && "" !== r) { var n = s.getAttribute("width"); if (!(null === n || "" === n || parseInt(n) <= 0)) { var o = s.getAttribute("height"); if (!(null === o || "" === o || parseInt(o) <= 0)) { var l = s.getAttribute("xPosition"); if (null !== l && "" !== l) { var d = s.getAttribute("yPosition"); if (null !== d && "" !== d) { var h = s.getElementsByTagName("StaticResource"); if (0 !== h.length) { var c = h[0].getAttribute("creativeType"); if (null !== c && "" !== c && /^image\/(gif|jpeg|jpg|png)$/i.test(c)) { var u = C.default.getNodeValue(h[0], !0); if (null !== u) { k.call(this, r); var f = { program: r, width: n, height: o, xPosition: l, yPosition: d, staticResourceUrl: u }, p = s.getElementsByTagName("IconViewTracking"), m = C.default.getNodeValue(p[0], !0); null !== m && (f.iconViewTrackingUrl = m); var v = s.getElementsByTagName("IconClicks"); if (0 < v.length) { var g = v[0].getElementsByTagName("IconClickThrough"), y = C.default.getNodeValue(g[0], !0); if (null !== y) { f.iconClickThroughUrl = y; var b = v[0].getElementsByTagName("IconClickTracking"); if (0 < b.length) { f.iconClickTrackingUrl = []; for (var S = 0, E = b.length; S < E; S++) { var A = C.default.getNodeValue(b[S], !0); null !== A && f.iconClickTrackingUrl.push(A) } } } } this.icons.push(f) } } } } } } } } } }; var n = function (t, e) { var i = this; if (e && (e.stopPropagation(), "touchend" === e.type && e.preventDefault()), C.default.openWindow(this.icons[t].iconClickThroughUrl), void 0 !== this.icons[t].iconClickTrackingUrl) { var a = this.icons[t].iconClickTrackingUrl; 0 < a.length && a.forEach(function (t) { s.default.tracking.call(i, t, null) }) } }, o = function (t) { s.default.tracking.call(this, this.icons[t].iconViewTrackingUrl, null) }; r.append = function () { this.onPlayingAppendIcons = function () { this.vastPlayer.removeEventListener("playing", this.onPlayingAppendIcons); for (var t = 0, e = this.icons.length; t < e; t++) { var i = document.createElement("img"); i.className = "rmp-ad-container-icons", i.style.width = parseInt(this.icons[t].width) + "px", i.style.height = parseInt(this.icons[t].height) + "px"; var a = this.icons[t].xPosition; "left" === a ? i.style.left = "0px" : "right" === a ? i.style.right = "0px" : 0 <= parseInt(a) ? i.style.left = a + "px" : i.style.left = "0px"; var s = this.icons[t].yPosition; "top" === s ? i.style.top = "0px" : "bottom" === a ? i.style.bottom = "0px" : 0 <= parseInt(s) ? i.style.top = s + "px" : i.style.top = "0px", void 0 !== this.icons[t].iconViewTrackingUrl && i.addEventListener("load", o.bind(this, t)), void 0 !== this.icons[t].iconClickThroughUrl && (i.addEventListener("touchend", n.bind(this, t)), i.addEventListener("click", n.bind(this, t))), i.src = this.icons[t].staticResourceUrl, this.adContainer.appendChild(i) } }.bind(this), this.vastPlayer.addEventListener("playing", this.onPlayingAppendIcons) }, i.default = r }, { "../fw/fw": 261, "../tracking/ping": 266 }], 257: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var H = n(t("../fw/fw")), W = n(t("../fw/env")), a = n(t("../utils/helpers")), q = n(t("../tracking/ping")), s = n(t("../players/content-player")), J = n(t("../players/vast-player")), z = n(t("../players/vpaid")), r = n(t("./skip")), G = n(t("./icons")), K = n(t("../utils/vast-errors")), Q = n(t("../../../externals/rmp-connection")); function n(t) { return t && t.__esModule ? t : { default: t } } var o = {}, Y = /vpaid/i, X = /\/javascript/i, $ = /(application\/vnd\.apple\.mpegurl|x-mpegurl)/i, Z = /application\/dash\+xml/i, tt = ["video/webm", "video/mp4", "video/ogg", "video/3gpp"]; o.update = function (t, e) { var i = this; this.onDurationChange = function () { this.vastPlayer.removeEventListener("durationchange", this.onDurationChange), this.vastPlayerDuration = J.default.getDuration.call(this), a.default.createApiEvent.call(this, "addurationchange") }.bind(this), this.vastPlayer.addEventListener("durationchange", this.onDurationChange), this.onLoadedmetadataPlay = function () { this.vastPlayer.removeEventListener("loadedmetadata", this.onLoadedmetadataPlay), clearTimeout(this.creativeLoadTimeoutCallback), a.default.createApiEvent.call(this, "adloaded"), s.default.pause.call(this), H.default.show(this.adContainer), H.default.show(this.vastPlayer), this.adOnStage = !0, J.default.play.call(this, this.firstVastPlayerPlayRequest), this.firstVastPlayerPlayRequest && (this.firstVastPlayerPlayRequest = !1) }.bind(this), this.vastPlayer.addEventListener("loadedmetadata", this.onLoadedmetadataPlay), this.onContextMenu = function (t) { t && (t.stopPropagation(), t.preventDefault()) }.bind(this), this.vastPlayer.addEventListener("contextmenu", this.onContextMenu), this.onPlaybackError = function (t) { if (t && t.target) { var e = t.target; if (H.default.isObject(e.error) && H.default.isNumber(e.error.code)) { var i = e.error.code; "string" == typeof e.error.message && e.error.message, 4 === i && (q.default.error.call(this, 401), K.default.process.call(this, 401)) } } }.bind(this), this.creativeLoadTimeoutCallback = setTimeout(function () { q.default.error.call(i, 402), K.default.process.call(i, 402) }, this.params.creativeLoadTimeout), this.useContentPlayerForAds ? (this.contentPlayer.addEventListener("error", this.onPlaybackError), this.contentPlayer.src = t) : (this.vastPlayer.addEventListener("error", this.onPlaybackError), this.vastPlayer.src = t, this.vastPlayer.load()), this.onClickThrough = function (t) { t && t.stopPropagation(), W.default.isMobile || H.default.openWindow(this.clickThroughUrl), this.params.pauseOnClick && this.pause(), a.default.createApiEvent.call(this, "adclick"), a.default.dispatchPingEvent.call(this, "clickthrough") }.bind(this), this.clickThroughUrl && (W.default.isMobile ? function () { this.clickUIOnMobile = document.createElement("a"), this.clickUIOnMobile.className = "rmp-ad-click-ui-mobile", this.clickUIOnMobile.textContent = this.params.textForClickUIOnMobile, this.clickUIOnMobile.addEventListener("touchend", this.onClickThrough), this.clickUIOnMobile.href = this.clickThroughUrl, this.clickUIOnMobile.target = "_blank", this.adContainer.appendChild(this.clickUIOnMobile) }.call(this) : this.vastPlayer.addEventListener("click", this.onClickThrough)), this.isSkippableAd && r.default.append.call(this) }, o.parse = function (t) { this.adIsLinear = !0; var e = t[0].getElementsByTagName("MediaFiles"); if (0 === e.length) return q.default.error.call(this, 101), void K.default.process.call(this, 101); var i = t[0].getElementsByTagName("Icons"); 0 < i.length && G.default.parse.call(this, i); var a = t[0].getElementsByTagName("AdParameters"); this.adParametersData = "", 0 < a.length && (this.adParametersData = H.default.getNodeValue(a[0], !1)); var s = e[0].getElementsByTagName("MediaFile"); if (0 === s.length) return q.default.error.call(this, 101), void K.default.process.call(this, 101); for (var r = [], n = [], o = 0, l = s.length; o < l; o++) { r[o] = {}; var d = s[o], h = H.default.getNodeValue(d, !0); if (null !== h) { var c = d.getAttribute("type"); if (null !== c && "" !== c) { r[o].url = h, r[o].type = c; var u = d.getAttribute("codec"); null !== u && "" !== u && (r[o].codec = u); var f = r[o].apiFramework = d.getAttribute("apiFramework"); if (this.params.enableVpaid && f && Y.test(f) && X.test(c)) { 0, r = [r[o]], n = [], this.isVPAID = !0; break } var p = d.getAttribute("width"); null !== p && "" !== p || (p = 0); var m = d.getAttribute("height"); null !== m && "" !== m || (m = 0); var v = d.getAttribute("bitrate"); (null === v || "" === v || v < 10) && (v = 0), r[o].width = parseInt(p), r[o].height = parseInt(m), r[o].bitrate = parseInt(v) } else n.push(o) } else n.push(o) } if (0 < n.length) for (var g = n.length - 1; 0 <= g; g--)r.splice(n[g], 1); for (var y = [], b = 0, S = r.length; b < S; b++) { var E = r[b], A = E.type, C = E.url; if (this.isVPAID && C) return z.default.loadCreative.call(this, C, this.params.vpaidSettings), void (this.adContentType = A); if ($.test(A) && W.default.okHls) return J.default.append.call(this, C, A), void (this.adContentType = A); if (Z.test(A) && W.default.okDash) return J.default.append.call(this, C, A), void (this.adContentType = A); y.push(E) } for (var k = [], w = function (t, e) { return e.codec && e.type === tt[t] ? W.default.canPlayType(e.type, e.codec) : e.type === tt[t] && W.default.canPlayType(e.type) }, P = 0, _ = tt.length; P < _ && !(0 < (k = y.filter(w.bind(null, P))).length); P++); if (0 === k.length) for (var L = function (t, e, i) { return i.codec === t && i.type === e }, T = 0, I = y.length; T < I; T++) { var M = y[T]; M.codec && M.type && W.default.canPlayType(M.type, M.codec) && (k = y.filter(L.bind(null, M.codec, M.type))) } if (0 === k.length) for (var x = function (t, e) { return e.type === t }, D = 0, R = y.length; D < R; D++) { var O = y[D]; O.type && W.default.canPlayType(O.type) && (k = y.filter(x.bind(null, O.type))) } if (0 === k.length) return q.default.error.call(this, 403), void K.default.process.call(this, 403); k.sort(function (t, e) { return t.width - e.width }); var j = void 0, V = [], F = []; if (1 < k.length) { var N = H.default.getWidth(this.container) * W.default.devicePixelRatio, U = H.default.getHeight(this.container) * W.default.devicePixelRatio; 0 < N && 0 < U && (V = k.filter(function (t) { return N >= t.width && U >= t.height })), 0 === V.length && (V = [k[0]]); var B = Q.default.getBandwidthEstimate(); -1 < B && 1 < V.length && (V.sort(function (t, e) { return t.bitrate - e.bitrate }), B = Math.round(1e3 * B), j = (F = V.filter(function (t) { return B >= t.bitrate }))[F.length - 1]) } j || (0 < V.length ? j = V[V.length - 1] : (k.sort(function (t, e) { return t.bitrate - e.bitrate }), j = k[k.length - 1])), this.adMediaUrl = j.url, this.adMediaHeight = j.height, this.adMediaWidth = j.width, this.adContentType = j.type, J.default.append.call(this, j.url, j.type) }, i.default = o }, { "../../../externals/rmp-connection": 254, "../fw/env": 260, "../fw/fw": 261, "../players/content-player": 263, "../players/vast-player": 264, "../players/vpaid": 265, "../tracking/ping": 266, "../utils/helpers": 269, "../utils/vast-errors": 270, "./icons": 256, "./skip": 259 }], 258: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var E = n(t("../fw/fw")), a = n(t("../fw/env")), s = n(t("../utils/helpers")), A = n(t("../tracking/ping")), C = n(t("../players/vast-player")), r = n(t("../players/content-player")), k = n(t("../utils/vast-errors")); function n(t) { return t && t.__esModule ? t : { default: t } } var o = {}, l = function () { var t = this; this.nonLinearClose = document.createElement("div"), this.nonLinearClose.className = "rmp-ad-non-linear-close", s.default.accessibleButton(this.nonLinearClose, "close ad button"), 0 < this.nonLinearMinSuggestedDuration ? (this.nonLinearClose.style.display = "none", setTimeout(function () { t.nonLinearClose && (t.nonLinearClose.style.display = "block") }, 1e3 * this.nonLinearMinSuggestedDuration)) : this.nonLinearClose.style.display = "block", this.onClickCloseNonLinear = function (t) { t && (t.stopPropagation(), "touchend" === t.type && t.preventDefault()), this.nonLinearContainer.style.display = "none", s.default.createApiEvent.call(this, "adclosed"), s.default.dispatchPingEvent.call(this, "close") }.bind(this), this.nonLinearClose.addEventListener("touchend", this.onClickCloseNonLinear), this.nonLinearClose.addEventListener("click", this.onClickCloseNonLinear), this.nonLinearContainer.appendChild(this.nonLinearClose) }; o.update = function () { this.nonLinearContainer = document.createElement("div"), this.nonLinearContainer.className = "rmp-ad-non-linear-container", this.nonLinearContainer.style.width = this.nonLinearCreativeWidth.toString() + "px", this.nonLinearContainer.style.height = this.nonLinearCreativeHeight.toString() + "px", this.nonLinearATag = document.createElement("a"), this.nonLinearATag.className = "rmp-ad-non-linear-anchor", this.clickThroughUrl && (this.nonLinearATag.href = this.clickThroughUrl, this.nonLinearATag.target = "_blank", this.onNonLinearClickThrough = function (t) { try { t && t.stopPropagation(), this.params.pauseOnClick && this.pause(), s.default.createApiEvent.call(this, "adclick"), s.default.dispatchPingEvent.call(this, "clickthrough") } catch (t) { E.default.trace(t) } }.bind(this), a.default.isMobile ? this.nonLinearATag.addEventListener("touchend", this.onNonLinearClickThrough) : this.nonLinearATag.addEventListener("click", this.onNonLinearClickThrough)), this.nonLinearImg = document.createElement("img"), this.nonLinearImg.className = "rmp-ad-non-linear-img", this.onNonLinearLoadError = function () { A.default.error.call(this, 502), k.default.process.call(this, 502) }.bind(this), this.nonLinearImg.addEventListener("error", this.onNonLinearLoadError), this.onNonLinearLoadSuccess = function () { this.adOnStage = !0, s.default.createApiEvent.call(this, "adloaded"), s.default.createApiEvent.call(this, "adimpression"), s.default.createApiEvent.call(this, "adstarted"), s.default.dispatchPingEvent.call(this, ["impression", "creativeView", "start"]) }.bind(this), this.nonLinearImg.addEventListener("load", this.onNonLinearLoadSuccess), this.nonLinearImg.src = this.adMediaUrl, this.nonLinearATag.appendChild(this.nonLinearImg), this.nonLinearContainer.appendChild(this.nonLinearATag), this.adContainer.appendChild(this.nonLinearContainer), l.call(this), E.default.show(this.adContainer), r.default.play.call(this, this.firstContentPlayerPlayRequest), this.firstContentPlayerPlayRequest && (this.firstContentPlayerPlayRequest = !1) }, o.parse = function (t) { this.adIsLinear = !1; var e = t[0].getElementsByTagName("NonLinear"); if (0 !== e.length) { for (var i = void 0, a = "", s = !1, r = 0, n = e.length; r < n; r++) { s = !1; var o = (i = e[r]).getAttribute("width"); if (null !== o && "" !== o) { var l = i.getAttribute("height"); if (null !== l && "" !== l) { if (o = parseInt(o), l = parseInt(l), !(o <= 0 || l <= 0)) { var d = i.getAttribute("minSuggestedDuration"); null !== d && "" !== d && E.default.isValidDuration(d) && (this.nonLinearMinSuggestedDuration = E.default.convertDurationToSeconds(d)); var h = i.getElementsByTagName("StaticResource"); if (0 !== h.length) { for (var c = void 0, u = 0, f = h.length; u < f; u++) { var p = h[u]; if (null !== (c = p.getAttribute("creativeType")) && "" !== c) { if (/^image\/(png|jpeg|jpg|gif)$/i.test(c)) { if (!(o > E.default.getWidth(this.container))) { a = E.default.getNodeValue(p, !0); break } s = !0 } } } if ("" !== a) { this.adMediaUrl = a, this.nonLinearCreativeWidth = o, this.nonLinearCreativeHeight = l, this.nonLinearContentType = c; break } } } } else A.default.error.call(this, 101), k.default.process.call(this, 101) } else A.default.error.call(this, 101), k.default.process.call(this, 101) } if (!this.adMediaUrl || !i) { var m = 503; return s && (m = 501), A.default.error.call(this, m), void k.default.process.call(this, m) } var v = i.getElementsByTagName("NonLinearClickThrough"); if (0 < v.length) { this.clickThroughUrl = E.default.getNodeValue(v[0], !0); var g = e[0].getElementsByTagName("NonLinearClickTracking"); if (0 < g.length) for (var y = 0, b = g.length; y < b; y++) { var S = E.default.getNodeValue(g[y], !0); null !== S && this.trackingTags.push({ event: "clickthrough", url: S }) } } C.default.append.call(this) } }, i.default = o }, { "../fw/env": 260, "../fw/fw": 261, "../players/content-player": 263, "../players/vast-player": 264, "../tracking/ping": 266, "../utils/helpers": 269, "../utils/vast-errors": 270 }], 259: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a = n(t("../fw/fw")), s = n(t("../utils/helpers")), r = n(t("../players/vast-player")); function n(t) { return t && t.__esModule ? t : { default: t } } var o = {}, l = function (t) { 0 < Math.round(t) && (this.skipWaiting.textContent = this.params.skipWaitingMessage + " " + Math.round(t) + "s") }; o.append = function () { this.skipButton = document.createElement("div"), this.skipButton.className = "rmp-ad-container-skip", this.skipButton.style.display = "none", s.default.accessibleButton(this.skipButton, "skip ad button"), this.skipWaiting = document.createElement("div"), this.skipWaiting.className = "rmp-ad-container-skip-waiting", l.call(this, this.skipoffset), this.skipWaiting.style.display = "block", this.skipMessage = document.createElement("div"), this.skipMessage.className = "rmp-ad-container-skip-message", this.skipMessage.textContent = this.params.skipMessage, this.skipMessage.style.display = "none", this.skipIcon = document.createElement("div"), this.skipIcon.className = "rmp-ad-container-skip-icon", this.skipIcon.style.display = "none", this.onClickSkip = function (t) { t && (t.stopPropagation(), "touchend" === t.type && t.preventDefault()), this.skippableAdCanBeSkipped && (s.default.createApiEvent.call(this, "adskipped"), this.hasSkipEvent && s.default.dispatchPingEvent.call(this, "skip"), r.default.resumeContent.call(this)) }.bind(this), this.skipButton.addEventListener("click", this.onClickSkip), this.skipButton.addEventListener("touchend", this.onClickSkip), this.skipButton.appendChild(this.skipWaiting), this.skipButton.appendChild(this.skipMessage), this.skipButton.appendChild(this.skipIcon), this.adContainer.appendChild(this.skipButton), this.onTimeupdateCheckSkip = function () { if ("none" === this.skipButton.style.display && (this.skipButton.style.display = "block"), this.vastPlayerCurrentTime = this.vastPlayer.currentTime, a.default.isNumber(this.vastPlayerCurrentTime) && 0 < this.vastPlayerCurrentTime) { var t = a.default.convertOffsetToSeconds(this.skipoffset, this.vastPlayerDuration); this.vastPlayerCurrentTime >= t ? (this.vastPlayer.removeEventListener("timeupdate", this.onTimeupdateCheckSkip), function () { this.skipWaiting.style.display = "none", this.skipMessage.style.display = "block", this.skipIcon.style.display = "block" }.call(this), this.skippableAdCanBeSkipped = !0, s.default.createApiEvent.call(this, "adskippablestatechanged")) : 0 < t - this.vastPlayerCurrentTime && l.call(this, t - this.vastPlayerCurrentTime) } }.bind(this), this.vastPlayer.addEventListener("timeupdate", this.onTimeupdateCheckSkip) }, i.default = o }, { "../fw/fw": 261, "../players/vast-player": 264, "../utils/helpers": 269 }], 260: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a, s = t("./fw"), r = (a = s) && a.__esModule ? a : { default: a }; var n, o, l, d, h, c, u = {}, f = document.createElement("video"), p = !!(void 0 !== window.ontouchstart || window.DocumentTouch && document instanceof window.DocumentTouch), m = window.navigator && window.navigator.userAgent ? window.navigator.userAgent : null, v = function (t) { if (null !== m) { var e = m.match(t); if (Array.isArray(e) && void 0 !== e[1]) return parseInt(e[1], 10) } return -1 }, g = /os\s+(\d+)_/i, y = (n = [!1, -1], p && /(ipad|iphone|ipod)/i.test(m) && (n = [!0, v(g)]), n), b = /(macintosh|mac\s+os)/i, S = /safari\/[.0-9]*/i, E = /version\/(\d+)\./i, A = /(chrome|chromium|android|crios|fxios)/i, C = /android/i, k = /android\s*(\d+)\./i, w = /firefox\//i, P = /seamonkey\//i, _ = void 0 !== f.canPlayType, L = function () { if (_ && "" !== f.canPlayType('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')) return !0; return !1 }(); u.isIos = y, u.isAndroid = (o = [!1, -1], y[0] || !p || C.test(m) && (o = [!0, v(k)]), o), u.isMacOSX = !(y[0] || !b.test(m)), u.isSafari = (l = !1, d = -1, S.test(m) && !A.test(m) && (l = !0, d = v(E)), [l, d]), u.isFirefox = !(!w.test(m) || P.test(m)), u.isMobile = !1, (u.isIos[0] || u.isAndroid[0]) && (u.isMobile = !0), u.okMp4 = L, u.okHls = function () { if (_ && L) { var t = f.canPlayType("application/vnd.apple.mpegurl"), e = f.canPlayType("application/x-mpegurl"); if ("" !== t || "" !== e) return !0 } return !1 }(), u.okDash = function () { if (_ && "" !== f.canPlayType("application/dash+xml")) return !0; return !1 }(), u.canPlayType = function (t, e) { if (_) if (t && e) { if ("" !== f.canPlayType(t + '; codecs="' + e + '"')) return !0 } else if (t && !e) { if ("" !== f.canPlayType(t)) return !0 } return !1 }, u.hasNativeFullscreenSupport = !(!(h = document.documentElement) || void 0 === h.requestFullscreen && void 0 === h.webkitRequestFullscreen && void 0 === h.mozRequestFullScreen && void 0 === h.msRequestFullscreen && void 0 === f.webkitEnterFullscreen), u.devicePixelRatio = (c = 1, r.default.isNumber(window.devicePixelRatio) && 1 < window.devicePixelRatio && (c = window.devicePixelRatio), c), i.default = u }, { "./fw": 261 }], 261: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var o = { nullFn: function () { return null }, addClass: function (t, e) { t && "string" == typeof e && (t.className ? -1 === t.className.indexOf(e) && (t.className = (t.className + " " + e).replace(/\s\s+/g, " ")) : t.className = e) }, removeClass: function (t, e) { t && "string" == typeof e && -1 < t.className.indexOf(e) && (t.className = t.className.replace(e, "").replace(/\s\s+/g, " ")) }, createStdEvent: function (t, e) { var i = void 0; if (e) if ("function" == typeof window.Event) try { i = new Event(t), e.dispatchEvent(i) } catch (t) { o.trace(t) } else try { (i = document.createEvent("Event")).initEvent(t, !0, !0), e.dispatchEvent(i) } catch (t) { o.trace(t) } } }, a = function (t, e) { var i = function (t, e) { var i = ""; if (t && "function" == typeof window.getComputedStyle) { var a = window.getComputedStyle(t, null); a && (i = (i = a.getPropertyValue(e)).toString().toLowerCase()) } return i }(t, e) || 0; return -1 < (i = i.toString()).indexOf("px") && (i = i.replace("px", "")), parseFloat(i) }; o.getWidth = function (t) { return t ? o.isNumber(t.offsetWidth) && 0 !== t.offsetWidth ? t.offsetWidth : a(t, "width") : 0 }, o.getHeight = function (t) { return t ? o.isNumber(t.offsetHeight) && 0 !== t.offsetHeight ? t.offsetHeight : a(t, "height") : 0 }, o.show = function (t) { t && (t.style.display = "block") }, o.hide = function (t) { t && (t.style.display = "none") }, o.removeElement = function (t) { if (t && t.parentNode) try { t.parentNode.removeChild(t) } catch (t) { o.trace(t) } }, o.ajax = function (a, s, r, n) { return new Promise(function (t, e) { if (window.XMLHttpRequest) { var i = new XMLHttpRequest; i.open("GET", a, !0), i.timeout = s, n && (i.withCredentials = !0), i.onloadend = function () { o.isNumber(i.status) && 200 <= i.status && i.status < 300 && "string" == typeof i.responseText && "" !== i.responseText ? r ? t(i.responseText) : t() : e() }, i.ontimeout = function () { o.log("XMLHttpRequest timeout"), e() }, i.send(null) } else e() }) }, o.log = function (t) { window.console && window.console.log && ("string" == typeof t ? window.console.log("rmp-vast: " + t) : window.console.log(t)) }, o.trace = function (t) { 0 }, o.hasDOMParser = function () { return void 0 !== window.DOMParser }, o.vastReadableTime = function (t) { if (o.isNumber(t) && 0 <= t) { var e = 0, i = 0, a = 0, s = Math.floor(t % 1e3); return s = 0 === s ? "000" : s < 10 ? "00" + s : s < 100 ? "0" + s : s.toString(), 59 < (e = Math.floor(1 * t / 1e3)) && (e -= 60 * (i = Math.floor(1 * e / 60))), e = 0 === e ? "00" : e < 10 ? "0" + e : e.toString(), 59 < i && (i -= 60 * (a = Math.floor(1 * i / 60))), i = 0 === i ? "00" : i < 10 ? "0" + i : i.toString(), (a = 0 === a ? "00" : a < 10 ? "0" + a : 23 < a ? "00" : a.toString()) + ":" + i + ":" + e + "." + s } return "00:00:00.000" }, o.generateCacheBusting = function () { for (var t = "", e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", i = 0; i < 8; i++)t += e.charAt(Math.floor(Math.random() * e.length)); return t }, o.getNodeValue = function (t, e) { for (var i = t.childNodes, a = "", s = 0, r = i.length; s < r; s++)i[s] && i[s].textContent && (a += i[s].textContent.trim()); if (a) { if (/^<!\[CDATA\[.*\]\]>$/i.test(a) && (a = a.replace("<![CDATA[", "").replace("]]>", "")), !e) return a; if (/^(https?:)?\/\//i.test(a)) return a } return null }, o.RFC3986EncodeURIComponent = function (t) { return encodeURIComponent(t).replace(/[!'()*]/g, function (t) { return "%" + t.charCodeAt(0).toString(16) }) }, o.isValidDuration = function (t) { return !!/^\d+:\d+:\d+(\.\d+)?$/i.test(t) }, o.convertDurationToSeconds = function (t) { var e = t.split("."), i = (e = e[0]).split(":"); return 60 * parseInt(i[0]) * 60 + 60 * parseInt(i[1]) + parseInt(i[2]) }; var n = /^\d+:\d+:\d+(\.\d+)?$/i, l = /^\d+%$/i; o.isValidOffset = function (t) { return !(!n.test(t) && !l.test(t)) }, o.convertOffsetToSeconds = function (t, e) { var i = 0; if (n.test(t)) { var a = t.split("."), s = (a = a[0]).split(":"); i = 60 * parseInt(s[0]) * 60 + 60 * parseInt(s[1]) + parseInt(s[2]) } else if (l.test(t) && 0 < e) { var r = t.split("%"); r = parseInt(r[0]), i = Math.round(e * r / 100) } return i }, o.logVideoEvents = function (e, i) { ["loadstart", "durationchange", "loadedmetadata", "loadeddata", "canplay", "canplaythrough"].forEach(function (t) { e.addEventListener(t, function (t) { t && t.type && o.log(i + " player event - " + t.type) }) }) }, o.isNumber = function (t) { return !(void 0 === t || "number" != typeof t || !Number.isFinite(t)) }, o.isObject = function (t) { return null != t && "object" == typeof t }, o.openWindow = function (t) { try { window.open(t, "_blank") } catch (t) { o.trace(t) } }, i.default = o }, {}], 262: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var C = n(t("./fw/fw")), k = n(t("./fw/env")), w = n(t("./utils/helpers")), P = n(t("./tracking/ping")), _ = n(t("./creatives/linear")), L = n(t("./creatives/non-linear")), T = n(t("./tracking/tracking-events")), a = n(t("./api/api")), s = n(t("./players/content-player")), r = n(t("./utils/default")), I = n(t("./utils/vast-errors")), M = n(t("./creatives/icons")); function n(t) { return t && t.__esModule ? t : { default: t } } function x(t) { if (Array.isArray(t)) { for (var e = 0, i = Array(t.length); e < t.length; e++)i[e] = t[e]; return i } return Array.from(t) } var o = function (t, e) { "string" == typeof t && "" !== t && (this.id = t, this.container = document.getElementById(this.id), this.contentWrapper = this.container.querySelector(".rmp-content"), this.contentPlayer = this.container.querySelector(".rmp-video"), null !== this.container && null !== this.contentWrapper && null !== this.contentPlayer && (r.default.instanceVariables.call(this), r.default.loadAdsVariables.call(this), r.default.fullscreen.call(this), w.default.filterParams.call(this, e))) }; a.default.attach(o); var D = function () { w.default.createApiEvent.call(this, "adfollowingredirect"); var t = C.default.getNodeValue(this.vastAdTagURI[0], !0); null !== t ? this.params.maxNumRedirects > this.redirectsFollowed ? (this.redirectsFollowed++ , this.runningAdPod && (this.adPodItemWrapper = !0), this.loadAds(t)) : (P.default.error.call(this, 302), I.default.process.call(this, 302)) : (P.default.error.call(this, 300), I.default.process.call(this, 300)) }, R = function (t) { var e = void 0; if (0 < this.adPod.length && !this.adPodItemWrapper) e = t[0], this.adPodCurrentIndex++ , this.adPod.shift(); else if (0 < this.adPod.length && this.adPodItemWrapper) { 0, this.adPodItemWrapper = !1; for (var i = 0, a = t.length; i < a; i++) { var s = t[i].getAttribute("sequence"); if ("" === s || null === s) { e = t[i]; break } } } else { for (var r = [], n = 0, o = t.length; n < o; n++) { var l = t[n].getAttribute("sequence"); "" === l || null === l ? r.push(t[n]) : this.adPod.push(t[n]) } if (0 === this.adPod.length && 0 < r.length) e = r[0]; else if (0 < this.adPod.length) { 0, this.runningAdPod = !0, this.adPodApiInfo = [].concat(x(this.adPod)), this.adPodWrapperTrackings = [].concat(x(this.trackingTags)), this.adPod.length > this.params.maxNumItemsInAdPod && (this.adPod.length = this.params.maxNumItemsInAdPod), this.standaloneAdsInPod = r, this.adPod.sort(function (t, e) { return parseInt(t.getAttribute("sequence")) - parseInt(e.getAttribute("sequence")) }), e = this.adPod[0], this.adPod.shift(); this.onAdDestroyLoadNextAdInPod = function () { this.adPodItemWrapper = !1, 0 < this.adPod.length ? R.call(this, this.adPod) : (this.container.removeEventListener("addestroyed", this.onAdDestroyLoadNextAdInPod), this.adPod = [], this.standaloneAdsInPod = [], this.runningAdPod = !1, this.adPodCurrentIndex = 0, this.adPodApiInfo = [], this.adPodWrapperTrackings = [], w.default.createApiEvent.call(this, "adpodcompleted")) }.bind(this), this.container.addEventListener("addestroyed", this.onAdDestroyLoadNextAdInPod) } } if (!e) return P.default.error.call(this, 200), void I.default.process.call(this, 200); var d = e.getElementsByTagName("InLine"), h = e.getElementsByTagName("Wrapper"); if (0 === d.length && 0 === h.length) return P.default.error.call(this, 101), void I.default.process.call(this, 101); var c = void 0; 0 < h.length ? (this.isWrapper = !0, c = h, this.vastAdTagURI = c[0].getElementsByTagName("VASTAdTagURI")) : c = d; var u = c[0].getElementsByTagName("AdSystem"), f = c[0].getElementsByTagName("Impression"), p = c[0].getElementsByTagName("Error"); if (0 < p.length) { var m = C.default.getNodeValue(p[0], !0); null !== m && this.inlineOrWrapperErrorTags.push({ event: "error", url: m }) } var v = c[0].getElementsByTagName("AdTitle"), g = c[0].getElementsByTagName("Description"), y = c[0].getElementsByTagName("Creatives"); if (this.isWrapper) { if (0 === this.vastAdTagURI.length) return P.default.error.call(this, 101), void I.default.process.call(this, 101) } else if (0 === y.length) return P.default.error.call(this, 101), void I.default.process.call(this, 101); var b = void 0; if (0 < y.length && (b = y[0].getElementsByTagName("Creative"), !this.isWrapper && 0 === b.length)) return P.default.error.call(this, 101), void I.default.process.call(this, 101); if (0 < v.length && (this.adSystem = C.default.getNodeValue(u[0], !1)), 0 < f.length) for (var S = 0, E = f.length; S < E; S++) { var A = C.default.getNodeValue(f[S], !0); null !== A && this.trackingTags.push({ event: "impression", url: A }) } this.isWrapper || (0 < v.length && (this.adTitle = C.default.getNodeValue(v[0], !1)), 0 < g.length && (this.adDescription = C.default.getNodeValue(g[0], !1))), !this.isWrapper || b ? function (t) { for (var e = 0, i = t.length; e < i; e++) { var a = t[e], s = a.getElementsByTagName("NonLinearAds"), r = a.getElementsByTagName("Linear"); if (!(0 < a.getElementsByTagName("CompanionAds").length)) { if (0 === s.length && 0 === r.length) return P.default.error.call(this, 101), void I.default.process.call(this, 101); if (0 < s.length) { var n = s[0].getElementsByTagName("TrackingEvents"); return 0 < n.length && T.default.filterPush.call(this, n), this.isWrapper ? void D.call(this) : void L.default.parse.call(this, s) } if (0 < r.length) { var o = r[0].getAttribute("skipoffset"); if (!this.isWrapper && "" !== this.params.skipMessage && null !== o && "" !== o && C.default.isValidOffset(o) && (this.isSkippableAd = !0, this.skipoffset = o, k.default.isIos[0] && k.default.isIos[1] < 10)) return P.default.error.call(this, 200), void I.default.process.call(this, 200); var l = r[0].getElementsByTagName("TrackingEvents"); 0 < l.length && T.default.filterPush.call(this, l); var d = r[0].getElementsByTagName("VideoClicks"); if (0 < d.length) { var h = d[0].getElementsByTagName("ClickThrough"), c = d[0].getElementsByTagName("ClickTracking"); if (0 < h.length && (this.clickThroughUrl = C.default.getNodeValue(h[0], !0)), 0 < c.length) for (var u = 0, f = c.length; u < f; u++) { var p = C.default.getNodeValue(c[u], !0); null !== p && this.trackingTags.push({ event: "clickthrough", url: p }) } } if (this.isWrapper) { var m = r[0].getElementsByTagName("Icons"); return 0 < m.length && M.default.parse.call(this, m), void D.call(this) } return void _.default.parse.call(this, r) } } } this.isWrapper && D.call(this) }.call(this, b) : D.call(this) }, l = function (t) { var i = this; "string" == typeof t && "" !== t ? C.default.hasDOMParser() ? (w.default.createApiEvent.call(this, "adtagstartloading"), this.isWrapper = !1, this.vastAdTagURI = null, this.adTagUrl = t, C.default.ajax(this.adTagUrl, this.params.ajaxTimeout, !0, this.params.ajaxWithCredentials).then(function (t) { w.default.createApiEvent.call(i, "adtagloaded"); var e = void 0; try { e = (new DOMParser).parseFromString(t, "text/xml") } catch (t) { return C.default.trace(t), P.default.error.call(i, 100), void I.default.process.call(i, 100) } (function (t) { if (0 < t.getElementsByTagName("vmap:VMAP").length) I.default.process.call(this, 200); else { var e = t.getElementsByTagName("VAST"); if (0 === e.length) return P.default.error.call(this, 100), void I.default.process.call(this, 100); var i = e[0], a = i.getElementsByTagName("Error"); if (0 < a.length) for (var s = 0, r = a.length; s < r; s++)if (a[s].parentNode === i) { var n = C.default.getNodeValue(a[s], !0); null !== n && this.vastErrorTags.push({ event: "error", url: n }) } var o = i.getAttribute("version"); if (!/^(2|3|4)\./i.test(o)) return P.default.error.call(this, 102), void I.default.process.call(this, 102); var l = i.getElementsByTagName("Ad"); if (0 === l.length) return P.default.error.call(this, 303), void I.default.process.call(this, 303); R.call(this, l) } }).call(i, e) }).catch(function (t) { C.default.trace(t), P.default.error.call(i, 1e3), I.default.process.call(i, 1e3) })) : I.default.process.call(this, 1002) : I.default.process.call(this, 1001) }; o.prototype.loadAds = function (t) { if (this.rmpVastInitialized || this.initialize(), this.getAdOnStage()) return this.onDestroyLoadAds = function (t) { this.container.removeEventListener("addestroyed", this.onDestroyLoadAds), this.loadAds(t) }.bind(this, t), this.container.addEventListener("addestroyed", this.onDestroyLoadAds), void this.stopAds(); var e = s.default.getCurrentTime.call(this); this.useContentPlayerForAds && (this.currentContentSrc = this.contentPlayer.src, this.currentContentCurrentTime = e, s.default.preventSeekingForCustomPlayback.call(this)), l.call(this, t) }, i.default = o }, { "./api/api": 255, "./creatives/icons": 256, "./creatives/linear": 257, "./creatives/non-linear": 258, "./fw/env": 260, "./fw/fw": 261, "./players/content-player": 263, "./tracking/ping": 266, "./tracking/tracking-events": 267, "./utils/default": 268, "./utils/helpers": 269, "./utils/vast-errors": 270 }], 263: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a = r(t("../fw/fw")), s = r(t("../utils/helpers")); function r(t) { return t && t.__esModule ? t : { default: t } } var n = { play: function (t) { this.contentPlayer && this.contentPlayer.paused && s.default.playPromise.call(this, "content", t) }, pause: function () { this.contentPlayer && !this.contentPlayer.paused && this.contentPlayer.pause() }, setVolume: function (t) { this.contentPlayer && (this.contentPlayer.volume = t) }, getVolume: function () { return this.contentPlayer ? this.contentPlayer.volume : -1 }, getMute: function () { return !!this.contentPlayer && this.contentPlayer.muted }, setMute: function (t) { this.contentPlayer && (t && !this.contentPlayer.muted ? this.contentPlayer.muted = !0 : !t && this.contentPlayer.muted && (this.contentPlayer.muted = !1)) }, getDuration: function () { if (this.contentPlayer) { var t = this.contentPlayer.duration; if (a.default.isNumber(t)) return Math.round(1e3 * t) } return -1 }, getCurrentTime: function () { if (this.contentPlayer) { var t = this.contentPlayer.currentTime; if (a.default.isNumber(t)) return Math.round(1e3 * t) } return -1 }, seekTo: function (t) { if (a.default.isNumber(t) && 0 <= t && this.contentPlayer) { var e = Math.round(t / 1e3 * 100) / 100; this.contentPlayer.currentTime = e } }, preventSeekingForCustomPlayback: function () { var t = this; this.contentPlayer && (this.antiSeekLogicInterval = setInterval(function () { t.adIsLinear && t.adOnStage && (1 < Math.abs(t.customPlaybackCurrentTime - t.contentPlayer.currentTime) && (t.contentPlayer.currentTime = t.customPlaybackCurrentTime), t.customPlaybackCurrentTime = t.contentPlayer.currentTime) }, 200)) } }; i.default = n }, { "../fw/fw": 261, "../utils/helpers": 269 }], 264: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a = p(t("../fw/fw")), s = p(t("../fw/env")), r = p(t("../utils/helpers")), n = p(t("../players/content-player")), o = p(t("../players/vpaid")), l = p(t("../creatives/icons")), d = p(t("../utils/default")), h = p(t("../tracking/tracking-events")), c = p(t("../creatives/non-linear")), u = p(t("../creatives/linear")), f = p(t("../utils/vast-errors")); function p(t) { return t && t.__esModule ? t : { default: t } } var m = {}; m.init = function () { var t = this; this.adContainer = document.createElement("div"), this.adContainer.className = "rmp-ad-container", this.contentWrapper.appendChild(this.adContainer), a.default.hide(this.adContainer), this.useContentPlayerForAds ? this.vastPlayer = this.contentPlayer : (this.vastPlayer = document.createElement("video"), s.default.isAndroid[0] && void 0 !== this.vastPlayer.disableRemotePlayback && (this.vastPlayer.disableRemotePlayback = !0), this.vastPlayer.className = "rmp-ad-vast-video-player", this.vastPlayer.controls = !1, this.contentPlayer.hasAttribute("muted") && (this.contentPlayer.muted = !0), this.contentPlayer.muted && (this.vastPlayer.muted = !0), this.vastPlayer.poster = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=", this.vastPlayer.setAttribute("x-webkit-airplay", "allow"), "boolean" == typeof this.contentPlayer.playsInline && this.contentPlayer.playsInline ? this.vastPlayer.playsInline = !0 : s.default.isMobile && this.vastPlayer.setAttribute("webkit-playsinline", !0), this.vastPlayer.defaultPlaybackRate = 1, a.default.hide(this.vastPlayer), this.adContainer.appendChild(this.vastPlayer)), this.contentPlayer.addEventListener("ended", function () { t.adOnStage || (t.contentPlayerCompleted = !0) }), this.vastPlayer.preload = "auto", s.default.isMobile ? (this.useContentPlayerForAds || this.contentPlayer.load(), this.vastPlayer.load()) : this.useContentPlayerForAds && this.vastPlayer.load(), this.rmpVastInitialized = !0 }, m.append = function (t, e) { if (!this.vastPlayer) if (this.useContentPlayerForAds) this.vastPlayer = this.contentPlayer; else { var i = this.adContainer.querySelector(".rmp-ad-vast-video-player"); if (null === i) return void f.default.process.call(this, 1004); this.vastPlayer = i } if (this.adIsLinear) t && e && u.default.update.call(this, t, e); else { if (this.params.outstream) return void f.default.process.call(this, 201); c.default.update.call(this) } h.default.wire.call(this), !this.useContentPlayerForAds && 0 < this.icons.length && l.default.append.call(this) }, m.setVolume = function (t) { this.vastPlayer && (this.vastPlayer.volume = t) }, m.getVolume = function () { return this.vastPlayer ? this.vastPlayer.volume : -1 }, m.setMute = function (t) { this.vastPlayer && (t && !this.vastPlayer.muted ? (this.vastPlayer.muted = !0, r.default.dispatchPingEvent.call(this, "mute")) : !t && this.vastPlayer.muted && (this.vastPlayer.muted = !1, r.default.dispatchPingEvent.call(this, "unmute"))) }, m.getMute = function () { return !!this.vastPlayer && this.vastPlayer.muted }, m.play = function (t) { this.vastPlayer && this.vastPlayer.paused && r.default.playPromise.call(this, "vast", t) }, m.pause = function () { this.vastPlayer && !this.vastPlayer.paused && this.vastPlayer.pause() }, m.getDuration = function () { if (this.vastPlayer) { var t = this.vastPlayer.duration; if (a.default.isNumber(t)) return Math.round(1e3 * t) } return -1 }, m.getCurrentTime = function () { if (this.vastPlayer) { var t = this.vastPlayer.currentTime; if (a.default.isNumber(t)) return Math.round(1e3 * t) } return -1 }, m.resumeContent = function () { (function () { var t = this; if (0 < this.icons.length && l.default.destroy.call(this), this.isVPAID && o.default.destroy.call(this), function () { if (this.nonLinearContainer) { this.nonLinearImg.removeEventListener("load", this.onNonLinearLoadSuccess), this.nonLinearImg.removeEventListener("error", this.onNonLinearLoadError), this.nonLinearATag.removeEventListener("click", this.onNonLinearClickThrough), this.nonLinearATag.removeEventListener("touchend", this.onNonLinearClickThrough), this.nonLinearClose.removeEventListener("click", this.onClickCloseNonLinear), this.nonLinearClose.removeEventListener("touchend", this.onClickCloseNonLinear); for (var t = 0, e = this.trackingTags.length; t < e; t++)this.nonLinearContainer.removeEventListener(this.trackingTags[t].event, this.onEventPingTracking) } if (this.vastPlayer) { this.vastPlayer.removeEventListener("error", this.onPlaybackError), this.vastPlayer.removeEventListener("durationchange", this.onDurationChange), this.vastPlayer.removeEventListener("loadedmetadata", this.onLoadedmetadataPlay), this.vastPlayer.removeEventListener("contextmenu", this.onContextMenu), this.vastPlayer.removeEventListener("pause", this.onPause), this.vastPlayer.removeEventListener("play", this.onPlay), this.vastPlayer.removeEventListener("playing", this.onPlaying), this.vastPlayer.removeEventListener("ended", this.onEnded), this.vastPlayer.removeEventListener("volumechange", this.onVolumeChange), this.vastPlayer.removeEventListener("timeupdate", this.onTimeupdate); for (var i = 0, a = this.trackingTags.length; i < a; i++)this.vastPlayer.removeEventListener(this.trackingTags[i].event, this.onEventPingTracking); null !== this.onClickThrough && this.vastPlayer.removeEventListener("click", this.onClickThrough), null !== this.onPlayingAppendIcons && this.vastPlayer.removeEventListener("playing", this.onPlayingAppendIcons), null !== this.onTimeupdateCheckSkip && this.vastPlayer.removeEventListener("timeupdate", this.onTimeupdateCheckSkip), this.skipButton && null !== this.onClickSkip && (this.skipButton.removeEventListener("click", this.onClickSkip), this.skipButton.removeEventListener("touchend", this.onClickSkip)), this.clickUIOnMobile && null !== this.onClickThrough && this.clickUIOnMobile.removeEventListener("touchend", this.onClickThrough) } this.contentPlayer && this.contentPlayer.removeEventListener("error", this.onPlaybackError) }.call(this), this.clickUIOnMobile && a.default.removeElement(this.clickUIOnMobile), this.isSkippableAd && a.default.removeElement(this.skipButton), a.default.hide(this.adContainer), clearInterval(this.antiSeekLogicInterval), clearTimeout(this.creativeLoadTimeoutCallback), this.useContentPlayerForAds) if (this.params.outstream) try { this.contentPlayer && (this.contentPlayer.pause(), this.contentPlayer.removeAttribute("src"), this.contentPlayer.load()) } catch (t) { a.default.trace(t) } else this.nonLinearContainer ? a.default.removeElement(this.nonLinearContainer) : (4e3 < this.currentContentCurrentTime && (this.needsSeekAdjust = !0, this.contentPlayerCompleted && (this.needsSeekAdjust = !1), this.seekAdjustAttached || (this.seekAdjustAttached = !0, this.contentPlayer.addEventListener("playing", function () { t.needsSeekAdjust && (t.needsSeekAdjust = !1, n.default.seekTo.call(t, t.currentContentCurrentTime)) }))), this.contentPlayer.src = this.currentContentSrc); else try { this.vastPlayer && (this.vastPlayer.pause(), this.vastPlayer.removeAttribute("src"), this.vastPlayer.load(), a.default.hide(this.vastPlayer)), this.nonLinearContainer && a.default.removeElement(this.nonLinearContainer) } catch (t) { a.default.trace(t) } d.default.loadAdsVariables.call(this), r.default.createApiEvent.call(this, "addestroyed") }).call(this), this.contentPlayerCompleted || this.params.outstream || n.default.play.call(this), this.contentPlayerCompleted = !1 }, i.default = m }, { "../creatives/icons": 256, "../creatives/linear": 257, "../creatives/non-linear": 258, "../fw/env": 260, "../fw/fw": 261, "../players/content-player": 263, "../players/vpaid": 265, "../tracking/tracking-events": 267, "../utils/default": 268, "../utils/helpers": 269, "../utils/vast-errors": 270 }], 265: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var r = a(t("../fw/fw")), s = a(t("../fw/env")), n = a(t("../utils/helpers")), o = a(t("../utils/vast-errors")), l = a(t("../tracking/ping")), d = a(t("../players/vast-player")), h = a(t("../creatives/icons")), c = a(t("../tracking/tracking-events")), u = a(t("../players/content-player")); function a(t) { return t && t.__esModule ? t : { default: t } } var f = { getAdWidth: function () { return this.vpaidCreative && "function" == typeof this.vpaidCreative.getAdWidth ? this.vpaidCreative.getAdWidth() : -1 }, getAdHeight: function () { return this.vpaidCreative && "function" == typeof this.vpaidCreative.getAdHeight ? this.vpaidCreative.getAdHeight() : -1 }, getAdDuration: function () { if (this.vpaidCreative) { if ("function" == typeof this.vpaidCreative.getAdDuration) return this.vpaidCreative.getAdDuration(); if (-1 < this.vpaid1AdDuration) return this.vpaid1AdDuration } return -1 }, getAdRemainingTime: function () { return 0 <= this.vpaidRemainingTime ? this.vpaidRemainingTime : -1 }, getCreativeUrl: function () { return this.vpaidCreativeUrl ? this.vpaidCreativeUrl : "" }, getVpaidCreative: function () { return this.vpaidCreative }, getAdVolume: function () { return this.vpaidCreative && "function" == typeof this.vpaidCreative.getAdVolume ? this.vpaidCreative.getAdVolume() : null }, getAdPaused: function () { return this.vpaidPaused }, getAdExpanded: function () { return !(!this.vpaidCreative || "function" != typeof this.vpaidCreative.getAdExpanded) && this.vpaidCreative.getAdExpanded() }, getAdSkippableState: function () { return !(!this.vpaidCreative || "function" != typeof this.vpaidCreative.getAdSkippableState) && this.vpaidCreative.getAdSkippableState() }, getAdIcons: function () { return this.vpaidCreative && "function" == typeof this.vpaidCreative.getAdIcons ? this.vpaidCreative.getAdIcons() : null }, getAdCompanions: function () { return this.vpaidCreative && "function" == typeof this.vpaidCreative.getAdCompanions ? this.vpaidCreative.getAdCompanions() : "" } }, p = function () { this.adStoppedTimeout && clearTimeout(this.adStoppedTimeout), d.default.resumeContent.call(this) }; f.resizeAd = function (t, e, i) { if (this.vpaidCreative && r.default.isNumber(t) && r.default.isNumber(e) && "string" == typeof i && !(t <= 0 || e <= 0)) { var a = "normal"; "fullscreen" === i && (a = i), this.vpaidCreative.resizeAd(t, e, a) } }, f.stopAd = function () { var t = this; this.vpaidCreative && (this.adStoppedTimeout = setTimeout(function () { p.call(t) }, this.params.creativeLoadTimeout), this.vpaidCreative.stopAd()) }, f.pauseAd = function () { this.vpaidCreative && !this.vpaidPaused && this.vpaidCreative.pauseAd() }, f.resumeAd = function () { this.vpaidCreative && this.vpaidPaused && this.vpaidCreative.resumeAd() }, f.expandAd = function () { this.vpaidCreative && this.vpaidCreative.expandAd() }, f.collapseAd = function () { this.vpaidCreative && this.vpaidCreative.collapseAd() }, f.skipAd = function () { var t = this; this.vpaidCreative && (this.adSkippedTimeout = setTimeout(function () { p.call(t) }, this.params.creativeLoadTimeout), this.vpaidCreative.skipAd()) }, f.setAdVolume = function (t) { this.vpaidCreative && r.default.isNumber(t) && 0 <= t && t <= 1 && "function" == typeof this.vpaidCreative.setAdVolume && this.vpaidCreative.setAdVolume(t) }; var m = function () { if (this.vpaidCreative) { this.vpaidCallbacks = { AdLoaded: function () { var t = this; this.vpaidAdLoaded = !0, this.vpaidCreative && (this.initAdTimeout && clearTimeout(this.initAdTimeout), this.vpaidCallbacks.AdLoaded && this.vpaidCreative.unsubscribe(this.vpaidCallbacks.AdLoaded, "AdLoaded"), this.startAdTimeout = setTimeout(function () { t.vpaidAdStarted || d.default.resumeContent.call(t), t.vpaidAdStarted = !1 }, this.params.creativeLoadTimeout), u.default.pause.call(this), this.adOnStage = !0, this.vpaidCreative.startAd(), n.default.createApiEvent.call(this, "adloaded")) }.bind(this), AdStarted: function () { this.vpaidAdStarted = !0, this.vpaidCreative && (this.startAdTimeout && clearTimeout(this.startAdTimeout), this.vpaidCallbacks.AdStarted && this.vpaidCreative.unsubscribe(this.vpaidCallbacks.AdStarted, "AdStarted"), 1 === this.vpaidVersion && (this.vpaid1AdDuration = f.getAdRemainingTime.call(this)), !f.getAdIcons.call(this) && !this.useContentPlayerForAds && 0 < this.icons.length && h.default.append.call(this), "function" == typeof this.vpaidCreative.getAdLinear && (this.adIsLinear = this.vpaidCreative.getAdLinear()), n.default.dispatchPingEvent.call(this, "creativeView")) }.bind(this), AdStopped: p.bind(this), AdSkipped: function () { this.adSkippedTimeout && clearTimeout(this.adSkippedTimeout), n.default.createApiEvent.call(this, "adskipped"), n.default.dispatchPingEvent.call(this, "skip") }.bind(this), AdSkippableStateChange: function () { n.default.createApiEvent.call(this, "adskippablestatechanged") }.bind(this), AdDurationChange: function () { if (this.vpaidCreative) { if ("function" == typeof this.vpaidCreative.getAdRemainingTime) { var t = this.vpaidCreative.getAdRemainingTime(); 0 <= t && (this.vpaidRemainingTime = t) } n.default.createApiEvent.call(this, "addurationchange") } }.bind(this), AdVolumeChange: function () { var t = f.getAdVolume.call(this); null !== t && (0 < this.vpaidCurrentVolume && 0 === t ? n.default.dispatchPingEvent.call(this, "mute") : 0 === this.vpaidCurrentVolume && 0 < t && n.default.dispatchPingEvent.call(this, "unmute"), this.vpaidCurrentVolume = t, n.default.createApiEvent.call(this, "advolumechanged")) }.bind(this), AdImpression: function () { n.default.createApiEvent.call(this, "adimpression"), n.default.dispatchPingEvent.call(this, "impression") }.bind(this), AdVideoStart: function () { this.vpaidPaused = !1; var t = f.getAdVolume.call(this); null === t && (t = 1), this.vpaidCurrentVolume = t, n.default.createApiEvent.call(this, "adstarted"), n.default.dispatchPingEvent.call(this, "start") }.bind(this), AdVideoFirstQuartile: function () { n.default.createApiEvent.call(this, "adfirstquartile"), n.default.dispatchPingEvent.call(this, "firstQuartile") }.bind(this), AdVideoMidpoint: function () { n.default.createApiEvent.call(this, "admidpoint"), n.default.dispatchPingEvent.call(this, "midpoint") }.bind(this), AdVideoThirdQuartile: function () { n.default.createApiEvent.call(this, "adthirdquartile"), n.default.dispatchPingEvent.call(this, "thirdQuartile") }.bind(this), AdVideoComplete: function () { n.default.createApiEvent.call(this, "adcomplete"), n.default.dispatchPingEvent.call(this, "complete") }.bind(this), AdClickThru: function (t, e, i) { if (n.default.createApiEvent.call(this, "adclick"), n.default.dispatchPingEvent.call(this, "clickthrough"), "boolean" == typeof i && i) { var a = void 0; t ? a = t : this.clickThroughUrl && (a = this.clickThroughUrl), a && (this.clickThroughUrl = a, r.default.openWindow(this.clickThroughUrl)) } }.bind(this), AdPaused: function () { this.vpaidPaused = !0, n.default.createApiEvent.call(this, "adpaused"), n.default.dispatchPingEvent.call(this, "pause") }.bind(this), AdPlaying: function () { this.vpaidPaused = !1, n.default.createApiEvent.call(this, "adresumed"), n.default.dispatchPingEvent.call(this, "resume") }.bind(this), AdLog: function (t) { }.bind(this), AdError: function (t) { l.default.error.call(this, 901), o.default.process.call(this, 901) }.bind(this), AdInteraction: function () { n.default.createApiEvent.call(this, "adinteraction") }.bind(this), AdUserAcceptInvitation: function () { n.default.createApiEvent.call(this, "aduseracceptinvitation"), n.default.dispatchPingEvent.call(this, "acceptInvitation") }.bind(this), AdUserMinimize: function () { n.default.createApiEvent.call(this, "adcollapse"), n.default.dispatchPingEvent.call(this, "collapse") }.bind(this), AdUserClose: function () { n.default.createApiEvent.call(this, "adclose"), n.default.dispatchPingEvent.call(this, "close") }.bind(this), AdSizeChange: function () { n.default.createApiEvent.call(this, "adsizechange") }.bind(this), AdLinearChange: function () { this.vpaidCreative && "function" == typeof this.vpaidCreative.getAdLinear && (this.adIsLinear = this.vpaidCreative.getAdLinear(), n.default.createApiEvent.call(this, "adlinearchange")) }.bind(this), AdExpandedChange: function () { n.default.createApiEvent.call(this, "adexpandedchange") }.bind(this), AdRemainingTimeChange: function () { if (!this.vpaidCreative && "function" == typeof this.vpaidCreative.getAdRemainingTime) { var t = this.vpaidCreative.getAdRemainingTime(); 0 <= t && (this.vpaidRemainingTime = t) } n.default.createApiEvent.call(this, "adremainingtimechange") }.bind(this) }; for (var t = Object.keys(this.vpaidCallbacks), e = 0, i = t.length; e < i; e++) { var a = t[e]; this.vpaidCreative.subscribe(this.vpaidCallbacks[a], a) } } }, v = function () { var t, e = this; if (this.vpaidAvailableInterval && clearInterval(this.vpaidAvailableInterval), this.vpaidLoadTimeout && clearTimeout(this.vpaidLoadTimeout), this.vpaidCreative = this.vpaidIframe.contentWindow.getVPAIDAd(), this.vpaidCreative && "function" == typeof this.vpaidCreative.handshakeVersion) { var i = void 0; try { i = this.vpaidCreative.handshakeVersion("2.0") } catch (t) { return r.default.trace(t), l.default.error.call(this, 901), void o.default.process.call(this, 901) } if (this.vpaidVersion = parseInt(i), this.vpaidVersion < 1) return l.default.error.call(this, 901), void o.default.process.call(this, 901); if ("function" != typeof (t = this.vpaidCreative).initAd || "function" != typeof t.startAd || "function" != typeof t.stopAd || "function" != typeof t.skipAd || "function" != typeof t.resizeAd || "function" != typeof t.pauseAd || "function" != typeof t.resumeAd || "function" != typeof t.expandAd || "function" != typeof t.collapseAd || "function" != typeof t.subscribe || "function" != typeof t.unsubscribe) return l.default.error.call(this, 901), void o.default.process.call(this, 901); m.call(this), c.default.wire.call(this); var a = {}; a.AdParameters = this.adParametersData, r.default.show(this.adContainer), r.default.show(this.vastPlayer); var s = {}; this.vpaidSlot = document.createElement("div"), this.vpaidSlot.className = "rmp-vpaid-container", this.adContainer.appendChild(this.vpaidSlot), s.slot = this.vpaidSlot, s.videoSlot = this.vastPlayer, s.videoSlotCanAutoPlay = !0, this.initAdTimeout = setTimeout(function () { e.vpaidAdLoaded || d.default.resumeContent.call(e), e.vpaidAdLoaded = !1 }, 10 * this.params.creativeLoadTimeout), this.vpaidCreative.initAd(this.initialWidth, this.initialHeight, this.initialViewMode, this.desiredBitrate, a, s) } }; f.loadCreative = function (t, e) { if (this.initialWidth = e.width, this.initialHeight = e.height, this.initialViewMode = e.viewMode, this.desiredBitrate = e.desiredBitrate, this.vpaidCreativeUrl = t, !this.vastPlayer) if (this.useContentPlayerForAds) this.vastPlayer = this.contentPlayer; else { var i = this.adContainer.querySelector(".rmp-ad-vast-video-player"); if (null === i) return void o.default.process.call(this, 1004); this.vastPlayer = i } this.vpaidIframe = document.createElement("iframe"), this.vpaidIframe.id = "vpaid-frame", this.vpaidIframe.style.visibility = "hidden", this.vpaidIframe.style.width = "0px", this.vpaidIframe.style.height = "0px", this.vpaidIframe.style.border = "none"; var a = "about:self"; (s.default.isFirefox || this.useContentPlayerForAds) && (a = ""), this.vpaidIframe.onload = function () { var t = this; if (this.vpaidIframe.onload = this.vpaidIframe.onerror = r.default.nullFn, !this.vpaidIframe.contentWindow || !this.vpaidIframe.contentWindow.document || !this.vpaidIframe.contentWindow.document.body) return l.default.error.call(this, 901), void o.default.process.call(this, 901); var e = this.vpaidIframe.contentWindow.document, i = e.body; this.vpaidScript = e.createElement("script"), this.vpaidLoadTimeout = setTimeout(function () { t.vpaidScript.removeEventListener("load", t.onJSVPAIDLoaded), t.vpaidScript.removeEventListener("error", t.onJSVPAIDError), d.default.resumeContent.call(t) }, this.params.creativeLoadTimeout), this.onJSVPAIDLoaded = function () { var t = this; this.vpaidScript.removeEventListener("load", this.onJSVPAIDLoaded); var e = this.vpaidIframe.contentWindow; "function" == typeof e.getVPAIDAd ? v.call(this) : this.vpaidAvailableInterval = setInterval(function () { "function" == typeof e.getVPAIDAd && v.call(t) }, 100) }.bind(this), this.onJSVPAIDError = function () { this.vpaidScript.removeEventListener("error", this.onJSVPAIDError), l.default.error.call(this, 901), o.default.process.call(this, 901) }.bind(this), this.vpaidScript.addEventListener("load", this.onJSVPAIDLoaded), this.vpaidScript.addEventListener("error", this.onJSVPAIDError), i.appendChild(this.vpaidScript), this.vpaidScript.src = this.vpaidCreativeUrl }.bind(this), this.vpaidIframe.onerror = function () { this.vpaidIframe.onload = this.vpaidIframe.onerror = r.default.nullFn, l.default.error.call(this, 901), o.default.process.call(this, 901) }.bind(this), this.vpaidIframe.src = a, this.adContainer.appendChild(this.vpaidIframe) }, f.destroy = function () { this.vpaidAvailableInterval && clearInterval(this.vpaidAvailableInterval), this.vpaidLoadTimeout && clearTimeout(this.vpaidLoadTimeout), this.initAdTimeout && clearTimeout(this.initAdTimeout), this.startAdTimeout && clearTimeout(this.startAdTimeout), function () { if (this.vpaidCreative) for (var t = Object.keys(this.vpaidCallbacks), e = 0, i = t.length; e < i; e++) { var a = t[e]; this.vpaidCreative.unsubscribe(this.vpaidCallbacks[a], a) } }.call(this), this.vpaidScript && (this.vpaidScript.removeEventListener("load", this.onJSVPAIDLoaded), this.vpaidScript.removeEventListener("error", this.onJSVPAIDError)), this.vpaidSlot && r.default.removeElement(this.vpaidSlot), this.vpaidIframe && r.default.removeElement(this.vpaidIframe) }, i.default = f }, { "../creatives/icons": 256, "../fw/env": 260, "../fw/fw": 261, "../players/content-player": 263, "../players/vast-player": 264, "../tracking/ping": 266, "../tracking/tracking-events": 267, "../utils/helpers": 269, "../utils/vast-errors": 270 }], 266: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var d = a(t("../fw/fw")), h = a(t("../players/content-player")); function a(t) { return t && t.__esModule ? t : { default: t } } function r(t) { if (Array.isArray(t)) { for (var e = 0, i = Array(t.length); e < t.length; e++)i[e] = t[e]; return i } return Array.from(t) } var s = { events: ["impression", "creativeView", "start", "firstQuartile", "midpoint", "thirdQuartile", "complete", "mute", "unmute", "pause", "resume", "fullscreen", "exitFullscreen", "skip", "progress", "clickthrough", "close", "collapse", "acceptInvitation"] }, n = function (t, e, i) { var a = /\[CACHEBUSTING\]/gi, s = t; a.test(s) && (s = s.replace(a, d.default.generateCacheBusting())); var r = /\[ERRORCODE\]/gi; r.test(s) && d.default.isNumber(e) && 0 < e && e < 1e3 && (s = s.replace(r, e)); var n = /\[CONTENTPLAYHEAD\]/gi, o = h.default.getCurrentTime.call(this); n.test(s) && -1 < o && (o = d.default.vastReadableTime(o), s = s.replace(n, d.default.RFC3986EncodeURIComponent(o))); var l = /\[ASSETURI\]/gi; return l.test(s) && "string" == typeof i && "" !== i && (s = s.replace(l, d.default.RFC3986EncodeURIComponent(i))), s }, o = function (t) { var e = new Image; e.addEventListener("load", function () { e = null }), e.addEventListener("error", function () { e = null }), e.src = t }; s.tracking = function (t, e) { var i = n.call(this, t, null, e); o(i) }, s.error = function (t) { var e = this.inlineOrWrapperErrorTags; if (303 === t && 0 < this.vastErrorTags.length && (e = [].concat(r(e), r(this.vastErrorTags))), 0 < e.length) for (var i = 0, a = e.length; i < a; i++) { var s = n.call(this, e[i].url, t, null); o(s) } }, i.default = s }, { "../fw/fw": 261, "../players/content-player": 263 }], 267: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var o = r(t("../fw/fw")), l = r(t("./ping")), a = r(t("../utils/helpers")), s = r(t("../players/vast-player")); function r(t) { return t && t.__esModule ? t : { default: t } } var n = {}, d = function (e) { if (e && e.type) { 0; var t = this.trackingTags.filter(function (t) { return e.type === t.event }); 0 < t.length && function (t) { var e = this; t.forEach(function (t) { l.default.tracking.call(e, t.url, e.getAdMediaUrl()) }) }.call(this, t) } }; n.wire = function () { this.vastPlayer && this.adIsLinear && !this.isVPAID && (this.onPause = function () { if (!this.vastPlayerPaused) { this.vastPlayerPaused = !0, a.default.createApiEvent.call(this, "adpaused"); for (var t = 0, e = this.trackingTags.length; t < e; t++)if ("pause" === this.trackingTags[t].event) return; a.default.dispatchPingEvent.call(this, "pause") } }.bind(this), this.vastPlayer.addEventListener("pause", this.onPause), this.onPlay = function () { this.vastPlayerPaused && (this.vastPlayerPaused = !1, a.default.createApiEvent.call(this, "adresumed"), a.default.dispatchPingEvent.call(this, "resume")) }.bind(this), this.vastPlayer.addEventListener("play", this.onPlay), this.onPlaying = function () { this.vastPlayer.removeEventListener("playing", this.onPlaying), a.default.createApiEvent.call(this, "adimpression"), a.default.createApiEvent.call(this, "adstarted"), a.default.dispatchPingEvent.call(this, ["impression", "creativeView", "start"]) }.bind(this), this.vastPlayer.addEventListener("playing", this.onPlaying), this.onEnded = function () { this.vastPlayer.removeEventListener("ended", this.onEnded), a.default.createApiEvent.call(this, "adcomplete"), a.default.dispatchPingEvent.call(this, "complete"), s.default.resumeContent.call(this) }.bind(this), this.vastPlayer.addEventListener("ended", this.onEnded), this.onVolumeChange = function () { this.vastPlayer.muted || 0 === this.vastPlayer.volume ? (a.default.createApiEvent.call(this, "advolumemuted"), a.default.dispatchPingEvent.call(this, "mute"), this.vastPlayerMuted = !0) : this.vastPlayerMuted && (a.default.dispatchPingEvent.call(this, "unmute"), this.vastPlayerMuted = !1), a.default.createApiEvent.call(this, "advolumechanged") }.bind(this), this.vastPlayer.addEventListener("volumechange", this.onVolumeChange), this.onTimeupdate = function () { var e = this; this.vastPlayerCurrentTime = s.default.getCurrentTime.call(this), 0 < this.vastPlayerCurrentTime && (0 < this.vastPlayerDuration && this.vastPlayerDuration > this.vastPlayerCurrentTime && (this.vastPlayerCurrentTime >= .25 * this.vastPlayerDuration && !this.firstQuartileEventFired ? (this.firstQuartileEventFired = !0, a.default.createApiEvent.call(this, "adfirstquartile"), a.default.dispatchPingEvent.call(this, "firstQuartile")) : this.vastPlayerCurrentTime >= .5 * this.vastPlayerDuration && !this.midpointEventFired ? (this.midpointEventFired = !0, a.default.createApiEvent.call(this, "admidpoint"), a.default.dispatchPingEvent.call(this, "midpoint")) : this.vastPlayerCurrentTime >= .75 * this.vastPlayerDuration && !this.thirdQuartileEventFired && (this.thirdQuartileEventFired = !0, a.default.createApiEvent.call(this, "adthirdquartile"), a.default.dispatchPingEvent.call(this, "thirdQuartile"))), this.isSkippableAd && (null === this.progressEventOffsetsSeconds && (this.progressEventOffsetsSeconds = [], this.progressEventOffsets.forEach(function (t) { e.progressEventOffsetsSeconds.push({ offsetSeconds: o.default.convertOffsetToSeconds(t, e.vastPlayerDuration), offsetRaw: t }) }), this.progressEventOffsetsSeconds.sort(function (t, e) { return t.offsetSeconds - e.offsetSeconds })), Array.isArray(this.progressEventOffsetsSeconds) && 0 < this.progressEventOffsetsSeconds.length && this.vastPlayerCurrentTime >= 1e3 * this.progressEventOffsetsSeconds[0].offsetSeconds && (a.default.dispatchPingEvent.call(this, "progress-" + this.progressEventOffsetsSeconds[0].offsetRaw), this.progressEventOffsetsSeconds.shift()))) }.bind(this), this.vastPlayer.addEventListener("timeupdate", this.onTimeupdate)), this.onEventPingTracking = d.bind(this); for (var t = 0, e = this.trackingTags.length; t < e; t++)this.adIsLinear || this.isVPAID ? this.vastPlayer.addEventListener(this.trackingTags[t].event, this.onEventPingTracking) : this.nonLinearContainer.addEventListener(this.trackingTags[t].event, this.onEventPingTracking) }, n.filterPush = function (t) { var e = t[0].getElementsByTagName("Tracking"); 0 < this.adPodWrapperTrackings.length && (this.trackingTags = this.adPodWrapperTrackings); for (var i = 0, a = e.length; i < a; i++) { var s = e[i].getAttribute("event"), r = o.default.getNodeValue(e[i], !0); if (null !== s && "" !== s && -1 < l.default.events.indexOf(s) && null !== r) { if (this.isSkippableAd) if ("progress" === s) { var n = e[i].getAttribute("offset"); if (null === n || "" === n || !o.default.isValidOffset(n)) continue; this.progressEventOffsets.push(n), s = s + "-" + n } else "skip" === s && (this.hasSkipEvent = !0); this.trackingTags.push({ event: s, url: r }) } } }, i.default = n }, { "../fw/fw": 261, "../players/vast-player": 264, "../utils/helpers": 269, "./ping": 266 }], 268: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var a = n(t("../fw/fw")), s = n(t("../fw/env")), r = n(t("./helpers")); function n(t) { return t && t.__esModule ? t : { default: t } } var o = { instanceVariables: function () { this.adContainer = null, this.rmpVastInitialized = !1, this.useContentPlayerForAds = !1, this.contentPlayerCompleted = !1, this.currentContentSrc = "", this.currentContentCurrentTime = -1, this.needsSeekAdjust = !1, this.seekAdjustAttached = !1, this.onDestroyLoadAds = null, this.firstVastPlayerPlayRequest = !0, this.firstContentPlayerPlayRequest = !0, this.params = {}, this.adPod = [], this.standaloneAdsInPod = [], this.onAdDestroyLoadNextAdInPod = a.default.nullFn, this.runningAdPod = !1, this.adPodItemWrapper = !1, this.adPodCurrentIndex = 0, this.adPodApiInfo = [], this.adPodWrapperTrackings = [], (s.default.isIos[0] || s.default.isMacOSX && s.default.isSafari[0]) && (this.useContentPlayerForAds = !0) }, loadAdsVariables: function () { this.onLoadedmetadataPlay = null, this.onPlaybackError = null, this.onPause = null, this.onPlay = null, this.onPlaying = null, this.onEnded = null, this.onVolumeChange = null, this.onTimeupdate = null, this.onEventPingTracking = null, this.onClickThrough = null, this.onPlayingAppendIcons = null, this.onTimeupdateCheckSkip = null, this.onClickSkip = null, this.onNonLinearLoadSuccess = null, this.onNonLinearLoadError = null, this.onNonLinearClickThrough = null, this.onContextMenu = null, this.adTagUrl = "", this.vastPlayer = null, this.vpaidSlot = null, this.trackingTags = [], this.vastErrorTags = [], this.inlineOrWrapperErrorTags = [], this.adMediaUrl = "", this.adMediaHeight = null, this.adMediaWidth = null, this.vastPlayerMuted = !1, this.vastPlayerDuration = -1, this.vastPlayerCurrentTime = -1, this.firstQuartileEventFired = !1, this.midpointEventFired = !1, this.thirdQuartileEventFired = !1, this.vastPlayerPaused = !1, this.vastErrorCode = -1, this.adErrorType = "", this.vastErrorMessage = "", this.adSystem = "", this.adIsLinear = !1, this.adContentType = "", this.adTitle = "", this.adDescription = "", this.adOnStage = !1, this.clickThroughUrl = "", this.isWrapper = !1, this.vastAdTagURI = null, this.redirectsFollowed = 0, this.icons = [], this.clickUIOnMobile = null, this.customPlaybackCurrentTime = 0, this.antiSeekLogicInterval = null, this.creativeLoadTimeoutCallback = null, this.isSkippableAd = !1, this.hasSkipEvent = !1, this.skipoffset = "", this.progressEventOffsets = [], this.progressEventOffsetsSeconds = null, this.skipButton = null, this.skipWaiting = null, this.skipMessage = null, this.skipIcon = null, this.skippableAdCanBeSkipped = !1, this.nonLinearContainer = null, this.nonLinearATag = null, this.nonLinearImg = null, this.onClickCloseNonLinear = null, this.nonLinearCreativeHeight = 0, this.nonLinearCreativeWidth = 0, this.nonLinearContentType = "", this.nonLinearMinSuggestedDuration = 0, this.isVPAID = !1, this.vpaidCreative = null, this.vpaidScript = null, this.vpaidIframe = null, this.vpaidLoadTimeout = null, this.initAdTimeout = null, this.startAdTimeout = null, this.vpaidAvailableInterval = null, this.adStoppedTimeout = null, this.adSkippedTimeout = null, this.adParametersData = "", this.vpaidCurrentVolume = 1, this.vpaidPaused = !0, this.vpaidCreativeUrl = "", this.vpaidRemainingTime = -1, this.vpaidVersion = -1, this.vpaid1AdDuration = -1, this.initialWidth = 640, this.initialHeight = 360, this.initialViewMode = "normal", this.desiredBitrate = 500, this.vpaidAdLoaded = !1, this.vpaidAdStarted = !1, this.vpaidCallbacks = {}, this.onJSVPAIDLoaded = a.default.nullFn, this.onJSVPAIDError = a.default.nullFn }, fullscreen: function () { var e = !1; if (s.default.hasNativeFullscreenSupport) { var t = function (t) { t && t.type && ("fullscreenchange" === t.type ? e ? (e = !1, this.adOnStage && this.adIsLinear && r.default.dispatchPingEvent.call(this, "exitFullscreen")) : (e = !0, this.adOnStage && this.adIsLinear && r.default.dispatchPingEvent.call(this, "fullscreen")) : "webkitbeginfullscreen" === t.type ? this.adOnStage && this.adIsLinear && r.default.dispatchPingEvent.call(this, "fullscreen") : "webkitendfullscreen" === t.type && this.adOnStage && this.adIsLinear && r.default.dispatchPingEvent.call(this, "exitFullscreen")) }.bind(this); s.default.isIos[0] ? (this.contentPlayer.addEventListener("webkitbeginfullscreen", t), this.contentPlayer.addEventListener("webkitendfullscreen", t)) : document.addEventListener("fullscreenchange", t) } } }; i.default = o }, { "../fw/env": 260, "../fw/fw": 261, "./helpers": 269 }], 269: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); var r = a(t("../fw/fw")), n = a(t("./vast-errors")), o = a(t("../tracking/ping")); function a(t) { return t && t.__esModule ? t : { default: t } } var l = { filterParams: function (t) { if (this.params = { ajaxTimeout: 5e3, creativeLoadTimeout: 8e3, ajaxWithCredentials: !1, maxNumRedirects: 4, maxNumItemsInAdPod: 10, pauseOnClick: !0, skipMessage: "Skip ad", skipWaitingMessage: "Skip ad in", textForClickUIOnMobile: "Learn more", enableVpaid: !0, outstream: !1, vpaidSettings: { width: 640, height: 360, viewMode: "normal", desiredBitrate: 500 } }, r.default.isObject(t)) { for (var e = Object.keys(t), i = 0, a = e.length; i < a; i++) { var s = e[i]; typeof t[s] == typeof this.params[s] && (r.default.isNumber(t[s]) && 0 < t[s] || "number" != typeof t[s]) && ("vpaidSettings" === s ? (r.default.isNumber(t.vpaidSettings.width) && 0 < t.vpaidSettings.width && (this.params.vpaidSettings.width = t.vpaidSettings.width), r.default.isNumber(t.vpaidSettings.height) && 0 < t.vpaidSettings.height && (this.params.vpaidSettings.height = t.vpaidSettings.height), "string" == typeof t.vpaidSettings.viewMode && "fullscreen" === t.vpaidSettings.viewMode && (this.params.vpaidSettings.viewMode = t.vpaidSettings.viewMode), r.default.isNumber(t.vpaidSettings.desiredBitrate) && 0 < t.vpaidSettings.desiredBitrate && (this.params.vpaidSettings.desiredBitrate = t.vpaidSettings.desiredBitrate)) : this.params[s] = t[s]) } 30 < this.params.maxNumRedirects && (this.params.maxNumRedirects = 30) } }, createApiEvent: function (t) { "string" == typeof t && "" !== t && r.default.createStdEvent(t, this.container) }, dispatchPingEvent: function (t) { if (t) { var e = void 0; this.adIsLinear && this.vastPlayer ? e = this.vastPlayer : !this.adIsLinear && this.nonLinearContainer && (e = this.nonLinearContainer), e && (Array.isArray(t) ? t.forEach(function (t) { r.default.createStdEvent(t, e) }) : r.default.createStdEvent(t, e)) } }, playPromise: function (e, i) { var a = this, t = void 0; switch (e) { case "content": t = this.contentPlayer; break; case "vast": t = this.vastPlayer }if (t) { var s = t.play(); void 0 !== s && s.then(function () { i && l.createApiEvent.call(a, "adinitialplayrequestsucceeded") }).catch(function (t) { i && "vast" === e && a.adIsLinear ? (o.default.error.call(a, 400), n.default.process.call(a, 400), l.createApiEvent.call(a, "adinitialplayrequestfailed")) : i && "content" === e && !a.adIsLinear && l.createApiEvent.call(a, "adinitialplayrequestfailed") }) } }, accessibleButton: function (i, t) { i.tabIndex = 0, i.setAttribute("role", "button"), i.addEventListener("keyup", function (t) { var e = t.which; 13 !== e && 32 !== e || (t.stopPropagation(), t.preventDefault(), r.default.createStdEvent("click", i)) }), t && i.setAttribute("aria-label", t) } }; i.default = l }, { "../fw/fw": 261, "../tracking/ping": 266, "./vast-errors": 270 }], 270: [function (t, e, i) { "use strict"; Object.defineProperty(i, "__esModule", { value: !0 }); r(t("../fw/fw")); var a = r(t("../utils/helpers")), s = r(t("../players/vast-player")); function r(t) { return t && t.__esModule ? t : { default: t } } var n = {}, o = [100, 101, 102, 300, 301, 302, 303, 900, 1e3, 1001], l = [200, 201, 202, 203, 400, 401, 402, 403, 405, 500, 501, 502, 503, 600, 601, 602, 603, 604, 901, 1002, 1003, 1004], d = [{ code: 100, description: "XML parsing error." }, { code: 101, description: "VAST schema validation error." }, { code: 102, description: "VAST version of response not supported." }, { code: 200, description: "Trafficking error. Video player received an Ad type that it was not expecting and/or cannot display." }, { code: 201, description: "Video player expecting different linearity." }, { code: 202, description: "Video player expecting different duration." }, { code: 203, description: "Video player expecting different size." }, { code: 300, description: "General Wrapper error." }, { code: 301, description: "Timeout of VAST URI provided in Wrapper element, or of VAST URI provided in a subsequent Wrapper element. (URI was either unavailable or reached a timeout as defined by the video player.)" }, { code: 302, description: "Wrapper limit reached, as defined by the video player. Too many Wrapper responses have been received with no InLine response." }, { code: 303, description: "No Ads VAST response after one or more Wrappers." }, { code: 400, description: "General Linear error. Video player is unable to display the Linear Ad." }, { code: 401, description: "File not found. Unable to find Linear/MediaFile from URI." }, { code: 402, description: "Timeout of MediaFile URI." }, { code: 403, description: "Couldn't find MediaFile that is supported by this video player, based on the attributes of the MediaFile element." }, { code: 405, description: "Problem displaying MediaFile. Video player found a MediaFile with supported type but couldn't display it. MediaFile may include: unsupported codecs, different MIME type than MediaFile@type, unsupported delivery method, etc." }, { code: 500, description: "General NonLinearAds error." }, { code: 501, description: "Unable to display NonLinear Ad because creative dimensions do not align with creative display area (i.e. creative dimension too large)." }, { code: 502, description: "Unable to fetch NonLinearAds/NonLinear resource." }, { code: 503, description: "Couldn't find NonLinear resource with supported type." }, { code: 600, description: "General CompanionAds error." }, { code: 601, description: "Unable to display Companion because creative dimensions do not fit within Companion display area (i.e., no available space)." }, { code: 602, description: "Unable to display Required Companion." }, { code: 603, description: "Unable to fetch CompanionAds/Companion resource." }, { code: 604, description: "Couldn't find Companion resource with supported type." }, { code: 900, description: "Undefined Error." }, { code: 901, description: "General VPAID error." }, { code: 1e3, description: "Error processing AJAX call to retrieve adTag" }, { code: 1001, description: "Invalid input for loadAds method" }, { code: 1002, description: "Required DOMParser API is not available" }, { code: 1003, description: "Could not get source for content player" }, { code: 1004, description: "Could not find vast player in DOM" }]; n.process = function (t) { (function (e) { var t = d.filter(function (t) { return t.code === e }); 0 < t.length ? (this.vastErrorCode = t[0].code, this.vastErrorMessage = t[0].description) : (this.vastErrorCode = -1, this.vastErrorMessage = "Error getting VAST error"), -1 < this.vastErrorCode && (-1 < o.indexOf(this.vastErrorCode) ? this.adErrorType = "adLoadError" : -1 < l.indexOf(this.vastErrorCode) && (this.adErrorType = "adPlayError")) }).call(this, t), a.default.createApiEvent.call(this, "aderror"), s.default.resumeContent.call(this) }, i.default = n }, { "../fw/fw": 261, "../players/vast-player": 264, "../utils/helpers": 269 }]
}, {}, [54]), function (a) { if (void 0 !== a.fuckAdBlock || void 0 !== a.FuckAdBlock) return "object" != typeof a.rmpGlobals && (a.rmpGlobals = {}), a.rmpGlobals.adBlockerDetected = !0; var t = function (t) { this._options = { checkOnLoad: !1, resetOnEnd: !1, loopCheckTime: 50, loopMaxNumber: 5, baitClass: "pub_300x250 pub_300x250m pub_728x90 text-ad textAd text_ad text_ads text-ads text-ad-links", baitStyle: "width: 1px !important; height: 1px !important; position: absolute !important; left: -10000px !important; top: -1000px !important;", debug: !1 }, this._var = { version: "3.2.1", bait: null, checking: !1, loop: null, loopNumber: 0, event: { detected: [], notDetected: [] } }, void 0 !== t && this.setOption(t); var e = this, i = function () { setTimeout(function () { !0 === e._options.checkOnLoad && (!0 === e._options.debug && e._log("onload->eventCallback", "A check loading is launched"), null === e._var.bait && e._creatBait(), setTimeout(function () { e.check() }, 1)) }, 1) }; void 0 !== a.addEventListener ? a.addEventListener("load", i, !1) : a.attachEvent("onload", i) }; t.prototype._options = null, t.prototype._var = null, t.prototype._bait = null, t.prototype._log = function (t, e) { console.log("[adblockDetector][" + t + "] " + e) }, t.prototype.setOption = function (t, e) { if (void 0 !== e) { var i = t; (t = {})[i] = e } for (var a in t) this._options[a] = t[a], !0 === this._options.debug && this._log("setOption", 'The option "' + a + '" was assigned to "' + t[a] + '"'); return this }, t.prototype._creatBait = function () { var t = document.createElement("div"); t.setAttribute("class", this._options.baitClass), t.setAttribute("style", this._options.baitStyle), this._var.bait = a.document.body.appendChild(t), this._var.bait.offsetParent, this._var.bait.offsetHeight, this._var.bait.offsetLeft, this._var.bait.offsetTop, this._var.bait.offsetWidth, this._var.bait.clientHeight, this._var.bait.clientWidth, !0 === this._options.debug && this._log("_creatBait", "Bait has been created") }, t.prototype._destroyBait = function () { a.document.body.removeChild(this._var.bait), !(this._var.bait = null) === this._options.debug && this._log("_destroyBait", "Bait has been removed") }, t.prototype.check = function (t) { if (void 0 === t && (t = !0), !0 === this._options.debug && this._log("check", "An audit was requested " + (!0 === t ? "with a" : "without") + " loop"), !0 === this._var.checking) return !0 === this._options.debug && this._log("check", "A check was canceled because there is already an ongoing"), !1; this._var.checking = !0, null === this._var.bait && this._creatBait(); var e = this; return !(this._var.loopNumber = 0) === t && (this._var.loop = setInterval(function () { e._checkBait(t) }, this._options.loopCheckTime)), setTimeout(function () { e._checkBait(t) }, 1), !0 === this._options.debug && this._log("check", "A check is in progress ..."), !0 }, t.prototype._checkBait = function (t) { var e = !1; if (null === this._var.bait && this._creatBait(), null === a.document.body.getAttribute("abp") && null !== this._var.bait.offsetParent && 0 !== this._var.bait.offsetHeight && 0 !== this._var.bait.offsetLeft && 0 !== this._var.bait.offsetTop && 0 !== this._var.bait.offsetWidth && 0 !== this._var.bait.clientHeight && 0 !== this._var.bait.clientWidth || (e = !0), void 0 !== a.getComputedStyle) { var i = a.getComputedStyle(this._var.bait, null); !i || "none" !== i.getPropertyValue("display") && "hidden" !== i.getPropertyValue("visibility") || (e = !0) } !0 === this._options.debug && this._log("_checkBait", "A check (" + (this._var.loopNumber + 1) + "/" + this._options.loopMaxNumber + " ~" + (1 + this._var.loopNumber * this._options.loopCheckTime) + "ms) was conducted and detection is " + (!0 === e ? "positive" : "negative")), !0 === t && (this._var.loopNumber++ , this._var.loopNumber >= this._options.loopMaxNumber && this._stopLoop()), !0 === e ? (this._stopLoop(), this._destroyBait(), this.emitEvent(!0), !0 === t && (this._var.checking = !1)) : null !== this._var.loop && !1 !== t || (this._destroyBait(), this.emitEvent(!1), !0 === t && (this._var.checking = !1)) }, t.prototype._stopLoop = function () { clearInterval(this._var.loop), this._var.loop = null, !(this._var.loopNumber = 0) === this._options.debug && this._log("_stopLoop", "A loop has been stopped") }, t.prototype.emitEvent = function (t) { !0 === this._options.debug && this._log("emitEvent", "An event with a " + (!0 === t ? "positive" : "negative") + " detection was called"); var e = this._var.event[!0 === t ? "detected" : "notDetected"]; for (var i in e) !0 === this._options.debug && this._log("emitEvent", "Call function " + (parseInt(i) + 1) + "/" + e.length), e.hasOwnProperty(i) && e[i](); return !0 === this._options.resetOnEnd && this.clearEvent(), this }, t.prototype.clearEvent = function () { this._var.event.detected = [], this._var.event.notDetected = [], !0 === this._options.debug && this._log("clearEvent", "The event list has been cleared") }, t.prototype.on = function (t, e) { return this._var.event[!0 === t ? "detected" : "notDetected"].push(e), !0 === this._options.debug && this._log("on", 'A type of event "' + (!0 === t ? "detected" : "notDetected") + '" was added'), this }, t.prototype.onDetected = function (t) { return this.on(!0, t) }, t.prototype.onNotDetected = function (t) { return this.on(!1, t) }, a.FuckAdBlock = t, void 0 === a.fuckAdBlock && (a.fuckAdBlock = new t({ checkOnLoad: !0, resetOnEnd: !0 })) }(window);;
//If changing penpal version, please be aware that higher version dont seem to work with IE
!function (e, n) { var t = {}; !function (e) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.default = e.ERR_IFRAME_ALREADY_ATTACHED_TO_DOM = e.ERR_NOT_IN_IFRAME = e.ERR_CONNECTION_TIMEOUT = e.ERR_CONNECTION_DESTROYED = void 0; e.ERR_CONNECTION_DESTROYED = "ConnectionDestroyed"; e.ERR_CONNECTION_TIMEOUT = "ConnectionTimeout"; e.ERR_NOT_IN_IFRAME = "NotInIframe"; e.ERR_IFRAME_ALREADY_ATTACHED_TO_DOM = "IframeAlreadyAttachedToDom"; var n = { "http:": "80", "https:": "443" }, t = /^(https?:|file:)?\/\/([^/:]+)?(:(\d+))?/, o = { ERR_CONNECTION_DESTROYED: "ConnectionDestroyed", ERR_CONNECTION_TIMEOUT: "ConnectionTimeout", ERR_NOT_IN_IFRAME: "NotInIframe", ERR_IFRAME_ALREADY_ATTACHED_TO_DOM: "IframeAlreadyAttachedToDom", Promise: function () { try { return window ? window.Promise : null } catch (e) { return null } }(), debug: !1 }, r = (l = 0, function () { return ++l }), a = function () { if (o.debug) { for (var e, n = arguments.length, t = new Array(n), r = 0; r < n; r++)t[r] = arguments[r]; (e = console).log.apply(e, ["[Penpal]"].concat(t)) } }, i = function (e) { var n = []; return e(function () { n.forEach(function (e) { e() }) }), { then: function (e) { n.push(e) } } }, c = function (e) { var n = e.name, t = e.message, o = e.stack; return { name: n, message: t, stack: o } }, d = function (e, n, t, i, c) { var d = n.localName, s = n.local, l = n.remote, u = n.remoteOrigin, f = !1; a("".concat(d, ": Connecting call sender")); var m = function (e) { return function () { for (var n = arguments.length, t = new Array(n), c = 0; c < n; c++)t[c] = arguments[c]; if (a("".concat(d, ": Sending ").concat(e, "() call")), l.closed && i(), f) { var m = new Error("Unable to send ".concat(e, "() call due ") + "to destroyed connection"); throw m.code = "ConnectionDestroyed", m } return new o.Promise(function (n, o) { var i = r(); s.addEventListener("message", function t(r) { if (r.source === l && r.origin === u && "reply" === r.data.penpal && r.data.id === i) { a("".concat(d, ": Received ").concat(e, "() reply")), s.removeEventListener("message", t); var c = r.data.returnValue; r.data.returnValueIsError && (f = c, m = new Error, Object.keys(f).forEach(function (e) { return m[e] = f[e] }), c = m), ("fulfilled" === r.data.resolution ? n : o)(c) } var f, m }), l.postMessage({ penpal: "call", id: i, methodName: e, args: t }, u) }) } }; c.then(function () { f = !0 }), t.reduce(function (e, n) { return e[n] = m(n), e }, e) }, s = function (e, n, t) { var r = e.localName, i = e.local, d = e.remote, s = e.remoteOrigin, l = !1; a("".concat(r, ": Connecting call receiver")); var u = function (e) { if (e.source === d && e.origin === s && "call" === e.data.penpal) { var t = e.data, i = t.methodName, u = t.args, f = t.id; if (a("".concat(r, ": Received ").concat(i, "() call")), i in n) { var m = function (e) { return function (n) { if (a("".concat(r, ": Sending ").concat(i, "() reply")), l) a("".concat(r, ": Unable to send ").concat(i, "() reply due to destroyed connection")); else { var t = { penpal: "reply", id: f, resolution: e, returnValue: n }; "rejected" === e && n instanceof Error && (t.returnValue = c(n), t.returnValueIsError = !0); try { d.postMessage(t, s) } catch (e) { throw "DataCloneError" === e.name && d.postMessage({ penpal: "reply", id: f, resolution: "rejected", returnValue: c(e), returnValueIsError: !0 }, s), e } } } }; new o.Promise(function (e) { return e(n[i].apply(n, u)) }).then(m("fulfilled"), m("rejected")) } } }; i.addEventListener("message", u), t.then(function () { l = !0, i.removeEventListener("message", u) }) }; var l; o.connectToChild = function (e) { var r, c = e.url, l = e.appendTo, u = e.iframe, f = e.methods, m = void 0 === f ? {} : f, v = e.timeout; if (u && u.parentNode) { var E = new Error("connectToChild() must not be called with an iframe already attached to DOM"); throw E.code = "IframeAlreadyAttachedToDom", E } var p = new i(function (e) { r = e }), h = window; (u = u || document.createElement("iframe")).src = c; var T = function (e) { var o, r, a, i = document.location, c = t.exec(e); c ? (o = c[1] ? c[1] : i.protocol, r = c[2], a = c[4]) : (o = i.protocol, r = i.hostname, a = i.port); if ("file:" === o) return "null"; var d = a && a !== n[o] ? ":".concat(a) : ""; return "".concat(o, "//").concat(r).concat(d) }(c), g = new o.Promise(function (e, n) { var t; void 0 !== v && (t = setTimeout(function () { var e = new Error("Connection to child timed out after ".concat(v, "ms")); e.code = "ConnectionTimeout", n(e), r() }, v)); var o, c, f = {}, E = function (n) { var l = u.contentWindow; if (n.source === l && n.origin === T && "handshake" === n.data.penpal) { a("Parent: Received handshake, sending reply"); var v = "null" === n.origin ? "*" : n.origin; n.source.postMessage({ penpal: "handshake-reply", methodNames: Object.keys(m) }, v); var E = { localName: "Parent", local: h, remote: l, remoteOrigin: v }; c && c(); var g = new i(function (e) { p.then(e), c = e }); s(E, m, g), o && o.forEach(function (e) { delete f[e] }), o = n.data.methodNames, d(f, E, o, r, p), clearTimeout(t), e(f) } }; h.addEventListener("message", E), a("Parent: Loading iframe"), (l || document.body).appendChild(u); var g = setInterval(function () { document.body.contains(u) || (clearInterval(g), r()) }, 6e4); p.then(function () { u.parentNode && u.parentNode.removeChild(u), h.removeEventListener("message", E), clearInterval(g); var e = new Error("Connection destroyed"); e.code = "ConnectionDestroyed", n(e) }) }); return { promise: g, iframe: u, destroy: r } }, o.connectToParent = function () { var e, n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, t = n.parentOrigin, r = void 0 === t ? "*" : t, c = n.methods, l = void 0 === c ? {} : c, u = n.timeout; if (window === window.top) { var f = new Error("connectToParent() must be called within an iframe"); throw f.code = "NotInIframe", f } var m = new i(function (n) { e = n }), v = window, E = v.parent, p = new o.Promise(function (n, t) { var o; void 0 !== u && (o = setTimeout(function () { var n = new Error("Connection to parent timed out after ".concat(u, "ms")); n.code = "ConnectionTimeout", t(n), e() }, u)); var i = function t(i) { if (("*" === r || r === i.origin) && i.source === E && "handshake-reply" === i.data.penpal) { a("Child: Received handshake reply"), v.removeEventListener("message", t); var c = { localName: "Child", local: v, remote: E, remoteOrigin: i.origin }, u = {}; s(c, l, m), d(u, c, i.data.methodNames, e, m), clearTimeout(o), n(u) } }; v.addEventListener("message", i), m.then(function () { v.removeEventListener("message", i); var e = new Error("Connection destroyed"); e.code = "ConnectionDestroyed", t(e) }), a("Child: Sending handshake"), E.postMessage({ penpal: "handshake", methodNames: Object.keys(l) }, r) }); return { promise: p, destroy: e } }; var u = o; e.default = u }(t), "function" == typeof define && define.amd ? define("Penpal", t.default) : e.Penpal = t.default }(this);

;
var MediaPlayer;
(function (MediaPlayer) {
    var MediaType = Passel.API.Domain.Models.MediaLibrary.MediaType;
    var MediaPlayerKey = 'cHhya2p3cXJxdEAxNTQ0MTA3';
    function InitializeMediaPlayer(data) {
        var rmpContainer = document.getElementById(data.elementId);
        var intervalCheck;
        rmpContainer.addEventListener('firstframe', function () {
            LogMediaPlayerView(rmp, data.mediaType, data.passleFileId);
            intervalCheck = SetupGoogleAnalyticPlayDurationLogging(rmp, data);
        });
        rmpContainer.addEventListener('ended', function () {
            clearInterval(intervalCheck);
            registerEvent('playerended', data);
        });
        rmpContainer.addEventListener('ready', function () {
            registerEvent("ready", data);
        });
        rmpContainer.addEventListener('play', function () {
            registerEvent("playerstarted", data);
        });
        rmpContainer.addEventListener('error', function () {
            registerEvent("error", data);
        });
        var rmp = new RadiantMP(data.elementId);
        rmp.init(GetSettings(data.mediaType, data.mediaItems, data.posterUrl));
    }
    MediaPlayer.InitializeMediaPlayer = InitializeMediaPlayer;
    function GetSettings(mediaType, mediaItems, posterUrl) {
        return {
            licenseKey: MediaPlayerKey,
            src: mediaItems,
            skin: 's1',
            preload: 'none',
            hlsJSCapLevelToPlayerSize: false,
            hlsJSStartLevel: 5,
            audioOnly: false,
            poster: posterUrl,
            hideExternalPlayerLabels: true,
            gaAnonymizeIp: false
        };
    }
    function LogMediaPlayerView(rmp, mediaType, passleFileId) {
        var env = rmp.getEnvironment();
        var viewData = {
            IsAndroid: env.isAndroid[0],
            IsIOS: env.isIos[0],
            IsMobile: env.isMobile,
            IsWebView: env.isWebView,
            IsIPad: env.isIpad,
            IsIphone: env.isIphone,
            IsMacosSafari: env.isMacosSafari[0],
            MediaType: mediaType,
            StreamType: rmp.getStreamType(),
            PassleFileId: passleFileId,
            Url: document.location.href
        };
        var params = $.param(viewData);
        //do this logging via iframe. This means that we can pick up the personid from the user's cookie if they are logged in, even from other domains.
        var url = 'https://' + PassleEnvironmentConfig.PassleWebRoot + '/MediaLibrary/MediaPlayerView' + '?' + params;
        $('body').append('<iframe class="hide" name="log-media-player-view" src="' + url + '"></iframe>');
    }
    function SetupGoogleAnalyticPlayDurationLogging(rmp, data) {
        var lastDifferential = -1;
        var logCounter = 1;
        var sendingThreshold = 30000;
        // We will use an interval checking our differential threshold every 500 ms
        var interval = setInterval(function () {
            var timeViewed = rmp.getTimeViewed();
            if (timeViewed > lastDifferential) {
                var diff = timeViewed - lastDifferential;
                if (diff >= sendingThreshold) {
                    var label = (sendingThreshold / 1000) * logCounter + "s-played";
                    lastDifferential = timeViewed;
                    registerEvent(label, data);
                    logCounter++;
                }
            }
        }, 500);
        return interval;
    }
    function registerEvent(label, data) {
        var action = data.mediaType == MediaType.Audio ? ClientSideEventAction.PlayAudio : ClientSideEventAction.PlayVideo;
        EventTracking.RegisterEvent(new EventTracking.TrackedEvent(action, ClientSideEventCategory.MediaPlayer, label, location.protocol + '//' + location.host + location.pathname));
    }
})(MediaPlayer || (MediaPlayer = {}));
;
class ProcessUrlFragment extends Component {
    constructor(FragmentActions) {
        super();
        this.FragmentActions = FragmentActions;
    }
    ProcessFragment(removeFragmentAfterProcessing) {
        var fragment = this.GetFragment();
        if (fragment) {
            var fragmentAction = this.FragmentActions.find(f => f.Fragment == fragment);
            if (fragmentAction) {
                (fragmentAction).Action(fragmentAction.ActionData);
            }
        }
        if (removeFragmentAfterProcessing) {
            this.RemoveFragment();
        }
    }
    GetFragment() {
        if (window.location.hash) {
            return window.location.hash.substring(1);
        }
    }
    RemoveFragment() {
        if (window.location.href.indexOf('#') != -1) {
            this.SetFragment('');
            this.SetFavicon();
            if (typeof window.history.replaceState == 'function') {
                history.replaceState({}, '', window.location.href.slice(0, -1));
            }
        }
    }
    SetFragment(fragment) {
        window.location.hash = fragment;
    }
    SetFavicon() {
        $('#favicon').detach().appendTo('head');
    }
}
;
/// <reference path="../../../TypeScript/definitions/jquery.d.ts" />
/// <reference path="../Component.ts" />
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var SuggestionType;
(function (SuggestionType) {
    SuggestionType[SuggestionType["Tag"] = 0] = "Tag";
    SuggestionType[SuggestionType["Person"] = 1] = "Person";
    SuggestionType[SuggestionType["Client"] = 2] = "Client";
})(SuggestionType || (SuggestionType = {}));
var AutosuggestComponent = /** @class */ (function (_super) {
    __extends(AutosuggestComponent, _super);
    function AutosuggestComponent(inputId, suggestionsId, ajaxController, ajaxAction, options) {
        var _this = _super.call(this) || this;
        _this.options = {
            inputMinLength: 2,
            numberOfSuggestions: 5,
            suggestionTemplate: '<li class="autosuggest__suggestion autosuggest__suggestion--{suggestionType}">{suggestion}</li>',
            ajaxThrottle: 250
        };
        _this.keyboardEventsBound = false;
        _this.options = $.extend(_this.options, options);
        _this.$input = $('#' + inputId);
        _this.$suggestionsList = $('#' + suggestionsId);
        _this.ajaxController = ajaxController;
        _this.ajaxAction = ajaxAction;
        _this.Init();
        return _this;
    }
    AutosuggestComponent.prototype.SubscribeToEvents = function () { };
    ;
    AutosuggestComponent.prototype.BindUIEvents = function () { };
    ;
    AutosuggestComponent.prototype.Init = function () {
        var thisObj = this;
        thisObj.$input.on('keyup change', function () {
            if (!thisObj.ignoreInputChangeEventOnce) {
                var query = thisObj.$input.val();
                if (query.length >= thisObj.options.inputMinLength) {
                    thisObj.ShowSuggestionsList(query);
                }
                else {
                    thisObj.HideSuggestionsList();
                }
            }
            else {
                thisObj.ignoreInputChangeEventOnce = false;
            }
        }).on('blur', function () {
            thisObj.RestoreOriginalQuery();
            thisObj.HideSuggestionsList();
        });
        thisObj.BindMouseControls();
    };
    AutosuggestComponent.prototype.ShowSuggestionsList = function (query) {
        var thisObj = this;
        clearTimeout(thisObj.ajaxTimeout);
        thisObj.ajaxTimeout = setTimeout(function () {
            if (query !== thisObj.ajaxPrevQuery) {
                var model = {
                    query: query,
                    limit: thisObj.options.numberOfSuggestions
                };
                var AjaxFunctions = window.AjaxFunctions || null;
                AjaxFunctions.AjaxFetchData(model, thisObj.ajaxController, thisObj.ajaxAction, false, function (response) {
                    var suggestions = response.Suggestions;
                    var queryMatchRegex = new RegExp(query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), "i"); // http://stackoverflow.com/a/6969486
                    var suggestionValue = '';
                    var suggestionType;
                    var suggestionsListHtml = '';
                    var suggestionHtml = '';
                    var suggestionMatchedText = '';
                    var suggestionQueryAddition = '';
                    if (suggestions.length > 0 && thisObj.$input.val().length >= thisObj.options.inputMinLength) {
                        for (var i = 0, suggestionsLength = suggestions.length; i < suggestionsLength; i++) {
                            suggestionValue = suggestions[i].Value;
                            suggestionType = suggestions[i].Type;
                            suggestionMatchedText = suggestionValue.match(queryMatchRegex)[0];
                            suggestionQueryAddition = suggestionValue.replace(queryMatchRegex, '');
                            suggestionHtml = "<span class=\"autosuggest__query\">" + suggestionMatchedText + "</span><span class=\"autosuggest__query-addition\">" + suggestionQueryAddition + "</span>";
                            suggestionsListHtml += thisObj.options.suggestionTemplate.replace('{suggestion}', suggestionHtml).replace('{suggestionType}', suggestionType.toString().toLowerCase());
                        }
                        thisObj.$suggestionsList.html(suggestionsListHtml);
                        thisObj.BindKeyboardControls();
                        thisObj.$suggestionsList.addClass('autosuggest--visible');
                        thisObj.originalQuery = query;
                    }
                    else {
                        thisObj.HideSuggestionsList();
                    }
                    thisObj.ajaxPrevQuery = query;
                });
            }
        }, thisObj.options.ajaxThrottle);
    };
    AutosuggestComponent.prototype.HideSuggestionsList = function () {
        var thisObj = this;
        thisObj.UnbindKeyboardControls();
        thisObj.ajaxPrevQuery = "";
        clearTimeout(thisObj.ajaxTimeout);
        thisObj.$suggestionsList.removeClass('autosuggest--visible').empty();
    };
    AutosuggestComponent.prototype.RestoreOriginalQuery = function () {
        var thisObj = this;
        if (thisObj.originalQuery && thisObj.originalQuery.length > 0 && thisObj.$input.val().length > 0) {
            thisObj.$input.val(thisObj.originalQuery);
            thisObj.originalQuery = "";
        }
    };
    AutosuggestComponent.prototype.BindKeyboardControls = function () {
        var thisObj = this;
        if (!thisObj.keyboardEventsBound) {
            thisObj.$input.on('keydown', { context: thisObj }, thisObj.HandleKeyboardControls);
            thisObj.keyboardEventsBound = true;
        }
    };
    AutosuggestComponent.prototype.UnbindKeyboardControls = function () {
        var thisObj = this;
        thisObj.$input.off('keydown', thisObj.HandleKeyboardControls);
        thisObj.keyboardEventsBound = false;
    };
    AutosuggestComponent.prototype.HandleKeyboardControls = function (e) {
        var thisObj = e.data.context;
        var UP = 38;
        var DOWN = 40;
        var ENTER = 13;
        var ESC = 27;
        var keyPressed = e.which;
        if (keyPressed === UP || keyPressed === DOWN) {
            var activeIndex = thisObj.$suggestionsList.find('.autosuggest__suggestion--active').index();
            var listLength = thisObj.$suggestionsList.children().length;
            if (keyPressed === UP)
                activeIndex--;
            if (keyPressed === DOWN)
                activeIndex++;
            activeIndex = (activeIndex < 0) ? listLength - 1 : activeIndex;
            activeIndex = (activeIndex >= listLength) ? 0 : activeIndex;
            thisObj.$suggestionsList.find('.autosuggest__suggestion--active').removeClass('autosuggest__suggestion--active');
            var $activeSuggestion = thisObj.$suggestionsList.children().eq(activeIndex);
            $activeSuggestion.addClass('autosuggest__suggestion--active');
            thisObj.$input.val($activeSuggestion.text());
            thisObj.SelectRange(thisObj.$input, $activeSuggestion.text().length - $activeSuggestion.find('.autosuggest__query-addition').text().length, $activeSuggestion.text().length);
            thisObj.ignoreInputChangeEventOnce = true;
            e.preventDefault();
        }
        else if (keyPressed === ENTER) {
            var $activeSuggestion = thisObj.$suggestionsList.find('.autosuggest__suggestion--active');
            if ($activeSuggestion.length > 0) {
                var inputText = "\"" + $activeSuggestion.text() + "\"";
                thisObj.$input.val(inputText).parents('form').submit();
                e.preventDefault();
            }
        }
        else if (keyPressed === ESC) {
            thisObj.ignoreInputChangeEventOnce = true;
            thisObj.RestoreOriginalQuery();
            thisObj.HideSuggestionsList();
            e.preventDefault();
        }
    };
    AutosuggestComponent.prototype.BindMouseControls = function () {
        var thisObj = this;
        thisObj.$suggestionsList.on('mouseenter', 'li', function (e) {
            thisObj.$suggestionsList.find('.autosuggest__suggestion--active').removeClass('autosuggest__suggestion--active');
            $(e.currentTarget).addClass('autosuggest__suggestion--active');
        }).on('mouseleave', 'li', function (e) {
            $(e.currentTarget).removeClass('autosuggest__suggestion--active');
        }).on('mousedown touchstart', 'li', function (e) {
            var searchTerm = thisObj.$suggestionsList.find('.autosuggest__suggestion--active').text() || $(e.currentTarget).text();
            thisObj.$input.val(searchTerm).parents('form').submit();
        });
    };
    AutosuggestComponent.prototype.SelectRange = function ($el, start, end) {
        var thisObj = this;
        var el = $el[0];
        if (el.setSelectionRange) {
            el.focus();
            el.setSelectionRange(start, end);
        }
        else if (el.createTextRange) {
            var range = el.createTextRange();
            range.collapse(true);
            range.moveEnd('character', end);
            range.moveStart('character', start);
            range.select();
        }
        else if (el.selectionStart) {
            el.selectionStart = start;
            el.selectionEnd = end;
        }
    };
    return AutosuggestComponent;
}(Component));
;
class PassleHeader extends Component {
    constructor() {
        super();
        this.AboutViewLogged = false;
        this.UpdateUI();
        this.Initialise();
        this.Autosuggest = new AutosuggestComponent("passleSearchTerm", "passleSearchSuggestions", "SearchAjax", "GetSuggestions");
        this.SubscribeToEvents();
    }
    UpdateUI() {
        var thisObj = this;
        thisObj.TitlePositioning();
        thisObj.IsFixedWidthCustomDesign('#passle-page-wrapper');
    }
    SubscribeToEvents() {
        GlobalEvents.UserAuthenticationComplete.on((data) => {
            var passleShortcode = $("#passle-shortcode").val();
            if (data.user && data.user.CanEdit) {
                $('.edit-button-container').show();
            }
            if (data.user &&
                !data.user.IsContentSharer(passleShortcode) &&
                (data.user.IsMember(passleShortcode) || data.user.UserType == Passel.API.Domain.Models.UserType.SystemAdministrator)) {
                $('.manage-posts-button-container').show();
            }
        });
    }
    BindUIEvents() {
        var thisObj = this;
        thisObj.SetupSearchFormFunctionality();
        $(".public-header").on("click", ".about", function (evt) {
            evt.preventDefault();
            if (!thisObj.AboutViewLogged) {
                EventTracking.RegisterEvent(new EventTracking.TrackedEvent(Passel.API.Domain.Models.Tracking.ClientSideEventAction.Click, Passel.API.Domain.Models.Tracking.ClientSideEventCategory.PassleHeader, "About section"));
                thisObj.AboutViewLogged = true;
            }
            thisObj.RetrieveRepostCountForPassle();
            $('.archive-container').slideUp("fast", function () {
                $('.about-container').slideToggle();
            });
        });
        $(".public-header").on("click", ".archive", function (evt) {
            evt.preventDefault();
            $('.about-container').slideUp("fast", function () {
                $('.archive-container').slideToggle();
            });
        });
        $(".public-header").on("click", ".header-nav-mobile-button", function (evt) {
            $('.nav__second-line__actions').slideToggle();
        });
        $(window).on("resize", function () {
            if (window.innerWidth > 984) {
                $('.nav__second-line__actions').css("display", "");
            }
        });
        $('#nav-button').on('click', function () {
            EventTracking.RegisterEvent(new EventTracking.TrackedEvent(Passel.API.Domain.Models.Tracking.ClientSideEventAction.Click, Passel.API.Domain.Models.Tracking.ClientSideEventCategory.PassleHeader, "User home"));
        });
    }
    SetupSearchFormFunctionality() {
        $('body').on('click', '#passleSearchClose', function () {
            if ($('#passleSearchTerm').val()) {
                $('#passleSearchTerm').val('');
            }
            else {
                $("#passleSearchForm").submit();
            }
        });
    }
    SetupNavButton(user) {
        var thisObj = this;
        $('#nav-button').fadeIn();
    }
    TitlePositioning() {
        var thisObj = this;
        var dashboardButton = $('#nav-button');
        var title = $('.passle-title');
        if (title.length > 0 && dashboardButton.length > 0) {
            thisObj.RepositionTitle(title, dashboardButton);
            window.onresize = function () {
                thisObj.RepositionTitle(title, dashboardButton);
            };
        }
    }
    RepositionTitle(title, dashboardButton) {
        var titleText = title.find('a');
        var titleLineHeight = parseInt(title.css('line-height')), titleHeight = title.height(), titleOffset = title.offset().left, titleTextOffset = titleText.offset().left, dashboardButtonOffset = dashboardButton.offset().left, dashboardButtonWidth = dashboardButton.outerWidth(), dashboardButtonRightEdge = dashboardButtonOffset + dashboardButtonWidth, currentTitlePadding = parseInt(title.css('padding-left')), newTitlePadding = dashboardButtonRightEdge - titleOffset;
        if (titleHeight == titleLineHeight) {
            if ((titleTextOffset - currentTitlePadding) < dashboardButtonRightEdge) {
                title.css("padding-left", (dashboardButtonRightEdge - titleOffset) + "px");
            }
            else {
                title.css("padding-left", "0px");
            }
        }
        else {
            if (titleTextOffset < dashboardButtonRightEdge) {
                title.css("padding-left", (dashboardButtonRightEdge - titleOffset) + "px");
            }
        }
    }
    RetrieveRepostCountForPassle() {
        var model = {
            passleShortcode: $('#passle-shortcode').val()
        };
        AjaxFunctions.AjaxFetchData(model, "PassleAjax", "GetRepostCountForPassle", false, function (result) {
            if (result.Success) {
                var $repostsField = $('#statistics-container-reposts');
                $repostsField.html(result.Data.toString());
            }
        });
    }
    IsFixedWidthCustomDesign(pageWrapper) {
        var winWidth = $(window).width(), wrapper = $(pageWrapper), wrapperWidth = wrapper.outerWidth();
        if (wrapperWidth < winWidth) {
            wrapper.addClass('fixed-width-cd');
        }
    }
}
;
class FollowButton extends Component {
    constructor(PassleWebSiteRoot, passleShortcode) {
        super();
        this.PassleWebSiteRoot = PassleWebSiteRoot;
        this.passleShortcode = passleShortcode;
        this.UserIsCurrentlyFollowing = false;
        this.ButtonSelector = '.passle-follow[data-shortcode="' + passleShortcode + '"]';
        this.HasValidNewsletter = $(this.ButtonSelector).attr("data-hasvalidnewsletter") == "True";
        this.Initialise();
        this.SubscribeToEvents();
    }
    Initialise() {
        var thisObj = this;
        if (thisObj.HasValidNewsletter) {
            $(thisObj.ButtonSelector).addClass('passle-subscribe-email');
            $('body').on('click', thisObj.ButtonSelector, function (e) {
                e.preventDefault();
                thisObj.SetupNewsletterSubscribeButton(this);
            });
        }
    }
    SubscribeToEvents() {
        var thisObj = this;
        GlobalEvents.NewsletterSubscribeRequestComplete.on((success) => {
            var $elem = $(thisObj.ButtonSelector);
            $elem.spin(false);
            if (success) {
                $('#subscribe-email-address').val('');
                $elem.children('input').animate({
                    "width": "0"
                }).remove();
                $elem.addClass('email-sent').children('span').html('Confirmation email sent').css({
                    "border-color": "transparent"
                }).off('click');
            }
        });
    }
    SetupShowHideForm() {
        var thisObj = this;
        $("body").bind("click", function (e) {
            if (!$(e.target).hasClass("passle-follow") && !$(e.target).parent(".passle-follow").length) {
                if ($("#subscribe-email-address").is(":visible")) {
                    thisObj.DisplayHideSubscribeEmailForm(false);
                }
            }
            else {
                if (!$("#subscribe-email-address").is(":visible")) {
                    thisObj.DisplayHideSubscribeEmailForm(true);
                }
            }
        });
    }
    SetupNewsletterSubscribeButton(elem) {
        var thisObj = this;
        $('body').off('click', thisObj.ButtonSelector);
        $(elem).children('span')
            .first()
            .before("<input id='subscribe-email-address' type='text' placeholder='enter email address...' />")
            .on('click', function () {
            thisObj.InitiateNewsletterRequest($(this).parent().find('input').val(), elem);
        });
        $('#subscribe-email-address').on('keypress', function (e) {
            if (e.which == 13) {
                thisObj.InitiateNewsletterRequest($(this).val(), elem);
            }
        });
        thisObj.DisplayHideSubscribeEmailForm(true);
        thisObj.SetupShowHideForm();
    }
    DisplayHideSubscribeEmailForm(display) {
        $("#subscribe-email-address").css({
            "display": "inline",
        }).animate({
            "width": display ? "200px" : 0,
        }, 500, function () {
            if (display) {
                $(this).focus();
            }
            else {
                $(this).css({
                    "display": "none"
                });
            }
        });
        $(".passle-follow span").css({
            "border-color": display ? "initial" : "transparent",
        });
    }
    InitiateNewsletterRequest(address, elem) {
        var thisObj = this;
        if (PassleFunctions.IsValidEmailAddress(address)) {
            $(elem).spin();
            var src = 'ClientWebAPIMailingList/VerifyEmail/?shortcode=' + thisObj.passleShortcode + '&email=' + address;
            PassleWebFunctions.InjectHiddenIFrame("follow-request-container", "follow-request-iframe", src);
        }
    }
}
;
class LikeButton extends Component {
    constructor(inMobileApp = false) {
        super();
        this.LikeRequestInProgress = false;
        this.LikeModal = null;
        this.InMobileApp = false;
        this.InMobileApp = inMobileApp;
        this.Initialise();
    }
    SubscribeToEvents() {
        var thisObj = this;
        GlobalEvents.UserAuthenticationComplete.on((data) => {
            data.currentUserlikedPostShortcodes.forEach(shortcode => {
                thisObj.UpdatePostLikeIcon(shortcode, true);
            });
        });
        GlobalEvents.NewPostsLoaded.on(() => {
            PassleWebFunctions.CurrentUserLikedPosts.forEach(shortcode => {
                thisObj.UpdatePostLikeIcon(shortcode, true);
            });
        });
    }
    BindUIEvents() {
        var thisObj = this;
        $('body').on('click', '.action-like', (ev) => {
            thisObj.LikePost(ev);
        });
    }
    LikePost(e) {
        const thisObj = this;
        e.preventDefault();
        let target = $(e.currentTarget);
        let postShortcode = target.data("post-shortcode");
        let userLikesPost = target.find("i").hasClass('fa-regular');
        thisObj.UpdatePostLikeIcon(postShortcode, userLikesPost);
        let likeUrl = `https://${PassleEnvironmentConfig.PassleWebRoot}/likebutton?postShortcode=${postShortcode}&like=${userLikesPost}`;
        thisObj.LikeModal = new ModalComponent(null, () => thisObj.LikeModal.Destroy(), `<div id='like-modal' style="height: 500px;"></div>`);
        let iframeContainer = document.getElementById("like-modal");
        var iframe = document.createElement('iframe');
        const connection = Penpal.connectToChild({
            url: likeUrl,
            iframe: iframe,
            appendTo: iframeContainer,
            timeout: 30000,
            methods: {
                likeToggled(totalLikes, userLikesPost) {
                    thisObj.UpdateCounter(target, totalLikes);
                    if (!userLikesPost) {
                        thisObj.LikeModal.Destroy();
                    }
                }
            }
        });
        if (userLikesPost) {
            thisObj.LikeModal.Show();
        }
    }
    UpdateCounter(likeButton, totalLikes) {
        let likeCounter = likeButton.find('.action-button-number');
        if (totalLikes > 0) {
            likeButton.addClass('has-number');
            likeCounter.text(totalLikes.toString());
        }
        else {
            likeButton.removeClass('has-number');
        }
    }
    UpdatePostLikeIcon(postShortcode, userLikesPost) {
        let likeButton = $(`.action-like[data-post-shortcode='${postShortcode}']`);
        let likeIcon = likeButton.find('i');
        if (likeButton) {
            if (userLikesPost) {
                likeButton.addClass('liked');
                likeIcon.removeClass("fa-regular");
                likeIcon.addClass("fa-solid");
            }
            else {
                likeButton.removeClass('liked');
                likeIcon.removeClass("fa-solid");
                likeIcon.addClass("fa-regular");
            }
        }
    }
}
;
class RepostButton extends Component {
    constructor(PassleWebSiteRoot) {
        super();
        this.PassleWebSiteRoot = PassleWebSiteRoot;
        this.Initialise();
    }
    SubscribeToEvents() {
        var thisObj = this;
        GlobalEvents.UserAuthenticationComplete.onOrdered(10, (data) => {
            if (data.user) {
                $(".action-repost").show();
                thisObj.SetupRepostButtons(data.user);
            }
        });
        GlobalEvents.RepostRequestComplete.on((repostData) => {
            thisObj.RepostRequestComplete(repostData);
        });
    }
    BindUIEvents() {
        var thisObj = this;
        $('body').on('click', '.repost-button.confirm', function (e) {
            e.preventDefault();
            thisObj.SubmitRepostForm();
        });
        $('body').on('click', '.repost-button.cancel', function (e) {
            e.preventDefault();
            thisObj.HideRepostForm();
        });
    }
    SetupRepostButtons(user) {
        var thisObj = this;
        $('body').off('click', '.action-repost');
        if (user && (user.UserType == Passel.API.Domain.Models.UserType.Standard || user.UserType == Passel.API.Domain.Models.UserType.SystemAdministrator)) {
            thisObj.$RepostForm = $('#repost-form');
            $('body').on('click', '.action-repost', function (e) {
                e.preventDefault();
                var postShortcode = $(this).attr('data-postshortcode');
                var passleShortcode = $(this).attr('data-passleshortcode');
                if (user.ContentPublisherPassles().some(p => p.Shortcode != passleShortcode)) {
                    thisObj.ShowRepostForm(postShortcode, passleShortcode, user);
                }
                else {
                    thisObj.$NotAllowedMessage = $('#not-allowed-message');
                    thisObj.ShowNotAllowedMessage(postShortcode, user);
                }
            });
        }
        else if (user && (user.UserType == Passel.API.Domain.Models.UserType.Subscriber)) {
            thisObj.$UpgradeForm = $('#upgrade-form');
            $('body').on('click', '.action-repost', function (e) {
                e.preventDefault();
                var postShortcode = $(this).attr('data-postshortcode');
                thisObj.ShowUpgradeForm(postShortcode);
            });
        }
        else {
            $('body').on('click', '.action-repost', function (e) {
                e.preventDefault();
                var postShortcode = $(this).attr('data-postshortcode');
                var passleShortcode = $(this).attr('data-passleshortcode');
                PassleWebFunctions.SetAuthenticationCallback(() => {
                    if (PassleWebFunctions.CurrentUserObj.UserType == Passel.API.Domain.Models.UserType.Standard) {
                        thisObj.ShowRepostForm(postShortcode, passleShortcode, PassleWebFunctions.CurrentUserObj);
                    }
                });
                GlobalEvents.UserActionRequiresPassleUserAuthentication.trigger();
            });
        }
    }
    PopulatePassleDropDown(user, passleShortcode) {
        var thisObj = this;
        $('#repost-passleid').html('');
        user.ContentPublisherPassles().forEach((item) => {
            if (item.Shortcode != passleShortcode) {
                $('#repost-passleid').append($('<option/>', {
                    value: item.Shortcode,
                    text: item.Title
                }));
            }
        });
        if (user.Passles.length == 1) {
            $("#repost-passleid").val(user.Passles[0].Shortcode);
        }
        $('#repost-passleid').select2({
            placeholder: "Select a Passle...",
            width: '256px'
        });
    }
    ShowRepostForm(postShortcode, passleShortcode, user) {
        var thisObj = this;
        thisObj.$RepostForm.detach();
        var $repostContainer = $("div[data-post-shortcode=" + postShortcode + "] .repost-form-container");
        thisObj.RepostPostShortcode = postShortcode;
        if ($repostContainer.css("display") != "none") {
            $repostContainer.slideUp();
            thisObj.$RepostForm.hide();
        }
        else {
            $(".passle-post-block .repost-form-container").slideUp();
            $(".passle-post-block .share-buttons-container").slideUp();
            thisObj.$RepostForm.show();
            $repostContainer.html("").append(thisObj.$RepostForm).slideDown();
            thisObj.PopulatePassleDropDown(user, passleShortcode);
        }
    }
    ShowNotAllowedMessage(postShortcode, user) {
        var thisObj = this;
        var $repostContainer = $("div[data-post-shortcode=" + postShortcode + "] .repost-form-container");
        thisObj.RepostPostShortcode = null;
        if ($repostContainer.css("display") != "none") {
            $repostContainer.slideUp();
            thisObj.$NotAllowedMessage.hide();
        }
        else {
            $(".passle-post-block .repost-form-container").slideUp();
            $(".passle-post-block .share-buttons-container").slideUp();
            thisObj.$NotAllowedMessage.show();
            $repostContainer.append(thisObj.$NotAllowedMessage).slideDown();
        }
    }
    HideRepostForm() {
        var thisObj = this;
        if (thisObj.$RepostForm)
            thisObj.$RepostForm.detach();
        $('.repost-form-container').slideUp();
    }
    SubmitRepostForm() {
        var thisObj = this;
        var postShortcode = thisObj.RepostPostShortcode;
        var passleId = $('#repost-passleid').val();
        thisObj.$RepostForm.spin();
        var src = 'ClientWebAPIRepost/Repost?postId=' + postShortcode + '&passleId=' + passleId + '&postShortcode=' + postShortcode;
        PassleWebFunctions.InjectHiddenIFrame("repost-container", "repost-iframe", src);
    }
    RepostRequestComplete(repostData) {
        var thisObj = this;
        thisObj.$RepostForm.spin(false);
        if (repostData.Success) {
            thisObj.ShowRepostCompleteMessage(repostData.NewPostUrl, repostData.PostShortcode);
            thisObj.HideRepostForm();
            GlobalEvents.UserRepostedPost.trigger();
        }
        else {
            if (repostData.PreviouslyReposted) {
                var modal = new OverlayMessage($('#repost-failed-self-message-modal'));
            }
            else {
                var modal = new OverlayMessage($('#repost-failed-message-modal'));
            }
        }
    }
    ShowRepostCompleteMessage(newPostUrl, postShortcode) {
        var thisObj = this;
        $('.view-repost-link').attr('href', newPostUrl);
        var modal = new OverlayMessage($('#repost-success-message-modal'));
        ClientWebFunctions.UpdateCounter('repost-counter-' + postShortcode, 1);
    }
    ShowUpgradeForm(postShortcode) {
        var thisObj = this;
        thisObj.$UpgradeForm.detach();
        var $repostContainer = $("div[data-post-shortcode=" + postShortcode + "] .repost-form-container");
        thisObj.RepostPostShortcode = postShortcode;
        if ($repostContainer.css("display") != "none") {
            $repostContainer.slideUp();
        }
        else {
            $(".passle-post-block .repost-form-container").slideUp();
            $(".passle-post-block .share-buttons-container").slideUp();
            thisObj.$UpgradeForm.show();
            $repostContainer.html("").append(thisObj.$UpgradeForm).slideDown();
        }
    }
}
;
class PrintButton extends Component {
    constructor() {
        super();
        this.BindUIEvents();
    }
    BindUIEvents() {
        $(document).on("click", ".print-button", function (e) {
            e.preventDefault();
            window.print();
        });
    }
}
;
class PreviewBar extends Component {
    constructor(PassleWebSiteRoot, passleShortcode, inMobileApp) {
        super();
        this.PassleWebSiteRoot = PassleWebSiteRoot;
        this.inMobileApp = inMobileApp;
        this.PassleShortcode = passleShortcode;
        this.PopulateApproverList();
        this.InMobileApp = inMobileApp;
        this.Initialise();
    }
    SubscribeToEvents() {
        var thisObj = this;
        GlobalEvents.ApproverListRequested.on(data => {
            if (data.Success) {
                for (var approver in data.Approvers) {
                    $('.preview-request-approval-select').append("<option value='" + data.Approvers[approver][1] + "' >" + data.Approvers[approver][0] + "</option>");
                }
                if (data.Approvers.length > 0) {
                    $('.preview-request-approval').removeClass("hidden");
                }
            }
        });
        GlobalEvents.UserAuthenticationComplete.on((data) => {
            thisObj.CurrentUser = data.user;
            if (thisObj.CurrentUser) {
                if (thisObj.CurrentUser.UserType == Passel.API.Domain.Models.UserType.SystemAdministrator) {
                    $('.preview-make-live-group').removeClass("hidden");
                    $('.preview-edit-post').removeClass("hidden");
                    $('.preview-approve-decline').removeClass("hidden");
                    $('.preview-info-controls').show();
                    return;
                }
                var currentUserPassle = thisObj.CurrentUser.Passles.filter(x => x.Shortcode === thisObj.PassleShortcode)[0];
                if (!currentUserPassle) {
                    return;
                }
                var userIsPostAuthor = $("#AuthorShortcodes").val().split(",").indexOf(thisObj.CurrentUser.Shortcode) !== -1;
                if (currentUserPassle.Permissions.CanApprovePosts || currentUserPassle.Permissions.CanPublish || currentUserPassle.Permissions.CanCreate || currentUserPassle.Permissions.CanEdit || userIsPostAuthor || thisObj.IsRepost) {
                    var shouldBeAbleToMakePostLive = (currentUserPassle.Permissions.CanPublish && currentUserPassle.Permissions.CanApprovePosts) ||
                        (currentUserPassle.Permissions.CanPublish && userIsPostAuthor);
                    var shouldBeAbleToEditPost = (currentUserPassle.Permissions.CanEdit && currentUserPassle.Permissions.CanPublish && currentUserPassle.Permissions.CanApprovePosts) ||
                        (currentUserPassle.Permissions.CanEdit && userIsPostAuthor);
                    if (shouldBeAbleToMakePostLive) {
                        $('.preview-make-live-group').removeClass("hidden");
                    }
                    if (shouldBeAbleToEditPost) {
                        $('.preview-edit-post').removeClass("hidden");
                    }
                    if (currentUserPassle.Permissions.CanApprovePosts && !thisObj.InMobileApp) {
                        $('.preview-approve-decline').removeClass("hidden");
                    }
                    $('.preview-info-controls').show();
                }
            }
        });
        GlobalEvents.ApprovalRequested.on(function () {
            $('.preview-request-approval-control').spin(false).find('span').text('Approval Requested');
            thisObj.HideRequestApprovalForm();
        });
        GlobalEvents.PostMadeLive.on(function () {
            location.reload();
        });
        GlobalEvents.PostDeclined.on(function () {
            location.reload();
        });
        GlobalEvents.PostApproved.on(function () {
            location.reload();
        });
    }
    PopulateProperties() {
        this.ApprovalStep = $('#ApprovalStep').val();
        this.IsRepost = $('#Post_IsRepost').val() === "True";
        this.PostShortcode = $("#PreviewPostShortcode").val();
    }
    BindUIEvents() {
        var thisObj = this;
        $('.preview-request-approval').on("click", ".preview-request-approval-control.closed", function (e) {
            e.preventDefault();
            thisObj.OpenRequestApprovalForm();
            e.stopPropagation();
        });
        $('.preview-request-approval').on("click", '.preview-request-approval-control.open', function (e) {
            e.preventDefault();
            var approver = $(this).children('select').val();
            if (approver) {
                thisObj.SubmitRequestApprovalForm(approver);
            }
            else {
                thisObj.HideRequestApprovalForm();
            }
        });
        $('.preview-request-approval-select').on("click", function (e) {
            e.stopPropagation();
        });
        $('.preview-approve-decline-control').on('click', function () {
            thisObj.ToggleApproveForm();
        });
        $('.preview-approve-decline-close-control').on('click', function () {
            thisObj.ToggleApproveForm();
        });
        $('.preview-approve-control').on("click", function () {
            thisObj.ApproveDeclinePost("Approve", $('.preview-approve-decline-textarea').val());
        });
        $('.preview-decline-control').on("click", function () {
            thisObj.ApproveDeclinePost("Decline", $('.preview-approve-decline-textarea').val());
        });
        $('.preview-make-live-control').on('click', function (e) {
            e.preventDefault();
            $(this).spin();
            thisObj.MakeLive();
        });
    }
    OpenRequestApprovalForm() {
        $('.preview-request-approval-control').removeClass("closed").addClass('open');
        $('.preview-request-approval-select').animate({ "width": "200px" }, 500);
    }
    HideRequestApprovalForm() {
        $('.preview-request-approval-control').removeClass("open").addClass("closed");
        $('.preview-request-approval-select').animate({ "width": "0" }, 500);
    }
    SubmitRequestApprovalForm(approver) {
        var thisObj = this;
        var controller = 'ClientWebAPIApproval';
        var action = "RequestApproval";
        var model = {
            "postShortcode": thisObj.PostShortcode,
            "userShortcode": $('.preview-request-approval-select').val(),
            "currentApprovalStep": thisObj.ApprovalStep
        };
        var src = controller + '/' + action + '?' + $.param(model);
        PassleWebFunctions.InjectHiddenIFrame("submit-request-approval-container", "submit-request-approval-iframe", src, function () {
            $('.preview-request-approval-select').spin();
        });
    }
    PopulateApproverList() {
        var thisObj = this;
        var controller = 'ClientWebAPIApproval';
        var action = "GetApproverList";
        var model = {
            "passleShortcode": thisObj.PassleShortcode
        };
        var src = controller + '/' + action + '?' + $.param(model);
        PassleWebFunctions.InjectHiddenIFrame("submit-request-approvers-container", "submit-request-approvers-iframe", src);
    }
    ToggleApproveForm() {
        $('.preview-approve-decline-form').toggleClass("hidden");
        $('.preview-info-controls').toggle();
    }
    ApproveDeclinePost(action, message) {
        var thisObj = this;
        var controller = "ClientWebAPIApproval";
        var action = action;
        var model = {
            postShortcode: thisObj.PostShortcode,
            message: message,
            approvalStep: thisObj.ApprovalStep
        };
        var src = controller + '/' + action + '?' + $.param(model);
        PassleWebFunctions.InjectHiddenIFrame("submit-approve-container", "submit-approve-iframe", src);
    }
    MakeLive() {
        var thisObj = this;
        var controller = "ClientWebAPIPublish";
        var action = "Publish";
        var model = {
            postShortcode: thisObj.PostShortcode
        };
        var src = controller + '/' + action + '?' + $.param(model);
        PassleWebFunctions.InjectHiddenIFrame("submit-make-live-container", "submit-make-live-iframe", src);
    }
}
;
/// <reference path="../../../TypeScript/definitions/jquery.d.ts" />
/// <reference path="../Component.ts" />
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var OverlayMessage = /** @class */ (function (_super) {
    __extends(OverlayMessage, _super);
    function OverlayMessage($elem) {
        var _this = _super.call(this) || this;
        _this.$elem = $elem;
        $elem
            .addClass('overlay-message visible')
            .children('div')
            .addClass('overlay-message-inner');
        $elem.on("click", function (e) {
            if (e.target === this) {
                $(this).removeClass('visible');
            }
        });
        return _this;
    }
    return OverlayMessage;
}(Component));
;
class PostFooter extends Component {
    constructor() {
        super();
        this.UpdateUI();
        this.Initialise();
    }
    UpdateUI() {
        var thisObj = this;
        $(".title>a").each(function () {
            thisObj.ShortenTitle(this);
        });
        thisObj.SetRecentPostsStyle();
    }
    BindUIEvents() {
        var thisObj = this;
        var $footer = $('.passle-post-footer');
        $footer.on("mouseover", function () {
            $footer.addClass("open");
        });
        $footer.on("mouseout", function () {
            $footer.removeClass("open");
        });
        $footer.on("click", ".footer-handle", function () {
            $footer.toggleClass("open");
        });
        $(".footer-scroll-btn").click(function () {
            thisObj.ScrollFooter(this);
        });
    }
    ScrollFooter(elem) {
        var thisObj = this;
        var operator = $(elem).hasClass('scroll-left') ? '-=' : '+=';
        $('.recent-posts-container').dequeue().animate({
            scrollLeft: operator + 267 + "px"
        });
    }
    ShortenTitle(elem) {
        var thisObj = this;
        var maxLength = 55;
        var title = $(elem).text();
        var roughTrim = title.substr(0, maxLength);
        var cleanTrim = roughTrim.substr(0, Math.min(roughTrim.length, roughTrim.lastIndexOf(" ")));
        if (title.length > maxLength) {
            if (roughTrim.lastIndexOf(" ") < 0) {
                $(elem).text(roughTrim + '...');
            }
            else {
                $(elem).text(cleanTrim + '...');
            }
        }
    }
    SetRecentPostsStyle() {
        $('.recent-posts-container').each(function () {
            var $this = $(this);
            if ($this.hasClass("recent-posts-auto")) {
                var w = $this.width();
                if (w >= 1200) {
                    $this.removeClass('recent-posts-auto').addClass('recent-posts-desktop');
                }
                else if (w >= 768) {
                    $this.removeClass('recent-posts-auto').addClass('recent-posts-tablet');
                }
                else {
                    $this.removeClass('recent-posts-auto').addClass('recent-posts-mobile');
                }
            }
        });
    }
}
;
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
/// <reference path="../../modules/global/environmentconfig.ts" />
var ShareURLs = /** @class */ (function (_super) {
    __extends(ShareURLs, _super);
    function ShareURLs() {
        var _this = _super.call(this) || this;
        _this.Initialise();
        return _this;
    }
    ShareURLs.prototype.GetPostShareURL = function (network, postData) {
        var thisObj = this;
        var url = "";
        switch (network) {
            case "linkedin":
                url = "https://www.linkedin.com/shareArticle?mini=true";
                url += "&url=" + encodeURIComponent(postData.url);
                url += "&title=" + thisObj.ParseShareTitle(postData.title);
                url += "&source=" + "LinkedIn";
                break;
            case "twitter":
                url = "https://twitter.com/intent/tweet?text=";
                var textparam = postData.title;
                if (postData.twitterScreenname) {
                    textparam += " by @" + postData.twitterScreenname;
                }
                else {
                    textparam += " by " + postData.authorFullName;
                }
                url += thisObj.ParseShareTitle(textparam);
                var tweetLength = textparam.length;
                url += "&url=" + postData.url;
                tweetLength += 20; //URLs are considered to be 20 characters long
                //url += "&via=" + "passleme"; //Removed for the moment due to space concerns
                if (postData.tags) {
                    url += "&hashtags=";
                    for (var i = 0; i < postData.tags.length; i++) {
                        var tag = postData.tags[i].replace(/\s/g, '').replace(/-/g, ''); //regex strips whitespace and hyphens, since hashtags shouldn't contain any
                        if (tweetLength + tag.length + 2 < 280) {
                            url += tag + ",";
                            tweetLength += tag.length + 2; //twitter adds " #" before each
                        }
                    }
                    if (url[url.length - 1] === ",")
                        url = url.slice(0, -1);
                }
                break;
            case "facebook":
                url = "https://www.facebook.com/dialog/share";
                url += "?app_id=" + PassleEnvironmentConfig.FacebookAppId;
                url += "&display=" + "popup";
                url += "&href=" + encodeURIComponent(postData.url);
                url += "&redirect_uri=https%3A%2F%2Fwww." + (PassleEnvironmentConfig.PassleWebRoot.split("www.")[1] + "%2F") + "sharecomplete";
                break;
            case "xing":
                url = "https://www.xing.com/spi/shares/new?url=";
                url += encodeURIComponent(postData.url);
                break;
        }
        return url;
    };
    ShareURLs.prototype.ParseShareTitle = function (title) {
        title = encodeURIComponent(title);
        title = title.replace(/'/g, "%27");
        return title;
    };
    return ShareURLs;
}(Component));
;
class FetchShareCounts extends Component {
    constructor(postShortcode, passleShortcode) {
        super();
        this.postShortcode = postShortcode;
        this.passleShortcode = passleShortcode;
        this.DisplayStatsAttempts = 0;
        this.Initialise();
    }
    PopulateProperties() {
        var thisObj = this;
        thisObj.ServiceCodes = ["email", "linkedin", "twitter", "facebook"];
        thisObj.ShareData = {};
        for (var service in thisObj.ServiceCodes) {
            thisObj.ShareData[service] = {
                count: $('#' + thisObj.ServiceCodes[service] + '-share-count').val(),
                service: thisObj.ServiceCodes[service]
            };
        }
    }
    SubscribeToEvents() {
        var thisObj = this;
        GlobalDeferred.UserAuthenticationComplete.then((data) => {
            thisObj.CurrentUser = data;
            thisObj.DisplayShareCounts(data.user);
        });
    }
    DisplayShareCounts(user) {
        var thisObj = this;
        if ($('.social-sharing-button').length) {
            for (var service in thisObj.ServiceCodes) {
                var serviceData = thisObj.ShareData[service];
                if (serviceData.service === "email") {
                    if (!user)
                        continue;
                    if (!user.ISTATOYEnabled)
                        continue;
                }
                if (!$('.share-counter_' + serviceData.service).length) {
                    if (serviceData.count > 0) {
                        var count = "<span class='share-counter share-counter_" + serviceData.service + "'>" + serviceData.count + "</span>";
                        if (serviceData.service === "email") {
                            if (thisObj.CurrentUser)
                                $('.istatoy-button').addClass("has-count").after(count);
                        }
                        else {
                            $('.social-sharing-button[data-network="' + serviceData.service + '"]').addClass("has-count").after(count);
                        }
                    }
                }
            }
        }
    }
}
;
class PostView extends Page {
    constructor() {
        super("Post View");
        this.IframelyApiKeyHash = "a75b73056ed317b1be45a3dad480c142";
        this.AuthorShortcodes = [];
        this.FragmentActions = new Array();
        this.PopulateProperties();
        this.SubscribeToEvents();
        this.RegisterEvents();
        this.IsPreview = $('#IsPreview').val() === "True";
        this.PassleHeader = new PassleHeader();
        this.PostFooter = new PostFooter();
        this.FollowButton = new FollowButton(PassleEnvironmentConfig.PassleWebRoot, this.PassleShortcode);
        this.LikeButton = new LikeButton(this.InMobileApp);
        this.RepostButton = new RepostButton(PassleEnvironmentConfig.PassleWebRoot);
        this.PrintButton = new PrintButton();
        if (this.IsPreview)
            this.PreviewBar = new PreviewBar(PassleEnvironmentConfig.PassleWebRoot, this.PassleShortcode, this.InMobileApp);
        this.ShareButtons = new ShareButtons($('.post-container .post-dateline'), true);
        this.FetchShareCounts = new FetchShareCounts(this.PostShortcode, this.PassleShortcode);
        this.SetupFragments();
        this.ProcessUrlFragment = new ProcessUrlFragment(this.FragmentActions);
        this.ProcessUrlFragment.ProcessFragment(true);
        this.LoadEmbeds();
        this.BindUIEvents();
        this.UpdateUI();
    }
    PopulateProperties() {
        var thisObj = this;
        thisObj.PostShortcode = $('.post-container').first().attr("data-post-shortcode");
        if ($("#AuthorShortcodes").val()) {
            thisObj.AuthorShortcodes = $("#AuthorShortcodes").val().split(",");
        }
    }
    InitializePage() {
        super.InitializePage();
        var thisObj = this;
        var featuredItemContainer = $("[data-media-container]");
        if (featuredItemContainer.length > 0) {
            featuredItemContainer.each(function (index, item) {
                var $item = $(item);
                var elementId = $item.attr('id');
                var mediaItems = $item.data('media-items');
                var posterUrl = $item.data('media-thumbnail');
                var passleFileId = $item.data('media-passlefileid');
                var mediaType = $item.data('media-type');
                let mediaPlayerData = {
                    elementId: elementId,
                    mediaItems: mediaItems,
                    posterUrl: posterUrl,
                    passleFileId: passleFileId,
                    mediaType: mediaType
                };
                MediaPlayer.InitializeMediaPlayer(mediaPlayerData);
            });
        }
    }
    LoadEmbeds() {
        var thisObj = this;
        if (document.querySelectorAll("[data-iframely-url]").length === 0 &&
            document.querySelectorAll("iframe[src*='iframe.ly']").length === 0)
            return;
        var ifs = document.createElement("script");
        ifs.type = "text/javascript";
        ifs.async = true;
        ifs.src = ("https:" == document.location.protocol ? "https:" : "http:") + "//cdn.iframe.ly/embed.js?key=" + thisObj.IframelyApiKeyHash;
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(ifs, s);
    }
    SubscribeToEvents() {
        var thisObj = this;
        GlobalEvents.UserAuthenticationComplete.on((data) => {
            if (!thisObj.IsPreview) {
                $('.action-buttons').show();
            }
            if (data.user && data.user.IsMember(thisObj.PassleShortcode))
                thisObj.ShowShareMessage();
        });
        GlobalEvents.UserLikedPost.on(() => {
            thisObj.SetupActionPopovers(thisObj.PostShortcode);
        });
        GlobalEvents.UserRepostedPost.on(() => {
            thisObj.SetupActionPopovers(thisObj.PostShortcode);
        });
        GlobalDeferred.PageRequestLoggingComplete.then((pageRequestId) => {
            thisObj.LogRecommendedPostViews(pageRequestId);
        });
    }
    RegisterEvents() {
        $('.post-content a').on("click", function (e) {
            EventTracking.RegisterEvent(new EventTracking.TrackedEvent(Passel.API.Domain.Models.Tracking.ClientSideEventAction.ClickExternalLink, Passel.API.Domain.Models.Tracking.ClientSideEventCategory.PostContent, this.href, { href: this.href, text: this.innerHTML }));
        });
        $('.quote-url-link').on("click", function (e) {
            EventTracking.RegisterEvent(new EventTracking.TrackedEvent(Passel.API.Domain.Models.Tracking.ClientSideEventAction.ClickExternalLink, Passel.API.Domain.Models.Tracking.ClientSideEventCategory.PostContent, this.href, { href: this.href, text: this.innerHTML }));
        });
    }
    IOSSetup() {
        var thisObj = this;
        var $passleTitle = $('h3.passle-title a'), $authorTitle = $('.author-name a, .post-byline-mobile a'), linkDefault = '#';
        $passleTitle.parent()
            .css("height", "auto")
            .css("padding-bottom", "0.5em")
            .css("text-align", "center");
        $passleTitle.attr('href', linkDefault).on('click', function (e) {
            e.preventDefault();
        });
        $authorTitle.attr('href', linkDefault).on('click', function (e) {
            e.preventDefault();
        });
    }
    UpdateUI() {
        var thisObj = this;
        thisObj.ShortPostFix();
        thisObj.RecentPostsFix();
        thisObj.AddTableContainers();
    }
    BindUIEvents() {
        var thisObj = this;
        var shortcode = $('div.post-container:first').attr('data-post-shortcode');
        thisObj.SetupActionPopovers(shortcode);
        $(window).resize(function () {
            thisObj.ShortPostFix();
        });
    }
    ShortPostFix() {
        var thisObj = this;
        var viewWidth = $(window).width();
        var viewHeight = $(window).height();
        var headerHeight = $('div.public-header').outerHeight();
        var footerHeight = $('footer').outerHeight();
        var minPostHeight = viewHeight - (headerHeight + footerHeight);
        if (viewWidth >= 980) {
            $('div.post-container').css('min-height', minPostHeight + 'px');
        }
        else if (viewWidth < 980) {
            $('div.post-container').removeAttr('style');
        }
    }
    RecentPostsFix() {
        var wrapper = $('#passle-page-wrapper');
        if (wrapper && wrapper.width() < 1200) {
            wrapper.addClass("recent-posts-fix");
        }
    }
    ShowShareMessage() {
        if ($('#ShowShareMessage')) {
            var modal = new OverlayMessage($('#share-message-modal'));
            this.ShareMessageButtons = new ShareButtons($('#share-message-modal'), true);
        }
    }
    SetupActionPopovers(shortcode) {
        var thisObj = this;
        thisObj.ShowActionPopover("GetRepostDetailsForPost", shortcode, "Reposts", $('a.action-repost.has-number'));
    }
    ShowActionPopover(action, shortcode, title, $element) {
        $element.webuiPopover('destroy').webuiPopover({
            type: 'async',
            title: title,
            url: '/PostAjax/' + action + '?postShortcode=' + shortcode,
            content: function (partialView) {
                return partialView;
            },
            trigger: 'hover',
            style: 'inverse',
            arrow: false,
            animation: 'fade',
        });
    }
    SetupFragments() {
        var thisObj = this;
        thisObj.FragmentActions.push(new FragmentAction("tw", thisObj.ShareTwitter, thisObj));
        thisObj.FragmentActions.push(new FragmentAction("fb", thisObj.ShareFacebook, thisObj));
        thisObj.FragmentActions.push(new FragmentAction("li", thisObj.ShareLinkedIn, thisObj));
        thisObj.FragmentActions.push(new FragmentAction("xi", thisObj.ShareXing, thisObj));
    }
    ShareTwitter(thisObj) {
        thisObj.ShareButtons.HandleShareButton($('.social-sharing-button.twitter'));
    }
    ShareFacebook(thisObj) {
        thisObj.ShareButtons.HandleShareButton($('.social-sharing-button.facebook'));
    }
    ShareLinkedIn(thisObj) {
        thisObj.ShareButtons.HandleShareButton($('.social-sharing-button.linkedin'));
    }
    ShareXing(thisObj) {
        thisObj.ShareButtons.HandleShareButton($('.social-sharing-button.xing'));
    }
    LogRecommendedPostViews(pageRequestId) {
        var passleShortcode = $('#passle-shortcode').val();
        var postshortCodes = new Array();
        $('[data-recent-posts] [data-postshortcode]').each(function () {
            var postShortcode = $(this).data('postshortcode');
            if (postShortcode) {
                postshortCodes.push(postShortcode);
            }
        });
        if (passleShortcode && postshortCodes.length > 0 && !this.IsPreview) {
            CWAjaxFunctions.LogPostViews(pageRequestId, PostViewType.PostViewRecommendedPosts, postshortCodes, passleShortcode, "stats-logging", "Passle", "PostView");
        }
    }
    AddTableContainers() {
        $('table').wrap('<div class="table-container"></div>');
    }
}
var postView = new PostView();
;
