diff --git a/js/gallery-block.asset.php b/js/gallery-block.asset.php index 4119abbfd..09ad98487 100644 --- a/js/gallery-block.asset.php +++ b/js/gallery-block.asset.php @@ -1 +1 @@ - array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'cbdaa8474b2bca3a4989663ca5dabb54'); \ No newline at end of file + array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '4afe8231d710345cf2df6b10310ddc98'); \ No newline at end of file diff --git a/js/gallery-block.js b/js/gallery-block.js index d06db0ccd..54d54f836 100644 --- a/js/gallery-block.js +++ b/js/gallery-block.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=135)}([function(e,t){!function(){e.exports=this.React}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.element}()},function(e,t,n){var r=n(37),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},function(e,t,n){var r=n(76),o=n(82);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t,n){"use strict";function r(e,t){var n,r;if("function"==typeof t)void 0!==(r=t(e))&&(e=r);else if(Array.isArray(t))for(n=0;n=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var n=e.split(t);if(n.filter(u).length!==n.length)throw Error("Refusing to update blacklisted property "+e);return n}var p=Object.prototype.hasOwnProperty;function f(e,t,n,r){if(!(this instanceof f))return new f(e,t,n,r);void 0===t&&(t=!1),void 0===n&&(n=!0),void 0===r&&(r=!0),this.separator=e||".",this.override=t,this.useArray=n,this.useBrackets=r,this.keepArray=!1,this.cleanup=[]}var d=new f(".",!1,!0,!0);function y(e){return function(){return d[e].apply(d,arguments)}}f.prototype._fill=function(e,t,n,o){var a=e.shift();if(e.length>0){if(t[a]=t[a]||(this.useArray&&function(e){return/^\d+$/.test(e)}(e[0])?[]:{}),!i(t[a])){if(!this.override){if(!i(n)||!c(n))throw new Error("Trying to redefine `"+a+"` which is a "+typeof t[a]);return}t[a]={}}this._fill(e,t[a],n,o)}else{if(!this.override&&i(t[a])&&!c(t[a])){if(!i(n)||!c(n))throw new Error("Trying to redefine non-empty obj['"+a+"']");return}t[a]=r(n,o)}},f.prototype.object=function(e,t){var n=this;return Object.keys(e).forEach((function(o){var a=void 0===t?null:t[o],i=s(o,n.separator).join(n.separator);-1!==i.indexOf(n.separator)?(n._fill(i.split(n.separator),e,e[o],a),delete e[o]):e[o]=r(e[o],a)})),e},f.prototype.str=function(e,t,n,o){var a=s(e,this.separator).join(this.separator);return-1!==e.indexOf(this.separator)?this._fill(a.split(this.separator),n,t,o):n[e]=r(t,o),n},f.prototype.pick=function(e,t,n,r){var a,i,c,l,u;for(i=s(e,this.separator),a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){var r=n(66),o=n(67),a=n(68),i=n(69),c=n(70);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(36),o=n(43);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(48),o=n(49),a=n(29),i=n(46),c=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,a(e)),e=o(e);return t}:i;e.exports=c},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n=0||(o[n]=e[n]);return o}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}}},function(e,t,n){var r=n(61);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1}},function(e,t,n){var r=n(13);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(12);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(12),o=n(20),a=n(83);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(36),o=n(80),a=n(9),i=n(38),c=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,s=l.toString,p=u.hasOwnProperty,f=RegExp("^"+s.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?f:c).test(i(e))}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(21),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[c]=n:delete e[c]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,o=n(81),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(4)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(84),o=n(91),a=n(93),i=n(94),c=n(95);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var n=e.split(t);if(n.filter(u).length!==n.length)throw Error("Refusing to update blacklisted property "+e);return n}var p=Object.prototype.hasOwnProperty;function f(e,t,n,r){if(!(this instanceof f))return new f(e,t,n,r);void 0===t&&(t=!1),void 0===n&&(n=!0),void 0===r&&(r=!0),this.separator=e||".",this.override=t,this.useArray=n,this.useBrackets=r,this.keepArray=!1,this.cleanup=[]}var d=new f(".",!1,!0,!0);function y(e){return function(){return d[e].apply(d,arguments)}}f.prototype._fill=function(e,t,n,o){var a=e.shift();if(e.length>0){if(t[a]=t[a]||(this.useArray&&function(e){return/^\d+$/.test(e)}(e[0])?[]:{}),!i(t[a])){if(!this.override){if(!i(n)||!l(n))throw new Error("Trying to redefine `"+a+"` which is a "+typeof t[a]);return}t[a]={}}this._fill(e,t[a],n,o)}else{if(!this.override&&i(t[a])&&!l(t[a])){if(!i(n)||!l(n))throw new Error("Trying to redefine non-empty obj['"+a+"']");return}t[a]=r(n,o)}},f.prototype.object=function(e,t){var n=this;return Object.keys(e).forEach((function(o){var a=void 0===t?null:t[o],i=s(o,n.separator).join(n.separator);-1!==i.indexOf(n.separator)?(n._fill(i.split(n.separator),e,e[o],a),delete e[o]):e[o]=r(e[o],a)})),e},f.prototype.str=function(e,t,n,o){var a=s(e,this.separator).join(this.separator);return-1!==e.indexOf(this.separator)?this._fill(a.split(this.separator),n,t,o):n[e]=r(t,o),n},f.prototype.pick=function(e,t,n,r){var a,i,l,c,u;for(i=s(e,this.separator),a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){var r=n(66),o=n(67),a=n(68),i=n(69),l=n(70);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(36),o=n(43);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(48),o=n(49),a=n(29),i=n(46),l=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,a(e)),e=o(e);return t}:i;e.exports=l},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n=0||(o[n]=e[n]);return o}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return n}}},function(e,t,n){var r=n(61);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1}},function(e,t,n){var r=n(13);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(12);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(12),o=n(20),a=n(83);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(36),o=n(80),a=n(9),i=n(38),l=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,s=c.toString,p=u.hasOwnProperty,f=RegExp("^"+s.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?f:l).test(i(e))}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(21),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[l]=n:delete e[l]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,o=n(81),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(4)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(84),o=n(91),a=n(93),i=n(94),l=n(95);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e array('react', 'wp-block-editor', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '5e65d4e76dfe29950733655e236ced99'); \ No newline at end of file + array('react', 'wp-block-editor', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'cc627576f6116705ec4bf8af2dc79af2'); \ No newline at end of file diff --git a/js/gallery.js b/js/gallery.js index 6d7a32c33..879ff9622 100644 --- a/js/gallery.js +++ b/js/gallery.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=129)}([function(e,t){!function(){e.exports=this.React}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t,n){var r=n(34),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},function(e,t){!function(){e.exports=this.wp.element}()},function(e,t,n){var r=n(69),o=n(75);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";function r(e,t){var n,r;if("function"==typeof t)void 0!==(r=t(e))&&(e=r);else if(Array.isArray(t))for(n=0;n=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var n=e.split(t);if(n.filter(u).length!==n.length)throw Error("Refusing to update blacklisted property "+e);return n}var p=Object.prototype.hasOwnProperty;function f(e,t,n,r){if(!(this instanceof f))return new f(e,t,n,r);void 0===t&&(t=!1),void 0===n&&(n=!0),void 0===r&&(r=!0),this.separator=e||".",this.override=t,this.useArray=n,this.useBrackets=r,this.keepArray=!1,this.cleanup=[]}var d=new f(".",!1,!0,!0);function y(e){return function(){return d[e].apply(d,arguments)}}f.prototype._fill=function(e,t,n,o){var a=e.shift();if(e.length>0){if(t[a]=t[a]||(this.useArray&&function(e){return/^\d+$/.test(e)}(e[0])?[]:{}),!i(t[a])){if(!this.override){if(!i(n)||!c(n))throw new Error("Trying to redefine `"+a+"` which is a "+typeof t[a]);return}t[a]={}}this._fill(e,t[a],n,o)}else{if(!this.override&&i(t[a])&&!c(t[a])){if(!i(n)||!c(n))throw new Error("Trying to redefine non-empty obj['"+a+"']");return}t[a]=r(n,o)}},f.prototype.object=function(e,t){var n=this;return Object.keys(e).forEach((function(o){var a=void 0===t?null:t[o],i=s(o,n.separator).join(n.separator);-1!==i.indexOf(n.separator)?(n._fill(i.split(n.separator),e,e[o],a),delete e[o]):e[o]=r(e[o],a)})),e},f.prototype.str=function(e,t,n,o){var a=s(e,this.separator).join(this.separator);return-1!==e.indexOf(this.separator)?this._fill(a.split(this.separator),n,t,o):n[e]=r(t,o),n},f.prototype.pick=function(e,t,n,r){var a,i,c,l,u;for(i=s(e,this.separator),a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){var r=n(59),o=n(60),a=n(61),i=n(62),c=n(63);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(33),o=n(40);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(45),o=n(46),a=n(29),i=n(43),c=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,a(e)),e=o(e);return t}:i;e.exports=c},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}},function(e,t,n){var r=n(58),o=n(89),a=n(36),i=n(91),c=n(101),l=n(104),u=n(105),s=n(106),p=n(108),f=n(109),d=n(110),y=n(30),b=n(115),v=n(116),h=n(122),m=n(23),_=n(39),g=n(124),j=n(8),O=n(126),L=n(22),x=n(28),w="[object Arguments]",E="[object Function]",P="[object Object]",k={};k[w]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k[P]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k[E]=k["[object WeakMap]"]=!1,e.exports=function e(t,n,S,A,C,M){var Z,B=1&n,R=2&n,N=4&n;if(S&&(Z=C?S(t,A,C,M):S(t)),void 0!==Z)return Z;if(!j(t))return t;var z=m(t);if(z){if(Z=b(t),!B)return u(t,Z)}else{var D=y(t),I=D==E||"[object GeneratorFunction]"==D;if(_(t))return l(t,B);if(D==P||D==w||I&&!C){if(Z=R||I?{}:h(t),!B)return R?p(t,c(Z,t)):s(t,i(Z,t))}else{if(!k[D])return C?t:{};Z=v(t,D,B)}}M||(M=new r);var T=M.get(t);if(T)return T;M.set(t,Z),O(t)?t.forEach((function(r){Z.add(e(r,n,S,r,t,M))})):g(t)&&t.forEach((function(r,o){Z.set(o,e(r,n,S,o,t,M))}));var F=z?void 0:(N?R?d:f:R?x:L)(t);return o(F||t,(function(r,o){F&&(r=t[o=r]),a(Z,o,e(r,n,S,o,t,M))})),Z}},function(e,t,n){var r=n(11),o=n(64),a=n(65),i=n(66),c=n(67),l=n(68);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=o,u.prototype.delete=a,u.prototype.get=i,u.prototype.has=c,u.prototype.set=l,e.exports=u},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(12),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(12);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(12);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(12);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(11);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(11),o=n(20),a=n(76);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(33),o=n(73),a=n(8),i=n(35),c=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,s=l.toString,p=u.hasOwnProperty,f=RegExp("^"+s.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?f:c).test(i(e))}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(21),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[c]=n:delete e[c]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,o=n(74),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(3)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(77),o=n(84),a=n(86),i=n(87),c=n(88);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var n=e.split(t);if(n.filter(u).length!==n.length)throw Error("Refusing to update blacklisted property "+e);return n}var p=Object.prototype.hasOwnProperty;function f(e,t,n,r){if(!(this instanceof f))return new f(e,t,n,r);void 0===t&&(t=!1),void 0===n&&(n=!0),void 0===r&&(r=!0),this.separator=e||".",this.override=t,this.useArray=n,this.useBrackets=r,this.keepArray=!1,this.cleanup=[]}var d=new f(".",!1,!0,!0);function y(e){return function(){return d[e].apply(d,arguments)}}f.prototype._fill=function(e,t,n,o){var a=e.shift();if(e.length>0){if(t[a]=t[a]||(this.useArray&&function(e){return/^\d+$/.test(e)}(e[0])?[]:{}),!i(t[a])){if(!this.override){if(!i(n)||!l(n))throw new Error("Trying to redefine `"+a+"` which is a "+typeof t[a]);return}t[a]={}}this._fill(e,t[a],n,o)}else{if(!this.override&&i(t[a])&&!l(t[a])){if(!i(n)||!l(n))throw new Error("Trying to redefine non-empty obj['"+a+"']");return}t[a]=r(n,o)}},f.prototype.object=function(e,t){var n=this;return Object.keys(e).forEach((function(o){var a=void 0===t?null:t[o],i=s(o,n.separator).join(n.separator);-1!==i.indexOf(n.separator)?(n._fill(i.split(n.separator),e,e[o],a),delete e[o]):e[o]=r(e[o],a)})),e},f.prototype.str=function(e,t,n,o){var a=s(e,this.separator).join(this.separator);return-1!==e.indexOf(this.separator)?this._fill(a.split(this.separator),n,t,o):n[e]=r(t,o),n},f.prototype.pick=function(e,t,n,r){var a,i,l,c,u;for(i=s(e,this.separator),a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){var r=n(59),o=n(60),a=n(61),i=n(62),l=n(63);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(33),o=n(40);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(45),o=n(46),a=n(29),i=n(43),l=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,a(e)),e=o(e);return t}:i;e.exports=l},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}},function(e,t,n){var r=n(58),o=n(89),a=n(36),i=n(91),l=n(101),c=n(104),u=n(105),s=n(106),p=n(108),f=n(109),d=n(110),y=n(30),b=n(115),v=n(116),h=n(122),m=n(23),_=n(39),g=n(124),j=n(8),O=n(126),L=n(22),x=n(28),w="[object Arguments]",E="[object Function]",k="[object Object]",P={};P[w]=P["[object Array]"]=P["[object ArrayBuffer]"]=P["[object DataView]"]=P["[object Boolean]"]=P["[object Date]"]=P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Map]"]=P["[object Number]"]=P[k]=P["[object RegExp]"]=P["[object Set]"]=P["[object String]"]=P["[object Symbol]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P["[object Error]"]=P[E]=P["[object WeakMap]"]=!1,e.exports=function e(t,n,S,A,C,M){var Z,B=1&n,F=2&n,R=4&n;if(S&&(Z=C?S(t,A,C,M):S(t)),void 0!==Z)return Z;if(!j(t))return t;var z=m(t);if(z){if(Z=b(t),!B)return u(t,Z)}else{var N=y(t),D=N==E||"[object GeneratorFunction]"==N;if(_(t))return c(t,B);if(N==k||N==w||D&&!C){if(Z=F||D?{}:h(t),!B)return F?p(t,l(Z,t)):s(t,i(Z,t))}else{if(!P[N])return C?t:{};Z=v(t,N,B)}}M||(M=new r);var I=M.get(t);if(I)return I;M.set(t,Z),O(t)?t.forEach((function(r){Z.add(e(r,n,S,r,t,M))})):g(t)&&t.forEach((function(r,o){Z.set(o,e(r,n,S,o,t,M))}));var T=z?void 0:(R?F?d:f:F?x:L)(t);return o(T||t,(function(r,o){T&&(r=t[o=r]),a(Z,o,e(r,n,S,o,t,M))})),Z}},function(e,t,n){var r=n(11),o=n(64),a=n(65),i=n(66),l=n(67),c=n(68);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=o,u.prototype.delete=a,u.prototype.get=i,u.prototype.has=l,u.prototype.set=c,e.exports=u},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(12),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(12);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(12);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(12);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(11);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(11),o=n(20),a=n(76);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(33),o=n(73),a=n(8),i=n(35),l=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,s=c.toString,p=u.hasOwnProperty,f=RegExp("^"+s.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?f:l).test(i(e))}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(21),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[l]=n:delete e[l]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,o=n(74),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(3)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(77),o=n(84),a=n(86),i=n(87),l=n(88);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e { ? JSON.stringify( nestedAttrs.customSettings ) : nestedAttrs.customSettings; + if ( ! attributes.transformation_crop ) { + attributes.transformation_crop = 'pad'; + attributes.transformation_background = 'rgb:FFFFFF'; + } + + if ( 'fill' === attributes.transformation_crop ) { + delete attributes.transformation_background; + } + return ( <> @@ -144,6 +155,54 @@ const Controls = ( { attributes, setAttributes, colors } ) => { setAttributes( { aspectRatio: value } ) } /> +

+ { __( 'Resize or Crop Mode', 'cloudinary' ) } + + + +

+

+ + { RESIZE_CROP.map( ( type ) => ( + + ) ) } + +

+ { 'pad' === attributes.transformation_crop && ( + { + setAttributes( { + transformation_background: value, + } ); + } } + /> + ) }

{ __( 'Navigation', 'cloudinary' ) }

diff --git a/js/src/gallery-block/options.js b/js/src/gallery-block/options.js index 302765d0e..5edc54ee9 100644 --- a/js/src/gallery-block/options.js +++ b/js/src/gallery-block/options.js @@ -190,3 +190,33 @@ export const MEDIA_ICON_SHAPE = [ label: __( 'Square', 'cloudinary' ), }, ]; + +export const RESIZE_CROP = [ + { + label: __( 'Pad', 'cloudinary' ), + value: 'pad', + }, + { + label: __( 'Crop', 'cloudinary' ), + value: 'fill', + }, +]; + +export const PAD_STYLES = [ + { + label: __( 'White padding', 'cloudinary' ), + value: 'rgb:FFFFFF', + }, + { + label: __( 'Border color padding', 'cloudinary' ), + value: 'auto', + }, + { + label: __( 'Predominant color padding', 'cloudinary' ), + value: 'auto:predominant', + }, + { + label: __( 'Gradient fade padding', 'cloudinary' ), + value: 'auto:predominant_gradient', + }, +]; diff --git a/php/media/class-gallery.php b/php/media/class-gallery.php index ee74131c6..826c97bf2 100644 --- a/php/media/class-gallery.php +++ b/php/media/class-gallery.php @@ -65,9 +65,6 @@ class Gallery { 'mode' => 'classic', 'columns' => 1, ), - 'transformation' => array( - 'crop' => 'fill', - ), 'indicatorProps' => array( 'shape' => 'round' ), 'themeProps' => array( 'primary' => '#cf2e2e',