Making WordPress.org

Changeset 8737


Ignore:
Timestamp:
05/07/2019 10:23:35 PM (5 years ago)
Author:
coreymckrill
Message:

WordCamp Blocks: Improve HTML markup parity between JS and PHP

  • Rename the grid-layout components to post-list because it more accurately describes what the components handle.
  • Refactor all blocks to use the post list components. Some were not using the grid-layout components yet either.
  • Remove toolbar components from individual blocks in favor of the shared layout-toolbar (formerly grid-toolbar).
  • Adds PHP helper functions for rendering post list items in a consistent way, similar to Item* components on the JS side.
  • Ensure that our current HTML class naming conventions are applied consistently, and that all the same classes appear on both the front end and the back end.
Location:
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks
Files:
10 added
8 deleted
21 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/blocks.min.css

    r8716 r8737  
    3737  clear: both; }
    3838
    39 .wordcamp-block-post-list li {
     39.wordcamp-post-list.wordcamp-post-list {
    4040  list-style: none; }
    4141
    42 .wordcamp-block-post-list li.wordcamp-grid-layout-item {
     42.wordcamp-post-list .wordcamp-post-list-item {
    4343  margin: 0 0 1em 0; }
    44 
    45 .wordcamp-block-post-list.layout-list > li {
    46   margin-bottom: 1em; }
    47   .wordcamp-block-post-list.layout-list > li:last-child {
    48     margin-bottom: 0; }
     44  .layout-list .wordcamp-post-list .wordcamp-post-list-item {
     45    margin-bottom: 1em; }
     46    .layout-list .wordcamp-post-list .wordcamp-post-list-item:last-child {
     47      margin-bottom: 0; }
    4948
    5049@media (min-width: 400px) {
    51   .wordcamp-block-post-list.layout-grid {
     50  .wordcamp-post-list.layout-grid {
    5251    display: grid;
    5352    grid-template-columns: repeat(2, 1fr);
     
    5857    min-height: 0;
    5958    min-width: 0; }
    60     .wordcamp-block-post-list.layout-grid .wordcamp-block-post-list-item {
     59    .wordcamp-post-list.layout-grid .wordcamp-post-list-item {
    6160      overflow: hidden;
    6261      min-width: 0; } }
    6362
    6463@media (min-width: 600px) {
    65   .wordcamp-block-post-list.layout-grid.grid-columns-3 {
     64  .wordcamp-post-list.layout-grid.grid-columns-3 {
    6665    grid-template-columns: repeat(3, 1fr); } }
    6766
    6867@media (min-width: 800px) {
    69   .wordcamp-block-post-list.layout-grid.grid-columns-4 {
     68  .wordcamp-post-list.layout-grid.grid-columns-4 {
    7069    grid-template-columns: repeat(4, 1fr); } }
    7170
     
    129128  max-height: 100%; }
    130129
    131 .wordcamp-speaker-sessions-list ul.wordcamp-speaker-sessions-list,
    132 .wordcamp-speaker-sessions-list .block-editor ul.wordcamp-speaker-sessions-list {
     130.wordcamp-speaker-sessions-list.wordcamp-speaker-sessions-list {
    133131  list-style: none;
    134132  margin: 0; }
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/blocks.min.js

    r8716 r8737  
    1010  http://jedwatson.github.io/classnames
    1111*/
    12 !function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return a}),n.d(t,"a",function(){return s});var r=n(29),o=void 0!==e?e:{},i=Object(r.a)(o),a=(i.flush,i.hydrate,i.cx,i.merge,i.getRegisteredStyles,i.injectGlobal),s=(i.keyframes,i.css);i.sheet,i.caches}).call(this,n(20))},function(e,t){e.exports=ReactDOM},function(e,t,n){e.exports=n(42)()},function(e,t,n){var r=n(17),o=n(38),i=n(18);e.exports=function(e,t){return r(e)||o(e,t)||i()}},function(e,t,n){var r=n(37);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){r(e,t,n[t])})}return e}},function(e,t,n){var r=n(39),o=n(19),i=n(40);e.exports=function(e){return r(e)||o(e)||i()}},function(e,t,n){"use strict";var r=s(n(46)),o=s(n(51)),i=s(n(24)),a=s(n(21));function s(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:a.default,TransitionGroup:i.default,ReplaceTransition:o.default,CSSTransition:r.default}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(12)),o=s(n(0)),i=s(n(11)),a=n(22);n(23);function s(e){return e&&e.__esModule?e:{default:e}}var u="unmounted";t.UNMOUNTED=u;var l="exited";t.EXITED=l;var c="entering";t.ENTERING=c;var p="entered";t.ENTERED=p;t.EXITING="exiting";var d=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n.transitionGroup,a=i&&!i.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(o=l,r.appearStatus=c):o=p:o=t.unmountOnExit||t.mountOnEnter?u:l,r.state={status:o},r.nextCallback=null,r}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getChildContext=function(){return{transitionGroup:null}},t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===u?{status:l}:null},n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==c&&n!==p&&(t=c):n!==c&&n!==p||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=i.default.findDOMNode(this);t===c?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===l&&this.setState({status:u})},n.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,i=this.getTimeouts(),a=o?i.appear:i.enter;t||r?(this.props.onEnter(e,o),this.safeSetState({status:c},function(){n.props.onEntering(e,o),n.onTransitionEnd(e,a,function(){n.safeSetState({status:p},function(){n.props.onEntered(e,o)})})})):this.safeSetState({status:p},function(){n.props.onEntered(e)})},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:"exiting"},function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,function(){t.safeSetState({status:l},function(){t.props.onExited(e)})})})):this.safeSetState({status:l},function(){t.props.onExited(e)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===u)return null;var t=this.props,n=t.children,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var i=o.default.Children.only(n);return o.default.cloneElement(i,r)},t}(o.default.Component);function f(){}d.contextTypes={transitionGroup:r.object},d.childContextTypes={transitionGroup:function(){}},d.propTypes={},d.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:f,onEntering:f,onEntered:f,onExit:f,onExiting:f,onExited:f},d.UNMOUNTED=0,d.EXITED=1,d.ENTERING=2,d.ENTERED=3,d.EXITING=4;var m=(0,a.polyfill)(d);t.default=m},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var u=e.displayName||e.name,l="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+u+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==n?"\n  "+n:"")+(null!==a?"\n  "+a:"")+(null!==s?"\n  "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return a}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;!function(e){e&&e.__esModule}(n(12));t.timeoutsShape=null;t.classNamesShape=null},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(12)),o=s(n(0)),i=n(22),a=n(52);function s(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var c=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},p=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(l(l(r)));return r.state={handleExited:o,firstRender:!0},r}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},n.componentDidMount=function(){this.appeared=!0,this.mounted=!0},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?(0,a.getInitialChildMapping)(e,r):(0,a.getNextChildMapping)(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=(0,a.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=u({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),i=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?i:o.default.createElement(t,r,i)},t}(o.default.Component);p.childContextTypes={transitionGroup:r.default.object.isRequired},p.propTypes={},p.defaultProps={component:"div",childFactory:function(e){return e}};var d=(0,i.polyfill)(p);t.default=d,e.exports=t.default},function(e,t,n){e.exports=function(){"use strict";return function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,i,a,s,u,l,c,p){switch(n){case 1:if(0===c&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===l)return r+"/*|*/";break;case 3:switch(l){case 102:case 112:return e(o[0]+r),"";default:return r+(0===p?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}}()},function(e,t,n){(function(t){for(var r=n(44),o="undefined"==typeof window?t:window,i=["moz","webkit"],a="AnimationFrame",s=o["request"+a],u=o["cancel"+a]||o["cancelRequest"+a],l=0;!s&&l<i.length;l++)s=o[i[l]+"Request"+a],u=o[i[l]+"Cancel"+a]||o[i[l]+"CancelRequest"+a];if(!s||!u){var c=0,p=0,d=[];s=function(e){if(0===d.length){var t=r(),n=Math.max(0,1e3/60-(t-c));c=n+t,setTimeout(function(){var e=d.slice(0);d.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(c)}catch(e){setTimeout(function(){throw e},0)}},Math.round(n))}return d.push({handle:++p,callback:e,cancelled:!1}),p},u=function(e){for(var t=0;t<d.length;t++)d[t].handle===e&&(d[t].cancelled=!0)}}e.exports=function(e){return s.call(o,e)},e.exports.cancel=function(){u.apply(o,arguments)},e.exports.polyfill=function(e){e||(e=o),e.requestAnimationFrame=s,e.cancelAnimationFrame=u}}).call(this,n(20))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=u(i),s=u(n(12));function u(e){return e&&e.__esModule?e:{default:e}}var l={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},c=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],p=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},d=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),f=function(){return d?"_"+Math.random().toString(36).substr(2,12):void 0},m=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||f()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Component),o(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentWillReceiveProps",value:function(e){var t=e.id;t!==this.props.id&&this.setState({inputId:t||f()})}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(p(e,this.sizer),this.placeHolderSizer&&p(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return d&&e?a.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce(function(e,t){return null!==e&&void 0!==e?e:t}),t=r({},this.props.style);t.display||(t.display="inline-block");var n=r({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),o=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,a.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),a.default.createElement("input",r({},o,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}();m.propTypes={className:s.default.string,defaultValue:s.default.any,extraWidth:s.default.oneOfType([s.default.number,s.default.string]),id:s.default.string,injectStyles:s.default.bool,inputClassName:s.default.string,inputRef:s.default.func,inputStyle:s.default.object,minWidth:s.default.oneOfType([s.default.number,s.default.string]),onAutosize:s.default.func,onChange:s.default.func,placeholder:s.default.string,placeholderIsMinWidth:s.default.bool,style:s.default.object,value:s.default.any},m.defaultProps={minWidth:1,injectStyles:!0},t.default=m},function(e,t,n){var r=n(17),o=n(19),i=n(18);e.exports=function(e){return r(e)||o(e)||i()}},function(e,t,n){"use strict";var r=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}},o={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var i=function(e){for(var t,n=e.length,r=n^n,o=0;n>=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)};var a=function(e){function t(e,t,r){var o=t.trim().split(m);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<i;++s)t[s]=n(e,t[s],r).trim();break;default:var u=s=0;for(t=[];s<i;++s)for(var l=0;l<a;++l)t[u++]=n(e[l]+" ",o[s],r).trim()}return t}function n(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(h,"$1"+e.trim());case 58:return e.trim()+t.replace(h,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(h,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,n,i){var a=e+";",s=2*t+3*n+4*i;if(944===s){e=a.indexOf(":",9)+1;var u=a.substring(e,a.length-1).trim();return u=a.substring(0,e).trim()+u+";",1===j||2===j&&o(u,1)?"-webkit-"+u+u:u}if(0===j||2===j&&!o(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(S,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(u=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+u+a;case 1005:return d.test(a)?a.replace(p,":-webkit-")+a.replace(p,":-moz-")+a:a;case 1e3:switch(t=(u=a.substring(13).trim()).indexOf("-")+1,u.charCodeAt(0)+u.charCodeAt(t)){case 226:u=a.replace(E,"tb");break;case 232:u=a.replace(E,"tb-rl");break;case 220:u=a.replace(E,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+u+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(u=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|u.charCodeAt(7))){case 203:if(111>u.charCodeAt(8))break;case 115:a=a.replace(u,"-webkit-"+u)+";"+a;break;case 207:case 102:a=a.replace(u,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(u,"-webkit-"+u)+";"+a.replace(u,"-ms-"+u+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return"-webkit-"+a+"-webkit-box-"+(u=a.replace("-items",""))+"-ms-flex-"+u+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(O,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(O,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===k.test(e))return 115===(u=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,n,i).replace(":fill-available",":stretch"):a.replace(u,"-webkit-"+u)+a.replace(u,"-moz-"+u.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+i&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+a}return a}function o(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),P(2!==t?r:r.replace(C,"$1"),n,t)}function i(e,t){var n=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(w," or ($1)").substring(4):"("+t+")"}function a(e,t,n,r,o,i,a,s,l,c){for(var p,d=0,f=t;d<N;++d)switch(p=D[d].call(u,e,f,n,r,o,i,a,s,l,c)){case void 0:case!1:case!0:case null:break;default:f=p}if(f!==t)return f}function s(e){return void 0!==(e=e.prefix)&&(P=null,e?"function"!=typeof e?j=1:(j=2,P=e):j=0),s}function u(e,n){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<N){var u=a(-1,n,s,s,A,x,0,0,0,0);void 0!==u&&"string"==typeof u&&(n=u)}var p=function e(n,s,u,p,d){for(var f,m,h,E,w,O=0,C=0,k=0,S=0,D=0,P=0,M=h=f=0,T=0,I=0,V=0,R=0,B=u.length,z=B-1,U="",W="",H="",G="";T<B;){if(m=u.charCodeAt(T),T===z&&0!==C+S+k+O&&(0!==C&&(m=47===C?10:47),S=k=O=0,B++,z++),0===C+S+k+O){if(T===z&&(0<I&&(U=U.replace(c,"")),0<U.trim().length)){switch(m){case 32:case 9:case 59:case 13:case 10:break;default:U+=u.charAt(T)}m=59}switch(m){case 123:for(f=(U=U.trim()).charCodeAt(0),h=1,R=++T;T<B;){switch(m=u.charCodeAt(T)){case 123:h++;break;case 125:h--;break;case 47:switch(m=u.charCodeAt(T+1)){case 42:case 47:e:{for(M=T+1;M<z;++M)switch(u.charCodeAt(M)){case 47:if(42===m&&42===u.charCodeAt(M-1)&&T+2!==M){T=M+1;break e}break;case 10:if(47===m){T=M+1;break e}}T=M}}break;case 91:m++;case 40:m++;case 34:case 39:for(;T++<z&&u.charCodeAt(T)!==m;);}if(0===h)break;T++}switch(h=u.substring(R,T),0===f&&(f=(U=U.replace(l,"").trim()).charCodeAt(0)),f){case 64:switch(0<I&&(U=U.replace(c,"")),m=U.charCodeAt(1)){case 100:case 109:case 115:case 45:I=s;break;default:I=F}if(R=(h=e(s,I,h,m,d+1)).length,0<N&&(w=a(3,h,I=t(F,U,V),s,A,x,R,m,d,p),U=I.join(""),void 0!==w&&0===(R=(h=w.trim()).length)&&(m=0,h="")),0<R)switch(m){case 115:U=U.replace(y,i);case 100:case 109:case 45:h=U+"{"+h+"}";break;case 107:h=(U=U.replace(g,"$1 $2"))+"{"+h+"}",h=1===j||2===j&&o("@"+h,3)?"@-webkit-"+h+"@"+h:"@"+h;break;default:h=U+h,112===p&&(W+=h,h="")}else h="";break;default:h=e(s,t(s,U,V),h,p,d+1)}H+=h,h=V=I=M=f=0,U="",m=u.charCodeAt(++T);break;case 125:case 59:if(1<(R=(U=(0<I?U.replace(c,""):U).trim()).length))switch(0===M&&(f=U.charCodeAt(0),45===f||96<f&&123>f)&&(R=(U=U.replace(" ",":")).length),0<N&&void 0!==(w=a(1,U,s,n,A,x,W.length,p,d,p))&&0===(R=(U=w.trim()).length)&&(U="\0\0"),f=U.charCodeAt(0),m=U.charCodeAt(1),f){case 0:break;case 64:if(105===m||99===m){G+=U+u.charAt(T);break}default:58!==U.charCodeAt(R-1)&&(W+=r(U,f,m,U.charCodeAt(2)))}V=I=M=f=0,U="",m=u.charCodeAt(++T)}}switch(m){case 13:case 10:47===C?C=0:0===1+f&&107!==p&&0<U.length&&(I=1,U+="\0"),0<N*L&&a(0,U,s,n,A,x,W.length,p,d,p),x=1,A++;break;case 59:case 125:if(0===C+S+k+O){x++;break}default:switch(x++,E=u.charAt(T),m){case 9:case 32:if(0===S+O+C)switch(D){case 44:case 58:case 9:case 32:E="";break;default:32!==m&&(E=" ")}break;case 0:E="\\0";break;case 12:E="\\f";break;case 11:E="\\v";break;case 38:0===S+C+O&&(I=V=1,E="\f"+E);break;case 108:if(0===S+C+O+_&&0<M)switch(T-M){case 2:112===D&&58===u.charCodeAt(T-3)&&(_=D);case 8:111===P&&(_=P)}break;case 58:0===S+C+O&&(M=T);break;case 44:0===C+k+S+O&&(I=1,E+="\r");break;case 34:case 39:0===C&&(S=S===m?0:0===S?m:S);break;case 91:0===S+C+k&&O++;break;case 93:0===S+C+k&&O--;break;case 41:0===S+C+O&&k--;break;case 40:if(0===S+C+O){if(0===f)switch(2*D+3*P){case 533:break;default:f=1}k++}break;case 64:0===C+k+S+O+M+h&&(h=1);break;case 42:case 47:if(!(0<S+O+k))switch(C){case 0:switch(2*m+3*u.charCodeAt(T+1)){case 235:C=47;break;case 220:R=T,C=42}break;case 42:47===m&&42===D&&R+2!==T&&(33===u.charCodeAt(R+2)&&(W+=u.substring(R,T+1)),E="",C=0)}}0===C&&(U+=E)}P=D,D=m,T++}if(0<(R=W.length)){if(I=s,0<N&&void 0!==(w=a(2,W,I,n,A,x,R,p,d,p))&&0===(W=w).length)return G+W+H;if(W=I.join(",")+"{"+W+"}",0!=j*_){switch(2!==j||o(W,2)||(_=0),_){case 111:W=W.replace(v,":-moz-$1")+W;break;case 112:W=W.replace(b,"::-webkit-input-$1")+W.replace(b,"::-moz-$1")+W.replace(b,":-ms-input-$1")+W}_=0}}return G+W+H}(F,s,n,0,0);return 0<N&&void 0!==(u=a(-2,p,s,s,A,x,p.length,0,0,0))&&(p=u),_=0,x=A=1,p}var l=/^\0+/g,c=/[\0\r\f]/g,p=/: */g,d=/zoo|gra/,f=/([,: ])(transform)/g,m=/,\r+?/g,h=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,v=/:(read-only)/g,E=/[svh]\w+-[tblr]{2}/,y=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,O=/-self|flex-/g,C=/[^]*?(:[rp][el]a[\w-]+)[^]*/,k=/stretch|:\s*\w+\-(?:conte|avail)/,S=/([^-])(image-set\()/,x=1,A=1,_=0,j=1,F=[],D=[],N=0,P=null,L=0;return u.use=function e(t){switch(t){case void 0:case null:N=D.length=0;break;default:switch(t.constructor){case Array:for(var n=0,r=t.length;n<r;++n)e(t[n]);break;case Function:D[N++]=t;break;case Boolean:L=0|!!t}}return e},u.set=s,void 0!==e&&s(e),u},s=n(25),u=n.n(s),l=/[A-Z]|^ms/g,c=r(function(e){return e.replace(l,"-$&").toLowerCase()}),p=function(e,t){return null==t||"boolean"==typeof t?"":1===o[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:t+"px"},d=function e(t){for(var n=t.length,r=0,o="";r<n;r++){var i=t[r];if(null!=i){var a=void 0;switch(typeof i){case"boolean":break;case"function":0,a=e([i()]);break;case"object":if(Array.isArray(i))a=e(i);else for(var s in a="",i)i[s]&&s&&(a&&(a+=" "),a+=s);break;default:a=i}a&&(o&&(o+=" "),o+=a)}}return o},f="undefined"!=typeof document;function m(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}var h=function(){function e(e){this.isSpeedy=!0,this.tags=[],this.ctr=0,this.opts=e}var t=e.prototype;return t.inject=function(){if(this.injected)throw new Error("already injected!");this.tags[0]=m(this.opts),this.injected=!0},t.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},t.insert=function(e,t){if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(this.tags[this.tags.length-1]);try{n.insertRule(e,n.cssRules.length)}catch(e){0}}else{var r=m(this.opts);this.tags.push(r),r.appendChild(document.createTextNode(e+(t||"")))}this.ctr++,this.ctr%65e3==0&&this.tags.push(m(this.opts))},t.flush=function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0,this.injected=!1},e}();t.a=function(e,t){if(void 0!==e.__SECRET_EMOTION__)return e.__SECRET_EMOTION__;void 0===t&&(t={});var n,r,o=t.key||"css",s=u()(function(e){n+=e,f&&m.insert(e,b)});void 0!==t.prefix&&(r={prefix:t.prefix});var l={registered:{},inserted:{},nonce:t.nonce,key:o},m=new h(t);f&&m.inject();var g=new a(r);g.use(t.stylisPlugins)(s);var b="";function v(e,t){if(null==e)return"";switch(typeof e){case"boolean":return"";case"function":if(void 0!==e.__emotion_styles){var n=e.toString();return n}return v.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return function(e){if(w.has(e))return w.get(e);var t="";return Array.isArray(e)?e.forEach(function(e){t+=v.call(this,e,!1)},this):Object.keys(e).forEach(function(n){"object"!=typeof e[n]?void 0!==l.registered[e[n]]?t+=n+"{"+l.registered[e[n]]+"}":t+=c(n)+":"+p(n,e[n])+";":Array.isArray(e[n])&&"string"==typeof e[n][0]&&void 0===l.registered[e[n][0]]?e[n].forEach(function(e){t+=c(n)+":"+p(n,e)+";"}):t+=n+"{"+v.call(this,e[n],!1)+"}"},this),w.set(e,t),t}.call(this,e);default:var r=l.registered[e];return!1===t&&void 0!==r?r:e}}var E,y,w=new WeakMap,O=/label:\s*([^\s;\n{]+)\s*;/g,C=function(e){var t=!0,n="",r="";null==e||void 0===e.raw?(t=!1,n+=v.call(this,e,!1)):n+=e[0];for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];return a.forEach(function(r,o){n+=v.call(this,r,46===n.charCodeAt(n.length-1)),!0===t&&void 0!==e[o+1]&&(n+=e[o+1])},this),y=n,n=n.replace(O,function(e,t){return r+="-"+t,""}),E=function(e,t){return i(e+t)+t}(n,r),n};function k(e,t){void 0===l.inserted[E]&&(n="",g(e,t),l.inserted[E]=n)}var S=function(){var e=C.apply(this,arguments),t=o+"-"+E;return void 0===l.registered[t]&&(l.registered[t]=y),k("."+t,e),t};function x(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==l.registered[t]?e.push(t):n+=t+" "}),n}function A(e,t){var n=[],r=x(n,e);return n.length<2?e:r+S(n,t)}function _(e){l.inserted[e]=!0}if(f){var j=document.querySelectorAll("[data-emotion-"+o+"]");Array.prototype.forEach.call(j,function(e){m.tags[0].parentNode.insertBefore(e,m.tags[0]),e.getAttribute("data-emotion-"+o).split(" ").forEach(_)})}var F={flush:function(){f&&(m.flush(),m.inject()),l.inserted={},l.registered={}},hydrate:function(e){e.forEach(_)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return A(d(t))},merge:A,getRegisteredStyles:x,injectGlobal:function(){k("",C.apply(this,arguments))},keyframes:function(){var e=C.apply(this,arguments),t="animation-"+E;return k("","@keyframes "+t+"{"+e+"}"),t},css:S,sheet:m,caches:l};return e.__SECRET_EMOTION__=F,F}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t,n){},function(e,t,n){"use strict";var r=n(43);function o(){}e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){(function(t){(function(){var n,r,o,i,a,s;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:void 0!==t&&null!==t&&t.hrtime?(e.exports=function(){return(n()-a)/1e6},r=t.hrtime,i=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),s=1e9*t.uptime(),a=i-s):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(45))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,l=[],c=!1,p=-1;function d(){c&&u&&(c=!1,u.length?l=u.concat(l):p=-1,l.length&&f())}function f(){if(!c){var e=s(d);c=!0;for(var t=l.length;t;){for(u=l,l=[];++p<t;)u&&u[p].run();p=-1,t=l.length}u=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new m(e,t)),1!==l.length||c||s(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;!function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(12));var r=s(n(47)),o=s(n(50)),i=s(n(0)),a=s(n(21));n(23);function s(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var l=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return(0,r.default)(e,t)})},c=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return(0,o.default)(e,t)})},p=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).onEnter=function(e,n){var r=t.getClassNames(n?"appear":"enter").className;t.removeClasses(e,"exit"),l(e,r),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.getClassNames(n?"appear":"enter").activeClassName;t.reflowAndAddClass(e,r),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.getClassNames("enter").doneClassName;t.removeClasses(e,n?"appear":"enter"),l(e,r),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.getClassNames("exit").className;t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),l(e,n),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.getClassNames("exit").activeClassName;t.reflowAndAddClass(e,n),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.getClassNames("exit").doneClassName;t.removeClasses(e,"exit"),l(e,n),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var n=t.props.classNames,r="string"!=typeof n?n[e]:n+"-"+e;return{className:r,activeClassName:"string"!=typeof n?n[e+"Active"]:r+"-active",doneClassName:"string"!=typeof n?n[e+"Done"]:r+"-done"}},t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.removeClasses=function(e,t){var n=this.getClassNames(t),r=n.className,o=n.activeClassName,i=n.doneClassName;r&&c(e,r),o&&c(e,o),i&&c(e,i)},n.reflowAndAddClass=function(e,t){t&&(e&&e.scrollTop,l(e,t))},n.render=function(){var e=u({},this.props);return delete e.classNames,i.default.createElement(a.default,u({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(i.default.Component);p.propTypes={};var d=p;t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(48);t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.add(t):(0,o.default)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var o=r(n(49));e.exports=t.default},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=r(e.className,t):e.setAttribute("class",r(e.className&&e.className.baseVal||"",t))}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;a(n(12));var r=a(n(0)),o=n(11),i=a(n(24));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleEnter=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.handleLifecycle=function(e,t,n){var i,a=this.props.children,s=r.default.Children.toArray(a)[t];s.props[e]&&(i=s.props)[e].apply(i,n),this.props[e]&&this.props[e]((0,o.findDOMNode)(this))},n.render=function(){var e=this.props,t=e.children,n=e.in,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["children","in"]),a=r.default.Children.toArray(t),s=a[0],u=a[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(i.default,o,n?r.default.cloneElement(s,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(u,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},t}(r.default.Component);s.propTypes={};var u=s;t.default=u,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=i,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:a(n,"appear",e),enter:a(n,"enter",e),exit:a(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var s=o(e.children),u=i(t,s);return Object.keys(u).forEach(function(o){var i=u[o];if((0,r.isValidElement)(i)){var l=o in t,c=o in s,p=t[o],d=(0,r.isValidElement)(p)&&!p.props.in;!c||l&&!d?c||!l||d?c&&l&&(0,r.isValidElement)(p)&&(u[o]=(0,r.cloneElement)(i,{onExited:n.bind(null,i),in:p.props.in,exit:a(i,"exit",e),enter:a(i,"enter",e)})):u[o]=(0,r.cloneElement)(i,{in:!1}):u[o]=(0,r.cloneElement)(i,{onExited:n.bind(null,i),in:!0,exit:a(i,"exit",e),enter:a(i,"enter",e)})}}),u};var r=n(0);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function i(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var u in t){if(o[u])for(r=0;r<o[u].length;r++){var l=o[u][r];s[o[u][r]]=n(l)}s[u]=n(u)}for(r=0;r<i.length;r++)s[i[r]]=n(i[r]);return s}function a(e,t,n){return null!=n[t]?n[t]:e.props[t]}},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"name",function(){return Ar}),n.d(r,"LABEL",function(){return _r}),n.d(r,"ICON",function(){return jr}),n.d(r,"settings",function(){return Fr});var o={};n.r(o),n.d(o,"name",function(){return xo}),n.d(o,"LABEL",function(){return Ao}),n.d(o,"ICON",function(){return _o}),n.d(o,"settings",function(){return jo});var i={};n.r(i),n.d(i,"name",function(){return vi}),n.d(i,"LABEL",function(){return Ei}),n.d(i,"ICON",function(){return yi}),n.d(i,"settings",function(){return wi});var a={};n.r(a),n.d(a,"name",function(){return Zi}),n.d(a,"LABEL",function(){return Ji}),n.d(a,"ICON",function(){return Qi}),n.d(a,"settings",function(){return ea});var s=n(9),u=n.n(s),l=n(1),c=n.n(l),p=n(2),d=n.n(p),f=n(3),m=n.n(f),h=n(4),g=n.n(h),b=n(5),v=n.n(b);var E=n(0),y=n.n(E),w=n(6);var O=n(11);var C=Object(E.createContext)();C.Provider,C.Consumer,new Set(["string","boolean","number"]),new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);var k=n(7),S=n.n(k),x=n(8),A=n.n(x),_=(n(32),wp.components.Placeholder),j=wp.element,F=j.Component,D=j.Fragment,N=function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).getModeLabel=n.getModeLabel.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"getModeLabel",value:function(e){return this.props.blockData.options.mode.find(function(t){return e===t.value}).label}}]),t}(F);function P(e){var t=e.className,n=e.label,r=e.icon,o=e.content,i=e.placeholderChildren,a=["wordcamp-block-edit-placeholder","wordcamp-block-edit-placeholder-specific-mode",t];return Object(E.createElement)(D,null,o,Object(E.createElement)(_,{className:S()(a),label:n,icon:r},i))}n(33),n(34);var L=wp.element.Component,M=wp.components,T=M.BaseControl,I=M.Button,V=M.ButtonGroup,R=M.RangeControl,B=wp.i18n,z=B.__,U=B._x,W=[{name:z("Small","wordcamporg"),shortName:U("S","size small","wordcamporg"),size:90,slug:"small"},{name:z("Regular","wordcamporg"),shortName:U("M","size medium","wordcamporg"),size:150,slug:"regular"},{name:z("Large","wordcamporg"),shortName:U("L","size large","wordcamporg"),size:300,slug:"large"},{name:z("Larger","wordcamporg"),shortName:U("XL","size extra large","wordcamporg"),size:500,slug:"larger"}],H=function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).state={value:e.value,onChange:Object(w.debounce)(e.onChange,10)},n.onChange=n.onChange.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"onChange",value:function(e){this.setState({value:e}),this.state.onChange(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.label,o=t.help,i=t.initialPosition,a=t.rangeProps,s=this.state.value;return Object(E.createElement)(T,{className:S()("wordcamp-components-avatar-size",n),label:r,help:o},Object(E.createElement)("div",{className:"wordcamp-components-avatar-size-buttons"},Object(E.createElement)(V,{"aria-label":r},W.map(function(t){var n=t.name,r=t.shortName,o=t.size,i=t.slug,a=s===o;return Object(E.createElement)(I,{key:i,isLarge:!0,isPrimary:a,"aria-label":n,"aria-pressed":a,onClick:function(){return e.onChange(Number(o))}},r||n)})),Object(E.createElement)(I,{className:"wordcamp-components-avatar-size-button-reset",isLarge:!0,isDefault:!0,onClick:function(){return e.onChange(Number(i))}},z("Reset","wordcamporg"))),Object(E.createElement)(R,u()({className:"wordcamp-components-avatar-size-range",value:s,initialPosition:i,onChange:this.onChange,beforeIcon:"format-image",afterIcon:"format-image","aria-label":r},a)))}}]),t}(L),G=wp.components.Disabled,$=wp.i18n,q=$.__,Y=$.sprintf,X=wp.url,K=X.addQueryArgs,Z=X.isURL;function J(e){var t=e.className,n=e.name,r=e.size,o=e.url,i=e.imageLink,a=function(e,t){return K(e,{s:t})},s=Object(E.createElement)("img",{className:S()("avatar","avatar-"+r,"photo"),src:a(o,r),srcSet:a(o,2*r)+" 2x",alt:n?Y(q("Avatar of %s","wordcamporg"),n):"",width:r,height:r});return Z(i)&&(s=Object(E.createElement)(G,null,Object(E.createElement)("a",{href:i,className:S()("wordcamp-image-link","wordcamp-avatar-link")},s))),s=Object(E.createElement)("div",{className:S()("wordcamp-image-container","wordcamp-avatar-container",t)},s)}n(35);var Q=wp.components,ee=Q.Disabled,te=Q.Spinner,ne=wp.element,re=ne.Fragment,oe=ne.RawHTML,ie=wp.i18n.__;function ae(e){var t=e.loading;return Object(E.createElement)("div",{className:"wordcamp-block-content-none"},t?Object(E.createElement)(te,null):ie("No content found.","wordcamporg"))}function se(e){var t=e.headingLevel,n=e.className,r=e.title,o=e.link,i="h3";[1,2,3,4,5,6].includes(t)&&(i="h"+t);var a=["wordcamp-item-title",n],s=r||ie("(Untitled)","wordcamporg");return Object(E.createElement)(i,{className:S()(a)},o&&Object(E.createElement)(ee,null,Object(E.createElement)("a",{href:o},s)),!o&&Object(E.createElement)(re,null,s))}function ue(e){var t=e.className,n=e.content,r=e.link,o=e.linkText,i=["wordcamp-item-content",t];return Object(E.createElement)("div",{className:S()(i)},Object(E.createElement)(ee,null,Object(E.createElement)(oe,{children:n}),r&&Object(E.createElement)(le,{link:r,linkText:o})))}function le(e){var t=e.className,n=e.link,r=e.linkText,o=["wordcamp-item-permalink",t];return Object(E.createElement)("p",{className:S()(o)},Object(E.createElement)("a",{href:n},r||ie("Read more","wordcamporg")))}n(36);var ce=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.className,r=e.children,o=t.grid_columns,i=t.layout,a=t.align,s=["wordcamp-block","wordcamp-block-post-list","layout-"+i,n];return"grid"===i&&s.push("grid-columns-"+Number(o)),a&&s.push("align"+a),Object(E.createElement)("ul",{className:S()(s)},(r||[]).map(function(e){return Object(E.createElement)("li",{key:e.key,className:S()("wordcamp-grid-layout-item","wordcamp-block-post-list-item","wordcamp-clearfix")},e)}))}}]),t}(wp.element.Component),pe=n(14),de=n.n(pe),fe=n(13),me=n.n(fe),he=n(15),ge=n.n(he),be=wp.data,ve=be.registerStore,Ee=be.select,ye=be.dispatch,we=wp.apiFetch,Oe={},Ce=function(e,t){var n=Array.isArray;if(!n(e))return e;var r=ge()(e);if(t.hasOwnProperty("filter")&&n(t.filter)&&t.filter.forEach(function(e){var t=e.fieldName,o=e.fieldValue;n(o)||(o=[o]),r=r.filter(function(e){if(!e.hasOwnProperty(t))return!1;var r=n(e[t])?e[t]:[e[t]];return Object(w.intersection)(o,r).length>0})}),t.hasOwnProperty("sort")){var o=Object(w.split)(t.sort,"_",2),i=me()(o,2),a=i[0],s=i[1];"title"===a&&r.length&&r[0].title.hasOwnProperty("rendered")&&(a="title.rendered"),r=Object(w.orderBy)(r,[a],[s])}return r};ve("wordcamp",{selectors:{getEntities:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=de()({},{per_page:-1},r);return Ee("core").getEntityRecords(t,n,o)},getSiteSettings:function(e){return e.hasOwnProperty("siteSettings")?e.siteSettings:(ye("wordcamp").fetchSiteSettings(),null)}},actions:{fetchSiteSettings:function(){return{type:"FETCH_SETTINGS"}},setSiteSettings:function(e){return{type:"SET_SETTINGS",settings:e}}},reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Oe,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_SETTINGS":if(e.loadingSettings)break;we({path:"/wp/v2/settings"}).then(function(e){ye("wordcamp").setSiteSettings(e)}),e.loadingSettings=!0;break;case"SET_SETTINGS":e.siteSettings=t.settings,e.loadingSettings=!1}return e}});var ke=function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).getFilteredPosts=n.getFilteredPosts.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"getFilteredPosts",value:function(){var e=this.props,t=e.attributes,n=e.entities.wcb_organizer,r=t.mode,o=t.item_ids,i=t.sort,a={};return Array.isArray(o)&&o.length>0&&(a.filter=[{fieldName:"wcb_organizer"===r?"id":"organizer_team",fieldValue:o}]),a.sort=i,Ce(n,a)}},{key:"render",value:function(){var e=this.props.attributes,t=e.show_avatars,n=e.avatar_size,r=e.avatar_align,o=e.content,i=this.getFilteredPosts(),a=!Array.isArray(i),s=!a&&i.length>0;return a||!s?Object(E.createElement)(ae,{loading:a}):Object(E.createElement)(ce,u()({className:"wordcamp-organizers-block"},this.props),i.map(function(e){return Object(E.createElement)("div",{key:e.slug,className:S()("wordcamp-organizer","wordcamp-organizer-"+e.slug.trim())},Object(E.createElement)(se,{className:"wordcamp-organizer-title",headingLevel:3,title:e.title.rendered.trim()}),t&&Object(E.createElement)(J,{className:S()("wordcamp-organizer-avatar-container","align-"+r),name:e.title.rendered.trim()||"",size:n,url:e.avatar_urls[24]}),"none"!==o&&Object(E.createElement)(ue,{className:S()("wordcamp-organizer-content-"+o),content:"full"===o?e.content.rendered.trim():e.excerpt.rendered.trim()}))}))}}]),t}(wp.element.Component),Se=function(e,t){return e.length===t.length&&e.every(function(e,n){return function(e,t){return e===t}(e,t[n])})};var xe=function(e,t){var n;void 0===t&&(t=Se);var r,o=[],i=!1;return function(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];return i&&n===this&&t(s,o)?r:(r=e.apply(this,s),i=!0,n=this,o=s,r)}},Ae=n(10),_e=n(12),je=n.n(_e),Fe=n(26),De=n.n(Fe),Ne=n(27),Pe=n.n(Ne),Le=n(16);function Me(e){return(Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Te(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ve(e,t,n){return t&&Ie(e.prototype,t),n&&Ie(e,n),e}function Re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Be(){return(Be=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Re(e,t,n[t])})}return e}function Ue(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&He(e,t)}function We(e){return(We=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function He(e,t){return(He=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ge(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function $e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qe(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?$e(e):t}function Ye(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Xe=function(){};function Ke(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}var Ze=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===Me(e)&&null!==e?[e]:[]};function Je(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Qe(e){return Je(e)?window.pageYOffset:e.scrollTop}function et(e,t){Je(e)?window.scrollTo(0,t):e.scrollTop=t}function tt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Xe,o=Qe(e),i=t-o,a=10,s=0;!function t(){var u=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(s+=a,o,i,n);et(e,u),s<n?De()(t):r(e)}()}function nt(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function rt(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.theme.spacing,u=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/,o=document.documentElement;if("fixed"===t.position)return o;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return o}(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var c=u.getBoundingClientRect().height,p=n.getBoundingClientRect(),d=p.bottom,f=p.height,m=p.top,h=n.offsetParent.getBoundingClientRect().top,g=window.innerHeight,b=Qe(u),v=parseInt(getComputedStyle(n).marginBottom,10),E=parseInt(getComputedStyle(n).marginTop,10),y=h-E,w=g-m,O=y+b,C=c-b-m,k=d-g+b+v,S=b+m-E;switch(o){case"auto":case"bottom":if(w>=f)return{placement:"bottom",maxHeight:t};if(C>=f&&!a)return i&&tt(u,k,160),{placement:"bottom",maxHeight:t};if(!a&&C>=r||a&&w>=r)return i&&tt(u,k,160),{placement:"bottom",maxHeight:a?w-v:C-v};if("auto"===o||a){var x=t,A=a?y:O;return A>=r&&(x=Math.min(A-v-s.controlHeight,t)),{placement:"top",maxHeight:x}}if("bottom"===o)return et(u,k),{placement:"bottom",maxHeight:t};break;case"top":if(y>=f)return{placement:"top",maxHeight:t};if(O>=f&&!a)return i&&tt(u,S,160),{placement:"top",maxHeight:t};if(!a&&O>=r||a&&y>=r){var _=t;return(!a&&O>=r||a&&y>=r)&&(_=a?y-E:O-E),i&&tt(u,S,160),{placement:"top",maxHeight:_}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}var ot=function(e){return"auto"===e?"bottom":e},it=function(e){function t(){var e,n;Te(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Re($e($e(n=qe(this,(e=We(t)).call.apply(e,[this].concat(o))))),"state",{maxHeight:n.props.maxMenuHeight,placement:null}),Re($e($e(n)),"getPlacement",function(e){var t=n.props,r=t.minMenuHeight,o=t.maxMenuHeight,i=t.menuPlacement,a=t.menuPosition,s=t.menuShouldScrollIntoView,u=t.theme,l=n.context.getPortalPlacement;if(e){var c="fixed"===a,p=rt({maxHeight:o,menuEl:e,minHeight:r,placement:i,shouldScroll:s&&!c,isFixedPosition:c,theme:u});l&&l(p),n.setState(p)}}),Re($e($e(n)),"getUpdatedProps",function(){var e=n.props.menuPlacement,t=n.state.placement||ot(e);return ze({},n.props,{placement:t,maxHeight:n.state.maxHeight})}),n}return Ue(t,E["Component"]),Ve(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}();Re(it,"contextTypes",{getPortalPlacement:je.a.func});var at=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},st=at,ut=at,lt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return y.a.createElement("div",Be({className:r(Object(Ae.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},i),t)};lt.defaultProps={children:"No options"};var ct=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return y.a.createElement("div",Be({className:r(Object(Ae.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},i),t)};ct.defaultProps={children:"Loading..."};var pt=function(e){function t(){var e,n;Te(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Re($e($e(n=qe(this,(e=We(t)).call.apply(e,[this].concat(o))))),"state",{placement:null}),Re($e($e(n)),"getPortalPlacement",function(e){var t=e.placement;t!==ot(n.props.menuPlacement)&&n.setState({placement:t})}),n}return Ue(t,E["Component"]),Ve(t,[{key:"getChildContext",value:function(){return{getPortalPlacement:this.getPortalPlacement}}},{key:"render",value:function(){var e=this.props,t=e.appendTo,n=e.children,r=e.controlElement,o=e.menuPlacement,i=e.menuPosition,a=e.getStyles,s="fixed"===i;if(!t&&!s||!r)return null;var u=this.state.placement||ot(o),l=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),c=s?0:window.pageYOffset,p={offset:l[u]+c,position:i,rect:l},d=y.a.createElement("div",{className:Object(Ae.a)(a("menuPortal",p))},n);return t?Object(O.createPortal)(d,t):d}}]),t}();Re(pt,"childContextTypes",{getPortalPlacement:je.a.func});var dt=Array.isArray,ft=Object.keys,mt=Object.prototype.hasOwnProperty;function ht(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==Me(t)&&"object"==Me(n)){var r,o,i,a=dt(t),s=dt(n);if(a&&s){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(a!=s)return!1;var u=t instanceof Date,l=n instanceof Date;if(u!=l)return!1;if(u&&l)return t.getTime()==n.getTime();var c=t instanceof RegExp,p=n instanceof RegExp;if(c!=p)return!1;if(c&&p)return t.toString()==n.toString();var d=ft(t);if((o=d.length)!==ft(n).length)return!1;for(r=o;0!=r--;)if(!mt.call(n,d[r]))return!1;for(r=o;0!=r--;)if(!("_owner"===(i=d[r])&&t.$$typeof||e(t[i],n[i])))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i))return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}var gt=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],bt=function(e){for(var t=0;t<gt.length;t++)e=e.replace(gt[t].letters,gt[t].base);return e},vt=function(e){return e.replace(/^\s+|\s+$/g,"")},Et=function(e){return"".concat(e.label," ").concat(e.value)},yt=function(e){return y.a.createElement("span",Be({className:Object(Ae.a)({zIndex:9999,border:0,clip:"rect(1px, 1px, 1px, 1px)",height:1,width:1,position:"absolute",overflow:"hidden",padding:0,whiteSpace:"nowrap",backgroundColor:"red",color:"blue"})},e))},wt=function(e){function t(){return Te(this,t),qe(this,We(t).apply(this,arguments))}return Ue(t,E["Component"]),Ve(t,[{key:"render",value:function(){var e=this.props,t=(e.in,e.out,e.onExited,e.appear,e.enter,e.exit,e.innerRef),n=(e.emotion,Ge(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return y.a.createElement("input",Be({ref:t},n,{className:Object(Ae.a)({background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"})}))}}]),t}(),Ot=function(e){function t(){return Te(this,t),qe(this,We(t).apply(this,arguments))}return Ue(t,E["Component"]),Ve(t,[{key:"componentDidMount",value:function(){this.props.innerRef(Object(O.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),t}(),Ct=["boxSizing","height","overflow","paddingRight","position"],kt={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function St(e){e.preventDefault()}function xt(e){e.stopPropagation()}function At(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function _t(){return"ontouchstart"in window||navigator.maxTouchPoints}var jt=!("undefined"==typeof window||!window.document||!window.document.createElement),Ft=0,Dt=function(e){function t(){var e,n;Te(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Re($e($e(n=qe(this,(e=We(t)).call.apply(e,[this].concat(o))))),"originalStyles",{}),Re($e($e(n)),"listenerOptions",{capture:!1,passive:!1}),n}return Ue(t,E["Component"]),Ve(t,[{key:"componentDidMount",value:function(){var e=this;if(jt){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,o=document.body,i=o&&o.style;if(n&&Ct.forEach(function(t){var n=i&&i[t];e.originalStyles[t]=n}),n&&Ft<1){var a=parseInt(this.originalStyles.paddingRight,10)||0,s=document.body?document.body.clientWidth:0,u=window.innerWidth-s+a||0;Object.keys(kt).forEach(function(e){var t=kt[e];i&&(i[e]=t)}),i&&(i.paddingRight="".concat(u,"px"))}o&&_t()&&(o.addEventListener("touchmove",St,this.listenerOptions),r&&(r.addEventListener("touchstart",At,this.listenerOptions),r.addEventListener("touchmove",xt,this.listenerOptions))),Ft+=1}}},{key:"componentWillUnmount",value:function(){var e=this;if(jt){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,o=document.body,i=o&&o.style;Ft=Math.max(Ft-1,0),n&&Ft<1&&Ct.forEach(function(t){var n=e.originalStyles[t];i&&(i[t]=n)}),o&&_t()&&(o.removeEventListener("touchmove",St,this.listenerOptions),r&&(r.removeEventListener("touchstart",At,this.listenerOptions),r.removeEventListener("touchmove",xt,this.listenerOptions)))}}},{key:"render",value:function(){return null}}]),t}();Re(Dt,"defaultProps",{accountForScrollbars:!0});var Nt=function(e){function t(){var e,n;Te(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Re($e($e(n=qe(this,(e=We(t)).call.apply(e,[this].concat(o))))),"state",{touchScrollTarget:null}),Re($e($e(n)),"getScrollTarget",function(e){e!==n.state.touchScrollTarget&&n.setState({touchScrollTarget:e})}),Re($e($e(n)),"blurSelectInput",function(){document.activeElement&&document.activeElement.blur()}),n}return Ue(t,E["PureComponent"]),Ve(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.isEnabled,r=this.state.touchScrollTarget;return n?y.a.createElement("div",null,y.a.createElement("div",{onClick:this.blurSelectInput,className:Object(Ae.a)({position:"fixed",left:0,bottom:0,right:0,top:0})}),y.a.createElement(Ot,{innerRef:this.getScrollTarget},t),r?y.a.createElement(Dt,{touchScrollTarget:r}):null):t}}]),t}(),Pt=function(e){function t(){var e,n;Te(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Re($e($e(n=qe(this,(e=We(t)).call.apply(e,[this].concat(o))))),"isBottom",!1),Re($e($e(n)),"isTop",!1),Re($e($e(n)),"scrollTarget",void 0),Re($e($e(n)),"touchStart",void 0),Re($e($e(n)),"cancelScroll",function(e){e.preventDefault(),e.stopPropagation()}),Re($e($e(n)),"handleEventDelta",function(e,t){var r=n.props,o=r.onBottomArrive,i=r.onBottomLeave,a=r.onTopArrive,s=r.onTopLeave,u=n.scrollTarget,l=u.scrollTop,c=u.scrollHeight,p=u.clientHeight,d=n.scrollTarget,f=t>0,m=c-p-l,h=!1;m>t&&n.isBottom&&(i&&i(e),n.isBottom=!1),f&&n.isTop&&(s&&s(e),n.isTop=!1),f&&t>m?(o&&!n.isBottom&&o(e),d.scrollTop=c,h=!0,n.isBottom=!0):!f&&-t>l&&(a&&!n.isTop&&a(e),d.scrollTop=0,h=!0,n.isTop=!0),h&&n.cancelScroll(e)}),Re($e($e(n)),"onWheel",function(e){n.handleEventDelta(e,e.deltaY)}),Re($e($e(n)),"onTouchStart",function(e){n.touchStart=e.changedTouches[0].clientY}),Re($e($e(n)),"onTouchMove",function(e){var t=n.touchStart-e.changedTouches[0].clientY;n.handleEventDelta(e,t)}),Re($e($e(n)),"getScrollTarget",function(e){n.scrollTarget=e}),n}return Ue(t,E["Component"]),Ve(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e&&(e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1)))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return y.a.createElement(Ot,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(),Lt=function(e){function t(){return Te(this,t),qe(this,We(t).apply(this,arguments))}return Ue(t,E["Component"]),Ve(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=Ge(e,["isEnabled"]);return t?y.a.createElement(Pt,n):this.props.children}}]),t}();Re(Lt,"defaultProps",{isEnabled:!0});var Mt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label,i=t.isDisabled;switch(e){case"menu":return"Use Up and Down to choose options".concat(i?"":", press Enter to select the currently focused option",", press Escape to exit the menu, press Tab to select the option and exit the menu.");case"input":return"".concat(o||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},Tt=function(e,t){var n=t.value,r=t.isDisabled;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"select-option":return"option ".concat(n,r?" is disabled. Select another option.":", selected.")}},It=function(e){return!!e.isDisabled},Vt=function(e){function t(){return Te(this,t),qe(this,We(t).apply(this,arguments))}return Ue(t,E["Component"]),Ve(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,i=e.getStyles,a=e.hasValue;return y.a.createElement("div",{className:r(Object(Ae.a)(i("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":a},n)},t)}}]),t}(),Rt=function(e){var t=e.size,n=Ge(e,["size"]);return y.a.createElement("svg",Be({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(Ae.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},Bt=function(e){return y.a.createElement(Rt,Be({size:20},e),y.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},zt=function(e){return y.a.createElement(Rt,Be({size:20},e),y.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Ut=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},Wt=Ut,Ht=Ut,Gt=!1,$t=function(e){var t=e.color,n=e.delay,r=e.offset;return y.a.createElement("span",{className:Object(Ae.a)({animationDuration:"1s",animationDelay:"".concat(n,"ms"),animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})},qt=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,i=e.isFocused,a=e.isRtl,s=e.theme.colors,u=i?s.neutral80:s.neutral20;return Gt||(Object(Ae.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};"),Gt=!0),y.a.createElement("div",Be({},o,{className:n(Object(Ae.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),y.a.createElement($t,{color:u,delay:0,offset:a}),y.a.createElement($t,{color:u,delay:160,offset:!0}),y.a.createElement($t,{color:u,delay:320,offset:!a}))};qt.defaultProps={size:4};var Yt=function(e){var t=e.children,n=e.innerProps;return y.a.createElement("div",n,t)},Xt=Yt,Kt=Yt,Zt=function(e){function t(){return Te(this,t),qe(this,We(t).apply(this,arguments))}return Ue(t,E["Component"]),Ve(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return y.a.createElement("div",n,t||y.a.createElement(Bt,{size:14}))}}]),t}(),Jt=function(e){function t(){return Te(this,t),qe(this,We(t).apply(this,arguments))}return Ue(t,E["Component"]),Ve(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,i=e.data,a=e.getStyles,s=e.innerProps,u=e.isDisabled,l=e.removeProps,c=e.selectProps,p=r.Container,d=r.Label,f=r.Remove,m=ze({className:o(Object(Ae.a)(a("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":u},n)},s),h={className:o(Object(Ae.a)(a("multiValueLabel",this.props)),{"multi-value__label":!0},n)},g=ze({className:o(Object(Ae.a)(a("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},l);return y.a.createElement(p,{data:i,innerProps:m,selectProps:c},y.a.createElement(d,{data:i,innerProps:h,selectProps:c},t),y.a.createElement(f,{data:i,innerProps:g,selectProps:c}))}}]),t}();Re(Jt,"defaultProps",{cropWithEllipsis:!0});var Qt={ClearIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return y.a.createElement("div",Be({},i,{className:r(Object(Ae.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t||y.a.createElement(Bt,null))},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,i=e.isDisabled,a=e.isFocused,s=e.innerRef,u=e.innerProps,l=e.menuIsOpen;return y.a.createElement("div",Be({ref:s,className:n(Object(Ae.a)(r("control",e)),{control:!0,"control--is-disabled":i,"control--is-focused":a,"control--menu-is-open":l},o)},u),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return y.a.createElement("div",Be({},i,{className:r(Object(Ae.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t||y.a.createElement(zt,null))},DownChevron:zt,CrossIcon:Bt,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.Heading,a=e.headingProps,s=e.label,u=e.theme,l=e.selectProps;return y.a.createElement("div",{className:r(Object(Ae.a)(o("group",e)),{group:!0},n)},y.a.createElement(i,Be({},a,{selectProps:l,theme:u,getStyles:o,cx:r}),s),y.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,i=(e.selectProps,Ge(e,["className","cx","getStyles","theme","selectProps"]));return y.a.createElement("div",Be({className:n(Object(Ae.a)(r("groupHeading",ze({theme:o},i))),{"group-heading":!0},t)},i))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return y.a.createElement("div",{className:r(Object(Ae.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return y.a.createElement("span",Be({},o,{className:n(Object(Ae.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,i=e.isHidden,a=e.isDisabled,s=e.theme,u=(e.selectProps,Ge(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return y.a.createElement("div",{className:Object(Ae.a)(r("input",ze({theme:s},u)))},y.a.createElement(Pe.a,Be({className:n(null,{input:!0},t),inputRef:o,inputStyle:function(e){return{background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}}(i),disabled:a},u)))},LoadingIndicator:qt,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerRef,a=e.innerProps,s=r(Object(Ae.a)(o("menu",e)),{menu:!0},n);return y.a.createElement("div",Be({className:s},a,{ref:i}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isMulti,a=e.innerRef;return y.a.createElement("div",{className:r(Object(Ae.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":i},n),ref:a},t)},MenuPortal:pt,LoadingMessage:ct,NoOptionsMessage:lt,MultiValue:Jt,MultiValueContainer:Xt,MultiValueLabel:Kt,MultiValueRemove:Zt,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.isFocused,s=e.isSelected,u=e.innerRef,l=e.innerProps;return y.a.createElement("div",Be({ref:u,className:r(Object(Ae.a)(o("option",e)),{option:!0,"option--is-disabled":i,"option--is-focused":a,"option--is-selected":s},n)},l),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return y.a.createElement("div",Be({className:r(Object(Ae.a)(o("placeholder",e)),{placeholder:!0},n)},i),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps,a=e.isDisabled,s=e.isRtl;return y.a.createElement("div",Be({className:r(Object(Ae.a)(o("container",e)),{"--is-disabled":a,"--is-rtl":s},n)},i),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.innerProps;return y.a.createElement("div",Be({className:r(Object(Ae.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":i},n)},a),t)},ValueContainer:Vt},en=function(e){return ze({},Qt,e.components)},tn={clearIndicator:Ht,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,i=r.borderRadius,a=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:Wt,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,i=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*i,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:ut,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,i=r.spacing,a=r.colors;return Re(t={},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),Re(t,"backgroundColor",a.neutral0),Re(t,"borderRadius",o),Re(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Re(t,"marginBottom",i.menuGutter),Re(t,"marginTop",i.menuGutter),Re(t,"position","absolute"),Re(t,"width","100%"),Re(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:st,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,i=o.spacing,a=o.colors;return{backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?a.primary:a.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};var nn={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},rn={backspaceRemovesValue:!0,blurInputOnSelect:nt(),captureMenuScroll:!nt(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e){return function(t,n){var r=ze({ignoreCase:!0,ignoreAccents:!0,stringify:Et,trim:!0,matchFrom:"any"},e),o=r.ignoreCase,i=r.ignoreAccents,a=r.stringify,s=r.trim,u=r.matchFrom,l=s?vt(n):n,c=s?vt(a(t)):a(t);return o&&(l=l.toLowerCase(),c=c.toLowerCase()),i&&(l=bt(l),c=bt(c)),"start"===u?c.substr(0,l.length)===l:c.indexOf(l)>-1}}(),formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:It,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},on=1,an=function(e){function t(e){var n;Te(this,t),Re($e($e(n=qe(this,We(t).call(this,e)))),"state",{ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]}),Re($e($e(n)),"blockOptionHover",!1),Re($e($e(n)),"clearFocusValueOnUpdate",!1),Re($e($e(n)),"commonProps",void 0),Re($e($e(n)),"components",void 0),Re($e($e(n)),"hasGroups",!1),Re($e($e(n)),"initialTouchX",0),Re($e($e(n)),"initialTouchY",0),Re($e($e(n)),"inputIsHiddenAfterUpdate",void 0),Re($e($e(n)),"instancePrefix",""),Re($e($e(n)),"openAfterFocus",!1),Re($e($e(n)),"scrollToFocusedOptionOnUpdate",!1),Re($e($e(n)),"userIsDragging",void 0),Re($e($e(n)),"controlRef",null),Re($e($e(n)),"getControlRef",function(e){n.controlRef=e}),Re($e($e(n)),"focusedOptionRef",null),Re($e($e(n)),"getFocusedOptionRef",function(e){n.focusedOptionRef=e}),Re($e($e(n)),"menuListRef",null),Re($e($e(n)),"getMenuListRef",function(e){n.menuListRef=e}),Re($e($e(n)),"inputRef",null),Re($e($e(n)),"getInputRef",function(e){n.inputRef=e}),Re($e($e(n)),"cacheComponents",function(e){n.components=en({components:e})}),Re($e($e(n)),"focus",n.focusInput),Re($e($e(n)),"blur",n.blurInput),Re($e($e(n)),"onChange",function(e,t){var r=n.props;(0,r.onChange)(e,ze({},t,{name:r.name}))}),Re($e($e(n)),"setValue",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments.length>2?arguments[2]:void 0,o=n.props,i=o.closeMenuOnSelect,a=o.isMulti;n.onInputChange("",{action:"set-value"}),i&&(n.inputIsHiddenAfterUpdate=!a,n.onMenuClose()),n.clearFocusValueOnUpdate=!0,n.onChange(e,{action:t,option:r})}),Re($e($e(n)),"selectOption",function(e){var t=n.props,r=t.blurInputOnSelect,o=t.isMulti,i=n.state.selectValue;if(o)if(n.isOptionSelected(e,i)){var a=n.getOptionValue(e);n.setValue(i.filter(function(e){return n.getOptionValue(e)!==a}),"deselect-option",e),n.announceAriaLiveSelection({event:"deselect-option",context:{value:n.getOptionLabel(e)}})}else n.isOptionDisabled(e,i)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue([].concat(Ye(i),[e]),"select-option",e),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));else n.isOptionDisabled(e,i)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue(e,"select-option"),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));r&&n.blurInput()}),Re($e($e(n)),"removeValue",function(e){var t=n.state.selectValue,r=n.getOptionValue(e);n.onChange(t.filter(function(e){return n.getOptionValue(e)!==r}),{action:"remove-value",removedValue:e}),n.announceAriaLiveSelection({event:"remove-value",context:{value:e?n.getOptionLabel(e):""}}),n.focusInput()}),Re($e($e(n)),"clearValue",function(){var e=n.props.isMulti;n.onChange(e?[]:null,{action:"clear"})}),Re($e($e(n)),"popValue",function(){var e=n.state.selectValue,t=e[e.length-1];n.announceAriaLiveSelection({event:"pop-value",context:{value:t?n.getOptionLabel(t):""}}),n.onChange(e.slice(0,e.length-1),{action:"pop-value",removedValue:t})}),Re($e($e(n)),"getOptionLabel",function(e){return n.props.getOptionLabel(e)}),Re($e($e(n)),"getOptionValue",function(e){return n.props.getOptionValue(e)}),Re($e($e(n)),"getStyles",function(e,t){var r=tn[e](t);r.boxSizing="border-box";var o=n.props.styles[e];return o?o(r,t):r}),Re($e($e(n)),"getElementId",function(e){return"".concat(n.instancePrefix,"-").concat(e)}),Re($e($e(n)),"getActiveDescendentId",function(){var e=n.props.menuIsOpen,t=n.state,r=t.menuOptions,o=t.focusedOption;if(o&&e){var i=r.focusable.indexOf(o),a=r.render[i];return a&&a.key}}),Re($e($e(n)),"announceAriaLiveSelection",function(e){var t=e.event,r=e.context;n.setState({ariaLiveSelection:Tt(t,r)})}),Re($e($e(n)),"announceAriaLiveContext",function(e){var t=e.event,r=e.context;n.setState({ariaLiveContext:Mt(t,ze({},r,{label:n.props["aria-label"]}))})}),Re($e($e(n)),"onMenuMouseDown",function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),n.focusInput())}),Re($e($e(n)),"onMenuMouseMove",function(e){n.blockOptionHover=!1}),Re($e($e(n)),"onControlMouseDown",function(e){var t=n.props.openMenuOnClick;n.state.isFocused?n.props.menuIsOpen?"INPUT"!==e.target.tagName&&n.onMenuClose():t&&n.openMenu("first"):(t&&(n.openAfterFocus=!0),n.focusInput()),"INPUT"!==e.target.tagName&&e.preventDefault()}),Re($e($e(n)),"onDropdownIndicatorMouseDown",function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||n.props.isDisabled)){var t=n.props,r=t.isMulti,o=t.menuIsOpen;n.focusInput(),o?(n.inputIsHiddenAfterUpdate=!r,n.onMenuClose()):n.openMenu("first"),e.preventDefault(),e.stopPropagation()}}),Re($e($e(n)),"onClearIndicatorMouseDown",function(e){e&&"mousedown"===e.type&&0!==e.button||(n.clearValue(),e.stopPropagation(),n.openAfterFocus=!1,setTimeout(function(){return n.focusInput()}))}),Re($e($e(n)),"onScroll",function(e){"boolean"==typeof n.props.closeMenuOnScroll?e.target instanceof HTMLElement&&Je(e.target)&&n.props.onMenuClose():"function"==typeof n.props.closeMenuOnScroll&&n.props.closeMenuOnScroll(e)&&n.props.onMenuClose()}),Re($e($e(n)),"onCompositionStart",function(){n.setState({isComposing:!0})}),Re($e($e(n)),"onCompositionEnd",function(){n.setState({isComposing:!1})}),Re($e($e(n)),"onTouchStart",function(e){var t=e.touches.item(0);t&&(n.initialTouchX=t.clientX,n.initialTouchY=t.clientY,n.userIsDragging=!1)}),Re($e($e(n)),"onTouchMove",function(e){var t=e.touches.item(0);if(t){var r=Math.abs(t.clientX-n.initialTouchX),o=Math.abs(t.clientY-n.initialTouchY);n.userIsDragging=r>5||o>5}}),Re($e($e(n)),"onTouchEnd",function(e){n.userIsDragging||(n.controlRef&&!n.controlRef.contains(e.target)&&n.menuListRef&&!n.menuListRef.contains(e.target)&&n.blurInput(),n.initialTouchX=0,n.initialTouchY=0)}),Re($e($e(n)),"onControlTouchEnd",function(e){n.userIsDragging||n.onControlMouseDown(e)}),Re($e($e(n)),"onClearIndicatorTouchEnd",function(e){n.userIsDragging||n.onClearIndicatorMouseDown(e)}),Re($e($e(n)),"onDropdownIndicatorTouchEnd",function(e){n.userIsDragging||n.onDropdownIndicatorMouseDown(e)}),Re($e($e(n)),"handleInputChange",function(e){var t=e.currentTarget.value;n.inputIsHiddenAfterUpdate=!1,n.onInputChange(t,{action:"input-change"}),n.onMenuOpen()}),Re($e($e(n)),"onInputFocus",function(e){var t=n.props,r=t.isSearchable,o=t.isMulti;n.props.onFocus&&n.props.onFocus(e),n.inputIsHiddenAfterUpdate=!1,n.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),n.setState({isFocused:!0}),(n.openAfterFocus||n.props.openMenuOnFocus)&&n.openMenu("first"),n.openAfterFocus=!1}),Re($e($e(n)),"onInputBlur",function(e){n.menuListRef&&n.menuListRef.contains(document.activeElement)?n.inputRef.focus():(n.props.onBlur&&n.props.onBlur(e),n.onInputChange("",{action:"input-blur"}),n.onMenuClose(),n.setState({focusedValue:null,isFocused:!1}))}),Re($e($e(n)),"onOptionHover",function(e){n.blockOptionHover||n.state.focusedOption===e||n.setState({focusedOption:e})}),Re($e($e(n)),"shouldHideSelectedOptions",function(){var e=n.props,t=e.hideSelectedOptions,r=e.isMulti;return void 0===t?r:t}),Re($e($e(n)),"onKeyDown",function(e){var t=n.props,r=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,u=t.isDisabled,l=t.menuIsOpen,c=t.onKeyDown,p=t.tabSelectsValue,d=t.openMenuOnFocus,f=n.state,m=f.isComposing,h=f.focusedOption,g=f.focusedValue,b=f.selectValue;if(!(u||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(n.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||a)return;n.focusValue("previous");break;case"ArrowRight":if(!r||a)return;n.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(g)n.removeValue(g);else{if(!o)return;r?n.popValue():s&&n.clearValue()}break;case"Tab":if(m)return;if(e.shiftKey||!l||!p||!h||d&&n.isOptionSelected(h,b))return;n.selectOption(h);break;case"Enter":if(l){if(!h)return;if(m)return;n.selectOption(h);break}return;case"Escape":l?(n.inputIsHiddenAfterUpdate=!1,n.onInputChange("",{action:"menu-close"}),n.onMenuClose()):s&&i&&n.clearValue();break;case" ":if(a)return;if(!l){n.openMenu("first");break}if(!h)return;n.selectOption(h);break;case"ArrowUp":l?n.focusOption("up"):n.openMenu("last");break;case"ArrowDown":l?n.focusOption("down"):n.openMenu("first");break;case"PageUp":if(!l)return;n.focusOption("pageup");break;case"PageDown":if(!l)return;n.focusOption("pagedown");break;case"Home":if(!l)return;n.focusOption("first");break;case"End":if(!l)return;n.focusOption("last");break;default:return}e.preventDefault()}});var r=e.value;n.cacheComponents=xe(n.cacheComponents,ht).bind($e($e(n))),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++on);var o=Ze(r),i=n.buildMenuOptions(e,o);return n.state.menuOptions=i,n.state.selectValue=o,n}return Ue(t,E["Component"]),Ve(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var i=Ze(e.value),a=this.buildMenuOptions(e,i),s=this.getNextFocusedValue(i),u=this.getNextFocusedOption(a.focusable);this.setState({menuOptions:a,selectValue:i,focusedOption:u,focusedValue:s})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&function(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?et(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&et(e,Math.max(t.offsetTop-o,0))}(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){var e=this.props,t=e.isSearchable,n=e.isMulti;this.announceAriaLiveContext({event:"input",context:{isSearchable:t,isMulti:n}}),this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this.state,n=t.menuOptions,r=t.selectValue,o=t.isFocused,i=this.props.isMulti,a="first"===e?0:n.focusable.length-1;if(!i){var s=n.focusable.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,i=o.selectValue,a=o.focusedValue;if(n){this.setState({focusedOption:null});var s=i.indexOf(a);a||(s=-1,this.announceAriaLiveContext({event:"value"}));var u=i.length-1,l=-1;if(i.length){switch(e){case"previous":l=0===s?0:-1===s?u:s-1;break;case"next":s>-1&&s<u&&(l=s+1)}-1===l&&this.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:n}}),this.setState({inputIsHidden:-1!==l,focusedValue:i[l]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var i=0,a=o.indexOf(r);r||(a=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?i=a>0?a-1:o.length-1:"down"===e?i=(a+1)%o.length:"pageup"===e?(i=a-t)<0&&(i=0):"pagedown"===e?(i=a+t)>o.length-1&&(i=o.length-1):"last"===e&&(i=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[i],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:It(o[i])}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(nn):ze({},nn,this.props.theme):nn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,i=o.classNamePrefix,a=o.isMulti,s=o.isRtl,u=o.options,l=this.state.selectValue,c=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var i in n)n.hasOwnProperty(i)&&n[i]&&o.push("".concat(Ke(e,i)));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,i),clearValue:e,getStyles:t,getValue:function(){return l},hasValue:c,isMulti:a,isRtl:s,options:u,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r<e.length)return e[r]}return null}},{key:"getNextFocusedOption",value:function(e){var t=this.state.focusedOption;return t&&e.indexOf(t)>-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,i=function(e,r){var i=n.isOptionDisabled(e,t),a=n.isOptionSelected(e,t),s=n.getOptionLabel(e),u=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&a||!n.filterOption({label:s,value:u,data:e},o))){var l=i?void 0:function(){return n.onOptionHover(e)},c=i?void 0:function(){return n.selectOption(e)},p="".concat(n.getElementId("option"),"-").concat(r);return{innerProps:{id:p,onClick:c,onMouseMove:l,onMouseOver:l,tabIndex:-1},data:e,isDisabled:i,isSelected:a,key:p,label:s,type:"option",value:u}}};return e.options.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,"".concat(r,"-").concat(n));return o&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a="".concat(n.getElementId("group"),"-").concat(r);e.render.push({type:"group",key:a,data:t,options:o})}}else{var s=i(t,"".concat(r));s&&(e.render.push(s),e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,i=this.props,a=i.options,s=i.menuIsOpen,u=i.inputValue,l=i.screenReaderStatus,c=r?function(e){var t=e.focusedValue,n=e.getOptionLabel,r=e.selectValue;return"value ".concat(n(t)," focused, ").concat(r.indexOf(t)+1," of ").concat(r.length,".")}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"",p=o&&s?function(e){var t=e.focusedOption,n=e.getOptionLabel,r=e.options;return"option ".concat(n(t)," focused").concat(t.isDisabled?" disabled":"",", ").concat(r.indexOf(t)+1," of ").concat(r.length,".")}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:a}):"",d=function(e){var t=e.inputValue,n=e.screenReaderMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}({inputValue:u,screenReaderMessage:l({count:this.countOptions()})});return"".concat(c," ").concat(p," ").concat(d," ").concat(t)}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,a=this.components.Input,s=this.state.inputIsHidden,u=r||this.getElementId("input");if(!n)return y.a.createElement(wt,{id:u,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Xe,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:i,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},c=this.commonProps,p=c.cx,d=c.theme,f=c.selectProps;return y.a.createElement(a,Be({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:u,innerRef:this.getInputRef,isDisabled:t,isHidden:s,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:f,spellCheck:"false",tabIndex:i,theme:d,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,s=t.Placeholder,u=this.commonProps,l=this.props,c=l.controlShouldRenderValue,p=l.isDisabled,d=l.isMulti,f=l.inputValue,m=l.placeholder,h=this.state,g=h.selectValue,b=h.focusedValue,v=h.isFocused;if(!this.hasValue()||!c)return f?null:y.a.createElement(s,Be({},u,{key:"placeholder",isDisabled:p,isFocused:v}),m);if(d)return g.map(function(t){var a=t===b;return y.a.createElement(n,Be({},u,{components:{Container:r,Label:o,Remove:i},isFocused:a,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(f)return null;var E=g[0];return y.a.createElement(a,Be({},u,{data:E,isDisabled:p}),this.formatOptionLabel(E,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return y.a.createElement(e,Be({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!e||!o)return null;return y.a.createElement(e,Be({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:i}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return y.a.createElement(n,Be({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return y.a.createElement(e,Be({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,a=t.MenuPortal,s=t.LoadingMessage,u=t.NoOptionsMessage,l=t.Option,c=this.commonProps,p=this.state,d=p.focusedOption,f=p.menuOptions,m=this.props,h=m.captureMenuScroll,g=m.inputValue,b=m.isLoading,v=m.loadingMessage,E=m.minMenuHeight,w=m.maxMenuHeight,O=m.menuIsOpen,C=m.menuPlacement,k=m.menuPosition,S=m.menuPortalTarget,x=m.menuShouldBlockScroll,A=m.menuShouldScrollIntoView,_=m.noOptionsMessage,j=m.onMenuScrollToTop,F=m.onMenuScrollToBottom;if(!O)return null;var D,N=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,y.a.createElement(l,Be({},c,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())D=f.render.map(function(t){if("group"===t.type){t.type;var o=Ge(t,["type"]),i="".concat(t.key,"-heading");return y.a.createElement(n,Be({},c,o,{Heading:r,headingProps:{id:i},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return N(e)}))}if("option"===t.type)return N(t)});else if(b){var P=v({inputValue:g});if(null===P)return null;D=y.a.createElement(s,c,P)}else{var L=_({inputValue:g});if(null===L)return null;D=y.a.createElement(u,c,L)}var M={minMenuHeight:E,maxMenuHeight:w,menuPlacement:C,menuPosition:k,menuShouldScrollIntoView:A},T=y.a.createElement(it,Be({},c,M),function(t){var n=t.ref,r=t.placerProps,a=r.placement,s=r.maxHeight;return y.a.createElement(o,Be({},c,M,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:a}),y.a.createElement(Lt,{isEnabled:h,onTopArrive:j,onBottomArrive:F},y.a.createElement(Nt,{isEnabled:x},y.a.createElement(i,Be({},c,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:s}),D))))});return S||"fixed"===k?y.a.createElement(a,Be({},c,{appendTo:S,controlElement:this.controlRef,menuPlacement:C,menuPosition:k}),T):T}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=this.state.selectValue;if(i&&!r){if(o){if(n){var s=a.map(function(t){return e.getOptionValue(t)}).join(n);return y.a.createElement("input",{name:i,type:"hidden",value:s})}var u=a.length>0?a.map(function(t,n){return y.a.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})}):y.a.createElement("input",{name:i,type:"hidden"});return y.a.createElement("div",null,u)}var l=a[0]?this.getOptionValue(a[0]):"";return y.a.createElement("input",{name:i,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?y.a.createElement(yt,{"aria-live":"assertive"},y.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),y.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,a=i.className,s=i.id,u=i.isDisabled,l=i.menuIsOpen,c=this.state.isFocused,p=this.commonProps=this.getCommonProps();return y.a.createElement(r,Be({},p,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:c}),this.renderLiveRegion(),y.a.createElement(t,Be({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:c,menuIsOpen:l}),y.a.createElement(o,Be({},p,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),y.a.createElement(n,Be({},p,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}();Re(an,"defaultProps",rn);var sn,un,ln={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},cn=function(e){var t,n;return n=t=function(t){function n(){var e,t;Te(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Re($e($e(t=qe(this,(e=We(n)).call.apply(e,[this].concat(o))))),"select",void 0),Re($e($e(t)),"state",{inputValue:void 0!==t.props.inputValue?t.props.inputValue:t.props.defaultInputValue,menuIsOpen:void 0!==t.props.menuIsOpen?t.props.menuIsOpen:t.props.defaultMenuIsOpen,value:void 0!==t.props.value?t.props.value:t.props.defaultValue}),Re($e($e(t)),"onChange",function(e,n){t.callProp("onChange",e,n),t.setState({value:e})}),Re($e($e(t)),"onInputChange",function(e,n){var r=t.callProp("onInputChange",e,n);t.setState({inputValue:void 0!==r?r:e})}),Re($e($e(t)),"onMenuOpen",function(){t.callProp("onMenuOpen"),t.setState({menuIsOpen:!0})}),Re($e($e(t)),"onMenuClose",function(){t.callProp("onMenuClose"),t.setState({menuIsOpen:!1})}),t}return Ue(n,E["Component"]),Ve(n,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]}},{key:"callProp",value:function(e){if("function"==typeof this.props[e]){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(t=this.props)[e].apply(t,r)}}},{key:"render",value:function(){var t=this,n=this.props,r=(n.defaultInputValue,n.defaultMenuIsOpen,n.defaultValue,Ge(n,["defaultInputValue","defaultMenuIsOpen","defaultValue"]));return y.a.createElement(e,Be({},r,{ref:function(e){t.select=e},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),n}(),Re(t,"defaultProps",ln),n},pn={cacheOptions:!1,defaultOptions:!1,filterOption:null},dn=function(e){var t,n;return n=t=function(t){function n(e){var t;return Te(this,n),Re($e($e(t=qe(this,We(n).call(this)))),"select",void 0),Re($e($e(t)),"lastRequest",void 0),Re($e($e(t)),"mounted",!1),Re($e($e(t)),"optionsCache",{}),Re($e($e(t)),"handleInputChange",function(e,n){var r=t.props,o=r.cacheOptions,i=function(e,t,n){if(n){var r=n(e,t);if("string"==typeof r)return r}return e}(e,n,r.onInputChange);if(!i)return delete t.lastRequest,void t.setState({inputValue:"",loadedInputValue:"",loadedOptions:[],isLoading:!1,passEmptyOptions:!1});if(o&&t.optionsCache[i])t.setState({inputValue:i,loadedInputValue:i,loadedOptions:t.optionsCache[i],isLoading:!1,passEmptyOptions:!1});else{var a=t.lastRequest={};t.setState({inputValue:i,isLoading:!0,passEmptyOptions:!t.state.loadedInputValue},function(){t.loadOptions(i,function(e){t.mounted&&(e&&(t.optionsCache[i]=e),a===t.lastRequest&&(delete t.lastRequest,t.setState({isLoading:!1,loadedInputValue:i,loadedOptions:e||[],passEmptyOptions:!1})))})})}return i}),t.state={defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0,inputValue:void 0!==e.inputValue?e.inputValue:"",isLoading:!0===e.defaultOptions,loadedOptions:[],passEmptyOptions:!1},t}return Ue(n,E["Component"]),Ve(n,[{key:"componentDidMount",value:function(){var e=this;this.mounted=!0;var t=this.props.defaultOptions,n=this.state.inputValue;!0===t&&this.loadOptions(n,function(t){if(e.mounted){var n=!!e.lastRequest;e.setState({defaultOptions:t||[],isLoading:n})}})}},{key:"componentWillReceiveProps",value:function(e){e.cacheOptions!==this.props.cacheOptions&&(this.optionsCache={}),e.defaultOptions!==this.props.defaultOptions&&this.setState({defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0})}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"loadOptions",value:function(e,t){var n=this.props.loadOptions;if(!n)return t();var r=n(e,t);r&&"function"==typeof r.then&&r.then(t,function(){return t()})}},{key:"render",value:function(){var t=this,n=this.props,r=(n.loadOptions,Ge(n,["loadOptions"])),o=this.state,i=o.defaultOptions,a=o.inputValue,s=o.isLoading,u=o.loadedInputValue,l=o.loadedOptions,c=o.passEmptyOptions?[]:a&&u?l:i||[];return y.a.createElement(e,Be({},r,{ref:function(e){t.select=e},options:c,isLoading:s,onInputChange:this.handleInputChange}))}}]),n}(),Re(t,"defaultProps",pn),n},fn=(dn(cn(an)),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=String(e).toLowerCase(),r=String(t.value).toLowerCase(),o=String(t.label).toLowerCase();return r===n||o===n}),mn=ze({allowCreateWhileLoading:!1,createOptionPosition:"last"},{formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n){return!(!e||t.some(function(t){return fn(e,t)})||n.some(function(t){return fn(e,t)}))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}}),hn=function(e){var t,n;return n=t=function(t){function n(e){var t;Te(this,n),Re($e($e(t=qe(this,We(n).call(this,e)))),"select",void 0),Re($e($e(t)),"onChange",function(e,n){var r=t.props,o=r.getNewOptionData,i=r.inputValue,a=r.isMulti,s=r.onChange,u=r.onCreateOption,l=r.value;if("select-option"!==n.action)return s(e,n);var c=t.state.newOption,p=Array.isArray(e)?e:[e];if(p[p.length-1]!==c)s(e,n);else if(u)u(i);else{var d=o(i,i),f={action:"create-option"};s(a?[].concat(Ye(Ze(l)),[d]):d,f)}});var r=e.options||[];return t.state={newOption:void 0,options:r},t}return Ue(n,E["Component"]),Ve(n,[{key:"componentWillReceiveProps",value:function(e){var t=e.allowCreateWhileLoading,n=e.createOptionPosition,r=e.formatCreateLabel,o=e.getNewOptionData,i=e.inputValue,a=e.isLoading,s=e.isValidNewOption,u=e.value,l=e.options||[],c=this.state.newOption;c=s(i,Ze(u),l)?o(i,r(i)):void 0,this.setState({newOption:c,options:!t&&a||!c?l:"first"===n?[c].concat(Ye(l)):[].concat(Ye(l),[c])})}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"render",value:function(){var t=this,n=Be({},this.props),r=this.state.options;return y.a.createElement(e,Be({},n,{ref:function(e){t.select=e},options:r,onChange:this.onChange}))}}]),n}(),Re(t,"defaultProps",mn),n},gn=(cn(hn(an)),dn(cn(hn(an))),function(e){var t=e.component,n=e.duration,r=void 0===n?1:n,o=e.in,i=(e.onExited,Ge(e,["component","duration","in","onExited"])),a={entering:{opacity:0},entered:{opacity:1,transition:"opacity ".concat(r,"ms")},exiting:{opacity:0},exited:{opacity:0}};return y.a.createElement(Le.Transition,{mountOnEnter:!0,unmountOnExit:!0,in:o,timeout:r},function(e){var n={style:ze({},a[e])};return y.a.createElement(t,Be({innerProps:n},i))})}),bn=260,vn=function(e){function t(){var e,n;Te(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Re($e($e(n=qe(this,(e=We(t)).call.apply(e,[this].concat(o))))),"duration",bn),Re($e($e(n)),"rafID",void 0),Re($e($e(n)),"state",{width:"auto"}),Re($e($e(n)),"transition",{exiting:{width:0,transition:"width ".concat(n.duration,"ms ease-out")},exited:{width:0}}),Re($e($e(n)),"getWidth",function(e){e&&isNaN(n.state.width)&&(n.rafID=window.requestAnimationFrame(function(){var t=e.getBoundingClientRect().width;n.setState({width:t})}))}),Re($e($e(n)),"getStyle",function(e){return{overflow:"hidden",whiteSpace:"nowrap",width:e}}),Re($e($e(n)),"getTransition",function(e){return n.transition[e]}),n}return Ue(t,E["Component"]),Ve(t,[{key:"componentWillUnmount",value:function(){this.rafID&&window.cancelAnimationFrame(this.rafID)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.in,o=this.state.width;return y.a.createElement(Le.Transition,{enter:!1,mountOnEnter:!0,unmountOnExit:!0,in:r,timeout:this.duration},function(t){var r=ze({},e.getStyle(o),e.getTransition(t));return y.a.createElement("div",{ref:e.getWidth,style:r},n)})}}]),t}(),En=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=en({components:e}),n=t.Input,r=t.MultiValue,o=t.Placeholder,i=t.SingleValue,a=t.ValueContainer,s=Ge(t,["Input","MultiValue","Placeholder","SingleValue","ValueContainer"]);return ze({Input:function(e){return function(t){t.in,t.onExited,t.appear,t.enter,t.exit;var n=Ge(t,["in","onExited","appear","enter","exit"]);return y.a.createElement(e,n)}}(n),MultiValue:function(e){return function(t){var n=t.in,r=t.onExited,o=Ge(t,["in","onExited"]);return y.a.createElement(vn,{in:n,onExited:r},y.a.createElement(e,Be({cropWithEllipsis:n},o)))}}(r),Placeholder:function(e){return function(t){return y.a.createElement(gn,Be({component:e,duration:t.isMulti?bn:1},t))}}(o),SingleValue:function(e){return function(t){return y.a.createElement(gn,Be({component:e},t))}}(i),ValueContainer:function(e){return function(t){return y.a.createElement(Le.TransitionGroup,Be({component:e},t))}}(a)},s)},yn=En(),wn=(yn.Input,yn.MultiValue,yn.Placeholder,yn.SingleValue,yn.ValueContainer,xe(En,ht),cn(an));n(41);function On(e){return[e]}function Cn(e){return!!e&&"object"==typeof e}function kn(){var e={clear:function(){e.head=null}};return e}function Sn(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}sn={},un="undefined"!=typeof WeakMap;var xn=wp.components.Dashicon,An=wp.i18n.__,_n=function(e,t){var n,r;function o(){n=un?new WeakMap:kn()}function i(){var n,o,i,a,s,u=arguments.length;for(a=new Array(u),i=0;i<u;i++)a[i]=arguments[i];for(s=t.apply(null,a),(n=r(s)).isUniqueByDependants||(n.lastDependants&&!Sn(s,n.lastDependants,0)&&n.clear(),n.lastDependants=s),o=n.head;o;){if(Sn(o.args,a,1))return o!==n.head&&(o.prev.next=o.next,o.next&&(o.next.prev=o.prev),o.next=n.head,o.prev=null,n.head.prev=o,n.head=o),o.val;o=o.next}return o={val:e.apply(null,a)},a[0]=null,o.args=a,n.head&&(n.head.prev=o,o.next=n.head),n.head=o,o.val}return t||(t=On),r=un?function(e){var t,r,o,i,a=n,s=!0;for(t=0;t<e.length;t++){if(!Cn(r=e[t])){s=!1;break}a.has(r)?a=a.get(r):(o=new WeakMap,a.set(r,o),a=o)}return a.has(sn)||((i=kn()).isUniqueByDependants=s,a.set(sn,i)),a.get(sn)}:function(){return n},i.getDependants=t,i.clear=o,o(),i}(function(e){var t=[];return e.forEach(function(e){var n,r=e.entityType,o=e.type,i=e.label,a=e.items;switch(r){case"post":n="title.rendered";break;case"term":n="name"}if(Array.isArray(a)&&a.length){var s=Ce(a,{sort:n+"_asc"});t.push(function(e,t,n,r){return{label:n,options:r=r.map(function(n){var r;switch(e){case"post":(r={label:n.title.rendered.trim()||An("(Untitled)","wordcamporg"),value:n.id,type:t}).avatar=Object(w.get)(n,"avatar_urls['24']",""),r.image=Object(w.get)(n,"_embedded['wp:featuredmedia'].media_details.sizes.thumbnail.source_url","");break;case"term":r={label:n.name||An("(Untitled)","wordcamporg"),value:n.id,type:t,count:n.count}}return r})}}(r,o,i,s))}}),t},function(e){var t=[];return e.forEach(function(e){var n=e.items;t.push(n)}),t});function jn(e){var t,n=e.avatar,r=e.icon,o=e.label,i=e.count;n?t=Object(E.createElement)(J,{className:"wordcamp-item-select-option-avatar",name:o,size:24,url:n}):r&&(t=Object(E.createElement)("div",{className:"wordcamp-item-select-option-icon-container"},Object(E.createElement)(xn,{className:"wordcamp-item-select-option-icon",icon:r,size:16})));var a=Object(E.createElement)("span",{className:"wordcamp-item-select-option-label"},o,void 0!==i&&Object(E.createElement)("span",{className:"wordcamp-item-select-option-label-count"},i));return Object(E.createElement)("div",{className:"wordcamp-item-select-option"},t,a)}var Fn=wp.components,Dn=Fn.BaseControl,Nn=Fn.Button,Pn=wp.compose.withInstanceId,Ln=wp.element.Component,Mn=wp.i18n.__,Tn=Pn(function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).state={selectedOptions:null},n.getNewAttributes=n.getNewAttributes.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"getNewAttributes",value:function(){var e=this.state.selectedOptions,t={};if(null===e)return t;var n=e.map(function(e){return e.value})||[];n.length?t={mode:e[0].type,item_ids:n}:t={mode:"",item_ids:[]};return t}},{key:"render",value:function(){var e=this,t=this.props,n=t.instanceId,r=t.className,o=t.label,i=t.help,a=t.submitLabel,s=t.onChange,l=t.selectProps,c=this.state.selectedOptions||this.props.value,p="wordcamp-item-select-control-".concat(n),d=de()({isMulti:!0,isOptionDisabled:this.constructor.isOptionDisabled,formatGroupLabel:this.constructor.formatGroupLabel},l);return Object(E.createElement)(Dn,{id:p,className:S()("wordcamp-item-select",r),label:o,help:i},Object(E.createElement)("div",{className:"wordcamp-item-select-inner"},Object(E.createElement)(wn,u()({id:p,className:"wordcamp-item-select-select",value:c,"aria-label":o,onChange:function(t){e.setState({selectedOptions:t})}},d)),Object(E.createElement)(Nn,{className:"wordcamp-item-select-button",isLarge:!0,isDefault:!0,onClick:function(){return s(e.getNewAttributes())}},a||Mn("Select","wordcamporg"))))}}],[{key:"isOptionDisabled",value:function(e,t){var n;return Array.isArray(t)&&t.length&&(n=t[0].type),n&&n!==e.type}},{key:"formatGroupLabel",value:function(e){return Object(E.createElement)("span",{className:"wordcamp-item-select-option-group-label"},e.label)}}]),t}(Ln)),In=wp.element.Component,Vn=wp.i18n.__,Rn=function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).buildSelectOptions=n.buildSelectOptions.bind(A()(A()(n))),n.getCurrentSelectValue=n.getCurrentSelectValue.bind(A()(A()(n))),n.isLoading=n.isLoading.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"buildSelectOptions",value:function(){var e=this.props.entities,t=e.wcb_organizer,n=e.wcb_organizer_team,r=[{entityType:"post",type:"wcb_organizer",label:Vn("Organizers","wordcamporg"),items:t},{entityType:"term",type:"wcb_organizer_team",label:Vn("Teams","wordcamporg"),items:n}];return _n(r)}},{key:"getCurrentSelectValue",value:function(){var e=this.props.attributes,t=e.mode,n=e.item_ids,r=Object(w.flatMap)(this.buildSelectOptions(),function(e){return e.options}),o=[];return t&&n.length&&(o=r.filter(function(e){return t===e.type&&Object(w.includes)(n,e.value)})),o}},{key:"isLoading",value:function(){var e=this.props.entities;return!Object(w.every)(e,function(e){return Array.isArray(e)})}},{key:"render",value:function(){var e=this.props,t=e.label,n=e.setAttributes;return Object(E.createElement)(Tn,{className:"wordcamp-organizers-select",label:t,value:this.getCurrentSelectValue(),onChange:function(e){return n(e)},selectProps:{options:this.buildSelectOptions(),isLoading:this.isLoading(),formatOptionLabel:function(e){return Object(E.createElement)(jn,e)}}})}}]),t}(In),Bn=wp.components,zn=Bn.Button,Un=Bn.Placeholder,Wn=wp.i18n.__,Hn=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e,t=this.props,n=t.icon,r=t.attributes,o=t.setAttributes,i=r.mode;switch(i){case"all":e=Object(E.createElement)(ke,this.props);break;case"wcb_organizer":case"wcb_organizer_team":e=Object(E.createElement)(P,{label:this.getModeLabel(i),icon:n,content:Object(E.createElement)(ke,this.props),placeholderChildren:Object(E.createElement)(Rn,this.props)});break;default:e=Object(E.createElement)(Un,{className:S()("wordcamp-block-edit-placeholder","wordcamp-block-edit-placeholder-no-mode"),icon:n,label:_r},Object(E.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(E.createElement)(zn,{isDefault:!0,isLarge:!0,onClick:function(){o({mode:"all"})}},this.getModeLabel("all"))),Object(E.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(E.createElement)(Rn,u()({label:Wn("Choose specific organizers or teams","wordcamporg")},this.props))))}return e}}]),t}(N),Gn=wp.components,$n=Gn.BaseControl,qn=Gn.Toolbar;var Yn=function(e){var t=e.className,n=e.label,r=e.help,o=e.value,i=e.onChange,a=e.alignOptions;return Object(E.createElement)($n,{className:S()("wordcamp-components-image-alignment",t),label:n,help:r},Object(E.createElement)(qn,{controls:a.map(function(e){var t=o===e.value,n="align-".concat(e.value);return{title:e.label,icon:n,isActive:t,onClick:function(){i(e.value)}}})}))},Xn=wp.element.Component,Kn=wp.components,Zn=Kn.PanelBody,Jn=Kn.PanelRow,Qn=Kn.RangeControl,er=wp.i18n.__,tr={grid_columns:{default:2,minimum:2,maximum:4}},nr=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=t.layout,o=t.grid_columns;if("grid"!==r)return null;var i=tr;return Object(E.createElement)(Zn,null,Object(E.createElement)(Zn,{title:er("Layout","wordcamporg"),initialOpen:!0},Object(E.createElement)(Jn,null,Object(E.createElement)(Qn,{label:er("Grid Columns","wordcamporg"),value:Number(o),min:i.grid_columns.minimum,max:i.grid_columns.maximum,initialPosition:i.grid_columns.default,onChange:function(e){return n({grid_columns:e})}}))))}}]),t}(Xn),rr=wp.components,or=rr.PanelBody,ir=rr.PanelRow,ar=rr.SelectControl,sr=rr.ToggleControl,ur=wp.editor.InspectorControls,lr=wp.element,cr=lr.Component,pr=lr.Fragment,dr=wp.i18n.__,fr={grid_columns:{default:2,minimum:2,maximum:4},avatar_size:{default:150,minimum:25,maximum:600}},mr={align:{},content:{},sort:{}},hr=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.show_avatars,i=t.avatar_size,a=t.avatar_align,s=t.content,u=t.sort,l=r.schema,c=void 0===l?fr:l,p=r.options,d=void 0===p?mr:p;return Object(E.createElement)(ur,null,Object(E.createElement)(nr,this.props),Object(E.createElement)(or,{title:dr("Avatar Settings","wordcamporg"),initialOpen:!0},Object(E.createElement)(ir,null,Object(E.createElement)(sr,{label:dr("Show avatars","wordcamporg"),checked:o,onChange:function(e){return n({show_avatars:e})}})),o&&Object(E.createElement)(pr,null,Object(E.createElement)(ir,null,Object(E.createElement)(H,{label:dr("Size","wordcamporg"),value:Number(i),initialPosition:Number(c.avatar_size.default),onChange:function(e){return n({avatar_size:e})},rangeProps:{min:Number(c.avatar_size.minimum),max:Number(c.avatar_size.maximum)}})),Object(E.createElement)(ir,null,Object(E.createElement)(Yn,{label:dr("Alignment","wordcamporg"),value:a,onChange:function(e){return n({avatar_align:e})},alignOptions:d.align_image})))),Object(E.createElement)(or,{title:dr("Content Settings","wordcamporg"),initialOpen:!1},Object(E.createElement)(ir,null,Object(E.createElement)(ar,{label:dr("Biography Length","wordcamporg"),value:s,options:d.content,onChange:function(e){return n({content:e})}}))),Object(E.createElement)(or,{title:dr("Sorting & Filtering","wordcamporg"),initialOpen:!1},Object(E.createElement)(ir,null,Object(E.createElement)(ar,{label:dr("Sort by","wordcamporg"),value:u,options:d.sort,onChange:function(e){return n({sort:e})}}))))}}]),t}(cr),gr=wp.components.Toolbar,br=wp.editor.BlockControls,vr=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.layout,i=r.options.layout,a=(void 0===i?{}:i).map(function(e){var t="".concat(e.value,"-view"),r=o===e.value;return{icon:t,title:e.label,isActive:r,onClick:function(){n({layout:e.value})}}});return Object(E.createElement)(br,null,Object(E.createElement)(gr,{controls:a}))}}]),t}(wp.element.Component),Er=wp.data.withSelect,yr=wp.element,wr=yr.Component,Or=yr.Fragment,Cr=window.WordCampBlocks.organizers||{},kr=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props.attributes.mode;return Object(E.createElement)(Or,null,Object(E.createElement)(Hn,u()({icon:jr},this.props)),""!==e&&Object(E.createElement)(Or,null,Object(E.createElement)(hr,this.props),Object(E.createElement)(vr,this.props)))}}]),t}(wr),Sr=Er(function(e){var t=e("wordcamp").getEntities,n={wcb_organizer:t("postType","wcb_organizer",{_embed:!0}),wcb_organizer_team:t("taxonomy","wcb_organizer_team")};return{blockData:Cr,entities:n}})(kr),xr=wp.i18n.__,Ar="wordcamp/organizers",_r=xr("Organizers","wordcamporg"),jr="groups",Fr={title:xr("Organizers","wordcamporg"),description:xr("Add a list of organizers.","wordcamporg"),icon:jr,category:"wordcamp",supports:{align:["wide","full"]},edit:Sr,save:function(){return null}},Dr=n(28),Nr=n.n(Dr),Pr=wp.i18n.__;function Lr(e){return e.split(/(%[1-9]?\$?s)/)}function Mr(e,t){var n,r=0;return e.flatMap(function(e){var o=e.match(/^%([1-9])?\$?s$/);return Array.isArray(o)&&(o.length>1&&void 0!==o[1]?(n=Number(o[1])-1,void 0!==t[n]&&(e=t[n])):(e=t[r],r++)),e})}function Tr(e,t){return e.length?e.slice(1).reduce(function(e,n,r){var o="function"==typeof t?o(r):t;return e.concat([o,n])},[e[0]]):[]}var Ir=wp.components.Disabled,Vr=wp.element.Component,Rr=wp.url.isURL,Br=function(e){function t(e){var n;c()(this,t),n=m()(this,g()(t).call(this,e));var r=e.imageData,o=r.media_details,i=void 0===o?{}:o,a=r.alt_text,s=void 0===a?"":a,u=n.constructor.getWidestImage(i);return n.state={image:u,alt:s},n}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.width,n=e.className,r=e.imageLink,o=this.state,i=o.image,a=o.alt,s=i.source_url,u=void 0===s?"":s;if(!u)return"";var l=this.constructor.getNewHeight(t,i),c=Object(E.createElement)("img",{className:S()("wordcamp-featured-image","wp-post-image"),src:u,alt:a,width:t,height:l});return Rr(r)&&(c=Object(E.createElement)(Ir,null,Object(E.createElement)("a",{href:r,className:S()("wordcamp-image-link","wordcamp-featured-image-link")},c))),c=Object(E.createElement)("div",{className:S()("wordcamp-image-container","wordcamp-featured-image-container",n)},c)}}],[{key:"getWidestImage",value:function(e){var t={},n=e.sizes,r=void 0===n?{}:n;if(r.hasOwnProperty("full")&&r.full.hasOwnProperty("source_url"))t=r.full;else if(Object.getOwnPropertyDescriptors(r).length>0){t=Object(w.sortBy)(r,"width").pop()}return t}},{key:"getNewHeight",value:function(e,t){var n=null,r=t.width,o=t.height;if(r&&o){var i=Number(o)/Number(r);n=Number.parseFloat(i*e).toFixed(1)}return n}}]),t}(Vr),zr=wp.element.Component,Ur=wp.i18n.__;function Wr(e){var t=e.session,n=Object(w.get)(t,"_embedded.speakers",[]);n=n.map(function(e){if(e.hasOwnProperty("code"))return null;var t=e.link,n=e.title,r=void 0===n?{}:n;return r=r.rendered.trim()||Ur("Unnamed","wordcamporg"),t?Object(E.createElement)("a",{key:t,href:t},r):r});var r=Mr(Lr(Ur("Presented by %s","wordcamporg")),[function(e){var t=[],n=Pr(", ","wordcamporg"),r=Pr(" and ","wordcamporg");if(!Array.isArray(e))return t;switch(e.length){case 0:break;case 1:t=e;break;case 2:t=Tr(e,r);break;default:var o=ge()(e).reverse(),i=Nr()(o),a=i[0];t=Tr(i.slice(1),n).concat([n,r,a])}return t}(n)]);return Object(E.createElement)("div",{className:"wordcamp-item-meta wordcamp-session-speakers"},r)}function Hr(e){var t,n=e.session,r=Object(w.get)(n,"_embedded['wp:term']",[]).flat();if(n.session_track.length){var o=r.filter(function(e){return"wcb_track"===e.taxonomy}),i=me()(o,1)[0];t=Mr(Lr(Ur("%1$s at %2$s in %3$s","wordcamporg")),[n.session_date_time.date,n.session_date_time.time,Object(E.createElement)("span",{key:i.id,className:S()("wordcamp-session-track","wordcamp-session-track-"+i.slug.trim())},i.name.trim())])}else t=Mr(Lr(Ur("%1$s at %2$s","wordcamporg")),[n.session_date_time.date,n.session_date_time.time]);return Object(E.createElement)("div",{className:"wordcamp-session-time-location"},t)}function Gr(e){var t,n=e.session,r=Object(w.get)(n,"_embedded['wp:term']",[]).flat();if(n.session_category.length){var o=Ur(", ","wordcamporg");t=Tr(r.filter(function(e){return"wcb_session_category"===e.taxonomy}).map(function(e){return Object(E.createElement)("span",{key:e.slug,className:S()("wordcamp-session-category","wordcamp-session-category-"+e.slug)},e.name.trim())}),o)}return Object(E.createElement)("div",{className:"wordcamp-session-categories"},t)}var $r=function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).getFilteredPosts=n.getFilteredPosts.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"getFilteredPosts",value:function(){var e=this.props,t=e.attributes,n=e.entities.wcb_session,r=t.mode,o=t.item_ids,i=t.sort,a={};if(Array.isArray(o)&&o.length>0){var s;switch(r){case"wcb_session":s="id";break;case"wcb_track":s="session_track";break;case"wcb_session_category":s="session_category"}a.filter=[{fieldName:s,fieldValue:o}]}"session_time"!==i&&(a.sort=i);var u=Ce(n,a);return Array.isArray(u)&&"session_time"===i&&(u=u.sort(function(e,t){return Number(e.meta._wcpt_session_time)-Number(t.meta._wcpt_session_time)})),u}},{key:"render",value:function(){var e=this,t=this.props.attributes,n=t.show_speaker,r=t.show_images,o=t.image_align,i=t.featured_image_width,a=t.content,s=t.show_meta,l=t.show_category,c=this.getFilteredPosts(),p=!Array.isArray(c),d=!p&&c.length>0;return p||!d?Object(E.createElement)(ae,{loading:p}):Object(E.createElement)(ce,u()({className:"wordcamp-sessions-block"},this.props),c.map(function(t){return Object(E.createElement)("div",{key:t.slug,className:S()("wordcamp-block-post-list-item","wordcamp-session","wordcamp-session-"+t.slug,"wordcamp-clearfix")},Object(E.createElement)(se,{className:"wordcamp-session-title",headingLevel:3,title:t.title.rendered.trim(),link:t.link}),n&&e.constructor.hasSpeaker(t)&&Object(E.createElement)(Wr,{session:t}),r&&Object(E.createElement)(Br,{imageData:Object(w.get)(t,"_embedded.wp:featuredmedia[0]",{}),width:Number(i),className:S()("wordcamp-session-image-container","align-"+o),imageLink:t.link}),"none"!==a&&Object(E.createElement)(ue,{className:S()("wordcamp-session-content-"+a),content:"full"===a?t.content.rendered.trim():t.excerpt.rendered.trim()}),(s||l)&&Object(E.createElement)("div",{className:"wordcamp-item-meta wordcamp-session-details"},s&&Object(E.createElement)(Hr,{session:t}),l&&Object(E.createElement)(Gr,{session:t})),"full"===a&&Object(E.createElement)(le,{link:t.link,linkText:Ur("Visit session page","wordcamporg")}))}))}}],[{key:"hasSpeaker",value:function(e){return Object(w.get)(e,"_embedded.speakers",[]).length>0}}]),t}(zr),qr=wp.element.Component,Yr=wp.i18n.__,Xr=function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).buildSelectOptions=n.buildSelectOptions.bind(A()(A()(n))),n.getCurrentSelectValue=n.getCurrentSelectValue.bind(A()(A()(n))),n.isLoading=n.isLoading.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"buildSelectOptions",value:function(){var e=this.props.entities,t=e.wcb_session,n=e.wcb_track,r=e.wcb_session_category,o=[{entityType:"post",type:"wcb_session",label:Yr("Sessions","wordcamporg"),items:t},{entityType:"term",type:"wcb_track",label:Yr("Tracks","wordcamporg"),items:n},{entityType:"term",type:"wcb_session_category",label:Yr("Session Categories","wordcamporg"),items:r}];return _n(o)}},{key:"getCurrentSelectValue",value:function(){var e=this.props.attributes,t=e.mode,n=e.item_ids,r=Object(w.flatMap)(this.buildSelectOptions(),function(e){return e.options}),o=[];return t&&n.length&&(o=r.filter(function(e){return t===e.type&&Object(w.includes)(n,e.value)})),o}},{key:"isLoading",value:function(){var e=this.props.entities;return!Object(w.every)(e,function(e){return Array.isArray(e)})}},{key:"render",value:function(){var e=this.props,t=e.icon,n=e.label,r=e.setAttributes;return Object(E.createElement)(Tn,{className:"wordcamp-sessions-select",label:n,value:this.getCurrentSelectValue(),onChange:function(e){return r(e)},selectProps:{options:this.buildSelectOptions(),isLoading:this.isLoading(),formatOptionLabel:function(e){return Object(E.createElement)(jn,u()({icon:Object(w.includes)(["wcb_track","wcb_session_category"],e.type)?t:null},e))}}})}}]),t}(qr),Kr=wp.components,Zr=Kr.Button,Jr=Kr.Placeholder,Qr=wp.i18n.__,eo=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e,t=this.props,n=t.icon,r=t.attributes,o=t.setAttributes,i=r.mode;switch(i){case"all":e=Object(E.createElement)($r,this.props);break;case"wcb_session":case"wcb_track":case"wcb_session_category":e=Object(E.createElement)(P,{label:this.getModeLabel(i),icon:n,content:Object(E.createElement)($r,this.props),placeholderChildren:Object(E.createElement)(Xr,this.props)});break;default:e=Object(E.createElement)(Jr,{className:S()("wordcamp-block-edit-placeholder","wordcamp-block-edit-placeholder-no-mode"),icon:n,label:Ao},Object(E.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(E.createElement)(Zr,{isDefault:!0,isLarge:!0,onClick:function(){o({mode:"all"})}},this.getModeLabel("all"))),Object(E.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(E.createElement)(Xr,u()({icon:n,label:Qr("Choose specific sessions, tracks, or categories","wordcamporg")},this.props))))}return e}}]),t}(N),to=(n(53),wp.element.Component),no=wp.components.PanelBody,ro=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.title,o=e.help,i=e.selectLabel,a=t.featured_image_width;return Object(E.createElement)(no,{title:r,initialopen:!1},Object(E.createElement)(H,{onChange:function(e){return n({featured_image_width:Number(e)})},label:i,initialPosition:a,help:o,rangeProps:{min:25,max:1024}}))}}]),t}(to),oo=wp.components,io=oo.PanelBody,ao=oo.PanelRow,so=oo.SelectControl,uo=oo.ToggleControl,lo=wp.editor.InspectorControls,co=wp.element.Component,po=wp.i18n.__,fo=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.show_speaker,i=t.content,a=t.show_meta,s=t.show_category,l=t.sort,c=r.options;return Object(E.createElement)(lo,null,Object(E.createElement)(nr,this.props),Object(E.createElement)(io,{title:po("Content Settings","wordcamporg"),initialOpen:!0},Object(E.createElement)(ao,null,Object(E.createElement)(so,{label:po("Description","wordcamporg"),value:i||"full",options:c.content,onChange:function(e){return n({content:e})}})),Object(E.createElement)(ao,null,Object(E.createElement)(uo,{label:po("Details","wordcamporg"),help:po("Show date, time, and track.","wordcamporg"),checked:void 0!==a&&a,onChange:function(e){return n({show_meta:e})}})),Object(E.createElement)(ao,null,Object(E.createElement)(uo,{label:po("Categories","wordcamporg"),help:po("Show session categories.","wordcamporg"),checked:void 0!==s&&s,onChange:function(e){return n({show_category:e})}})),Object(E.createElement)(ao,null,Object(E.createElement)(uo,{label:po("Speakers","wordcamporg"),help:po("Show session speakers.","wordcamporg"),checked:void 0!==o&&o,onChange:function(e){return n({show_speaker:e})}}))),Object(E.createElement)(ro,u()({title:po("Image size","wordcamporg"),help:po("Specify image height and width, or select a predefined size.","wordcamporg"),selectLabel:po("Size","wordcamporg")},this.props)),Object(E.createElement)(io,{title:po("Sorting","wordcamporg")},Object(E.createElement)(ao,null,Object(E.createElement)(so,{label:po("Sort by","wordcamporg"),value:l,options:c.sort||"session_time",onChange:function(e){return n({sort:e})}}))))}}]),t}(co),mo=wp.components.Toolbar,ho=wp.editor.BlockControls,go=wp.i18n.__,bo=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=t.layout,o=[{value:"grid",label:go("Grid","wordcamporg"),isActive:"grid"===r},{value:"list",label:go("List","wordcamporg"),isActive:"grid"===r}];return Object(E.createElement)(ho,null,Object(E.createElement)(mo,{controls:o.map(function(e){var t="".concat(e.value,"-view"),o=r===e.value;return{icon:t,title:e.label,isActive:o,onClick:function(){n({layout:e.value,grid_columns:"grid"===e.value?2:1})}}})}))}}]),t}(wp.element.Component),vo=wp.data.withSelect,Eo=wp.element,yo=Eo.Component,wo=Eo.Fragment,Oo=window.WordCampBlocks.sessions||{},Co=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props.attributes.mode;return Object(E.createElement)(wo,null,Object(E.createElement)(eo,u()({icon:_o},this.props)),e&&Object(E.createElement)(wo,null,Object(E.createElement)(fo,this.props),Object(E.createElement)(bo,this.props)))}}]),t}(yo),ko=vo(function(e){var t=e("wordcamp").getEntities,n={wcb_session:t("postType","wcb_session",{_embed:!0}),wcb_track:t("taxonomy","wcb_track"),wcb_session_category:t("taxonomy","wcb_session_category")};return{blockData:Oo,entities:n}})(Co),So=wp.i18n.__,xo="wordcamp/sessions",Ao=So("Sessions","wordcamporg"),_o="list-view",jo={title:So("Sessions","wordcamporg"),description:So("Add a list of sessions.","wordcamporg"),icon:_o,category:"wordcamp",supports:{align:["wide","full"]},edit:ko,save:function(){return null}},Fo=(n(54),wp.components.Disabled),Do=wp.element,No=Do.Component,Po=Do.Fragment,Lo=wp.i18n,Mo=Lo.__,To=Lo._n,Io=wp.escapeHtml.escapeAttribute;function Vo(e){var t=e.speaker,n=e.tracks,r=Object(w.get)(t,"_embedded.sessions",[]),o=Object(E.createElement)(Po,null,null);return r.length&&(o=Object(E.createElement)("div",{className:S()("wordcamp-item-meta","wordcamp-speaker-sessions")},Object(E.createElement)("h4",{className:"wordcamp-speaker-sessions-heading"},To("Session","Sessions",r.length,"wordcamporg")),Object(E.createElement)("ul",{className:"wordcamp-speaker-sessions-list"},r.map(function(e){return Object(E.createElement)("li",{key:Io(e.slug),className:"wordcamp-speaker-session-content"},Object(E.createElement)(Fo,null,Object(E.createElement)("a",{className:"wordcamp-speaker-session-link",href:e.link},e.title.rendered.trim()||Mo("(Untitled)","wordcamporg")),Object(E.createElement)("span",{className:"wordcamp-speaker-session-info"},e.session_track.length&&Array.isArray(n)&&Mr(Lr(Mo("%1$s at %2$s in %3$s","wordcamporg")),[e.session_date_time.date,e.session_date_time.time,Object(w.get)(n.find(function(t){var n=me()(e.session_track,1)[0];return parseInt(t.id)===n}),"name")]),(!e.session_track.length||!Array.isArray(n))&&Mr(Lr(Mo("%1$s at %2$s","wordcamporg")),[e.session_date_time.date,e.session_date_time.time]))))})))),o}var Ro=function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).getFilteredPosts=n.getFilteredPosts.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"getFilteredPosts",value:function(){var e=this.props,t=e.attributes,n=e.entities.wcb_speaker,r=t.mode,o=t.item_ids,i=t.sort,a={};return Array.isArray(o)&&o.length>0&&(a.filter=[{fieldName:"wcb_speaker"===r?"id":"speaker_group",fieldValue:o}]),a.sort=i,Ce(n,a)}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.entities.wcb_track,r=t.show_avatars,o=t.avatar_size,i=t.avatar_align,a=t.content,s=t.show_session,l=this.getFilteredPosts(),c=!Array.isArray(l),p=!c&&l.length>0;return c||!p?Object(E.createElement)(ae,{loading:c}):Object(E.createElement)(ce,u()({className:"wordcamp-speakers-block"},this.props),l.map(function(e){return Object(E.createElement)("div",{key:e.slug,className:S()("wordcamp-speaker","wordcamp-speaker-"+e.slug)},Object(E.createElement)(se,{className:"wordcamp-speaker-title",headingLevel:3,title:e.title.rendered.trim(),link:e.link}),r&&Object(E.createElement)(J,{className:S()("wordcamp-speaker-avatar-container","align-"+i),name:e.title.rendered.trim()||"",size:o,url:e.avatar_urls[24],imageLink:e.link}),"none"!==a&&Object(E.createElement)(ue,{className:S()("wordcamp-speaker-content-"+a),content:"full"===a?e.content.rendered.trim():e.excerpt.rendered.trim()}),!0===s&&Object(E.createElement)(Vo,{speaker:e,tracks:n}),"full"===a&&Object(E.createElement)(le,{link:e.link,linkText:Mo("Visit speaker page","wordcamporg")}))}))}}]),t}(No),Bo=wp.element.Component,zo=wp.i18n.__,Uo=function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).buildSelectOptions=n.buildSelectOptions.bind(A()(A()(n))),n.getCurrentSelectValue=n.getCurrentSelectValue.bind(A()(A()(n))),n.isLoading=n.isLoading.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"buildSelectOptions",value:function(){var e=this.props.entities,t=e.wcb_speaker,n=e.wcb_speaker_group,r=[{entityType:"post",type:"wcb_speaker",label:zo("Speakers","wordcamporg"),items:t},{entityType:"term",type:"wcb_speaker_group",label:zo("Groups","wordcamporg"),items:n}];return _n(r)}},{key:"getCurrentSelectValue",value:function(){var e=this.props.attributes,t=e.mode,n=e.item_ids,r=Object(w.flatMap)(this.buildSelectOptions(),function(e){return e.options}),o=[];return t&&n.length&&(o=r.filter(function(e){return t===e.type&&Object(w.includes)(n,e.value)})),o}},{key:"isLoading",value:function(){var e=this.props.entities;return!Object(w.every)(e,function(e){return Array.isArray(e)})}},{key:"render",value:function(){var e=this.props,t=e.label,n=e.icon,r=e.setAttributes;return Object(E.createElement)(Tn,{className:"wordcamp-speakers-select",label:t,value:this.getCurrentSelectValue(),onChange:function(e){return r(e)},selectProps:{options:this.buildSelectOptions(),isLoading:this.isLoading(),formatOptionLabel:function(e){return Object(E.createElement)(jn,u()({icon:"wcb_speaker_group"===e.type?n:null},e))}}})}}]),t}(Bo),Wo=wp.components,Ho=Wo.Button,Go=Wo.Placeholder,$o=wp.i18n.__,qo=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e,t=this.props,n=t.icon,r=t.attributes,o=t.setAttributes,i=r.mode;switch(i){case"all":e=Object(E.createElement)(Ro,this.props);break;case"wcb_speaker":case"wcb_speaker_group":e=Object(E.createElement)(P,{label:this.getModeLabel(i),icon:n,content:Object(E.createElement)(Ro,this.props),placeholderChildren:Object(E.createElement)(Uo,this.props)});break;default:e=Object(E.createElement)(Go,{className:S()("wordcamp-block-edit-placeholder","wordcamp-block-edit-placeholder-no-mode"),icon:n,label:Ei},Object(E.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(E.createElement)(Ho,{isDefault:!0,isLarge:!0,onClick:function(){o({mode:"all"})}},this.getModeLabel("all"))),Object(E.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(E.createElement)(Uo,u()({icon:n,label:$o("Choose specific speakers or groups","wordcamporg")},this.props))))}return e}}]),t}(N),Yo=wp.components,Xo=Yo.PanelBody,Ko=Yo.PanelRow,Zo=Yo.SelectControl,Jo=Yo.ToggleControl,Qo=wp.editor.InspectorControls,ei=wp.element,ti=ei.Component,ni=ei.Fragment,ri=wp.i18n.__,oi={grid_columns:{default:2,minimum:2,maximum:4},avatar_size:{default:150,minimum:25,maximum:600}},ii={align_image:{},content:{},sort:{}},ai=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.show_avatars,i=t.avatar_size,a=t.avatar_align,s=t.content,u=t.show_session,l=t.sort,c=r.schema,p=void 0===c?oi:c,d=r.options,f=void 0===d?ii:d;return Object(E.createElement)(Qo,null,Object(E.createElement)(nr,this.props),Object(E.createElement)(Xo,{title:ri("Avatar Settings","wordcamporg"),initialOpen:!0},Object(E.createElement)(Ko,null,Object(E.createElement)(Jo,{label:ri("Show avatars","wordcamporg"),checked:o,onChange:function(e){return n({show_avatars:e})}})),o&&Object(E.createElement)(ni,null,Object(E.createElement)(Ko,null,Object(E.createElement)(H,{label:ri("Size","wordcamporg"),value:Number(i),initialPosition:Number(p.avatar_size.default),onChange:function(e){return n({avatar_size:e})},rangeProps:{min:Number(p.avatar_size.minimum),max:Number(p.avatar_size.maximum)}})),Object(E.createElement)(Ko,null,Object(E.createElement)(Yn,{label:ri("Alignment","wordcamporg"),value:a,onChange:function(e){return n({avatar_align:e})},alignOptions:f.align_image})))),Object(E.createElement)(Xo,{title:ri("Content Settings","wordcamporg"),initialOpen:!1},Object(E.createElement)(Ko,null,Object(E.createElement)(Zo,{label:ri("Biography Length","wordcamporg"),value:s,options:f.content,onChange:function(e){return n({content:e})}})),Object(E.createElement)(Ko,null,Object(E.createElement)(Jo,{label:ri("Session Information","wordcamporg"),help:ri("Show speaker's session name, time, and track","wordcamporg"),checked:u,onChange:function(e){return n({show_session:e})}}))),Object(E.createElement)(Xo,{title:ri("Sorting & Filtering","wordcamporg"),initialOpen:!1},Object(E.createElement)(Ko,null,Object(E.createElement)(Zo,{label:ri("Sort by","wordcamporg"),value:l,options:f.sort,onChange:function(e){return n({sort:e})}}))))}}]),t}(ti),si=wp.components.Toolbar,ui=wp.editor.BlockControls,li=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.layout,i=r.options.layout,a=(void 0===i?{}:i).map(function(e){var t="".concat(e.value,"-view"),r=o===e.value;return{icon:t,title:e.label,isActive:r,onClick:function(){n({layout:e.value})}}});return Object(E.createElement)(ui,null,Object(E.createElement)(si,{controls:a}))}}]),t}(wp.element.Component),ci=wp.data.withSelect,pi=wp.element,di=pi.Component,fi=pi.Fragment,mi=window.WordCampBlocks.speakers||{},hi=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props.attributes.mode;return Object(E.createElement)(fi,null,Object(E.createElement)(qo,u()({icon:yi},this.props)),e&&Object(E.createElement)(fi,null,Object(E.createElement)(ai,this.props),Object(E.createElement)(li,this.props)))}}]),t}(di),gi=ci(function(e){var t=e("wordcamp").getEntities,n={wcb_speaker:t("postType","wcb_speaker",{_embed:!0}),wcb_speaker_group:t("taxonomy","wcb_speaker_group"),wcb_track:t("taxonomy","wcb_track")};return{blockData:mi,entities:n}})(hi),bi=wp.i18n.__,vi="wordcamp/speakers",Ei=bi("Speakers","wordcamporg"),yi="megaphone",wi={title:bi("Speakers","wordcamporg"),description:bi("Add a list of speakers.","wordcamporg"),icon:yi,category:"wordcamp",supports:{align:["wide","full"]},edit:gi,save:function(){return null}},Oi=wp.element.Component,Ci=wp.editor.InspectorControls,ki=wp.components,Si=ki.PanelBody,xi=ki.PanelRow,Ai=ki.ToggleControl,_i=ki.SelectControl,ji=wp.i18n.__,Fi={align_image:{},content:{},sort:{}},Di=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.show_name,i=t.show_logo,a=t.sort,s=t.content,l=r.options,c=void 0===l?Fi:l;return Object(E.createElement)(Ci,null,Object(E.createElement)(nr,this.props),Object(E.createElement)(Si,{title:ji("Content Settings","wordcamporg"),initialOpen:!0},Object(E.createElement)(xi,null,Object(E.createElement)(Ai,{label:ji("Name","wordcamporg"),help:ji("Show or hide sponsor name","wordcamporg"),checked:o,onChange:function(e){return n({show_name:e})}})),Object(E.createElement)(xi,null,Object(E.createElement)(Ai,{label:ji("Logo","wordcamporg"),help:ji("Show or hide sponsor logo","wordcamporg"),checked:i,onChange:function(e){return n({show_logo:e})}})),Object(E.createElement)(xi,null,Object(E.createElement)(_i,{label:ji("Description","wordcamporg"),value:s,options:c.content,help:ji("Length of sponsor description","wordcamporg"),onChange:function(e){return n({content:e})}})),Object(E.createElement)(xi,null,Object(E.createElement)(_i,{label:ji("Sort by","wordcamporg"),options:c.sort,value:a,onChange:function(e){return n({sort:e})}}))),Object(E.createElement)(ro,u()({title:ji("Logo size","wordcamporg"),help:ji("Specify logo width, or select a predefined size.","wordcamporg"),selectLabel:ji("Size","wordcamporg")},this.props)))}}]),t}(Oi),Ni=wp.element.Component,Pi=wp.i18n.__,Li=function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).getFilteredPosts=n.getFilteredPosts.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"getFilteredPosts",value:function(){var e=this.props,t=e.attributes,n=e.entities.wcb_sponsor,r=t.mode,o=t.item_ids,i=t.sort,a={};return Array.isArray(o)&&o.length>0&&(a.filter=[{fieldName:"wcb_sponsor"===r?"id":"wcb_sponsor_level",fieldValue:o}]),a.sort=i,Ce(n,a)}},{key:"render",value:function(){var e=this.props.attributes,t=e.show_name,n=e.show_logo,r=e.content,o=e.featured_image_width,i=this.getFilteredPosts(),a=!Array.isArray(i),s=!a&&i.length>0;return a||!s?Object(E.createElement)(ae,{loading:a}):Object(E.createElement)(ce,u()({className:"wordcamp-sponsors-block"},this.props),i.map(function(e){return Object(E.createElement)("div",{key:e.slug,className:S()("wordcamp-sponsor","wordcamp-sponsor-"+e.slug)},t&&Object(E.createElement)(se,{className:"wordcamp-sponsor-title",headingLevel:3,title:e.title.rendered.trim(),link:e.link}),n&&Object(E.createElement)(Br,{imageData:Object(w.get)(e,"_embedded.wp:featuredmedia[0]",{}),width:o,className:S()("wordcamp-sponsor-featured-image","wordcamp-sponsor-logo"),imageLink:e.link}),"none"!==r&&Object(E.createElement)(ue,{className:S()("wordcamp-sponsor-content-"+r),content:"full"===r?e.content.rendered.trim():e.excerpt.rendered.trim()}),"full"===r&&Object(E.createElement)(le,{link:e.link,linkText:Pi("Visit sponsor page","wordcamporg")}))}))}}]),t}(Ni),Mi=wp.element.Component,Ti=wp.i18n.__,Ii=function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).buildSelectOptions=n.buildSelectOptions.bind(A()(A()(n))),n.getCurrentSelectValue=n.getCurrentSelectValue.bind(A()(A()(n))),n.isLoading=n.isLoading.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"buildSelectOptions",value:function(){var e=this.props.entities,t=e.wcb_sponsor,n=e.wcb_sponsor_level,r=[{entityType:"post",type:"wcb_sponsor",label:Ti("Sponsors","wordcamporg"),items:t},{entityType:"term",type:"wcb_sponsor_level",label:Ti("Sponsors Levels","wordcamporg"),items:n}];return _n(r)}},{key:"getCurrentSelectValue",value:function(){var e=this.props.attributes,t=e.mode,n=e.item_ids,r=Object(w.flatMap)(this.buildSelectOptions(),function(e){return e.options}),o=[];return t&&n.length&&(o=r.filter(function(e){return t===e.type&&Object(w.includes)(n,e.value)})),o}},{key:"isLoading",value:function(){var e=this.props.entities;return!Object(w.every)(e,function(e){return Array.isArray(e)})}},{key:"render",value:function(){var e=this.props,t=e.label,n=e.icon,r=e.setAttributes;return Object(E.createElement)(Tn,{className:"wordcamp-sponsors-select",label:t,value:this.getCurrentSelectValue(),onChange:function(e){return r(e)},selectProps:{options:this.buildSelectOptions(),isLoading:this.isLoading(),formatOptionLabel:function(e){return Object(E.createElement)(jn,u()({icon:"wcb_sponsor_level"===e.type?n:null},e))}}})}}]),t}(Mi),Vi=wp.components,Ri=Vi.Button,Bi=Vi.Placeholder,zi=wp.i18n.__,Ui=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e,t=this.props,n=t.icon,r=t.attributes,o=t.setAttributes,i=r.mode;switch(i){case"all":e=Object(E.createElement)(Li,this.props);break;case"wcb_sponsor":case"wcb_sponsor_level":e=Object(E.createElement)(P,{label:this.getModeLabel(i),icon:n,content:Object(E.createElement)(Li,this.props),placeholderChildren:Object(E.createElement)(Ii,this.props)});break;default:e=Object(E.createElement)(Bi,{className:S()("wordcamp-block-edit-placeholder","wordcamp-block-edit-placeholder-no-mode"),icon:n,label:Ji},Object(E.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(E.createElement)(Ri,{isDefault:!0,isLarge:!0,onClick:function(){o({mode:"all"})}},this.getModeLabel("all"))),Object(E.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(E.createElement)(Ii,u()({icon:n,label:zi("Choose specific sponsors or levels","wordcamporg")},this.props))))}return e}}]),t}(N),Wi=wp.element,Hi=Wi.Component,Gi=Wi.Fragment,$i=wp.data.withSelect,qi=window.WordCampBlocks.sponsors||{},Yi=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props.attributes.mode;return Object(E.createElement)(Gi,null,Object(E.createElement)(Ui,u()({icon:Qi},this.props)),e&&Object(E.createElement)(Gi,null,Object(E.createElement)(Di,this.props),Object(E.createElement)(bo,this.props)))}}]),t}(Hi),Xi=$i(function(e){var t=e("wordcamp"),n=t.getEntities,r=t.getSiteSettings,o={wcb_sponsor:n("postType","wcb_sponsor",{_embed:!0}),wcb_sponsor_level:n("taxonomy","wcb_sponsor_level")};return{blockData:qi,entities:o,siteSettings:r()}})(Yi),Ki=wp.i18n.__,Zi="wordcamp/sponsors",Ji=Ki("Sponsors","wordcamporg"),Qi="heart",ea={title:Ki("Sponsors","wordcamporg"),description:Ki("We wouldn't have WordCamp without their support.","wordcamporg"),icon:Qi,category:"wordcamp",supports:{align:["wide","full"]},edit:Xi,save:function(){return null}},ta=wp.blocks.registerBlockType;[r,o,i,a].forEach(function(e){var t=e.name,n=e.settings;ta(t,n)})}]);
     12!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return a}),n.d(t,"a",function(){return s});var r=n(29),o=void 0!==e?e:{},i=Object(r.a)(o),a=(i.flush,i.hydrate,i.cx,i.merge,i.getRegisteredStyles,i.injectGlobal),s=(i.keyframes,i.css);i.sheet,i.caches}).call(this,n(20))},function(e,t){e.exports=ReactDOM},function(e,t,n){e.exports=n(42)()},function(e,t,n){var r=n(17),o=n(38),i=n(18);e.exports=function(e,t){return r(e)||o(e,t)||i()}},function(e,t,n){var r=n(37);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){r(e,t,n[t])})}return e}},function(e,t,n){var r=n(39),o=n(19),i=n(40);e.exports=function(e){return r(e)||o(e)||i()}},function(e,t,n){"use strict";var r=s(n(46)),o=s(n(51)),i=s(n(24)),a=s(n(21));function s(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:a.default,TransitionGroup:i.default,ReplaceTransition:o.default,CSSTransition:r.default}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(12)),o=s(n(0)),i=s(n(11)),a=n(22);n(23);function s(e){return e&&e.__esModule?e:{default:e}}var u="unmounted";t.UNMOUNTED=u;var l="exited";t.EXITED=l;var c="entering";t.ENTERING=c;var p="entered";t.ENTERED=p;t.EXITING="exiting";var d=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n.transitionGroup,a=i&&!i.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(o=l,r.appearStatus=c):o=p:o=t.unmountOnExit||t.mountOnEnter?u:l,r.state={status:o},r.nextCallback=null,r}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getChildContext=function(){return{transitionGroup:null}},t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===u?{status:l}:null},n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==c&&n!==p&&(t=c):n!==c&&n!==p||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=i.default.findDOMNode(this);t===c?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===l&&this.setState({status:u})},n.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,i=this.getTimeouts(),a=o?i.appear:i.enter;t||r?(this.props.onEnter(e,o),this.safeSetState({status:c},function(){n.props.onEntering(e,o),n.onTransitionEnd(e,a,function(){n.safeSetState({status:p},function(){n.props.onEntered(e,o)})})})):this.safeSetState({status:p},function(){n.props.onEntered(e)})},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:"exiting"},function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,function(){t.safeSetState({status:l},function(){t.props.onExited(e)})})})):this.safeSetState({status:l},function(){t.props.onExited(e)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===u)return null;var t=this.props,n=t.children,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var i=o.default.Children.only(n);return o.default.cloneElement(i,r)},t}(o.default.Component);function f(){}d.contextTypes={transitionGroup:r.object},d.childContextTypes={transitionGroup:function(){}},d.propTypes={},d.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:f,onEntering:f,onEntered:f,onExit:f,onExiting:f,onExited:f},d.UNMOUNTED=0,d.EXITED=1,d.ENTERING=2,d.ENTERED=3,d.EXITING=4;var m=(0,a.polyfill)(d);t.default=m},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var u=e.displayName||e.name,l="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+u+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==n?"\n  "+n:"")+(null!==a?"\n  "+a:"")+(null!==s?"\n  "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return a}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;!function(e){e&&e.__esModule}(n(12));t.timeoutsShape=null;t.classNamesShape=null},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(12)),o=s(n(0)),i=n(22),a=n(52);function s(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var c=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},p=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(l(l(r)));return r.state={handleExited:o,firstRender:!0},r}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},n.componentDidMount=function(){this.appeared=!0,this.mounted=!0},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?(0,a.getInitialChildMapping)(e,r):(0,a.getNextChildMapping)(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=(0,a.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=u({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),i=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?i:o.default.createElement(t,r,i)},t}(o.default.Component);p.childContextTypes={transitionGroup:r.default.object.isRequired},p.propTypes={},p.defaultProps={component:"div",childFactory:function(e){return e}};var d=(0,i.polyfill)(p);t.default=d,e.exports=t.default},function(e,t,n){e.exports=function(){"use strict";return function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,i,a,s,u,l,c,p){switch(n){case 1:if(0===c&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===l)return r+"/*|*/";break;case 3:switch(l){case 102:case 112:return e(o[0]+r),"";default:return r+(0===p?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}}()},function(e,t,n){(function(t){for(var r=n(44),o="undefined"==typeof window?t:window,i=["moz","webkit"],a="AnimationFrame",s=o["request"+a],u=o["cancel"+a]||o["cancelRequest"+a],l=0;!s&&l<i.length;l++)s=o[i[l]+"Request"+a],u=o[i[l]+"Cancel"+a]||o[i[l]+"CancelRequest"+a];if(!s||!u){var c=0,p=0,d=[];s=function(e){if(0===d.length){var t=r(),n=Math.max(0,1e3/60-(t-c));c=n+t,setTimeout(function(){var e=d.slice(0);d.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(c)}catch(e){setTimeout(function(){throw e},0)}},Math.round(n))}return d.push({handle:++p,callback:e,cancelled:!1}),p},u=function(e){for(var t=0;t<d.length;t++)d[t].handle===e&&(d[t].cancelled=!0)}}e.exports=function(e){return s.call(o,e)},e.exports.cancel=function(){u.apply(o,arguments)},e.exports.polyfill=function(e){e||(e=o),e.requestAnimationFrame=s,e.cancelAnimationFrame=u}}).call(this,n(20))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=u(i),s=u(n(12));function u(e){return e&&e.__esModule?e:{default:e}}var l={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},c=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],p=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},d=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),f=function(){return d?"_"+Math.random().toString(36).substr(2,12):void 0},m=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||f()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Component),o(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentWillReceiveProps",value:function(e){var t=e.id;t!==this.props.id&&this.setState({inputId:t||f()})}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(p(e,this.sizer),this.placeHolderSizer&&p(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return d&&e?a.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce(function(e,t){return null!==e&&void 0!==e?e:t}),t=r({},this.props.style);t.display||(t.display="inline-block");var n=r({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),o=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,a.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),a.default.createElement("input",r({},o,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}();m.propTypes={className:s.default.string,defaultValue:s.default.any,extraWidth:s.default.oneOfType([s.default.number,s.default.string]),id:s.default.string,injectStyles:s.default.bool,inputClassName:s.default.string,inputRef:s.default.func,inputStyle:s.default.object,minWidth:s.default.oneOfType([s.default.number,s.default.string]),onAutosize:s.default.func,onChange:s.default.func,placeholder:s.default.string,placeholderIsMinWidth:s.default.bool,style:s.default.object,value:s.default.any},m.defaultProps={minWidth:1,injectStyles:!0},t.default=m},function(e,t,n){var r=n(17),o=n(19),i=n(18);e.exports=function(e){return r(e)||o(e)||i()}},function(e,t,n){"use strict";var r=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}},o={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var i=function(e){for(var t,n=e.length,r=n^n,o=0;n>=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)};var a=function(e){function t(e,t,r){var o=t.trim().split(m);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<i;++s)t[s]=n(e,t[s],r).trim();break;default:var u=s=0;for(t=[];s<i;++s)for(var l=0;l<a;++l)t[u++]=n(e[l]+" ",o[s],r).trim()}return t}function n(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(h,"$1"+e.trim());case 58:return e.trim()+t.replace(h,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(h,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,n,i){var a=e+";",s=2*t+3*n+4*i;if(944===s){e=a.indexOf(":",9)+1;var u=a.substring(e,a.length-1).trim();return u=a.substring(0,e).trim()+u+";",1===j||2===j&&o(u,1)?"-webkit-"+u+u:u}if(0===j||2===j&&!o(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(S,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(u=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+u+a;case 1005:return d.test(a)?a.replace(p,":-webkit-")+a.replace(p,":-moz-")+a:a;case 1e3:switch(t=(u=a.substring(13).trim()).indexOf("-")+1,u.charCodeAt(0)+u.charCodeAt(t)){case 226:u=a.replace(E,"tb");break;case 232:u=a.replace(E,"tb-rl");break;case 220:u=a.replace(E,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+u+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(u=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|u.charCodeAt(7))){case 203:if(111>u.charCodeAt(8))break;case 115:a=a.replace(u,"-webkit-"+u)+";"+a;break;case 207:case 102:a=a.replace(u,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(u,"-webkit-"+u)+";"+a.replace(u,"-ms-"+u+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return"-webkit-"+a+"-webkit-box-"+(u=a.replace("-items",""))+"-ms-flex-"+u+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(O,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(O,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===k.test(e))return 115===(u=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,n,i).replace(":fill-available",":stretch"):a.replace(u,"-webkit-"+u)+a.replace(u,"-moz-"+u.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+i&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+a}return a}function o(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),P(2!==t?r:r.replace(C,"$1"),n,t)}function i(e,t){var n=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(w," or ($1)").substring(4):"("+t+")"}function a(e,t,n,r,o,i,a,s,l,c){for(var p,d=0,f=t;d<N;++d)switch(p=D[d].call(u,e,f,n,r,o,i,a,s,l,c)){case void 0:case!1:case!0:case null:break;default:f=p}if(f!==t)return f}function s(e){return void 0!==(e=e.prefix)&&(P=null,e?"function"!=typeof e?j=1:(j=2,P=e):j=0),s}function u(e,n){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<N){var u=a(-1,n,s,s,A,x,0,0,0,0);void 0!==u&&"string"==typeof u&&(n=u)}var p=function e(n,s,u,p,d){for(var f,m,h,E,w,O=0,C=0,k=0,S=0,D=0,P=0,M=h=f=0,I=0,T=0,V=0,R=0,B=u.length,z=B-1,U="",W="",H="",G="";I<B;){if(m=u.charCodeAt(I),I===z&&0!==C+S+k+O&&(0!==C&&(m=47===C?10:47),S=k=O=0,B++,z++),0===C+S+k+O){if(I===z&&(0<T&&(U=U.replace(c,"")),0<U.trim().length)){switch(m){case 32:case 9:case 59:case 13:case 10:break;default:U+=u.charAt(I)}m=59}switch(m){case 123:for(f=(U=U.trim()).charCodeAt(0),h=1,R=++I;I<B;){switch(m=u.charCodeAt(I)){case 123:h++;break;case 125:h--;break;case 47:switch(m=u.charCodeAt(I+1)){case 42:case 47:e:{for(M=I+1;M<z;++M)switch(u.charCodeAt(M)){case 47:if(42===m&&42===u.charCodeAt(M-1)&&I+2!==M){I=M+1;break e}break;case 10:if(47===m){I=M+1;break e}}I=M}}break;case 91:m++;case 40:m++;case 34:case 39:for(;I++<z&&u.charCodeAt(I)!==m;);}if(0===h)break;I++}switch(h=u.substring(R,I),0===f&&(f=(U=U.replace(l,"").trim()).charCodeAt(0)),f){case 64:switch(0<T&&(U=U.replace(c,"")),m=U.charCodeAt(1)){case 100:case 109:case 115:case 45:T=s;break;default:T=F}if(R=(h=e(s,T,h,m,d+1)).length,0<N&&(w=a(3,h,T=t(F,U,V),s,A,x,R,m,d,p),U=T.join(""),void 0!==w&&0===(R=(h=w.trim()).length)&&(m=0,h="")),0<R)switch(m){case 115:U=U.replace(y,i);case 100:case 109:case 45:h=U+"{"+h+"}";break;case 107:h=(U=U.replace(g,"$1 $2"))+"{"+h+"}",h=1===j||2===j&&o("@"+h,3)?"@-webkit-"+h+"@"+h:"@"+h;break;default:h=U+h,112===p&&(W+=h,h="")}else h="";break;default:h=e(s,t(s,U,V),h,p,d+1)}H+=h,h=V=T=M=f=0,U="",m=u.charCodeAt(++I);break;case 125:case 59:if(1<(R=(U=(0<T?U.replace(c,""):U).trim()).length))switch(0===M&&(f=U.charCodeAt(0),45===f||96<f&&123>f)&&(R=(U=U.replace(" ",":")).length),0<N&&void 0!==(w=a(1,U,s,n,A,x,W.length,p,d,p))&&0===(R=(U=w.trim()).length)&&(U="\0\0"),f=U.charCodeAt(0),m=U.charCodeAt(1),f){case 0:break;case 64:if(105===m||99===m){G+=U+u.charAt(I);break}default:58!==U.charCodeAt(R-1)&&(W+=r(U,f,m,U.charCodeAt(2)))}V=T=M=f=0,U="",m=u.charCodeAt(++I)}}switch(m){case 13:case 10:47===C?C=0:0===1+f&&107!==p&&0<U.length&&(T=1,U+="\0"),0<N*L&&a(0,U,s,n,A,x,W.length,p,d,p),x=1,A++;break;case 59:case 125:if(0===C+S+k+O){x++;break}default:switch(x++,E=u.charAt(I),m){case 9:case 32:if(0===S+O+C)switch(D){case 44:case 58:case 9:case 32:E="";break;default:32!==m&&(E=" ")}break;case 0:E="\\0";break;case 12:E="\\f";break;case 11:E="\\v";break;case 38:0===S+C+O&&(T=V=1,E="\f"+E);break;case 108:if(0===S+C+O+_&&0<M)switch(I-M){case 2:112===D&&58===u.charCodeAt(I-3)&&(_=D);case 8:111===P&&(_=P)}break;case 58:0===S+C+O&&(M=I);break;case 44:0===C+k+S+O&&(T=1,E+="\r");break;case 34:case 39:0===C&&(S=S===m?0:0===S?m:S);break;case 91:0===S+C+k&&O++;break;case 93:0===S+C+k&&O--;break;case 41:0===S+C+O&&k--;break;case 40:if(0===S+C+O){if(0===f)switch(2*D+3*P){case 533:break;default:f=1}k++}break;case 64:0===C+k+S+O+M+h&&(h=1);break;case 42:case 47:if(!(0<S+O+k))switch(C){case 0:switch(2*m+3*u.charCodeAt(I+1)){case 235:C=47;break;case 220:R=I,C=42}break;case 42:47===m&&42===D&&R+2!==I&&(33===u.charCodeAt(R+2)&&(W+=u.substring(R,I+1)),E="",C=0)}}0===C&&(U+=E)}P=D,D=m,I++}if(0<(R=W.length)){if(T=s,0<N&&void 0!==(w=a(2,W,T,n,A,x,R,p,d,p))&&0===(W=w).length)return G+W+H;if(W=T.join(",")+"{"+W+"}",0!=j*_){switch(2!==j||o(W,2)||(_=0),_){case 111:W=W.replace(v,":-moz-$1")+W;break;case 112:W=W.replace(b,"::-webkit-input-$1")+W.replace(b,"::-moz-$1")+W.replace(b,":-ms-input-$1")+W}_=0}}return G+W+H}(F,s,n,0,0);return 0<N&&void 0!==(u=a(-2,p,s,s,A,x,p.length,0,0,0))&&(p=u),_=0,x=A=1,p}var l=/^\0+/g,c=/[\0\r\f]/g,p=/: */g,d=/zoo|gra/,f=/([,: ])(transform)/g,m=/,\r+?/g,h=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,v=/:(read-only)/g,E=/[svh]\w+-[tblr]{2}/,y=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,O=/-self|flex-/g,C=/[^]*?(:[rp][el]a[\w-]+)[^]*/,k=/stretch|:\s*\w+\-(?:conte|avail)/,S=/([^-])(image-set\()/,x=1,A=1,_=0,j=1,F=[],D=[],N=0,P=null,L=0;return u.use=function e(t){switch(t){case void 0:case null:N=D.length=0;break;default:switch(t.constructor){case Array:for(var n=0,r=t.length;n<r;++n)e(t[n]);break;case Function:D[N++]=t;break;case Boolean:L=0|!!t}}return e},u.set=s,void 0!==e&&s(e),u},s=n(25),u=n.n(s),l=/[A-Z]|^ms/g,c=r(function(e){return e.replace(l,"-$&").toLowerCase()}),p=function(e,t){return null==t||"boolean"==typeof t?"":1===o[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:t+"px"},d=function e(t){for(var n=t.length,r=0,o="";r<n;r++){var i=t[r];if(null!=i){var a=void 0;switch(typeof i){case"boolean":break;case"function":0,a=e([i()]);break;case"object":if(Array.isArray(i))a=e(i);else for(var s in a="",i)i[s]&&s&&(a&&(a+=" "),a+=s);break;default:a=i}a&&(o&&(o+=" "),o+=a)}}return o},f="undefined"!=typeof document;function m(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}var h=function(){function e(e){this.isSpeedy=!0,this.tags=[],this.ctr=0,this.opts=e}var t=e.prototype;return t.inject=function(){if(this.injected)throw new Error("already injected!");this.tags[0]=m(this.opts),this.injected=!0},t.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},t.insert=function(e,t){if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(this.tags[this.tags.length-1]);try{n.insertRule(e,n.cssRules.length)}catch(e){0}}else{var r=m(this.opts);this.tags.push(r),r.appendChild(document.createTextNode(e+(t||"")))}this.ctr++,this.ctr%65e3==0&&this.tags.push(m(this.opts))},t.flush=function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0,this.injected=!1},e}();t.a=function(e,t){if(void 0!==e.__SECRET_EMOTION__)return e.__SECRET_EMOTION__;void 0===t&&(t={});var n,r,o=t.key||"css",s=u()(function(e){n+=e,f&&m.insert(e,b)});void 0!==t.prefix&&(r={prefix:t.prefix});var l={registered:{},inserted:{},nonce:t.nonce,key:o},m=new h(t);f&&m.inject();var g=new a(r);g.use(t.stylisPlugins)(s);var b="";function v(e,t){if(null==e)return"";switch(typeof e){case"boolean":return"";case"function":if(void 0!==e.__emotion_styles){var n=e.toString();return n}return v.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return function(e){if(w.has(e))return w.get(e);var t="";return Array.isArray(e)?e.forEach(function(e){t+=v.call(this,e,!1)},this):Object.keys(e).forEach(function(n){"object"!=typeof e[n]?void 0!==l.registered[e[n]]?t+=n+"{"+l.registered[e[n]]+"}":t+=c(n)+":"+p(n,e[n])+";":Array.isArray(e[n])&&"string"==typeof e[n][0]&&void 0===l.registered[e[n][0]]?e[n].forEach(function(e){t+=c(n)+":"+p(n,e)+";"}):t+=n+"{"+v.call(this,e[n],!1)+"}"},this),w.set(e,t),t}.call(this,e);default:var r=l.registered[e];return!1===t&&void 0!==r?r:e}}var E,y,w=new WeakMap,O=/label:\s*([^\s;\n{]+)\s*;/g,C=function(e){var t=!0,n="",r="";null==e||void 0===e.raw?(t=!1,n+=v.call(this,e,!1)):n+=e[0];for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];return a.forEach(function(r,o){n+=v.call(this,r,46===n.charCodeAt(n.length-1)),!0===t&&void 0!==e[o+1]&&(n+=e[o+1])},this),y=n,n=n.replace(O,function(e,t){return r+="-"+t,""}),E=function(e,t){return i(e+t)+t}(n,r),n};function k(e,t){void 0===l.inserted[E]&&(n="",g(e,t),l.inserted[E]=n)}var S=function(){var e=C.apply(this,arguments),t=o+"-"+E;return void 0===l.registered[t]&&(l.registered[t]=y),k("."+t,e),t};function x(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==l.registered[t]?e.push(t):n+=t+" "}),n}function A(e,t){var n=[],r=x(n,e);return n.length<2?e:r+S(n,t)}function _(e){l.inserted[e]=!0}if(f){var j=document.querySelectorAll("[data-emotion-"+o+"]");Array.prototype.forEach.call(j,function(e){m.tags[0].parentNode.insertBefore(e,m.tags[0]),e.getAttribute("data-emotion-"+o).split(" ").forEach(_)})}var F={flush:function(){f&&(m.flush(),m.inject()),l.inserted={},l.registered={}},hydrate:function(e){e.forEach(_)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return A(d(t))},merge:A,getRegisteredStyles:x,injectGlobal:function(){k("",C.apply(this,arguments))},keyframes:function(){var e=C.apply(this,arguments),t="animation-"+E;return k("","@keyframes "+t+"{"+e+"}"),t},css:S,sheet:m,caches:l};return e.__SECRET_EMOTION__=F,F}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t,n){},function(e,t,n){"use strict";var r=n(43);function o(){}e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){(function(t){(function(){var n,r,o,i,a,s;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:void 0!==t&&null!==t&&t.hrtime?(e.exports=function(){return(n()-a)/1e6},r=t.hrtime,i=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),s=1e9*t.uptime(),a=i-s):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(45))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,l=[],c=!1,p=-1;function d(){c&&u&&(c=!1,u.length?l=u.concat(l):p=-1,l.length&&f())}function f(){if(!c){var e=s(d);c=!0;for(var t=l.length;t;){for(u=l,l=[];++p<t;)u&&u[p].run();p=-1,t=l.length}u=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new m(e,t)),1!==l.length||c||s(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;!function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(12));var r=s(n(47)),o=s(n(50)),i=s(n(0)),a=s(n(21));n(23);function s(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var l=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return(0,r.default)(e,t)})},c=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return(0,o.default)(e,t)})},p=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).onEnter=function(e,n){var r=t.getClassNames(n?"appear":"enter").className;t.removeClasses(e,"exit"),l(e,r),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.getClassNames(n?"appear":"enter").activeClassName;t.reflowAndAddClass(e,r),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.getClassNames("enter").doneClassName;t.removeClasses(e,n?"appear":"enter"),l(e,r),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.getClassNames("exit").className;t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),l(e,n),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.getClassNames("exit").activeClassName;t.reflowAndAddClass(e,n),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.getClassNames("exit").doneClassName;t.removeClasses(e,"exit"),l(e,n),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var n=t.props.classNames,r="string"!=typeof n?n[e]:n+"-"+e;return{className:r,activeClassName:"string"!=typeof n?n[e+"Active"]:r+"-active",doneClassName:"string"!=typeof n?n[e+"Done"]:r+"-done"}},t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.removeClasses=function(e,t){var n=this.getClassNames(t),r=n.className,o=n.activeClassName,i=n.doneClassName;r&&c(e,r),o&&c(e,o),i&&c(e,i)},n.reflowAndAddClass=function(e,t){t&&(e&&e.scrollTop,l(e,t))},n.render=function(){var e=u({},this.props);return delete e.classNames,i.default.createElement(a.default,u({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(i.default.Component);p.propTypes={};var d=p;t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(48);t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.add(t):(0,o.default)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var o=r(n(49));e.exports=t.default},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=r(e.className,t):e.setAttribute("class",r(e.className&&e.className.baseVal||"",t))}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;a(n(12));var r=a(n(0)),o=n(11),i=a(n(24));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleEnter=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.handleLifecycle=function(e,t,n){var i,a=this.props.children,s=r.default.Children.toArray(a)[t];s.props[e]&&(i=s.props)[e].apply(i,n),this.props[e]&&this.props[e]((0,o.findDOMNode)(this))},n.render=function(){var e=this.props,t=e.children,n=e.in,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["children","in"]),a=r.default.Children.toArray(t),s=a[0],u=a[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(i.default,o,n?r.default.cloneElement(s,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(u,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},t}(r.default.Component);s.propTypes={};var u=s;t.default=u,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=i,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:a(n,"appear",e),enter:a(n,"enter",e),exit:a(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var s=o(e.children),u=i(t,s);return Object.keys(u).forEach(function(o){var i=u[o];if((0,r.isValidElement)(i)){var l=o in t,c=o in s,p=t[o],d=(0,r.isValidElement)(p)&&!p.props.in;!c||l&&!d?c||!l||d?c&&l&&(0,r.isValidElement)(p)&&(u[o]=(0,r.cloneElement)(i,{onExited:n.bind(null,i),in:p.props.in,exit:a(i,"exit",e),enter:a(i,"enter",e)})):u[o]=(0,r.cloneElement)(i,{in:!1}):u[o]=(0,r.cloneElement)(i,{onExited:n.bind(null,i),in:!0,exit:a(i,"exit",e),enter:a(i,"enter",e)})}}),u};var r=n(0);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function i(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var u in t){if(o[u])for(r=0;r<o[u].length;r++){var l=o[u][r];s[o[u][r]]=n(l)}s[u]=n(u)}for(r=0;r<i.length;r++)s[i[r]]=n(i[r]);return s}function a(e,t,n){return null!=n[t]?n[t]:e.props[t]}},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"name",function(){return _r}),n.d(r,"LABEL",function(){return jr}),n.d(r,"ICON",function(){return Fr}),n.d(r,"settings",function(){return Dr});var o={};n.r(o),n.d(o,"name",function(){return Co}),n.d(o,"LABEL",function(){return ko}),n.d(o,"ICON",function(){return So}),n.d(o,"settings",function(){return xo});var i={};n.r(i),n.d(i,"name",function(){return di}),n.d(i,"LABEL",function(){return fi}),n.d(i,"ICON",function(){return mi}),n.d(i,"settings",function(){return hi});var a={};n.r(a),n.d(a,"name",function(){return Gi}),n.d(a,"LABEL",function(){return $i}),n.d(a,"ICON",function(){return qi}),n.d(a,"settings",function(){return Yi});var s=n(9),u=n.n(s),l=n(1),c=n.n(l),p=n(2),d=n.n(p),f=n(3),m=n.n(f),h=n(4),g=n.n(h),b=n(5),v=n.n(b);var E=n(0),y=n.n(E),w=n(6);var O=n(11);var C=Object(E.createContext)();C.Provider,C.Consumer,new Set(["string","boolean","number"]),new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);var k=n(7),S=n.n(k),x=n(8),A=n.n(x),_=(n(32),wp.components.Placeholder),j=wp.element,F=j.Component,D=j.Fragment,N=function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).getModeLabel=n.getModeLabel.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"getModeLabel",value:function(e){return this.props.blockData.options.mode.find(function(t){return e===t.value}).label}}]),t}(F);function P(e){var t=e.className,n=e.label,r=e.icon,o=e.content,i=e.placeholderChildren,a=["wordcamp-block-edit-placeholder","wordcamp-block-edit-placeholder-specific-mode",t];return Object(E.createElement)(D,null,o,Object(E.createElement)(_,{className:S()(a),label:n,icon:r},i))}n(33),n(34);var L=wp.element.Component,M=wp.components,I=M.BaseControl,T=M.Button,V=M.ButtonGroup,R=M.RangeControl,B=wp.i18n,z=B.__,U=B._x,W=[{name:z("Small","wordcamporg"),shortName:U("S","size small","wordcamporg"),size:90,slug:"small"},{name:z("Regular","wordcamporg"),shortName:U("M","size medium","wordcamporg"),size:150,slug:"regular"},{name:z("Large","wordcamporg"),shortName:U("L","size large","wordcamporg"),size:300,slug:"large"},{name:z("Larger","wordcamporg"),shortName:U("XL","size extra large","wordcamporg"),size:500,slug:"larger"}],H=function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).state={value:e.value,onChange:Object(w.debounce)(e.onChange,10)},n.onChange=n.onChange.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"onChange",value:function(e){this.setState({value:e}),this.state.onChange(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.label,o=t.help,i=t.initialPosition,a=t.rangeProps,s=this.state.value;return Object(E.createElement)(I,{className:S()("wordcamp-components-avatar-size",n),label:r,help:o},Object(E.createElement)("div",{className:"wordcamp-components-avatar-size-buttons"},Object(E.createElement)(V,{"aria-label":r},W.map(function(t){var n=t.name,r=t.shortName,o=t.size,i=t.slug,a=s===o;return Object(E.createElement)(T,{key:i,isLarge:!0,isPrimary:a,"aria-label":n,"aria-pressed":a,onClick:function(){return e.onChange(Number(o))}},r||n)})),Object(E.createElement)(T,{className:"wordcamp-components-avatar-size-button-reset",isLarge:!0,isDefault:!0,onClick:function(){return e.onChange(Number(i))}},z("Reset","wordcamporg"))),Object(E.createElement)(R,u()({className:"wordcamp-components-avatar-size-range",value:s,initialPosition:i,onChange:this.onChange,beforeIcon:"format-image",afterIcon:"format-image","aria-label":r},a)))}}]),t}(L),G=wp.components.Disabled,$=wp.i18n,q=$.__,Y=$.sprintf,X=wp.url,K=X.addQueryArgs,Z=X.isURL;function J(e){var t=e.className,n=e.name,r=e.size,o=e.url,i=e.imageLink,a=function(e,t){return K(e,{s:t})},s=Object(E.createElement)("img",{className:S()("avatar","avatar-"+r,"photo"),src:a(o,r),srcSet:a(o,2*r)+" 2x",alt:n?Y(q("Avatar of %s","wordcamporg"),n):"",width:r,height:r});return Z(i)&&(s=Object(E.createElement)(G,null,Object(E.createElement)("a",{href:i,className:S()("wordcamp-image-link","wordcamp-avatar-link")},s))),s=Object(E.createElement)("div",{className:S()("wordcamp-image-container","wordcamp-avatar-container",t)},s)}n(35);var Q=wp.components,ee=Q.Disabled,te=Q.Spinner,ne=wp.element,re=ne.Fragment,oe=ne.RawHTML,ie=wp.i18n.__;function ae(e){var t=e.loading;return Object(E.createElement)("div",{className:"wordcamp-block-content-none"},t?Object(E.createElement)(te,null):ie("No content found.","wordcamporg"))}function se(e){var t=e.headingLevel,n=e.className,r=e.title,o=e.link,i="h3";[1,2,3,4,5,6].includes(t)&&(i="h"+t);var a=["wordcamp-item-title",n],s=r||ie("(Untitled)","wordcamporg");return Object(E.createElement)(i,{className:S()(a)},o&&Object(E.createElement)(ee,null,Object(E.createElement)("a",{href:o},s)),!o&&Object(E.createElement)(re,null,s))}function ue(e){var t=e.className,n=e.content,r=e.link,o=e.linkText,i=["wordcamp-item-content",t];return Object(E.createElement)("div",{className:S()(i)},Object(E.createElement)(ee,null,Object(E.createElement)(oe,{children:n}),r&&Object(E.createElement)(le,{link:r,linkText:o})))}function le(e){var t=e.className,n=e.link,r=e.linkText,o=["wordcamp-item-permalink",t];return Object(E.createElement)("p",{className:S()(o)},Object(E.createElement)("a",{href:n},r||ie("Read more","wordcamporg")))}n(36);var ce=wp.element,pe=ce.Component,de=ce.Fragment,fe=wp.components,me=fe.PanelBody,he=(fe.PanelRow,fe.RangeControl),ge=wp.i18n.__;function be(e){var t=e.grid_columns,n=e.schema,r=e.setAttributes,o=n.default,i=void 0===o?2:o,a=n.maximum,s=void 0===a?4:a,u=n.minimum,l=void 0===u?4:u;return Object(E.createElement)(he,{label:ge("Grid Columns","wordcamporg"),value:Number(t),min:l,max:s,initialPosition:i,onChange:function(e){return r({grid_columns:e})}})}var ve=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.layout,i=t.grid_columns,a=r.schema;return Object(E.createElement)(de,null,"grid"===o&&Object(E.createElement)(me,{title:ge("Grid Layout","wordcamporg"),initialOpen:!0},Object(E.createElement)(be,{grid_columns:i,schema:a.grid_columns||{},setAttributes:n})))}}]),t}(pe),Ee=wp.components.Toolbar,ye=wp.editor.BlockControls;function we(e){var t=e.layout,n=e.options,r=e.setAttributes,o=n.map(function(e){var n="".concat(e.value,"-view"),o=t===e.value;return{icon:n,title:e.label,isActive:o,onClick:function(){r({layout:e.value})}}});return Object(E.createElement)(ye,null,Object(E.createElement)(Ee,{controls:o}))}var Oe=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.className,r=e.children,o=void 0===r?[]:r,i=t.align,a=t.grid_columns,s=t.layout,u=["wordcamp-block","wordcamp-post-list","layout-"+s,n];return"grid"===s&&u.push("grid-columns-"+Number(a)),i&&u.push("align"+i),Object(E.createElement)("ul",{className:S()(u)},o.map(function(e){return Object(E.createElement)("li",{key:e.key,className:S()("wordcamp-post-list-item","wordcamp-clearfix")},e)}))}}]),t}(wp.element.Component),Ce=n(14),ke=n.n(Ce),Se=n(13),xe=n.n(Se),Ae=n(15),_e=n.n(Ae),je=wp.data,Fe=je.registerStore,De=je.select,Ne=je.dispatch,Pe=wp.apiFetch,Le={},Me=function(e,t){var n=Array.isArray;if(!n(e))return e;var r=_e()(e);if(t.hasOwnProperty("filter")&&n(t.filter)&&t.filter.forEach(function(e){var t=e.fieldName,o=e.fieldValue;n(o)||(o=[o]),r=r.filter(function(e){if(!e.hasOwnProperty(t))return!1;var r=n(e[t])?e[t]:[e[t]];return Object(w.intersection)(o,r).length>0})}),t.hasOwnProperty("sort")){var o=Object(w.split)(t.sort,"_",2),i=xe()(o,2),a=i[0],s=i[1];"title"===a&&r.length&&r[0].title.hasOwnProperty("rendered")&&(a="title.rendered"),r=Object(w.orderBy)(r,[a],[s])}return r};Fe("wordcamp",{selectors:{getEntities:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=ke()({},{per_page:-1},r);return De("core").getEntityRecords(t,n,o)},getSiteSettings:function(e){return e.hasOwnProperty("siteSettings")?e.siteSettings:(Ne("wordcamp").fetchSiteSettings(),null)}},actions:{fetchSiteSettings:function(){return{type:"FETCH_SETTINGS"}},setSiteSettings:function(e){return{type:"SET_SETTINGS",settings:e}}},reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Le,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_SETTINGS":if(e.loadingSettings)break;Pe({path:"/wp/v2/settings"}).then(function(e){Ne("wordcamp").setSiteSettings(e)}),e.loadingSettings=!0;break;case"SET_SETTINGS":e.siteSettings=t.settings,e.loadingSettings=!1}return e}});var Ie=function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).getFilteredPosts=n.getFilteredPosts.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"getFilteredPosts",value:function(){var e=this.props,t=e.attributes,n=e.entities.wcb_organizer,r=t.mode,o=t.item_ids,i=t.sort,a={};return Array.isArray(o)&&o.length>0&&(a.filter=[{fieldName:"wcb_organizer"===r?"id":"organizer_team",fieldValue:o}]),a.sort=i,Me(n,a)}},{key:"render",value:function(){var e=this.props.attributes,t=e.show_avatars,n=e.avatar_size,r=e.avatar_align,o=e.content,i=this.getFilteredPosts(),a=!Array.isArray(i),s=!a&&i.length>0;return a||!s?Object(E.createElement)(ae,{loading:a}):Object(E.createElement)(Oe,u()({},this.props,{className:"wordcamp-organizers-block"}),i.map(function(e){return Object(E.createElement)("div",{key:e.slug,className:S()("wordcamp-organizer","wordcamp-organizer-"+e.slug.trim())},Object(E.createElement)(se,{className:"wordcamp-organizer-title",headingLevel:3,title:e.title.rendered.trim()}),t&&Object(E.createElement)(J,{className:S()("align-"+r),name:e.title.rendered.trim()||"",size:n,url:e.avatar_urls[24]}),"none"!==o&&Object(E.createElement)(ue,{className:S()("wordcamp-organizer-content-"+o),content:"full"===o?e.content.rendered.trim():e.excerpt.rendered.trim()}))}))}}]),t}(wp.element.Component),Te=function(e,t){return e.length===t.length&&e.every(function(e,n){return function(e,t){return e===t}(e,t[n])})};var Ve=function(e,t){var n;void 0===t&&(t=Te);var r,o=[],i=!1;return function(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];return i&&n===this&&t(s,o)?r:(r=e.apply(this,s),i=!0,n=this,o=s,r)}},Re=n(10),Be=n(12),ze=n.n(Be),Ue=n(26),We=n.n(Ue),He=n(27),Ge=n.n(He),$e=n(16);function qe(e){return(qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ke(e,t,n){return t&&Xe(e.prototype,t),n&&Xe(e,n),e}function Ze(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Je(){return(Je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Ze(e,t,n[t])})}return e}function et(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nt(e,t)}function tt(e){return(tt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nt(e,t){return(nt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rt(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ot(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function it(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?ot(e):t}function at(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var st=function(){};function ut(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}var lt=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===qe(e)&&null!==e?[e]:[]};function ct(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function pt(e){return ct(e)?window.pageYOffset:e.scrollTop}function dt(e,t){ct(e)?window.scrollTo(0,t):e.scrollTop=t}function ft(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:st,o=pt(e),i=t-o,a=10,s=0;!function t(){var u=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(s+=a,o,i,n);dt(e,u),s<n?We()(t):r(e)}()}function mt(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function ht(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.theme.spacing,u=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/,o=document.documentElement;if("fixed"===t.position)return o;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return o}(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var c=u.getBoundingClientRect().height,p=n.getBoundingClientRect(),d=p.bottom,f=p.height,m=p.top,h=n.offsetParent.getBoundingClientRect().top,g=window.innerHeight,b=pt(u),v=parseInt(getComputedStyle(n).marginBottom,10),E=parseInt(getComputedStyle(n).marginTop,10),y=h-E,w=g-m,O=y+b,C=c-b-m,k=d-g+b+v,S=b+m-E;switch(o){case"auto":case"bottom":if(w>=f)return{placement:"bottom",maxHeight:t};if(C>=f&&!a)return i&&ft(u,k,160),{placement:"bottom",maxHeight:t};if(!a&&C>=r||a&&w>=r)return i&&ft(u,k,160),{placement:"bottom",maxHeight:a?w-v:C-v};if("auto"===o||a){var x=t,A=a?y:O;return A>=r&&(x=Math.min(A-v-s.controlHeight,t)),{placement:"top",maxHeight:x}}if("bottom"===o)return dt(u,k),{placement:"bottom",maxHeight:t};break;case"top":if(y>=f)return{placement:"top",maxHeight:t};if(O>=f&&!a)return i&&ft(u,S,160),{placement:"top",maxHeight:t};if(!a&&O>=r||a&&y>=r){var _=t;return(!a&&O>=r||a&&y>=r)&&(_=a?y-E:O-E),i&&ft(u,S,160),{placement:"top",maxHeight:_}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}var gt=function(e){return"auto"===e?"bottom":e},bt=function(e){function t(){var e,n;Ye(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Ze(ot(ot(n=it(this,(e=tt(t)).call.apply(e,[this].concat(o))))),"state",{maxHeight:n.props.maxMenuHeight,placement:null}),Ze(ot(ot(n)),"getPlacement",function(e){var t=n.props,r=t.minMenuHeight,o=t.maxMenuHeight,i=t.menuPlacement,a=t.menuPosition,s=t.menuShouldScrollIntoView,u=t.theme,l=n.context.getPortalPlacement;if(e){var c="fixed"===a,p=ht({maxHeight:o,menuEl:e,minHeight:r,placement:i,shouldScroll:s&&!c,isFixedPosition:c,theme:u});l&&l(p),n.setState(p)}}),Ze(ot(ot(n)),"getUpdatedProps",function(){var e=n.props.menuPlacement,t=n.state.placement||gt(e);return Qe({},n.props,{placement:t,maxHeight:n.state.maxHeight})}),n}return et(t,E["Component"]),Ke(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}();Ze(bt,"contextTypes",{getPortalPlacement:ze.a.func});var vt=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},Et=vt,yt=vt,wt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return y.a.createElement("div",Je({className:r(Object(Re.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},i),t)};wt.defaultProps={children:"No options"};var Ot=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return y.a.createElement("div",Je({className:r(Object(Re.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},i),t)};Ot.defaultProps={children:"Loading..."};var Ct=function(e){function t(){var e,n;Ye(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Ze(ot(ot(n=it(this,(e=tt(t)).call.apply(e,[this].concat(o))))),"state",{placement:null}),Ze(ot(ot(n)),"getPortalPlacement",function(e){var t=e.placement;t!==gt(n.props.menuPlacement)&&n.setState({placement:t})}),n}return et(t,E["Component"]),Ke(t,[{key:"getChildContext",value:function(){return{getPortalPlacement:this.getPortalPlacement}}},{key:"render",value:function(){var e=this.props,t=e.appendTo,n=e.children,r=e.controlElement,o=e.menuPlacement,i=e.menuPosition,a=e.getStyles,s="fixed"===i;if(!t&&!s||!r)return null;var u=this.state.placement||gt(o),l=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),c=s?0:window.pageYOffset,p={offset:l[u]+c,position:i,rect:l},d=y.a.createElement("div",{className:Object(Re.a)(a("menuPortal",p))},n);return t?Object(O.createPortal)(d,t):d}}]),t}();Ze(Ct,"childContextTypes",{getPortalPlacement:ze.a.func});var kt=Array.isArray,St=Object.keys,xt=Object.prototype.hasOwnProperty;function At(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==qe(t)&&"object"==qe(n)){var r,o,i,a=kt(t),s=kt(n);if(a&&s){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(a!=s)return!1;var u=t instanceof Date,l=n instanceof Date;if(u!=l)return!1;if(u&&l)return t.getTime()==n.getTime();var c=t instanceof RegExp,p=n instanceof RegExp;if(c!=p)return!1;if(c&&p)return t.toString()==n.toString();var d=St(t);if((o=d.length)!==St(n).length)return!1;for(r=o;0!=r--;)if(!xt.call(n,d[r]))return!1;for(r=o;0!=r--;)if(!("_owner"===(i=d[r])&&t.$$typeof||e(t[i],n[i])))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i))return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}var _t=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],jt=function(e){for(var t=0;t<_t.length;t++)e=e.replace(_t[t].letters,_t[t].base);return e},Ft=function(e){return e.replace(/^\s+|\s+$/g,"")},Dt=function(e){return"".concat(e.label," ").concat(e.value)},Nt=function(e){return y.a.createElement("span",Je({className:Object(Re.a)({zIndex:9999,border:0,clip:"rect(1px, 1px, 1px, 1px)",height:1,width:1,position:"absolute",overflow:"hidden",padding:0,whiteSpace:"nowrap",backgroundColor:"red",color:"blue"})},e))},Pt=function(e){function t(){return Ye(this,t),it(this,tt(t).apply(this,arguments))}return et(t,E["Component"]),Ke(t,[{key:"render",value:function(){var e=this.props,t=(e.in,e.out,e.onExited,e.appear,e.enter,e.exit,e.innerRef),n=(e.emotion,rt(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return y.a.createElement("input",Je({ref:t},n,{className:Object(Re.a)({background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"})}))}}]),t}(),Lt=function(e){function t(){return Ye(this,t),it(this,tt(t).apply(this,arguments))}return et(t,E["Component"]),Ke(t,[{key:"componentDidMount",value:function(){this.props.innerRef(Object(O.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),t}(),Mt=["boxSizing","height","overflow","paddingRight","position"],It={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Tt(e){e.preventDefault()}function Vt(e){e.stopPropagation()}function Rt(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Bt(){return"ontouchstart"in window||navigator.maxTouchPoints}var zt=!("undefined"==typeof window||!window.document||!window.document.createElement),Ut=0,Wt=function(e){function t(){var e,n;Ye(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Ze(ot(ot(n=it(this,(e=tt(t)).call.apply(e,[this].concat(o))))),"originalStyles",{}),Ze(ot(ot(n)),"listenerOptions",{capture:!1,passive:!1}),n}return et(t,E["Component"]),Ke(t,[{key:"componentDidMount",value:function(){var e=this;if(zt){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,o=document.body,i=o&&o.style;if(n&&Mt.forEach(function(t){var n=i&&i[t];e.originalStyles[t]=n}),n&&Ut<1){var a=parseInt(this.originalStyles.paddingRight,10)||0,s=document.body?document.body.clientWidth:0,u=window.innerWidth-s+a||0;Object.keys(It).forEach(function(e){var t=It[e];i&&(i[e]=t)}),i&&(i.paddingRight="".concat(u,"px"))}o&&Bt()&&(o.addEventListener("touchmove",Tt,this.listenerOptions),r&&(r.addEventListener("touchstart",Rt,this.listenerOptions),r.addEventListener("touchmove",Vt,this.listenerOptions))),Ut+=1}}},{key:"componentWillUnmount",value:function(){var e=this;if(zt){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,o=document.body,i=o&&o.style;Ut=Math.max(Ut-1,0),n&&Ut<1&&Mt.forEach(function(t){var n=e.originalStyles[t];i&&(i[t]=n)}),o&&Bt()&&(o.removeEventListener("touchmove",Tt,this.listenerOptions),r&&(r.removeEventListener("touchstart",Rt,this.listenerOptions),r.removeEventListener("touchmove",Vt,this.listenerOptions)))}}},{key:"render",value:function(){return null}}]),t}();Ze(Wt,"defaultProps",{accountForScrollbars:!0});var Ht=function(e){function t(){var e,n;Ye(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Ze(ot(ot(n=it(this,(e=tt(t)).call.apply(e,[this].concat(o))))),"state",{touchScrollTarget:null}),Ze(ot(ot(n)),"getScrollTarget",function(e){e!==n.state.touchScrollTarget&&n.setState({touchScrollTarget:e})}),Ze(ot(ot(n)),"blurSelectInput",function(){document.activeElement&&document.activeElement.blur()}),n}return et(t,E["PureComponent"]),Ke(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.isEnabled,r=this.state.touchScrollTarget;return n?y.a.createElement("div",null,y.a.createElement("div",{onClick:this.blurSelectInput,className:Object(Re.a)({position:"fixed",left:0,bottom:0,right:0,top:0})}),y.a.createElement(Lt,{innerRef:this.getScrollTarget},t),r?y.a.createElement(Wt,{touchScrollTarget:r}):null):t}}]),t}(),Gt=function(e){function t(){var e,n;Ye(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Ze(ot(ot(n=it(this,(e=tt(t)).call.apply(e,[this].concat(o))))),"isBottom",!1),Ze(ot(ot(n)),"isTop",!1),Ze(ot(ot(n)),"scrollTarget",void 0),Ze(ot(ot(n)),"touchStart",void 0),Ze(ot(ot(n)),"cancelScroll",function(e){e.preventDefault(),e.stopPropagation()}),Ze(ot(ot(n)),"handleEventDelta",function(e,t){var r=n.props,o=r.onBottomArrive,i=r.onBottomLeave,a=r.onTopArrive,s=r.onTopLeave,u=n.scrollTarget,l=u.scrollTop,c=u.scrollHeight,p=u.clientHeight,d=n.scrollTarget,f=t>0,m=c-p-l,h=!1;m>t&&n.isBottom&&(i&&i(e),n.isBottom=!1),f&&n.isTop&&(s&&s(e),n.isTop=!1),f&&t>m?(o&&!n.isBottom&&o(e),d.scrollTop=c,h=!0,n.isBottom=!0):!f&&-t>l&&(a&&!n.isTop&&a(e),d.scrollTop=0,h=!0,n.isTop=!0),h&&n.cancelScroll(e)}),Ze(ot(ot(n)),"onWheel",function(e){n.handleEventDelta(e,e.deltaY)}),Ze(ot(ot(n)),"onTouchStart",function(e){n.touchStart=e.changedTouches[0].clientY}),Ze(ot(ot(n)),"onTouchMove",function(e){var t=n.touchStart-e.changedTouches[0].clientY;n.handleEventDelta(e,t)}),Ze(ot(ot(n)),"getScrollTarget",function(e){n.scrollTarget=e}),n}return et(t,E["Component"]),Ke(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e&&(e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1)))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return y.a.createElement(Lt,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(),$t=function(e){function t(){return Ye(this,t),it(this,tt(t).apply(this,arguments))}return et(t,E["Component"]),Ke(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=rt(e,["isEnabled"]);return t?y.a.createElement(Gt,n):this.props.children}}]),t}();Ze($t,"defaultProps",{isEnabled:!0});var qt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label,i=t.isDisabled;switch(e){case"menu":return"Use Up and Down to choose options".concat(i?"":", press Enter to select the currently focused option",", press Escape to exit the menu, press Tab to select the option and exit the menu.");case"input":return"".concat(o||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},Yt=function(e,t){var n=t.value,r=t.isDisabled;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"select-option":return"option ".concat(n,r?" is disabled. Select another option.":", selected.")}},Xt=function(e){return!!e.isDisabled},Kt=function(e){function t(){return Ye(this,t),it(this,tt(t).apply(this,arguments))}return et(t,E["Component"]),Ke(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,i=e.getStyles,a=e.hasValue;return y.a.createElement("div",{className:r(Object(Re.a)(i("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":a},n)},t)}}]),t}(),Zt=function(e){var t=e.size,n=rt(e,["size"]);return y.a.createElement("svg",Je({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(Re.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},Jt=function(e){return y.a.createElement(Zt,Je({size:20},e),y.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Qt=function(e){return y.a.createElement(Zt,Je({size:20},e),y.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},en=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},tn=en,nn=en,rn=!1,on=function(e){var t=e.color,n=e.delay,r=e.offset;return y.a.createElement("span",{className:Object(Re.a)({animationDuration:"1s",animationDelay:"".concat(n,"ms"),animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})},an=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,i=e.isFocused,a=e.isRtl,s=e.theme.colors,u=i?s.neutral80:s.neutral20;return rn||(Object(Re.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};"),rn=!0),y.a.createElement("div",Je({},o,{className:n(Object(Re.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),y.a.createElement(on,{color:u,delay:0,offset:a}),y.a.createElement(on,{color:u,delay:160,offset:!0}),y.a.createElement(on,{color:u,delay:320,offset:!a}))};an.defaultProps={size:4};var sn=function(e){var t=e.children,n=e.innerProps;return y.a.createElement("div",n,t)},un=sn,ln=sn,cn=function(e){function t(){return Ye(this,t),it(this,tt(t).apply(this,arguments))}return et(t,E["Component"]),Ke(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return y.a.createElement("div",n,t||y.a.createElement(Jt,{size:14}))}}]),t}(),pn=function(e){function t(){return Ye(this,t),it(this,tt(t).apply(this,arguments))}return et(t,E["Component"]),Ke(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,i=e.data,a=e.getStyles,s=e.innerProps,u=e.isDisabled,l=e.removeProps,c=e.selectProps,p=r.Container,d=r.Label,f=r.Remove,m=Qe({className:o(Object(Re.a)(a("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":u},n)},s),h={className:o(Object(Re.a)(a("multiValueLabel",this.props)),{"multi-value__label":!0},n)},g=Qe({className:o(Object(Re.a)(a("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},l);return y.a.createElement(p,{data:i,innerProps:m,selectProps:c},y.a.createElement(d,{data:i,innerProps:h,selectProps:c},t),y.a.createElement(f,{data:i,innerProps:g,selectProps:c}))}}]),t}();Ze(pn,"defaultProps",{cropWithEllipsis:!0});var dn={ClearIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return y.a.createElement("div",Je({},i,{className:r(Object(Re.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t||y.a.createElement(Jt,null))},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,i=e.isDisabled,a=e.isFocused,s=e.innerRef,u=e.innerProps,l=e.menuIsOpen;return y.a.createElement("div",Je({ref:s,className:n(Object(Re.a)(r("control",e)),{control:!0,"control--is-disabled":i,"control--is-focused":a,"control--menu-is-open":l},o)},u),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return y.a.createElement("div",Je({},i,{className:r(Object(Re.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t||y.a.createElement(Qt,null))},DownChevron:Qt,CrossIcon:Jt,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.Heading,a=e.headingProps,s=e.label,u=e.theme,l=e.selectProps;return y.a.createElement("div",{className:r(Object(Re.a)(o("group",e)),{group:!0},n)},y.a.createElement(i,Je({},a,{selectProps:l,theme:u,getStyles:o,cx:r}),s),y.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,i=(e.selectProps,rt(e,["className","cx","getStyles","theme","selectProps"]));return y.a.createElement("div",Je({className:n(Object(Re.a)(r("groupHeading",Qe({theme:o},i))),{"group-heading":!0},t)},i))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return y.a.createElement("div",{className:r(Object(Re.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return y.a.createElement("span",Je({},o,{className:n(Object(Re.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,i=e.isHidden,a=e.isDisabled,s=e.theme,u=(e.selectProps,rt(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return y.a.createElement("div",{className:Object(Re.a)(r("input",Qe({theme:s},u)))},y.a.createElement(Ge.a,Je({className:n(null,{input:!0},t),inputRef:o,inputStyle:function(e){return{background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}}(i),disabled:a},u)))},LoadingIndicator:an,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerRef,a=e.innerProps,s=r(Object(Re.a)(o("menu",e)),{menu:!0},n);return y.a.createElement("div",Je({className:s},a,{ref:i}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isMulti,a=e.innerRef;return y.a.createElement("div",{className:r(Object(Re.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":i},n),ref:a},t)},MenuPortal:Ct,LoadingMessage:Ot,NoOptionsMessage:wt,MultiValue:pn,MultiValueContainer:un,MultiValueLabel:ln,MultiValueRemove:cn,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.isFocused,s=e.isSelected,u=e.innerRef,l=e.innerProps;return y.a.createElement("div",Je({ref:u,className:r(Object(Re.a)(o("option",e)),{option:!0,"option--is-disabled":i,"option--is-focused":a,"option--is-selected":s},n)},l),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return y.a.createElement("div",Je({className:r(Object(Re.a)(o("placeholder",e)),{placeholder:!0},n)},i),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.innerProps,a=e.isDisabled,s=e.isRtl;return y.a.createElement("div",Je({className:r(Object(Re.a)(o("container",e)),{"--is-disabled":a,"--is-rtl":s},n)},i),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,i=e.isDisabled,a=e.innerProps;return y.a.createElement("div",Je({className:r(Object(Re.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":i},n)},a),t)},ValueContainer:Kt},fn=function(e){return Qe({},dn,e.components)},mn={clearIndicator:nn,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,i=r.borderRadius,a=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:tn,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,i=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*i,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:yt,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,i=r.spacing,a=r.colors;return Ze(t={},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),Ze(t,"backgroundColor",a.neutral0),Ze(t,"borderRadius",o),Ze(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Ze(t,"marginBottom",i.menuGutter),Ze(t,"marginTop",i.menuGutter),Ze(t,"position","absolute"),Ze(t,"width","100%"),Ze(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:Et,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,i=o.spacing,a=o.colors;return{backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?a.primary:a.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};var hn={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},gn={backspaceRemovesValue:!0,blurInputOnSelect:mt(),captureMenuScroll:!mt(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e){return function(t,n){var r=Qe({ignoreCase:!0,ignoreAccents:!0,stringify:Dt,trim:!0,matchFrom:"any"},e),o=r.ignoreCase,i=r.ignoreAccents,a=r.stringify,s=r.trim,u=r.matchFrom,l=s?Ft(n):n,c=s?Ft(a(t)):a(t);return o&&(l=l.toLowerCase(),c=c.toLowerCase()),i&&(l=jt(l),c=jt(c)),"start"===u?c.substr(0,l.length)===l:c.indexOf(l)>-1}}(),formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:Xt,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},bn=1,vn=function(e){function t(e){var n;Ye(this,t),Ze(ot(ot(n=it(this,tt(t).call(this,e)))),"state",{ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]}),Ze(ot(ot(n)),"blockOptionHover",!1),Ze(ot(ot(n)),"clearFocusValueOnUpdate",!1),Ze(ot(ot(n)),"commonProps",void 0),Ze(ot(ot(n)),"components",void 0),Ze(ot(ot(n)),"hasGroups",!1),Ze(ot(ot(n)),"initialTouchX",0),Ze(ot(ot(n)),"initialTouchY",0),Ze(ot(ot(n)),"inputIsHiddenAfterUpdate",void 0),Ze(ot(ot(n)),"instancePrefix",""),Ze(ot(ot(n)),"openAfterFocus",!1),Ze(ot(ot(n)),"scrollToFocusedOptionOnUpdate",!1),Ze(ot(ot(n)),"userIsDragging",void 0),Ze(ot(ot(n)),"controlRef",null),Ze(ot(ot(n)),"getControlRef",function(e){n.controlRef=e}),Ze(ot(ot(n)),"focusedOptionRef",null),Ze(ot(ot(n)),"getFocusedOptionRef",function(e){n.focusedOptionRef=e}),Ze(ot(ot(n)),"menuListRef",null),Ze(ot(ot(n)),"getMenuListRef",function(e){n.menuListRef=e}),Ze(ot(ot(n)),"inputRef",null),Ze(ot(ot(n)),"getInputRef",function(e){n.inputRef=e}),Ze(ot(ot(n)),"cacheComponents",function(e){n.components=fn({components:e})}),Ze(ot(ot(n)),"focus",n.focusInput),Ze(ot(ot(n)),"blur",n.blurInput),Ze(ot(ot(n)),"onChange",function(e,t){var r=n.props;(0,r.onChange)(e,Qe({},t,{name:r.name}))}),Ze(ot(ot(n)),"setValue",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments.length>2?arguments[2]:void 0,o=n.props,i=o.closeMenuOnSelect,a=o.isMulti;n.onInputChange("",{action:"set-value"}),i&&(n.inputIsHiddenAfterUpdate=!a,n.onMenuClose()),n.clearFocusValueOnUpdate=!0,n.onChange(e,{action:t,option:r})}),Ze(ot(ot(n)),"selectOption",function(e){var t=n.props,r=t.blurInputOnSelect,o=t.isMulti,i=n.state.selectValue;if(o)if(n.isOptionSelected(e,i)){var a=n.getOptionValue(e);n.setValue(i.filter(function(e){return n.getOptionValue(e)!==a}),"deselect-option",e),n.announceAriaLiveSelection({event:"deselect-option",context:{value:n.getOptionLabel(e)}})}else n.isOptionDisabled(e,i)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue([].concat(at(i),[e]),"select-option",e),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));else n.isOptionDisabled(e,i)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue(e,"select-option"),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));r&&n.blurInput()}),Ze(ot(ot(n)),"removeValue",function(e){var t=n.state.selectValue,r=n.getOptionValue(e);n.onChange(t.filter(function(e){return n.getOptionValue(e)!==r}),{action:"remove-value",removedValue:e}),n.announceAriaLiveSelection({event:"remove-value",context:{value:e?n.getOptionLabel(e):""}}),n.focusInput()}),Ze(ot(ot(n)),"clearValue",function(){var e=n.props.isMulti;n.onChange(e?[]:null,{action:"clear"})}),Ze(ot(ot(n)),"popValue",function(){var e=n.state.selectValue,t=e[e.length-1];n.announceAriaLiveSelection({event:"pop-value",context:{value:t?n.getOptionLabel(t):""}}),n.onChange(e.slice(0,e.length-1),{action:"pop-value",removedValue:t})}),Ze(ot(ot(n)),"getOptionLabel",function(e){return n.props.getOptionLabel(e)}),Ze(ot(ot(n)),"getOptionValue",function(e){return n.props.getOptionValue(e)}),Ze(ot(ot(n)),"getStyles",function(e,t){var r=mn[e](t);r.boxSizing="border-box";var o=n.props.styles[e];return o?o(r,t):r}),Ze(ot(ot(n)),"getElementId",function(e){return"".concat(n.instancePrefix,"-").concat(e)}),Ze(ot(ot(n)),"getActiveDescendentId",function(){var e=n.props.menuIsOpen,t=n.state,r=t.menuOptions,o=t.focusedOption;if(o&&e){var i=r.focusable.indexOf(o),a=r.render[i];return a&&a.key}}),Ze(ot(ot(n)),"announceAriaLiveSelection",function(e){var t=e.event,r=e.context;n.setState({ariaLiveSelection:Yt(t,r)})}),Ze(ot(ot(n)),"announceAriaLiveContext",function(e){var t=e.event,r=e.context;n.setState({ariaLiveContext:qt(t,Qe({},r,{label:n.props["aria-label"]}))})}),Ze(ot(ot(n)),"onMenuMouseDown",function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),n.focusInput())}),Ze(ot(ot(n)),"onMenuMouseMove",function(e){n.blockOptionHover=!1}),Ze(ot(ot(n)),"onControlMouseDown",function(e){var t=n.props.openMenuOnClick;n.state.isFocused?n.props.menuIsOpen?"INPUT"!==e.target.tagName&&n.onMenuClose():t&&n.openMenu("first"):(t&&(n.openAfterFocus=!0),n.focusInput()),"INPUT"!==e.target.tagName&&e.preventDefault()}),Ze(ot(ot(n)),"onDropdownIndicatorMouseDown",function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||n.props.isDisabled)){var t=n.props,r=t.isMulti,o=t.menuIsOpen;n.focusInput(),o?(n.inputIsHiddenAfterUpdate=!r,n.onMenuClose()):n.openMenu("first"),e.preventDefault(),e.stopPropagation()}}),Ze(ot(ot(n)),"onClearIndicatorMouseDown",function(e){e&&"mousedown"===e.type&&0!==e.button||(n.clearValue(),e.stopPropagation(),n.openAfterFocus=!1,setTimeout(function(){return n.focusInput()}))}),Ze(ot(ot(n)),"onScroll",function(e){"boolean"==typeof n.props.closeMenuOnScroll?e.target instanceof HTMLElement&&ct(e.target)&&n.props.onMenuClose():"function"==typeof n.props.closeMenuOnScroll&&n.props.closeMenuOnScroll(e)&&n.props.onMenuClose()}),Ze(ot(ot(n)),"onCompositionStart",function(){n.setState({isComposing:!0})}),Ze(ot(ot(n)),"onCompositionEnd",function(){n.setState({isComposing:!1})}),Ze(ot(ot(n)),"onTouchStart",function(e){var t=e.touches.item(0);t&&(n.initialTouchX=t.clientX,n.initialTouchY=t.clientY,n.userIsDragging=!1)}),Ze(ot(ot(n)),"onTouchMove",function(e){var t=e.touches.item(0);if(t){var r=Math.abs(t.clientX-n.initialTouchX),o=Math.abs(t.clientY-n.initialTouchY);n.userIsDragging=r>5||o>5}}),Ze(ot(ot(n)),"onTouchEnd",function(e){n.userIsDragging||(n.controlRef&&!n.controlRef.contains(e.target)&&n.menuListRef&&!n.menuListRef.contains(e.target)&&n.blurInput(),n.initialTouchX=0,n.initialTouchY=0)}),Ze(ot(ot(n)),"onControlTouchEnd",function(e){n.userIsDragging||n.onControlMouseDown(e)}),Ze(ot(ot(n)),"onClearIndicatorTouchEnd",function(e){n.userIsDragging||n.onClearIndicatorMouseDown(e)}),Ze(ot(ot(n)),"onDropdownIndicatorTouchEnd",function(e){n.userIsDragging||n.onDropdownIndicatorMouseDown(e)}),Ze(ot(ot(n)),"handleInputChange",function(e){var t=e.currentTarget.value;n.inputIsHiddenAfterUpdate=!1,n.onInputChange(t,{action:"input-change"}),n.onMenuOpen()}),Ze(ot(ot(n)),"onInputFocus",function(e){var t=n.props,r=t.isSearchable,o=t.isMulti;n.props.onFocus&&n.props.onFocus(e),n.inputIsHiddenAfterUpdate=!1,n.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),n.setState({isFocused:!0}),(n.openAfterFocus||n.props.openMenuOnFocus)&&n.openMenu("first"),n.openAfterFocus=!1}),Ze(ot(ot(n)),"onInputBlur",function(e){n.menuListRef&&n.menuListRef.contains(document.activeElement)?n.inputRef.focus():(n.props.onBlur&&n.props.onBlur(e),n.onInputChange("",{action:"input-blur"}),n.onMenuClose(),n.setState({focusedValue:null,isFocused:!1}))}),Ze(ot(ot(n)),"onOptionHover",function(e){n.blockOptionHover||n.state.focusedOption===e||n.setState({focusedOption:e})}),Ze(ot(ot(n)),"shouldHideSelectedOptions",function(){var e=n.props,t=e.hideSelectedOptions,r=e.isMulti;return void 0===t?r:t}),Ze(ot(ot(n)),"onKeyDown",function(e){var t=n.props,r=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,u=t.isDisabled,l=t.menuIsOpen,c=t.onKeyDown,p=t.tabSelectsValue,d=t.openMenuOnFocus,f=n.state,m=f.isComposing,h=f.focusedOption,g=f.focusedValue,b=f.selectValue;if(!(u||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(n.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||a)return;n.focusValue("previous");break;case"ArrowRight":if(!r||a)return;n.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(g)n.removeValue(g);else{if(!o)return;r?n.popValue():s&&n.clearValue()}break;case"Tab":if(m)return;if(e.shiftKey||!l||!p||!h||d&&n.isOptionSelected(h,b))return;n.selectOption(h);break;case"Enter":if(l){if(!h)return;if(m)return;n.selectOption(h);break}return;case"Escape":l?(n.inputIsHiddenAfterUpdate=!1,n.onInputChange("",{action:"menu-close"}),n.onMenuClose()):s&&i&&n.clearValue();break;case" ":if(a)return;if(!l){n.openMenu("first");break}if(!h)return;n.selectOption(h);break;case"ArrowUp":l?n.focusOption("up"):n.openMenu("last");break;case"ArrowDown":l?n.focusOption("down"):n.openMenu("first");break;case"PageUp":if(!l)return;n.focusOption("pageup");break;case"PageDown":if(!l)return;n.focusOption("pagedown");break;case"Home":if(!l)return;n.focusOption("first");break;case"End":if(!l)return;n.focusOption("last");break;default:return}e.preventDefault()}});var r=e.value;n.cacheComponents=Ve(n.cacheComponents,At).bind(ot(ot(n))),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++bn);var o=lt(r),i=n.buildMenuOptions(e,o);return n.state.menuOptions=i,n.state.selectValue=o,n}return et(t,E["Component"]),Ke(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var i=lt(e.value),a=this.buildMenuOptions(e,i),s=this.getNextFocusedValue(i),u=this.getNextFocusedOption(a.focusable);this.setState({menuOptions:a,selectValue:i,focusedOption:u,focusedValue:s})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&function(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?dt(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&dt(e,Math.max(t.offsetTop-o,0))}(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){var e=this.props,t=e.isSearchable,n=e.isMulti;this.announceAriaLiveContext({event:"input",context:{isSearchable:t,isMulti:n}}),this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this.state,n=t.menuOptions,r=t.selectValue,o=t.isFocused,i=this.props.isMulti,a="first"===e?0:n.focusable.length-1;if(!i){var s=n.focusable.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,i=o.selectValue,a=o.focusedValue;if(n){this.setState({focusedOption:null});var s=i.indexOf(a);a||(s=-1,this.announceAriaLiveContext({event:"value"}));var u=i.length-1,l=-1;if(i.length){switch(e){case"previous":l=0===s?0:-1===s?u:s-1;break;case"next":s>-1&&s<u&&(l=s+1)}-1===l&&this.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:n}}),this.setState({inputIsHidden:-1!==l,focusedValue:i[l]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var i=0,a=o.indexOf(r);r||(a=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?i=a>0?a-1:o.length-1:"down"===e?i=(a+1)%o.length:"pageup"===e?(i=a-t)<0&&(i=0):"pagedown"===e?(i=a+t)>o.length-1&&(i=o.length-1):"last"===e&&(i=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[i],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:Xt(o[i])}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(hn):Qe({},hn,this.props.theme):hn}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,i=o.classNamePrefix,a=o.isMulti,s=o.isRtl,u=o.options,l=this.state.selectValue,c=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var i in n)n.hasOwnProperty(i)&&n[i]&&o.push("".concat(ut(e,i)));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,i),clearValue:e,getStyles:t,getValue:function(){return l},hasValue:c,isMulti:a,isRtl:s,options:u,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r<e.length)return e[r]}return null}},{key:"getNextFocusedOption",value:function(e){var t=this.state.focusedOption;return t&&e.indexOf(t)>-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,i=function(e,r){var i=n.isOptionDisabled(e,t),a=n.isOptionSelected(e,t),s=n.getOptionLabel(e),u=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&a||!n.filterOption({label:s,value:u,data:e},o))){var l=i?void 0:function(){return n.onOptionHover(e)},c=i?void 0:function(){return n.selectOption(e)},p="".concat(n.getElementId("option"),"-").concat(r);return{innerProps:{id:p,onClick:c,onMouseMove:l,onMouseOver:l,tabIndex:-1},data:e,isDisabled:i,isSelected:a,key:p,label:s,type:"option",value:u}}};return e.options.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,"".concat(r,"-").concat(n));return o&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a="".concat(n.getElementId("group"),"-").concat(r);e.render.push({type:"group",key:a,data:t,options:o})}}else{var s=i(t,"".concat(r));s&&(e.render.push(s),e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,i=this.props,a=i.options,s=i.menuIsOpen,u=i.inputValue,l=i.screenReaderStatus,c=r?function(e){var t=e.focusedValue,n=e.getOptionLabel,r=e.selectValue;return"value ".concat(n(t)," focused, ").concat(r.indexOf(t)+1," of ").concat(r.length,".")}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"",p=o&&s?function(e){var t=e.focusedOption,n=e.getOptionLabel,r=e.options;return"option ".concat(n(t)," focused").concat(t.isDisabled?" disabled":"",", ").concat(r.indexOf(t)+1," of ").concat(r.length,".")}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:a}):"",d=function(e){var t=e.inputValue,n=e.screenReaderMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}({inputValue:u,screenReaderMessage:l({count:this.countOptions()})});return"".concat(c," ").concat(p," ").concat(d," ").concat(t)}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,a=this.components.Input,s=this.state.inputIsHidden,u=r||this.getElementId("input");if(!n)return y.a.createElement(Pt,{id:u,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:st,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:i,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},c=this.commonProps,p=c.cx,d=c.theme,f=c.selectProps;return y.a.createElement(a,Je({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:u,innerRef:this.getInputRef,isDisabled:t,isHidden:s,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:f,spellCheck:"false",tabIndex:i,theme:d,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,s=t.Placeholder,u=this.commonProps,l=this.props,c=l.controlShouldRenderValue,p=l.isDisabled,d=l.isMulti,f=l.inputValue,m=l.placeholder,h=this.state,g=h.selectValue,b=h.focusedValue,v=h.isFocused;if(!this.hasValue()||!c)return f?null:y.a.createElement(s,Je({},u,{key:"placeholder",isDisabled:p,isFocused:v}),m);if(d)return g.map(function(t){var a=t===b;return y.a.createElement(n,Je({},u,{components:{Container:r,Label:o,Remove:i},isFocused:a,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(f)return null;var E=g[0];return y.a.createElement(a,Je({},u,{data:E,isDisabled:p}),this.formatOptionLabel(E,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return y.a.createElement(e,Je({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!e||!o)return null;return y.a.createElement(e,Je({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:i}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return y.a.createElement(n,Je({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return y.a.createElement(e,Je({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,a=t.MenuPortal,s=t.LoadingMessage,u=t.NoOptionsMessage,l=t.Option,c=this.commonProps,p=this.state,d=p.focusedOption,f=p.menuOptions,m=this.props,h=m.captureMenuScroll,g=m.inputValue,b=m.isLoading,v=m.loadingMessage,E=m.minMenuHeight,w=m.maxMenuHeight,O=m.menuIsOpen,C=m.menuPlacement,k=m.menuPosition,S=m.menuPortalTarget,x=m.menuShouldBlockScroll,A=m.menuShouldScrollIntoView,_=m.noOptionsMessage,j=m.onMenuScrollToTop,F=m.onMenuScrollToBottom;if(!O)return null;var D,N=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,y.a.createElement(l,Je({},c,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())D=f.render.map(function(t){if("group"===t.type){t.type;var o=rt(t,["type"]),i="".concat(t.key,"-heading");return y.a.createElement(n,Je({},c,o,{Heading:r,headingProps:{id:i},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return N(e)}))}if("option"===t.type)return N(t)});else if(b){var P=v({inputValue:g});if(null===P)return null;D=y.a.createElement(s,c,P)}else{var L=_({inputValue:g});if(null===L)return null;D=y.a.createElement(u,c,L)}var M={minMenuHeight:E,maxMenuHeight:w,menuPlacement:C,menuPosition:k,menuShouldScrollIntoView:A},I=y.a.createElement(bt,Je({},c,M),function(t){var n=t.ref,r=t.placerProps,a=r.placement,s=r.maxHeight;return y.a.createElement(o,Je({},c,M,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:a}),y.a.createElement($t,{isEnabled:h,onTopArrive:j,onBottomArrive:F},y.a.createElement(Ht,{isEnabled:x},y.a.createElement(i,Je({},c,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:s}),D))))});return S||"fixed"===k?y.a.createElement(a,Je({},c,{appendTo:S,controlElement:this.controlRef,menuPlacement:C,menuPosition:k}),I):I}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=this.state.selectValue;if(i&&!r){if(o){if(n){var s=a.map(function(t){return e.getOptionValue(t)}).join(n);return y.a.createElement("input",{name:i,type:"hidden",value:s})}var u=a.length>0?a.map(function(t,n){return y.a.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})}):y.a.createElement("input",{name:i,type:"hidden"});return y.a.createElement("div",null,u)}var l=a[0]?this.getOptionValue(a[0]):"";return y.a.createElement("input",{name:i,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?y.a.createElement(Nt,{"aria-live":"assertive"},y.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),y.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,a=i.className,s=i.id,u=i.isDisabled,l=i.menuIsOpen,c=this.state.isFocused,p=this.commonProps=this.getCommonProps();return y.a.createElement(r,Je({},p,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:c}),this.renderLiveRegion(),y.a.createElement(t,Je({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:c,menuIsOpen:l}),y.a.createElement(o,Je({},p,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),y.a.createElement(n,Je({},p,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}();Ze(vn,"defaultProps",gn);var En,yn,wn={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},On=function(e){var t,n;return n=t=function(t){function n(){var e,t;Ye(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Ze(ot(ot(t=it(this,(e=tt(n)).call.apply(e,[this].concat(o))))),"select",void 0),Ze(ot(ot(t)),"state",{inputValue:void 0!==t.props.inputValue?t.props.inputValue:t.props.defaultInputValue,menuIsOpen:void 0!==t.props.menuIsOpen?t.props.menuIsOpen:t.props.defaultMenuIsOpen,value:void 0!==t.props.value?t.props.value:t.props.defaultValue}),Ze(ot(ot(t)),"onChange",function(e,n){t.callProp("onChange",e,n),t.setState({value:e})}),Ze(ot(ot(t)),"onInputChange",function(e,n){var r=t.callProp("onInputChange",e,n);t.setState({inputValue:void 0!==r?r:e})}),Ze(ot(ot(t)),"onMenuOpen",function(){t.callProp("onMenuOpen"),t.setState({menuIsOpen:!0})}),Ze(ot(ot(t)),"onMenuClose",function(){t.callProp("onMenuClose"),t.setState({menuIsOpen:!1})}),t}return et(n,E["Component"]),Ke(n,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]}},{key:"callProp",value:function(e){if("function"==typeof this.props[e]){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(t=this.props)[e].apply(t,r)}}},{key:"render",value:function(){var t=this,n=this.props,r=(n.defaultInputValue,n.defaultMenuIsOpen,n.defaultValue,rt(n,["defaultInputValue","defaultMenuIsOpen","defaultValue"]));return y.a.createElement(e,Je({},r,{ref:function(e){t.select=e},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),n}(),Ze(t,"defaultProps",wn),n},Cn={cacheOptions:!1,defaultOptions:!1,filterOption:null},kn=function(e){var t,n;return n=t=function(t){function n(e){var t;return Ye(this,n),Ze(ot(ot(t=it(this,tt(n).call(this)))),"select",void 0),Ze(ot(ot(t)),"lastRequest",void 0),Ze(ot(ot(t)),"mounted",!1),Ze(ot(ot(t)),"optionsCache",{}),Ze(ot(ot(t)),"handleInputChange",function(e,n){var r=t.props,o=r.cacheOptions,i=function(e,t,n){if(n){var r=n(e,t);if("string"==typeof r)return r}return e}(e,n,r.onInputChange);if(!i)return delete t.lastRequest,void t.setState({inputValue:"",loadedInputValue:"",loadedOptions:[],isLoading:!1,passEmptyOptions:!1});if(o&&t.optionsCache[i])t.setState({inputValue:i,loadedInputValue:i,loadedOptions:t.optionsCache[i],isLoading:!1,passEmptyOptions:!1});else{var a=t.lastRequest={};t.setState({inputValue:i,isLoading:!0,passEmptyOptions:!t.state.loadedInputValue},function(){t.loadOptions(i,function(e){t.mounted&&(e&&(t.optionsCache[i]=e),a===t.lastRequest&&(delete t.lastRequest,t.setState({isLoading:!1,loadedInputValue:i,loadedOptions:e||[],passEmptyOptions:!1})))})})}return i}),t.state={defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0,inputValue:void 0!==e.inputValue?e.inputValue:"",isLoading:!0===e.defaultOptions,loadedOptions:[],passEmptyOptions:!1},t}return et(n,E["Component"]),Ke(n,[{key:"componentDidMount",value:function(){var e=this;this.mounted=!0;var t=this.props.defaultOptions,n=this.state.inputValue;!0===t&&this.loadOptions(n,function(t){if(e.mounted){var n=!!e.lastRequest;e.setState({defaultOptions:t||[],isLoading:n})}})}},{key:"componentWillReceiveProps",value:function(e){e.cacheOptions!==this.props.cacheOptions&&(this.optionsCache={}),e.defaultOptions!==this.props.defaultOptions&&this.setState({defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0})}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"loadOptions",value:function(e,t){var n=this.props.loadOptions;if(!n)return t();var r=n(e,t);r&&"function"==typeof r.then&&r.then(t,function(){return t()})}},{key:"render",value:function(){var t=this,n=this.props,r=(n.loadOptions,rt(n,["loadOptions"])),o=this.state,i=o.defaultOptions,a=o.inputValue,s=o.isLoading,u=o.loadedInputValue,l=o.loadedOptions,c=o.passEmptyOptions?[]:a&&u?l:i||[];return y.a.createElement(e,Je({},r,{ref:function(e){t.select=e},options:c,isLoading:s,onInputChange:this.handleInputChange}))}}]),n}(),Ze(t,"defaultProps",Cn),n},Sn=(kn(On(vn)),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=String(e).toLowerCase(),r=String(t.value).toLowerCase(),o=String(t.label).toLowerCase();return r===n||o===n}),xn=Qe({allowCreateWhileLoading:!1,createOptionPosition:"last"},{formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n){return!(!e||t.some(function(t){return Sn(e,t)})||n.some(function(t){return Sn(e,t)}))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}}),An=function(e){var t,n;return n=t=function(t){function n(e){var t;Ye(this,n),Ze(ot(ot(t=it(this,tt(n).call(this,e)))),"select",void 0),Ze(ot(ot(t)),"onChange",function(e,n){var r=t.props,o=r.getNewOptionData,i=r.inputValue,a=r.isMulti,s=r.onChange,u=r.onCreateOption,l=r.value;if("select-option"!==n.action)return s(e,n);var c=t.state.newOption,p=Array.isArray(e)?e:[e];if(p[p.length-1]!==c)s(e,n);else if(u)u(i);else{var d=o(i,i),f={action:"create-option"};s(a?[].concat(at(lt(l)),[d]):d,f)}});var r=e.options||[];return t.state={newOption:void 0,options:r},t}return et(n,E["Component"]),Ke(n,[{key:"componentWillReceiveProps",value:function(e){var t=e.allowCreateWhileLoading,n=e.createOptionPosition,r=e.formatCreateLabel,o=e.getNewOptionData,i=e.inputValue,a=e.isLoading,s=e.isValidNewOption,u=e.value,l=e.options||[],c=this.state.newOption;c=s(i,lt(u),l)?o(i,r(i)):void 0,this.setState({newOption:c,options:!t&&a||!c?l:"first"===n?[c].concat(at(l)):[].concat(at(l),[c])})}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"render",value:function(){var t=this,n=Je({},this.props),r=this.state.options;return y.a.createElement(e,Je({},n,{ref:function(e){t.select=e},options:r,onChange:this.onChange}))}}]),n}(),Ze(t,"defaultProps",xn),n},_n=(On(An(vn)),kn(On(An(vn))),function(e){var t=e.component,n=e.duration,r=void 0===n?1:n,o=e.in,i=(e.onExited,rt(e,["component","duration","in","onExited"])),a={entering:{opacity:0},entered:{opacity:1,transition:"opacity ".concat(r,"ms")},exiting:{opacity:0},exited:{opacity:0}};return y.a.createElement($e.Transition,{mountOnEnter:!0,unmountOnExit:!0,in:o,timeout:r},function(e){var n={style:Qe({},a[e])};return y.a.createElement(t,Je({innerProps:n},i))})}),jn=260,Fn=function(e){function t(){var e,n;Ye(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return Ze(ot(ot(n=it(this,(e=tt(t)).call.apply(e,[this].concat(o))))),"duration",jn),Ze(ot(ot(n)),"rafID",void 0),Ze(ot(ot(n)),"state",{width:"auto"}),Ze(ot(ot(n)),"transition",{exiting:{width:0,transition:"width ".concat(n.duration,"ms ease-out")},exited:{width:0}}),Ze(ot(ot(n)),"getWidth",function(e){e&&isNaN(n.state.width)&&(n.rafID=window.requestAnimationFrame(function(){var t=e.getBoundingClientRect().width;n.setState({width:t})}))}),Ze(ot(ot(n)),"getStyle",function(e){return{overflow:"hidden",whiteSpace:"nowrap",width:e}}),Ze(ot(ot(n)),"getTransition",function(e){return n.transition[e]}),n}return et(t,E["Component"]),Ke(t,[{key:"componentWillUnmount",value:function(){this.rafID&&window.cancelAnimationFrame(this.rafID)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.in,o=this.state.width;return y.a.createElement($e.Transition,{enter:!1,mountOnEnter:!0,unmountOnExit:!0,in:r,timeout:this.duration},function(t){var r=Qe({},e.getStyle(o),e.getTransition(t));return y.a.createElement("div",{ref:e.getWidth,style:r},n)})}}]),t}(),Dn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=fn({components:e}),n=t.Input,r=t.MultiValue,o=t.Placeholder,i=t.SingleValue,a=t.ValueContainer,s=rt(t,["Input","MultiValue","Placeholder","SingleValue","ValueContainer"]);return Qe({Input:function(e){return function(t){t.in,t.onExited,t.appear,t.enter,t.exit;var n=rt(t,["in","onExited","appear","enter","exit"]);return y.a.createElement(e,n)}}(n),MultiValue:function(e){return function(t){var n=t.in,r=t.onExited,o=rt(t,["in","onExited"]);return y.a.createElement(Fn,{in:n,onExited:r},y.a.createElement(e,Je({cropWithEllipsis:n},o)))}}(r),Placeholder:function(e){return function(t){return y.a.createElement(_n,Je({component:e,duration:t.isMulti?jn:1},t))}}(o),SingleValue:function(e){return function(t){return y.a.createElement(_n,Je({component:e},t))}}(i),ValueContainer:function(e){return function(t){return y.a.createElement($e.TransitionGroup,Je({component:e},t))}}(a)},s)},Nn=Dn(),Pn=(Nn.Input,Nn.MultiValue,Nn.Placeholder,Nn.SingleValue,Nn.ValueContainer,Ve(Dn,At),On(vn));n(41);function Ln(e){return[e]}function Mn(e){return!!e&&"object"==typeof e}function In(){var e={clear:function(){e.head=null}};return e}function Tn(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}En={},yn="undefined"!=typeof WeakMap;var Vn=wp.components.Dashicon,Rn=wp.i18n.__,Bn=function(e,t){var n,r;function o(){n=yn?new WeakMap:In()}function i(){var n,o,i,a,s,u=arguments.length;for(a=new Array(u),i=0;i<u;i++)a[i]=arguments[i];for(s=t.apply(null,a),(n=r(s)).isUniqueByDependants||(n.lastDependants&&!Tn(s,n.lastDependants,0)&&n.clear(),n.lastDependants=s),o=n.head;o;){if(Tn(o.args,a,1))return o!==n.head&&(o.prev.next=o.next,o.next&&(o.next.prev=o.prev),o.next=n.head,o.prev=null,n.head.prev=o,n.head=o),o.val;o=o.next}return o={val:e.apply(null,a)},a[0]=null,o.args=a,n.head&&(n.head.prev=o,o.next=n.head),n.head=o,o.val}return t||(t=Ln),r=yn?function(e){var t,r,o,i,a=n,s=!0;for(t=0;t<e.length;t++){if(!Mn(r=e[t])){s=!1;break}a.has(r)?a=a.get(r):(o=new WeakMap,a.set(r,o),a=o)}return a.has(En)||((i=In()).isUniqueByDependants=s,a.set(En,i)),a.get(En)}:function(){return n},i.getDependants=t,i.clear=o,o(),i}(function(e){var t=[];return e.forEach(function(e){var n,r=e.entityType,o=e.type,i=e.label,a=e.items;switch(r){case"post":n="title.rendered";break;case"term":n="name"}if(Array.isArray(a)&&a.length){var s=Me(a,{sort:n+"_asc"});t.push(function(e,t,n,r){return{label:n,options:r=r.map(function(n){var r;switch(e){case"post":(r={label:n.title.rendered.trim()||Rn("(Untitled)","wordcamporg"),value:n.id,type:t}).avatar=Object(w.get)(n,"avatar_urls['24']",""),r.image=Object(w.get)(n,"_embedded['wp:featuredmedia'].media_details.sizes.thumbnail.source_url","");break;case"term":r={label:n.name||Rn("(Untitled)","wordcamporg"),value:n.id,type:t,count:n.count}}return r})}}(r,o,i,s))}}),t},function(e){var t=[];return e.forEach(function(e){var n=e.items;t.push(n)}),t});function zn(e){var t,n=e.avatar,r=e.icon,o=e.label,i=e.count;n?t=Object(E.createElement)(J,{className:"wordcamp-item-select-option-avatar",name:o,size:24,url:n}):r&&(t=Object(E.createElement)("div",{className:"wordcamp-item-select-option-icon-container"},Object(E.createElement)(Vn,{className:"wordcamp-item-select-option-icon",icon:r,size:16})));var a=Object(E.createElement)("span",{className:"wordcamp-item-select-option-label"},o,void 0!==i&&Object(E.createElement)("span",{className:"wordcamp-item-select-option-label-count"},i));return Object(E.createElement)("div",{className:"wordcamp-item-select-option"},t,a)}var Un=wp.components,Wn=Un.BaseControl,Hn=Un.Button,Gn=wp.compose.withInstanceId,$n=wp.element.Component,qn=wp.i18n.__,Yn=Gn(function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).state={selectedOptions:null},n.getNewAttributes=n.getNewAttributes.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"getNewAttributes",value:function(){var e=this.state.selectedOptions,t={};if(null===e)return t;var n=e.map(function(e){return e.value})||[];n.length?t={mode:e[0].type,item_ids:n}:t={mode:"",item_ids:[]};return t}},{key:"render",value:function(){var e=this,t=this.props,n=t.instanceId,r=t.className,o=t.label,i=t.help,a=t.submitLabel,s=t.onChange,l=t.selectProps,c=this.state.selectedOptions||this.props.value,p="wordcamp-item-select-control-".concat(n),d=ke()({isMulti:!0,isOptionDisabled:this.constructor.isOptionDisabled,formatGroupLabel:this.constructor.formatGroupLabel},l);return Object(E.createElement)(Wn,{id:p,className:S()("wordcamp-item-select",r),label:o,help:i},Object(E.createElement)("div",{className:"wordcamp-item-select-inner"},Object(E.createElement)(Pn,u()({id:p,className:"wordcamp-item-select-select",value:c,"aria-label":o,onChange:function(t){e.setState({selectedOptions:t})}},d)),Object(E.createElement)(Hn,{className:"wordcamp-item-select-button",isLarge:!0,isDefault:!0,onClick:function(){return s(e.getNewAttributes())}},a||qn("Select","wordcamporg"))))}}],[{key:"isOptionDisabled",value:function(e,t){var n;return Array.isArray(t)&&t.length&&(n=t[0].type),n&&n!==e.type}},{key:"formatGroupLabel",value:function(e){return Object(E.createElement)("span",{className:"wordcamp-item-select-option-group-label"},e.label)}}]),t}($n)),Xn=wp.element.Component,Kn=wp.i18n.__,Zn=function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).buildSelectOptions=n.buildSelectOptions.bind(A()(A()(n))),n.getCurrentSelectValue=n.getCurrentSelectValue.bind(A()(A()(n))),n.isLoading=n.isLoading.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"buildSelectOptions",value:function(){var e=this.props.entities,t=e.wcb_organizer,n=e.wcb_organizer_team,r=[{entityType:"post",type:"wcb_organizer",label:Kn("Organizers","wordcamporg"),items:t},{entityType:"term",type:"wcb_organizer_team",label:Kn("Teams","wordcamporg"),items:n}];return Bn(r)}},{key:"getCurrentSelectValue",value:function(){var e=this.props.attributes,t=e.mode,n=e.item_ids,r=Object(w.flatMap)(this.buildSelectOptions(),function(e){return e.options}),o=[];return t&&n.length&&(o=r.filter(function(e){return t===e.type&&Object(w.includes)(n,e.value)})),o}},{key:"isLoading",value:function(){var e=this.props.entities;return!Object(w.every)(e,function(e){return Array.isArray(e)})}},{key:"render",value:function(){var e=this.props,t=e.label,n=e.setAttributes;return Object(E.createElement)(Yn,{className:"wordcamp-organizers-select",label:t,value:this.getCurrentSelectValue(),onChange:function(e){return n(e)},selectProps:{options:this.buildSelectOptions(),isLoading:this.isLoading(),formatOptionLabel:function(e){return Object(E.createElement)(zn,e)}}})}}]),t}(Xn),Jn=wp.components,Qn=Jn.Button,er=Jn.Placeholder,tr=wp.i18n.__,nr=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e,t=this.props,n=t.icon,r=t.attributes,o=t.setAttributes,i=r.mode;switch(i){case"all":e=Object(E.createElement)(Ie,this.props);break;case"wcb_organizer":case"wcb_organizer_team":e=Object(E.createElement)(P,{label:this.getModeLabel(i),icon:n,content:Object(E.createElement)(Ie,this.props),placeholderChildren:Object(E.createElement)(Zn,this.props)});break;default:e=Object(E.createElement)(er,{className:S()("wordcamp-block-edit-placeholder","wordcamp-block-edit-placeholder-no-mode"),icon:n,label:jr},Object(E.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(E.createElement)(Qn,{isDefault:!0,isLarge:!0,onClick:function(){o({mode:"all"})}},this.getModeLabel("all"))),Object(E.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(E.createElement)(Zn,u()({label:tr("Choose specific organizers or teams","wordcamporg")},this.props))))}return e}}]),t}(N),rr=wp.components,or=rr.BaseControl,ir=rr.Toolbar;var ar=function(e){var t=e.className,n=e.label,r=e.help,o=e.value,i=e.onChange,a=e.alignOptions;return Object(E.createElement)(or,{className:S()("wordcamp-components-image-alignment",t),label:n,help:r},Object(E.createElement)(ir,{controls:a.map(function(e){var t=o===e.value,n="align-".concat(e.value);return{title:e.label,icon:n,isActive:t,onClick:function(){i(e.value)}}})}))},sr=wp.components,ur=sr.PanelBody,lr=sr.PanelRow,cr=sr.SelectControl,pr=sr.ToggleControl,dr=wp.editor.InspectorControls,fr=wp.element,mr=fr.Component,hr=fr.Fragment,gr=wp.i18n.__,br={grid_columns:{default:2,minimum:2,maximum:4},avatar_size:{default:150,minimum:25,maximum:600}},vr={align:{},content:{},sort:{}},Er=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.show_avatars,i=t.avatar_size,a=t.avatar_align,s=t.content,u=t.sort,l=r.schema,c=void 0===l?br:l,p=r.options,d=void 0===p?vr:p;return Object(E.createElement)(dr,null,Object(E.createElement)(ve,this.props),Object(E.createElement)(ur,{title:gr("Avatar Settings","wordcamporg"),initialOpen:!0},Object(E.createElement)(lr,null,Object(E.createElement)(pr,{label:gr("Show avatars","wordcamporg"),checked:o,onChange:function(e){return n({show_avatars:e})}})),o&&Object(E.createElement)(hr,null,Object(E.createElement)(lr,null,Object(E.createElement)(H,{label:gr("Size","wordcamporg"),value:Number(i),initialPosition:Number(c.avatar_size.default),onChange:function(e){return n({avatar_size:e})},rangeProps:{min:Number(c.avatar_size.minimum),max:Number(c.avatar_size.maximum)}})),Object(E.createElement)(lr,null,Object(E.createElement)(ar,{label:gr("Alignment","wordcamporg"),value:a,onChange:function(e){return n({avatar_align:e})},alignOptions:d.align_image})))),Object(E.createElement)(ur,{title:gr("Content Settings","wordcamporg"),initialOpen:!1},Object(E.createElement)(lr,null,Object(E.createElement)(cr,{label:gr("Biography Length","wordcamporg"),value:s,options:d.content,onChange:function(e){return n({content:e})}}))),Object(E.createElement)(ur,{title:gr("Sorting & Filtering","wordcamporg"),initialOpen:!1},Object(E.createElement)(lr,null,Object(E.createElement)(cr,{label:gr("Sort by","wordcamporg"),value:u,options:d.sort,onChange:function(e){return n({sort:e})}}))))}}]),t}(mr),yr=wp.data.withSelect,wr=wp.element,Or=wr.Component,Cr=wr.Fragment,kr=window.WordCampBlocks.organizers||{},Sr=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=t.mode,o=t.layout,i=kr.options.layout,a=void 0===i?{}:i;return Object(E.createElement)(Cr,null,Object(E.createElement)(nr,u()({icon:Fr},this.props)),""!==r&&Object(E.createElement)(Cr,null,Object(E.createElement)(Er,this.props),Object(E.createElement)(we,{layout:o,options:a,setAttributes:n})))}}]),t}(Or),xr=yr(function(e){var t=e("wordcamp").getEntities,n={wcb_organizer:t("postType","wcb_organizer",{_embed:!0}),wcb_organizer_team:t("taxonomy","wcb_organizer_team")};return{blockData:kr,entities:n}})(Sr),Ar=wp.i18n.__,_r="wordcamp/organizers",jr=Ar("Organizers","wordcamporg"),Fr="groups",Dr={title:Ar("Organizers","wordcamporg"),description:Ar("Add a list of organizers.","wordcamporg"),icon:Fr,category:"wordcamp",supports:{align:["wide","full"]},edit:xr,save:function(){return null}},Nr=n(28),Pr=n.n(Nr),Lr=wp.i18n.__;function Mr(e){return e.split(/(%[1-9]?\$?s)/)}function Ir(e,t){var n,r=0;return e.flatMap(function(e){var o=e.match(/^%([1-9])?\$?s$/);return Array.isArray(o)&&(o.length>1&&void 0!==o[1]?(n=Number(o[1])-1,void 0!==t[n]&&(e=t[n])):(e=t[r],r++)),e})}function Tr(e,t){return e.length?e.slice(1).reduce(function(e,n,r){var o="function"==typeof t?o(r):t;return e.concat([o,n])},[e[0]]):[]}var Vr=wp.components.Disabled,Rr=wp.element.Component,Br=wp.url.isURL,zr=function(e){function t(e){var n;c()(this,t),n=m()(this,g()(t).call(this,e));var r=e.imageData,o=r.media_details,i=void 0===o?{}:o,a=r.alt_text,s=void 0===a?"":a,u=n.constructor.getWidestImage(i);return n.state={image:u,alt:s},n}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.width,n=e.className,r=e.imageLink,o=this.state,i=o.image,a=o.alt,s=i.source_url,u=void 0===s?"":s;if(!u)return"";var l=this.constructor.getNewHeight(t,i),c=Object(E.createElement)("img",{className:S()("wordcamp-featured-image","wp-post-image"),src:u,alt:a,width:t,height:l});return Br(r)&&(c=Object(E.createElement)(Vr,null,Object(E.createElement)("a",{href:r,className:S()("wordcamp-image-link","wordcamp-featured-image-link")},c))),c=Object(E.createElement)("div",{className:S()("wordcamp-image-container","wordcamp-featured-image-container",n)},c)}}],[{key:"getWidestImage",value:function(e){var t={},n=e.sizes,r=void 0===n?{}:n;if(r.hasOwnProperty("full")&&r.full.hasOwnProperty("source_url"))t=r.full;else if(Object.getOwnPropertyDescriptors(r).length>0){t=Object(w.sortBy)(r,"width").pop()}return t}},{key:"getNewHeight",value:function(e,t){var n=null,r=t.width,o=t.height;if(r&&o){var i=Number(o)/Number(r);n=Number.parseFloat(i*e).toFixed(1)}return n}}]),t}(Rr),Ur=wp.element.Component,Wr=wp.i18n.__;function Hr(e){var t=e.session,n=Object(w.get)(t,"_embedded.speakers",[]);n=n.map(function(e){if(e.hasOwnProperty("code"))return null;var t=e.link,n=e.title,r=void 0===n?{}:n;return r=r.rendered.trim()||Wr("Unnamed","wordcamporg"),t?Object(E.createElement)("a",{key:t,href:t},r):r});var r=Ir(Mr(Wr("Presented by %s","wordcamporg")),[function(e){var t=[],n=Lr(", ","wordcamporg"),r=Lr(" and ","wordcamporg");if(!Array.isArray(e))return t;switch(e.length){case 0:break;case 1:t=e;break;case 2:t=Tr(e,r);break;default:var o=_e()(e).reverse(),i=Pr()(o),a=i[0];t=Tr(i.slice(1),n).concat([n,r,a])}return t}(n)]);return Object(E.createElement)("div",{className:"wordcamp-item-meta wordcamp-session-speakers"},r)}function Gr(e){var t,n=e.session,r=Object(w.get)(n,"_embedded['wp:term']",[]).flat();if(n.session_track.length){var o=r.filter(function(e){return"wcb_track"===e.taxonomy}),i=xe()(o,1)[0];t=Ir(Mr(Wr("%1$s at %2$s in %3$s","wordcamporg")),[n.session_date_time.date,n.session_date_time.time,Object(E.createElement)("span",{key:i.id,className:S()("wordcamp-session-track","wordcamp-session-track-"+i.slug.trim())},i.name.trim())])}else t=Ir(Mr(Wr("%1$s at %2$s","wordcamporg")),[n.session_date_time.date,n.session_date_time.time]);return Object(E.createElement)("div",{className:"wordcamp-session-time-location"},t)}function $r(e){var t,n=e.session,r=Object(w.get)(n,"_embedded['wp:term']",[]).flat();if(n.session_category.length){var o=Wr(", ","wordcamporg");t=Tr(r.filter(function(e){return"wcb_session_category"===e.taxonomy}).map(function(e){return Object(E.createElement)("span",{key:e.slug,className:S()("wordcamp-session-category","wordcamp-session-category-"+e.slug)},e.name.trim())}),o)}return Object(E.createElement)("div",{className:"wordcamp-session-categories"},t)}var qr=function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).getFilteredPosts=n.getFilteredPosts.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"getFilteredPosts",value:function(){var e=this.props,t=e.attributes,n=e.entities.wcb_session,r=t.mode,o=t.item_ids,i=t.sort,a={};if(Array.isArray(o)&&o.length>0){var s;switch(r){case"wcb_session":s="id";break;case"wcb_track":s="session_track";break;case"wcb_session_category":s="session_category"}a.filter=[{fieldName:s,fieldValue:o}]}"session_time"!==i&&(a.sort=i);var u=Me(n,a);return Array.isArray(u)&&"session_time"===i&&(u=u.sort(function(e,t){return Number(e.meta._wcpt_session_time)-Number(t.meta._wcpt_session_time)})),u}},{key:"render",value:function(){var e=this,t=this.props.attributes,n=t.show_speaker,r=t.show_images,o=t.image_align,i=t.featured_image_width,a=t.content,s=t.show_meta,l=t.show_category,c=this.getFilteredPosts(),p=!Array.isArray(c),d=!p&&c.length>0;return p||!d?Object(E.createElement)(ae,{loading:p}):Object(E.createElement)(Oe,u()({},this.props,{className:"wordcamp-sessions-block"}),c.map(function(t){return Object(E.createElement)("div",{key:t.slug,className:S()("wordcamp-session","wordcamp-session-"+t.slug)},Object(E.createElement)(se,{className:"wordcamp-session-title",headingLevel:3,title:t.title.rendered.trim(),link:t.link}),n&&e.constructor.hasSpeaker(t)&&Object(E.createElement)(Hr,{session:t}),r&&Object(E.createElement)(zr,{imageData:Object(w.get)(t,"_embedded.wp:featuredmedia[0]",{}),width:Number(i),className:S()("wordcamp-session-featured-image","align-"+o),imageLink:t.link}),"none"!==a&&Object(E.createElement)(ue,{className:S()("wordcamp-session-content-"+a),content:"full"===a?t.content.rendered.trim():t.excerpt.rendered.trim()}),(s||l)&&Object(E.createElement)("div",{className:"wordcamp-item-meta wordcamp-session-details"},s&&Object(E.createElement)(Gr,{session:t}),l&&Object(E.createElement)($r,{session:t})),"full"===a&&Object(E.createElement)(le,{link:t.link,linkText:Wr("Visit session page","wordcamporg"),className:"wordcamp-session-permalink"}))}))}}],[{key:"hasSpeaker",value:function(e){return Object(w.get)(e,"_embedded.speakers",[]).length>0}}]),t}(Ur),Yr=wp.element.Component,Xr=wp.i18n.__,Kr=function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).buildSelectOptions=n.buildSelectOptions.bind(A()(A()(n))),n.getCurrentSelectValue=n.getCurrentSelectValue.bind(A()(A()(n))),n.isLoading=n.isLoading.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"buildSelectOptions",value:function(){var e=this.props.entities,t=e.wcb_session,n=e.wcb_track,r=e.wcb_session_category,o=[{entityType:"post",type:"wcb_session",label:Xr("Sessions","wordcamporg"),items:t},{entityType:"term",type:"wcb_track",label:Xr("Tracks","wordcamporg"),items:n},{entityType:"term",type:"wcb_session_category",label:Xr("Session Categories","wordcamporg"),items:r}];return Bn(o)}},{key:"getCurrentSelectValue",value:function(){var e=this.props.attributes,t=e.mode,n=e.item_ids,r=Object(w.flatMap)(this.buildSelectOptions(),function(e){return e.options}),o=[];return t&&n.length&&(o=r.filter(function(e){return t===e.type&&Object(w.includes)(n,e.value)})),o}},{key:"isLoading",value:function(){var e=this.props.entities;return!Object(w.every)(e,function(e){return Array.isArray(e)})}},{key:"render",value:function(){var e=this.props,t=e.icon,n=e.label,r=e.setAttributes;return Object(E.createElement)(Yn,{className:"wordcamp-sessions-select",label:n,value:this.getCurrentSelectValue(),onChange:function(e){return r(e)},selectProps:{options:this.buildSelectOptions(),isLoading:this.isLoading(),formatOptionLabel:function(e){return Object(E.createElement)(zn,u()({icon:Object(w.includes)(["wcb_track","wcb_session_category"],e.type)?t:null},e))}}})}}]),t}(Yr),Zr=wp.components,Jr=Zr.Button,Qr=Zr.Placeholder,eo=wp.i18n.__,to=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e,t=this.props,n=t.icon,r=t.attributes,o=t.setAttributes,i=r.mode;switch(i){case"all":e=Object(E.createElement)(qr,this.props);break;case"wcb_session":case"wcb_track":case"wcb_session_category":e=Object(E.createElement)(P,{label:this.getModeLabel(i),icon:n,content:Object(E.createElement)(qr,this.props),placeholderChildren:Object(E.createElement)(Kr,this.props)});break;default:e=Object(E.createElement)(Qr,{className:S()("wordcamp-block-edit-placeholder","wordcamp-block-edit-placeholder-no-mode"),icon:n,label:ko},Object(E.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(E.createElement)(Jr,{isDefault:!0,isLarge:!0,onClick:function(){o({mode:"all"})}},this.getModeLabel("all"))),Object(E.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(E.createElement)(Kr,u()({icon:n,label:eo("Choose specific sessions, tracks, or categories","wordcamporg")},this.props))))}return e}}]),t}(N),no=(n(53),wp.element.Component),ro=wp.components.PanelBody,oo=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.title,o=e.help,i=e.selectLabel,a=t.featured_image_width;return Object(E.createElement)(ro,{title:r,initialopen:!1},Object(E.createElement)(H,{onChange:function(e){return n({featured_image_width:Number(e)})},label:i,initialPosition:a,help:o,rangeProps:{min:25,max:1024}}))}}]),t}(no),io=wp.components,ao=io.PanelBody,so=io.PanelRow,uo=io.SelectControl,lo=io.ToggleControl,co=wp.editor.InspectorControls,po=wp.element.Component,fo=wp.i18n.__,mo=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.show_speaker,i=t.content,a=t.show_meta,s=t.show_category,l=t.sort,c=r.options;return Object(E.createElement)(co,null,Object(E.createElement)(ve,this.props),Object(E.createElement)(ao,{title:fo("Content Settings","wordcamporg"),initialOpen:!0},Object(E.createElement)(so,null,Object(E.createElement)(uo,{label:fo("Description","wordcamporg"),value:i||"full",options:c.content,onChange:function(e){return n({content:e})}})),Object(E.createElement)(so,null,Object(E.createElement)(lo,{label:fo("Details","wordcamporg"),help:fo("Show date, time, and track.","wordcamporg"),checked:void 0!==a&&a,onChange:function(e){return n({show_meta:e})}})),Object(E.createElement)(so,null,Object(E.createElement)(lo,{label:fo("Categories","wordcamporg"),help:fo("Show session categories.","wordcamporg"),checked:void 0!==s&&s,onChange:function(e){return n({show_category:e})}})),Object(E.createElement)(so,null,Object(E.createElement)(lo,{label:fo("Speakers","wordcamporg"),help:fo("Show session speakers.","wordcamporg"),checked:void 0!==o&&o,onChange:function(e){return n({show_speaker:e})}}))),Object(E.createElement)(oo,u()({title:fo("Image size","wordcamporg"),help:fo("Specify image height and width, or select a predefined size.","wordcamporg"),selectLabel:fo("Size","wordcamporg")},this.props)),Object(E.createElement)(ao,{title:fo("Sorting","wordcamporg")},Object(E.createElement)(so,null,Object(E.createElement)(uo,{label:fo("Sort by","wordcamporg"),value:l,options:c.sort||"session_time",onChange:function(e){return n({sort:e})}}))))}}]),t}(po),ho=wp.data.withSelect,go=wp.element,bo=go.Component,vo=go.Fragment,Eo=window.WordCampBlocks.sessions||{},yo=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=t.mode,o=t.layout,i=Eo.options.layout,a=void 0===i?{}:i;return Object(E.createElement)(vo,null,Object(E.createElement)(to,u()({icon:So},this.props)),r&&Object(E.createElement)(vo,null,Object(E.createElement)(mo,this.props),Object(E.createElement)(we,{layout:o,options:a,setAttributes:n})))}}]),t}(bo),wo=ho(function(e){var t=e("wordcamp").getEntities,n={wcb_session:t("postType","wcb_session",{_embed:!0}),wcb_track:t("taxonomy","wcb_track"),wcb_session_category:t("taxonomy","wcb_session_category")};return{blockData:Eo,entities:n}})(yo),Oo=wp.i18n.__,Co="wordcamp/sessions",ko=Oo("Sessions","wordcamporg"),So="list-view",xo={title:Oo("Sessions","wordcamporg"),description:Oo("Add a list of sessions.","wordcamporg"),icon:So,category:"wordcamp",supports:{align:["wide","full"]},edit:wo,save:function(){return null}},Ao=(n(54),wp.components.Disabled),_o=wp.element,jo=_o.Component,Fo=_o.Fragment,Do=wp.i18n,No=Do.__,Po=Do._n,Lo=wp.escapeHtml.escapeAttribute;function Mo(e){var t=e.speaker,n=e.tracks,r=Object(w.get)(t,"_embedded.sessions",[]),o=Object(E.createElement)(Fo,null,null);return r.length&&(o=Object(E.createElement)("div",{className:S()("wordcamp-item-meta","wordcamp-speaker-sessions")},Object(E.createElement)("h4",{className:"wordcamp-speaker-sessions-heading"},Po("Session","Sessions",r.length,"wordcamporg")),Object(E.createElement)("ul",{className:"wordcamp-speaker-sessions-list"},r.map(function(e){return Object(E.createElement)("li",{key:Lo(e.slug),className:"wordcamp-speaker-sessions-list-item"},Object(E.createElement)(Ao,null,Object(E.createElement)("a",{className:"wordcamp-speaker-session-link",href:e.link},e.title.rendered.trim()||No("(Untitled)","wordcamporg")),Object(E.createElement)("span",{className:"wordcamp-speaker-session-info"},e.session_track.length&&Array.isArray(n)&&Ir(Mr(No("%1$s at %2$s in %3$s","wordcamporg")),[e.session_date_time.date,e.session_date_time.time,Object(w.get)(n.find(function(t){var n=xe()(e.session_track,1)[0];return parseInt(t.id)===n}),"name")]),(!e.session_track.length||!Array.isArray(n))&&Ir(Mr(No("%1$s at %2$s","wordcamporg")),[e.session_date_time.date,e.session_date_time.time]))))})))),o}var Io=function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).getFilteredPosts=n.getFilteredPosts.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"getFilteredPosts",value:function(){var e=this.props,t=e.attributes,n=e.entities.wcb_speaker,r=t.mode,o=t.item_ids,i=t.sort,a={};return Array.isArray(o)&&o.length>0&&(a.filter=[{fieldName:"wcb_speaker"===r?"id":"speaker_group",fieldValue:o}]),a.sort=i,Me(n,a)}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.entities.wcb_track,r=t.show_avatars,o=t.avatar_size,i=t.avatar_align,a=t.content,s=t.show_session,l=this.getFilteredPosts(),c=!Array.isArray(l),p=!c&&l.length>0;return c||!p?Object(E.createElement)(ae,{loading:c}):Object(E.createElement)(Oe,u()({},this.props,{className:"wordcamp-speakers-block"}),l.map(function(e){return Object(E.createElement)("div",{key:e.slug,className:S()("wordcamp-speaker","wordcamp-speaker-"+e.slug)},Object(E.createElement)(se,{className:"wordcamp-speaker-title",headingLevel:3,title:e.title.rendered.trim(),link:e.link}),r&&Object(E.createElement)(J,{className:S()("align-"+i),name:e.title.rendered.trim()||"",size:o,url:e.avatar_urls[24],imageLink:e.link}),"none"!==a&&Object(E.createElement)(ue,{className:S()("wordcamp-speaker-content-"+a),content:"full"===a?e.content.rendered.trim():e.excerpt.rendered.trim()}),!0===s&&Object(E.createElement)(Mo,{speaker:e,tracks:n}),"full"===a&&Object(E.createElement)(le,{link:e.link,linkText:No("Visit speaker page","wordcamporg")}))}))}}]),t}(jo),To=wp.element.Component,Vo=wp.i18n.__,Ro=function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).buildSelectOptions=n.buildSelectOptions.bind(A()(A()(n))),n.getCurrentSelectValue=n.getCurrentSelectValue.bind(A()(A()(n))),n.isLoading=n.isLoading.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"buildSelectOptions",value:function(){var e=this.props.entities,t=e.wcb_speaker,n=e.wcb_speaker_group,r=[{entityType:"post",type:"wcb_speaker",label:Vo("Speakers","wordcamporg"),items:t},{entityType:"term",type:"wcb_speaker_group",label:Vo("Groups","wordcamporg"),items:n}];return Bn(r)}},{key:"getCurrentSelectValue",value:function(){var e=this.props.attributes,t=e.mode,n=e.item_ids,r=Object(w.flatMap)(this.buildSelectOptions(),function(e){return e.options}),o=[];return t&&n.length&&(o=r.filter(function(e){return t===e.type&&Object(w.includes)(n,e.value)})),o}},{key:"isLoading",value:function(){var e=this.props.entities;return!Object(w.every)(e,function(e){return Array.isArray(e)})}},{key:"render",value:function(){var e=this.props,t=e.label,n=e.icon,r=e.setAttributes;return Object(E.createElement)(Yn,{className:"wordcamp-speakers-select",label:t,value:this.getCurrentSelectValue(),onChange:function(e){return r(e)},selectProps:{options:this.buildSelectOptions(),isLoading:this.isLoading(),formatOptionLabel:function(e){return Object(E.createElement)(zn,u()({icon:"wcb_speaker_group"===e.type?n:null},e))}}})}}]),t}(To),Bo=wp.components,zo=Bo.Button,Uo=Bo.Placeholder,Wo=wp.i18n.__,Ho=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e,t=this.props,n=t.icon,r=t.attributes,o=t.setAttributes,i=r.mode;switch(i){case"all":e=Object(E.createElement)(Io,this.props);break;case"wcb_speaker":case"wcb_speaker_group":e=Object(E.createElement)(P,{label:this.getModeLabel(i),icon:n,content:Object(E.createElement)(Io,this.props),placeholderChildren:Object(E.createElement)(Ro,this.props)});break;default:e=Object(E.createElement)(Uo,{className:S()("wordcamp-block-edit-placeholder","wordcamp-block-edit-placeholder-no-mode"),icon:n,label:fi},Object(E.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(E.createElement)(zo,{isDefault:!0,isLarge:!0,onClick:function(){o({mode:"all"})}},this.getModeLabel("all"))),Object(E.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(E.createElement)(Ro,u()({icon:n,label:Wo("Choose specific speakers or groups","wordcamporg")},this.props))))}return e}}]),t}(N),Go=wp.components,$o=Go.PanelBody,qo=Go.PanelRow,Yo=Go.SelectControl,Xo=Go.ToggleControl,Ko=wp.editor.InspectorControls,Zo=wp.element,Jo=Zo.Component,Qo=Zo.Fragment,ei=wp.i18n.__,ti={grid_columns:{default:2,minimum:2,maximum:4},avatar_size:{default:150,minimum:25,maximum:600}},ni={align_image:{},content:{},sort:{}},ri=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.show_avatars,i=t.avatar_size,a=t.avatar_align,s=t.content,u=t.show_session,l=t.sort,c=r.schema,p=void 0===c?ti:c,d=r.options,f=void 0===d?ni:d;return Object(E.createElement)(Ko,null,Object(E.createElement)(ve,this.props),Object(E.createElement)($o,{title:ei("Avatar Settings","wordcamporg"),initialOpen:!0},Object(E.createElement)(qo,null,Object(E.createElement)(Xo,{label:ei("Show avatars","wordcamporg"),checked:o,onChange:function(e){return n({show_avatars:e})}})),o&&Object(E.createElement)(Qo,null,Object(E.createElement)(qo,null,Object(E.createElement)(H,{label:ei("Size","wordcamporg"),value:Number(i),initialPosition:Number(p.avatar_size.default),onChange:function(e){return n({avatar_size:e})},rangeProps:{min:Number(p.avatar_size.minimum),max:Number(p.avatar_size.maximum)}})),Object(E.createElement)(qo,null,Object(E.createElement)(ar,{label:ei("Alignment","wordcamporg"),value:a,onChange:function(e){return n({avatar_align:e})},alignOptions:f.align_image})))),Object(E.createElement)($o,{title:ei("Content Settings","wordcamporg"),initialOpen:!1},Object(E.createElement)(qo,null,Object(E.createElement)(Yo,{label:ei("Biography Length","wordcamporg"),value:s,options:f.content,onChange:function(e){return n({content:e})}})),Object(E.createElement)(qo,null,Object(E.createElement)(Xo,{label:ei("Session Information","wordcamporg"),help:ei("Show speaker's session name, time, and track","wordcamporg"),checked:u,onChange:function(e){return n({show_session:e})}}))),Object(E.createElement)($o,{title:ei("Sorting & Filtering","wordcamporg"),initialOpen:!1},Object(E.createElement)(qo,null,Object(E.createElement)(Yo,{label:ei("Sort by","wordcamporg"),value:l,options:f.sort,onChange:function(e){return n({sort:e})}}))))}}]),t}(Jo),oi=wp.data.withSelect,ii=wp.element,ai=ii.Component,si=ii.Fragment,ui=window.WordCampBlocks.speakers||{},li=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=t.mode,o=t.layout,i=ui.options.layout,a=void 0===i?{}:i;return Object(E.createElement)(si,null,Object(E.createElement)(Ho,u()({icon:mi},this.props)),r&&Object(E.createElement)(si,null,Object(E.createElement)(ri,this.props),Object(E.createElement)(we,{layout:o,options:a,setAttributes:n})))}}]),t}(ai),ci=oi(function(e){var t=e("wordcamp").getEntities,n={wcb_speaker:t("postType","wcb_speaker",{_embed:!0}),wcb_speaker_group:t("taxonomy","wcb_speaker_group"),wcb_track:t("taxonomy","wcb_track")};return{blockData:ui,entities:n}})(li),pi=wp.i18n.__,di="wordcamp/speakers",fi=pi("Speakers","wordcamporg"),mi="megaphone",hi={title:pi("Speakers","wordcamporg"),description:pi("Add a list of speakers.","wordcamporg"),icon:mi,category:"wordcamp",supports:{align:["wide","full"]},edit:ci,save:function(){return null}},gi=wp.element.Component,bi=wp.editor.InspectorControls,vi=wp.components,Ei=vi.PanelBody,yi=vi.PanelRow,wi=vi.ToggleControl,Oi=vi.SelectControl,Ci=wp.i18n.__,ki={align_image:{},content:{},sort:{}},Si=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.show_name,i=t.show_logo,a=t.sort,s=t.content,l=r.options,c=void 0===l?ki:l;return Object(E.createElement)(bi,null,Object(E.createElement)(ve,this.props),Object(E.createElement)(Ei,{title:Ci("Content Settings","wordcamporg"),initialOpen:!0},Object(E.createElement)(yi,null,Object(E.createElement)(wi,{label:Ci("Name","wordcamporg"),help:Ci("Show or hide sponsor name","wordcamporg"),checked:o,onChange:function(e){return n({show_name:e})}})),Object(E.createElement)(yi,null,Object(E.createElement)(wi,{label:Ci("Logo","wordcamporg"),help:Ci("Show or hide sponsor logo","wordcamporg"),checked:i,onChange:function(e){return n({show_logo:e})}})),Object(E.createElement)(yi,null,Object(E.createElement)(Oi,{label:Ci("Description","wordcamporg"),value:s,options:c.content,help:Ci("Length of sponsor description","wordcamporg"),onChange:function(e){return n({content:e})}})),Object(E.createElement)(yi,null,Object(E.createElement)(Oi,{label:Ci("Sort by","wordcamporg"),options:c.sort,value:a,onChange:function(e){return n({sort:e})}}))),Object(E.createElement)(oo,u()({title:Ci("Logo size","wordcamporg"),help:Ci("Specify logo width, or select a predefined size.","wordcamporg"),selectLabel:Ci("Size","wordcamporg")},this.props)))}}]),t}(gi),xi=wp.element.Component,Ai=wp.i18n.__,_i=function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).getFilteredPosts=n.getFilteredPosts.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"getFilteredPosts",value:function(){var e=this.props,t=e.attributes,n=e.entities.wcb_sponsor,r=t.mode,o=t.item_ids,i=t.sort,a={};return Array.isArray(o)&&o.length>0&&(a.filter=[{fieldName:"wcb_sponsor"===r?"id":"wcb_sponsor_level",fieldValue:o}]),a.sort=i,Me(n,a)}},{key:"render",value:function(){var e=this.props.attributes,t=e.show_name,n=e.show_logo,r=e.content,o=e.featured_image_width,i=this.getFilteredPosts(),a=!Array.isArray(i),s=!a&&i.length>0;return a||!s?Object(E.createElement)(ae,{loading:a}):Object(E.createElement)(Oe,u()({},this.props,{className:"wordcamp-sponsors-block"}),i.map(function(e){return Object(E.createElement)("div",{key:e.slug,className:S()("wordcamp-sponsor","wordcamp-sponsor-"+e.slug)},t&&Object(E.createElement)(se,{className:"wordcamp-sponsor-title",headingLevel:3,title:e.title.rendered.trim(),link:e.link}),n&&Object(E.createElement)(zr,{imageData:Object(w.get)(e,"_embedded.wp:featuredmedia[0]",{}),width:o,className:S()("wordcamp-sponsor-featured-image","wordcamp-sponsor-logo"),imageLink:e.link}),"none"!==r&&Object(E.createElement)(ue,{className:S()("wordcamp-sponsor-content-"+r),content:"full"===r?e.content.rendered.trim():e.excerpt.rendered.trim()}),"full"===r&&Object(E.createElement)(le,{link:e.link,linkText:Ai("Visit sponsor page","wordcamporg"),className:"wordcamp-sponsor-permalink"}))}))}}]),t}(xi),ji=wp.element.Component,Fi=wp.i18n.__,Di=function(e){function t(e){var n;return c()(this,t),(n=m()(this,g()(t).call(this,e))).buildSelectOptions=n.buildSelectOptions.bind(A()(A()(n))),n.getCurrentSelectValue=n.getCurrentSelectValue.bind(A()(A()(n))),n.isLoading=n.isLoading.bind(A()(A()(n))),n}return v()(t,e),d()(t,[{key:"buildSelectOptions",value:function(){var e=this.props.entities,t=e.wcb_sponsor,n=e.wcb_sponsor_level,r=[{entityType:"post",type:"wcb_sponsor",label:Fi("Sponsors","wordcamporg"),items:t},{entityType:"term",type:"wcb_sponsor_level",label:Fi("Sponsors Levels","wordcamporg"),items:n}];return Bn(r)}},{key:"getCurrentSelectValue",value:function(){var e=this.props.attributes,t=e.mode,n=e.item_ids,r=Object(w.flatMap)(this.buildSelectOptions(),function(e){return e.options}),o=[];return t&&n.length&&(o=r.filter(function(e){return t===e.type&&Object(w.includes)(n,e.value)})),o}},{key:"isLoading",value:function(){var e=this.props.entities;return!Object(w.every)(e,function(e){return Array.isArray(e)})}},{key:"render",value:function(){var e=this.props,t=e.label,n=e.icon,r=e.setAttributes;return Object(E.createElement)(Yn,{className:"wordcamp-sponsors-select",label:t,value:this.getCurrentSelectValue(),onChange:function(e){return r(e)},selectProps:{options:this.buildSelectOptions(),isLoading:this.isLoading(),formatOptionLabel:function(e){return Object(E.createElement)(zn,u()({icon:"wcb_sponsor_level"===e.type?n:null},e))}}})}}]),t}(ji),Ni=wp.components,Pi=Ni.Button,Li=Ni.Placeholder,Mi=wp.i18n.__,Ii=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e,t=this.props,n=t.icon,r=t.attributes,o=t.setAttributes,i=r.mode;switch(i){case"all":e=Object(E.createElement)(_i,this.props);break;case"wcb_sponsor":case"wcb_sponsor_level":e=Object(E.createElement)(P,{label:this.getModeLabel(i),icon:n,content:Object(E.createElement)(_i,this.props),placeholderChildren:Object(E.createElement)(Di,this.props)});break;default:e=Object(E.createElement)(Li,{className:S()("wordcamp-block-edit-placeholder","wordcamp-block-edit-placeholder-no-mode"),icon:n,label:$i},Object(E.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(E.createElement)(Pi,{isDefault:!0,isLarge:!0,onClick:function(){o({mode:"all"})}},this.getModeLabel("all"))),Object(E.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(E.createElement)(Di,u()({icon:n,label:Mi("Choose specific sponsors or levels","wordcamporg")},this.props))))}return e}}]),t}(N),Ti=wp.element,Vi=Ti.Component,Ri=Ti.Fragment,Bi=wp.data.withSelect,zi=window.WordCampBlocks.sponsors||{},Ui=function(e){function t(){return c()(this,t),m()(this,g()(t).apply(this,arguments))}return v()(t,e),d()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=t.mode,o=t.layout,i=zi.options.layout,a=void 0===i?{}:i;return Object(E.createElement)(Ri,null,Object(E.createElement)(Ii,u()({icon:qi},this.props)),r&&Object(E.createElement)(Ri,null,Object(E.createElement)(Si,this.props),Object(E.createElement)(we,{layout:o,options:a,setAttributes:n})))}}]),t}(Vi),Wi=Bi(function(e){var t=e("wordcamp"),n=t.getEntities,r=t.getSiteSettings,o={wcb_sponsor:n("postType","wcb_sponsor",{_embed:!0}),wcb_sponsor_level:n("taxonomy","wcb_sponsor_level")};return{blockData:zi,entities:o,siteSettings:r()}})(Ui),Hi=wp.i18n.__,Gi="wordcamp/sponsors",$i=Hi("Sponsors","wordcamporg"),qi="heart",Yi={title:Hi("Sponsors","wordcamporg"),description:Hi("We wouldn't have WordCamp without their support.","wordcamporg"),icon:qi,category:"wordcamp",supports:{align:["wide","full"]},edit:Wi,save:function(){return null}},Xi=wp.blocks.registerBlockType;[r,o,i,a].forEach(function(e){var t=e.name,n=e.settings;Xi(t,n)})}]);
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/organizers/block-content.js

    r8710 r8737  
    1414import { AvatarImage }                                from '../shared/avatar';
    1515import { BlockNoContent, ItemTitle, ItemHTMLContent } from '../shared/block-content';
    16 import GridContentLayout                              from '../shared/grid-layout/block-content';
     16import PostList                                       from '../shared/post-list';
    1717import { filterEntities }                             from '../blocks-store';
    1818
     
    7878
    7979        return (
    80             <GridContentLayout
     80            <PostList
     81                { ...this.props }
    8182                className="wordcamp-organizers-block"
    82                 { ...this.props }
    8383            >
    8484                { posts.map( ( post ) => /* Note that organizer posts are not 'public', so there are no permalinks. */
    8585                    <div
    8686                        key={ post.slug }
    87                         className={ classnames(
    88                             'wordcamp-organizer',
    89                             'wordcamp-organizer-' + post.slug.trim(),
    90                         ) }
     87                        className={ classnames( 'wordcamp-organizer', 'wordcamp-organizer-' + post.slug.trim() ) }
    9188                    >
    9289                        <ItemTitle
     
    9895                        { show_avatars &&
    9996                            <AvatarImage
    100                                 className={ classnames( 'wordcamp-organizer-avatar-container', 'align-' + avatar_align ) }
     97                                className={ classnames( 'align-' + avatar_align ) }
    10198                                name={ post.title.rendered.trim() || '' }
    10299                                size={ avatar_size }
     
    113110                    </div>
    114111                ) }
    115             </GridContentLayout>
     112            </PostList>
    116113        );
    117114    }
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/organizers/edit.js

    r8710 r8737  
    1010import OrganizersBlockControls     from './block-controls';
    1111import OrganizersInspectorControls from './inspector-controls';
    12 import OrganizersToolbar           from './toolbar';
     12import { LayoutToolbar }           from '../shared/post-list';
    1313import { ICON }                    from './index';
    1414import { WC_BLOCKS_STORE }         from '../blocks-store';
     
    2626     */
    2727    render() {
    28         const { mode } = this.props.attributes;
     28        const { attributes, setAttributes }  = this.props;
     29        const { mode, layout }               = attributes;
     30        const { layout: layoutOptions = {} } = blockData.options;
    2931
    3032        return (
     
    3840                    <Fragment>
    3941                        <OrganizersInspectorControls { ...this.props } />
    40                         <OrganizersToolbar { ...this.props } />
     42                        <LayoutToolbar
     43                            layout={ layout }
     44                            options={ layoutOptions }
     45                            setAttributes={ setAttributes }
     46                        />
    4147                    </Fragment>
    4248                }
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/organizers/inspector-controls.js

    r8710 r8737  
    1010 * Internal dependencies
    1111 */
    12 import { AvatarSizeControl } from '../shared/avatar';
    13 import ImageAlignmentControl from '../shared/image-alignment';
    14 import GridInspectorControl  from '../shared/grid-layout/inspector-control';
     12import { AvatarSizeControl }  from '../shared/avatar';
     13import { GridInspectorPanel } from '../shared/post-list';
     14import ImageAlignmentControl  from '../shared/image-alignment';
    1515
    1616const DEFAULT_SCHEMA = {
     
    5050        return (
    5151            <InspectorControls>
    52                 <GridInspectorControl
     52                <GridInspectorPanel
    5353                    { ...this.props }
    5454                />
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/block-content.js

    r8711 r8737  
    1616import { ItemTitle, ItemHTMLContent, ItemPermalink, BlockNoContent } from '../shared/block-content';
    1717import { tokenSplit, arrayTokenReplace, intersperse, listify }       from '../shared/i18n';
    18 import GridContentLayout                                             from '../shared/grid-layout/block-content';
     18import PostList                                                      from '../shared/post-list';
    1919import FeaturedImage                                                 from '../shared/featured-image';
    2020import { filterEntities }                                            from '../blocks-store';
     
    250250
    251251        return (
    252             <GridContentLayout
     252            <PostList
     253                { ...this.props }
    253254                className="wordcamp-sessions-block"
    254                 { ...this.props }
    255255            >
    256256                { posts.map( ( post ) =>
    257257                    <div
    258258                        key={ post.slug }
    259                         className={ classnames(
    260                             'wordcamp-block-post-list-item',
    261                             'wordcamp-session',
    262                             'wordcamp-session-' + post.slug,
    263                             'wordcamp-clearfix'
    264                         ) }
     259                        className={ classnames( 'wordcamp-session', 'wordcamp-session-' + post.slug ) }
    265260                    >
    266261                        <ItemTitle
     
    279274                                imageData={ get( post, '_embedded.wp:featuredmedia[0]', {} ) }
    280275                                width={ Number( featured_image_width ) }
    281                                 className={ classnames( 'wordcamp-session-image-container', 'align-' + image_align ) }
     276                                className={ classnames( 'wordcamp-session-featured-image', 'align-' + image_align ) }
    282277                                imageLink={ post.link }
    283278                            />
     
    306301                                link={ post.link }
    307302                                linkText={ __( 'Visit session page', 'wordcamporg' ) }
     303                                className="wordcamp-session-permalink"
    308304                            />
    309305                        }
    310306                    </div>
    311307                ) }
    312             </GridContentLayout>
     308            </PostList>
    313309        );
    314310    }
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/edit.js

    r8711 r8737  
    1010import SessionsBlockControls     from './block-controls';
    1111import SessionsInspectorControls from './inspector-controls';
    12 import GridToolbar               from '../shared/grid-layout/toolbar';
     12import { LayoutToolbar }         from '../shared/post-list';
    1313import { ICON }                  from './index';
    1414import { WC_BLOCKS_STORE }       from '../blocks-store';
     
    2626     */
    2727    render() {
    28         const { mode } = this.props.attributes;
     28        const { attributes, setAttributes }  = this.props;
     29        const { mode, layout }               = attributes;
     30        const { layout: layoutOptions = {} } = blockData.options;
    2931
    3032        return (
     
    3739                    <Fragment>
    3840                        <SessionsInspectorControls { ...this.props } />
    39                         <GridToolbar { ...this.props } />
     41                        <LayoutToolbar
     42                            layout={ layout }
     43                            options={ layoutOptions }
     44                            setAttributes={ setAttributes }
     45                        />
    4046                    </Fragment>
    4147                }
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sessions/inspector-controls.js

    r8711 r8737  
    1010 * Internal dependencies
    1111 */
    12 import GridInspectorControl           from '../shared/grid-layout/inspector-control';
    1312import FeaturedImageInspectorControls from '../shared/featured-image/inspector-control';
     13import { GridInspectorPanel }         from '../shared/post-list';
    1414
    1515/**
     
    2929        return (
    3030            <InspectorControls>
    31                 <GridInspectorControl { ...this.props } />
     31                <GridInspectorPanel
     32                    { ...this.props }
     33                />
     34
    3235                <PanelBody title={ __( 'Content Settings', 'wordcamporg' ) } initialOpen={ true }>
    3336                    <PanelRow>
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/block-content.js

    r8712 r8737  
    1919import { ItemTitle, ItemHTMLContent, ItemPermalink, BlockNoContent } from '../shared/block-content';
    2020import { tokenSplit, arrayTokenReplace }                             from '../shared/i18n';
    21 import GridContentLayout                                             from '../shared/grid-layout/block-content';
     21import PostList                                                      from '../shared/post-list';
    2222import { filterEntities }                                            from '../blocks-store';
    2323
     
    5050                        <li
    5151                            key={ escapeAttribute( session.slug ) }
    52                             className="wordcamp-speaker-session-content"
     52                            className="wordcamp-speaker-sessions-list-item"
    5353                        >
    5454                            <Disabled>
     
    158158
    159159        return (
    160             <GridContentLayout
     160            <PostList
     161                { ...this.props }
    161162                className="wordcamp-speakers-block"
    162                 { ...this.props }
    163163            >
    164164                { posts.map( ( post ) =>
     
    179179                        { show_avatars &&
    180180                            <AvatarImage
    181                                 className={ classnames( 'wordcamp-speaker-avatar-container', 'align-' + avatar_align ) }
     181                                className={ classnames( 'align-' + avatar_align ) }
    182182                                name={ post.title.rendered.trim() || '' }
    183183                                size={ avatar_size }
     
    209209                    </div>
    210210                ) }
    211             </GridContentLayout>
     211            </PostList>
    212212        );
    213213    }
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/block-content.scss

    r8631 r8737  
    11.wordcamp-speaker-sessions-list {
    2     // The double-ampersand defeats an overzealous ul rule in Core's editor-blocks.css.
     2    // The double-ampersand will output the same class name twice in a row,
     3    // which defeats an overzealous ul rule in Core's editor-blocks.css.
    34    // https://css-tricks.com/the-sass-ampersand/#article-header-id-11
    4     ul#{&},
    5     .block-editor ul#{&} {
     5    &#{&} {
    66        list-style: none;
    77        margin: 0;
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/edit.js

    r8712 r8737  
    1010import SpeakersBlockControls     from './block-controls';
    1111import SpeakersInspectorControls from './inspector-controls';
    12 import SpeakersToolbar           from './toolbar';
     12import { LayoutToolbar }         from '../shared/post-list';
    1313import { ICON }                  from './index';
    1414import { WC_BLOCKS_STORE }       from '../blocks-store';
     
    2626     */
    2727    render() {
    28         const { mode } = this.props.attributes;
     28        const { attributes, setAttributes }  = this.props;
     29        const { mode, layout }               = attributes;
     30        const { layout: layoutOptions = {} } = blockData.options;
    2931
    3032        return (
     
    3739                    <Fragment>
    3840                        <SpeakersInspectorControls { ...this.props } />
    39                         <SpeakersToolbar { ...this.props } />
     41                        <LayoutToolbar
     42                            layout={ layout }
     43                            options={ layoutOptions }
     44                            setAttributes={ setAttributes }
     45                        />
    4046                    </Fragment>
    4147                }
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/inspector-controls.js

    r8712 r8737  
    1010 * Internal dependencies
    1111 */
    12 import { AvatarSizeControl } from '../shared/avatar';
    13 import ImageAlignmentControl from '../shared/image-alignment';
    14 import GridInspectorControl  from '../shared/grid-layout/inspector-control';
     12import { AvatarSizeControl }  from '../shared/avatar';
     13import ImageAlignmentControl  from '../shared/image-alignment';
     14import { GridInspectorPanel } from '../shared/post-list';
    1515
    1616const DEFAULT_SCHEMA = {
     
    4949        return (
    5050            <InspectorControls>
    51                 <GridInspectorControl
     51                <GridInspectorPanel
    5252                    { ...this.props }
    5353                />
     54
    5455                <PanelBody title={ __( 'Avatar Settings', 'wordcamporg' ) } initialOpen={ true }>
    5556                    <PanelRow>
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/block-content.js

    r8713 r8737  
    1414 * Internal dependencies
    1515 */
     16import { ItemTitle, ItemHTMLContent, ItemPermalink, BlockNoContent } from '../shared/block-content';
    1617import FeaturedImage                                                 from '../shared/featured-image';
    17 import GridContentLayout                                             from '../shared/grid-layout/block-content';
    18 import { ItemTitle, ItemHTMLContent, ItemPermalink, BlockNoContent } from '../shared/block-content';
     18import PostList                                                      from '../shared/post-list';
    1919import { filterEntities }                                            from '../blocks-store';
    2020
     
    8080
    8181        return (
    82             <GridContentLayout
     82            <PostList
     83                { ...this.props }
    8384                className="wordcamp-sponsors-block"
    84                 { ...this.props }
    8585            >
    8686                { posts.map( ( post ) =>
    8787                    <div
    8888                        key={ post.slug }
    89                         className={ classnames(
    90                             'wordcamp-sponsor',
    91                             'wordcamp-sponsor-' + post.slug,
    92                         ) }
     89                        className={ classnames( 'wordcamp-sponsor', 'wordcamp-sponsor-' + post.slug ) }
    9390                    >
    9491                        { show_name &&
     
    121118                                link={ post.link }
    122119                                linkText={ __( 'Visit sponsor page', 'wordcamporg' ) }
     120                                className="wordcamp-sponsor-permalink"
    123121                            />
    124122                        }
    125123                    </div>
    126124                ) }
    127             </GridContentLayout>
     125            </PostList>
    128126        );
    129127    }
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/edit.js

    r8713 r8737  
    1010import SponsorsInspectorControls from './inspector-controls';
    1111import SponsorsBlockControls     from './block-controls';
    12 import GridToolbar               from '../shared/grid-layout/toolbar';
     12import { LayoutToolbar }         from '../shared/post-list';
    1313import { ICON }                  from './index';
    1414import { WC_BLOCKS_STORE } from '../blocks-store';
     
    2626     */
    2727    render() {
    28         const { mode } = this.props.attributes;
     28        const { attributes, setAttributes }  = this.props;
     29        const { mode, layout }               = attributes;
     30        const { layout: layoutOptions = {} } = blockData.options;
    2931
    3032        return (
     
    3739                    <Fragment>
    3840                        <SponsorsInspectorControls { ...this.props } />
    39                         <GridToolbar { ...this.props } />
     41                        <LayoutToolbar
     42                            layout={ layout }
     43                            options={ layoutOptions }
     44                            setAttributes={ setAttributes }
     45                        />
    4046                    </Fragment>
    4147                }
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/sponsors/inspector-controls.js

    r8713 r8737  
    1010 * Internal dependencies
    1111 */
    12 import GridInspectorControl           from '../shared/grid-layout/inspector-control';
     12import { GridInspectorPanel }         from '../shared/post-list';
    1313import FeaturedImageInspectorControls from '../shared/featured-image/inspector-control';
    1414
     
    3535        return (
    3636            <InspectorControls>
    37                 <GridInspectorControl
     37                <GridInspectorPanel
    3838                    { ...this.props }
    3939                />
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/blocks.php

    r8628 r8737  
    1515    require_once PLUGIN_DIR . 'includes/shared/definitions.php';
    1616    require_once PLUGIN_DIR . 'includes/shared/featured-image.php';
    17     require_once PLUGIN_DIR . 'includes/shared/grid-layout.php';
     17    require_once PLUGIN_DIR . 'includes/shared/post-list.php';
    1818
    1919    require_once PLUGIN_DIR . 'includes/organizers.php';
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/includes/organizers.php

    r8710 r8737  
    33namespace WordCamp\Blocks\Organizers;
    44use WordCamp\Blocks;
     5use function WordCamp\Blocks\Shared\Components\{ render_post_list };
    56use function WordCamp\Blocks\Shared\Definitions\{ get_shared_definitions, get_shared_definition };
    67
     
    3536 */
    3637function render( $attributes ) {
    37     $html       = '';
    3838    $defaults   = wp_list_pluck( get_attributes_schema(), 'default' );
    3939    $attributes = wp_parse_args( $attributes, $defaults );
    40     $organizers = get_organizer_posts( $attributes );
     40
     41    $organizers               = get_organizer_posts( $attributes );
     42    $rendered_organizer_posts = [];
     43
     44    foreach ( $organizers as $organizer ) {
     45        ob_start();
     46        require Blocks\PLUGIN_DIR . 'view/organizer.php';
     47        $rendered_organizer_posts[] = ob_get_clean();
     48    }
    4149
    4250    $container_classes = [
    43         'wordcamp-block',
    44         'wordcamp-block-post-list',
    4551        'wordcamp-organizers-block',
    46         'layout-' . sanitize_html_class( $attributes['layout'] ),
    4752        sanitize_html_class( $attributes['className'] ),
    4853    ];
    4954
    50     if ( 'grid' === $attributes['layout'] ) {
    51         $container_classes[] = 'grid-columns-' . absint( $attributes['grid_columns'] );
    52     }
    5355    if ( ! empty( $attributes['align'] ) ) {
    5456        $container_classes[] = 'align' . sanitize_html_class( $attributes['align'] );
    5557    }
    5658
    57     $container_classes = implode( ' ', $container_classes );
    58 
    59     if ( $attributes['mode'] ) {
    60         ob_start();
    61         require Blocks\PLUGIN_DIR . 'view/organizers.php';
    62         $html = ob_get_clean();
    63     }
    64 
    65     return $html;
     59    return render_post_list( $rendered_organizer_posts, $attributes['layout'], $attributes['grid_columns'], $container_classes );
    6660}
    6761
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/includes/sessions.php

    r8711 r8737  
    33namespace WordCamp\Blocks\Sessions;
    44use WordCamp\Blocks;
    5 use function WordCamp\Blocks\Shared\Components\{ render_grid_layout };
     5use function WordCamp\Blocks\Shared\Components\{ render_post_list };
    66use function WordCamp\Blocks\Shared\Definitions\{ get_shared_definitions, get_shared_definition };
    77
     
    3636 */
    3737function render( $attributes ) {
    38     if ( ! $attributes['mode'] ) {
    39         return;
    40     }
    41 
    42     $html       = '';
    4338    $defaults   = wp_list_pluck( get_attributes_schema(), 'default' );
    4439    $attributes = wp_parse_args( $attributes, $defaults );
     
    5045    }
    5146
     47    $rendered_session_posts = [];
     48
     49    foreach ( $sessions as $session ) {
     50        ob_start();
     51        require Blocks\PLUGIN_DIR . 'view/session.php';
     52        $rendered_session_posts[] = ob_get_clean();
     53    }
     54
    5255    $container_classes = [
    53         'wordcamp-block',
    54         'wordcamp-block-post-list',
    5556        'wordcamp-sessions-block',
    5657        sanitize_html_class( $attributes['className'] ),
    5758    ];
     59
    5860    if ( ! empty( $attributes['align'] ) ) {
    5961        $container_classes[] = 'align' . sanitize_html_class( $attributes['align'] );
    6062    }
    6163
    62     $rendered_session_posts = [];
    63     foreach ( $sessions as $session ) {
    64         ob_start();
    65         require Blocks\PLUGIN_DIR . 'view/sessions.php';
    66         $rendered_session_posts[] = ob_get_clean();
    67     }
    68 
    69     $html = render_grid_layout(
    70         $attributes['layout'],
    71         $attributes['grid_columns'],
    72         $rendered_session_posts,
    73         $container_classes
    74     );
    75 
    76     return $html;
     64    return render_post_list( $rendered_session_posts, $attributes['layout'], $attributes['grid_columns'], $container_classes );
    7765}
    7866
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/includes/shared/content.php

    r8628 r8737  
    7474    return $list;
    7575}
     76
     77/**
     78 * Convert an array of class names into a space-separated string for use in an HTML attribute.
     79 *
     80 * @param array $classes
     81 *
     82 * @return string
     83 */
     84function render_class_string( array $classes ) {
     85    $classes = array_map( 'sanitize_html_class', $classes );
     86    $classes = array_filter( $classes );
     87    $classes = array_unique( $classes );
     88
     89    return implode( ' ', $classes );
     90}
     91
     92/**
     93 * Render HTML for a title with specified heading level and optionally a link.
     94 *
     95 * @param string $title
     96 * @param string $link
     97 * @param int    $heading_level
     98 * @param array  $classes
     99 *
     100 * @return false|string
     101 */
     102function render_item_title( $title, $link = '', $heading_level = 3, array $classes = [] ) {
     103    $valid_heading_levels = [ 1, 2, 3, 4, 5, 6 ];
     104
     105    if ( ! in_array( $heading_level, $valid_heading_levels, true ) ) {
     106        $heading_level = 3;
     107    }
     108
     109    $tag = 'h' . $heading_level;
     110
     111    $classes = render_class_string( array_merge(
     112        [ 'wordcamp-item-title' ],
     113        $classes
     114    ) );
     115
     116    ob_start();
     117    ?>
     118        <<?php echo esc_html( $tag ); ?> class="<?php echo esc_attr( $classes ); ?>">
     119            <?php if ( $link ) : ?>
     120                <a href="<?php echo esc_url( $link ); ?>">
     121            <?php endif; ?>
     122                    <?php echo wp_kses_post( $title ); ?>
     123            <?php if ( $link ) : ?>
     124                </a>
     125            <?php endif; ?>
     126        </<?php echo esc_html( $tag ); ?>>
     127    <?php
     128
     129    return ob_get_clean();
     130}
     131
     132/**
     133 * Render arbitrary HTML content within a div container.
     134 *
     135 * @param string $content
     136 * @param array  $classes
     137 *
     138 * @return false|string
     139 */
     140function render_item_content( $content, array $classes = [] ) {
     141    $classes = render_class_string( array_merge(
     142        [ 'wordcamp-item-content' ],
     143        $classes
     144    ) );
     145
     146    ob_start();
     147    ?>
     148        <div class="<?php echo esc_attr( $classes ); ?>">
     149            <?php echo wp_kses_post( wpautop( $content ) ); ?>
     150        </div>
     151    <?php
     152
     153    return ob_get_clean();
     154}
     155
     156/**
     157 * Render HTML for a permalink wrapped in its own paragraph.
     158 *
     159 * @param string $link
     160 * @param string $label
     161 * @param array  $classes
     162 *
     163 * @return false|string
     164 */
     165function render_item_permalink( $link, $label = '', array $classes = [] ) {
     166    if ( ! $label ) {
     167        $label = __( 'Read more', 'wordcamporg' );
     168    }
     169
     170    $classes = render_class_string( array_merge(
     171        [ 'wordcamp-item-permalink' ],
     172        $classes
     173    ) );
     174
     175    ob_start();
     176    ?>
     177        <p class="<?php echo esc_attr( $classes ); ?>">
     178            <a href="<?php echo esc_url( $link ); ?>">
     179                <?php echo esc_html( $label ); ?>
     180            </a>
     181        </p>
     182    <?php
     183
     184    return ob_get_clean();
     185}
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/includes/speakers.php

    r8712 r8737  
    33namespace WordCamp\Blocks\Speakers;
    44use WordCamp\Blocks;
     5use function WordCamp\Blocks\Shared\Components\{ render_post_list };
    56use function WordCamp\Blocks\Shared\Definitions\{ get_shared_definitions, get_shared_definition };
    67
     
    3536 */
    3637function render( $attributes ) {
    37     $html       = '';
    3838    $defaults   = wp_list_pluck( get_attributes_schema(), 'default' );
    3939    $attributes = wp_parse_args( $attributes, $defaults );
     
    4545    }
    4646
     47    $rendered_speaker_posts = [];
     48
     49    foreach ( $speakers as $speaker ) {
     50        ob_start();
     51        require Blocks\PLUGIN_DIR . 'view/speaker.php';
     52        $rendered_speaker_posts[] = ob_get_clean();
     53    }
     54
    4755    $container_classes = [
    48         'wordcamp-block',
    49         'wordcamp-block-post-list',
    5056        'wordcamp-speakers-block',
    51         'layout-' . sanitize_html_class( $attributes['layout'] ),
    5257        sanitize_html_class( $attributes['className'] ),
    5358    ];
    54     if ( 'grid' === $attributes['layout'] ) {
    55         $container_classes[] = 'grid-columns-' . absint( $attributes['grid_columns'] );
    56     }
     59
    5760    if ( ! empty( $attributes['align'] ) ) {
    5861        $container_classes[] = 'align' . sanitize_html_class( $attributes['align'] );
    5962    }
    60     $container_classes = implode( ' ', $container_classes );
    61 
    62     if ( $attributes['mode'] ) {
    63         ob_start();
    64         require Blocks\PLUGIN_DIR . 'view/speakers.php';
    65         $html = ob_get_clean();
    66     }
    67 
    68     return $html;
     63
     64    return render_post_list( $rendered_speaker_posts, $attributes['layout'], $attributes['grid_columns'], $container_classes );
    6965}
    7066
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/includes/sponsors.php

    r8713 r8737  
    33namespace WordCamp\Blocks\Sponsors;
    44use WordCamp\Blocks;
    5 use function WordCamp\Blocks\Shared\Components\{ render_grid_layout };
     5use function WordCamp\Blocks\Shared\Components\{ render_post_list };
    66use function WordCamp\Blocks\Shared\Definitions\{ get_shared_definitions, get_shared_definition };
    77
     
    3636    $defaults   = wp_list_pluck( get_attributes_schema(), 'default' );
    3737    $attributes = wp_parse_args( $attributes, $defaults );
    38     $sponsors   = get_sponsor_posts( $attributes );
    39 
    40     $container_classes = array(
    41         'wordcamp-block',
    42         'wordcamp-block-post-list',
     38
     39    $sponsors               = get_sponsor_posts( $attributes );
     40    $rendered_sponsor_posts = [];
     41
     42    foreach ( $sponsors as $sponsor ) {
     43        ob_start();
     44        require Blocks\PLUGIN_DIR . 'view/sponsor.php';
     45        $rendered_sponsor_posts[] = ob_get_clean();
     46    }
     47
     48    $container_classes = [
    4349        'wordcamp-sponsors-block',
    4450        sanitize_html_class( $attributes['className'] ),
    45     );
     51    ];
     52
    4653    if ( ! empty( $attributes['align'] ) ) {
    4754        $container_classes[] = 'align' . sanitize_html_class( $attributes['align'] );
    4855    }
    4956
    50     $rendered_sponsor_posts = array();
    51 
    52     foreach ( $sponsors as $sponsor ) {
    53         ob_start();
    54         require Blocks\PLUGIN_DIR . 'view/sponsors.php';
    55         $rendered_sponsor_posts[] = ob_get_clean();
    56     }
    57 
    58     $html = render_grid_layout( $attributes['layout'], $attributes['grid_columns'], $rendered_sponsor_posts, $container_classes );
    59 
    60     return $html;
     57    return render_post_list( $rendered_sponsor_posts, $attributes['layout'], $attributes['grid_columns'], $container_classes );
    6158}
    6259
Note: See TracChangeset for help on using the changeset viewer.