this["wp"] = this["wp"] || {}; this["wp"]["blockLibrary"] = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "K51g"); /******/ }) /************************************************************************/ /******/ ({ /***/ "+WrK": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const symbol = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z" })); /* harmony default export */ __webpack_exports__["a"] = (symbol); /***/ }), /***/ "//kF": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const footer = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { fillRule: "evenodd", d: "M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z" })); /* harmony default export */ __webpack_exports__["a"] = (footer); /***/ }), /***/ "1CF3": /***/ (function(module, exports) { (function() { module.exports = window["wp"]["dom"]; }()); /***/ }), /***/ "1Yn1": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const code = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z" })); /* harmony default export */ __webpack_exports__["a"] = (code); /***/ }), /***/ "1ZqX": /***/ (function(module, exports) { (function() { module.exports = window["wp"]["data"]; }()); /***/ }), /***/ "1iEr": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const chevronRight = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" })); /* harmony default export */ __webpack_exports__["a"] = (chevronRight); /***/ }), /***/ "2gm7": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const chevronLeft = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z" })); /* harmony default export */ __webpack_exports__["a"] = (chevronLeft); /***/ }), /***/ "4eJC": /***/ (function(module, exports, __webpack_require__) { /** * Memize options object. * * @typedef MemizeOptions * * @property {number} [maxSize] Maximum size of the cache. */ /** * Internal cache entry. * * @typedef MemizeCacheNode * * @property {?MemizeCacheNode|undefined} [prev] Previous node. * @property {?MemizeCacheNode|undefined} [next] Next node. * @property {Array<*>} args Function arguments for cache * entry. * @property {*} val Function result. */ /** * Properties of the enhanced function for controlling cache. * * @typedef MemizeMemoizedFunction * * @property {()=>void} clear Clear the cache. */ /** * Accepts a function to be memoized, and returns a new memoized function, with * optional options. * * @template {Function} F * * @param {F} fn Function to memoize. * @param {MemizeOptions} [options] Options object. * * @return {F & MemizeMemoizedFunction} Memoized function. */ function memize( fn, options ) { var size = 0; /** @type {?MemizeCacheNode|undefined} */ var head; /** @type {?MemizeCacheNode|undefined} */ var tail; options = options || {}; function memoized( /* ...args */ ) { var node = head, len = arguments.length, args, i; searchCache: while ( node ) { // Perform a shallow equality test to confirm that whether the node // under test is a candidate for the arguments passed. Two arrays // are shallowly equal if their length matches and each entry is // strictly equal between the two sets. Avoid abstracting to a // function which could incur an arguments leaking deoptimization. // Check whether node arguments match arguments length if ( node.args.length !== arguments.length ) { node = node.next; continue; } // Check whether node arguments match arguments values for ( i = 0; i < len; i++ ) { if ( node.args[ i ] !== arguments[ i ] ) { node = node.next; continue searchCache; } } // At this point we can assume we've found a match // Surface matched node to head if not already if ( node !== head ) { // As tail, shift to previous. Must only shift if not also // head, since if both head and tail, there is no previous. if ( node === tail ) { tail = node.prev; } // Adjust siblings to point to each other. If node was tail, // this also handles new tail's empty `next` assignment. /** @type {MemizeCacheNode} */ ( node.prev ).next = node.next; if ( node.next ) { node.next.prev = node.prev; } node.next = head; node.prev = null; /** @type {MemizeCacheNode} */ ( head ).prev = node; head = node; } // Return immediately return node.val; } // No cached value found. Continue to insertion phase: // Create a copy of arguments (avoid leaking deoptimization) args = new Array( len ); for ( i = 0; i < len; i++ ) { args[ i ] = arguments[ i ]; } node = { args: args, // Generate the result from original function val: fn.apply( null, args ), }; // Don't need to check whether node is already head, since it would // have been returned above already if it was // Shift existing head down list if ( head ) { head.prev = node; node.next = head; } else { // If no head, follows that there's no tail (at initial or reset) tail = node; } // Trim tail if we're reached max size and are pending cache insertion if ( size === /** @type {MemizeOptions} */ ( options ).maxSize ) { tail = /** @type {MemizeCacheNode} */ ( tail ).prev; /** @type {MemizeCacheNode} */ ( tail ).next = null; } else { size++; } head = node; return node.val; } memoized.clear = function() { head = null; tail = null; size = 0; }; if ( false ) {} // Ignore reason: There's not a clear solution to create an intersection of // the function with additional properties, where the goal is to retain the // function signature of the incoming argument and add control properties // on the return value. // @ts-ignore return memoized; } module.exports = memize; /***/ }), /***/ "A/WM": /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /* global define */ (function () { 'use strict'; var classNames = (function () { // don't inherit from Object so we can skip hasOwnProperty check later // http://stackoverflow.com/questions/15518328/creating-js-object-with-object-createnull#answer-21079232 function StorageObject() {} StorageObject.prototype = Object.create(null); function _parseArray (resultSet, array) { var length = array.length; for (var i = 0; i < length; ++i) { _parse(resultSet, array[i]); } } var hasOwn = {}.hasOwnProperty; function _parseNumber (resultSet, num) { resultSet[num] = true; } function _parseObject (resultSet, object) { if (object.toString === Object.prototype.toString) { for (var k in object) { if (hasOwn.call(object, k)) { // set value to false instead of deleting it to avoid changing object structure // https://www.smashingmagazine.com/2012/11/writing-fast-memory-efficient-javascript/#de-referencing-misconceptions resultSet[k] = !!object[k]; } } } else { resultSet[object.toString()] = true; } } var SPACE = /\s+/; function _parseString (resultSet, str) { var array = str.split(SPACE); var length = array.length; for (var i = 0; i < length; ++i) { resultSet[array[i]] = true; } } function _parse (resultSet, arg) { if (!arg) return; var argType = typeof arg; // 'foo bar' if (argType === 'string') { _parseString(resultSet, arg); // ['foo', 'bar', ...] } else if (Array.isArray(arg)) { _parseArray(resultSet, arg); // { 'foo': true, ... } } else if (argType === 'object') { _parseObject(resultSet, arg); // '130' } else if (argType === 'number') { _parseNumber(resultSet, arg); } } function _classNames () { // don't leak arguments // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments var len = arguments.length; var args = Array(len); for (var i = 0; i < len; i++) { args[i] = arguments[i]; } var classSet = new StorageObject(); _parseArray(classSet, args); var list = []; for (var k in classSet) { if (classSet[k]) { list.push(k) } } return list.join(' '); } return _classNames; })(); if ( true && module.exports) { classNames.default = classNames; module.exports = classNames; } else if (true) { // register as 'classnames', consistent with npm package name !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { return classNames; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} }()); /***/ }), /***/ "B9Az": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: external ["wp","element"] var external_wp_element_ = __webpack_require__("GRId"); // EXTERNAL MODULE: external ["wp","primitives"] var external_wp_primitives_ = __webpack_require__("Tqx9"); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pencil.js /** * WordPress dependencies */ const pencil = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z" })); /* harmony default export */ var library_pencil = (pencil); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js /** * Internal dependencies */ /* harmony default export */ var edit = __webpack_exports__["a"] = (library_pencil); /***/ }), /***/ "Bpkj": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const link = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z" })); /* harmony default export */ __webpack_exports__["a"] = (link); /***/ }), /***/ "Civd": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const layout = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z" })); /* harmony default export */ __webpack_exports__["a"] = (layout); /***/ }), /***/ "FEKF": /***/ (function(module, exports, __webpack_require__) { /*! Fast Average Color | © 2019 Denis Seleznev | MIT License | https://github.com/hcodes/fast-average-color/ */ (function (global, factory) { true ? module.exports = factory() : undefined; }(this, (function () { 'use strict'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } var FastAverageColor = /*#__PURE__*/ function () { function FastAverageColor() { _classCallCheck(this, FastAverageColor); } _createClass(FastAverageColor, [{ key: "getColorAsync", /** * Get asynchronously the average color from not loaded image. * * @param {HTMLImageElement} resource * @param {Function} callback * @param {Object|null} [options] * @param {Array} [options.defaultColor=[255, 255, 255, 255]] * @param {*} [options.data] * @param {string} [options.mode="speed"] "precision" or "speed" * @param {string} [options.algorithm="sqrt"] "simple", "sqrt" or "dominant" * @param {number} [options.step=1] * @param {number} [options.left=0] * @param {number} [options.top=0] * @param {number} [options.width=width of resource] * @param {number} [options.height=height of resource] */ value: function getColorAsync(resource, callback, options) { if (resource.complete) { callback.call(resource, this.getColor(resource, options), options && options.data); } else { this._bindImageEvents(resource, callback, options); } } /** * Get the average color from images, videos and canvas. * * @param {HTMLImageElement|HTMLVideoElement|HTMLCanvasElement} resource * @param {Object|null} [options] * @param {Array} [options.defaultColor=[255, 255, 255, 255]] * @param {*} [options.data] * @param {string} [options.mode="speed"] "precision" or "speed" * @param {string} [options.algorithm="sqrt"] "simple", "sqrt" or "dominant" * @param {number} [options.step=1] * @param {number} [options.left=0] * @param {number} [options.top=0] * @param {number} [options.width=width of resource] * @param {number} [options.height=height of resource] * * @returns {Object} */ }, { key: "getColor", value: function getColor(resource, options) { options = options || {}; var defaultColor = this._getDefaultColor(options), originalSize = this._getOriginalSize(resource), size = this._prepareSizeAndPosition(originalSize, options); var error = null, value = defaultColor; if (!size.srcWidth || !size.srcHeight || !size.destWidth || !size.destHeight) { return this._prepareResult(defaultColor, new Error('FastAverageColor: Incorrect sizes.')); } if (!this._ctx) { this._canvas = this._makeCanvas(); this._ctx = this._canvas.getContext && this._canvas.getContext('2d'); if (!this._ctx) { return this._prepareResult(defaultColor, new Error('FastAverageColor: Canvas Context 2D is not supported in this browser.')); } } this._canvas.width = size.destWidth; this._canvas.height = size.destHeight; try { this._ctx.clearRect(0, 0, size.destWidth, size.destHeight); this._ctx.drawImage(resource, size.srcLeft, size.srcTop, size.srcWidth, size.srcHeight, 0, 0, size.destWidth, size.destHeight); var bitmapData = this._ctx.getImageData(0, 0, size.destWidth, size.destHeight).data; value = this.getColorFromArray4(bitmapData, options); } catch (e) { // Security error, CORS // https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image error = e; } return this._prepareResult(value, error); } /** * Get the average color from a array when 1 pixel is 4 bytes. * * @param {Array|Uint8Array} arr * @param {Object} [options] * @param {string} [options.algorithm="sqrt"] "simple", "sqrt" or "dominant" * @param {Array} [options.defaultColor=[255, 255, 255, 255]] * @param {number} [options.step=1] * * @returns {Array} [red (0-255), green (0-255), blue (0-255), alpha (0-255)] */ }, { key: "getColorFromArray4", value: function getColorFromArray4(arr, options) { options = options || {}; var bytesPerPixel = 4, arrLength = arr.length; if (arrLength < bytesPerPixel) { return this._getDefaultColor(options); } var len = arrLength - arrLength % bytesPerPixel, preparedStep = (options.step || 1) * bytesPerPixel, algorithm = '_' + (options.algorithm || 'sqrt') + 'Algorithm'; if (typeof this[algorithm] !== 'function') { throw new Error("FastAverageColor: ".concat(options.algorithm, " is unknown algorithm.")); } return this[algorithm](arr, len, preparedStep); } /** * Destroy the instance. */ }, { key: "destroy", value: function destroy() { delete this._canvas; delete this._ctx; } }, { key: "_getDefaultColor", value: function _getDefaultColor(options) { return this._getOption(options, 'defaultColor', [255, 255, 255, 255]); } }, { key: "_getOption", value: function _getOption(options, name, defaultValue) { return typeof options[name] === 'undefined' ? defaultValue : options[name]; } }, { key: "_prepareSizeAndPosition", value: function _prepareSizeAndPosition(originalSize, options) { var srcLeft = this._getOption(options, 'left', 0), srcTop = this._getOption(options, 'top', 0), srcWidth = this._getOption(options, 'width', originalSize.width), srcHeight = this._getOption(options, 'height', originalSize.height), destWidth = srcWidth, destHeight = srcHeight; if (options.mode === 'precision') { return { srcLeft: srcLeft, srcTop: srcTop, srcWidth: srcWidth, srcHeight: srcHeight, destWidth: destWidth, destHeight: destHeight }; } var maxSize = 100, minSize = 10; var factor; if (srcWidth > srcHeight) { factor = srcWidth / srcHeight; destWidth = maxSize; destHeight = Math.round(destWidth / factor); } else { factor = srcHeight / srcWidth; destHeight = maxSize; destWidth = Math.round(destHeight / factor); } if (destWidth > srcWidth || destHeight > srcHeight || destWidth < minSize || destHeight < minSize) { destWidth = srcWidth; destHeight = srcHeight; } return { srcLeft: srcLeft, srcTop: srcTop, srcWidth: srcWidth, srcHeight: srcHeight, destWidth: destWidth, destHeight: destHeight }; } }, { key: "_simpleAlgorithm", value: function _simpleAlgorithm(arr, len, preparedStep) { var redTotal = 0, greenTotal = 0, blueTotal = 0, alphaTotal = 0, count = 0; for (var i = 0; i < len; i += preparedStep) { var alpha = arr[i + 3], red = arr[i] * alpha, green = arr[i + 1] * alpha, blue = arr[i + 2] * alpha; redTotal += red; greenTotal += green; blueTotal += blue; alphaTotal += alpha; count++; } return alphaTotal ? [Math.round(redTotal / alphaTotal), Math.round(greenTotal / alphaTotal), Math.round(blueTotal / alphaTotal), Math.round(alphaTotal / count)] : [0, 0, 0, 0]; } }, { key: "_sqrtAlgorithm", value: function _sqrtAlgorithm(arr, len, preparedStep) { var redTotal = 0, greenTotal = 0, blueTotal = 0, alphaTotal = 0, count = 0; for (var i = 0; i < len; i += preparedStep) { var red = arr[i], green = arr[i + 1], blue = arr[i + 2], alpha = arr[i + 3]; redTotal += red * red * alpha; greenTotal += green * green * alpha; blueTotal += blue * blue * alpha; alphaTotal += alpha; count++; } return alphaTotal ? [Math.round(Math.sqrt(redTotal / alphaTotal)), Math.round(Math.sqrt(greenTotal / alphaTotal)), Math.round(Math.sqrt(blueTotal / alphaTotal)), Math.round(alphaTotal / count)] : [0, 0, 0, 0]; } }, { key: "_dominantAlgorithm", value: function _dominantAlgorithm(arr, len, preparedStep) { var colorHash = {}, divider = 24; for (var i = 0; i < len; i += preparedStep) { var red = arr[i], green = arr[i + 1], blue = arr[i + 2], alpha = arr[i + 3], key = Math.round(red / divider) + ',' + Math.round(green / divider) + ',' + Math.round(blue / divider); if (colorHash[key]) { colorHash[key] = [colorHash[key][0] + red * alpha, colorHash[key][1] + green * alpha, colorHash[key][2] + blue * alpha, colorHash[key][3] + alpha, colorHash[key][4] + 1]; } else { colorHash[key] = [red * alpha, green * alpha, blue * alpha, alpha, 1]; } } var buffer = Object.keys(colorHash).map(function (key) { return colorHash[key]; }).sort(function (a, b) { var countA = a[4], countB = b[4]; return countA > countB ? -1 : countA === countB ? 0 : 1; }); var _buffer$ = _slicedToArray(buffer[0], 5), redTotal = _buffer$[0], greenTotal = _buffer$[1], blueTotal = _buffer$[2], alphaTotal = _buffer$[3], count = _buffer$[4]; return alphaTotal ? [Math.round(redTotal / alphaTotal), Math.round(greenTotal / alphaTotal), Math.round(blueTotal / alphaTotal), Math.round(alphaTotal / count)] : [0, 0, 0, 0]; } }, { key: "_bindImageEvents", value: function _bindImageEvents(resource, callback, options) { var _this = this; options = options || {}; var data = options && options.data, defaultColor = this._getDefaultColor(options), onload = function onload() { unbindEvents(); callback.call(resource, _this.getColor(resource, options), data); }, onerror = function onerror() { unbindEvents(); callback.call(resource, _this._prepareResult(defaultColor, new Error('Image error')), data); }, onabort = function onabort() { unbindEvents(); callback.call(resource, _this._prepareResult(defaultColor, new Error('Image abort')), data); }, unbindEvents = function unbindEvents() { resource.removeEventListener('load', onload); resource.removeEventListener('error', onerror); resource.removeEventListener('abort', onabort); }; resource.addEventListener('load', onload); resource.addEventListener('error', onerror); resource.addEventListener('abort', onabort); } }, { key: "_prepareResult", value: function _prepareResult(value, error) { var rgb = value.slice(0, 3), rgba = [].concat(rgb, value[3] / 255), isDark = this._isDark(value); return { error: error, value: value, rgb: 'rgb(' + rgb.join(',') + ')', rgba: 'rgba(' + rgba.join(',') + ')', hex: this._arrayToHex(rgb), hexa: this._arrayToHex(value), isDark: isDark, isLight: !isDark }; } }, { key: "_getOriginalSize", value: function _getOriginalSize(resource) { if (resource instanceof HTMLImageElement) { return { width: resource.naturalWidth, height: resource.naturalHeight }; } if (resource instanceof HTMLVideoElement) { return { width: resource.videoWidth, height: resource.videoHeight }; } return { width: resource.width, height: resource.height }; } }, { key: "_toHex", value: function _toHex(num) { var str = num.toString(16); return str.length === 1 ? '0' + str : str; } }, { key: "_arrayToHex", value: function _arrayToHex(arr) { return '#' + arr.map(this._toHex).join(''); } }, { key: "_isDark", value: function _isDark(color) { // http://www.w3.org/TR/AERT#color-contrast var result = (color[0] * 299 + color[1] * 587 + color[2] * 114) / 1000; return result < 128; } }, { key: "_makeCanvas", value: function _makeCanvas() { return typeof window === 'undefined' ? new OffscreenCanvas(1, 1) : document.createElement('canvas'); } }]); return FastAverageColor; }(); return FastAverageColor; }))); /***/ }), /***/ "FqII": /***/ (function(module, exports) { (function() { module.exports = window["wp"]["date"]; }()); /***/ }), /***/ "G8mJ": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const header = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z" })); /* harmony default export */ __webpack_exports__["a"] = (header); /***/ }), /***/ "GRId": /***/ (function(module, exports) { (function() { module.exports = window["wp"]["element"]; }()); /***/ }), /***/ "HSyU": /***/ (function(module, exports) { (function() { module.exports = window["wp"]["blocks"]; }()); /***/ }), /***/ "JREk": /***/ (function(module, exports) { (function() { module.exports = window["wp"]["serverSideRender"]; }()); /***/ }), /***/ "K51g": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, "__experimentalGetCoreBlocks", function() { return /* binding */ __experimentalGetCoreBlocks; }); __webpack_require__.d(__webpack_exports__, "registerCoreBlocks", function() { return /* binding */ registerCoreBlocks; }); __webpack_require__.d(__webpack_exports__, "__experimentalRegisterExperimentalCoreBlocks", function() { return /* binding */ __experimentalRegisterExperimentalCoreBlocks; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/archives/index.js var archives_namespaceObject = {}; __webpack_require__.r(archives_namespaceObject); __webpack_require__.d(archives_namespaceObject, "metadata", function() { return archives_metadata; }); __webpack_require__.d(archives_namespaceObject, "name", function() { return archives_name; }); __webpack_require__.d(archives_namespaceObject, "settings", function() { return archives_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/audio/index.js var build_module_audio_namespaceObject = {}; __webpack_require__.r(build_module_audio_namespaceObject); __webpack_require__.d(build_module_audio_namespaceObject, "metadata", function() { return audio_metadata; }); __webpack_require__.d(build_module_audio_namespaceObject, "name", function() { return audio_name; }); __webpack_require__.d(build_module_audio_namespaceObject, "settings", function() { return audio_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/button/index.js var button_namespaceObject = {}; __webpack_require__.r(button_namespaceObject); __webpack_require__.d(button_namespaceObject, "metadata", function() { return button_metadata; }); __webpack_require__.d(button_namespaceObject, "name", function() { return button_name; }); __webpack_require__.d(button_namespaceObject, "settings", function() { return button_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/buttons/index.js var build_module_buttons_namespaceObject = {}; __webpack_require__.r(build_module_buttons_namespaceObject); __webpack_require__.d(build_module_buttons_namespaceObject, "metadata", function() { return buttons_metadata; }); __webpack_require__.d(build_module_buttons_namespaceObject, "name", function() { return buttons_name; }); __webpack_require__.d(build_module_buttons_namespaceObject, "settings", function() { return buttons_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/calendar/index.js var build_module_calendar_namespaceObject = {}; __webpack_require__.r(build_module_calendar_namespaceObject); __webpack_require__.d(build_module_calendar_namespaceObject, "metadata", function() { return calendar_metadata; }); __webpack_require__.d(build_module_calendar_namespaceObject, "name", function() { return calendar_name; }); __webpack_require__.d(build_module_calendar_namespaceObject, "settings", function() { return calendar_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/categories/index.js var categories_namespaceObject = {}; __webpack_require__.r(categories_namespaceObject); __webpack_require__.d(categories_namespaceObject, "metadata", function() { return categories_metadata; }); __webpack_require__.d(categories_namespaceObject, "name", function() { return categories_name; }); __webpack_require__.d(categories_namespaceObject, "settings", function() { return categories_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/freeform/index.js var freeform_namespaceObject = {}; __webpack_require__.r(freeform_namespaceObject); __webpack_require__.d(freeform_namespaceObject, "metadata", function() { return freeform_metadata; }); __webpack_require__.d(freeform_namespaceObject, "name", function() { return freeform_name; }); __webpack_require__.d(freeform_namespaceObject, "settings", function() { return freeform_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/code/index.js var code_namespaceObject = {}; __webpack_require__.r(code_namespaceObject); __webpack_require__.d(code_namespaceObject, "metadata", function() { return code_metadata; }); __webpack_require__.d(code_namespaceObject, "name", function() { return code_name; }); __webpack_require__.d(code_namespaceObject, "settings", function() { return code_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/column/index.js var build_module_column_namespaceObject = {}; __webpack_require__.r(build_module_column_namespaceObject); __webpack_require__.d(build_module_column_namespaceObject, "metadata", function() { return column_metadata; }); __webpack_require__.d(build_module_column_namespaceObject, "name", function() { return column_name; }); __webpack_require__.d(build_module_column_namespaceObject, "settings", function() { return column_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/columns/index.js var build_module_columns_namespaceObject = {}; __webpack_require__.r(build_module_columns_namespaceObject); __webpack_require__.d(build_module_columns_namespaceObject, "metadata", function() { return columns_metadata; }); __webpack_require__.d(build_module_columns_namespaceObject, "name", function() { return columns_name; }); __webpack_require__.d(build_module_columns_namespaceObject, "settings", function() { return columns_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/cover/index.js var build_module_cover_namespaceObject = {}; __webpack_require__.r(build_module_cover_namespaceObject); __webpack_require__.d(build_module_cover_namespaceObject, "metadata", function() { return cover_metadata; }); __webpack_require__.d(build_module_cover_namespaceObject, "name", function() { return cover_name; }); __webpack_require__.d(build_module_cover_namespaceObject, "settings", function() { return cover_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/embed/index.js var embed_namespaceObject = {}; __webpack_require__.r(embed_namespaceObject); __webpack_require__.d(embed_namespaceObject, "metadata", function() { return embed_metadata; }); __webpack_require__.d(embed_namespaceObject, "name", function() { return embed_name; }); __webpack_require__.d(embed_namespaceObject, "settings", function() { return embed_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/file/index.js var build_module_file_namespaceObject = {}; __webpack_require__.r(build_module_file_namespaceObject); __webpack_require__.d(build_module_file_namespaceObject, "metadata", function() { return file_metadata; }); __webpack_require__.d(build_module_file_namespaceObject, "name", function() { return file_name; }); __webpack_require__.d(build_module_file_namespaceObject, "settings", function() { return file_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/gallery/index.js var build_module_gallery_namespaceObject = {}; __webpack_require__.r(build_module_gallery_namespaceObject); __webpack_require__.d(build_module_gallery_namespaceObject, "metadata", function() { return gallery_metadata; }); __webpack_require__.d(build_module_gallery_namespaceObject, "name", function() { return gallery_name; }); __webpack_require__.d(build_module_gallery_namespaceObject, "settings", function() { return gallery_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/group/index.js var group_namespaceObject = {}; __webpack_require__.r(group_namespaceObject); __webpack_require__.d(group_namespaceObject, "metadata", function() { return group_metadata; }); __webpack_require__.d(group_namespaceObject, "name", function() { return group_name; }); __webpack_require__.d(group_namespaceObject, "settings", function() { return group_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/heading/index.js var build_module_heading_namespaceObject = {}; __webpack_require__.r(build_module_heading_namespaceObject); __webpack_require__.d(build_module_heading_namespaceObject, "metadata", function() { return heading_metadata; }); __webpack_require__.d(build_module_heading_namespaceObject, "name", function() { return heading_name; }); __webpack_require__.d(build_module_heading_namespaceObject, "settings", function() { return heading_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/html/index.js var build_module_html_namespaceObject = {}; __webpack_require__.r(build_module_html_namespaceObject); __webpack_require__.d(build_module_html_namespaceObject, "metadata", function() { return html_metadata; }); __webpack_require__.d(build_module_html_namespaceObject, "name", function() { return html_name; }); __webpack_require__.d(build_module_html_namespaceObject, "settings", function() { return html_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/image/index.js var build_module_image_namespaceObject = {}; __webpack_require__.r(build_module_image_namespaceObject); __webpack_require__.d(build_module_image_namespaceObject, "metadata", function() { return image_metadata; }); __webpack_require__.d(build_module_image_namespaceObject, "name", function() { return image_name; }); __webpack_require__.d(build_module_image_namespaceObject, "settings", function() { return image_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/latest-comments/index.js var latest_comments_namespaceObject = {}; __webpack_require__.r(latest_comments_namespaceObject); __webpack_require__.d(latest_comments_namespaceObject, "metadata", function() { return latest_comments_metadata; }); __webpack_require__.d(latest_comments_namespaceObject, "name", function() { return latest_comments_name; }); __webpack_require__.d(latest_comments_namespaceObject, "settings", function() { return latest_comments_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/latest-posts/index.js var latest_posts_namespaceObject = {}; __webpack_require__.r(latest_posts_namespaceObject); __webpack_require__.d(latest_posts_namespaceObject, "metadata", function() { return latest_posts_metadata; }); __webpack_require__.d(latest_posts_namespaceObject, "name", function() { return latest_posts_name; }); __webpack_require__.d(latest_posts_namespaceObject, "settings", function() { return latest_posts_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/list/index.js var build_module_list_namespaceObject = {}; __webpack_require__.r(build_module_list_namespaceObject); __webpack_require__.d(build_module_list_namespaceObject, "metadata", function() { return list_metadata; }); __webpack_require__.d(build_module_list_namespaceObject, "name", function() { return list_name; }); __webpack_require__.d(build_module_list_namespaceObject, "settings", function() { return list_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/loginout/index.js var loginout_namespaceObject = {}; __webpack_require__.r(loginout_namespaceObject); __webpack_require__.d(loginout_namespaceObject, "metadata", function() { return loginout_metadata; }); __webpack_require__.d(loginout_namespaceObject, "name", function() { return loginout_name; }); __webpack_require__.d(loginout_namespaceObject, "settings", function() { return loginout_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/media-text/index.js var media_text_namespaceObject = {}; __webpack_require__.r(media_text_namespaceObject); __webpack_require__.d(media_text_namespaceObject, "metadata", function() { return media_text_metadata; }); __webpack_require__.d(media_text_namespaceObject, "name", function() { return media_text_name; }); __webpack_require__.d(media_text_namespaceObject, "settings", function() { return media_text_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/missing/index.js var missing_namespaceObject = {}; __webpack_require__.r(missing_namespaceObject); __webpack_require__.d(missing_namespaceObject, "metadata", function() { return missing_metadata; }); __webpack_require__.d(missing_namespaceObject, "name", function() { return missing_name; }); __webpack_require__.d(missing_namespaceObject, "settings", function() { return missing_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/more/index.js var build_module_more_namespaceObject = {}; __webpack_require__.r(build_module_more_namespaceObject); __webpack_require__.d(build_module_more_namespaceObject, "metadata", function() { return more_metadata; }); __webpack_require__.d(build_module_more_namespaceObject, "name", function() { return more_name; }); __webpack_require__.d(build_module_more_namespaceObject, "settings", function() { return more_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/navigation/index.js var build_module_navigation_namespaceObject = {}; __webpack_require__.r(build_module_navigation_namespaceObject); __webpack_require__.d(build_module_navigation_namespaceObject, "metadata", function() { return navigation_metadata; }); __webpack_require__.d(build_module_navigation_namespaceObject, "name", function() { return navigation_name; }); __webpack_require__.d(build_module_navigation_namespaceObject, "settings", function() { return navigation_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/navigation-link/index.js var navigation_link_namespaceObject = {}; __webpack_require__.r(navigation_link_namespaceObject); __webpack_require__.d(navigation_link_namespaceObject, "metadata", function() { return navigation_link_metadata; }); __webpack_require__.d(navigation_link_namespaceObject, "name", function() { return navigation_link_name; }); __webpack_require__.d(navigation_link_namespaceObject, "settings", function() { return navigation_link_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/navigation-submenu/index.js var navigation_submenu_namespaceObject = {}; __webpack_require__.r(navigation_submenu_namespaceObject); __webpack_require__.d(navigation_submenu_namespaceObject, "metadata", function() { return navigation_submenu_metadata; }); __webpack_require__.d(navigation_submenu_namespaceObject, "name", function() { return navigation_submenu_name; }); __webpack_require__.d(navigation_submenu_namespaceObject, "settings", function() { return navigation_submenu_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/nextpage/index.js var nextpage_namespaceObject = {}; __webpack_require__.r(nextpage_namespaceObject); __webpack_require__.d(nextpage_namespaceObject, "metadata", function() { return nextpage_metadata; }); __webpack_require__.d(nextpage_namespaceObject, "name", function() { return nextpage_name; }); __webpack_require__.d(nextpage_namespaceObject, "settings", function() { return nextpage_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/pattern/index.js var pattern_namespaceObject = {}; __webpack_require__.r(pattern_namespaceObject); __webpack_require__.d(pattern_namespaceObject, "metadata", function() { return pattern_metadata; }); __webpack_require__.d(pattern_namespaceObject, "name", function() { return pattern_name; }); __webpack_require__.d(pattern_namespaceObject, "settings", function() { return pattern_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/page-list/index.js var page_list_namespaceObject = {}; __webpack_require__.r(page_list_namespaceObject); __webpack_require__.d(page_list_namespaceObject, "metadata", function() { return page_list_metadata; }); __webpack_require__.d(page_list_namespaceObject, "name", function() { return page_list_name; }); __webpack_require__.d(page_list_namespaceObject, "settings", function() { return page_list_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/paragraph/index.js var build_module_paragraph_namespaceObject = {}; __webpack_require__.r(build_module_paragraph_namespaceObject); __webpack_require__.d(build_module_paragraph_namespaceObject, "metadata", function() { return paragraph_metadata; }); __webpack_require__.d(build_module_paragraph_namespaceObject, "name", function() { return paragraph_name; }); __webpack_require__.d(build_module_paragraph_namespaceObject, "settings", function() { return paragraph_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-author/index.js var build_module_post_author_namespaceObject = {}; __webpack_require__.r(build_module_post_author_namespaceObject); __webpack_require__.d(build_module_post_author_namespaceObject, "metadata", function() { return post_author_metadata; }); __webpack_require__.d(build_module_post_author_namespaceObject, "name", function() { return post_author_name; }); __webpack_require__.d(build_module_post_author_namespaceObject, "settings", function() { return post_author_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-comments/index.js var build_module_post_comments_namespaceObject = {}; __webpack_require__.r(build_module_post_comments_namespaceObject); __webpack_require__.d(build_module_post_comments_namespaceObject, "metadata", function() { return post_comments_metadata; }); __webpack_require__.d(build_module_post_comments_namespaceObject, "name", function() { return post_comments_name; }); __webpack_require__.d(build_module_post_comments_namespaceObject, "settings", function() { return post_comments_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-content/index.js var build_module_post_content_namespaceObject = {}; __webpack_require__.r(build_module_post_content_namespaceObject); __webpack_require__.d(build_module_post_content_namespaceObject, "metadata", function() { return post_content_metadata; }); __webpack_require__.d(build_module_post_content_namespaceObject, "name", function() { return post_content_name; }); __webpack_require__.d(build_module_post_content_namespaceObject, "settings", function() { return post_content_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-date/index.js var build_module_post_date_namespaceObject = {}; __webpack_require__.r(build_module_post_date_namespaceObject); __webpack_require__.d(build_module_post_date_namespaceObject, "metadata", function() { return post_date_metadata; }); __webpack_require__.d(build_module_post_date_namespaceObject, "name", function() { return post_date_name; }); __webpack_require__.d(build_module_post_date_namespaceObject, "settings", function() { return post_date_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-excerpt/index.js var build_module_post_excerpt_namespaceObject = {}; __webpack_require__.r(build_module_post_excerpt_namespaceObject); __webpack_require__.d(build_module_post_excerpt_namespaceObject, "metadata", function() { return post_excerpt_metadata; }); __webpack_require__.d(build_module_post_excerpt_namespaceObject, "name", function() { return post_excerpt_name; }); __webpack_require__.d(build_module_post_excerpt_namespaceObject, "settings", function() { return post_excerpt_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-featured-image/index.js var build_module_post_featured_image_namespaceObject = {}; __webpack_require__.r(build_module_post_featured_image_namespaceObject); __webpack_require__.d(build_module_post_featured_image_namespaceObject, "metadata", function() { return post_featured_image_metadata; }); __webpack_require__.d(build_module_post_featured_image_namespaceObject, "name", function() { return post_featured_image_name; }); __webpack_require__.d(build_module_post_featured_image_namespaceObject, "settings", function() { return post_featured_image_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-navigation-link/index.js var post_navigation_link_namespaceObject = {}; __webpack_require__.r(post_navigation_link_namespaceObject); __webpack_require__.d(post_navigation_link_namespaceObject, "metadata", function() { return post_navigation_link_metadata; }); __webpack_require__.d(post_navigation_link_namespaceObject, "name", function() { return post_navigation_link_name; }); __webpack_require__.d(post_navigation_link_namespaceObject, "settings", function() { return post_navigation_link_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-template/index.js var post_template_namespaceObject = {}; __webpack_require__.r(post_template_namespaceObject); __webpack_require__.d(post_template_namespaceObject, "metadata", function() { return post_template_metadata; }); __webpack_require__.d(post_template_namespaceObject, "name", function() { return post_template_name; }); __webpack_require__.d(post_template_namespaceObject, "settings", function() { return post_template_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-terms/index.js var post_terms_namespaceObject = {}; __webpack_require__.r(post_terms_namespaceObject); __webpack_require__.d(post_terms_namespaceObject, "metadata", function() { return post_terms_metadata; }); __webpack_require__.d(post_terms_namespaceObject, "name", function() { return post_terms_name; }); __webpack_require__.d(post_terms_namespaceObject, "settings", function() { return post_terms_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-title/index.js var build_module_post_title_namespaceObject = {}; __webpack_require__.r(build_module_post_title_namespaceObject); __webpack_require__.d(build_module_post_title_namespaceObject, "metadata", function() { return post_title_metadata; }); __webpack_require__.d(build_module_post_title_namespaceObject, "name", function() { return post_title_name; }); __webpack_require__.d(build_module_post_title_namespaceObject, "settings", function() { return post_title_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/preformatted/index.js var build_module_preformatted_namespaceObject = {}; __webpack_require__.r(build_module_preformatted_namespaceObject); __webpack_require__.d(build_module_preformatted_namespaceObject, "metadata", function() { return preformatted_metadata; }); __webpack_require__.d(build_module_preformatted_namespaceObject, "name", function() { return preformatted_name; }); __webpack_require__.d(build_module_preformatted_namespaceObject, "settings", function() { return preformatted_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/pullquote/index.js var build_module_pullquote_namespaceObject = {}; __webpack_require__.r(build_module_pullquote_namespaceObject); __webpack_require__.d(build_module_pullquote_namespaceObject, "metadata", function() { return pullquote_metadata; }); __webpack_require__.d(build_module_pullquote_namespaceObject, "name", function() { return pullquote_name; }); __webpack_require__.d(build_module_pullquote_namespaceObject, "settings", function() { return pullquote_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query/index.js var query_namespaceObject = {}; __webpack_require__.r(query_namespaceObject); __webpack_require__.d(query_namespaceObject, "metadata", function() { return query_metadata; }); __webpack_require__.d(query_namespaceObject, "name", function() { return query_name; }); __webpack_require__.d(query_namespaceObject, "settings", function() { return query_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination/index.js var build_module_query_pagination_namespaceObject = {}; __webpack_require__.r(build_module_query_pagination_namespaceObject); __webpack_require__.d(build_module_query_pagination_namespaceObject, "metadata", function() { return query_pagination_metadata; }); __webpack_require__.d(build_module_query_pagination_namespaceObject, "name", function() { return query_pagination_name; }); __webpack_require__.d(build_module_query_pagination_namespaceObject, "settings", function() { return query_pagination_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-next/index.js var build_module_query_pagination_next_namespaceObject = {}; __webpack_require__.r(build_module_query_pagination_next_namespaceObject); __webpack_require__.d(build_module_query_pagination_next_namespaceObject, "metadata", function() { return query_pagination_next_metadata; }); __webpack_require__.d(build_module_query_pagination_next_namespaceObject, "name", function() { return query_pagination_next_name; }); __webpack_require__.d(build_module_query_pagination_next_namespaceObject, "settings", function() { return query_pagination_next_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-numbers/index.js var build_module_query_pagination_numbers_namespaceObject = {}; __webpack_require__.r(build_module_query_pagination_numbers_namespaceObject); __webpack_require__.d(build_module_query_pagination_numbers_namespaceObject, "metadata", function() { return query_pagination_numbers_metadata; }); __webpack_require__.d(build_module_query_pagination_numbers_namespaceObject, "name", function() { return query_pagination_numbers_name; }); __webpack_require__.d(build_module_query_pagination_numbers_namespaceObject, "settings", function() { return query_pagination_numbers_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-previous/index.js var build_module_query_pagination_previous_namespaceObject = {}; __webpack_require__.r(build_module_query_pagination_previous_namespaceObject); __webpack_require__.d(build_module_query_pagination_previous_namespaceObject, "metadata", function() { return query_pagination_previous_metadata; }); __webpack_require__.d(build_module_query_pagination_previous_namespaceObject, "name", function() { return query_pagination_previous_name; }); __webpack_require__.d(build_module_query_pagination_previous_namespaceObject, "settings", function() { return query_pagination_previous_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-title/index.js var query_title_namespaceObject = {}; __webpack_require__.r(query_title_namespaceObject); __webpack_require__.d(query_title_namespaceObject, "metadata", function() { return query_title_metadata; }); __webpack_require__.d(query_title_namespaceObject, "name", function() { return query_title_name; }); __webpack_require__.d(query_title_namespaceObject, "settings", function() { return query_title_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/quote/index.js var build_module_quote_namespaceObject = {}; __webpack_require__.r(build_module_quote_namespaceObject); __webpack_require__.d(build_module_quote_namespaceObject, "metadata", function() { return quote_metadata; }); __webpack_require__.d(build_module_quote_namespaceObject, "name", function() { return quote_name; }); __webpack_require__.d(build_module_quote_namespaceObject, "settings", function() { return quote_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/block/index.js var block_namespaceObject = {}; __webpack_require__.r(block_namespaceObject); __webpack_require__.d(block_namespaceObject, "metadata", function() { return block_metadata; }); __webpack_require__.d(block_namespaceObject, "name", function() { return block_name; }); __webpack_require__.d(block_namespaceObject, "settings", function() { return block_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/rss/index.js var build_module_rss_namespaceObject = {}; __webpack_require__.r(build_module_rss_namespaceObject); __webpack_require__.d(build_module_rss_namespaceObject, "metadata", function() { return rss_metadata; }); __webpack_require__.d(build_module_rss_namespaceObject, "name", function() { return rss_name; }); __webpack_require__.d(build_module_rss_namespaceObject, "settings", function() { return rss_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/search/index.js var search_namespaceObject = {}; __webpack_require__.r(search_namespaceObject); __webpack_require__.d(search_namespaceObject, "metadata", function() { return search_metadata; }); __webpack_require__.d(search_namespaceObject, "name", function() { return search_name; }); __webpack_require__.d(search_namespaceObject, "settings", function() { return search_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/separator/index.js var build_module_separator_namespaceObject = {}; __webpack_require__.r(build_module_separator_namespaceObject); __webpack_require__.d(build_module_separator_namespaceObject, "metadata", function() { return separator_metadata; }); __webpack_require__.d(build_module_separator_namespaceObject, "name", function() { return separator_name; }); __webpack_require__.d(build_module_separator_namespaceObject, "settings", function() { return build_module_separator_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/shortcode/index.js var build_module_shortcode_namespaceObject = {}; __webpack_require__.r(build_module_shortcode_namespaceObject); __webpack_require__.d(build_module_shortcode_namespaceObject, "metadata", function() { return shortcode_metadata; }); __webpack_require__.d(build_module_shortcode_namespaceObject, "name", function() { return shortcode_name; }); __webpack_require__.d(build_module_shortcode_namespaceObject, "settings", function() { return shortcode_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-logo/index.js var build_module_site_logo_namespaceObject = {}; __webpack_require__.r(build_module_site_logo_namespaceObject); __webpack_require__.d(build_module_site_logo_namespaceObject, "metadata", function() { return site_logo_metadata; }); __webpack_require__.d(build_module_site_logo_namespaceObject, "name", function() { return site_logo_name; }); __webpack_require__.d(build_module_site_logo_namespaceObject, "settings", function() { return site_logo_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-tagline/index.js var site_tagline_namespaceObject = {}; __webpack_require__.r(site_tagline_namespaceObject); __webpack_require__.d(site_tagline_namespaceObject, "metadata", function() { return site_tagline_metadata; }); __webpack_require__.d(site_tagline_namespaceObject, "name", function() { return site_tagline_name; }); __webpack_require__.d(site_tagline_namespaceObject, "settings", function() { return site_tagline_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-title/index.js var site_title_namespaceObject = {}; __webpack_require__.r(site_title_namespaceObject); __webpack_require__.d(site_title_namespaceObject, "metadata", function() { return site_title_metadata; }); __webpack_require__.d(site_title_namespaceObject, "name", function() { return site_title_name; }); __webpack_require__.d(site_title_namespaceObject, "settings", function() { return site_title_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/social-link/index.js var social_link_namespaceObject = {}; __webpack_require__.r(social_link_namespaceObject); __webpack_require__.d(social_link_namespaceObject, "metadata", function() { return social_link_metadata; }); __webpack_require__.d(social_link_namespaceObject, "name", function() { return social_link_name; }); __webpack_require__.d(social_link_namespaceObject, "settings", function() { return social_link_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/social-links/index.js var social_links_namespaceObject = {}; __webpack_require__.r(social_links_namespaceObject); __webpack_require__.d(social_links_namespaceObject, "metadata", function() { return social_links_metadata; }); __webpack_require__.d(social_links_namespaceObject, "name", function() { return social_links_name; }); __webpack_require__.d(social_links_namespaceObject, "settings", function() { return social_links_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/spacer/index.js var spacer_namespaceObject = {}; __webpack_require__.r(spacer_namespaceObject); __webpack_require__.d(spacer_namespaceObject, "metadata", function() { return spacer_metadata; }); __webpack_require__.d(spacer_namespaceObject, "name", function() { return spacer_name; }); __webpack_require__.d(spacer_namespaceObject, "settings", function() { return spacer_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/table/index.js var build_module_table_namespaceObject = {}; __webpack_require__.r(build_module_table_namespaceObject); __webpack_require__.d(build_module_table_namespaceObject, "metadata", function() { return table_metadata; }); __webpack_require__.d(build_module_table_namespaceObject, "name", function() { return table_name; }); __webpack_require__.d(build_module_table_namespaceObject, "settings", function() { return table_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/tag-cloud/index.js var tag_cloud_namespaceObject = {}; __webpack_require__.r(tag_cloud_namespaceObject); __webpack_require__.d(tag_cloud_namespaceObject, "metadata", function() { return tag_cloud_metadata; }); __webpack_require__.d(tag_cloud_namespaceObject, "name", function() { return tag_cloud_name; }); __webpack_require__.d(tag_cloud_namespaceObject, "settings", function() { return tag_cloud_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/template-part/index.js var template_part_namespaceObject = {}; __webpack_require__.r(template_part_namespaceObject); __webpack_require__.d(template_part_namespaceObject, "metadata", function() { return template_part_metadata; }); __webpack_require__.d(template_part_namespaceObject, "name", function() { return template_part_name; }); __webpack_require__.d(template_part_namespaceObject, "settings", function() { return template_part_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/term-description/index.js var build_module_term_description_namespaceObject = {}; __webpack_require__.r(build_module_term_description_namespaceObject); __webpack_require__.d(build_module_term_description_namespaceObject, "metadata", function() { return term_description_metadata; }); __webpack_require__.d(build_module_term_description_namespaceObject, "name", function() { return term_description_name; }); __webpack_require__.d(build_module_term_description_namespaceObject, "settings", function() { return term_description_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/text-columns/index.js var text_columns_namespaceObject = {}; __webpack_require__.r(text_columns_namespaceObject); __webpack_require__.d(text_columns_namespaceObject, "metadata", function() { return text_columns_metadata; }); __webpack_require__.d(text_columns_namespaceObject, "name", function() { return text_columns_name; }); __webpack_require__.d(text_columns_namespaceObject, "settings", function() { return text_columns_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/verse/index.js var build_module_verse_namespaceObject = {}; __webpack_require__.r(build_module_verse_namespaceObject); __webpack_require__.d(build_module_verse_namespaceObject, "metadata", function() { return verse_metadata; }); __webpack_require__.d(build_module_verse_namespaceObject, "name", function() { return verse_name; }); __webpack_require__.d(build_module_verse_namespaceObject, "settings", function() { return verse_settings; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/video/index.js var build_module_video_namespaceObject = {}; __webpack_require__.r(build_module_video_namespaceObject); __webpack_require__.d(build_module_video_namespaceObject, "metadata", function() { return video_metadata; }); __webpack_require__.d(build_module_video_namespaceObject, "name", function() { return video_name; }); __webpack_require__.d(build_module_video_namespaceObject, "settings", function() { return video_settings; }); // EXTERNAL MODULE: external ["wp","blocks"] var external_wp_blocks_ = __webpack_require__("HSyU"); // EXTERNAL MODULE: external ["wp","element"] var external_wp_element_ = __webpack_require__("GRId"); // EXTERNAL MODULE: external ["wp","primitives"] var external_wp_primitives_ = __webpack_require__("Tqx9"); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/archive.js /** * WordPress dependencies */ const archive = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5zM8 12.8h8v-1.5H8v1.5zm0 3h8v-1.5H8v1.5z" })); /* harmony default export */ var library_archive = (archive); // EXTERNAL MODULE: external ["wp","components"] var external_wp_components_ = __webpack_require__("tI+e"); // EXTERNAL MODULE: external ["wp","i18n"] var external_wp_i18n_ = __webpack_require__("l3Sj"); // EXTERNAL MODULE: external ["wp","blockEditor"] var external_wp_blockEditor_ = __webpack_require__("axFQ"); // EXTERNAL MODULE: external ["wp","serverSideRender"] var external_wp_serverSideRender_ = __webpack_require__("JREk"); var external_wp_serverSideRender_default = /*#__PURE__*/__webpack_require__.n(external_wp_serverSideRender_); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/archives/edit.js /** * WordPress dependencies */ function ArchivesEdit(_ref) { let { attributes, setAttributes } = _ref; const { showPostCounts, displayAsDropdown } = attributes; return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Archives settings') }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Display as dropdown'), checked: displayAsDropdown, onChange: () => setAttributes({ displayAsDropdown: !displayAsDropdown }) }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Show post counts'), checked: showPostCounts, onChange: () => setAttributes({ showPostCounts: !showPostCounts }) }))), Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])(), Object(external_wp_element_["createElement"])(external_wp_components_["Disabled"], null, Object(external_wp_element_["createElement"])(external_wp_serverSideRender_default.a, { block: "core/archives", attributes: attributes })))); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/archives/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const archives_metadata = { apiVersion: 2, name: "core/archives", title: "Archives", category: "widgets", description: "Display a monthly archive of your posts.", textdomain: "default", attributes: { displayAsDropdown: { type: "boolean", "default": false }, showPostCounts: { type: "boolean", "default": false } }, supports: { align: true, html: false }, editorStyle: "wp-block-archives-editor" }; const { name: archives_name } = archives_metadata; const archives_settings = { icon: library_archive, example: {}, edit: ArchivesEdit }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/audio.js /** * WordPress dependencies */ const audio = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z" })); /* harmony default export */ var library_audio = (audio); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/deprecated.js /** * WordPress dependencies */ /* harmony default export */ var deprecated = ([{ attributes: { src: { type: 'string', source: 'attribute', selector: 'audio', attribute: 'src' }, caption: { type: 'string', source: 'html', selector: 'figcaption' }, id: { type: 'number' }, autoplay: { type: 'boolean', source: 'attribute', selector: 'audio', attribute: 'autoplay' }, loop: { type: 'boolean', source: 'attribute', selector: 'audio', attribute: 'loop' }, preload: { type: 'string', source: 'attribute', selector: 'audio', attribute: 'preload' } }, supports: { align: true }, save(_ref) { let { attributes } = _ref; const { autoplay, caption, loop, preload, src } = attributes; return Object(external_wp_element_["createElement"])("figure", null, Object(external_wp_element_["createElement"])("audio", { controls: "controls", src: src, autoPlay: autoplay, loop: loop, preload: preload }), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", value: caption })); } }]); // EXTERNAL MODULE: external ["wp","blob"] var external_wp_blob_ = __webpack_require__("xTGt"); // EXTERNAL MODULE: external ["wp","data"] var external_wp_data_ = __webpack_require__("1ZqX"); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/constants.js const ASPECT_RATIOS = [// Common video resolutions. { ratio: '2.33', className: 'wp-embed-aspect-21-9' }, { ratio: '2.00', className: 'wp-embed-aspect-18-9' }, { ratio: '1.78', className: 'wp-embed-aspect-16-9' }, { ratio: '1.33', className: 'wp-embed-aspect-4-3' }, // Vertical video and instagram square video support. { ratio: '1.00', className: 'wp-embed-aspect-1-1' }, { ratio: '0.56', className: 'wp-embed-aspect-9-16' }, { ratio: '0.50', className: 'wp-embed-aspect-1-2' }]; const WP_EMBED_TYPE = 'wp-embed'; // EXTERNAL MODULE: external "lodash" var external_lodash_ = __webpack_require__("YLtl"); // EXTERNAL MODULE: ./node_modules/classnames/dedupe.js var dedupe = __webpack_require__("A/WM"); var dedupe_default = /*#__PURE__*/__webpack_require__.n(dedupe); // EXTERNAL MODULE: ./node_modules/memize/index.js var memize = __webpack_require__("4eJC"); var memize_default = /*#__PURE__*/__webpack_require__.n(memize); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/util.js /** * Internal dependencies */ /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ const util_metadata = { apiVersion: 2, name: "core/embed", title: "Embed", category: "embed", description: "Add a block that displays content pulled from other sites, like Twitter or YouTube.", textdomain: "default", attributes: { url: { type: "string" }, caption: { type: "string", source: "html", selector: "figcaption" }, type: { type: "string" }, providerNameSlug: { type: "string" }, allowResponsive: { type: "boolean", "default": true }, responsive: { type: "boolean", "default": false }, previewable: { type: "boolean", "default": true } }, supports: { align: true }, editorStyle: "wp-block-embed-editor", style: "wp-block-embed" }; const { name: DEFAULT_EMBED_BLOCK } = util_metadata; /** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */ /** * Returns the embed block's information by matching the provided service provider * * @param {string} provider The embed block's provider * @return {WPBlockVariation} The embed block's information */ const getEmbedInfoByProvider = provider => { var _getBlockVariations; return (_getBlockVariations = Object(external_wp_blocks_["getBlockVariations"])(DEFAULT_EMBED_BLOCK)) === null || _getBlockVariations === void 0 ? void 0 : _getBlockVariations.find(_ref => { let { name } = _ref; return name === provider; }); }; /** * Returns true if any of the regular expressions match the URL. * * @param {string} url The URL to test. * @param {Array} patterns The list of regular expressions to test agains. * @return {boolean} True if any of the regular expressions match the URL. */ const matchesPatterns = function (url) { let patterns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; return patterns.some(pattern => url.match(pattern)); }; /** * Finds the block variation that should be used for the URL, * based on the provided URL and the variation's patterns. * * @param {string} url The URL to test. * @return {WPBlockVariation} The block variation that should be used for this URL */ const findMoreSuitableBlock = url => { var _getBlockVariations2; return (_getBlockVariations2 = Object(external_wp_blocks_["getBlockVariations"])(DEFAULT_EMBED_BLOCK)) === null || _getBlockVariations2 === void 0 ? void 0 : _getBlockVariations2.find(_ref2 => { let { patterns } = _ref2; return matchesPatterns(url, patterns); }); }; const isFromWordPress = html => html && html.includes('class="wp-embedded-content"'); const getPhotoHtml = photo => { // 100% width for the preview so it fits nicely into the document, some "thumbnails" are // actually the full size photo. If thumbnails not found, use full image. const imageUrl = photo.thumbnail_url || photo.url; const photoPreview = Object(external_wp_element_["createElement"])("p", null, Object(external_wp_element_["createElement"])("img", { src: imageUrl, alt: photo.title, width: "100%" })); return Object(external_wp_element_["renderToString"])(photoPreview); }; /** * Creates a more suitable embed block based on the passed in props * and attributes generated from an embed block's preview. * * We require `attributesFromPreview` to be generated from the latest attributes * and preview, and because of the way the react lifecycle operates, we can't * guarantee that the attributes contained in the block's props are the latest * versions, so we require that these are generated separately. * See `getAttributesFromPreview` in the generated embed edit component. * * @param {Object} props The block's props. * @param {Object} [attributesFromPreview] Attributes generated from the block's most up to date preview. * @return {Object|undefined} A more suitable embed block if one exists. */ const createUpgradedEmbedBlock = function (props) { var _getBlockVariations3; let attributesFromPreview = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; const { preview, attributes = {} } = props; const { url, providerNameSlug, type, ...restAttributes } = attributes; if (!url || !Object(external_wp_blocks_["getBlockType"])(DEFAULT_EMBED_BLOCK)) return; const matchedBlock = findMoreSuitableBlock(url); // WordPress blocks can work on multiple sites, and so don't have patterns, // so if we're in a WordPress block, assume the user has chosen it for a WordPress URL. const isCurrentBlockWP = providerNameSlug === 'wordpress' || type === WP_EMBED_TYPE; // if current block is not WordPress and a more suitable block found // that is different from the current one, create the new matched block const shouldCreateNewBlock = !isCurrentBlockWP && matchedBlock && (matchedBlock.attributes.providerNameSlug !== providerNameSlug || !providerNameSlug); if (shouldCreateNewBlock) { return Object(external_wp_blocks_["createBlock"])(DEFAULT_EMBED_BLOCK, { url, ...restAttributes, ...matchedBlock.attributes }); } const wpVariation = (_getBlockVariations3 = Object(external_wp_blocks_["getBlockVariations"])(DEFAULT_EMBED_BLOCK)) === null || _getBlockVariations3 === void 0 ? void 0 : _getBlockVariations3.find(_ref3 => { let { name } = _ref3; return name === 'wordpress'; }); // We can't match the URL for WordPress embeds, we have to check the HTML instead. if (!wpVariation || !preview || !isFromWordPress(preview.html) || isCurrentBlockWP) { return; } // This is not the WordPress embed block so transform it into one. return Object(external_wp_blocks_["createBlock"])(DEFAULT_EMBED_BLOCK, { url, ...wpVariation.attributes, // By now we have the preview, but when the new block first renders, it // won't have had all the attributes set, and so won't get the correct // type and it won't render correctly. So, we pass through the current attributes // here so that the initial render works when we switch to the WordPress // block. This only affects the WordPress block because it can't be // rendered in the usual Sandbox (it has a sandbox of its own) and it // relies on the preview to set the correct render type. ...attributesFromPreview }); }; /** * Removes all previously set aspect ratio related classes and return the rest * existing class names. * * @param {string} existingClassNames Any existing class names. * @return {string} The class names without any aspect ratio related class. */ const removeAspectRatioClasses = existingClassNames => { if (!existingClassNames) { // Avoids extraneous work and also, by returning the same value as // received, ensures the post is not dirtied by a change of the block // attribute from `undefined` to an emtpy string. return existingClassNames; } const aspectRatioClassNames = ASPECT_RATIOS.reduce((accumulator, _ref4) => { let { className } = _ref4; accumulator[className] = false; return accumulator; }, { 'wp-has-aspect-ratio': false }); return dedupe_default()(existingClassNames, aspectRatioClassNames); }; /** * Returns class names with any relevant responsive aspect ratio names. * * @param {string} html The preview HTML that possibly contains an iframe with width and height set. * @param {string} existingClassNames Any existing class names. * @param {boolean} allowResponsive If the responsive class names should be added, or removed. * @return {string} Deduped class names. */ function getClassNames(html, existingClassNames) { let allowResponsive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; if (!allowResponsive) { return removeAspectRatioClasses(existingClassNames); } const previewDocument = document.implementation.createHTMLDocument(''); previewDocument.body.innerHTML = html; const iframe = previewDocument.body.querySelector('iframe'); // If we have a fixed aspect iframe, and it's a responsive embed block. if (iframe && iframe.height && iframe.width) { const aspectRatio = (iframe.width / iframe.height).toFixed(2); // Given the actual aspect ratio, find the widest ratio to support it. for (let ratioIndex = 0; ratioIndex < ASPECT_RATIOS.length; ratioIndex++) { const potentialRatio = ASPECT_RATIOS[ratioIndex]; if (aspectRatio >= potentialRatio.ratio) { // Evaluate the difference between actual aspect ratio and closest match. // If the difference is too big, do not scale the embed according to aspect ratio. const ratioDiff = aspectRatio - potentialRatio.ratio; if (ratioDiff > 0.1) { // No close aspect ratio match found. return removeAspectRatioClasses(existingClassNames); } // Close aspect ratio match found. return dedupe_default()(removeAspectRatioClasses(existingClassNames), potentialRatio.className, 'wp-has-aspect-ratio'); } } } return existingClassNames; } /** * Fallback behaviour for unembeddable URLs. * Creates a paragraph block containing a link to the URL, and calls `onReplace`. * * @param {string} url The URL that could not be embedded. * @param {Function} onReplace Function to call with the created fallback block. */ function util_fallback(url, onReplace) { const link = Object(external_wp_element_["createElement"])("a", { href: url }, url); onReplace(Object(external_wp_blocks_["createBlock"])('core/paragraph', { content: Object(external_wp_element_["renderToString"])(link) })); } /*** * Gets block attributes based on the preview and responsive state. * * @param {Object} preview The preview data. * @param {string} title The block's title, e.g. Twitter. * @param {Object} currentClassNames The block's current class names. * @param {boolean} isResponsive Boolean indicating if the block supports responsive content. * @param {boolean} allowResponsive Apply responsive classes to fixed size content. * @return {Object} Attributes and values. */ const getAttributesFromPreview = memize_default()(function (preview, title, currentClassNames, isResponsive) { let allowResponsive = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; if (!preview) { return {}; } const attributes = {}; // Some plugins only return HTML with no type info, so default this to 'rich'. let { type = 'rich' } = preview; // If we got a provider name from the API, use it for the slug, otherwise we use the title, // because not all embed code gives us a provider name. const { html, provider_name: providerName } = preview; const providerNameSlug = Object(external_lodash_["kebabCase"])((providerName || title).toLowerCase()); if (isFromWordPress(html)) { type = WP_EMBED_TYPE; } if (html || 'photo' === type) { attributes.type = type; attributes.providerNameSlug = providerNameSlug; } attributes.className = getClassNames(html, currentClassNames, isResponsive && allowResponsive); return attributes; }); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/edit.js /** * WordPress dependencies */ /** * Internal dependencies */ const ALLOWED_MEDIA_TYPES = ['audio']; function AudioEdit(_ref) { let { attributes, noticeOperations, setAttributes, onReplace, isSelected, noticeUI, insertBlocksAfter } = _ref; const { id, autoplay, caption, loop, preload, src } = attributes; const blockProps = Object(external_wp_blockEditor_["useBlockProps"])(); const mediaUpload = Object(external_wp_data_["useSelect"])(select => { const { getSettings } = select(external_wp_blockEditor_["store"]); return getSettings().mediaUpload; }, []); Object(external_wp_element_["useEffect"])(() => { if (!id && Object(external_wp_blob_["isBlobURL"])(src)) { const file = Object(external_wp_blob_["getBlobByURL"])(src); if (file) { mediaUpload({ filesList: [file], onFileChange: _ref2 => { let [{ id: mediaId, url }] = _ref2; setAttributes({ id: mediaId, src: url }); }, onError: e => { setAttributes({ src: undefined, id: undefined }); noticeOperations.createErrorNotice(e); }, allowedTypes: ALLOWED_MEDIA_TYPES }); } } }, []); function toggleAttribute(attribute) { return newValue => { setAttributes({ [attribute]: newValue }); }; } function onSelectURL(newSrc) { // Set the block's src from the edit component's state, and switch off // the editing UI. if (newSrc !== src) { // Check if there's an embed block that handles this URL. const embedBlock = createUpgradedEmbedBlock({ attributes: { url: newSrc } }); if (undefined !== embedBlock) { onReplace(embedBlock); return; } setAttributes({ src: newSrc, id: undefined }); } } function onUploadError(message) { noticeOperations.removeAllNotices(); noticeOperations.createErrorNotice(message); } function getAutoplayHelp(checked) { return checked ? Object(external_wp_i18n_["__"])('Autoplay may cause usability issues for some users.') : null; } // const { setAttributes, isSelected, noticeUI } = this.props; function onSelectAudio(media) { if (!media || !media.url) { // in this case there was an error and we should continue in the editing state // previous attributes should be removed because they may be temporary blob urls setAttributes({ src: undefined, id: undefined }); return; } // sets the block's attribute and updates the edit component from the // selected media, then switches off the editing UI setAttributes({ src: media.url, id: media.id }); } if (!src) { return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], { icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], { icon: library_audio }), onSelect: onSelectAudio, onSelectURL: onSelectURL, accept: "audio/*", allowedTypes: ALLOWED_MEDIA_TYPES, value: attributes, notices: noticeUI, onError: onUploadError })); } return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], { group: "other" }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaReplaceFlow"], { mediaId: id, mediaURL: src, allowedTypes: ALLOWED_MEDIA_TYPES, accept: "audio/*", onSelect: onSelectAudio, onSelectURL: onSelectURL, onError: onUploadError })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Audio settings') }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Autoplay'), onChange: toggleAttribute('autoplay'), checked: autoplay, help: getAutoplayHelp }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Loop'), onChange: toggleAttribute('loop'), checked: loop }), Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], { label: Object(external_wp_i18n_["_x"])('Preload', 'noun; Audio block parameter'), value: preload || '' // `undefined` is required for the preload attribute to be unset. , onChange: value => setAttributes({ preload: value || undefined }), options: [{ value: '', label: Object(external_wp_i18n_["__"])('Browser default') }, { value: 'auto', label: Object(external_wp_i18n_["__"])('Auto') }, { value: 'metadata', label: Object(external_wp_i18n_["__"])('Metadata') }, { value: 'none', label: Object(external_wp_i18n_["_x"])('None', '"Preload" value') }] }))), Object(external_wp_element_["createElement"])("figure", blockProps, Object(external_wp_element_["createElement"])(external_wp_components_["Disabled"], { isDisabled: !isSelected }, Object(external_wp_element_["createElement"])("audio", { controls: "controls", src: src })), (!external_wp_blockEditor_["RichText"].isEmpty(caption) || isSelected) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { tagName: "figcaption", "aria-label": Object(external_wp_i18n_["__"])('Audio caption text'), placeholder: Object(external_wp_i18n_["__"])('Add caption'), value: caption, onChange: value => setAttributes({ caption: value }), inlineToolbar: true, __unstableOnSplitAtEnd: () => insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph')) }))); } /* harmony default export */ var edit = (Object(external_wp_components_["withNotices"])(AudioEdit)); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/save.js /** * WordPress dependencies */ function save(_ref) { let { attributes } = _ref; const { autoplay, caption, loop, preload, src } = attributes; return src && Object(external_wp_element_["createElement"])("figure", external_wp_blockEditor_["useBlockProps"].save(), Object(external_wp_element_["createElement"])("audio", { controls: "controls", src: src, autoPlay: autoplay, loop: loop, preload: preload }), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", value: caption })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/transforms.js /** * WordPress dependencies */ const transforms_transforms = { from: [{ type: 'files', isMatch(files) { return files.length === 1 && files[0].type.indexOf('audio/') === 0; }, transform(files) { const file = files[0]; // We don't need to upload the media directly here // It's already done as part of the `componentDidMount` // in the audio block const block = Object(external_wp_blocks_["createBlock"])('core/audio', { src: Object(external_wp_blob_["createBlobURL"])(file) }); return block; } }, { type: 'shortcode', tag: 'audio', attributes: { src: { type: 'string', shortcode: _ref => { let { named: { src, mp3, m4a, ogg, wav, wma } } = _ref; return src || mp3 || m4a || ogg || wav || wma; } }, loop: { type: 'string', shortcode: _ref2 => { let { named: { loop } } = _ref2; return loop; } }, autoplay: { type: 'string', shortcode: _ref3 => { let { named: { autoplay } } = _ref3; return autoplay; } }, preload: { type: 'string', shortcode: _ref4 => { let { named: { preload } } = _ref4; return preload; } } } }] }; /* harmony default export */ var audio_transforms = (transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/audio/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const audio_metadata = { apiVersion: 2, name: "core/audio", title: "Audio", category: "media", description: "Embed a simple audio player.", keywords: ["music", "sound", "podcast", "recording"], textdomain: "default", attributes: { src: { type: "string", source: "attribute", selector: "audio", attribute: "src" }, caption: { type: "string", source: "html", selector: "figcaption" }, id: { type: "number" }, autoplay: { type: "boolean", source: "attribute", selector: "audio", attribute: "autoplay" }, loop: { type: "boolean", source: "attribute", selector: "audio", attribute: "loop" }, preload: { type: "string", source: "attribute", selector: "audio", attribute: "preload" } }, supports: { anchor: true, align: true }, editorStyle: "wp-block-audio-editor", style: "wp-block-audio" }; const { name: audio_name } = audio_metadata; const audio_settings = { icon: library_audio, example: { attributes: { src: 'https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg' } }, transforms: audio_transforms, deprecated: deprecated, edit: edit, save: save }; // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/button.js var library_button = __webpack_require__("oMoS"); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("TSYQ"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: external ["wp","compose"] var external_wp_compose_ = __webpack_require__("K9lf"); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/utils/clean-empty-object.js /** * External dependencies */ /** * Removed empty nodes from nested objects. * * @param {Object} object * @return {Object} Object cleaned from empty nodes. */ const cleanEmptyObject = object => { if (!Object(external_lodash_["isObject"])(object) || Array.isArray(object)) { return object; } const cleanedNestedObjects = Object(external_lodash_["pickBy"])(Object(external_lodash_["mapValues"])(object, cleanEmptyObject), external_lodash_["identity"]); return Object(external_lodash_["isEmpty"])(cleanedNestedObjects) ? undefined : cleanedNestedObjects; }; /* harmony default export */ var clean_empty_object = (cleanEmptyObject); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/utils/migrate-font-family.js /** * External dependencies */ /** * Internal dependencies */ /** * Migrates the current style.typography.fontFamily attribute, * whose value was "var:preset|font-family|helvetica-arial", * to the style.fontFamily attribute, whose value will be "helvetica-arial". * * @param {Object} attributes The current attributes * @return {Object} The updated attributes. */ /* harmony default export */ var migrate_font_family = (function (attributes) { var _attributes$style, _attributes$style$typ; if (!(attributes !== null && attributes !== void 0 && (_attributes$style = attributes.style) !== null && _attributes$style !== void 0 && (_attributes$style$typ = _attributes$style.typography) !== null && _attributes$style$typ !== void 0 && _attributes$style$typ.fontFamily)) { return attributes; } // Clone first so when we delete the fontFamily // below we're not modifying the original // attributes. Because the deprecation may be discarded // we don't want to alter the original attributes. const atts = Object(external_lodash_["cloneDeep"])(attributes); const fontFamily = atts.style.typography.fontFamily.split('|').pop(); delete atts.style.typography.fontFamily; atts.style = clean_empty_object(atts.style); return { ...atts, fontFamily }; }); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/deprecated.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ const migrateBorderRadius = attributes => { var _newAttributes$style, _newAttributes$style$, _newAttributes$style2; const { borderRadius, ...newAttributes } = attributes; // We have to check old property `borderRadius` and if // `styles.border.radius` is a `number` const oldBorderRadius = [borderRadius, (_newAttributes$style = newAttributes.style) === null || _newAttributes$style === void 0 ? void 0 : (_newAttributes$style$ = _newAttributes$style.border) === null || _newAttributes$style$ === void 0 ? void 0 : _newAttributes$style$.radius].find(possibleBorderRadius => { return typeof possibleBorderRadius === 'number' && possibleBorderRadius !== 0; }); if (!oldBorderRadius) { return newAttributes; } return { ...newAttributes, style: { ...newAttributes.style, border: { ...((_newAttributes$style2 = newAttributes.style) === null || _newAttributes$style2 === void 0 ? void 0 : _newAttributes$style2.border), radius: `${oldBorderRadius}px` } } }; }; const migrateCustomColorsAndGradients = attributes => { if (!attributes.customTextColor && !attributes.customBackgroundColor && !attributes.customGradient) { return attributes; } const style = { color: {} }; if (attributes.customTextColor) { style.color.text = attributes.customTextColor; } if (attributes.customBackgroundColor) { style.color.background = attributes.customBackgroundColor; } if (attributes.customGradient) { style.color.gradient = attributes.customGradient; } return { ...Object(external_lodash_["omit"])(attributes, ['customTextColor', 'customBackgroundColor', 'customGradient']), style }; }; const oldColorsMigration = attributes => { return migrateCustomColorsAndGradients(Object(external_lodash_["omit"])({ ...attributes, customTextColor: attributes.textColor && '#' === attributes.textColor[0] ? attributes.textColor : undefined, customBackgroundColor: attributes.color && '#' === attributes.color[0] ? attributes.color : undefined }, ['color', 'textColor'])); }; const deprecated_blockAttributes = { url: { type: 'string', source: 'attribute', selector: 'a', attribute: 'href' }, title: { type: 'string', source: 'attribute', selector: 'a', attribute: 'title' }, text: { type: 'string', source: 'html', selector: 'a' } }; const v10 = { attributes: { url: { type: 'string', source: 'attribute', selector: 'a', attribute: 'href' }, title: { type: 'string', source: 'attribute', selector: 'a', attribute: 'title' }, text: { type: 'string', source: 'html', selector: 'a' }, linkTarget: { type: 'string', source: 'attribute', selector: 'a', attribute: 'target' }, rel: { type: 'string', source: 'attribute', selector: 'a', attribute: 'rel' }, placeholder: { type: 'string' }, backgroundColor: { type: 'string' }, textColor: { type: 'string' }, gradient: { type: 'string' }, width: { type: 'number' } }, supports: { anchor: true, align: true, alignWide: false, color: { __experimentalSkipSerialization: true, gradients: true }, typography: { fontSize: true, __experimentalFontFamily: true }, reusable: false, spacing: { __experimentalSkipSerialization: true, padding: ['horizontal', 'vertical'], __experimentalDefaultControls: { padding: true } }, __experimentalBorder: { radius: true, __experimentalSkipSerialization: true }, __experimentalSelector: '.wp-block-button__link' }, save(_ref) { var _style$border, _style$typography; let { attributes, className } = _ref; const { fontSize, linkTarget, rel, style, text, title, url, width } = attributes; if (!text) { return null; } const borderProps = Object(external_wp_blockEditor_["__experimentalGetBorderClassesAndStyles"])(attributes); const colorProps = Object(external_wp_blockEditor_["__experimentalGetColorClassesAndStyles"])(attributes); const spacingProps = Object(external_wp_blockEditor_["__experimentalGetSpacingClassesAndStyles"])(attributes); const buttonClasses = classnames_default()('wp-block-button__link', colorProps.className, borderProps.className, { // For backwards compatibility add style that isn't provided via // block support. 'no-border-radius': (style === null || style === void 0 ? void 0 : (_style$border = style.border) === null || _style$border === void 0 ? void 0 : _style$border.radius) === 0 }); const buttonStyle = { ...borderProps.style, ...colorProps.style, ...spacingProps.style }; // The use of a `title` attribute here is soft-deprecated, but still applied // if it had already been assigned, for the sake of backward-compatibility. // A title will no longer be assigned for new or updated button block links. const wrapperClasses = classnames_default()(className, { [`has-custom-width wp-block-button__width-${width}`]: width, [`has-custom-font-size`]: fontSize || (style === null || style === void 0 ? void 0 : (_style$typography = style.typography) === null || _style$typography === void 0 ? void 0 : _style$typography.fontSize) }); return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({ className: wrapperClasses }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "a", className: buttonClasses, href: url, title: title, style: buttonStyle, value: text, target: linkTarget, rel: rel })); }, migrate: migrate_font_family, isEligible(_ref2) { var _style$typography2; let { style } = _ref2; return style === null || style === void 0 ? void 0 : (_style$typography2 = style.typography) === null || _style$typography2 === void 0 ? void 0 : _style$typography2.fontFamily; } }; const deprecated_deprecated = [v10, { supports: { anchor: true, align: true, alignWide: false, color: { __experimentalSkipSerialization: true, gradients: true }, typography: { fontSize: true, __experimentalFontFamily: true }, reusable: false, __experimentalSelector: '.wp-block-button__link' }, attributes: { ...deprecated_blockAttributes, linkTarget: { type: 'string', source: 'attribute', selector: 'a', attribute: 'target' }, rel: { type: 'string', source: 'attribute', selector: 'a', attribute: 'rel' }, placeholder: { type: 'string' }, backgroundColor: { type: 'string' }, textColor: { type: 'string' }, gradient: { type: 'string' }, width: { type: 'number' } }, isEligible(_ref3) { var _style$border2; let { style } = _ref3; return typeof (style === null || style === void 0 ? void 0 : (_style$border2 = style.border) === null || _style$border2 === void 0 ? void 0 : _style$border2.radius) === 'number'; }, save(_ref4) { var _style$border3, _style$border4, _style$typography3; let { attributes, className } = _ref4; const { fontSize, linkTarget, rel, style, text, title, url, width } = attributes; if (!text) { return null; } const borderRadius = style === null || style === void 0 ? void 0 : (_style$border3 = style.border) === null || _style$border3 === void 0 ? void 0 : _style$border3.radius; const colorProps = Object(external_wp_blockEditor_["__experimentalGetColorClassesAndStyles"])(attributes); const buttonClasses = classnames_default()('wp-block-button__link', colorProps.className, { 'no-border-radius': (style === null || style === void 0 ? void 0 : (_style$border4 = style.border) === null || _style$border4 === void 0 ? void 0 : _style$border4.radius) === 0 }); const buttonStyle = { borderRadius: borderRadius ? borderRadius : undefined, ...colorProps.style }; // The use of a `title` attribute here is soft-deprecated, but still applied // if it had already been assigned, for the sake of backward-compatibility. // A title will no longer be assigned for new or updated button block links. const wrapperClasses = classnames_default()(className, { [`has-custom-width wp-block-button__width-${width}`]: width, [`has-custom-font-size`]: fontSize || (style === null || style === void 0 ? void 0 : (_style$typography3 = style.typography) === null || _style$typography3 === void 0 ? void 0 : _style$typography3.fontSize) }); return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({ className: wrapperClasses }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "a", className: buttonClasses, href: url, title: title, style: buttonStyle, value: text, target: linkTarget, rel: rel })); }, migrate: Object(external_wp_compose_["compose"])(migrate_font_family, migrateBorderRadius) }, { supports: { anchor: true, align: true, alignWide: false, color: { __experimentalSkipSerialization: true }, reusable: false, __experimentalSelector: '.wp-block-button__link' }, attributes: { ...deprecated_blockAttributes, linkTarget: { type: 'string', source: 'attribute', selector: 'a', attribute: 'target' }, rel: { type: 'string', source: 'attribute', selector: 'a', attribute: 'rel' }, placeholder: { type: 'string' }, borderRadius: { type: 'number' }, backgroundColor: { type: 'string' }, textColor: { type: 'string' }, gradient: { type: 'string' }, style: { type: 'object' }, width: { type: 'number' } }, save(_ref5) { let { attributes, className } = _ref5; const { borderRadius, linkTarget, rel, text, title, url, width } = attributes; const colorProps = Object(external_wp_blockEditor_["__experimentalGetColorClassesAndStyles"])(attributes); const buttonClasses = classnames_default()('wp-block-button__link', colorProps.className, { 'no-border-radius': borderRadius === 0 }); const buttonStyle = { borderRadius: borderRadius ? borderRadius + 'px' : undefined, ...colorProps.style }; // The use of a `title` attribute here is soft-deprecated, but still applied // if it had already been assigned, for the sake of backward-compatibility. // A title will no longer be assigned for new or updated button block links. const wrapperClasses = classnames_default()(className, { [`has-custom-width wp-block-button__width-${width}`]: width }); return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({ className: wrapperClasses }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "a", className: buttonClasses, href: url, title: title, style: buttonStyle, value: text, target: linkTarget, rel: rel })); }, migrate: Object(external_wp_compose_["compose"])(migrate_font_family, migrateBorderRadius) }, { supports: { anchor: true, align: true, alignWide: false, color: { __experimentalSkipSerialization: true }, reusable: false, __experimentalSelector: '.wp-block-button__link' }, attributes: { ...deprecated_blockAttributes, linkTarget: { type: 'string', source: 'attribute', selector: 'a', attribute: 'target' }, rel: { type: 'string', source: 'attribute', selector: 'a', attribute: 'rel' }, placeholder: { type: 'string' }, borderRadius: { type: 'number' }, backgroundColor: { type: 'string' }, textColor: { type: 'string' }, gradient: { type: 'string' }, style: { type: 'object' }, width: { type: 'number' } }, save(_ref6) { let { attributes, className } = _ref6; const { borderRadius, linkTarget, rel, text, title, url, width } = attributes; const colorProps = Object(external_wp_blockEditor_["__experimentalGetColorClassesAndStyles"])(attributes); const buttonClasses = classnames_default()('wp-block-button__link', colorProps.className, { 'no-border-radius': borderRadius === 0 }); const buttonStyle = { borderRadius: borderRadius ? borderRadius + 'px' : undefined, ...colorProps.style }; // The use of a `title` attribute here is soft-deprecated, but still applied // if it had already been assigned, for the sake of backward-compatibility. // A title will no longer be assigned for new or updated button block links. const wrapperClasses = classnames_default()(className, { [`has-custom-width wp-block-button__width-${width}`]: width }); return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({ className: wrapperClasses }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "a", className: buttonClasses, href: url, title: title, style: buttonStyle, value: text, target: linkTarget, rel: rel })); }, migrate: Object(external_wp_compose_["compose"])(migrate_font_family, migrateBorderRadius) }, { supports: { align: true, alignWide: false, color: { gradients: true } }, attributes: { ...deprecated_blockAttributes, linkTarget: { type: 'string', source: 'attribute', selector: 'a', attribute: 'target' }, rel: { type: 'string', source: 'attribute', selector: 'a', attribute: 'rel' }, placeholder: { type: 'string' }, borderRadius: { type: 'number' }, backgroundColor: { type: 'string' }, textColor: { type: 'string' }, gradient: { type: 'string' }, style: { type: 'object' } }, save(_ref7) { let { attributes } = _ref7; const { borderRadius, linkTarget, rel, text, title, url } = attributes; const buttonClasses = classnames_default()('wp-block-button__link', { 'no-border-radius': borderRadius === 0 }); const buttonStyle = { borderRadius: borderRadius ? borderRadius + 'px' : undefined }; return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "a", className: buttonClasses, href: url, title: title, style: buttonStyle, value: text, target: linkTarget, rel: rel }); }, migrate: migrateBorderRadius }, { supports: { align: true, alignWide: false }, attributes: { ...deprecated_blockAttributes, linkTarget: { type: 'string', source: 'attribute', selector: 'a', attribute: 'target' }, rel: { type: 'string', source: 'attribute', selector: 'a', attribute: 'rel' }, placeholder: { type: 'string' }, borderRadius: { type: 'number' }, backgroundColor: { type: 'string' }, textColor: { type: 'string' }, customBackgroundColor: { type: 'string' }, customTextColor: { type: 'string' }, customGradient: { type: 'string' }, gradient: { type: 'string' } }, isEligible: attributes => !!attributes.customTextColor || !!attributes.customBackgroundColor || !!attributes.customGradient, migrate: Object(external_wp_compose_["compose"])(migrateBorderRadius, migrateCustomColorsAndGradients), save(_ref8) { let { attributes } = _ref8; const { backgroundColor, borderRadius, customBackgroundColor, customTextColor, customGradient, linkTarget, gradient, rel, text, textColor, title, url } = attributes; const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor); const backgroundClass = !customGradient && Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor); const gradientClass = Object(external_wp_blockEditor_["__experimentalGetGradientClass"])(gradient); const buttonClasses = classnames_default()('wp-block-button__link', { 'has-text-color': textColor || customTextColor, [textClass]: textClass, 'has-background': backgroundColor || customBackgroundColor || customGradient || gradient, [backgroundClass]: backgroundClass, 'no-border-radius': borderRadius === 0, [gradientClass]: gradientClass }); const buttonStyle = { background: customGradient ? customGradient : undefined, backgroundColor: backgroundClass || customGradient || gradient ? undefined : customBackgroundColor, color: textClass ? undefined : customTextColor, borderRadius: borderRadius ? borderRadius + 'px' : undefined }; // The use of a `title` attribute here is soft-deprecated, but still applied // if it had already been assigned, for the sake of backward-compatibility. // A title will no longer be assigned for new or updated button block links. return Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "a", className: buttonClasses, href: url, title: title, style: buttonStyle, value: text, target: linkTarget, rel: rel })); } }, { attributes: { ...deprecated_blockAttributes, align: { type: 'string', default: 'none' }, backgroundColor: { type: 'string' }, textColor: { type: 'string' }, customBackgroundColor: { type: 'string' }, customTextColor: { type: 'string' }, linkTarget: { type: 'string', source: 'attribute', selector: 'a', attribute: 'target' }, rel: { type: 'string', source: 'attribute', selector: 'a', attribute: 'rel' }, placeholder: { type: 'string' } }, isEligible(attribute) { return attribute.className && attribute.className.includes('is-style-squared'); }, migrate(attributes) { let newClassName = attributes.className; if (newClassName) { newClassName = newClassName.replace(/is-style-squared[\s]?/, '').trim(); } return migrateBorderRadius(migrateCustomColorsAndGradients({ ...attributes, className: newClassName ? newClassName : undefined, borderRadius: 0 })); }, save(_ref9) { let { attributes } = _ref9; const { backgroundColor, customBackgroundColor, customTextColor, linkTarget, rel, text, textColor, title, url } = attributes; const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor); const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor); const buttonClasses = classnames_default()('wp-block-button__link', { 'has-text-color': textColor || customTextColor, [textClass]: textClass, 'has-background': backgroundColor || customBackgroundColor, [backgroundClass]: backgroundClass }); const buttonStyle = { backgroundColor: backgroundClass ? undefined : customBackgroundColor, color: textClass ? undefined : customTextColor }; return Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "a", className: buttonClasses, href: url, title: title, style: buttonStyle, value: text, target: linkTarget, rel: rel })); } }, { attributes: { ...deprecated_blockAttributes, align: { type: 'string', default: 'none' }, backgroundColor: { type: 'string' }, textColor: { type: 'string' }, customBackgroundColor: { type: 'string' }, customTextColor: { type: 'string' } }, migrate: oldColorsMigration, save(_ref10) { let { attributes } = _ref10; const { url, text, title, backgroundColor, textColor, customBackgroundColor, customTextColor } = attributes; const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor); const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor); const buttonClasses = classnames_default()('wp-block-button__link', { 'has-text-color': textColor || customTextColor, [textClass]: textClass, 'has-background': backgroundColor || customBackgroundColor, [backgroundClass]: backgroundClass }); const buttonStyle = { backgroundColor: backgroundClass ? undefined : customBackgroundColor, color: textClass ? undefined : customTextColor }; return Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "a", className: buttonClasses, href: url, title: title, style: buttonStyle, value: text })); } }, { attributes: { ...deprecated_blockAttributes, color: { type: 'string' }, textColor: { type: 'string' }, align: { type: 'string', default: 'none' } }, save(_ref11) { let { attributes } = _ref11; const { url, text, title, align, color, textColor } = attributes; const buttonStyle = { backgroundColor: color, color: textColor }; const linkClass = 'wp-block-button__link'; return Object(external_wp_element_["createElement"])("div", { className: `align${align}` }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "a", className: linkClass, href: url, title: title, style: buttonStyle, value: text })); }, migrate: oldColorsMigration }, { attributes: { ...deprecated_blockAttributes, color: { type: 'string' }, textColor: { type: 'string' }, align: { type: 'string', default: 'none' } }, save(_ref12) { let { attributes } = _ref12; const { url, text, title, align, color, textColor } = attributes; return Object(external_wp_element_["createElement"])("div", { className: `align${align}`, style: { backgroundColor: color } }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "a", href: url, title: title, style: { color: textColor }, value: text })); }, migrate: oldColorsMigration }]; /* harmony default export */ var button_deprecated = (deprecated_deprecated); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__("wx14"); // EXTERNAL MODULE: external ["wp","keycodes"] var external_wp_keycodes_ = __webpack_require__("RxS6"); // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/link.js var library_link = __webpack_require__("Bpkj"); // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/link-off.js var link_off = __webpack_require__("Mp0b"); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/edit.js /** * External dependencies */ /** * WordPress dependencies */ const NEW_TAB_REL = 'noreferrer noopener'; function WidthPanel(_ref) { let { selectedWidth, setAttributes } = _ref; function handleChange(newWidth) { // Check if we are toggling the width off const width = selectedWidth === newWidth ? undefined : newWidth; // Update attributes setAttributes({ width }); } return Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Width settings') }, Object(external_wp_element_["createElement"])(external_wp_components_["ButtonGroup"], { "aria-label": Object(external_wp_i18n_["__"])('Button width') }, [25, 50, 75, 100].map(widthValue => { return Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { key: widthValue, isSmall: true, variant: widthValue === selectedWidth ? 'primary' : undefined, onClick: () => handleChange(widthValue) }, widthValue, "%"); }))); } function ButtonEdit(props) { var _style$border; const { attributes, setAttributes, className, isSelected, onReplace, mergeBlocks } = props; const { linkTarget, placeholder, rel, style, text, url, width } = attributes; const onSetLinkRel = Object(external_wp_element_["useCallback"])(value => { setAttributes({ rel: value }); }, [setAttributes]); function onToggleOpenInNewTab(value) { const newLinkTarget = value ? '_blank' : undefined; let updatedRel = rel; if (newLinkTarget && !rel) { updatedRel = NEW_TAB_REL; } else if (!newLinkTarget && rel === NEW_TAB_REL) { updatedRel = undefined; } setAttributes({ linkTarget: newLinkTarget, rel: updatedRel }); } function setButtonText(newText) { // Remove anchor tags from button text content. setAttributes({ text: newText.replace(/<\/?a[^>]*>/g, '') }); } function onKeyDown(event) { if (external_wp_keycodes_["isKeyboardEvent"].primary(event, 'k')) { startEditing(event); } else if (external_wp_keycodes_["isKeyboardEvent"].primaryShift(event, 'k')) { var _richTextRef$current; unlink(); (_richTextRef$current = richTextRef.current) === null || _richTextRef$current === void 0 ? void 0 : _richTextRef$current.focus(); } } const borderProps = Object(external_wp_blockEditor_["__experimentalUseBorderProps"])(attributes); const colorProps = Object(external_wp_blockEditor_["__experimentalUseColorProps"])(attributes); const spacingProps = Object(external_wp_blockEditor_["__experimentalGetSpacingClassesAndStyles"])(attributes); const ref = Object(external_wp_element_["useRef"])(); const richTextRef = Object(external_wp_element_["useRef"])(); const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({ ref, onKeyDown }); const [isEditingURL, setIsEditingURL] = Object(external_wp_element_["useState"])(false); const isURLSet = !!url; const opensInNewTab = linkTarget === '_blank'; function startEditing(event) { event.preventDefault(); setIsEditingURL(true); } function unlink() { setAttributes({ url: undefined, linkTarget: undefined, rel: undefined }); setIsEditingURL(false); } Object(external_wp_element_["useEffect"])(() => { if (!isSelected) { setIsEditingURL(false); } }, [isSelected]); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({}, blockProps, { className: classnames_default()(blockProps.className, { [`has-custom-width wp-block-button__width-${width}`]: width, [`has-custom-font-size`]: blockProps.style.fontSize }) }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { ref: richTextRef, "aria-label": Object(external_wp_i18n_["__"])('Button text'), placeholder: placeholder || Object(external_wp_i18n_["__"])('Add text…'), value: text, onChange: value => setButtonText(value), withoutInteractiveFormatting: true, className: classnames_default()(className, 'wp-block-button__link', colorProps.className, borderProps.className, { // For backwards compatibility add style that isn't // provided via block support. 'no-border-radius': (style === null || style === void 0 ? void 0 : (_style$border = style.border) === null || _style$border === void 0 ? void 0 : _style$border.radius) === 0 }), style: { ...borderProps.style, ...colorProps.style, ...spacingProps.style }, onSplit: value => Object(external_wp_blocks_["createBlock"])('core/button', { ...attributes, text: value }), onReplace: onReplace, onMerge: mergeBlocks, identifier: "text" })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], { group: "block" }, !isURLSet && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { name: "link", icon: library_link["a" /* default */], title: Object(external_wp_i18n_["__"])('Link'), shortcut: external_wp_keycodes_["displayShortcut"].primary('k'), onClick: startEditing }), isURLSet && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { name: "link", icon: link_off["a" /* default */], title: Object(external_wp_i18n_["__"])('Unlink'), shortcut: external_wp_keycodes_["displayShortcut"].primaryShift('k'), onClick: unlink, isActive: true })), isSelected && (isEditingURL || isURLSet) && Object(external_wp_element_["createElement"])(external_wp_components_["Popover"], { position: "bottom center", onClose: () => { var _richTextRef$current2; setIsEditingURL(false); (_richTextRef$current2 = richTextRef.current) === null || _richTextRef$current2 === void 0 ? void 0 : _richTextRef$current2.focus(); }, anchorRef: ref === null || ref === void 0 ? void 0 : ref.current, focusOnMount: isEditingURL ? 'firstElement' : false }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalLinkControl"], { className: "wp-block-navigation-link__inline-link-input", value: { url, opensInNewTab }, onChange: _ref2 => { let { url: newURL = '', opensInNewTab: newOpensInNewTab } = _ref2; setAttributes({ url: newURL }); if (opensInNewTab !== newOpensInNewTab) { onToggleOpenInNewTab(newOpensInNewTab); } }, onRemove: () => { var _richTextRef$current3; unlink(); (_richTextRef$current3 = richTextRef.current) === null || _richTextRef$current3 === void 0 ? void 0 : _richTextRef$current3.focus(); }, forceIsEditingLink: isEditingURL })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(WidthPanel, { selectedWidth: width, setAttributes: setAttributes })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], { __experimentalGroup: "advanced" }, Object(external_wp_element_["createElement"])(external_wp_components_["TextControl"], { label: Object(external_wp_i18n_["__"])('Link rel'), value: rel || '', onChange: onSetLinkRel }))); } /* harmony default export */ var button_edit = (ButtonEdit); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/save.js /** * External dependencies */ /** * WordPress dependencies */ function save_save(_ref) { var _style$border, _style$typography; let { attributes, className } = _ref; const { fontSize, linkTarget, rel, style, text, title, url, width } = attributes; if (!text) { return null; } const borderProps = Object(external_wp_blockEditor_["__experimentalGetBorderClassesAndStyles"])(attributes); const colorProps = Object(external_wp_blockEditor_["__experimentalGetColorClassesAndStyles"])(attributes); const spacingProps = Object(external_wp_blockEditor_["__experimentalGetSpacingClassesAndStyles"])(attributes); const buttonClasses = classnames_default()('wp-block-button__link', colorProps.className, borderProps.className, { // For backwards compatibility add style that isn't provided via // block support. 'no-border-radius': (style === null || style === void 0 ? void 0 : (_style$border = style.border) === null || _style$border === void 0 ? void 0 : _style$border.radius) === 0 }); const buttonStyle = { ...borderProps.style, ...colorProps.style, ...spacingProps.style }; // The use of a `title` attribute here is soft-deprecated, but still applied // if it had already been assigned, for the sake of backward-compatibility. // A title will no longer be assigned for new or updated button block links. const wrapperClasses = classnames_default()(className, { [`has-custom-width wp-block-button__width-${width}`]: width, [`has-custom-font-size`]: fontSize || (style === null || style === void 0 ? void 0 : (_style$typography = style.typography) === null || _style$typography === void 0 ? void 0 : _style$typography.fontSize) }); return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({ className: wrapperClasses }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "a", className: buttonClasses, href: url, title: title, style: buttonStyle, value: text, target: linkTarget, rel: rel })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/button/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const button_metadata = { apiVersion: 2, name: "core/button", title: "Button", category: "design", parent: ["core/buttons"], description: "Prompt visitors to take action with a button-style link.", keywords: ["link"], textdomain: "default", attributes: { url: { type: "string", source: "attribute", selector: "a", attribute: "href" }, title: { type: "string", source: "attribute", selector: "a", attribute: "title" }, text: { type: "string", source: "html", selector: "a" }, linkTarget: { type: "string", source: "attribute", selector: "a", attribute: "target" }, rel: { type: "string", source: "attribute", selector: "a", attribute: "rel" }, placeholder: { type: "string" }, backgroundColor: { type: "string" }, textColor: { type: "string" }, gradient: { type: "string" }, width: { type: "number" } }, supports: { anchor: true, align: true, alignWide: false, color: { __experimentalSkipSerialization: true, gradients: true }, typography: { fontSize: true, __experimentalFontFamily: true, __experimentalDefaultControls: { fontSize: true } }, reusable: false, spacing: { __experimentalSkipSerialization: true, padding: ["horizontal", "vertical"], __experimentalDefaultControls: { padding: true } }, __experimentalBorder: { radius: true, __experimentalSkipSerialization: true }, __experimentalSelector: ".wp-block-button__link" }, styles: [{ name: "fill", label: "Fill", isDefault: true }, { name: "outline", label: "Outline" }], editorStyle: "wp-block-button-editor", style: "wp-block-button" }; const { name: button_name } = button_metadata; const button_settings = { icon: library_button["a" /* default */], example: { attributes: { className: 'is-style-fill', text: Object(external_wp_i18n_["__"])('Call to Action') } }, edit: button_edit, save: save_save, deprecated: button_deprecated, merge: (a, _ref) => { let { text = '' } = _ref; return { ...a, text: (a.text || '') + text }; } }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/buttons.js /** * WordPress dependencies */ const buttons_buttons = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M17 3H7c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v4zm-8-1.2h5V6.2h-5v1.6zM17 13H7c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v4zm-8-1.2h5v-1.5h-5v1.5z" })); /* harmony default export */ var library_buttons = (buttons_buttons); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/deprecated.js /** * External dependencies */ /** * WordPress dependencies */ /** * @param {Object} attributes Block's attributes. */ const migrateWithLayout = attributes => { if (!!attributes.layout) { return attributes; } const { contentJustification, orientation, ...updatedAttributes } = attributes; if (contentJustification || orientation) { Object.assign(updatedAttributes, { layout: { type: 'flex', ...(contentJustification && { justifyContent: contentJustification }), ...(orientation && { orientation }) } }); } return updatedAttributes; }; const buttons_deprecated_deprecated = [{ attributes: { contentJustification: { type: 'string' }, orientation: { type: 'string', default: 'horizontal' } }, supports: { anchor: true, align: ['wide', 'full'], __experimentalExposeControlsToChildren: true, spacing: { blockGap: true, margin: ['top', 'bottom'], __experimentalDefaultControls: { blockGap: true } } }, isEligible: _ref => { let { contentJustification, orientation } = _ref; return !!contentJustification || !!orientation; }, migrate: migrateWithLayout, save(_ref2) { let { attributes: { contentJustification, orientation } } = _ref2; return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({ className: classnames_default()({ [`is-content-justification-${contentJustification}`]: contentJustification, 'is-vertical': orientation === 'vertical' }) }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)); } }, { supports: { align: ['center', 'left', 'right'], anchor: true }, save() { return Object(external_wp_element_["createElement"])("div", null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)); }, isEligible(_ref3) { let { align } = _ref3; return align && ['center', 'left', 'right'].includes(align); }, migrate(attributes) { return migrateWithLayout({ ...attributes, align: undefined, // Floating Buttons blocks shouldn't have been supported in the // first place. Most users using them probably expected them to // act like content justification controls, so these blocks are // migrated to use content justification. // As for center-aligned Buttons blocks, the content justification // equivalent will create an identical end result in most cases. contentJustification: attributes.align }); } }]; /* harmony default export */ var buttons_deprecated = (buttons_deprecated_deprecated); // EXTERNAL MODULE: external ["wp","richText"] var external_wp_richText_ = __webpack_require__("qRz9"); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/transforms.js /** * WordPress dependencies */ /** * Internal dependencies */ const { name: transforms_name } = { apiVersion: 2, name: "core/buttons", title: "Buttons", category: "design", description: "Prompt visitors to take action with a group of button-style links.", keywords: ["link"], textdomain: "default", supports: { anchor: true, align: ["wide", "full"], __experimentalExposeControlsToChildren: true, spacing: { blockGap: true, margin: ["top", "bottom"], __experimentalDefaultControls: { blockGap: true } }, __experimentalLayout: { allowSwitching: false, allowInheriting: false, "default": { type: "flex" } } }, editorStyle: "wp-block-buttons-editor", style: "wp-block-buttons" }; const buttons_transforms_transforms = { from: [{ type: 'block', isMultiBlock: true, blocks: ['core/button'], transform: buttons => // Creates the buttons block Object(external_wp_blocks_["createBlock"])(transforms_name, {}, // Loop the selected buttons buttons.map(attributes => // Create singular button in the buttons block Object(external_wp_blocks_["createBlock"])('core/button', attributes))) }, { type: 'block', isMultiBlock: true, blocks: ['core/paragraph'], transform: buttons => // Creates the buttons block Object(external_wp_blocks_["createBlock"])(transforms_name, {}, // Loop the selected buttons buttons.map(attributes => { const element = Object(external_wp_richText_["__unstableCreateElement"])(document, attributes.content); // Remove any HTML tags const text = element.innerText || ''; // Get first url const link = element.querySelector('a'); const url = link === null || link === void 0 ? void 0 : link.getAttribute('href'); // Create singular button in the buttons block return Object(external_wp_blocks_["createBlock"])('core/button', { text, url }); })), isMatch: paragraphs => { return paragraphs.every(attributes => { const element = Object(external_wp_richText_["__unstableCreateElement"])(document, attributes.content); const text = element.innerText || ''; const links = element.querySelectorAll('a'); return text.length <= 30 && links.length <= 1; }); } }] }; /* harmony default export */ var buttons_transforms = (buttons_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/edit.js /** * WordPress dependencies */ /** * Internal dependencies */ const ALLOWED_BLOCKS = [button_name]; function ButtonsEdit(_ref) { let { attributes: { layout = {} } } = _ref; const blockProps = Object(external_wp_blockEditor_["useBlockProps"])(); const preferredStyle = Object(external_wp_data_["useSelect"])(select => { var _preferredStyleVariat; const preferredStyleVariations = select(external_wp_blockEditor_["store"]).getSettings().__experimentalPreferredStyleVariations; return preferredStyleVariations === null || preferredStyleVariations === void 0 ? void 0 : (_preferredStyleVariat = preferredStyleVariations.value) === null || _preferredStyleVariat === void 0 ? void 0 : _preferredStyleVariat[button_name]; }, []); const innerBlocksProps = Object(external_wp_blockEditor_["useInnerBlocksProps"])(blockProps, { allowedBlocks: ALLOWED_BLOCKS, template: [[button_name, { className: preferredStyle && `is-style-${preferredStyle}` }]], __experimentalLayout: layout, templateInsertUpdatesSelection: true }); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("div", innerBlocksProps)); } /* harmony default export */ var buttons_edit = (ButtonsEdit); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/save.js /** * WordPress dependencies */ function buttons_save_save() { const innerBlocksProps = external_wp_blockEditor_["useInnerBlocksProps"].save(external_wp_blockEditor_["useBlockProps"].save()); return Object(external_wp_element_["createElement"])("div", innerBlocksProps); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/buttons/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const buttons_metadata = { apiVersion: 2, name: "core/buttons", title: "Buttons", category: "design", description: "Prompt visitors to take action with a group of button-style links.", keywords: ["link"], textdomain: "default", supports: { anchor: true, align: ["wide", "full"], __experimentalExposeControlsToChildren: true, spacing: { blockGap: true, margin: ["top", "bottom"], __experimentalDefaultControls: { blockGap: true } }, __experimentalLayout: { allowSwitching: false, allowInheriting: false, "default": { type: "flex" } } }, editorStyle: "wp-block-buttons-editor", style: "wp-block-buttons" }; const { name: buttons_name } = buttons_metadata; const buttons_settings = { icon: library_buttons, example: { innerBlocks: [{ name: 'core/button', attributes: { text: Object(external_wp_i18n_["__"])('Find out more') } }, { name: 'core/button', attributes: { text: Object(external_wp_i18n_["__"])('Contact us') } }] }, deprecated: buttons_deprecated, transforms: buttons_transforms, edit: buttons_edit, save: buttons_save_save }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/calendar.js /** * WordPress dependencies */ const calendar = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z" })); /* harmony default export */ var library_calendar = (calendar); // EXTERNAL MODULE: external "moment" var external_moment_ = __webpack_require__("wy2R"); var external_moment_default = /*#__PURE__*/__webpack_require__.n(external_moment_); // EXTERNAL MODULE: external ["wp","coreData"] var external_wp_coreData_ = __webpack_require__("jZUy"); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/calendar/edit.js /** * External dependencies */ /** * WordPress dependencies */ const getYearMonth = memize_default()(date => { if (!date) { return {}; } const momentDate = external_moment_default()(date); return { year: momentDate.year(), month: momentDate.month() + 1 }; }); function CalendarEdit(_ref) { let { attributes } = _ref; const blockProps = Object(external_wp_blockEditor_["useBlockProps"])(); const { date, hasPosts, hasPostsResolved } = Object(external_wp_data_["useSelect"])(select => { const { getEntityRecords, hasFinishedResolution } = select(external_wp_coreData_["store"]); const singlePublishedPostQuery = { status: 'publish', per_page: 1 }; const posts = getEntityRecords('postType', 'post', singlePublishedPostQuery); const postsResolved = hasFinishedResolution('getEntityRecords', ['postType', 'post', singlePublishedPostQuery]); let _date; // FIXME: @wordpress/block-library should not depend on @wordpress/editor. // Blocks can be loaded into a *non-post* block editor. // eslint-disable-next-line @wordpress/data-no-store-string-literals const editorSelectors = select('core/editor'); if (editorSelectors) { const postType = editorSelectors.getEditedPostAttribute('type'); // Dates are used to overwrite year and month used on the calendar. // This overwrite should only happen for 'post' post types. // For other post types the calendar always displays the current month. if (postType === 'post') { _date = editorSelectors.getEditedPostAttribute('date'); } } return { date: _date, hasPostsResolved: postsResolved, hasPosts: postsResolved && (posts === null || posts === void 0 ? void 0 : posts.length) === 1 }; }, []); if (!hasPosts) { return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], { icon: library_calendar, label: Object(external_wp_i18n_["__"])('Calendar') }, !hasPostsResolved ? Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null) : Object(external_wp_i18n_["__"])('No published posts found.'))); } return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_components_["Disabled"], null, Object(external_wp_element_["createElement"])(external_wp_serverSideRender_default.a, { block: "core/calendar", attributes: { ...attributes, ...getYearMonth(date) } }))); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/calendar/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const calendar_metadata = { apiVersion: 2, name: "core/calendar", title: "Calendar", category: "widgets", description: "A calendar of your site\u2019s posts.", keywords: ["posts", "archive"], textdomain: "default", attributes: { month: { type: "integer" }, year: { type: "integer" } }, supports: { align: true }, style: "wp-block-calendar" }; const { name: calendar_name } = calendar_metadata; const calendar_settings = { icon: library_calendar, example: {}, edit: CalendarEdit }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/category.js /** * WordPress dependencies */ const category_category = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z", fillRule: "evenodd", clipRule: "evenodd" })); /* harmony default export */ var library_category = (category_category); // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/pin.js /** * WordPress dependencies */ const pin = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M10.44 3.02l1.82-1.82 6.36 6.35-1.83 1.82c-1.05-.68-2.48-.57-3.41.36l-.75.75c-.92.93-1.04 2.35-.35 3.41l-1.83 1.82-2.41-2.41-2.8 2.79c-.42.42-3.38 2.71-3.8 2.29s1.86-3.39 2.28-3.81l2.79-2.79L4.1 9.36l1.83-1.82c1.05.69 2.48.57 3.4-.36l.75-.75c.93-.92 1.05-2.35.36-3.41z" })); /* harmony default export */ var library_pin = (pin); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/categories/edit.js /** * External dependencies */ /** * WordPress dependencies */ function CategoriesEdit(_ref) { let { attributes: { displayAsDropdown, showHierarchy, showPostCounts, showOnlyTopLevel }, setAttributes } = _ref; const selectId = Object(external_wp_compose_["useInstanceId"])(CategoriesEdit, 'blocks-category-select'); const { categories, isRequesting } = Object(external_wp_data_["useSelect"])(select => { const { getEntityRecords, isResolving } = select(external_wp_coreData_["store"]); const query = { per_page: -1, hide_empty: true, context: 'view' }; if (showOnlyTopLevel) { query.parent = 0; } return { categories: getEntityRecords('taxonomy', 'category', query), isRequesting: isResolving('getEntityRecords', ['taxonomy', 'category', query]) }; }, [showOnlyTopLevel]); const getCategoriesList = parentId => { if (!(categories !== null && categories !== void 0 && categories.length)) { return []; } if (parentId === null) { return categories; } return categories.filter(_ref2 => { let { parent } = _ref2; return parent === parentId; }); }; const getCategoryListClassName = level => { return `wp-block-categories__list wp-block-categories__list-level-${level}`; }; const toggleAttribute = attributeName => newValue => setAttributes({ [attributeName]: newValue }); const renderCategoryName = name => !name ? Object(external_wp_i18n_["__"])('(Untitled)') : Object(external_lodash_["unescape"])(name).trim(); const renderCategoryList = () => { const parentId = showHierarchy ? 0 : null; const categoriesList = getCategoriesList(parentId); return Object(external_wp_element_["createElement"])("ul", { className: getCategoryListClassName(0) }, categoriesList.map(category => renderCategoryListItem(category, 0))); }; const renderCategoryListItem = (category, level) => { const childCategories = getCategoriesList(category.id); const { id, link, count, name } = category; return Object(external_wp_element_["createElement"])("li", { key: id }, Object(external_wp_element_["createElement"])("a", { href: link, target: "_blank", rel: "noreferrer noopener" }, renderCategoryName(name)), showPostCounts && Object(external_wp_element_["createElement"])("span", { className: "wp-block-categories__post-count" }, ` (${count})`), showHierarchy && !!childCategories.length && Object(external_wp_element_["createElement"])("ul", { className: getCategoryListClassName(level + 1) }, childCategories.map(childCategory => renderCategoryListItem(childCategory, level + 1)))); }; const renderCategoryDropdown = () => { const parentId = showHierarchy ? 0 : null; const categoriesList = getCategoriesList(parentId); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], { as: "label", htmlFor: selectId }, Object(external_wp_i18n_["__"])('Categories')), Object(external_wp_element_["createElement"])("select", { id: selectId, className: "wp-block-categories__dropdown" }, categoriesList.map(category => renderCategoryDropdownItem(category, 0)))); }; const renderCategoryDropdownItem = (category, level) => { const { id, count, name } = category; const childCategories = getCategoriesList(id); return [Object(external_wp_element_["createElement"])("option", { key: id }, Object(external_lodash_["times"])(level * 3, () => '\xa0'), renderCategoryName(name), showPostCounts && ` (${count})`), showHierarchy && !!childCategories.length && childCategories.map(childCategory => renderCategoryDropdownItem(childCategory, level + 1))]; }; return Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])(), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Categories settings') }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Display as dropdown'), checked: displayAsDropdown, onChange: toggleAttribute('displayAsDropdown') }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Show post counts'), checked: showPostCounts, onChange: toggleAttribute('showPostCounts') }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Show only top level categories'), checked: showOnlyTopLevel, onChange: toggleAttribute('showOnlyTopLevel') }), !showOnlyTopLevel && Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Show hierarchy'), checked: showHierarchy, onChange: toggleAttribute('showHierarchy') }))), isRequesting && Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], { icon: library_pin, label: Object(external_wp_i18n_["__"])('Categories') }, Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null)), !isRequesting && (categories === null || categories === void 0 ? void 0 : categories.length) === 0 && Object(external_wp_element_["createElement"])("p", null, Object(external_wp_i18n_["__"])('Your site does not have any posts, so there is nothing to display here at the moment.')), !isRequesting && (categories === null || categories === void 0 ? void 0 : categories.length) > 0 && (displayAsDropdown ? renderCategoryDropdown() : renderCategoryList())); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/categories/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const categories_metadata = { apiVersion: 2, name: "core/categories", title: "Categories", category: "widgets", description: "Display a list of all categories.", textdomain: "default", attributes: { displayAsDropdown: { type: "boolean", "default": false }, showHierarchy: { type: "boolean", "default": false }, showPostCounts: { type: "boolean", "default": false }, showOnlyTopLevel: { type: "boolean", "default": false } }, supports: { align: true, html: false }, editorStyle: "wp-block-categories-editor", style: "wp-block-categories" }; const { name: categories_name } = categories_metadata; const categories_settings = { icon: library_category, example: {}, edit: CategoriesEdit }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/classic.js /** * WordPress dependencies */ const classic = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M20 6H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h16c.3 0 .5.2.5.5v9zM10 10H8v2h2v-2zm-5 2h2v-2H5v2zm8-2h-2v2h2v-2zm-5 6h8v-2H8v2zm6-4h2v-2h-2v2zm3 0h2v-2h-2v2zm0 4h2v-2h-2v2zM5 16h2v-2H5v2z" })); /* harmony default export */ var library_classic = (classic); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/freeform/convert-to-blocks-button.js /** * WordPress dependencies */ const ConvertToBlocksButton = _ref => { let { clientId } = _ref; const { replaceBlocks } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]); const block = Object(external_wp_data_["useSelect"])(select => { return select(external_wp_blockEditor_["store"]).getBlock(clientId); }, [clientId]); return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { onClick: () => replaceBlocks(block.clientId, Object(external_wp_blocks_["rawHandler"])({ HTML: Object(external_wp_blocks_["serialize"])(block) })) }, Object(external_wp_i18n_["__"])('Convert to blocks')); }; /* harmony default export */ var convert_to_blocks_button = (ConvertToBlocksButton); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/freeform/edit.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ const { wp: edit_wp } = window; function isTmceEmpty(editor) { // When tinyMce is empty the content seems to be: //


// avoid expensive checks for large documents const body = editor.getBody(); if (body.childNodes.length > 1) { return false; } else if (body.childNodes.length === 0) { return true; } if (body.childNodes[0].childNodes.length > 1) { return false; } return /^\n?$/.test(body.innerText || body.textContent); } function ClassicEdit(_ref) { let { clientId, attributes: { content }, setAttributes, onReplace } = _ref; const { getMultiSelectedBlockClientIds } = Object(external_wp_data_["useSelect"])(external_wp_blockEditor_["store"]); const didMount = Object(external_wp_element_["useRef"])(false); Object(external_wp_element_["useEffect"])(() => { if (!didMount.current) { return; } const editor = window.tinymce.get(`editor-${clientId}`); const currentContent = editor === null || editor === void 0 ? void 0 : editor.getContent(); if (currentContent !== content) { editor.setContent(content || ''); } }, [content]); Object(external_wp_element_["useEffect"])(() => { const { baseURL, suffix } = window.wpEditorL10n.tinymce; didMount.current = true; window.tinymce.EditorManager.overrideDefaults({ base_url: baseURL, suffix }); function onSetup(editor) { let bookmark; if (content) { editor.on('loadContent', () => editor.setContent(content)); } editor.on('blur', () => { var _getMultiSelectedBloc; bookmark = editor.selection.getBookmark(2, true); // There is an issue with Chrome and the editor.focus call in core at https://core.trac.wordpress.org/browser/trunk/src/js/_enqueues/lib/link.js#L451. // This causes a scroll to the top of editor content on return from some content updating dialogs so tracking // scroll position until this is fixed in core. const scrollContainer = document.querySelector('.interface-interface-skeleton__content'); const scrollPosition = scrollContainer.scrollTop; // Only update attributes if we aren't multi-selecting blocks. // Updating during multi-selection can overwrite attributes of other blocks. if (!((_getMultiSelectedBloc = getMultiSelectedBlockClientIds()) !== null && _getMultiSelectedBloc !== void 0 && _getMultiSelectedBloc.length)) { setAttributes({ content: editor.getContent() }); } editor.once('focus', () => { if (bookmark) { editor.selection.moveToBookmark(bookmark); if (scrollContainer.scrollTop !== scrollPosition) { scrollContainer.scrollTop = scrollPosition; } } }); return false; }); editor.on('mousedown touchstart', () => { bookmark = null; }); const debouncedOnChange = Object(external_lodash_["debounce"])(() => { const value = editor.getContent(); if (value !== editor._lastChange) { editor._lastChange = value; setAttributes({ content: value }); } }, 250); editor.on('Paste Change input Undo Redo', debouncedOnChange); // We need to cancel the debounce call because when we remove // the editor (onUnmount) this callback is executed in // another tick. This results in setting the content to empty. editor.on('remove', debouncedOnChange.cancel); editor.on('keydown', event => { if (external_wp_keycodes_["isKeyboardEvent"].primary(event, 'z')) { // Prevent the gutenberg undo kicking in so TinyMCE undo stack works as expected event.stopPropagation(); } if ((event.keyCode === external_wp_keycodes_["BACKSPACE"] || event.keyCode === external_wp_keycodes_["DELETE"]) && isTmceEmpty(editor)) { // delete the block onReplace([]); event.preventDefault(); event.stopImmediatePropagation(); } const { altKey } = event; /* * Prevent Mousetrap from kicking in: TinyMCE already uses its own * `alt+f10` shortcut to focus its toolbar. */ if (altKey && event.keyCode === external_wp_keycodes_["F10"]) { event.stopPropagation(); } }); editor.on('init', () => { const rootNode = editor.getBody(); // Create the toolbar by refocussing the editor. if (rootNode.ownerDocument.activeElement === rootNode) { rootNode.blur(); editor.focus(); } }); } function initialize() { const { settings } = window.wpEditorL10n.tinymce; edit_wp.oldEditor.initialize(`editor-${clientId}`, { tinymce: { ...settings, inline: true, content_css: false, fixed_toolbar_container: `#toolbar-${clientId}`, setup: onSetup } }); } function onReadyStateChange() { if (document.readyState === 'complete') { initialize(); } } if (document.readyState === 'complete') { initialize(); } else { document.addEventListener('readystatechange', onReadyStateChange); } return () => { document.removeEventListener('readystatechange', onReadyStateChange); edit_wp.oldEditor.remove(`editor-${clientId}`); }; }, []); function focus() { const editor = window.tinymce.get(`editor-${clientId}`); if (editor) { editor.focus(); } } function onToolbarKeyDown(event) { // Prevent WritingFlow from kicking in and allow arrows navigation on the toolbar. event.stopPropagation(); // Prevent Mousetrap from moving focus to the top toolbar when pressing `alt+f10` on this block toolbar. event.nativeEvent.stopImmediatePropagation(); } // Disable reasons: // // jsx-a11y/no-static-element-interactions // - the toolbar itself is non-interactive, but must capture events // from the KeyboardShortcuts component to stop their propagation. /* eslint-disable jsx-a11y/no-static-element-interactions */ return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, Object(external_wp_element_["createElement"])(convert_to_blocks_button, { clientId: clientId }))), Object(external_wp_element_["createElement"])("div", Object(external_wp_blockEditor_["useBlockProps"])(), Object(external_wp_element_["createElement"])("div", { key: "toolbar", id: `toolbar-${clientId}`, className: "block-library-classic__toolbar", onClick: focus, "data-placeholder": Object(external_wp_i18n_["__"])('Classic'), onKeyDown: onToolbarKeyDown }), Object(external_wp_element_["createElement"])("div", { key: "editor", id: `editor-${clientId}`, className: "wp-block-freeform block-library-rich-text__tinymce" }))); /* eslint-enable jsx-a11y/no-static-element-interactions */ } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/freeform/save.js /** * WordPress dependencies */ function freeform_save_save(_ref) { let { attributes } = _ref; const { content } = attributes; return Object(external_wp_element_["createElement"])(external_wp_element_["RawHTML"], null, content); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/freeform/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const freeform_metadata = { apiVersion: 2, name: "core/freeform", title: "Classic", category: "text", description: "Use the classic WordPress editor.", textdomain: "default", attributes: { content: { type: "string", source: "html" } }, supports: { className: false, customClassName: false, reusable: false }, editorStyle: "wp-block-freeform-editor" }; const { name: freeform_name } = freeform_metadata; const freeform_settings = { icon: library_classic, edit: ClassicEdit, save: freeform_save_save }; // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/code.js var code = __webpack_require__("1Yn1"); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/edit.js /** * WordPress dependencies */ function CodeEdit(_ref) { let { attributes, setAttributes, onRemove } = _ref; const blockProps = Object(external_wp_blockEditor_["useBlockProps"])(); return Object(external_wp_element_["createElement"])("pre", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { tagName: "code", value: attributes.content, onChange: content => setAttributes({ content }), onRemove: onRemove, placeholder: Object(external_wp_i18n_["__"])('Write code…'), "aria-label": Object(external_wp_i18n_["__"])('Code'), preserveWhiteSpace: true, __unstablePastePlainText: true })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/utils.js /** * External dependencies */ /** * Escapes ampersands, shortcodes, and links. * * @param {string} content The content of a code block. * @return {string} The given content with some characters escaped. */ function utils_escape(content) { return Object(external_lodash_["flow"])(escapeOpeningSquareBrackets, escapeProtocolInIsolatedUrls)(content || ''); } /** * Returns the given content with all opening shortcode characters converted * into their HTML entity counterpart (i.e. [ => [). For instance, a * shortcode like [embed] becomes [embed] * * This function replicates the escaping of HTML tags, where a tag like * becomes <strong>. * * @param {string} content The content of a code block. * @return {string} The given content with its opening shortcode characters * converted into their HTML entity counterpart * (i.e. [ => [) */ function escapeOpeningSquareBrackets(content) { return content.replace(/\[/g, '['); } /** * Converts the first two forward slashes of any isolated URL into their HTML * counterparts (i.e. // => //). For instance, https://youtube.com/watch?x * becomes https://youtube.com/watch?x. * * An isolated URL is a URL that sits in its own line, surrounded only by spacing * characters. * * See https://github.com/WordPress/wordpress-develop/blob/5.1.1/src/wp-includes/class-wp-embed.php#L403 * * @param {string} content The content of a code block. * @return {string} The given content with its ampersands converted into * their HTML entity counterpart (i.e. & => &) */ function escapeProtocolInIsolatedUrls(content) { return content.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m, '$1//$2'); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/save.js /** * WordPress dependencies */ /** * Internal dependencies */ function code_save_save(_ref) { let { attributes } = _ref; return Object(external_wp_element_["createElement"])("pre", external_wp_blockEditor_["useBlockProps"].save(), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "code", value: utils_escape(attributes.content) })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/transforms.js /** * WordPress dependencies */ const code_transforms_transforms = { from: [{ type: 'enter', regExp: /^```$/, transform: () => Object(external_wp_blocks_["createBlock"])('core/code') }, { type: 'block', blocks: ['core/html'], transform: _ref => { let { content } = _ref; return Object(external_wp_blocks_["createBlock"])('core/code', { content }); } }, { type: 'raw', isMatch: node => node.nodeName === 'PRE' && node.children.length === 1 && node.firstChild.nodeName === 'CODE', schema: { pre: { children: { code: { children: { '#text': {} } } } } } }] }; /* harmony default export */ var code_transforms = (code_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/code/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const code_metadata = { apiVersion: 2, name: "core/code", title: "Code", category: "text", description: "Display code snippets that respect your spacing and tabs.", textdomain: "default", attributes: { content: { type: "string", source: "html", selector: "code" } }, supports: { anchor: true, __experimentalSelector: ".wp-block-code > code", typography: { fontSize: true, lineHeight: true, __experimentalFontStyle: true, __experimentalFontWeight: true, __experimentalLetterSpacing: true, __experimentalTextTransform: true, __experimentalDefaultControls: { fontSize: true } }, spacing: { margin: ["top", "bottom"], padding: true }, __experimentalBorder: { radius: true, color: true, width: true, style: true }, color: { text: true, background: true, gradients: true } }, style: "wp-block-code" }; const { name: code_name } = code_metadata; const code_settings = { icon: code["a" /* default */], example: { attributes: { /* eslint-disable @wordpress/i18n-no-collapsible-whitespace */ // translators: Preserve \n markers for line breaks content: Object(external_wp_i18n_["__"])('// A "block" is the abstract term used\n// to describe units of markup that\n// when composed together, form the\n// content or layout of a page.\nregisterBlockType( name, settings );') /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */ } }, transforms: code_transforms, edit: CodeEdit, save: code_save_save }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/column.js /** * WordPress dependencies */ const column = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM6 17.5c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h3v10H6zm13.5-.5c0 .3-.2.5-.5.5h-3v-10h3c.3 0 .5.2.5.5v9z" })); /* harmony default export */ var library_column = (column); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/column/deprecated.js /** * External dependencies */ /** * WordPress dependencies */ const column_deprecated_deprecated = [{ attributes: { verticalAlignment: { type: 'string' }, width: { type: 'number', min: 0, max: 100 } }, isEligible(_ref) { let { width } = _ref; return isFinite(width); }, migrate(attributes) { return { ...attributes, width: `${attributes.width}%` }; }, save(_ref2) { let { attributes } = _ref2; const { verticalAlignment, width } = attributes; const wrapperClasses = classnames_default()({ [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment }); const style = { flexBasis: width + '%' }; return Object(external_wp_element_["createElement"])("div", { className: wrapperClasses, style: style }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)); } }]; /* harmony default export */ var column_deprecated = (column_deprecated_deprecated); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/column/edit.js /** * External dependencies */ /** * WordPress dependencies */ function ColumnEdit(_ref) { let { attributes: { verticalAlignment, width, templateLock = false, allowedBlocks }, setAttributes, clientId } = _ref; const classes = classnames_default()('block-core-columns', { [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment }); const units = Object(external_wp_components_["__experimentalUseCustomUnits"])({ availableUnits: Object(external_wp_blockEditor_["useSetting"])('spacing.units') || ['%', 'px', 'em', 'rem', 'vw'] }); const { columnsIds, hasChildBlocks, rootClientId } = Object(external_wp_data_["useSelect"])(select => { const { getBlockOrder, getBlockRootClientId } = select(external_wp_blockEditor_["store"]); const rootId = getBlockRootClientId(clientId); return { hasChildBlocks: getBlockOrder(clientId).length > 0, rootClientId: rootId, columnsIds: getBlockOrder(rootId) }; }, [clientId]); const { updateBlockAttributes } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]); const updateAlignment = value => { // Update own alignment. setAttributes({ verticalAlignment: value }); // Reset parent Columns block. updateBlockAttributes(rootClientId, { verticalAlignment: null }); }; const widthWithUnit = Number.isFinite(width) ? width + '%' : width; const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({ className: classes, style: widthWithUnit ? { flexBasis: widthWithUnit } : undefined }); const columnsCount = columnsIds.length; const currentColumnPosition = columnsIds.indexOf(clientId) + 1; const label = Object(external_wp_i18n_["sprintf"])( /* translators: 1: Block label (i.e. "Block: Column"), 2: Position of the selected block, 3: Total number of sibling blocks of the same type */ Object(external_wp_i18n_["__"])('%1$s (%2$d of %3$d)'), blockProps['aria-label'], currentColumnPosition, columnsCount); const innerBlocksProps = Object(external_wp_blockEditor_["useInnerBlocksProps"])({ ...blockProps, 'aria-label': label }, { templateLock, allowedBlocks, renderAppender: hasChildBlocks ? undefined : external_wp_blockEditor_["InnerBlocks"].ButtonBlockAppender }); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockVerticalAlignmentToolbar"], { onChange: updateAlignment, value: verticalAlignment })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Column settings') }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalUnitControl"], { label: Object(external_wp_i18n_["__"])('Width'), labelPosition: "edge", __unstableInputWidth: "80px", value: width || '', onChange: nextWidth => { nextWidth = 0 > parseFloat(nextWidth) ? '0' : nextWidth; setAttributes({ width: nextWidth }); }, units: units }))), Object(external_wp_element_["createElement"])("div", innerBlocksProps)); } /* harmony default export */ var column_edit = (ColumnEdit); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/column/save.js /** * External dependencies */ /** * WordPress dependencies */ function column_save_save(_ref) { let { attributes } = _ref; const { verticalAlignment, width } = attributes; const wrapperClasses = classnames_default()({ [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment }); let style; if (width && /\d/.test(width)) { // Numbers are handled for backward compatibility as they can be still provided with templates. let flexBasis = Number.isFinite(width) ? width + '%' : width; // In some cases we need to round the width to a shorter float. if (!Number.isFinite(width) && width !== null && width !== void 0 && width.endsWith('%')) { const multiplier = 1000000000000; // Shrink the number back to a reasonable float. flexBasis = Math.round(Number.parseFloat(width) * multiplier) / multiplier + '%'; } style = { flexBasis }; } const blockProps = external_wp_blockEditor_["useBlockProps"].save({ className: wrapperClasses, style }); const innerBlocksProps = external_wp_blockEditor_["useInnerBlocksProps"].save(blockProps); return Object(external_wp_element_["createElement"])("div", innerBlocksProps); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/column/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const column_metadata = { apiVersion: 2, name: "core/column", title: "Column", category: "text", parent: ["core/columns"], description: "A single column within a columns block.", textdomain: "default", attributes: { verticalAlignment: { type: "string" }, width: { type: "string" }, allowedBlocks: { type: "array" }, templateLock: { type: ["string", "boolean"], "enum": ["all", "insert", false] } }, supports: { anchor: true, reusable: false, html: false, color: { gradients: true, link: true }, spacing: { padding: true, __experimentalDefaultControls: { padding: true } } } }; const { name: column_name } = column_metadata; const column_settings = { icon: library_column, edit: column_edit, save: column_save_save, deprecated: column_deprecated }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/columns.js /** * WordPress dependencies */ const columns_columns = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-4.1 1.5v10H10v-10h4.9zM5.5 17V8c0-.3.2-.5.5-.5h2.5v10H6c-.3 0-.5-.2-.5-.5zm14 0c0 .3-.2.5-.5.5h-2.6v-10H19c.3 0 .5.2.5.5v9z" })); /* harmony default export */ var library_columns = (columns_columns); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/deprecated.js /** * External dependencies */ /** * WordPress dependencies */ /** * Given an HTML string for a deprecated columns inner block, returns the * column index to which the migrated inner block should be assigned. Returns * undefined if the inner block was not assigned to a column. * * @param {string} originalContent Deprecated Columns inner block HTML. * * @return {?number} Column to which inner block is to be assigned. */ function getDeprecatedLayoutColumn(originalContent) { let { doc } = getDeprecatedLayoutColumn; if (!doc) { doc = document.implementation.createHTMLDocument(''); getDeprecatedLayoutColumn.doc = doc; } let columnMatch; doc.body.innerHTML = originalContent; for (const classListItem of doc.body.firstChild.classList) { if (columnMatch = classListItem.match(/^layout-column-(\d+)$/)) { return Number(columnMatch[1]) - 1; } } } const migrateCustomColors = attributes => { if (!attributes.customTextColor && !attributes.customBackgroundColor) { return attributes; } const style = { color: {} }; if (attributes.customTextColor) { style.color.text = attributes.customTextColor; } if (attributes.customBackgroundColor) { style.color.background = attributes.customBackgroundColor; } return { ...Object(external_lodash_["omit"])(attributes, ['customTextColor', 'customBackgroundColor']), style, isStackedOnMobile: true }; }; /* harmony default export */ var columns_deprecated = ([{ attributes: { verticalAlignment: { type: 'string' }, backgroundColor: { type: 'string' }, customBackgroundColor: { type: 'string' }, customTextColor: { type: 'string' }, textColor: { type: 'string' } }, migrate: migrateCustomColors, save(_ref) { let { attributes } = _ref; const { verticalAlignment, backgroundColor, customBackgroundColor, textColor, customTextColor } = attributes; const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor); const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor); const className = classnames_default()({ 'has-background': backgroundColor || customBackgroundColor, 'has-text-color': textColor || customTextColor, [backgroundClass]: backgroundClass, [textClass]: textClass, [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment }); const style = { backgroundColor: backgroundClass ? undefined : customBackgroundColor, color: textClass ? undefined : customTextColor }; return Object(external_wp_element_["createElement"])("div", { className: className ? className : undefined, style: style }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)); } }, { attributes: { columns: { type: 'number', default: 2 } }, isEligible(attributes, innerBlocks) { // Since isEligible is called on every valid instance of the // Columns block and a deprecation is the unlikely case due to // its subsequent migration, optimize for the `false` condition // by performing a naive, inaccurate pass at inner blocks. const isFastPassEligible = innerBlocks.some(innerBlock => /layout-column-\d+/.test(innerBlock.originalContent)); if (!isFastPassEligible) { return false; } // Only if the fast pass is considered eligible is the more // accurate, durable, slower condition performed. return innerBlocks.some(innerBlock => getDeprecatedLayoutColumn(innerBlock.originalContent) !== undefined); }, migrate(attributes, innerBlocks) { const columns = innerBlocks.reduce((accumulator, innerBlock) => { const { originalContent } = innerBlock; let columnIndex = getDeprecatedLayoutColumn(originalContent); if (columnIndex === undefined) { columnIndex = 0; } if (!accumulator[columnIndex]) { accumulator[columnIndex] = []; } accumulator[columnIndex].push(innerBlock); return accumulator; }, []); const migratedInnerBlocks = columns.map(columnBlocks => Object(external_wp_blocks_["createBlock"])('core/column', {}, columnBlocks)); return [{ ...Object(external_lodash_["omit"])(attributes, ['columns']), isStackedOnMobile: true }, migratedInnerBlocks]; }, save(_ref2) { let { attributes } = _ref2; const { columns } = attributes; return Object(external_wp_element_["createElement"])("div", { className: `has-${columns}-columns` }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)); } }, { attributes: { columns: { type: 'number', default: 2 } }, migrate(attributes, innerBlocks) { attributes = { ...Object(external_lodash_["omit"])(attributes, ['columns']), isStackedOnMobile: true }; return [attributes, innerBlocks]; }, save(_ref3) { let { attributes } = _ref3; const { verticalAlignment, columns } = attributes; const wrapperClasses = classnames_default()(`has-${columns}-columns`, { [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment }); return Object(external_wp_element_["createElement"])("div", { className: wrapperClasses }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)); } }]); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/utils.js /** * External dependencies */ /** * Returns a column width attribute value rounded to standard precision. * Returns `undefined` if the value is not a valid finite number. * * @param {?number} value Raw value. * * @return {number} Value rounded to standard precision. */ const toWidthPrecision = value => { const unitlessValue = parseFloat(value); return Number.isFinite(unitlessValue) ? parseFloat(unitlessValue.toFixed(2)) : undefined; }; /** * Returns an effective width for a given block. An effective width is equal to * its attribute value if set, or a computed value assuming equal distribution. * * @param {WPBlock} block Block object. * @param {number} totalBlockCount Total number of blocks in Columns. * * @return {number} Effective column width. */ function getEffectiveColumnWidth(block, totalBlockCount) { const { width = 100 / totalBlockCount } = block.attributes; return toWidthPrecision(width); } /** * Returns the total width occupied by the given set of column blocks. * * @param {WPBlock[]} blocks Block objects. * @param {?number} totalBlockCount Total number of blocks in Columns. * Defaults to number of blocks passed. * * @return {number} Total width occupied by blocks. */ function getTotalColumnsWidth(blocks) { let totalBlockCount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : blocks.length; return Object(external_lodash_["sumBy"])(blocks, block => getEffectiveColumnWidth(block, totalBlockCount)); } /** * Returns an object of `clientId` → `width` of effective column widths. * * @param {WPBlock[]} blocks Block objects. * @param {?number} totalBlockCount Total number of blocks in Columns. * Defaults to number of blocks passed. * * @return {Object} Column widths. */ function getColumnWidths(blocks) { let totalBlockCount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : blocks.length; return blocks.reduce((accumulator, block) => { const width = getEffectiveColumnWidth(block, totalBlockCount); return Object.assign(accumulator, { [block.clientId]: width }); }, {}); } /** * Returns an object of `clientId` → `width` of column widths as redistributed * proportional to their current widths, constrained or expanded to fit within * the given available width. * * @param {WPBlock[]} blocks Block objects. * @param {number} availableWidth Maximum width to fit within. * @param {?number} totalBlockCount Total number of blocks in Columns. * Defaults to number of blocks passed. * * @return {Object} Redistributed column widths. */ function getRedistributedColumnWidths(blocks, availableWidth) { let totalBlockCount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : blocks.length; const totalWidth = getTotalColumnsWidth(blocks, totalBlockCount); return Object(external_lodash_["mapValues"])(getColumnWidths(blocks, totalBlockCount), width => { const newWidth = availableWidth * width / totalWidth; return toWidthPrecision(newWidth); }); } /** * Returns true if column blocks within the provided set are assigned with * explicit widths, or false otherwise. * * @param {WPBlock[]} blocks Block objects. * * @return {boolean} Whether columns have explicit widths. */ function hasExplicitPercentColumnWidths(blocks) { return blocks.every(block => { var _blockWidth$endsWith; const blockWidth = block.attributes.width; return Number.isFinite(blockWidth !== null && blockWidth !== void 0 && (_blockWidth$endsWith = blockWidth.endsWith) !== null && _blockWidth$endsWith !== void 0 && _blockWidth$endsWith.call(blockWidth, '%') ? parseFloat(blockWidth) : blockWidth); }); } /** * Returns a copy of the given set of blocks with new widths assigned from the * provided object of redistributed column widths. * * @param {WPBlock[]} blocks Block objects. * @param {Object} widths Redistributed column widths. * * @return {WPBlock[]} blocks Mapped block objects. */ function getMappedColumnWidths(blocks, widths) { return blocks.map(block => Object(external_lodash_["merge"])({}, block, { attributes: { width: `${widths[block.clientId]}%` } })); } /** * Returns an array with columns widths values, parsed or no depends on `withParsing` flag. * * @param {WPBlock[]} blocks Block objects. * @param {?boolean} withParsing Whether value has to be parsed. * * @return {Array} Column widths. */ function getWidths(blocks) { let withParsing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; return blocks.map(innerColumn => { const innerColumnWidth = innerColumn.attributes.width || 100 / blocks.length; return withParsing ? parseFloat(innerColumnWidth) : innerColumnWidth; }); } /** * Returns a column width with unit. * * @param {string} width Column width. * @param {string} unit Column width unit. * * @return {string} Column width with unit. */ function getWidthWithUnit(width, unit) { width = 0 > parseFloat(width) ? '0' : width; if (isPercentageUnit(unit)) { width = Math.min(width, 100); } return `${width}${unit}`; } /** * Returns a boolean whether passed unit is percentage * * @param {string} unit Column width unit. * * @return {boolean} Whether unit is '%'. */ function isPercentageUnit(unit) { return unit === '%'; } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/edit.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** * Allowed blocks constant is passed to InnerBlocks precisely as specified here. * The contents of the array should never change. * The array should contain the name of each block that is allowed. * In columns block, the only block we allow is 'core/column'. * * @constant * @type {string[]} */ const edit_ALLOWED_BLOCKS = ['core/column']; function ColumnsEditContainer(_ref) { let { attributes, setAttributes, updateAlignment, updateColumns, clientId } = _ref; const { isStackedOnMobile, verticalAlignment } = attributes; const { count } = Object(external_wp_data_["useSelect"])(select => { return { count: select(external_wp_blockEditor_["store"]).getBlockCount(clientId) }; }, [clientId]); const classes = classnames_default()({ [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment, [`is-not-stacked-on-mobile`]: !isStackedOnMobile }); const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({ className: classes }); const innerBlocksProps = Object(external_wp_blockEditor_["useInnerBlocksProps"])(blockProps, { allowedBlocks: edit_ALLOWED_BLOCKS, orientation: 'horizontal', renderAppender: false }); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockVerticalAlignmentToolbar"], { onChange: updateAlignment, value: verticalAlignment })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], null, Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], { label: Object(external_wp_i18n_["__"])('Columns'), value: count, onChange: value => updateColumns(count, value), min: 1, max: Math.max(6, count) }), count > 6 && Object(external_wp_element_["createElement"])(external_wp_components_["Notice"], { status: "warning", isDismissible: false }, Object(external_wp_i18n_["__"])('This column count exceeds the recommended amount and may cause visual breakage.')), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Stack on mobile'), checked: isStackedOnMobile, onChange: () => setAttributes({ isStackedOnMobile: !isStackedOnMobile }) }))), Object(external_wp_element_["createElement"])("div", innerBlocksProps)); } const ColumnsEditContainerWrapper = Object(external_wp_data_["withDispatch"])((dispatch, ownProps, registry) => ({ /** * Update all child Column blocks with a new vertical alignment setting * based on whatever alignment is passed in. This allows change to parent * to overide anything set on a individual column basis. * * @param {string} verticalAlignment the vertical alignment setting */ updateAlignment(verticalAlignment) { const { clientId, setAttributes } = ownProps; const { updateBlockAttributes } = dispatch(external_wp_blockEditor_["store"]); const { getBlockOrder } = registry.select(external_wp_blockEditor_["store"]); // Update own alignment. setAttributes({ verticalAlignment }); // Update all child Column Blocks to match const innerBlockClientIds = getBlockOrder(clientId); innerBlockClientIds.forEach(innerBlockClientId => { updateBlockAttributes(innerBlockClientId, { verticalAlignment }); }); }, /** * Updates the column count, including necessary revisions to child Column * blocks to grant required or redistribute available space. * * @param {number} previousColumns Previous column count. * @param {number} newColumns New column count. */ updateColumns(previousColumns, newColumns) { const { clientId } = ownProps; const { replaceInnerBlocks } = dispatch(external_wp_blockEditor_["store"]); const { getBlocks } = registry.select(external_wp_blockEditor_["store"]); let innerBlocks = getBlocks(clientId); const hasExplicitWidths = hasExplicitPercentColumnWidths(innerBlocks); // Redistribute available width for existing inner blocks. const isAddingColumn = newColumns > previousColumns; if (isAddingColumn && hasExplicitWidths) { // If adding a new column, assign width to the new column equal to // as if it were `1 / columns` of the total available space. const newColumnWidth = toWidthPrecision(100 / newColumns); // Redistribute in consideration of pending block insertion as // constraining the available working width. const widths = getRedistributedColumnWidths(innerBlocks, 100 - newColumnWidth); innerBlocks = [...getMappedColumnWidths(innerBlocks, widths), ...Object(external_lodash_["times"])(newColumns - previousColumns, () => { return Object(external_wp_blocks_["createBlock"])('core/column', { width: `${newColumnWidth}%` }); })]; } else if (isAddingColumn) { innerBlocks = [...innerBlocks, ...Object(external_lodash_["times"])(newColumns - previousColumns, () => { return Object(external_wp_blocks_["createBlock"])('core/column'); })]; } else { // The removed column will be the last of the inner blocks. innerBlocks = Object(external_lodash_["dropRight"])(innerBlocks, previousColumns - newColumns); if (hasExplicitWidths) { // Redistribute as if block is already removed. const widths = getRedistributedColumnWidths(innerBlocks, 100); innerBlocks = getMappedColumnWidths(innerBlocks, widths); } } replaceInnerBlocks(clientId, innerBlocks); } }))(ColumnsEditContainer); function Placeholder(_ref2) { let { clientId, name, setAttributes } = _ref2; const { blockType, defaultVariation, variations } = Object(external_wp_data_["useSelect"])(select => { const { getBlockVariations, getBlockType, getDefaultBlockVariation } = select(external_wp_blocks_["store"]); return { blockType: getBlockType(name), defaultVariation: getDefaultBlockVariation(name, 'block'), variations: getBlockVariations(name, 'block') }; }, [name]); const { replaceInnerBlocks } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]); const blockProps = Object(external_wp_blockEditor_["useBlockProps"])(); return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalBlockVariationPicker"], { icon: Object(external_lodash_["get"])(blockType, ['icon', 'src']), label: Object(external_lodash_["get"])(blockType, ['title']), variations: variations, onSelect: function () { let nextVariation = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultVariation; if (nextVariation.attributes) { setAttributes(nextVariation.attributes); } if (nextVariation.innerBlocks) { replaceInnerBlocks(clientId, Object(external_wp_blocks_["createBlocksFromInnerBlocksTemplate"])(nextVariation.innerBlocks), true); } }, allowSkip: true })); } const ColumnsEdit = props => { const { clientId } = props; const hasInnerBlocks = Object(external_wp_data_["useSelect"])(select => select(external_wp_blockEditor_["store"]).getBlocks(clientId).length > 0, [clientId]); const Component = hasInnerBlocks ? ColumnsEditContainerWrapper : Placeholder; return Object(external_wp_element_["createElement"])(Component, props); }; /* harmony default export */ var columns_edit = (ColumnsEdit); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/save.js /** * External dependencies */ /** * WordPress dependencies */ function columns_save_save(_ref) { let { attributes } = _ref; const { isStackedOnMobile, verticalAlignment } = attributes; const className = classnames_default()({ [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment, [`is-not-stacked-on-mobile`]: !isStackedOnMobile }); const blockProps = external_wp_blockEditor_["useBlockProps"].save({ className }); const innerBlocksProps = external_wp_blockEditor_["useInnerBlocksProps"].save(blockProps); return Object(external_wp_element_["createElement"])("div", innerBlocksProps); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/variations.js /** * WordPress dependencies */ /** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */ /** * Template option choices for predefined columns layouts. * * @type {WPBlockVariation[]} */ const variations_variations = [{ name: 'one-column-full', title: Object(external_wp_i18n_["__"])('100'), description: Object(external_wp_i18n_["__"])('One column'), icon: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { width: "48", height: "48", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { fillRule: "evenodd", clipRule: "evenodd", d: "m39.0625 14h-30.0625v20.0938h30.0625zm-30.0625-2c-1.10457 0-2 .8954-2 2v20.0938c0 1.1045.89543 2 2 2h30.0625c1.1046 0 2-.8955 2-2v-20.0938c0-1.1046-.8954-2-2-2z" })), innerBlocks: [['core/column']], scope: ['block'] }, { name: 'two-columns-equal', title: Object(external_wp_i18n_["__"])('50 / 50'), description: Object(external_wp_i18n_["__"])('Two columns; equal split'), icon: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { width: "48", height: "48", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { fillRule: "evenodd", clipRule: "evenodd", d: "M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H25V34H39ZM23 34H9V14H23V34Z" })), isDefault: true, innerBlocks: [['core/column'], ['core/column']], scope: ['block'] }, { name: 'two-columns-one-third-two-thirds', title: Object(external_wp_i18n_["__"])('30 / 70'), description: Object(external_wp_i18n_["__"])('Two columns; one-third, two-thirds split'), icon: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { width: "48", height: "48", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { fillRule: "evenodd", clipRule: "evenodd", d: "M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H20V34H39ZM18 34H9V14H18V34Z" })), innerBlocks: [['core/column', { width: '33.33%' }], ['core/column', { width: '66.66%' }]], scope: ['block'] }, { name: 'two-columns-two-thirds-one-third', title: Object(external_wp_i18n_["__"])('70 / 30'), description: Object(external_wp_i18n_["__"])('Two columns; two-thirds, one-third split'), icon: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { width: "48", height: "48", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { fillRule: "evenodd", clipRule: "evenodd", d: "M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H30V34H39ZM28 34H9V14H28V34Z" })), innerBlocks: [['core/column', { width: '66.66%' }], ['core/column', { width: '33.33%' }]], scope: ['block'] }, { name: 'three-columns-equal', title: Object(external_wp_i18n_["__"])('33 / 33 / 33'), description: Object(external_wp_i18n_["__"])('Three columns; equal split'), icon: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { width: "48", height: "48", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { fillRule: "evenodd", d: "M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM28.5 34h-9V14h9v20zm2 0V14H39v20h-8.5zm-13 0H9V14h8.5v20z" })), innerBlocks: [['core/column'], ['core/column'], ['core/column']], scope: ['block'] }, { name: 'three-columns-wider-center', title: Object(external_wp_i18n_["__"])('25 / 50 / 25'), description: Object(external_wp_i18n_["__"])('Three columns; wide center column'), icon: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { width: "48", height: "48", viewBox: "0 0 48 48", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { fillRule: "evenodd", d: "M41 14a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h30a2 2 0 0 0 2-2V14zM31 34H17V14h14v20zm2 0V14h6v20h-6zm-18 0H9V14h6v20z" })), innerBlocks: [['core/column', { width: '25%' }], ['core/column', { width: '50%' }], ['core/column', { width: '25%' }]], scope: ['block'] }]; /* harmony default export */ var columns_variations = (variations_variations); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/transforms.js /** * WordPress dependencies */ const MAXIMUM_SELECTED_BLOCKS = 6; const columns_transforms_transforms = { from: [{ type: 'block', isMultiBlock: true, blocks: ['*'], __experimentalConvert: blocks => { const columnWidth = +(100 / blocks.length).toFixed(2); const innerBlocksTemplate = blocks.map(_ref => { let { name, attributes, innerBlocks } = _ref; return ['core/column', { width: `${columnWidth}%` }, [[name, { ...attributes }, innerBlocks]]]; }); return Object(external_wp_blocks_["createBlock"])('core/columns', {}, Object(external_wp_blocks_["createBlocksFromInnerBlocksTemplate"])(innerBlocksTemplate)); }, isMatch: _ref2 => { let { length: selectedBlocksLength } = _ref2; return selectedBlocksLength && selectedBlocksLength <= MAXIMUM_SELECTED_BLOCKS; } }, { type: 'block', blocks: ['core/media-text'], priority: 1, transform: (attributes, innerBlocks) => { const { align, backgroundColor, textColor, style, mediaAlt: alt, mediaId: id, mediaPosition, mediaSizeSlug: sizeSlug, mediaType, mediaUrl: url, mediaWidth, verticalAlignment } = attributes; let media; if (mediaType === 'image' || !mediaType) { const imageAttrs = { id, alt, url, sizeSlug }; const linkAttrs = { href: attributes.href, linkClass: attributes.linkClass, linkDestination: attributes.linkDestination, linkTarget: attributes.linkTarget, rel: attributes.rel }; media = ['core/image', { ...imageAttrs, ...linkAttrs }]; } else { media = ['core/video', { id, src: url }]; } const innerBlocksTemplate = [['core/column', { width: `${mediaWidth}%` }, [media]], ['core/column', { width: `${100 - mediaWidth}%` }, innerBlocks]]; if (mediaPosition === 'right') { innerBlocksTemplate.reverse(); } return Object(external_wp_blocks_["createBlock"])('core/columns', { align, backgroundColor, textColor, style, verticalAlignment }, Object(external_wp_blocks_["createBlocksFromInnerBlocksTemplate"])(innerBlocksTemplate)); } }] }; /* harmony default export */ var columns_transforms = (columns_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/columns/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const columns_metadata = { apiVersion: 2, name: "core/columns", title: "Columns", category: "design", description: "Display content in multiple columns, with blocks added to each column.", textdomain: "default", attributes: { verticalAlignment: { type: "string" }, isStackedOnMobile: { type: "boolean", "default": true } }, supports: { anchor: true, align: ["wide", "full"], html: false, color: { gradients: true, link: true }, spacing: { blockGap: true, margin: ["top", "bottom"], padding: true, __experimentalDefaultControls: { blockGap: true } } }, editorStyle: "wp-block-columns-editor", style: "wp-block-columns" }; const { name: columns_name } = columns_metadata; const columns_settings = { icon: library_columns, variations: columns_variations, example: { viewportWidth: 600, // Columns collapse "@media (max-width: 599px)". innerBlocks: [{ name: 'core/column', innerBlocks: [{ name: 'core/paragraph', attributes: { /* translators: example text. */ content: Object(external_wp_i18n_["__"])('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.') } }, { name: 'core/image', attributes: { url: 'https://s.w.org/images/core/5.3/Windbuchencom.jpg' } }, { name: 'core/paragraph', attributes: { /* translators: example text. */ content: Object(external_wp_i18n_["__"])('Suspendisse commodo neque lacus, a dictum orci interdum et.') } }] }, { name: 'core/column', innerBlocks: [{ name: 'core/paragraph', attributes: { /* translators: example text. */ content: Object(external_wp_i18n_["__"])('Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.') } }, { name: 'core/paragraph', attributes: { /* translators: example text. */ content: Object(external_wp_i18n_["__"])('Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.') } }] }] }, deprecated: columns_deprecated, edit: columns_edit, save: columns_save_save, transforms: columns_transforms }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/cover.js /** * WordPress dependencies */ const cover = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h6.2v8.9l2.5-3.1 2.5 3.1V4.5h2.2c.4 0 .8.4.8.8v13.4z" })); /* harmony default export */ var library_cover = (cover); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/shared.js /** * WordPress dependencies */ const POSITION_CLASSNAMES = { 'top left': 'is-position-top-left', 'top center': 'is-position-top-center', 'top right': 'is-position-top-right', 'center left': 'is-position-center-left', 'center center': 'is-position-center-center', center: 'is-position-center-center', 'center right': 'is-position-center-right', 'bottom left': 'is-position-bottom-left', 'bottom center': 'is-position-bottom-center', 'bottom right': 'is-position-bottom-right' }; const IMAGE_BACKGROUND_TYPE = 'image'; const VIDEO_BACKGROUND_TYPE = 'video'; const COVER_MIN_HEIGHT = 50; const COVER_MAX_HEIGHT = 1000; const COVER_DEFAULT_HEIGHT = 300; function backgroundImageStyles(url) { return url ? { backgroundImage: `url(${url})` } : {}; } const shared_ALLOWED_MEDIA_TYPES = ['image', 'video']; function dimRatioToClass(ratio) { return ratio === 50 || !ratio === undefined ? null : 'has-background-dim-' + 10 * Math.round(ratio / 10); } function attributesFromMedia(setAttributes, dimRatio) { return media => { if (!media || !media.url) { setAttributes({ url: undefined, id: undefined }); return; } if (Object(external_wp_blob_["isBlobURL"])(media.url)) { media.type = Object(external_wp_blob_["getBlobTypeByURL"])(media.url); } let mediaType; // for media selections originated from a file upload. if (media.media_type) { if (media.media_type === IMAGE_BACKGROUND_TYPE) { mediaType = IMAGE_BACKGROUND_TYPE; } else { // only images and videos are accepted so if the media_type is not an image we can assume it is a video. // Videos contain the media type of 'file' in the object returned from the rest api. mediaType = VIDEO_BACKGROUND_TYPE; } } else { // for media selections originated from existing files in the media library. if (media.type !== IMAGE_BACKGROUND_TYPE && media.type !== VIDEO_BACKGROUND_TYPE) { return; } mediaType = media.type; } setAttributes({ dimRatio: dimRatio === 100 ? 50 : dimRatio, url: media.url, id: media.id, alt: media === null || media === void 0 ? void 0 : media.alt, backgroundType: mediaType, ...(mediaType === VIDEO_BACKGROUND_TYPE ? { focalPoint: undefined, hasParallax: undefined } : {}) }); }; } /** * Checks of the contentPosition is the center (default) position. * * @param {string} contentPosition The current content position. * @return {boolean} Whether the contentPosition is center. */ function isContentPositionCenter(contentPosition) { return !contentPosition || contentPosition === 'center center' || contentPosition === 'center'; } /** * Retrieves the className for the current contentPosition. * The default position (center) will not have a className. * * @param {string} contentPosition The current content position. * @return {string} The className assigned to the contentPosition. */ function getPositionClassName(contentPosition) { /* * Only render a className if the contentPosition is not center (the default). */ if (isContentPositionCenter(contentPosition)) return ''; return POSITION_CLASSNAMES[contentPosition]; } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/deprecated.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** * Original function to determine the background opacity classname * * Used in deprecations: v1-7. * * @param {number} ratio ratio to use for opacity. * @return {string} background opacity class . */ function dimRatioToClassV1(ratio) { return ratio === 0 || ratio === 50 || !ratio ? null : 'has-background-dim-' + 10 * Math.round(ratio / 10); } function migrateDimRatio(attributes) { return { ...attributes, dimRatio: !attributes.url ? 100 : attributes.dimRatio }; } const cover_deprecated_blockAttributes = { url: { type: 'string' }, id: { type: 'number' }, hasParallax: { type: 'boolean', default: false }, dimRatio: { type: 'number', default: 50 }, overlayColor: { type: 'string' }, customOverlayColor: { type: 'string' }, backgroundType: { type: 'string', default: 'image' }, focalPoint: { type: 'object' } }; const v7 = { attributes: { ...cover_deprecated_blockAttributes, isRepeated: { type: 'boolean', default: false }, minHeight: { type: 'number' }, minHeightUnit: { type: 'string' }, gradient: { type: 'string' }, customGradient: { type: 'string' }, contentPosition: { type: 'string' }, alt: { type: 'string', source: 'attribute', selector: 'img', attribute: 'alt', default: '' } }, supports: { anchor: true, align: true, html: false, spacing: { padding: true, __experimentalDefaultControls: { padding: true } }, color: { __experimentalDuotone: '> .wp-block-cover__image-background, > .wp-block-cover__video-background', text: false, background: false } }, save(_ref) { let { attributes } = _ref; const { backgroundType, gradient, contentPosition, customGradient, customOverlayColor, dimRatio, focalPoint, hasParallax, isRepeated, overlayColor, url, alt, id, minHeight: minHeightProp, minHeightUnit } = attributes; const overlayColorClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', overlayColor); const gradientClass = Object(external_wp_blockEditor_["__experimentalGetGradientClass"])(gradient); const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp; const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType; const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType; const isImgElement = !(hasParallax || isRepeated); const style = { ...(isImageBackground && !isImgElement ? backgroundImageStyles(url) : {}), backgroundColor: !overlayColorClass ? customOverlayColor : undefined, background: customGradient && !url ? customGradient : undefined, minHeight: minHeight || undefined }; const objectPosition = // prettier-ignore focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : undefined; const classes = classnames_default()(dimRatioToClassV1(dimRatio), overlayColorClass, { 'has-background-dim': dimRatio !== 0, 'has-parallax': hasParallax, 'is-repeated': isRepeated, 'has-background-gradient': gradient || customGradient, [gradientClass]: !url && gradientClass, 'has-custom-content-position': !isContentPositionCenter(contentPosition) }, getPositionClassName(contentPosition)); return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({ className: classes, style }), url && (gradient || customGradient) && dimRatio !== 0 && Object(external_wp_element_["createElement"])("span", { "aria-hidden": "true", className: classnames_default()('wp-block-cover__gradient-background', gradientClass), style: customGradient ? { background: customGradient } : undefined }), isImageBackground && isImgElement && url && Object(external_wp_element_["createElement"])("img", { className: classnames_default()('wp-block-cover__image-background', id ? `wp-image-${id}` : null), alt: alt, src: url, style: { objectPosition }, "data-object-fit": "cover", "data-object-position": objectPosition }), isVideoBackground && url && Object(external_wp_element_["createElement"])("video", { className: classnames_default()('wp-block-cover__video-background', 'intrinsic-ignore'), autoPlay: true, muted: true, loop: true, playsInline: true, src: url, style: { objectPosition }, "data-object-fit": "cover", "data-object-position": objectPosition }), Object(external_wp_element_["createElement"])("div", { className: "wp-block-cover__inner-container" }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null))); }, migrate: migrateDimRatio }; const v6 = { attributes: { ...cover_deprecated_blockAttributes, isRepeated: { type: 'boolean', default: false }, minHeight: { type: 'number' }, minHeightUnit: { type: 'string' }, gradient: { type: 'string' }, customGradient: { type: 'string' }, contentPosition: { type: 'string' } }, supports: { align: true }, save(_ref2) { let { attributes } = _ref2; const { backgroundType, gradient, contentPosition, customGradient, customOverlayColor, dimRatio, focalPoint, hasParallax, isRepeated, overlayColor, url, minHeight: minHeightProp, minHeightUnit } = attributes; const overlayColorClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', overlayColor); const gradientClass = Object(external_wp_blockEditor_["__experimentalGetGradientClass"])(gradient); const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp; const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType; const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType; const style = isImageBackground ? backgroundImageStyles(url) : {}; const videoStyle = {}; if (!overlayColorClass) { style.backgroundColor = customOverlayColor; } if (customGradient && !url) { style.background = customGradient; } style.minHeight = minHeight || undefined; let positionValue; if (focalPoint) { positionValue = `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%`; if (isImageBackground && !hasParallax) { style.backgroundPosition = positionValue; } if (isVideoBackground) { videoStyle.objectPosition = positionValue; } } const classes = classnames_default()(dimRatioToClassV1(dimRatio), overlayColorClass, { 'has-background-dim': dimRatio !== 0, 'has-parallax': hasParallax, 'is-repeated': isRepeated, 'has-background-gradient': gradient || customGradient, [gradientClass]: !url && gradientClass, 'has-custom-content-position': !isContentPositionCenter(contentPosition) }, getPositionClassName(contentPosition)); return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({ className: classes, style }), url && (gradient || customGradient) && dimRatio !== 0 && Object(external_wp_element_["createElement"])("span", { "aria-hidden": "true", className: classnames_default()('wp-block-cover__gradient-background', gradientClass), style: customGradient ? { background: customGradient } : undefined }), isVideoBackground && url && Object(external_wp_element_["createElement"])("video", { className: "wp-block-cover__video-background", autoPlay: true, muted: true, loop: true, playsInline: true, src: url, style: videoStyle }), Object(external_wp_element_["createElement"])("div", { className: "wp-block-cover__inner-container" }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null))); }, migrate: migrateDimRatio }; const v5 = { attributes: { ...cover_deprecated_blockAttributes, minHeight: { type: 'number' }, gradient: { type: 'string' }, customGradient: { type: 'string' } }, supports: { align: true }, save(_ref3) { let { attributes } = _ref3; const { backgroundType, gradient, customGradient, customOverlayColor, dimRatio, focalPoint, hasParallax, overlayColor, url, minHeight } = attributes; const overlayColorClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', overlayColor); const gradientClass = Object(external_wp_blockEditor_["__experimentalGetGradientClass"])(gradient); const style = backgroundType === IMAGE_BACKGROUND_TYPE ? backgroundImageStyles(url) : {}; if (!overlayColorClass) { style.backgroundColor = customOverlayColor; } if (focalPoint && !hasParallax) { style.backgroundPosition = `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%`; } if (customGradient && !url) { style.background = customGradient; } style.minHeight = minHeight || undefined; const classes = classnames_default()(dimRatioToClassV1(dimRatio), overlayColorClass, { 'has-background-dim': dimRatio !== 0, 'has-parallax': hasParallax, 'has-background-gradient': customGradient, [gradientClass]: !url && gradientClass }); return Object(external_wp_element_["createElement"])("div", { className: classes, style: style }, url && (gradient || customGradient) && dimRatio !== 0 && Object(external_wp_element_["createElement"])("span", { "aria-hidden": "true", className: classnames_default()('wp-block-cover__gradient-background', gradientClass), style: customGradient ? { background: customGradient } : undefined }), VIDEO_BACKGROUND_TYPE === backgroundType && url && Object(external_wp_element_["createElement"])("video", { className: "wp-block-cover__video-background", autoPlay: true, muted: true, loop: true, src: url }), Object(external_wp_element_["createElement"])("div", { className: "wp-block-cover__inner-container" }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null))); }, migrate: migrateDimRatio }; const v4 = { attributes: { ...cover_deprecated_blockAttributes, minHeight: { type: 'number' }, gradient: { type: 'string' }, customGradient: { type: 'string' } }, supports: { align: true }, save(_ref4) { let { attributes } = _ref4; const { backgroundType, gradient, customGradient, customOverlayColor, dimRatio, focalPoint, hasParallax, overlayColor, url, minHeight } = attributes; const overlayColorClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', overlayColor); const gradientClass = Object(external_wp_blockEditor_["__experimentalGetGradientClass"])(gradient); const style = backgroundType === IMAGE_BACKGROUND_TYPE ? backgroundImageStyles(url) : {}; if (!overlayColorClass) { style.backgroundColor = customOverlayColor; } if (focalPoint && !hasParallax) { style.backgroundPosition = `${focalPoint.x * 100}% ${focalPoint.y * 100}%`; } if (customGradient && !url) { style.background = customGradient; } style.minHeight = minHeight || undefined; const classes = classnames_default()(dimRatioToClassV1(dimRatio), overlayColorClass, { 'has-background-dim': dimRatio !== 0, 'has-parallax': hasParallax, 'has-background-gradient': customGradient, [gradientClass]: !url && gradientClass }); return Object(external_wp_element_["createElement"])("div", { className: classes, style: style }, url && (gradient || customGradient) && dimRatio !== 0 && Object(external_wp_element_["createElement"])("span", { "aria-hidden": "true", className: classnames_default()('wp-block-cover__gradient-background', gradientClass), style: customGradient ? { background: customGradient } : undefined }), VIDEO_BACKGROUND_TYPE === backgroundType && url && Object(external_wp_element_["createElement"])("video", { className: "wp-block-cover__video-background", autoPlay: true, muted: true, loop: true, src: url }), Object(external_wp_element_["createElement"])("div", { className: "wp-block-cover__inner-container" }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null))); }, migrate: migrateDimRatio }; const v3 = { attributes: { ...cover_deprecated_blockAttributes, title: { type: 'string', source: 'html', selector: 'p' }, contentAlign: { type: 'string', default: 'center' } }, supports: { align: true }, save(_ref5) { let { attributes } = _ref5; const { backgroundType, contentAlign, customOverlayColor, dimRatio, focalPoint, hasParallax, overlayColor, title, url } = attributes; const overlayColorClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', overlayColor); const style = backgroundType === IMAGE_BACKGROUND_TYPE ? backgroundImageStyles(url) : {}; if (!overlayColorClass) { style.backgroundColor = customOverlayColor; } if (focalPoint && !hasParallax) { style.backgroundPosition = `${focalPoint.x * 100}% ${focalPoint.y * 100}%`; } const classes = classnames_default()(dimRatioToClassV1(dimRatio), overlayColorClass, { 'has-background-dim': dimRatio !== 0, 'has-parallax': hasParallax, [`has-${contentAlign}-content`]: contentAlign !== 'center' }); return Object(external_wp_element_["createElement"])("div", { className: classes, style: style }, VIDEO_BACKGROUND_TYPE === backgroundType && url && Object(external_wp_element_["createElement"])("video", { className: "wp-block-cover__video-background", autoPlay: true, muted: true, loop: true, src: url }), !external_wp_blockEditor_["RichText"].isEmpty(title) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "p", className: "wp-block-cover-text", value: title })); }, migrate(attributes) { const newAttribs = { ...attributes, dimRatio: !attributes.url ? 100 : attributes.dimRatio }; return [Object(external_lodash_["omit"])(newAttribs, ['title', 'contentAlign']), [Object(external_wp_blocks_["createBlock"])('core/paragraph', { content: attributes.title, align: attributes.contentAlign, fontSize: 'large', placeholder: Object(external_wp_i18n_["__"])('Write title…') })]]; } }; const v2 = { attributes: { ...cover_deprecated_blockAttributes, title: { type: 'string', source: 'html', selector: 'p' }, contentAlign: { type: 'string', default: 'center' }, align: { type: 'string' } }, supports: { className: false }, save(_ref6) { let { attributes } = _ref6; const { url, title, hasParallax, dimRatio, align, contentAlign, overlayColor, customOverlayColor } = attributes; const overlayColorClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', overlayColor); const style = backgroundImageStyles(url); if (!overlayColorClass) { style.backgroundColor = customOverlayColor; } const classes = classnames_default()('wp-block-cover-image', dimRatioToClassV1(dimRatio), overlayColorClass, { 'has-background-dim': dimRatio !== 0, 'has-parallax': hasParallax, [`has-${contentAlign}-content`]: contentAlign !== 'center' }, align ? `align${align}` : null); return Object(external_wp_element_["createElement"])("div", { className: classes, style: style }, !external_wp_blockEditor_["RichText"].isEmpty(title) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "p", className: "wp-block-cover-image-text", value: title })); }, migrate(attributes) { const newAttribs = { ...attributes, dimRatio: !attributes.url ? 100 : attributes.dimRatio }; return [Object(external_lodash_["omit"])(newAttribs, ['title', 'contentAlign', 'align']), [Object(external_wp_blocks_["createBlock"])('core/paragraph', { content: attributes.title, align: attributes.contentAlign, fontSize: 'large', placeholder: Object(external_wp_i18n_["__"])('Write title…') })]]; } }; const v1 = { attributes: { ...cover_deprecated_blockAttributes, title: { type: 'string', source: 'html', selector: 'h2' }, align: { type: 'string' }, contentAlign: { type: 'string', default: 'center' } }, supports: { className: false }, save(_ref7) { let { attributes } = _ref7; const { url, title, hasParallax, dimRatio, align } = attributes; const style = backgroundImageStyles(url); const classes = classnames_default()('wp-block-cover-image', dimRatioToClassV1(dimRatio), { 'has-background-dim': dimRatio !== 0, 'has-parallax': hasParallax }, align ? `align${align}` : null); return Object(external_wp_element_["createElement"])("section", { className: classes, style: style }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "h2", value: title })); }, migrate(attributes) { const newAttribs = { ...attributes, dimRatio: !attributes.url ? 100 : attributes.dimRatio }; return [Object(external_lodash_["omit"])(newAttribs, ['title', 'contentAlign', 'align']), [Object(external_wp_blocks_["createBlock"])('core/paragraph', { content: attributes.title, align: attributes.contentAlign, fontSize: 'large', placeholder: Object(external_wp_i18n_["__"])('Write title…') })]]; } }; /* harmony default export */ var cover_deprecated = ([v7, v6, v5, v4, v3, v2, v1]); // EXTERNAL MODULE: ./node_modules/fast-average-color/dist/index.js var dist = __webpack_require__("FEKF"); var dist_default = /*#__PURE__*/__webpack_require__.n(dist); // EXTERNAL MODULE: ./node_modules/colord/index.mjs var colord = __webpack_require__("fHnH"); // EXTERNAL MODULE: ./node_modules/colord/plugins/names.mjs var names = __webpack_require__("abaT"); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/edit.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ Object(colord["b" /* extend */])([names["a" /* default */]]); const { __Visualizer: BoxControlVisualizer } = external_wp_components_["__experimentalBoxControl"]; function getInnerBlocksTemplate(attributes) { return [['core/paragraph', { align: 'center', placeholder: Object(external_wp_i18n_["__"])('Write title…'), ...attributes }]]; } function retrieveFastAverageColor() { if (!retrieveFastAverageColor.fastAverageColor) { retrieveFastAverageColor.fastAverageColor = new dist_default.a(); } return retrieveFastAverageColor.fastAverageColor; } function CoverHeightInput(_ref) { let { onChange, onUnitChange, unit = 'px', value = '' } = _ref; const [temporaryInput, setTemporaryInput] = Object(external_wp_element_["useState"])(null); const instanceId = Object(external_wp_compose_["useInstanceId"])(external_wp_blockEditor_["__experimentalUnitControl"]); const inputId = `block-cover-height-input-${instanceId}`; const isPx = unit === 'px'; const units = Object(external_wp_components_["__experimentalUseCustomUnits"])({ availableUnits: Object(external_wp_blockEditor_["useSetting"])('spacing.units') || ['px', 'em', 'rem', 'vw', 'vh'], defaultValues: { px: '430', em: '20', rem: '20', vw: '20', vh: '50' } }); const handleOnChange = unprocessedValue => { const inputValue = unprocessedValue !== '' ? parseFloat(unprocessedValue) : undefined; if (isNaN(inputValue) && inputValue !== undefined) { setTemporaryInput(unprocessedValue); return; } setTemporaryInput(null); onChange(inputValue); if (inputValue === undefined) { onUnitChange(); } }; const handleOnBlur = () => { if (temporaryInput !== null) { setTemporaryInput(null); } }; const inputValue = temporaryInput !== null ? temporaryInput : value; const min = isPx ? COVER_MIN_HEIGHT : 0; return Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"], { label: Object(external_wp_i18n_["__"])('Minimum height of cover'), id: inputId }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalUnitControl"], { id: inputId, isResetValueOnUnitChange: true, min: min, onBlur: handleOnBlur, onChange: handleOnChange, onUnitChange: onUnitChange, style: { maxWidth: 80 }, unit: unit, units: units, value: inputValue })); } const RESIZABLE_BOX_ENABLE_OPTION = { top: false, right: false, bottom: true, left: false, topRight: false, bottomRight: false, bottomLeft: false, topLeft: false }; function ResizableCover(_ref2) { let { className, onResizeStart, onResize, onResizeStop, ...props } = _ref2; const [isResizing, setIsResizing] = Object(external_wp_element_["useState"])(false); return Object(external_wp_element_["createElement"])(external_wp_components_["ResizableBox"], Object(esm_extends["a" /* default */])({ className: classnames_default()(className, { 'is-resizing': isResizing }), enable: RESIZABLE_BOX_ENABLE_OPTION, onResizeStart: (_event, _direction, elt) => { onResizeStart(elt.clientHeight); onResize(elt.clientHeight); }, onResize: (_event, _direction, elt) => { onResize(elt.clientHeight); if (!isResizing) { setIsResizing(true); } }, onResizeStop: (_event, _direction, elt) => { onResizeStop(elt.clientHeight); setIsResizing(false); } }, props)); } /** * useCoverIsDark is a hook that returns a boolean variable specifying if the cover * background is dark or not. * * @param {?string} url Url of the media background. * @param {?number} dimRatio Transparency of the overlay color. If an image and * color are set, dimRatio is used to decide what is used * for background darkness checking purposes. * @param {?string} overlayColor String containing the overlay color value if one exists. * @param {?Object} elementRef If a media background is set, elementRef should contain a reference to a * dom element that renders that media. * * @return {boolean} True if the cover background is considered "dark" and false otherwise. */ function useCoverIsDark(url) { let dimRatio = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 50; let overlayColor = arguments.length > 2 ? arguments[2] : undefined; let elementRef = arguments.length > 3 ? arguments[3] : undefined; const [isDark, setIsDark] = Object(external_wp_element_["useState"])(false); Object(external_wp_element_["useEffect"])(() => { // If opacity is lower than 50 the dominant color is the image or video color, // so use that color for the dark mode computation. if (url && dimRatio <= 50 && elementRef.current) { retrieveFastAverageColor().getColorAsync(elementRef.current, color => { setIsDark(color.isDark); }); } }, [url, url && dimRatio <= 50 && elementRef.current, setIsDark]); Object(external_wp_element_["useEffect"])(() => { // If opacity is greater than 50 the dominant color is the overlay color, // so use that color for the dark mode computation. if (dimRatio > 50 || !url) { if (!overlayColor) { // If no overlay color exists the overlay color is black (isDark ) setIsDark(true); return; } setIsDark(Object(colord["a" /* colord */])(overlayColor).isDark()); } }, [overlayColor, dimRatio > 50 || !url, setIsDark]); Object(external_wp_element_["useEffect"])(() => { if (!url && !overlayColor) { // Reset isDark setIsDark(false); } }, [!url && !overlayColor, setIsDark]); return isDark; } function edit_mediaPosition(_ref3) { let { x, y } = _ref3; return `${Math.round(x * 100)}% ${Math.round(y * 100)}%`; } /** * Is the URL a temporary blob URL? A blob URL is one that is used temporarily while * the media (image or video) is being uploaded and will not have an id allocated yet. * * @param {number} id The id of the media. * @param {string} url The url of the media. * * @return {boolean} Is the URL a Blob URL. */ const edit_isTemporaryMedia = (id, url) => !id && Object(external_wp_blob_["isBlobURL"])(url); function CoverPlaceholder(_ref4) { let { disableMediaButtons = false, children, noticeUI, noticeOperations, onSelectMedia, style } = _ref4; const { removeAllNotices, createErrorNotice } = noticeOperations; return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], { icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], { icon: library_cover }), labels: { title: Object(external_wp_i18n_["__"])('Cover'), instructions: Object(external_wp_i18n_["__"])('Drag and drop onto this block, upload, or select existing media from your library.') }, onSelect: onSelectMedia, accept: "image/*,video/*", allowedTypes: shared_ALLOWED_MEDIA_TYPES, notices: noticeUI, disableMediaButtons: disableMediaButtons, onError: message => { removeAllNotices(); createErrorNotice(message); }, style: style }, children); } function CoverEdit(_ref5) { var _useSetting, _styleAttribute$spaci, _styleAttribute$visua; let { attributes, clientId, isSelected, noticeUI, noticeOperations, overlayColor, setAttributes, setOverlayColor, toggleSelection, markNextChangeAsNotPersistent } = _ref5; const { contentPosition, id, backgroundType, dimRatio, focalPoint, hasParallax, isDark, isRepeated, minHeight, minHeightUnit, style: styleAttribute, url, alt, allowedBlocks, templateLock } = attributes; const { gradientClass, gradientValue, setGradient } = Object(external_wp_blockEditor_["__experimentalUseGradient"])(); const onSelectMedia = attributesFromMedia(setAttributes, dimRatio); const isUploadingMedia = edit_isTemporaryMedia(id, url); const [prevMinHeightValue, setPrevMinHeightValue] = Object(external_wp_element_["useState"])(minHeight); const [prevMinHeightUnit, setPrevMinHeightUnit] = Object(external_wp_element_["useState"])(minHeightUnit); const isMinFullHeight = minHeightUnit === 'vh' && minHeight === 100; const toggleMinFullHeight = () => { if (isMinFullHeight) { // If there aren't previous values, take the default ones. if (prevMinHeightUnit === 'vh' && prevMinHeightValue === 100) { return setAttributes({ minHeight: undefined, minHeightUnit: undefined }); } // Set the previous values of height. return setAttributes({ minHeight: prevMinHeightValue, minHeightUnit: prevMinHeightUnit }); } setPrevMinHeightValue(minHeight); setPrevMinHeightUnit(minHeightUnit); // Set full height. return setAttributes({ minHeight: 100, minHeightUnit: 'vh' }); }; const toggleParallax = () => { setAttributes({ hasParallax: !hasParallax, ...(!hasParallax ? { focalPoint: undefined } : {}) }); }; const toggleIsRepeated = () => { setAttributes({ isRepeated: !isRepeated }); }; const isDarkElement = Object(external_wp_element_["useRef"])(); const isCoverDark = useCoverIsDark(url, dimRatio, overlayColor.color, isDarkElement); Object(external_wp_element_["useEffect"])(() => { // This side-effect should not create an undo level. markNextChangeAsNotPersistent(); setAttributes({ isDark: isCoverDark }); }, [isCoverDark]); const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType; const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType; const [temporaryMinHeight, setTemporaryMinHeight] = Object(external_wp_element_["useState"])(null); const minHeightWithUnit = minHeightUnit ? `${minHeight}${minHeightUnit}` : minHeight; const isImgElement = !(hasParallax || isRepeated); const style = { ...(isImageBackground && !isImgElement ? backgroundImageStyles(url) : undefined), minHeight: temporaryMinHeight || minHeightWithUnit || undefined }; const bgStyle = { backgroundColor: overlayColor.color }; const mediaStyle = { objectPosition: focalPoint && isImgElement ? edit_mediaPosition(focalPoint) : undefined }; const hasBackground = !!(url || overlayColor.color || gradientValue); const showFocalPointPicker = isVideoBackground || isImageBackground && (!hasParallax || isRepeated); const imperativeFocalPointPreview = value => { const [styleOfRef, property] = isDarkElement.current ? [isDarkElement.current.style, 'objectPosition'] : [ref.current.style, 'backgroundPosition']; styleOfRef[property] = edit_mediaPosition(value); }; const hasInnerBlocks = Object(external_wp_data_["useSelect"])(select => select(external_wp_blockEditor_["store"]).getBlock(clientId).innerBlocks.length > 0, [clientId]); const controls = Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], { group: "block" }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalBlockAlignmentMatrixControl"], { label: Object(external_wp_i18n_["__"])('Change content position'), value: contentPosition, onChange: nextPosition => setAttributes({ contentPosition: nextPosition }), isDisabled: !hasInnerBlocks }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalBlockFullHeightAligmentControl"], { isActive: isMinFullHeight, onToggle: toggleMinFullHeight, isDisabled: !hasInnerBlocks })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], { group: "other" }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaReplaceFlow"], { mediaId: id, mediaURL: url, allowedTypes: shared_ALLOWED_MEDIA_TYPES, accept: "image/*,video/*", onSelect: onSelectMedia, name: !url ? Object(external_wp_i18n_["__"])('Add Media') : Object(external_wp_i18n_["__"])('Replace') })), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, !!url && Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Media settings') }, isImageBackground && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Fixed background'), checked: hasParallax, onChange: toggleParallax }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Repeated background'), checked: isRepeated, onChange: toggleIsRepeated })), showFocalPointPicker && Object(external_wp_element_["createElement"])(external_wp_components_["FocalPointPicker"], { label: Object(external_wp_i18n_["__"])('Focal point picker'), url: url, value: focalPoint, onDragStart: imperativeFocalPointPreview, onDrag: imperativeFocalPointPreview, onChange: newFocalPoint => setAttributes({ focalPoint: newFocalPoint }) }), url && isImageBackground && isImgElement && Object(external_wp_element_["createElement"])(external_wp_components_["TextareaControl"], { label: Object(external_wp_i18n_["__"])('Alt text (alternative text)'), value: alt, onChange: newAlt => setAttributes({ alt: newAlt }), help: Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ExternalLink"], { href: "https://www.w3.org/WAI/tutorials/images/decision-tree" }, Object(external_wp_i18n_["__"])('Describe the purpose of the image')), Object(external_wp_i18n_["__"])('Leave empty if the image is purely decorative.')) }), Object(external_wp_element_["createElement"])(external_wp_components_["PanelRow"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { variant: "secondary", isSmall: true, className: "block-library-cover__reset-button", onClick: () => setAttributes({ url: undefined, id: undefined, backgroundType: undefined, focalPoint: undefined, hasParallax: undefined, isRepeated: undefined }) }, Object(external_wp_i18n_["__"])('Clear Media')))), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["__experimentalPanelColorGradientSettings"], { __experimentalHasMultipleOrigins: true, title: Object(external_wp_i18n_["__"])('Overlay'), initialOpen: true, settings: [{ colorValue: overlayColor.color, gradientValue, onColorChange: setOverlayColor, onGradientChange: setGradient, label: Object(external_wp_i18n_["__"])('Color') }] }, Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], { label: Object(external_wp_i18n_["__"])('Opacity'), value: dimRatio, onChange: newDimRation => setAttributes({ dimRatio: newDimRation }), min: 0, max: 100, step: 10, required: true }))), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], { __experimentalGroup: "dimensions" }, Object(external_wp_element_["createElement"])(external_wp_components_["__experimentalToolsPanelItem"], { hasValue: () => !!minHeight, label: Object(external_wp_i18n_["__"])('Minimum height'), onDeselect: () => setAttributes({ minHeight: undefined, minHeightUnit: undefined }), resetAllFilter: () => ({ minHeight: undefined, minHeightUnit: undefined }), isShownByDefault: true, panelId: clientId }, Object(external_wp_element_["createElement"])(CoverHeightInput, { value: temporaryMinHeight || minHeight, unit: minHeightUnit, onChange: newMinHeight => setAttributes({ minHeight: newMinHeight }), onUnitChange: nextUnit => setAttributes({ minHeightUnit: nextUnit }) })))); const ref = Object(external_wp_element_["useRef"])(); const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({ ref }); // Check for fontSize support before we pass a fontSize attribute to the innerBlocks. const hasFontSizes = !!((_useSetting = Object(external_wp_blockEditor_["useSetting"])('typography.fontSizes')) !== null && _useSetting !== void 0 && _useSetting.length); const innerBlocksTemplate = getInnerBlocksTemplate({ fontSize: hasFontSizes ? 'large' : undefined }); const innerBlocksProps = Object(external_wp_blockEditor_["useInnerBlocksProps"])({ className: 'wp-block-cover__inner-container' }, { template: innerBlocksTemplate, templateInsertUpdatesSelection: true, allowedBlocks, templateLock }); if (!hasInnerBlocks && !hasBackground) { return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, controls, Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({}, blockProps, { className: classnames_default()('is-placeholder', blockProps.className) }), Object(external_wp_element_["createElement"])(CoverPlaceholder, { noticeUI: noticeUI, onSelectMedia: onSelectMedia, noticeOperations: noticeOperations, style: { minHeight: temporaryMinHeight || minHeightWithUnit || undefined } }, Object(external_wp_element_["createElement"])("div", { className: "wp-block-cover__placeholder-background-options" }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["ColorPalette"], { disableCustomColors: true, value: overlayColor.color, onChange: setOverlayColor, clearable: false }))), Object(external_wp_element_["createElement"])(ResizableCover, { className: "block-library-cover__resize-container", onResizeStart: () => { setAttributes({ minHeightUnit: 'px' }); toggleSelection(false); }, onResize: setTemporaryMinHeight, onResizeStop: newMinHeight => { toggleSelection(true); setAttributes({ minHeight: newMinHeight }); setTemporaryMinHeight(null); }, showHandle: isSelected }))); } const classes = classnames_default()({ 'is-dark-theme': isDark, 'is-light': !isDark, 'is-transient': isUploadingMedia, 'has-parallax': hasParallax, 'is-repeated': isRepeated, 'has-custom-content-position': !isContentPositionCenter(contentPosition) }, getPositionClassName(contentPosition)); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, controls, Object(external_wp_element_["createElement"])("div", Object(esm_extends["a" /* default */])({}, blockProps, { className: classnames_default()(classes, blockProps.className), style: { ...style, ...blockProps.style }, "data-url": url }), Object(external_wp_element_["createElement"])(BoxControlVisualizer, { values: styleAttribute === null || styleAttribute === void 0 ? void 0 : (_styleAttribute$spaci = styleAttribute.spacing) === null || _styleAttribute$spaci === void 0 ? void 0 : _styleAttribute$spaci.padding, showValues: styleAttribute === null || styleAttribute === void 0 ? void 0 : (_styleAttribute$visua = styleAttribute.visualizers) === null || _styleAttribute$visua === void 0 ? void 0 : _styleAttribute$visua.padding }), Object(external_wp_element_["createElement"])(ResizableCover, { className: "block-library-cover__resize-container", onResizeStart: () => { setAttributes({ minHeightUnit: 'px' }); toggleSelection(false); }, onResize: setTemporaryMinHeight, onResizeStop: newMinHeight => { toggleSelection(true); setAttributes({ minHeight: newMinHeight }); setTemporaryMinHeight(null); }, showHandle: isSelected }), Object(external_wp_element_["createElement"])("span", { "aria-hidden": "true", className: classnames_default()(dimRatioToClass(dimRatio), { [overlayColor.class]: overlayColor.class }, 'wp-block-cover__gradient-background', gradientClass, { 'has-background-dim': dimRatio !== undefined, 'has-background-gradient': gradientValue, [gradientClass]: !url && gradientClass }), style: { backgroundImage: gradientValue, ...bgStyle } }), url && isImageBackground && isImgElement && Object(external_wp_element_["createElement"])("img", { ref: isDarkElement, className: "wp-block-cover__image-background", alt: alt, src: url, style: mediaStyle }), url && isVideoBackground && Object(external_wp_element_["createElement"])("video", { ref: isDarkElement, className: "wp-block-cover__video-background", autoPlay: true, muted: true, loop: true, src: url, style: mediaStyle }), isUploadingMedia && Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null), Object(external_wp_element_["createElement"])(CoverPlaceholder, { disableMediaButtons: true, noticeUI: noticeUI, onSelectMedia: onSelectMedia, noticeOperations: noticeOperations }), Object(external_wp_element_["createElement"])("div", innerBlocksProps))); } /* harmony default export */ var cover_edit = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withDispatch"])(dispatch => { const { toggleSelection, __unstableMarkNextChangeAsNotPersistent } = dispatch(external_wp_blockEditor_["store"]); return { toggleSelection, markNextChangeAsNotPersistent: __unstableMarkNextChangeAsNotPersistent }; }), Object(external_wp_blockEditor_["withColors"])({ overlayColor: 'background-color' }), external_wp_components_["withNotices"], external_wp_compose_["withInstanceId"]])(CoverEdit)); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/save.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ function cover_save_save(_ref) { let { attributes } = _ref; const { backgroundType, gradient, contentPosition, customGradient, customOverlayColor, dimRatio, focalPoint, hasParallax, isDark, isRepeated, overlayColor, url, alt, id, minHeight: minHeightProp, minHeightUnit } = attributes; const overlayColorClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', overlayColor); const gradientClass = Object(external_wp_blockEditor_["__experimentalGetGradientClass"])(gradient); const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp; const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType; const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType; const isImgElement = !(hasParallax || isRepeated); const style = { ...(isImageBackground && !isImgElement ? backgroundImageStyles(url) : {}), minHeight: minHeight || undefined }; const bgStyle = { backgroundColor: !overlayColorClass ? customOverlayColor : undefined, background: customGradient ? customGradient : undefined }; const objectPosition = // prettier-ignore focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : undefined; const classes = classnames_default()({ 'is-light': !isDark, 'has-parallax': hasParallax, 'is-repeated': isRepeated, 'has-custom-content-position': !isContentPositionCenter(contentPosition) }, getPositionClassName(contentPosition)); return Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save({ className: classes, style }), Object(external_wp_element_["createElement"])("span", { "aria-hidden": "true", className: classnames_default()(overlayColorClass, dimRatioToClass(dimRatio), 'wp-block-cover__gradient-background', gradientClass, { 'has-background-dim': dimRatio !== undefined, 'has-background-gradient': gradient || customGradient, [gradientClass]: !url && gradientClass }), style: bgStyle }), isImageBackground && isImgElement && url && Object(external_wp_element_["createElement"])("img", { className: classnames_default()('wp-block-cover__image-background', id ? `wp-image-${id}` : null), alt: alt, src: url, style: { objectPosition }, "data-object-fit": "cover", "data-object-position": objectPosition }), isVideoBackground && url && Object(external_wp_element_["createElement"])("video", { className: classnames_default()('wp-block-cover__video-background', 'intrinsic-ignore'), autoPlay: true, muted: true, loop: true, playsInline: true, src: url, style: { objectPosition }, "data-object-fit": "cover", "data-object-position": objectPosition }), Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useInnerBlocksProps"].save({ className: 'wp-block-cover__inner-container' }))); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/transforms.js /** * WordPress dependencies */ /** * Internal dependencies */ const cover_transforms_transforms = { from: [{ type: 'block', blocks: ['core/image'], transform: _ref => { var _style$color; let { caption, url, alt, align, id, anchor, style } = _ref; return Object(external_wp_blocks_["createBlock"])('core/cover', { dimRatio: 50, url, alt, align, id, anchor, style: { color: { duotone: style === null || style === void 0 ? void 0 : (_style$color = style.color) === null || _style$color === void 0 ? void 0 : _style$color.duotone } } }, [Object(external_wp_blocks_["createBlock"])('core/paragraph', { content: caption, fontSize: 'large' })]); } }, { type: 'block', blocks: ['core/video'], transform: _ref2 => { let { caption, src, align, id, anchor } = _ref2; return Object(external_wp_blocks_["createBlock"])('core/cover', { dimRatio: 50, url: src, align, id, backgroundType: VIDEO_BACKGROUND_TYPE, anchor }, [Object(external_wp_blocks_["createBlock"])('core/paragraph', { content: caption, fontSize: 'large' })]); } }, { type: 'block', blocks: ['core/group'], isMatch: _ref3 => { var _style$color2, _style$color3; let { backgroundColor, gradient, style } = _ref3; /* * Make this transformation available only if the Group has background * or gradient set, because otherwise `Cover` block displays a Placeholder. * * This helps avoid arbitrary decisions about the Cover block's background * and user confusion about the existence of previous content. */ return backgroundColor || (style === null || style === void 0 ? void 0 : (_style$color2 = style.color) === null || _style$color2 === void 0 ? void 0 : _style$color2.background) || (style === null || style === void 0 ? void 0 : (_style$color3 = style.color) === null || _style$color3 === void 0 ? void 0 : _style$color3.gradient) || gradient; }, transform: (_ref4, innerBlocks) => { var _style$color4, _style$color5; let { align, anchor, backgroundColor, gradient, style } = _ref4; return Object(external_wp_blocks_["createBlock"])('core/cover', { align, anchor, overlayColor: backgroundColor, customOverlayColor: style === null || style === void 0 ? void 0 : (_style$color4 = style.color) === null || _style$color4 === void 0 ? void 0 : _style$color4.background, gradient, customGradient: style === null || style === void 0 ? void 0 : (_style$color5 = style.color) === null || _style$color5 === void 0 ? void 0 : _style$color5.gradient }, innerBlocks); } }], to: [{ type: 'block', blocks: ['core/image'], isMatch: _ref5 => { let { backgroundType, url, overlayColor, customOverlayColor, gradient, customGradient } = _ref5; if (url) { // If a url exists the transform could happen if that URL represents an image background. return backgroundType === IMAGE_BACKGROUND_TYPE; } // If a url is not set the transform could happen if the cover has no background color or gradient; return !overlayColor && !customOverlayColor && !gradient && !customGradient; }, transform: _ref6 => { var _style$color6; let { title, url, alt, align, id, anchor, style } = _ref6; return Object(external_wp_blocks_["createBlock"])('core/image', { caption: title, url, alt, align, id, anchor, style: { color: { duotone: style === null || style === void 0 ? void 0 : (_style$color6 = style.color) === null || _style$color6 === void 0 ? void 0 : _style$color6.duotone } } }); } }, { type: 'block', blocks: ['core/video'], isMatch: _ref7 => { let { backgroundType, url, overlayColor, customOverlayColor, gradient, customGradient } = _ref7; if (url) { // If a url exists the transform could happen if that URL represents a video background. return backgroundType === VIDEO_BACKGROUND_TYPE; } // If a url is not set the transform could happen if the cover has no background color or gradient; return !overlayColor && !customOverlayColor && !gradient && !customGradient; }, transform: _ref8 => { let { title, url, align, id, anchor } = _ref8; return Object(external_wp_blocks_["createBlock"])('core/video', { caption: title, src: url, id, align, anchor }); } }] }; /* harmony default export */ var cover_transforms = (cover_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/cover/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const cover_metadata = { apiVersion: 2, name: "core/cover", title: "Cover", category: "media", description: "Add an image or video with a text overlay \u2014 great for headers.", textdomain: "default", attributes: { url: { type: "string" }, id: { type: "number" }, alt: { type: "string", source: "attribute", selector: "img", attribute: "alt", "default": "" }, hasParallax: { type: "boolean", "default": false }, isRepeated: { type: "boolean", "default": false }, dimRatio: { type: "number", "default": 100 }, overlayColor: { type: "string" }, customOverlayColor: { type: "string" }, backgroundType: { type: "string", "default": "image" }, focalPoint: { type: "object" }, minHeight: { type: "number" }, minHeightUnit: { type: "string" }, gradient: { type: "string" }, customGradient: { type: "string" }, contentPosition: { type: "string" }, isDark: { type: "boolean", "default": true }, allowedBlocks: { type: "array" }, templateLock: { type: ["string", "boolean"], "enum": ["all", "insert", false] } }, supports: { anchor: true, align: true, html: false, spacing: { padding: true, __experimentalDefaultControls: { padding: true } }, color: { __experimentalDuotone: "> .wp-block-cover__image-background, > .wp-block-cover__video-background", text: false, background: false } }, editorStyle: "wp-block-cover-editor", style: "wp-block-cover" }; const { name: cover_name } = cover_metadata; const cover_settings = { icon: library_cover, example: { attributes: { customOverlayColor: '#065174', dimRatio: 40, url: 'https://s.w.org/images/core/5.3/Windbuchencom.jpg' }, innerBlocks: [{ name: 'core/paragraph', attributes: { customFontSize: 48, content: Object(external_wp_i18n_["__"])('Snow Patrol'), align: 'center' } }] }, transforms: cover_transforms, save: cover_save_save, edit: cover_edit, deprecated: cover_deprecated }; // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/edit.js + 1 modules var library_edit = __webpack_require__("B9Az"); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/embed-controls.js /** * WordPress dependencies */ function getResponsiveHelp(checked) { return checked ? Object(external_wp_i18n_["__"])('This embed will preserve its aspect ratio when the browser is resized.') : Object(external_wp_i18n_["__"])('This embed may not preserve its aspect ratio when the browser is resized.'); } const EmbedControls = _ref => { let { blockSupportsResponsive, showEditButton, themeSupportsResponsive, allowResponsive, toggleResponsive, switchBackToURLInput } = _ref; return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarGroup"], null, showEditButton && Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { className: "components-toolbar__control", label: Object(external_wp_i18n_["__"])('Edit URL'), icon: library_edit["a" /* default */], onClick: switchBackToURLInput }))), themeSupportsResponsive && blockSupportsResponsive && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Media settings'), className: "blocks-responsive" }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Resize for smaller devices'), checked: allowResponsive, help: getResponsiveHelp, onChange: toggleResponsive })))); }; /* harmony default export */ var embed_controls = (EmbedControls); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/icons.js /** * WordPress dependencies */ const embedContentIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zm-6-9.5L16 12l-2.5 2.8 1.1 1L18 12l-3.5-3.5-1 1zm-3 0l-1-1L6 12l3.5 3.8 1.1-1L8 12l2.5-2.5z" })); const embedAudioIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM13.2 7.7c-.4.4-.7 1.1-.7 1.9v3.7c-.4-.3-.8-.4-1.3-.4-1.2 0-2.2 1-2.2 2.2 0 1.2 1 2.2 2.2 2.2.5 0 1-.2 1.4-.5.9-.6 1.4-1.6 1.4-2.6V9.6c0-.4.1-.6.2-.8.3-.3 1-.3 1.6-.3h.2V7h-.2c-.7 0-1.8 0-2.6.7z" })); const embedPhotoIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9.2 4.5H19c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V9.8l4.6-5.3zm9.8 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z" })); const embedVideoIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM10 15l5-3-5-3v6z" })); const embedTwitterIcon = { foreground: '#1da1f2', src: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_components_["G"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M22.23 5.924c-.736.326-1.527.547-2.357.646.847-.508 1.498-1.312 1.804-2.27-.793.47-1.67.812-2.606.996C18.325 4.498 17.258 4 16.078 4c-2.266 0-4.103 1.837-4.103 4.103 0 .322.036.635.106.935-3.41-.17-6.433-1.804-8.457-4.287-.353.607-.556 1.312-.556 2.064 0 1.424.724 2.68 1.825 3.415-.673-.022-1.305-.207-1.86-.514v.052c0 1.988 1.415 3.647 3.293 4.023-.344.095-.707.145-1.08.145-.265 0-.522-.026-.773-.074.522 1.63 2.038 2.817 3.833 2.85-1.404 1.1-3.174 1.757-5.096 1.757-.332 0-.66-.02-.98-.057 1.816 1.164 3.973 1.843 6.29 1.843 7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.53.802-.578 1.497-1.3 2.047-2.124z" }))) }; const embedYouTubeIcon = { foreground: '#ff0000', src: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z" })) }; const embedFacebookIcon = { foreground: '#3b5998', src: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z" })) }; const embedInstagramIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_components_["G"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z" }))); const embedWordPressIcon = { foreground: '#0073AA', src: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_components_["G"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z" }))) }; const embedSpotifyIcon = { foreground: '#1db954', src: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325" })) }; const embedFlickrIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z" })); const embedVimeoIcon = { foreground: '#1ab7ea', src: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_components_["G"], null, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z" }))) }; const embedRedditIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M22 11.816c0-1.256-1.02-2.277-2.277-2.277-.593 0-1.122.24-1.526.613-1.48-.965-3.455-1.594-5.647-1.69l1.17-3.702 3.18.75c.01 1.027.847 1.86 1.877 1.86 1.035 0 1.877-.84 1.877-1.877 0-1.035-.842-1.877-1.877-1.877-.77 0-1.43.466-1.72 1.13L13.55 3.92c-.204-.047-.4.067-.46.26l-1.35 4.27c-2.317.037-4.412.67-5.97 1.67-.402-.355-.917-.58-1.493-.58C3.02 9.54 2 10.56 2 11.815c0 .814.433 1.523 1.078 1.925-.037.222-.06.445-.06.673 0 3.292 4.01 5.97 8.94 5.97s8.94-2.678 8.94-5.97c0-.214-.02-.424-.052-.632.687-.39 1.154-1.12 1.154-1.964zm-3.224-7.422c.606 0 1.1.493 1.1 1.1s-.493 1.1-1.1 1.1-1.1-.494-1.1-1.1.493-1.1 1.1-1.1zm-16 7.422c0-.827.673-1.5 1.5-1.5.313 0 .598.103.838.27-.85.675-1.477 1.478-1.812 2.36-.32-.274-.525-.676-.525-1.13zm9.183 7.79c-4.502 0-8.165-2.33-8.165-5.193S7.457 9.22 11.96 9.22s8.163 2.33 8.163 5.193-3.663 5.193-8.164 5.193zM20.635 13c-.326-.89-.948-1.7-1.797-2.383.247-.186.55-.3.882-.3.827 0 1.5.672 1.5 1.5 0 .482-.23.91-.586 1.184zm-11.64 1.704c-.76 0-1.397-.616-1.397-1.376 0-.76.636-1.397 1.396-1.397.76 0 1.376.638 1.376 1.398 0 .76-.616 1.376-1.376 1.376zm7.405-1.376c0 .76-.615 1.376-1.375 1.376s-1.4-.616-1.4-1.376c0-.76.64-1.397 1.4-1.397.76 0 1.376.638 1.376 1.398zm-1.17 3.38c.15.152.15.398 0 .55-.675.674-1.728 1.002-3.22 1.002l-.01-.002-.012.002c-1.492 0-2.544-.328-3.218-1.002-.152-.152-.152-.398 0-.55.152-.152.4-.15.55 0 .52.52 1.394.775 2.67.775l.01.002.01-.002c1.276 0 2.15-.253 2.67-.775.15-.152.398-.152.55 0z" })); const embedTumblrIcon = { foreground: '#35465c', src: Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M19 3H5a2 2 0 00-2 2v14c0 1.1.9 2 2 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm-5.69 14.66c-2.72 0-3.1-1.9-3.1-3.16v-3.56H8.49V8.99c1.7-.62 2.54-1.99 2.64-2.87 0-.06.06-.41.06-.58h1.9v3.1h2.17v2.3h-2.18v3.1c0 .47.13 1.3 1.2 1.26h1.1v2.36c-1.01.02-2.07 0-2.07 0z" })) }; const embedAmazonIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z" }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z" }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z" })); const embedAnimotoIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "m.0206909 21 19.8160091-13.07806 3.5831 6.20826z", fill: "#4bc7ee" }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "m23.7254 19.0205-10.1074-17.18468c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418h22.5655c1.279 0 1.8019-.8905 1.1599-1.9795z", fill: "#d4cdcb" }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "m.0206909 21 15.2439091-16.38571 4.3029 7.32271z", fill: "#c3d82e" }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "m13.618 1.83582c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418 15.2646-16.38573z", fill: "#e4ecb0" }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "m.0206909 21 19.5468091-9.063 1.6621 2.8344z", fill: "#209dbd" }), Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "m.0206909 21 17.9209091-11.82623 1.6259 2.76323z", fill: "#7cb3c9" })); const embedDailymotionIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { viewBox: "0 0 24 24" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "m12.1479 18.5957c-2.4949 0-4.28131-1.7558-4.28131-4.0658 0-2.2176 1.78641-4.0965 4.09651-4.0965 2.2793 0 4.0349 1.7864 4.0349 4.1581 0 2.2794-1.7556 4.0042-3.8501 4.0042zm8.3521-18.5957-4.5329 1v7c-1.1088-1.41691-2.8028-1.8787-4.8049-1.8787-2.09443 0-3.97329.76993-5.5133 2.27917-1.72483 1.66323-2.6489 3.78863-2.6489 6.16033 0 2.5873.98562 4.8049 2.89526 6.499 1.44763 1.2936 3.17251 1.9402 5.17454 1.9402 1.9713 0 3.4498-.5236 4.8973-1.9402v1.9402h4.5329c0-7.6359 0-15.3641 0-23z", fill: "#333436" })); const embedPinterestIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2" })); const embedWolframIcon = Object(external_wp_element_["createElement"])(external_wp_components_["SVG"], { viewBox: "0 0 44 44" }, Object(external_wp_element_["createElement"])(external_wp_components_["Path"], { d: "M32.59521,22.001l4.31885-4.84473-6.34131-1.38379.646-6.459-5.94336,2.61035L22,6.31934l-3.27344,5.60351L12.78418,9.3125l.645,6.458L7.08643,17.15234,11.40479,21.999,7.08594,26.84375l6.34131,1.38379-.64551,6.458,5.94287-2.60938L22,37.68066l3.27344-5.60351,5.94287,2.61035-.64551-6.458,6.34277-1.38183Zm.44385,2.75244L30.772,23.97827l-1.59558-2.07391,1.97888.735Zm-8.82147,6.1579L22.75,33.424V30.88977l1.52228-2.22168ZM18.56226,13.48816,19.819,15.09534l-2.49219-.88642L15.94037,12.337Zm6.87719.00116,2.62043-1.15027-1.38654,1.86981L24.183,15.0946Zm3.59357,2.6029-1.22546,1.7381.07525-2.73486,1.44507-1.94867ZM22,29.33008l-2.16406-3.15686L22,23.23688l2.16406,2.93634Zm-4.25458-9.582-.10528-3.836,3.60986,1.284v3.73242Zm5.00458-2.552,3.60986-1.284-.10528,3.836L22.75,20.92853Zm-7.78174-1.10559-.29352-2.94263,1.44245,1.94739.07519,2.73321Zm2.30982,5.08319,3.50817,1.18164-2.16247,2.9342-3.678-1.08447Zm2.4486,7.49285L21.25,30.88977v2.53485L19.78052,30.91Zm3.48707-6.31121,3.50817-1.18164,2.33228,3.03137-3.678,1.08447Zm10.87219-4.28113-2.714,3.04529L28.16418,19.928l1.92176-2.72565ZM24.06036,12.81769l-2.06012,2.6322-2.059-2.63318L22,9.292ZM9.91455,18.07227l4.00079-.87195,1.921,2.72735-3.20794,1.19019Zm2.93024,4.565,1.9801-.73462L13.228,23.97827l-2.26838.77429Zm-1.55591,3.58819L13.701,25.4021l2.64935.78058-2.14447.67853Zm3.64868,1.977L18.19,27.17334l.08313,3.46332L14.52979,32.2793Zm10.7876,2.43549.08447-3.464,3.25165,1.03052.407,4.07684Zm4.06824-3.77478-2.14545-.68,2.65063-.781,2.41266.825Z" })); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/embed-loading.js /** * WordPress dependencies */ const EmbedLoading = () => Object(external_wp_element_["createElement"])("div", { className: "wp-block-embed is-loading" }, Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null), Object(external_wp_element_["createElement"])("p", null, Object(external_wp_i18n_["__"])('Embedding…'))); /* harmony default export */ var embed_loading = (EmbedLoading); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/embed-placeholder.js /** * WordPress dependencies */ const EmbedPlaceholder = _ref => { let { icon, label, value, onSubmit, onChange, cannotEmbed, fallback, tryAgain } = _ref; return Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], { icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], { icon: icon, showColors: true }), label: label, className: "wp-block-embed", instructions: Object(external_wp_i18n_["__"])('Paste a link to the content you want to display on your site.') }, Object(external_wp_element_["createElement"])("form", { onSubmit: onSubmit }, Object(external_wp_element_["createElement"])("input", { type: "url", value: value || '', className: "components-placeholder__input", "aria-label": label, placeholder: Object(external_wp_i18n_["__"])('Enter URL to embed here…'), onChange: onChange }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { variant: "primary", type: "submit" }, Object(external_wp_i18n_["_x"])('Embed', 'button label'))), Object(external_wp_element_["createElement"])("div", { className: "components-placeholder__learn-more" }, Object(external_wp_element_["createElement"])(external_wp_components_["ExternalLink"], { href: Object(external_wp_i18n_["__"])('https://wordpress.org/support/article/embeds/') }, Object(external_wp_i18n_["__"])('Learn more about embeds'))), cannotEmbed && Object(external_wp_element_["createElement"])("div", { className: "components-placeholder__error" }, Object(external_wp_element_["createElement"])("div", { className: "components-placeholder__instructions" }, Object(external_wp_i18n_["__"])('Sorry, this content could not be embedded.')), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { variant: "secondary", onClick: tryAgain }, Object(external_wp_i18n_["_x"])('Try again', 'button label')), ' ', Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { variant: "secondary", onClick: fallback }, Object(external_wp_i18n_["_x"])('Convert to link', 'button label')))); }; /* harmony default export */ var embed_placeholder = (EmbedPlaceholder); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/wp-embed-preview.js /** * WordPress dependencies */ /** @typedef {import('@wordpress/element').WPSyntheticEvent} WPSyntheticEvent */ const attributeMap = { class: 'className', frameborder: 'frameBorder', marginheight: 'marginHeight', marginwidth: 'marginWidth' }; function WpEmbedPreview(_ref) { let { html } = _ref; const ref = Object(external_wp_element_["useRef"])(); const props = Object(external_wp_element_["useMemo"])(() => { const doc = new window.DOMParser().parseFromString(html, 'text/html'); const iframe = doc.querySelector('iframe'); const iframeProps = {}; if (!iframe) return iframeProps; Array.from(iframe.attributes).forEach(_ref2 => { let { name, value } = _ref2; if (name === 'style') return; iframeProps[attributeMap[name] || name] = value; }); return iframeProps; }, [html]); Object(external_wp_element_["useEffect"])(() => { const { ownerDocument } = ref.current; const { defaultView } = ownerDocument; /** * Checks for WordPress embed events signaling the height change when * iframe content loads or iframe's window is resized. The event is * sent from WordPress core via the window.postMessage API. * * References: * window.postMessage: * https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage * WordPress core embed-template on load: * https://github.com/WordPress/WordPress/blob/HEAD/wp-includes/js/wp-embed-template.js#L143 * WordPress core embed-template on resize: * https://github.com/WordPress/WordPress/blob/HEAD/wp-includes/js/wp-embed-template.js#L187 * * @param {MessageEvent} event Message event. */ function resizeWPembeds(_ref3) { let { data: { secret, message, value } = {} } = _ref3; if (message !== 'height' || secret !== props['data-secret']) { return; } ref.current.height = value; } defaultView.addEventListener('message', resizeWPembeds); return () => { defaultView.removeEventListener('message', resizeWPembeds); }; }, []); return Object(external_wp_element_["createElement"])("div", { className: "wp-block-embed__wrapper" }, Object(external_wp_element_["createElement"])("iframe", Object(esm_extends["a" /* default */])({ ref: Object(external_wp_compose_["useMergeRefs"])([ref, Object(external_wp_compose_["useFocusableIframe"])()]), title: props.title }, props))); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/embed-preview.js /** * Internal dependencies */ /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ class embed_preview_EmbedPreview extends external_wp_element_["Component"] { constructor() { super(...arguments); this.hideOverlay = this.hideOverlay.bind(this); this.state = { interactive: false }; } static getDerivedStateFromProps(nextProps, state) { if (!nextProps.isSelected && state.interactive) { // We only want to change this when the block is not selected, because changing it when // the block becomes selected makes the overlap disappear too early. Hiding the overlay // happens on mouseup when the overlay is clicked. return { interactive: false }; } return null; } hideOverlay() { // This is called onMouseUp on the overlay. We can't respond to the `isSelected` prop // changing, because that happens on mouse down, and the overlay immediately disappears, // and the mouse event can end up in the preview content. We can't use onClick on // the overlay to hide it either, because then the editor misses the mouseup event, and // thinks we're multi-selecting blocks. this.setState({ interactive: true }); } render() { const { preview, previewable, url, type, caption, onCaptionChange, isSelected, className, icon, label, insertBlocksAfter } = this.props; const { scripts } = preview; const { interactive } = this.state; const html = 'photo' === type ? getPhotoHtml(preview) : preview.html; const parsedHost = new URL(url).host.split('.'); const parsedHostBaseUrl = parsedHost.splice(parsedHost.length - 2, parsedHost.length - 1).join('.'); const iframeTitle = Object(external_wp_i18n_["sprintf"])( // translators: %s: host providing embed content e.g: www.youtube.com Object(external_wp_i18n_["__"])('Embedded content from %s'), parsedHostBaseUrl); const sandboxClassnames = dedupe_default()(type, className, 'wp-block-embed__wrapper'); // Disabled because the overlay div doesn't actually have a role or functionality // as far as the user is concerned. We're just catching the first click so that // the block can be selected without interacting with the embed preview that the overlay covers. /* eslint-disable jsx-a11y/no-static-element-interactions */ const embedWrapper = 'wp-embed' === type ? Object(external_wp_element_["createElement"])(WpEmbedPreview, { html: html }) : Object(external_wp_element_["createElement"])("div", { className: "wp-block-embed__wrapper" }, Object(external_wp_element_["createElement"])(external_wp_components_["SandBox"], { html: html, scripts: scripts, title: iframeTitle, type: sandboxClassnames, onFocus: this.hideOverlay }), !interactive && Object(external_wp_element_["createElement"])("div", { className: "block-library-embed__interactive-overlay", onMouseUp: this.hideOverlay })); /* eslint-enable jsx-a11y/no-static-element-interactions */ return Object(external_wp_element_["createElement"])("figure", { className: dedupe_default()(className, 'wp-block-embed', { 'is-type-video': 'video' === type }) }, previewable ? embedWrapper : Object(external_wp_element_["createElement"])(external_wp_components_["Placeholder"], { icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], { icon: icon, showColors: true }), label: label }, Object(external_wp_element_["createElement"])("p", { className: "components-placeholder__error" }, Object(external_wp_element_["createElement"])("a", { href: url }, url)), Object(external_wp_element_["createElement"])("p", { className: "components-placeholder__error" }, Object(external_wp_i18n_["sprintf"])( /* translators: %s: host providing embed content e.g: www.youtube.com */ Object(external_wp_i18n_["__"])("Embedded content from %s can't be previewed in the editor."), parsedHostBaseUrl))), (!external_wp_blockEditor_["RichText"].isEmpty(caption) || isSelected) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { tagName: "figcaption", placeholder: Object(external_wp_i18n_["__"])('Add caption'), value: caption, onChange: onCaptionChange, inlineToolbar: true, __unstableOnSplitAtEnd: () => insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph')) })); } } /* harmony default export */ var embed_preview = (embed_preview_EmbedPreview); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/edit.js /** * Internal dependencies */ /** * External dependencies */ /** * WordPress dependencies */ const EmbedEdit = props => { const { attributes: { providerNameSlug, previewable, responsive, url: attributesUrl }, attributes, isSelected, onReplace, setAttributes, insertBlocksAfter, onFocus } = props; const defaultEmbedInfo = { title: Object(external_wp_i18n_["_x"])('Embed', 'block title'), icon: embedContentIcon }; const { icon, title } = getEmbedInfoByProvider(providerNameSlug) || defaultEmbedInfo; const [url, setURL] = Object(external_wp_element_["useState"])(attributesUrl); const [isEditingURL, setIsEditingURL] = Object(external_wp_element_["useState"])(false); const { invalidateResolution } = Object(external_wp_data_["useDispatch"])(external_wp_coreData_["store"]); const { preview, fetching, themeSupportsResponsive, cannotEmbed } = Object(external_wp_data_["useSelect"])(select => { var _embedPreview$data; const { getEmbedPreview, isPreviewEmbedFallback, isRequestingEmbedPreview, getThemeSupports } = select(external_wp_coreData_["store"]); if (!attributesUrl) { return { fetching: false, cannotEmbed: false }; } const embedPreview = getEmbedPreview(attributesUrl); const previewIsFallback = isPreviewEmbedFallback(attributesUrl); // The external oEmbed provider does not exist. We got no type info and no html. const badEmbedProvider = (embedPreview === null || embedPreview === void 0 ? void 0 : embedPreview.html) === false && (embedPreview === null || embedPreview === void 0 ? void 0 : embedPreview.type) === undefined; // Some WordPress URLs that can't be embedded will cause the API to return // a valid JSON response with no HTML and `data.status` set to 404, rather // than generating a fallback response as other embeds do. const wordpressCantEmbed = (embedPreview === null || embedPreview === void 0 ? void 0 : (_embedPreview$data = embedPreview.data) === null || _embedPreview$data === void 0 ? void 0 : _embedPreview$data.status) === 404; const validPreview = !!embedPreview && !badEmbedProvider && !wordpressCantEmbed; return { preview: validPreview ? embedPreview : undefined, fetching: isRequestingEmbedPreview(attributesUrl), themeSupportsResponsive: getThemeSupports()['responsive-embeds'], cannotEmbed: !validPreview || previewIsFallback }; }, [attributesUrl]); /** * @return {Object} Attributes derived from the preview, merged with the current attributes. */ const getMergedAttributes = () => { const { allowResponsive, className } = attributes; return { ...attributes, ...getAttributesFromPreview(preview, title, className, responsive, allowResponsive) }; }; const toggleResponsive = () => { const { allowResponsive, className } = attributes; const { html } = preview; const newAllowResponsive = !allowResponsive; setAttributes({ allowResponsive: newAllowResponsive, className: getClassNames(html, className, responsive && newAllowResponsive) }); }; Object(external_wp_element_["useEffect"])(() => { if (!(preview !== null && preview !== void 0 && preview.html) || !cannotEmbed || fetching) { return; } // At this stage, we're not fetching the preview and know it can't be embedded, // so try removing any trailing slash, and resubmit. const newURL = attributesUrl.replace(/\/$/, ''); setURL(newURL); setIsEditingURL(false); setAttributes({ url: newURL }); }, [preview === null || preview === void 0 ? void 0 : preview.html, attributesUrl]); // Handle incoming preview Object(external_wp_element_["useEffect"])(() => { if (preview && !isEditingURL) { // Even though we set attributes that get derived from the preview, // we don't access them directly because for the initial render, // the `setAttributes` call will not have taken effect. If we're // rendering responsive content, setting the responsive classes // after the preview has been rendered can result in unwanted // clipping or scrollbars. The `getAttributesFromPreview` function // that `getMergedAttributes` uses is memoized so that we're not // calculating them on every render. setAttributes(getMergedAttributes()); if (onReplace) { const upgradedBlock = createUpgradedEmbedBlock(props, getMergedAttributes()); if (upgradedBlock) { onReplace(upgradedBlock); } } } }, [preview, isEditingURL]); const blockProps = Object(external_wp_blockEditor_["useBlockProps"])(); if (fetching) { return Object(external_wp_element_["createElement"])(external_wp_primitives_["View"], blockProps, Object(external_wp_element_["createElement"])(embed_loading, null)); } // translators: %s: type of embed e.g: "YouTube", "Twitter", etc. "Embed" is used when no specific type exists const label = Object(external_wp_i18n_["sprintf"])(Object(external_wp_i18n_["__"])('%s URL'), title); // No preview, or we can't embed the current URL, or we've clicked the edit button. const showEmbedPlaceholder = !preview || cannotEmbed || isEditingURL; if (showEmbedPlaceholder) { return Object(external_wp_element_["createElement"])(external_wp_primitives_["View"], blockProps, Object(external_wp_element_["createElement"])(embed_placeholder, { icon: icon, label: label, onFocus: onFocus, onSubmit: event => { if (event) { event.preventDefault(); } setIsEditingURL(false); setAttributes({ url }); }, value: url, cannotEmbed: cannotEmbed, onChange: event => setURL(event.target.value), fallback: () => util_fallback(url, onReplace), tryAgain: () => { invalidateResolution('getEmbedPreview', [url]); } })); } // Even though we set attributes that get derived from the preview, // we don't access them directly because for the initial render, // the `setAttributes` call will not have taken effect. If we're // rendering responsive content, setting the responsive classes // after the preview has been rendered can result in unwanted // clipping or scrollbars. The `getAttributesFromPreview` function // that `getMergedAttributes` uses is memoized so that we're not // calculating them on every render. const { caption, type, allowResponsive, className: classFromPreview } = getMergedAttributes(); const className = classnames_default()(classFromPreview, props.className); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(embed_controls, { showEditButton: preview && !cannotEmbed, themeSupportsResponsive: themeSupportsResponsive, blockSupportsResponsive: responsive, allowResponsive: allowResponsive, toggleResponsive: toggleResponsive, switchBackToURLInput: () => setIsEditingURL(true) }), Object(external_wp_element_["createElement"])(external_wp_primitives_["View"], blockProps, Object(external_wp_element_["createElement"])(embed_preview, { preview: preview, previewable: previewable, className: className, url: url, type: type, caption: caption, onCaptionChange: value => setAttributes({ caption: value }), isSelected: isSelected, icon: icon, label: label, insertBlocksAfter: insertBlocksAfter }))); }; /* harmony default export */ var embed_edit = (EmbedEdit); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/save.js /** * External dependencies */ /** * WordPress dependencies */ function embed_save_save(_ref) { let { attributes } = _ref; const { url, caption, type, providerNameSlug } = attributes; if (!url) { return null; } const className = dedupe_default()('wp-block-embed', { [`is-type-${type}`]: type, [`is-provider-${providerNameSlug}`]: providerNameSlug, [`wp-block-embed-${providerNameSlug}`]: providerNameSlug }); return Object(external_wp_element_["createElement"])("figure", external_wp_blockEditor_["useBlockProps"].save({ className }), Object(external_wp_element_["createElement"])("div", { className: "wp-block-embed__wrapper" }, `\n${url}\n` /* URL needs to be on its own line. */ ), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", value: caption })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/transforms.js /** * WordPress dependencies */ /** * Internal dependencies */ const transforms_metadata = { apiVersion: 2, name: "core/embed", title: "Embed", category: "embed", description: "Add a block that displays content pulled from other sites, like Twitter or YouTube.", textdomain: "default", attributes: { url: { type: "string" }, caption: { type: "string", source: "html", selector: "figcaption" }, type: { type: "string" }, providerNameSlug: { type: "string" }, allowResponsive: { type: "boolean", "default": true }, responsive: { type: "boolean", "default": false }, previewable: { type: "boolean", "default": true } }, supports: { align: true }, editorStyle: "wp-block-embed-editor", style: "wp-block-embed" }; const { name: EMBED_BLOCK } = transforms_metadata; /** * Default transforms for generic embeds. */ const embed_transforms_transforms = { from: [{ type: 'raw', isMatch: node => { var _node$textContent, _node$textContent$mat; return node.nodeName === 'P' && /^\s*(https?:\/\/\S+)\s*$/i.test(node.textContent) && ((_node$textContent = node.textContent) === null || _node$textContent === void 0 ? void 0 : (_node$textContent$mat = _node$textContent.match(/https/gi)) === null || _node$textContent$mat === void 0 ? void 0 : _node$textContent$mat.length) === 1; }, transform: node => { return Object(external_wp_blocks_["createBlock"])(EMBED_BLOCK, { url: node.textContent.trim() }); } }], to: [{ type: 'block', blocks: ['core/paragraph'], isMatch: _ref => { let { url } = _ref; return !!url; }, transform: _ref2 => { let { url, caption } = _ref2; let value = `${url}`; if (caption !== null && caption !== void 0 && caption.trim()) { value += `
${caption}`; } return Object(external_wp_blocks_["createBlock"])('core/paragraph', { content: value }); } }] }; /* harmony default export */ var embed_transforms = (embed_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/variations.js /** * WordPress dependencies */ /** * Internal dependencies */ /** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */ /** * Template option choices for predefined columns layouts. * * @type {WPBlockVariation[]} */ const embed_variations_variations = [{ name: 'twitter', title: 'Twitter', icon: embedTwitterIcon, keywords: ['tweet', Object(external_wp_i18n_["__"])('social')], description: Object(external_wp_i18n_["__"])('Embed a tweet.'), patterns: [/^https?:\/\/(www\.)?twitter\.com\/.+/i], attributes: { providerNameSlug: 'twitter', responsive: true } }, { name: 'youtube', title: 'YouTube', icon: embedYouTubeIcon, keywords: [Object(external_wp_i18n_["__"])('music'), Object(external_wp_i18n_["__"])('video')], description: Object(external_wp_i18n_["__"])('Embed a YouTube video.'), patterns: [/^https?:\/\/((m|www)\.)?youtube\.com\/.+/i, /^https?:\/\/youtu\.be\/.+/i], attributes: { providerNameSlug: 'youtube', responsive: true } }, { // Deprecate Facebook Embed per FB policy // See: https://developers.facebook.com/docs/plugins/oembed-legacy name: 'facebook', title: 'Facebook', icon: embedFacebookIcon, keywords: [Object(external_wp_i18n_["__"])('social')], description: Object(external_wp_i18n_["__"])('Embed a Facebook post.'), scope: ['block'], patterns: [], attributes: { providerNameSlug: 'facebook', previewable: false, responsive: true } }, { // Deprecate Instagram per FB policy // See: https://developers.facebook.com/docs/instagram/oembed-legacy name: 'instagram', title: 'Instagram', icon: embedInstagramIcon, keywords: [Object(external_wp_i18n_["__"])('image'), Object(external_wp_i18n_["__"])('social')], description: Object(external_wp_i18n_["__"])('Embed an Instagram post.'), scope: ['block'], patterns: [], attributes: { providerNameSlug: 'instagram', responsive: true } }, { name: 'wordpress', title: 'WordPress', icon: embedWordPressIcon, keywords: [Object(external_wp_i18n_["__"])('post'), Object(external_wp_i18n_["__"])('blog')], description: Object(external_wp_i18n_["__"])('Embed a WordPress post.'), attributes: { providerNameSlug: 'wordpress' } }, { name: 'soundcloud', title: 'SoundCloud', icon: embedAudioIcon, keywords: [Object(external_wp_i18n_["__"])('music'), Object(external_wp_i18n_["__"])('audio')], description: Object(external_wp_i18n_["__"])('Embed SoundCloud content.'), patterns: [/^https?:\/\/(www\.)?soundcloud\.com\/.+/i], attributes: { providerNameSlug: 'soundcloud', responsive: true } }, { name: 'spotify', title: 'Spotify', icon: embedSpotifyIcon, keywords: [Object(external_wp_i18n_["__"])('music'), Object(external_wp_i18n_["__"])('audio')], description: Object(external_wp_i18n_["__"])('Embed Spotify content.'), patterns: [/^https?:\/\/(open|play)\.spotify\.com\/.+/i], attributes: { providerNameSlug: 'spotify', responsive: true } }, { name: 'flickr', title: 'Flickr', icon: embedFlickrIcon, keywords: [Object(external_wp_i18n_["__"])('image')], description: Object(external_wp_i18n_["__"])('Embed Flickr content.'), patterns: [/^https?:\/\/(www\.)?flickr\.com\/.+/i, /^https?:\/\/flic\.kr\/.+/i], attributes: { providerNameSlug: 'flickr', responsive: true } }, { name: 'vimeo', title: 'Vimeo', icon: embedVimeoIcon, keywords: [Object(external_wp_i18n_["__"])('video')], description: Object(external_wp_i18n_["__"])('Embed a Vimeo video.'), patterns: [/^https?:\/\/(www\.)?vimeo\.com\/.+/i], attributes: { providerNameSlug: 'vimeo', responsive: true } }, { name: 'animoto', title: 'Animoto', icon: embedAnimotoIcon, description: Object(external_wp_i18n_["__"])('Embed an Animoto video.'), patterns: [/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i], attributes: { providerNameSlug: 'animoto', responsive: true } }, { name: 'cloudup', title: 'Cloudup', icon: embedContentIcon, description: Object(external_wp_i18n_["__"])('Embed Cloudup content.'), patterns: [/^https?:\/\/cloudup\.com\/.+/i], attributes: { providerNameSlug: 'cloudup', responsive: true } }, { // Deprecated since CollegeHumor content is now powered by YouTube name: 'collegehumor', title: 'CollegeHumor', icon: embedVideoIcon, description: Object(external_wp_i18n_["__"])('Embed CollegeHumor content.'), scope: ['block'], patterns: [], attributes: { providerNameSlug: 'collegehumor', responsive: true } }, { name: 'crowdsignal', title: 'Crowdsignal', icon: embedContentIcon, keywords: ['polldaddy', Object(external_wp_i18n_["__"])('survey')], description: Object(external_wp_i18n_["__"])('Embed Crowdsignal (formerly Polldaddy) content.'), patterns: [/^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.survey\.fm)\/.+/i], attributes: { providerNameSlug: 'crowdsignal', responsive: true } }, { name: 'dailymotion', title: 'Dailymotion', icon: embedDailymotionIcon, keywords: [Object(external_wp_i18n_["__"])('video')], description: Object(external_wp_i18n_["__"])('Embed a Dailymotion video.'), patterns: [/^https?:\/\/(www\.)?dailymotion\.com\/.+/i], attributes: { providerNameSlug: 'dailymotion', responsive: true } }, { name: 'imgur', title: 'Imgur', icon: embedPhotoIcon, description: Object(external_wp_i18n_["__"])('Embed Imgur content.'), patterns: [/^https?:\/\/(.+\.)?imgur\.com\/.+/i], attributes: { providerNameSlug: 'imgur', responsive: true } }, { name: 'issuu', title: 'Issuu', icon: embedContentIcon, description: Object(external_wp_i18n_["__"])('Embed Issuu content.'), patterns: [/^https?:\/\/(www\.)?issuu\.com\/.+/i], attributes: { providerNameSlug: 'issuu', responsive: true } }, { name: 'kickstarter', title: 'Kickstarter', icon: embedContentIcon, description: Object(external_wp_i18n_["__"])('Embed Kickstarter content.'), patterns: [/^https?:\/\/(www\.)?kickstarter\.com\/.+/i, /^https?:\/\/kck\.st\/.+/i], attributes: { providerNameSlug: 'kickstarter', responsive: true } }, { name: 'mixcloud', title: 'Mixcloud', icon: embedAudioIcon, keywords: [Object(external_wp_i18n_["__"])('music'), Object(external_wp_i18n_["__"])('audio')], description: Object(external_wp_i18n_["__"])('Embed Mixcloud content.'), patterns: [/^https?:\/\/(www\.)?mixcloud\.com\/.+/i], attributes: { providerNameSlug: 'mixcloud', responsive: true } }, { name: 'reddit', title: 'Reddit', icon: embedRedditIcon, description: Object(external_wp_i18n_["__"])('Embed a Reddit thread.'), patterns: [/^https?:\/\/(www\.)?reddit\.com\/.+/i], attributes: { providerNameSlug: 'reddit', responsive: true } }, { name: 'reverbnation', title: 'ReverbNation', icon: embedAudioIcon, description: Object(external_wp_i18n_["__"])('Embed ReverbNation content.'), patterns: [/^https?:\/\/(www\.)?reverbnation\.com\/.+/i], attributes: { providerNameSlug: 'reverbnation', responsive: true } }, { name: 'screencast', title: 'Screencast', icon: embedVideoIcon, description: Object(external_wp_i18n_["__"])('Embed Screencast content.'), patterns: [/^https?:\/\/(www\.)?screencast\.com\/.+/i], attributes: { providerNameSlug: 'screencast', responsive: true } }, { name: 'scribd', title: 'Scribd', icon: embedContentIcon, description: Object(external_wp_i18n_["__"])('Embed Scribd content.'), patterns: [/^https?:\/\/(www\.)?scribd\.com\/.+/i], attributes: { providerNameSlug: 'scribd', responsive: true } }, { name: 'slideshare', title: 'Slideshare', icon: embedContentIcon, description: Object(external_wp_i18n_["__"])('Embed Slideshare content.'), patterns: [/^https?:\/\/(.+?\.)?slideshare\.net\/.+/i], attributes: { providerNameSlug: 'slideshare', responsive: true } }, { name: 'smugmug', title: 'SmugMug', icon: embedPhotoIcon, description: Object(external_wp_i18n_["__"])('Embed SmugMug content.'), patterns: [/^https?:\/\/(.+\.)?smugmug\.com\/.*/i], attributes: { providerNameSlug: 'smugmug', previewable: false, responsive: true } }, { name: 'speaker-deck', title: 'Speaker Deck', icon: embedContentIcon, description: Object(external_wp_i18n_["__"])('Embed Speaker Deck content.'), patterns: [/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i], attributes: { providerNameSlug: 'speaker-deck', responsive: true } }, { name: 'tiktok', title: 'TikTok', icon: embedVideoIcon, keywords: [Object(external_wp_i18n_["__"])('video')], description: Object(external_wp_i18n_["__"])('Embed a TikTok video.'), patterns: [/^https?:\/\/(www\.)?tiktok\.com\/.+/i], attributes: { providerNameSlug: 'tiktok', responsive: true } }, { name: 'ted', title: 'TED', icon: embedVideoIcon, description: Object(external_wp_i18n_["__"])('Embed a TED video.'), patterns: [/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i], attributes: { providerNameSlug: 'ted', responsive: true } }, { name: 'tumblr', title: 'Tumblr', icon: embedTumblrIcon, keywords: [Object(external_wp_i18n_["__"])('social')], description: Object(external_wp_i18n_["__"])('Embed a Tumblr post.'), patterns: [/^https?:\/\/(www\.)?tumblr\.com\/.+/i], attributes: { providerNameSlug: 'tumblr', responsive: true } }, { name: 'videopress', title: 'VideoPress', icon: embedVideoIcon, keywords: [Object(external_wp_i18n_["__"])('video')], description: Object(external_wp_i18n_["__"])('Embed a VideoPress video.'), patterns: [/^https?:\/\/videopress\.com\/.+/i], attributes: { providerNameSlug: 'videopress', responsive: true } }, { name: 'wordpress-tv', title: 'WordPress.tv', icon: embedVideoIcon, description: Object(external_wp_i18n_["__"])('Embed a WordPress.tv video.'), patterns: [/^https?:\/\/wordpress\.tv\/.+/i], attributes: { providerNameSlug: 'wordpress-tv', responsive: true } }, { name: 'amazon-kindle', title: 'Amazon Kindle', icon: embedAmazonIcon, keywords: [Object(external_wp_i18n_["__"])('ebook')], description: Object(external_wp_i18n_["__"])('Embed Amazon Kindle content.'), patterns: [/^https?:\/\/([a-z0-9-]+\.)?(amazon|amzn)(\.[a-z]{2,4})+\/.+/i, /^https?:\/\/(www\.)?(a\.co|z\.cn)\/.+/i], attributes: { providerNameSlug: 'amazon-kindle' } }, { name: 'pinterest', title: 'Pinterest', icon: embedPinterestIcon, keywords: [Object(external_wp_i18n_["__"])('social'), Object(external_wp_i18n_["__"])('bookmark')], description: Object(external_wp_i18n_["__"])('Embed Pinterest pins, boards, and profiles.'), patterns: [/^https?:\/\/([a-z]{2}|www)\.pinterest\.com(\.(au|mx))?\/.*/i], attributes: { providerNameSlug: 'pinterest' } }, { name: 'wolfram-cloud', title: 'Wolfram Cloud', icon: embedWolframIcon, description: Object(external_wp_i18n_["__"])('Embed Wolfram Cloud notebook content.'), patterns: [/^https?:\/\/(www\.)?wolframcloud\.com\/obj\/.+/i], attributes: { providerNameSlug: 'wolfram-cloud', responsive: true } }]; /** * Add `isActive` function to all `embed` variations, if not defined. * `isActive` function is used to find a variation match from a created * Block by providing its attributes. */ embed_variations_variations.forEach(variation => { if (variation.isActive) return; variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.providerNameSlug === variationAttributes.providerNameSlug; }); /* harmony default export */ var embed_variations = (embed_variations_variations); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/deprecated.js /** * External dependencies */ /** * Internal dependencies */ const deprecated_metadata = { apiVersion: 2, name: "core/embed", title: "Embed", category: "embed", description: "Add a block that displays content pulled from other sites, like Twitter or YouTube.", textdomain: "default", attributes: { url: { type: "string" }, caption: { type: "string", source: "html", selector: "figcaption" }, type: { type: "string" }, providerNameSlug: { type: "string" }, allowResponsive: { type: "boolean", "default": true }, responsive: { type: "boolean", "default": false }, previewable: { type: "boolean", "default": true } }, supports: { align: true }, editorStyle: "wp-block-embed-editor", style: "wp-block-embed" }; /** * WordPress dependencies */ const { attributes: embed_deprecated_blockAttributes } = deprecated_metadata; const embed_deprecated_deprecated = [{ attributes: embed_deprecated_blockAttributes, save(_ref) { let { attributes: { url, caption, type, providerNameSlug } } = _ref; if (!url) { return null; } const embedClassName = classnames_default()('wp-block-embed', { [`is-type-${type}`]: type, [`is-provider-${providerNameSlug}`]: providerNameSlug }); return Object(external_wp_element_["createElement"])("figure", { className: embedClassName }, `\n${url}\n` /* URL needs to be on its own line. */ , !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", value: caption })); } }]; /* harmony default export */ var embed_deprecated = (embed_deprecated_deprecated); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/index.js /** * Internal dependencies */ const embed_metadata = { apiVersion: 2, name: "core/embed", title: "Embed", category: "embed", description: "Add a block that displays content pulled from other sites, like Twitter or YouTube.", textdomain: "default", attributes: { url: { type: "string" }, caption: { type: "string", source: "html", selector: "figcaption" }, type: { type: "string" }, providerNameSlug: { type: "string" }, allowResponsive: { type: "boolean", "default": true }, responsive: { type: "boolean", "default": false }, previewable: { type: "boolean", "default": true } }, supports: { align: true }, editorStyle: "wp-block-embed-editor", style: "wp-block-embed" }; const { name: embed_name } = embed_metadata; const embed_settings = { icon: embedContentIcon, edit: embed_edit, save: embed_save_save, transforms: embed_transforms, variations: embed_variations, deprecated: embed_deprecated }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/file.js /** * WordPress dependencies */ const file_file = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5z" })); /* harmony default export */ var library_file = (file_file); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/deprecated.js /** * WordPress dependencies */ // Version of the file block without PR#28062 accessibility fix. const file_deprecated_deprecated = [{ attributes: { id: { type: 'number' }, href: { type: 'string' }, fileName: { type: 'string', source: 'html', selector: 'a:not([download])' }, textLinkHref: { type: 'string', source: 'attribute', selector: 'a:not([download])', attribute: 'href' }, textLinkTarget: { type: 'string', source: 'attribute', selector: 'a:not([download])', attribute: 'target' }, showDownloadButton: { type: 'boolean', default: true }, downloadButtonText: { type: 'string', source: 'html', selector: 'a[download]' }, displayPreview: { type: 'boolean' }, previewHeight: { type: 'number', default: 600 } }, supports: { anchor: true, align: true }, save(_ref) { let { attributes } = _ref; const { href, fileName, textLinkHref, textLinkTarget, showDownloadButton, downloadButtonText, displayPreview, previewHeight } = attributes; const pdfEmbedLabel = external_wp_blockEditor_["RichText"].isEmpty(fileName) ? Object(external_wp_i18n_["__"])('PDF embed') : Object(external_wp_i18n_["sprintf"])( /* translators: %s: filename. */ Object(external_wp_i18n_["__"])('Embed of %s.'), fileName); return href && Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save(), displayPreview && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("object", { className: "wp-block-file__embed", data: href, type: "application/pdf", style: { width: '100%', height: `${previewHeight}px` }, "aria-label": pdfEmbedLabel })), !external_wp_blockEditor_["RichText"].isEmpty(fileName) && Object(external_wp_element_["createElement"])("a", { href: textLinkHref, target: textLinkTarget, rel: textLinkTarget ? 'noreferrer noopener' : undefined }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { value: fileName })), showDownloadButton && Object(external_wp_element_["createElement"])("a", { href: href, className: "wp-block-file__button", download: true }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { value: downloadButtonText }))); } }]; /* harmony default export */ var file_deprecated = (file_deprecated_deprecated); // EXTERNAL MODULE: external ["wp","notices"] var external_wp_notices_ = __webpack_require__("onLe"); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/inspector.js /** * WordPress dependencies */ /** * Internal dependencies */ function FileBlockInspector(_ref) { let { hrefs, openInNewWindow, showDownloadButton, changeLinkDestinationOption, changeOpenInNewWindow, changeShowDownloadButton, displayPreview, changeDisplayPreview, previewHeight, changePreviewHeight } = _ref; const { href, textLinkHref, attachmentPage } = hrefs; let linkDestinationOptions = [{ value: href, label: Object(external_wp_i18n_["__"])('URL') }]; if (attachmentPage) { linkDestinationOptions = [{ value: href, label: Object(external_wp_i18n_["__"])('Media file') }, { value: attachmentPage, label: Object(external_wp_i18n_["__"])('Attachment page') }]; } return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, href.endsWith('.pdf') && Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('PDF settings') }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Show inline embed'), help: displayPreview ? Object(external_wp_i18n_["__"])("Note: Most phone and tablet browsers won't display embedded PDFs.") : null, checked: !!displayPreview, onChange: changeDisplayPreview }), displayPreview && Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], { label: Object(external_wp_i18n_["__"])('Height in pixels'), min: MIN_PREVIEW_HEIGHT, max: Math.max(MAX_PREVIEW_HEIGHT, previewHeight), value: previewHeight, onChange: changePreviewHeight })), Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Text link settings') }, Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], { label: Object(external_wp_i18n_["__"])('Link to'), value: textLinkHref, options: linkDestinationOptions, onChange: changeLinkDestinationOption }), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Open in new tab'), checked: openInNewWindow, onChange: changeOpenInNewWindow })), Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Download button settings') }, Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Show download button'), checked: showDownloadButton, onChange: changeShowDownloadButton })))); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/utils.js /** * Uses a combination of user agent matching and feature detection to determine whether * the current browser supports rendering PDFs inline. * * @return {boolean} Whether or not the browser supports inline PDFs. */ const browserSupportsPdfs = () => { // Most mobile devices include "Mobi" in their UA. if (window.navigator.userAgent.indexOf('Mobi') > -1) { return false; } // Android tablets are the noteable exception. if (window.navigator.userAgent.indexOf('Android') > -1) { return false; } // iPad pretends to be a Mac. if (window.navigator.userAgent.indexOf('Macintosh') > -1 && window.navigator.maxTouchPoints && window.navigator.maxTouchPoints > 2) { return false; } // IE only supports PDFs when there's an ActiveX object available for it. if (!!(window.ActiveXObject || 'ActiveXObject' in window) && !(createActiveXObject('AcroPDF.PDF') || createActiveXObject('PDF.PdfCtrl'))) { return false; } return true; }; /** * Helper function for creating ActiveX objects, catching any errors that are thrown * when it's generated. * * @param {string} type The name of the ActiveX object to create. * @return {window.ActiveXObject|undefined} The generated ActiveXObject, or null if it failed. */ const createActiveXObject = type => { let ax; try { ax = new window.ActiveXObject(type); } catch (e) { ax = undefined; } return ax; }; /** * Hides all .wp-block-file__embed elements on the document. This function is only intended * to be run on the front-end, it may have weird side effects running in the block editor. */ const hidePdfEmbedsOnUnsupportedBrowsers = () => { if (!browserSupportsPdfs()) { const embeds = document.getElementsByClassName('wp-block-file__embed'); Array.from(embeds).forEach(embed => { embed.style.display = 'none'; }); } }; // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/edit.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ const MIN_PREVIEW_HEIGHT = 200; const MAX_PREVIEW_HEIGHT = 2000; function ClipboardToolbarButton(_ref) { let { text, disabled } = _ref; const { createNotice } = Object(external_wp_data_["useDispatch"])(external_wp_notices_["store"]); const ref = Object(external_wp_compose_["useCopyToClipboard"])(text, () => { createNotice('info', Object(external_wp_i18n_["__"])('Copied URL to clipboard.'), { isDismissible: true, type: 'snackbar' }); }); return Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { className: "components-clipboard-toolbar-button", ref: ref, disabled: disabled }, Object(external_wp_i18n_["__"])('Copy URL')); } function FileEdit(_ref2) { let { attributes, isSelected, setAttributes, noticeUI, noticeOperations, clientId } = _ref2; const { id, fileName, href, textLinkHref, textLinkTarget, showDownloadButton, downloadButtonText, displayPreview, previewHeight } = attributes; const [hasError, setHasError] = Object(external_wp_element_["useState"])(false); const { media, mediaUpload } = Object(external_wp_data_["useSelect"])(select => ({ media: id === undefined ? undefined : select(external_wp_coreData_["store"]).getMedia(id), mediaUpload: select(external_wp_blockEditor_["store"]).getSettings().mediaUpload }), [id]); const { toggleSelection } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]); Object(external_wp_element_["useEffect"])(() => { // Upload a file drag-and-dropped into the editor if (Object(external_wp_blob_["isBlobURL"])(href)) { const file = Object(external_wp_blob_["getBlobByURL"])(href); mediaUpload({ filesList: [file], onFileChange: _ref3 => { let [newMedia] = _ref3; return onSelectFile(newMedia); }, onError: message => { setHasError(true); noticeOperations.createErrorNotice(message); } }); Object(external_wp_blob_["revokeBlobURL"])(href); } if (downloadButtonText === undefined) { changeDownloadButtonText(Object(external_wp_i18n_["_x"])('Download', 'button label')); } }, []); Object(external_wp_element_["useEffect"])(() => { // Add a unique fileId to each file block setAttributes({ fileId: `wp-block-file--media-${clientId}` }); }, [clientId]); function onSelectFile(newMedia) { if (newMedia && newMedia.url) { setHasError(false); const isPdf = newMedia.url.endsWith('.pdf'); setAttributes({ href: newMedia.url, fileName: newMedia.title, textLinkHref: newMedia.url, id: newMedia.id, displayPreview: isPdf ? true : undefined, previewHeight: isPdf ? 600 : undefined }); } } function onUploadError(message) { setHasError(true); noticeOperations.removeAllNotices(); noticeOperations.createErrorNotice(message); } function changeLinkDestinationOption(newHref) { // Choose Media File or Attachment Page (when file is in Media Library) setAttributes({ textLinkHref: newHref }); } function changeOpenInNewWindow(newValue) { setAttributes({ textLinkTarget: newValue ? '_blank' : false }); } function changeShowDownloadButton(newValue) { setAttributes({ showDownloadButton: newValue }); } function changeDownloadButtonText(newValue) { // Remove anchor tags from button text content. setAttributes({ downloadButtonText: newValue.replace(/<\/?a[^>]*>/g, '') }); } function changeDisplayPreview(newValue) { setAttributes({ displayPreview: newValue }); } function handleOnResizeStop(event, direction, elt, delta) { toggleSelection(true); const newHeight = parseInt(previewHeight + delta.height, 10); setAttributes({ previewHeight: newHeight }); } function changePreviewHeight(newValue) { const newHeight = Math.max(parseInt(newValue, 10), MIN_PREVIEW_HEIGHT); setAttributes({ previewHeight: newHeight }); } const attachmentPage = media && media.link; const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({ className: classnames_default()(Object(external_wp_blob_["isBlobURL"])(href) && Object(external_wp_components_["__unstableGetAnimateClassName"])({ type: 'loading' }), { 'is-transient': Object(external_wp_blob_["isBlobURL"])(href) }) }); const displayPreviewInEditor = browserSupportsPdfs() && displayPreview; if (!href || hasError) { return Object(external_wp_element_["createElement"])("div", blockProps, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], { icon: Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], { icon: library_file }), labels: { title: Object(external_wp_i18n_["__"])('File'), instructions: Object(external_wp_i18n_["__"])('Upload a file or pick one from your media library.') }, onSelect: onSelectFile, notices: noticeUI, onError: onUploadError, accept: "*" })); } return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(FileBlockInspector, { hrefs: { href, textLinkHref, attachmentPage }, openInNewWindow: !!textLinkTarget, showDownloadButton, changeLinkDestinationOption, changeOpenInNewWindow, changeShowDownloadButton, displayPreview, changeDisplayPreview, previewHeight, changePreviewHeight }), Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], { group: "other" }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaReplaceFlow"], { mediaId: id, mediaURL: href, accept: "*", onSelect: onSelectFile, onError: onUploadError }), Object(external_wp_element_["createElement"])(ClipboardToolbarButton, { text: href, disabled: Object(external_wp_blob_["isBlobURL"])(href) })), Object(external_wp_element_["createElement"])("div", blockProps, displayPreviewInEditor && Object(external_wp_element_["createElement"])(external_wp_components_["ResizableBox"], { size: { height: previewHeight }, minHeight: MIN_PREVIEW_HEIGHT, maxHeight: MAX_PREVIEW_HEIGHT, minWidth: "100%", grid: [10, 10], enable: { top: false, right: false, bottom: true, left: false, topRight: false, bottomRight: false, bottomLeft: false, topLeft: false }, onResizeStart: () => toggleSelection(false), onResizeStop: handleOnResizeStop, showHandle: isSelected }, Object(external_wp_element_["createElement"])("object", { className: "wp-block-file__preview", data: href, type: "application/pdf", "aria-label": Object(external_wp_i18n_["__"])('Embed of the selected PDF file.') }), !isSelected && Object(external_wp_element_["createElement"])("div", { className: "wp-block-file__preview-overlay" })), Object(external_wp_element_["createElement"])("div", { className: 'wp-block-file__content-wrapper' }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { tagName: "a", value: fileName, placeholder: Object(external_wp_i18n_["__"])('Write file name…'), withoutInteractiveFormatting: true, onChange: text => setAttributes({ fileName: text }), href: textLinkHref }), showDownloadButton && Object(external_wp_element_["createElement"])("div", { className: 'wp-block-file__button-richtext-wrapper' }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { tagName: "div" // must be block-level or else cursor disappears , "aria-label": Object(external_wp_i18n_["__"])('Download button text'), className: 'wp-block-file__button', value: downloadButtonText, withoutInteractiveFormatting: true, placeholder: Object(external_wp_i18n_["__"])('Add text…'), onChange: text => changeDownloadButtonText(text) }))))); } /* harmony default export */ var file_edit = (Object(external_wp_components_["withNotices"])(FileEdit)); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/save.js /** * WordPress dependencies */ function file_save_save(_ref) { let { attributes } = _ref; const { href, fileId, fileName, textLinkHref, textLinkTarget, showDownloadButton, downloadButtonText, displayPreview, previewHeight } = attributes; const pdfEmbedLabel = external_wp_blockEditor_["RichText"].isEmpty(fileName) ? Object(external_wp_i18n_["__"])('PDF embed') : Object(external_wp_i18n_["sprintf"])( /* translators: %s: filename. */ Object(external_wp_i18n_["__"])('Embed of %s.'), fileName); return href && Object(external_wp_element_["createElement"])("div", external_wp_blockEditor_["useBlockProps"].save(), displayPreview && Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("object", { className: "wp-block-file__embed", data: href, type: "application/pdf", style: { width: '100%', height: `${previewHeight}px` }, "aria-label": pdfEmbedLabel })), !external_wp_blockEditor_["RichText"].isEmpty(fileName) && Object(external_wp_element_["createElement"])("a", { id: fileId, href: textLinkHref, target: textLinkTarget, rel: textLinkTarget ? 'noreferrer noopener' : undefined }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { value: fileName })), showDownloadButton && Object(external_wp_element_["createElement"])("a", { href: href, className: "wp-block-file__button", download: true, "aria-describedby": fileId }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { value: downloadButtonText }))); } // EXTERNAL MODULE: external ["wp","url"] var external_wp_url_ = __webpack_require__("Mmq9"); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/transforms.js /** * External dependencies */ /** * WordPress dependencies */ const file_transforms_transforms = { from: [{ type: 'files', isMatch(files) { return files.length > 0; }, // We define a lower priorty (higher number) than the default of 10. This // ensures that the File block is only created as a fallback. priority: 15, transform: files => { const blocks = []; files.forEach(file => { const blobURL = Object(external_wp_blob_["createBlobURL"])(file); // File will be uploaded in componentDidMount() blocks.push(Object(external_wp_blocks_["createBlock"])('core/file', { href: blobURL, fileName: file.name, textLinkHref: blobURL })); }); return blocks; } }, { type: 'block', blocks: ['core/audio'], transform: attributes => { return Object(external_wp_blocks_["createBlock"])('core/file', { href: attributes.src, fileName: attributes.caption, textLinkHref: attributes.src, id: attributes.id, anchor: attributes.anchor }); } }, { type: 'block', blocks: ['core/video'], transform: attributes => { return Object(external_wp_blocks_["createBlock"])('core/file', { href: attributes.src, fileName: attributes.caption, textLinkHref: attributes.src, id: attributes.id, anchor: attributes.anchor }); } }, { type: 'block', blocks: ['core/image'], transform: attributes => { return Object(external_wp_blocks_["createBlock"])('core/file', { href: attributes.url, fileName: attributes.caption || Object(external_wp_url_["getFilename"])(attributes.url), textLinkHref: attributes.url, id: attributes.id, anchor: attributes.anchor }); } }], to: [{ type: 'block', blocks: ['core/audio'], isMatch: _ref => { let { id } = _ref; if (!id) { return false; } const { getMedia } = Object(external_wp_data_["select"])(external_wp_coreData_["store"]); const media = getMedia(id); return !!media && Object(external_lodash_["includes"])(media.mime_type, 'audio'); }, transform: attributes => { return Object(external_wp_blocks_["createBlock"])('core/audio', { src: attributes.href, caption: attributes.fileName, id: attributes.id, anchor: attributes.anchor }); } }, { type: 'block', blocks: ['core/video'], isMatch: _ref2 => { let { id } = _ref2; if (!id) { return false; } const { getMedia } = Object(external_wp_data_["select"])(external_wp_coreData_["store"]); const media = getMedia(id); return !!media && Object(external_lodash_["includes"])(media.mime_type, 'video'); }, transform: attributes => { return Object(external_wp_blocks_["createBlock"])('core/video', { src: attributes.href, caption: attributes.fileName, id: attributes.id, anchor: attributes.anchor }); } }, { type: 'block', blocks: ['core/image'], isMatch: _ref3 => { let { id } = _ref3; if (!id) { return false; } const { getMedia } = Object(external_wp_data_["select"])(external_wp_coreData_["store"]); const media = getMedia(id); return !!media && Object(external_lodash_["includes"])(media.mime_type, 'image'); }, transform: attributes => { return Object(external_wp_blocks_["createBlock"])('core/image', { url: attributes.href, caption: attributes.fileName, id: attributes.id, anchor: attributes.anchor }); } }] }; /* harmony default export */ var file_transforms = (file_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const file_metadata = { apiVersion: 2, name: "core/file", title: "File", category: "media", description: "Add a link to a downloadable file.", keywords: ["document", "pdf", "download"], textdomain: "default", attributes: { id: { type: "number" }, href: { type: "string" }, fileId: { type: "string", source: "attribute", selector: "a:not([download])", attribute: "id" }, fileName: { type: "string", source: "html", selector: "a:not([download])" }, textLinkHref: { type: "string", source: "attribute", selector: "a:not([download])", attribute: "href" }, textLinkTarget: { type: "string", source: "attribute", selector: "a:not([download])", attribute: "target" }, showDownloadButton: { type: "boolean", "default": true }, downloadButtonText: { type: "string", source: "html", selector: "a[download]" }, displayPreview: { type: "boolean" }, previewHeight: { type: "number", "default": 600 } }, supports: { anchor: true, align: true }, viewScript: "file:./view.min.js", editorStyle: "wp-block-file-editor", style: "wp-block-file" }; const { name: file_name } = file_metadata; const file_settings = { icon: library_file, example: { attributes: { href: 'https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg', fileName: Object(external_wp_i18n_["_x"])('Armstrong_Small_Step', 'Name of the file') } }, transforms: file_transforms, deprecated: file_deprecated, edit: file_edit, save: file_save_save }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/gallery.js /** * WordPress dependencies */ const gallery = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8h-1.5zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zM4.5 4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1V12l-2.3-1.7c-.3-.2-.6-.2-.9 0l-2.9 2.1L8 11.3c-.2-.1-.5-.1-.7 0l-2.9 1.5V4.6zm0 11.8v-1.8l3.2-1.7 2.4 1.2c.2.1.5.1.8-.1l2.8-2 2.8 2v2.5c0 .1-.1.1-.1.1H4.6c0-.1-.1-.2-.1-.2z" })); /* harmony default export */ var library_gallery = (gallery); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/deprecated.js /** * External dependencies */ /** * WordPress dependencies */ /** * Original function to determine default number of columns from a block's * attributes. * * Used in deprecations: v1-6, for versions of the gallery block that didn't use inner blocks. * * @param {Object} attributes Block attributes. * @return {number} Default number of columns for the gallery. */ function defaultColumnsNumberV1(attributes) { return Math.min(3, attributes.images.length); } const gallery_deprecated_deprecated = [{ attributes: { images: { type: 'array', default: [], source: 'query', selector: '.blocks-gallery-item', query: { url: { type: 'string', source: 'attribute', selector: 'img', attribute: 'src' }, fullUrl: { type: 'string', source: 'attribute', selector: 'img', attribute: 'data-full-url' }, link: { type: 'string', source: 'attribute', selector: 'img', attribute: 'data-link' }, alt: { type: 'string', source: 'attribute', selector: 'img', attribute: 'alt', default: '' }, id: { type: 'string', source: 'attribute', selector: 'img', attribute: 'data-id' }, caption: { type: 'string', source: 'html', selector: '.blocks-gallery-item__caption' } } }, ids: { type: 'array', items: { type: 'number' }, default: [] }, columns: { type: 'number', minimum: 1, maximum: 8 }, caption: { type: 'string', source: 'html', selector: '.blocks-gallery-caption' }, imageCrop: { type: 'boolean', default: true }, linkTo: { type: 'string', default: 'none' }, sizeSlug: { type: 'string', default: 'large' } }, supports: { align: true }, isEligible(_ref) { let { linkTo } = _ref; return !linkTo || linkTo === 'attachment' || linkTo === 'media'; }, migrate(attributes) { let linkTo = attributes.linkTo; if (!attributes.linkTo) { linkTo = 'none'; } else if (attributes.linkTo === 'attachment') { linkTo = 'post'; } else if (attributes.linkTo === 'media') { linkTo = 'file'; } return { ...attributes, linkTo }; }, save(_ref2) { let { attributes } = _ref2; const { images, columns = defaultColumnsNumberV1(attributes), imageCrop, caption, linkTo } = attributes; return Object(external_wp_element_["createElement"])("figure", { className: `columns-${columns} ${imageCrop ? 'is-cropped' : ''}` }, Object(external_wp_element_["createElement"])("ul", { className: "blocks-gallery-grid" }, images.map(image => { let href; switch (linkTo) { case 'media': href = image.fullUrl || image.url; break; case 'attachment': href = image.link; break; } const img = Object(external_wp_element_["createElement"])("img", { src: image.url, alt: image.alt, "data-id": image.id, "data-full-url": image.fullUrl, "data-link": image.link, className: image.id ? `wp-image-${image.id}` : null }); return Object(external_wp_element_["createElement"])("li", { key: image.id || image.url, className: "blocks-gallery-item" }, Object(external_wp_element_["createElement"])("figure", null, href ? Object(external_wp_element_["createElement"])("a", { href: href }, img) : img, !external_wp_blockEditor_["RichText"].isEmpty(image.caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", className: "blocks-gallery-item__caption", value: image.caption }))); })), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", className: "blocks-gallery-caption", value: caption })); } }, { attributes: { images: { type: 'array', default: [], source: 'query', selector: '.blocks-gallery-item', query: { url: { source: 'attribute', selector: 'img', attribute: 'src' }, fullUrl: { source: 'attribute', selector: 'img', attribute: 'data-full-url' }, link: { source: 'attribute', selector: 'img', attribute: 'data-link' }, alt: { source: 'attribute', selector: 'img', attribute: 'alt', default: '' }, id: { source: 'attribute', selector: 'img', attribute: 'data-id' }, caption: { type: 'string', source: 'html', selector: '.blocks-gallery-item__caption' } } }, ids: { type: 'array', default: [] }, columns: { type: 'number' }, caption: { type: 'string', source: 'html', selector: '.blocks-gallery-caption' }, imageCrop: { type: 'boolean', default: true }, linkTo: { type: 'string', default: 'none' } }, supports: { align: true }, isEligible(_ref3) { let { ids } = _ref3; return ids && ids.some(id => typeof id === 'string'); }, migrate(attributes) { return { ...attributes, ids: Object(external_lodash_["map"])(attributes.ids, id => { const parsedId = parseInt(id, 10); return Number.isInteger(parsedId) ? parsedId : null; }) }; }, save(_ref4) { let { attributes } = _ref4; const { images, columns = defaultColumnsNumberV1(attributes), imageCrop, caption, linkTo } = attributes; return Object(external_wp_element_["createElement"])("figure", { className: `columns-${columns} ${imageCrop ? 'is-cropped' : ''}` }, Object(external_wp_element_["createElement"])("ul", { className: "blocks-gallery-grid" }, images.map(image => { let href; switch (linkTo) { case 'media': href = image.fullUrl || image.url; break; case 'attachment': href = image.link; break; } const img = Object(external_wp_element_["createElement"])("img", { src: image.url, alt: image.alt, "data-id": image.id, "data-full-url": image.fullUrl, "data-link": image.link, className: image.id ? `wp-image-${image.id}` : null }); return Object(external_wp_element_["createElement"])("li", { key: image.id || image.url, className: "blocks-gallery-item" }, Object(external_wp_element_["createElement"])("figure", null, href ? Object(external_wp_element_["createElement"])("a", { href: href }, img) : img, !external_wp_blockEditor_["RichText"].isEmpty(image.caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", className: "blocks-gallery-item__caption", value: image.caption }))); })), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", className: "blocks-gallery-caption", value: caption })); } }, { attributes: { images: { type: 'array', default: [], source: 'query', selector: 'ul.wp-block-gallery .blocks-gallery-item', query: { url: { source: 'attribute', selector: 'img', attribute: 'src' }, fullUrl: { source: 'attribute', selector: 'img', attribute: 'data-full-url' }, alt: { source: 'attribute', selector: 'img', attribute: 'alt', default: '' }, id: { source: 'attribute', selector: 'img', attribute: 'data-id' }, link: { source: 'attribute', selector: 'img', attribute: 'data-link' }, caption: { type: 'array', source: 'children', selector: 'figcaption' } } }, ids: { type: 'array', default: [] }, columns: { type: 'number' }, imageCrop: { type: 'boolean', default: true }, linkTo: { type: 'string', default: 'none' } }, supports: { align: true }, save(_ref5) { let { attributes } = _ref5; const { images, columns = defaultColumnsNumberV1(attributes), imageCrop, linkTo } = attributes; return Object(external_wp_element_["createElement"])("ul", { className: `columns-${columns} ${imageCrop ? 'is-cropped' : ''}` }, images.map(image => { let href; switch (linkTo) { case 'media': href = image.fullUrl || image.url; break; case 'attachment': href = image.link; break; } const img = Object(external_wp_element_["createElement"])("img", { src: image.url, alt: image.alt, "data-id": image.id, "data-full-url": image.fullUrl, "data-link": image.link, className: image.id ? `wp-image-${image.id}` : null }); return Object(external_wp_element_["createElement"])("li", { key: image.id || image.url, className: "blocks-gallery-item" }, Object(external_wp_element_["createElement"])("figure", null, href ? Object(external_wp_element_["createElement"])("a", { href: href }, img) : img, image.caption && image.caption.length > 0 && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", value: image.caption }))); })); } }, { attributes: { images: { type: 'array', default: [], source: 'query', selector: 'ul.wp-block-gallery .blocks-gallery-item', query: { url: { source: 'attribute', selector: 'img', attribute: 'src' }, alt: { source: 'attribute', selector: 'img', attribute: 'alt', default: '' }, id: { source: 'attribute', selector: 'img', attribute: 'data-id' }, link: { source: 'attribute', selector: 'img', attribute: 'data-link' }, caption: { type: 'array', source: 'children', selector: 'figcaption' } } }, columns: { type: 'number' }, imageCrop: { type: 'boolean', default: true }, linkTo: { type: 'string', default: 'none' } }, isEligible(_ref6) { let { images, ids } = _ref6; return images && images.length > 0 && (!ids && images || ids && images && ids.length !== images.length || Object(external_lodash_["some"])(images, (id, index) => { if (!id && ids[index] !== null) { return true; } return parseInt(id, 10) !== ids[index]; })); }, migrate(attributes) { return { ...attributes, ids: Object(external_lodash_["map"])(attributes.images, _ref7 => { let { id } = _ref7; if (!id) { return null; } return parseInt(id, 10); }) }; }, supports: { align: true }, save(_ref8) { let { attributes } = _ref8; const { images, columns = defaultColumnsNumberV1(attributes), imageCrop, linkTo } = attributes; return Object(external_wp_element_["createElement"])("ul", { className: `columns-${columns} ${imageCrop ? 'is-cropped' : ''}` }, images.map(image => { let href; switch (linkTo) { case 'media': href = image.url; break; case 'attachment': href = image.link; break; } const img = Object(external_wp_element_["createElement"])("img", { src: image.url, alt: image.alt, "data-id": image.id, "data-link": image.link, className: image.id ? `wp-image-${image.id}` : null }); return Object(external_wp_element_["createElement"])("li", { key: image.id || image.url, className: "blocks-gallery-item" }, Object(external_wp_element_["createElement"])("figure", null, href ? Object(external_wp_element_["createElement"])("a", { href: href }, img) : img, image.caption && image.caption.length > 0 && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", value: image.caption }))); })); } }, { attributes: { images: { type: 'array', default: [], source: 'query', selector: 'div.wp-block-gallery figure.blocks-gallery-image img', query: { url: { source: 'attribute', attribute: 'src' }, alt: { source: 'attribute', attribute: 'alt', default: '' }, id: { source: 'attribute', attribute: 'data-id' } } }, columns: { type: 'number' }, imageCrop: { type: 'boolean', default: true }, linkTo: { type: 'string', default: 'none' }, align: { type: 'string', default: 'none' } }, supports: { align: true }, save(_ref9) { let { attributes } = _ref9; const { images, columns = defaultColumnsNumberV1(attributes), align, imageCrop, linkTo } = attributes; const className = classnames_default()(`columns-${columns}`, { alignnone: align === 'none', 'is-cropped': imageCrop }); return Object(external_wp_element_["createElement"])("div", { className: className }, images.map(image => { let href; switch (linkTo) { case 'media': href = image.url; break; case 'attachment': href = image.link; break; } const img = Object(external_wp_element_["createElement"])("img", { src: image.url, alt: image.alt, "data-id": image.id }); return Object(external_wp_element_["createElement"])("figure", { key: image.id || image.url, className: "blocks-gallery-image" }, href ? Object(external_wp_element_["createElement"])("a", { href: href }, img) : img); })); } }]; /* harmony default export */ var gallery_deprecated = (gallery_deprecated_deprecated); // EXTERNAL MODULE: external ["wp","viewport"] var external_wp_viewport_ = __webpack_require__("KEfo"); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/shared-icon.js /** * WordPress dependencies */ const sharedIcon = Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockIcon"], { icon: library_gallery }); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/shared.js /** * External dependencies */ function defaultColumnsNumber(imageCount) { return imageCount ? Math.min(3, imageCount) : 3; } const pickRelevantMediaFiles = function (image) { let sizeSlug = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'large'; const imageProps = Object(external_lodash_["pick"])(image, ['alt', 'id', 'link', 'caption']); imageProps.url = Object(external_lodash_["get"])(image, ['sizes', sizeSlug, 'url']) || Object(external_lodash_["get"])(image, ['media_details', 'sizes', sizeSlug, 'source_url']) || image.url; const fullUrl = Object(external_lodash_["get"])(image, ['sizes', 'full', 'url']) || Object(external_lodash_["get"])(image, ['media_details', 'sizes', 'full', 'source_url']); if (fullUrl) { imageProps.fullUrl = fullUrl; } return imageProps; }; // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/constants.js const LINK_DESTINATION_NONE = 'none'; const LINK_DESTINATION_MEDIA = 'media'; const LINK_DESTINATION_ATTACHMENT = 'attachment'; // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/constants.js const MIN_SIZE = 20; const constants_LINK_DESTINATION_NONE = 'none'; const constants_LINK_DESTINATION_MEDIA = 'media'; const constants_LINK_DESTINATION_ATTACHMENT = 'attachment'; const LINK_DESTINATION_CUSTOM = 'custom'; const constants_NEW_TAB_REL = ['noreferrer', 'noopener']; const constants_ALLOWED_MEDIA_TYPES = ['image']; const MEDIA_ID_NO_FEATURED_IMAGE_SET = 0; // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/utils.js /** * Internal dependencies */ /** * Determines new href and linkDestination values for an image block from the * supplied Gallery link destination. * * @param {Object} image Gallery image. * @param {string} destination Gallery's selected link destination. * @return {Object} New attributes to assign to image block. */ function getHrefAndDestination(image, destination) { // Need to determine the URL that the selected destination maps to. // Gutenberg and WordPress use different constants so the new link // destination also needs to be tweaked. switch (destination) { case LINK_DESTINATION_MEDIA: return { href: (image === null || image === void 0 ? void 0 : image.source_url) || (image === null || image === void 0 ? void 0 : image.url), // eslint-disable-line camelcase linkDestination: constants_LINK_DESTINATION_MEDIA }; case LINK_DESTINATION_ATTACHMENT: return { href: image === null || image === void 0 ? void 0 : image.link, linkDestination: constants_LINK_DESTINATION_ATTACHMENT }; case LINK_DESTINATION_NONE: return { href: undefined, linkDestination: constants_LINK_DESTINATION_NONE }; } return {}; } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/utils.js /** * External dependencies */ /** * Internal dependencies */ function removeNewTabRel(currentRel) { let newRel = currentRel; if (currentRel !== undefined && !Object(external_lodash_["isEmpty"])(newRel)) { if (!Object(external_lodash_["isEmpty"])(newRel)) { Object(external_lodash_["each"])(constants_NEW_TAB_REL, relVal => { const regExp = new RegExp('\\b' + relVal + '\\b', 'gi'); newRel = newRel.replace(regExp, ''); }); // Only trim if NEW_TAB_REL values was replaced. if (newRel !== currentRel) { newRel = newRel.trim(); } if (Object(external_lodash_["isEmpty"])(newRel)) { newRel = undefined; } } } return newRel; } /** * Helper to get the link target settings to be stored. * * @param {boolean} value The new link target value. * @param {Object} attributes Block attributes. * @param {Object} attributes.rel Image block's rel attribute. * * @return {Object} Updated link target settings. */ function getUpdatedLinkTargetSettings(value, _ref) { let { rel } = _ref; const linkTarget = value ? '_blank' : undefined; let updatedRel; if (!linkTarget && !rel) { updatedRel = undefined; } else { updatedRel = removeNewTabRel(rel); } return { linkTarget, rel: updatedRel }; } /** * Determines new Image block attributes size selection. * * @param {Object} image Media file object for gallery image. * @param {string} size Selected size slug to apply. */ function getImageSizeAttributes(image, size) { const url = Object(external_lodash_["get"])(image, ['media_details', 'sizes', size, 'source_url']); if (url) { return { url, width: undefined, height: undefined, sizeSlug: size }; } return {}; } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/gallery.js /** * External dependencies */ /** * WordPress dependencies */ const gallery_allowedBlocks = ['core/image']; const Gallery = props => { const { attributes, isSelected, setAttributes, mediaPlaceholder, insertBlocksAfter, blockProps } = props; const { align, columns, caption, imageCrop } = attributes; const { children, ...innerBlocksProps } = Object(external_wp_blockEditor_["useInnerBlocksProps"])(blockProps, { allowedBlocks: gallery_allowedBlocks, orientation: 'horizontal', renderAppender: false, __experimentalLayout: { type: 'default', alignments: [] } }); const [captionFocused, setCaptionFocused] = Object(external_wp_element_["useState"])(false); function onFocusCaption() { if (!captionFocused) { setCaptionFocused(true); } } function removeCaptionFocus() { if (captionFocused) { setCaptionFocused(false); } } Object(external_wp_element_["useEffect"])(() => { if (!isSelected) { setCaptionFocused(false); } }, [isSelected]); return Object(external_wp_element_["createElement"])("figure", Object(esm_extends["a" /* default */])({}, innerBlocksProps, { className: classnames_default()(blockProps.className, 'blocks-gallery-grid', { [`align${align}`]: align, [`columns-${columns}`]: columns !== undefined, [`columns-default`]: columns === undefined, 'is-cropped': imageCrop }) }), children, Object(external_wp_element_["createElement"])(external_wp_primitives_["View"], { className: "blocks-gallery-media-placeholder-wrapper", onClick: removeCaptionFocus }, mediaPlaceholder), Object(external_wp_element_["createElement"])(RichTextVisibilityHelper, { isHidden: !isSelected && external_wp_blockEditor_["RichText"].isEmpty(caption), captionFocused: captionFocused, onFocusCaption: onFocusCaption, tagName: "figcaption", className: "blocks-gallery-caption", "aria-label": Object(external_wp_i18n_["__"])('Gallery caption text'), placeholder: Object(external_wp_i18n_["__"])('Write gallery caption…'), value: caption, onChange: value => setAttributes({ caption: value }), inlineToolbar: true, __unstableOnSplitAtEnd: () => insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph')) })); }; function RichTextVisibilityHelper(_ref) { let { isHidden, captionFocused, onFocusCaption, className, value, placeholder, tagName, captionRef, ...richTextProps } = _ref; if (isHidden) { return Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], Object(esm_extends["a" /* default */])({ as: external_wp_blockEditor_["RichText"] }, richTextProps)); } return Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], Object(esm_extends["a" /* default */])({ ref: captionRef, value: value, placeholder: placeholder, className: className, tagName: tagName, isSelected: captionFocused, onClick: onFocusCaption }, richTextProps)); } /* harmony default export */ var gallery_gallery = (Gallery); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/use-image-sizes.js /** * External dependencies */ /** * WordPress dependencies */ /** * Calculates the image sizes that are avaible for the current gallery images in order to * populate the 'Image size' selector. * * @param {Array} images Basic image block data taken from current gallery innerBlock * @param {boolean} isSelected Is the block currently selected in the editor. * @param {Function} getSettings Block editor store selector. * * @return {Array} An array of image size options. */ function useImageSizes(images, isSelected, getSettings) { return Object(external_wp_element_["useMemo"])(() => getImageSizing(), [images, isSelected]); function getImageSizing() { if (!images || images.length === 0) { return; } const { imageSizes } = getSettings(); let resizedImages = {}; if (isSelected) { resizedImages = images.reduce((currentResizedImages, img) => { if (!img.id) { return currentResizedImages; } const sizes = imageSizes.reduce((currentSizes, size) => { const defaultUrl = Object(external_lodash_["get"])(img, ['sizes', size.slug, 'url']); const mediaDetailsUrl = Object(external_lodash_["get"])(img, ['media_details', 'sizes', size.slug, 'source_url']); return { ...currentSizes, [size.slug]: defaultUrl || mediaDetailsUrl }; }, {}); return { ...currentResizedImages, [parseInt(img.id, 10)]: sizes }; }, {}); } return imageSizes.filter(_ref => { let { slug } = _ref; return Object(external_lodash_["some"])(resizedImages, sizes => sizes[slug]); }).map(_ref2 => { let { name, slug } = _ref2; return { value: slug, label: name }; }); } } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/use-short-code-transform.js /** * External dependencies */ /** * WordPress dependencies */ /** * Shortcode transforms don't currently have a tranform method and so can't use a selector to * retrieve the data for each image being transformer, so this selector handle this post transformation. * * @param {Array} shortCodeTransforms An array of image data passed from the shortcode transform. * * @return {Array} An array of extended image data objects for each of the shortcode transform images. */ function useShortCodeTransform(shortCodeTransforms) { const newImageData = Object(external_wp_data_["useSelect"])(select => { if (!shortCodeTransforms || shortCodeTransforms.length === 0) { return; } const getMedia = select(external_wp_coreData_["store"]).getMedia; return shortCodeTransforms.map(image => { const imageData = getMedia(image.id); if (imageData) { return { id: imageData.id, type: 'image', url: imageData.source_url, mime: imageData.mime_type, alt: imageData.alt_text, link: imageData.link }; } return undefined; }); }, [shortCodeTransforms]); if (!newImageData) { return; } if (Object(external_lodash_["every"])(newImageData, img => img && img.url)) { return newImageData; } } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/use-get-new-images.js /** * WordPress dependencies */ /** * Keeps track of images already in the gallery to allow new innerBlocks to be identified. This * is required so default gallery attributes can be applied without overwriting any custom * attributes applied to existing images. * * @param {Array} images Basic image block data taken from current gallery innerBlock * @param {Array} imageData The related image data for each of the current gallery images. * * @return {Array} An array of any new images that have been added to the gallery. */ function useGetNewImages(images, imageData) { const [currentImages, setCurrentImages] = Object(external_wp_element_["useState"])([]); return Object(external_wp_element_["useMemo"])(() => getNewImages(), [images, imageData]); function getNewImages() { let imagesUpdated = false; // First lets check if any images have been deleted. const newCurrentImages = currentImages.filter(currentImg => images.find(img => { return currentImg.clientId === img.clientId; })); if (newCurrentImages.length < currentImages.length) { imagesUpdated = true; } // Now lets see if we have any images hydrated from saved content and if so // add them to currentImages state. images.forEach(image => { if (image.fromSavedContent && !newCurrentImages.find(currentImage => currentImage.id === image.id)) { imagesUpdated = true; newCurrentImages.push(image); } }); // Now check for any new images that have been added to InnerBlocks and for which // we have the imageData we need for setting default block attributes. const newImages = images.filter(image => !newCurrentImages.find(currentImage => image.clientId && currentImage.clientId === image.clientId) && (imageData === null || imageData === void 0 ? void 0 : imageData.find(img => img.id === image.id)) && !image.fromSavedConent); if (imagesUpdated || (newImages === null || newImages === void 0 ? void 0 : newImages.length) > 0) { setCurrentImages([...newCurrentImages, ...newImages]); } return newImages.length > 0 ? newImages : null; } } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/use-get-media.js /** * WordPress dependencies */ /** * Retrieves the extended media info for each gallery image from the store. This is used to * determine which image size options are available for the current gallery. * * @param {Array} innerBlockImages An array of the innerBlock images currently in the gallery. * * @return {Array} An array of media info options for each gallery image. */ function useGetMedia(innerBlockImages) { const [currentImageMedia, setCurrentImageMedia] = Object(external_wp_element_["useState"])([]); const imageMedia = Object(external_wp_data_["useSelect"])(select => { if (!(innerBlockImages !== null && innerBlockImages !== void 0 && innerBlockImages.length)) { return currentImageMedia; } const imageIds = innerBlockImages.map(imageBlock => imageBlock.attributes.id).filter(id => id !== undefined); if (imageIds.length === 0) { return currentImageMedia; } return select(external_wp_coreData_["store"]).getMediaItems({ include: imageIds.join(','), per_page: -1 }); }, [innerBlockImages]); if ((imageMedia === null || imageMedia === void 0 ? void 0 : imageMedia.length) !== (currentImageMedia === null || currentImageMedia === void 0 ? void 0 : currentImageMedia.length) || imageMedia !== null && imageMedia !== void 0 && imageMedia.some(newImage => !currentImageMedia.find(currentImage => currentImage.id === newImage.id))) { setCurrentImageMedia(imageMedia); return imageMedia; } return currentImageMedia; } // EXTERNAL MODULE: ./node_modules/@wordpress/interface/build-module/index.js + 17 modules var build_module = __webpack_require__("U60i"); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/use-mobile-warning.js /** * WordPress dependencies */ function useMobileWarning(newImages) { const { createWarningNotice } = Object(external_wp_data_["useDispatch"])(external_wp_notices_["store"]); const { toggleFeature } = Object(external_wp_data_["useDispatch"])(build_module["i" /* store */]); const isMobileWarningActive = Object(external_wp_data_["useSelect"])(select => { const { isFeatureActive } = select(build_module["i" /* store */]); return isFeatureActive('core/edit-post', 'mobileGalleryWarning'); }, []); if (!isMobileWarningActive || !newImages) { return; } createWarningNotice(Object(external_wp_i18n_["__"])('Editing this Gallery in the WordPress mobile app requires version 18.2 or higher.'), { type: 'snackbar', explicitDismiss: true }); toggleFeature('core/edit-post', 'mobileGalleryWarning'); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/edit.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** * Internal dependencies */ const MAX_COLUMNS = 8; const linkOptions = [{ value: LINK_DESTINATION_ATTACHMENT, label: Object(external_wp_i18n_["__"])('Attachment Page') }, { value: LINK_DESTINATION_MEDIA, label: Object(external_wp_i18n_["__"])('Media File') }, { value: LINK_DESTINATION_NONE, label: Object(external_wp_i18n_["_x"])('None', 'Media item link option') }]; const edit_ALLOWED_MEDIA_TYPES = ['image']; const PLACEHOLDER_TEXT = external_wp_element_["Platform"].isNative ? Object(external_wp_i18n_["__"])('ADD MEDIA') : Object(external_wp_i18n_["__"])('Drag images, upload new ones or select files from your library.'); const MOBILE_CONTROL_PROPS_RANGE_CONTROL = external_wp_element_["Platform"].isNative ? { type: 'stepper' } : {}; function GalleryEdit(props) { const { setAttributes, attributes, className, clientId, noticeOperations, isSelected, noticeUI, insertBlocksAfter } = props; const { columns, imageCrop, linkTarget, linkTo, shortCodeTransforms, sizeSlug } = attributes; const { __unstableMarkNextChangeAsNotPersistent, replaceInnerBlocks, updateBlockAttributes } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]); const { createSuccessNotice } = Object(external_wp_data_["useDispatch"])(external_wp_notices_["store"]); const { getBlock, getSettings, preferredStyle } = Object(external_wp_data_["useSelect"])(select => { var _preferredStyleVariat; const settings = select(external_wp_blockEditor_["store"]).getSettings(); const preferredStyleVariations = settings.__experimentalPreferredStyleVariations; return { getBlock: select(external_wp_blockEditor_["store"]).getBlock, getSettings: select(external_wp_blockEditor_["store"]).getSettings, preferredStyle: preferredStyleVariations === null || preferredStyleVariations === void 0 ? void 0 : (_preferredStyleVariat = preferredStyleVariations.value) === null || _preferredStyleVariat === void 0 ? void 0 : _preferredStyleVariat['core/image'] }; }, []); const innerBlockImages = Object(external_wp_data_["useSelect"])(select => { var _select$getBlock; return (_select$getBlock = select(external_wp_blockEditor_["store"]).getBlock(clientId)) === null || _select$getBlock === void 0 ? void 0 : _select$getBlock.innerBlocks; }, [clientId]); const images = Object(external_wp_element_["useMemo"])(() => innerBlockImages === null || innerBlockImages === void 0 ? void 0 : innerBlockImages.map(block => ({ clientId: block.clientId, id: block.attributes.id, url: block.attributes.url, attributes: block.attributes, fromSavedContent: Boolean(block.originalContent) })), [innerBlockImages]); const imageData = useGetMedia(innerBlockImages); const newImages = useGetNewImages(images, imageData); useMobileWarning(newImages); Object(external_wp_element_["useEffect"])(() => { newImages === null || newImages === void 0 ? void 0 : newImages.forEach(newImage => { updateBlockAttributes(newImage.clientId, { ...buildImageAttributes(false, newImage.attributes), id: newImage.id, align: undefined }); }); }, [newImages]); const shortCodeImages = useShortCodeTransform(shortCodeTransforms); Object(external_wp_element_["useEffect"])(() => { if (!shortCodeTransforms || !shortCodeImages) { return; } updateImages(shortCodeImages); setAttributes({ shortCodeTransforms: undefined }); }, [shortCodeTransforms, shortCodeImages]); const imageSizeOptions = useImageSizes(imageData, isSelected, getSettings); /** * Determines the image attributes that should be applied to an image block * after the gallery updates. * * The gallery will receive the full collection of images when a new image * is added. As a result we need to reapply the image's original settings if * it already existed in the gallery. If the image is in fact new, we need * to apply the gallery's current settings to the image. * * @param {Object} existingBlock Existing Image block that still exists after gallery update. * @param {Object} image Media object for the actual image. * @return {Object} Attributes to set on the new image block. */ function buildImageAttributes(existingBlock, image) { if (existingBlock) { return existingBlock.attributes; } let newClassName; if (image.className && image.className !== '') { newClassName = image.className; } else { newClassName = preferredStyle ? `is-style-${preferredStyle}` : undefined; } return { ...pickRelevantMediaFiles(image, sizeSlug), ...getHrefAndDestination(image, linkTo), ...getUpdatedLinkTargetSettings(linkTarget, attributes), className: newClassName, sizeSlug }; } function isValidFileType(file) { var _file$url; return edit_ALLOWED_MEDIA_TYPES.some(mediaType => { var _file$type; return ((_file$type = file.type) === null || _file$type === void 0 ? void 0 : _file$type.indexOf(mediaType)) === 0; }) || ((_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.indexOf('blob:')) === 0; } function updateImages(selectedImages) { const newFileUploads = Object.prototype.toString.call(selectedImages) === '[object FileList]'; const imageArray = newFileUploads ? Array.from(selectedImages).map(file => { if (!file.url) { return pickRelevantMediaFiles({ url: Object(external_wp_blob_["createBlobURL"])(file) }); } return file; }) : selectedImages; if (!imageArray.every(isValidFileType)) { noticeOperations.removeAllNotices(); noticeOperations.createErrorNotice(Object(external_wp_i18n_["__"])('If uploading to a gallery all files need to be image formats'), { id: 'gallery-upload-invalid-file' }); } const processedImages = imageArray.filter(file => file.url || isValidFileType(file)).map(file => { if (!file.url) { return pickRelevantMediaFiles({ url: Object(external_wp_blob_["createBlobURL"])(file) }); } return file; }); // Because we are reusing existing innerImage blocks any reordering // done in the media library will be lost so we need to reapply that ordering // once the new image blocks are merged in with existing. const newOrderMap = processedImages.reduce((result, image, index) => (result[image.id] = index, result), {}); const existingImageBlocks = !newFileUploads ? innerBlockImages.filter(block => processedImages.find(img => img.id === block.attributes.id)) : innerBlockImages; const newImageList = processedImages.filter(img => !existingImageBlocks.find(existingImg => img.id === existingImg.attributes.id)); const newBlocks = newImageList.map(image => { return Object(external_wp_blocks_["createBlock"])('core/image', { id: image.id, url: image.url, caption: image.caption, alt: image.alt }); }); replaceInnerBlocks(clientId, Object(external_lodash_["concat"])(existingImageBlocks, newBlocks).sort((a, b) => newOrderMap[a.attributes.id] - newOrderMap[b.attributes.id])); } function onUploadError(message) { noticeOperations.removeAllNotices(); noticeOperations.createErrorNotice(message); } function setLinkTo(value) { setAttributes({ linkTo: value }); const changedAttributes = {}; const blocks = []; getBlock(clientId).innerBlocks.forEach(block => { blocks.push(block.clientId); const image = block.attributes.id ? Object(external_lodash_["find"])(imageData, { id: block.attributes.id }) : null; changedAttributes[block.clientId] = getHrefAndDestination(image, value); }); updateBlockAttributes(blocks, changedAttributes, true); const linkToText = [...linkOptions].find(linkType => linkType.value === value); createSuccessNotice(Object(external_wp_i18n_["sprintf"])( /* translators: %s: image size settings */ Object(external_wp_i18n_["__"])('All gallery image links updated to: %s'), linkToText.label), { id: 'gallery-attributes-linkTo', type: 'snackbar' }); } function setColumnsNumber(value) { setAttributes({ columns: value }); } function toggleImageCrop() { setAttributes({ imageCrop: !imageCrop }); } function getImageCropHelp(checked) { return checked ? Object(external_wp_i18n_["__"])('Thumbnails are cropped to align.') : Object(external_wp_i18n_["__"])('Thumbnails are not cropped.'); } function toggleOpenInNewTab(openInNewTab) { const newLinkTarget = openInNewTab ? '_blank' : undefined; setAttributes({ linkTarget: newLinkTarget }); const changedAttributes = {}; const blocks = []; getBlock(clientId).innerBlocks.forEach(block => { blocks.push(block.clientId); changedAttributes[block.clientId] = getUpdatedLinkTargetSettings(newLinkTarget, block.attributes); }); updateBlockAttributes(blocks, changedAttributes, true); const noticeText = openInNewTab ? Object(external_wp_i18n_["__"])('All gallery images updated to open in new tab') : Object(external_wp_i18n_["__"])('All gallery images updated to not open in new tab'); createSuccessNotice(noticeText, { id: 'gallery-attributes-openInNewTab', type: 'snackbar' }); } function updateImagesSize(newSizeSlug) { setAttributes({ sizeSlug: newSizeSlug }); const changedAttributes = {}; const blocks = []; getBlock(clientId).innerBlocks.forEach(block => { blocks.push(block.clientId); const image = block.attributes.id ? Object(external_lodash_["find"])(imageData, { id: block.attributes.id }) : null; changedAttributes[block.clientId] = getImageSizeAttributes(image, newSizeSlug); }); updateBlockAttributes(blocks, changedAttributes, true); const imageSize = imageSizeOptions.find(size => size.value === newSizeSlug); createSuccessNotice(Object(external_wp_i18n_["sprintf"])( /* translators: %s: image size settings */ Object(external_wp_i18n_["__"])('All gallery image sizes updated to: %s'), imageSize.label), { id: 'gallery-attributes-sizeSlug', type: 'snackbar' }); } Object(external_wp_element_["useEffect"])(() => { // linkTo attribute must be saved so blocks don't break when changing image_default_link_type in options.php if (!linkTo) { var _window, _window$wp, _window$wp$media, _window$wp$media$view, _window$wp$media$view2, _window$wp$media$view3; __unstableMarkNextChangeAsNotPersistent(); setAttributes({ linkTo: ((_window = window) === null || _window === void 0 ? void 0 : (_window$wp = _window.wp) === null || _window$wp === void 0 ? void 0 : (_window$wp$media = _window$wp.media) === null || _window$wp$media === void 0 ? void 0 : (_window$wp$media$view = _window$wp$media.view) === null || _window$wp$media$view === void 0 ? void 0 : (_window$wp$media$view2 = _window$wp$media$view.settings) === null || _window$wp$media$view2 === void 0 ? void 0 : (_window$wp$media$view3 = _window$wp$media$view2.defaultProps) === null || _window$wp$media$view3 === void 0 ? void 0 : _window$wp$media$view3.link) || LINK_DESTINATION_NONE }); } }, [linkTo]); const hasImages = !!images.length; const hasImageIds = hasImages && images.some(image => !!image.id); const imagesUploading = images.some(img => { var _img$url; return !img.id && ((_img$url = img.url) === null || _img$url === void 0 ? void 0 : _img$url.indexOf('blob:')) === 0; }); const mediaPlaceholder = Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], { addToGallery: hasImageIds, handleUpload: false, isAppender: hasImages, disableMediaButtons: hasImages && !isSelected || imagesUploading, icon: !hasImages && sharedIcon, labels: { title: !hasImages && Object(external_wp_i18n_["__"])('Gallery'), instructions: !hasImages && PLACEHOLDER_TEXT }, onSelect: updateImages, accept: "image/*", allowedTypes: edit_ALLOWED_MEDIA_TYPES, multiple: true, value: hasImageIds ? images : {}, onError: onUploadError, notices: hasImages ? undefined : noticeUI }); const blockProps = Object(external_wp_blockEditor_["useBlockProps"])({ className: classnames_default()(className, 'has-nested-images') }); if (!hasImages) { return Object(external_wp_element_["createElement"])(external_wp_primitives_["View"], blockProps, mediaPlaceholder); } const hasLinkTo = linkTo && linkTo !== 'none'; return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Gallery settings') }, images.length > 1 && Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], Object(esm_extends["a" /* default */])({ label: Object(external_wp_i18n_["__"])('Columns'), value: columns ? columns : defaultColumnsNumber(images.length), onChange: setColumnsNumber, min: 1, max: Math.min(MAX_COLUMNS, images.length) }, MOBILE_CONTROL_PROPS_RANGE_CONTROL, { required: true })), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Crop images'), checked: !!imageCrop, onChange: toggleImageCrop, help: getImageCropHelp }), Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], { label: Object(external_wp_i18n_["__"])('Link to'), value: linkTo, onChange: setLinkTo, options: linkOptions, hideCancelButton: true }), hasLinkTo && Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Open in new tab'), checked: linkTarget === '_blank', onChange: toggleOpenInNewTab }), (imageSizeOptions === null || imageSizeOptions === void 0 ? void 0 : imageSizeOptions.length) > 0 && Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], { label: Object(external_wp_i18n_["__"])('Image size'), value: sizeSlug, options: imageSizeOptions, onChange: updateImagesSize, hideCancelButton: true }), external_wp_element_["Platform"].isWeb && !imageSizeOptions && hasImageIds && Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"], { className: 'gallery-image-sizes' }, Object(external_wp_element_["createElement"])(external_wp_components_["BaseControl"].VisualLabel, null, Object(external_wp_i18n_["__"])('Image size')), Object(external_wp_element_["createElement"])(external_wp_primitives_["View"], { className: 'gallery-image-sizes__loading' }, Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null), Object(external_wp_i18n_["__"])('Loading options…'))))), noticeUI, Object(external_wp_element_["createElement"])(gallery_gallery, Object(esm_extends["a" /* default */])({}, props, { images: images, mediaPlaceholder: mediaPlaceholder, blockProps: blockProps, insertBlocksAfter: insertBlocksAfter }))); } /* harmony default export */ var gallery_edit = (Object(external_wp_compose_["compose"])([external_wp_components_["withNotices"], Object(external_wp_viewport_["withViewportMatch"])({ isNarrow: '< small' })])(GalleryEdit)); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/v1/shared.js /** * External dependencies */ const shared_pickRelevantMediaFiles = function (image) { let sizeSlug = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'large'; const imageProps = Object(external_lodash_["pick"])(image, ['alt', 'id', 'link', 'caption']); imageProps.url = Object(external_lodash_["get"])(image, ['sizes', sizeSlug, 'url']) || Object(external_lodash_["get"])(image, ['media_details', 'sizes', sizeSlug, 'source_url']) || image.url; const fullUrl = Object(external_lodash_["get"])(image, ['sizes', 'full', 'url']) || Object(external_lodash_["get"])(image, ['media_details', 'sizes', 'full', 'source_url']); if (fullUrl) { imageProps.fullUrl = fullUrl; } return imageProps; }; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/image.js /** * WordPress dependencies */ const image_image = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z" })); /* harmony default export */ var library_image = (image_image); // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-left.js var chevron_left = __webpack_require__("2gm7"); // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/chevron-right.js var chevron_right = __webpack_require__("1iEr"); // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js var close_small = __webpack_require__("bWcr"); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/v1/constants.js const v1_constants_LINK_DESTINATION_NONE = 'none'; const v1_constants_LINK_DESTINATION_MEDIA = 'file'; const v1_constants_LINK_DESTINATION_ATTACHMENT = 'post'; // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/v1/gallery-image.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ const isTemporaryImage = (id, url) => !id && Object(external_wp_blob_["isBlobURL"])(url); class gallery_image_GalleryImage extends external_wp_element_["Component"] { constructor() { super(...arguments); this.onSelectImage = this.onSelectImage.bind(this); this.onRemoveImage = this.onRemoveImage.bind(this); this.bindContainer = this.bindContainer.bind(this); this.onEdit = this.onEdit.bind(this); this.onSelectImageFromLibrary = this.onSelectImageFromLibrary.bind(this); this.onSelectCustomURL = this.onSelectCustomURL.bind(this); this.state = { isEditing: false }; } bindContainer(ref) { this.container = ref; } onSelectImage() { if (!this.props.isSelected) { this.props.onSelect(); } } onRemoveImage(event) { if (this.container === this.container.ownerDocument.activeElement && this.props.isSelected && [external_wp_keycodes_["BACKSPACE"], external_wp_keycodes_["DELETE"]].indexOf(event.keyCode) !== -1) { event.preventDefault(); this.props.onRemove(); } } onEdit() { this.setState({ isEditing: true }); } componentDidUpdate() { const { image, url, __unstableMarkNextChangeAsNotPersistent } = this.props; if (image && !url) { __unstableMarkNextChangeAsNotPersistent(); this.props.setAttributes({ url: image.source_url, alt: image.alt_text }); } } deselectOnBlur() { this.props.onDeselect(); } onSelectImageFromLibrary(media) { const { setAttributes, id, url, alt, caption, sizeSlug } = this.props; if (!media || !media.url) { return; } let mediaAttributes = shared_pickRelevantMediaFiles(media, sizeSlug); // If the current image is temporary but an alt text was meanwhile // written by the user, make sure the text is not overwritten. if (isTemporaryImage(id, url)) { if (alt) { mediaAttributes = Object(external_lodash_["omit"])(mediaAttributes, ['alt']); } } // If a caption text was meanwhile written by the user, // make sure the text is not overwritten by empty captions. if (caption && !Object(external_lodash_["get"])(mediaAttributes, ['caption'])) { mediaAttributes = Object(external_lodash_["omit"])(mediaAttributes, ['caption']); } setAttributes(mediaAttributes); this.setState({ isEditing: false }); } onSelectCustomURL(newURL) { const { setAttributes, url } = this.props; if (newURL !== url) { setAttributes({ url: newURL, id: undefined }); this.setState({ isEditing: false }); } } render() { const { url, alt, id, linkTo, link, isFirstItem, isLastItem, isSelected, caption, onRemove, onMoveForward, onMoveBackward, setAttributes, 'aria-label': ariaLabel } = this.props; const { isEditing } = this.state; let href; switch (linkTo) { case v1_constants_LINK_DESTINATION_MEDIA: href = url; break; case v1_constants_LINK_DESTINATION_ATTACHMENT: href = link; break; } const img = // Disable reason: Image itself is not meant to be interactive, but should // direct image selection and unfocus caption fields. /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */ Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])("img", { src: url, alt: alt, "data-id": id, onKeyDown: this.onRemoveImage, tabIndex: "0", "aria-label": ariaLabel, ref: this.bindContainer }), Object(external_wp_blob_["isBlobURL"])(url) && Object(external_wp_element_["createElement"])(external_wp_components_["Spinner"], null)) /* eslint-enable jsx-a11y/no-noninteractive-element-interactions */ ; const className = classnames_default()({ 'is-selected': isSelected, 'is-transient': Object(external_wp_blob_["isBlobURL"])(url) }); return (// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions Object(external_wp_element_["createElement"])("figure", { className: className, onClick: this.onSelectImage, onFocus: this.onSelectImage }, !isEditing && (href ? Object(external_wp_element_["createElement"])("a", { href: href }, img) : img), isEditing && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], { labels: { title: Object(external_wp_i18n_["__"])('Edit gallery image') }, icon: library_image, onSelect: this.onSelectImageFromLibrary, onSelectURL: this.onSelectCustomURL, accept: "image/*", allowedTypes: ['image'], value: { id, src: url } }), Object(external_wp_element_["createElement"])(external_wp_components_["ButtonGroup"], { className: "block-library-gallery-item__inline-menu is-left" }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { icon: chevron_left["a" /* default */], onClick: isFirstItem ? undefined : onMoveBackward, label: Object(external_wp_i18n_["__"])('Move image backward'), "aria-disabled": isFirstItem, disabled: !isSelected }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { icon: chevron_right["a" /* default */], onClick: isLastItem ? undefined : onMoveForward, label: Object(external_wp_i18n_["__"])('Move image forward'), "aria-disabled": isLastItem, disabled: !isSelected })), Object(external_wp_element_["createElement"])(external_wp_components_["ButtonGroup"], { className: "block-library-gallery-item__inline-menu is-right" }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { icon: library_edit["a" /* default */], onClick: this.onEdit, label: Object(external_wp_i18n_["__"])('Replace image'), disabled: !isSelected }), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { icon: close_small["a" /* default */], onClick: onRemove, label: Object(external_wp_i18n_["__"])('Remove image'), disabled: !isSelected })), !isEditing && (isSelected || caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], { tagName: "figcaption", "aria-label": Object(external_wp_i18n_["__"])('Image caption text'), placeholder: isSelected ? Object(external_wp_i18n_["__"])('Add caption') : null, value: caption, onChange: newCaption => setAttributes({ caption: newCaption }), inlineToolbar: true })) ); } } /* harmony default export */ var gallery_image = (Object(external_wp_compose_["compose"])([Object(external_wp_data_["withSelect"])((select, ownProps) => { const { getMedia } = select(external_wp_coreData_["store"]); const { id } = ownProps; return { image: id ? getMedia(parseInt(id, 10)) : null }; }), Object(external_wp_data_["withDispatch"])(dispatch => { const { __unstableMarkNextChangeAsNotPersistent } = dispatch(external_wp_blockEditor_["store"]); return { __unstableMarkNextChangeAsNotPersistent }; })])(gallery_image_GalleryImage)); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/v1/gallery.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ const gallery_Gallery = props => { const { attributes, isSelected, setAttributes, selectedImage, mediaPlaceholder, onMoveBackward, onMoveForward, onRemoveImage, onSelectImage, onDeselectImage, onSetImageAttributes, insertBlocksAfter, blockProps } = props; const { align, columns = defaultColumnsNumberV1(attributes), caption, imageCrop, images } = attributes; return Object(external_wp_element_["createElement"])("figure", Object(esm_extends["a" /* default */])({}, blockProps, { className: classnames_default()(blockProps.className, { [`align${align}`]: align, [`columns-${columns}`]: columns, 'is-cropped': imageCrop }) }), Object(external_wp_element_["createElement"])("ul", { className: "blocks-gallery-grid" }, images.map((img, index) => { const ariaLabel = Object(external_wp_i18n_["sprintf"])( /* translators: 1: the order number of the image. 2: the total number of images. */ Object(external_wp_i18n_["__"])('image %1$d of %2$d in gallery'), index + 1, images.length); return Object(external_wp_element_["createElement"])("li", { className: "blocks-gallery-item", key: img.id ? `${img.id}-${index}` : img.url }, Object(external_wp_element_["createElement"])(gallery_image, { url: img.url, alt: img.alt, id: img.id, isFirstItem: index === 0, isLastItem: index + 1 === images.length, isSelected: isSelected && selectedImage === index, onMoveBackward: onMoveBackward(index), onMoveForward: onMoveForward(index), onRemove: onRemoveImage(index), onSelect: onSelectImage(index), onDeselect: onDeselectImage(index), setAttributes: attrs => onSetImageAttributes(index, attrs), caption: img.caption, "aria-label": ariaLabel, sizeSlug: attributes.sizeSlug })); })), mediaPlaceholder, Object(external_wp_element_["createElement"])(gallery_RichTextVisibilityHelper, { isHidden: !isSelected && external_wp_blockEditor_["RichText"].isEmpty(caption), tagName: "figcaption", className: "blocks-gallery-caption", "aria-label": Object(external_wp_i18n_["__"])('Gallery caption text'), placeholder: Object(external_wp_i18n_["__"])('Write gallery caption…'), value: caption, onChange: value => setAttributes({ caption: value }), inlineToolbar: true, __unstableOnSplitAtEnd: () => insertBlocksAfter(Object(external_wp_blocks_["createBlock"])('core/paragraph')) })); }; function gallery_RichTextVisibilityHelper(_ref) { let { isHidden, ...richTextProps } = _ref; return isHidden ? Object(external_wp_element_["createElement"])(external_wp_components_["VisuallyHidden"], Object(esm_extends["a" /* default */])({ as: external_wp_blockEditor_["RichText"] }, richTextProps)) : Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"], richTextProps); } /* harmony default export */ var v1_gallery = (gallery_Gallery); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/v1/update-gallery-modal.js /** * WordPress dependencies */ /** * Internal dependencies */ const updateGallery = _ref => { let { clientId, getBlock, replaceBlocks } = _ref; return () => { let link; const { attributes: { sizeSlug, linkTo, images, caption } } = getBlock(clientId); switch (linkTo) { case 'post': link = v1_constants_LINK_DESTINATION_ATTACHMENT; break; case 'file': link = v1_constants_LINK_DESTINATION_MEDIA; break; default: link = v1_constants_LINK_DESTINATION_NONE; break; } const innerBlocks = images.map(image => Object(external_wp_blocks_["createBlock"])('core/image', { id: image.id ? parseInt(image.id, 10) : null, url: image.url, alt: image.alt, caption: image.caption, linkDestination: link })); replaceBlocks(clientId, Object(external_wp_blocks_["createBlock"])('core/gallery', { sizeSlug, linkTo: link, caption }, innerBlocks)); }; }; function UpdateGalleryModal(_ref2) { let { onClose, clientId } = _ref2; const { getBlock } = Object(external_wp_data_["useSelect"])(external_wp_blockEditor_["store"]); const { replaceBlocks } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]); return Object(external_wp_element_["createElement"])(external_wp_components_["Modal"], { closeLabel: Object(external_wp_i18n_["__"])('Close'), onRequestClose: onClose, title: Object(external_wp_i18n_["__"])('Update gallery'), className: 'wp-block-update-gallery-modal', aria: { describedby: 'wp-block-update-gallery-modal__description' } }, Object(external_wp_element_["createElement"])("p", { id: 'wp-block-update-gallery-modal__description' }, Object(external_wp_i18n_["__"])('Updating to the new format adds the ability to use custom links or styles on individual images in the gallery, and makes it easier to add or move them around.')), Object(external_wp_element_["createElement"])("div", { className: "wp-block-update-gallery-modal-buttons" }, Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { isTertiary: true, onClick: onClose }, Object(external_wp_i18n_["__"])('Cancel')), Object(external_wp_element_["createElement"])(external_wp_components_["Button"], { isPrimary: true, onClick: updateGallery({ replaceBlocks, getBlock, clientId, createBlock: external_wp_blocks_["createBlock"] }) }, Object(external_wp_i18n_["__"])('Update')))); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/v1/edit.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ const edit_MAX_COLUMNS = 8; const edit_linkOptions = [{ value: v1_constants_LINK_DESTINATION_ATTACHMENT, label: Object(external_wp_i18n_["__"])('Attachment Page') }, { value: v1_constants_LINK_DESTINATION_MEDIA, label: Object(external_wp_i18n_["__"])('Media File') }, { value: v1_constants_LINK_DESTINATION_NONE, label: Object(external_wp_i18n_["__"])('None') }]; const v1_edit_ALLOWED_MEDIA_TYPES = ['image']; const edit_PLACEHOLDER_TEXT = external_wp_element_["Platform"].select({ web: Object(external_wp_i18n_["__"])('Drag images, upload new ones or select files from your library.'), native: Object(external_wp_i18n_["__"])('ADD MEDIA') }); const edit_MOBILE_CONTROL_PROPS_RANGE_CONTROL = external_wp_element_["Platform"].select({ web: {}, native: { type: 'stepper' } }); function edit_GalleryEdit(props) { const { attributes, clientId, isSelected, noticeUI, noticeOperations, onFocus } = props; const { columns = defaultColumnsNumberV1(attributes), imageCrop, images, linkTo, sizeSlug } = attributes; const [selectedImage, setSelectedImage] = Object(external_wp_element_["useState"])(); const [attachmentCaptions, setAttachmentCaptions] = Object(external_wp_element_["useState"])(); const { __unstableMarkNextChangeAsNotPersistent } = Object(external_wp_data_["useDispatch"])(external_wp_blockEditor_["store"]); const { imageSizes, mediaUpload, getMedia, wasBlockJustInserted, __unstableGalleryWithImageBlocks } = Object(external_wp_data_["useSelect"])(select => { const settings = select(external_wp_blockEditor_["store"]).getSettings(); return { __unstableGalleryWithImageBlocks: settings.__unstableGalleryWithImageBlocks, imageSizes: settings.imageSizes, mediaUpload: settings.mediaUpload, getMedia: select(external_wp_coreData_["store"]).getMedia, wasBlockJustInserted: select(external_wp_blockEditor_["store"]).wasBlockJustInserted(clientId, 'inserter_menu') }; }); const resizedImages = Object(external_wp_element_["useMemo"])(() => { if (isSelected) { return Object(external_lodash_["reduce"])(attributes.ids, (currentResizedImages, id) => { if (!id) { return currentResizedImages; } const image = getMedia(id); const sizes = Object(external_lodash_["reduce"])(imageSizes, (currentSizes, size) => { const defaultUrl = Object(external_lodash_["get"])(image, ['sizes', size.slug, 'url']); const mediaDetailsUrl = Object(external_lodash_["get"])(image, ['media_details', 'sizes', size.slug, 'source_url']); return { ...currentSizes, [size.slug]: defaultUrl || mediaDetailsUrl }; }, {}); return { ...currentResizedImages, [parseInt(id, 10)]: sizes }; }, {}); } return {}; }, [isSelected, attributes.ids, imageSizes]); function onFocusGalleryCaption() { setSelectedImage(); } function setAttributes(newAttrs) { if (newAttrs.ids) { throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes'); } if (newAttrs.images) { newAttrs = { ...newAttrs, // Unlike images[ n ].id which is a string, always ensure the // ids array contains numbers as per its attribute type. ids: Object(external_lodash_["map"])(newAttrs.images, _ref => { let { id } = _ref; return parseInt(id, 10); }) }; } props.setAttributes(newAttrs); } function onSelectImage(index) { return () => { setSelectedImage(index); }; } function onDeselectImage() { return () => { setSelectedImage(); }; } function onMove(oldIndex, newIndex) { const newImages = [...images]; newImages.splice(newIndex, 1, images[oldIndex]); newImages.splice(oldIndex, 1, images[newIndex]); setSelectedImage(newIndex); setAttributes({ images: newImages }); } function onMoveForward(oldIndex) { return () => { if (oldIndex === images.length - 1) { return; } onMove(oldIndex, oldIndex + 1); }; } function onMoveBackward(oldIndex) { return () => { if (oldIndex === 0) { return; } onMove(oldIndex, oldIndex - 1); }; } function onRemoveImage(index) { return () => { const newImages = Object(external_lodash_["filter"])(images, (img, i) => index !== i); setSelectedImage(); setAttributes({ images: newImages, columns: attributes.columns ? Math.min(newImages.length, attributes.columns) : attributes.columns }); }; } function selectCaption(newImage) { // The image id in both the images and attachmentCaptions arrays is a // string, so ensure comparison works correctly by converting the // newImage.id to a string. const newImageId = Object(external_lodash_["toString"])(newImage.id); const currentImage = Object(external_lodash_["find"])(images, { id: newImageId }); const currentImageCaption = currentImage ? currentImage.caption : newImage.caption; if (!attachmentCaptions) { return currentImageCaption; } const attachment = Object(external_lodash_["find"])(attachmentCaptions, { id: newImageId }); // if the attachment caption is updated if (attachment && attachment.caption !== newImage.caption) { return newImage.caption; } return currentImageCaption; } function onSelectImages(newImages) { setAttachmentCaptions(newImages.map(newImage => ({ // Store the attachmentCaption id as a string for consistency // with the type of the id in the images attribute. id: Object(external_lodash_["toString"])(newImage.id), caption: newImage.caption }))); setAttributes({ images: newImages.map(newImage => ({ ...shared_pickRelevantMediaFiles(newImage, sizeSlug), caption: selectCaption(newImage, images, attachmentCaptions), // The id value is stored in a data attribute, so when the // block is parsed it's converted to a string. Converting // to a string here ensures it's type is consistent. id: Object(external_lodash_["toString"])(newImage.id) })), columns: attributes.columns ? Math.min(newImages.length, attributes.columns) : attributes.columns }); } function onUploadError(message) { noticeOperations.removeAllNotices(); noticeOperations.createErrorNotice(message); } function setLinkTo(value) { setAttributes({ linkTo: value }); } function setColumnsNumber(value) { setAttributes({ columns: value }); } function toggleImageCrop() { setAttributes({ imageCrop: !imageCrop }); } function getImageCropHelp(checked) { return checked ? Object(external_wp_i18n_["__"])('Thumbnails are cropped to align.') : Object(external_wp_i18n_["__"])('Thumbnails are not cropped.'); } function setImageAttributes(index, newAttributes) { if (!images[index]) { return; } setAttributes({ images: [...images.slice(0, index), { ...images[index], ...newAttributes }, ...images.slice(index + 1)] }); } function getImagesSizeOptions() { return Object(external_lodash_["map"])(Object(external_lodash_["filter"])(imageSizes, _ref2 => { let { slug } = _ref2; return Object(external_lodash_["some"])(resizedImages, sizes => sizes[slug]); }), _ref3 => { let { name, slug } = _ref3; return { value: slug, label: name }; }); } function updateImagesSize(newSizeSlug) { const updatedImages = Object(external_lodash_["map"])(images, image => { if (!image.id) { return image; } const url = Object(external_lodash_["get"])(resizedImages, [parseInt(image.id, 10), newSizeSlug]); return { ...image, ...(url && { url }) }; }); setAttributes({ images: updatedImages, sizeSlug: newSizeSlug }); } Object(external_wp_element_["useEffect"])(() => { if (external_wp_element_["Platform"].OS === 'web' && images && images.length > 0 && Object(external_lodash_["every"])(images, _ref4 => { let { url } = _ref4; return Object(external_wp_blob_["isBlobURL"])(url); })) { const filesList = Object(external_lodash_["map"])(images, _ref5 => { let { url } = _ref5; return Object(external_wp_blob_["getBlobByURL"])(url); }); Object(external_lodash_["forEach"])(images, _ref6 => { let { url } = _ref6; return Object(external_wp_blob_["revokeBlobURL"])(url); }); mediaUpload({ filesList, onFileChange: onSelectImages, allowedTypes: ['image'] }); } }, []); Object(external_wp_element_["useEffect"])(() => { // Deselect images when deselecting the block if (!isSelected) { setSelectedImage(); } }, [isSelected]); Object(external_wp_element_["useEffect"])(() => { // linkTo attribute must be saved so blocks don't break when changing // image_default_link_type in options.php if (!linkTo) { var _window, _window$wp, _window$wp$media, _window$wp$media$view, _window$wp$media$view2, _window$wp$media$view3; __unstableMarkNextChangeAsNotPersistent(); setAttributes({ linkTo: ((_window = window) === null || _window === void 0 ? void 0 : (_window$wp = _window.wp) === null || _window$wp === void 0 ? void 0 : (_window$wp$media = _window$wp.media) === null || _window$wp$media === void 0 ? void 0 : (_window$wp$media$view = _window$wp$media.view) === null || _window$wp$media$view === void 0 ? void 0 : (_window$wp$media$view2 = _window$wp$media$view.settings) === null || _window$wp$media$view2 === void 0 ? void 0 : (_window$wp$media$view3 = _window$wp$media$view2.defaultProps) === null || _window$wp$media$view3 === void 0 ? void 0 : _window$wp$media$view3.link) || v1_constants_LINK_DESTINATION_NONE }); } }, [linkTo]); const hasImages = !!images.length; const hasImageIds = hasImages && images.some(image => !!image.id); const mediaPlaceholder = Object(external_wp_element_["createElement"])(external_wp_blockEditor_["MediaPlaceholder"], { addToGallery: hasImageIds, isAppender: hasImages, disableMediaButtons: hasImages && !isSelected, icon: !hasImages && sharedIcon, labels: { title: !hasImages && Object(external_wp_i18n_["__"])('Gallery'), instructions: !hasImages && edit_PLACEHOLDER_TEXT }, onSelect: onSelectImages, accept: "image/*", allowedTypes: v1_edit_ALLOWED_MEDIA_TYPES, multiple: true, value: hasImageIds ? images : {}, onError: onUploadError, notices: hasImages ? undefined : noticeUI, onFocus: onFocus, autoOpenMediaUpload: !hasImages && isSelected && wasBlockJustInserted }); const [isUpdateOpen, setUpdateOpen] = Object(external_wp_element_["useState"])(false); const openUpdateModal = () => setUpdateOpen(true); const closeUpdateModal = () => setUpdateOpen(false); const blockProps = Object(external_wp_blockEditor_["useBlockProps"])(); if (!hasImages) { return Object(external_wp_element_["createElement"])(external_wp_primitives_["View"], blockProps, mediaPlaceholder); } const imageSizeOptions = getImagesSizeOptions(); const shouldShowSizeOptions = hasImages && !Object(external_lodash_["isEmpty"])(imageSizeOptions); return Object(external_wp_element_["createElement"])(external_wp_element_["Fragment"], null, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InspectorControls"], null, Object(external_wp_element_["createElement"])(external_wp_components_["PanelBody"], { title: Object(external_wp_i18n_["__"])('Gallery settings') }, images.length > 1 && Object(external_wp_element_["createElement"])(external_wp_components_["RangeControl"], Object(esm_extends["a" /* default */])({ label: Object(external_wp_i18n_["__"])('Columns'), value: columns, onChange: setColumnsNumber, min: 1, max: Math.min(edit_MAX_COLUMNS, images.length) }, edit_MOBILE_CONTROL_PROPS_RANGE_CONTROL, { required: true })), Object(external_wp_element_["createElement"])(external_wp_components_["ToggleControl"], { label: Object(external_wp_i18n_["__"])('Crop images'), checked: !!imageCrop, onChange: toggleImageCrop, help: getImageCropHelp }), Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], { label: Object(external_wp_i18n_["__"])('Link to'), value: linkTo, onChange: setLinkTo, options: edit_linkOptions, hideCancelButton: true }), shouldShowSizeOptions && Object(external_wp_element_["createElement"])(external_wp_components_["SelectControl"], { label: Object(external_wp_i18n_["__"])('Image size'), value: sizeSlug, options: imageSizeOptions, onChange: updateImagesSize, hideCancelButton: true }))), external_wp_element_["Platform"].isWeb && __unstableGalleryWithImageBlocks && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["BlockControls"], { group: "other" }, Object(external_wp_element_["createElement"])(external_wp_components_["ToolbarButton"], { onClick: openUpdateModal, title: Object(external_wp_i18n_["__"])('Update'), label: Object(external_wp_i18n_["__"])('Update to the new gallery format') }, Object(external_wp_i18n_["__"])('Update'))), external_wp_element_["Platform"].isWeb && isUpdateOpen && Object(external_wp_element_["createElement"])(UpdateGalleryModal, { onClose: closeUpdateModal, clientId: clientId }), noticeUI, Object(external_wp_element_["createElement"])(v1_gallery, Object(esm_extends["a" /* default */])({}, props, { selectedImage: selectedImage, mediaPlaceholder: mediaPlaceholder, onMoveBackward: onMoveBackward, onMoveForward: onMoveForward, onRemoveImage: onRemoveImage, onSelectImage: onSelectImage, onDeselectImage: onDeselectImage, onSetImageAttributes: setImageAttributes, blockProps: blockProps // This prop is used by gallery.native.js. , onFocusGalleryCaption: onFocusGalleryCaption }))); } /* harmony default export */ var v1_edit = (Object(external_wp_compose_["compose"])([external_wp_components_["withNotices"], Object(external_wp_viewport_["withViewportMatch"])({ isNarrow: '< small' })])(edit_GalleryEdit)); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/edit-wrapper.js /** * WordPress dependencies */ /** * Internal dependencies */ /* * Using a wrapper around the logic to load the edit for v1 of Gallery block * or the refactored version with InnerBlocks. This is to prevent conditional * use of hooks lint errors if adding this logic to the top of the edit component. */ function GalleryEditWrapper(props) { var _attributes$ids, _attributes$images; const { attributes, clientId } = props; const innerBlockImages = Object(external_wp_data_["useSelect"])(select => { var _select$getBlock; return (_select$getBlock = select(external_wp_blockEditor_["store"]).getBlock(clientId)) === null || _select$getBlock === void 0 ? void 0 : _select$getBlock.innerBlocks; }, [clientId]); const __unstableGalleryWithImageBlocks = Object(external_wp_data_["useSelect"])(select => { const settings = select(external_wp_blockEditor_["store"]).getSettings(); return settings.__unstableGalleryWithImageBlocks; }, []); // This logic is used to infer version information from content with higher // precedence than the flag. New galleries (and existing empty galleries) will // honor the flag. const hasNewVersionContent = !!(innerBlockImages !== null && innerBlockImages !== void 0 && innerBlockImages.length); const hasOldVersionContent = 0 < (attributes === null || attributes === void 0 ? void 0 : (_attributes$ids = attributes.ids) === null || _attributes$ids === void 0 ? void 0 : _attributes$ids.length) || 0 < (attributes === null || attributes === void 0 ? void 0 : (_attributes$images = attributes.images) === null || _attributes$images === void 0 ? void 0 : _attributes$images.length); if (hasOldVersionContent || !hasNewVersionContent && !__unstableGalleryWithImageBlocks) { return Object(external_wp_element_["createElement"])(v1_edit, props); } return Object(external_wp_element_["createElement"])(gallery_edit, props); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/v1/save.js /** * WordPress dependencies */ /** * Internal dependencies */ function saveV1(_ref) { let { attributes } = _ref; const { images, columns = defaultColumnsNumberV1(attributes), imageCrop, caption, linkTo } = attributes; const className = `columns-${columns} ${imageCrop ? 'is-cropped' : ''}`; return Object(external_wp_element_["createElement"])("figure", external_wp_blockEditor_["useBlockProps"].save({ className }), Object(external_wp_element_["createElement"])("ul", { className: "blocks-gallery-grid" }, images.map(image => { let href; switch (linkTo) { case v1_constants_LINK_DESTINATION_MEDIA: href = image.fullUrl || image.url; break; case v1_constants_LINK_DESTINATION_ATTACHMENT: href = image.link; break; } const img = Object(external_wp_element_["createElement"])("img", { src: image.url, alt: image.alt, "data-id": image.id, "data-full-url": image.fullUrl, "data-link": image.link, className: image.id ? `wp-image-${image.id}` : null }); return Object(external_wp_element_["createElement"])("li", { key: image.id || image.url, className: "blocks-gallery-item" }, Object(external_wp_element_["createElement"])("figure", null, href ? Object(external_wp_element_["createElement"])("a", { href: href }, img) : img, !external_wp_blockEditor_["RichText"].isEmpty(image.caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", className: "blocks-gallery-item__caption", value: image.caption }))); })), !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", className: "blocks-gallery-caption", value: caption })); } // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/save.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ function saveWithInnerBlocks(_ref) { var _attributes$ids, _attributes$images; let { attributes } = _ref; if ((attributes === null || attributes === void 0 ? void 0 : (_attributes$ids = attributes.ids) === null || _attributes$ids === void 0 ? void 0 : _attributes$ids.length) > 0 || (attributes === null || attributes === void 0 ? void 0 : (_attributes$images = attributes.images) === null || _attributes$images === void 0 ? void 0 : _attributes$images.length) > 0) { return saveV1({ attributes }); } const { caption, columns, imageCrop } = attributes; const className = classnames_default()('has-nested-images', { [`columns-${columns}`]: columns !== undefined, [`columns-default`]: columns === undefined, 'is-cropped': imageCrop }); const blockProps = external_wp_blockEditor_["useBlockProps"].save({ className }); const innerBlocksProps = external_wp_blockEditor_["useInnerBlocksProps"].save(blockProps); return Object(external_wp_element_["createElement"])("figure", innerBlocksProps, innerBlocksProps.children, !external_wp_blockEditor_["RichText"].isEmpty(caption) && Object(external_wp_element_["createElement"])(external_wp_blockEditor_["RichText"].Content, { tagName: "figcaption", className: "blocks-gallery-caption", value: caption })); } // EXTERNAL MODULE: external ["wp","hooks"] var external_wp_hooks_ = __webpack_require__("g56x"); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/transforms.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ const parseShortcodeIds = ids => { if (!ids) { return []; } return ids.split(',').map(id => parseInt(id, 10)); }; /** * Third party block plugins don't have an easy way to detect if the * innerBlocks version of the Gallery is running when they run a * 3rdPartyBlock -> GalleryBlock transform so this tranform filter * will handle this. Once the innerBlocks version is the default * in a core release, this could be deprecated and removed after * plugin authors have been given time to update transforms. * * @typedef {Object} Attributes * @typedef {Object} Block * @property {Attributes} attributes The attributes of the block. * @param {Block} block The transformed block. * @return {Block} The transformed block. */ function updateThirdPartyTransformToGallery(block) { var _block$attributes; const settings = Object(external_wp_data_["select"])(external_wp_blockEditor_["store"]).getSettings(); if (settings.__unstableGalleryWithImageBlocks && block.name === 'core/gallery' && ((_block$attributes = block.attributes) === null || _block$attributes === void 0 ? void 0 : _block$attributes.images.length) > 0) { const innerBlocks = block.attributes.images.map(_ref => { let { url, id, alt } = _ref; return Object(external_wp_blocks_["createBlock"])('core/image', { url, id: id ? parseInt(id, 10) : null, alt, sizeSlug: block.attributes.sizeSlug, linkDestination: block.attributes.linkDestination }); }); delete block.attributes.ids; delete block.attributes.images; block.innerBlocks = innerBlocks; } return block; } Object(external_wp_hooks_["addFilter"])('blocks.switchToBlockType.transformedBlock', 'core/gallery/update-third-party-transform-to', updateThirdPartyTransformToGallery); /** * Third party block plugins don't have an easy way to detect if the * innerBlocks version of the Gallery is running when they run a * GalleryBlock -> 3rdPartyBlock transform so this transform filter * will handle this. Once the innerBlocks version is the default * in a core release, this could be deprecated and removed after * plugin authors have been given time to update transforms. * * @typedef {Object} Attributes * @typedef {Object} Block * @property {Attributes} attributes The attributes of the block. * @param {Block} toBlock The block to transform to. * @param {Block[]} fromBlocks The blocks to transform from. * @return {Block} The transformed block. */ function updateThirdPartyTransformFromGallery(toBlock, fromBlocks) { const from = Array.isArray(fromBlocks) ? fromBlocks : [fromBlocks]; const galleryBlock = from.find(transformedBlock => { var _transformedBlock$att; return transformedBlock.name === 'core/gallery' && transformedBlock.innerBlocks.length > 0 && !((_transformedBlock$att = transformedBlock.attributes.images) !== null && _transformedBlock$att !== void 0 && _transformedBlock$att.length) > 0 && !toBlock.name.includes('core/'); }); if (galleryBlock) { const images = galleryBlock.innerBlocks.map(_ref2 => { let { attributes: { url, id, alt } } = _ref2; return { url, id: id ? parseInt(id, 10) : null, alt }; }); const ids = images.map(_ref3 => { let { id } = _ref3; return id; }); galleryBlock.attributes.images = images; galleryBlock.attributes.ids = ids; } return toBlock; } Object(external_wp_hooks_["addFilter"])('blocks.switchToBlockType.transformedBlock', 'core/gallery/update-third-party-transform-from', updateThirdPartyTransformFromGallery); const gallery_transforms_transforms = { from: [{ type: 'block', isMultiBlock: true, blocks: ['core/image'], transform: attributes => { // Init the align and size from the first item which may be either the placeholder or an image. let { align, sizeSlug } = attributes[0]; // Loop through all the images and check if they have the same align and size. align = Object(external_lodash_["every"])(attributes, ['align', align]) ? align : undefined; sizeSlug = Object(external_lodash_["every"])(attributes, ['sizeSlug', sizeSlug]) ? sizeSlug : undefined; const validImages = Object(external_lodash_["filter"])(attributes, _ref4 => { let { url } = _ref4; return url; }); const settings = Object(external_wp_data_["select"])(external_wp_blockEditor_["store"]).getSettings(); if (settings.__unstableGalleryWithImageBlocks) { const innerBlocks = validImages.map(image => { return Object(external_wp_blocks_["createBlock"])('core/image', image); }); return Object(external_wp_blocks_["createBlock"])('core/gallery', { align, sizeSlug }, innerBlocks); } return Object(external_wp_blocks_["createBlock"])('core/gallery', { images: validImages.map(_ref5 => { let { id, url, alt, caption } = _ref5; return { id: Object(external_lodash_["toString"])(id), url, alt, caption }; }), ids: validImages.map(_ref6 => { let { id } = _ref6; return parseInt(id, 10); }), align, sizeSlug }); } }, { type: 'shortcode', tag: 'gallery', attributes: { images: { type: 'array', shortcode: _ref7 => { let { named: { ids } } = _ref7; const settings = Object(external_wp_data_["select"])(external_wp_blockEditor_["store"]).getSettings(); if (!settings.__unstableGalleryWithImageBlocks) { return parseShortcodeIds(ids).map(id => ({ id: Object(external_lodash_["toString"])(id) })); } } }, ids: { type: 'array', shortcode: _ref8 => { let { named: { ids } } = _ref8; const settings = Object(external_wp_data_["select"])(external_wp_blockEditor_["store"]).getSettings(); if (!settings.__unstableGalleryWithImageBlocks) { return parseShortcodeIds(ids); } } }, shortCodeTransforms: { type: 'array', shortcode: _ref9 => { let { named: { ids } } = _ref9; const settings = Object(external_wp_data_["select"])(external_wp_blockEditor_["store"]).getSettings(); if (settings.__unstableGalleryWithImageBlocks) { return parseShortcodeIds(ids).map(id => ({ id: parseInt(id) })); } } }, columns: { type: 'number', shortcode: _ref10 => { let { named: { columns = '3' } } = _ref10; return parseInt(columns, 10); } }, linkTo: { type: 'string', shortcode: _ref11 => { let { named: { link } } = _ref11; const settings = Object(external_wp_data_["select"])(external_wp_blockEditor_["store"]).getSettings(); if (!settings.__unstableGalleryWithImageBlocks) { switch (link) { case 'post': return v1_constants_LINK_DESTINATION_ATTACHMENT; case 'file': return v1_constants_LINK_DESTINATION_MEDIA; default: return v1_constants_LINK_DESTINATION_ATTACHMENT; } } switch (link) { case 'post': return LINK_DESTINATION_ATTACHMENT; case 'file': return LINK_DESTINATION_MEDIA; default: return LINK_DESTINATION_NONE; } } } }, isMatch(_ref12) { let { named } = _ref12; return undefined !== named.ids; } }, { // When created by drag and dropping multiple files on an insertion point. Because multiple // files must not be transformed to a gallery when dropped within a gallery there is another transform // within the image block to handle that case. Therefore this transform has to have priority 1 // set so that it overrrides the image block transformation when mulitple images are dropped outside // of a gallery block. type: 'files', priority: 1, isMatch(files) { return files.length !== 1 && Object(external_lodash_["every"])(files, file => file.type.indexOf('image/') === 0); }, transform(files) { const settings = Object(external_wp_data_["select"])(external_wp_blockEditor_["store"]).getSettings(); if (settings.__unstableGalleryWithImageBlocks) { const innerBlocks = files.map(file => Object(external_wp_blocks_["createBlock"])('core/image', { url: Object(external_wp_blob_["createBlobURL"])(file) })); return Object(external_wp_blocks_["createBlock"])('core/gallery', {}, innerBlocks); } const block = Object(external_wp_blocks_["createBlock"])('core/gallery', { images: files.map(file => pickRelevantMediaFiles({ url: Object(external_wp_blob_["createBlobURL"])(file) })) }); return block; } }], to: [{ type: 'block', blocks: ['core/image'], transform: (_ref13, innerBlocks) => { let { align, images, ids, sizeSlug } = _ref13; const settings = Object(external_wp_data_["select"])(external_wp_blockEditor_["store"]).getSettings(); if (settings.__unstableGalleryWithImageBlocks) { if (innerBlocks.length > 0) { return innerBlocks.map(_ref14 => { let { attributes: { id, url, alt, caption, imageSizeSlug } } = _ref14; return Object(external_wp_blocks_["createBlock"])('core/image', { id, url, alt, caption, sizeSlug: imageSizeSlug, align }); }); } return Object(external_wp_blocks_["createBlock"])('core/image', { align }); } if (images.length > 0) { return images.map((_ref15, index) => { let { url, alt, caption } = _ref15; return Object(external_wp_blocks_["createBlock"])('core/image', { id: ids[index], url, alt, caption, align, sizeSlug }); }); } return Object(external_wp_blocks_["createBlock"])('core/image', { align }); } }] }; /* harmony default export */ var gallery_transforms = (gallery_transforms_transforms); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/gallery/index.js /** * WordPress dependencies */ /** * Internal dependencies */ const gallery_metadata = { apiVersion: 2, name: "core/gallery", title: "Gallery", category: "media", description: "Display multiple images in a rich gallery.", keywords: ["images", "photos"], textdomain: "default", attributes: { images: { type: "array", "default": [], source: "query", selector: ".blocks-gallery-item", query: { url: { type: "string", source: "attribute", selector: "img", attribute: "src" }, fullUrl: { type: "string", source: "attribute", selector: "img", attribute: "data-full-url" }, link: { type: "string", source: "attribute", selector: "img", attribute: "data-link" }, alt: { type: "string", source: "attribute", selector: "img", attribute: "alt", "default": "" }, id: { type: "string", source: "attribute", selector: "img", attribute: "data-id" }, caption: { type: "string", source: "html", selector: ".blocks-gallery-item__caption" } } }, ids: { type: "array", items: { type: "number" }, "default": [] }, shortCodeTransforms: { type: "array", "default": [], items: { type: "object" } }, columns: { type: "number", minimum: 1, maximum: 8 }, caption: { type: "string", source: "html", selector: ".blocks-gallery-caption" }, imageCrop: { type: "boolean", "default": true }, fixedHeight: { type: "boolean", "default": true }, linkTarget: { type: "string" }, linkTo: { type: "string" }, sizeSlug: { type: "string", "default": "large" }, allowResize: { type: "boolean", "default": false } }, providesContext: { allowResize: "allowResize", imageCrop: "imageCrop", fixedHeight: "fixedHeight" }, supports: { anchor: true, align: true }, editorStyle: "wp-block-gallery-editor", style: "wp-block-gallery" }; const { name: gallery_name } = gallery_metadata; const gallery_settings = { icon: library_gallery, example: { attributes: { columns: 2 }, innerBlocks: [{ name: 'core/image', attributes: { url: 'https://s.w.org/images/core/5.3/Glacial_lakes%2C_Bhutan.jpg' } }, { name: 'core/image', attributes: { url: 'https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg' } }] }, transforms: gallery_transforms, edit: GalleryEditWrapper, save: saveWithInnerBlocks, deprecated: gallery_deprecated }; // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/group.js var library_group = __webpack_require__("u6za"); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/deprecated.js /** * External dependencies */ /** * WordPress dependencies */ const migrateAttributes = attributes => { if (!attributes.tagName) { attributes = { ...attributes, tagName: 'div' }; } if (!attributes.customTextColor && !attributes.customBackgroundColor) { return attributes; } const style = { color: {} }; if (attributes.customTextColor) { style.color.text = attributes.customTextColor; } if (attributes.customBackgroundColor) { style.color.background = attributes.customBackgroundColor; } return { ...Object(external_lodash_["omit"])(attributes, ['customTextColor', 'customBackgroundColor']), style }; }; const group_deprecated_deprecated = [// Version of the block with the double div. { attributes: { tagName: { type: 'string', default: 'div' }, templateLock: { type: 'string' } }, supports: { align: ['wide', 'full'], anchor: true, color: { gradients: true, link: true }, spacing: { padding: true }, __experimentalBorder: { radius: true } }, save(_ref) { let { attributes } = _ref; const { tagName: Tag } = attributes; return Object(external_wp_element_["createElement"])(Tag, external_wp_blockEditor_["useBlockProps"].save(), Object(external_wp_element_["createElement"])("div", { className: "wp-block-group__inner-container" }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null))); } }, // Version of the block without global styles support { attributes: { backgroundColor: { type: 'string' }, customBackgroundColor: { type: 'string' }, textColor: { type: 'string' }, customTextColor: { type: 'string' } }, supports: { align: ['wide', 'full'], anchor: true, html: false }, migrate: migrateAttributes, save(_ref2) { let { attributes } = _ref2; const { backgroundColor, customBackgroundColor, textColor, customTextColor } = attributes; const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor); const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor); const className = classnames_default()(backgroundClass, textClass, { 'has-text-color': textColor || customTextColor, 'has-background': backgroundColor || customBackgroundColor }); const styles = { backgroundColor: backgroundClass ? undefined : customBackgroundColor, color: textClass ? undefined : customTextColor }; return Object(external_wp_element_["createElement"])("div", { className: className, style: styles }, Object(external_wp_element_["createElement"])("div", { className: "wp-block-group__inner-container" }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null))); } }, // Version of the group block with a bug that made text color class not applied. { attributes: { backgroundColor: { type: 'string' }, customBackgroundColor: { type: 'string' }, textColor: { type: 'string' }, customTextColor: { type: 'string' } }, migrate: migrateAttributes, supports: { align: ['wide', 'full'], anchor: true, html: false }, save(_ref3) { let { attributes } = _ref3; const { backgroundColor, customBackgroundColor, textColor, customTextColor } = attributes; const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor); const textClass = Object(external_wp_blockEditor_["getColorClassName"])('color', textColor); const className = classnames_default()(backgroundClass, { 'has-text-color': textColor || customTextColor, 'has-background': backgroundColor || customBackgroundColor }); const styles = { backgroundColor: backgroundClass ? undefined : customBackgroundColor, color: textClass ? undefined : customTextColor }; return Object(external_wp_element_["createElement"])("div", { className: className, style: styles }, Object(external_wp_element_["createElement"])("div", { className: "wp-block-group__inner-container" }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null))); } }, // v1 of group block. Deprecated to add an inner-container div around `InnerBlocks.Content`. { attributes: { backgroundColor: { type: 'string' }, customBackgroundColor: { type: 'string' } }, supports: { align: ['wide', 'full'], anchor: true, html: false }, migrate: migrateAttributes, save(_ref4) { let { attributes } = _ref4; const { backgroundColor, customBackgroundColor } = attributes; const backgroundClass = Object(external_wp_blockEditor_["getColorClassName"])('background-color', backgroundColor); const className = classnames_default()(backgroundClass, { 'has-background': backgroundColor || customBackgroundColor }); const styles = { backgroundColor: backgroundClass ? undefined : customBackgroundColor }; return Object(external_wp_element_["createElement"])("div", { className: className, style: styles }, Object(external_wp_element_["createElement"])(external_wp_blockEditor_["InnerBlocks"].Content, null)); } }]; /* harmony default export */ var group_deprecated = (group_deprecated_deprecated); // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/group/edit.js /** * WordPress dependencies */ const htmlElementMessages = { header: Object(external_wp_i18n_["__"])('The
element should represent introductory content, typically a group of introductory or navigational aids.'), main: Object(external_wp_i18n_["__"])('The
element should be used for the primary content of your document only. '), section: Object(external_wp_i18n_["__"])("The
element should represent a standalone portion of the document that can't be better represented by another element."), article: Object(external_wp_i18n_["__"])('The
element should represent a self contained, syndicatable portion of the document.'), aside: Object(external_wp_i18n_["__"])("The