ProShell v2.0
Dashboard
Server Info
Server: 158.106.128.192
PHP: 8.2.33
home
planet5
public_html
bansibaba.com
2026-09-20 22:10:41
Editing: safe-svg-block.js
Cancel
Save Changes
(()=>{var e={2694(e,t,s){"use strict";var n=s(6925);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,s,i,o,l){if(l!==n){var r=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw r.name="Invariant Violation",r}}function t(){return e}e.isRequired=e;var s={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return s.PropTypes=s,s}},5556(e,t,s){e.exports=s(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6942(e,t){var s;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var s=arguments[t];s&&(e=l(e,o(s)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var s in e)n.call(e,s)&&e[s]&&(t=l(t,s));return t}function l(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(s=function(){return i}.apply(t,[]))||(e.exports=s)}()}};const t={};function s(n){const i=t[n];if(void 0!==i)return i.exports;const o=t[n]={exports:{}};return e[n](o,o.exports,s),o.exports}s.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.hasOwn(e,t),(()=>{"use strict";const e=window.wp.i18n,t=window.wp.blocks;var n=s(5556),i=s.n(n),o=s(6942),l=s.n(o);const r=window.wp.components,a=window.wp.primitives,h=window.ReactJSXRuntime;var c=(0,h.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,h.jsx)(a.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})});const d=window.wp.blockEditor,g=window.wp.element,u=e=>/<\s*(?:[a-z0-9_.\-]+:)?style\b/i.test(e),p=({src:e,width:t,height:s})=>{const n=(0,g.useRef)(null),i=(0,g.useRef)(!1),[o,l]=(0,g.useState)("");(0,g.useEffect)(()=>{if(!e)return void l("");const t=new AbortController;return fetch(e,{signal:t.signal}).then(e=>e.ok?e.text():"").then(l).catch(()=>{}),()=>t.abort()},[e]),(0,g.useEffect)(()=>{const e=n.current;if(!e)return;const l=e.shadowRoot||(u(o)?e.attachShadow({mode:"open"}):null);l?(i.current=!0,l.innerHTML=`<style>svg{fill:currentColor;width:100%;height:100%;max-width:100%;max-height:100%}</style>${o}`,e.innerHTML=""):e.innerHTML=o;const r=(l||e).querySelector("svg");r&&t&&s&&r.setAttribute("style",`width: ${t}px; height: ${s}px;`)},[o,t,s]);const r=i.current||u(o);return(0,h.jsx)("span",{className:"safe-svg-shadow-guard",style:{display:"block",height:"100%",contain:r?"paint":void 0},children:(0,h.jsx)("span",{ref:n,className:"safe-svg-shadow-host",style:{display:"block",height:"100%"}})})};p.propTypes={src:i().string,width:i().number,height:i().number};const f=p,m=({attributes:t,setAttributes:s})=>{const{contentPostType:n,svgURL:i,type:o,imageID:a,imageSizes:g,alignment:u,imageWidth:p,imageHeight:m,dimensionWidth:v,dimensionHeight:w,textColor:b,href:x,linkTarget:_,nofollow:y,sponsored:j,linkLabel:k}=t,T=(0,d.useBlockProps)({className:"wp-block-safe-svg-svg-icon safe-svg-cover",style:{textAlign:u}}),{className:S,style:C,...H}=T;delete C.textAlign,H.style={textAlign:u};const I=S.replace(/has-[\w-]*-color|has-background/g,"").trim();H.className=I,C.width=`${v}px`,C.height=`${w}px`;const z=["image/svg+xml"],R=e=>{if(!e.sizes&&!e.media_details?.sizes)return;e.media_details&&(e.sizes=e.media_details.sizes);const t=e.sizes.full.url??e.sizes.full.source_url;s({imageSizes:{full:e.sizes.full,medium:e.sizes.medium,thumbnail:e.sizes.thumbnail},imageWidth:e.sizes.full.width,imageHeight:e.sizes.full.height,dimensionWidth:e.sizes.full.width,dimensionHeight:e.sizes.full.height,imageID:e.id,svgURL:t,type:"full"})},L=[{value:"full",label:(0,e.__)("Full Size","safe-svg")},{value:"medium",label:(0,e.__)("Medium","safe-svg")},{value:"thumbnail",label:(0,e.__)("Thumbnail","safe-svg")}];return(0,h.jsxs)(h.Fragment,{children:[i&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(d.InspectorControls,{children:(0,h.jsx)(r.PanelBody,{title:(0,e.__)("Image settings","safe-svg"),children:(0,h.jsx)(d.__experimentalImageSizeControl,{width:v,height:w,imageWidth:p,imageHeight:m,imageSizeOptions:L,slug:o,onChange:e=>{e.width||e.height||(e.width=parseInt(g[o].width),e.height=parseInt(g[o].height)),s({dimensionWidth:e.width??v,dimensionHeight:e.height??w})},onChangeImage:e=>{const t=g[e].url??g[e].source_url;if(!t)return null;let n=parseInt(g[e].width),i=parseInt(g[e].height);"full"!==e&&(g[e].width>=g[e].height?i=g[e].height*g.full.height/g.full.width:n=g[e].width*g.full.width/g.full.height),s({svgURL:t,imageWidth:n,imageHeight:i,dimensionWidth:n,dimensionHeight:i,type:e})}})})}),(0,h.jsx)(d.BlockControls,{children:(0,h.jsx)(d.AlignmentToolbar,{value:u,onChange:e=>s({alignment:e})})}),(0,h.jsxs)(d.BlockControls,{children:[(0,h.jsx)(d.MediaReplaceFlow,{mediaId:a,mediaURL:i,allowedTypes:z,accept:z,onSelect:R,onError:t=>{console.log((0,e.__)(`Something went wrong, please try again. Message: ${t}`,"safe-svg"))}}),(0,h.jsx)(r.Dropdown,{className:"safe-svg-link-dropdown",renderToggle:({isOpen:t,onToggle:s})=>(0,h.jsx)(r.ToolbarButton,{icon:c,label:(0,e.__)("Link","safe-svg"),onClick:s,"aria-expanded":t}),renderContent:({onClose:t})=>(0,h.jsxs)("div",{className:"block-editor-link-control",children:[(0,h.jsx)(d.LinkControl,{value:{url:x,opensInNewTab:"_blank"===_,nofollow:!!y,sponsored:!!j},onChange:e=>{s({href:e.url,linkTarget:e.opensInNewTab?"_blank":"",nofollow:!!e.nofollow,sponsored:!!e.sponsored})},onRemove:()=>{s({href:"",linkTarget:"",nofollow:!1,sponsored:!1})},settings:[{id:"opensInNewTab",title:(0,e.__)("Open in new tab","safe-svg")},{id:"nofollow",title:(0,e.__)('Add rel="nofollow"',"safe-svg")},{id:"sponsored",title:(0,e.__)('Add rel="sponsored"',"safe-svg")}],onClose:t}),(0,h.jsx)(r.TextControl,{label:(0,e.__)("Link Label (aria-label)","safe-svg"),value:k,onChange:e=>s({linkLabel:e}),help:(0,e.__)("Provides an accessible label for screen readers.","safe-svg")})]})})]})]}),!i&&(0,h.jsx)(d.MediaPlaceholder,{onSelect:R,allowedTypes:z,accept:z,value:a,labels:{title:(0,e.__)("Inline SVG","safe-svg"),instructions:(0,e.__)("Upload an SVG or pick one from your media library.","safe-svg")}}),i&&(0,h.jsx)("div",{...H,children:(0,h.jsx)("div",{style:C,className:l()("safe-svg-inside",(0,d.getColorClassName)("color",b)||""),children:(0,h.jsx)(f,{src:i,width:v,height:w})})}),n&&(0,h.jsx)(r.Placeholder,{label:(0,e.__)("SafeSvg","safe-svg"),children:(0,h.jsx)("p",{children:(0,e.__)("Please select the SVG icon.","safe-svg")})})]})};m.propTypes={attributes:i().shape({svgURL:i().string,alignment:i().string,imageID:i().number,imageWidth:i().number,imageHeight:i().number,dimensionWidth:i().number,dimensionHeight:i().number,imageSizes:i().object,href:i().string,linkTarget:i().string,nofollow:i().bool,sponsored:i().bool,linkLabel:i().string}).isRequired,className:i().string,clientId:i().string,setAttributes:i().func.isRequired};const v=m,w=JSON.parse('{"UU":"safe-svg/svg-icon"}');(0,t.registerBlockType)(w.UU,{title:(0,e.__)("Inline SVG","safe-svg"),description:(0,e.__)("Display an SVG icon","safe-svg"),edit:v,save:()=>null,icon:{src:(0,h.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"800",height:"800",viewBox:"0 0 512 512",children:(0,h.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M321.838 42.667H87.171v234.666h42.667v-192h174.293l81.707 81.707v110.293h42.667v-128L321.838 42.667ZM85.333 441.734l4.17-24.65c14.68 6.163 27.126 9.244 37.337 9.244 6.645 0 11.54-1.631 14.68-4.894 2.72-2.84 4.079-6.313 4.079-10.422 0-3.685-1.33-6.555-3.988-8.61-2.658-2.053-9.213-5.225-19.665-9.515-7.734-3.202-13.186-5.588-16.358-7.16-3.172-1.57-6.087-3.352-8.745-5.346-7.552-5.619-11.328-13.715-11.328-24.287 0-9.123 2.477-17.129 7.43-24.016 7.613-10.694 20.12-16.04 37.52-16.04 12.566 0 26.22 2.325 40.962 6.977l-5.8 23.563c-8.7-3.202-15.24-5.317-19.62-6.344-4.38-1.027-8.957-1.54-13.73-1.54-5.437 0-9.576 1.208-12.416 3.625-2.96 2.597-4.44 5.89-4.44 9.878 0 3.443 1.253 6.147 3.76 8.11 2.508 1.964 8.535 4.91 18.08 8.837 9.486 3.927 15.77 6.66 18.85 8.201a55.772 55.772 0 0 1 8.7 5.392c7.432 5.68 11.147 14.35 11.147 26.01 0 13.775-4.682 24.197-14.047 31.265-7.975 5.982-19.152 8.972-33.53 8.972-14.984 0-29.333-2.417-43.048-7.25Zm146.722 4.985L183.39 318.303h30.087l21.388 57.637c5.437 14.682 9.515 26.765 12.234 36.25 4.169-13.291 8.126-24.982 11.872-35.071l22.022-58.816h28.637l-48.665 128.416h-28.91ZM429.8 374.853v65.522c-7.37 2.477-12.567 4.108-15.588 4.894-9.364 2.477-19.424 3.715-30.178 3.715-21.146 0-37.247-5.317-48.303-15.95-12.264-11.72-18.397-28.063-18.397-49.028 0-24.106 7.613-42.292 22.838-54.556 11.056-8.942 25.979-13.413 44.769-13.413 16.07 0 31.024 2.93 44.859 8.79l-9.878 22.567c-6.525-3.263-12.235-5.544-17.128-6.843-4.894-1.299-10.271-1.948-16.132-1.948-14.016 0-24.347 4.561-30.993 13.684-5.619 7.734-8.428 17.914-8.428 30.54 0 15.165 4.229 26.584 12.687 34.257 6.767 6.163 15.165 9.244 25.194 9.244 5.86 0 11.419-.997 16.675-2.99v-25.829h-22.113v-22.656H429.8Z"})})}})})()})();
Upload Files
Cancel
Upload
Create New
Cancel
Create
Change Permissions
Cancel
Save
Change Date
Cancel
Save
Rename Item
Cancel
Save
Confirm Delete
Are you sure you want to delete the selected items?
Cancel
Delete