<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[8585] sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets: WordCamp Blocks: Fix issues with SpeakerSessions component</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/8585">8585</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/8585","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>coreymckrill</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2019-04-03 23:08:10 +0000 (Wed, 03 Apr 2019)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>WordCamp Blocks: Fix issues with SpeakerSessions component
* Account for tracks being null instead of an array if the data
hasn't finished loading yet.
* Use correct syntax for `arrayTokenReplace` to display session
info.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetsblocksminjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/blocks.min.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcspeakersblockcontentjs">sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/block-content.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetsblocksminjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/blocks.min.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/blocks.min.js 2019-04-03 23:00:09 UTC (rev 8584)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/blocks.min.js 2019-04-03 23:08:10 UTC (rev 8585)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9,4 +9,4 @@
</span><span class="cx" style="display: block; padding: 0 10px"> Licensed under the MIT License (MIT), see
</span><span class="cx" style="display: block; padding: 0 10px"> http://jedwatson.github.io/classnames
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var i=o.apply(null,r);i&&e.push(i)}else if("object"===a)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){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 i}),n.d(t,"a",funct
ion(){return s});var r=n(30),o=void 0!==e?e:{},a=Object(r.a)(o),i=(a.flush,a.hydrate,a.cx,a.merge,a.getRegisteredStyles,a.injectGlobal),s=(a.keyframes,a.css);a.sheet,a.caches}).call(this,n(18))},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,n){var r=n(16),o=n(31),a=n(17);e.exports=function(e,t){return r(e)||o(e,t)||a()}},function(e,t){e.exports=ReactDOM},function(e,t,n){e.exports=n(39)()},function(e,t,n){"use strict";var r=s(n(43)),o=s(n(48)),a=s(n(22)),i=s(n(19));function s(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:i.default,TransitionGroup:a.default,ReplaceTransition:o.default,CSSTransition:r.default}},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){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){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(13)),o=s(n(0)),a=s(n(12)),i=n(20);n(21);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,a=n.transitionGroup,i=a&&!a.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(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=a.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,a=this.getTimeouts(),i=o?a.appear:a.enter;t||r?(this.props.onEnter(e,o),this.safeSetState({status:c},function(){n.props.onEntering(e,o),n.onTransitionEnd(e,i,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"},fun
ction(){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{};va
r n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[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 a=o.default.Children.only(n);return o.default.cloneElement(a,r)},t}(o.default.Component);function m(){}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:m,onEntering:m,onEntered:m,onExit:m,onExiting:m,onExited:m},d.UNMOUNTED=0,d.EXITED=1,d.ENTERING=2,d.ENTERED=3,d.EXITING=4;var f=(0,i.polyfill)(d);t.default=f},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 a(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 i(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,i=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps
":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==i||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!==i?"\n "+i:"")+(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(&q
uot;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=a;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 i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;!function(e){e&&e.__esModule}(n(13));t.timeoutsShape=null;t.classNamesShape=null},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(13)),o=s(n(0)
),a=n(20),i=n(49);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.getDerivedStateFr
omProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?(0,i.getInitialChildMapping)(e,r):(0,i.getNextChildMapping)(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=(0,i.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={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},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
,a.polyfill)(p);t.default=d,e.exports=t.default},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,n){var r=n(15);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){e.exports=function(){"use strict";return function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,a,i,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(41),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",s=o["request"+i],u=o["cancel"+i]||o["cancelRequest"+i],l=0;!s&&l<a.length;l++)s=o[a[l]+"Request"+i],u=o[a[l]+"Cancel"+i]||o[a[l]+"CancelRequest"+i];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.p
olyfill=function(e){e||(e=o),e.requestAnimationFrame=s,e.cancelAnimationFrame=u}}).call(this,n(18))},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}}(),a=n(0),i=u(a),s=u(n(13));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","inp
utStyle","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),m=function(){return d?"_"+Math.random().toString(36).substr(2,12):void 0},f=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.p
rops.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||m()},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,a.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||m()})}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onA
utosize(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&q
uot;,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?i.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 functio
n(e){c.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}();f.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.a
ny},f.defaultProps={minWidth:1,injectStyles:!0},t.default=f},function(e,t,n){var r=n(51),o=n(23),a=n(52);e.exports=function(e){return r(e)||o(e)||a()}},function(e,t,n){var r=n(16),o=n(23),a=n(17);e.exports=function(e){return r(e)||o(e)||a()}},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 a=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 i=function(e){function t(e,t,r){var o=t.trim().split(f);t=o;var a=o.length,i=e.length;switch(i){case 0:case 1:var s=0;for(e=0===i?"":e[0]+" ";s<a;++s)t[s]=n(e,t[s],r).t
rim();break;default:var u=s=0;for(t=[];s<a;++s)for(var l=0;l<i;++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,a){var i=e+";",s=2*t+3*n+4*a;if(944===s){e=i.indexOf(":",9)+1;var u=i.substring(e,i.length-1).trim();return u=i.substring(0,e).trim()+u+";",1===j||2===j&&o(u,1)?"-webkit-"+u+u:u}if(0===j||2===j&&!o(i,1))return i;switch(s){case 1015:return 97===i.charCodeAt(10)?"-webkit-"+i+i:i;case 951:return 116===i.charCodeAt(3)?"-webkit-"+i+i:i;case 963:return 110===i.charCodeAt(5)?"-webkit-"+i+i:i;case 1009:if(100!==
i.charCodeAt(4))break;case 969:case 942:return"-webkit-"+i+i;case 978:return"-webkit-"+i+"-moz-"+i+i;case 1019:case 983:return"-webkit-"+i+"-moz-"+i+"-ms-"+i+i;case 883:if(45===i.charCodeAt(8))return"-webkit-"+i+i;if(0<i.indexOf("image-set(",11))return i.replace(S,"$1-webkit-$2")+i;break;case 932:if(45===i.charCodeAt(4))switch(i.charCodeAt(5)){case 103:return"-webkit-box-"+i.replace("-grow","")+"-webkit-"+i+"-ms-"+i.replace("grow","positive")+i;case 115:return"-webkit-"+i+"-ms-"+i.replace("shrink","negative")+i;case 98:return"-webkit-"+i+"-ms-"+i.replace("basis","preferred-size")+i}return"-webkit-"+i+"-ms-"+i+i;case 964:return"-webkit-"+i+"-ms-flex-"+i+i;case 1023:if(99!==i.charCodeAt(8))break;return"
;-webkit-box-pack"+(u=i.substring(i.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+i+"-ms-flex-pack"+u+i;case 1005:return d.test(i)?i.replace(p,":-webkit-")+i.replace(p,":-moz-")+i:i;case 1e3:switch(t=(u=i.substring(13).trim()).indexOf("-")+1,u.charCodeAt(0)+u.charCodeAt(t)){case 226:u=i.replace(E,"tb");break;case 232:u=i.replace(E,"tb-rl");break;case 220:u=i.replace(E,"lr");break;default:return i}return"-webkit-"+i+"-ms-"+u+i;case 1017:if(-1===i.indexOf("sticky",9))break;case 975:switch(t=(i=e).length-10,s=(u=(33===i.charCodeAt(t)?i.substring(0,t):i).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|u.charCodeAt(7))){case 203:if(111>u.charCodeAt(8))break;case 115:i=i.replace(u,"-webkit-"+u)+";"+i;break;case 207:case 102:i=i.replace(u,"-webki
t-"+(102<s?"inline-":"")+"box")+";"+i.replace(u,"-webkit-"+u)+";"+i.replace(u,"-ms-"+u+"box")+";"+i}return i+";";case 938:if(45===i.charCodeAt(5))switch(i.charCodeAt(6)){case 105:return"-webkit-"+i+"-webkit-box-"+(u=i.replace("-items",""))+"-ms-flex-"+u+i;case 115:return"-webkit-"+i+"-ms-flex-item-"+i.replace(O,"")+i;default:return"-webkit-"+i+"-ms-flex-line-pack"+i.replace("align-content","").replace(O,"")+i}break;case 973:case 989:if(45!==i.charCodeAt(3)||122===i.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,a).replace(":fill-available",":stretch"):i.replace(u,"-webkit-"+u)+i
.replace(u,"-moz-"+u.replace("fill-",""))+i;break;case 962:if(i="-webkit-"+i+(102===i.charCodeAt(5)?"-ms-"+i:"")+i,211===n+a&&105===i.charCodeAt(13)&&0<i.indexOf("transform",10))return i.substring(0,i.indexOf(";",27)+1).replace(m,"$1-webkit-$2")+i}return i}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),N(2!==t?r:r.replace(C,"$1"),n,t)}function a(e,t){var n=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(y," or ($1)").substring(4):"("+t+")"}function i(e,t,n,r,o,a,i,s,l,c){for(var p,d=0,m=t;d<P;++d)switch(p=F[d].call(u,e,m,n,r,o,a,i,s,l,c)){case void 0:case!1:case!0:case null:break;default:m=p}if(m!==t)return m}function s(e){return void 0!==(e=e.prefix)&&(N=null,e?"function"!=typeof e?j=1:(j=2
,N=e):j=0),s}function u(e,n){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<P){var u=i(-1,n,s,s,x,_,0,0,0,0);void 0!==u&&"string"==typeof u&&(n=u)}var p=function e(n,s,u,p,d){for(var m,f,h,E,y,O=0,C=0,k=0,S=0,F=0,N=0,L=h=m=0,I=0,T=0,R=0,V=0,B=u.length,z=B-1,U="",W="",H="",G="";I<B;){if(f=u.charCodeAt(I),I===z&&0!==C+S+k+O&&(0!==C&&(f=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(f){case 32:case 9:case 59:case 13:case 10:break;default:U+=u.charAt(I)}f=59}switch(f){case 123:for(m=(U=U.trim()).charCodeAt(0),h=1,V=++I;I<B;){switch(f=u.charCodeAt(I)){case 123:h++;break;case 125:h--;break;case 47:switch(f=u.charCodeAt(I+1)){case 42:case 47:e:{for(L=I+1;L<z;++L)switch(u.charCodeAt(L)){case 47:if(42===f&&42===u.charCodeAt(L-1)&&I+2!==L){I=L+1;break e}break;case 10:if(
47===f){I=L+1;break e}}I=L}}break;case 91:f++;case 40:f++;case 34:case 39:for(;I++<z&&u.charCodeAt(I)!==f;);}if(0===h)break;I++}switch(h=u.substring(V,I),0===m&&(m=(U=U.replace(l,"").trim()).charCodeAt(0)),m){case 64:switch(0<T&&(U=U.replace(c,"")),f=U.charCodeAt(1)){case 100:case 109:case 115:case 45:T=s;break;default:T=D}if(V=(h=e(s,T,h,f,d+1)).length,0<P&&(y=i(3,h,T=t(D,U,R),s,x,_,V,f,d,p),U=T.join(""),void 0!==y&&0===(V=(h=y.trim()).length)&&(f=0,h="")),0<V)switch(f){case 115:U=U.replace(w,a);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,R),h,p,d+1)}H+=h,h=R=T=L=m=0,U="",f=u
.charCodeAt(++I);break;case 125:case 59:if(1<(V=(U=(0<T?U.replace(c,""):U).trim()).length))switch(0===L&&(m=U.charCodeAt(0),45===m||96<m&&123>m)&&(V=(U=U.replace(" ",":")).length),0<P&&void 0!==(y=i(1,U,s,n,x,_,W.length,p,d,p))&&0===(V=(U=y.trim()).length)&&(U="\0\0"),m=U.charCodeAt(0),f=U.charCodeAt(1),m){case 0:break;case 64:if(105===f||99===f){G+=U+u.charAt(I);break}default:58!==U.charCodeAt(V-1)&&(W+=r(U,m,f,U.charCodeAt(2)))}R=T=L=m=0,U="",f=u.charCodeAt(++I)}}switch(f){case 13:case 10:47===C?C=0:0===1+m&&107!==p&&0<U.length&&(T=1,U+="\0"),0<P*M&&i(0,U,s,n,x,_,W.length,p,d,p),_=1,x++;break;case 59:case 125:if(0===C+S+k+O){_++;break}default:switch(_++,E=u.charAt(I),f){case 9:case 32:if(0===S+O+C)switch(F){case 44:case 58:case 9:case 32:E="";break;default:32!==f&&(E=" ")}break;case 0:E=
"\\0";break;case 12:E="\\f";break;case 11:E="\\v";break;case 38:0===S+C+O&&(T=R=1,E="\f"+E);break;case 108:if(0===S+C+O+A&&0<L)switch(I-L){case 2:112===F&&58===u.charCodeAt(I-3)&&(A=F);case 8:111===N&&(A=N)}break;case 58:0===S+C+O&&(L=I);break;case 44:0===C+k+S+O&&(T=1,E+="\r");break;case 34:case 39:0===C&&(S=S===f?0:0===S?f: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===m)switch(2*F+3*N){case 533:break;default:m=1}k++}break;case 64:0===C+k+S+O+L+h&&(h=1);break;case 42:case 47:if(!(0<S+O+k))switch(C){case 0:switch(2*f+3*u.charCodeAt(I+1)){case 235:C=47;break;case 220:V=I,C=42}break;case 42:47===f&&42===F&&V+2!==I&&(33===u.charCodeAt(V+2)&&(W+=u.substring(V,I+1)),E="",C=0)}}0===C&&(U+=E)}N=F,F=f,I++}if(0<(
V=W.length)){if(T=s,0<P&&void 0!==(y=i(2,W,T,n,x,_,V,p,d,p))&&0===(W=y).length)return G+W+H;if(W=T.join(",")+"{"+W+"}",0!=j*A){switch(2!==j||o(W,2)||(A=0),A){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}A=0}}return G+W+H}(D,s,n,0,0);return 0<P&&void 0!==(u=i(-2,p,s,s,x,_,p.length,0,0,0))&&(p=u),A=0,_=x=1,p}var l=/^\0+/g,c=/[\0\r\f]/g,p=/: */g,d=/zoo|gra/,m=/([,: ])(transform)/g,f=/,\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}/,w=/\(\s*(.*)\s*\)/g,y=/([\s\S]*?);/g,O=/-self|flex-/g,C=/[^]*?(:[rp][el]a[\w-]+)[^]*/,k=/stretch|:\s*\w+\-(?:conte|avail)/,S=/([^-])(image-set\()/,_=1,x=1,A=0,j=1,D=[],F=[],P=0,N=null,M=0;return u.use=function e(t){switch(t){case void 0:case null:P=F.length=0;break;default:switch(t.constructo
r){case Array:for(var n=0,r=t.length;n<r;++n)e(t[n]);break;case Function:F[P++]=t;break;case Boolean:M=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 a=t[r];if(null!=a){var i=void 0;switch(typeof a){case"boolean":break;case"function":0,i=e([a()]);break;case"object":if(Array.isArray(a))i=e(a);else for(var s in i="",a)a[s]&&s&&(i&&(i+=" "),i+=s);break;default:i=a}i&&(o&&(o+=" "),o+=i)}}return o},m="undefined"!=typeof document;function f(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),voi
d 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]=f(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=f(this.opts);this.tags.push(r),r.appendChild(document.createTextNode(e+(t||"")))}this.ctr++,this.ctr%65e3==0&&this.tags.push(f(this.opts))},t.flush=f
unction(){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,m&&f.insert(e,b)});void 0!==t.prefix&&(r={prefix:t.prefix});var l={registered:{},inserted:{},nonce:t.nonce,key:o},f=new h(t);m&&f.inject();var g=new i(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(y.has(e))return y.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),y.set(e,t),t}.call(this,e);default:var r=l.registered[e];return!1===t&&void 0!==r?r:e}}var E,w,y=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,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return i.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),w=n,n=n.replace(O,function(e,t){return r+="-"+t,""}),E=function(e,t){return a(e+t)+t}(n,r),n};function k(e,t){void 0===l.i
nserted[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]=w),k("."+t,e),t};function _(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==l.registered[t]?e.push(t):n+=t+" "}),n}function x(e,t){var n=[],r=_(n,e);return n.length<2?e:r+S(n,t)}function A(e){l.inserted[e]=!0}if(m){var j=document.querySelectorAll("[data-emotion-"+o+"]");Array.prototype.forEach.call(j,function(e){f.tags[0].parentNode.insertBefore(e,f.tags[0]),e.getAttribute("data-emotion-"+o).split(" ").forEach(A)})}var D={flush:function(){m&&(f.flush(),f.inject()),l.inserted={},l.registered={}},hydrate:function(e){e.forEach(A)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return x(d(t))},merge:x,getRegisteredStyles:_,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:f,caches:l};return e.__SECRET_EMOTION__=D,D}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}},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,n){"use strict";var r=n(40);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==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}},funct
ion(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,a,i,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()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),s=1e9*t.uptime(),i=a-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(42))},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{r
eturn n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var u,l=[],c=!1,p=-1;function d(){c&&u&&(c=!1,u.length?l=u.concat(l):p=-1,l.length&&m())}function m(){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===i||!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 f(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 f(e,t)),1!==l.length||c||s(m)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browse
r",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(13));var r=s(n(44)),o=s(n(47)),a=s(n(0)),i=s(n(19));n(21);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.getClassNam
es("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.proto
type=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,a=n.doneClassName;r&&c(e,r),o&&c(e,o),a&&c(e,a)},n.reflowAndAddClass=function(e,t){t&&(e&&e.scrollTop,l(e,t))},n.render=function(){var e=u({},this.props);return delete e.classNames,a.default.createElement(i.default,u({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(a.default.Component);p.propTypes={};var d=p;t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(45);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||"")+&qu
ot; "+t))};var o=r(n(46));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;i(n(13));var r=i(n(0)),o=n(12),a=i(n(22));function i(e){return e&&e.__e
sModule?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 a,i=this.props.children,s=r.default.Children.toArray(i)[t];s.props[e]&&(a=s.props)[e].apply(a,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={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),s=i[0],u=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(s,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handle
Entered}):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=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var s=o(e.children),u=a(t,s);return Object.keys(u).forEach(function(o){var a=u[o];if((0,r.isValidElement)(a)){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)(a,{onExited:n.bind(null,a),in:p.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):u[o]=(0,r.cl
oneElement)(a,{in:!1}):u[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"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 a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);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<a.length;r++)s[a[r]]=n(a[r]);return s}function i(e,t,n){return null!=n[t]?n[t]:e.props[t]}},function(e,t,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){},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"name",function(){return yr}),n.d(r,"LABEL",function(){return Or}),n.d(r,"ORGANIZERS_ICON",function(){return Cr}),n.d(r,"settings",function(){return kr});var o={};n.r(o),n.d(o,"name",function(){return Vo}),n.d(o,"LABEL",function(){return Bo}),n.d(o,"SESSIONS_ICON",function(){return zo}),n.d(o,"settings",function(){return Uo});var a={};n.r(a),n.d(a,"name",function(){return Va}),n.d(a,"LABEL",function(){return Ba}),n.d(a,"SPEAKERS_ICON",function(){return za}),n.d(a,"settings",function(){return Ua});var i={};n.r(i),n.d(i,"name",function(){return bi}),n.d(i,"LABEL",function(){return vi}),n.d(i,"SPONSORS_ICON",function(){return Ei}),n.d(i,"settings",function(){return wi});var s=n(11),u=n.n(s),l=n(8),c=n.n(l),p=n(1),d=n.n(p),m=
n(2),f=n.n(m),h=n(3),g=n.n(h),b=n(4),v=n.n(b),E=n(5),w=n.n(E);var y=n(0),O=n.n(y),C=n(6);var k=n(12);var S=Object(y.createContext)();S.Provider,S.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",&q
uot;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 _=n(7),x=n.n(_),A=n(10),j=n.n(A),D=(n(34),wp.components),F=D.Placeholder,P=D.Spinner,N=wp.element,M=N.Component,L=N.Fragment,I=wp.i18n.__,T=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this))).getModeLabel=n.getModeLabel.bind(j()(j()(n))),n}return w()(t,e),f()(t,[{key:"getModeLabel",value:function(e){return this.props.blockData.options.mode.find(function(t){return e===t.value}).label}}]),t}(M);function R(e){var t=e.className,n=e.icon,r=e.label,o=e.loading,a=["wordcamp-block-edit
-placeholder","wordcamp-block-edit-placeholder-no-content",t];return Object(y.createElement)(F,{className:x()(a),icon:n,label:r},o?Object(y.createElement)(P,null):I("No content found.","wordcamporg"))}function V(e){var t=e.className,n=e.label,r=e.icon,o=e.content,a=e.placeholderChildren,i=["wordcamp-block-edit-placeholder","wordcamp-block-edit-placeholder-specific-mode",t];return Object(y.createElement)(L,null,o,Object(y.createElement)(F,{className:x()(i),label:n,icon:r},a))}var B=wp.components.Disabled,z=wp.i18n,U=z.__,W=z.sprintf,H=wp.url,G=H.addQueryArgs,$=H.isURL;var q=function(e){var t=e.className,n=e.name,r=e.size,o=e.url,a=e.imageLink,i=function(e,t){return G(e,{s:t})},s=Object(y.createElement)("img",{className:x()("avatar","avatar-"+r,"photo"),src:i(o,r),srcSet:i(o,2*r)+" 2x",alt:n?W(U("Avatar of %s","wordcamporg"),n):"",width:r,height:r});re
turn $(a)&&(s=Object(y.createElement)(B,null,Object(y.createElement)("a",{href:a,className:x()("wordcamp-image-link","wordcamp-avatar-link")},s))),s=Object(y.createElement)("div",{className:x()("wordcamp-image-container","wordcamp-avatar-container",t)},s)},Y=(n(35),wp.components.Disabled),X=wp.element,K=X.Fragment,Z=X.RawHTML,Q=wp.htmlEntities.decodeEntities,J=wp.i18n.__;function ee(e){var t=e.headingLevel,n=e.className,r=e.title,o=e.link,a="h3";[1,2,3,4,5,6].includes(t)&&(a="h"+t);var i=["wordcamp-item-title",n],s=r||J("(Untitled)","wordcamporg");return Object(y.createElement)(a,{className:x()(i)},o&&Object(y.createElement)(Y,null,Object(y.createElement)("a",{href:o},Q(s))),!o&&Object(y.createElement)(K,null,Q(s)))}function te(e){var t=e.className,n=e.content,r=e.link,o=e.linkText,a=["wordcamp-item-content",t];return Objec
t(y.createElement)("div",{className:x()(a)},Object(y.createElement)(Y,null,Object(y.createElement)(Z,{children:n}),r&&Object(y.createElement)("p",{className:"wordcamp-item-permalink"},Object(y.createElement)("a",{href:r},o||J("Read more","wordcamporg")))))}n(36);var ne=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return w()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.className,r=e.children,o=t.grid_columns,a=t.layout,i=["layout-"+a,n,"wordcamp-block-post-list"];return"grid"===a&&i.push("grid-columns-"+Number(o)),Object(y.createElement)("ul",{className:x()(i)},(r||[]).map(function(e){return Object(y.createElement)("li",{className:x()("wordcamp-grid-layout-item","wordcamp-block-post-list-item","wordcamp-clearfix")},e)}))}}]),t}(wp.element.C
omponent),re=(n(37),wp.components.Disabled,wp.element.Component),oe=wp.htmlEntities.decodeEntities,ae=wp.i18n.__,ie=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return w()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.organizerPosts,r=t.show_avatars,o=t.avatar_size,a=t.avatar_align,i=t.content,s=t.excerpt_more;return Object(y.createElement)(ne,this.props,n.map(function(e){return Object(y.createElement)("div",{key:e.slug,className:x()("wordcamp-organizer","wordcamp-organizer-"+oe(e.slug))},Object(y.createElement)(ee,{className:"wordcamp-organizer-title",headingLevel:3,title:e.title.rendered.trim(),link:e.link}),r&&Object(y.createElement)(q,{className:x()("wordcamp-organizer-avatar-container","align-"+oe(a)),name:oe(e.title.rendered.trim())||"",size:o,url:e.avatar_urls[24],imageLink:e.link}),"none"!==i&&Object(
y.createElement)(te,{className:x()("wordcamp-organizer-content-"+oe(i)),content:"full"===i?e.content.rendered.trim():e.excerpt.rendered.trim(),link:"full"===i||s?e.link:null,linkText:ae("full"===i?"Visit session page":"Read more","wordcamporg")}))}))}}]),t}(re),se=n(24),ue=n.n(se),le=function(e,t){return e.length===t.length&&e.every(function(e,n){return function(e,t){return e===t}(e,t[n])})};var ce=function(e,t){var n;void 0===t&&(t=le);var r,o=[],a=!1;return function(){for(var i=arguments.length,s=new Array(i),u=0;u<i;u++)s[u]=arguments[u];return a&&n===this&&t(s,o)?r:(r=e.apply(this,s),a=!0,n=this,o=s,r)}},pe=n(9),de=n(13),me=n.n(de),fe=n(26),he=n.n(fe),ge=n(27),be=n.n(ge),ve=n(14);function Ee(e){return(Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeo
f Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function we(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ye(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 Oe(e,t,n){return t&&ye(e.prototype,t),n&&ye(e,n),e}function Ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ke(){return(ke=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 Se(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){Ce(e,t,n[t])})}return e}function _e(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&&Ae(e,t)}function xe(e){return(xe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ae(e,t){return(Ae=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function je(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.pr
opertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function De(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fe(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?De(e):t}function Pe(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 Ne=function(){};function Me(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}var Le=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===Ee(e)&&null!==e?[e]:[]};function Ie(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Te(e){return Ie(e)?window.pageYOff
set:e.scrollTop}function Re(e,t){Ie(e)?window.scrollTo(0,t):e.scrollTop=t}function Ve(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ne,o=Te(e),a=t-o,i=10,s=0;!function t(){var u=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(s+=i,o,a,n);Re(e,u),s<n?he()(t):r(e)}()}function Be(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function ze(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,a=e.shouldScroll,i=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 a=e;a=a.parentElement;)if(t=getComputedStyle(a),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return a;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,m=p.height,f=p.top,h=n.offsetParent.getBoundingClientRect().top,g=window.innerHeight,b=Te(u),v=parseInt(getComputedStyle(n).marginBottom,10),E=parseInt(getComputedStyle(n).marginTop,10),w=h-E,y=g-f,O=w+b,C=c-b-f,k=d-g+b+v,S=b+f-E;switch(o){case"auto":case"bottom":if(y>=m)return{placement:"bottom",maxHeight:t};if(C>=m&&!i)return a&&Ve(u,k,160),{placement:"bottom",maxHeight:t};if(!i&&C>=r||i&&y>=r)return a&&Ve(u,k,160),{placement:"bottom",maxHeight:i?y-v:C-v};if("auto"===o||i){var _=t,x=i?w:O;return x>=r&&(_=Math.min(x-v-s.controlHeight,t)),{placement:"top",maxHeight:_}}if("bottom"===o)return Re(u,k),{placement:"bottom",maxHeight:t};break;case"top":if(w>=m)return{placement:"top",maxHeight:t};if(O>=m&&!i)return a&&
Ve(u,S,160),{placement:"top",maxHeight:t};if(!i&&O>=r||i&&w>=r){var A=t;return(!i&&O>=r||i&&w>=r)&&(A=i?w-E:O-E),a&&Ve(u,S,160),{placement:"top",maxHeight:A}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}var Ue=function(e){return"auto"===e?"bottom":e},We=function(e){function t(){var e,n;we(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Ce(De(De(n=Fe(this,(e=xe(t)).call.apply(e,[this].concat(o))))),"state",{maxHeight:n.props.maxMenuHeight,placement:null}),Ce(De(De(n)),"getPlacement",function(e){var t=n.props,r=t.minMenuHeight,o=t.maxMenuHeight,a=t.menuPlacement,i=t.menuPosition,s=t.menuShouldScrollIntoView,u=t.theme,l=n.context.getPortalPlacement;if(e){var c="fixed"===i,p=ze({maxHeight:o,menuEl:e,minHeight:r,placement:a,sh
ouldScroll:s&&!c,isFixedPosition:c,theme:u});l&&l(p),n.setState(p)}}),Ce(De(De(n)),"getUpdatedProps",function(){var e=n.props.menuPlacement,t=n.state.placement||Ue(e);return Se({},n.props,{placement:t,maxHeight:n.state.maxHeight})}),n}return _e(t,y["Component"]),Oe(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}();Ce(We,"contextTypes",{getPortalPlacement:me.a.func});var He=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"}},Ge=He,$e=He,qe=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return O.a.createElement("div",ke({className:r(Object(pe.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};qe.defaultProps={c
hildren:"No options"};var Ye=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return O.a.createElement("div",ke({className:r(Object(pe.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};Ye.defaultProps={children:"Loading..."};var Xe=function(e){function t(){var e,n;we(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Ce(De(De(n=Fe(this,(e=xe(t)).call.apply(e,[this].concat(o))))),"state",{placement:null}),Ce(De(De(n)),"getPortalPlacement",function(e){var t=e.placement;t!==Ue(n.props.menuPlacement)&&n.setState({placement:t})}),n}return _e(t,y["Component"]),Oe(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,a=e.men
uPosition,i=e.getStyles,s="fixed"===a;if(!t&&!s||!r)return null;var u=this.state.placement||Ue(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:a,rect:l},d=O.a.createElement("div",{className:Object(pe.a)(i("menuPortal",p))},n);return t?Object(k.createPortal)(d,t):d}}]),t}();Ce(Xe,"childContextTypes",{getPortalPlacement:me.a.func});var Ke=Array.isArray,Ze=Object.keys,Qe=Object.prototype.hasOwnProperty;function Je(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==Ee(t)&&"object"==Ee(n)){var r,o,a,i=Ke(t),s=Ke(n);if(i&&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(i!=s)return!1;var u=t instanceof Date,l=n instanceof Date;if(u!=l)return!1;if(u&&l)return t.getTime()==n.getTim
e();var c=t instanceof RegExp,p=n instanceof RegExp;if(c!=p)return!1;if(c&&p)return t.toString()==n.toString();var d=Ze(t);if((o=d.length)!==Ze(n).length)return!1;for(r=o;0!=r--;)if(!Qe.call(n,d[r]))return!1;for(r=o;0!=r--;)if(!("_owner"===(a=d[r])&&t.$$typeof||e(t[a],n[a])))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 et=[{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",let
ters:/[\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\u1
E50\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\u01
6C\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:/[\u00E
6\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\u0
0F2\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:&quo
t;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}],tt=function(e){for(var t=0;t<et.length;t++)e=e.replace(et[t].letters,et[t].base);return e},nt=function(e){return e.replace(/^\s+|\s+$/g,"")},rt=function(e){return"".concat(e.label," ").concat(e
.value)},ot=function(e){return O.a.createElement("span",ke({className:Object(pe.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))},at=function(e){function t(){return we(this,t),Fe(this,xe(t).apply(this,arguments))}return _e(t,y["Component"]),Oe(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,je(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return O.a.createElement("input",ke({ref:t},n,{className:Object(pe.a)({background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transfo
rm:"scale(0)"})}))}}]),t}(),it=function(e){function t(){return we(this,t),Fe(this,xe(t).apply(this,arguments))}return _e(t,y["Component"]),Oe(t,[{key:"componentDidMount",value:function(){this.props.innerRef(Object(k.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),t}(),st=["boxSizing","height","overflow","paddingRight","position"],ut={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function lt(e){e.preventDefault()}function ct(e){e.stopPropagation()}function pt(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function dt(){return"ontouchstart"in window||navigator.maxTouchPoints}var mt=!("undefined"==typeof window||!win
dow.document||!window.document.createElement),ft=0,ht=function(e){function t(){var e,n;we(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Ce(De(De(n=Fe(this,(e=xe(t)).call.apply(e,[this].concat(o))))),"originalStyles",{}),Ce(De(De(n)),"listenerOptions",{capture:!1,passive:!1}),n}return _e(t,y["Component"]),Oe(t,[{key:"componentDidMount",value:function(){var e=this;if(mt){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,o=document.body,a=o&&o.style;if(n&&st.forEach(function(t){var n=a&&a[t];e.originalStyles[t]=n}),n&&ft<1){var i=parseInt(this.originalStyles.paddingRight,10)||0,s=document.body?document.body.clientWidth:0,u=window.innerWidth-s+i||0;Object.keys(ut).forEach(function(e){var t=ut[e];a&&(a[e]=t)}),a&&(a.paddingRight="".concat(u,"px"))}o&&dt()&&(o.addEventListener("touchmove",lt,this.
listenerOptions),r&&(r.addEventListener("touchstart",pt,this.listenerOptions),r.addEventListener("touchmove",ct,this.listenerOptions))),ft+=1}}},{key:"componentWillUnmount",value:function(){var e=this;if(mt){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,o=document.body,a=o&&o.style;ft=Math.max(ft-1,0),n&&ft<1&&st.forEach(function(t){var n=e.originalStyles[t];a&&(a[t]=n)}),o&&dt()&&(o.removeEventListener("touchmove",lt,this.listenerOptions),r&&(r.removeEventListener("touchstart",pt,this.listenerOptions),r.removeEventListener("touchmove",ct,this.listenerOptions)))}}},{key:"render",value:function(){return null}}]),t}();Ce(ht,"defaultProps",{accountForScrollbars:!0});var gt=function(e){function t(){var e,n;we(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Ce(De(De(n=Fe(this,(e=xe(t)
).call.apply(e,[this].concat(o))))),"state",{touchScrollTarget:null}),Ce(De(De(n)),"getScrollTarget",function(e){e!==n.state.touchScrollTarget&&n.setState({touchScrollTarget:e})}),Ce(De(De(n)),"blurSelectInput",function(){document.activeElement&&document.activeElement.blur()}),n}return _e(t,y["PureComponent"]),Oe(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.isEnabled,r=this.state.touchScrollTarget;return n?O.a.createElement("div",null,O.a.createElement("div",{onClick:this.blurSelectInput,className:Object(pe.a)({position:"fixed",left:0,bottom:0,right:0,top:0})}),O.a.createElement(it,{innerRef:this.getScrollTarget},t),r?O.a.createElement(ht,{touchScrollTarget:r}):null):t}}]),t}(),bt=function(e){function t(){var e,n;we(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Ce(De(De(n=Fe(this,(e=xe(t)).call.apply(e,[this].concat(o)))))
,"isBottom",!1),Ce(De(De(n)),"isTop",!1),Ce(De(De(n)),"scrollTarget",void 0),Ce(De(De(n)),"touchStart",void 0),Ce(De(De(n)),"cancelScroll",function(e){e.preventDefault(),e.stopPropagation()}),Ce(De(De(n)),"handleEventDelta",function(e,t){var r=n.props,o=r.onBottomArrive,a=r.onBottomLeave,i=r.onTopArrive,s=r.onTopLeave,u=n.scrollTarget,l=u.scrollTop,c=u.scrollHeight,p=u.clientHeight,d=n.scrollTarget,m=t>0,f=c-p-l,h=!1;f>t&&n.isBottom&&(a&&a(e),n.isBottom=!1),m&&n.isTop&&(s&&s(e),n.isTop=!1),m&&t>f?(o&&!n.isBottom&&o(e),d.scrollTop=c,h=!0,n.isBottom=!0):!m&&-t>l&&(i&&!n.isTop&&i(e),d.scrollTop=0,h=!0,n.isTop=!0),h&&n.cancelScroll(e)}),Ce(De(De(n)),"onWheel",function(e){n.handleEventDelta(e,e.deltaY)}),Ce(De(De(n)),"onTouchStart",function(e){n.touchStart=e.changedTouches[0].clientY}),C
e(De(De(n)),"onTouchMove",function(e){var t=n.touchStart-e.changedTouches[0].clientY;n.handleEventDelta(e,t)}),Ce(De(De(n)),"getScrollTarget",function(e){n.scrollTarget=e}),n}return _e(t,y["Component"]),Oe(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.r
emoveEventListener&&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 O.a.createElement(it,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(),vt=function(e){function t(){return we(this,t),Fe(this,xe(t).apply(this,arguments))}return _e(t,y["Component"]),Oe(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=je(e,["isEnabled"]);return t?O.a.createElement(bt,n):this.props.children}}]),t}();Ce(vt,"defaultProps",{isEnabled:!0});var Et=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label,a=t.isDisabled;switch(e){case"menu":return&
quot;Use Up and Down to choose options".concat(a?"":", 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"}},wt=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.")}}
,yt=function(e){return!!e.isDisabled},Ot=function(e){function t(){return we(this,t),Fe(this,xe(t).apply(this,arguments))}return _e(t,y["Component"]),Oe(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,i=e.hasValue;return O.a.createElement("div",{className:r(Object(pe.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":i},n)},t)}}]),t}(),Ct=function(e){var t=e.size,n=je(e,["size"]);return O.a.createElement("svg",ke({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(pe.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},kt=function(e){return O.a.createElement(Ct,ke({size:20},e),O.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"}))},St=function(e){return O.a.createElement(Ct,ke({size:20},e),O.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"}))},_t=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}
}},xt=_t,At=_t,jt=!1,Dt=function(e){var t=e.color,n=e.delay,r=e.offset;return O.a.createElement("span",{className:Object(pe.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"})})},Ft=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,i=e.isRtl,s=e.theme.colors,u=a?s.neutral80:s.neutral20;return jt||(Object(pe.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};"),jt=!0),O.a.createElement("div",ke({},o,{className:n(Object(pe.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indica
tor":!0},t)}),O.a.createElement(Dt,{color:u,delay:0,offset:i}),O.a.createElement(Dt,{color:u,delay:160,offset:!0}),O.a.createElement(Dt,{color:u,delay:320,offset:!i}))};Ft.defaultProps={size:4};var Pt=function(e){var t=e.children,n=e.innerProps;return O.a.createElement("div",n,t)},Nt=Pt,Mt=Pt,Lt=function(e){function t(){return we(this,t),Fe(this,xe(t).apply(this,arguments))}return _e(t,y["Component"]),Oe(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return O.a.createElement("div",n,t||O.a.createElement(kt,{size:14}))}}]),t}(),It=function(e){function t(){return we(this,t),Fe(this,xe(t).apply(this,arguments))}return _e(t,y["Component"]),Oe(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,i=e.getStyles,s=e.innerProps,u=e.isDisabled,l=e.removeProps,c=e.selectProps,p=r.Container,d=r.Label,m=r.Remove,f=Se({className:o(Object(pe.a)(i(
"multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":u},n)},s),h={className:o(Object(pe.a)(i("multiValueLabel",this.props)),{"multi-value__label":!0},n)},g=Se({className:o(Object(pe.a)(i("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},l);return O.a.createElement(p,{data:a,innerProps:f,selectProps:c},O.a.createElement(d,{data:a,innerProps:h,selectProps:c},t),O.a.createElement(m,{data:a,innerProps:g,selectProps:c}))}}]),t}();Ce(It,"defaultProps",{cropWithEllipsis:!0});var Tt={ClearIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return O.a.createElement("div",ke({},a,{className:r(Object(pe.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t||O.a.createElement(kt,null))},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,i=e.isFocused,s=e.innerRef,u=e.in
nerProps,l=e.menuIsOpen;return O.a.createElement("div",ke({ref:s,className:n(Object(pe.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":i,"control--menu-is-open":l},o)},u),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return O.a.createElement("div",ke({},a,{className:r(Object(pe.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t||O.a.createElement(St,null))},DownChevron:St,CrossIcon:kt,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,i=e.headingProps,s=e.label,u=e.theme,l=e.selectProps;return O.a.createElement("div",{className:r(Object(pe.a)(o("group",e)),{group:!0},n)},O.a.createElement(a,ke({},i,{selectProps:l,theme:u,getStyles:o,cx:r}),s),O.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyle
s,o=e.theme,a=(e.selectProps,je(e,["className","cx","getStyles","theme","selectProps"]));return O.a.createElement("div",ke({className:n(Object(pe.a)(r("groupHeading",Se({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return O.a.createElement("div",{className:r(Object(pe.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 O.a.createElement("span",ke({},o,{className:n(Object(pe.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,i=e.isDisabled,s=e.theme,u=(e.selectProps,je(e,["className","cx","getStyles","innerRef","isHidden","isDisabled
","theme","selectProps"]));return O.a.createElement("div",{className:Object(pe.a)(r("input",Se({theme:s},u)))},O.a.createElement(be.a,ke({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"}}(a),disabled:i},u)))},LoadingIndicator:Ft,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,i=e.innerProps,s=r(Object(pe.a)(o("menu",e)),{menu:!0},n);return O.a.createElement("div",ke({className:s},i,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,i=e.innerRef;return O.a.createElement("div",{className:r(Object(pe.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:i},t)},MenuPortal:Xe,LoadingMessage:Ye,NoOptionsMessage:qe,MultiValue:It,MultiValueContainer:Nt,MultiValu
eLabel:Mt,MultiValueRemove:Lt,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.isFocused,s=e.isSelected,u=e.innerRef,l=e.innerProps;return O.a.createElement("div",ke({ref:u,className:r(Object(pe.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":i,"option--is-selected":s},n)},l),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return O.a.createElement("div",ke({className:r(Object(pe.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,i=e.isDisabled,s=e.isRtl;return O.a.createElement("div",ke({className:r(Object(pe.a)(o("container",e)),{"--is-disabled":i,"--is-rtl":s},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.inn
erProps;return O.a.createElement("div",ke({className:r(Object(pe.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},i),t)},ValueContainer:Ot},Rt=function(e){return Se({},Tt,e.components)},Vt={clearIndicator:At,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,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transitio
n:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:xt,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,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:$e,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return Ce(t={},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),Ce(t,"backgroundColor",i.neutral0),Ce(t,"borderRadius",o),Ce(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Ce(t,"marginBottom",a.menuGutter),Ce(t,"marginTop",a.menuGutter),Ce(t,"position","absolute"),Ce(t,"width",&
quot;100%"),Ce(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,backgroundC
olor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:Ge,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.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%)"}},singl
eValue: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 Bt={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)&quo
t;,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}},zt={backspaceRemovesValue:!0,blurInputOnSelect:Be(),captureMenuScroll:!Be(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e){return function(t,n){var r=Se({ignoreCase:!0,ignoreAccents:!0,stringify:rt,trim:!0,matchFrom:"any"},e),o=r.ignoreCase,a=r.ignoreAccents,i=r.stringify,s=r.trim,u=r.matchFrom,l=s?nt(n):n,c=s?nt(i(t)):i(t);return o&&(l=l.toLowerCase(),c=c.toLowerCase()),a&&(l=tt(l),c=tt(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:yt,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},Ut=1,Wt=function(e){function t(e){var n;we(this,t
),Ce(De(De(n=Fe(this,xe(t).call(this,e)))),"state",{ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]}),Ce(De(De(n)),"blockOptionHover",!1),Ce(De(De(n)),"clearFocusValueOnUpdate",!1),Ce(De(De(n)),"commonProps",void 0),Ce(De(De(n)),"components",void 0),Ce(De(De(n)),"hasGroups",!1),Ce(De(De(n)),"initialTouchX",0),Ce(De(De(n)),"initialTouchY",0),Ce(De(De(n)),"inputIsHiddenAfterUpdate",void 0),Ce(De(De(n)),"instancePrefix",""),Ce(De(De(n)),"openAfterFocus",!1),Ce(De(De(n)),"scrollToFocusedOptionOnUpdate",!1),Ce(De(De(n)),"userIsDragging",void 0),Ce(De(De(n)),"controlRef",null),Ce(De(De(n)),"getControlRef",function(e){n.controlRef=e}),Ce(De(De(n)),"focusedOptionRef",null),Ce(De(D
e(n)),"getFocusedOptionRef",function(e){n.focusedOptionRef=e}),Ce(De(De(n)),"menuListRef",null),Ce(De(De(n)),"getMenuListRef",function(e){n.menuListRef=e}),Ce(De(De(n)),"inputRef",null),Ce(De(De(n)),"getInputRef",function(e){n.inputRef=e}),Ce(De(De(n)),"cacheComponents",function(e){n.components=Rt({components:e})}),Ce(De(De(n)),"focus",n.focusInput),Ce(De(De(n)),"blur",n.blurInput),Ce(De(De(n)),"onChange",function(e,t){var r=n.props;(0,r.onChange)(e,Se({},t,{name:r.name}))}),Ce(De(De(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,a=o.closeMenuOnSelect,i=o.isMulti;n.onInputChange("",{action:"set-value"}),a&&(n.inputIsHiddenAfterUpdate=!i,n.onMenuClose()),n.clearFocusValueOnUpdate=!0,n.onChange(e,{action:t,option:r})}),Ce(De(De(n)),&
quot;selectOption",function(e){var t=n.props,r=t.blurInputOnSelect,o=t.isMulti,a=n.state.selectValue;if(o)if(n.isOptionSelected(e,a)){var i=n.getOptionValue(e);n.setValue(a.filter(function(e){return n.getOptionValue(e)!==i}),"deselect-option",e),n.announceAriaLiveSelection({event:"deselect-option",context:{value:n.getOptionLabel(e)}})}else n.isOptionDisabled(e,a)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue([].concat(Pe(a),[e]),"select-option",e),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));else n.isOptionDisabled(e,a)?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()}),Ce(De(De(n)),"re
moveValue",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()}),Ce(De(De(n)),"clearValue",function(){var e=n.props.isMulti;n.onChange(e?[]:null,{action:"clear"})}),Ce(De(De(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})}),Ce(De(De(n)),"getOptionLabel",function(e){return n.props.getOptionLabel(e)}),Ce(De(De(n)),"getOptionValue",function(e){return n.props.getOptionValue(e)}),Ce(De(De(n)),"getStyles",function(e,t){var r=Vt[e](t);r.boxSizing="border-box";var
o=n.props.styles[e];return o?o(r,t):r}),Ce(De(De(n)),"getElementId",function(e){return"".concat(n.instancePrefix,"-").concat(e)}),Ce(De(De(n)),"getActiveDescendentId",function(){var e=n.props.menuIsOpen,t=n.state,r=t.menuOptions,o=t.focusedOption;if(o&&e){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}}),Ce(De(De(n)),"announceAriaLiveSelection",function(e){var t=e.event,r=e.context;n.setState({ariaLiveSelection:wt(t,r)})}),Ce(De(De(n)),"announceAriaLiveContext",function(e){var t=e.event,r=e.context;n.setState({ariaLiveContext:Et(t,Se({},r,{label:n.props["aria-label"]}))})}),Ce(De(De(n)),"onMenuMouseDown",function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),n.focusInput())}),Ce(De(De(n)),"onMenuMouseMove",function(e){n.blockOptionHover=!1}),Ce(De(De(n)),"onControlMouseDown",function(e){var t=n.props.openMenuOnClick;n.state.isFocused?n.pr
ops.menuIsOpen?"INPUT"!==e.target.tagName&&n.onMenuClose():t&&n.openMenu("first"):(t&&(n.openAfterFocus=!0),n.focusInput()),"INPUT"!==e.target.tagName&&e.preventDefault()}),Ce(De(De(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()}}),Ce(De(De(n)),"onClearIndicatorMouseDown",function(e){e&&"mousedown"===e.type&&0!==e.button||(n.clearValue(),e.stopPropagation(),n.openAfterFocus=!1,setTimeout(function(){return n.focusInput()}))}),Ce(De(De(n)),"onScroll",function(e){"boolean"==typeof n.props.closeMenuOnScroll?e.target instanceof HTMLElement&&Ie(e.target)&&n.props.onMenuClose():"fun
ction"==typeof n.props.closeMenuOnScroll&&n.props.closeMenuOnScroll(e)&&n.props.onMenuClose()}),Ce(De(De(n)),"onCompositionStart",function(){n.setState({isComposing:!0})}),Ce(De(De(n)),"onCompositionEnd",function(){n.setState({isComposing:!1})}),Ce(De(De(n)),"onTouchStart",function(e){var t=e.touches.item(0);t&&(n.initialTouchX=t.clientX,n.initialTouchY=t.clientY,n.userIsDragging=!1)}),Ce(De(De(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}}),Ce(De(De(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)}),Ce(De(De(n)),"onControlTouchEnd",function(e){n.userIsDragging||n.onControlMouseDown(e)}),Ce(De(
De(n)),"onClearIndicatorTouchEnd",function(e){n.userIsDragging||n.onClearIndicatorMouseDown(e)}),Ce(De(De(n)),"onDropdownIndicatorTouchEnd",function(e){n.userIsDragging||n.onDropdownIndicatorMouseDown(e)}),Ce(De(De(n)),"handleInputChange",function(e){var t=e.currentTarget.value;n.inputIsHiddenAfterUpdate=!1,n.onInputChange(t,{action:"input-change"}),n.onMenuOpen()}),Ce(De(De(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}),Ce(De(De(n)),"onInputBlur",function(e){n.menuListRef&&n.menuListRef.contains(document.activeElement)?n.inputRef.focus():(n.props.onBlur&&n.props.onBlur(e),n.onInputChange(&quo
t;",{action:"input-blur"}),n.onMenuClose(),n.setState({focusedValue:null,isFocused:!1}))}),Ce(De(De(n)),"onOptionHover",function(e){n.blockOptionHover||n.state.focusedOption===e||n.setState({focusedOption:e})}),Ce(De(De(n)),"shouldHideSelectedOptions",function(){var e=n.props,t=e.hideSelectedOptions,r=e.isMulti;return void 0===t?r:t}),Ce(De(De(n)),"onKeyDown",function(e){var t=n.props,r=t.isMulti,o=t.backspaceRemovesValue,a=t.escapeClearsValue,i=t.inputValue,s=t.isClearable,u=t.isDisabled,l=t.menuIsOpen,c=t.onKeyDown,p=t.tabSelectsValue,d=t.openMenuOnFocus,m=n.state,f=m.isComposing,h=m.focusedOption,g=m.focusedValue,b=m.selectValue;if(!(u||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(n.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||i)return;n.focusValue("previous");break;case"ArrowRight":if(!r||i)return;n.focusValue("next");break;case"Delete":case"Back
space":if(i)return;if(g)n.removeValue(g);else{if(!o)return;r?n.popValue():s&&n.clearValue()}break;case"Tab":if(f)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(f)return;n.selectOption(h);break}return;case"Escape":l?(n.inputIsHiddenAfterUpdate=!1,n.onInputChange("",{action:"menu-close"}),n.onMenuClose()):s&&a&&n.clearValue();break;case" ":if(i)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.focusOptio
n("first");break;case"End":if(!l)return;n.focusOption("last");break;default:return}e.preventDefault()}});var r=e.value;n.cacheComponents=ce(n.cacheComponents,Je).bind(De(De(n))),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Ut);var o=Le(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return _e(t,y["Component"]),Oe(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 a=Le(e.value),i=this.buildMenuO
ptions(e,a),s=this.getNextFocusedValue(a),u=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,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?Re(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&Re(e,Math.max(t.offsetTop-o,0))}(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1}},{key:"componentWillUnmount&qu
ot;,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,a=this.props.isMulti,i="first"===e?0:n.focusable.length-1;if(!a){var s=n.focusable.indexOf(r[0]);s>-1&&(i=s)}
this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[i]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var s=a.indexOf(i);i||(s=-1,this.announceAriaLiveContext({event:"value"}));var u=a.length-1,l=-1;if(a.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:a[l]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.s
tate,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:yt(o[a])}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Bt):Se({},Bt,this.props.theme):Bt}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=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 a in n)n.hasOwnProperty(a)&&n[a]&&o.push("".concat(Me(e,a)));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return l},hasValue:c,isMulti:i,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,inputVal
ue: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&q
uot;,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,a=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),s=n.getOptionLabel(e),u=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:s,value:u,data:e},o))){var l=a?void 0:function(){return n.onOptionHover(e)},c=a?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:a,isSelected:i,key:p,label:s,type:"option",v
alue: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=a(t,"".concat(r,"-").concat(n));return o&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var i="".concat(n.getElementId("group"),"-").concat(r);e.render.push({type:"group",key:i,data:t,options:o})}}else{var s=a(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,a=this.props,i=a.options,s=a.menuIsOpen,u=a.inputValue,l=a.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:thi
s.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:i}):"",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,a=e.tabIndex,i=this.components.Input,s=this.state.inputIsHidden,u=r||this.getElementId("input");if(!n)return O.a.createElement(at,{id
:u,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ne,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:a,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,m=c.selectProps;return O.a.createElement(i,ke({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:m,spellCheck:"false",tabIndex:a,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,a=t.MultiValueRemove,i=t.SingleValue,s=t.Placeholder,u=this.commonProps,l=this.props,
c=l.controlShouldRenderValue,p=l.isDisabled,d=l.isMulti,m=l.inputValue,f=l.placeholder,h=this.state,g=h.selectValue,b=h.focusedValue,v=h.isFocused;if(!this.hasValue()||!c)return m?null:O.a.createElement(s,ke({},u,{key:"placeholder",isDisabled:p,isFocused:v}),f);if(d)return g.map(function(t){var i=t===b;return O.a.createElement(n,ke({},u,{components:{Container:r,Label:o,Remove:a},isFocused:i,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(m)return null;var E=g[0];return O.a.createElement(i,ke({},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,a=this.state.isFocused;if(!this.isClearable()||!
e||r||!this.hasValue()||o)return null;var i={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return O.a.createElement(e,ke({},t,{innerProps:i,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!e||!o)return null;return O.a.createElement(e,ke({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a}))}},{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,a=this.state.isFocused;return O.a.createElement(n,ke({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.is
Disabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return O.a.createElement(e,ke({},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,a=t.MenuList,i=t.MenuPortal,s=t.LoadingMessage,u=t.NoOptionsMessage,l=t.Option,c=this.commonProps,p=this.state,d=p.focusedOption,m=p.menuOptions,f=this.props,h=f.captureMenuScroll,g=f.inputValue,b=f.isLoading,v=f.loadingMessage,E=f.minMenuHeight,w=f.maxMenuHeight,y=f.menuIsOpen,C=f.menuPlacement,k=f.menuPosition,S=f.menuPortalTarget,_=f.menuShouldBlockScroll,x=f.menuShouldScrollIntoView,A=f.noOptionsMessage,j=f.onMenuScrollToTop,D=f.onMenuScrollToBottom;if(!y)return null;var F,P=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,O.a.createElement(l,ke({},c,t,{isFocused:n}),e.formatOptionLabel(t.data,"m
enu"))};if(this.hasOptions())F=m.render.map(function(t){if("group"===t.type){t.type;var o=je(t,["type"]),a="".concat(t.key,"-heading");return O.a.createElement(n,ke({},c,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return P(e)}))}if("option"===t.type)return P(t)});else if(b){var N=v({inputValue:g});if(null===N)return null;F=O.a.createElement(s,c,N)}else{var M=A({inputValue:g});if(null===M)return null;F=O.a.createElement(u,c,M)}var L={minMenuHeight:E,maxMenuHeight:w,menuPlacement:C,menuPosition:k,menuShouldScrollIntoView:x},I=O.a.createElement(We,ke({},c,L),function(t){var n=t.ref,r=t.placerProps,i=r.placement,s=r.maxHeight;return O.a.createElement(o,ke({},c,L,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:i}),O.a.createElement(vt,{isEnabled:h,onTopArrive:j,onBottomArrive:D},O.a.createElement(gt,{isEnabled:_},O.a.createEle
ment(a,ke({},c,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:s}),F))))});return S||"fixed"===k?O.a.createElement(i,ke({},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,a=t.name,i=this.state.selectValue;if(a&&!r){if(o){if(n){var s=i.map(function(t){return e.getOptionValue(t)}).join(n);return O.a.createElement("input",{name:a,type:"hidden",value:s})}var u=i.length>0?i.map(function(t,n){return O.a.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})}):O.a.createElement("input",{name:a,type:"hidden"});return O.a.createElement("div",null,u)}var l=i[0]?this.getOptionValue(i[0]):"";return O.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveR
egion",value:function(){return this.state.isFocused?O.a.createElement(ot,{"aria-live":"assertive"},O.a.createElement("p",{id:"aria-selection-event"},"Â ",this.state.ariaLiveSelection),O.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,a=this.props,i=a.className,s=a.id,u=a.isDisabled,l=a.menuIsOpen,c=this.state.isFocused,p=this.commonProps=this.getCommonProps();return O.a.createElement(r,ke({},p,{className:i,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:c}),this.renderLiveRegion(),O.a.createElement(t,ke({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:c,menuIsOpen:l}),O.a.createElement(o,ke({},p,{isDisabled:u}),this.ren
derPlaceholderOrValue(),this.renderInput()),O.a.createElement(n,ke({},p,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}();Ce(Wt,"defaultProps",zt);var Ht={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},Gt=function(e){var t,n;return n=t=function(t){function n(){var e,t;we(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Ce(De(De(t=Fe(this,(e=xe(n)).call.apply(e,[this].concat(o))))),"select",void 0),Ce(De(De(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}),Ce(De(De(t)),"onChange",function(e,n){t.callProp("onChange",e,n),t.setState({value:e}
)}),Ce(De(De(t)),"onInputChange",function(e,n){var r=t.callProp("onInputChange",e,n);t.setState({inputValue:void 0!==r?r:e})}),Ce(De(De(t)),"onMenuOpen",function(){t.callProp("onMenuOpen"),t.setState({menuIsOpen:!0})}),Ce(De(De(t)),"onMenuClose",function(){t.callProp("onMenuClose"),t.setState({menuIsOpen:!1})}),t}return _e(n,y["Component"]),Oe(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,je(n,["
;defaultInputValue","defaultMenuIsOpen","defaultValue"]));return O.a.createElement(e,ke({},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}(),Ce(t,"defaultProps",Ht),n},$t={cacheOptions:!1,defaultOptions:!1,filterOption:null},qt=function(e){var t,n;return n=t=function(t){function n(e){var t;return we(this,n),Ce(De(De(t=Fe(this,xe(n).call(this)))),"select",void 0),Ce(De(De(t)),"lastRequest",void 0),Ce(De(De(t)),"mounted",!1),Ce(De(De(t)),"optionsCache",{}),Ce(De(De(t)),"handleInputChange",function(e,n){var r=t.props,o=r.cacheOptions,a=function(e,t,n){if(n){var r=n(e,t);if("string"==typeof r)return r}return e}(e,n,r.onInputChange);if(!a)return delete t.lastR
equest,void t.setState({inputValue:"",loadedInputValue:"",loadedOptions:[],isLoading:!1,passEmptyOptions:!1});if(o&&t.optionsCache[a])t.setState({inputValue:a,loadedInputValue:a,loadedOptions:t.optionsCache[a],isLoading:!1,passEmptyOptions:!1});else{var i=t.lastRequest={};t.setState({inputValue:a,isLoading:!0,passEmptyOptions:!t.state.loadedInputValue},function(){t.loadOptions(a,function(e){t.mounted&&(e&&(t.optionsCache[a]=e),i===t.lastRequest&&(delete t.lastRequest,t.setState({isLoading:!1,loadedInputValue:a,loadedOptions:e||[],passEmptyOptions:!1})))})})}return a}),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 _e(n,y["Component"]),Oe(n,[{key:"componentDidMount",value:function(){var e=this;this.mounted=!0;var t=this.props.defaultOptions,n=th
is.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,je(n,["loadOptions"])),o=this.state,a=o.defaultOptions,i=o.inputValue,s=o.isLo
ading,u=o.loadedInputValue,l=o.loadedOptions,c=o.passEmptyOptions?[]:i&&u?l:a||[];return O.a.createElement(e,ke({},r,{ref:function(e){t.select=e},options:c,isLoading:s,onInputChange:this.handleInputChange}))}}]),n}(),Ce(t,"defaultProps",$t),n},Yt=(qt(Gt(Wt)),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}),Xt=Se({allowCreateWhileLoading:!1,createOptionPosition:"last"},{formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n){return!(!e||t.some(function(t){return Yt(e,t)})||n.some(function(t){return Yt(e,t)}))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}}),Kt=function(e){var t,n;return n=t=function(t){function n(e){var t;we(this,n),Ce(De(De(t=Fe(this,xe(n).call(this,e)))),"select&
quot;,void 0),Ce(De(De(t)),"onChange",function(e,n){var r=t.props,o=r.getNewOptionData,a=r.inputValue,i=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(a);else{var d=o(a,a),m={action:"create-option"};s(i?[].concat(Pe(Le(l)),[d]):d,m)}});var r=e.options||[];return t.state={newOption:void 0,options:r},t}return _e(n,y["Component"]),Oe(n,[{key:"componentWillReceiveProps",value:function(e){var t=e.allowCreateWhileLoading,n=e.createOptionPosition,r=e.formatCreateLabel,o=e.getNewOptionData,a=e.inputValue,i=e.isLoading,s=e.isValidNewOption,u=e.value,l=e.options||[],c=this.state.newOption;c=s(a,Le(u),l)?o(a,r(a)):void 0,this.setState({newOption:c,options:!t&&i||!c?l:"first"===n?[c].concat(Pe(l)):[].concat(Pe(l),[c])})}},{key:"focus",value:function(){this.select.focus()}},{key:&quo
t;blur",value:function(){this.select.blur()}},{key:"render",value:function(){var t=this,n=ke({},this.props),r=this.state.options;return O.a.createElement(e,ke({},n,{ref:function(e){t.select=e},options:r,onChange:this.onChange}))}}]),n}(),Ce(t,"defaultProps",Xt),n},Zt=(Gt(Kt(Wt)),qt(Gt(Kt(Wt))),function(e){var t=e.component,n=e.duration,r=void 0===n?1:n,o=e.in,a=(e.onExited,je(e,["component","duration","in","onExited"])),i={entering:{opacity:0},entered:{opacity:1,transition:"opacity ".concat(r,"ms")},exiting:{opacity:0},exited:{opacity:0}};return O.a.createElement(ve.Transition,{mountOnEnter:!0,unmountOnExit:!0,in:o,timeout:r},function(e){var n={style:Se({},i[e])};return O.a.createElement(t,ke({innerProps:n},a))})}),Qt=260,Jt=function(e){function t(){var e,n;we(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Ce(De(De(n=Fe(this,(e=xe(t)).call.apply(e,[this].co
ncat(o))))),"duration",Qt),Ce(De(De(n)),"rafID",void 0),Ce(De(De(n)),"state",{width:"auto"}),Ce(De(De(n)),"transition",{exiting:{width:0,transition:"width ".concat(n.duration,"ms ease-out")},exited:{width:0}}),Ce(De(De(n)),"getWidth",function(e){e&&isNaN(n.state.width)&&(n.rafID=window.requestAnimationFrame(function(){var t=e.getBoundingClientRect().width;n.setState({width:t})}))}),Ce(De(De(n)),"getStyle",function(e){return{overflow:"hidden",whiteSpace:"nowrap",width:e}}),Ce(De(De(n)),"getTransition",function(e){return n.transition[e]}),n}return _e(t,y["Component"]),Oe(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 O.a.createElement(ve.Transition,{enter:!1,mo
untOnEnter:!0,unmountOnExit:!0,in:r,timeout:this.duration},function(t){var r=Se({},e.getStyle(o),e.getTransition(t));return O.a.createElement("div",{ref:e.getWidth,style:r},n)})}}]),t}(),en=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Rt({components:e}),n=t.Input,r=t.MultiValue,o=t.Placeholder,a=t.SingleValue,i=t.ValueContainer,s=je(t,["Input","MultiValue","Placeholder","SingleValue","ValueContainer"]);return Se({Input:function(e){return function(t){t.in,t.onExited,t.appear,t.enter,t.exit;var n=je(t,["in","onExited","appear","enter","exit"]);return O.a.createElement(e,n)}}(n),MultiValue:function(e){return function(t){var n=t.in,r=t.onExited,o=je(t,["in","onExited"]);return O.a.createElement(Jt,{in:n,onExited:r},O.a.createElement(e,ke({cropWithEllipsis:n},o)))}}(r),Placeholder:function(e){return function(t){return
O.a.createElement(Zt,ke({component:e,duration:t.isMulti?Qt:1},t))}}(o),SingleValue:function(e){return function(t){return O.a.createElement(Zt,ke({component:e},t))}}(a),ValueContainer:function(e){return function(t){return O.a.createElement(ve.TransitionGroup,ke({component:e},t))}}(i)},s)},tn=en(),nn=(tn.Input,tn.MultiValue,tn.Placeholder,tn.SingleValue,tn.ValueContainer,ce(en,Je),Gt(Wt)),rn=(n(38),wp.components),on=rn.BaseControl,an=rn.Button,sn=wp.compose.withInstanceId,un=wp.element.Component,ln=wp.i18n.__,cn=sn(function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this))).state={selectedOptions:null},n.isOptionDisabled=n.isOptionDisabled.bind(j()(j()(n))),n.getNewAttributes=n.getNewAttributes.bind(j()(j()(n))),n}return w()(t,e),f()(t,[{key:"isOptionDisabled",value:function(e,t){var n,r=this.props.mode;return"loading"===e.type||(Array.isArray(t)&&t.length&&(n=t[0].type),!(!r||r===e.type)||n&&n!==e.type)}},{key:"
getNewAttributes",value:function(){var e={},t=this.state.selectedOptions;if(null===t)return e;var n=t.map(function(e){return e.value})||[];n.length?e={mode:t[0].type,item_ids:n}:e={mode:"",item_ids:[]};return e}},{key:"render",value:function(){var e=this,t=this.props,n=t.instanceId,r=t.className,o=t.label,a=t.help,i=t.submitLabel,s=t.buildSelectOptions,u=t.onChange,l=t.selectProps,p=this.state.selectedOptions||this.props.value,d="wordcamp-item-select-control-".concat(n),m=ue()({options:s(),isMulti:!0,isOptionDisabled:this.isOptionDisabled},l);return Object(y.createElement)(on,{id:d,className:x()("wordcamp-item-select",r),label:o,help:a},Object(y.createElement)("div",{className:"wordcaselectedOptionsmp-item-select-inner"},Object(y.createElement)(nn,c()({id:d,className:"wordcamp-item-select-select",value:p,"aria-label":o,onChange:function(t){e.setState({selectedOptions:t})}},m)),Object(y.createElement
)(an,{className:"wordcamp-item-select-button",isLarge:!0,isDefault:!0,onClick:function(){return u(e.getNewAttributes())}},i||ln("Select","wordcamporg"))))}}]),t}(un)),pn=wp.components.Dashicon,dn=wp.element.Component,mn=wp.htmlEntities.decodeEntities,fn=wp.i18n.__;function hn(e){var t,n,r=e.type,o=e.label,a=void 0===o?"":o,i=e.avatar,s=void 0===i?"":i,u=e.count,l=void 0===u?0:u;switch(r){case"wcb_organizer":t=Object(y.createElement)(q,{className:"wordcamp-item-select-option-avatar",name:a,size:24,url:s}),n=Object(y.createElement)("span",{className:"wordcamp-item-select-option-label"},a);break;case"wcb_organizer_team":t=Object(y.createElement)("div",{className:"wordcamp-item-select-option-icon-container"},Object(y.createElement)(pn,{className:"wordcamp-item-select-option-icon",icon:"megaphone",size:16})),n=Object(y.createElement)("span"
,{className:"wordcamp-item-select-option-label"},a,Object(y.createElement)("span",{className:"wordcamp-item-select-option-label-term-count"},l))}return Object(y.createElement)("div",{className:"wordcamp-item-select-option"},t,n)}var gn=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this,e))).state={wcb_organizer:[],wcb_organizer_team:[],loading:!0},n.buildSelectOptions=n.buildSelectOptions.bind(j()(j()(n))),n}return w()(t,e),f()(t,[{key:"componentWillMount",value:function(){var e=this;this.isStillMounted=!0;var t=this.props,n=t.allOrganizerPosts,r=t.allOrganizerTerms,o=n.then(function(t){var n=t.map(function(e){return{label:mn(e.title.rendered.trim())||fn("(Untitled)","wordcamporg"),value:e.id,type:"wcb_organizer",avatar:e.avatar_urls[24]}});e.isStillMounted&&e.setState({wcb_organizer:n})}),a=r.then(function(t){var n=t.map(function(e){return{label:mn(e.name)|
|fn("(Untitled)","wordcamporg"),value:e.id,type:"wcb_organizer_team",count:e.count}});e.isStillMounted&&e.setState({wcb_organizer_team:n})});Promise.all([o,a]).then(function(){e.setState({loading:!1})})}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"buildSelectOptions",value:function(e){var t=[],n={wcb_organizer:fn("Organizers","wordcamporg"),wcb_organizer_team:fn("Teams","wordcamporg")};for(var r in this.state)this.state[r].length&&(e&&r!==e||t.push({label:n[r],options:this.state[r]}));return t}},{key:"render",value:function(){var e=this.props,t=e.label,n=e.attributes,r=e.setAttributes,o=n.mode,a=n.item_ids,i=this.buildSelectOptions(o),s=[];o&&a.length&&(s=Object(C.get)(i,"[0].options",[]).filter(function(e){return Object(C.includes)(a,e.value)}));return Object(y.createElement)(cn,{className:"wordca
mp-organizer-select",label:t,value:s,buildSelectOptions:this.buildSelectOptions,onChange:function(e){return r(e)},mode:o,selectProps:{isLoading:this.state.loading,formatGroupLabel:function(e){return Object(y.createElement)("span",{className:"wordcamp-item-select-option-group-label"},e.label)},formatOptionLabel:function(e){return Object(y.createElement)(hn,e)}}})}}]),t}(dn),bn=wp.components,vn=bn.Button,En=bn.Placeholder,wn=wp.i18n.__,yn=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return w()(t,e),f()(t,[{key:"render",value:function(){var e,t=this.props,n=t.icon,r=t.attributes,o=t.setAttributes,a=t.organizerPosts,i=r.mode,s=Array.isArray(a)&&a.length;if(i&&!s)return Object(y.createElement)(R,{icon:n,label:Or,loading:!Array.isArray(a)});switch(i){case"all":e=Object(y.createElement)(ie,this.props);break;case"wcb_organizer":case"wcb_organizer_team":e=Object(y.createElem
ent)(V,{label:this.getModeLabel(i),icon:n,content:Object(y.createElement)(ie,this.props),placeholderChildren:Object(y.createElement)(gn,this.props)});break;default:e=Object(y.createElement)(En,{className:x()("wordcamp-block-edit-placeholder","wordcamp-block-edit-placeholder-no-mode"),icon:n,label:Or},Object(y.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(y.createElement)(vn,{isDefault:!0,isLarge:!0,onClick:function(){o({mode:"all"})}},this.getModeLabel("all"))),Object(y.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(y.createElement)(gn,c()({label:wn("Choose specific organizers or teams","wordcamporg")},this.props))))}return e}}]),t}(T),On=(n(50),wp.element.Component),Cn=wp.components,kn=Cn.BaseControl,Sn=Cn.Button,_n=Cn.ButtonGroup,xn=Cn.RangeControl,An=wp.i18n,jn=An.__,Dn=An._x,Fn=[{name:jn("Small","wordcamporg&quo
t;),shortName:Dn("S","size small","wordcamporg"),size:90,slug:"small"},{name:jn("Regular","wordcamporg"),shortName:Dn("M","size medium","wordcamporg"),size:150,slug:"regular"},{name:jn("Large","wordcamporg"),shortName:Dn("L","size large","wordcamporg"),size:300,slug:"large"},{name:jn("Larger","wordcamporg"),shortName:Dn("XL","size extra large","wordcamporg"),size:500,slug:"larger"}],Pn=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this))).state={value:e.value,onChange:Object(C.debounce)(e.onChange,10)},n.onChange=n.onChange.bind(j()(j()(n))),n}return w()(t,e),f()(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,a=t.initialPosition,i=t.rangeProps,s=this.state.value;return Object(y.createElement)(kn,{className:x()("wordcamp-components-avatar-size",n),label:r,help:o},Object(y.createElement)("div",{className:"wordcamp-components-avatar-size-buttons"},Object(y.createElement)(_n,{"aria-label":r},Fn.map(function(t){var n=t.name,r=t.shortName,o=t.size,a=t.slug,i=s===o;return Object(y.createElement)(Sn,{key:a,isLarge:!0,isPrimary:i,"aria-label":n,"aria-pressed":i,onClick:function(){return e.onChange(Number(o))}},r||n)})),Object(y.createElement)(Sn,{className:"wordcamp-components-avatar-size-button-reset",isLarge:!0,isDefault:!0,onClick:function(){return e.onChange(Number(a))}},jn("Reset","wordcamporg"))),Object(y.createElement)(xn,c()({className:"wordcamp-components-avatar-size-range",value:s,initialPosition:a,onChange:this.onChange,beforeIcon:"format-image",afterIcon:"
;format-image","aria-label":r},i)))}}]),t}(On),Nn=wp.components,Mn=Nn.BaseControl,Ln=Nn.Toolbar;var In=function(e){var t=e.className,n=e.label,r=e.help,o=e.value,a=e.onChange,i=e.alignOptions;return Object(y.createElement)(Mn,{className:x()("wordcamp-components-image-alignment",t),label:n,help:r},Object(y.createElement)(Ln,{controls:i.map(function(e){var t=o===e.value,n="align-".concat(e.value);return{title:e.label,icon:n,isActive:t,onClick:function(){a(e.value)}}})}))},Tn=wp.element.Component,Rn=wp.components,Vn=Rn.PanelBody,Bn=Rn.PanelRow,zn=Rn.RangeControl,Un=wp.i18n.__,Wn={grid_columns:{default:2,minimum:2,maximum:4}},Hn=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return w()(t,e),f()(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 a=Wn;return Object(y.createElement)(Vn,null,Object(y.createEleme
nt)(Vn,{title:Un("Layout","wordcamporg"),initialOpen:!0},Object(y.createElement)(Bn,null,Object(y.createElement)(zn,{label:Un("Grid Columns","wordcamporg"),value:Number(o),min:a.grid_columns.minimum,max:a.grid_columns.maximum,initialPosition:a.grid_columns.default,onChange:function(e){return n({grid_columns:e})}}))))}}]),t}(Tn),Gn=wp.components,$n=Gn.PanelBody,qn=Gn.PanelRow,Yn=Gn.SelectControl,Xn=Gn.ToggleControl,Kn=wp.editor.InspectorControls,Zn=wp.element,Qn=Zn.Component,Jn=Zn.Fragment,er=wp.i18n.__,tr={grid_columns:{default:2,minimum:2,maximum:4},avatar_size:{default:150,minimum:25,maximum:600}},nr={align:{},content:{},sort:{}},rr=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return w()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.show_avatars,a=t.avatar_size,i=t.avatar_align,s=t.content,u=t.excerpt_more,l=t.sort,c=r.schema,p=vo
id 0===c?tr:c,d=r.options,m=void 0===d?nr:d;return Object(y.createElement)(Kn,null,Object(y.createElement)(Hn,this.props),Object(y.createElement)($n,{title:er("Avatar Settings","wordcamporg"),initialOpen:!0},Object(y.createElement)(qn,null,Object(y.createElement)(Xn,{label:er("Show avatars","wordcamporg"),checked:o,onChange:function(e){return n({show_avatars:e})}})),o&&Object(y.createElement)(Jn,null,Object(y.createElement)(qn,null,Object(y.createElement)(Pn,{label:er("Size","wordcamporg"),value:Number(a),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(y.createElement)(qn,null,Object(y.createElement)(In,{label:er("Alignment","wordcamporg"),value:i,onChange:function(e){return n({avatar_align:e})},alignOptions:m.align})))),Object(y.createElement)($n,{title:er(&quo
t;Content Settings","wordcamporg"),initialOpen:!1},Object(y.createElement)(qn,null,Object(y.createElement)(Yn,{label:er("Biography Length","wordcamporg"),value:s,options:m.content,onChange:function(e){return n({content:e})}})),"excerpt"===s&&Object(y.createElement)(qn,null,Object(y.createElement)(Xn,{label:er("Read More Link","wordcamporg"),help:er("Show a link at the end of the excerpt (some themes already include this)","wordcamporg"),checked:u,onChange:function(e){return n({excerpt_more:e})}}))),Object(y.createElement)($n,{title:er("Sorting & Filtering","wordcamporg"),initialOpen:!1},Object(y.createElement)(qn,null,Object(y.createElement)(Yn,{label:er("Sort by","wordcamporg"),value:l,options:m.sort,onChange:function(e){return n({sort:e})}}))))}}]),t}(Qn),or=wp.components.Toolbar,ar=wp.editor.BlockControls,ir=wp.element.Component,sr=wp.htmlEntiti
es.decodeEntities,ur=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return w()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.layout,a=r.options.layout,i=(void 0===a?{}:a).map(function(e){var t="".concat(sr(e.value),"-view"),r=o===e.value;return{icon:t,title:e.label,isActive:r,onClick:function(){n({layout:e.value})}}});return Object(y.createElement)(ar,null,Object(y.createElement)(or,{controls:i}))}}]),t}(ir),lr=wp.apiFetch,cr=wp.data.withSelect,pr=wp.element,dr=pr.Component,mr=pr.Fragment,fr=wp.url.addQueryArgs,hr=window.WordCampBlocks.organizers||{},gr={orderby:"title",order:"asc",per_page:100},br={orderby:"name",order:"asc",per_page:100},vr=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this,e))).state={allOrganizerPosts:null,allOrganizerTerms:null},n}return w()(t,e),f()(t,[{key:"
componentWillMount",value:function(){this.isStillMounted=!0;var e=lr({path:fr("/wp/v2/organizers",gr)}),t=lr({path:fr("/wp/v2/organizer_team",br)});this.isStillMounted&&this.setState({allOrganizerPosts:e,allOrganizerTerms:t})}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"render",value:function(){var e=this.props.attributes.mode;return Object(y.createElement)(mr,null,Object(y.createElement)(yn,c()({icon:Cr},this.props,this.state)),""!==e&&Object(y.createElement)(mr,null,Object(y.createElement)(rr,this.props),Object(y.createElement)(ur,this.props)))}}]),t}(dr),Er=cr(function(e,t){var n=t.attributes,r=n.mode,o=n.item_ids,a=n.sort,i=e("core").getEntityRecords,s=Object(C.split)(a,"_",2),l=u()(s,2),c={orderby:l[0],order:l[1],per_page:100,context:"view"};if(Array.isArray(o))switch(r){case"wcb_organizer":c.include=o;break;case"wcb_organizer_team
":c.organizer_team=o}var p=Object(C.pickBy)(c,function(e){return!Object(C.isUndefined)(e)});return{blockData:hr,organizerPosts:i("postType","wcb_organizer",p)}})(vr),wr=wp.i18n.__,yr="wordcamp/organizers",Or=wr("Organizers","wordcamporg"),Cr="groups",kr={title:wr("Organizers","wordcamporg"),description:wr("Add a list of organizers.","wordcamporg"),icon:Cr,category:"wordcamp",edit:Er,save:function(){return null}},Sr=n(28),_r=n.n(Sr),xr=n(29),Ar=n.n(xr),jr=wp.i18n.__;function Dr(e){return e.split(/(%[1-9]?\$?s)/)}function Fr(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 Pr(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 Nr=wp.components.Disabled,Mr=wp.element.Component,Lr=wp.url.isURL,Ir=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this,e))).state={},n}return w()(t,e),f()(t,[{key:"getFullImage",value:function(){var e=this.props.wpMediaDetails,t=this.state.selectedImage;if(t&&t.hasOwnProperty("source_url"))return t;if(e.hasOwnProperty("full")&&e.full.hasOwnProperty("source_url"))return this.setState({selectedImage:e.full}),e.full;var n={source_url:""};for(var r in e)e.hasOwnProperty(r)&&e[r].width>(n.width||0)&&e[r].hasOwnProperty("source_url")&&(n=e[r]);return this.setState({selectedImage:n}),n}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.alt,r=e.width,o=void 0===r?150:r,a=e.imageLink,i=this.getFullImage(),s=Object(y.createElement)("img",{className:x()("wordcamp-featured-image",t),src:i.source_url,alt:
n,width:o+"px"});return Lr(a)&&(s=Object(y.createElement)(Nr,null,Object(y.createElement)("a",{href:a,className:x()("wordcamp-image-link","wordcamp-featured-image-link")},s))),s=Object(y.createElement)("div",{className:x()("wordcamp-image-container","wordcamp-featured-image-container",t)},s)}}]),t}(Mr),Tr=(wp.components.Disabled,wp.element.Component),Rr=wp.htmlEntities.decodeEntities,Vr=wp.i18n.__;function Br(e){var t=e.session,n=Object(C.get)(t,"_embedded.speakers",[]);n=n.map(function(e){var t=e.link,n=void 0===t?"":t,r=e.title,o=void 0===r?{}:r;return o=o.rendered||Vr("Unnamed","wordcamporg"),n?Object(y.createElement)("a",{key:n,href:n},Rr(o.trim())):Rr(o.trim())});var r=Fr(Dr(Vr("Presented by %s","wordcamporg")),[function(e){var t=[],n=jr(", ","wordcamporg"),r=jr(" and ","wordcamporg");if(!Arra
y.isArray(e))return t;switch(e.length){case 0:break;case 1:t=e;break;case 2:t=Pr(e,r);break;default:var o=_r()(e).reverse(),a=Ar()(o),i=a[0];t=Pr(a.slice(1),n).concat([n,r,i])}return t}(n)]);return Object(y.createElement)("div",{className:"wordcamp-item-meta wordcamp-session-speakers"},r)}function zr(e){var t,n,r,o=e.session,a=e.show_meta,i=e.show_category,s=Object(C.get)(o,"_embedded['wp:term']",[]).flat();if(a){if(o.session_track.length){var l=s.filter(function(e){return"wcb_track"===e.taxonomy}),c=u()(l,1)[0];n=Fr(Dr(Vr("%1$s at %2$s in %3$s","wordcamporg")),[Rr(o.session_date_time.date),Rr(o.session_date_time.time),Object(y.createElement)("span",{className:x()("wordcamp-session-track","wordcamp-session-track-"+Rr(c.slug.trim()))},Rr(c.name.trim()))])}else n=Fr(Dr(Vr("%1$s at %2$s","wordcamporg")),[Rr(o.session_date_time.date),Rr(o.session_date_time.time)]);t=Object(y.cre
ateElement)("div",{className:"wordcamp-session-time-location"},n)}if(i&&o.session_category.length){var p=Vr(", ","wordcamporg"),d=s.filter(function(e){return"wcb_session_category"===e.taxonomy}).map(function(e){return Object(y.createElement)("span",{key:e.slug,className:x()("wordcamp-session-category","wordcamp-session-category-"+Rr(e.slug))},Rr(e.name.trim()))});r=Object(y.createElement)("div",{className:"wordcamp-session-categories"},Pr(d,p))}return Object(y.createElement)("div",{className:"wordcamp-item-meta wordcamp-session-details"},t,r)}var Ur=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return w()(t,e),f()(t,[{key:"hasSpeaker",value:function(e){return Object(C.get)(e,"_embedded.speakers",[]).length>0}},{key:"render",value:function(){var e=this,t=this.props,n=t.attributes,r=t.sessi
onPosts,o=n.show_speaker,a=n.show_images,i=n.image_align,s=n.featured_image_width,u=n.content,l=n.excerpt_more,c=n.show_meta,p=n.show_category;return Object(y.createElement)(ne,this.props,r.map(function(t){return Object(y.createElement)("div",{key:t.slug,className:x()("wordcamp-block-post-list-item","wordcamp-session","wordcamp-session-"+Rr(t.slug),"wordcamp-clearfix")},Object(y.createElement)(ee,{className:"wordcamp-session-title",headingLevel:3,title:t.title.rendered.trim(),link:t.link}),o&&e.hasSpeaker(t)&&Object(y.createElement)(Br,{session:t}),a&&Object(y.createElement)(Ir,{className:x()("wordcamp-session-image-container","align-"+Rr(i)),wpMediaDetails:Object(C.get)(t,"_embedded.wp:featuredmedia[0].media_details.sizes",{}),alt:Rr(t.title.rendered),width:Number(s),imageLink:t.link}),"none"!==u&&Object(y.createElement)(te,{className:x()("wordcam
p-session-content-"+Rr(u)),content:"full"===u?t.content.rendered.trim():t.excerpt.rendered.trim(),link:"full"===u||l?t.link:null,linkText:Vr("full"===u?"Visit session page":"Read more","wordcamporg")}),(c||p)&&Object(y.createElement)(zr,{session:t,show_meta:c,show_category:p}))}))}}]),t}(Tr),Wr=n(15),Hr=n.n(Wr),Gr=wp.components.Dashicon,$r=wp.element.Component,qr=wp.htmlEntities.decodeEntities,Yr=wp.i18n.__;function Xr(e){var t,n,r=e.type,o=e.icon,a=e.label,i=void 0===a?"":a,s=e.image,u=void 0===s?"":s,l=e.count,c=void 0===l?0:l;switch(r){case"wcb_session":t=u?Object(y.createElement)("img",{className:"wordcamp-item-select-option-image",src:u,alt:i,width:24,height:24}):Object(y.createElement)("div",{className:"wordcamp-item-select-option-icon-container"},Object(y.createElement)(Gr,{className:"wordcamp-item-select-option-icon",icon:o,
size:16})),n=Object(y.createElement)("span",{className:"wordcamp-item-select-option-label"},i);break;case"wcb_track":case"wcb_session_category":t=Object(y.createElement)("div",{className:"wordcamp-item-select-option-icon-container"},Object(y.createElement)(Gr,{className:"wordcamp-item-select-option-icon",icon:o,size:16})),n=Object(y.createElement)("span",{className:"wordcamp-item-select-option-label"},i,Object(y.createElement)("span",{className:"wordcamp-item-select-option-label-term-count"},c))}return Object(y.createElement)("div",{className:"wordcamp-item-select-option"},t,n)}var Kr=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this))).state={wcb_session:[],wcb_track:[],wcb_session_category:[],loading:!0},n.buildSelectOptions=n.buildSelectOptions.bind(j()(j()(n))),n}return w()(t,e),f()(t,[{key:"componentWillMount",
value:function(){var e=this;this.isStillMounted=!0;var t=this.props,n=t.allSessionPosts,r=t.allSessionTracks,o=t.allSessionCategories,a=[];a.push(n.then(function(t){var n=t.map(function(e){var t=Object(C.get)(e,"_embedded['wp:featuredmedia'].media_details.sizes.thumbnail.source_url","");return{label:qr(e.title.rendered.trim())||Yr("(Untitled)","wordcamporg"),value:e.id,type:"wcb_session",image:t}});e.isStillMounted&&e.setState({wcb_session:n})}).catch()),[r,o].forEach(function(t){a.push(t.then(function(t){var n=t.map(function(e){return{label:qr(e.name)||Yr("(Untitled)","wordcamporg"),value:e.id,type:e.taxonomy,count:e.count||0}});if(e.isStillMounted){var r=u()(n,1)[0];e.setState(Hr()({},r.type,n))}}).catch())}),Promise.all(a).then(function(){e.setState({loading:!1})})}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"buildSelectOptions",value:function(e){var
t=[],n={wcb_session:Yr("Sessions","wordcamporg"),wcb_track:Yr("Tracks","wordcamporg"),wcb_session_category:Yr("Session Categories","wordcamporg")};for(var r in this.state)!this.state.hasOwnProperty(r)||e&&r!==e||!this.state[r].length||t.push({label:n[r],options:this.state[r]});return t}},{key:"render",value:function(){var e=this.props,t=e.icon,n=e.label,r=e.attributes,o=e.setAttributes,a=r.mode,i=r.item_ids,s=this.buildSelectOptions(a),u=[];a&&i.length&&(u=Object(C.get)(s,"[0].options",[]).filter(function(e){return Object(C.includes)(i,e.value)}));return Object(y.createElement)(cn,{className:"wordcamp-sessions-select",label:n,value:u,buildSelectOptions:this.buildSelectOptions,onChange:function(e){return o(e)},mode:a,selectProps:{isLoading:this.state.loading,formatGroupLabel:function(e){return Object(y.createElement)("span",{className:"wordcamp-item-select-
option-group-label"},e.label)},formatOptionLabel:function(e){return Object(y.createElement)(Xr,c()({icon:t},e))}}})}}]),t}($r),Zr=wp.components,Qr=Zr.Button,Jr=Zr.Placeholder,eo=wp.i18n.__,to=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return w()(t,e),f()(t,[{key:"render",value:function(){var e,t=this.props,n=t.icon,r=t.attributes,o=t.setAttributes,a=t.sessionPosts,i=r.mode,s=Array.isArray(a)&&a.length;if(i&&!s)return Object(y.createElement)(R,{icon:n,label:Bo,loading:!Array.isArray(a)});switch(i){case"all":e=Object(y.createElement)(Ur,this.props);break;case"wcb_session":case"wcb_track":case"wcb_session_category":e=Object(y.createElement)(V,{label:this.getModeLabel(i),icon:n,content:Object(y.createElement)(Ur,this.props),placeholderChildren:Object(y.createElement)(Kr,this.props)});break;default:e=Object(y.createElement)(Jr,{className:x()("wordcamp-block-edit-placeholder
","wordcamp-block-edit-placeholder-no-mode"),icon:n,label:Bo},Object(y.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(y.createElement)(Qr,{isDefault:!0,isLarge:!0,onClick:function(){o({mode:"all"})}},this.getModeLabel("all"))),Object(y.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(y.createElement)(Kr,c()({icon:n,label:eo("Choose specific sessions, tracks, or categories","wordcamporg")},this.props))))}return e}}]),t}(T),no=(n(53),wp.element.Component),ro=wp.components,oo=ro.PanelBody,ao=ro.PanelRow,io=ro.TextControl,so=ro.BaseControl,uo=ro.SelectControl,lo=(ro.ToggleControl,wp.i18n.__),co=[{label:lo("Thumbnail","wordcamporg"),value:"150"},{label:lo("Thumbnail - Large","wordcamporg"),value:"926"},{label:lo("Medium","wordcamporg"),value:"300"},{label
:lo("Medium - Large","wordcamporg"),value:"768"},{label:lo("Large","wordcamporg"),value:"1024"},{label:lo("(Custom)","wordcamporg"),value:""}],po=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return w()(t,e),f()(t,[{key:"componentWillMount",value:function(){this.availableSizes=co.map(function(e){return e.value})}},{key:"onPresetSizeSelect",value:function(e){""!==e&&(0,this.props.setAttributes)({featured_image_width:Number(e)})}},{key:"render",value:function(){var e=this,t=this.props,n=t.attributes,r=t.setAttributes,o=t.title,a=t.help,i=t.selectLabel,s=(t.cropLabel,n.featured_image_width),u=-1===this.availableSizes.indexOf(s.toString())?"":s.toString();return Object(y.createElement)(oo,{title:o,initialopen:!1},Object(y.createElement)(ao,null,Object(y.createElement)(so,{help:a},Object(y.createElement)(a
o,null,Object(y.createElement)(uo,{label:i,value:u,options:co,onChange:function(t){return e.onPresetSizeSelect(t)}})),Object(y.createElement)(ao,null,Object(y.createElement)(io,{label:lo("Width (in px)","wordcamporg"),type:"number",value:s,onChange:function(e){return r({featured_image_width:Number(e)})}})))))}}]),t}(no),mo=wp.components,fo=mo.PanelBody,ho=mo.PanelRow,go=mo.SelectControl,bo=mo.ToggleControl,vo=wp.editor.InspectorControls,Eo=wp.element,wo=Eo.Component,yo=(Eo.Fragment,wp.i18n.__),Oo=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return w()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.show_speaker,a=t.content,i=t.excerpt_more,s=t.show_meta,u=t.show_category,l=t.sort,p=r.options;return Object(y.createElement)(vo,null,Object(y.createElement)(Hn,this.props),Object(y.createElement)(fo,{title:yo("Content Settings","wordc
amporg"),initialOpen:!0},Object(y.createElement)(ho,null,Object(y.createElement)(go,{label:yo("Description","wordcamporg"),value:a||"full",options:p.content,onChange:function(e){return n({content:e})}})),"excerpt"===a&&Object(y.createElement)(ho,null,Object(y.createElement)(bo,{label:yo("Read More Link","wordcamporg"),help:yo("Show a link at the end of the excerpt (some themes already include this)","wordcamporg"),checked:void 0!==i&&i,onChange:function(e){return n({excerpt_more:e})}})),Object(y.createElement)(ho,null,Object(y.createElement)(bo,{label:yo("Details","wordcamporg"),help:yo("Show date, time, and track.","wordcamporg"),checked:void 0!==s&&s,onChange:function(e){return n({show_meta:e})}})),Object(y.createElement)(ho,null,Object(y.createElement)(bo,{label:yo("Categories","wordcamporg"),help:yo("Show se
ssion categories.","wordcamporg"),checked:void 0!==u&&u,onChange:function(e){return n({show_category:e})}})),Object(y.createElement)(ho,null,Object(y.createElement)(bo,{label:yo("Speakers","wordcamporg"),help:yo("Show session speakers.","wordcamporg"),checked:void 0!==o&&o,onChange:function(e){return n({show_speaker:e})}}))),Object(y.createElement)(po,c()({title:yo("Image size","wordcamporg"),help:yo("Specify image height and width, or select a predefined size.","wordcamporg"),selectLabel:yo("Size","wordcamporg")},this.props)),Object(y.createElement)(fo,{title:yo("Sorting","wordcamporg")},Object(y.createElement)(ho,null,Object(y.createElement)(go,{label:yo("Sort by","wordcamporg"),value:l,options:p.sort||"session_time",onChange:function(e){return n({sort:e})}}))))}}]),t}(wo),Co=wp.components.Toolbar,ko=wp
.editor.BlockControls,So=wp.i18n.__,_o=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return w()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=t.layout,o=[{value:"grid",label:So("Grid","wordcamporg"),isActive:"grid"===r},{value:"list",label:So("List","wordcamporg"),isActive:"grid"===r}];return Object(y.createElement)(ko,null,Object(y.createElement)(Co,{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),xo=wp.apiFetch,Ao=wp.data.withSelect,jo=wp.element,Do=jo.Component,Fo=jo.Fragment,Po=wp.url.addQueryArgs,No=window.WordCampBlocks.sessions||{},Mo={orderby:"title",order:"asc",per_page:100,_embed:
!0},Lo={orderby:"name",order:"asc",per_page:100},Io=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this))).state={allSessionPosts:null,allSessionTracks:null,allSessionCategories:null},n}return w()(t,e),f()(t,[{key:"componentWillMount",value:function(){this.isStillMounted=!0;var e=xo({path:Po("/wp/v2/sessions",Mo)}),t=xo({path:Po("/wp/v2/session_track",Lo)}),n=xo({path:Po("/wp/v2/session_category",Lo)});this.isStillMounted&&this.setState({allSessionPosts:e,allSessionTracks:t,allSessionCategories:n})}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"render",value:function(){var e=this.props.attributes.mode;return Object(y.createElement)(Fo,null,Object(y.createElement)(to,c()({icon:zo},this.props,this.state)),e&&Object(y.createElement)(Fo,null,Object(y.createElement)(Oo,this.props),Object(y.createElement)(_o,this.props)))}}]),t}(Do),To=
Ao(function(e,t){var n=t.attributes,r=n.mode,o=n.item_ids,a=n.sort,i=e("core").getEntityRecords,s={per_page:100,_embed:!0,context:"view",_wcpt_session_type:"session"};if("session_time"!==a){var l=Object(C.split)(a,"_",2),c=u()(l,2),p=c[0],d=c[1];s.orderby=p,s.order=d}if(Array.isArray(o))switch(r){case"wcb_session":s.include=o;break;case"wcb_track":s.session_track=o;break;case"wcb_session_category":s.session_category=o}var m=i("postType","wcb_session",Object(C.pickBy)(s,function(e){return!Object(C.isUndefined)(e)}));return Array.isArray(m)&&"session_time"===a&&m.sort(function(e,t){return Number(e.meta._wcpt_session_time)-Number(t.meta._wcpt_session_time)}),{blockData:No,sessionPosts:m}})(Io),Ro=wp.i18n.__,Vo="wordcamp/sessions",Bo=Ro("Sessions","wordcamporg"),zo="list-view",Uo={title:Ro("Sessions","wordcam
porg"),description:Ro("Add a list of sessions.","wordcamporg"),icon:zo,category:"wordcamp",edit:To,save:function(){return null}},Wo=(n(54),wp.components.Disabled),Ho=wp.element,Go=Ho.Component,$o=Ho.Fragment,qo=wp.htmlEntities.decodeEntities,Yo=wp.i18n,Xo=Yo.__,Ko=Yo._n,Zo=wp.escapeHtml.escapeAttribute;function Qo(e){var t=e.speaker,n=e.tracks,r=Object(C.get)(t,"_embedded.sessions",[]),o=Object(y.createElement)($o,null,null);return r.length&&(o=Object(y.createElement)("div",{className:x()("wordcamp-item-meta","wordcamp-speaker-sessions")},Object(y.createElement)("h4",{className:"wordcamp-speaker-sessions-heading"},Ko("Session","Sessions",r.length,"wordcamporg")),Object(y.createElement)("ul",{className:"wordcamp-speaker-sessions-list"},r.map(function(e){return Object(y.createElement)("li",{key:Zo(e.slug),className:"wor
dcamp-speaker-session-content"},Object(y.createElement)(Wo,null,Object(y.createElement)("a",{className:"wordcamp-speaker-session-link",href:e.link},qo(e.title.rendered.trim())||Xo("(Untitled)","wordcamporg")),Object(y.createElement)("span",{className:"wordcamp-speaker-session-info"},e.session_track.length&&Array.isArray(n)&&Fr(Dr(Xo("%1$s at %2$s in %3$s","wordcamporg")),qo(e.session_date_time.date),qo(e.session_date_time.time),Object(C.get)(n.find(function(t){var n=u()(e.session_track,1)[0];return parseInt(t.id)===n}),"name")),!e.session_track.length&&Fr(Dr(Xo("%1$s at %2$s","wordcamporg")),qo(e.session_date_time.date),qo(e.session_date_time.time)))))})))),o}var Jo=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return w()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.
speakerPosts,r=e.tracks,o=t.show_avatars,a=t.avatar_size,i=t.avatar_align,s=t.content,u=t.excerpt_more,l=t.show_session;return Object(y.createElement)(ne,this.props,n.map(function(e){return Object(y.createElement)("div",{key:e.slug,className:x()("wordcamp-speaker","wordcamp-speaker-"+qo(e.slug))},Object(y.createElement)(ee,{className:"wordcamp-speaker-title",headingLevel:3,title:e.title.rendered.trim(),link:e.link}),o&&Object(y.createElement)(q,{className:x()("wordcamp-speaker-avatar-container","align-"+qo(i)),name:qo(e.title.rendered.trim())||"",size:a,url:e.avatar_urls[24],imageLink:e.link}),"none"!==s&&Object(y.createElement)(te,{className:x()("wordcamp-speaker-content-"+qo(s)),content:"full"===s?e.content.rendered.trim():e.excerpt.rendered.trim(),link:"full"===s||u?e.link:null,linkText:Xo("full"===s?"Visit session page":"Read more
","wordcamporg")}),!0===l&&Object(y.createElement)(Qo,{speaker:e,tracks:r}))}))}}]),t}(Go),ea=wp.components.Dashicon,ta=wp.element.Component,na=wp.htmlEntities.decodeEntities,ra=wp.i18n.__;function oa(e){var t,n,r=e.type,o=e.icon,a=e.label,i=void 0===a?"":a,s=e.avatar,u=void 0===s?"":s,l=e.count,c=void 0===l?0:l;switch(r){case"wcb_speaker":t=Object(y.createElement)(q,{className:"wordcamp-item-select-option-avatar",name:i,size:24,url:u}),n=Object(y.createElement)("span",{className:"wordcamp-item-select-option-label"},i);break;case"wcb_speaker_group":t=Object(y.createElement)("div",{className:"wordcamp-item-select-option-icon-container"},Object(y.createElement)(ea,{className:"wordcamp-item-select-option-icon",icon:o,size:16})),n=Object(y.createElement)("span",{className:"wordcamp-item-select-option-label"},i,Object(y.createElement)("span&q
uot;,{className:"wordcamp-item-select-option-label-term-count"},c))}return Object(y.createElement)("div",{className:"wordcamp-item-select-option"},t,n)}var aa=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this))).state={wcb_speaker:[],wcb_speaker_group:[],loading:!0},n.buildSelectOptions=n.buildSelectOptions.bind(j()(j()(n))),n}return w()(t,e),f()(t,[{key:"componentWillMount",value:function(){var e=this;this.isStillMounted=!0;var t=this.props,n=t.allSpeakerPosts,r=t.allSpeakerTerms,o=n.then(function(t){var n=t.map(function(e){return{label:na(e.title.rendered.trim())||ra("(Untitled)","wordcamporg"),value:e.id,type:"wcb_speaker",avatar:e.avatar_urls[24]}});e.isStillMounted&&e.setState({wcb_speaker:n})}),a=r.then(function(t){var n=t.map(function(e){return{label:na(e.name)||ra("(Untitled)","wordcamporg"),value:e.id,type:"wcb_speaker_group",count:e.coun
t}});e.isStillMounted&&e.setState({wcb_speaker_group:n})});Promise.all([o,a]).then(function(){e.setState({loading:!1})})}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"buildSelectOptions",value:function(e){var t=[],n={wcb_speaker:ra("Speakers","wordcamporg"),wcb_speaker_group:ra("Groups","wordcamporg")};for(var r in this.state)!this.state.hasOwnProperty(r)||e&&r!==e||!this.state[r].length||t.push({label:n[r],options:this.state[r]});return t}},{key:"render",value:function(){var e=this.props,t=e.label,n=e.icon,r=e.attributes,o=e.setAttributes,a=r.mode,i=r.item_ids,s=this.buildSelectOptions(a),u=[];a&&i.length&&(u=Object(C.get)(s,"[0].options",[]).filter(function(e){return Object(C.includes)(i,e.value)}));return Object(y.createElement)(cn,{className:"wordcamp-speakers-select",label:t,value:u,buildSelectOptions:this.buildSelectOptions,o
nChange:function(e){return o(e)},mode:a,selectProps:{isLoading:this.state.loading,formatGroupLabel:function(e){return Object(y.createElement)("span",{className:"wordcamp-item-select-option-group-label"},e.label)},formatOptionLabel:function(e){return Object(y.createElement)(oa,c()({icon:n},e))}}})}}]),t}(ta),ia=wp.components,sa=ia.Button,ua=ia.Placeholder,la=wp.i18n.__,ca=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return w()(t,e),f()(t,[{key:"render",value:function(){var e,t=this.props,n=t.icon,r=t.attributes,o=t.setAttributes,a=t.speakerPosts,i=r.mode,s=Array.isArray(a)&&a.length;if(i&&!s)return Object(y.createElement)(R,{icon:n,label:Ba,loading:!Array.isArray(a)});switch(i){case"all":e=Object(y.createElement)(Jo,this.props);break;case"wcb_speaker":case"wcb_speaker_group":e=Object(y.createElement)(V,{label:this.getModeLabel(i),icon:n,content:Object(y.createElement)(Jo,
this.props),placeholderChildren:Object(y.createElement)(aa,this.props)});break;default:e=Object(y.createElement)(ua,{className:x()("wordcamp-block-edit-placeholder","wordcamp-block-edit-placeholder-no-mode"),icon:n,label:Ba},Object(y.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(y.createElement)(sa,{isDefault:!0,isLarge:!0,onClick:function(){o({mode:"all"})}},this.getModeLabel("all"))),Object(y.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(y.createElement)(aa,c()({icon:n,label:la("Choose specific speakers or groups","wordcamporg")},this.props))))}return e}}]),t}(T),pa=wp.components,da=pa.PanelBody,ma=pa.PanelRow,fa=pa.SelectControl,ha=pa.ToggleControl,ga=wp.editor.InspectorControls,ba=wp.element,va=ba.Component,Ea=ba.Fragment,wa=wp.i18n.__,ya={grid_columns:{default:2,minimum:2,maximum:4},avatar_size:{default:150,minimum:25,maximu
m:600}},Oa={align:{},content:{},sort:{}},Ca=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return w()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.show_avatars,a=t.avatar_size,i=t.avatar_align,s=t.content,u=t.excerpt_more,l=t.show_session,c=t.sort,p=r.schema,d=void 0===p?ya:p,m=r.options,f=void 0===m?Oa:m;return Object(y.createElement)(ga,null,Object(y.createElement)(Hn,this.props),Object(y.createElement)(da,{title:wa("Avatar Settings","wordcamporg"),initialOpen:!0},Object(y.createElement)(ma,null,Object(y.createElement)(ha,{label:wa("Show avatars","wordcamporg"),checked:o,onChange:function(e){return n({show_avatars:e})}})),o&&Object(y.createElement)(Ea,null,Object(y.createElement)(ma,null,Object(y.createElement)(Pn,{label:wa("Size","wordcamporg"),value:Number(a),initialPosition:Number(d.avatar_size.defaul
t),onChange:function(e){return n({avatar_size:e})},rangeProps:{min:Number(d.avatar_size.minimum),max:Number(d.avatar_size.maximum)}})),Object(y.createElement)(ma,null,Object(y.createElement)(In,{label:wa("Alignment","wordcamporg"),value:i,onChange:function(e){return n({avatar_align:e})},alignOptions:f.align})))),Object(y.createElement)(da,{title:wa("Content Settings","wordcamporg"),initialOpen:!1},Object(y.createElement)(ma,null,Object(y.createElement)(fa,{label:wa("Biography Length","wordcamporg"),value:s,options:f.content,onChange:function(e){return n({content:e})}})),"excerpt"===s&&Object(y.createElement)(ma,null,Object(y.createElement)(ha,{label:wa("Read More Link","wordcamporg"),help:wa("Show a link at the end of the excerpt (some themes already include this)","wordcamporg"),checked:u,onChange:function(e){return n({excerpt_more:e})}})),Object(y.createElement)(ma
,null,Object(y.createElement)(ha,{label:wa("Session Information","wordcamporg"),help:wa("Show speaker's session name, time, and track","wordcamporg"),checked:l,onChange:function(e){return n({show_session:e})}}))),Object(y.createElement)(da,{title:wa("Sorting & Filtering","wordcamporg"),initialOpen:!1},Object(y.createElement)(ma,null,Object(y.createElement)(fa,{label:wa("Sort by","wordcamporg"),value:c,options:f.sort,onChange:function(e){return n({sort:e})}}))))}}]),t}(va),ka=wp.components.Toolbar,Sa=wp.editor.BlockControls,_a=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return w()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.layout,a=r.options.layout,i=(void 0===a?{}:a).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(y.createElement)(Sa,null,Object(y.createElement)(ka,{controls:i}))}}]),t}(wp.element.Component),xa=wp.apiFetch,Aa=wp.data.withSelect,ja=wp.element,Da=ja.Component,Fa=ja.Fragment,Pa=wp.url.addQueryArgs,Na=window.WordCampBlocks.speakers||{},Ma={orderby:"title",order:"asc",per_page:100,_embed:!0},La={orderby:"name",order:"asc",per_page:100},Ia=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this))).state={allSpeakerPosts:null,allSpeakerTerms:null},n}return w()(t,e),f()(t,[{key:"componentWillMount",value:function(){this.isStillMounted=!0;var e=xa({path:Pa("/wp/v2/speakers",Ma)}),t=xa({path:Pa("/wp/v2/speaker_group",La)});this.isStillMounted&&this.setState({allSpeakerPosts:e,allSpeakerTerms:t})}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"render",value:function(){var e=this.
props.attributes.mode;return Object(y.createElement)(Fa,null,Object(y.createElement)(ca,c()({icon:za},this.props,this.state)),e&&Object(y.createElement)(Fa,null,Object(y.createElement)(Ca,this.props),Object(y.createElement)(_a,this.props)))}}]),t}(Da),Ta=Aa(function(e,t){var n=t.attributes,r=n.mode,o=n.item_ids,a=n.sort,i=e("core").getEntityRecords,s=Object(C.split)(a,"_",2),l=u()(s,2),c={orderby:l[0],order:l[1],per_page:100,_embed:!0,context:"view"};if(Array.isArray(o))switch(r){case"wcb_speaker":c.include=o;break;case"wcb_speaker_group":c.speaker_group=o}var p=Object(C.pickBy)(c,function(e){return!Object(C.isUndefined)(e)});return{blockData:Na,speakerPosts:i("postType","wcb_speaker",p),tracks:i("taxonomy","wcb_track",{per_page:100})}})(Ia),Ra=wp.i18n.__,Va="wordcamp/speakers",Ba=Ra("Speakers","wordcamporg"),za="megaphone",Ua={title:Ra("Spea
kers","wordcamporg"),description:Ra("Add a list of speakers.","wordcamporg"),icon:za,category:"wordcamp",edit:Ta,save:function(){return null}},Wa=wp.element.Component,Ha=wp.editor.InspectorControls,Ga=wp.components,$a=Ga.PanelBody,qa=Ga.PanelRow,Ya=Ga.ToggleControl,Xa=Ga.SelectControl,Ka=wp.i18n.__,Za=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return w()(t,e),f()(t,[{key:"render",value:function(){var e=[{label:Ka("Name (A to Z)","wordcamporg"),value:"name_asc"},{label:Ka("Name (Z to A)","wordcamporg"),value:"name_desc"},{label:Ka("Sponsor Level","wordcamporg"),value:"sponsor_level"}],t=[{label:Ka("Full","wordcamporg"),value:"full"},{label:Ka("Excerpt","wordcamporg"),value:"excerpt"},{label:Ka("None","wordcamporg"),value:&q
uot;none"}],n=this.props,r=n.attributes,o=n.setAttributes,a=r.show_name,i=r.show_logo,s=r.sort_by,u=r.excerpt_more,l=r.content;return Object(y.createElement)(Ha,null,Object(y.createElement)(Hn,this.props),Object(y.createElement)($a,{title:Ka("Content Settings","wordcamporg"),initialOpen:!0},Object(y.createElement)(qa,null,Object(y.createElement)(Ya,{label:Ka("Name","wordcamporg"),help:Ka("Show or hide sponsor name","wordcamporg"),checked:void 0===a||a,onChange:function(e){return o({show_name:e})}})),Object(y.createElement)(qa,null,Object(y.createElement)(Ya,{label:Ka("Logo","wordcamporg"),help:Ka("Show or hide sponsor logo","wordcamporg"),checked:void 0===i||i,onChange:function(e){return o({show_logo:e})}})),Object(y.createElement)(qa,null,Object(y.createElement)(Xa,{label:Ka("Description","wordcamporg"),value:l,options:t,help:Ka("Length of sponsor descri
ption","wordcamporg"),onChange:function(e){return o({content:e})}})),"excerpt"===l&&Object(y.createElement)(qa,null,Object(y.createElement)(Ya,{label:Ka("Read More Link","wordcamporg"),help:Ka("Show a link at the end of the excerpt (some themes already include this)","wordcamporg"),checked:u,onChange:function(e){return o({excerpt_more:e})}})),Object(y.createElement)(qa,null,Object(y.createElement)(Xa,{label:Ka("Sort by","wordcamporg"),options:e,value:s||"name_asc",onChange:function(e){return o({sort_by:e})},help:Ka("Configure sponsor levels from the Sponsor -> Order Sponsor Levels page.","wordcamporg")}))),Object(y.createElement)(po,c()({title:Ka("Logo size","wordcamporg"),help:Ka("Specify logo width, or select a predefined size.","wordcamporg"),selectLabel:Ka("Size","wordcamporg")},this.props)))}}])
,t}(Wa),Qa=wp.element.Component,Ja=wp.escapeHtml.escapeAttribute,ei=wp.i18n.__;function ti(e){var t=e.sponsorPost,n=e.attributes,r=(e.onFeatureImageChange,n.show_name),o=n.show_logo,a=(n.show_desc,n.content),i=n.excerpt_more,s=n.featured_image_width,u=Object(C.get)(t,"_embedded.wp:featuredmedia[0].media_details.sizes",{}),l="full"===a?t.content.rendered.trim():t.excerpt.rendered.trim();return console.log("content is: ",a,l),Object(y.createElement)("div",{className:"wordcamp-sponsor-details wordcamp-sponsor-details-"+Ja(t.slug)},(r||void 0===r)&&Object(y.createElement)(ee,{className:"wordcamp-sponsor-title",headingLevel:3,title:t.title.rendered.trim(),link:t.link}),(o||void 0===o)&&Object(y.createElement)(Ir,{className:"wordcamp-sponsor-featured-image wordcamp-sponsor-logo",wpMediaDetails:u,alt:t.title.rendered,width:s,imageLink:t.link}),"none"!==a&&Object(y.createElement)(te,{clas
sName:x()("wordcamp-sponsor-content"),content:l,link:"full"===a||i?t.link:null,linkText:ei("full"===a?"Visit sponsor page":"Read more","wordcamporg")}))}var ni=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this))).state={selectedPosts:[],sortBy:"name_asc"},n}return w()(t,e),f()(t,[{key:"setFeaturedImageURL",value:function(e,t){var n=this.sponsorImageUrl||{};n[e]=t,this.sponsorImageUrl=n;var r=this.props.setAttributes,o=this.sponsorImageUrl;r({sponsor_image_urls:encodeURIComponent(JSON.stringify(o))})}},{key:"componentWillReceiveProps",value:function(e){var t=e.selectedPosts,n=e.attributes,r=e.sponsorTermOrder,o=n.sort_by,a=t.map(function(e){return e.id}).sort(),i=this.state,s=i.selectedPosts,u=i.sortBy,l=s.map(function(e){return e.id}).sort();if(u!==o||t.length!==s.length||0!==Object(C.difference)(l,a).length){var c;switch(o){case"sponsor_level":if(!Array.
isArray(r)||0===r.length)break;c=t.sort(function(e,t){return r.indexOf((e.sponsor_level||[])[0])-r.indexOf((t.sponsor_level||[])[0])});break;case"name_desc":c=t.sort(function(e,t){return e.title.rendered.trim()>t.title.rendered.trim()?-1:1});break;case"name_asc":default:c=t.sort(function(e,t){return e.title.rendered.trim()<t.title.rendered.trim()?-1:1})}this.setState({selectedPosts:c,sortBy:o})}}},{key:"render",value:function(){var e=this.props.attributes,t=this.state.selectedPosts;return Object(y.createElement)(ne,this.props,t.map(function(t){return Object(y.createElement)(ti,{sponsorPost:t,attributes:e})}))}}]),t}(Qa),ri=wp.htmlEntities.decodeEntities,oi=wp.i18n.__,ai=wp.components,ii=ai.Button,si=ai.Placeholder;function ui(e){return"post"===e.type?function(e){Object(C.get)(e.featuredImageData,"sizes.thumbnail.source_url",!1);return Object(y.createElement)("span",null,e.label)}(e):function(e){return Object(y.createE
lement)("span",{className:"wordcamp-item-select-option-label"},e.label,Object(y.createElement)("span",{className:"wordcamp-item-select-option-label-term-count"},e.count))}(e)}var li=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this,e))).state={posts:[],terms:[],loading:!0,selectedPosts:[],sponsorTermOrder:[]},n}return w()(t,e),f()(t,[{key:"setSelectedPosts",value:function(){var e=this.state,t=e.fetchedPosts,n=(e.sponsorTermOrder,this.props.attributes),r=n.post_ids,o=n.term_ids,a=n.mode;if(t&&t.length){var i=[],s=!0,u=!1,l=void 0;try{for(var c,p=t[Symbol.iterator]();!(s=(c=p.next()).done);s=!0){var d=c.value;if(d.hasOwnProperty("id"))switch(a){case"all":i.push(d);break;case"specific_posts":-1!==r.indexOf(d.id)&&i.push(d);break;case"specific_terms":Object(C.intersection)(o,d.sponsor_level||[]).length&&i.push(d)}}}catch(e){u=!0,l=e}finally{try{
s||null==p.return||p.return()}finally{if(u)throw l}}this.setState({selectedPosts:i})}}},{key:"componentWillMount",value:function(){var e=this;this.isStillMounted=!0;var t=this.props,n=t.sponsorPosts,r=t.sponsorLevels,o=t.siteSettings,a=n.then(function(t){var n=t.map(function(e){return{label:ri(e.title.rendered.trim())||oi("(Untitled)","wordcamporg"),value:e.id,type:"post",featuredImageData:Object(C.get)(e,"_embedded.wp:featuredmedia[0].media_details","")}});e.isStillMounted&&(e.setState({fetchedPosts:t}),e.setState({posts:n}))}).catch(function(e){console.error("Error fetching data",e)}),i=r.then(function(t){var n=t.map(function(e){return{label:ri(e.name)||oi("(Untitled)","wordcamporg"),value:e.id,type:"term",count:e.count}});e.isStillMounted&&(e.setState({fetchedTerms:t}),e.setState({terms:n}))}).catch(function(e){console.error("Error fetching data",e)}),s=o.
then(function(t){var n=t.wcb_sponsor_level_order;e.setState({sponsorTermOrder:n})});Promise.all([a,i,s]).then(function(){e.setState({loading:!1}),setTimeout(function(){return e.setSelectedPosts()})})}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"onChange",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.props.setAttributes,r=t.item_ids,o=t.mode;if(r&&o)switch(o){case"post":n({mode:"specific_posts",post_ids:r});break;case"term":n({mode:"specific_terms",term_ids:r})}else n({mode:"",post_ids:[],term_ids:[]});setTimeout(function(){return e.setSelectedPosts()})}},{key:"buildSelectOptions",value:function(){var e=this.state,t=e.posts,n=e.terms,r=[];return r.push({label:oi("Sponsor Levels","wordcamporg"),options:n}),r.push({label:oi("Sponsors","wordcamporg"),options:t}),r}},{ke
y:"render",value:function(){var e=this,t=this.props,n=t.icon,r=t.attributes,o=t.setAttributes,a=t.sponsorPosts,i=r.mode,s=r.post_ids,u=r.term_ids,l=this.state,p=l.fetchedPosts,d=l.posts,m=l.terms,f=l.selectedPosts,h=l.sponsorTermOrder,g=Array.isArray(p)&&p.length;if(i&&!g)return Object(y.createElement)(R,{label:vi,loading:function(){return!Array.isArray(a)}});var b=[];switch(i){case"all":break;case"specific_posts":b=d.filter(function(e){return Object(C.includes)(s,e.value)});break;case"specific_terms":b=m.filter(function(e){return Object(C.includes)(u,e.value)})}return Object(y.createElement)("div",null,Object(y.createElement)(ni,c()({selectedPosts:f,sponsorTermOrder:h},this.props)),"all"!==i&&Object(y.createElement)(si,{icon:n,label:oi("Sponsors","wordcamporg")},Object(y.createElement)("div",{className:""},Object(y.createElement)(ii,{isDefault:!0,isLarge:!0,on
Click:function(){o({mode:"all"}),setTimeout(function(){return e.setSelectedPosts()})}},oi("List all sponsors","wordcamporg"))),Object(y.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(y.createElement)(cn,c()({buildSelectOptions:function(){return e.buildSelectOptions()},isLoading:this.state.loading,onChange:function(t){return e.onChange(t)},selectProps:{formatOptionLabel:function(e){return Object(y.createElement)(ui,e)}},label:oi("Or, choose specific sponsors or levels","wordcamporg"),value:b},this.props)))))}}]),t}(T),ci=(wp.data.withSelect,wp.element),pi=ci.Component,di=ci.Fragment,mi=wp.apiFetch,fi=wp.url.addQueryArgs,hi=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this))).state={},n}return w()(t,e),f()(t,[{key:"componentWillMount",value:function(){var e={orderby:"title",order:"asc",per_page:100,_embed:!0},t={orderby:"id&q
uot;,order:"asc",per_page:100,_embed:!0};this.setState({sponsorPosts:mi({path:fi("/wp/v2/sponsors",e)}),sponsorLevels:mi({path:fi("/wp/v2/sponsor_level",t)}),siteSettings:mi({path:fi("/wp/v2/settings",{})})})}},{key:"render",value:function(){var e=this.state,t=e.sponsorPosts,n=e.sponsorLevels,r=e.siteSettings,o=this.props.attributes.mode;return Object(y.createElement)(di,null,Object(y.createElement)(li,c()({icon:Ei,sponsorPosts:t,sponsorLevels:n,siteSettings:r},this.props)),Object(y.createElement)(di,null,Object(y.createElement)(Za,c()({sponsorPosts:t,sponsorLevels:n},this.props)),o&&Object(y.createElement)(_o,this.props)))}}]),t}(pi),gi=wp.i18n.__,bi="wordcamp/sponsors",vi=gi("Sponsors","wordcamporg"),Ei="heart",wi={title:gi("Sponsors","wordcamporg"),description:gi("We wouldn't have WordCamp without their support.","wordcamporg"),icon:Ei,category
:"wordcamp",edit:hi,save:function(){return null}},yi=wp.blocks.registerBlockType;[r,o,a,i].forEach(function(e){var t=e.name,n=e.settings;yi(t,n)})}]);
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var i=o.apply(null,r);i&&e.push(i)}else if("object"===a)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){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 i}),n.d(t,"a",funct
ion(){return s});var r=n(30),o=void 0!==e?e:{},a=Object(r.a)(o),i=(a.flush,a.hydrate,a.cx,a.merge,a.getRegisteredStyles,a.injectGlobal),s=(a.keyframes,a.css);a.sheet,a.caches}).call(this,n(18))},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,n){var r=n(16),o=n(31),a=n(17);e.exports=function(e,t){return r(e)||o(e,t)||a()}},function(e,t){e.exports=ReactDOM},function(e,t,n){e.exports=n(39)()},function(e,t,n){"use strict";var r=s(n(43)),o=s(n(48)),a=s(n(22)),i=s(n(19));function s(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:i.default,TransitionGroup:a.default,ReplaceTransition:o.default,CSSTransition:r.default}},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){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){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(13)),o=s(n(0)),a=s(n(12)),i=n(20);n(21);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,a=n.transitionGroup,i=a&&!a.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(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=a.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,a=this.getTimeouts(),i=o?a.appear:a.enter;t||r?(this.props.onEnter(e,o),this.safeSetState({status:c},function(){n.props.onEntering(e,o),n.onTransitionEnd(e,i,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"},fun
ction(){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{};va
r n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[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 a=o.default.Children.only(n);return o.default.cloneElement(a,r)},t}(o.default.Component);function m(){}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:m,onEntering:m,onEntered:m,onExit:m,onExiting:m,onExited:m},d.UNMOUNTED=0,d.EXITED=1,d.ENTERING=2,d.ENTERED=3,d.EXITING=4;var f=(0,i.polyfill)(d);t.default=f},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 a(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 i(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,i=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps
":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==i||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!==i?"\n "+i:"")+(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(&q
uot;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=a;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 i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;!function(e){e&&e.__esModule}(n(13));t.timeoutsShape=null;t.classNamesShape=null},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(13)),o=s(n(0)
),a=n(20),i=n(49);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.getDerivedStateFr
omProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?(0,i.getInitialChildMapping)(e,r):(0,i.getNextChildMapping)(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=(0,i.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={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},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
,a.polyfill)(p);t.default=d,e.exports=t.default},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,n){var r=n(15);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){e.exports=function(){"use strict";return function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,a,i,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(41),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",s=o["request"+i],u=o["cancel"+i]||o["cancelRequest"+i],l=0;!s&&l<a.length;l++)s=o[a[l]+"Request"+i],u=o[a[l]+"Cancel"+i]||o[a[l]+"CancelRequest"+i];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.p
olyfill=function(e){e||(e=o),e.requestAnimationFrame=s,e.cancelAnimationFrame=u}}).call(this,n(18))},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}}(),a=n(0),i=u(a),s=u(n(13));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","inp
utStyle","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),m=function(){return d?"_"+Math.random().toString(36).substr(2,12):void 0},f=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.p
rops.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||m()},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,a.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||m()})}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onA
utosize(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&q
uot;,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?i.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 functio
n(e){c.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}();f.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.a
ny},f.defaultProps={minWidth:1,injectStyles:!0},t.default=f},function(e,t,n){var r=n(51),o=n(23),a=n(52);e.exports=function(e){return r(e)||o(e)||a()}},function(e,t,n){var r=n(16),o=n(23),a=n(17);e.exports=function(e){return r(e)||o(e)||a()}},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 a=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 i=function(e){function t(e,t,r){var o=t.trim().split(f);t=o;var a=o.length,i=e.length;switch(i){case 0:case 1:var s=0;for(e=0===i?"":e[0]+" ";s<a;++s)t[s]=n(e,t[s],r).t
rim();break;default:var u=s=0;for(t=[];s<a;++s)for(var l=0;l<i;++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,a){var i=e+";",s=2*t+3*n+4*a;if(944===s){e=i.indexOf(":",9)+1;var u=i.substring(e,i.length-1).trim();return u=i.substring(0,e).trim()+u+";",1===j||2===j&&o(u,1)?"-webkit-"+u+u:u}if(0===j||2===j&&!o(i,1))return i;switch(s){case 1015:return 97===i.charCodeAt(10)?"-webkit-"+i+i:i;case 951:return 116===i.charCodeAt(3)?"-webkit-"+i+i:i;case 963:return 110===i.charCodeAt(5)?"-webkit-"+i+i:i;case 1009:if(100!==
i.charCodeAt(4))break;case 969:case 942:return"-webkit-"+i+i;case 978:return"-webkit-"+i+"-moz-"+i+i;case 1019:case 983:return"-webkit-"+i+"-moz-"+i+"-ms-"+i+i;case 883:if(45===i.charCodeAt(8))return"-webkit-"+i+i;if(0<i.indexOf("image-set(",11))return i.replace(S,"$1-webkit-$2")+i;break;case 932:if(45===i.charCodeAt(4))switch(i.charCodeAt(5)){case 103:return"-webkit-box-"+i.replace("-grow","")+"-webkit-"+i+"-ms-"+i.replace("grow","positive")+i;case 115:return"-webkit-"+i+"-ms-"+i.replace("shrink","negative")+i;case 98:return"-webkit-"+i+"-ms-"+i.replace("basis","preferred-size")+i}return"-webkit-"+i+"-ms-"+i+i;case 964:return"-webkit-"+i+"-ms-flex-"+i+i;case 1023:if(99!==i.charCodeAt(8))break;return"
;-webkit-box-pack"+(u=i.substring(i.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+i+"-ms-flex-pack"+u+i;case 1005:return d.test(i)?i.replace(p,":-webkit-")+i.replace(p,":-moz-")+i:i;case 1e3:switch(t=(u=i.substring(13).trim()).indexOf("-")+1,u.charCodeAt(0)+u.charCodeAt(t)){case 226:u=i.replace(E,"tb");break;case 232:u=i.replace(E,"tb-rl");break;case 220:u=i.replace(E,"lr");break;default:return i}return"-webkit-"+i+"-ms-"+u+i;case 1017:if(-1===i.indexOf("sticky",9))break;case 975:switch(t=(i=e).length-10,s=(u=(33===i.charCodeAt(t)?i.substring(0,t):i).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|u.charCodeAt(7))){case 203:if(111>u.charCodeAt(8))break;case 115:i=i.replace(u,"-webkit-"+u)+";"+i;break;case 207:case 102:i=i.replace(u,"-webki
t-"+(102<s?"inline-":"")+"box")+";"+i.replace(u,"-webkit-"+u)+";"+i.replace(u,"-ms-"+u+"box")+";"+i}return i+";";case 938:if(45===i.charCodeAt(5))switch(i.charCodeAt(6)){case 105:return"-webkit-"+i+"-webkit-box-"+(u=i.replace("-items",""))+"-ms-flex-"+u+i;case 115:return"-webkit-"+i+"-ms-flex-item-"+i.replace(O,"")+i;default:return"-webkit-"+i+"-ms-flex-line-pack"+i.replace("align-content","").replace(O,"")+i}break;case 973:case 989:if(45!==i.charCodeAt(3)||122===i.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,a).replace(":fill-available",":stretch"):i.replace(u,"-webkit-"+u)+i
.replace(u,"-moz-"+u.replace("fill-",""))+i;break;case 962:if(i="-webkit-"+i+(102===i.charCodeAt(5)?"-ms-"+i:"")+i,211===n+a&&105===i.charCodeAt(13)&&0<i.indexOf("transform",10))return i.substring(0,i.indexOf(";",27)+1).replace(m,"$1-webkit-$2")+i}return i}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),N(2!==t?r:r.replace(C,"$1"),n,t)}function a(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 i(e,t,n,r,o,a,i,s,l,c){for(var p,d=0,m=t;d<P;++d)switch(p=F[d].call(u,e,m,n,r,o,a,i,s,l,c)){case void 0:case!1:case!0:case null:break;default:m=p}if(m!==t)return m}function s(e){return void 0!==(e=e.prefix)&&(N=null,e?"function"!=typeof e?j=1:(j=2
,N=e):j=0),s}function u(e,n){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<P){var u=i(-1,n,s,s,x,_,0,0,0,0);void 0!==u&&"string"==typeof u&&(n=u)}var p=function e(n,s,u,p,d){for(var m,f,h,E,w,O=0,C=0,k=0,S=0,F=0,N=0,L=h=m=0,I=0,T=0,R=0,V=0,B=u.length,z=B-1,U="",W="",H="",G="";I<B;){if(f=u.charCodeAt(I),I===z&&0!==C+S+k+O&&(0!==C&&(f=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(f){case 32:case 9:case 59:case 13:case 10:break;default:U+=u.charAt(I)}f=59}switch(f){case 123:for(m=(U=U.trim()).charCodeAt(0),h=1,V=++I;I<B;){switch(f=u.charCodeAt(I)){case 123:h++;break;case 125:h--;break;case 47:switch(f=u.charCodeAt(I+1)){case 42:case 47:e:{for(L=I+1;L<z;++L)switch(u.charCodeAt(L)){case 47:if(42===f&&42===u.charCodeAt(L-1)&&I+2!==L){I=L+1;break e}break;case 10:if(
47===f){I=L+1;break e}}I=L}}break;case 91:f++;case 40:f++;case 34:case 39:for(;I++<z&&u.charCodeAt(I)!==f;);}if(0===h)break;I++}switch(h=u.substring(V,I),0===m&&(m=(U=U.replace(l,"").trim()).charCodeAt(0)),m){case 64:switch(0<T&&(U=U.replace(c,"")),f=U.charCodeAt(1)){case 100:case 109:case 115:case 45:T=s;break;default:T=D}if(V=(h=e(s,T,h,f,d+1)).length,0<P&&(w=i(3,h,T=t(D,U,R),s,x,_,V,f,d,p),U=T.join(""),void 0!==w&&0===(V=(h=w.trim()).length)&&(f=0,h="")),0<V)switch(f){case 115:U=U.replace(y,a);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,R),h,p,d+1)}H+=h,h=R=T=L=m=0,U="",f=u
.charCodeAt(++I);break;case 125:case 59:if(1<(V=(U=(0<T?U.replace(c,""):U).trim()).length))switch(0===L&&(m=U.charCodeAt(0),45===m||96<m&&123>m)&&(V=(U=U.replace(" ",":")).length),0<P&&void 0!==(w=i(1,U,s,n,x,_,W.length,p,d,p))&&0===(V=(U=w.trim()).length)&&(U="\0\0"),m=U.charCodeAt(0),f=U.charCodeAt(1),m){case 0:break;case 64:if(105===f||99===f){G+=U+u.charAt(I);break}default:58!==U.charCodeAt(V-1)&&(W+=r(U,m,f,U.charCodeAt(2)))}R=T=L=m=0,U="",f=u.charCodeAt(++I)}}switch(f){case 13:case 10:47===C?C=0:0===1+m&&107!==p&&0<U.length&&(T=1,U+="\0"),0<P*M&&i(0,U,s,n,x,_,W.length,p,d,p),_=1,x++;break;case 59:case 125:if(0===C+S+k+O){_++;break}default:switch(_++,E=u.charAt(I),f){case 9:case 32:if(0===S+O+C)switch(F){case 44:case 58:case 9:case 32:E="";break;default:32!==f&&(E=" ")}break;case 0:E=
"\\0";break;case 12:E="\\f";break;case 11:E="\\v";break;case 38:0===S+C+O&&(T=R=1,E="\f"+E);break;case 108:if(0===S+C+O+A&&0<L)switch(I-L){case 2:112===F&&58===u.charCodeAt(I-3)&&(A=F);case 8:111===N&&(A=N)}break;case 58:0===S+C+O&&(L=I);break;case 44:0===C+k+S+O&&(T=1,E+="\r");break;case 34:case 39:0===C&&(S=S===f?0:0===S?f: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===m)switch(2*F+3*N){case 533:break;default:m=1}k++}break;case 64:0===C+k+S+O+L+h&&(h=1);break;case 42:case 47:if(!(0<S+O+k))switch(C){case 0:switch(2*f+3*u.charCodeAt(I+1)){case 235:C=47;break;case 220:V=I,C=42}break;case 42:47===f&&42===F&&V+2!==I&&(33===u.charCodeAt(V+2)&&(W+=u.substring(V,I+1)),E="",C=0)}}0===C&&(U+=E)}N=F,F=f,I++}if(0<(
V=W.length)){if(T=s,0<P&&void 0!==(w=i(2,W,T,n,x,_,V,p,d,p))&&0===(W=w).length)return G+W+H;if(W=T.join(",")+"{"+W+"}",0!=j*A){switch(2!==j||o(W,2)||(A=0),A){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}A=0}}return G+W+H}(D,s,n,0,0);return 0<P&&void 0!==(u=i(-2,p,s,s,x,_,p.length,0,0,0))&&(p=u),A=0,_=x=1,p}var l=/^\0+/g,c=/[\0\r\f]/g,p=/: */g,d=/zoo|gra/,m=/([,: ])(transform)/g,f=/,\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\()/,_=1,x=1,A=0,j=1,D=[],F=[],P=0,N=null,M=0;return u.use=function e(t){switch(t){case void 0:case null:P=F.length=0;break;default:switch(t.constructo
r){case Array:for(var n=0,r=t.length;n<r;++n)e(t[n]);break;case Function:F[P++]=t;break;case Boolean:M=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 a=t[r];if(null!=a){var i=void 0;switch(typeof a){case"boolean":break;case"function":0,i=e([a()]);break;case"object":if(Array.isArray(a))i=e(a);else for(var s in i="",a)a[s]&&s&&(i&&(i+=" "),i+=s);break;default:i=a}i&&(o&&(o+=" "),o+=i)}}return o},m="undefined"!=typeof document;function f(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),voi
d 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]=f(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=f(this.opts);this.tags.push(r),r.appendChild(document.createTextNode(e+(t||"")))}this.ctr++,this.ctr%65e3==0&&this.tags.push(f(this.opts))},t.flush=f
unction(){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,m&&f.insert(e,b)});void 0!==t.prefix&&(r={prefix:t.prefix});var l={registered:{},inserted:{},nonce:t.nonce,key:o},f=new h(t);m&&f.inject();var g=new i(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,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return i.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 a(e+t)+t}(n,r),n};function k(e,t){void 0===l.i
nserted[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 _(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==l.registered[t]?e.push(t):n+=t+" "}),n}function x(e,t){var n=[],r=_(n,e);return n.length<2?e:r+S(n,t)}function A(e){l.inserted[e]=!0}if(m){var j=document.querySelectorAll("[data-emotion-"+o+"]");Array.prototype.forEach.call(j,function(e){f.tags[0].parentNode.insertBefore(e,f.tags[0]),e.getAttribute("data-emotion-"+o).split(" ").forEach(A)})}var D={flush:function(){m&&(f.flush(),f.inject()),l.inserted={},l.registered={}},hydrate:function(e){e.forEach(A)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return x(d(t))},merge:x,getRegisteredStyles:_,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:f,caches:l};return e.__SECRET_EMOTION__=D,D}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}},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,n){"use strict";var r=n(40);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==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}},funct
ion(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,a,i,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()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),s=1e9*t.uptime(),i=a-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(42))},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{r
eturn n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var u,l=[],c=!1,p=-1;function d(){c&&u&&(c=!1,u.length?l=u.concat(l):p=-1,l.length&&m())}function m(){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===i||!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 f(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 f(e,t)),1!==l.length||c||s(m)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browse
r",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(13));var r=s(n(44)),o=s(n(47)),a=s(n(0)),i=s(n(19));n(21);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.getClassNam
es("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.proto
type=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,a=n.doneClassName;r&&c(e,r),o&&c(e,o),a&&c(e,a)},n.reflowAndAddClass=function(e,t){t&&(e&&e.scrollTop,l(e,t))},n.render=function(){var e=u({},this.props);return delete e.classNames,a.default.createElement(i.default,u({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(a.default.Component);p.propTypes={};var d=p;t.default=d,e.exports=t.default},function(e,t,n){"use strict";var r=n(45);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||"")+&qu
ot; "+t))};var o=r(n(46));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;i(n(13));var r=i(n(0)),o=n(12),a=i(n(22));function i(e){return e&&e.__e
sModule?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 a,i=this.props.children,s=r.default.Children.toArray(i)[t];s.props[e]&&(a=s.props)[e].apply(a,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={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),s=i[0],u=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(s,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handle
Entered}):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=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var s=o(e.children),u=a(t,s);return Object.keys(u).forEach(function(o){var a=u[o];if((0,r.isValidElement)(a)){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)(a,{onExited:n.bind(null,a),in:p.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):u[o]=(0,r.cl
oneElement)(a,{in:!1}):u[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"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 a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);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<a.length;r++)s[a[r]]=n(a[r]);return s}function i(e,t,n){return null!=n[t]?n[t]:e.props[t]}},function(e,t,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){},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"name",function(){return wr}),n.d(r,"LABEL",function(){return Or}),n.d(r,"ORGANIZERS_ICON",function(){return Cr}),n.d(r,"settings",function(){return kr});var o={};n.r(o),n.d(o,"name",function(){return Vo}),n.d(o,"LABEL",function(){return Bo}),n.d(o,"SESSIONS_ICON",function(){return zo}),n.d(o,"settings",function(){return Uo});var a={};n.r(a),n.d(a,"name",function(){return Va}),n.d(a,"LABEL",function(){return Ba}),n.d(a,"SPEAKERS_ICON",function(){return za}),n.d(a,"settings",function(){return Ua});var i={};n.r(i),n.d(i,"name",function(){return bi}),n.d(i,"LABEL",function(){return vi}),n.d(i,"SPONSORS_ICON",function(){return Ei}),n.d(i,"settings",function(){return yi});var s=n(11),u=n.n(s),l=n(8),c=n.n(l),p=n(1),d=n.n(p),m=
n(2),f=n.n(m),h=n(3),g=n.n(h),b=n(4),v=n.n(b),E=n(5),y=n.n(E);var w=n(0),O=n.n(w),C=n(6);var k=n(12);var S=Object(w.createContext)();S.Provider,S.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",&q
uot;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 _=n(7),x=n.n(_),A=n(10),j=n.n(A),D=(n(34),wp.components),F=D.Placeholder,P=D.Spinner,N=wp.element,M=N.Component,L=N.Fragment,I=wp.i18n.__,T=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this))).getModeLabel=n.getModeLabel.bind(j()(j()(n))),n}return y()(t,e),f()(t,[{key:"getModeLabel",value:function(e){return this.props.blockData.options.mode.find(function(t){return e===t.value}).label}}]),t}(M);function R(e){var t=e.className,n=e.icon,r=e.label,o=e.loading,a=["wordcamp-block-edit
-placeholder","wordcamp-block-edit-placeholder-no-content",t];return Object(w.createElement)(F,{className:x()(a),icon:n,label:r},o?Object(w.createElement)(P,null):I("No content found.","wordcamporg"))}function V(e){var t=e.className,n=e.label,r=e.icon,o=e.content,a=e.placeholderChildren,i=["wordcamp-block-edit-placeholder","wordcamp-block-edit-placeholder-specific-mode",t];return Object(w.createElement)(L,null,o,Object(w.createElement)(F,{className:x()(i),label:n,icon:r},a))}var B=wp.components.Disabled,z=wp.i18n,U=z.__,W=z.sprintf,H=wp.url,G=H.addQueryArgs,$=H.isURL;var q=function(e){var t=e.className,n=e.name,r=e.size,o=e.url,a=e.imageLink,i=function(e,t){return G(e,{s:t})},s=Object(w.createElement)("img",{className:x()("avatar","avatar-"+r,"photo"),src:i(o,r),srcSet:i(o,2*r)+" 2x",alt:n?W(U("Avatar of %s","wordcamporg"),n):"",width:r,height:r});re
turn $(a)&&(s=Object(w.createElement)(B,null,Object(w.createElement)("a",{href:a,className:x()("wordcamp-image-link","wordcamp-avatar-link")},s))),s=Object(w.createElement)("div",{className:x()("wordcamp-image-container","wordcamp-avatar-container",t)},s)},Y=(n(35),wp.components.Disabled),X=wp.element,K=X.Fragment,Z=X.RawHTML,Q=wp.htmlEntities.decodeEntities,J=wp.i18n.__;function ee(e){var t=e.headingLevel,n=e.className,r=e.title,o=e.link,a="h3";[1,2,3,4,5,6].includes(t)&&(a="h"+t);var i=["wordcamp-item-title",n],s=r||J("(Untitled)","wordcamporg");return Object(w.createElement)(a,{className:x()(i)},o&&Object(w.createElement)(Y,null,Object(w.createElement)("a",{href:o},Q(s))),!o&&Object(w.createElement)(K,null,Q(s)))}function te(e){var t=e.className,n=e.content,r=e.link,o=e.linkText,a=["wordcamp-item-content",t];return Objec
t(w.createElement)("div",{className:x()(a)},Object(w.createElement)(Y,null,Object(w.createElement)(Z,{children:n}),r&&Object(w.createElement)("p",{className:"wordcamp-item-permalink"},Object(w.createElement)("a",{href:r},o||J("Read more","wordcamporg")))))}n(36);var ne=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return y()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.className,r=e.children,o=t.grid_columns,a=t.layout,i=["layout-"+a,n,"wordcamp-block-post-list"];return"grid"===a&&i.push("grid-columns-"+Number(o)),Object(w.createElement)("ul",{className:x()(i)},(r||[]).map(function(e){return Object(w.createElement)("li",{className:x()("wordcamp-grid-layout-item","wordcamp-block-post-list-item","wordcamp-clearfix")},e)}))}}]),t}(wp.element.C
omponent),re=(n(37),wp.components.Disabled,wp.element.Component),oe=wp.htmlEntities.decodeEntities,ae=wp.i18n.__,ie=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return y()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.organizerPosts,r=t.show_avatars,o=t.avatar_size,a=t.avatar_align,i=t.content,s=t.excerpt_more;return Object(w.createElement)(ne,this.props,n.map(function(e){return Object(w.createElement)("div",{key:e.slug,className:x()("wordcamp-organizer","wordcamp-organizer-"+oe(e.slug))},Object(w.createElement)(ee,{className:"wordcamp-organizer-title",headingLevel:3,title:e.title.rendered.trim(),link:e.link}),r&&Object(w.createElement)(q,{className:x()("wordcamp-organizer-avatar-container","align-"+oe(a)),name:oe(e.title.rendered.trim())||"",size:o,url:e.avatar_urls[24],imageLink:e.link}),"none"!==i&&Object(
w.createElement)(te,{className:x()("wordcamp-organizer-content-"+oe(i)),content:"full"===i?e.content.rendered.trim():e.excerpt.rendered.trim(),link:"full"===i||s?e.link:null,linkText:ae("full"===i?"Visit session page":"Read more","wordcamporg")}))}))}}]),t}(re),se=n(24),ue=n.n(se),le=function(e,t){return e.length===t.length&&e.every(function(e,n){return function(e,t){return e===t}(e,t[n])})};var ce=function(e,t){var n;void 0===t&&(t=le);var r,o=[],a=!1;return function(){for(var i=arguments.length,s=new Array(i),u=0;u<i;u++)s[u]=arguments[u];return a&&n===this&&t(s,o)?r:(r=e.apply(this,s),a=!0,n=this,o=s,r)}},pe=n(9),de=n(13),me=n.n(de),fe=n(26),he=n.n(fe),ge=n(27),be=n.n(ge),ve=n(14);function Ee(e){return(Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeo
f 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 we(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 Oe(e,t,n){return t&&we(e.prototype,t),n&&we(e,n),e}function Ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ke(){return(ke=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 Se(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){Ce(e,t,n[t])})}return e}function _e(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&&Ae(e,t)}function xe(e){return(xe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ae(e,t){return(Ae=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function je(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.pr
opertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function De(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fe(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?De(e):t}function Pe(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 Ne=function(){};function Me(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}var Le=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===Ee(e)&&null!==e?[e]:[]};function Ie(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Te(e){return Ie(e)?window.pageYOff
set:e.scrollTop}function Re(e,t){Ie(e)?window.scrollTo(0,t):e.scrollTop=t}function Ve(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ne,o=Te(e),a=t-o,i=10,s=0;!function t(){var u=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(s+=i,o,a,n);Re(e,u),s<n?he()(t):r(e)}()}function Be(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function ze(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,a=e.shouldScroll,i=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 a=e;a=a.parentElement;)if(t=getComputedStyle(a),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return a;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,m=p.height,f=p.top,h=n.offsetParent.getBoundingClientRect().top,g=window.innerHeight,b=Te(u),v=parseInt(getComputedStyle(n).marginBottom,10),E=parseInt(getComputedStyle(n).marginTop,10),y=h-E,w=g-f,O=y+b,C=c-b-f,k=d-g+b+v,S=b+f-E;switch(o){case"auto":case"bottom":if(w>=m)return{placement:"bottom",maxHeight:t};if(C>=m&&!i)return a&&Ve(u,k,160),{placement:"bottom",maxHeight:t};if(!i&&C>=r||i&&w>=r)return a&&Ve(u,k,160),{placement:"bottom",maxHeight:i?w-v:C-v};if("auto"===o||i){var _=t,x=i?y:O;return x>=r&&(_=Math.min(x-v-s.controlHeight,t)),{placement:"top",maxHeight:_}}if("bottom"===o)return Re(u,k),{placement:"bottom",maxHeight:t};break;case"top":if(y>=m)return{placement:"top",maxHeight:t};if(O>=m&&!i)return a&&
Ve(u,S,160),{placement:"top",maxHeight:t};if(!i&&O>=r||i&&y>=r){var A=t;return(!i&&O>=r||i&&y>=r)&&(A=i?y-E:O-E),a&&Ve(u,S,160),{placement:"top",maxHeight:A}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}var Ue=function(e){return"auto"===e?"bottom":e},We=function(e){function t(){var e,n;ye(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Ce(De(De(n=Fe(this,(e=xe(t)).call.apply(e,[this].concat(o))))),"state",{maxHeight:n.props.maxMenuHeight,placement:null}),Ce(De(De(n)),"getPlacement",function(e){var t=n.props,r=t.minMenuHeight,o=t.maxMenuHeight,a=t.menuPlacement,i=t.menuPosition,s=t.menuShouldScrollIntoView,u=t.theme,l=n.context.getPortalPlacement;if(e){var c="fixed"===i,p=ze({maxHeight:o,menuEl:e,minHeight:r,placement:a,sh
ouldScroll:s&&!c,isFixedPosition:c,theme:u});l&&l(p),n.setState(p)}}),Ce(De(De(n)),"getUpdatedProps",function(){var e=n.props.menuPlacement,t=n.state.placement||Ue(e);return Se({},n.props,{placement:t,maxHeight:n.state.maxHeight})}),n}return _e(t,w["Component"]),Oe(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}();Ce(We,"contextTypes",{getPortalPlacement:me.a.func});var He=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"}},Ge=He,$e=He,qe=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return O.a.createElement("div",ke({className:r(Object(pe.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};qe.defaultProps={c
hildren:"No options"};var Ye=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return O.a.createElement("div",ke({className:r(Object(pe.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};Ye.defaultProps={children:"Loading..."};var Xe=function(e){function t(){var e,n;ye(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Ce(De(De(n=Fe(this,(e=xe(t)).call.apply(e,[this].concat(o))))),"state",{placement:null}),Ce(De(De(n)),"getPortalPlacement",function(e){var t=e.placement;t!==Ue(n.props.menuPlacement)&&n.setState({placement:t})}),n}return _e(t,w["Component"]),Oe(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,a=e.men
uPosition,i=e.getStyles,s="fixed"===a;if(!t&&!s||!r)return null;var u=this.state.placement||Ue(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:a,rect:l},d=O.a.createElement("div",{className:Object(pe.a)(i("menuPortal",p))},n);return t?Object(k.createPortal)(d,t):d}}]),t}();Ce(Xe,"childContextTypes",{getPortalPlacement:me.a.func});var Ke=Array.isArray,Ze=Object.keys,Qe=Object.prototype.hasOwnProperty;function Je(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==Ee(t)&&"object"==Ee(n)){var r,o,a,i=Ke(t),s=Ke(n);if(i&&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(i!=s)return!1;var u=t instanceof Date,l=n instanceof Date;if(u!=l)return!1;if(u&&l)return t.getTime()==n.getTim
e();var c=t instanceof RegExp,p=n instanceof RegExp;if(c!=p)return!1;if(c&&p)return t.toString()==n.toString();var d=Ze(t);if((o=d.length)!==Ze(n).length)return!1;for(r=o;0!=r--;)if(!Qe.call(n,d[r]))return!1;for(r=o;0!=r--;)if(!("_owner"===(a=d[r])&&t.$$typeof||e(t[a],n[a])))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 et=[{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",let
ters:/[\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\u1
E50\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\u01
6C\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:/[\u00E
6\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\u0
0F2\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:&quo
t;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}],tt=function(e){for(var t=0;t<et.length;t++)e=e.replace(et[t].letters,et[t].base);return e},nt=function(e){return e.replace(/^\s+|\s+$/g,"")},rt=function(e){return"".concat(e.label," ").concat(e
.value)},ot=function(e){return O.a.createElement("span",ke({className:Object(pe.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))},at=function(e){function t(){return ye(this,t),Fe(this,xe(t).apply(this,arguments))}return _e(t,w["Component"]),Oe(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,je(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return O.a.createElement("input",ke({ref:t},n,{className:Object(pe.a)({background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transfo
rm:"scale(0)"})}))}}]),t}(),it=function(e){function t(){return ye(this,t),Fe(this,xe(t).apply(this,arguments))}return _e(t,w["Component"]),Oe(t,[{key:"componentDidMount",value:function(){this.props.innerRef(Object(k.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),t}(),st=["boxSizing","height","overflow","paddingRight","position"],ut={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function lt(e){e.preventDefault()}function ct(e){e.stopPropagation()}function pt(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function dt(){return"ontouchstart"in window||navigator.maxTouchPoints}var mt=!("undefined"==typeof window||!win
dow.document||!window.document.createElement),ft=0,ht=function(e){function t(){var e,n;ye(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Ce(De(De(n=Fe(this,(e=xe(t)).call.apply(e,[this].concat(o))))),"originalStyles",{}),Ce(De(De(n)),"listenerOptions",{capture:!1,passive:!1}),n}return _e(t,w["Component"]),Oe(t,[{key:"componentDidMount",value:function(){var e=this;if(mt){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,o=document.body,a=o&&o.style;if(n&&st.forEach(function(t){var n=a&&a[t];e.originalStyles[t]=n}),n&&ft<1){var i=parseInt(this.originalStyles.paddingRight,10)||0,s=document.body?document.body.clientWidth:0,u=window.innerWidth-s+i||0;Object.keys(ut).forEach(function(e){var t=ut[e];a&&(a[e]=t)}),a&&(a.paddingRight="".concat(u,"px"))}o&&dt()&&(o.addEventListener("touchmove",lt,this.
listenerOptions),r&&(r.addEventListener("touchstart",pt,this.listenerOptions),r.addEventListener("touchmove",ct,this.listenerOptions))),ft+=1}}},{key:"componentWillUnmount",value:function(){var e=this;if(mt){var t=this.props,n=t.accountForScrollbars,r=t.touchScrollTarget,o=document.body,a=o&&o.style;ft=Math.max(ft-1,0),n&&ft<1&&st.forEach(function(t){var n=e.originalStyles[t];a&&(a[t]=n)}),o&&dt()&&(o.removeEventListener("touchmove",lt,this.listenerOptions),r&&(r.removeEventListener("touchstart",pt,this.listenerOptions),r.removeEventListener("touchmove",ct,this.listenerOptions)))}}},{key:"render",value:function(){return null}}]),t}();Ce(ht,"defaultProps",{accountForScrollbars:!0});var gt=function(e){function t(){var e,n;ye(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Ce(De(De(n=Fe(this,(e=xe(t)
).call.apply(e,[this].concat(o))))),"state",{touchScrollTarget:null}),Ce(De(De(n)),"getScrollTarget",function(e){e!==n.state.touchScrollTarget&&n.setState({touchScrollTarget:e})}),Ce(De(De(n)),"blurSelectInput",function(){document.activeElement&&document.activeElement.blur()}),n}return _e(t,w["PureComponent"]),Oe(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.isEnabled,r=this.state.touchScrollTarget;return n?O.a.createElement("div",null,O.a.createElement("div",{onClick:this.blurSelectInput,className:Object(pe.a)({position:"fixed",left:0,bottom:0,right:0,top:0})}),O.a.createElement(it,{innerRef:this.getScrollTarget},t),r?O.a.createElement(ht,{touchScrollTarget:r}):null):t}}]),t}(),bt=function(e){function t(){var e,n;ye(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Ce(De(De(n=Fe(this,(e=xe(t)).call.apply(e,[this].concat(o)))))
,"isBottom",!1),Ce(De(De(n)),"isTop",!1),Ce(De(De(n)),"scrollTarget",void 0),Ce(De(De(n)),"touchStart",void 0),Ce(De(De(n)),"cancelScroll",function(e){e.preventDefault(),e.stopPropagation()}),Ce(De(De(n)),"handleEventDelta",function(e,t){var r=n.props,o=r.onBottomArrive,a=r.onBottomLeave,i=r.onTopArrive,s=r.onTopLeave,u=n.scrollTarget,l=u.scrollTop,c=u.scrollHeight,p=u.clientHeight,d=n.scrollTarget,m=t>0,f=c-p-l,h=!1;f>t&&n.isBottom&&(a&&a(e),n.isBottom=!1),m&&n.isTop&&(s&&s(e),n.isTop=!1),m&&t>f?(o&&!n.isBottom&&o(e),d.scrollTop=c,h=!0,n.isBottom=!0):!m&&-t>l&&(i&&!n.isTop&&i(e),d.scrollTop=0,h=!0,n.isTop=!0),h&&n.cancelScroll(e)}),Ce(De(De(n)),"onWheel",function(e){n.handleEventDelta(e,e.deltaY)}),Ce(De(De(n)),"onTouchStart",function(e){n.touchStart=e.changedTouches[0].clientY}),C
e(De(De(n)),"onTouchMove",function(e){var t=n.touchStart-e.changedTouches[0].clientY;n.handleEventDelta(e,t)}),Ce(De(De(n)),"getScrollTarget",function(e){n.scrollTarget=e}),n}return _e(t,w["Component"]),Oe(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.r
emoveEventListener&&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 O.a.createElement(it,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(),vt=function(e){function t(){return ye(this,t),Fe(this,xe(t).apply(this,arguments))}return _e(t,w["Component"]),Oe(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=je(e,["isEnabled"]);return t?O.a.createElement(bt,n):this.props.children}}]),t}();Ce(vt,"defaultProps",{isEnabled:!0});var Et=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label,a=t.isDisabled;switch(e){case"menu":return&
quot;Use Up and Down to choose options".concat(a?"":", 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.")}}
,wt=function(e){return!!e.isDisabled},Ot=function(e){function t(){return ye(this,t),Fe(this,xe(t).apply(this,arguments))}return _e(t,w["Component"]),Oe(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,i=e.hasValue;return O.a.createElement("div",{className:r(Object(pe.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":i},n)},t)}}]),t}(),Ct=function(e){var t=e.size,n=je(e,["size"]);return O.a.createElement("svg",ke({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(pe.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},kt=function(e){return O.a.createElement(Ct,ke({size:20},e),O.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"}))},St=function(e){return O.a.createElement(Ct,ke({size:20},e),O.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"}))},_t=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}
}},xt=_t,At=_t,jt=!1,Dt=function(e){var t=e.color,n=e.delay,r=e.offset;return O.a.createElement("span",{className:Object(pe.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"})})},Ft=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,i=e.isRtl,s=e.theme.colors,u=a?s.neutral80:s.neutral20;return jt||(Object(pe.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};"),jt=!0),O.a.createElement("div",ke({},o,{className:n(Object(pe.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indica
tor":!0},t)}),O.a.createElement(Dt,{color:u,delay:0,offset:i}),O.a.createElement(Dt,{color:u,delay:160,offset:!0}),O.a.createElement(Dt,{color:u,delay:320,offset:!i}))};Ft.defaultProps={size:4};var Pt=function(e){var t=e.children,n=e.innerProps;return O.a.createElement("div",n,t)},Nt=Pt,Mt=Pt,Lt=function(e){function t(){return ye(this,t),Fe(this,xe(t).apply(this,arguments))}return _e(t,w["Component"]),Oe(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return O.a.createElement("div",n,t||O.a.createElement(kt,{size:14}))}}]),t}(),It=function(e){function t(){return ye(this,t),Fe(this,xe(t).apply(this,arguments))}return _e(t,w["Component"]),Oe(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,i=e.getStyles,s=e.innerProps,u=e.isDisabled,l=e.removeProps,c=e.selectProps,p=r.Container,d=r.Label,m=r.Remove,f=Se({className:o(Object(pe.a)(i(
"multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":u},n)},s),h={className:o(Object(pe.a)(i("multiValueLabel",this.props)),{"multi-value__label":!0},n)},g=Se({className:o(Object(pe.a)(i("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},l);return O.a.createElement(p,{data:a,innerProps:f,selectProps:c},O.a.createElement(d,{data:a,innerProps:h,selectProps:c},t),O.a.createElement(m,{data:a,innerProps:g,selectProps:c}))}}]),t}();Ce(It,"defaultProps",{cropWithEllipsis:!0});var Tt={ClearIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return O.a.createElement("div",ke({},a,{className:r(Object(pe.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t||O.a.createElement(kt,null))},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,i=e.isFocused,s=e.innerRef,u=e.in
nerProps,l=e.menuIsOpen;return O.a.createElement("div",ke({ref:s,className:n(Object(pe.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":i,"control--menu-is-open":l},o)},u),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return O.a.createElement("div",ke({},a,{className:r(Object(pe.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t||O.a.createElement(St,null))},DownChevron:St,CrossIcon:kt,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,i=e.headingProps,s=e.label,u=e.theme,l=e.selectProps;return O.a.createElement("div",{className:r(Object(pe.a)(o("group",e)),{group:!0},n)},O.a.createElement(a,ke({},i,{selectProps:l,theme:u,getStyles:o,cx:r}),s),O.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyle
s,o=e.theme,a=(e.selectProps,je(e,["className","cx","getStyles","theme","selectProps"]));return O.a.createElement("div",ke({className:n(Object(pe.a)(r("groupHeading",Se({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return O.a.createElement("div",{className:r(Object(pe.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 O.a.createElement("span",ke({},o,{className:n(Object(pe.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,i=e.isDisabled,s=e.theme,u=(e.selectProps,je(e,["className","cx","getStyles","innerRef","isHidden","isDisabled
","theme","selectProps"]));return O.a.createElement("div",{className:Object(pe.a)(r("input",Se({theme:s},u)))},O.a.createElement(be.a,ke({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"}}(a),disabled:i},u)))},LoadingIndicator:Ft,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,i=e.innerProps,s=r(Object(pe.a)(o("menu",e)),{menu:!0},n);return O.a.createElement("div",ke({className:s},i,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,i=e.innerRef;return O.a.createElement("div",{className:r(Object(pe.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:i},t)},MenuPortal:Xe,LoadingMessage:Ye,NoOptionsMessage:qe,MultiValue:It,MultiValueContainer:Nt,MultiValu
eLabel:Mt,MultiValueRemove:Lt,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.isFocused,s=e.isSelected,u=e.innerRef,l=e.innerProps;return O.a.createElement("div",ke({ref:u,className:r(Object(pe.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":i,"option--is-selected":s},n)},l),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return O.a.createElement("div",ke({className:r(Object(pe.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,i=e.isDisabled,s=e.isRtl;return O.a.createElement("div",ke({className:r(Object(pe.a)(o("container",e)),{"--is-disabled":i,"--is-rtl":s},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.inn
erProps;return O.a.createElement("div",ke({className:r(Object(pe.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},i),t)},ValueContainer:Ot},Rt=function(e){return Se({},Tt,e.components)},Vt={clearIndicator:At,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,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transitio
n:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:xt,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,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:$e,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return Ce(t={},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),Ce(t,"backgroundColor",i.neutral0),Ce(t,"borderRadius",o),Ce(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Ce(t,"marginBottom",a.menuGutter),Ce(t,"marginTop",a.menuGutter),Ce(t,"position","absolute"),Ce(t,"width",&
quot;100%"),Ce(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,backgroundC
olor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:Ge,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.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%)"}},singl
eValue: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 Bt={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)&quo
t;,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}},zt={backspaceRemovesValue:!0,blurInputOnSelect:Be(),captureMenuScroll:!Be(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e){return function(t,n){var r=Se({ignoreCase:!0,ignoreAccents:!0,stringify:rt,trim:!0,matchFrom:"any"},e),o=r.ignoreCase,a=r.ignoreAccents,i=r.stringify,s=r.trim,u=r.matchFrom,l=s?nt(n):n,c=s?nt(i(t)):i(t);return o&&(l=l.toLowerCase(),c=c.toLowerCase()),a&&(l=tt(l),c=tt(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:wt,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},Ut=1,Wt=function(e){function t(e){var n;ye(this,t
),Ce(De(De(n=Fe(this,xe(t).call(this,e)))),"state",{ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]}),Ce(De(De(n)),"blockOptionHover",!1),Ce(De(De(n)),"clearFocusValueOnUpdate",!1),Ce(De(De(n)),"commonProps",void 0),Ce(De(De(n)),"components",void 0),Ce(De(De(n)),"hasGroups",!1),Ce(De(De(n)),"initialTouchX",0),Ce(De(De(n)),"initialTouchY",0),Ce(De(De(n)),"inputIsHiddenAfterUpdate",void 0),Ce(De(De(n)),"instancePrefix",""),Ce(De(De(n)),"openAfterFocus",!1),Ce(De(De(n)),"scrollToFocusedOptionOnUpdate",!1),Ce(De(De(n)),"userIsDragging",void 0),Ce(De(De(n)),"controlRef",null),Ce(De(De(n)),"getControlRef",function(e){n.controlRef=e}),Ce(De(De(n)),"focusedOptionRef",null),Ce(De(D
e(n)),"getFocusedOptionRef",function(e){n.focusedOptionRef=e}),Ce(De(De(n)),"menuListRef",null),Ce(De(De(n)),"getMenuListRef",function(e){n.menuListRef=e}),Ce(De(De(n)),"inputRef",null),Ce(De(De(n)),"getInputRef",function(e){n.inputRef=e}),Ce(De(De(n)),"cacheComponents",function(e){n.components=Rt({components:e})}),Ce(De(De(n)),"focus",n.focusInput),Ce(De(De(n)),"blur",n.blurInput),Ce(De(De(n)),"onChange",function(e,t){var r=n.props;(0,r.onChange)(e,Se({},t,{name:r.name}))}),Ce(De(De(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,a=o.closeMenuOnSelect,i=o.isMulti;n.onInputChange("",{action:"set-value"}),a&&(n.inputIsHiddenAfterUpdate=!i,n.onMenuClose()),n.clearFocusValueOnUpdate=!0,n.onChange(e,{action:t,option:r})}),Ce(De(De(n)),&
quot;selectOption",function(e){var t=n.props,r=t.blurInputOnSelect,o=t.isMulti,a=n.state.selectValue;if(o)if(n.isOptionSelected(e,a)){var i=n.getOptionValue(e);n.setValue(a.filter(function(e){return n.getOptionValue(e)!==i}),"deselect-option",e),n.announceAriaLiveSelection({event:"deselect-option",context:{value:n.getOptionLabel(e)}})}else n.isOptionDisabled(e,a)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue([].concat(Pe(a),[e]),"select-option",e),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));else n.isOptionDisabled(e,a)?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()}),Ce(De(De(n)),"re
moveValue",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()}),Ce(De(De(n)),"clearValue",function(){var e=n.props.isMulti;n.onChange(e?[]:null,{action:"clear"})}),Ce(De(De(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})}),Ce(De(De(n)),"getOptionLabel",function(e){return n.props.getOptionLabel(e)}),Ce(De(De(n)),"getOptionValue",function(e){return n.props.getOptionValue(e)}),Ce(De(De(n)),"getStyles",function(e,t){var r=Vt[e](t);r.boxSizing="border-box";var
o=n.props.styles[e];return o?o(r,t):r}),Ce(De(De(n)),"getElementId",function(e){return"".concat(n.instancePrefix,"-").concat(e)}),Ce(De(De(n)),"getActiveDescendentId",function(){var e=n.props.menuIsOpen,t=n.state,r=t.menuOptions,o=t.focusedOption;if(o&&e){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}}),Ce(De(De(n)),"announceAriaLiveSelection",function(e){var t=e.event,r=e.context;n.setState({ariaLiveSelection:yt(t,r)})}),Ce(De(De(n)),"announceAriaLiveContext",function(e){var t=e.event,r=e.context;n.setState({ariaLiveContext:Et(t,Se({},r,{label:n.props["aria-label"]}))})}),Ce(De(De(n)),"onMenuMouseDown",function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),n.focusInput())}),Ce(De(De(n)),"onMenuMouseMove",function(e){n.blockOptionHover=!1}),Ce(De(De(n)),"onControlMouseDown",function(e){var t=n.props.openMenuOnClick;n.state.isFocused?n.pr
ops.menuIsOpen?"INPUT"!==e.target.tagName&&n.onMenuClose():t&&n.openMenu("first"):(t&&(n.openAfterFocus=!0),n.focusInput()),"INPUT"!==e.target.tagName&&e.preventDefault()}),Ce(De(De(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()}}),Ce(De(De(n)),"onClearIndicatorMouseDown",function(e){e&&"mousedown"===e.type&&0!==e.button||(n.clearValue(),e.stopPropagation(),n.openAfterFocus=!1,setTimeout(function(){return n.focusInput()}))}),Ce(De(De(n)),"onScroll",function(e){"boolean"==typeof n.props.closeMenuOnScroll?e.target instanceof HTMLElement&&Ie(e.target)&&n.props.onMenuClose():"fun
ction"==typeof n.props.closeMenuOnScroll&&n.props.closeMenuOnScroll(e)&&n.props.onMenuClose()}),Ce(De(De(n)),"onCompositionStart",function(){n.setState({isComposing:!0})}),Ce(De(De(n)),"onCompositionEnd",function(){n.setState({isComposing:!1})}),Ce(De(De(n)),"onTouchStart",function(e){var t=e.touches.item(0);t&&(n.initialTouchX=t.clientX,n.initialTouchY=t.clientY,n.userIsDragging=!1)}),Ce(De(De(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}}),Ce(De(De(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)}),Ce(De(De(n)),"onControlTouchEnd",function(e){n.userIsDragging||n.onControlMouseDown(e)}),Ce(De(
De(n)),"onClearIndicatorTouchEnd",function(e){n.userIsDragging||n.onClearIndicatorMouseDown(e)}),Ce(De(De(n)),"onDropdownIndicatorTouchEnd",function(e){n.userIsDragging||n.onDropdownIndicatorMouseDown(e)}),Ce(De(De(n)),"handleInputChange",function(e){var t=e.currentTarget.value;n.inputIsHiddenAfterUpdate=!1,n.onInputChange(t,{action:"input-change"}),n.onMenuOpen()}),Ce(De(De(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}),Ce(De(De(n)),"onInputBlur",function(e){n.menuListRef&&n.menuListRef.contains(document.activeElement)?n.inputRef.focus():(n.props.onBlur&&n.props.onBlur(e),n.onInputChange(&quo
t;",{action:"input-blur"}),n.onMenuClose(),n.setState({focusedValue:null,isFocused:!1}))}),Ce(De(De(n)),"onOptionHover",function(e){n.blockOptionHover||n.state.focusedOption===e||n.setState({focusedOption:e})}),Ce(De(De(n)),"shouldHideSelectedOptions",function(){var e=n.props,t=e.hideSelectedOptions,r=e.isMulti;return void 0===t?r:t}),Ce(De(De(n)),"onKeyDown",function(e){var t=n.props,r=t.isMulti,o=t.backspaceRemovesValue,a=t.escapeClearsValue,i=t.inputValue,s=t.isClearable,u=t.isDisabled,l=t.menuIsOpen,c=t.onKeyDown,p=t.tabSelectsValue,d=t.openMenuOnFocus,m=n.state,f=m.isComposing,h=m.focusedOption,g=m.focusedValue,b=m.selectValue;if(!(u||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(n.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||i)return;n.focusValue("previous");break;case"ArrowRight":if(!r||i)return;n.focusValue("next");break;case"Delete":case"Back
space":if(i)return;if(g)n.removeValue(g);else{if(!o)return;r?n.popValue():s&&n.clearValue()}break;case"Tab":if(f)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(f)return;n.selectOption(h);break}return;case"Escape":l?(n.inputIsHiddenAfterUpdate=!1,n.onInputChange("",{action:"menu-close"}),n.onMenuClose()):s&&a&&n.clearValue();break;case" ":if(i)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.focusOptio
n("first");break;case"End":if(!l)return;n.focusOption("last");break;default:return}e.preventDefault()}});var r=e.value;n.cacheComponents=ce(n.cacheComponents,Je).bind(De(De(n))),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Ut);var o=Le(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return _e(t,w["Component"]),Oe(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 a=Le(e.value),i=this.buildMenuO
ptions(e,a),s=this.getNextFocusedValue(a),u=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,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?Re(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&Re(e,Math.max(t.offsetTop-o,0))}(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1}},{key:"componentWillUnmount&qu
ot;,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,a=this.props.isMulti,i="first"===e?0:n.focusable.length-1;if(!a){var s=n.focusable.indexOf(r[0]);s>-1&&(i=s)}
this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[i]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var s=a.indexOf(i);i||(s=-1,this.announceAriaLiveContext({event:"value"}));var u=a.length-1,l=-1;if(a.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:a[l]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.s
tate,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:wt(o[a])}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Bt):Se({},Bt,this.props.theme):Bt}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=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 a in n)n.hasOwnProperty(a)&&n[a]&&o.push("".concat(Me(e,a)));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return l},hasValue:c,isMulti:i,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,inputVal
ue: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&q
uot;,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,a=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),s=n.getOptionLabel(e),u=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:s,value:u,data:e},o))){var l=a?void 0:function(){return n.onOptionHover(e)},c=a?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:a,isSelected:i,key:p,label:s,type:"option",v
alue: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=a(t,"".concat(r,"-").concat(n));return o&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var i="".concat(n.getElementId("group"),"-").concat(r);e.render.push({type:"group",key:i,data:t,options:o})}}else{var s=a(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,a=this.props,i=a.options,s=a.menuIsOpen,u=a.inputValue,l=a.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:thi
s.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:i}):"",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,a=e.tabIndex,i=this.components.Input,s=this.state.inputIsHidden,u=r||this.getElementId("input");if(!n)return O.a.createElement(at,{id
:u,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ne,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:a,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,m=c.selectProps;return O.a.createElement(i,ke({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:m,spellCheck:"false",tabIndex:a,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,a=t.MultiValueRemove,i=t.SingleValue,s=t.Placeholder,u=this.commonProps,l=this.props,
c=l.controlShouldRenderValue,p=l.isDisabled,d=l.isMulti,m=l.inputValue,f=l.placeholder,h=this.state,g=h.selectValue,b=h.focusedValue,v=h.isFocused;if(!this.hasValue()||!c)return m?null:O.a.createElement(s,ke({},u,{key:"placeholder",isDisabled:p,isFocused:v}),f);if(d)return g.map(function(t){var i=t===b;return O.a.createElement(n,ke({},u,{components:{Container:r,Label:o,Remove:a},isFocused:i,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(m)return null;var E=g[0];return O.a.createElement(i,ke({},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,a=this.state.isFocused;if(!this.isClearable()||!
e||r||!this.hasValue()||o)return null;var i={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return O.a.createElement(e,ke({},t,{innerProps:i,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!e||!o)return null;return O.a.createElement(e,ke({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a}))}},{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,a=this.state.isFocused;return O.a.createElement(n,ke({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.is
Disabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return O.a.createElement(e,ke({},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,a=t.MenuList,i=t.MenuPortal,s=t.LoadingMessage,u=t.NoOptionsMessage,l=t.Option,c=this.commonProps,p=this.state,d=p.focusedOption,m=p.menuOptions,f=this.props,h=f.captureMenuScroll,g=f.inputValue,b=f.isLoading,v=f.loadingMessage,E=f.minMenuHeight,y=f.maxMenuHeight,w=f.menuIsOpen,C=f.menuPlacement,k=f.menuPosition,S=f.menuPortalTarget,_=f.menuShouldBlockScroll,x=f.menuShouldScrollIntoView,A=f.noOptionsMessage,j=f.onMenuScrollToTop,D=f.onMenuScrollToBottom;if(!w)return null;var F,P=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,O.a.createElement(l,ke({},c,t,{isFocused:n}),e.formatOptionLabel(t.data,"m
enu"))};if(this.hasOptions())F=m.render.map(function(t){if("group"===t.type){t.type;var o=je(t,["type"]),a="".concat(t.key,"-heading");return O.a.createElement(n,ke({},c,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return P(e)}))}if("option"===t.type)return P(t)});else if(b){var N=v({inputValue:g});if(null===N)return null;F=O.a.createElement(s,c,N)}else{var M=A({inputValue:g});if(null===M)return null;F=O.a.createElement(u,c,M)}var L={minMenuHeight:E,maxMenuHeight:y,menuPlacement:C,menuPosition:k,menuShouldScrollIntoView:x},I=O.a.createElement(We,ke({},c,L),function(t){var n=t.ref,r=t.placerProps,i=r.placement,s=r.maxHeight;return O.a.createElement(o,ke({},c,L,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:i}),O.a.createElement(vt,{isEnabled:h,onTopArrive:j,onBottomArrive:D},O.a.createElement(gt,{isEnabled:_},O.a.createEle
ment(a,ke({},c,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:s}),F))))});return S||"fixed"===k?O.a.createElement(i,ke({},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,a=t.name,i=this.state.selectValue;if(a&&!r){if(o){if(n){var s=i.map(function(t){return e.getOptionValue(t)}).join(n);return O.a.createElement("input",{name:a,type:"hidden",value:s})}var u=i.length>0?i.map(function(t,n){return O.a.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})}):O.a.createElement("input",{name:a,type:"hidden"});return O.a.createElement("div",null,u)}var l=i[0]?this.getOptionValue(i[0]):"";return O.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveR
egion",value:function(){return this.state.isFocused?O.a.createElement(ot,{"aria-live":"assertive"},O.a.createElement("p",{id:"aria-selection-event"},"Â ",this.state.ariaLiveSelection),O.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,a=this.props,i=a.className,s=a.id,u=a.isDisabled,l=a.menuIsOpen,c=this.state.isFocused,p=this.commonProps=this.getCommonProps();return O.a.createElement(r,ke({},p,{className:i,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:c}),this.renderLiveRegion(),O.a.createElement(t,ke({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:c,menuIsOpen:l}),O.a.createElement(o,ke({},p,{isDisabled:u}),this.ren
derPlaceholderOrValue(),this.renderInput()),O.a.createElement(n,ke({},p,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}();Ce(Wt,"defaultProps",zt);var Ht={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},Gt=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),a=0;a<r;a++)o[a]=arguments[a];return Ce(De(De(t=Fe(this,(e=xe(n)).call.apply(e,[this].concat(o))))),"select",void 0),Ce(De(De(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}),Ce(De(De(t)),"onChange",function(e,n){t.callProp("onChange",e,n),t.setState({value:e}
)}),Ce(De(De(t)),"onInputChange",function(e,n){var r=t.callProp("onInputChange",e,n);t.setState({inputValue:void 0!==r?r:e})}),Ce(De(De(t)),"onMenuOpen",function(){t.callProp("onMenuOpen"),t.setState({menuIsOpen:!0})}),Ce(De(De(t)),"onMenuClose",function(){t.callProp("onMenuClose"),t.setState({menuIsOpen:!1})}),t}return _e(n,w["Component"]),Oe(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,je(n,["
;defaultInputValue","defaultMenuIsOpen","defaultValue"]));return O.a.createElement(e,ke({},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}(),Ce(t,"defaultProps",Ht),n},$t={cacheOptions:!1,defaultOptions:!1,filterOption:null},qt=function(e){var t,n;return n=t=function(t){function n(e){var t;return ye(this,n),Ce(De(De(t=Fe(this,xe(n).call(this)))),"select",void 0),Ce(De(De(t)),"lastRequest",void 0),Ce(De(De(t)),"mounted",!1),Ce(De(De(t)),"optionsCache",{}),Ce(De(De(t)),"handleInputChange",function(e,n){var r=t.props,o=r.cacheOptions,a=function(e,t,n){if(n){var r=n(e,t);if("string"==typeof r)return r}return e}(e,n,r.onInputChange);if(!a)return delete t.lastR
equest,void t.setState({inputValue:"",loadedInputValue:"",loadedOptions:[],isLoading:!1,passEmptyOptions:!1});if(o&&t.optionsCache[a])t.setState({inputValue:a,loadedInputValue:a,loadedOptions:t.optionsCache[a],isLoading:!1,passEmptyOptions:!1});else{var i=t.lastRequest={};t.setState({inputValue:a,isLoading:!0,passEmptyOptions:!t.state.loadedInputValue},function(){t.loadOptions(a,function(e){t.mounted&&(e&&(t.optionsCache[a]=e),i===t.lastRequest&&(delete t.lastRequest,t.setState({isLoading:!1,loadedInputValue:a,loadedOptions:e||[],passEmptyOptions:!1})))})})}return a}),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 _e(n,w["Component"]),Oe(n,[{key:"componentDidMount",value:function(){var e=this;this.mounted=!0;var t=this.props.defaultOptions,n=th
is.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,je(n,["loadOptions"])),o=this.state,a=o.defaultOptions,i=o.inputValue,s=o.isLo
ading,u=o.loadedInputValue,l=o.loadedOptions,c=o.passEmptyOptions?[]:i&&u?l:a||[];return O.a.createElement(e,ke({},r,{ref:function(e){t.select=e},options:c,isLoading:s,onInputChange:this.handleInputChange}))}}]),n}(),Ce(t,"defaultProps",$t),n},Yt=(qt(Gt(Wt)),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}),Xt=Se({allowCreateWhileLoading:!1,createOptionPosition:"last"},{formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n){return!(!e||t.some(function(t){return Yt(e,t)})||n.some(function(t){return Yt(e,t)}))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}}),Kt=function(e){var t,n;return n=t=function(t){function n(e){var t;ye(this,n),Ce(De(De(t=Fe(this,xe(n).call(this,e)))),"select&
quot;,void 0),Ce(De(De(t)),"onChange",function(e,n){var r=t.props,o=r.getNewOptionData,a=r.inputValue,i=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(a);else{var d=o(a,a),m={action:"create-option"};s(i?[].concat(Pe(Le(l)),[d]):d,m)}});var r=e.options||[];return t.state={newOption:void 0,options:r},t}return _e(n,w["Component"]),Oe(n,[{key:"componentWillReceiveProps",value:function(e){var t=e.allowCreateWhileLoading,n=e.createOptionPosition,r=e.formatCreateLabel,o=e.getNewOptionData,a=e.inputValue,i=e.isLoading,s=e.isValidNewOption,u=e.value,l=e.options||[],c=this.state.newOption;c=s(a,Le(u),l)?o(a,r(a)):void 0,this.setState({newOption:c,options:!t&&i||!c?l:"first"===n?[c].concat(Pe(l)):[].concat(Pe(l),[c])})}},{key:"focus",value:function(){this.select.focus()}},{key:&quo
t;blur",value:function(){this.select.blur()}},{key:"render",value:function(){var t=this,n=ke({},this.props),r=this.state.options;return O.a.createElement(e,ke({},n,{ref:function(e){t.select=e},options:r,onChange:this.onChange}))}}]),n}(),Ce(t,"defaultProps",Xt),n},Zt=(Gt(Kt(Wt)),qt(Gt(Kt(Wt))),function(e){var t=e.component,n=e.duration,r=void 0===n?1:n,o=e.in,a=(e.onExited,je(e,["component","duration","in","onExited"])),i={entering:{opacity:0},entered:{opacity:1,transition:"opacity ".concat(r,"ms")},exiting:{opacity:0},exited:{opacity:0}};return O.a.createElement(ve.Transition,{mountOnEnter:!0,unmountOnExit:!0,in:o,timeout:r},function(e){var n={style:Se({},i[e])};return O.a.createElement(t,ke({innerProps:n},a))})}),Qt=260,Jt=function(e){function t(){var e,n;ye(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Ce(De(De(n=Fe(this,(e=xe(t)).call.apply(e,[this].co
ncat(o))))),"duration",Qt),Ce(De(De(n)),"rafID",void 0),Ce(De(De(n)),"state",{width:"auto"}),Ce(De(De(n)),"transition",{exiting:{width:0,transition:"width ".concat(n.duration,"ms ease-out")},exited:{width:0}}),Ce(De(De(n)),"getWidth",function(e){e&&isNaN(n.state.width)&&(n.rafID=window.requestAnimationFrame(function(){var t=e.getBoundingClientRect().width;n.setState({width:t})}))}),Ce(De(De(n)),"getStyle",function(e){return{overflow:"hidden",whiteSpace:"nowrap",width:e}}),Ce(De(De(n)),"getTransition",function(e){return n.transition[e]}),n}return _e(t,w["Component"]),Oe(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 O.a.createElement(ve.Transition,{enter:!1,mo
untOnEnter:!0,unmountOnExit:!0,in:r,timeout:this.duration},function(t){var r=Se({},e.getStyle(o),e.getTransition(t));return O.a.createElement("div",{ref:e.getWidth,style:r},n)})}}]),t}(),en=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Rt({components:e}),n=t.Input,r=t.MultiValue,o=t.Placeholder,a=t.SingleValue,i=t.ValueContainer,s=je(t,["Input","MultiValue","Placeholder","SingleValue","ValueContainer"]);return Se({Input:function(e){return function(t){t.in,t.onExited,t.appear,t.enter,t.exit;var n=je(t,["in","onExited","appear","enter","exit"]);return O.a.createElement(e,n)}}(n),MultiValue:function(e){return function(t){var n=t.in,r=t.onExited,o=je(t,["in","onExited"]);return O.a.createElement(Jt,{in:n,onExited:r},O.a.createElement(e,ke({cropWithEllipsis:n},o)))}}(r),Placeholder:function(e){return function(t){return
O.a.createElement(Zt,ke({component:e,duration:t.isMulti?Qt:1},t))}}(o),SingleValue:function(e){return function(t){return O.a.createElement(Zt,ke({component:e},t))}}(a),ValueContainer:function(e){return function(t){return O.a.createElement(ve.TransitionGroup,ke({component:e},t))}}(i)},s)},tn=en(),nn=(tn.Input,tn.MultiValue,tn.Placeholder,tn.SingleValue,tn.ValueContainer,ce(en,Je),Gt(Wt)),rn=(n(38),wp.components),on=rn.BaseControl,an=rn.Button,sn=wp.compose.withInstanceId,un=wp.element.Component,ln=wp.i18n.__,cn=sn(function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this))).state={selectedOptions:null},n.isOptionDisabled=n.isOptionDisabled.bind(j()(j()(n))),n.getNewAttributes=n.getNewAttributes.bind(j()(j()(n))),n}return y()(t,e),f()(t,[{key:"isOptionDisabled",value:function(e,t){var n,r=this.props.mode;return"loading"===e.type||(Array.isArray(t)&&t.length&&(n=t[0].type),!(!r||r===e.type)||n&&n!==e.type)}},{key:"
getNewAttributes",value:function(){var e={},t=this.state.selectedOptions;if(null===t)return e;var n=t.map(function(e){return e.value})||[];n.length?e={mode:t[0].type,item_ids:n}:e={mode:"",item_ids:[]};return e}},{key:"render",value:function(){var e=this,t=this.props,n=t.instanceId,r=t.className,o=t.label,a=t.help,i=t.submitLabel,s=t.buildSelectOptions,u=t.onChange,l=t.selectProps,p=this.state.selectedOptions||this.props.value,d="wordcamp-item-select-control-".concat(n),m=ue()({options:s(),isMulti:!0,isOptionDisabled:this.isOptionDisabled},l);return Object(w.createElement)(on,{id:d,className:x()("wordcamp-item-select",r),label:o,help:a},Object(w.createElement)("div",{className:"wordcaselectedOptionsmp-item-select-inner"},Object(w.createElement)(nn,c()({id:d,className:"wordcamp-item-select-select",value:p,"aria-label":o,onChange:function(t){e.setState({selectedOptions:t})}},m)),Object(w.createElement
)(an,{className:"wordcamp-item-select-button",isLarge:!0,isDefault:!0,onClick:function(){return u(e.getNewAttributes())}},i||ln("Select","wordcamporg"))))}}]),t}(un)),pn=wp.components.Dashicon,dn=wp.element.Component,mn=wp.htmlEntities.decodeEntities,fn=wp.i18n.__;function hn(e){var t,n,r=e.type,o=e.label,a=void 0===o?"":o,i=e.avatar,s=void 0===i?"":i,u=e.count,l=void 0===u?0:u;switch(r){case"wcb_organizer":t=Object(w.createElement)(q,{className:"wordcamp-item-select-option-avatar",name:a,size:24,url:s}),n=Object(w.createElement)("span",{className:"wordcamp-item-select-option-label"},a);break;case"wcb_organizer_team":t=Object(w.createElement)("div",{className:"wordcamp-item-select-option-icon-container"},Object(w.createElement)(pn,{className:"wordcamp-item-select-option-icon",icon:"megaphone",size:16})),n=Object(w.createElement)("span"
,{className:"wordcamp-item-select-option-label"},a,Object(w.createElement)("span",{className:"wordcamp-item-select-option-label-term-count"},l))}return Object(w.createElement)("div",{className:"wordcamp-item-select-option"},t,n)}var gn=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this,e))).state={wcb_organizer:[],wcb_organizer_team:[],loading:!0},n.buildSelectOptions=n.buildSelectOptions.bind(j()(j()(n))),n}return y()(t,e),f()(t,[{key:"componentWillMount",value:function(){var e=this;this.isStillMounted=!0;var t=this.props,n=t.allOrganizerPosts,r=t.allOrganizerTerms,o=n.then(function(t){var n=t.map(function(e){return{label:mn(e.title.rendered.trim())||fn("(Untitled)","wordcamporg"),value:e.id,type:"wcb_organizer",avatar:e.avatar_urls[24]}});e.isStillMounted&&e.setState({wcb_organizer:n})}),a=r.then(function(t){var n=t.map(function(e){return{label:mn(e.name)|
|fn("(Untitled)","wordcamporg"),value:e.id,type:"wcb_organizer_team",count:e.count}});e.isStillMounted&&e.setState({wcb_organizer_team:n})});Promise.all([o,a]).then(function(){e.setState({loading:!1})})}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"buildSelectOptions",value:function(e){var t=[],n={wcb_organizer:fn("Organizers","wordcamporg"),wcb_organizer_team:fn("Teams","wordcamporg")};for(var r in this.state)this.state[r].length&&(e&&r!==e||t.push({label:n[r],options:this.state[r]}));return t}},{key:"render",value:function(){var e=this.props,t=e.label,n=e.attributes,r=e.setAttributes,o=n.mode,a=n.item_ids,i=this.buildSelectOptions(o),s=[];o&&a.length&&(s=Object(C.get)(i,"[0].options",[]).filter(function(e){return Object(C.includes)(a,e.value)}));return Object(w.createElement)(cn,{className:"wordca
mp-organizer-select",label:t,value:s,buildSelectOptions:this.buildSelectOptions,onChange:function(e){return r(e)},mode:o,selectProps:{isLoading:this.state.loading,formatGroupLabel:function(e){return Object(w.createElement)("span",{className:"wordcamp-item-select-option-group-label"},e.label)},formatOptionLabel:function(e){return Object(w.createElement)(hn,e)}}})}}]),t}(dn),bn=wp.components,vn=bn.Button,En=bn.Placeholder,yn=wp.i18n.__,wn=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return y()(t,e),f()(t,[{key:"render",value:function(){var e,t=this.props,n=t.icon,r=t.attributes,o=t.setAttributes,a=t.organizerPosts,i=r.mode,s=Array.isArray(a)&&a.length;if(i&&!s)return Object(w.createElement)(R,{icon:n,label:Or,loading:!Array.isArray(a)});switch(i){case"all":e=Object(w.createElement)(ie,this.props);break;case"wcb_organizer":case"wcb_organizer_team":e=Object(w.createElem
ent)(V,{label:this.getModeLabel(i),icon:n,content:Object(w.createElement)(ie,this.props),placeholderChildren:Object(w.createElement)(gn,this.props)});break;default:e=Object(w.createElement)(En,{className:x()("wordcamp-block-edit-placeholder","wordcamp-block-edit-placeholder-no-mode"),icon:n,label:Or},Object(w.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(w.createElement)(vn,{isDefault:!0,isLarge:!0,onClick:function(){o({mode:"all"})}},this.getModeLabel("all"))),Object(w.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(w.createElement)(gn,c()({label:yn("Choose specific organizers or teams","wordcamporg")},this.props))))}return e}}]),t}(T),On=(n(50),wp.element.Component),Cn=wp.components,kn=Cn.BaseControl,Sn=Cn.Button,_n=Cn.ButtonGroup,xn=Cn.RangeControl,An=wp.i18n,jn=An.__,Dn=An._x,Fn=[{name:jn("Small","wordcamporg&quo
t;),shortName:Dn("S","size small","wordcamporg"),size:90,slug:"small"},{name:jn("Regular","wordcamporg"),shortName:Dn("M","size medium","wordcamporg"),size:150,slug:"regular"},{name:jn("Large","wordcamporg"),shortName:Dn("L","size large","wordcamporg"),size:300,slug:"large"},{name:jn("Larger","wordcamporg"),shortName:Dn("XL","size extra large","wordcamporg"),size:500,slug:"larger"}],Pn=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this))).state={value:e.value,onChange:Object(C.debounce)(e.onChange,10)},n.onChange=n.onChange.bind(j()(j()(n))),n}return y()(t,e),f()(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,a=t.initialPosition,i=t.rangeProps,s=this.state.value;return Object(w.createElement)(kn,{className:x()("wordcamp-components-avatar-size",n),label:r,help:o},Object(w.createElement)("div",{className:"wordcamp-components-avatar-size-buttons"},Object(w.createElement)(_n,{"aria-label":r},Fn.map(function(t){var n=t.name,r=t.shortName,o=t.size,a=t.slug,i=s===o;return Object(w.createElement)(Sn,{key:a,isLarge:!0,isPrimary:i,"aria-label":n,"aria-pressed":i,onClick:function(){return e.onChange(Number(o))}},r||n)})),Object(w.createElement)(Sn,{className:"wordcamp-components-avatar-size-button-reset",isLarge:!0,isDefault:!0,onClick:function(){return e.onChange(Number(a))}},jn("Reset","wordcamporg"))),Object(w.createElement)(xn,c()({className:"wordcamp-components-avatar-size-range",value:s,initialPosition:a,onChange:this.onChange,beforeIcon:"format-image",afterIcon:"
;format-image","aria-label":r},i)))}}]),t}(On),Nn=wp.components,Mn=Nn.BaseControl,Ln=Nn.Toolbar;var In=function(e){var t=e.className,n=e.label,r=e.help,o=e.value,a=e.onChange,i=e.alignOptions;return Object(w.createElement)(Mn,{className:x()("wordcamp-components-image-alignment",t),label:n,help:r},Object(w.createElement)(Ln,{controls:i.map(function(e){var t=o===e.value,n="align-".concat(e.value);return{title:e.label,icon:n,isActive:t,onClick:function(){a(e.value)}}})}))},Tn=wp.element.Component,Rn=wp.components,Vn=Rn.PanelBody,Bn=Rn.PanelRow,zn=Rn.RangeControl,Un=wp.i18n.__,Wn={grid_columns:{default:2,minimum:2,maximum:4}},Hn=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return y()(t,e),f()(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 a=Wn;return Object(w.createElement)(Vn,null,Object(w.createEleme
nt)(Vn,{title:Un("Layout","wordcamporg"),initialOpen:!0},Object(w.createElement)(Bn,null,Object(w.createElement)(zn,{label:Un("Grid Columns","wordcamporg"),value:Number(o),min:a.grid_columns.minimum,max:a.grid_columns.maximum,initialPosition:a.grid_columns.default,onChange:function(e){return n({grid_columns:e})}}))))}}]),t}(Tn),Gn=wp.components,$n=Gn.PanelBody,qn=Gn.PanelRow,Yn=Gn.SelectControl,Xn=Gn.ToggleControl,Kn=wp.editor.InspectorControls,Zn=wp.element,Qn=Zn.Component,Jn=Zn.Fragment,er=wp.i18n.__,tr={grid_columns:{default:2,minimum:2,maximum:4},avatar_size:{default:150,minimum:25,maximum:600}},nr={align:{},content:{},sort:{}},rr=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return y()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.show_avatars,a=t.avatar_size,i=t.avatar_align,s=t.content,u=t.excerpt_more,l=t.sort,c=r.schema,p=vo
id 0===c?tr:c,d=r.options,m=void 0===d?nr:d;return Object(w.createElement)(Kn,null,Object(w.createElement)(Hn,this.props),Object(w.createElement)($n,{title:er("Avatar Settings","wordcamporg"),initialOpen:!0},Object(w.createElement)(qn,null,Object(w.createElement)(Xn,{label:er("Show avatars","wordcamporg"),checked:o,onChange:function(e){return n({show_avatars:e})}})),o&&Object(w.createElement)(Jn,null,Object(w.createElement)(qn,null,Object(w.createElement)(Pn,{label:er("Size","wordcamporg"),value:Number(a),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(w.createElement)(qn,null,Object(w.createElement)(In,{label:er("Alignment","wordcamporg"),value:i,onChange:function(e){return n({avatar_align:e})},alignOptions:m.align})))),Object(w.createElement)($n,{title:er(&quo
t;Content Settings","wordcamporg"),initialOpen:!1},Object(w.createElement)(qn,null,Object(w.createElement)(Yn,{label:er("Biography Length","wordcamporg"),value:s,options:m.content,onChange:function(e){return n({content:e})}})),"excerpt"===s&&Object(w.createElement)(qn,null,Object(w.createElement)(Xn,{label:er("Read More Link","wordcamporg"),help:er("Show a link at the end of the excerpt (some themes already include this)","wordcamporg"),checked:u,onChange:function(e){return n({excerpt_more:e})}}))),Object(w.createElement)($n,{title:er("Sorting & Filtering","wordcamporg"),initialOpen:!1},Object(w.createElement)(qn,null,Object(w.createElement)(Yn,{label:er("Sort by","wordcamporg"),value:l,options:m.sort,onChange:function(e){return n({sort:e})}}))))}}]),t}(Qn),or=wp.components.Toolbar,ar=wp.editor.BlockControls,ir=wp.element.Component,sr=wp.htmlEntiti
es.decodeEntities,ur=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return y()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.layout,a=r.options.layout,i=(void 0===a?{}:a).map(function(e){var t="".concat(sr(e.value),"-view"),r=o===e.value;return{icon:t,title:e.label,isActive:r,onClick:function(){n({layout:e.value})}}});return Object(w.createElement)(ar,null,Object(w.createElement)(or,{controls:i}))}}]),t}(ir),lr=wp.apiFetch,cr=wp.data.withSelect,pr=wp.element,dr=pr.Component,mr=pr.Fragment,fr=wp.url.addQueryArgs,hr=window.WordCampBlocks.organizers||{},gr={orderby:"title",order:"asc",per_page:100},br={orderby:"name",order:"asc",per_page:100},vr=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this,e))).state={allOrganizerPosts:null,allOrganizerTerms:null},n}return y()(t,e),f()(t,[{key:"
componentWillMount",value:function(){this.isStillMounted=!0;var e=lr({path:fr("/wp/v2/organizers",gr)}),t=lr({path:fr("/wp/v2/organizer_team",br)});this.isStillMounted&&this.setState({allOrganizerPosts:e,allOrganizerTerms:t})}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"render",value:function(){var e=this.props.attributes.mode;return Object(w.createElement)(mr,null,Object(w.createElement)(wn,c()({icon:Cr},this.props,this.state)),""!==e&&Object(w.createElement)(mr,null,Object(w.createElement)(rr,this.props),Object(w.createElement)(ur,this.props)))}}]),t}(dr),Er=cr(function(e,t){var n=t.attributes,r=n.mode,o=n.item_ids,a=n.sort,i=e("core").getEntityRecords,s=Object(C.split)(a,"_",2),l=u()(s,2),c={orderby:l[0],order:l[1],per_page:100,context:"view"};if(Array.isArray(o))switch(r){case"wcb_organizer":c.include=o;break;case"wcb_organizer_team
":c.organizer_team=o}var p=Object(C.pickBy)(c,function(e){return!Object(C.isUndefined)(e)});return{blockData:hr,organizerPosts:i("postType","wcb_organizer",p)}})(vr),yr=wp.i18n.__,wr="wordcamp/organizers",Or=yr("Organizers","wordcamporg"),Cr="groups",kr={title:yr("Organizers","wordcamporg"),description:yr("Add a list of organizers.","wordcamporg"),icon:Cr,category:"wordcamp",edit:Er,save:function(){return null}},Sr=n(28),_r=n.n(Sr),xr=n(29),Ar=n.n(xr),jr=wp.i18n.__;function Dr(e){return e.split(/(%[1-9]?\$?s)/)}function Fr(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 Pr(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 Nr=wp.components.Disabled,Mr=wp.element.Component,Lr=wp.url.isURL,Ir=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this,e))).state={},n}return y()(t,e),f()(t,[{key:"getFullImage",value:function(){var e=this.props.wpMediaDetails,t=this.state.selectedImage;if(t&&t.hasOwnProperty("source_url"))return t;if(e.hasOwnProperty("full")&&e.full.hasOwnProperty("source_url"))return this.setState({selectedImage:e.full}),e.full;var n={source_url:""};for(var r in e)e.hasOwnProperty(r)&&e[r].width>(n.width||0)&&e[r].hasOwnProperty("source_url")&&(n=e[r]);return this.setState({selectedImage:n}),n}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.alt,r=e.width,o=void 0===r?150:r,a=e.imageLink,i=this.getFullImage(),s=Object(w.createElement)("img",{className:x()("wordcamp-featured-image",t),src:i.source_url,alt:
n,width:o+"px"});return Lr(a)&&(s=Object(w.createElement)(Nr,null,Object(w.createElement)("a",{href:a,className:x()("wordcamp-image-link","wordcamp-featured-image-link")},s))),s=Object(w.createElement)("div",{className:x()("wordcamp-image-container","wordcamp-featured-image-container",t)},s)}}]),t}(Mr),Tr=(wp.components.Disabled,wp.element.Component),Rr=wp.htmlEntities.decodeEntities,Vr=wp.i18n.__;function Br(e){var t=e.session,n=Object(C.get)(t,"_embedded.speakers",[]);n=n.map(function(e){var t=e.link,n=void 0===t?"":t,r=e.title,o=void 0===r?{}:r;return o=o.rendered||Vr("Unnamed","wordcamporg"),n?Object(w.createElement)("a",{key:n,href:n},Rr(o.trim())):Rr(o.trim())});var r=Fr(Dr(Vr("Presented by %s","wordcamporg")),[function(e){var t=[],n=jr(", ","wordcamporg"),r=jr(" and ","wordcamporg");if(!Arra
y.isArray(e))return t;switch(e.length){case 0:break;case 1:t=e;break;case 2:t=Pr(e,r);break;default:var o=_r()(e).reverse(),a=Ar()(o),i=a[0];t=Pr(a.slice(1),n).concat([n,r,i])}return t}(n)]);return Object(w.createElement)("div",{className:"wordcamp-item-meta wordcamp-session-speakers"},r)}function zr(e){var t,n,r,o=e.session,a=e.show_meta,i=e.show_category,s=Object(C.get)(o,"_embedded['wp:term']",[]).flat();if(a){if(o.session_track.length){var l=s.filter(function(e){return"wcb_track"===e.taxonomy}),c=u()(l,1)[0];n=Fr(Dr(Vr("%1$s at %2$s in %3$s","wordcamporg")),[Rr(o.session_date_time.date),Rr(o.session_date_time.time),Object(w.createElement)("span",{className:x()("wordcamp-session-track","wordcamp-session-track-"+Rr(c.slug.trim()))},Rr(c.name.trim()))])}else n=Fr(Dr(Vr("%1$s at %2$s","wordcamporg")),[Rr(o.session_date_time.date),Rr(o.session_date_time.time)]);t=Object(w.cre
ateElement)("div",{className:"wordcamp-session-time-location"},n)}if(i&&o.session_category.length){var p=Vr(", ","wordcamporg"),d=s.filter(function(e){return"wcb_session_category"===e.taxonomy}).map(function(e){return Object(w.createElement)("span",{key:e.slug,className:x()("wordcamp-session-category","wordcamp-session-category-"+Rr(e.slug))},Rr(e.name.trim()))});r=Object(w.createElement)("div",{className:"wordcamp-session-categories"},Pr(d,p))}return Object(w.createElement)("div",{className:"wordcamp-item-meta wordcamp-session-details"},t,r)}var Ur=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return y()(t,e),f()(t,[{key:"hasSpeaker",value:function(e){return Object(C.get)(e,"_embedded.speakers",[]).length>0}},{key:"render",value:function(){var e=this,t=this.props,n=t.attributes,r=t.sessi
onPosts,o=n.show_speaker,a=n.show_images,i=n.image_align,s=n.featured_image_width,u=n.content,l=n.excerpt_more,c=n.show_meta,p=n.show_category;return Object(w.createElement)(ne,this.props,r.map(function(t){return Object(w.createElement)("div",{key:t.slug,className:x()("wordcamp-block-post-list-item","wordcamp-session","wordcamp-session-"+Rr(t.slug),"wordcamp-clearfix")},Object(w.createElement)(ee,{className:"wordcamp-session-title",headingLevel:3,title:t.title.rendered.trim(),link:t.link}),o&&e.hasSpeaker(t)&&Object(w.createElement)(Br,{session:t}),a&&Object(w.createElement)(Ir,{className:x()("wordcamp-session-image-container","align-"+Rr(i)),wpMediaDetails:Object(C.get)(t,"_embedded.wp:featuredmedia[0].media_details.sizes",{}),alt:Rr(t.title.rendered),width:Number(s),imageLink:t.link}),"none"!==u&&Object(w.createElement)(te,{className:x()("wordcam
p-session-content-"+Rr(u)),content:"full"===u?t.content.rendered.trim():t.excerpt.rendered.trim(),link:"full"===u||l?t.link:null,linkText:Vr("full"===u?"Visit session page":"Read more","wordcamporg")}),(c||p)&&Object(w.createElement)(zr,{session:t,show_meta:c,show_category:p}))}))}}]),t}(Tr),Wr=n(15),Hr=n.n(Wr),Gr=wp.components.Dashicon,$r=wp.element.Component,qr=wp.htmlEntities.decodeEntities,Yr=wp.i18n.__;function Xr(e){var t,n,r=e.type,o=e.icon,a=e.label,i=void 0===a?"":a,s=e.image,u=void 0===s?"":s,l=e.count,c=void 0===l?0:l;switch(r){case"wcb_session":t=u?Object(w.createElement)("img",{className:"wordcamp-item-select-option-image",src:u,alt:i,width:24,height:24}):Object(w.createElement)("div",{className:"wordcamp-item-select-option-icon-container"},Object(w.createElement)(Gr,{className:"wordcamp-item-select-option-icon",icon:o,
size:16})),n=Object(w.createElement)("span",{className:"wordcamp-item-select-option-label"},i);break;case"wcb_track":case"wcb_session_category":t=Object(w.createElement)("div",{className:"wordcamp-item-select-option-icon-container"},Object(w.createElement)(Gr,{className:"wordcamp-item-select-option-icon",icon:o,size:16})),n=Object(w.createElement)("span",{className:"wordcamp-item-select-option-label"},i,Object(w.createElement)("span",{className:"wordcamp-item-select-option-label-term-count"},c))}return Object(w.createElement)("div",{className:"wordcamp-item-select-option"},t,n)}var Kr=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this))).state={wcb_session:[],wcb_track:[],wcb_session_category:[],loading:!0},n.buildSelectOptions=n.buildSelectOptions.bind(j()(j()(n))),n}return y()(t,e),f()(t,[{key:"componentWillMount",
value:function(){var e=this;this.isStillMounted=!0;var t=this.props,n=t.allSessionPosts,r=t.allSessionTracks,o=t.allSessionCategories,a=[];a.push(n.then(function(t){var n=t.map(function(e){var t=Object(C.get)(e,"_embedded['wp:featuredmedia'].media_details.sizes.thumbnail.source_url","");return{label:qr(e.title.rendered.trim())||Yr("(Untitled)","wordcamporg"),value:e.id,type:"wcb_session",image:t}});e.isStillMounted&&e.setState({wcb_session:n})}).catch()),[r,o].forEach(function(t){a.push(t.then(function(t){var n=t.map(function(e){return{label:qr(e.name)||Yr("(Untitled)","wordcamporg"),value:e.id,type:e.taxonomy,count:e.count||0}});if(e.isStillMounted){var r=u()(n,1)[0];e.setState(Hr()({},r.type,n))}}).catch())}),Promise.all(a).then(function(){e.setState({loading:!1})})}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"buildSelectOptions",value:function(e){var
t=[],n={wcb_session:Yr("Sessions","wordcamporg"),wcb_track:Yr("Tracks","wordcamporg"),wcb_session_category:Yr("Session Categories","wordcamporg")};for(var r in this.state)!this.state.hasOwnProperty(r)||e&&r!==e||!this.state[r].length||t.push({label:n[r],options:this.state[r]});return t}},{key:"render",value:function(){var e=this.props,t=e.icon,n=e.label,r=e.attributes,o=e.setAttributes,a=r.mode,i=r.item_ids,s=this.buildSelectOptions(a),u=[];a&&i.length&&(u=Object(C.get)(s,"[0].options",[]).filter(function(e){return Object(C.includes)(i,e.value)}));return Object(w.createElement)(cn,{className:"wordcamp-sessions-select",label:n,value:u,buildSelectOptions:this.buildSelectOptions,onChange:function(e){return o(e)},mode:a,selectProps:{isLoading:this.state.loading,formatGroupLabel:function(e){return Object(w.createElement)("span",{className:"wordcamp-item-select-
option-group-label"},e.label)},formatOptionLabel:function(e){return Object(w.createElement)(Xr,c()({icon:t},e))}}})}}]),t}($r),Zr=wp.components,Qr=Zr.Button,Jr=Zr.Placeholder,eo=wp.i18n.__,to=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return y()(t,e),f()(t,[{key:"render",value:function(){var e,t=this.props,n=t.icon,r=t.attributes,o=t.setAttributes,a=t.sessionPosts,i=r.mode,s=Array.isArray(a)&&a.length;if(i&&!s)return Object(w.createElement)(R,{icon:n,label:Bo,loading:!Array.isArray(a)});switch(i){case"all":e=Object(w.createElement)(Ur,this.props);break;case"wcb_session":case"wcb_track":case"wcb_session_category":e=Object(w.createElement)(V,{label:this.getModeLabel(i),icon:n,content:Object(w.createElement)(Ur,this.props),placeholderChildren:Object(w.createElement)(Kr,this.props)});break;default:e=Object(w.createElement)(Jr,{className:x()("wordcamp-block-edit-placeholder
","wordcamp-block-edit-placeholder-no-mode"),icon:n,label:Bo},Object(w.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(w.createElement)(Qr,{isDefault:!0,isLarge:!0,onClick:function(){o({mode:"all"})}},this.getModeLabel("all"))),Object(w.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(w.createElement)(Kr,c()({icon:n,label:eo("Choose specific sessions, tracks, or categories","wordcamporg")},this.props))))}return e}}]),t}(T),no=(n(53),wp.element.Component),ro=wp.components,oo=ro.PanelBody,ao=ro.PanelRow,io=ro.TextControl,so=ro.BaseControl,uo=ro.SelectControl,lo=(ro.ToggleControl,wp.i18n.__),co=[{label:lo("Thumbnail","wordcamporg"),value:"150"},{label:lo("Thumbnail - Large","wordcamporg"),value:"926"},{label:lo("Medium","wordcamporg"),value:"300"},{label
:lo("Medium - Large","wordcamporg"),value:"768"},{label:lo("Large","wordcamporg"),value:"1024"},{label:lo("(Custom)","wordcamporg"),value:""}],po=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return y()(t,e),f()(t,[{key:"componentWillMount",value:function(){this.availableSizes=co.map(function(e){return e.value})}},{key:"onPresetSizeSelect",value:function(e){""!==e&&(0,this.props.setAttributes)({featured_image_width:Number(e)})}},{key:"render",value:function(){var e=this,t=this.props,n=t.attributes,r=t.setAttributes,o=t.title,a=t.help,i=t.selectLabel,s=(t.cropLabel,n.featured_image_width),u=-1===this.availableSizes.indexOf(s.toString())?"":s.toString();return Object(w.createElement)(oo,{title:o,initialopen:!1},Object(w.createElement)(ao,null,Object(w.createElement)(so,{help:a},Object(w.createElement)(a
o,null,Object(w.createElement)(uo,{label:i,value:u,options:co,onChange:function(t){return e.onPresetSizeSelect(t)}})),Object(w.createElement)(ao,null,Object(w.createElement)(io,{label:lo("Width (in px)","wordcamporg"),type:"number",value:s,onChange:function(e){return r({featured_image_width:Number(e)})}})))))}}]),t}(no),mo=wp.components,fo=mo.PanelBody,ho=mo.PanelRow,go=mo.SelectControl,bo=mo.ToggleControl,vo=wp.editor.InspectorControls,Eo=wp.element,yo=Eo.Component,wo=(Eo.Fragment,wp.i18n.__),Oo=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return y()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.show_speaker,a=t.content,i=t.excerpt_more,s=t.show_meta,u=t.show_category,l=t.sort,p=r.options;return Object(w.createElement)(vo,null,Object(w.createElement)(Hn,this.props),Object(w.createElement)(fo,{title:wo("Content Settings","wordc
amporg"),initialOpen:!0},Object(w.createElement)(ho,null,Object(w.createElement)(go,{label:wo("Description","wordcamporg"),value:a||"full",options:p.content,onChange:function(e){return n({content:e})}})),"excerpt"===a&&Object(w.createElement)(ho,null,Object(w.createElement)(bo,{label:wo("Read More Link","wordcamporg"),help:wo("Show a link at the end of the excerpt (some themes already include this)","wordcamporg"),checked:void 0!==i&&i,onChange:function(e){return n({excerpt_more:e})}})),Object(w.createElement)(ho,null,Object(w.createElement)(bo,{label:wo("Details","wordcamporg"),help:wo("Show date, time, and track.","wordcamporg"),checked:void 0!==s&&s,onChange:function(e){return n({show_meta:e})}})),Object(w.createElement)(ho,null,Object(w.createElement)(bo,{label:wo("Categories","wordcamporg"),help:wo("Show se
ssion categories.","wordcamporg"),checked:void 0!==u&&u,onChange:function(e){return n({show_category:e})}})),Object(w.createElement)(ho,null,Object(w.createElement)(bo,{label:wo("Speakers","wordcamporg"),help:wo("Show session speakers.","wordcamporg"),checked:void 0!==o&&o,onChange:function(e){return n({show_speaker:e})}}))),Object(w.createElement)(po,c()({title:wo("Image size","wordcamporg"),help:wo("Specify image height and width, or select a predefined size.","wordcamporg"),selectLabel:wo("Size","wordcamporg")},this.props)),Object(w.createElement)(fo,{title:wo("Sorting","wordcamporg")},Object(w.createElement)(ho,null,Object(w.createElement)(go,{label:wo("Sort by","wordcamporg"),value:l,options:p.sort||"session_time",onChange:function(e){return n({sort:e})}}))))}}]),t}(yo),Co=wp.components.Toolbar,ko=wp
.editor.BlockControls,So=wp.i18n.__,_o=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return y()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=t.layout,o=[{value:"grid",label:So("Grid","wordcamporg"),isActive:"grid"===r},{value:"list",label:So("List","wordcamporg"),isActive:"grid"===r}];return Object(w.createElement)(ko,null,Object(w.createElement)(Co,{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),xo=wp.apiFetch,Ao=wp.data.withSelect,jo=wp.element,Do=jo.Component,Fo=jo.Fragment,Po=wp.url.addQueryArgs,No=window.WordCampBlocks.sessions||{},Mo={orderby:"title",order:"asc",per_page:100,_embed:
!0},Lo={orderby:"name",order:"asc",per_page:100},Io=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this))).state={allSessionPosts:null,allSessionTracks:null,allSessionCategories:null},n}return y()(t,e),f()(t,[{key:"componentWillMount",value:function(){this.isStillMounted=!0;var e=xo({path:Po("/wp/v2/sessions",Mo)}),t=xo({path:Po("/wp/v2/session_track",Lo)}),n=xo({path:Po("/wp/v2/session_category",Lo)});this.isStillMounted&&this.setState({allSessionPosts:e,allSessionTracks:t,allSessionCategories:n})}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"render",value:function(){var e=this.props.attributes.mode;return Object(w.createElement)(Fo,null,Object(w.createElement)(to,c()({icon:zo},this.props,this.state)),e&&Object(w.createElement)(Fo,null,Object(w.createElement)(Oo,this.props),Object(w.createElement)(_o,this.props)))}}]),t}(Do),To=
Ao(function(e,t){var n=t.attributes,r=n.mode,o=n.item_ids,a=n.sort,i=e("core").getEntityRecords,s={per_page:100,_embed:!0,context:"view",_wcpt_session_type:"session"};if("session_time"!==a){var l=Object(C.split)(a,"_",2),c=u()(l,2),p=c[0],d=c[1];s.orderby=p,s.order=d}if(Array.isArray(o))switch(r){case"wcb_session":s.include=o;break;case"wcb_track":s.session_track=o;break;case"wcb_session_category":s.session_category=o}var m=i("postType","wcb_session",Object(C.pickBy)(s,function(e){return!Object(C.isUndefined)(e)}));return Array.isArray(m)&&"session_time"===a&&m.sort(function(e,t){return Number(e.meta._wcpt_session_time)-Number(t.meta._wcpt_session_time)}),{blockData:No,sessionPosts:m}})(Io),Ro=wp.i18n.__,Vo="wordcamp/sessions",Bo=Ro("Sessions","wordcamporg"),zo="list-view",Uo={title:Ro("Sessions","wordcam
porg"),description:Ro("Add a list of sessions.","wordcamporg"),icon:zo,category:"wordcamp",edit:To,save:function(){return null}},Wo=(n(54),wp.components.Disabled),Ho=wp.element,Go=Ho.Component,$o=Ho.Fragment,qo=wp.htmlEntities.decodeEntities,Yo=wp.i18n,Xo=Yo.__,Ko=Yo._n,Zo=wp.escapeHtml.escapeAttribute;function Qo(e){var t=e.speaker,n=e.tracks,r=Object(C.get)(t,"_embedded.sessions",[]),o=Object(w.createElement)($o,null,null);return r.length&&(o=Object(w.createElement)("div",{className:x()("wordcamp-item-meta","wordcamp-speaker-sessions")},Object(w.createElement)("h4",{className:"wordcamp-speaker-sessions-heading"},Ko("Session","Sessions",r.length,"wordcamporg")),Object(w.createElement)("ul",{className:"wordcamp-speaker-sessions-list"},r.map(function(e){return Object(w.createElement)("li",{key:Zo(e.slug),className:"wor
dcamp-speaker-session-content"},Object(w.createElement)(Wo,null,Object(w.createElement)("a",{className:"wordcamp-speaker-session-link",href:e.link},qo(e.title.rendered.trim())||Xo("(Untitled)","wordcamporg")),Object(w.createElement)("span",{className:"wordcamp-speaker-session-info"},e.session_track.length&&Array.isArray(n)&&Fr(Dr(Xo("%1$s at %2$s in %3$s","wordcamporg")),[qo(e.session_date_time.date),qo(e.session_date_time.time),Object(C.get)(n.find(function(t){var n=u()(e.session_track,1)[0];return parseInt(t.id)===n}),"name")]),(!e.session_track.length||!Array.isArray(n))&&Fr(Dr(Xo("%1$s at %2$s","wordcamporg")),[qo(e.session_date_time.date),qo(e.session_date_time.time)]))))})))),o}var Jo=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return y()(t,e),f()(t,[{key:"render",value:function(){var e=this.
props,t=e.attributes,n=e.speakerPosts,r=e.tracks,o=t.show_avatars,a=t.avatar_size,i=t.avatar_align,s=t.content,u=t.excerpt_more,l=t.show_session;return Object(w.createElement)(ne,this.props,n.map(function(e){return Object(w.createElement)("div",{key:e.slug,className:x()("wordcamp-speaker","wordcamp-speaker-"+qo(e.slug))},Object(w.createElement)(ee,{className:"wordcamp-speaker-title",headingLevel:3,title:e.title.rendered.trim(),link:e.link}),o&&Object(w.createElement)(q,{className:x()("wordcamp-speaker-avatar-container","align-"+qo(i)),name:qo(e.title.rendered.trim())||"",size:a,url:e.avatar_urls[24],imageLink:e.link}),"none"!==s&&Object(w.createElement)(te,{className:x()("wordcamp-speaker-content-"+qo(s)),content:"full"===s?e.content.rendered.trim():e.excerpt.rendered.trim(),link:"full"===s||u?e.link:null,linkText:Xo("full"===s?"Visit session p
age":"Read more","wordcamporg")}),!0===l&&Object(w.createElement)(Qo,{speaker:e,tracks:r}))}))}}]),t}(Go),ea=wp.components.Dashicon,ta=wp.element.Component,na=wp.htmlEntities.decodeEntities,ra=wp.i18n.__;function oa(e){var t,n,r=e.type,o=e.icon,a=e.label,i=void 0===a?"":a,s=e.avatar,u=void 0===s?"":s,l=e.count,c=void 0===l?0:l;switch(r){case"wcb_speaker":t=Object(w.createElement)(q,{className:"wordcamp-item-select-option-avatar",name:i,size:24,url:u}),n=Object(w.createElement)("span",{className:"wordcamp-item-select-option-label"},i);break;case"wcb_speaker_group":t=Object(w.createElement)("div",{className:"wordcamp-item-select-option-icon-container"},Object(w.createElement)(ea,{className:"wordcamp-item-select-option-icon",icon:o,size:16})),n=Object(w.createElement)("span",{className:"wordcamp-item-select-option-label"},i,Object(w.cr
eateElement)("span",{className:"wordcamp-item-select-option-label-term-count"},c))}return Object(w.createElement)("div",{className:"wordcamp-item-select-option"},t,n)}var aa=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this))).state={wcb_speaker:[],wcb_speaker_group:[],loading:!0},n.buildSelectOptions=n.buildSelectOptions.bind(j()(j()(n))),n}return y()(t,e),f()(t,[{key:"componentWillMount",value:function(){var e=this;this.isStillMounted=!0;var t=this.props,n=t.allSpeakerPosts,r=t.allSpeakerTerms,o=n.then(function(t){var n=t.map(function(e){return{label:na(e.title.rendered.trim())||ra("(Untitled)","wordcamporg"),value:e.id,type:"wcb_speaker",avatar:e.avatar_urls[24]}});e.isStillMounted&&e.setState({wcb_speaker:n})}),a=r.then(function(t){var n=t.map(function(e){return{label:na(e.name)||ra("(Untitled)","wordcamporg"),value:e.id,type:"wcb_speaker
_group",count:e.count}});e.isStillMounted&&e.setState({wcb_speaker_group:n})});Promise.all([o,a]).then(function(){e.setState({loading:!1})})}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"buildSelectOptions",value:function(e){var t=[],n={wcb_speaker:ra("Speakers","wordcamporg"),wcb_speaker_group:ra("Groups","wordcamporg")};for(var r in this.state)!this.state.hasOwnProperty(r)||e&&r!==e||!this.state[r].length||t.push({label:n[r],options:this.state[r]});return t}},{key:"render",value:function(){var e=this.props,t=e.label,n=e.icon,r=e.attributes,o=e.setAttributes,a=r.mode,i=r.item_ids,s=this.buildSelectOptions(a),u=[];a&&i.length&&(u=Object(C.get)(s,"[0].options",[]).filter(function(e){return Object(C.includes)(i,e.value)}));return Object(w.createElement)(cn,{className:"wordcamp-speakers-select",label:t,value:u,buildSelectOptions:
this.buildSelectOptions,onChange:function(e){return o(e)},mode:a,selectProps:{isLoading:this.state.loading,formatGroupLabel:function(e){return Object(w.createElement)("span",{className:"wordcamp-item-select-option-group-label"},e.label)},formatOptionLabel:function(e){return Object(w.createElement)(oa,c()({icon:n},e))}}})}}]),t}(ta),ia=wp.components,sa=ia.Button,ua=ia.Placeholder,la=wp.i18n.__,ca=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return y()(t,e),f()(t,[{key:"render",value:function(){var e,t=this.props,n=t.icon,r=t.attributes,o=t.setAttributes,a=t.speakerPosts,i=r.mode,s=Array.isArray(a)&&a.length;if(i&&!s)return Object(w.createElement)(R,{icon:n,label:Ba,loading:!Array.isArray(a)});switch(i){case"all":e=Object(w.createElement)(Jo,this.props);break;case"wcb_speaker":case"wcb_speaker_group":e=Object(w.createElement)(V,{label:this.getModeLabel(i),icon:n,content:Ob
ject(w.createElement)(Jo,this.props),placeholderChildren:Object(w.createElement)(aa,this.props)});break;default:e=Object(w.createElement)(ua,{className:x()("wordcamp-block-edit-placeholder","wordcamp-block-edit-placeholder-no-mode"),icon:n,label:Ba},Object(w.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(w.createElement)(sa,{isDefault:!0,isLarge:!0,onClick:function(){o({mode:"all"})}},this.getModeLabel("all"))),Object(w.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(w.createElement)(aa,c()({icon:n,label:la("Choose specific speakers or groups","wordcamporg")},this.props))))}return e}}]),t}(T),pa=wp.components,da=pa.PanelBody,ma=pa.PanelRow,fa=pa.SelectControl,ha=pa.ToggleControl,ga=wp.editor.InspectorControls,ba=wp.element,va=ba.Component,Ea=ba.Fragment,ya=wp.i18n.__,wa={grid_columns:{default:2,minimum:2,maximum:4},avatar_size:{defa
ult:150,minimum:25,maximum:600}},Oa={align:{},content:{},sort:{}},Ca=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return y()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.show_avatars,a=t.avatar_size,i=t.avatar_align,s=t.content,u=t.excerpt_more,l=t.show_session,c=t.sort,p=r.schema,d=void 0===p?wa:p,m=r.options,f=void 0===m?Oa:m;return Object(w.createElement)(ga,null,Object(w.createElement)(Hn,this.props),Object(w.createElement)(da,{title:ya("Avatar Settings","wordcamporg"),initialOpen:!0},Object(w.createElement)(ma,null,Object(w.createElement)(ha,{label:ya("Show avatars","wordcamporg"),checked:o,onChange:function(e){return n({show_avatars:e})}})),o&&Object(w.createElement)(Ea,null,Object(w.createElement)(ma,null,Object(w.createElement)(Pn,{label:ya("Size","wordcamporg"),value:Number(a),initialPosition:Nu
mber(d.avatar_size.default),onChange:function(e){return n({avatar_size:e})},rangeProps:{min:Number(d.avatar_size.minimum),max:Number(d.avatar_size.maximum)}})),Object(w.createElement)(ma,null,Object(w.createElement)(In,{label:ya("Alignment","wordcamporg"),value:i,onChange:function(e){return n({avatar_align:e})},alignOptions:f.align})))),Object(w.createElement)(da,{title:ya("Content Settings","wordcamporg"),initialOpen:!1},Object(w.createElement)(ma,null,Object(w.createElement)(fa,{label:ya("Biography Length","wordcamporg"),value:s,options:f.content,onChange:function(e){return n({content:e})}})),"excerpt"===s&&Object(w.createElement)(ma,null,Object(w.createElement)(ha,{label:ya("Read More Link","wordcamporg"),help:ya("Show a link at the end of the excerpt (some themes already include this)","wordcamporg"),checked:u,onChange:function(e){return n({excerpt_more:e})}})),O
bject(w.createElement)(ma,null,Object(w.createElement)(ha,{label:ya("Session Information","wordcamporg"),help:ya("Show speaker's session name, time, and track","wordcamporg"),checked:l,onChange:function(e){return n({show_session:e})}}))),Object(w.createElement)(da,{title:ya("Sorting & Filtering","wordcamporg"),initialOpen:!1},Object(w.createElement)(ma,null,Object(w.createElement)(fa,{label:ya("Sort by","wordcamporg"),value:c,options:f.sort,onChange:function(e){return n({sort:e})}}))))}}]),t}(va),ka=wp.components.Toolbar,Sa=wp.editor.BlockControls,_a=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return y()(t,e),f()(t,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=e.blockData,o=t.layout,a=r.options.layout,i=(void 0===a?{}:a).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(w.createElement)(Sa,null,Object(w.createElement)(ka,{controls:i}))}}]),t}(wp.element.Component),xa=wp.apiFetch,Aa=wp.data.withSelect,ja=wp.element,Da=ja.Component,Fa=ja.Fragment,Pa=wp.url.addQueryArgs,Na=window.WordCampBlocks.speakers||{},Ma={orderby:"title",order:"asc",per_page:100,_embed:!0},La={orderby:"name",order:"asc",per_page:100},Ia=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this))).state={allSpeakerPosts:null,allSpeakerTerms:null},n}return y()(t,e),f()(t,[{key:"componentWillMount",value:function(){this.isStillMounted=!0;var e=xa({path:Pa("/wp/v2/speakers",Ma)}),t=xa({path:Pa("/wp/v2/speaker_group",La)});this.isStillMounted&&this.setState({allSpeakerPosts:e,allSpeakerTerms:t})}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"render",val
ue:function(){var e=this.props.attributes.mode;return Object(w.createElement)(Fa,null,Object(w.createElement)(ca,c()({icon:za},this.props,this.state)),e&&Object(w.createElement)(Fa,null,Object(w.createElement)(Ca,this.props),Object(w.createElement)(_a,this.props)))}}]),t}(Da),Ta=Aa(function(e,t){var n=t.attributes,r=n.mode,o=n.item_ids,a=n.sort,i=e("core").getEntityRecords,s=Object(C.split)(a,"_",2),l=u()(s,2),c={orderby:l[0],order:l[1],per_page:100,_embed:!0,context:"view"};if(Array.isArray(o))switch(r){case"wcb_speaker":c.include=o;break;case"wcb_speaker_group":c.speaker_group=o}var p=Object(C.pickBy)(c,function(e){return!Object(C.isUndefined)(e)});return{blockData:Na,speakerPosts:i("postType","wcb_speaker",p),tracks:i("taxonomy","wcb_track",{per_page:100})}})(Ia),Ra=wp.i18n.__,Va="wordcamp/speakers",Ba=Ra("Speakers","wordcamporg"),za="megaphone"
;,Ua={title:Ra("Speakers","wordcamporg"),description:Ra("Add a list of speakers.","wordcamporg"),icon:za,category:"wordcamp",edit:Ta,save:function(){return null}},Wa=wp.element.Component,Ha=wp.editor.InspectorControls,Ga=wp.components,$a=Ga.PanelBody,qa=Ga.PanelRow,Ya=Ga.ToggleControl,Xa=Ga.SelectControl,Ka=wp.i18n.__,Za=function(e){function t(){return d()(this,t),g()(this,v()(t).apply(this,arguments))}return y()(t,e),f()(t,[{key:"render",value:function(){var e=[{label:Ka("Name (A to Z)","wordcamporg"),value:"name_asc"},{label:Ka("Name (Z to A)","wordcamporg"),value:"name_desc"},{label:Ka("Sponsor Level","wordcamporg"),value:"sponsor_level"}],t=[{label:Ka("Full","wordcamporg"),value:"full"},{label:Ka("Excerpt","wordcamporg"),value:"excerpt"},{label:Ka("None","wo
rdcamporg"),value:"none"}],n=this.props,r=n.attributes,o=n.setAttributes,a=r.show_name,i=r.show_logo,s=r.sort_by,u=r.excerpt_more,l=r.content;return Object(w.createElement)(Ha,null,Object(w.createElement)(Hn,this.props),Object(w.createElement)($a,{title:Ka("Content Settings","wordcamporg"),initialOpen:!0},Object(w.createElement)(qa,null,Object(w.createElement)(Ya,{label:Ka("Name","wordcamporg"),help:Ka("Show or hide sponsor name","wordcamporg"),checked:void 0===a||a,onChange:function(e){return o({show_name:e})}})),Object(w.createElement)(qa,null,Object(w.createElement)(Ya,{label:Ka("Logo","wordcamporg"),help:Ka("Show or hide sponsor logo","wordcamporg"),checked:void 0===i||i,onChange:function(e){return o({show_logo:e})}})),Object(w.createElement)(qa,null,Object(w.createElement)(Xa,{label:Ka("Description","wordcamporg"),value:l,options:t,help:Ka("
;Length of sponsor description","wordcamporg"),onChange:function(e){return o({content:e})}})),"excerpt"===l&&Object(w.createElement)(qa,null,Object(w.createElement)(Ya,{label:Ka("Read More Link","wordcamporg"),help:Ka("Show a link at the end of the excerpt (some themes already include this)","wordcamporg"),checked:u,onChange:function(e){return o({excerpt_more:e})}})),Object(w.createElement)(qa,null,Object(w.createElement)(Xa,{label:Ka("Sort by","wordcamporg"),options:e,value:s||"name_asc",onChange:function(e){return o({sort_by:e})},help:Ka("Configure sponsor levels from the Sponsor -> Order Sponsor Levels page.","wordcamporg")}))),Object(w.createElement)(po,c()({title:Ka("Logo size","wordcamporg"),help:Ka("Specify logo width, or select a predefined size.","wordcamporg"),selectLabel:Ka("Size","wordcamporg&
quot;)},this.props)))}}]),t}(Wa),Qa=wp.element.Component,Ja=wp.escapeHtml.escapeAttribute,ei=wp.i18n.__;function ti(e){var t=e.sponsorPost,n=e.attributes,r=(e.onFeatureImageChange,n.show_name),o=n.show_logo,a=(n.show_desc,n.content),i=n.excerpt_more,s=n.featured_image_width,u=Object(C.get)(t,"_embedded.wp:featuredmedia[0].media_details.sizes",{}),l="full"===a?t.content.rendered.trim():t.excerpt.rendered.trim();return console.log("content is: ",a,l),Object(w.createElement)("div",{className:"wordcamp-sponsor-details wordcamp-sponsor-details-"+Ja(t.slug)},(r||void 0===r)&&Object(w.createElement)(ee,{className:"wordcamp-sponsor-title",headingLevel:3,title:t.title.rendered.trim(),link:t.link}),(o||void 0===o)&&Object(w.createElement)(Ir,{className:"wordcamp-sponsor-featured-image wordcamp-sponsor-logo",wpMediaDetails:u,alt:t.title.rendered,width:s,imageLink:t.link}),"none"!==a&&Object(
w.createElement)(te,{className:x()("wordcamp-sponsor-content"),content:l,link:"full"===a||i?t.link:null,linkText:ei("full"===a?"Visit sponsor page":"Read more","wordcamporg")}))}var ni=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this))).state={selectedPosts:[],sortBy:"name_asc"},n}return y()(t,e),f()(t,[{key:"setFeaturedImageURL",value:function(e,t){var n=this.sponsorImageUrl||{};n[e]=t,this.sponsorImageUrl=n;var r=this.props.setAttributes,o=this.sponsorImageUrl;r({sponsor_image_urls:encodeURIComponent(JSON.stringify(o))})}},{key:"componentWillReceiveProps",value:function(e){var t=e.selectedPosts,n=e.attributes,r=e.sponsorTermOrder,o=n.sort_by,a=t.map(function(e){return e.id}).sort(),i=this.state,s=i.selectedPosts,u=i.sortBy,l=s.map(function(e){return e.id}).sort();if(u!==o||t.length!==s.length||0!==Object(C.difference)(l,a).length){var c;switch(o){case"spons
or_level":if(!Array.isArray(r)||0===r.length)break;c=t.sort(function(e,t){return r.indexOf((e.sponsor_level||[])[0])-r.indexOf((t.sponsor_level||[])[0])});break;case"name_desc":c=t.sort(function(e,t){return e.title.rendered.trim()>t.title.rendered.trim()?-1:1});break;case"name_asc":default:c=t.sort(function(e,t){return e.title.rendered.trim()<t.title.rendered.trim()?-1:1})}this.setState({selectedPosts:c,sortBy:o})}}},{key:"render",value:function(){var e=this.props.attributes,t=this.state.selectedPosts;return Object(w.createElement)(ne,this.props,t.map(function(t){return Object(w.createElement)(ti,{sponsorPost:t,attributes:e})}))}}]),t}(Qa),ri=wp.htmlEntities.decodeEntities,oi=wp.i18n.__,ai=wp.components,ii=ai.Button,si=ai.Placeholder;function ui(e){return"post"===e.type?function(e){Object(C.get)(e.featuredImageData,"sizes.thumbnail.source_url",!1);return Object(w.createElement)("span",null,e.label)}(e):function(e
){return Object(w.createElement)("span",{className:"wordcamp-item-select-option-label"},e.label,Object(w.createElement)("span",{className:"wordcamp-item-select-option-label-term-count"},e.count))}(e)}var li=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this,e))).state={posts:[],terms:[],loading:!0,selectedPosts:[],sponsorTermOrder:[]},n}return y()(t,e),f()(t,[{key:"setSelectedPosts",value:function(){var e=this.state,t=e.fetchedPosts,n=(e.sponsorTermOrder,this.props.attributes),r=n.post_ids,o=n.term_ids,a=n.mode;if(t&&t.length){var i=[],s=!0,u=!1,l=void 0;try{for(var c,p=t[Symbol.iterator]();!(s=(c=p.next()).done);s=!0){var d=c.value;if(d.hasOwnProperty("id"))switch(a){case"all":i.push(d);break;case"specific_posts":-1!==r.indexOf(d.id)&&i.push(d);break;case"specific_terms":Object(C.intersection)(o,d.sponsor_level||[]).length&&i.push(d)}}}catch
(e){u=!0,l=e}finally{try{s||null==p.return||p.return()}finally{if(u)throw l}}this.setState({selectedPosts:i})}}},{key:"componentWillMount",value:function(){var e=this;this.isStillMounted=!0;var t=this.props,n=t.sponsorPosts,r=t.sponsorLevels,o=t.siteSettings,a=n.then(function(t){var n=t.map(function(e){return{label:ri(e.title.rendered.trim())||oi("(Untitled)","wordcamporg"),value:e.id,type:"post",featuredImageData:Object(C.get)(e,"_embedded.wp:featuredmedia[0].media_details","")}});e.isStillMounted&&(e.setState({fetchedPosts:t}),e.setState({posts:n}))}).catch(function(e){console.error("Error fetching data",e)}),i=r.then(function(t){var n=t.map(function(e){return{label:ri(e.name)||oi("(Untitled)","wordcamporg"),value:e.id,type:"term",count:e.count}});e.isStillMounted&&(e.setState({fetchedTerms:t}),e.setState({terms:n}))}).catch(function(e){console.error("Error fetc
hing data",e)}),s=o.then(function(t){var n=t.wcb_sponsor_level_order;e.setState({sponsorTermOrder:n})});Promise.all([a,i,s]).then(function(){e.setState({loading:!1}),setTimeout(function(){return e.setSelectedPosts()})})}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"onChange",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.props.setAttributes,r=t.item_ids,o=t.mode;if(r&&o)switch(o){case"post":n({mode:"specific_posts",post_ids:r});break;case"term":n({mode:"specific_terms",term_ids:r})}else n({mode:"",post_ids:[],term_ids:[]});setTimeout(function(){return e.setSelectedPosts()})}},{key:"buildSelectOptions",value:function(){var e=this.state,t=e.posts,n=e.terms,r=[];return r.push({label:oi("Sponsor Levels","wordcamporg"),options:n}),r.push({label:oi("Sponsors","wordcamporg&q
uot;),options:t}),r}},{key:"render",value:function(){var e=this,t=this.props,n=t.icon,r=t.attributes,o=t.setAttributes,a=t.sponsorPosts,i=r.mode,s=r.post_ids,u=r.term_ids,l=this.state,p=l.fetchedPosts,d=l.posts,m=l.terms,f=l.selectedPosts,h=l.sponsorTermOrder,g=Array.isArray(p)&&p.length;if(i&&!g)return Object(w.createElement)(R,{label:vi,loading:function(){return!Array.isArray(a)}});var b=[];switch(i){case"all":break;case"specific_posts":b=d.filter(function(e){return Object(C.includes)(s,e.value)});break;case"specific_terms":b=m.filter(function(e){return Object(C.includes)(u,e.value)})}return Object(w.createElement)("div",null,Object(w.createElement)(ni,c()({selectedPosts:f,sponsorTermOrder:h},this.props)),"all"!==i&&Object(w.createElement)(si,{icon:n,label:oi("Sponsors","wordcamporg")},Object(w.createElement)("div",{className:""},Object(w.createElement)(ii,{i
sDefault:!0,isLarge:!0,onClick:function(){o({mode:"all"}),setTimeout(function(){return e.setSelectedPosts()})}},oi("List all sponsors","wordcamporg"))),Object(w.createElement)("div",{className:"wordcamp-block-edit-mode-option"},Object(w.createElement)(cn,c()({buildSelectOptions:function(){return e.buildSelectOptions()},isLoading:this.state.loading,onChange:function(t){return e.onChange(t)},selectProps:{formatOptionLabel:function(e){return Object(w.createElement)(ui,e)}},label:oi("Or, choose specific sponsors or levels","wordcamporg"),value:b},this.props)))))}}]),t}(T),ci=(wp.data.withSelect,wp.element),pi=ci.Component,di=ci.Fragment,mi=wp.apiFetch,fi=wp.url.addQueryArgs,hi=function(e){function t(e){var n;return d()(this,t),(n=g()(this,v()(t).call(this))).state={},n}return y()(t,e),f()(t,[{key:"componentWillMount",value:function(){var e={orderby:"title",order:"asc",per_page:100,_embed:
!0},t={orderby:"id",order:"asc",per_page:100,_embed:!0};this.setState({sponsorPosts:mi({path:fi("/wp/v2/sponsors",e)}),sponsorLevels:mi({path:fi("/wp/v2/sponsor_level",t)}),siteSettings:mi({path:fi("/wp/v2/settings",{})})})}},{key:"render",value:function(){var e=this.state,t=e.sponsorPosts,n=e.sponsorLevels,r=e.siteSettings,o=this.props.attributes.mode;return Object(w.createElement)(di,null,Object(w.createElement)(li,c()({icon:Ei,sponsorPosts:t,sponsorLevels:n,siteSettings:r},this.props)),Object(w.createElement)(di,null,Object(w.createElement)(Za,c()({sponsorPosts:t,sponsorLevels:n},this.props)),o&&Object(w.createElement)(_o,this.props)))}}]),t}(pi),gi=wp.i18n.__,bi="wordcamp/sponsors",vi=gi("Sponsors","wordcamporg"),Ei="heart",yi={title:gi("Sponsors","wordcamporg"),description:gi("We wouldn't have WordCamp without their support.","wordcampor
g"),icon:Ei,category:"wordcamp",edit:hi,save:function(){return null}},wi=wp.blocks.registerBlockType;[r,o,a,i].forEach(function(e){var t=e.name,n=e.settings;wi(t,n)})}]);
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentmupluginsblocksassetssrcspeakersblockcontentjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/block-content.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/block-content.js 2019-04-03 23:00:09 UTC (rev 8584)
+++ sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/blocks/assets/src/speakers/block-content.js 2019-04-03 23:08:10 UTC (rev 8585)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -52,20 +52,24 @@
</span><span class="cx" style="display: block; padding: 0 10px"> arrayTokenReplace(
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: A date; 2: A time; 3: A location; */
</span><span class="cx" style="display: block; padding: 0 10px"> tokenSplit( __( '%1$s at %2$s in %3$s', 'wordcamporg' ) ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- decodeEntities( session.session_date_time.date ),
- decodeEntities( session.session_date_time.time ),
- get( tracks.find( ( value ) => {
- const [ firstTrackId ] = session.session_track;
- return parseInt( value.id ) === firstTrackId;
- } ), 'name' )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ [
+ decodeEntities( session.session_date_time.date ),
+ decodeEntities( session.session_date_time.time ),
+ get( tracks.find( ( value ) => {
+ const [ firstTrackId ] = session.session_track;
+ return parseInt( value.id ) === firstTrackId;
+ } ), 'name' ),
+ ]
</ins><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- { ! session.session_track.length &&
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ { ( ! session.session_track.length || ! Array.isArray( tracks ) ) &&
</ins><span class="cx" style="display: block; padding: 0 10px"> arrayTokenReplace(
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: A date; 2: A time; */
</span><span class="cx" style="display: block; padding: 0 10px"> tokenSplit( __( '%1$s at %2$s', 'wordcamporg' ), ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- decodeEntities( session.session_date_time.date ),
- decodeEntities( session.session_date_time.time )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ [
+ decodeEntities( session.session_date_time.date ),
+ decodeEntities( session.session_date_time.time ),
+ ]
</ins><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> </span>
</span></span></pre>
</div>
</div>
</body>
</html>