PATH:
home
/
lab2454c
/
argowells.com
/
wp-content
/
plugins
/
elementor
/
assets
/
js
/
packages
/
editor-current-user
!function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ensureUser:function(){return y},getCurrentUser:function(){return l},onSetUser:function(){return f},useCurrentUser:function(){return o},useCurrentUserCapabilities:function(){return p},useSuppressedMessage:function(){return d},useUpdateCurrentUser:function(){return c}});var r=window.elementorV2.query,n=window.elementorV2.httpClient;const s="elementor/v1/user-data/current-user",u={params:{context:"edit"}},i={get:()=>(0,n.httpService)().get(s,u).then(e=>{const{capabilities:t=[],suppressedMessages:r=[]}=e.data;return{capabilities:t,suppressedMessages:r}}),update:e=>(0,n.httpService)().patch(s,{suppressedMessages:e.suppressedMessages})},a="editor-current-user",o=()=>(0,r.useQuery)({queryKey:[a],queryFn:i.get}),c=()=>{const e=(0,r.useQueryClient)();return(0,r.useMutation)({mutationFn:i.update,onSuccess:()=>e.invalidateQueries({queryKey:[a]})})},d=e=>{const{data:t}=o(),{mutate:r}=c(),n=!!t?.suppressedMessages.includes(e);return[n,()=>{n||r({suppressedMessages:[...t?.suppressedMessages??[],e]})}]},p=()=>{const{data:e}=o();return{canUser:t=>Boolean(e?.capabilities.includes(t)),isAdmin:Boolean(e?.capabilities.includes("manage_options")),capabilities:e?.capabilities}},l=()=>(0,r.getQueryClient)().getQueryData([a]);async function y(){return(0,r.getQueryClient)().ensureQueryData({queryKey:[a],queryFn:i.get,retry:!1})}var g=window.elementorV2.editorV1Adapters;function f(e){let t;const n=(0,g.__privateListenTo)((0,g.v1ReadyEvent)(),()=>{const n=(0,r.getQueryClient)();t=n.getQueryCache().subscribe(t=>{t.query.queryKey.includes(a)&&e(t.query.state.data)})});return()=>{t(),n()}}(window.elementorV2=window.elementorV2||{}).editorCurrentUser=t}(),window.elementorV2.editorCurrentUser?.init?.();
[-] editor-current-user.js.LICENSE.txt
[edit]
[-] editor-current-user.min.js
[edit]
[-] editor-current-user.asset.php
[edit]
[+]
..
[-] editor-current-user.strings.js
[edit]
[-] editor-current-user.js
[edit]