UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

2 lines • 429 kB
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require(void 0),require(void 0));else if("function"==typeof define&&define.amd)define(["react","react-dom"],t);else{var o="object"==typeof exports?t(require("react"),require("react-dom")):t(e[void 0],e[void 0]);for(var i in o)("object"==typeof exports?exports:e)[i]=o[i]}}(this,function(e,t){return function(e){function t(i){if(o[i])return o[i].exports;var r=o[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";function i(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}i(o(1)),i(o(45)),i(o(23)),i(o(50)),i(o(54)),i(o(63)),i(o(86)),i(o(19)),i(o(90)),i(o(98)),i(o(144)),i(o(157)),i(o(177)),i(o(31)),i(o(181)),i(o(185)),i(o(8)),i(o(112)),i(o(57)),i(o(69)),i(o(26)),i(o(117)),i(o(134)),i(o(186)),i(o(191)),i(o(196)),i(o(200)),i(o(150)),i(o(203)),i(o(208)),i(o(164)),i(o(215)),i(o(218)),i(o(224)),i(o(228)),i(o(232)),i(o(128)),i(o(66)),i(o(236)),i(o(17)),i(o(12)),i(o(7)),i(o(6)),i(o(13))},function(e,t,o){"use strict";function i(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}i(o(2))},function(e,t,o){"use strict";function i(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}i(o(3))},function(e,t,o){"use strict";var i=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=this&&this.__decorate||function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},n=o(4),s=o(5),a=o(8),l=o(19),c=o(22),m=o(13),d=o(14),u=o(17),p=o(16);o(44);var h="overflow",f=44,g=function(e){function t(t){e.call(this,t),this._id=d.getId("Breadcrumb"),this.state=this._getStateFromProps(t)}return i(t,e),t.prototype.componentDidMount=function(){this._updateItemMeasurements(),this._updateRenderedItems(),this._events.on(window,"resize",this._updateRenderedItems)},t.prototype.componentWillReceiveProps=function(e){this.setState(this._getStateFromProps(e)),this._breadcrumbItemWidths=null},t.prototype.componentDidUpdate=function(e,t){this._breadcrumbItemWidths||(this._updateItemMeasurements(),this._updateRenderedItems())},t.prototype.render=function(){var e=this,t=this.props.className,o=this.state,i=o.isOverflowOpen,r=o.overflowAnchor,s=o.renderedItems,d=o.renderedOverflowItems,p=this._id+"-overflow";return n.createElement("div",{className:u.css("ms-Breadcrumb",t),ref:"renderingArea"},n.createElement(a.FocusZone,{direction:a.FocusZoneDirection.horizontal},n.createElement("ul",{className:"ms-Breadcrumb-list"},d&&d.length?n.createElement("li",{className:"ms-Breadcrumb-overflow",key:h,ref:h},n.createElement("div",{className:"ms-Breadcrumb-overflowButton ms-Icon ms-Icon--ellipsis",onClick:this._onOverflowClicked,"data-is-focusable":!0,role:"button","aria-haspopup":"true","aria-owns":i?p:null}),n.createElement("i",{className:u.css("ms-Breadcrumb-chevron ms-Icon",m.getRTL()?"ms-Icon--chevronLeft":"ms-Icon--chevronRight")})):null,s.map(function(t,o){return n.createElement("li",{className:"ms-Breadcrumb-listItem",key:t.key||String(o),ref:t.key||String(o)},n.createElement("a",{className:"ms-Breadcrumb-itemLink",onClick:t.onClick?e._onBreadcrumbClicked.bind(e,t):null,href:t.href,role:t.onClick?"button":"link"},t.text),n.createElement("i",{className:u.css("ms-Breadcrumb-chevron ms-Icon",m.getRTL()?"ms-Icon--chevronLeft":"ms-Icon--chevronRight")}))}))),i?n.createElement(l.ContextualMenu,{targetElement:r,isBeakVisible:!0,items:d.map(function(t,o){return{name:t.text,key:t.key,onClick:e._onBreadcrumbClicked.bind(e,t),href:t.href}}),id:p,directionalHint:c.DirectionalHint.bottomLeftEdge,onDismiss:this._onOverflowDismissed}):null)},t.prototype._onOverflowClicked=function(e){this.setState({isOverflowOpen:!this.state.isOverflowOpen,overflowAnchor:e.currentTarget})},t.prototype._onOverflowDismissed=function(e){this.setState({isOverflowOpen:!1,overflowAnchor:null})},t.prototype._onBreadcrumbClicked=function(e,t){e.onClick&&e.onClick(e.key),this.setState({isOverflowOpen:!1})},t.prototype._updateItemMeasurements=function(){var e=this.props.items;this._breadcrumbItemWidths||(this._breadcrumbItemWidths={});for(var t=0;t<e.length;t++){var o=e[t];if(!this._breadcrumbItemWidths[o.key]){var i=this.refs[o.key];this._breadcrumbItemWidths[o.key]=i.getBoundingClientRect().width}}},t.prototype._updateRenderedItems=function(){var e=this.props,t=e.items,o=e.maxDisplayedItems,i=this.refs.renderingArea,r=[],n=[].concat(t),s=0,a=window.getComputedStyle(i),l=i.clientWidth-parseInt(a.marginLeft,10)-parseInt(a.marginRight,10);l-=f;var c,m=Math.max(0,n.length-o);for(c=n.length-1;c>=m;c--){var d=n[c],u=this._breadcrumbItemWidths[d.key];if(s+u>=l)break;s+=u}r=n.splice(c+1),this.setState({isOverflowOpen:this.state.isOverflowOpen,overflowAnchor:this.state.overflowAnchor,renderedItems:r,renderedOverflowItems:n})},t.prototype._getStateFromProps=function(e){return{isOverflowOpen:!1,overflowAnchor:null,renderedItems:e.items||[],renderedOverflowItems:null}},t.defaultProps={items:[],maxDisplayedItems:999},r([p.autobind],t.prototype,"_onOverflowClicked",null),r([p.autobind],t.prototype,"_onOverflowDismissed",null),r([p.autobind],t.prototype,"_onBreadcrumbClicked",null),t}(s.BaseComponent);t.Breadcrumb=g},function(t,o){t.exports=e},function(e,t,o){"use strict";function i(e,t,o){for(var i=0,n=o.length;i<n;i++)r(e,t,o[i])}function r(e,t,o){var i=e[o],r=t[o];(i||r)&&(e[o]=function(){var t;try{r&&(t=r.apply(this,arguments)),i&&(t=i.apply(this,arguments))}catch(n){var s="Exception in "+e.className+"."+o+"(): "+("string"==typeof n?n:n.stack);m.onError&&m.onError(s,n)}return t})}function n(e,t,o){if(console&&console.warn){var i=e.className+" property '"+t+"' was used but has been deprecated.";o&&(i+=" Use '"+o+"' instead."),console.warn(i)}}var s=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},a=o(4),l=o(6),c=o(7);document&&document.documentElement&&!document.documentElement.getAttribute("dir")&&document.documentElement.setAttribute("dir","ltr");var m=function(e){function t(o,r){if(e.call(this,o),r)for(var s in r)s in o&&n(this,s,r[s]);i(this,t.prototype,["componentWillMount","componentDidMount","shouldComponentUpdate","componentWillUpdate","componentWillReceiveProps","render","componentDidUpdate","componentWillUnmount"])}return s(t,e),t.prototype.componentWillUnmount=function(){if(this.__disposables){for(var e=0,t=this._disposables.length;e<t;e++)this.__disposables[e].dispose();this.__disposables=null}},Object.defineProperty(t.prototype,"className",{get:function(){var e=/function (.{1,})\(/,t=e.exec(this.constructor.toString());return t&&t.length>1?t[1]:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_disposables",{get:function(){return this.__disposables||(this.__disposables=[]),this.__disposables},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_async",{get:function(){return this.__async||(this.__async=new l.Async(this),this._disposables.push(this.__async)),this.__async},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_events",{get:function(){return this.__events||(this.__events=new c.EventGroup(this),this._disposables.push(this.__events)),this.__events},enumerable:!0,configurable:!0}),t.prototype._resolveRef=function(e){var t=this;return this.__resolves||(this.__resolves={}),this.__resolves[e]||(this.__resolves[e]=function(o){return t[e]=o}),this.__resolves[e]},t}(a.Component);t.BaseComponent=m,m.onError=function(e){return console.error(e)}},function(e,t){"use strict";var o=function(){function e(e,t){this._timeoutIds=null,this._immediateIds=null,this._intervalIds=null,this._animationFrameIds=null,this._isDisposed=!1,this._parent=e||null,this._onErrorHandler=t,this._noop=function(){}}return e.prototype.dispose=function(){var e;if(this._isDisposed=!0,this._parent=null,this._timeoutIds){for(e in this._timeoutIds)this._timeoutIds.hasOwnProperty(e)&&this.clearTimeout(e);this._timeoutIds=null}if(this._immediateIds){for(e in this._immediateIds)this._immediateIds.hasOwnProperty(e)&&this.clearImmediate(e);this._immediateIds=null}if(this._intervalIds){for(e in this._intervalIds)this._intervalIds.hasOwnProperty(e)&&this.clearInterval(e);this._intervalIds=null}if(this._animationFrameIds){for(e in this._animationFrameIds)this._animationFrameIds.hasOwnProperty(e)&&this.cancelAnimationFrame(e);this._animationFrameIds=null}},e.prototype.setTimeout=function(e,t){var o=this,i=0;return this._isDisposed||(this._timeoutIds||(this._timeoutIds={}),i=setTimeout(function(){try{delete o._timeoutIds[i],e.apply(o._parent)}catch(t){o._onErrorHandler&&o._onErrorHandler(t)}},t),this._timeoutIds[i]=!0),i},e.prototype.clearTimeout=function(e){this._timeoutIds&&this._timeoutIds[e]&&(clearTimeout(e),delete this._timeoutIds[e])},e.prototype.setImmediate=function(e){var t=this,o=0;if(!this._isDisposed){this._immediateIds||(this._immediateIds={});var i=function(){try{delete t._immediateIds[o],e.apply(t._parent)}catch(i){t._logError(i)}};o=window.setImmediate?window.setImmediate(i):window.setTimeout(i,0),this._immediateIds[o]=!0}return o},e.prototype.clearImmediate=function(e){this._immediateIds&&this._immediateIds[e]&&(window.clearImmediate?window.clearImmediate(e):window.clearTimeout(e),delete this._immediateIds[e])},e.prototype.setInterval=function(e,t){var o=this,i=0;return this._isDisposed||(this._intervalIds||(this._intervalIds={}),i=setInterval(function(){try{e.apply(o._parent)}catch(t){o._logError(t)}},t),this._intervalIds[i]=!0),i},e.prototype.clearInterval=function(e){this._intervalIds&&this._intervalIds[e]&&(clearInterval(e),delete this._intervalIds[e])},e.prototype.throttle=function(e,t,o){var i=this;if(this._isDisposed)return this._noop;var r,n,s=t||0,a=!0,l=!0,c=0,m=null;o&&"boolean"==typeof o.leading&&(a=o.leading),o&&"boolean"==typeof o.trailing&&(l=o.trailing);var d=function(t){var o=(new Date).getTime(),u=o-c,p=a?s-u:s;return u>=s&&(!t||a)?(c=o,m&&(i.clearTimeout(m),m=null),r=e.apply(i._parent,n)):null===m&&l&&(m=i.setTimeout(d,p)),r},u=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return n=e,d(!0)};return u},e.prototype.debounce=function(e,t,o){var i=this;if(this._isDisposed)return this._noop;var r,n,s=t||0,a=!1,l=!0,c=null,m=0,d=(new Date).getTime(),u=null;o&&"boolean"==typeof o.leading&&(a=o.leading),o&&"boolean"==typeof o.trailing&&(l=o.trailing),o&&"number"==typeof o.maxWait&&!isNaN(o.maxWait)&&(c=o.maxWait);var p=function(t){var o=(new Date).getTime(),h=!1;t&&(a&&o-m>=s&&(h=!0),m=o);var f=o-m,g=s-f,b=o-d,v=!1;return null!==c&&(b>=c&&u?v=!0:g=Math.min(g,c-b)),f>=s||v||h?(u&&(i.clearTimeout(u),u=null),d=o,r=e.apply(i._parent,n)):null!==u&&t||!l||(u=i.setTimeout(p,g)),r},h=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return n=e,p(!0)};return h},e.prototype.requestAnimationFrame=function(e){var t=this,o=0;if(!this._isDisposed){this._animationFrameIds||(this._animationFrameIds={});var i=function(){try{delete t._animationFrameIds[o],e.apply(t._parent)}catch(i){t._logError(i)}};o=window.requestAnimationFrame?window.requestAnimationFrame(i):window.setTimeout(i,0),this._animationFrameIds[o]=!0}return o},e.prototype.cancelAnimationFrame=function(e){this._animationFrameIds&&this._animationFrameIds[e]&&(window.cancelAnimationFrame?window.cancelAnimationFrame(e):window.clearTimeout(e),delete this._animationFrameIds[e])},e.prototype._logError=function(e){this._onErrorHandler&&this._onErrorHandler(e)},e}();t.Async=o},function(e,t){"use strict";var o=function(){function e(t){this._id=e._uniqueId++,this._parent=t,this._eventRecords=[]}return e.raise=function(t,o,i,r){var n;if(e._isElement(t)){if(document.createEvent){var s=document.createEvent("HTMLEvents");s.initEvent(o,r,!0),s.args=i,n=t.dispatchEvent(s)}else if(document.createEventObject){var a=document.createEventObject(i);t.fireEvent("on"+o,a)}}else for(;t&&n!==!1;){var l=t.__events__,c=l?l[o]:null;for(var m in c)if(c.hasOwnProperty(m))for(var d=c[m],u=0;n!==!1&&u<d.length;u++){var p=d[u];p.objectCallback&&(n=p.objectCallback.call(p.parent,i))}t=r?t.parent:null}return n},e.isObserved=function(e,t){var o=e&&e.__events__;return!!o&&!!o[t]},e.isDeclared=function(e,t){var o=e&&e.__declaredEvents;return!!o&&!!o[t]},e.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},e._isElement=function(e){return!!e&&(e instanceof HTMLElement||e.addEventListener)},e.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this.off(),this._parent=null)},e.prototype.onAll=function(e,t,o){for(var i in t)t.hasOwnProperty(i)&&this.on(e,i,t[i],o)},e.prototype.on=function(t,o,i,r){var n=this;if(o.indexOf(",")>-1)for(var s=o.split(/[ ,]+/),a=0;a<s.length;a++)this.on(t,s[a],i,r);else{var l=this._parent,c={target:t,eventName:o,parent:l,callback:i,objectCallback:null,elementCallback:null,useCapture:r},s=t.__events__=t.__events__||{};if(s[o]=s[o]||{count:0},s[o][this._id]=s[o][this._id]||[],s[o][this._id].push(c),s[o].count++,e._isElement(t)){var m=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];if(!n._isDisposed){var o;try{if(o=i.apply(l,e),o===!1&&e[0]){var r=e[0];r.preventDefault&&r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.cancelBubble=!0}}catch(r){}return o}};c.elementCallback=m,t.addEventListener?t.addEventListener(o,m,r):t.attachEvent&&t.attachEvent("on"+o,m)}else{var d=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];if(!n._isDisposed)return i.apply(l,e)};c.objectCallback=d}this._eventRecords.push(c)}},e.prototype.off=function(e,t,o,i){for(var r=0;r<this._eventRecords.length;r++){var n=this._eventRecords[r];if(!(e&&e!==n.target||t&&t!==n.eventName||o&&o!==n.callback||"boolean"==typeof i&&i!==n.useCapture)){var s=n.target.__events__,a=s[n.eventName],l=a?a[this._id]:null;l&&(1!==l.length&&o?(a.count--,l.splice(l.indexOf(n),1)):(a.count-=l.length,delete s[n.eventName][this._id]),a.count||delete s[n.eventName]),n.elementCallback&&(n.target.removeEventListener?n.target.removeEventListener(n.eventName,n.elementCallback,n.useCapture):n.target.detachEvent&&n.target.detachEvent("on"+n.eventName,n.elementCallback)),this._eventRecords.splice(r--,1)}}},e.prototype.raise=function(t,o,i){return e.raise(this._parent,t,o,i)},e.prototype.declare=function(e){var t=this._parent.__declaredEvents=this._parent.__declaredEvents||{};if("string"==typeof e)t[e]=!0;else for(var o=0;o<e.length;o++)t[e[o]]=!0},e._uniqueId=0,e}();t.EventGroup=o},function(e,t,o){"use strict";function i(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}i(o(9))},function(e,t,o){"use strict";function i(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}i(o(10)),i(o(11))},function(e,t,o){"use strict";var i=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=this&&this.__decorate||function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},n=o(4),s=o(11),a=o(7),l=o(12),c=o(13),m=o(14),d=o(16),u=o(17),p=o(18),h="data-is-focusable",f="data-disable-click-on-enter",g="data-focuszone-id",b="tabindex",v={},y=function(e){function t(t){e.call(this,t),this._id=m.getId("FocusZone"),v[this._id]=this,this._focusAlignment={left:0,top:0},this._events=new a.EventGroup(this)}return i(t,e),t.prototype.componentDidMount=function(){for(var e=this.refs.root.ownerDocument.defaultView,t=this.refs.root.parentElement;t&&t!==document.body;){if(p.isElementFocusZone(t)){this._isInnerZone=!0;break}t=t.parentElement}this._events.on(e,"keydown",this._onKeyDownCapture,!0)},t.prototype.componentWillUnmount=function(){this._events.dispose(),delete v[this._id]},t.prototype.render=function(){var e=this.props,t=e.rootProps,o=e.ariaLabelledBy,i=e.className;return n.createElement("div",n.__spread({},t,{className:u.css("ms-FocusZone",i),ref:"root","data-focuszone-id":this._id,"aria-labelledby":o,onMouseDownCapture:this._onMouseDown,onKeyDown:this._onKeyDown,onFocus:this._onFocus}),this.props.children)},t.prototype.focus=function(){if(this._activeElement&&this.refs.root.contains(this._activeElement))return this._activeElement.focus(),!0;var e=this.refs.root.firstChild;return this.focusElement(p.getNextElement(this.refs.root,e,!0))},t.prototype.focusElement=function(e){var t=this.props.onBeforeFocus;return!(t&&!t(e))&&(!(!e||(this._activeElement&&(this._activeElement.tabIndex=-1),this._activeElement=e,!e))&&(this._focusAlignment||this._setFocusAlignment(e,!0,!0),this._activeElement.tabIndex=0,e.focus(),!0))},t.prototype._onFocus=function(e){var t=this.props.onActiveElementChanged;if(this._isImmediateDescendantOfZone(e.target))this._activeElement=e.target,this._setFocusAlignment(this._activeElement);else for(var o=e.target;o&&o!==this.refs.root;){if(p.isElementTabbable(o)&&this._isImmediateDescendantOfZone(o)){this._activeElement=o;break}o=o.parentElement}t&&t(this._activeElement,e)},t.prototype._onKeyDownCapture=function(e){e.which===l.KeyCodes.tab&&this._updateTabIndexes()},t.prototype._onMouseDown=function(e){var t=this.props.disabled;if(!t){for(var o=e.target,i=[];o&&o!==this.refs.root;)i.push(o),o=o.parentElement;for(;i.length&&(o=i.pop(),!p.isElementFocusZone(o));)o&&p.isElementTabbable(o)&&(o.tabIndex=0,this._setFocusAlignment(o,!0,!0))}},t.prototype._onKeyDown=function(e){var t=this.props,o=t.direction,i=t.disabled,r=t.isInnerZoneKeystroke;if(!i){if(r&&this._isImmediateDescendantOfZone(e.target)&&r(e)){var n=this._getFirstInnerZone();if(!n||!n.focus())return}else switch(e.which){case l.KeyCodes.left:if(o!==s.FocusZoneDirection.vertical&&this._moveFocusLeft())break;return;case l.KeyCodes.right:if(o!==s.FocusZoneDirection.vertical&&this._moveFocusRight())break;return;case l.KeyCodes.up:if(o!==s.FocusZoneDirection.horizontal&&this._moveFocusUp())break;return;case l.KeyCodes.down:if(o!==s.FocusZoneDirection.horizontal&&this._moveFocusDown())break;return;case l.KeyCodes.home:var a=this.refs.root.firstChild;if(this.focusElement(p.getNextElement(this.refs.root,a,!0)))break;return;case l.KeyCodes.end:var c=this.refs.root.lastChild;if(this.focusElement(p.getPreviousElement(this.refs.root,c,!0,!0,!0)))break;return;case l.KeyCodes.enter:if(this._tryInvokeClickForFocusable(e.target))break;return;default:return}e.preventDefault(),e.stopPropagation()}},t.prototype._tryInvokeClickForFocusable=function(e){do{if("BUTTON"===e.tagName||"A"===e.tagName)return!1;if(this._isImmediateDescendantOfZone(e)&&"true"===e.getAttribute(h)&&"true"!==e.getAttribute(f))return a.EventGroup.raise(e,"click",null,!0),!0;e=e.parentElement}while(e!==this.refs.root);return!1},t.prototype._getFirstInnerZone=function(e){e=e||this._activeElement||this.refs.root;for(var t=e.firstElementChild;t;){if(p.isElementFocusZone(t))return v[t.getAttribute(g)];var o=this._getFirstInnerZone(t);if(o)return o;t=t.nextElementSibling}return null},t.prototype._moveFocus=function(e,t,o){var i,r=this._activeElement,n=-1,a=!1,l=this.props.direction===s.FocusZoneDirection.bidirectional;if(this._activeElement){var c=l?this._activeElement.getBoundingClientRect():null;do{if(r=e?p.getNextElement(this.refs.root,r):p.getPreviousElement(this.refs.root,r),!l){i=r;break}if(r){var m=r.getBoundingClientRect(),d=t(c,m);if(d>-1&&(n===-1||d<n)&&(n=d,i=r),n>=0&&d<0)break}}while(r);if(i&&i!==this._activeElement)a=!0,this.focusElement(i);else if(this.props.isCircularNavigation)return e?this.focusElement(p.getNextElement(this.refs.root,this.refs.root.firstElementChild,!0)):this.focusElement(p.getPreviousElement(this.refs.root,this.refs.root.lastElementChild,!0,!0,!0));return a}},t.prototype._moveFocusDown=function(){var e=-1,t=this._focusAlignment.left;return!!this._moveFocus(!0,function(o,i){var r=-1;return(e===-1&&i.top>=o.bottom||i.top===e)&&(e=i.top,r=t>=i.left&&t<=i.left+i.width?0:Math.abs(i.left+i.width/2-t)),r})&&(this._setFocusAlignment(this._activeElement,!1,!0),!0)},t.prototype._moveFocusUp=function(){var e=-1,t=this._focusAlignment.left;return!!this._moveFocus(!1,function(o,i){var r=-1;return(e===-1&&i.bottom<=o.top||i.top===e)&&(e=i.top,r=t>=i.left&&t<=i.left+i.width?0:Math.abs(i.left+i.width/2-t)),r})&&(this._setFocusAlignment(this._activeElement,!1,!0),!0)},t.prototype._moveFocusLeft=function(){var e=this,t=-1,o=this._focusAlignment.top;return!!this._moveFocus(c.getRTL(),function(i,r){var n=-1;return(t===-1&&r.right<=i.right&&(e.props.direction===s.FocusZoneDirection.horizontal||r.top===i.top)||r.top===t)&&(t=r.top,n=Math.abs(r.top+r.height/2-o)),n})&&(this._setFocusAlignment(this._activeElement,!0,!1),!0)},t.prototype._moveFocusRight=function(){var e=this,t=-1,o=this._focusAlignment.top;return!!this._moveFocus(!c.getRTL(),function(i,r){var n=-1;return(t===-1&&r.left>=i.left&&(e.props.direction===s.FocusZoneDirection.horizontal||r.top===i.top)||r.top===t)&&(t=r.top,n=Math.abs(r.top+r.height/2-o)),n})&&(this._setFocusAlignment(this._activeElement,!0,!1),!0)},t.prototype._setFocusAlignment=function(e,t,o){if(this.props.direction===s.FocusZoneDirection.bidirectional&&(!this._focusAlignment||t||o)){var i=e.getBoundingClientRect(),r=i.left+i.width/2,n=i.top+i.height/2;this._focusAlignment||(this._focusAlignment={left:r,top:n}),t&&(this._focusAlignment.left=r),o&&(this._focusAlignment.top=n)}},t.prototype._isImmediateDescendantOfZone=function(e){for(var t=e.parentElement;t&&t!==this.refs.root&&t!==document.body;){if(p.isElementFocusZone(t))return!1;t=t.parentElement}return!0},t.prototype._updateTabIndexes=function(e){e||(e=this.refs.root,this._activeElement&&!e.contains(this._activeElement)&&(this._activeElement=null));for(var t=e.children,o=0;t&&o<t.length;o++){var i=t[o];p.isElementFocusZone(i)||(p.isElementTabbable(i)?this.props.disabled?i.setAttribute(b,"-1"):this._isInnerZone||this._activeElement&&this._activeElement!==i?"-1"!==i.getAttribute(b)&&i.setAttribute(b,"-1"):(this._activeElement=i,"0"!==i.getAttribute(b)&&i.setAttribute(b,"0")):"svg"===i.tagName&&"false"!==i.getAttribute("focusable")&&i.setAttribute("focusable","false"),this._updateTabIndexes(i))}},t.defaultProps={isCircularNavigation:!1,direction:s.FocusZoneDirection.bidirectional},r([d.autobind],t.prototype,"_onFocus",null),r([d.autobind],t.prototype,"_onMouseDown",null),r([d.autobind],t.prototype,"_onKeyDown",null),t}(n.Component);t.FocusZone=y},function(e,t){"use strict";!function(e){e[e.vertical=0]="vertical",e[e.horizontal=1]="horizontal",e[e.bidirectional=2]="bidirectional"}(t.FocusZoneDirection||(t.FocusZoneDirection={}));t.FocusZoneDirection},function(e,t){"use strict";!function(e){e[e.a=65]="a",e[e.backspace=8]="backspace",e[e.comma=188]="comma",e[e.del=46]="del",e[e.down=40]="down",e[e.end=35]="end",e[e.enter=13]="enter",e[e.escape=27]="escape",e[e.home=36]="home",e[e.left=37]="left",e[e.pageDown=34]="pageDown",e[e.pageUp=33]="pageUp",e[e.right=39]="right",e[e.semicolon=186]="semicolon",e[e.space=32]="space",e[e.tab=9]="tab",e[e.up=38]="up"}(t.KeyCodes||(t.KeyCodes={}));t.KeyCodes},function(e,t,o){"use strict";function i(){return void 0===s&&(s="rtl"===document.documentElement.getAttribute("dir")),s}function r(e){document.documentElement.setAttribute("dir",e?"rtl":"ltr"),s=e}function n(e){return i()&&(e===a.KeyCodes.left?e=a.KeyCodes.right:e===a.KeyCodes.right&&(e=a.KeyCodes.left)),e}var s,a=o(12);t.getRTL=i,t.setRTL=r,t.getRTLSafeKeyCode=n},function(e,t,o){(function(e){"use strict";function o(e,t){for(var o in e)if(e.hasOwnProperty(o)&&(!t.hasOwnProperty(o)||t[o]!==e[o]))return!1;return!0}function i(e,t){return o(e,t)&&o(t,e)}function r(e){for(var t=[],o=1;o<arguments.length;o++)t[o-1]=arguments[o];e=e||{};for(var i=0,r=t;i<r.length;i++){var n=r[i];if(n)for(var s in n)n.hasOwnProperty(s)&&(e[s]=n[s])}return e}function n(e){var t=a[s]++;return(e||"")+t}var s="__currentId__",a=window||e;void 0===a[s]&&(a[s]=0),t.shallowCompare=i,t.assign=r,t.getId=n}).call(t,o(15))},function(e,t){function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function r(e){if(m===setTimeout)return setTimeout(e,0);if((m===o||!m)&&setTimeout)return m=setTimeout,setTimeout(e,0);try{return m(e,0)}catch(t){try{return m.call(null,e,0)}catch(t){return m.call(this,e,0)}}}function n(e){if(d===clearTimeout)return clearTimeout(e);if((d===i||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function s(){f&&p&&(f=!1,p.length?h=p.concat(h):g=-1,h.length&&a())}function a(){if(!f){var e=r(s);f=!0;for(var t=h.length;t;){for(p=h,h=[];++g<t;)p&&p[g].run();g=-1,t=h.length}p=null,f=!1,n(e)}}function l(e,t){this.fun=e,this.array=t}function c(){}var m,d,u=e.exports={};!function(){try{m="function"==typeof setTimeout?setTimeout:o}catch(e){m=o}try{d="function"==typeof clearTimeout?clearTimeout:i}catch(e){d=i}}();var p,h=[],f=!1,g=-1;u.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var o=1;o<arguments.length;o++)t[o-1]=arguments[o];h.push(new l(e,t)),1!==h.length||f||r(a)},l.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=c,u.addListener=c,u.once=c,u.off=c,u.removeListener=c,u.removeAllListeners=c,u.emit=c,u.binding=function(e){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(e){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},function(e,t){"use strict";function o(e,t,o){var i=o.value;return{configurable:!0,get:function(){return this===i.prototype?i:i.bind(this)},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:!0,value:e})}}}t.autobind=o},function(e,t){"use strict";function o(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];for(var o=[],i=0,r=e;i<r.length;i++){var n=r[i];if(n)if("string"==typeof n)o.push(n);else for(var s in n)n[s]&&o.push(s)}return o.join(" ")}t.css=o},function(e,t){"use strict";function o(e,t,o){return s(e,t,!0,!1,!1,o)}function i(e,t,o){return n(e,t,!0,!1,!0,o)}function r(e){var t=s(e,e,!0,!1,!1,!0);return!!t&&(t.focus(),!0)}function n(e,t,o,i,r,s){if(!t||t===e)return null;var m=a(t);if(r&&(s||!c(t))&&m){var d=n(e,t.lastElementChild,!0,!0,!0,s);if(d)return d}if(o&&m&&l(t))return t;var u=n(e,t.previousElementSibling,!0,!0,!0,s);return u?u:i?null:n(e,t.parentElement,!0,!1,!1,s)}function s(e,t,o,i,r,n){if(!t||t===e&&r)return null;var m=a(t);if(o&&m&&l(t))return t;if(!r&&m&&(n||!c(t))){var d=s(e,t.firstElementChild,!0,!0,!1,n);if(d)return d}if(t===e)return null;var u=s(e,t.nextElementSibling,!0,!0,!1,n);return u?u:i?null:s(e,t.parentElement,!1,!1,!0,n)}function a(e){if(!e||!e.getAttribute)return!1;var t=e.getAttribute(d);return null!==t&&void 0!==t?"true"===t:0!==e.offsetHeight||null!==e.offsetParent||e.isVisible===!0}function l(e){return!!e&&("A"===e.tagName||"BUTTON"===e.tagName&&!e.disabled||"INPUT"===e.tagName&&!e.disabled||e.getAttribute&&"true"===e.getAttribute(m))}function c(e){return e&&!!e.getAttribute(u)}var m="data-is-focusable",d="data-is-visible",u="data-focuszone-id";t.getFirstFocusable=o,t.getLastFocusable=i,t.focusFirstChild=r,t.getPreviousElement=n,t.getNextElement=s,t.isElementVisible=a,t.isElementTabbable=l,t.isElementFocusZone=c},function(e,t,o){"use strict";function i(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}i(o(20))},function(e,t,o){"use strict";function i(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}i(o(21)),i(o(43))},function(e,t,o){"use strict";var i=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=this&&this.__decorate||function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},n=o(4),s=o(22),a=o(8),l=o(12),c=o(7),m=o(16),d=o(17),u=o(13),p=o(14),h=o(6),f=o(23);o(42);var g;!function(e){e[e.vertical=0]="vertical",e[e.horizontal=1]="horizontal"}(g||(g={}));var b;!function(e){e[e.auto=0]="auto",e[e.left=1]="left",e[e.center=2]="center",e[e.right=3]="right"}(b||(b={}));var v;!function(e){e[e.top=0]="top",e[e.center=1]="center",e[e.bottom=2]="bottom"}(v||(v={}));var y=function(e){function t(t){e.call(this,t),this.state={contextualMenuItems:null,subMenuId:p.getId("ContextualMenu")},this._isFocusingPreviousElement=!1,this._didSetInitialFocus=!1,this._enterTimerId=0,this._events=new c.EventGroup(this),this._async=new h.Async(this)}return i(t,e),t.prototype.dismiss=function(e){var t=this.props.onDismiss;t&&t(e)},t.prototype.componentWillMount=function(){this._previousActiveElement=document.activeElement},t.prototype.componentDidMount=function(){this._events.on(window,"resize",this.dismiss)},t.prototype.componentWillReceiveProps=function(e,t){e.targetElement!==this.props.targetElement&&(this._didSetInitialFocus=!1)},t.prototype.componentWillUnmount=function(){var e=this;this._isFocusingPreviousElement&&this._previousActiveElement&&setTimeout(function(){return e._previousActiveElement.focus()},0),this._events.dispose(),this._async.dispose()},t.prototype.render=function(){var e=this,o=this.props,i=o.className,r=o.items,s=o.isBeakVisible,l=o.labelElementId,c=o.targetElement,m=o.id,u=o.targetPoint,p=o.useTargetPoint,h=o.beakWidth,g=o.directionalHint,b=o.gapSpace,v=o.isSubMenu,y=o.coverTarget,w=o.ariaLabel,x=this.state.submenuProps,P=!(!r||!r.some(function(e){return!!e.icon})),k=!(!r||!r.some(function(e){return!!e.canCheck}));return n.createElement(f.Callout,{targetElement:c,targetPoint:u,useTargetPoint:p,isBeakVisible:s,beakWidth:h,directionalHint:g,gapSpace:b,doNotLayer:v,coverTarget:y,beakStyle:"ms-Callout-smallbeak",className:"ms-ContextualMenu-Callout",onLayerMounted:function(){return e._tryFocus(e._focusZone)},onDismiss:this.props.onDismiss},n.createElement("div",{ref:function(t){return e._host=t},id:m,className:d.css("ms-ContextualMenu-container",i)},r&&r.length?n.createElement(a.FocusZone,{className:"ms-ContextualMenu is-open",direction:a.FocusZoneDirection.vertical,ariaLabelledBy:l,ref:function(t){return e._focusZone=t},rootProps:{role:"menu"}},n.createElement("ul",{className:"ms-ContextualMenu-list is-open",onKeyDown:this._onKeyDown,"aria-label":w},r.map(function(t,o){return"-"===t.name?n.createElement("li",{role:"separator",key:t.key||o,className:d.css("ms-ContextualMenu-divider",t.className)}):n.createElement("li",{role:"menuitem",title:t.title,key:t.key||o,className:d.css("ms-ContextualMenu-item",t.className)},e._renderMenuItem(t,o,k,P))}))):null,x?n.createElement(t,n.__spread({},x)):null))},t.prototype._renderMenuItem=function(e,t,o,i){var r=this,s=this.state,a=s.expandedMenuItemKey,l=s.subMenuId,c="";return e.ariaLabel?c=e.ariaLabel:e.name&&(c=e.name),e.onRender?e.onRender(e):n.createElement("button",{className:d.css("ms-ContextualMenu-link",{"is-expanded":a===e.key}),onClick:e.onClick||e.items&&e.items.length?this._onItemClick.bind(this,e):e.href?function(){location.href=e.href}:null,onKeyDown:e.items&&e.items.length?this._onItemKeyDown.bind(this,e):null, onMouseEnter:this._onItemMouseEnter.bind(this,e),onMouseLeave:this._onMouseLeave,onMouseDown:function(t){return r._onItemMouseDown(e,t)},disabled:e.isDisabled,dataCommandKey:t,role:"menuitem",href:e.href,title:e.title,"aria-label":c,"aria-haspopup":!(!e.items||!e.items.length)||null,"aria-owns":e.key===a?l:null},this._renderMenuItemChildren(e,t,o,i))},t.prototype._renderMenuItemChildren=function(e,t,o,i){return n.createElement("div",{className:"ms-ContextualMenu-linkContent"},o?n.createElement("span",{className:d.css("ms-ContextualMenu-checkmark",{"ms-Icon ms-Icon--check":e.isChecked,"not-selected":!e.isChecked}),onClick:this._onItemClick.bind(this,e)}):null,i?n.createElement("span",{className:"ms-ContextualMenu-icon"+(e.icon?" ms-Icon ms-Icon--"+e.icon:" no-icon")}):null,n.createElement("span",{className:"ms-ContextualMenu-itemText ms-fontWeight-regular"},e.name),e.items&&e.items.length?n.createElement("i",{className:d.css("ms-ContextualMenu-submenuChevron ms-Icon",u.getRTL()?"ms-Icon--chevronLeft":"ms-Icon--chevronRight")}):null)},t.prototype._tryFocus=function(e){e&&this.props.shouldFocusOnMount&&e.focus()},t.prototype._onKeyDown=function(e){var t=u.getRTL()?l.KeyCodes.right:l.KeyCodes.left;(e.which===l.KeyCodes.escape||e.which===l.KeyCodes.tab||e.which===t&&this.props.isSubMenu)&&(this._isFocusingPreviousElement=!0,e.preventDefault(),e.stopPropagation(),this.dismiss(e))},t.prototype._onItemMouseEnter=function(e,t){var o=this,i=t.currentTarget;e.key!==this.state.expandedMenuItemKey&&(e.items&&e.items.length?this._enterTimerId=this._async.setTimeout(function(){return o._onItemSubMenuExpand(e,i)},500):this._enterTimerId=this._async.setTimeout(function(){return o._onSubMenuDismiss(t)},500))},t.prototype._onMouseLeave=function(e){this._async.clearTimeout(this._enterTimerId)},t.prototype._onItemMouseDown=function(e,t){e.onMouseDown&&e.onMouseDown(e,t)},t.prototype._onItemClick=function(e,t){e.key!==this.state.expandedMenuItemKey&&(e.items&&e.items.length?e.key===this.state.dismissedMenuItemKey?this._onSubMenuDismiss(t):this._onItemSubMenuExpand(e,t.currentTarget):(e.onClick&&e.onClick(e,t),this.dismiss(t))),t.stopPropagation(),t.preventDefault()},t.prototype._onItemKeyDown=function(e,t){var o=u.getRTL()?l.KeyCodes.left:l.KeyCodes.right;t.which===o&&this._onItemSubMenuExpand(e,t.currentTarget)},t.prototype._onItemSubMenuExpand=function(e,t){this.state.expandedMenuItemKey!==e.key&&(this.state.submenuProps&&this._onSubMenuDismiss(),this.setState({expandedMenuItemKey:e.key,submenuProps:{items:e.items,targetElement:t,onDismiss:this._onSubMenuDismiss,isSubMenu:!0,id:this.state.subMenuId,shouldFocusOnMount:!0,directionalHint:u.getRTL()?s.DirectionalHint.leftTopEdge:s.DirectionalHint.rightTopEdge,className:this.props.className}}))},t.prototype._onSubMenuDismiss=function(e){this.setState({dismissedMenuItemKey:this.state.expandedMenuItemKey,expandedMenuItemKey:null,submenuProps:null})},t.defaultProps={items:[],shouldFocusOnMount:!0,isBeakVisible:!1,gapSpace:0,directionalHint:s.DirectionalHint.rightBottomEdge,beakWidth:16},r([m.autobind],t.prototype,"dismiss",null),r([m.autobind],t.prototype,"_onKeyDown",null),r([m.autobind],t.prototype,"_onMouseLeave",null),r([m.autobind],t.prototype,"_onSubMenuDismiss",null),t}(n.Component);t.ContextualMenu=y},function(e,t){"use strict";!function(e){e[e.topLeftEdge=0]="topLeftEdge",e[e.topCenter=1]="topCenter",e[e.topRightEdge=2]="topRightEdge",e[e.topAutoEdge=3]="topAutoEdge",e[e.bottomLeftEdge=4]="bottomLeftEdge",e[e.bottomCenter=5]="bottomCenter",e[e.bottomRightEdge=6]="bottomRightEdge",e[e.bottomAutoEdge=7]="bottomAutoEdge",e[e.leftTopEdge=8]="leftTopEdge",e[e.leftCenter=9]="leftCenter",e[e.leftBottomEdge=10]="leftBottomEdge",e[e.rightTopEdge=11]="rightTopEdge",e[e.rightCenter=12]="rightCenter",e[e.rightBottomEdge=13]="rightBottomEdge"}(t.DirectionalHint||(t.DirectionalHint={}));t.DirectionalHint},function(e,t,o){"use strict";function i(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}i(o(24))},function(e,t,o){"use strict";function i(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}i(o(25)),i(o(22))},function(e,t,o){"use strict";var i=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=this&&this.__decorate||function(e,t,o,i){var r,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,o,s):r(t,o))||s);return n>3&&s&&Object.defineProperty(t,o,s),s},n=o(4),s=o(22),a=o(26),l=o(17),c=o(16),m=o(7),d=o(36),u=o(18),p=o(39),h=o(13);o(41);var f={top:0,left:0},g={top:-9999,left:0},b=function(e){function t(t){e.call(this,t),this.state={positions:null,slideDirectionalClassName:null,calloutElementRect:null},this._events=new m.EventGroup(this)}return i(t,e),t.prototype.componentDidUpdate=function(){this._updatePosition()},t.prototype.componentDidMount=function(){this.props.doNotLayer&&this._onLayerDidMount()},t.prototype.componentWillUnmount=function(){this._events.dispose()},t.prototype.render=function(){var e=this,t=this.props,o=t.className,i=t.targetElement,r=t.isBeakVisible,s=t.beakStyle,c=t.children,m=this.state,d=m.positions,u=m.slideDirectionalClassName,h=n.createElement("div",{ref:function(t){return e._hostElement=t},className:"ms-Callout-container"},n.createElement("div",{className:l.css("ms-Callout",o,u?"ms-u-"+u:""),style:d?d.callout:g,ref:function(t){return e._calloutElement=t}},r&&i?n.createElement("div",{className:s,style:d?d.beak:f}):null,n.createElement(p.Popup,{className:"ms-Callout-main",onDismiss:function(t){return e.dismiss()},shouldRestoreFocus:!0},c)));return this.props.doNotLayer?h:n.createElement(a.Layer,{onLayerMounted:this._onLayerDidMount},h)},t.prototype.dismiss=function(){var e=this.props.onDismiss;e&&e()},t.prototype._dismissOnLostFocus=function(e){var t=this.props.targetElement,o=e.target;e.target===window||!this._hostElement||this._hostElement.contains(o)||t&&t.contains(o)||this.dismiss()},t.prototype._onLayerDidMount=function(){this._events.on(window,"scroll",this._dismissOnLostFocus,!0),this._events.on(window,"resize",this.dismiss,!0),this._events.on(window,"focus",this._dismissOnLostFocus,!0),this._events.on(window,"click",this._dismissOnLostFocus,!0),this.props.setInitialFocus&&u.focusFirstChild(this._calloutElement),this.props.onLayerMounted&&this.props.onLayerMounted(),this._updatePosition()},t.prototype._updatePosition=function(){var e=this.state.positions,t=this._hostElement,o=this._calloutElement;if(t&&o){var i=d.getRelativePositions(this.props,t,o);(!e&&i||e&&i&&(e.callout.top!==i.calloutPosition.top||e.callout.left!==i.calloutPosition.left))&&this.setState({positions:{callout:i.calloutPosition,beak:i.beakPosition},slideDirectionalClassName:i.directionalClassName})}},t.defaultProps={isBeakVisible:!0,beakStyle:"ms-Callout-beak",beakWidth:28,gapSpace:16,directionalHint:h.getRTL()?s.DirectionalHint.bottomRightEdge:s.DirectionalHint.bottomLeftEdge},r([c.autobind],t.prototype,"_onLayerDidMount",null),t}(n.Component);t.Callout=b},function(e,t,o){"use strict";function i(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}i(o(27))},function(e,t,o){"use strict";function i(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}i(o(28))},function(e,t,o){"use strict";var i=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(4),n=o(29),s=o(30),a=o(14);o(34);var l,c="ms-layer-host",m=function(e){function t(t){e.call(this,t),this._layer={id:a.getId("Layer"),children:t.children}}return i(t,e),t.prototype.render=function(){var e=this.context.isInLayer;return e?this.props.children:null},t.prototype.componentWillMount=function(){if(!l){var e=document.createElement("div");e.setAttribute("id",c),document.body.appendChild(e);var t=n.render(r.createElement(s.LayerHost,null),e);l=t}},t.prototype.componentDidMount=function(){this.context.isInLayer?this.props.onLayerMounted&&this.props.onLayerMounted():l.addLayer(this._layer,this.props.onLayerMounted)},t.prototype.componentWillReceiveProps=function(e){this.context.isInLayer||(this._layer.children=e.children,l.updateLayer(this._layer))},t.prototype.componentWillUnmount=function(){this.context.isInLayer||l.removeLayer(this._layer)},t.contextTypes={isInLayer:r.PropTypes.bool},t}(r.Component);t.Layer=m},function(e,o){e.exports=t},function(e,t,o){"use strict";var i=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(4),n=o(31),s=function(e){function t(t){e.call(this,t),this._layers=[],this.state={layers:this._layers}}return i(t,e),t.prototype.getChildContext=function(){return{isInLayer:!0}},t.prototype.render=function(){var e=this.state.layers.map(function(e,t){return r.createElement("div",{className:"ms-LayerHost-layer",key:e.id},e.children)});return r.createElement(n.Fabric,{className:"ms-LayerHost"},e)},t.prototype.addLayer=function(e,t){this._layers.push(e),this.setState({layers:this._layers},function(){t&&t()})},t.prototype.updateLayer=function(e){this.forceUpdate()},t.prototype.removeLayer=function(e){var t=this._layers.indexOf(e);t>-1&&(this._layers.splice(t,1),this.forceUpdate())},t.childContextTypes={isInLayer:r.PropTypes.bool},t}(r.Component);t.LayerHost=s},function(e,t,o){"use strict";function i(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}i(o(32))},function(e,t,o){"use strict";function i(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}i(o(33))},function(e,t,o){"use strict";var i=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(4),n=o(17),s=o(7),a=o(12),l=[a.KeyCodes.up,a.KeyCodes.down,a.KeyCodes.left,a.KeyCodes.right,a.KeyCodes.home,a.KeyCodes.end,a.KeyCodes.tab,a.KeyCodes.pageUp,a.KeyCodes.pageDown],c=!1,m=function(e){function t(){e.call(this),this.state={isFocusVisible:c},this._events=new s.EventGroup(this)}return i(t,e),t.prototype.componentDidMount=function(){this._events.on(document.body,"mousedown",this._onMouseDown,!0),this._events.on(document.body,"keydown",this._onKeyDown,!0)},t.prototype.componentWillUnmount=function(){this._events.dispose()},t.prototype.render=function(){var e=this.state.isFocusVisible,t=n.css("ms-Fabric ms-font-m",this.props.className,{"is-focusVisible":e});return r.createElement("div",r.__spread({},this.props,{className:t,ref:"root"}))},t.prototype._onMouseDown=function(){this.state.isFocusVisible&&(this.setState({isFocusVisible:!1}),c=!1)},t.prototype._onKeyDown=function(e){!this.state.isFocusVisible&&l.indexOf(e.which)>-1&&(this.setState({isFocusVisible:!0}),c=!0)},t}(r.Component);t.Fabric=m},function(e,t,o){"use strict";var i=o(35);i.loadStyles([{rawString:".ms-Layer{display:block;visibility:hidden}.ms-LayerHost{position:absolute;visibility:hidden;top:0;left:0;bottom:0;right:0}.ms-LayerHost-layer{visibility:visible}"}])},function(e,t){(function(e){"use strict";function o(e){var t=Array.isArray(e)?e:c(e);void 0===p&&(p=u()),r(t)}function i(e){f.loadStyles=e}function r(e,t){if(f.loadStyles){var o=l(e);f.loadStyles(o)}else p?d(e,t):m(e,t)}function n(e){f.theme=e,s()}function s(){if(f.theme)for(var e=0,t=f.registeredStyles;e<t.length;e++){var o=t[e];r(o.themableStyle,o)}}function a(e){return e&&(e=l(c(e))),e}function l(e){var t,o=f.theme;if(e){var i=e.map(function(e){var t=e.theme;if(t){var i=o?o[t]:void 0,r=e.defaultValue;return!o||i||!console||t in o||console.warn('Theming value not provided for "'+t+'". Falling back to "'+(r||"inherit")+'".'),i||r||"inherit"}return e.rawString});t=i.join("")}return t}function c(e){var t=[];if(e){for(var o=0,i=void 0;i=g.exec(e);){var r=i.index;r>o&&t.push({rawString:e.substring(o,r)}),t.push({theme:i[1],defaultValue:i[2]}),o=g.lastIndex}t.push({rawString:e.substring(o)})}return t}function m(e,t){var o=document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",i.appendChild(document.createTextNode(l(e))),t?(o.replaceChild(i,t.styleElement),t.styleElement=i):o.appendChild(i),t||f.registeredStyles.push({styleElement:i,themableStyle:e})}function d(e,t){var o=document.getElementsByTagName("head")[0],i=f.lastStyleElement,r=f.registeredStyles,n=i?i.styleSheet:void 0,s=n?n.cssText:"",c=r[r.length-1],m=l(e);(!i||s.length+m.length>b)&&(i=document.createElement("style"),i.type="text/css",t?(o.replaceChild(i,t.styleElement),t.styleElement=i):o.appendChild(i),t||(c={styleElement:i,themableStyle:e},r.push(c))),i.styleSheet.cssText+=a(m),Array.prototype.push.apply(c.themableStyle,e),f.lastStyleElement=i}function u(){var e=!1;if("undefined"!=typeof document){var t=document.createElement("style");t.type="text/css",e=!!t.styleSheet}return e}var p,h="undefined"==typeof window?e:window,f=h.__themeState__=h.__themeState__||{theme:void 0,lastStyleElement:void 0,registeredStyles:[]},g=/[\'\"]\[theme:\s*(\w+)\s*(?:\,\s*default:\s*([\\"\']?[\.\,\(\)\#\-\s\w]*[\.\,\(\)\#\-\w][\"\']?))?\s*\][\'\"]/g,b=1e4;t.loadStyles=o,t.configureLoadStyles=i,t.loadTheme=n,t.detokenize=a,t.splitStyles=c}).call(t,function(){return this}())},function(e,t,o){"use strict";function i(e,t,o){var i=e.isBeakVisible?e.beakWidth:0,a=h._getBorderSize(o),m=h._calculateActualBeakWidthInPixels(i)/2+(e.gapSpace?e.gapSpace:0),d=e.bounds?h._getRectangleFromIRect(e.bounds):new n["default"](0,window.innerWidth-s.getScrollbarWidth(),0,window.innerHeight),u=h._getTargetRect(d,e.targetElement,e.creationEvent,e.targetPoint,e.useTargetPoint),p=h._getPositionData(e.directionalHint,u,d,e.coverTarget),f=h._positionCalloutWithinBounds(h._getRectangleFromHTMLElement(o),u,d,p,m,e.coverTarget),g=h._positionBeak(i,f,u,a),b=h._finalizeCalloutPosition(f.calloutRectangle,t);return{calloutPosition:{top:b.top,left:b.left},beakPosition:{top:g.top,left:g.left,display:"block"},directionalClassName:c[f.targetEdge],submenuDirection:f.calloutEdge===l.right?r.DirectionalHint.leftBottomEdge:r.DirectionalHint.rightBottomEdge}}var r=o(22),n=o(37),s=o(38),a=o(14);!function(e){e[e.top=0]="top",e[e.bottom=1]="bottom",e[e.left=2]="left",e[e.right=3]="right"}(t.RectangleEdge||(t.RectangleEdge={}));var l=t.RectangleEdge,c=(f={},f[l.top]="slideUpIn20",f[l.bottom]="slideDownIn20",f[l.left]="slideLeftIn20",f[l.right]="slideRightIn20",f),m=function(){function e(e,t,o,i,r,n){this.calloutDirection=e,this.targetDirection=t,this.calloutPercent=o,this.targetPercent=i,this.beakPercent=r,this.isAuto=n}return e}();t.PositionData=m;var d=(g={},g[r.DirectionalHint.topLeftEdge]=new m(l.bottom,l.top,0,0,50,(!1)),g[r.DirectionalHint.topCenter]=new m(l.bottom,l.top,50,50,50,(!1)),g[r.DirectionalHint.topRightEdge]=new m(l.bottom,l.top,100,100,50,(!1)),g[r.DirectionalHint.topAutoEdge]=new m(l.bottom,l.top,0,0,50,(!0)),g[r.DirectionalHint.bottomLeftEdge]=new m(l.top,l.bottom,0,0,50,(!1)),g[r.DirectionalHint.bottomCenter]=new m(l.top,l.bottom,50,50,50,(!1)),g[r.DirectionalHint.bottomRightEdge]=new m(l.top,l.bottom,100,100,50,(!1)),g[r.DirectionalHint.bottomAutoEdge]=new m(l.top,l.bottom,0,0,50,(!0)),g[r.DirectionalHint.leftTopEdge]=new m(l.right,l.left,0,0,50,(!1)),g[r.DirectionalHint.leftCenter]=new m(l.right,l.left,50,50,50,(!1)),g[r.DirectionalHint.leftBottomEdge]=new m(l.right,l.left,100,100,50,(!1)),g[r.DirectionalHint.rightTopEdge]=new m(l.left,l.right,0,0,50,(!1)),g[r.DirectionalHint.rightCenter]=new m(l.left,l.right,50,50,50,(!1)),g[r.DirectionalHint.rightBottomEdge]=new m(l.left,l.right,100,100,50,(!1)),g),u=(b={},b[r.DirectionalHint.topLeftEdge]=new m(l.top,l.top,0,0,50,(!1)),b[r.DirectionalHint.topCenter]=new m(l.top,l.top,50,50,50,(!1)),b[r.DirectionalHint.topRightEdge]=new m(l.top,l.top,100,100,50,(!1)),b[r.DirectionalHint.topAutoEdge]=new m(l.top,l.top,0,0,50,(!0)),b[r.DirectionalHint.bottomLeftEdge]=new m(l.bottom,l.bottom,0,0,50,(!1)),b[r.DirectionalHint.bottomCenter]=new m(l.bottom,l.bottom,50,50,50,(!1)),b[r.DirectionalHint.bottomRightEdge]=new m(l.bottom,l.bottom,100,100,50,(!1)),b[r.DirectionalHint.bottomAutoEdge]=new m(l.bottom,l.bottom,0,0,50,(!0)),b[r.DirectionalHint.leftTopEdge]=new m(l.left,l.left,0,0,50,(!1)),b[r.DirectionalHint.leftCenter]=new m(l.left,l.left,50,50,50,(!1)),b[r.DirectionalHint.leftBottomEdge]=new m(l.left,l.left,100,100,50,(!1)),b[r.DirectionalHint.rightTopEdge]=new m(l.right,l.right,0,0,50,(!1)),b[r.DirectionalHint.rightCenter]=new m(l.right,l.right,50,50,50,(!1)),b[r.DirectionalHint.rightBottomEdge]=new m(l.right,l.right,100,100,50,(!1)),b),p=(v={},v[l.top]=l.bottom,v[l.bottom]=l.top,v[l.right]=l.left,v[l.left]=l.right,v);t.getRelativePositions=i;var h;!function(e){function t(e,t,i,r,s){var a;if(s?a=r?new n["default"](r.x,r.x,r.y,r.y):new n["default"](i.clientX,i.clientX,i.clientY,i.clientY):t?a=o(t):(i&&i.target&&(a=o(i.target)),a=new n["default"]),!b(a,e))for(var c=v(a,e),m=0,d=c;m<d.length;m++){var u=d[m];a[l[u]]=e[l[u]]}return a}function o(e){var t=e.getBoundingClientRect();return new n["default"](t.left,t.right,t.top,t.bottom)}function i(e,t,o,i,n,s){void 0===n&&(n=0);var a=C(e,i.calloutDirection,i.calloutPercent,t,i.targetDirection,i.targetPercent,n);return b(a,o)?{calloutRectangle:a,calloutEdge:i.calloutDirection,targetEdge:i.targetDirection,alignPercent:i.calloutPercent,beakPercent:i.beakPercent}:r(a,t,o,i,n,s)}function r(e,t,o,i,r,n){var s={calloutRectangle:e,calloutEdge:i.calloutDirection,targetEdge:i.targetDirection,alignPercent:i.calloutPercent,beakPercent:i.beakPercent};if(!g(e,o))return s;n||(s=B(s,t,i.targetPercent,o,r));for(var a=v(s.calloutRectangle,o),c=0,m=a;c<m.length;c++){var d=m[c];s.calloutRectangle=k(s.calloutRectangle,o[l[d]],d);var u=f(s.calloutR