dvadf
File manager - Edit - /home/centroca/public_html/wp/wp-content/plugins/elementor/assets/js/packages/editor-design-system/editor-design-system.min.js
Back
!function(){"use strict";var e={5527:function(e){e.exports=window.elementorV2.editorV1Adapters},18998:function(e){e.exports=window.elementorV2.httpClient},22504:function(e){e.exports=window.elementorV2.editor},24413:function(e){e.exports=window.elementorV2.icons},24778:function(e){e.exports=window.elementorV2.editorNotifications},27723:function(e){e.exports=window.wp.i18n},29865:function(e){e.exports=window.elementorV2.editorGlobalClasses},33176:function(e){e.exports=window.elementorV2.events},40213:function(e){e.exports=window.elementorV2.editorVariables},45643:function(e){e.exports=window.elementorV2.query},46280:function(e){e.exports=window.elementorV2.editorDocuments},46400:function(e){e.exports=window.elementorV2.editorCurrentUser},51061:function(e){e.exports=window.elementorV2.editorPanels},62865:function(e,t,n){var o,i=Object.create,s=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,l=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,__copyProps=(e,t,n,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of a(t))c.call(e,i)||i===n||s(e,i,{get:()=>t[i],enumerable:!(o=r(t,i))||o.enumerable});return e},__toESM=(e,t,n)=>(n=null!=e?i(l(e)):{},__copyProps(!t&&e&&e.__esModule?n:s(n,"default",{value:e,enumerable:!0}),e)),m={};((e,t)=>{for(var n in t)s(e,n,{get:t[n],enumerable:!0})})(m,{getInitialDesignSystemTab:()=>getInitialDesignSystemTab,init:()=>init,panel:()=>ke,persistDesignSystemTab:()=>persistDesignSystemTab,usePanelActions:()=>Ie,usePanelStatus:()=>Pe}),e.exports=(o=m,__copyProps(s({},"__esModule",{value:!0}),o));var u=n(22504),d=n(67660),p=n(51061),g=__toESM(n(97557)),f=n(97557),y=n(46280),v=n(70374),w=n(5527),b=n(27723),E=__toESM(n(97557)),_=n(46280),h=n(51061),S=n(5527),x=__toESM(n(97557)),C=n(97557),D=n(29865),T=n(51061),k=n(70374),P=n(40213),I=n(24413),O=n(79513),z=n(27723),A="elementor_editor_design_system_active_tab";function readStoredTab(){if("undefined"==typeof window)return"variables";try{const e=window.localStorage.getItem(A);if("classes"===e||"variables"===e)return e}catch{}return"variables"}var R=null,V=readStoredTab();function setPendingDesignSystemTab(e){R=e}function getInitialDesignSystemTab(){if(R){const e=R;return R=null,V=e,persistDesignSystemTab(e),e}const e=readStoredTab();return V=e,e}function notifyDesignSystemTabChange(e){V=e}function getActiveDesignSystemTab(){return V}function persistDesignSystemTab(e){if("undefined"!=typeof window)try{window.localStorage.setItem(A,e)}catch{}}var L=__toESM(n(97557)),M=n(46400),F=n(70374),U=n(24413),B=n(45643),j=n(79513),N=n(27723),H=n(24778),q=n(27723),Y="design-system-export-started",K="design-system-export-failed",G=n(18998),$=n(45643),W="design-system-export",Q={include:["settings"],kitInfo:{title:"design-system",description:"",source:"local"},customization:{settings:{theme:!1,classes:!0,variables:!0}}},J=class extends Error{constructor(e){super("Design system export failed"),this.name="DesignSystemExportError",this.cause=e}},base64ToZipBlob=e=>{const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return new Blob([n],{type:"application/zip"})},X=n(82148),Z=n(5527),ee=n(18998),te=n(45643),ne="elementor/v1/import-export-customization",oe=12e4,ie=["global-classes","global-variables"],se="design-system-import",re=class extends Error{constructor(e){super("Design system upload validation failed"),this.name="DesignSystemUploadValidationError",this.cause=e}},uploadKit=async e=>{const t=new FormData;t.append("e_import_file",e);try{const{data:e}=await(0,ee.httpService)().post(`${ne}/upload`,t,{headers:{"Content-Type":"multipart/form-data"},timeout:oe});return e.data.session}catch(e){throw new re(e)}},startImport=async(e,t)=>{const n={"design-system":{conflict_resolution:"keep"===t?"skip":"replace"}},{data:o}=await(0,ee.httpService)().post(`${ne}/import`,{session:e,include:["design-system"],customization:n},{timeout:oe});return(o.data.runners??[]).filter(e=>ie.includes(e))},runRunners=async(e,t)=>{for(const n of t)await(0,ee.httpService)().post(`${ne}/import-runner`,{session:e,runner:n},{timeout:oe})},ae=__toESM(n(97557)),le=n(70374),ce=n(24413),me=n(79513),ue=n(27723),de=__toESM(n(97557)),pe=n(79513),ge=n(27723),ConflictOptions=({value:e,onChange:t})=>{const n=[{value:"replace",title:(0,ge.__)("Replace existing values","elementor"),description:(0,ge.__)("Imported design system values will overwrite existing variables and classes.","elementor")},{value:"keep",title:(0,ge.__)("Keep existing values","elementor"),description:(0,ge.__)("Existing variables and classes will not change.","elementor")}];return de.createElement(pe.Stack,{spacing:1},de.createElement(pe.Typography,{variant:"body1"},(0,ge.__)("How to handle conflicts with existing variables or classes?","elementor")),de.createElement(pe.RadioGroup,{value:e??"",onChange:(e,n)=>t(n)},de.createElement(pe.Stack,{spacing:1},n.map(n=>de.createElement(pe.Card,{key:n.value,variant:"outlined"},de.createElement(pe.CardActionArea,{onClick:()=>t(n.value)},de.createElement(pe.Stack,{direction:"row",alignItems:"center",spacing:2,padding:2},de.createElement(pe.Radio,{value:n.value,checked:e===n.value,inputProps:{"aria-label":n.title}}),de.createElement(pe.Stack,{direction:"column",spacing:.5},de.createElement(pe.Typography,{variant:"subtitle2"},n.title),de.createElement(pe.Typography,{variant:"caption",color:"text.secondary"},n.description)))))))))},fe=n(97557),ye={file:null,conflictStrategy:null},ve=n(24778),we=n(45643),be=n(27723),Ee="design-system-import-started",_e="design-system-import-failed",he=n(33176),Se="design_system",trackDesignSystem=e=>{const{dispatchEvent:t,config:n}=(0,he.getMixpanel)(),o=n?.names?.design_system?.[e.event];if(!o)return;const{event:i,...s}=e;try{t?.(o,{event:i,...s})}catch{}},xe=["application/zip"],reopenSelf=()=>{trackDesignSystem({event:"importOpened"}),(0,le.openDialog)({component:ae.createElement(ImportDesignSystemDialog,{onClose:le.closeDialog})})},ImportDesignSystemDialog=({onClose:e})=>{const{file:t,conflictStrategy:n,setFile:o,setConflictStrategy:i}=(()=>{const[e,t]=(0,fe.useState)(ye);return{...e,setFile:e=>t(t=>({...t,file:e})),setConflictStrategy:e=>t(t=>({...t,conflictStrategy:e}))}})(),s=(0,te.useMutation)({mutationKey:[se],mutationFn:async({file:e,conflictStrategy:t})=>{await(0,Z.__privateRunCommand)("document/save/auto",{force:!0});const n=await uploadKit(e),o=await startImport(n,t);await runRunners(n,o),window.dispatchEvent(new CustomEvent(X.GLOBAL_STYLES_IMPORTED_EVENT))}}),r=Boolean(t&&n);return ae.createElement(ae.Fragment,null,ae.createElement(me.DialogHeader,{logo:!1},ae.createElement(me.DialogTitle,null,(0,ue.__)("Import Design System","elementor"))),ae.createElement(me.DialogContent,null,ae.createElement(me.Stack,{spacing:3},t?ae.createElement(le.FileUploadRow,{file:t,onRemove:()=>o(null)}):ae.createElement(le.FileUploadDropzone,{onFileSelected:e=>{o(e),trackDesignSystem({event:"fileSelected",file_type:Se})},allowedFileTypes:xe,accept:"application/zip,.zip",regionLabel:(0,ue.__)("Design system file dropzone","elementor"),helperText:(0,ue.sprintf)((0,ue.__)("zip (max. %dMB)","elementor"),3)}),ae.createElement(ConflictOptions,{value:n,onChange:e=>{i(e),trackDesignSystem({event:"conflictChoice",choice:e})}}),ae.createElement(me.Stack,{direction:"row",spacing:.5,alignItems:"center",justifyContent:"flex-start"},ae.createElement(ce.HelpIcon,{sx:{fontSize:16,color:"text.tertiary"}}),ae.createElement(me.Link,{href:"https://go.elementor.com/wp-dash-import-export-design-system/",target:"_blank",rel:"noopener noreferrer",underline:"always",variant:"caption",color:"text.tertiary"},(0,ue.__)("Learn how design system imports work","elementor"))))),ae.createElement(me.DialogActions,null,ae.createElement(me.Button,{size:"medium",color:"secondary",onClick:e},(0,ue.__)("Cancel","elementor")),ae.createElement(me.Button,{size:"medium",variant:"contained",color:"primary",disabled:!r,onClick:async()=>{if(t&&n){trackDesignSystem({event:"confirmed",conflict_choice:n}),(0,ve.notify)({id:Ee,type:"info",message:(0,be.__)("Import in Progress. You will be notified when the import is complete.","elementor")}),e();try{await s.mutateAsync({file:t,conflictStrategy:n}),trackDesignSystem({event:"imported"}),(0,ve.dismissNotification)(Ee),(0,ve.notify)({id:"design-system-import-succeeded",type:"success",message:(0,be.__)("Design system imported","elementor")})}catch(e){trackDesignSystem(e instanceof re?{event:"validationFailed",file_type:Se}:{event:"importFailed"}),o=reopenSelf,(0,ve.dismissNotification)(Ee),(0,ve.notify)({id:_e,type:"error",message:(0,be.__)("Your design system import failed","elementor"),additionalActionProps:[{size:"small",variant:"outlined",color:"error",children:(0,be.__)("Try again","elementor"),onClick:()=>{(0,ve.dismissNotification)(_e),(0,we.getQueryClient)().isMutating({mutationKey:[se]})>0||o()}}]})}var o}}},(0,ue.__)("Import","elementor"))))},DesignSystemHeaderMenu=()=>{const{isAdmin:e}=(0,M.useCurrentUserCapabilities)(),t=(0,j.usePopupState)({variant:"popover",popupId:"design-system-header-menu"}),n=(0,$.useMutation)({mutationKey:[W],mutationFn:async()=>{try{const{data:e}=await(0,G.httpService)().post("elementor/v1/import-export-customization/export",Q,{timeout:12e4});return{fileName:"design-system-export.zip",blob:base64ToZipBlob(e.data.file)}}catch(e){throw new J(e)}}}),o=(0,B.useIsMutating)({mutationKey:[se]})>0,i=(0,B.useIsMutating)({mutationKey:[W]})>0,s=o||i,r=(0,j.bindTrigger)(t),runExport=async()=>{(0,H.notify)({id:Y,type:"info",message:(0,q.__)("Export in progress. Your file will download when it’s ready.","elementor")});try{const{blob:e,fileName:t}=await n.mutateAsync();((e,t)=>{const n=URL.createObjectURL(e),o=document.createElement("a");o.href=n,o.download=t,o.rel="noopener",document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(n)})(e,t),(0,H.dismissNotification)(Y),(0,H.notify)({id:"design-system-export-succeeded",type:"success",message:(0,q.__)("Design system exported","elementor")})}catch{e=runExport,(0,H.dismissNotification)(Y),(0,H.notify)({id:K,type:"error",message:(0,q.__)("Your design system export failed","elementor"),additionalActionProps:[{size:"small",variant:"outlined",color:"error",children:(0,q.__)("Try again","elementor"),onClick:()=>{(0,H.dismissNotification)(K),e()}}]})}var e},a=(0,N.__)("Design system actions","elementor"),l=(0,N.__)("Export is in progress. The file will be downloaded when it's complete.","elementor"),c=(0,N.__)("Import is in progress. You will receive a notification when it's complete.","elementor");let m=a;return s&&(m=i?l:c),L.createElement(L.Fragment,null,e&&L.createElement(j.Tooltip,{title:m,placement:"top"},L.createElement("span",null,L.createElement(j.IconButton,{...r,size:"small","aria-label":a,disabled:s},L.createElement(U.DotsVerticalIcon,{fontSize:"small"})))),L.createElement(j.Menu,{...(0,j.bindMenu)(t),MenuListProps:{dense:!0},PaperProps:{elevation:6},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},L.createElement(j.MenuItem,{onClick:()=>{t.close(),trackDesignSystem({event:"importOpened"}),(0,F.openDialog)({component:L.createElement(ImportDesignSystemDialog,{onClose:F.closeDialog})})},disabled:o},L.createElement(j.ListItemIcon,null,L.createElement(U.UploadIcon,{fontSize:"tiny"})),L.createElement(j.ListItemText,null,(0,N.__)("Import","elementor"))),L.createElement(j.MenuItem,{onClick:()=>{t.close(),trackDesignSystem({event:"export"}),runExport()},disabled:i},L.createElement(j.ListItemIcon,null,L.createElement(U.DownloadIcon,{fontSize:"tiny"})),L.createElement(j.ListItemText,null,(0,N.__)("Export","elementor")))))},Ce={position:"sticky",zIndex:1100,opacity:1,backgroundColor:"background.default",transition:"top 300ms ease"},De="elementor/design-system/set-tab",trackDesignSystemTabOpened=e=>{switch(e){case"classes":(0,D.trackGlobalClasses)({event:"classManagerOpened",source:"system-panel"});break;case"variables":(0,P.trackVariablesManagerEvent)({action:"openManager",source:"system-panel"})}};function DesignSystemPanelContent({onRequestClose:e}){const[t,n]=(0,C.useState)(()=>getInitialDesignSystemTab()),o=(0,C.useRef)(null),i=(0,C.useRef)(null),s=(0,C.useRef)(!1),{getTabProps:r,getTabPanelProps:a,getTabsProps:l}=(0,O.useTabs)(t),c=(0,C.useCallback)(()=>{if(!s.current&&i.current)return s.current=!0,i.current(),void(s.current=!1);e()},[e]),m=(0,C.useCallback)(()=>{if(!s.current&&o.current)return s.current=!0,o.current(),void(s.current=!1);e()},[e]);(0,C.useEffect)(()=>{notifyDesignSystemTabChange(t)},[t]),(0,C.useEffect)(()=>{const handler=e=>{const t=e.detail?.tab;t&&(n(t),persistDesignSystemTab(t),notifyDesignSystemTabChange(t),trackDesignSystemTabOpened(t))};return window.addEventListener(De,handler),()=>{window.removeEventListener(De,handler)}},[]);return x.createElement(k.ThemeProvider,null,x.createElement(T.Panel,null,x.createElement(T.PanelHeader,null,x.createElement(O.Stack,{p:1,pl:2,width:"100%",direction:"row",alignItems:"center",spacing:.5},x.createElement(T.PanelHeaderTitle,{sx:{flex:1,minWidth:0}},(0,z.__)("Design system","elementor")),x.createElement(DesignSystemHeaderMenu,null),x.createElement(O.CloseButton,{"aria-label":(0,z.__)("Close","elementor"),sx:{flexShrink:0},onClick:()=>{"variables"===t&&o.current?o.current():"classes"===t&&i.current?i.current():e()}}))),x.createElement(T.PanelBody,{sx:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden",minHeight:0}},x.createElement(O.Stack,{direction:"column",sx:{width:"100%",flex:1,minHeight:0,overflow:"hidden"}},x.createElement(O.Stack,{sx:{...Ce,top:0,flexShrink:0}},x.createElement(O.Tabs,{variant:"fullWidth",size:"small",sx:{mt:.5},...l(),onChange:(e,t)=>{l().onChange(e,t),n(t),persistDesignSystemTab(t),notifyDesignSystemTabChange(t),trackDesignSystemTabOpened(t)}},x.createElement(O.Tab,{label:(0,z.__)("Variables","elementor"),icon:x.createElement(I.ColorFilterIcon,{fontSize:"small"}),iconPosition:"start",...r("variables")}),x.createElement(O.Tab,{label:(0,z.__)("Classes","elementor"),icon:x.createElement(I.ColorSwatchIcon,{fontSize:"small"}),iconPosition:"start",...r("classes")})),x.createElement(O.Divider,null)),x.createElement(O.Box,{role:"tabpanel",...a("variables"),sx:{flex:1,minHeight:0,display:"variables"===t?"flex":"none",flexDirection:"column",overflow:"hidden",pt:1}},x.createElement(P.VariablesManagerPanelEmbedded,{onRequestClose:c,onExposeCloseAttempt:e=>{o.current=e}})),x.createElement(O.Box,{role:"tabpanel",...a("classes"),sx:{flex:1,minHeight:0,display:"classes"===t?"flex":"none",flexDirection:"column",overflow:"hidden",pt:1}},x.createElement(D.ClassManagerPanelEmbedded,{onRequestClose:m,onExposeCloseAttempt:e=>{i.current=e},isActive:"classes"===t}))))))}var Te="design-system",{panel:ke,usePanelStatus:Pe,usePanelActions:Ie}=(0,h.__createPanel)({id:Te,component:function DesignSystemPanelRoot(){const{close:e}=Ie();return E.createElement(DesignSystemPanelContent,{onRequestClose:e})},allowedEditModes:["edit",Te],onOpen:()=>{(0,S.changeEditMode)(Te)},onClose:async()=>{(0,S.changeEditMode)("edit"),await(0,_.reloadCurrentDocument)()},isOpenPreviousElement:!0});var Oe="panel/elements/categories",ze="elementor/open-variables-manager",Ae="elementor/open-global-classes-manager",Re="elementor/toggle-design-system",Ve="elementor/design-system/set-tab",Le="active-panel",Me="design-system",Fe="global-classes-manager",Ue="variables-manager";function DesignSystemEntrypoints(){const{open:e,close:t}=Ie(),{isOpen:n}=Pe(),o=(0,y.__useActiveDocument)(),{save:i}=(0,y.__useActiveDocumentActions)(),{open:s,close:r,isOpen:a}=(0,v.useDialog)(),l=(0,f.useRef)(o);l.current=o;const c=(0,f.useRef)(null),m=(0,f.useCallback)(e=>{if(l.current?.isDirty)return c.current=e,void s();e()},[s]),u=(0,f.useCallback)(async()=>{try{await i(),r(),c.current?.(),c.current=null}catch{}},[i,r]),d=(0,f.useCallback)(()=>{r(),c.current=null},[r]),p=(0,f.useRef)(n);p.current=n,(0,f.useEffect)(()=>{const handler=e=>{const n=e.detail?.tab;"variables"!==n&&"classes"!==n||(p.current&&getActiveDesignSystemTab()===n?t():p.current?window.dispatchEvent(new CustomEvent(Ve,{detail:{tab:n}})):m(()=>{window.dispatchEvent(new CustomEvent("variables"===n?ze:Ae))}))};return window.addEventListener(Re,handler),()=>{window.removeEventListener(Re,handler)}},[t,m]);const E=(0,f.useRef)(null),[_,h]=(0,f.useState)(!1);(0,f.useEffect)(()=>{_&&(h(!1),e())},[_,e]),(0,f.useEffect)(()=>(0,w.__privateListenTo)((0,w.routeOpenEvent)(Oe),()=>{const e=E.current;e&&(E.current=null,setPendingDesignSystemTab(e),h(!0))}),[]),(0,f.useEffect)(()=>{const bind=(e,t)=>{const handler=()=>{E.current=t,(0,w.__privateOpenRoute)(Oe)};return window.addEventListener(e,handler),()=>window.removeEventListener(e,handler)},e=bind(ze,"variables"),t=bind(Ae,"classes");return()=>{e(),t()}},[]);const S=(0,f.useRef)(!1);return(0,f.useEffect)(()=>{const t=new URLSearchParams(window.location.search),n=t.get(Le);if(!n)return;let o=null;if(n===Me){const e=t.get("design-system-tab");o="classes"===e?"classes":"variables"}else if(n===Fe)o="classes";else{if(n!==Ue)return;o="variables"}return(0,w.__privateListenTo)((0,w.routeOpenEvent)(Oe),()=>{S.current||(S.current=!0,requestAnimationFrame(()=>{o&&setPendingDesignSystemTab(o),m(()=>{e()})}))})},[e,m]),a?g.createElement(v.ThemeProvider,null,g.createElement(v.SaveChangesDialog,null,g.createElement(v.SaveChangesDialog.Title,null,(0,b.__)("You have unsaved changes","elementor")),g.createElement(v.SaveChangesDialog.Content,null,g.createElement(v.SaveChangesDialog.ContentText,{sx:{mb:2}},(0,b.__)("To open the Design System, save your page first. You can't continue without saving.","elementor"))),g.createElement(v.SaveChangesDialog.Actions,{actions:{cancel:{label:(0,b.__)("Stay here","elementor"),action:d},confirm:{label:(0,b.__)("Save & Continue","elementor"),action:u}}}))):null}var Be=n(24413),je=n(27723),Ne="elementor/toggle-design-system";function useOpenDesignSystemToolbar(){const{isOpen:e}=Pe();return{title:(0,je.__)("Design System","elementor"),icon:Be.DropletHalfFilledIcon,onClick:()=>{e||trackDesignSystem({event:"opened"});const t=getActiveDesignSystemTab()??"variables";window.dispatchEvent(new CustomEvent(Ne,{detail:{tab:t}}))},selected:e}}function init(){(0,p.__registerPanel)(ke),(0,u.injectIntoLogic)({id:"design-system-entrypoints",component:DesignSystemEntrypoints}),d.toolsMenu.registerToggleAction({id:"open-design-system-toolbar",priority:21,useProps:useOpenDesignSystemToolbar})}},67660:function(e){e.exports=window.elementorV2.editorAppBar},70374:function(e){e.exports=window.elementorV2.editorUi},79513:function(e){e.exports=window.elementorV2.ui},82148:function(e){e.exports=window.elementorV2.editorCanvas},97557:function(e){e.exports=window.React}},t={};var n=function __webpack_require__(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,__webpack_require__),i.exports}(62865);(window.elementorV2=window.elementorV2||{}).editorDesignSystem=n}(),window.elementorV2.editorDesignSystem?.init?.();
dvadf
dvadf
| ver. 1.4 |
Github
|
.
| PHP 7.3.33 | Generation time: 0.14 |
proxy
|
phpinfo
|
Settings