403Webshell
Server IP : 192.158.238.246  /  Your IP : 13.58.216.183
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/7779/task/7779/cwd/plugins/gutenkit-blocks-addon/build/modules/copy-paste-style/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/7779/task/7779/cwd/plugins/gutenkit-blocks-addon/build/modules/copy-paste-style/editor.js
(()=>{"use strict";const e=window.wp.plugins,t=window.wp.blockEditor,s=window.wp.components,n=window.wp.i18n,o=window.wp.compose,i=window.wp.data,c=window.wp.primitives,l=window.ReactJSXRuntime,r=(0,l.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:24,height:24,children:(0,l.jsx)(c.Path,{d:"M30.731 8.16c-0.005-0.035-0.011-0.066-0.019-0.095l0.001 0.005c-0.031-0.134-0.094-0.249-0.182-0.342l0 0-6.297-6.296c-0.093-0.087-0.208-0.15-0.336-0.181l-0.005-0.001c-0.026-0.008-0.058-0.014-0.091-0.019l-0.004-0c-0.026-0.007-0.059-0.014-0.092-0.018l-0.004-0h-9.445c-0.414 0-0.75 0.336-0.75 0.75v0 22.038c0 0.414 0.336 0.75 0.75 0.75h15.742c0.414-0 0.75-0.336 0.75-0.75v0-15.742c-0.005-0.038-0.012-0.071-0.020-0.103l0.001 0.005zM24.453 3.773l3.736 3.735h-3.736zM15.008 23.25v-20.538h7.945v5.546c0 0.414 0.336 0.75 0.75 0.75h5.547v14.242zM17.742 27.25c-0.414 0-0.75 0.336-0.75 0.75v0 1.27h-14.242v-20.539h7.25c0.414 0 0.75-0.336 0.75-0.75s-0.336-0.75-0.75-0.75v0h-8c-0.414 0-0.75 0.336-0.75 0.75v0 22.039c0 0.414 0.336 0.75 0.75 0.75h15.742c0.414-0 0.75-0.336 0.75-0.75v0-2.020c-0-0.414-0.336-0.75-0.75-0.75v0z"})}),a=(0,l.jsxs)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:24,height:24,children:[(0,l.jsx)(c.Path,{d:"M3 21h5v-1H4V4h2v2h10V4h2v3h.4a.989.989 0 0 1 .6.221V3h-3V2h-3a2 2 0 0 0-4 0H6v1H3zM7 3h3V1.615A.615.615 0 0 1 10.614 1h.771a.615.615 0 0 1 .615.615V3h3v2H7zm4 14h9v1h-9zM9 8v16h13V11.6L18.4 8zm12 15H10V9h7v4h4zm0-11h-3V9h.31L21 11.69zm-10 2h9v1h-9zm0 6h7v1h-7z"}),(0,l.jsx)(c.Path,{d:"M0 0h24v24H0z",fill:"none"})]}),d=e=>null==e||"object"==typeof e&&0===Object.keys(e).length||"string"==typeof e&&0===e.trim().length||!1===e,u=window.wp.blocks,h=e=>{const{attributes:t}=(0,u.getBlockType)(e),s=Object.keys(t).filter((e=>{let s=t[e];return s.hasOwnProperty("excludeCopy")&&s.excludeCopy}));return d(s)?[]:s},b=(e,t)=>{if(d(e))return;let s={},n=Object.keys(e),o=n.length,i=0;const c=["blocksCSS","commonStyle","blockID","blockClass",...h(t)];for(;i<o;){const t=n[i],o=e[t];c.includes(t)||(s[t]=o),i++}return d(s)?void 0:s},p=({selectedClientIds:e,onClose:t})=>{const{createSuccessNotice:c}=(0,i.dispatch)("core/notices"),a=(0,o.useCopyToClipboard)((function(){const t=e&&e.map((e=>{const{getBlock:t}=(0,i.select)("core/block-editor"),s=t(e),{name:n,attributes:o}=s;return{attributes:b(o,n),name:n,copyFrom:e}}));return JSON.stringify(t)}),(function(){c((0,n.__)("Style Copied Successfully","gutenkit-blocks-addon"),{type:"snackbar",isDismissible:!0}),t()}));return(0,l.jsx)(s.MenuItem,{icon:r,label:(0,n.__)("Gutenkit Copy Style","gutenkit-blocks-addon"),className:"gutenkit-copy-button",ref:a,children:(0,n.__)("Gutenkit Copy Style")})},k=({selectedClientIds:e,onClose:t})=>(0,l.jsx)(s.MenuItem,{icon:a,label:(0,n.__)("Gutenkit Paste Style","gutenkit-blocks-addon"),onClick:()=>{(async(e,t)=>{const{createErrorNotice:s,createSuccessNotice:o}=(0,i.dispatch)("core/notices"),{getBlockName:c}=(0,i.select)("core/block-editor"),{updateBlockAttributes:l}=(0,i.dispatch)("core/block-editor"),{isNull:r}=window.gutenkit.helpers;try{if(!window.navigator.clipboard)return void s((0,n.__)("Unable to paste styles. This feature is only available on secure (https) sites in supporting browsers."),{type:"snackbar"});const t=await navigator.clipboard.readText();if(r(t)||!t.includes("gutenkit")||!t.includes("attributes")||!t.includes("name")||!t.includes("copyFrom"))return void s((0,n.__)("Unable to paste styles. Block styles couldn't be found within the copied content.","gutenkit-blocks-addon"),{type:"snackbar",isDismissible:!0});const i=JSON.parse(t);if(!Array.isArray(i)||i.length!==e.length)return void s((0,n.__)("Unable to paste styles. Block styles couldn't be found within the copied content.","gutenkit-blocks-addon"),{type:"snackbar",isDismissible:!0});if(!e.every(((e,t)=>{const s=c(e),{name:n}=i[t];return n===s})))return void s((0,n.__)("Unable to paste styles. Block styles couldn't be found within the copied content.","gutenkit-blocks-addon"),{type:"snackbar",isDismissible:!0});for(let t=0;t<i.length;t++){const{name:o,attributes:r,copyFrom:a}=i[t],d=e[t];if(o!==c(d))return void s((0,n.__)("Unable to paste styles. Block styles couldn't be found within the copied content.","gutenkit-blocks-addon"),{type:"snackbar",isDismissible:!0});if(a===d)return void s((0,n.__)("Unable to paste styles. You can't paste styles from the same block.","gutenkit-blocks-addon"),{type:"snackbar",isDismissible:!0});l(d,{...r})}o((0,n.__)("Style Pasted Successfully","gutenkit-blocks-addon"),{type:"snackbar",isDismissible:!0})}catch(e){return void s((0,n.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing.","gutenkit-blocks-addon"),{type:"snackbar",isDismissible:!0})}t()})(e,t)},className:"gutenkit-paste-button",children:(0,n.__)("Gutenkit Paste Style","gutenkit-blocks-addon")});(0,e.registerPlugin)("gkit-copy-paste-style",{render:()=>(0,l.jsx)(t.BlockSettingsMenuControls,{children:e=>{const{onClose:t,selectedClientIds:s}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(p,{selectedClientIds:s,onClose:t}),(0,l.jsx)(k,{selectedClientIds:s,onClose:t})]})}})})})();

Youez - 2016 - github.com/yon3zu
LinuXploit