1!function(){try{var n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new n.Error).stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="0ed4e38d-0774-4a7c-98c4-c5d4bce4ad53",n._sentryDebugIdIdentifier="sentry-dbid-0ed4e38d-0774-4a7c-98c4-c5d4bce4ad53")}catch(n){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[509],{83227:function(n,e,t){t.d(e,{A:function(){return o}});var r=t(76118),i=t(7456),s=t(15087);function a(){let n=(0,r._)(["\n query getSocialListeningAlertFormForEdition($_id: String!) {\n getSocialListeningAlertFormForEdition(_id: $_id) {\n ...ApplicationFormFragment\n }\n }\n ","\n"]);return a=function(){return n},n}let o=(0,i.Ps)(a(),s.D)},61933:function(n,e,t){t.d(e,{ig:function(){return a},PT:function(){return B},R8:function(){return W},KI:function(){return S},dC:function(){return g},xz:function(){return c},Sd:function(){return l},k8:function(){return A},Ft:function(){return D},WA:function(){return L},J9:function(){return f},qm:function(){return _},w8:function(){return I},mf:function(){return O},Bu:function(){return x},IM:function(){return k},s$:function(){return C},y6:function(){return T},tB:function(){return V}});var r=t(76118),i=t(7456);function s(){let n=(0,r._)(["\n mutation addSocialListeningAlert($name: String!, $description: String) {\n addSocialListeningAlert(name: $name, description: $description) {\n message\n success\n data\n }\n }\n"]);return s=function(){return n},n}let a=(0,i.Ps)(s());function o(){let n=(0,r._)(["\n mutation editSocialListeningAlert($_id: String!, $name: String!, $description: String) {\n editSocialListeningAlert(_id: $_id, name: $name, description: $description) {\n message\n success\n }\n }\n"]);return o=function(){return n},n}let l=(0,i.Ps)(o());function u(){let n=(0,r._)(["\n mutation duplicateSocialListeningAlert($_id: String!) {\n duplicateSocialListeningAlert(_id: $_id) {\n message\n success\n data\n }\n }\n"]);return u=function(){return n},n}let c=(0,i.Ps)(u());function d(){let n=(0,r._)(["\n mutation deleteSocialListeningAlerts($ids: [String]!) {\n deleteSocialListeningAlerts(ids: $ids) {\
1n message\n code\n success\n }\n }\n"]);return d=function(){return n},n}let g=(0,i.Ps)(d());function m(){let n=(0,r._)(["\n query getSocialListeningAlertTableByBrand(\n $brandId: String!\n $limit: Int\n $page: Int\n $sortParams: SocialListeningAlertSortParamsType\n $filters: [NewFilterParamsType]\n $view: String!\n ) {\n getSocialListeningAlertTableByBrand(\n brandId: $brandId\n sortParams: $sortParams\n page: $page\n limit: $limit\n filters: $filters\n view: $view\n ) {\n _id\n brandId\n name\n description\n status\n rawStatus\n mentions\n processingMentions\n query\n createdByUser {\n firstName\n }\n createdAt\n }\n }\n"]);return m=function(){return n},n}let f=(0,i.Ps)(m());function y(){let n=(0,r._)(["\n query countSocialListeningAlertTableByBrand(\n $brandId: String!\n $filters: [NewFilterParamsType]\n $view: String!\n ) {\n countSocialListeningAlertTableByBrand(brandId: $brandId, filters: $filters, view: $view)\n }\n"]);return y=function(){return n},n}let S=(0,i.Ps)(y());function $(){let n=(0,r._)(["\n query getSocialListeningAlertsTableColumns {\n getSocialListeningAlertsTableColumns {\n label\n fieldName\n columnType\n type\n }\n }\n"]);return $=function(){return n},n}let _=(0,i.Ps)($());function b(){let n=(0,r._)(["\n query getSocialListeningAlert($_id: String, $sharedId: String) {\n getSocialListeningAlert(_id: $_id, sharedId: $sharedId) {\n _id\n brandId\n brandName\n brandLogo\n name\n description\n status\n rawStatus\n mentions\n query\n processingMentions\n lastMentionsPropagationDate\n createdByUser {\n firstName\n }\n createdAt\n }\n }\n"]);return b=function(){return n},n}t(83227);let A=(0,i.Ps)(b());function p(){let n=(0,r._)(["\n query getSocialListeningAlertQueryResultsEstimate($_id: String!) {\n getSocialListeningAlertQueryResultsEstimate(_id: $_id) {\n allowed\n estimatedMentions\n remainingMentionsAfterQuery\n remainingMentionsPerPeriod\n }\n }\n"]);return p=function(){return n},n}let L=(0,i.Ps)(p());function w(){let n=(0,r._)(["\n query getSocialListeningEntitiesSuggestions($value: String!, $size: Int) {\n getSocialListeningEntitiesSuggestions(value: $value, size: $size) {\n key\n label\n value\n translationKey\n originalLabel\n }\n }\n"]);return w=function(){return n},n}let I=(0,i.Ps)(w());function v(){let n=(0,r._)(["\n query getContents($term: String, $size: Int) {\n getContents(term: $term, size: $size) {\n message\n code\n success\n data\n }\n }\n"]);return v=function(){return n},n}function h(){let n=(0,r._)(["\n query getAlertResults($alertId: String) {\n getAlertResults(alertId: $alertId) {\n message\n code\n success\n data\n }\n }\n"]);return h=function(){return n},n}function P(){let n=(0,r._)(["\n mutation runSocialListeningAlert($_id: String!) {\n runSocialListeningAlert(_id: $_id) {\n message\n code\n success\n data\n }\n }\n"]);return P=function(){return n},n}(0,i.Ps)(v()),(0,i.Ps)(h());let T=(0,i.Ps)(P());function E(){let n=(0,r._)(["\n mutation pauseSocialListeningAlert($_id: String!) {\n pauseSocialListeningAlert(_id: $_id) {\n message\n code\n success\n }\n }\n"]);return E=function(){return n},n}let k=(0,i.Ps)(E());function q(){let n=(0,r._)(["\n mutation resumeSocialListeningAlert($_id: String!) {\n resumeSocialListeningAlert(_id: $_id) {\n message\n code\n success\n }\n }\n"]);return q=function(){return n},n}let C=(0,i.Ps)(q());function F(){let n=(0,r._)(["\n mutation addSocialListeningAlertQuery($_id: String!, $query: JSON!) {\n addSocialListeningAlertQuery(_id: $_id, query: $query) {\n message\n success\n data\n }\n }\n"]);return F=function(){return n},n}let B=(0,i.Ps)(F());function M(){let n=(0,r._)(["\n query calculateSocialListeningHistoricalMentions(\n $alertId: String!\n $_ids: [String]!\n $entityType: String!\n ) {\n calculateSocialListeningHistoricalMentions(\n alertId: $alertId\n _ids: $_ids\n entityType: $entityType\n ) {\n total\n estimated\n withoutEmail\n duplicates\n unsubscribes\n }\n }\n"]);return M=function(){return n},n}function R(){let n=(0,r._)(["\n query getSocialListeningAlertMentionsTableByAlert(\n $socialListeningAlertId: String\n $limit: Int\n $page: Int\n $sortParams: SocialListeningAlertMentionSortParamsType\n $filters: [NewFilterParamsType]\n $view: String!\n $sharedId: String\n ) {\n getSocialListeningAlertMentionsTableByAlert(\n socialListeningAlertId: $socialListeningAlertId\n limit: $limit\n page: $page\n sortParams: $sortParams\n filters: $filters\n view: $view\n sharedId: $sharedId\n ) {\n _id\n brandId\n socialListeningAlertId\n network\n mentionId\n publishedDate\n sourceId\n body\n link\n author\n title\n geohash\n like
1s\n shares\n comments\n description\n mediaTitle\n engagement\n handle\n fetchedData\n isReplyOrShare\n site\n bio\n random\n country\n channels\n rawChannels\n gender\n influence\n authorInterests\n authorAge\n followers\n following\n language\n sentiment\n sentimentRaw\n themes\n emotions\n entities\n taxonomies\n createdAt\n }\n }\n"]);return R=function(){return n},n}(0,i.Ps)(M());let D=(0,i.Ps)(R());function N(){let n=(0,r._)(["\n query countSocialListeningAlertMentionsTableByAlert(\n $socialListeningAlertId: String\n $sharedId: String\n $filters: [NewFilterParamsType]\n $view: String!\n ) {\n countSocialListeningAlertMentionsTableByAlert(\n socialListeningAlertId: $socialListeningAlertId\n sharedId: $sharedId\n filters: $filters\n view: $view\n )\n }\n"]);return N=function(){return n},n}let W=(0,i.Ps)(N());function Q(){let n=(0,r._)(["\n query getSocialListeningEnums($domain: String!, $key: String, $locale: String) {\n getSocialListeningEnums(domain: $domain, key: $key, locale: $locale) {\n message\n success\n data\n }\n }\n"]);return Q=function(){return n},n}let O=(0,i.Ps)(Q());function z(){let n=(0,r._)(["\n query getUserViewFilters($viewName: ViewEnumType!, $viewId: String!) {\n getUserViewFilters(viewName: $viewName, viewId: $viewId) {\n _id\n userId\n brandId\n viewName\n viewId\n filters\n createdAt\n updatedAt\n }\n }\n"]);return z=function(){return n},n}let x=(0,i.Ps)(z());function U(){let n=(0,r._)(["\n mutation updateUserViewFilters($viewName: ViewEnumType!, $viewId: String!, $filters: [JSON]) {\n updateUserViewFilters(viewName: $viewName, viewId: $viewId, filters: $filters) {\n message\n success\n data\n }\n }\n"]);return U=function(){return n},n}let V=(0,i.Ps)(U());t(57688)},70509:function(n,e,t){t.d(e,{l:function(){return $}});var r=t(60737),i=t(14568),s=t(35799),a=t(21761),o=t(26959),l=t(84223),u=t.n(l),c=t(10890),d=t(39231),g=t(72456),m=t(45992),f=t(47030),y=t(61933),S=t(16858);let $=()=>{let{t:n}=(0,c.qM)(),e=(0,o.useRouter)(),t=u()(e,"query.brandId"),{clearAlertTableCache:l,clearAlertDetailCache:$,clearEntityFieldsTableCache:_}=(0,d.mO)(),{showSnackbar:b}=(0,r.useContext)(i.SnackbarContext),{setCreateAlertModalOpen:A}=(0,r.useContext)(f.R),{loadingData:p,loadingCount:L,setQueryOptions:w,setCountQueryOptions:I}=(0,g.z)({query:y.J9,queryAccessor:"getSocialListeningAlertTableByBrand",countQuery:y.KI,countQueryAccessor:"countSocialListeningAlertTableByBrand"}),{loadingData:v,loadingCount:h,setQueryOptions:P,setCountQueryOptions:T}=(0,g.z)({query:y.Ft,queryAccessor:"getSocialListeningAlertMentionsTableByAlert",countQuery:y.R8,countQueryAccessor:"countSocialListeningAlertMentionsTableByAlert"}),[E,k]=(0,r.useState)({skip:!0}),{data:q,loading:C}=(0,s.aM)(y.qm,E),[F,{loading:B}]=(0,a.D)(y.ig,{update(n,e){l(),_(),n.gc()}}),[M,{loading:R}]=(0,a.D)(y.dC,{update(n,e){l(),_(),n.gc()}}),[D,{loading:N}]=(0,a.D)(y.Sd,{update(n,e,t){let{variables:r}=t;(null==r?void 0:r._id)&&$(r._id),l({evictCount:!1}),_(),n.gc()}}),[W,{loading:Q}]=(0,a.D)(y.xz,{update(n){l(),_(),n.gc()}}),[O,{loading:z}]=(0,a.D)(y.s$,{update(n,e,t){let{variables:r}=t;l(n,{evictCount:!1}),(null==r?void 0:r._id)&&$(r._id),n.gc()}}),[x,{loading:U}]=(0,a.D)(y.IM,{update(n,e,t){let{variables:r}=t;l(n,{evictCount:!1}),(null==r?void 0:r._id)&&$(r._id),n.gc()}}),[V,{loading:J}]=(0,a.D)(y.PT,{update(n,e,t){let{variables:r}=t;l(n,{evictCount:!1}),(null==r?void 0:r._id)&&$(r._id),n.gc()}}),[K,{loading:j}]=(0,a.D)(y.y6,{update(n,e,t){let{variables:r}=t;l(n,{evictCount:!1}),(null==r?void 0:r._id)&&$(r._id),n.gc()}}),{sendForm:H}=(0,i.useCreateEditForm)(),{getFilteredDataOptions:X}=(0,d.L0)();return{getSocialListeningAlerts:async function(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"table";try{let{options:r,countOptions:i,page:s}=X(n,{brandId:t,view:e},{brandId:t,view:e});w(r),0===s&&I(i)}catch(n){(0,S.Tb)("Error obtaining alerts",n)}},loadingSocialListeningAlerts:p,loadingCountSocialListeningAlerts:L,createSocialListeningAlert:async(e,r)=>{try{return await H(F,!1,{brandId:t,[e]:r},{FORM_ERROR_TYPES:m.X3,getFormSuccessResponse:m.tj,getFormErrorResponse:m.nD})}catch(e){return(0,S.Tb)("Error creating alert",e),b("error",n("commons.snackbar.error.somethingWentWrong")),!1}},loadingCreateSocialListeningAlert:B,deleteSocialListeningAlerts:async e=>{try{let r=await M({variables:{brandId:t,ids:e}}),i=null==e?void 0:e.length;return b("success",n(i>1?"commons.snackbar.success.deleteAlerts":"commons.snackbar.success.deleteAlert",{count:i})),r}catch(e){return(0,S.Tb)("Error deleting alerts",e),b("error",n("commons.snackbar.error.somethingWentWrong")),!1}},loadingDeleteSocialListeningAlerts:R,editSocialListeningAlert:async e=>{try{return await H(D,!0,{brandId:t,_id:e},{FORM_ERROR_TYPES:m.X3,getFormSuccessResponse:m.tj,getFormErrorResponse:m.nD})}catch(e){return(0,S.Tb)("Error editing alert",e),b("error",n("commons.snackbar.error.somethingWentWrong")),!1}},loadingEditSocialListeningAlert:N,duplicateSocialListeningAlert:async(e,t)=>{try{let r=await W({variables:{_id:e}});return b("success",n("snackbar.duplicate.success",{name:t})),r}catch(e){return(0,S.Tb)("Error duplicating alert",e),14001===u()(e,"graphQLErrors[0].extensions.code")?A(!0):b("error",n("commons.snackbar.error.somethingWentWrong")),!1}},loadingDuplicateSocialListeningAlert:Q,resumeSocialListeningAlert:async e=>{try{return await O({variables:{_id:e}})}catch(e){return(0,S.Tb)("Error resuming alert",e),b("error",n("commons.snackbar.error.somethingWentWrong")),!1}},loadingResumeSocialListeningAlert:z,pauseSocialListeningAlert:async e=>{try{return await x({variables:{_id:e}})}catch(e){return(0,S.Tb)("Error pausing alert",e),b("error",n("commons.snackbar.error.somethingWentWrong")),!1}},loadingPauseSocialListeningAlert:U,getSocialListeningAlertColumns:n=>{try{k({variables:{view:n,brandId:t},skip:!1})}catch(n){(0,S.Tb)("Error obtaining alert columns",n)}},socialListeningAlertColumns:q,loadingSocialListeningAlertColumns:C,addSocialListeningAlertQuery:async(e,t)=>{try{return await V({variables:{_id:e,query:t}})}catch(e){return(0,S.Tb)("Error adding alert query",e),b("error",n("commons.snackbar.error.somethingWentWrong")),!1}},loadingAddSocialListeningAlertQuery:J,runSocialListeningAlert:async e=>{try{return await K({variables:{_id:e}})}catch(e){return(0,S.Tb)("Error running alert",e),b("error",n("commons.snackbar.error.somethingWentWrong")),e}}
1,loadingRunSocialListeningAlert:j,getSocialListeningAlertMentions:async function(n,e,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"table";try{let{options:s,countOptions:a,page:o}=X(r,{socialListeningAlertId:n,sharedId:e,view:i},{socialListeningAlertId:n,sharedId:e,view:i});P({...s,skip:!t&&!e}),0===o&&T({...a,skip:!t&&!e})}catch(n){(0,S.Tb)("Error obtaining alert mentions",n)}},loadingSocialListeningAlertMentions:v,loadingCountSocialListeningAlertMentions:h}}}}]); 2//# sourceMappingURL=509-ddd26da4343f62aa.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.