FileMaster
Search
Toggle Dark Mode
Home
/
.
/
wp-content
/
plugins
/
ameliabooking
/
extensions
/
divi_amelia
/
scripts
Edit File: builder-bundle.min.js
!function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/",o(o.s=15)}([function(e,t){e.exports=React},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,o){"use strict";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)}Object.defineProperty(t,"__esModule",{value:!0});var r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},a=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),c=o(0),s=(r=c)&&r.__esModule?r:{default:r};function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!==typeof t?e:t}function p(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(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)}var f=function(e){function t(){return l(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,c.Component),a(t,[{key:"render",value:function(){var e=this.props,t=e.checked,o=e.option,n=e.onClick,r=e.disabled,a=i({},h.label,r?h.labelDisabled:void 0);return s.default.createElement("span",{className:"item-renderer"},s.default.createElement("input",{type:"checkbox",onChange:n,checked:t,tabIndex:"-1",disabled:r}),s.default.createElement("span",{style:a},o.label))}}]),t}(),d=function(e){function t(){var e,o,n;l(this,t);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return o=n=u(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),n.state={hovered:!1},n.onChecked=function(e){(0,n.props.onSelectionChanged)(e.target.checked)},n.toggleChecked=function(){var e=n.props,t=e.checked;(0,e.onSelectionChanged)(!t)},n.handleClick=function(e){var t=n.props.onClick;n.toggleChecked(),t(e)},n.handleKeyDown=function(e){switch(e.which){case 13:case 32:n.toggleChecked();break;default:return}e.preventDefault()},u(n,o)}return p(t,c.Component),a(t,[{key:"componentDidMount",value:function(){this.updateFocus()}},{key:"componentDidUpdate",value:function(){this.updateFocus()}},{key:"updateFocus",value:function(){this.props.focused&&this.itemRef&&this.itemRef.focus()}},{key:"render",value:function(){var e=this,t=this.props,o=t.ItemRenderer,n=t.option,r=t.checked,a=t.focused,c=t.disabled,l=this.state.hovered,u=a||l?h.itemContainerHover:void 0;return s.default.createElement("label",{className:"select-item",role:"option","aria-selected":r,selected:r,tabIndex:"-1",style:i({},h.itemContainer,u),ref:function(t){return e.itemRef=t},onKeyDown:this.handleKeyDown,onMouseOver:function(){return e.setState({hovered:!0})},onMouseOut:function(){return e.setState({hovered:!1})}},s.default.createElement(o,{option:n,checked:r,onClick:this.handleClick,disabled:c}))}}]),t}();d.defaultProps={ItemRenderer:f};var h={itemContainer:{boxSizing:"border-box",backgroundColor:"#fff",color:"#666666",cursor:"pointer",display:"block",padding:"8px 10px"},itemContainerHover:{backgroundColor:"#ebf5ff",outline:0},label:{display:"inline-block",verticalAlign:"middle",borderBottomRightRadius:"2px",borderTopRightRadius:"2px",cursor:"default",padding:"2px 5px"},labelDisabled:{opacity:.5}};t.default=d},function(e,t){},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={selectSomeItems:"Select some items...",allItemsAreSelected:"All items are selected",selectAll:"Select All",search:"Search"};t.default=function(e,t){return t&&t[e]?t[e]:n[e]}},function(e,t,o){o(16),e.exports=o(17)},function(e,t,o){"use strict"},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(18),r=o.n(n),i=o(19),a=o(30);r()(window).on("et_builder_api_ready",function(e,t){t.registerModules(i.a),t.registerModalFields(a.a)})},function(e,t){e.exports=jQuery},function(e,t,o){"use strict";var n=o(20),r=o(21),i=o(22),a=o(23),c=o(24),s=o(25),l=o(26),u=o(27),p=o(28),f=o(29);t.a=[n.a,r.a,i.a,a.a,c.a,s.a,l.a,p.a,f.a,u.a]},function(e,t,o){"use strict";var n=o(0),r=o.n(n),i=o(1);o.n(i);function a(e){return(a="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 c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var l=function(e){function t(e){var o,n,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,o=!(r=(t.__proto__||Object.getPrototypeOf(t)).call(this,e))||"object"!==a(r)&&"function"!==typeof r?s(n):r,Object.defineProperty(s(o),"mounted",{configurable:!0,enumerable:!0,writable:!0,value:!1}),Object.defineProperty(s(o),"shortcode",{configurable:!0,enumerable:!0,writable:!0,value:"[ameliastepbooking]"}),o.state={shortcode:o.shortcode},o}var o,i,l;return function(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,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n["Component"]),o=t,(i=[{key:"checkValues",value:function(e){if(void 0!==e){if(e=e.split(","),Array.isArray(e)){var t=[];return e.forEach(function(e){e&&t.push(isNaN(e)&&e.includes("id:")?e.split("id: ")[1].slice(0,-1):e)}),t.length>0?t:[]}return[]}return[]}},{key:"createShortCode",value:function(){var e="[ameliastepbooking",t=this.props.trigger,o=this.props.trigger_type,n=this.props.in_dialog,r=this.props.type,i=this.props.layout||"1";if(void 0!==r&&"0"!==r&&(e+=" show="+r),void 0!==t&&""!==t&&(e+=" trigger="+this.props.trigger),t&&o&&(e+=" trigger_type="+o),t&&"on"===n&&(e+=" in_dialog=1"),e+=" layout="+i,"on"===this.props.booking_params){var a=this.checkValues(this.props.categories),c=this.checkValues(this.props.services),s=this.checkValues(this.props.employees),l=this.checkValues(this.props.locations),u=this.checkValues(this.props.packages);c&&c.length>0?e+=" service="+c.join():a&&a.length>0&&(e+=" category="+a.join()),s&&s.length>0&&(e+=" employee="+s.join()),l&&l.length>0&&(e+=" location="+l.join()),u&&u.length>0&&(e+=" package="+u.join())}return e+="]"}},{key:"componentDidMount",value:function(){this.mounted=!0,this.mounted&&(this.shortcode=this.createShortCode(),this.setState({shortcode:this.shortcode}))}},{key:"componentDidUpdate",value:function(e,t,o){this.mounted&&(this.shortcode=this.createShortCode(),t.shortcode!==this.shortcode&&this.setState({shortcode:this.shortcode}))}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){return r.a.createElement("h1",null,this.shortcode)}}])&&c(o.prototype,i),l&&c(o,l),t}();Object.defineProperty(l,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"divi_step_booking"}),t.a=l},function(e,t,o){"use strict";var n=o(0),r=o.n(n),i=o(2);o.n(i);function a(e){return(a="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 c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var l=function(e){function t(e){var o,n,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,o=!(r=(t.__proto__||Object.getPrototypeOf(t)).call(this,e))||"object"!==a(r)&&"function"!==typeof r?s(n):r,Object.defineProperty(s(o),"mounted",{configurable:!0,enumerable:!0,writable:!0,value:!1}),Object.defineProperty(s(o),"shortcode",{configurable:!0,enumerable:!0,writable:!0,value:"[ameliacatalogbooking]"}),o.state={shortcode:o.shortcode},o}var o,i,l;return function(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,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n["Component"]),o=t,(i=[{key:"checkValues",value:function(e){if(void 0!==e){if(e=e.split(","),Array.isArray(e)){var t=[];return e.forEach(function(e){e&&t.push(isNaN(e)&&e.includes("id:")?e.split("id: ")[1].slice(0,-1):e)}),t.length>0?t:[]}return[]}return[]}},{key:"createShortCode",value:function(){var e="[ameliacatalogbooking",t=this.props.trigger,o=this.props.trigger_type,n=this.props.in_dialog,r=this.props.type;void 0!==r&&"0"!==r&&(e+=" show="+r),void 0!==t&&""!==t&&(e+=" trigger="+this.props.trigger),t&&o&&(e+=" trigger_type="+o),t&&"on"===n&&(e+=" in_dialog=1");var i=this.props.catalog;if("0"!==i){var a=this.checkValues(this.props.categories),c=this.checkValues(this.props.services),s=this.checkValues(this.props.packages);c&&c.length>0&&"service"===i?e+=" service="+c.join():a&&a.length>0&&"category"===i&&(e+=" category="+a.join()),s&&s.length>0&&"package"===i&&(e+=" package="+s.join())}if("on"===this.props.booking_params){var l=this.checkValues(this.props.employees),u=this.checkValues(this.props.locations),p=this.props.skip_categories;l&&l.length>0&&(e+=" employee="+l.join()),u&&u.length>0&&(e+=" location="+u.join()),"on"===p&&(e+=" categories_hidden=1")}return e+="]"}},{key:"componentDidMount",value:function(){this.mounted=!0,this.mounted&&(this.shortcode=this.createShortCode(),this.setState({shortcode:this.shortcode}))}},{key:"componentDidUpdate",value:function(e,t,o){this.mounted&&(this.shortcode=this.createShortCode(),t.shortcode!==this.shortcode&&this.setState({shortcode:this.shortcode}))}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){return r.a.createElement("h1",null,this.shortcode)}}])&&c(o.prototype,i),l&&c(o,l),t}();Object.defineProperty(l,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"divi_catalog_booking"}),t.a=l},function(e,t,o){"use strict";var n=o(0),r=o.n(n),i=o(3);o.n(i);function a(e){return(a="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 c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var l=function(e){function t(e){var o,n,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,o=!(r=(t.__proto__||Object.getPrototypeOf(t)).call(this,e))||"object"!==a(r)&&"function"!==typeof r?s(n):r,Object.defineProperty(s(o),"mounted",{configurable:!0,enumerable:!0,writable:!0,value:!1}),Object.defineProperty(s(o),"shortcode",{configurable:!0,enumerable:!0,writable:!0,value:"[ameliabooking]"}),o.state={shortcode:o.shortcode},o}var o,i,l;return function(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,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n["Component"]),o=t,(i=[{key:"checkValues",value:function(e){return void 0!==e?isNaN(e)?e.includes("id:")?e.split("id: ")[1].slice(0,-1):"0":e:"0"}},{key:"createShortCode",value:function(){var e="[ameliabooking",t=this.props.trigger,o=this.props.type;if(void 0!==o&&"0"!==o&&(e+=" show="+o),void 0!==t&&""!==t&&(e+=" trigger="+this.props.trigger),"on"===this.props.booking_params){var n=this.checkValues(this.props.categories),r=this.checkValues(this.props.services),i=this.checkValues(this.props.employees),a=this.checkValues(this.props.locations);"0"!==r?e+=" service="+r:"0"!==n&&(e+=" category="+n),"0"!==i&&(e+=" employee="+i),"0"!==a&&(e+=" location="+a)}return e+="]"}},{key:"componentDidMount",value:function(){this.mounted=!0,this.mounted&&(this.shortcode=this.createShortCode(),this.setState({shortcode:this.shortcode}))}},{key:"componentDidUpdate",value:function(e,t,o){this.mounted&&(this.shortcode=this.createShortCode(),t.shortcode!==this.shortcode&&this.setState({shortcode:this.shortcode}))}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){return r.a.createElement("h1",null,this.shortcode)}}])&&c(o.prototype,i),l&&c(o,l),t}();Object.defineProperty(l,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"divi_booking"}),t.a=l},function(e,t,o){"use strict";var n=o(0),r=o.n(n),i=o(4);o.n(i);function a(e){return(a="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 c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var l=function(e){function t(e){var o,n,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,o=!(r=(t.__proto__||Object.getPrototypeOf(t)).call(this,e))||"object"!==a(r)&&"function"!==typeof r?s(n):r,Object.defineProperty(s(o),"mounted",{configurable:!0,enumerable:!0,writable:!0,value:!1}),Object.defineProperty(s(o),"shortcode",{configurable:!0,enumerable:!0,writable:!0,value:"[ameliasearch]"}),o.state={shortcode:o.shortcode},o}var o,i,l;return function(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,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n["Component"]),o=t,(i=[{key:"createShortCode",value:function(){var e="[ameliasearch",t=this.props.trigger;if(void 0!==t&&""!==t&&(e+=" trigger="+this.props.trigger),"on"===this.props.booking_params){var o=this.props.type;void 0!==o&&"0"!==o&&(e+=" show="+o),e+=" today=1"}return e+="]"}},{key:"componentDidMount",value:function(){this.mounted=!0,this.mounted&&(this.shortcode=this.createShortCode(),this.setState({shortcode:this.shortcode}))}},{key:"componentDidUpdate",value:function(e,t,o){this.mounted&&(this.shortcode=this.createShortCode(),t.shortcode!==this.shortcode&&this.setState({shortcode:this.shortcode}))}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){return r.a.createElement("h1",null,this.shortcode)}}])&&c(o.prototype,i),l&&c(o,l),t}();Object.defineProperty(l,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"divi_search"}),t.a=l},function(e,t,o){"use strict";var n=o(0),r=o.n(n),i=o(5);o.n(i);function a(e){return(a="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 c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var l=function(e){function t(e){var o,n,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,o=!(r=(t.__proto__||Object.getPrototypeOf(t)).call(this,e))||"object"!==a(r)&&"function"!==typeof r?s(n):r,Object.defineProperty(s(o),"mounted",{configurable:!0,enumerable:!0,writable:!0,value:!1}),Object.defineProperty(s(o),"shortcode",{configurable:!0,enumerable:!0,writable:!0,value:"[ameliacatalog]"}),o.state={shortcode:o.shortcode},o}var o,i,l;return function(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,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n["Component"]),o=t,(i=[{key:"checkValues",value:function(e){return void 0!==e?isNaN(e)?e.includes("id:")?e.split("id: ")[1].slice(0,-1):"0":e:"0"}},{key:"createShortCode",value:function(){var e="[ameliacatalog",t=this.props.trigger,o=this.props.type;void 0!==o&&"0"!==o&&(e+=" show="+o),void 0!==t&&""!==t&&(e+=" trigger="+this.props.trigger);var n=this.props.catalog;if("0"!==n){var r=this.checkValues(this.props.categories),i=this.checkValues(this.props.services),a=this.checkValues(this.props.packages);"0"!==i&&"service"===n?e+=" service="+i:"0"!==r&&"category"===n&&(e+=" category="+r),"0"!==a&&"package"===n&&(e+=" package="+a)}if("on"===this.props.booking_params){var c=this.checkValues(this.props.employees),s=this.checkValues(this.props.locations);"0"!==c&&(e+=" employee="+c),"0"!==s&&(e+=" location="+s)}return e+="]"}},{key:"componentDidMount",value:function(){this.mounted=!0,this.mounted&&(this.shortcode=this.createShortCode(),this.setState({shortcode:this.shortcode}))}},{key:"componentDidUpdate",value:function(e,t,o){this.mounted&&(this.shortcode=this.createShortCode(),t.shortcode!==this.shortcode&&this.setState({shortcode:this.shortcode}))}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){return r.a.createElement("h1",null,this.shortcode)}}])&&c(o.prototype,i),l&&c(o,l),t}();Object.defineProperty(l,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"divi_catalog"}),t.a=l},function(e,t,o){"use strict";var n=o(0),r=o.n(n),i=o(6);o.n(i);function a(e){return(a="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 c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var l=function(e){function t(e){var o,n,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,o=!(r=(t.__proto__||Object.getPrototypeOf(t)).call(this,e))||"object"!==a(r)&&"function"!==typeof r?s(n):r,Object.defineProperty(s(o),"mounted",{configurable:!0,enumerable:!0,writable:!0,value:!1}),Object.defineProperty(s(o),"shortcode",{configurable:!0,enumerable:!0,writable:!0,value:"[ameliaevents]"}),o.state={shortcode:o.shortcode},o}var o,i,l;return function(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,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n["Component"]),o=t,(i=[{key:"checkValues",value:function(e){if(void 0!==e){var t=/id: \d+\)/.exec(e);return isNaN(e)?t&&t.length?t[0].substring(4,t[0].length-1):"0":e}return"0"}},{key:"createShortCode",value:function(){var e="[ameliaevents",t=this.props.trigger,o=this.props.type;if(void 0!==o&&null!==o&&"0"!==o&&(e+=" type="+o),void 0!==t&&""!==t&&(e+=" trigger="+this.props.trigger),"on"===this.props.booking_params){var n=this.checkValues(this.props.events);void 0!==n&&"0"!==n&&(e+=" event="+n);var r=this.props.tags;void 0!==r&&"0"!==r&&(e+=" tag='"+r+"'"),"on"===this.props.recurring&&(e+=" recurring=1")}return e+="]"}},{key:"componentDidMount",value:function(){this.mounted=!0,this.mounted&&(this.shortcode=this.createShortCode(),this.setState({shortcode:this.shortcode}))}},{key:"componentDidUpdate",value:function(e,t,o){this.mounted&&(this.shortcode=this.createShortCode(),t.shortcode!==this.shortcode&&this.setState({shortcode:this.shortcode}))}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){return r.a.createElement("h1",null,this.shortcode)}}])&&c(o.prototype,i),l&&c(o,l),t}();Object.defineProperty(l,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"divi_events"}),t.a=l},function(e,t,o){"use strict";var n=o(0),r=o.n(n),i=o(7);o.n(i);function a(e){return(a="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 c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var l=function(e){function t(e){var o,n,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,o=!(r=(t.__proto__||Object.getPrototypeOf(t)).call(this,e))||"object"!==a(r)&&"function"!==typeof r?s(n):r,Object.defineProperty(s(o),"mounted",{configurable:!0,enumerable:!0,writable:!0,value:!1}),Object.defineProperty(s(o),"shortcode",{configurable:!0,enumerable:!0,writable:!0,value:"[ameliaeventslistbooking]"}),o.state={shortcode:o.shortcode},o}var o,i,l;return function(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,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n["Component"]),o=t,(i=[{key:"checkValues",value:function(e){if(void 0!==e){if(e=e.split(","),Array.isArray(e)){var t=[];return e.forEach(function(e){e&&t.push(isNaN(e)&&e.includes("id:")?e.split("id: ")[1].slice(0,-1):e)}),t.length>0?t:[]}return[]}return[]}},{key:"createShortCode",value:function(){var e="[ameliaeventslistbooking",t=this.props.trigger,o=this.props.trigger_type,n=this.props.in_dialog;if(void 0!==t&&""!==t&&(e+=" trigger="+this.props.trigger),t&&o&&(e+=" trigger_type="+o),t&&"on"===n&&(e+=" in_dialog=1"),"on"===this.props.booking_params){var r=this.checkValues(this.props.events);r&&r.length>0&&(e+=" event="+r.join());var i=this.props.tags;i&&""!==i&&(e+=' tag="'+i+'"'),"on"===this.props.recurring&&(e+=" recurring=1");var a=this.checkValues(this.props.locations);a&&a.length>0&&(e+=" location="+a.join())}return e+="]"}},{key:"componentDidMount",value:function(){this.mounted=!0,this.mounted&&(this.shortcode=this.createShortCode(),this.setState({shortcode:this.shortcode}))}},{key:"componentDidUpdate",value:function(e,t,o){this.mounted&&(this.shortcode=this.createShortCode(),t.shortcode!==this.shortcode&&this.setState({shortcode:this.shortcode}))}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){return r.a.createElement("h1",null,this.shortcode)}}])&&c(o.prototype,i),l&&c(o,l),t}();Object.defineProperty(l,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"divi_events_list_booking"}),t.a=l},function(e,t,o){"use strict";var n=o(0),r=o.n(n),i=o(8);o.n(i);function a(e){return(a="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 c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var l=function(e){function t(e){var o,n,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,o=!(r=(t.__proto__||Object.getPrototypeOf(t)).call(this,e))||"object"!==a(r)&&"function"!==typeof r?s(n):r,Object.defineProperty(s(o),"mounted",{configurable:!0,enumerable:!0,writable:!0,value:!1}),Object.defineProperty(s(o),"shortcode",{configurable:!0,enumerable:!0,writable:!0,value:"[ameliaeventscalendarbooking]"}),o.state={shortcode:o.shortcode},o}var o,i,l;return function(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,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n["Component"]),o=t,(i=[{key:"checkValues",value:function(e){if(void 0!==e){if(e=e.split(","),Array.isArray(e)){var t=[];return e.forEach(function(e){e&&t.push(isNaN(e)&&e.includes("id:")?e.split("id: ")[1].slice(0,-1):e)}),t.length>0?t:[]}return[]}return[]}},{key:"createShortCode",value:function(){var e="[ameliaeventscalendarbooking",t=this.props.trigger,o=this.props.trigger_type,n=this.props.in_dialog;if(void 0!==t&&""!==t&&(e+=" trigger="+this.props.trigger),t&&o&&(e+=" trigger_type="+o),t&&"on"===n&&(e+=" in_dialog=1"),"on"===this.props.booking_params){var r=this.checkValues(this.props.events);r&&r.length>0&&(e+=" event="+r.join());var i=this.props.tags;i&&""!==i&&(e+=' tag="'+i+'"'),"on"===this.props.recurring&&(e+=" recurring=1");var a=this.checkValues(this.props.locations);a&&a.length>0&&(e+=" location="+a.join())}return e+="]"}},{key:"componentDidMount",value:function(){this.mounted=!0,this.mounted&&(this.shortcode=this.createShortCode(),this.setState({shortcode:this.shortcode}))}},{key:"componentDidUpdate",value:function(e,t,o){this.mounted&&(this.shortcode=this.createShortCode(),t.shortcode!==this.shortcode&&this.setState({shortcode:this.shortcode}))}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){return r.a.createElement("h1",null,this.shortcode)}}])&&c(o.prototype,i),l&&c(o,l),t}();Object.defineProperty(l,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"divi_events_calendar_booking"}),t.a=l},function(e,t,o){"use strict";var n=o(0),r=o.n(n),i=o(9);o.n(i);function a(e){return(a="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 c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var l=function(e){function t(e){var o,n,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,o=!(r=(t.__proto__||Object.getPrototypeOf(t)).call(this,e))||"object"!==a(r)&&"function"!==typeof r?s(n):r,Object.defineProperty(s(o),"mounted",{configurable:!0,enumerable:!0,writable:!0,value:!1}),Object.defineProperty(s(o),"shortcode",{configurable:!0,enumerable:!0,writable:!0,value:"[ameliacustomerpanel]"}),o.state={shortcode:o.shortcode},o}var o,i,l;return function(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,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n["Component"]),o=t,(i=[{key:"createShortCode",value:function(){var e="[ameliacustomerpanel",t=this.props.version,o=this.props.trigger,n=this.props.appointments,r=this.props.events;return void 0!==o&&""!==o&&(e+=" trigger="+this.props.trigger),t&&(e+=" version="+t),"on"===n&&(e+=" appointments=1"),"on"===r&&(e+=" events=1"),e+="]"}},{key:"componentDidMount",value:function(){this.mounted=!0,this.mounted&&(this.shortcode=this.createShortCode(),this.setState({shortcode:this.shortcode}))}},{key:"componentDidUpdate",value:function(e,t,o){this.mounted&&(this.shortcode=this.createShortCode(),t.shortcode!==this.shortcode&&this.setState({shortcode:this.shortcode}))}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){return r.a.createElement("h1",null,this.shortcode)}}])&&c(o.prototype,i),l&&c(o,l),t}();Object.defineProperty(l,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"divi_customer"}),t.a=l},function(e,t,o){"use strict";var n=o(0),r=o.n(n),i=o(10);o.n(i);function a(e){return(a="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 c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var l=function(e){function t(e){var o,n,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,o=!(r=(t.__proto__||Object.getPrototypeOf(t)).call(this,e))||"object"!==a(r)&&"function"!==typeof r?s(n):r,Object.defineProperty(s(o),"mounted",{configurable:!0,enumerable:!0,writable:!0,value:!1}),Object.defineProperty(s(o),"shortcode",{configurable:!0,enumerable:!0,writable:!0,value:"[ameliaemployeepanel]"}),o.state={shortcode:o.shortcode},o}var o,i,l;return function(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,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n["Component"]),o=t,(i=[{key:"createShortCode",value:function(){var e="[ameliaemployeepanel",t=this.props.version,o=this.props.trigger,n=this.props.appointments,r=this.props.events,i=this.props.profile;return void 0!==o&&""!==o&&(e+=" trigger="+this.props.trigger),t&&(e+=" version="+t),"on"===n&&(e+=" appointments=1"),"on"===r&&(e+=" events=1"),"on"===i&&(e+=" profile-hidden=1"),e+="]"}},{key:"componentDidMount",value:function(){this.mounted=!0,this.mounted&&(this.shortcode=this.createShortCode(),this.setState({shortcode:this.shortcode}))}},{key:"componentDidUpdate",value:function(e,t,o){this.mounted&&(this.shortcode=this.createShortCode(),t.shortcode!==this.shortcode&&this.setState({shortcode:this.shortcode}))}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){return r.a.createElement("h1",null,this.shortcode)}}])&&c(o.prototype,i),l&&c(o,l),t}();Object.defineProperty(l,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"divi_employee"}),t.a=l},function(e,t,o){"use strict";var n=o(31),r=o(32);t.a=[n.a,r.a]},function(e,t,o){"use strict";var n=o(0),r=o.n(n),i=o(11);o.n(i);function a(e){return(a="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 c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var l=function(e){function t(e){var o,n,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,r=(t.__proto__||Object.getPrototypeOf(t)).call(this,e),o=!r||"object"!==a(r)&&"function"!==typeof r?s(n):r,Object.defineProperty(s(o),"mount",{configurable:!0,enumerable:!0,writable:!0,value:!1}),Object.defineProperty(s(o),"_onChange",{configurable:!0,enumerable:!0,writable:!0,value:function(e){o.props._onChange(o.props.name,e.target.value)}}),o.mount&&(o.state={}),o}var o,i,l;return function(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,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n["Component"]),o=t,(i=[{key:"componentDidMount",value:function(){var e=this;this.mount=!0,"categories"===this.props.name||"services"===this.props.name?fetch(window.wpAmeliaPluginAjaxURL+"/entities&types[]=categories").then(function(e){return e.json()}).then(function(t){var o=[];t.data.categories.forEach(function(e){o=o.concat(e.serviceList)}),e.mount&&e.setState({categories:t.data.categories,services:o})}):"employees"===this.props.name?fetch(window.wpAmeliaPluginAjaxURL+"/entities&types[]=employees").then(function(e){return e.json()}).then(function(t){e.mount&&e.setState({employees:t.data.employees})}):"locations"===this.props.name?fetch(window.wpAmeliaPluginAjaxURL+"/entities&types[]=locations").then(function(e){return e.json()}).then(function(t){e.mount&&e.setState({locations:t.data.locations})}):"type"===this.props.name&&this.mount&&this.setState({type:[{id:1,name:"Services"},{id:2,name:"Packages"}]})}},{key:"componentWillUnmount",value:function(){this.mount=!1}},{key:"render",value:function(){return r.a.createElement("div",null,this.state&&this.state[this.props.name]?r.a.createElement("select",{id:"myex-input-".concat(this.props.name),name:this.props.name,value:this.props.value,className:"et-fb-settings-option-select et-fb-settings-option-select-advanced et-fb-main-setting",onChange:this._onChange},r.a.createElement("option",{value:0,key:0,className:"select-option-item et-fb-selected-item"},window.wpAmeliaLabels["show_all"+("type"!==this.props.name?"_"+this.props.name:"")]),this.state[this.props.name].map(function(e){return r.a.createElement("option",{key:e.id,value:e.id,className:"select-option-item et-fb-selected-item"},e.name?e.name:e.firstName+" "+e.lastName)})):r.a.createElement("img",{src:window.wpAmeliaPath+"public/img/spinner.svg",alt:"no_img"}))}}])&&c(o.prototype,i),l&&c(o,l),t}();Object.defineProperty(l,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"divi_input"}),t.a=l},function(e,t,o){"use strict";var n=o(0),r=(o.n(n),o(33)),i=o.n(r),a=o(13);o.n(a);function c(e){return(c="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 s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=[],n=!0,r=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(n=(a=c.next()).done)&&(o.push(a.value),!t||o.length!==t);n=!0);}catch(e){r=!0,i=e}finally{try{n||null==c.return||c.return()}finally{if(r)throw i}}return o}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function l(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t){return!t||"object"!==c(t)&&"function"!==typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var f=function(e){function t(){var e,o,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return u(n,(o=n=u(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),Object.defineProperty(p(n),"options",{configurable:!0,enumerable:!0,writable:!0,value:Object.entries(n.props.fieldDefinition.options).map(function(e){var t=s(e,2),o=t[0];return{label:t[1],value:o}})}),Object.defineProperty(p(n),"selectedOptions",{configurable:!0,enumerable:!0,writable:!0,value:n.props.value.length>0?n.props.value.replace("{","").replace("}","").split(","):[]}),Object.defineProperty(p(n),"state",{configurable:!0,enumerable:!0,writable:!0,value:{selected:n.selectedOptions}}),Object.defineProperty(p(n),"_onChange",{configurable:!0,enumerable:!0,writable:!0,value:function(e){n.setState({selected:e});var t=e.filter(function(e){return e.length>0}),o=(n.props.fieldDefinition.brackets?t.map(function(e){return"{"+e+"}"}):t).join(",");n.props._onChange(n.props.name,o)}}),Object.defineProperty(p(n),"_handleClick",{configurable:!0,enumerable:!0,writable:!0,value:function(e){n.props._onChange(n.props.name,e),n.setState({selected:[e]})}}),o))}var o,r,a;return function(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,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n["Component"]),o=t,(r=[{key:"render",value:function(){var e=this;return this.props.fieldDefinition.singleOption?React.createElement(i.a,{options:this.options,selected:this.state.selected,onSelectedChanged:this._onChange,value:this.props.value,hasSelectAll:!1,ItemRenderer:function(t){return React.createElement("span",{onClick:function(){return e._handleClick(t.option.value)}},t.option.label)}}):React.createElement(i.a,{options:this.options,selected:this.state.selected,onSelectedChanged:this._onChange,value:this.props.value,hasSelectAll:!1,overrideStrings:{selectSomeItems:this.props.fieldDefinition.showAllText,allItemsAreSelected:"All Items are Selected",selectAll:this.props.selectAll,search:"Search"}})}}])&&l(o.prototype,r),a&&l(o,a),t}();Object.defineProperty(f,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"amelia_multi_select"}),t.a=f},function(e,t,o){"use strict";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)}Object.defineProperty(t,"__esModule",{value:!0}),t.SelectItem=t.SelectPanel=t.Dropdown=void 0;var r=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),i=o(0),a=p(i),c=p(o(34)),s=p(o(36)),l=p(o(14)),u=p(o(12));function p(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!==typeof t?e:t}var d=function(e){function t(){var e,o,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return o=n=f(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),n.handleSelectedChanged=function(e){var t=n.props,o=t.onSelectedChanged;t.disabled||o&&o(e)},f(n,o)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Component),r(t,[{key:"getSelectedText",value:function(){var e=this.props,t=e.options;return e.selected.map(function(e){return t.find(function(t){return t.value===e})}).map(function(e){return e?e.label:""}).join(", ")}},{key:"renderHeader",value:function(){var e=this.props,t=e.options,o=e.selected,n=e.valueRenderer,r=e.overrideStrings,i=0===o.length,c=o.length===t.length,s=n&&n(o,t);return i?a.default.createElement("span",{style:h.noneSelected},s||(0,l.default)("selectSomeItems",r)):s?a.default.createElement("span",null,s):a.default.createElement("span",null,c?(0,l.default)("allItemsAreSelected",r):this.getSelectedText())}},{key:"render",value:function(){var e=this.props,t=e.ItemRenderer,o=e.options,n=e.selected,r=e.selectAllLabel,i=e.isLoading,l=e.disabled,u=e.disableSearch,p=e.filterOptions,f=e.shouldToggleOnHover,d=e.hasSelectAll,h=e.overrideStrings,b=e.labelledBy;return a.default.createElement("div",{className:"multi-select"},a.default.createElement(c.default,{isLoading:i,contentComponent:s.default,shouldToggleOnHover:f,contentProps:{ItemRenderer:t,options:o,selected:n,hasSelectAll:d,selectAllLabel:r,onSelectedChanged:this.handleSelectedChanged,disabled:l,disableSearch:u,filterOptions:p,overrideStrings:h},disabled:l,labelledBy:b},this.renderHeader()))}}]),t}();d.defaultProps={hasSelectAll:!0,shouldToggleOnHover:!1};var h={noneSelected:{color:"#aaa"}};t.default=d,t.Dropdown=c.default,t.SelectPanel=s.default,t.SelectItem=u.default},function(e,t,o){"use strict";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)}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},i=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),a=o(0),c=l(a),s=l(o(35));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!==typeof t?e:t}var p=function(e){function t(){var e,o,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return o=n=u(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),n.state={expanded:!1,hasFocus:!1},n.handleDocumentClick=function(e){n.wrapper&&!n.wrapper.contains(e.target)&&n.setState({expanded:!1})},n.handleKeyDown=function(e){switch(e.which){case 27:case 38:n.toggleExpanded(!1);break;case 13:case 32:case 40:n.toggleExpanded(!0);break;default:return}e.preventDefault()},n.handleFocus=function(e){var t=n.state.hasFocus;e.target!==n.wrapper||t||n.setState({hasFocus:!0})},n.handleBlur=function(e){n.state.hasFocus&&n.setState({hasFocus:!1})},n.handleMouseEnter=function(e){n.handleHover(!0)},n.handleMouseLeave=function(e){n.handleHover(!1)},n.handleHover=function(e){n.props.shouldToggleOnHover&&n.toggleExpanded(e)},n.toggleExpanded=function(e){var t=n.props.isLoading,o=n.state.expanded;if(!t){var r=void 0===e?!o:!!e;n.setState({expanded:r}),!r&&n.wrapper&&n.wrapper.focus()}},u(n,o)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(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),i(t,[{key:"componentWillUpdate",value:function(){document.addEventListener("touchstart",this.handleDocumentClick),document.addEventListener("mousedown",this.handleDocumentClick)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("touchstart",this.handleDocumentClick),document.removeEventListener("mousedown",this.handleDocumentClick)}},{key:"renderPanel",value:function(){var e=this.props,t=e.contentComponent,o=e.contentProps;return c.default.createElement("div",{className:"dropdown-content",style:f.panelContainer},c.default.createElement(t,o))}},{key:"render",value:function(){var e=this,t=this.state,o=t.expanded,n=t.hasFocus,i=this.props,a=i.children,l=i.isLoading,u=i.disabled,p=i.labelledBy,d=o?f.dropdownHeaderExpanded:void 0,h=n?f.dropdownHeaderFocused:void 0,b=o?f.dropdownArrowUp:f.dropdownArrowDown,y=n?f.dropdownArrowDownFocused:void 0,m=r({},f.dropdownChildren,u?f.disabledDropdownChildren:{});return c.default.createElement("div",{className:"dropdown",tabIndex:"0",role:"combobox","aria-labelledby":p,"aria-expanded":o,"aria-readonly":"true","aria-disabled":u,style:f.dropdownContainer,ref:function(t){return e.wrapper=t},onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},c.default.createElement("div",{className:"dropdown-heading",style:r({},f.dropdownHeader,d,h),onClick:function(){return e.toggleExpanded()}},c.default.createElement("span",{className:"dropdown-heading-value",style:m},a),c.default.createElement("span",{className:"dropdown-heading-loading-container",style:f.loadingContainer},l&&c.default.createElement(s.default,null)),c.default.createElement("span",{className:"dropdown-heading-dropdown-arrow",style:f.dropdownArrow},c.default.createElement("span",{style:r({},b,y)}))),o&&this.renderPanel())}}]),t}(),f={dropdownArrow:{boxSizing:"border-box",cursor:"pointer",display:"table-cell",position:"relative",textAlign:"center",verticalAlign:"middle",width:25,paddingRight:5},dropdownArrowDown:{boxSizing:"border-box",borderColor:"#999 transparent transparent",borderStyle:"solid",borderWidth:"5px 5px 2.5px",display:"inline-block",height:0,width:0,position:"relative"},dropdownArrowDownFocused:{borderColor:"#78c008 transparent transparent"},dropdownArrowUp:{boxSizing:"border-box",top:"-2px",borderColor:"transparent transparent #999",borderStyle:"solid",borderWidth:"0px 5px 5px",display:"inline-block",height:0,width:0,position:"relative"},dropdownChildren:{boxSizing:"border-box",bottom:0,color:"#333",left:0,lineHeight:"34px",paddingLeft:10,paddingRight:10,position:"absolute",right:0,top:0,maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},disabledDropdownChildren:{opacity:.5},dropdownContainer:{position:"relative",boxSizing:"border-box",outline:"none"},dropdownHeader:{boxSizing:"border-box",backgroundColor:"#fff",borderColor:"#d9d9d9 #ccc #b3b3b3",borderRadius:4,borderBottomRightRadius:4,borderBottomLeftRadius:4,border:"1px solid #ccc",color:"#333",cursor:"default",display:"table",borderSpacing:0,borderCollapse:"separate",height:36,outline:"none",overflow:"hidden",position:"relative",width:"100%"},dropdownHeaderFocused:{borderColor:"#78c008",boxShadow:"none"},dropdownHeaderExpanded:{borderBottomRightRadius:"0px",borderBottomLeftRadius:"0px"},loadingContainer:{cursor:"pointer",display:"table-cell",verticalAlign:"middle",width:"16px"},panelContainer:{borderBottomRightRadius:"4px",borderBottomLeftRadius:"4px",backgroundColor:"#fff",border:"1px solid #ccc",borderTopColor:"#e6e6e6",boxShadow:"0 1px 0 rgba(0, 0, 0, 0.06)",boxSizing:"border-box",marginTop:"-1px",maxHeight:"300px",position:"absolute",top:"100%",width:"100%",zIndex:1,overflowY:"auto"}};t.default=p},function(e,t,o){"use strict";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)}Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),a=o(0),c=(r=a)&&r.__esModule?r:{default:r};var s="__react-multi-select_style_inject__";function l(){return Array.from(document.styleSheets).find(function(e){return e.title===s})}var u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(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),i(t,[{key:"componentWillMount",value:function(){!function(e){try{if(l())return;var t=document.createElement("style");t.setAttribute("title",s),document.head&&document.head.appendChild(t);var o=l();if(!o)return;o.insertRule(e,0)}catch(e){}}(p)}},{key:"render",value:function(){return c.default.createElement("span",{className:"loading-indicator",style:f.loading})}}]),t}();u.propTypes={};var p="\n@keyframes react-multi-select_loading-spin {\n to {\n transform: rotate(1turn);\n }\n}\n",f={loading:{animation:"react-multi-select_loading-spin 400ms infinite linear",width:"16px",height:"16px",boxSizing:"border-box",borderRadius:"50%",border:"2px solid #ccc",borderRightColor:"#333",display:"inline-block",position:"relative",verticalAlign:"middle"}};t.default=u},function(e,t,o){"use strict";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)}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},i=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),a=o(37),c=o(0),s=f(c),l=f(o(12)),u=f(o(38)),p=f(o(14));function f(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!==typeof t?e:t}var h=function(e){function t(){var e,o,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return o=n=d(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),n.state={searchHasFocus:!1,searchText:"",focusIndex:0},n.selectAll=function(){var e=n.props;(0,e.onSelectedChanged)(e.options.map(function(e){return e.value}))},n.selectNone=function(){(0,n.props.onSelectedChanged)([])},n.selectAllChanged=function(e){e?n.selectAll():n.selectNone()},n.handleSearchChange=function(e){n.setState({searchText:e.target.value,focusIndex:-1})},n.handleItemClicked=function(e){n.setState({focusIndex:e})},n.clearSearch=function(){n.setState({searchText:""})},n.handleKeyDown=function(e){switch(e.which){case 38:if(e.altKey)return;n.updateFocus(-1);break;case 40:if(e.altKey)return;n.updateFocus(1);break;default:return}e.stopPropagation(),e.preventDefault()},n.handleSearchFocus=function(e){n.setState({searchHasFocus:e,focusIndex:-1})},d(n,o)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(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,c.Component),i(t,[{key:"allAreSelected",value:function(){var e=this.props,t=e.options,o=e.selected;return t.length===o.length}},{key:"filteredOptions",value:function(){var e=this.state.searchText,t=this.props,o=t.options,n=t.filterOptions;return n?n(o,e):(0,a.filterOptions)(o,e)}},{key:"updateFocus",value:function(e){var t=this.state.focusIndex,o=this.props.options,n=t+e;n=Math.max(0,n),n=Math.min(n,o.length),this.setState({focusIndex:n})}},{key:"render",value:function(){var e=this,t=this.state,o=t.focusIndex,n=t.searchHasFocus,i=this.props,a=i.ItemRenderer,c=i.selectAllLabel,f=i.disabled,d=i.disableSearch,h=i.hasSelectAll,y=i.overrideStrings,m={label:c||(0,p.default)("selectAll",y),value:""},v=n?b.searchFocused:void 0;return s.default.createElement("div",{className:"select-panel",style:b.panel,role:"listbox",onKeyDown:this.handleKeyDown},!d&&s.default.createElement("div",{style:b.searchContainer},s.default.createElement("input",{placeholder:(0,p.default)("search",y),type:"text",onChange:this.handleSearchChange,style:r({},b.search,v),onFocus:function(){return e.handleSearchFocus(!0)},onBlur:function(){return e.handleSearchFocus(!1)}})),h&&s.default.createElement(l.default,{focused:0===o,checked:this.allAreSelected(),option:m,onSelectionChanged:this.selectAllChanged,onClick:function(){return e.handleItemClicked(0)},ItemRenderer:a,disabled:f}),s.default.createElement(u.default,r({},this.props,{options:this.filteredOptions(),focusIndex:o-1,onClick:function(t,o){return e.handleItemClicked(o+1)},ItemRenderer:a,disabled:f})))}}]),t}(),b={panel:{boxSizing:"border-box"},search:{display:"block",maxWidth:"100%",borderRadius:"3px",boxSizing:"border-box",height:"30px",lineHeight:"24px",border:"1px solid",borderColor:"#dee2e4",padding:"10px",width:"100%",outline:"none"},searchFocused:{borderColor:"#78c008"},searchContainer:{width:"100%",boxSizing:"border-box",padding:"0.5em"}};t.default=h},function(e,t,o){"use strict";function n(e,t){var o=e.length,n=t.length,r=[];if(!o||!n)return 0;if(o<n){var i=[t,e];e=i[0],t=i[1]}if(-1!==e.indexOf(t))return n+1/o;for(var a=0;a<=o;++a)r[a]=[0];for(var c=0;c<=n;++c)r[0][c]=0;for(var s=1;s<=o;++s)for(var l=1;l<=n;++l)r[s][l]=e[s-1]===t[l-1]?1+r[s-1][l-1]:Math.max(r[s][l-1],r[s-1][l]);return r[o][n]}function r(e,t){if(!e)return"";if(e=e.toUpperCase().replace(/((?=[^\u00E0-\u00FC])\W)|_/g,""),!t)return e;var o=t;return Object.keys(o).reduce(function(e,t){var n=new RegExp(t,"g");return e.replace(n,o[t])},e)}Object.defineProperty(t,"__esModule",{value:!0}),t.filterOptions=function(e,t,o){if(!t)return e;var i=r(t,o);return e.filter(function(e){var t=e.label,o=e.value;return null!=t&&null!=o}).map(function(e){return{option:e,score:n(r(e.label,o),i)}}).filter(function(e){return e.score>=i.length-2}).sort(function(e,t){return t.score-e.score}).map(function(e){return e.option})},t.typeaheadSimilarity=n,t.fullStringDistance=function(e,t){var o=e.length,n=t.length,r=[];if(!o)return n;if(!n)return o;for(var i=0;i<=o;++i)r[i]=[i];for(var a=0;a<=n;++a)r[0][a]=a;for(var c=1;c<=o;++c)for(var s=1;s<=n;++s)r[c][s]=e[c-1]===t[s-1]?r[c-1][s-1]:1+Math.min(r[c-1][s],r[c][s-1],r[c-1][s-1]);return r[o][n]},t.cleanUpText=r},function(e,t,o){"use strict";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)}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),i=o(0),a=s(i),c=s(o(12));function s(e){return e&&e.__esModule?e:{default:e}}function l(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return Array.from(e)}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!==typeof t?e:t}var p=function(e){function t(){var e,o,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return o=n=u(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),n.handleSelectionChanged=function(e,t){var o=n.props,r=o.selected,i=o.onSelectedChanged;o.disabled;if(t)i([].concat(l(r),[e.value]));else{var a=r.indexOf(e.value);i([].concat(l(r.slice(0,a)),l(r.slice(a+1))))}},u(n,o)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Component),r(t,[{key:"renderItems",value:function(){var e=this,t=this.props,o=t.ItemRenderer,n=t.options,r=t.selected,i=t.focusIndex,s=t.onClick,l=t.disabled;return n.map(function(t,n){return a.default.createElement("li",{style:f.listItem,key:t.hasOwnProperty("key")?t.key:n},a.default.createElement(c.default,{focused:i===n,option:t,onSelectionChanged:function(o){return e.handleSelectionChanged(t,o)},checked:r.includes(t.value),onClick:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){return s(e,n)}),ItemRenderer:o,disabled:t.disabled||l}))})}},{key:"render",value:function(){return a.default.createElement("ul",{className:"select-list",style:f.list},this.renderItems())}}]),t}(),f={list:{margin:0,paddingLeft:0},listItem:{listStyle:"none"}};t.default=p}]);
Save
Back