1 this["wp"] = this["wp"] || {}; this["wp"]["plugins"] = |
1 /******/ (function() { // webpackBootstrap |
2 /******/ (function(modules) { // webpackBootstrap |
2 /******/ var __webpack_modules__ = ({ |
3 /******/ // The module cache |
3 |
4 /******/ var installedModules = {}; |
4 /***/ 9756: |
5 /******/ |
5 /***/ (function(module) { |
6 /******/ // The require function |
|
7 /******/ function __webpack_require__(moduleId) { |
|
8 /******/ |
|
9 /******/ // Check if module is in cache |
|
10 /******/ if(installedModules[moduleId]) { |
|
11 /******/ return installedModules[moduleId].exports; |
|
12 /******/ } |
|
13 /******/ // Create a new module (and put it into the cache) |
|
14 /******/ var module = installedModules[moduleId] = { |
|
15 /******/ i: moduleId, |
|
16 /******/ l: false, |
|
17 /******/ exports: {} |
|
18 /******/ }; |
|
19 /******/ |
|
20 /******/ // Execute the module function |
|
21 /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); |
|
22 /******/ |
|
23 /******/ // Flag the module as loaded |
|
24 /******/ module.l = true; |
|
25 /******/ |
|
26 /******/ // Return the exports of the module |
|
27 /******/ return module.exports; |
|
28 /******/ } |
|
29 /******/ |
|
30 /******/ |
|
31 /******/ // expose the modules object (__webpack_modules__) |
|
32 /******/ __webpack_require__.m = modules; |
|
33 /******/ |
|
34 /******/ // expose the module cache |
|
35 /******/ __webpack_require__.c = installedModules; |
|
36 /******/ |
|
37 /******/ // define getter function for harmony exports |
|
38 /******/ __webpack_require__.d = function(exports, name, getter) { |
|
39 /******/ if(!__webpack_require__.o(exports, name)) { |
|
40 /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); |
|
41 /******/ } |
|
42 /******/ }; |
|
43 /******/ |
|
44 /******/ // define __esModule on exports |
|
45 /******/ __webpack_require__.r = function(exports) { |
|
46 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
|
47 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
|
48 /******/ } |
|
49 /******/ Object.defineProperty(exports, '__esModule', { value: true }); |
|
50 /******/ }; |
|
51 /******/ |
|
52 /******/ // create a fake namespace object |
|
53 /******/ // mode & 1: value is a module id, require it |
|
54 /******/ // mode & 2: merge all properties of value into the ns |
|
55 /******/ // mode & 4: return value when already ns object |
|
56 /******/ // mode & 8|1: behave like require |
|
57 /******/ __webpack_require__.t = function(value, mode) { |
|
58 /******/ if(mode & 1) value = __webpack_require__(value); |
|
59 /******/ if(mode & 8) return value; |
|
60 /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; |
|
61 /******/ var ns = Object.create(null); |
|
62 /******/ __webpack_require__.r(ns); |
|
63 /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); |
|
64 /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); |
|
65 /******/ return ns; |
|
66 /******/ }; |
|
67 /******/ |
|
68 /******/ // getDefaultExport function for compatibility with non-harmony modules |
|
69 /******/ __webpack_require__.n = function(module) { |
|
70 /******/ var getter = module && module.__esModule ? |
|
71 /******/ function getDefault() { return module['default']; } : |
|
72 /******/ function getModuleExports() { return module; }; |
|
73 /******/ __webpack_require__.d(getter, 'a', getter); |
|
74 /******/ return getter; |
|
75 /******/ }; |
|
76 /******/ |
|
77 /******/ // Object.prototype.hasOwnProperty.call |
|
78 /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; |
|
79 /******/ |
|
80 /******/ // __webpack_public_path__ |
|
81 /******/ __webpack_require__.p = ""; |
|
82 /******/ |
|
83 /******/ |
|
84 /******/ // Load entry module and return exports |
|
85 /******/ return __webpack_require__(__webpack_require__.s = "ey5A"); |
|
86 /******/ }) |
|
87 /************************************************************************/ |
|
88 /******/ ({ |
|
89 |
|
90 /***/ "4eJC": |
|
91 /***/ (function(module, exports, __webpack_require__) { |
|
92 |
6 |
93 /** |
7 /** |
94 * Memize options object. |
8 * Memize options object. |
95 * |
9 * |
96 * @typedef MemizeOptions |
10 * @typedef MemizeOptions |
251 } |
165 } |
252 |
166 |
253 module.exports = memize; |
167 module.exports = memize; |
254 |
168 |
255 |
169 |
256 /***/ }), |
170 /***/ }) |
257 |
171 |
258 /***/ "GRId": |
172 /******/ }); |
259 /***/ (function(module, exports) { |
173 /************************************************************************/ |
260 |
174 /******/ // The module cache |
261 (function() { module.exports = window["wp"]["element"]; }()); |
175 /******/ var __webpack_module_cache__ = {}; |
262 |
176 /******/ |
263 /***/ }), |
177 /******/ // The require function |
264 |
178 /******/ function __webpack_require__(moduleId) { |
265 /***/ "K9lf": |
179 /******/ // Check if module is in cache |
266 /***/ (function(module, exports) { |
180 /******/ var cachedModule = __webpack_module_cache__[moduleId]; |
267 |
181 /******/ if (cachedModule !== undefined) { |
268 (function() { module.exports = window["wp"]["compose"]; }()); |
182 /******/ return cachedModule.exports; |
269 |
183 /******/ } |
270 /***/ }), |
184 /******/ // Create a new module (and put it into the cache) |
271 |
185 /******/ var module = __webpack_module_cache__[moduleId] = { |
272 /***/ "Tqx9": |
186 /******/ // no module.id needed |
273 /***/ (function(module, exports) { |
187 /******/ // no module.loaded needed |
274 |
188 /******/ exports: {} |
275 (function() { module.exports = window["wp"]["primitives"]; }()); |
189 /******/ }; |
276 |
190 /******/ |
277 /***/ }), |
191 /******/ // Execute the module function |
278 |
192 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
279 /***/ "YLtl": |
193 /******/ |
280 /***/ (function(module, exports) { |
194 /******/ // Return the exports of the module |
281 |
195 /******/ return module.exports; |
282 (function() { module.exports = window["lodash"]; }()); |
196 /******/ } |
283 |
197 /******/ |
284 /***/ }), |
198 /************************************************************************/ |
285 |
199 /******/ /* webpack/runtime/compat get default export */ |
286 /***/ "ey5A": |
200 /******/ !function() { |
287 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
201 /******/ // getDefaultExport function for compatibility with non-harmony modules |
288 |
202 /******/ __webpack_require__.n = function(module) { |
|
203 /******/ var getter = module && module.__esModule ? |
|
204 /******/ function() { return module['default']; } : |
|
205 /******/ function() { return module; }; |
|
206 /******/ __webpack_require__.d(getter, { a: getter }); |
|
207 /******/ return getter; |
|
208 /******/ }; |
|
209 /******/ }(); |
|
210 /******/ |
|
211 /******/ /* webpack/runtime/define property getters */ |
|
212 /******/ !function() { |
|
213 /******/ // define getter functions for harmony exports |
|
214 /******/ __webpack_require__.d = function(exports, definition) { |
|
215 /******/ for(var key in definition) { |
|
216 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
|
217 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
|
218 /******/ } |
|
219 /******/ } |
|
220 /******/ }; |
|
221 /******/ }(); |
|
222 /******/ |
|
223 /******/ /* webpack/runtime/hasOwnProperty shorthand */ |
|
224 /******/ !function() { |
|
225 /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } |
|
226 /******/ }(); |
|
227 /******/ |
|
228 /******/ /* webpack/runtime/make namespace object */ |
|
229 /******/ !function() { |
|
230 /******/ // define __esModule on exports |
|
231 /******/ __webpack_require__.r = function(exports) { |
|
232 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
|
233 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
|
234 /******/ } |
|
235 /******/ Object.defineProperty(exports, '__esModule', { value: true }); |
|
236 /******/ }; |
|
237 /******/ }(); |
|
238 /******/ |
|
239 /************************************************************************/ |
|
240 var __webpack_exports__ = {}; |
|
241 // This entry need to be wrapped in an IIFE because it need to be in strict mode. |
|
242 !function() { |
289 "use strict"; |
243 "use strict"; |
290 // ESM COMPAT FLAG |
244 // ESM COMPAT FLAG |
291 __webpack_require__.r(__webpack_exports__); |
245 __webpack_require__.r(__webpack_exports__); |
292 |
246 |
293 // EXPORTS |
247 // EXPORTS |
294 __webpack_require__.d(__webpack_exports__, "PluginArea", function() { return /* reexport */ plugin_area; }); |
248 __webpack_require__.d(__webpack_exports__, { |
295 __webpack_require__.d(__webpack_exports__, "withPluginContext", function() { return /* reexport */ withPluginContext; }); |
249 "PluginArea": function() { return /* reexport */ plugin_area; }, |
296 __webpack_require__.d(__webpack_exports__, "registerPlugin", function() { return /* reexport */ registerPlugin; }); |
250 "getPlugin": function() { return /* reexport */ getPlugin; }, |
297 __webpack_require__.d(__webpack_exports__, "unregisterPlugin", function() { return /* reexport */ unregisterPlugin; }); |
251 "getPlugins": function() { return /* reexport */ getPlugins; }, |
298 __webpack_require__.d(__webpack_exports__, "getPlugin", function() { return /* reexport */ getPlugin; }); |
252 "registerPlugin": function() { return /* reexport */ registerPlugin; }, |
299 __webpack_require__.d(__webpack_exports__, "getPlugins", function() { return /* reexport */ getPlugins; }); |
253 "unregisterPlugin": function() { return /* reexport */ unregisterPlugin; }, |
300 |
254 "withPluginContext": function() { return /* reexport */ withPluginContext; } |
301 // EXTERNAL MODULE: external ["wp","element"] |
255 }); |
302 var external_wp_element_ = __webpack_require__("GRId"); |
256 |
303 |
257 ;// CONCATENATED MODULE: external ["wp","element"] |
304 // EXTERNAL MODULE: external "lodash" |
258 var external_wp_element_namespaceObject = window["wp"]["element"]; |
305 var external_lodash_ = __webpack_require__("YLtl"); |
259 ;// CONCATENATED MODULE: external "lodash" |
306 |
260 var external_lodash_namespaceObject = window["lodash"]; |
307 // EXTERNAL MODULE: ./node_modules/memize/index.js |
261 // EXTERNAL MODULE: ./node_modules/memize/index.js |
308 var memize = __webpack_require__("4eJC"); |
262 var memize = __webpack_require__(9756); |
309 var memize_default = /*#__PURE__*/__webpack_require__.n(memize); |
263 var memize_default = /*#__PURE__*/__webpack_require__.n(memize); |
310 |
264 ;// CONCATENATED MODULE: external ["wp","hooks"] |
311 // EXTERNAL MODULE: external ["wp","hooks"] |
265 var external_wp_hooks_namespaceObject = window["wp"]["hooks"]; |
312 var external_wp_hooks_ = __webpack_require__("g56x"); |
266 ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js |
313 |
267 function _extends() { |
314 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js |
268 _extends = Object.assign ? Object.assign.bind() : function (target) { |
315 var esm_extends = __webpack_require__("wx14"); |
269 for (var i = 1; i < arguments.length; i++) { |
316 |
270 var source = arguments[i]; |
317 // EXTERNAL MODULE: external ["wp","compose"] |
271 |
318 var external_wp_compose_ = __webpack_require__("K9lf"); |
272 for (var key in source) { |
319 |
273 if (Object.prototype.hasOwnProperty.call(source, key)) { |
320 // CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/components/plugin-context/index.js |
274 target[key] = source[key]; |
|
275 } |
|
276 } |
|
277 } |
|
278 |
|
279 return target; |
|
280 }; |
|
281 return _extends.apply(this, arguments); |
|
282 } |
|
283 ;// CONCATENATED MODULE: external ["wp","compose"] |
|
284 var external_wp_compose_namespaceObject = window["wp"]["compose"]; |
|
285 ;// CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/components/plugin-context/index.js |
321 |
286 |
322 |
287 |
323 |
288 |
324 /** |
289 /** |
325 * WordPress dependencies |
290 * WordPress dependencies |
343 * merge with the component's own props. |
308 * merge with the component's own props. |
344 * |
309 * |
345 * @return {WPComponent} Enhanced component with injected context as props. |
310 * @return {WPComponent} Enhanced component with injected context as props. |
346 */ |
311 */ |
347 |
312 |
348 const withPluginContext = mapContextToProps => Object(external_wp_compose_["createHigherOrderComponent"])(OriginalComponent => { |
313 const withPluginContext = mapContextToProps => (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(OriginalComponent => { |
349 return props => Object(external_wp_element_["createElement"])(Consumer, null, context => Object(external_wp_element_["createElement"])(OriginalComponent, Object(esm_extends["a" /* default */])({}, props, mapContextToProps(context, props)))); |
314 return props => (0,external_wp_element_namespaceObject.createElement)(Consumer, null, context => (0,external_wp_element_namespaceObject.createElement)(OriginalComponent, _extends({}, props, mapContextToProps(context, props)))); |
350 }, 'withPluginContext'); |
315 }, 'withPluginContext'); |
351 |
316 |
352 // EXTERNAL MODULE: external ["wp","primitives"] |
317 ;// CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/components/plugin-error-boundary/index.js |
353 var external_wp_primitives_ = __webpack_require__("Tqx9"); |
|
354 |
|
355 // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/plugins.js |
|
356 |
|
357 |
|
358 /** |
318 /** |
359 * WordPress dependencies |
319 * WordPress dependencies |
360 */ |
320 */ |
361 |
321 |
362 const plugins = Object(external_wp_element_["createElement"])(external_wp_primitives_["SVG"], { |
322 class PluginErrorBoundary extends external_wp_element_namespaceObject.Component { |
|
323 constructor(props) { |
|
324 super(props); |
|
325 this.state = { |
|
326 hasError: false |
|
327 }; |
|
328 } |
|
329 |
|
330 static getDerivedStateFromError() { |
|
331 return { |
|
332 hasError: true |
|
333 }; |
|
334 } |
|
335 |
|
336 componentDidCatch(error) { |
|
337 const { |
|
338 name, |
|
339 onError |
|
340 } = this.props; |
|
341 |
|
342 if (onError) { |
|
343 onError(name, error); |
|
344 } |
|
345 } |
|
346 |
|
347 render() { |
|
348 if (!this.state.hasError) { |
|
349 return this.props.children; |
|
350 } |
|
351 |
|
352 return null; |
|
353 } |
|
354 |
|
355 } |
|
356 |
|
357 ;// CONCATENATED MODULE: external ["wp","primitives"] |
|
358 var external_wp_primitives_namespaceObject = window["wp"]["primitives"]; |
|
359 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/plugins.js |
|
360 |
|
361 |
|
362 /** |
|
363 * WordPress dependencies |
|
364 */ |
|
365 |
|
366 const plugins = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { |
363 xmlns: "http://www.w3.org/2000/svg", |
367 xmlns: "http://www.w3.org/2000/svg", |
364 viewBox: "0 0 24 24" |
368 viewBox: "0 0 24 24" |
365 }, Object(external_wp_element_["createElement"])(external_wp_primitives_["Path"], { |
369 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { |
366 d: "M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z" |
370 d: "M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z" |
367 })); |
371 })); |
368 /* harmony default export */ var library_plugins = (plugins); |
372 /* harmony default export */ var library_plugins = (plugins); |
369 |
373 |
370 // CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/api/index.js |
374 ;// CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/api/index.js |
371 /* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */ |
375 /* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */ |
372 |
376 |
373 /** |
377 /** |
374 * WordPress dependencies |
378 * WordPress dependencies |
375 */ |
379 */ |
661 this.state = this.getCurrentPluginsState(); |
666 this.state = this.getCurrentPluginsState(); |
662 } |
667 } |
663 |
668 |
664 getCurrentPluginsState() { |
669 getCurrentPluginsState() { |
665 return { |
670 return { |
666 plugins: Object(external_lodash_["map"])(getPlugins(this.props.scope), ({ |
671 plugins: (0,external_lodash_namespaceObject.map)(getPlugins(this.props.scope), _ref => { |
667 icon, |
672 let { |
668 name, |
673 icon, |
669 render |
674 name, |
670 }) => { |
675 render |
|
676 } = _ref; |
671 return { |
677 return { |
672 Plugin: render, |
678 Plugin: render, |
673 context: this.memoizedContext(name, icon) |
679 context: this.memoizedContext(name, icon) |
674 }; |
680 }; |
675 }) |
681 }) |
676 }; |
682 }; |
677 } |
683 } |
678 |
684 |
679 componentDidMount() { |
685 componentDidMount() { |
680 Object(external_wp_hooks_["addAction"])('plugins.pluginRegistered', 'core/plugins/plugin-area/plugins-registered', this.setPlugins); |
686 (0,external_wp_hooks_namespaceObject.addAction)('plugins.pluginRegistered', 'core/plugins/plugin-area/plugins-registered', this.setPlugins); |
681 Object(external_wp_hooks_["addAction"])('plugins.pluginUnregistered', 'core/plugins/plugin-area/plugins-unregistered', this.setPlugins); |
687 (0,external_wp_hooks_namespaceObject.addAction)('plugins.pluginUnregistered', 'core/plugins/plugin-area/plugins-unregistered', this.setPlugins); |
682 } |
688 } |
683 |
689 |
684 componentWillUnmount() { |
690 componentWillUnmount() { |
685 Object(external_wp_hooks_["removeAction"])('plugins.pluginRegistered', 'core/plugins/plugin-area/plugins-registered'); |
691 (0,external_wp_hooks_namespaceObject.removeAction)('plugins.pluginRegistered', 'core/plugins/plugin-area/plugins-registered'); |
686 Object(external_wp_hooks_["removeAction"])('plugins.pluginUnregistered', 'core/plugins/plugin-area/plugins-unregistered'); |
692 (0,external_wp_hooks_namespaceObject.removeAction)('plugins.pluginUnregistered', 'core/plugins/plugin-area/plugins-unregistered'); |
687 } |
693 } |
688 |
694 |
689 setPlugins() { |
695 setPlugins() { |
690 this.setState(this.getCurrentPluginsState); |
696 this.setState(this.getCurrentPluginsState); |
691 } |
697 } |
692 |
698 |
693 render() { |
699 render() { |
694 return Object(external_wp_element_["createElement"])("div", { |
700 return (0,external_wp_element_namespaceObject.createElement)("div", { |
695 style: { |
701 style: { |
696 display: 'none' |
702 display: 'none' |
697 } |
703 } |
698 }, Object(external_lodash_["map"])(this.state.plugins, ({ |
704 }, (0,external_lodash_namespaceObject.map)(this.state.plugins, _ref2 => { |
699 context, |
705 let { |
700 Plugin |
706 context, |
701 }) => Object(external_wp_element_["createElement"])(Provider, { |
707 Plugin |
702 key: context.name, |
708 } = _ref2; |
703 value: context |
709 return (0,external_wp_element_namespaceObject.createElement)(Provider, { |
704 }, Object(external_wp_element_["createElement"])(Plugin, null)))); |
710 key: context.name, |
|
711 value: context |
|
712 }, (0,external_wp_element_namespaceObject.createElement)(PluginErrorBoundary, { |
|
713 name: context.name, |
|
714 onError: this.props.onError |
|
715 }, (0,external_wp_element_namespaceObject.createElement)(Plugin, null))); |
|
716 })); |
705 } |
717 } |
706 |
718 |
707 } |
719 } |
708 |
720 |
709 /* harmony default export */ var plugin_area = (plugin_area_PluginArea); |
721 /* harmony default export */ var plugin_area = (PluginArea); |
710 |
722 |
711 // CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/components/index.js |
723 ;// CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/components/index.js |
712 |
724 |
713 |
725 |
714 |
726 |
715 // CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/index.js |
727 ;// CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/index.js |
716 |
728 |
717 |
729 |
718 |
730 |
719 |
731 }(); |
720 /***/ }), |
732 (window.wp = window.wp || {}).plugins = __webpack_exports__; |
721 |
733 /******/ })() |
722 /***/ "g56x": |
734 ; |
723 /***/ (function(module, exports) { |
|
724 |
|
725 (function() { module.exports = window["wp"]["hooks"]; }()); |
|
726 |
|
727 /***/ }), |
|
728 |
|
729 /***/ "wx14": |
|
730 /***/ (function(module, __webpack_exports__, __webpack_require__) { |
|
731 |
|
732 "use strict"; |
|
733 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; }); |
|
734 function _extends() { |
|
735 _extends = Object.assign || function (target) { |
|
736 for (var i = 1; i < arguments.length; i++) { |
|
737 var source = arguments[i]; |
|
738 |
|
739 for (var key in source) { |
|
740 if (Object.prototype.hasOwnProperty.call(source, key)) { |
|
741 target[key] = source[key]; |
|
742 } |
|
743 } |
|
744 } |
|
745 |
|
746 return target; |
|
747 }; |
|
748 |
|
749 return _extends.apply(this, arguments); |
|
750 } |
|
751 |
|
752 /***/ }) |
|
753 |
|
754 /******/ }); |
|