PageSourceSearch

https://dashboard.rasa.io/app~4c376b39.a4b5fe1ca9039c3149ec.bundle.js

js rasa.io collected 2026-10-01 11:40:34 UTC 75,167 bytes, 2 lines download raw bytes

1(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{"69zo":function(e,t,n){"use strict";n.d(t,"a",function(){return V}),n.d(t,"b",function(){return q});var a=n("k8Y/"),r=n.n(a),i=n("Z9mO"),o=n("76Ic"),s=n("IX08"),c=n("spnV"),l=n("ndvF"),u=n("rhWG"),d=n("lNrV"),m=n("ZVVx"),f=n("jR8S"),p=n("J2iB"),h=n.n(p),b=n("q1tI"),y=n.n(b),g=n("RYw5"),v=n("8zFy"),I=n("Ytbg"),E=n("0QKP"),w=n("irKQ"),S=n("d+gs"),_=n("9R71"),O=n("wGho"),N=(n("KhYy"),n("8e4r")),P=n("75Dc"),C=n("4p60"),R=n("p1Kg"),T=n("XH6y"),j=n("o65D"),x=n("xNbQ"),A=n("4H+Y");function M(e){return(M="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 k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],a=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);a=!0);}catch(e){r=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(r)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function F(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")}()}function D(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function L(e){return(L=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function G(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Y(e,t){return(Y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function B(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var V=function(e){var t=e.text,n=e.status,a=e.click,r=e.className;return y.a.createElement("div",{className:n?"rectangle-flag-on ".concat(r):"rectangle-flag-off  ".concat(r)},y.a.createElement("div",{onClick:a,className:n?"text-flag-on":"text-flag-off"},function(e,t){return t?e:"Not ".concat(e)}(t,n)))},K=function(e){function t(e){var n,a,s;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a=this,s=L(t).call(this,e),n=!s||"object"!==M(s)&&"function"!=typeof s?G(a):s,B(G(n),"sharedStore",void 0),B(G(n),"integrationMenus",function(){return[{name:"Active",key:x.a.active},{name:"Available Integrations",key:x.a.availableIntegrations}]}),B(G(n),"renderIntegrationList",function(){return n.state.selectedSection===x.a.active?n.renderActiveIntegrationList():n.renderAvailableIntegrationList()}),B(G(n),"renderActiveIntegrationList",function(){return y.a.createElement("div",{className:"options-container"},y.a.createElement("div",{className:"integration-category-head"},y.a.createElement("h1",{className:"integration-category-title"},0===n.state.activeIntegrations.length?"No ":"","Active Integrations")),y.a.createElement("div",{className:"settings-integrations-system-list-wrapper"},n.state.activeIntegrations.length>0&&y.a.createElement("div",{className:"settings-integrations-system-list-sub-wrapper"},n.state.activeIntegrations.map(function(e,t){return n.renderIntegrationItem(e,t)}))))}),B(G(n),"renderAvailableIntegrationList",function(){return y.a.createElement("div",{className:"options-container"},n.state.availableIntegrations.length>0&&y.a.createElement(y.a.Fragment,null,y.a.createElement("div",{className:"integration-category-head"},y.a.createElement("h1",{className:"integration-category-title"},"Available with your plan")),y.a.createElement("div",{className:"settings-integrations-system-list-wrapper"},y.a.createElement("div",{className:"settings-integrations-system-list-sub-wrapper"},n.state.availableIntegrations.map(function(e,t){return n.renderIntegrationItem(e,t)})))),n.state.partnerIdentifier===I.j&&n.renderIntegrationSections())}),B(G(n),"renderIntegrationSections",function(){return Object.keys(g.a).map(function(e){var t=g.a[e],a=n.state["".concat(t.toLowerCase(),"Integrations")];return a.length>0&&y.a.createElement(y.a.Fragment,null,y.a.createElement("div",{className:"integration-category-head"},y.a.createElement("h1",{className:"integration-category-title"},t," integrations",t===g.a.ENTERPRISE?y.a.createElement("a",{className:"premium-badge",href:O.r},y.a.createElement(T.a,{svgwidth:"20",svgheight:"20"})," Contact Support"):y.a.createElement("span",{className:"premium-badge",onClick:n.sendToBilling},y.a.createElement(T.a,{svgwidth:"20",svgheight:"20"})," Upgrade to ",t)),y.a.createElement("p",null,"Unlock a world of exclusive features and enhanced functionalities with our ",t.toLowerCase()," integration.")),y.a.createElement("div",{className:"settings-integrations-system-list-wrapper"},y.a.createElement("div",{className:"settings-integrations-system-list-sub-wrapper"},a.map(function(e,t){return n.renderIntegrationItem(e,t)}))))})}),B(G(n),"renderIntegrationLimitContainer",function(){var e=n.state.partnerIdentifier!==I.j||n.allowedIntegrationCount()===I.L,t=n.state.activeIntegrationsCount,a=n.allowedIntegrationCount(),r=t>=a;return y.a.createElement(C.a,{entity:"integrations",isSuperUser:n.state.isSuperUser,isUnlimited:e,isLimitReached:r,currentCount:t,maxLimit:a,source:f.UpgradeSource.Integrations,progressText:"Integrations Used",progressDescription:"You've reached your integrations limit, please upgrade your plan to add more.",showContactToRasa:n.state.isNo
1MoreUpgradeAvailable||w.w(n.state.usageStats)})}),B(G(n),"statusBadge",function(e){var t=!!e.is_active&&!n.isSiblingConnected(e),a=t?"Connected":"Not Connected";return y.a.createElement("span",{className:"status-badge".concat(t?" flag-on":"")},n.hasIntegrationAccess(e)?a:y.a.createElement("a",{href:"".concat(O.r," - ").concat(e.name)},y.a.createElement(T.a,{svgwidth:"15",svgheight:"15"}),"Contact Support"))}),B(G(n),"renderIntegrationItem",function(e,t){var a=N.i(e.name),r=a.status===N.a.available&&e.available,i=e.status===O.m.Disconnected&&!n.isSiblingDisconnected(e),o=a.twoWayStatus===N.a.available||a.twoWayStatus===N.a.notYet?"The ".concat(e.display_name," integration is a ").concat(a.twoWayStatus===N.a.available?"two-way":"one-way"," sync"):"";return y.a.createElement("article",{key:t,className:"integration-single-item ".concat(n.integrationConfigDisabledClassName(e,!r)),onClick:function(){n.editIntegrationConfig(e,a,!r)}},y.a.createElement("div",{className:"integration-item-wrap"},y.a.createElement("div",{className:"integration-logo-wrap"},a.selectIcon),y.a.createElement("div",{className:"integration-detail-wrap"},y.a.createElement("div",{className:"integration-title-wrap"},y.a.createElement("div",{className:"integration-title"},e.display_name,e.systemMetadata.is_full_integration?" - Rich":""),r&&n.statusBadge(e)),r?y.a.createElement(y.a.Fragment,null,y.a.createElement("div",{className:"integration-description"},y.a.createElement("p",null,o)),i&&y.a.createElement("div",{className:"integration-btn-wrap"},y.a.createElement("button",{className:"integration-button",onClick:function(){n.editIntegrationConfig(e,a,!r)}},"Reconnect"),y.a.createElement("button",{className:"integration-button",onClick:Object(_.e)(function(){return n.handleForget(e.community_system_id,e.community_identifier)})},"Forget"))):y.a.createElement(c.a,null))))}),B(G(n),"handleForget",function(e,t){n.context.entityMetadata.getEntityObject("community_system").then(function(a){return a.setRecordId(t,e),a.data.id=e,a.data.status=null,a.data.status_changed_date=Object(E.f)(new Date),a.save().then(function(){var a=n.state.activeIntegrations.find(function(n){return n.community_system_id===e&&n.community_identifier===t});a.status=null;var r=n.state.activeIntegrations.filter(function(e){return e!==a}),s=F(n.state.availableIntegrations);s.push(a),n.setState({activeIntegrations:r,availableIntegrations:s}),n.context.store.dispatch(i.a(o.a.COMMUNITY_SYSTEM_DISCONNECTED))})})}),B(G(n),"hasIntegrationAccess",function(e){if(P.c(e.name)||Object(m.p)(e.connected)&&(!n.isRichIntegration(e)||JSON.parse(e.system_api_attribute||"{}").is_full_integration))return!0;if(!P.b(e.name)&&n.state.activeIntegrationsCount>=n.allowedIntegrationCount()||w.w(n.state.usageStats)||n.isRichIntegration(e)&&!n.hasRichIntegrationAccess())return!1;switch(e.name){case g.b.Instagram:return n.state.availableFeatures.length>0&&n.state.availableFeatures.indexOf(w.c.INSTAGRAM_INTEGRATION)>-1;case g.b.YourMembership:return n.state.availableFeatures.length>0&&n.state.availableFeatures.indexOf(w.c.YOUR_MEMBERSHIP_INTEGRATION)>-1;case g.b.Nimble:return n.state.availableFeatures.length>0&&n.state.availableFeatures.indexOf(w.c.NIMBLE_INTEGRATION)>-1;case g.b.Fonteva:return n.state.availableFeatures.length>0&&n.state.availableFeatures.indexOf(w.c.FONTEVA_INTEGRATION)>-1;case g.b.Imis:return n.state.availableFeatures.length>0&&n.state.availableFeatures.indexOf(w.c.IMIS_INTEGRATION)>-1;case g.b.HigherLogicMagnetMail:return n.state.availableFeatures.length>0&&n.state.availableFeatures.indexOf(w.c.MAGNET_MAIL_INTEGRATION)>-1;case g.b.Impexium:return n.state.availableFeatures.length>0&&n.state.availableFeatures.indexOf(w.c.IMPEXIUM_INTEGRATION)>-1;case g.b.Informz:return n.state.availableFeatures.length>0&&n.state.availableFeatures.indexOf(w.c.INFORMZ_INTEGRATION)>-1;case g.b.PersonifyMCPro:return n.state.availableFeatures.length>0&&n.state.availableFeatures.indexOf(w.c.PERSONIFY_MC_PRO)>-1;case g.b.Zoom:return n.state.availableFeatures.length>0&&n.state.availableFeatures.indexOf(w.c.ZOOM_INTEGRATION)>-1;case g.b.API:return n.state.availableFeatures.length>0&&n.state.availableFeatures.indexOf(w.c.API_INTEGRATION_KEY)>-1;case g.b.GrowthZone:return n.state.availableFeatures.length>0&&n.state.availableFeatures.indexOf(w.c.GROWTHZONE_INTEGRATION)>-1;case g.b.NoviAMS:return n.state.availableFeatures.length>0&&n.state.availableFeatures.indexOf(w.c.NOVIAMS_INTEGRATION)>-1;default:return!0}}),B(G(n),"allowedIntegrationCount",function(){return n.state.plan?w.q(n.state.plan):0}),B(G(n),"integrationConfigDisabledClassName",function(e,t){return n.hasIntegrationAccess(e)&&n.isSiblingConnected(e)&&!n.isRichIntegration(e)?"optionDisbaledItem":P.c(e.name)?"integration-single-item-clickable":t&&1===e.connected?"":t?"":"integration-single-item-clickable"}),B(G(n),"integrationConfigUrl",function(e){var t=e.community_system_id?"".concat(O.w,"?id=").concat(e.community_system_id):"".concat(O.w,"?systemName=").concat(e.name,"&displayName=").concat(e.display_name);return e.systemMetadata.is_full_integration&&(t+="&isRichIntegration=".concat(e.systemMetadata.is_full_integration)),t}),B(G(n),"sendToBilling",function(){n.props.push(A.a.billing+"?upgrade_from="+f.UpgradeSource.Integrations)}),B(G(n),"editIntegrationConfig",function(e,t,a){var r=e.systemMetadata.ui_section||g.a.ENTERPRISE;return n.upgradeFormRequireClickable(e,a)&&(n.hasIntegrationAccess(e)||r===g.a.ENTERPRISE?t.status===N.a.available&&e.available&&n.hasIntegrationAccess(e)&&n.props.push(n.integrationConfigUrl(e)):n.sendToBilling()),!1}),B(G(n),"loadCommunityIntegrations",function(){Object(g.d)(n.state.activeCommunity,n.state.person).then(function(e){var t=e.filter(function(e){var t=N.i(e.name);return!h()(t.status)&&t.status!==N.a.notYet});
1t=r()(t,["name"],"asc"),n.props.datasetLoaded(t),n.setState({data:t},function(){var e=[],a=[],r=B({},g.a.ENTERPRISE,[]);t.map(function(t){var i=t.systemMetadata.ui_section||g.a.ENTERPRISE;!Object(m.p)(t.connected)||!Object(m.p)(t.is_active)&&t.status!==O.m.Disconnected||n.isSiblingConnected(t)||n.isRichIntegration(t)&&!n.hasRichIntegrationAccess()||t.status===O.m.Disconnected&&n.isSiblingDisconnected(t)?n.hasIntegrationAccess(t)?a.push(t):r[i].push(t):e.push(t)}),0===e.length&&n.setState({selectedSection:x.a.availableIntegrations}),n.setState(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(n,!0).forEach(function(t){B(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},n.state,{activeIntegrationsCount:e.filter(function(e){return Object(m.p)(e.is_active)}).length,activeIntegrations:e,availableIntegrations:a,enterpriseIntegrations:r[g.a.ENTERPRISE
1],loading:!1}))})})}),B(G(n),"hasRichIntegrationAccess",function(){return n.state.availableFeatures.length>0&&n.state.availableFeatures.indexOf(w.c.RICH_INTEGRATION)>-1}),B(G(n),"isRichIntegration",function(e){return e.systemMetadata.is_full_integration}),B(G(n),"isSiblingConnected",function(e){if(n.state.data){var t=n.state.data&&n.state.data.filter(function(t){return t.name===e.name});if(t.length>1){var a=n.isRichIntegration(e);return t.filter(function(e){return e.is_active&&JSON.parse(e.system_api_attribute||"{}").is_full_integration!==a}).length>0}return!1}return!1}),B(G(n),"isSiblingDisconnected",function(e){var t=e.systemMetadata.is_full_integration,a=JSON.parse(e.system_api_attribute||"{}");return n.state.data.filter(function(t){return t.name===e.name}).length>1&&(n.state.data&&n.state.data.filter(function(n){return n.name===e.name&&n.status===O.m.Disconnected&&a.is_full_integration!==t&&a.is_full_integration===JSON.parse(n.system_api_attribute||"{}").is_full_integration}).length>0)}),n.state={data:null,activeIntegrations:[],availableIntegrations:[],enterpriseIntegrations:[],activeCommunity:null,activeIntegrationsCount:0,hasFeatureAccess:!1,isNoMoreUpgradeAvailable:!1,isEnterpriseUser:!1,isSuperUser:!1,loading:!0,partnerIdentifier:I.j,person:null,selectedSection:x.a.active,usageStats:S.a,availableFeatures:[]},n}var n,a,u;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&&Y(e,t)}(t,y.a.Component),n=t,(a=[{key:"componentDidMount",value:function(){var e=this;this.sharedStore=v.b.instance(this.context),Promise.all([this.sharedStore.getValue(v.a.activeCommunity),this.sharedStore.getValue(v.a.person)]).then(function(t){var n=k(t,2),a=n[0],r=n[1];e.setState({activeCommunity:a,person:r}),a.billingInfo&&a.billingInfo.currentPlan&&e.setState({isNoMoreUpgradeAvailable:Object(m.t)(a.billingInfo.currentPlan),isSuperUser:a.role===R.f.super_admin,partnerIdentifier:a.billingInfo.currentPlan.partner_identifier,plan:a.billingInfo.currentPlan,usageStats:a.billingInfo.usageStats,availableFeatures:a.billingInfo.currentPlan.features||[],hasFeatureAccess:Object(w.f)(w.c.MAX_INTEGRATIONS,a.billingInfo.currentPlan)&&0!==w.q(a.billingInfo.currentPlan)}),e.loadCommunityIntegrations()})}},{key:"render",value:function(){var e=this;return y.a.createElement(y.a.Fragment,null,this.state.loading&&y.a.createElement(l.a,{size:"32"}),!1===this.state.loading&&y.a.createElement(y.a.Fragment,null,y.a.createElement("div",{className:"settings-integrations-wrapper"},y.a.createElement("div",{className:"header-container"},y.a.createElement(s.a,{subTitle:"Integration hub",description:["Connect and manage all essential integrations"]}),this.renderIntegrationLimitContainer()),!1===this.state.loading&&y.a.createElement("div",null,y.a.createElement(j.a,{menus:this.integrationMenus(),selectedItemKey:this.state.selectedSection,onSelect:function(t){e.setState({selectedSection:t.key})}})),!this.state.loading&&this.renderIntegrationList(),y.a.createElement("div",{className:"clearfix"}))))}},{key:"upgradeFormRequireClickable",value:function(e,t){return!(t&&!P.c(e.name)&&(!t||1!==e.connected))}}])&&D(n.prototype,a),u&&D(n,u),t}();B(K,"contextType",u.a);var q=d.g(K,"settings_integrations")},"75Dc":function(e,t,n){"use strict";n.d(t,"c",function(){return s}),n.d(t,"b",function(){return c}),n.d(t,"a",function(){return l});var a=n("RYw5"),r=n("irKQ"),i=[a.b.LinkedIn.toString()],o=[a.b.API.toString(),a.b.Fonteva.toString(),a.b.GrowthZone.toString(),a.b.HigherLogicMagnetMail.toString(),a.b.Imis.toString(),a.b.Impexium.toString(),a.b.Informz.toString(),a.b.Instagram.toString(),a.b.Nimble.toString(),a.b.NoviAMS.toString(),a.b.PersonifyMCPro.toString(),a.b.YourMembership.toString(),a.b.Zoom.toString()],s=function(e){return-1!==i.indexOf(e)},c=function(e){return-1!==o.indexOf(e)},l=function(e,t){switch(e){case a.b.Instagram:return t.length>0&&t.indexOf(r.c.INSTAGRAM_INTEGRATION)>-1;case a.b.YourMembership:return t.length>0&&t.indexOf(r.c.YOUR_MEMBERSHIP_INTEGRATION)>-1;case a.b.Nimble:return t.length>0&&t.indexOf(r.c.NIMBLE_INTEGRATION)>-1;case a.b.Fonteva:return t.length>0&&t.indexOf(r.c.FONTEVA_INTEGRATION)>-1;case a.b.Imis:return t.length>0&&t.indexOf(r.c.IMIS_INTEGRATION)>-1;case a.b.HigherLogicMagnetMail:return t.length>0&&t.indexOf(r.c.MAGNET_MAIL_INTEGRATION)>-1;case a.b.Impexium:return t.length>0&&t.indexOf(r.c.IMPEXIUM_INTEGRATION)>-1;case a.b.Informz:return t.length>0&&t.indexOf(r.c.INFORMZ_INTEGRATION)>-1;case a.b.PersonifyMCPro:return t.length>0&&t.indexOf(r.c.PERSONIFY_MC_PRO)>-1;case a.b.Zoom:return t.length>0&&t.indexOf(r.c.ZOOM_INTEGRATION)>-1;case a.b.API:return t.length>0&&t.indexOf(r.c.API_INTEGRATION_KEY)>-1;case a.b.GrowthZone:return t.length>0&&t.indexOf(r.c.GROWTHZONE_INTEGRATION)>-1;case a.b.NoviAMS:return t.length>0&&t.indexOf(r.c.NOVIAMS_INTEGRATION)>-1;default:return!0}}},DUD9:function(e,t,n){"use strict";n.d(t,"d",function(){return r}),n.d(t,"e",function(){return i}),n.d(t,"f",function(){return o}
1),n.d(t,"a",function(){return s}),n.d(t,"g",function(){return c}),n.d(t,"h",function(){return l}),n.d(t,"b",function(){return a}),n.d(t,"c",function(){return u});var a,r="Your password has been changed successfully.",i="Your profile has been updated successfully.",o="Your two factor authentication has been confirmed.",s="We have sent a code to your phone.  Please enter the code to complete the two factor setup.",c="Your two factor method has been removed successfully.",l="Unable to delete your two factor method. Please try after sometimes";!function(e){e.FIRST_NAME="first_name",e.LAST_NAME="last_name"}(a||(a={}));var u=["https://","http://","www.","@"]},LZxp:function(e,t,n){"use strict";n.d(t,"a",function(){return se});var a=n("E+oP"),r=n.n(a),i=n("g1oZ"),o=n("Wf2K"),s=n("ndvF"),c=n("rhWG"),l=n("3EXn"),u=n("D//q"),d=n("lNrV"),m=n("fz7v"),f=n("jR8S"),p=n("q1tI"),h=n.n(p),b=n("RYw5"),y=n("8zFy"),g=n("irKQ"),v=(n("KhYy"),n("UfQ3")),I=n("asbd"),E=n("wSjm"),w=n("PBy2"),S=n("3Zv5"),_=n("Naoz"),O=n("kJPp"),N=n("W1Mw"),P=n("ENxk"),C=n("d3GY"),R=n("OSVd"),T=n("4OYG"),j=n("RuKr"),x=n("N/UL"),A=n("Ci6x"),M=n("Alaw"),k=n("cj1r"),U=n("AL7A"),F=n("eyn9"),D=n("r3cc"),L=n("omYQ"),G=n("n55b"),Y=n("YWYT"),B=n("dv1b"),V=n("ClqJ"),K=n("Y7bj"),q=n("8e4r"),W=n("75Dc"),Z=n("JVRb"),z=n("F1bT"),X=n("6CGR"),H=n("BU9b");function J(e){return(J="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 Q(){return(Q=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function $(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],a=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);a=!0);}catch(e){r=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(r)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function ee(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function te(e){return(te=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ne(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ae(e,t){return(ae=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ie=function(e){function t(e){var n,a,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a=this,r=te(t).call(this,e,"communitySystemIntegration"),n=!r||"object"!==J(r)&&"function"!=typeof r?ne(a):r,re(ne(n),"sharedStore",void 0),re(ne(n),"canAccessPage",function(){return n.props.data.id||n.props.data.systemName}),re(ne(n),"thisSave",function(e){return n.saveRecord(e)}),re(ne(n),"thisLoadRecord",function(e,t){return n.loadRecord(e,t)}),re(ne(n),"allowedIntegrationCount",function(){return n.state.plan?g.q(n.state.plan):0}),n.state={activeCommunity:null,availableFeatures:[],clientIds:{},hasCognitoIdentifier:!1,hasFeatureAccess:!1,isDirty:!1,isLoading:!0,isSaving:!1,isSettingsLoading:!0,params:{},person:null,plan:null,usageStats:null},n}var n,a,c;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&&ae(e,t)}(t,m["c"]),n=t,(a=[{key:"componentDidMount",value:function(){var e=this;this.sharedStore=y.b.instance(this.context),Promise.all([this.sharedStore.getValue(y.a.activeCommunity),this.sharedStore.getValue(y.a.params),this.sharedStore.getValue(y.a.person),this.getAndSetClientIds()]).then(function(t){var n=$(t,4),a=n[0],i=n[1],o=n[2],s=n[3],c=a.billingInfo.currentPlan.features||[];e.setState({activeCommunity:a,availableFeatures:c,clientIds:s,hasCognitoIdentifier:!r()(o.accountInfo.cognito_identifier),params:i,person:o,plan:a.billingInfo&&a.billingInfo.currentPlan?a.billingInfo.currentPlan:null,usageStats:a.billingInfo.usageStats},function(){e.initializeRecord().then(function(){if(e.state.plan){var t=l.a.getServerUrl()+"/integrations/communityIntegrations/".concat(e.state.activeCommunity.communityId);l.a.ajax(t,l.b.GET,null).then(function(t){e.setState({hasFeatureAccess:e.canViewPage(i,t),isSettingsLoading:!1})})}})})})}},{key:"render",value:function(){var e=this;return h.a.createElement("div",{className:"settings-system-outer-wrapper"},h.a.createElement("div",{className:"settings-integrations-config-wrapper"},h.a.createElement("div",{className:"go-back",onClick:function(){return e.goBack()}},"<   Go back"),this.state.isSettingsLoading?h.a.createElement(s.a,{size:"32"}):this.state.isSettingsLoading||this.canAccessPage()?this.state.hasFeatureAccess?h.a.createElement(oe,Q({},this.props,this.state,{context:this.context,loadRecord:this.thisLoadRecord,saveRecord:this.thisSave})):h.a.createElement(i.a,{source:f.UpgradeSource.Integrations}):h.a.createElement("div",null,h.a.createElement("h3",null,"Something has gone wrong"))))}},{key:"goBack",value:function(){this.props.push("/settings/integrations")}},{key:"getAndSetClientIds",value:function(){var e="".concat(l.a.getServerUrl(),"/integrations/sso-clients");return l.a.ajax(e,l.b.GET,null)}},{key:"initializeRecord",value:function(){var e=this;if(this.state.params.id)return this.loadRecord(this.state.activeCommunity.communityId,this.state.params.id).then(function(){return!0}).catch(function(t){var n="Invalid Integration Record";t.response&&t.response.message&&(n=t.response.message),e.context.store.dispatch(o.showFlashError(n))});var t=[{param:"name",value:this.state.params.systemName}];return(new u.a).loadCommunityDataset("integrationSystems",this.state.activeCommunity.communityId,t).then(function(t){var n=t[0];return 1===n.length?e.loadRecord(e.state.activeCommunity.communityId,null).then(function(t){return e.props.propertiesChanged({id:null,is_active:null,community_identifier:e.state.activeCommunity.communityId,key:"",secret:"",token:"",systemMetadata:n[0].systemMetadata,systemName:e.state.params.systemName,display_name:e.state.params.displayName}),e.state.params.message&&e.context.store.dispatch(o.showFlashError(q.h[e.state.params.operation])),!0}):(e.context.store.dispatch(o.showFlashError(q.h[se.CreateFailure])),!1)})}},{key:"canViewPage",value:function(e,t){if(e.systemName&&W.c(e.systemName))return!0;var n=t.filter(function(t){return t.community_system_id===Number(e.id)})[0];return!!W.c(n&&n.name)||!(!n||!n.is_active&&!n.connected)||(W.b(e.systemName)?W.a(e.systemName,this.state.availableFeatures):!!t.length&&t.filter(function(e){return 1===e.is_active}).length<this.allowedIntegrationCount())}}])&&ee(n.prototype,a),c&&ee(n,c),t}();re(ie,"contextType",c.a);var oe=function(e){return e.data.systemName===b.b.ActiveCampaign?h.a.createElement(v.a,e):e.data.systemName===b.b.ConstantContact?h.a.createElement(I.a,e):e.data.systemName===b.b.Deskera?h.a.createElement(E.a,e):e.data.systemName===b.b.Fonteva?h.a.createElement(w.a,e):e.data.systemName===b.b.GrowthZone?h.a.createElement(S.a,e):e.data.systemName===b.b.HigherLogic?h.a.createElement(_.a,e):e.data.systemName===b.b.HigherLogicMagnetMail?h.a.createElement(O.a,e):e.data.systemName===b.b.Hubspot?h.a.createElement(N.a,e):e.data.systemName===b.b.Imis?h.a.createElement(P.a,e):e.data.systemName===b.b.Infusionsoft?h.a.createElement(C.a,e):e.data.systemName===b.b.Instagram?h.a.createElement(R.a,e):e.data.systemName===b.b.Klaviyo?h.a.createElement(j.a,e):e.data.systemName===b.b.LinkedIn?h.a.createElement(x.a,e):e.data.systemName===b.b.Mailchimp?h.a.createElement(A.a,e):e.data.systemName===b.b.Nimble?h.a.createElement(M.a,e):e.data.systemName===b.b.Replug?h.a.createElement(F.a,e):e.data.systemName===b.b.Salesflare?h.a.createElement(D.a,e):e.data.systemName===b.b.Shopify?h.a.createElement(G.a,e):e.data.systemName===b.b.Stripe?h.a.createElement(Y.a,e):e.data.systemName===b.b.WordPress?h.a.createElement(B.a,e):e.data.systemName===b.b.YourMembership?h.a.createElement(V.a,e):e.data.systemName===b.b.NoviAMS?h.a.createElement(K.a,e):e.data.systemName===b.b.Impexium?h.a.createElement(Z.a,e):e.data.systemName===b.b.Informz?h.a.createElement(z.a,e):e.data.systemName===b.b.Salesforce?h.a.createElement(L.a,e):b.c.includes(e.data.systemName)?h.a.createElement(U.a,e):e.data.systemName===b.b.SalesforceMarketingCloud?h.a.createElement(X.a,e):e.data.systemName===b.b.Zoom?h.a.createElement(H.a,e):e.data.systemName===b.b.PersonifyMCPro?h.a.createElement(k.a,e):h.a.createElement(T.a,e)}
1,se=d.e(ie,"settings_integrations_config",[T.b.key],q.f)},QmOw:function(e,t,n){"use strict";n.d(t,"a",function(){return ie});var a=n("kI5g"),r=n("BexS"),i=n("Wf2K"),o=n("IX08"),s=n("72eJ"),c=n("M5q5"),l=n("xhAU"),u=n("rhWG"),d=n("D//q"),m=n("syaa"),f=n("jR8S"),p=n("mwIZ"),h=n.n(p),b=n("q1tI"),y=n.n(b),g=n("DCcX"),v=n("vkoW"),I=n("CaDr"),E=n("OBzv"),w=n("sOKU"),S=n("WXI9"),_=n("p1Kg"),O=n("irKQ"),N=n("gI2s"),P=n("3EXn"),C=n("lNrV"),R=n("lzFu"),T=n("ZVVx"),j=n("pyE8"),x=n("4p60"),A=n("wGho"),M=(n("KhYy"),n("dSNw")),k=n("Yroh"),U=n("Ytbg"),F=n("ndvF"),D=n("/MKj"),L=n("r7w9"),G=n("ueGm"),Y=n("SmNk"),B=n("Ly5H");function V(e){return(V="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 K(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function q(e){return(q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function W(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Z(e,t){return(Z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var X=function(e){function t(e){var n,a,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a=this,r=q(t).call(this,e,H.key,"Transfer User"),n=!r||"object"!==V(r)&&"function"!=typeof r?W(a):r,z(W(n),"handleAccountSelectCallback",function(e){n.setState({selectedAccountId:e.id})}),z(W(n),"handleCommunitySelectCallback",function(e){n.setState({selectedCommunities:e})}),z(W(n),"close",function(e){n.handleClose()}),n.state={communities:[],isLoading:!0,isSaving:!1,selectedCommunities:[],isSuperUser:!1,selectedAccountId:0},n}var n,a,r;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&&Z(e,t)}(t,G["GenericModalComponent"]),n=t,(a=[{key:"componentDidMount",value:function(){var e=this;this.context&&this.context.user&&this.context.user.activeCommunity&&this.setState({isSuperUser:this.context.user.activeCommunity.role===_.f.super_admin},function(){e.state.isSuperUser&&(t.defaultProps.secondAction=null)})}},{key:"renderChildren",value:function(e){return b.createElement("div",{className:"invite-user-modal-body"},this.state.isSaving?b.createElement(F.a,{size:"64"}):b.createElement("div",null,this.state.isSuperUser&&b.createElement("div",null,b.createElement(Y.a,{onAccountSelect:this.handleAccountSelectCallback}),this.state.selectedAccountId>0&&b.createElement(B.a,{selectedAccountId:this.state.selectedAccountId,onCommunitySelect:this.handleCommunitySelectCallback}))))}},{key:"xButtonClick",value:function(e){this.handleClose()}},{key:"doSave",value:function(e){var t=this;return this.props.onSave(e.removeCommunityIds,e.userId,e.role,this.state.selectedAccountId,this.state.selectedCommunities).then(function(){t.setState({isSaving:!1,selectedCommunities:[]})})}},{key:"handleClose",value:function(){this.setState({selectedCommunities:[],selectedAccountId:0}),this.props.closeModal(H.key)}}])&&K(n.prototype,a),r&&K(n,r),t}();z(X,"contextType",u.a),z(X,"key","transferUser"),z(X,"defaultProps",{closeButtonText:"Cancel",saveText:"Transfer User",secondAction:G.ModalActionType.BUTTON,title:"Transfer User"});var H=Object(D.b)(null,{push:L.f})(X);function J(e){return(J="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 Q(){return(Q=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function $(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function te(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ne(e,t){return(ne=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var re=function(e){function t(e){var n,a,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a=this,o=ee(t).call(this,e),n=!o||"object"!==J(o)&&"function"!=typeof o?te(a):o,ae(te(n),"componentDidMount",function(){Object(S.b)(),n.context.user.init().then(function(e){var t=e.person,a=e.activeCommunity;a.billingInfo&&a.billingInfo.usageStats&&n.setState({canAddUser:
1a.billingInfo.usageStats.canAddUser,maxUserCount:a.billingInfo.usageStats.currentPlanMaxUsers}),n.setState({accountId:a.role===_.f.super_admin?a.billingInfo.productSubscription.account_id:t.accountId,accountOwnerUserId:a.data&&a.data.account_owner_user_id?a.data.account_owner_user_id:"",communityId:a.communityId,communityAccountId:a.data&&a.data.community_account_id?a.data.community_account_id:"",isSuperUser:a.role===_.f.super_admin,isAdminUser:a.data.user_role===_.f.community_admin&&a.role===_.f.community_admin,isAccountOwner:T.i(t,a),isNoMoreUpgradeAvailable:T.t(a.billingInfo.currentPlan),loggedInUserId:t.userId})})}),ae(te(n),"onArchive",function(e,t){e.dataItem.account_type===A.F?n.context.entityMetadata.getEntityObject("invitation").then(function(t){return t.setRecordId(n.state.communityId,e.dataItem.id),t.data.is_active=!1,t.save().then(function(){return n.setState({forceReload:!0,inviteCount:n.state.inviteCount-1},function(){return n.setState({forceReload:!1})})})}):e.onChange({dataItem:e.dataItem,syntheticEvent:t,field:"is_archived",value:!0})}),ae(te(n),"renderUserLimitContainer",function(){var e=n.state.maxUserCount===O.e||-1===n.state.maxUserCount,t=n.state.users.length,a=n.state.maxUserCount,r=t>=a,i=!n.state.canAddUser;return y.a.createElement(x.a,{actionButton:{disabled:i,callback:function(){n.props.openModal(M.a.key,null)},label:"Invite User"},entity:"team member",isSuperUser:n.state.isSuperUser,isUnlimited:e,isLimitReached:r,currentCount:t,maxLimit:a,source:f.UpgradeSource.AddUser,progressText:"Users Used",progressDescription:"You've reached your team member limit, please upgrade your plan to invite more team member.",showContactToRasa:n.state.isNoMoreUpgradeAvailable})}),ae(te(n),"dataReceived",function(e){n.setState({users:e.data})}),ae(te(n),"RoleCell",function(e){return y.a.createElement("td",null,A.X(e.dataItem.user_role))}),ae(te(n),"LastLoginCell",function(e){return e.dataItem.last_login===U.l?y.a.createElement("td",null):y.a.createElement(r.h,e)}),ae(te(n),"EditCell",function(e){return e.dataItem.owner_account_id===e.dataItem.account_id||T.p(e.dataItem.is_archived)?y.a.createElement("td",null):y.a.createElement(m.a,Q({},e,{canInactive:n.canInactive(e),canArchive:n.canArchive(e),resendInviteLabel:n.resendInviteLabel(e),canEdit:e.dataItem.user_id&&T.p(e.dataItem.is_active)&&n.state.accountOwnerUserId!==e.dataItem.user_id,canSendResetPasswordEmail:n.state.isSuperUser||n.state.isAdminUser||n.state.loggedInUserId===e.dataItem.account_owner_user_id,onEdit:e.dataItem.user_id&&T.p(e.dataItem.is_active)?n.editUserClick:null,showCustomLink:n.showTransferOwnershipLink(e),customLabel:"Transfer Ownership",onCustomClick:n.showTransferConfirmationModal,canResendInvite:n.canResendInvite(e),onSendResetPasswordEmail:n.showResetPasswordConfirmationModal,onArchive:n.onArchive,onInactive:n.onInactive,onResendInvite:n.onResendInvite,showTransferUserLink:n.showTransferUserLink(e),onTransferUser:n.onTransferUser,inactiveLabel:"Disable"}))}),ae(te(n),"resendInviteLabel",function(e){return e.dataItem.account_type===A.F||n.state.isSuperUser&&e.dataItem.user_id===e.dataItem.account_owner_user_id&&e.dataItem.invitation_status!==A.D&&T.p(e.dataItem.is_active)?"Resend Invite":"Enable"}),ae(te(n),"canResendInvite",function(e){return!Object(T.p)(e.dataItem.is_active)||!Object(T.p)(e.dataItem.user_community_is_active)||e.dataItem.account_type===A.F||n.state.isSuperUser&&e.dataItem.user_id===e.dataItem.account_owner_user_id&&e.dataItem.invitation_status!==A.D}),ae(te(n),"onResendInvite",function(e,t){if(t.dataItem.account_type===A.F||n.state.isSuperUser&&T.p(t.dataItem.is_active)&&t.dataItem.invitation_status!==A.D){var a=t.dataItem.identity_community_ids?t.dataItem.identity_community_ids.split(","):[],r=t.dataItem.community_names?t.dataItem.community_names.split(","):[],i=t.dataItem.community_identifiers?t.dataItem.community_identifiers.split(","):[],o=a.map(function(e,t){return{id:e,name:r[t],identifier:i[t]}});n.inviteUser(t.dataItem.first_name,t.dataItem.last_name,t.dataItem.email,o,t.dataItem.user_role,!0)}
1else T.p(t.dataItem.user_community_is_active)?t.onChange({dataItem:t.dataItem,syntheticEvent:e,field:"is_active",value:!0}):n.loadUserCommunities().then(function(e){if(1===e[0].length){var a=e[0].map(function(e){return e.identity_community_id});n.updateUser(t.dataItem.user_id,a,[],t.dataItem.user_role)}else n.props.openModal(M.a.key,{isForEnablingUser:!0,userId:t.dataItem.user_id})})}),ae(te(n),"canInactive",function(e){return n.state.accountOwnerUserId!==e.dataItem.user_id&&T.p(e.dataItem.is_active)&&T.p(e.dataItem.user_community_is_active)&&(n.state.isSuperUser||n.state.isAccountOwner)}),ae(te(n),"canArchive",function(e){return!T.p(e.dataItem.is_archived)&&n.state.accountOwnerUserId!==e.dataItem.user_id&&n.state.loggedInUserId!==e.dataItem.user_id&&(n.state.isSuperUser||n.state.isAccountOwner||n.state.isAdminUser)}),ae(te(n),"showTransferOwnershipLink",function(e){return n.state.accountOwnerUserId!==e.dataItem.user_id&&T.p(e.dataItem.is_active)&&(n.state.isSuperUser||n.state.isAccountOwner)}),ae(te(n),"showTransferUserLink",function(e){return n.state.accountOwnerUserId!==e.dataItem.user_id&&n.state.isSuperUser&&T.p(e.dataItem.is_active)}),ae(te(n),"onTransferUser",function(e,t){n.showTransferUserLink(t)&&n.props.openModal(H.key,{removeCommunityIds:t.dataItem.identity_community_ids.split(","),role:t.dataItem.user_role,userId:t.dataItem.user_id})}),ae(te(n),"onInactive",function(e,t){t.dataItem.account_type===A.F?n.context.entityMetadata.getEntityObject("invitation").then(function(e){return e.setRecordId(n.state.communityId,t.dataItem.id),e.data.is_active=!1,e.save().then(function(){return n.setState({inviteCount:n.state.inviteCount-1})})}):t.onChange({dataItem:t.dataItem,syntheticEvent:e,field:"is_active",value:!1})}),ae(te(n),"showTransferConfirmationModal",function(e){n.setState({selectedOwner:e,showTransferOwnershipModal:!0})}),ae(te(n),"showResetPasswordConfirmationModal",function(e){n.setState({selectedRecord:e,showResetPasswordEmailModal:!0})}),ae(te(n),"onTransferOwnership",function(){n.context.entityMetadata.getEntityObject("account").then(function(e){return e.setRecordId(n.state.communityId,n.state.selectedOwner.account_id),e.data.owner_user_id=n.state.selectedOwner.user_id,e.save().then(function(){T.r()})})}),ae(te(n),"editUserClick",function(e){n.props.openModal(M.a.key,{userId:e.user_id,selectedCommunities:T.p(e.user_community_is_active)?e.identity_community_ids:null,userRole:A.X(e.user_role)})}),ae(te(n),"onModalClose",function(){n.setState({showTransferOwnershipModal:!1,selectedOwner:null})}),ae(te(n),"resetPasswordResetStates",function(){n.setState({selectedRecord:null,showResetPasswordEmailModal:!1})}),ae(te(n),"handlePasswordResetRequest",function(){var e=P.a.getServerUrl()+"/auth/forgot-password";P.a.ajax(e,P.b.POST,{email:n.state.selectedRecord.email}).then(function(){n.context.store.dispatch(i.showFlashMessage(k.d))}).catch(function(e){n.context.store.dispatch(i.showFlashError())}),n.resetPasswordResetStates()}),ae(te(n),"inviteUser",function(e,t,a,r,o){var s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return Object(S.a)("inviteUser").then(function(c){n.setState({inviteInProgress:!0});var l=P.a.getServerUrl()+"/".concat(n.state.communityId,"/invite/user");return P.a.ajax(l,P.b.POST,{email:a||n.state.invitedEmail,first_name:e,last_name:t,communities:r,accountId:n.state.accountId,role:o,isResend:s,recaptcha:c}).then(function(e){n.setState({inviteInProgress:!1,inviteCount:n.state.inviteCount+1,forceReload:!0},function(){return n.setState({forceReload:!1})}),n.context.store.dispatch(i.showFlashMessage(A.z))}).catch(function(e){var t=h()(e,"response.error.message"),a=Object(T.v)(t),r=N.b(a.code||t);throw a.field&&(r=r.replace(/__FIELD__/g,a.field)),n.setState({inviteInProgress:!1}),n.context.store.dispatch(i.showFlashError(r||A.y)),e})})}),ae(te(n),"transferUser",function(e,t,a,r,o){var s=P.a.getServerUrl()+"/".concat(n.state.communityId,"/account/transfer");return P.a.ajax(s,P.b.POST,{accountId:r,addedCommunities:o.map(function(e){return e.id}),removedCommunities:e,role:a,userId:t}).then(function(e){n.setState({inviteInProgress:!1,inviteCount:n.state.invite
1Count-1,forceReload:!0},function(){return n.setState({forceReload:!1})}),n.context.store.dispatch(i.showFlashMessage(A.R))}).catch(function(e){n.setState({inviteInProgress:!1}),n.context.store.dispatch(i.showFlashError(N.b(h()(e,"response.message"))||A.Q))})}),ae(te(n),"updateUser",function(e,t,a,r){n.setState({inviteInProgress:!0});var o="".concat(P.a.getServerUrl(),"/user/").concat(n.state.communityId,"/update/").concat(e);return P.a.ajax(o,P.b.POST,{addedCommunities:t,removedCommunities:a,role:r}).then(function(e){n.setState({inviteInProgress:!1,forceReload:!0},function(){return n.setState({forceReload:!1})}),n.context.store.dispatch(i.showFlashMessage(A.U))}).catch(function(e){n.setState({inviteInProgress:!1}),n.context.store.dispatch(i.showFlashError(N.b(h()(e,"response.message"))||A.y))})}),ae(te(n),"getResetPasswordEmailModal",function(){return y.a.createElement("div",null,y.a.createElement(g.a,{isOpen:n.state.showResetPasswordEmailModal},y.a.createElement(v.a,null,"Password Reset Email Confirmation"),y.a.createElement(I.a,null,y.a.createElement("div",null,y.a.createElement("h4",null,"Are You Sure?"),y.a.createElement("p",null,"You are about to send password reset email to",n.state.selectedRecord?y.a.createElement("a",{href:"mailto:".concat(n.state.selectedRecord.email)}," ",n.state.selectedRecord.email):"","."),y.a.createElement("p",null,"Would you like to proceed?"))),y.a.createElement(E.a,null,y.a.createElement(w.a,{onClick:function(){return n.handlePasswordResetRequest()}},"Yes"),y.a.createElement(w.a,{onClick:n.resetPasswordResetStates},"No"))))}),ae(te(n),"loadUserCommunities",function(){if(0===n.state.communities.length){var e=[{param:"accountId",value:n.state.communityAccountId}];return(new d.a).loadCommunityDataset("userNewsletters",n.state.communityId,e)}return Promise.resolve(n.state.communities)}),n.state={accountId:"",accountOwnerUserId:"",canAddUser:!1,communities:[],communityId:"",communityAccountId:"",forceReload:!1,inviteCount:0,invitedEmail:"",invitedEmailValid:!1,inviteInProgress:!1,isAccountOwner:!1,isAdminUser:!1,isSuperUser:!1,isNoMoreUpgradeAvailable:!1,loggedInUserId:0,showInvite:!1,selectedRole:"community_admin",showResetPasswordEmailModal:!1,showTransferOwnershipModal:!1,users:[]},n.inviteUser=n.inviteUser.bind(te(n)),n}var n,u,p;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&&ne(e,t)}(t,b["Component"]),n=t,(u=[{key:"render",value:function(){return y.a.createElement("div",{className:"settings-team-wrapper"},y.a.createElement(M.a,{data:this.props.modals,closeModal:this.props.closeModal,saveModal:this.props.saveModal,onSave:this.inviteUser,onUpdate:this.updateUser}),y.a.createElement(H,{data:this.props.modals,closeModal:this.props.closeModal,saveModal:this.props.saveModal,onSave:this.transferUser}),y.a.createElement("div",null,y.a.createElement("div",{className:"header-container"},y.a.createElement(o.a,{title:"Settings",subTitle:"Team",description:["Invite a team member to access your newsletter."]}),this.renderUserLimitContainer())),y.a.createElement("div",{className:"clearfix"},y.a.createElement(R.b,{entityName:"user",datasetName:"accountUsers",editDefaultState:!1,onDataReceived:this.dataReceived,forceReload:this.state.forceReload,sortable:!0,pageable:!1,pagingSource:R.a.local,data:this.props.data},y.a.createElement(a.c,{cell:this.getAccountType,width:60,sortable:!1}),y.a.createElement(a.c,{field:"first_name",title:"First Name"}),y.a.createElement(a.c,{field:"last_name",title:"Last Name"}),y.a.createElement(a.c,{field:"email",title:"Email"}),y.a.createElement(a.c,{cell:this.RoleCell,title:"Role"}),y.a.createElement(a.c,{cell:this.getStatus,title:"Status"}),this.state.isSuperUser&&y.a.createElement(a.c,{field:"last_login",cell:this.LastLoginCell,title:"Last Login",editable:!1,width:150}),y.a.createElement(a.c,{field:"created",title:"Date Added",editable:!1,cell:r.h,width:150}),(this.state.isSuperUser||this.state.isAdminUser)&&y.a.createElement(a.c,{cell:this.EditCell,width:50}))),this.getOwnershipModalJSX(),this.getResetPasswordEmailModal())}},{key:"getAccountType",value:function(e){return e.dataItem.identity_provider===j.i?y.a.createElement("td",null,y.a.createElement("div",{className:"account-type"},e.dataItem.account_owner_user_id===e.dataItem.user_id&&y.a.createElement("div",{className:"owner-icon"},y.a.createElement("i",{className:"fa fa-star","aria-hidden":"true"})),y.a.createElement(l.a,{svgwidth:16,svgheight:16}))):e.dataItem.identity_provider===j.g?y.a.createElement("td",null,y.a.createElement("div",{className:"account-type"},e.dataItem.account_owner_user_id===e.dataItem.user_id&&y.a.createElement("div",{className:"owner-icon"},y.a.createElement("i",{className:"fa fa-star","aria-hidden":"true"})),y.a.createElement(c.a,{svgwidth:16,svgheight:16}))):e.dataItem.identity_provider===j.d?y.a.createElement("td",null,y.a.createElement("div",{className:"account-type"},e.dataItem.account_owner_user_id===e.dataItem.user_id&&y.a.createElement("div",{className:"owner-icon"},y.a.createElement("i",{className:"fa fa-star","aria-hidden":"true"})),y.a.createElement(s.a,{svgwidth:16,svgheight:16}))):y.a.createElement("td",null,y.a.createElement("div",{className:"account-type"},e.dataItem.account_owner_user_id===e.dataItem.user_id&&y.a.createElement("div",{className:"owner-icon"},y.a.createElement("i",{className:"fa fa-star","aria-hidden":"true"})),y.a.createElement("div",null,y.a.createElement("img",{src:"https://rasa.io/wp-content/uploads/2020/06/cropped-r-mark-cyan-transparent-large-03-32x32.png"}))))}},{key:"getStatus",value:function(e){return e.dataItem.account_type===A.E?T.p(e.dataItem.is_archived)?y.a.createElement("td",null,A.b):T.p(e.dataItem.is_active)&&T.p(e.dataItem.user_community_is_active)?y.a.createElement("td",null,A.a):y.a.createElement("td",null,A.d):new Date(e.dataItem.expiration_date)<new Date?y.a.createElement("td",null,A.c):y.a.createElement("td",null,A.e)}},{key:"getOwnershipModalJSX",value:function(){return y.a.createElement("div",null,y.a.createElement(g.a,{isOpen:this.state.showTransferOwnershipModal,className:"settings-account-ownership-modal",size:"lg",fade:!1,centered:!0},y.a.createElement(v.a,null,"Transfer Ownership Confirmation"),y.a.createElement(I.a,{className:"settings-account-ownership-modal-body"},y.a.createElement("div",null,y.a.createElement("h4",null,"Are You Sure?"),y.a.createElement("p",null,"You are about to change the primary owner to ",this.state.selectedOwner?this.state.selectedOwner.first_name:"",". You will immediately be logged out of the dashboard. Would you like to proceed?"))),y.a.createElement(E.a,null,y.a.createElement(w.a,{onClick:this.onTransferOwnership},"Yes"),y.a.createElement(w.a,{onClick:this.onModalClose},"Cancel"))))}}])&&$(n.prototype,u),p&&$(n,p),t}();ae(re,"contextType",u.a);var ie=C.e(re,"settings_team",[M.a.key,H.key])},VQrA:function(e,t,n){"use strict";n.d(t,"a",function(){return ge});var a=n("E+oP"),r=n.n(a),i=n("Wf2K"),o=n("IX08"),s=n("ndvF"),c=n("rhWG"),l=n("4+6U"),u=n("qVkf"),d=n("lNrV"),m=n("fz7v"),f=n("ZVVx"),p=n("q1tI"),h=n.n(p),b=n("p1Kg"),y=n("Ytbg"),g=(n("KhYy"),n("DUD9")),v=n("3EXn"),I=n("0QKP"),E=n("sOKU");function w(e){return(w="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){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}
1function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var P=function(e){function t(e){var n,a,r,i,o,s;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a=this,r=_(t).call(this,e),n=!r||"object"!==w(r)&&"function"!=typeof r?O(a):r,i=O(n),s=function(){return!!(n.props.buttonDisabled||n.props.selectedPreference&&n.props.selectedPreference!==n.props.preferenceKey)},(o="disableButton")in i?Object.defineProperty(i,o,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[o]=s,n}var n,a,r;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&&N(e,t)}(t,h.a.Component),n=t,(a=[{key:"render",value:function(){return h.a.createElement("div",{className:this.props.className?"preference-box "+this.props.className:"preference-box"},h.a.createElement("div",{className:"box-body"},h.a.createElement("div",{className:"left"},this.props.heading&&h.a.createElement("div",{className:"box-header"},this.props.heading),h.a.createElement("div",{className:"box-content"},this.props.children)),h.a.createElement("div",{className:"right"},this.props.showButton&&h.a.createElement(E.a,{className:"reload-button",title:this.props.isComingSoon?"Coming Soon...":this.props.buttonText,onClick:this.props.onButtonClick,disabled:this.disableButton()},this.props.buttonText))),h.a.createElement("div",{className:"clearfix"}))}}])&&S(n.prototype,a),r&&S(n,r),t}();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 R(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var A=function(e){function t(e){var n,a,r,i,o,s;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a=this,r=T(t).call(this,e),n=!r||"object"!==C(r)&&"function"!=typeof r?j(a):r,i=j(n),s=function(){n.props.updateStatus(),v.a.ajax(v.a.getServerUrl()+"/".concat(n.props.communityId,"/verify-email"),v.b.POST,{}).catch(function(){return n.props.updateFailedStatus()})},(o="sendVerification")in i?Object.defineProperty(i,o,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[o]=s,n}var n,a,r;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&&x(e,t)}(t,h.a.Component),n=t,(a=[{key:"render",value:function(){return h.a.createElement(P,{preferenceKey:"email-preference",className:"email-preference",heading:"Email Address",selectedPreference:this.props.selectedPreference,showButton:!1,buttonText:"Edit Email Address",buttonDisabled:!0,isComingSoon:!0},h.a.createElement("div",null,h.a.createElement("div",{className:"email-verification-left"},this.props.profile.email),h.a.createElement("div",{className:"right email-verification-right"},this.props.verificationStatus!==y.q.confirmed&&this.props.lastSentDate&&h.a.createElement("div",{className:"last-email-wrap"},h.a.createElement("div",null,"Your last verification email was sent on"),h.a.createElement("div",{className:"next-email-wrapper-date"},this.props.lastSentDate&&Object(I.d)(this.props.lastSentDate))),this.props.verificationStatus===y.q.confirmed?h.a.createElement("div",{className:"save-button save-button-disabled verified"},"Verified"):this.props.verificationStatus===y.q.pending?h.a.createElement("div",{className:"save-button save-button-disabled pending"},"Pending"):h.a.createElement("div",{className:"save-button save-button-enabled clickable-item",onClick:this.sendVerification}
1,"Send Verification Email"),this.props.verificationStatus===y.q.failed&&h.a.createElement("div",{className:"field-right resend-message save-button save-button-enabled clickable-item",onClick:this.sendVerification},"Re-send Verification Email"))))}}])&&R(n.prototype,a),r&&R(n,r),t}(),M=n("J2iB"),k=n.n(M),U=n("c2Sr"),F=n("bdji");function D(e){return(D="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 L(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function G(e){return(G=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B(e,t){return(B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function V(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var K={confirmPassword:"",errorMessage:"",isInvalidCurrentPassword:!1,newPassword:"",currentPassword:"",showPanelItem:!1},q=function(e){function t(e){var n,a,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a=this,r=G(t).call(this,e),n=!r||"object"!==D(r)&&"function"!=typeof r?Y(a):r,V(Y(n),"renderErrorMessage",function(){return n.state.isInvalidCurrentPassword?h.a.createElement("div",null,"The password you provided is incorrect.  If you do not remember your current password please use the ",h.a.createElement("a",{href:"/forgot-password"},"Forgot Password")," link to reset it."):n.state.errorMessage?h.a.createElement("div",null,n.state.errorMessage):h.a.createElement("div",null)}),V(Y(n),"isDirty",function(){return!n.state.showPanelItem||(!n.props.hasCognitoIdentifier||""!==n.state.currentPassword)&&""!==n.state.newPassword&&""!==n.state.confirmPassword&&n.state.newPassword===n.state.confirmPassword&&""===n.state.errorMessage}),V(Y(n),"onChange",function(e,t){"newPassword"===e?n.setState({errorMessage:Object(f.A)(t)}):"confirmPassword"===e&&n.state.newPassword!==t?n.setState({errorMessage:"Password does not match."}):n.setState({errorMessage:""}),n.setState(V({},e,t))}),V(Y(n),"clearState",function(){n.setState(K),n.props.onSelectPreference("")}),V(Y(n),"onPasswordChange",function(){if(n.state.showPanelItem){n.setState({isInvalidCurrentPassword:!1});var e=v.a.getServerUrl()+"/auth/change-password";v.a.ajax(e,v.b.POST,{new_password:n.state.newPassword,current_password:n.state.currentPassword}).then(function(){n.clearState(),n.context.store.dispatch(i.showFlashMessage(g.d)),Object(f.r)()}).catch(function(e){var t=e.response&&e.response.message?e.response.message:e;n.setState({isInvalidCurrentPassword:!Object(f.n)(t),errorMessage:t})})}else n.setState({showPanelItem:!0})}),n.state=K,n}var n,a,r;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&&B(e,t)}(t,h.a.Component),n=t,(a=[{key:"render",value:function(){var e=this;return h.a.createElement(F.a,{preferenceKey:"password-preference",selectedPreference:this.props.selectedPreference,onSelectPreference:this.props.onSelectPreference,heading:"Password",showPanelItem:this.state.showPanelItem,showButton:!0,buttonText:this.props.hasCognitoIdentifier?"Change Password":"Set Password",buttonDisabled:!this.isDirty(),onButtonClick:this.onPasswordChange,onCollapse:function(){return e.setState(K)}},h.a.createElement("div",{className:"error-message"},this.renderErrorMessage()),h.a.createElement("div",{className:"clearfix "}),this.props.hasCognitoIdentifier?h.a.createElement("div",{className:"field-left"},this.createTextBox("CURRENT PASSWORD","currentPassword")):h.a.createElement("div",null),h.a.createElement("div",{className:"clearfix "}),h.a.createElement("div",{className:"field-left"},this.createTextBox("NEW PASSWORD","newPassword")),h.a.createElement("div",{className:"field-right"},this.createTextBox("CONFIRM PASSWORD","confirmPassword")))}},{key:"createTextBox",value:function(e,t){return h.a.createElement(U.a,{name:e,dirty:!k()(this.state[t]),field:t,value:this.state[t],onChange:this.onChange,type:"password"})}}])&&L(n.prototype,a),r&&L(n,r),t}();function W(e){return(W="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 Z(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function z(e){return(z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function X(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}
1function H(e,t){return(H=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}V(q,"contextType",c.a);var Q=function(e){function t(e){var n,a,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a=this,i=z(t).call(this,e),n=!i||"object"!==W(i)&&"function"!=typeof i?X(a):i,J(X(n),"isDirty",function(){var e=!1;if(!k()(n.props.changes[g.b.FIRST_NAME])){if(n.isInVaild(n.props.changes[g.b.FIRST_NAME]))return!1;e=!0}if(!k()(n.props.changes[g.b.LAST_NAME])){if(n.isInVaild(n.props.changes[g.b.LAST_NAME]))return!1;e=!0}return e}),J(X(n),"isInVaild",function(e){return!!r()(e)||g.c.some(function(t){return!!e.includes(t)})}),n}var n,a,i;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&&H(e,t)}(t,h.a.Component),n=t,(a=[{key:"render",value:function(){return h.a.createElement(P,{preferenceKey:"personal-preference",className:"personal-preference",selectedPreference:this.props.selectedPreference,onButtonClick:this.props.saveRecord,heading:"Personal Info",showButton:!0,buttonText:"Update",buttonDisabled:!this.isDirty()},h.a.createElement("div",null,h.a.createElement("div",{className:"field-left"},this.createTextBox("FIRST NAME",g.b.FIRST_NAME)),h.a.createElement("div",{className:"field-right"},this.createTextBox("LAST NAME",g.b.LAST_NAME))))}},{key:"createTextBox",value:function(e,t){return h.a.createElement(U.a,{name:e,dirty:!k()(this.props.changes[t]),field:t,value:this.props.profile[t],onChange:this.props.onChange})}}])&&Z(n.prototype,a),i&&Z(n,i),t}(),$=n("wLps");function ee(e){return(ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function te(){return(te=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function ne(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function ae(e){return(ae=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function re(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ie(e,t){return(ie=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var se=function(e){function t(e){var n,a,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a=this,r=ae(t).call(this,e),n=!r||"object"!==ee(r)&&"function"!=typeof r?re(a):r,oe(re(n),"logoutAllSessions",function(){v.a.ajax(v.a.getServerUrl()+"/auth/logout-all-sessions",v.b.POST,{}).then(function(){f.r()})}),oe(re(n),"onSelectPreference",function(e){n.setState({selectedPreference:e})}),n.state={selectedPreference:""},n}var n,a,r;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&&ie(e,t)}(t,p["Component"]),n=t,(a=[{key:"render",value:function(){return p.createElement("div",{className:"profile-preferences"},p.createElement(Q,te({selectedPreference:this.state.selectedPreference},this.props,{updateStatus:this.props.updateStatus,updateFailedStatus:this.props.updateFailedStatus})),p.createElement("div",{className:"box-separator"}),p.createElement(A,te({selectedPreference:this.state.selectedPreference},this.props,{updateStatus:this.props.updateStatus,updateFailedStatus:this.props.updateFailedStatus})),p.createElement("div",{className:"box-separator"}),p.createElement(q,te({selectedPreference:this.state.selectedPreference},this.props,{onSelectPreference:this.onSelectPreference})),p.createElement("div",{className:"box-separator"}),p.createElement("div",null,p.createElement($.a,te({selectedPreference:this.state.selectedPreference},this.props,{onSelectPreference:this.onSelectPreference})),p.createElement("div",{className:"box-separator"})),p.createElement(P,{preferenceKey:"log-out",selectedPreference:this.state.selectedPreference,heading:"Log out of all sessions, including this one",showButton:!0,onButtonClick:this.logoutAllSessions,buttonText:"Log out of All Sessions"}))}}])&&ne(n.prototype,a),r&&ne(n,r),t}();function ce(e){return(ce="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 le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?le(n,!0).forEach(function(t){be(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function de(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function me(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fe(e,t,n){return(fe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var a=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=pe(e)););return e}(e,t);if(a){var r=Object.getOwnPropertyDescriptor(a,t);return r.get?r.get.call(n):r.value}})(e,t,n||e)}function pe(e){return(pe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function he(e,t){return(he=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function be(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}oe(se,"contextType",c.a);var ye=function(e){function t(e){var n,a,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a=this,i=pe(t).call(this,e,"userAndAccount",{activeCommunity:{},changes:{},isProfileLoading:!0,person:{},verificationStatus:y.q.unknown,lastSentDate:"",stillPending:null,isAdminUser:!1,hasCognitoIdentifier:!1,is2faRequired:!1}),n=!i||"object"!==ce(i)&&"function"!=typeof i?me(a):i,be(me(n),"componentDidMount",function(){n.context.user.init().then(function(e){var t=e.person,a=e.activeCommunity;e.role;return n.setState({activeCommunity:a,communityId:a.communityId,person:t,verificationStatus:t.verified?y.q.confirmed:n.getLastEmailTimePassed(t.lastPendingVerificationSent)?y.q.pending:y.q.unknown,lastSentDate:t.lastPendingVerificationSent,stillPending:n.getLastEmailTimePassed(t.lastPendingVerificationSent),isAdminUser:a.role===b.f.super_admin,is2faRequired:Object(f.p)(t.accountInfo.is_2fa_required),hasCognitoIdentifier:!r()(t.accountInfo.cognito_identifier)}),n.loadRecord(a.communityId,a.communityAccountId).then(function(){return n.setState({isProfileLoading:!1})})})}),be(me(n),"getLastEmailTimePassed",function(e){var t=new Date(Object(l.a)(e)),n=new Date;return Object(u.a)(n,t)<21600}),be(me(n),"updateStatus",function(){n.setState({verificationStatus:y.q.pending})}),be(me(n),"updateFailedStatus",function(){n.setState({verificationStatus:y.q.failed})}),n.saveRecord=n.saveRecord.bind(me(n)),n}var n,a,c;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&&he(e,t)}(t,m["c"]),n=t,(a=[{key:"loadRecord",value:function(e,t){this.setState({isDirty:!1,changes:{}});var n=this.state.person.accountInfo;return this.updateComponentState({email:n.email,first_name:n.first_name,last_name:n.last_name,user_options:n.user_options||""}),Promise.resolve(!0)}},{key:"mapPropsToEntityObject",value:function(e){var t=this;Object.keys(this.state.changes).forEach(function(n){e.data[n]=t.state.changes[n]})}},{key:"propertyChanged",value:function(e,n){fe(pe(t.prototype),"propertyChanged",this).call(this,e,n),this.setState({changes:ue({},this.state.changes,be({},e,n))})}},{key:"render",value:function(){var e=this;return h.a.createElement("div",{className:"settings-wrapper"},this.state.isProfileLoading?h.a.createElement(s.a,{size:"64"}):h.a.createElement("div",{className:"menuline1"},h.a.createElement("div",{className:"header-container"},h.a.createElement(o.a,{title:"Settings",subTitle:"Profile"})),h.a.createElement("div",{className:"borderline2"}),h.a.createElement("div",{className:"clearfix "}),h.a.createElement(se,{profile:this.props.data,verificationStatus:this.state.verificationStatus,communityId:this.state.activeCommunity.communityId,hasCognitoIdentifier:this.state.hasCognitoIdentifier,is2faRequired:this.state.is2faRequired,lastSentDate:this.state.lastSentDate,onChange:function(t,n){return e.propertyChanged(t,n)},changes:this.state.changes,updateStatus:this.updateStatus,updateFailedStatus:this.updateFailedStatus,saveRecord:this.saveRecord})))}},{key:"saveRecord",value:function(){var e=this;return fe(pe(t.prototype),"saveRecord",this).call(this,this.state.communityId).then(function(t){return e.context.store.dispatch(i.show
1FlashMessage(g.e)),e.setState({changes:{}}),t}).catch(function(t){console.log("Error: ",t),e.setState({isSaving:!1})})}}])&&de(n.prototype,a),c&&de(n,c),t}();be(ye,"contextType",c.a);var ge=d.i(ye,"settings_profile")},"anp+":function(e,t,n){"use strict";n.d(t,"a",function(){return S});var a=n("Wf2K"),r=n("r4UP"),i=n("rhWG"),o=n("lNrV"),s=n("fz7v"),c=n("ZVVx"),l=n("q1tI"),u=n.n(l),d=n("8zFy"),m=n("wGho"),f=(n("KhYy"),n("8dec")),p=n("XUcj");function h(e){return(h="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 b(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E={communityId:null,userCommunityId:null},w=function(e){function t(e){var n,r,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=this,i=y(t).call(this,e,"userCommunityPreference",E),n=!i||"object"!==h(i)&&"function"!=typeof i?g(r):i,I(g(n),"sharedStore",void 0),I(g(n),"componentDidMount",function(){n.sharedStore=d.b.instance(n.context),n.sharedStore.getValue(d.a.activeCommunity).then(function(e){n.setState({communityId:e.communityId,userCommunityId:e.data.community_user_id}),n.loadRecord(e.communityId,e.data.community_user_id)})}),I(g(n),"onCommunityChange",function(e){n.setState({communityId:e.community_identifier}),n.loadRecord(e.community_identifier,e.community_user_id)}),I(g(n),"onToggle",function(e){var t=!Object(c.p)(Object(m.V)(n.props.data,e.name));n.props.propertiesChanged(I({},e.name,t)),n.context.entityMetadata.getEntityObject(n.entityName).then(function(r){return r.setRecordId(n.state.communityId,null),r.data.preference_type=e.name,r.data.user_community_id=n.state.userCommunityId,r.data.is_active=t,r.save().then(function(){return n.context.store.dispatch(a.showFlashMessage(m.H))}).catch(function(){n.context.store.dispatch(a.showFlashError(m.G))})})}),n}var n,i,o;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&&v(e,t)}(t,s["c"]),n=t,(i=[{key:"render",value:function(){var e=this;return u.a.createElement("div",{className:"settings-email-preference-wrapper"},u.a.createElement("div",null,u.a.createElement("div",{className:"contentpane-header-wrapper"},u.a.createElement("div",{className:"contentpane-icon-wrapper"},u.a.createElement(r.a,null)),u.a.createElement("div",{className:"header"},u.a.createElement("div",{className:"header-outter-wrapper"},u.a.createElement("div",{className:"contentpane-section-title-wrapper"},u.a.createElement("h6",{className:"section-header-title"},"SETTINGS"),u.a.createElement("div",{className:"section-header-text"},"Email Preferences"))))),u.a.createElement("div",{className:"email-preferences-community-list"},u.a.createElement(p.a,{showOnlyWhenMultiple:!0,showLabel:!0,onCommunityChange:this.onCommunityChange})),u.a.createElement("div",{className:"email-preferences"},m.s.map(function(t){return u.a.createElement(f.a,{key:t.name,preference:t,isActive:Object(m.V)(e.props.data,t.name),onToggle:function(){return e.onToggle(t)}})}))))}}])&&b(n.prototype,i),o&&b(n,o),t}();I(w,"contextType",i.a);var S=o.i(w,"settings_email_preferences")},bdji:function(e,t,n){"use strict";n.d(t,"a",function(){return p});var a=n("TSYQ"),r=n.n(a),i=n("q1tI"),o=n.n(i),s=n("sOKU");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 l(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=function(e){function t(e){var n,a,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a=this,r=u(t).call(this,e),n=!r||"object"!==c(r)&&"function"!=typeof r?d(a):r,f(d(n),"onCollapse",function(){n.props.onSelectPreference(),n.props.onCollapse()}),f(d(n),"onButtonClick",function(){n.props.showPanelItem||n.props.onSelectPreference(n.props.preferenceKey),n.props.onButtonClick()}),f(d(n),"disableButton",function(){return!!(n.props.buttonDisabled||n.props.selectedPreference&&n.props.selectedPreference!==n.props.preferenceKey)}),n.onButtonClick=n.onButtonClick.bind(d(n)),n.onCollapse=n.onCollapse.bind(d(n)),n}var n,a,i;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&&m(e,t)}(t,o.a.Component),n=t,(a=[{key:"render",value:function(){return o.a.createElement("div",{className:"preference-box expanded-preference-box"},o.a.createElement("div",{className:"box-body"},o.a.createElement("div",{className:"left"},o.a.createElement("div",{className:"box-header"},this.props.heading),o.a.createElement("div",{className:"box-content"},this.props.showPanelItem?o.a.createElement("div",{className:"expanded-preference-box"},o.a.createElement("div",{className:"expanded-preference-box-content"},this.props.children)):o.a.createElement("div",null))),o.a.createElement("div",{className:r()("right",this.props.showPanelItem?"expanded":"")},this.props.showPanelItem&&o.a.createElement("div",{className:"panel-bar-collapse",onClick:this.onCollapse},o.a.createElement("span",{className:"k-icon k-i-arrow-n k-panelbar-collapse"})),this.props.showButton&&o.a.createElement(s.a,{disabled:this.disableButton(),onClick:this.onButtonClick},this.props.buttonText))),o.a.createElement("div",{className:"clearfix"}))}}])&&l(n.prototype,a),i&&l(n,i),t}()}}]);
2//# sourceMappingURL=app~4c376b39.a4b5fe1ca9039c3149ec.bundle.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.