!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);function r(e){return(r="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 o(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 a(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var i=wp.i18n.__,l=wp.element.Component,p=wp.editor.InspectorControls,s=wp.components,m=s.PanelBody,f=s.ExternalLink,b=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=(e=a(this,c(t).apply(this,arguments))).props.attributes;n.download,n.viewer;return e}var n,r,s;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,writable:!0,configurable:!0}}),t&&u(e,t)}(t,l),n=t,(r=[{key:"render",value:function(){this.props.setAttributes;var e="post.php?post="+jQuery("#awsm-block-popup #atp-shortcode").val()+"&action=edit";return wp.element.createElement(p,null,wp.element.createElement(m,null,wp.element.createElement(f,{href:e},i("Team settings","awsm-team-pro"))))}}])&&o(n.prototype,r),s&&o(n,s),t}();function y(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){w(e,t,n[t])})}return e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=wp.i18n.__,v=wp.blocks.registerBlockType,g=wp.components,O=g.ServerSideRender,h=g.IconButton;v("gutenberg-awsm/awsm-team-dynamic",{title:d("AWSM Team","awsm-team-pro"),description:d("Select your team","awsm-team-pro"),icon:"admin-users",category:"common",keywords:[d("team","awsm-team-pro"),d("awsm team","awsm-team-pro"),d("member","awsm-team-pro")],edit:function(e){var t=e.attributes,n=e.setAttributes,r=t.shortcode,o=null;return jQuery("body").on("click","#awsm-block-popup #awsm-insert-team",function(){var e=jQuery("#awsm-block-popup #atp-shortcode").val();null!==o&&!0===o.activeAtpBlock&&(o.activeAtpBlock=!1,o.setAttributes({shortcode:e}))}),void 0!==r?(console.log(t),[wp.element.createElement(b,y({setAttributes:n},e)),wp.element.createElement(O,{block:"gutenberg-awsm/awsm-team-dynamic",attributes:t})]):wp.element.createElement("div",{className:"components-placeholder atp-block-wrapper"},wp.element.createElement(h,{className:"awsm-team-btn",icon:"media-document",onClick:function(){(o=e).activeAtpBlock=!0},isLarge:!0},d("Select Team","awsm-team-pro")))},save:function(e){return e.attributes.shortcode}})}]);