%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/tif-dev/wp-content/plugins/lazy-blocks/controls/image/
Upload File :
Create Path :
Current File : //var/www/tif-dev/wp-content/plugins/lazy-blocks/controls/image/image-control.min.js

!function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t){return n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}function o(t,r){if(r&&("object"===e(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return a(t)}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}var l=wp.i18n.__,c=wp.element.Component,s=wp.components,u=s.BaseControl,p=s.Button,f=s.DropZone,m=s.withNotices,d=wp.compose,y=d.compose,b=d.withInstanceId,h=wp.blockEditor.MediaPlaceholder,g=wp.data.withSelect,w=["image"],v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}(b,e);var c,s,m,d,y=(m=b,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=i(m);if(d){var r=i(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return o(this,e)});function b(){var e;t(this,b);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(e=y.call.apply(y,[this].concat(n))).state={hasError:!1},e.onUploadError=e.onUploadError.bind(a(e)),e}return c=b,(s=[{key:"onUploadError",value:function(e){var t=this.props.noticeOperations;t.removeAllNotices(),t.createErrorNotice(e)}},{key:"render",value:function(){var e=this,t=this.props,r=t.label,n=t.value,o=t.help,a=t.imagePreviewData,i=t.noticeOperations,c=t.noticeUI,s=t.onChange,m=void 0===s?function(){}:s,d=t.mediaUpload;return wp.element.createElement(u,{label:r,help:o},wp.element.createElement("div",{className:"lzb-gutenberg-image-wrap"},n&&Object.keys(n).length?"":wp.element.createElement(h,{icon:"format-image",labels:{title:r,name:l("image","lazy-blocks")},onSelect:function(t){e.setState({hasError:!1}),m(t)},notices:c,accept:"image/*",allowedTypes:w,disableMaxUploadErrorMessages:!0,onError:this.onUploadError}),n&&Object.keys(n).length?wp.element.createElement("div",{className:"lzb-gutenberg-image"},wp.element.createElement(f,{onFilesDrop:function(t){d({allowedTypes:w,filesList:t,onFileChange:function(t){e.setState({hasError:!1}),m(t[0])},onError:function(t){e.setState({hasError:!0}),i.createErrorNotice(t)}})}}),wp.element.createElement("div",{className:"lzb-gutenberg-image-button"},wp.element.createElement(p,{isSecondary:!0,isSmall:!0,onClick:function(){e.setState({hasError:!1}),m("")}},l("Remove Image","lazy-blocks"))),wp.element.createElement("div",{className:"lzb-gutenberg-image-item",key:n.id||n.url},a.url?wp.element.createElement("img",{src:a.url,alt:a.alt}):"")):""))}}])&&r(c.prototype,s),b}(c);y([b,m,g((function(e,t){var r=e("core/block-editor").getSettings().mediaUpload,n=e("core").getMedia,o=t.value,a=t.previewSize,i=!1;if(o&&Object.keys(o).length&&o.id){var l=n(o.id)||!1;l&&(i={alt:l.alt_text,url:l.source_url},l.media_details&&l.media_details.sizes&&l.media_details.sizes[a]&&(i.url=l.media_details.sizes[a].source_url))}return{mediaUpload:r,imagePreviewData:i}}))])(v)}();

Zerion Mini Shell 1.0