PATH:
home
/
lab2454c
/
incforce.com
/
wp-content
/
plugins
/
elementor
/
assets
/
js
/
packages
/
editor-site-navigation
!function(){"use strict";var e={d:function(t,n){for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},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,{extendIconsMap:function(){return g}});var n=window.elementorV2.icons,o=window.React,a=window.elementorV2.ui,r=window.elementorV2.editorDocuments,i=window.wp.apiFetch,l=window.wp.url,s=window.wp.i18n,c=window.elementorV2.editorAppBar,u=window.elementorV2.editorPanels,m=window.elementorV2.query,d=window.elementorV2.env,p={page:n.PageTemplateIcon,section:n.SectionTemplateIcon,container:n.ContainerTemplateIcon,"wp-page":n.PageTypeIcon,"wp-post":n.PostTypeIcon};function g(e){Object.assign(p,e)}function E({title:e,status:t}){return o.createElement(y,{title:e},o.createElement(a.Stack,{component:"span",direction:"row",alignItems:"center",spacing:.5},o.createElement(a.Typography,{component:"span",variant:"body2",sx:{maxWidth:"120px"},noWrap:!0},e),"publish"!==t.value&&o.createElement(a.Typography,{component:"span",variant:"body2",sx:{fontStyle:"italic"}},"(",t.label,")")))}function y(e){return o.createElement(a.Tooltip,{PopperProps:{sx:{"&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom":{mt:2.7}}},...e})}var _="/elementor/v1/site-navigation/recent-posts";var f=p;function v({postType:e,docType:t,label:r}){const i="elementor_library"===e?"global":"primary",l=f[t]||n.PostTypeIcon;return o.createElement(a.Chip,{component:"span",size:"small",variant:"outlined",label:r,"data-value":t,color:i,icon:o.createElement(l,null),sx:{ml:1,cursor:"inherit"}})}function h(e=""){return(0,o.useMemo)((()=>{const t=document.createElement("textarea");t.innerHTML=e;const{value:n}=t;return t.remove(),n}),[e])}function P({post:e,closePopup:t,...n}){const i=(0,r.__useNavigateToDocument)(),l=h(e.title);return o.createElement(a.MenuItem,{onClick:async()=>{t(),await i(e.id)},...n},o.createElement(a.ListItemText,{sx:{flexGrow:0},primaryTypographyProps:{variant:"body2",noWrap:!0},primary:l}),o.createElement(v,{postType:e.type.post_type,docType:e.type.doc_type,label:e.type.label}))}var w="/elementor/v1/site-navigation/add-new-post";function I({closePopup:e,...t}){const{create:l,isLoading:c}=function(){const[e,t]=(0,o.useState)(!1);return{create:()=>(t(!0),async function(){return await i({path:w,method:"POST",data:{post_type:"page"}})}().then((e=>e)).finally((()=>t(!1)))),isLoading:e}}(),u=(0,r.__useNavigateToDocument)();return o.createElement(a.MenuItem,{onClick:async()=>{const{id:t}=await l();e(),await u(t)},...t},o.createElement(a.ListItemIcon,null,c?o.createElement(a.CircularProgress,{size:"1.25rem"}):o.createElement(n.PlusIcon,{fontSize:"small"})),o.createElement(a.ListItemText,{primaryTypographyProps:{variant:"body2"},primary:(0,s.__)("Add new page","elementor")}))}var b={page:{labels:{singular_name:(0,s.__)("Page","elementor"),plural_name:(0,s.__)("Pages","elementor")},rest_base:"pages"}},x=(e,t)=>{const n=`/wp/v2/${b[e].rest_base}`;return i({path:n,method:"POST",data:t})},T=(e,t)=>{const n=`/wp/v2/${b[e].rest_base}`,{id:o,...a}=t;return i({path:`${n}/${o}`,method:"POST",data:a})},S=(e,t)=>{const n=`/wp/v2/${b[e].rest_base}`;return i({path:`${n}/${t}`,method:"DELETE"})},L=e=>i({path:"/elementor/v1/site-navigation/duplicate-post",method:"POST",data:{post_id:e.id,title:e.title}}),M=e=>["site-navigation","posts",e],C={type:"page",editMode:{mode:"none",details:{}},setEditMode:()=>null,resetEditMode:()=>null},B=(0,o.createContext)(C),D=({type:e,children:t})=>{const[n,a]=(0,o.useState)(C.editMode);return o.createElement(B.Provider,{value:{type:e,editMode:n,setEditMode:a,resetEditMode:()=>{a(C.editMode)}}},t)};function k(){const e=(0,o.useContext)(B);if(!e)throw new Error("The `usePostListContext()` hook must be used within an `<PostListContextProvider />`");return e}var O=(0,a.styled)(n.ChevronDownIcon,{shouldForwardProp:e=>"isOpen"!==e})((({theme:e,isOpen:t})=>({transform:t?"rotate(0deg)":"rotate(-90deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.standard})})));function A({label:e,Icon:t,isOpenByDefault:n=!1,children:r}){const[i,l]=(0,o.useState)(n);return o.createElement(o.Fragment,null,o.createElement(a.ListItem,null,o.createElement(a.ListItemIcon,null,o.createElement(a.IconButton,{onClick:()=>l((e=>!e)),sx:{color:"inherit"},size:"small"},o.createElement(O,{fontSize:"small",isOpen:i}))),o.createElement(a.ListItemIcon,null,o.createElement(t,null)),o.createElement(a.ListItemText,{primaryTypographyProps:{variant:"subtitle1",component:"span",sx:{fontWeight:"bold"}},primary:e})),o.createElement(a.Collapse,{in:i,timeout:"auto",unmountOnExit:!0},o.createElement(a.List,{dense:!0},r)),o.createElement(a.Divider,{sx:{my:3}}))}function F(e){const t=function(e){const t=(0,m.useQueryClient)();return(n={})=>{const o=M(e);return t.invalidateQueries({queryKey:o},n)}}(e),n=()=>t({exact:!0});return{createPost:(0,m.useMutation)({mutationFn:t=>x(e,t),onSuccess:n}),updatePost:(0,m.useMutation)({mutationFn:t=>T(e,t),onSuccess:n}),deletePost:(0,m.useMutation)({mutationFn:t=>S(e,t),onSuccess:n}),duplicatePost:(0,m.useMutation)({mutationFn:e=>L(e),onSuccess:n})}}function z({postTitle:e,isLoading:t,callback:n}){const r=(0,o.useRef)(),[i,l]=(0,o.useState)(""),c=(0,o.useRef)(),u=()=>{(()=>{let e=!0;return""===r.current?.value&&(e=!1,l((0,s.__)("Name is required","elementor"))),e})()&&n(r.current?.value||"")};return o.createElement(a.ListItem,{sx:{pt:1,pl:0},secondaryAction:o.createElement(V,{isLoading:t,closeButton:c})},o.createElement(a.Box,{width:"100%",sx:{ml:4,pr:3},component:"form",onSubmit:e=>{e.preventDefault(),u()}},o.createElement(a.TextField,{autoFocus:!0,fullWidth:!0,ref:r,defaultValue:e,disabled:t,error:!!i,onBlur:e=>{c.current!==e.relatedTarget&&u()},variant:"outlined",color:"secondary",size:"small",margin:"dense"})))}function V({isLoading:e,closeButton:t}){const{resetEditMode:r}=k();return o.createElement(a.IconButton,{size:"small",color:"secondary",onClick:r,ref:t,disabled:e},e?o.createElement(a.CircularProgress,null):o.createElement(n.XIcon,{fontSize:"small"}))}function $({post:e}){const{type:t,resetEditMode:n}=k(),{updatePost:a}=F(t);return o.createElement(z,{postTitle:e.title.rendered,isLoading:a.isPending,callback:t=>{t===e.title.rendered&&n(),a.mutateAsync({id:e.id,title:t},{onSuccess:()=>{n()}})}})}function H(){const{type:e,resetEditMode:t}=k(),{createPost:n}=F(e),a=(0,r.__useNavigateToDocument)();return o.createElement(z,{postTitle:(0,s.__)("New Page","elementor"),isLoading:n.isPending,callback:e=>{n.mutateAsync({title:e,status:"draft"},{onSuccess:e=>{t(),a(e.id)}})}})}function j(){const{type:e,editMode:t,resetEditMode:n}=k(),a=(0,r.__useNavigateToDocument)(),{duplicatePost:i}=F(e);return"duplicate"!==t.mode?null:o.createElement(z,{postTitle:`${t.details.title} ${(0,s.__)("copy","elementor")}`,isLoading:i.isPending,callback:e=>{i.mutateAsync({id:t.details.postId,title:e},{onSuccess:e=>{n(),a(e.post_id)}})}})}var N=({status:e})=>"publish"===e?null:o.createElement(a.Typography,{component:"span",variant:"body2",sx:{textTransform:"capitalize",fontStyle:"italic",whiteSpace:"nowrap",flexBasis:"content"}},"(",e,")"),q=({title:e})=>{const t=h(e);return o.createElement(a.Typography,{component:"span",variant:"body2",noWrap:!0,sx:{flexBasis:"auto"}},t)};function W({page:e}){return o.createElement(a.Box,{display:"flex"},o.createElement(q,{title:e.title.rendered})," ",o.createElement(N,{status:e.status}))}function Q({title:e,icon:t,ListItemButtonProps:n}){return o.createElement(a.MenuItem,{disableGutters:!0},o.createElement(a.ListItemButton,{...n},o.createElement(a.ListItemIcon,null,o.createElement(t,null)),o.createElement(a.ListItemText,{primary:e})))}function R({post:e}){const{setEditMode:t}=k();return o.createElement(Q,{title:(0,s.__)("Rename","elementor"),icon:n.EraseIcon,ListItemButtonProps:{onClick:()=>{t({mode:"rename",details:{postId:e.id}})}}})}function K({post:e,popupState:t}){const{setEditMode:a}=k();return o.createElement(Q,{title:(0,s.__)("Duplicate","elementor"),icon:n.CopyIcon,ListItemButtonProps:{onClick:()=>{t.close(),a({mode:"duplicate",details:{postId:e.id,title:e.title.rendered}})}}})}function G({post:e}){const[t,a]=(0,o.useState)(!1),i=(0,r.__useActiveDocument)(),l=i?.id===e.id;return o.createElement(o.Fragment,null,o.createElement(Q,{title:(0,s.__)("Delete","elementor"),icon:n.TrashIcon,ListItemButtonProps:{disabled:e.isHome||l,onClick:()=>a(!0),sx:{"&:hover":{color:"error.main"}}}}),t&&o.createElement(U,{post:e,setIsDialogOpen:a}))}function U({post:e,setIsDialogOpen:t}){const{type:n}=k(),{deletePost:r}=F(n),i=(0,s.sprintf)((0,s.__)('Delete "%s"?',"elementor"),e.title.rendered),l=()=>{r.isPending||t(!1)};return o.createElement(a.Dialog,{open:!0,onClose:l,"aria-labelledby":"delete-dialog"},o.createElement(a.DialogTitle,{noWrap:!0},i),o.createElement(a.Divider,null),o.createElement(a.DialogContent,null,o.createElement(a.DialogContentText,null,(0,s.__)("The page and its content will be deleted forever and we won’t be able to recover them.","elementor"))),o.createElement(a.DialogActions,null,o.createElement(a.Button,{variant:"contained",color:"secondary",onClick:l,disabled:r.isPending},(0,s.__)("Cancel","elementor")),o.createElement(a.Button,{variant:"contained",color:"error",onClick:async()=>{await r.mutateAsync(e.id)},disabled:r.isPending},r.isPending?o.createElement(a.CircularProgress,null):(0,s.__)("Delete","elementor"))))}function X({post:e}){const{type:t}=k(),a=(0,s.__)("View %s","elementor").replace("%s",b[t].labels.singular_name);return o.createElement(Q,{title:a,icon:n.EyeIcon,ListItemButtonProps:{onClick:()=>window.open(e.link,"_blank")}})}var J=e=>i({path:"/wp/v2/settings",method:"POST",data:e}),Y=()=>["site-navigation","homepage"];function Z({post:e}){const{updateSettingsMutation:t}=function(){const e=function(){const e=(0,m.useQueryClient)();return(t={})=>{const n=Y();return e.invalidateQueries({queryKey:n},t)}}();return{updateSettingsMutation:(0,m.useMutation)({mutationFn:e=>J(e),onSuccess:async()=>e({exact:!0})})}}();return o.createElement(Q,{title:(0,s.__)("Set as homepage","elementor"),icon:t.isPending?a.CircularProgress:n.HomeIcon,ListItemButtonProps:{disabled:!!e.isHome||"publish"!==e.status||t.isPending,onClick:()=>{t.mutateAsync({show_on_front:"page",page_on_front:e.id})}}})}function ee({post:e}){const t=(0,r.__useActiveDocument)(),i=(0,r.__useNavigateToDocument)(),l=(0,a.usePopupState)({variant:"popover",popupId:"post-actions",disableAutoFocus:!0}),c=t?.id===e.id;return o.createElement(o.Fragment,null,o.createElement(a.ListItem,{disablePadding:!0,secondaryAction:o.createElement(a.ToggleButton,{value:!0,color:"secondary",size:"small",selected:l.isOpen,...(0,a.bindTrigger)(l)},o.createElement(n.DotsVerticalIcon,{fontSize:"small"}))},o.createElement(a.ListItemButton,{selected:c,onClick:()=>{c||i(e.id)},dense:!0,disableGutters:!0},o.createElement(a.ListItemIcon,null),o.createElement(a.ListItemText,{disableTypography:!0},o.createElement(W,{page:e})),e.isHome&&o.createElement(a.ListItemIcon,null,o.createElement(n.HomeIcon,{titleAccess:(0,s.__)("Homepage","elementor"),color:"disabled"})))),o.createElement(a.Menu,{PaperProps:{sx:{mt:2,width:200}},MenuListProps:{dense:!0},...(0,a.bindMenu)(l)},o.createElement(R,{post:e}),o.createElement(K,{post:e,popupState:l}),o.createElement(G,{post:e}),o.createElement(X,{post:e}),o.createElement(a.Divider,null),o.createElement(Z,{post:e})))}function te({post:e}){const{editMode:t}=k();return"rename"===t.mode&&e?.id&&e?.id===t.details.postId?o.createElement($,{post:e}):"create"!==t.mode||e?"duplicate"!==t.mode||e?e?o.createElement(ee,{post:e}):null:o.createElement(j,null):o.createElement(H,null)}function ne(){const{setEditMode:e}=k();return o.createElement(a.Button,{size:"small",sx:{mt:4,mb:4,mr:5},startIcon:o.createElement(n.PlusIcon,null),onClick:()=>{e({mode:"create",details:{}})}},(0,s.__)("Add New","elementor"))}function oe({isOpenByDefault:e=!1}){const{type:t,editMode:r}=k(),{data:l,isLoading:s}=(c=t,(0,m.useQuery)({queryKey:M(c),queryFn:()=>(e=>{const t=`/wp/v2/${b[e].rest_base}?`+new URLSearchParams({status:"any",per_page:"-1",order:"asc",_fields:["id","type","title","link","status"].join(",")}).toString();return i({path:t})})(c)}));var c;const{data:u}=(0,m.useQuery)({queryKey:Y(),queryFn:()=>(()=>{const e="/wp/v2/settings?"+new URLSearchParams({_fields:["show_on_front","page_on_front"].join(",")}).toString();return i({path:e})})()});if(!l||s)return o.createElement(a.Box,{sx:{px:5}},o.createElement(a.Box,{display:"flex",justifyContent:"flex-end",alignItems:"center"},o.createElement(a.Skeleton,{sx:{my:4},animation:"wave",variant:"rounded",width:"110px",height:"28px"})),o.createElement(a.Box,null,o.createElement(a.Skeleton,{sx:{my:3},animation:"wave",variant:"rounded",width:"100%",height:"24px"}),o.createElement(a.Skeleton,{sx:{my:3},animation:"wave",variant:"rounded",width:"70%",height:"24px"}),o.createElement(a.Skeleton,{sx:{my:3},animation:"wave",variant:"rounded",width:"70%",height:"24px"}),o.createElement(a.Skeleton,{sx:{my:3},animation:"wave",variant:"rounded",width:"70%",height:"24px"})));const d=`${b[t].labels.plural_name} (${l.length.toString()})`,p="page"===u?.show_on_front&&u?.page_on_front?u.page_on_front:null;return o.createElement(o.Fragment,null,o.createElement(a.Box,{display:"flex",justifyContent:"flex-end",alignItems:"center"},o.createElement(ne,null)),o.createElement(a.List,{dense:!0},o.createElement(A,{label:d,Icon:n.PageTypeIcon,isOpenByDefault:e||!1},l.map((e=>(e={...e,isHome:e.id===p},o.createElement(te,{key:e.id,post:e})))),["duplicate","create"].includes(r.mode)&&o.createElement(te,null))))}var{panel:ae,usePanelStatus:re,usePanelActions:ie}=(0,u.__createPanel)({id:"site-navigation-panel",component:()=>o.createElement(u.Panel,null,o.createElement(u.PanelHeader,null,o.createElement(u.PanelHeaderTitle,null,(0,s.__)("Pages","elementor"))),o.createElement(u.PanelBody,null,o.createElement(D,{type:"page"},o.createElement(oe,{isOpenByDefault:!0}))))});var{env:le,validateEnv:se}=(0,d.parseEnv)("@elementor/editor-site-navigation",(e=>e));(0,c.injectIntoPageIndication)({id:"document-recently-edited",component:function(){const e=(0,r.__useActiveDocument)(),t=(0,r.__useHostDocument)(),c=e&&"kit"!==e.type.value?e:t,{recentPosts:u}=function(e){const[t,n]=(0,o.useState)([]),[a,r]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{e&&(r(!0),async function(e){const t={posts_per_page:5,post__not_in:e};return await i({path:(0,l.addQueryArgs)(_,t)}).then((e=>e)).catch((()=>[]))}(e).then((e=>{n(e),r(!1)})))}),[e]),{isLoading:a,recentPosts:t}}(c?.id),m=(0,a.usePopupState)({variant:"popover",popupId:"elementor-v2-top-bar-recently-edited"}),d=h(c?.title);return c?o.createElement(o.Fragment,null,o.createElement(a.Button,{color:"inherit",size:"small",endIcon:o.createElement(n.ChevronDownIcon,{fontSize:"small"}),...(0,a.bindTrigger)(m)},o.createElement(E,{title:d,status:c.status})),o.createElement(a.Menu,{MenuListProps:{subheader:o.createElement(a.ListSubheader,{color:"primary",sx:{fontStyle:"italic",fontWeight:"300"}},(0,s.__)("Recent","elementor"))},PaperProps:{sx:{mt:2.5,width:320}},...(0,a.bindMenu)(m)},u.map((e=>o.createElement(P,{key:e.id,post:e,closePopup:m.close}))),0===u.length&&o.createElement(a.MenuItem,{disabled:!0},o.createElement(a.ListItemText,{primaryTypographyProps:{variant:"caption",fontStyle:"italic"},primary:(0,s.__)("There are no other pages or templates on this site yet.","elementor")})),o.createElement(a.Divider,{disabled:0===u.length}),o.createElement(I,{closePopup:m.close}))):null}}),le.is_pages_panel_active&&((0,u.__registerPanel)(ae),c.toolsMenu.registerToggleAction({id:"toggle-site-navigation-panel",priority:2,useProps:function(){const{isOpen:e,isBlocked:t}=re(),{open:o,close:a}=ie();return{title:(0,s.__)("Pages","elementor"),icon:n.PagesIcon,onClick:()=>e?a():o(),selected:e,disabled:t}}})),(window.elementorV2=window.elementorV2||{}).editorSiteNavigation=t}();
[-] editor-site-navigation.min.js
[edit]
[+]
..
[-] editor-site-navigation.asset.php
[edit]
[-] editor-site-navigation.strings.js
[edit]
[-] editor-site-navigation.js
[edit]
[-] editor-site-navigation.js.LICENSE.txt
[edit]