| 1 |
!function(){"use strict";var e={5251:function(e,t,r){var n=r(9196),i=60103;if(60107,"function"===typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),o("react.fragment")}var s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function a(e,t,r){var n,o={},a=null,d=null;for(n in void 0!==r&&(a=""+r),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(d=t.ref),t)l.call(t,n)&&!c.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===o[n]&&(o[n]=t[n]);return{$$typeof:i,type:e,key:a,ref:d,props:o,_owner:s.current}}t.jsx=a,t.jsxs=a},5893:function(e,t,r){e.exports=r(5251)},9196:function(e){e.exports=window.React}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e=window.wp.domReady,t=r.n(e),n=window.wp.element;const i=window.epStatusReport;var o=window.wp.components,s=window.wp.htmlEntities,l=r(5893),c=({value:e})=>{if("object"===typeof e){const t=JSON.stringify(e,null,2);return(0,l.jsx)("pre",{children:t})}if("string"===typeof e){if(0===e.indexOf("{"))try{const t=JSON.parse(e),r=JSON.stringify(t,null,2);return(0,l.jsx)("pre",{children:r})}catch(t){return(0,l.jsx)("pre",{children:e})}return(0,l.jsx)(n.RawHTML,{children:e})}return e.toString()},a=({actions:e,groups:t,id:r,title:n})=>t.length<1?null:(0,l.jsxs)(o.Panel,{id:n,children:[(0,l.jsxs)(o.PanelHeader,{children:[(0,l.jsx)("h2",{id:r,children:n}),e.map((({href:e,label:t})=>(0,l.jsx)(o.Button,{href:(0,s.decodeEntities)(e),isDestructive:!0,isSecondary:!0,isSmall:!0,children:t},e)))]}),t.map((({fields:e,title:t})=>(0,l.jsx)(o.PanelBody,{title:(0,s.decodeEntities)(t),initialOpen:!1,children:(0,l.jsxs)("table",{cellPadding:"0",cellSpacing:"0",className:"wp-list-table widefat striped",children:[(0,l.jsxs)("colgroup",{children:[(0,l.jsx)("col",{}),(0,l.jsx)("col",{})]}),(0,l.jsx)("tbody",{children:Object.entries(e).map((([e,{description:t="",label:r,value:n}])=>(0,l.jsxs)("tr",{children:[(0,l.jsxs)("td",{children:[r,t?(0,l.jsx)("small",{children:t}):null]}),(0,l.jsx)("td",{children:(0,l.jsx)(c,{value:n})})]},e)))})]})},t)))]}),d=({reports:e})=>Object.entries(e).map((([e,{actions:t,groups:r,title:n}])=>(0,l.jsx)(a,{actions:t,groups:r,id:e,title:n},e)));t()((()=>{const e=document.getElementById("ep-status-reports");new ClipboardJS("#ep-copy-report").on("success",(e=>{e.trigger.nextElementSibling.style.display="initial",setTimeout((()=>{e.trigger.nextElementSibling.style.display="none"}),3e3),e.clearSelection()})),(0,n.render)((0,l.jsx)(d,{reports:i}),e)}))}()}(); |