define("modules/clean/loggers/notification_logger",["require","exports","tslib","modules/clean/ajax","modules/clean/react/user_notifications/models"],(function(e,t,n,o,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o=n.__importStar(o),t.NotificationLocations={TRAY:"home",HOME_PAGE:"home_page"};var i=(function(){function e(){}return e.logReceive=function(t){for(var n=[],o=0,a=t;o=this.batch_size&&(this.batch_queue.push(this.thumb_url_queue.splice(0,this.batch_size)),this._send_batch_requests()),o}"function"==typeof r&&r();return t&&"function"==typeof t&&t(e,!0),null},e.prototype.cancel_thumb=function(e){if(this.callback_by_id[e]){var t=this.callback_by_id[e].url;delete this.callback_by_id[e],delete this._request_callback_by_request_id[e];for(var n=0;n=this.max_parallel_requests)&&this.batch_queue.length>0){this.flushing=!0;var e=this.batch_queue.shift(),t=this._generate_request_params(e),n=t.endpoint,a=t.method,i=t.data;this.on_batch&&"function"==typeof this.on_batch&&this.on_batch(e);for(var r=0,s=e;r6e3?"POST":"GET",data:s}},e.prototype._hash_string_to_int=function(e){var t=0;if(0===e.length)return t;for(var n=0;n0&&(e.boltClient=new o.BoltClient(n,e.onUserNotificationUpdate,e.userNotificationRefreshCallback),e.boltClient.start())}),(function(){}))}}return t.prototype.asyncSharingAction=function(t){new Promise((function(t,n){e(["modules/clean/react/user_notifications/sharing_actions"],t,n)})).then(n.__importStar).then(t)},t.prototype.asyncGroupAction=function(t){new Promise((function(t,n){e(["modules/clean/react/user_notifications/group_actions"],t,n)})).then(n.__importStar).then(t)},t.prototype.load=function(){return c.userNotificationsDispatcher.dispatch({type:s.ActionTypes.LOAD_REQUEST}),r.getAll(l.userNotificationsStore.getCursor(),this.activeUserOnlyMode).then((function(e){var t=[];return t=t.concat(e.notifications),a.NotificationLogger.logReceive(t),c.userNotificationsDispatcher.dispatch({type:s.ActionTypes.LOAD_SUCCESS,data:e}),e}),(function(){c.userNotificationsDispatcher.dispatch({type:s.ActionTypes.LOAD_FAILURE})}))},t.prototype.loadOnceAndWatch=function(e){var t=this;this.hasLoadedOnce||(this.hasLoadedOnce=!0,this.activeUserOnlyMode=null!=e&&e,this.load().then((function(e){t.watch(e)}),(function(){})))},t.prototype.acknowledge=function(e){c.userNotificationsDispatcher.dispatch({type:s.ActionTypes.ACKNOWLEDGEMENT_REQUEST_SINGLE,data:{notifications:[e]}}),r.ack(e)},t.prototype.markAllAsSeen=function(){var e=l.userNotificationsStore.getUnseen();0!==e.length&&(r.markAsSeen(e),c.userNotificationsDispatcher.dispatch({type:s.ActionTypes.MARK_AS_SEEN_REQUEST}))},t.prototype.watch=function(e){var t=this.getBoltChannelStates(e);t.length>0&&(this.boltClient=new o.BoltClient(t,this.onUserNotificationUpdate,this.userNotificationRefreshCallback),this.boltClient.start())},t.prototype.getBoltChannelStates=function(e){var t=[];for(var n in e.cursor)if(e.cursor.hasOwnProperty(n)){var a=null,i=window.ensemble;if(i&&i.viewer&&(a=i.viewer.getActiveUser()),!this.activeUserOnlyMode||(null!=a?a.userId:null)===parseInt(n,10)){var r=new o.SignedChannelState("user_notification",n,e.cursor[n],e.boltToken[n]);t.push(r)}}return t},t.prototype.acknowledgeAll=function(){0!==l.userNotificationsStore.getUnacknowledgedCount()&&(i.logMarkAllAsRead(),a.NotificationLogger.logMarkAsRead(l.userNotificationsStore.getUnacknowledged(),a.NotificationLocations.TRAY),c.userNotificationsDispatcher.dispatch({type:s.ActionTypes.ACKNOWLEDGEMENT_REQUEST}),r.ackAll(this.activeUserOnlyMode))},t.prototype.viewNotifications=function(){this.markAllAsSeen()},t.prototype.actionPerformed=function(e,t){a.NotificationLogger.logAction(e,t),e.isUnread&&this.acknowledge(e)},t.prototype.triggerGenericLegacyNotificationAction=function(e){this.actionPerformed(e,"click")},t.prototype.dismissLegacySharingNotification=function(e,t){this.actionPerformed(e,"button_1"),this.asyncSharingAction((function(e){e.registerDismiss(t)}))},t.prototype.mountFromLegacySharingNotification=function(e,t){this.actionPerformed(e,"button_0"),this.asyncSharingAction((function(e){e.registerMount(t)}))},t.prototype.upgradeToMountFromLegacySharingNotification=function(e){this.actionPerformed(e,"button_0"),this.asyncSharingAction((function(e){e.upgradeToMount()}))},t.prototype.triggerBluenoteAction=function(e,t,n){this.actionPerformed(e,n),t.actionType===u.BluenoteActionTypes.OpenUrl?this.performBluenoteOpenUrlAction(t.params):t.actionType===u.BluenoteActionTypes.MountSharedFolder?this.asyncSharingAction((function(n){n.performBluenoteMountSharedFolder(e,t.params)})):t.actionType===u.BluenoteActionTypes.ApproveGroupJoinRequest?this.asyncGroupAction((function(n){n.performBluenoteApproveGroupJoinRequestAction(e,t.params)})):t.actionType===u.BluenoteActionTypes.RemoveGroupJoinRequest&&this.asyncGroupAction((function(n){n.performBluenoteRemoveGroupJoinRequestAction(e,t.params)}))},t.prototype.performBluenoteOpenUrlAction=function(e){e.urlPath&&d.redirect(e.urlPath)},t})());t.default=p})),define("modules/clean/react/user_notifications/api",["require","exports","tslib","jquery","modules/clean/ajax","modules/clean/react/user_notifications/api_helper"],(function(e,t,n,o,a,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o=n.__importDefault(o),a=n.__importStar(a);t.getAll=function(e,t){void 0===e&&(e=null),void 0===t&&(t=!1);var n,r={count:100,template_version:5};if(null!=e&&(r.last_received_nid_by_user_id=JSON.stringify(e)),t){if(null===e){var s=window.__REGISTER_NOTIFICATIONS_PREFETCH_HANDLER;if(s)return s.prefetchDeferred||(s.prefetchDeferred=o.default.Deferred(),s((function(e){s.prefetchDeferred.resolve(i.parseGetAllResponse(e))}),(function(){return null}))),s.prefetchDeferred}n=a.SilentBackgroundRequest({url:"/web/notifications/retrieve_user",data:r,subject_user:window.ensemble.viewer.getActiveUser().userId,dataType:"json"})}else n=a.SilentBackgroundRequest({url:"/web/notifications/retrieve",data:r,dataType:"json"});return n.then(i.parseGetAllResponse)},t.ackAll=function(e){return void 0===e&&(e=!1),(e?a.SilentBackgroundRequest({url:"/web/notifications/ack_all_user",subject_user:window.ensemble.viewer.getActiveUser().userId,dataType:"json"}):a.SilentBackgroundRequest({url:"/web/notifications/ack_all",dataType:"json"})).then((function(e){return e.map(i.userNotificationDeserializer)}))},t.ack=function(e){a.SilentBackgroundBeaconRequest({url:"/web/notifications/ack",subject_user:e.userId,data:{nids:JSON.stringify([e.id])},dataType:"json"})},t.markAsSeen=function(e){for(var t={},n=0,o=e;n0?h._("Notifications menu, with new notifications"):h._("Notifications menu"),className:"notification-button"},a.default.createElement(l.UserNotificationsDropdownBell,{actionableCount:t,isSelected:this.state.isOpen})),a.default.createElement(f.PopoverContent,{attachment:"right",className:"notifications-popover-content"},a.default.createElement(f.PopoverContentTitle,null,h._("Notifications")),a.default.createElement("div",{className:"notifications-dropdown"},e)))},c.displayName="UserNotificationsDropdown",c.requireAsyncModules=o.once((function(){return new Promise((function(t,n){e(["modules/clean/react/user_notifications/sharing_actions"],t,n)})).then(n.__importStar).then((function(){return null}))})),c.defaultProps={isPagelet:!1,accountMenuVisible:!0},c})(a.default.Component),g=c.requireCssWithComponent(m,["/static/css/scooter/scooter-scoped-vflYtdnTb.css","/static/css/spectrum/index.web-vfl_-DzRS.css","/static/css/notifications-vfl0bd2dS.css"]);t.UserNotificationsDropdown=g})),define("modules/clean/react/user_notifications/dropdown_bell",["require","exports","tslib","spectrum/icon_global","react","modules/core/i18n"],(function(e,t,n,o,a,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.renderBell=function(){return a.default.createElement(o.IconGlobal,{name:"notifications",className:"mcl-notifications-icon",selected:this.props.isSelected})},t.prototype.renderBadge=function(){return this.props.actionableCount?a.default.createElement("div",{className:"badge-red-dot"}):null},t.prototype.render=function(){var e="";return this.props.actionableCount>0&&(e=i.ungettext("%(count)s new","%(count)s new",this.props.actionableCount,{comment:"new notification count"}).format({count:this.props.actionableCount})),a.default.createElement("div",{className:"notification-button-bell-container"},a.default.createElement("span",{className:"ax-visually-hidden"},e),this.renderBell(),this.renderBadge())},t.defaultProps={actionableCount:0},t})((a=n.__importDefault(a)).default.Component);t.UserNotificationsDropdownBell=r})),define("modules/clean/react/user_notifications/dropdown_bluenote_row",["require","exports","tslib","classnames","purify","react","modules/clean/keycode","modules/clean/react/button","modules/clean/react/user_notifications/actions","modules/clean/react/user_notifications/avatar_icon","modules/clean/react/user_notifications/generic_icon","modules/clean/react/user_notifications/single_task_preview","modules/clean/react/user_notifications/thumbnail_preview"],(function(e,t,n,o,a,i,r,s,c,u,l,d,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o=n.__importDefault(o),a=n.__importStar(a),i=n.__importDefault(i),c=n.__importDefault(c);var _=(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleSurfaceAction=function(){var e=t.props.notification,n=e.typeData.surfaceAction;null!=n&&c.default.triggerBluenoteAction(e,n,"surface")},t.handleKeyDown=function(e){e.keyCode!==r.KeyCode.ENTER&&e.keyCode!==r.KeyCode.SPACE||t.handleSurfaceAction()},t}return n.__extends(t,e),t.prototype.renderNotificationText=function(e){var t=e.typeData.displayMessage;return t?i.default.createElement("div",{className:"feed-text--button-wrapper"},i.default.createElement("button",{tabIndex:-1,className:"u-unbutton u-font-left feed-text__button"},i.default.createElement("div",{className:"feed-text__button-text",dangerouslySetInnerHTML:{__html:a.sanitize(t)}}))):null},t.prototype.renderImage=function(e){var t=e.typeData.icon;return t&&(t.avatarInitials||t.avatarUrl)?i.default.createElement(u.AvatarIcon,{avatarIconRecord:t,thumbStore:this.props.thumbStore,className:"feed-image feed-image--bluenote"}):i.default.createElement(l.GenericIcon,{genericIconRecord:t,className:"feed-image feed-image--bluenote"})},t.prototype.renderTimeStamp=function(e){if(this.props.hideDisplayTimestamp)return null;var t=e.displayTime;return i.default.createElement("span",{className:"feed-time"},t)},t.prototype.renderPreview=function(e){var t=e.typeData.preview;if(!t)return null;var n=null;t.showThumbnail&&e.bluenoteObject&&(n=i.default.createElement(p.ThumbnailPreview,{object:e.bluenoteObject}));var o=null;t.tasks&&t.tasks.tasks&&t.tasks.tasks.length>0&&t.tasks.tasks[0]&&(o=i.default.createElement(d.SingleTaskPreview,{task:t.tasks.tasks[0]}));var a=null;return t.quote&&(a=i.default.createElement("div",{className:"preview-quote"},t.quote)),i.default.createElement("div",null,n,o,a)},t.prototype.renderButton=function(e,t,n){return i.default.createElement(s.button,{className:"notification u-mar-right-xs u-mar-top-xs",importance:n>0?"tertiary":void 0,onClick:function(t){t.target.disabled=!0;var o=(e.typeData.buttonActions||[])[n];c.default.triggerBluenoteAction(e,o,"button_"+n),t.stopPropagation()}},t)},t.prototype.renderButtonActions=function(e){var t=this,n=[];return(e.typeData.buttonActions||[]).forEach((function(o,a){n.push(t.renderButton(e,o.buttonLabel,a))})),n.length>0?i.default.createElement("span",{className:"feed-action action-available"},n):null},t.prototype.render=function(){var e=this.props.notification,t=e.typeData;if(!t)return null;var n=o.default({"feed-row":!0,clickable:null!=t.surfaceAction,read:this.props.isAcknowledged});return i.default.createElement("div",{onClick:this.handleSurfaceAction,onKeyDown:this.handleKeyDown,className:n,role:"button",tabIndex:0},this.renderImage(e),this.renderNotificationText(e),this.renderPreview(e),this.renderTimeStamp(e),this.renderButtonActions(e))},t.displayName="UserNotificationsDropdownBluenoteRow",t})(i.default.Component);t.UserNotificationsDropdownBluenoteRow=_})),define("modules/clean/react/user_notifications/dropdown_row",["require","exports","tslib","react","react-dom-factories","prop-types","external/lodash","jquery","modules/clean/react/user_notifications/actions","modules/clean/react/user_notifications/legacy_thumb_loader","modules/clean/react/user_notifications/models","modules/clean/sprite"],(function(e,t,n,o,a,i,r,s,c,u,l,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o=n.__importDefault(o),a=n.__importStar(a),i=n.__importStar(i),r=n.__importStar(r),s=n.__importDefault(s),c=n.__importDefault(c),d=n.__importDefault(d);var p=a.div,_=(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._buildLegacyElement=function(e,n){var o=s.default(t.refs.dropdownLegacyRow);return o.html(e.rawDropdownRowHtml),t._initImages(o),t._setTimeLabel(o,e),t._addClientStateClasses(o,e,n),t._initActionHandlers(e,o),o},t._initImages=function(e){return e.find("img").each((function(e,n){var o=s.default(n);return o.attr("alt",""),t._loadImage(o)}))},t._setTimeLabel=function(e,n){var o=e.find("#feed-time-label");if(null!=o)return t.props.hideDisplayTimestamp?o.text(""):o.text(n.displayTime)},t._loadImage=function(e){var n=e.data("src");if(n)return t.props.legacyThumbLoader.load(n).progress((function(){return e.data("src",null),e.data("loading-src",n)})).then((function(t){e.data("loading-src",null);var n=function(){return e.addClass("thumbnail"),e.parent(".feed-thumbnail").addClass("has-frame")};return 0===t.indexOf("data:image")?n():(e.load(n),e.error(r.once((function(){var t=e.data("fail-src")||d.default.SPACER;return e.attr("src",t)})))),e.attr("src",t)}))},t._addClientStateClasses=function(e,t,n){var o=e.hasClass("feed-row")?e:e.find(".feed-row");if(t.isInvisible&&o.addClass("invisible"),n)return o.addClass("read")},t._initActionHandlers=function(e,t){return t.on("click",(function(){return c.default.triggerGenericLegacyNotificationAction(e),!0})),t.on("click",".share-content-dismiss",(function(){return c.default.dismissLegacySharingNotification(e,this),!1})),t.on("click",".share-content-mount",(function(){return c.default.mountFromLegacySharingNotification(e,this),!1})),t.on("click",".share-content-upgrade-mount",(function(){return c.default.upgradeToMountFromLegacySharingNotification(e),!1}))},t}return n.__extends(t,e),t.prototype.componentDidMount=function(){return this._buildLegacyElement(this.props.notification,this.props.isAcknowledged)},t.prototype.render=function(){return p({ref:"dropdownLegacyRow"})},t.displayName="UserNotificationsDropdownRow",t.propTypes={notification:i.instanceOf(l.UserNotification).isRequired,legacyThumbLoader:i.instanceOf(u.LegacyThumbLoader).isRequired,isAcknowledged:i.bool.isRequired,hideDisplayTimestamp:i.bool},t})(o.default.Component);t.default=_})),define("modules/clean/react/user_notifications/generic_icon",["require","exports","tslib","react","modules/clean/react/image","modules/clean/static_urls"],(function(e,t,n,o,a,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o=n.__importDefault(o),t.GenericIcon=function(e){var t=e.genericIconRecord,n=null!=t?t.lowResIconUrl:null,r=null!=t?t.highResIconUrl:null;return null!=n&&null!=r||(n=i.static_url("/static/images/icons32/system_notification_default_icon-vflSQSQdl.png"),r=i.static_url("/static/images/icons64/system_notification_default_icon-vfl0Gu6Pt.png")),o.default.createElement("div",{className:e.className},o.default.createElement(a.Image,{src:n,srcHiRes:r}))},t.GenericIcon.displayName="GenericIcon"})),define("modules/clean/react/user_notifications/legacy_thumb_loader",["require","exports","tslib","external/lodash","jquery","modules/clean/photos/batch_thumb_loader"],(function(e,t,n,o,a,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o=n.__importStar(o),a=n.__importDefault(a);var r=(function(){function e(){this._cache={};var e=new i.BatchThumbLoader({batch_size:16,max_parallel_requests:24});this._queueThumb=function(t,n,o){return e.queue_thumb(t,n,{onrequest:o})},this._flushQueue=o.debounce((function(){return e.flush()}),0)}return e.prototype.load=function(e){if(!this._cache[e]){var t=new a.default.Deferred;this._queueThumb(e,t.resolve,t.notify),this._flushQueue(),this._cache[e]=t.promise()}return this._cache[e]},e})();t.LegacyThumbLoader=r})),define("modules/clean/react/user_notifications/renderer",["require","exports","tslib","react","modules/clean/photos/thumb_loading/generic_thumb_store","modules/clean/react/user_notifications/dropdown_bluenote_row","modules/clean/react/user_notifications/dropdown_row","modules/clean/react/user_notifications/legacy_thumb_loader","modules/clean/react/user_notifications/models"],(function(e,t,n,o,a,i,r,s,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o=n.__importDefault(o),r=n.__importDefault(r);var u=(function(){function e(){this.legacyThumbLoader=new s.LegacyThumbLoader,this.genericThumbStore=new a.GenericThumbStore}return e.prototype.renderNotification=function(e,t){return e.rawDropdownRowHtml?o.default.createElement(r.default,{notification:e,legacyThumbLoader:this.legacyThumbLoader,isAcknowledged:t,hideDisplayTimestamp:!0}):e.typeId===c.NotificationTypes.Bluenote?o.default.createElement(i.UserNotificationsDropdownBluenoteRow,{notification:e,thumbStore:this.genericThumbStore,hideDisplayTimestamp:!0,isAcknowledged:t}):null},e})();t.NotificationRenderer=u})),define("modules/clean/react/user_notifications/shared/notification_row_wrapper",["require","exports","tslib","classnames","react","modules/clean/react/css"],(function(e,t,n,o,a,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o=n.__importDefault(o);var r=(function(e){function t(t){var n=e.call(this,t)||this;return n.state={hover:!1},n.onMouseOver=n.onMouseOver.bind(n),n.onMouseOut=n.onMouseOut.bind(n),n}return n.__extends(t,e),t.prototype.onMouseOver=function(){this.setState({hover:!0})},t.prototype.onMouseOut=function(){this.setState({hover:!1})},t.prototype.renderInfoSheet=function(){var e=o.default({"notification-row-info-sheet":!0,"notification-row-info-sheet--visible":this.state.hover,"notification-row-info-sheet--unread":this.props.unread});return a.default.createElement("div",{className:e},a.default.createElement("div",{className:"notification-row-info-sheet--timestamp"},this.props.timestamp))},t.prototype.render=function(){return a.default.createElement("div",{className:"notification-row-wrapper",onMouseOver:this.onMouseOver,onMouseOut:this.onMouseOut},this.renderInfoSheet(),this.props.row)},t})((a=n.__importDefault(a)).default.Component),s=i.requireCssWithComponent(r,["/static/css/user_notifications_shared-vfl7M0vcH.css"]);t.NotificationRowWrapper=s})),define("modules/clean/react/user_notifications/shared/tray_chrome",["require","exports","tslib","react","react-dom","modules/clean/react/css","modules/clean/react/user_notifications/shared/tray_section"],(function(e,t,n,o,a,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o=n.__importDefault(o),a=n.__importStar(a);var s=(function(e){function t(t){var n=e.call(this,t)||this;n.handleOnScroll=function(){n.scrollWithinOffsetToBottom(10)&&(n.logRendersForPage(n.state.visiblePages),n.setState({visiblePages:n.state.visiblePages+1}))},n.handleOnWheel=function(e){var t=e.originalEvent||e,o=t.deltaY?-40*t.deltaY:t.wheelDelta,i=a.findDOMNode(n);o<=0&&n.scrollWithinOffsetToBottom(0)?e.preventDefault():o>=0&&0===i.scrollTop&&e.preventDefault()};var o=n.processNotifications(n.props.notifications);return n.state={visiblePages:1,unreadNotifications:o.unreadNotifications,readNotifications:o.readNotifications},n}return n.__extends(t,e),t.prototype.componentDidMount=function(){this.props.onTrayMount(),this.logRendersForPage(0)},t.prototype.processNotifications=function(e){var t=this.state&&this.state.unreadNotifications||[],n={};t.forEach((function(e){return n[e.key]=!0}));var o=[],a=[];return e.forEach((function(e){e.isUnread||n[e.key]?o.push(e):a.push(e)})),{unreadNotifications:o,readNotifications:a}},t.prototype.logRendersForPage=function(e){var t=this.state.unreadNotifications.concat(this.state.readNotifications).slice(10*e,10*(e+1));this.props.notifLogRenderFunc(t,10*e)},t.prototype.shouldComponentUpdate=function(e,t,n){return!(e.isLoading&&!this.props.isLoading)},t.prototype.componentWillReceiveProps=function(e,t){this.setState(this.processNotifications(e.notifications))},t.prototype.scrollWithinOffsetToBottom=function(e){var t=a.findDOMNode(this);return t.scrollHeight-t.scrollTop-t.offsetHeight<=e},t.prototype.render=function(){if(this.props.isLoading)return o.default.createElement("div",{className:"notifications-tray--loading"},this.props.loadingMessage);if(0===this.state.unreadNotifications.length&&0===this.state.readNotifications.length)return o.default.createElement("div",{className:"notifications-tray--empty"},this.props.emptyMessage);var e=this.state.unreadNotifications.slice(0,10*this.state.visiblePages),t=this.state.readNotifications.slice(0,10*this.state.visiblePages-e.length);return o.default.createElement("div",{className:"notifications-tray--loaded",onScroll:this.handleOnScroll,onWheel:this.handleOnWheel},o.default.createElement(r.NotificationsTraySection,{notifications:e,sectionTitle:this.props.unreadSectionTitle,actionButtonText:this.props.markAllAsReadButtonTitle,actionButtonAction:this.props.markAllAsReadAction,notifRenderFunc:this.props.notifRenderFunc,isUnreadSection:!0}),o.default.createElement(r.NotificationsTraySection,{notifications:t,sectionTitle:this.props.readSectionTitle,notifRenderFunc:this.props.notifRenderFunc,isUnreadSection:!1}))},t.displayName="NotificationsTrayChrome",t})(o.default.Component),c=i.requireCssWithComponent(s,["/static/css/user_notifications_shared-vfl7M0vcH.css"]);t.NotificationsTrayChrome=c})),define("modules/clean/react/user_notifications/shared/tray_section",["require","exports","tslib","react","modules/clean/react/css","modules/clean/react/user_notifications/shared/notification_row_wrapper"],(function(e,t,n,o,a,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(function(e){function t(t){var n=e.call(this,t)||this;return n.onClickActionButton=n.onClickActionButton.bind(n),n}return n.__extends(t,e),t.prototype.onClickActionButton=function(){this.props.actionButtonAction&&this.props.actionButtonAction()},t.prototype.renderReadSectionHeader=function(){var e=null;return this.props.actionButtonText&&(e=o.default.createElement("button",{className:"notifications-tray-section-header--button",onClick:this.onClickActionButton,tabIndex:0},this.props.actionButtonText)),o.default.createElement("div",{className:"notifications-tray-section-header"},o.default.createElement("span",{className:"notifications-tray-section-header--title"},this.props.sectionTitle),e)},t.prototype.render=function(){if(0===this.props.notifications.length)return null;for(var e=[],t=0,n=this.props.notifications;t0){var t={};e.notifications.concat(this.userNotifications).forEach((function(e){t[e.key]||(t[e.key]=e)})),this.userNotifications=o.values(t).sort(c.userNotificationComparator),this.__emitChange()}},t.prototype.onLoadFailure=function(){this.isLoadingFlag&&(this.isLoadingFlag=!1,this.__emitChange())},t.prototype.onAcknowledgementRequest=function(){this.userNotifications.forEach(this.markNotificationAsReadLocally),this.__emitChange()},t.prototype.onAcknowledgementRequestSingle=function(e){this.markNotificationAsReadLocally(e),this.__emitChange()},t.prototype.onMarkAsSeenRequest=function(){this.userNotifications.forEach((function(e){e.isSeen||(e.seenState=s.NotificationSeenState.Seen)})),this.__emitChange()},t.prototype.__onDispatch=function(e){switch(e.action.type){case i.ActionTypes.LOAD_REQUEST:this.onLoadRequest();break;case i.ActionTypes.LOAD_SUCCESS:this.onLoadSuccess(e.action.data);break;case i.ActionTypes.LOAD_FAILURE:this.onLoadFailure();break;case i.ActionTypes.ACKNOWLEDGEMENT_REQUEST:this.onAcknowledgementRequest();break;case i.ActionTypes.ACKNOWLEDGEMENT_REQUEST_SINGLE:this.onAcknowledgementRequestSingle(e.action.data.notifications[0]);break;case i.ActionTypes.MARK_AS_SEEN_REQUEST:this.onMarkAsSeenRequest()}},t})(a.FluxStore);t.UserNotificationsStore=u,t.userNotificationsStore=new u(r.userNotificationsDispatcher)})),define("modules/clean/react/user_notifications/thumbnail_preview",["require","exports","tslib","react","spectrum/file_icon","spectrum/icon_content"],(function(e,t,n,o,a,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o=n.__importDefault(o);var r={"paper-pad":"paper-small","paper-folder":"folder-small","dropbox-folder":"folder-small"},s=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.render=function(){var e=this.props.object||{},t=e.type,n=e.name;return t&&n?o.default.createElement("div",{className:"preview-thumbnail--wrapper"},o.default.createElement("div",{className:"preview-thumbnail"},"dropbox-file"===t?o.default.createElement(a.FileIcon,{path:n,variant:"small",className:"preview-thumbnail--icon"}):o.default.createElement(i.IconContent,{name:r[t]||"unknown-small",className:"preview-thumbnail--icon"}),o.default.createElement("div",{className:"preview-thumbnail--text"},n))):null},t.displayName="ThumbnailPreview",t})(o.default.Component);t.ThumbnailPreview=s})),define("modules/clean/sprite",["require","exports","tslib","jquery","modules/clean/static_urls","modules/core/html"],(function(e,t,n,o,a,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o=n.__importDefault(o);var r={SPACER:a.static_url("/static/images/icons/icon_spacer-vflN3BYt2.gif"),CLASS_PREFIX:"s_",_make_class:function(e,t){return this.CLASS_PREFIX+e+"_"+t},src:function(e,t,n){return this.clear(e),o.default(e).addClass(this._make_class(t,n))},replace:function(e,t,n,a){return o.default(e).removeClass(this._make_class(t,n)).addClass(this._make_class(t,a))},clear:function(e){var t=this,n=e.className.split(" ");return n=o.default.grep(n,(function(e){return e&&0!==e.indexOf(t.CLASS_PREFIX)})),e.className=n.join(" ")},make:function(e,t,n){return n=this._prep_attrs(e,t,n),o.default("",n)[0]},html:function(e,t,n){n=this._prep_attrs(e,t,n);var o=[""),new i.HTML(o.join(""))},_prep_attrs:function(e,t,n){void 0===n&&(n={}),n.src=n.src||this.SPACER;var o=["sprite","sprite_"+e,this._make_class(e,t)];return n.class&&o.push(n.class),n.class=o.join(" "),n},_get:function(e){return e.className},_set:function(e,t){return e.className=t,e.src=this.SPACER}};t.default=r})); //# sourceMappingURL=pkg-notifications.min.js-vflOgyjwT.map