parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"DIzr":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;const{blockEditor:{InspectorControls:e},components:{Disabled:t,PanelBody:l,RangeControl:s,SelectControl:i,TextControl:a},element:{Fragment:o,createElement:n},i18n:{__:r},serverSideRender:p}=wp,{blockData:{currentPostId:d,activityTypes:u}}=bp,b=b=>{let{attributes:c,setAttributes:m}=b;const{postId:v,maxActivities:y,type:x,title:C}=c,g=d(),I=u();return!v&&g&&(m({postId:g}),c.postId||(c.postId=g)),n(o,null,n(e,null,n(l,{title:r("Settings","buddypress"),initialOpen:!0,className:"bp-latest-activities"},n(a,{label:r("Title","buddypress"),value:C,onChange:e=>{m({title:e})}}),n(s,{label:r("Maximum amount to display","buddypress"),value:y,onChange:e=>m({maxActivities:e}),min:1,max:10,required:!0}),n(i,{multiple:!0,label:r("Type","buddypress"),value:x,options:I,onChange:e=>{m({type:e})}}))),n(t,null,n(p,{block:"bp/latest-activities",attributes:c})))};var c=b;exports.default=c;
},{}],"yqpU":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;const{blocks:{createBlock:e}}=wp,t={from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:a}=e;return!(!a||!a.raw)&&"bp_latest_activities"===t},transform:t=>{let{instance:a}=t;const s=/i:\d*;s:\d*:"(.*?)";/gim;let r,i=[];for(;null!==(r=s.exec(a.raw.type));)r.index===s.lastIndex&&s.lastIndex++,r.forEach((e,t)=>{1===t&&i.push(e)});return e("bp/latest-activities",{title:a.raw.title,maxActivities:parseInt(a.raw.max,10),type:i})}}]};var a=t;exports.default=a;
},{}],"q3eE":[function(require,module,exports) {
"use strict";var t=i(require("./latest-activities/edit")),e=i(require("./latest-activities/transforms"));function i(t){return t&&t.__esModule?t:{default:t}}const{blocks:{registerBlockType:s},i18n:{__:r}}=wp;s("bp/latest-activities",{title:r("Latest Activities","buddypress"),description:r("Display the latest updates of the post author (when used into a page or post), of the displayed user (when viewing their profile) or of your community.","buddypress"),icon:{background:"#fff",foreground:"#d84800",src:"buddicons-activity"},category:"buddypress",attributes:{title:{type:"string",default:r("Latest updates","buddypress")},maxActivities:{type:"number",default:5},type:{type:"array",default:["activity_update"]},postId:{type:"number",default:0}},edit:t.default,transforms:e.default});
},{"./latest-activities/edit":"DIzr","./latest-activities/transforms":"yqpU"}]},{},["q3eE"], null)
//# sourceMappingURL=/bp-activity/js/blocks/latest-activities.js.map