PluginProbe
Gutenberg / 23.1.0
Gutenberg v23.1.0
23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 7.4.0 All 402 releases
gutenberg / build / modules / boot / index.js

index.js in Gutenberg 23.1.0, at build/modules/boot/index.js

2,625 lines 127.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 var __create = Object.create;
2 var __defProp = Object.defineProperty;
3 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4 var __getOwnPropNames = Object.getOwnPropertyNames;
5 var __getProtoOf = Object.getPrototypeOf;
6 var __hasOwnProp = Object.prototype.hasOwnProperty;
7 var __commonJS = (cb, mod) => function __require() {
8 return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9 };
10 var __export = (target, all) => {
11 for (var name in all)
12 __defProp(target, name, { get: all[name], enumerable: true });
13 };
14 var __copyProps = (to, from, except, desc) => {
15 if (from && typeof from === "object" || typeof from === "function") {
16 for (let key of __getOwnPropNames(from))
17 if (!__hasOwnProp.call(to, key) && key !== except)
18 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19 }
20 return to;
21 };
22 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23 // If the importer is in node compatibility mode or this is not an ESM
24 // file that has been converted to a CommonJS file using a Babel-
25 // compatible transform (i.e. "__esModule" has not been set), then set
26 // "default" to the CommonJS "module.exports" for node compatibility.
27 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28 mod
29 ));
30
31 // package-external:@wordpress/element
32 var require_element = __commonJS({
33 "package-external:@wordpress/element"(exports, module) {
34 module.exports = window.wp.element;
35 }
36 });
37
38 // package-external:@wordpress/data
39 var require_data = __commonJS({
40 "package-external:@wordpress/data"(exports, module) {
41 module.exports = window.wp.data;
42 }
43 });
44
45 // package-external:@wordpress/i18n
46 var require_i18n = __commonJS({
47 "package-external:@wordpress/i18n"(exports, module) {
48 module.exports = window.wp.i18n;
49 }
50 });
51
52 // vendor-external:react
53 var require_react = __commonJS({
54 "vendor-external:react"(exports, module) {
55 module.exports = window.React;
56 }
57 });
58
59 // vendor-external:react/jsx-runtime
60 var require_jsx_runtime = __commonJS({
61 "vendor-external:react/jsx-runtime"(exports, module) {
62 module.exports = window.ReactJSXRuntime;
63 }
64 });
65
66 // package-external:@wordpress/primitives
67 var require_primitives = __commonJS({
68 "package-external:@wordpress/primitives"(exports, module) {
69 module.exports = window.wp.primitives;
70 }
71 });
72
73 // package-external:@wordpress/compose
74 var require_compose = __commonJS({
75 "package-external:@wordpress/compose"(exports, module) {
76 module.exports = window.wp.compose;
77 }
78 });
79
80 // package-external:@wordpress/theme
81 var require_theme = __commonJS({
82 "package-external:@wordpress/theme"(exports, module) {
83 module.exports = window.wp.theme;
84 }
85 });
86
87 // package-external:@wordpress/private-apis
88 var require_private_apis = __commonJS({
89 "package-external:@wordpress/private-apis"(exports, module) {
90 module.exports = window.wp.privateApis;
91 }
92 });
93
94 // package-external:@wordpress/components
95 var require_components = __commonJS({
96 "package-external:@wordpress/components"(exports, module) {
97 module.exports = window.wp.components;
98 }
99 });
100
101 // package-external:@wordpress/core-data
102 var require_core_data = __commonJS({
103 "package-external:@wordpress/core-data"(exports, module) {
104 module.exports = window.wp.coreData;
105 }
106 });
107
108 // package-external:@wordpress/notices
109 var require_notices = __commonJS({
110 "package-external:@wordpress/notices"(exports, module) {
111 module.exports = window.wp.notices;
112 }
113 });
114
115 // package-external:@wordpress/html-entities
116 var require_html_entities = __commonJS({
117 "package-external:@wordpress/html-entities"(exports, module) {
118 module.exports = window.wp.htmlEntities;
119 }
120 });
121
122 // package-external:@wordpress/keycodes
123 var require_keycodes = __commonJS({
124 "package-external:@wordpress/keycodes"(exports, module) {
125 module.exports = window.wp.keycodes;
126 }
127 });
128
129 // package-external:@wordpress/commands
130 var require_commands = __commonJS({
131 "package-external:@wordpress/commands"(exports, module) {
132 module.exports = window.wp.commands;
133 }
134 });
135
136 // package-external:@wordpress/url
137 var require_url = __commonJS({
138 "package-external:@wordpress/url"(exports, module) {
139 module.exports = window.wp.url;
140 }
141 });
142
143 // package-external:@wordpress/editor
144 var require_editor = __commonJS({
145 "package-external:@wordpress/editor"(exports, module) {
146 module.exports = window.wp.editor;
147 }
148 });
149
150 // package-external:@wordpress/keyboard-shortcuts
151 var require_keyboard_shortcuts = __commonJS({
152 "package-external:@wordpress/keyboard-shortcuts"(exports, module) {
153 module.exports = window.wp.keyboardShortcuts;
154 }
155 });
156
157 // packages/boot/build-module/components/app/index.mjs
158 var import_element17 = __toESM(require_element(), 1);
159 var import_data11 = __toESM(require_data(), 1);
160
161 // packages/boot/build-module/components/app/router.mjs
162 var import_i18n11 = __toESM(require_i18n(), 1);
163 var import_element16 = __toESM(require_element(), 1);
164
165 // node_modules/clsx/dist/clsx.mjs
166 function r(e) {
167 var t, f, n = "";
168 if ("string" == typeof e || "number" == typeof e) n += e;
169 else if ("object" == typeof e) if (Array.isArray(e)) {
170 var o = e.length;
171 for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
172 } else for (f in e) e[f] && (n && (n += " "), n += f);
173 return n;
174 }
175 function clsx() {
176 for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
177 return n;
178 }
179 var clsx_default = clsx;
180
181 // node_modules/@base-ui/utils/esm/useRefWithInit.js
182 var React = __toESM(require_react(), 1);
183 var UNINITIALIZED = {};
184 function useRefWithInit(init2, initArg) {
185 const ref = React.useRef(UNINITIALIZED);
186 if (ref.current === UNINITIALIZED) {
187 ref.current = init2(initArg);
188 }
189 return ref;
190 }
191
192 // node_modules/@base-ui/utils/esm/warn.js
193 var set;
194 if (true) {
195 set = /* @__PURE__ */ new Set();
196 }
197 function warn(...messages) {
198 if (true) {
199 const messageKey = messages.join(" ");
200 if (!set.has(messageKey)) {
201 set.add(messageKey);
202 console.warn(`Base UI: ${messageKey}`);
203 }
204 }
205 }
206
207 // node_modules/@base-ui/react/esm/internals/useRenderElement.js
208 var React4 = __toESM(require_react(), 1);
209
210 // node_modules/@base-ui/utils/esm/useMergedRefs.js
211 function useMergedRefs(a, b, c, d) {
212 const forkRef = useRefWithInit(createForkRef).current;
213 if (didChange(forkRef, a, b, c, d)) {
214 update(forkRef, [a, b, c, d]);
215 }
216 return forkRef.callback;
217 }
218 function useMergedRefsN(refs) {
219 const forkRef = useRefWithInit(createForkRef).current;
220 if (didChangeN(forkRef, refs)) {
221 update(forkRef, refs);
222 }
223 return forkRef.callback;
224 }
225 function createForkRef() {
226 return {
227 callback: null,
228 cleanup: null,
229 refs: []
230 };
231 }
232 function didChange(forkRef, a, b, c, d) {
233 return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
234 }
235 function didChangeN(forkRef, newRefs) {
236 return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
237 }
238 function update(forkRef, refs) {
239 forkRef.refs = refs;
240 if (refs.every((ref) => ref == null)) {
241 forkRef.callback = null;
242 return;
243 }
244 forkRef.callback = (instance) => {
245 if (forkRef.cleanup) {
246 forkRef.cleanup();
247 forkRef.cleanup = null;
248 }
249 if (instance != null) {
250 const cleanupCallbacks = Array(refs.length).fill(null);
251 for (let i = 0; i < refs.length; i += 1) {
252 const ref = refs[i];
253 if (ref == null) {
254 continue;
255 }
256 switch (typeof ref) {
257 case "function": {
258 const refCleanup = ref(instance);
259 if (typeof refCleanup === "function") {
260 cleanupCallbacks[i] = refCleanup;
261 }
262 break;
263 }
264 case "object": {
265 ref.current = instance;
266 break;
267 }
268 default:
269 }
270 }
271 forkRef.cleanup = () => {
272 for (let i = 0; i < refs.length; i += 1) {
273 const ref = refs[i];
274 if (ref == null) {
275 continue;
276 }
277 switch (typeof ref) {
278 case "function": {
279 const cleanupCallback = cleanupCallbacks[i];
280 if (typeof cleanupCallback === "function") {
281 cleanupCallback();
282 } else {
283 ref(null);
284 }
285 break;
286 }
287 case "object": {
288 ref.current = null;
289 break;
290 }
291 default:
292 }
293 }
294 };
295 }
296 };
297 }
298
299 // node_modules/@base-ui/utils/esm/getReactElementRef.js
300 var React3 = __toESM(require_react(), 1);
301
302 // node_modules/@base-ui/utils/esm/reactVersion.js
303 var React2 = __toESM(require_react(), 1);
304 var majorVersion = parseInt(React2.version, 10);
305 function isReactVersionAtLeast(reactVersionToCheck) {
306 return majorVersion >= reactVersionToCheck;
307 }
308
309 // node_modules/@base-ui/utils/esm/getReactElementRef.js
310 function getReactElementRef(element) {
311 if (!/* @__PURE__ */ React3.isValidElement(element)) {
312 return null;
313 }
314 const reactElement = element;
315 const propsWithRef = reactElement.props;
316 return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null;
317 }
318
319 // node_modules/@base-ui/utils/esm/mergeObjects.js
320 function mergeObjects(a, b) {
321 if (a && !b) {
322 return a;
323 }
324 if (!a && b) {
325 return b;
326 }
327 if (a || b) {
328 return {
329 ...a,
330 ...b
331 };
332 }
333 return void 0;
334 }
335
336 // node_modules/@base-ui/utils/esm/empty.js
337 var EMPTY_ARRAY = Object.freeze([]);
338 var EMPTY_OBJECT = Object.freeze({});
339
340 // node_modules/@base-ui/react/esm/internals/getStateAttributesProps.js
341 function getStateAttributesProps(state, customMapping) {
342 const props = {};
343 for (const key in state) {
344 const value = state[key];
345 if (customMapping?.hasOwnProperty(key)) {
346 const customProps = customMapping[key](value);
347 if (customProps != null) {
348 Object.assign(props, customProps);
349 }
350 continue;
351 }
352 if (value === true) {
353 props[`data-${key.toLowerCase()}`] = "";
354 } else if (value) {
355 props[`data-${key.toLowerCase()}`] = value.toString();
356 }
357 }
358 return props;
359 }
360
361 // node_modules/@base-ui/react/esm/utils/resolveClassName.js
362 function resolveClassName(className, state) {
363 return typeof className === "function" ? className(state) : className;
364 }
365
366 // node_modules/@base-ui/react/esm/utils/resolveStyle.js
367 function resolveStyle(style, state) {
368 return typeof style === "function" ? style(state) : style;
369 }
370
371 // node_modules/@base-ui/react/esm/merge-props/mergeProps.js
372 var EMPTY_PROPS = {};
373 function mergeProps(a, b, c, d, e) {
374 if (!c && !d && !e && !a) {
375 return createInitialMergedProps(b);
376 }
377 let merged = createInitialMergedProps(a);
378 if (b) {
379 merged = mergeInto(merged, b);
380 }
381 if (c) {
382 merged = mergeInto(merged, c);
383 }
384 if (d) {
385 merged = mergeInto(merged, d);
386 }
387 if (e) {
388 merged = mergeInto(merged, e);
389 }
390 return merged;
391 }
392 function mergePropsN(props) {
393 if (props.length === 0) {
394 return EMPTY_PROPS;
395 }
396 if (props.length === 1) {
397 return createInitialMergedProps(props[0]);
398 }
399 let merged = createInitialMergedProps(props[0]);
400 for (let i = 1; i < props.length; i += 1) {
401 merged = mergeInto(merged, props[i]);
402 }
403 return merged;
404 }
405 function createInitialMergedProps(inputProps) {
406 if (isPropsGetter(inputProps)) {
407 return {
408 ...resolvePropsGetter(inputProps, EMPTY_PROPS)
409 };
410 }
411 return copyInitialProps(inputProps);
412 }
413 function mergeInto(merged, inputProps) {
414 if (isPropsGetter(inputProps)) {
415 return resolvePropsGetter(inputProps, merged);
416 }
417 return mutablyMergeInto(merged, inputProps);
418 }
419 function copyInitialProps(inputProps) {
420 const copiedProps = {
421 ...inputProps
422 };
423 for (const propName in copiedProps) {
424 const propValue = copiedProps[propName];
425 if (isEventHandler(propName, propValue)) {
426 copiedProps[propName] = wrapEventHandler(propValue);
427 }
428 }
429 return copiedProps;
430 }
431 function mutablyMergeInto(mergedProps, externalProps) {
432 if (!externalProps) {
433 return mergedProps;
434 }
435 for (const propName in externalProps) {
436 const externalPropValue = externalProps[propName];
437 switch (propName) {
438 case "style": {
439 mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue);
440 break;
441 }
442 case "className": {
443 mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue);
444 break;
445 }
446 default: {
447 if (isEventHandler(propName, externalPropValue)) {
448 mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue);
449 } else {
450 mergedProps[propName] = externalPropValue;
451 }
452 }
453 }
454 }
455 return mergedProps;
456 }
457 function isEventHandler(key, value) {
458 const code0 = key.charCodeAt(0);
459 const code1 = key.charCodeAt(1);
460 const code2 = key.charCodeAt(2);
461 return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined");
462 }
463 function isPropsGetter(inputProps) {
464 return typeof inputProps === "function";
465 }
466 function resolvePropsGetter(inputProps, previousProps) {
467 if (isPropsGetter(inputProps)) {
468 return inputProps(previousProps);
469 }
470 return inputProps ?? EMPTY_PROPS;
471 }
472 function mergeEventHandlers(ourHandler, theirHandler) {
473 if (!theirHandler) {
474 return ourHandler;
475 }
476 if (!ourHandler) {
477 return wrapEventHandler(theirHandler);
478 }
479 return (...args) => {
480 const event = args[0];
481 if (isSyntheticEvent(event)) {
482 const baseUIEvent = event;
483 makeEventPreventable(baseUIEvent);
484 const result2 = theirHandler(...args);
485 if (!baseUIEvent.baseUIHandlerPrevented) {
486 ourHandler?.(...args);
487 }
488 return result2;
489 }
490 const result = theirHandler(...args);
491 ourHandler?.(...args);
492 return result;
493 };
494 }
495 function wrapEventHandler(handler) {
496 if (!handler) {
497 return handler;
498 }
499 return (...args) => {
500 const event = args[0];
501 if (isSyntheticEvent(event)) {
502 makeEventPreventable(event);
503 }
504 return handler(...args);
505 };
506 }
507 function makeEventPreventable(event) {
508 event.preventBaseUIHandler = () => {
509 event.baseUIHandlerPrevented = true;
510 };
511 return event;
512 }
513 function mergeClassNames(ourClassName, theirClassName) {
514 if (theirClassName) {
515 if (ourClassName) {
516 return theirClassName + " " + ourClassName;
517 }
518 return theirClassName;
519 }
520 return ourClassName;
521 }
522 function isSyntheticEvent(event) {
523 return event != null && typeof event === "object" && "nativeEvent" in event;
524 }
525
526 // node_modules/@base-ui/react/esm/internals/useRenderElement.js
527 var import_react = __toESM(require_react(), 1);
528 function useRenderElement(element, componentProps, params = {}) {
529 const renderProp = componentProps.render;
530 const outProps = useRenderElementProps(componentProps, params);
531 if (params.enabled === false) {
532 return null;
533 }
534 const state = params.state ?? EMPTY_OBJECT;
535 return evaluateRenderProp(element, renderProp, outProps, state);
536 }
537 function useRenderElementProps(componentProps, params = {}) {
538 const {
539 className: classNameProp,
540 style: styleProp,
541 render: renderProp
542 } = componentProps;
543 const {
544 state = EMPTY_OBJECT,
545 ref,
546 props,
547 stateAttributesMapping,
548 enabled = true
549 } = params;
550 const className = enabled ? resolveClassName(classNameProp, state) : void 0;
551 const style = enabled ? resolveStyle(styleProp, state) : void 0;
552 const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping) : EMPTY_OBJECT;
553 const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
554 const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
555 if (typeof document !== "undefined") {
556 if (!enabled) {
557 useMergedRefs(null, null);
558 } else if (Array.isArray(ref)) {
559 outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
560 } else {
561 outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
562 }
563 }
564 if (!enabled) {
565 return EMPTY_OBJECT;
566 }
567 if (className !== void 0) {
568 outProps.className = mergeClassNames(outProps.className, className);
569 }
570 if (style !== void 0) {
571 outProps.style = mergeObjects(outProps.style, style);
572 }
573 return outProps;
574 }
575 function resolveRenderFunctionProps(props) {
576 if (Array.isArray(props)) {
577 return mergePropsN(props);
578 }
579 return mergeProps(void 0, props);
580 }
581 var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
582 var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
583 var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
584 function evaluateRenderProp(element, render, props, state) {
585 if (render) {
586 if (typeof render === "function") {
587 if (true) {
588 warnIfRenderPropLooksLikeComponent(render);
589 }
590 return render(props, state);
591 }
592 const mergedProps = mergeProps(props, render.props);
593 mergedProps.ref = props.ref;
594 let newElement = render;
595 if (newElement?.$$typeof === REACT_LAZY_TYPE) {
596 const children = React4.Children.toArray(render);
597 newElement = children[0];
598 }
599 if (true) {
600 if (!/* @__PURE__ */ React4.isValidElement(newElement)) {
601 throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.", "A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.", "https://base-ui.com/r/invalid-render-prop"].join("\n"));
602 }
603 }
604 return /* @__PURE__ */ React4.cloneElement(newElement, mergedProps);
605 }
606 if (element) {
607 if (typeof element === "string") {
608 return renderTag(element, props);
609 }
610 }
611 throw new Error(true ? "Base UI: Render element or function are not defined." : formatErrorMessage_default(8));
612 }
613 function warnIfRenderPropLooksLikeComponent(renderFn) {
614 const functionName = renderFn.name;
615 if (functionName.length === 0) {
616 return;
617 }
618 if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) {
619 return;
620 }
621 if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) {
622 return;
623 }
624 warn(`The \`render\` prop received a function named \`${functionName}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop");
625 }
626 function renderTag(Tag, props) {
627 if (Tag === "button") {
628 return /* @__PURE__ */ (0, import_react.createElement)("button", {
629 type: "button",
630 ...props,
631 key: props.key
632 });
633 }
634 if (Tag === "img") {
635 return /* @__PURE__ */ (0, import_react.createElement)("img", {
636 alt: "",
637 ...props,
638 key: props.key
639 });
640 }
641 return /* @__PURE__ */ React4.createElement(Tag, props);
642 }
643
644 // node_modules/@base-ui/react/esm/use-render/useRender.js
645 function useRender(params) {
646 return useRenderElement(params.defaultTagName ?? "div", params, params);
647 }
648
649 // packages/ui/build-module/text/text.mjs
650 var import_element = __toESM(require_element(), 1);
651 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='4130d64bea']")) {
652 const style = document.createElement("style");
653 style.setAttribute("data-wp-hash", "4130d64bea");
654 style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._83ed8a8da5dd50ea__text{margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-medium,499);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}.ca1aa3fc2029e958__body-lg{--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-regular,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}'));
655 document.head.appendChild(style);
656 }
657 var style_default = { "text": "_83ed8a8da5dd50ea__text", "heading-2xl": "_14437cfb77831647__heading-2xl", "heading-xl": "_3c78b7fa9b4072dd__heading-xl", "heading-lg": "aa58f227716bcde2__heading-lg", "heading-md": "fc4da56d8dfe52c4__heading-md", "heading-sm": "a9b78c7c82e8dff7__heading-sm", "body-xl": "_305ff559e52180d5__body-xl", "body-lg": "ca1aa3fc2029e958__body-lg", "body-md": "_131101940be12424__body-md", "body-sm": "_0e8d87a42c1f75fa__body-sm" };
658 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='1fb29d3a3c']")) {
659 const style = document.createElement("style");
660 style.setAttribute("data-wp-hash", "1fb29d3a3c");
661 style.appendChild(document.createTextNode("._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,#0000);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 #0000);color:var(--_gcd-input-color,var(--wpds-color-fg-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,#0000);border-color:var(--_gcd-input-border-color-disabled,#0000);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid #0000)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-fg-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-medium,499));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid #0000);transition:var(--_gcd-a-transition,none)}"));
662 document.head.appendChild(style);
663 }
664 var global_css_defense_default = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a" };
665 var Text = (0, import_element.forwardRef)(function Text2({ variant = "body-md", render, className, ...props }, ref) {
666 const element = useRender({
667 render,
668 defaultTagName: "span",
669 ref,
670 props: mergeProps(props, {
671 className: clsx_default(
672 style_default.text,
673 global_css_defense_default.heading,
674 global_css_defense_default.p,
675 style_default[variant],
676 className
677 )
678 })
679 });
680 return element;
681 });
682
683 // packages/icons/build-module/icon/index.mjs
684 var import_element2 = __toESM(require_element(), 1);
685 var icon_default = (0, import_element2.forwardRef)(
686 ({ icon, size = 24, ...props }, ref) => {
687 return (0, import_element2.cloneElement)(icon, {
688 width: size,
689 height: size,
690 ...props,
691 ref
692 });
693 }
694 );
695
696 // packages/icons/build-module/library/arrow-up-left.mjs
697 var import_primitives = __toESM(require_primitives(), 1);
698 var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
699 var arrow_up_left_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M14 6H6v8h1.5V8.5L17 18l1-1-9.5-9.5H14V6Z" }) });
700
701 // packages/icons/build-module/library/check.mjs
702 var import_primitives2 = __toESM(require_primitives(), 1);
703 var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
704 var check_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { d: "M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z" }) });
705
706 // packages/icons/build-module/library/chevron-down-small.mjs
707 var import_primitives3 = __toESM(require_primitives(), 1);
708 var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
709 var chevron_down_small_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { d: "m15.99 10.889-3.988 3.418-3.988-3.418.976-1.14 3.012 2.582 3.012-2.581.976 1.139Z" }) });
710
711 // packages/icons/build-module/library/chevron-left-small.mjs
712 var import_primitives4 = __toESM(require_primitives(), 1);
713 var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
714 var chevron_left_small_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { d: "m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z" }) });
715
716 // packages/icons/build-module/library/chevron-left.mjs
717 var import_primitives5 = __toESM(require_primitives(), 1);
718 var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
719 var chevron_left_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z" }) });
720
721 // packages/icons/build-module/library/chevron-right-small.mjs
722 var import_primitives6 = __toESM(require_primitives(), 1);
723 var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
724 var chevron_right_small_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.Path, { d: "M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z" }) });
725
726 // packages/icons/build-module/library/chevron-right.mjs
727 var import_primitives7 = __toESM(require_primitives(), 1);
728 var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
729 var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.Path, { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" }) });
730
731 // packages/icons/build-module/library/menu.mjs
732 var import_primitives8 = __toESM(require_primitives(), 1);
733 var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
734 var menu_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.Path, { d: "M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z" }) });
735
736 // packages/icons/build-module/library/search.mjs
737 var import_primitives9 = __toESM(require_primitives(), 1);
738 var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
739 var search_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.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" }) });
740
741 // packages/icons/build-module/library/wordpress.mjs
742 var import_primitives10 = __toESM(require_primitives(), 1);
743 var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
744 var wordpress_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.Path, { d: "M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z" }) });
745
746 // packages/ui/build-module/stack/stack.mjs
747 var import_element3 = __toESM(require_element(), 1);
748 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='b51ff41489']")) {
749 const style = document.createElement("style");
750 style.setAttribute("data-wp-hash", "b51ff41489");
751 style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._19ce0419607e1896__stack{display:flex}}"));
752 document.head.appendChild(style);
753 }
754 var style_default2 = { "stack": "_19ce0419607e1896__stack" };
755 var gapTokens = {
756 xs: "var(--wpds-dimension-gap-xs, 4px)",
757 sm: "var(--wpds-dimension-gap-sm, 8px)",
758 md: "var(--wpds-dimension-gap-md, 12px)",
759 lg: "var(--wpds-dimension-gap-lg, 16px)",
760 xl: "var(--wpds-dimension-gap-xl, 24px)",
761 "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
762 "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
763 };
764 var Stack = (0, import_element3.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
765 const style = {
766 gap: gap && gapTokens[gap],
767 alignItems: align,
768 justifyContent: justify,
769 flexDirection: direction,
770 flexWrap: wrap
771 };
772 const element = useRender({
773 render,
774 ref,
775 props: mergeProps(props, { style, className: style_default2.stack })
776 });
777 return element;
778 });
779
780 // packages/admin-ui/build-module/navigable-region/index.mjs
781 var import_element4 = __toESM(require_element(), 1);
782 var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
783 var NavigableRegion = (0, import_element4.forwardRef)(
784 ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => {
785 return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
786 Tag,
787 {
788 ref,
789 className: clsx_default("admin-ui-navigable-region", className),
790 "aria-label": ariaLabel,
791 role: "region",
792 tabIndex: "-1",
793 ...props,
794 children
795 }
796 );
797 }
798 );
799 NavigableRegion.displayName = "NavigableRegion";
800 var navigable_region_default = NavigableRegion;
801
802 // packages/admin-ui/build-module/page/sidebar-toggle-slot.mjs
803 var import_components = __toESM(require_components(), 1);
804 var { Fill: SidebarToggleFill, Slot: SidebarToggleSlot } = (0, import_components.createSlotFill)("SidebarToggle");
805
806 // packages/admin-ui/build-module/page/header.mjs
807 var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
808 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='aa9c241ccc']")) {
809 const style = document.createElement("style");
810 style.setAttribute("data-wp-hash", "aa9c241ccc");
811 style.appendChild(document.createTextNode("._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-bg-surface-neutral,#fcfcfc);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-bg-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:calc(var(--wpds-dimension-base, 4px)*8)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:calc(var(--wpds-dimension-base, 4px)*6);width:calc(var(--wpds-dimension-base, 4px)*6);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-fg-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}"));
812 document.head.appendChild(style);
813 }
814 var style_default3 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
815 function Header({
816 headingLevel = 1,
817 breadcrumbs,
818 badges,
819 visual,
820 title,
821 subTitle,
822 actions,
823 showSidebarToggle = true
824 }) {
825 const HeadingTag = `h${headingLevel}`;
826 return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
827 Stack,
828 {
829 direction: "column",
830 className: style_default3.header,
831 render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("header", {}),
832 children: [
833 /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
834 Stack,
835 {
836 className: style_default3["header-content"],
837 direction: "row",
838 gap: "sm",
839 justify: "space-between",
840 children: [
841 /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Stack, { direction: "row", gap: "sm", align: "center", justify: "start", children: [
842 showSidebarToggle && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
843 SidebarToggleSlot,
844 {
845 bubblesVirtually: true,
846 className: style_default3["sidebar-toggle-slot"]
847 }
848 ),
849 visual && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
850 "div",
851 {
852 className: style_default3["header-visual"],
853 "aria-hidden": "true",
854 children: visual
855 }
856 ),
857 title && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
858 Text,
859 {
860 className: style_default3["header-title"],
861 render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(HeadingTag, {}),
862 variant: "heading-lg",
863 children: title
864 }
865 ),
866 breadcrumbs,
867 badges
868 ] }),
869 actions && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
870 Stack,
871 {
872 align: "center",
873 className: style_default3["header-actions"],
874 direction: "row",
875 gap: "sm",
876 children: actions
877 }
878 )
879 ]
880 }
881 ),
882 subTitle && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
883 Text,
884 {
885 render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", {}),
886 variant: "body-md",
887 className: style_default3["header-subtitle"],
888 children: subTitle
889 }
890 )
891 ]
892 }
893 );
894 }
895
896 // packages/admin-ui/build-module/page/index.mjs
897 var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
898 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='aa9c241ccc']")) {
899 const style = document.createElement("style");
900 style.setAttribute("data-wp-hash", "aa9c241ccc");
901 style.appendChild(document.createTextNode("._956b6df0898efed0__page{text-wrap:pretty;background-color:var(--wpds-color-bg-surface-neutral,#fcfcfc);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-flow:column;height:100%;position:relative;z-index:1}._0625b55e82a0d93d__header{background:var(--wpds-color-bg-surface-neutral-strong,#fff);border-block-end:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);inset-block-start:0;padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px);position:sticky;z-index:1}.a43c44d5ae28b2e8__header-content{min-height:calc(var(--wpds-dimension-base, 4px)*8)}.b7cb5b9daf3a3b25__header-actions{flex-shrink:0}._8113be94e7caf73c__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._9a776c7f70996f61__header-visual{display:grid;flex-shrink:0;grid-template-columns:1fr;grid-template-rows:1fr;height:calc(var(--wpds-dimension-base, 4px)*6);width:calc(var(--wpds-dimension-base, 4px)*6);>*{grid-column:1/-1;grid-row:1/-1;max-height:100%;max-width:100%}}.d5e0920cd15d35bc__sidebar-toggle-slot:empty{display:none}._60fea2f6bf5319cd__header-subtitle{color:var(--wpds-color-fg-content-neutral-weak,#707070);padding-block-end:var(--wpds-dimension-padding-xs,4px)}.be5e57d029ec4036__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;&._128806d0b26e3a50__has-padding{padding:var(--wpds-dimension-padding-lg,16px) var(--wpds-dimension-padding-2xl,24px)}}"));
902 document.head.appendChild(style);
903 }
904 var style_default4 = { "page": "_956b6df0898efed0__page", "header": "_0625b55e82a0d93d__header", "header-content": "a43c44d5ae28b2e8__header-content", "header-actions": "b7cb5b9daf3a3b25__header-actions", "header-title": "_8113be94e7caf73c__header-title", "header-visual": "_9a776c7f70996f61__header-visual", "sidebar-toggle-slot": "d5e0920cd15d35bc__sidebar-toggle-slot", "header-subtitle": "_60fea2f6bf5319cd__header-subtitle", "content": "be5e57d029ec4036__content", "has-padding": "_128806d0b26e3a50__has-padding" };
905 function Page({
906 headingLevel,
907 breadcrumbs,
908 badges,
909 visual,
910 title,
911 subTitle,
912 children,
913 className,
914 actions,
915 ariaLabel,
916 hasPadding = false,
917 showSidebarToggle = true
918 }) {
919 const classes = clsx_default(style_default4.page, className);
920 const effectiveAriaLabel = ariaLabel ?? (typeof title === "string" ? title : "");
921 return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(navigable_region_default, { className: classes, ariaLabel: effectiveAriaLabel, children: [
922 (title || breadcrumbs || badges || actions || visual) && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
923 Header,
924 {
925 headingLevel,
926 breadcrumbs,
927 badges,
928 visual,
929 title,
930 subTitle,
931 actions,
932 showSidebarToggle
933 }
934 ),
935 hasPadding ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
936 "div",
937 {
938 className: clsx_default(
939 style_default4.content,
940 style_default4["has-padding"]
941 ),
942 children
943 }
944 ) : children
945 ] });
946 }
947 Page.SidebarToggleFill = SidebarToggleFill;
948 var page_default = Page;
949
950 // packages/boot/build-module/components/app/router.mjs
951 var import_data10 = __toESM(require_data(), 1);
952 var import_core_data6 = __toESM(require_core_data(), 1);
953 import {
954 privateApis as routePrivateApis6
955 } from "@wordpress/route";
956
957 // packages/boot/build-module/components/root/index.mjs
958 var import_notices = __toESM(require_notices(), 1);
959 var import_compose4 = __toESM(require_compose(), 1);
960 var import_components14 = __toESM(require_components(), 1);
961 import { privateApis as routePrivateApis5 } from "@wordpress/route";
962 var import_element15 = __toESM(require_element(), 1);
963 var import_i18n10 = __toESM(require_i18n(), 1);
964
965 // packages/boot/build-module/components/site-hub/index.mjs
966 var import_data3 = __toESM(require_data(), 1);
967 var import_components3 = __toESM(require_components(), 1);
968 var import_i18n2 = __toESM(require_i18n(), 1);
969 var import_core_data2 = __toESM(require_core_data(), 1);
970 var import_html_entities = __toESM(require_html_entities(), 1);
971 var import_keycodes = __toESM(require_keycodes(), 1);
972 var import_commands = __toESM(require_commands(), 1);
973 var import_url = __toESM(require_url(), 1);
974
975 // packages/boot/build-module/components/site-icon-link/index.mjs
976 var import_components2 = __toESM(require_components(), 1);
977 import { Link, privateApis as routePrivateApis } from "@wordpress/route";
978
979 // packages/boot/build-module/lock-unlock.mjs
980 var import_private_apis = __toESM(require_private_apis(), 1);
981 var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
982 "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
983 "@wordpress/boot"
984 );
985
986 // packages/boot/build-module/components/site-icon/index.mjs
987 var import_data = __toESM(require_data(), 1);
988 var import_i18n = __toESM(require_i18n(), 1);
989 var import_core_data = __toESM(require_core_data(), 1);
990 var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
991 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='3ada0e3b8a']")) {
992 const style = document.createElement("style");
993 style.setAttribute("data-wp-hash", "3ada0e3b8a");
994 style.appendChild(document.createTextNode(".boot-site-icon{display:flex}.boot-site-icon__icon{fill:var(--wpds-color-fg-content-neutral,#1e1e1e);height:32px;width:32px}.boot-site-icon__image{aspect-ratio:1/1;border-radius:var(--wpds-border-radius-md,4px);height:32px;object-fit:cover;width:32px}"));
995 document.head.appendChild(style);
996 }
997 function SiteIcon({ className }) {
998 const { isRequestingSite, siteIconUrl } = (0, import_data.useSelect)((select) => {
999 const { getEntityRecord } = select(import_core_data.store);
1000 const siteData = getEntityRecord(
1001 "root",
1002 "__unstableBase",
1003 void 0
1004 );
1005 return {
1006 isRequestingSite: !siteData,
1007 siteIconUrl: siteData?.site_icon_url
1008 };
1009 }, []);
1010 let icon = null;
1011 if (isRequestingSite && !siteIconUrl) {
1012 icon = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "boot-site-icon__image" });
1013 } else {
1014 icon = siteIconUrl ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1015 "img",
1016 {
1017 className: "boot-site-icon__image",
1018 alt: (0, import_i18n.__)("Site Icon"),
1019 src: siteIconUrl
1020 }
1021 ) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1022 icon_default,
1023 {
1024 className: "boot-site-icon__icon",
1025 icon: wordpress_default,
1026 size: 48
1027 }
1028 );
1029 }
1030 return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: clsx_default(className, "boot-site-icon"), children: icon });
1031 }
1032 var site_icon_default = SiteIcon;
1033
1034 // packages/boot/build-module/components/site-icon-link/index.mjs
1035 var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
1036 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='5aacc86eea']")) {
1037 const style = document.createElement("style");
1038 style.setAttribute("data-wp-hash", "5aacc86eea");
1039 style.appendChild(document.createTextNode(".boot-site-icon-link{align-items:center;background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);display:inline-flex;height:64px;justify-content:center;text-decoration:none;width:64px}@media not (prefers-reduced-motion){.boot-site-icon-link{transition:outline .1s ease-out}}.boot-site-icon-link:focus:not(:active){outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-offset:calc(var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px))*-1)}"));
1040 document.head.appendChild(style);
1041 }
1042 var { useCanGoBack, useRouter } = unlock(routePrivateApis);
1043 function SiteIconLink({
1044 to,
1045 isBackButton,
1046 ...props
1047 }) {
1048 const router = useRouter();
1049 const canGoBack = useCanGoBack();
1050 return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_components2.Tooltip, { text: props["aria-label"], placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1051 Link,
1052 {
1053 to,
1054 "aria-label": props["aria-label"],
1055 className: "boot-site-icon-link",
1056 onClick: (event) => {
1057 if (canGoBack && isBackButton) {
1058 event.preventDefault();
1059 router.history.back();
1060 }
1061 },
1062 children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(site_icon_default, {})
1063 }
1064 ) });
1065 }
1066 var site_icon_link_default = SiteIconLink;
1067
1068 // packages/boot/build-module/store/index.mjs
1069 var import_data2 = __toESM(require_data(), 1);
1070
1071 // packages/boot/build-module/store/reducer.mjs
1072 var initialState = {
1073 menuItems: {},
1074 routes: [],
1075 dashboardLink: void 0
1076 };
1077 function reducer(state = initialState, action) {
1078 switch (action.type) {
1079 case "REGISTER_MENU_ITEM":
1080 return {
1081 ...state,
1082 menuItems: {
1083 ...state.menuItems,
1084 [action.id]: action.menuItem
1085 }
1086 };
1087 case "UPDATE_MENU_ITEM":
1088 return {
1089 ...state,
1090 menuItems: {
1091 ...state.menuItems,
1092 [action.id]: {
1093 ...state.menuItems[action.id],
1094 ...action.updates
1095 }
1096 }
1097 };
1098 case "REGISTER_ROUTE":
1099 return {
1100 ...state,
1101 routes: [...state.routes, action.route]
1102 };
1103 case "SET_DASHBOARD_LINK":
1104 return {
1105 ...state,
1106 dashboardLink: action.dashboardLink
1107 };
1108 }
1109 return state;
1110 }
1111
1112 // packages/boot/build-module/store/actions.mjs
1113 var actions_exports = {};
1114 __export(actions_exports, {
1115 registerMenuItem: () => registerMenuItem,
1116 registerRoute: () => registerRoute,
1117 setDashboardLink: () => setDashboardLink,
1118 updateMenuItem: () => updateMenuItem
1119 });
1120 function registerMenuItem(id, menuItem) {
1121 return {
1122 type: "REGISTER_MENU_ITEM",
1123 id,
1124 menuItem
1125 };
1126 }
1127 function updateMenuItem(id, updates) {
1128 return {
1129 type: "UPDATE_MENU_ITEM",
1130 id,
1131 updates
1132 };
1133 }
1134 function registerRoute(route) {
1135 return {
1136 type: "REGISTER_ROUTE",
1137 route
1138 };
1139 }
1140 function setDashboardLink(dashboardLink) {
1141 return {
1142 type: "SET_DASHBOARD_LINK",
1143 dashboardLink
1144 };
1145 }
1146
1147 // packages/boot/build-module/store/selectors.mjs
1148 var selectors_exports = {};
1149 __export(selectors_exports, {
1150 getDashboardLink: () => getDashboardLink,
1151 getMenuItems: () => getMenuItems,
1152 getRoutes: () => getRoutes
1153 });
1154 function getMenuItems(state) {
1155 return Object.values(state.menuItems);
1156 }
1157 function getRoutes(state) {
1158 return state.routes;
1159 }
1160 function getDashboardLink(state) {
1161 return state.dashboardLink;
1162 }
1163
1164 // packages/boot/build-module/store/index.mjs
1165 var STORE_NAME = "wordpress/boot";
1166 var store = (0, import_data2.createReduxStore)(STORE_NAME, {
1167 reducer,
1168 actions: actions_exports,
1169 selectors: selectors_exports
1170 });
1171 (0, import_data2.register)(store);
1172
1173 // packages/boot/build-module/components/site-hub/index.mjs
1174 var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
1175 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='bc60675bd6']")) {
1176 const style = document.createElement("style");
1177 style.setAttribute("data-wp-hash", "bc60675bd6");
1178 style.appendChild(document.createTextNode(".boot-site-hub{align-items:center;background-color:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);display:grid;flex-shrink:0;grid-template-columns:60px 1fr auto;padding-right:16px;position:sticky;top:0;z-index:1}.boot-site-hub__actions{flex-shrink:0}.boot-site-hub__title{align-items:center;display:flex;text-decoration:none}.boot-site-hub__title .components-external-link__contents{margin-inline-start:4px;max-width:140px;overflow:hidden;text-decoration:none}.boot-site-hub__title .components-external-link__icon{opacity:0;transition:opacity .1s ease-out}.boot-site-hub__title:hover .components-external-link__icon{opacity:1}@media not (prefers-reduced-motion){.boot-site-hub__title{transition:outline .1s ease-out}}.boot-site-hub__title:focus:not(:active){outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-offset:calc(var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px))*-1)}.boot-site-hub__title-text{color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-size:13px;font-weight:499}.boot-site-hub__title-text,.boot-site-hub__url{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.boot-site-hub__url{color:var(--wpds-color-fg-content-neutral-weak,#707070);font-size:12px}"));
1179 document.head.appendChild(style);
1180 }
1181 function SiteHub() {
1182 const { dashboardLink, homeUrl, siteTitle } = (0, import_data3.useSelect)((select) => {
1183 const { getEntityRecord } = select(import_core_data2.store);
1184 const _base = getEntityRecord(
1185 "root",
1186 "__unstableBase"
1187 );
1188 return {
1189 dashboardLink: select(store).getDashboardLink(),
1190 homeUrl: _base?.home,
1191 siteTitle: !_base?.name && !!_base?.url ? (0, import_url.filterURLForDisplay)(_base?.url) : _base?.name
1192 };
1193 }, []);
1194 const { open: openCommandCenter } = (0, import_data3.useDispatch)(import_commands.store);
1195 return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "boot-site-hub", children: [
1196 /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1197 site_icon_link_default,
1198 {
1199 to: dashboardLink || "/",
1200 "aria-label": (0, import_i18n2.__)("Go to the Dashboard")
1201 }
1202 ),
1203 /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1204 import_components3.ExternalLink,
1205 {
1206 href: homeUrl ?? "/",
1207 className: "boot-site-hub__title",
1208 children: [
1209 /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "boot-site-hub__title-text", children: siteTitle && (0, import_html_entities.decodeEntities)(siteTitle) }),
1210 /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "boot-site-hub__url", children: (0, import_url.filterURLForDisplay)(homeUrl ?? "") })
1211 ]
1212 }
1213 ),
1214 /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_components3.__experimentalHStack, { className: "boot-site-hub__actions", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1215 import_components3.Button,
1216 {
1217 variant: "tertiary",
1218 icon: search_default,
1219 onClick: () => openCommandCenter(),
1220 size: "compact",
1221 label: (0, import_i18n2.__)("Open command palette"),
1222 shortcut: import_keycodes.displayShortcut.primary("k")
1223 }
1224 ) })
1225 ] });
1226 }
1227 var site_hub_default = SiteHub;
1228
1229 // packages/boot/build-module/components/navigation/index.mjs
1230 var import_element8 = __toESM(require_element(), 1);
1231 var import_data6 = __toESM(require_data(), 1);
1232
1233 // packages/boot/build-module/components/navigation/navigation-item/index.mjs
1234 var import_components6 = __toESM(require_components(), 1);
1235
1236 // packages/boot/build-module/components/navigation/router-link-item.mjs
1237 var import_element5 = __toESM(require_element(), 1);
1238 var import_components4 = __toESM(require_components(), 1);
1239 import { privateApis as routePrivateApis2 } from "@wordpress/route";
1240 var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
1241 var { createLink } = unlock(routePrivateApis2);
1242 function AnchorOnlyItem(props, forwardedRef) {
1243 return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_components4.__experimentalItem, { as: "a", ref: forwardedRef, ...props });
1244 }
1245 var RouterLinkItem = createLink((0, import_element5.forwardRef)(AnchorOnlyItem));
1246 var router_link_item_default = RouterLinkItem;
1247
1248 // packages/boot/build-module/components/navigation/items.mjs
1249 var import_element6 = __toESM(require_element(), 1);
1250 var import_components5 = __toESM(require_components(), 1);
1251 var import_primitives11 = __toESM(require_primitives(), 1);
1252 var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
1253 function isSvg(element) {
1254 return (0, import_element6.isValidElement)(element) && (element.type === import_primitives11.SVG || element.type === "svg");
1255 }
1256 function wrapIcon(icon, shouldShowPlaceholder = true) {
1257 if (isSvg(icon)) {
1258 return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_components5.Icon, { icon });
1259 }
1260 if (typeof icon === "string" && icon.startsWith("dashicons-")) {
1261 const iconKey = icon.replace(
1262 /^dashicons-/,
1263 ""
1264 );
1265 return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1266 import_components5.Dashicon,
1267 {
1268 style: { padding: "2px" },
1269 icon: iconKey,
1270 "aria-hidden": "true"
1271 }
1272 );
1273 }
1274 if (typeof icon === "string" && icon.startsWith("data:")) {
1275 return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1276 "img",
1277 {
1278 src: icon,
1279 alt: "",
1280 "aria-hidden": "true",
1281 style: {
1282 width: "20px",
1283 height: "20px",
1284 display: "block",
1285 padding: "2px"
1286 }
1287 }
1288 );
1289 }
1290 if (icon) {
1291 return icon;
1292 }
1293 if (shouldShowPlaceholder) {
1294 return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1295 "div",
1296 {
1297 style: { width: "24px", height: "24px" },
1298 "aria-hidden": "true"
1299 }
1300 );
1301 }
1302 return null;
1303 }
1304
1305 // packages/boot/build-module/components/navigation/navigation-item/index.mjs
1306 var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
1307 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='26b8e27d3f']")) {
1308 const style = document.createElement("style");
1309 style.setAttribute("data-wp-hash", "26b8e27d3f");
1310 style.appendChild(document.createTextNode('.boot-navigation-item.components-item{align-items:center;border:none;color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);display:flex;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;line-height:20px;margin-block-end:4px;margin-inline:12px;min-height:32px;padding-block:0;padding-inline:4px;width:calc(100% - 24px)}.boot-dropdown-item__children .boot-navigation-item.components-item{min-height:24px}.boot-navigation-item.components-item{border-radius:var(--wpds-border-radius-sm,2px)}.boot-navigation-item.components-item.active,.boot-navigation-item.components-item:focus,.boot-navigation-item.components-item:hover,.boot-navigation-item.components-item[aria-current=true]{color:var(--wpds-color-fg-interactive-brand-active,var(--wp-admin-theme-color,#3858e9))}.boot-navigation-item.components-item.active{font-weight:499}.boot-navigation-item.components-item svg:last-child{padding:4px}.boot-navigation-item.components-item[aria-current=true]{color:var(--wpds-color-fg-interactive-brand-active,var(--wp-admin-theme-color,#3858e9));font-weight:499}.boot-navigation-item.components-item:focus-visible{transform:translateZ(0)}.boot-navigation-item.components-item.with-suffix{padding-right:16px}'));
1311 document.head.appendChild(style);
1312 }
1313 function NavigationItem({
1314 className,
1315 icon,
1316 shouldShowPlaceholder = true,
1317 children,
1318 to
1319 }) {
1320 const isExternal = !String(
1321 new URL(to, window.location.origin)
1322 ).startsWith(window.location.origin);
1323 const content = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_components6.__experimentalHStack, { justify: "flex-start", spacing: 2, style: { flexGrow: "1" }, children: [
1324 wrapIcon(icon, shouldShowPlaceholder),
1325 /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_components6.FlexBlock, { children })
1326 ] });
1327 if (isExternal) {
1328 return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1329 import_components6.__experimentalItem,
1330 {
1331 as: "a",
1332 href: to,
1333 className: clsx_default("boot-navigation-item", className),
1334 children: content
1335 }
1336 );
1337 }
1338 return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1339 router_link_item_default,
1340 {
1341 to,
1342 className: clsx_default("boot-navigation-item", className),
1343 children: content
1344 }
1345 );
1346 }
1347
1348 // packages/boot/build-module/components/navigation/drilldown-item/index.mjs
1349 var import_components7 = __toESM(require_components(), 1);
1350 var import_i18n3 = __toESM(require_i18n(), 1);
1351 var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
1352 function DrilldownItem({
1353 className,
1354 id,
1355 icon,
1356 shouldShowPlaceholder = true,
1357 children,
1358 onNavigate
1359 }) {
1360 const handleClick = (e) => {
1361 e.preventDefault();
1362 onNavigate({ id, direction: "forward" });
1363 };
1364 return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1365 import_components7.__experimentalItem,
1366 {
1367 className: clsx_default("boot-navigation-item", className),
1368 onClick: handleClick,
1369 children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
1370 import_components7.__experimentalHStack,
1371 {
1372 justify: "flex-start",
1373 spacing: 2,
1374 style: { flexGrow: "1" },
1375 children: [
1376 wrapIcon(icon, shouldShowPlaceholder),
1377 /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components7.FlexBlock, { children }),
1378 /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_components7.Icon, { icon: (0, import_i18n3.isRTL)() ? chevron_left_small_default : chevron_right_small_default })
1379 ]
1380 }
1381 )
1382 }
1383 );
1384 }
1385
1386 // packages/boot/build-module/components/navigation/dropdown-item/index.mjs
1387 var import_components8 = __toESM(require_components(), 1);
1388 var import_compose = __toESM(require_compose(), 1);
1389 var import_data4 = __toESM(require_data(), 1);
1390 var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
1391 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='608eff82f3']")) {
1392 const style = document.createElement("style");
1393 style.setAttribute("data-wp-hash", "608eff82f3");
1394 style.appendChild(document.createTextNode(".boot-dropdown-item__children{display:flex;flex-direction:column;margin-block-end:2px;margin-block-start:-2px;margin-inline-start:30px;overflow:hidden;padding:2px}.boot-dropdown-item__chevron.is-up{transform:rotate(180deg)}"));
1395 document.head.appendChild(style);
1396 }
1397 var ANIMATION_DURATION = 0.2;
1398 function DropdownItem({
1399 className,
1400 id,
1401 icon,
1402 children,
1403 isExpanded,
1404 onToggle
1405 }) {
1406 const menuItems = (0, import_data4.useSelect)(
1407 (select) => (
1408 // @ts-ignore
1409 select(STORE_NAME).getMenuItems()
1410 ),
1411 []
1412 );
1413 const items = menuItems.filter((item) => item.parent === id);
1414 const disableMotion = (0, import_compose.useReducedMotion)();
1415 return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "boot-dropdown-item", children: [
1416 /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1417 import_components8.__experimentalItem,
1418 {
1419 className: clsx_default("boot-navigation-item", className),
1420 onClick: (e) => {
1421 e.preventDefault();
1422 e.stopPropagation();
1423 onToggle();
1424 },
1425 onMouseDown: (e) => e.preventDefault(),
1426 children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1427 import_components8.__experimentalHStack,
1428 {
1429 justify: "flex-start",
1430 spacing: 2,
1431 style: { flexGrow: "1" },
1432 children: [
1433 wrapIcon(icon, false),
1434 /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components8.FlexBlock, { children }),
1435 /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1436 import_components8.Icon,
1437 {
1438 icon: chevron_down_small_default,
1439 className: clsx_default("boot-dropdown-item__chevron", {
1440 "is-up": isExpanded
1441 })
1442 }
1443 )
1444 ]
1445 }
1446 )
1447 }
1448 ),
1449 /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components8.__unstableAnimatePresence, { initial: false, children: isExpanded && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1450 import_components8.__unstableMotion.div,
1451 {
1452 initial: { height: 0 },
1453 animate: { height: "auto" },
1454 exit: { height: 0 },
1455 transition: {
1456 type: "tween",
1457 duration: disableMotion ? 0 : ANIMATION_DURATION,
1458 ease: "easeOut"
1459 },
1460 className: "boot-dropdown-item__children",
1461 children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1462 NavigationItem,
1463 {
1464 to: item.to,
1465 shouldShowPlaceholder: false,
1466 children: item.label
1467 },
1468 index
1469 ))
1470 }
1471 ) })
1472 ] });
1473 }
1474
1475 // packages/boot/build-module/components/navigation/navigation-screen/index.mjs
1476 var import_components9 = __toESM(require_components(), 1);
1477 var import_i18n4 = __toESM(require_i18n(), 1);
1478 var import_compose2 = __toESM(require_compose(), 1);
1479 var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
1480 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='c5e42e1495']")) {
1481 const style = document.createElement("style");
1482 style.setAttribute("data-wp-hash", "c5e42e1495");
1483 style.appendChild(document.createTextNode(".boot-navigation-screen{padding-block-end:4px}.boot-navigation-screen .components-text{color:var(--wpds-color-fg-content-neutral,#1e1e1e)}.boot-navigation-screen__title-icon{padding:12px 16px 8px;position:sticky;top:0}.boot-navigation-screen__title{flex-grow:1;overflow-wrap:break-word}.boot-navigation-screen__title.boot-navigation-screen__title,.boot-navigation-screen__title.boot-navigation-screen__title .boot-navigation-screen__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);line-height:32px}.boot-navigation-screen__actions{display:flex;flex-shrink:0}"));
1484 document.head.appendChild(style);
1485 }
1486 var ANIMATION_DURATION2 = 0.3;
1487 var slideVariants = {
1488 initial: (direction) => ({
1489 x: direction === "forward" ? 100 : -100,
1490 opacity: 0
1491 }),
1492 animate: {
1493 x: 0,
1494 opacity: 1
1495 },
1496 exit: (direction) => ({
1497 x: direction === "forward" ? 100 : -100,
1498 opacity: 0
1499 })
1500 };
1501 function NavigationScreen({
1502 isRoot,
1503 title,
1504 actions,
1505 content,
1506 description,
1507 animationDirection,
1508 backMenuItem,
1509 backButtonRef,
1510 navigationKey,
1511 onNavigate
1512 }) {
1513 const icon = (0, import_i18n4.isRTL)() ? chevron_right_default : chevron_left_default;
1514 const disableMotion = (0, import_compose2.useReducedMotion)();
1515 const handleBackClick = (e) => {
1516 e.preventDefault();
1517 onNavigate({ id: backMenuItem, direction: "backward" });
1518 };
1519 return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1520 "div",
1521 {
1522 className: "boot-navigation-screen",
1523 style: {
1524 overflow: "hidden",
1525 position: "relative",
1526 display: "grid",
1527 gridTemplateColumns: "1fr",
1528 gridTemplateRows: "1fr"
1529 },
1530 children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components9.__unstableAnimatePresence, { initial: false, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1531 import_components9.__unstableMotion.div,
1532 {
1533 custom: animationDirection,
1534 variants: slideVariants,
1535 initial: "initial",
1536 animate: "animate",
1537 exit: "exit",
1538 transition: {
1539 type: "tween",
1540 duration: disableMotion ? 0 : ANIMATION_DURATION2,
1541 ease: [0.33, 0, 0, 1]
1542 },
1543 style: {
1544 width: "100%",
1545 gridColumn: "1",
1546 gridRow: "1"
1547 },
1548 children: [
1549 /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1550 import_components9.__experimentalHStack,
1551 {
1552 spacing: 2,
1553 className: "boot-navigation-screen__title-icon",
1554 children: [
1555 !isRoot && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1556 import_components9.Button,
1557 {
1558 ref: backButtonRef,
1559 icon,
1560 onClick: handleBackClick,
1561 label: (0, import_i18n4.__)("Back"),
1562 size: "small",
1563 variant: "tertiary"
1564 }
1565 ),
1566 /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1567 import_components9.__experimentalHeading,
1568 {
1569 className: "boot-navigation-screen__title",
1570 level: 1,
1571 size: "15px",
1572 children: title
1573 }
1574 ),
1575 actions && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "boot-navigation-screen__actions", children: actions })
1576 ]
1577 }
1578 ),
1579 description && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "boot-navigation-screen__description", children: description }),
1580 content
1581 ]
1582 },
1583 navigationKey
1584 ) })
1585 }
1586 );
1587 }
1588
1589 // packages/boot/build-module/components/navigation/use-sidebar-parent.mjs
1590 var import_element7 = __toESM(require_element(), 1);
1591 var import_data5 = __toESM(require_data(), 1);
1592 import { privateApis as routePrivateApis3 } from "@wordpress/route";
1593
1594 // packages/boot/build-module/components/navigation/path-matching.mjs
1595 var isValidParentPath = (currentPath, menuPath) => {
1596 if (!menuPath || menuPath === currentPath) {
1597 return false;
1598 }
1599 const normalizePath = (path) => {
1600 const normalized = path.startsWith("/") ? path : "/" + path;
1601 return normalized.endsWith("/") && normalized.length > 1 ? normalized.slice(0, -1) : normalized;
1602 };
1603 const normalizedCurrent = normalizePath(currentPath);
1604 const normalizedMenu = normalizePath(menuPath);
1605 return normalizedCurrent.startsWith(normalizedMenu) && (normalizedCurrent[normalizedMenu.length] === "/" || normalizedMenu === "/");
1606 };
1607 var findClosestMenuItem = (currentPath, menuItems) => {
1608 const exactMatch = menuItems.find((item) => item.to === currentPath);
1609 if (exactMatch) {
1610 return exactMatch;
1611 }
1612 let bestMatch = null;
1613 let bestPathLength = 0;
1614 for (const item of menuItems) {
1615 if (!item.to) {
1616 continue;
1617 }
1618 if (isValidParentPath(currentPath, item.to)) {
1619 if (item.to.length > bestPathLength) {
1620 bestMatch = item;
1621 bestPathLength = item.to.length;
1622 }
1623 }
1624 }
1625 return bestMatch;
1626 };
1627 var findDrilldownParent = (id, menuItems) => {
1628 if (!id) {
1629 return void 0;
1630 }
1631 const currentItem = menuItems.find((item) => item.id === id);
1632 if (!currentItem) {
1633 return void 0;
1634 }
1635 if (currentItem.parent) {
1636 const parentItem = menuItems.find(
1637 (item) => item.id === currentItem.parent
1638 );
1639 if (parentItem?.parent_type === "drilldown") {
1640 return parentItem.id;
1641 }
1642 if (parentItem) {
1643 return findDrilldownParent(parentItem.id, menuItems);
1644 }
1645 }
1646 return void 0;
1647 };
1648 var findDropdownParent = (id, menuItems) => {
1649 if (!id) {
1650 return void 0;
1651 }
1652 const currentItem = menuItems.find((item) => item.id === id);
1653 if (!currentItem) {
1654 return void 0;
1655 }
1656 if (currentItem.parent) {
1657 const parentItem = menuItems.find(
1658 (item) => item.id === currentItem.parent
1659 );
1660 if (parentItem?.parent_type === "dropdown") {
1661 return parentItem.id;
1662 }
1663 }
1664 return void 0;
1665 };
1666
1667 // packages/boot/build-module/components/navigation/use-sidebar-parent.mjs
1668 var { useRouter: useRouter2, useMatches } = unlock(routePrivateApis3);
1669 function useSidebarParent() {
1670 const matches = useMatches();
1671 const router = useRouter2();
1672 const menuItems = (0, import_data5.useSelect)(
1673 (select) => (
1674 // @ts-ignore
1675 select(STORE_NAME).getMenuItems()
1676 ),
1677 []
1678 );
1679 const currentPath = matches[matches.length - 1].pathname.slice(
1680 router.options.basepath?.length ?? 0
1681 );
1682 const currentMenuItem = findClosestMenuItem(currentPath, menuItems);
1683 const [parentId, setParentId] = (0, import_element7.useState)(
1684 findDrilldownParent(currentMenuItem?.id, menuItems)
1685 );
1686 const [parentDropdownId, setParentDropdownId] = (0, import_element7.useState)(findDropdownParent(currentMenuItem?.id, menuItems));
1687 (0, import_element7.useEffect)(() => {
1688 const matchedMenuItem = findClosestMenuItem(currentPath, menuItems);
1689 const updatedParentId = findDrilldownParent(
1690 matchedMenuItem?.id,
1691 menuItems
1692 );
1693 const updatedDropdownParent = findDropdownParent(
1694 matchedMenuItem?.id,
1695 menuItems
1696 );
1697 setParentId(updatedParentId);
1698 setParentDropdownId(updatedDropdownParent);
1699 }, [currentPath, menuItems]);
1700 return [
1701 parentId,
1702 setParentId,
1703 parentDropdownId,
1704 setParentDropdownId
1705 ];
1706 }
1707
1708 // packages/boot/build-module/components/navigation/index.mjs
1709 var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
1710 function Navigation() {
1711 const backButtonRef = (0, import_element8.useRef)(null);
1712 const [animationDirection, setAnimationDirection] = (0, import_element8.useState)(null);
1713 const [parentId, setParentId, parentDropdownId, setParentDropdownId] = useSidebarParent();
1714 const menuItems = (0, import_data6.useSelect)(
1715 (select) => (
1716 // @ts-ignore
1717 select(STORE_NAME).getMenuItems()
1718 ),
1719 []
1720 );
1721 const parent = (0, import_element8.useMemo)(
1722 () => menuItems.find((item) => item.id === parentId),
1723 [menuItems, parentId]
1724 );
1725 const navigationKey = parent ? `drilldown-${parent.id}` : "root";
1726 const handleNavigate = ({
1727 id,
1728 direction
1729 }) => {
1730 setAnimationDirection(direction);
1731 setParentId(id);
1732 };
1733 const handleDropdownToggle = (dropdownId) => {
1734 setParentDropdownId(
1735 parentDropdownId === dropdownId ? void 0 : dropdownId
1736 );
1737 };
1738 const items = (0, import_element8.useMemo)(
1739 () => menuItems.filter((item) => item.parent === parentId),
1740 [menuItems, parentId]
1741 );
1742 const hasRealIcons = items.some((item) => !!item.icon);
1743 return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1744 NavigationScreen,
1745 {
1746 isRoot: !parent,
1747 title: parent ? parent.label : "",
1748 backMenuItem: parent?.parent,
1749 backButtonRef,
1750 animationDirection: animationDirection || void 0,
1751 navigationKey,
1752 onNavigate: handleNavigate,
1753 content: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_jsx_runtime23.Fragment, { children: items.map((item) => {
1754 if (item.parent_type === "dropdown") {
1755 return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1756 DropdownItem,
1757 {
1758 id: item.id,
1759 className: "boot-navigation-item",
1760 icon: item.icon,
1761 shouldShowPlaceholder: hasRealIcons,
1762 isExpanded: parentDropdownId === item.id,
1763 onToggle: () => handleDropdownToggle(item.id),
1764 children: item.label
1765 },
1766 item.id
1767 );
1768 }
1769 if (item.parent_type === "drilldown") {
1770 return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1771 DrilldownItem,
1772 {
1773 id: item.id,
1774 icon: item.icon,
1775 shouldShowPlaceholder: hasRealIcons,
1776 onNavigate: handleNavigate,
1777 children: item.label
1778 },
1779 item.id
1780 );
1781 }
1782 return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1783 NavigationItem,
1784 {
1785 to: item.to,
1786 icon: item.icon,
1787 shouldShowPlaceholder: hasRealIcons,
1788 children: item.label
1789 },
1790 item.id
1791 );
1792 }) })
1793 }
1794 );
1795 }
1796 var navigation_default = Navigation;
1797
1798 // packages/boot/build-module/components/save-button/index.mjs
1799 var import_element10 = __toESM(require_element(), 1);
1800 var import_data8 = __toESM(require_data(), 1);
1801 var import_i18n6 = __toESM(require_i18n(), 1);
1802 var import_core_data4 = __toESM(require_core_data(), 1);
1803 var import_keycodes2 = __toESM(require_keycodes(), 1);
1804 var import_editor2 = __toESM(require_editor(), 1);
1805 var import_components10 = __toESM(require_components(), 1);
1806
1807 // packages/boot/build-module/components/save-panel/use-save-shortcut.mjs
1808 var import_element9 = __toESM(require_element(), 1);
1809 var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1);
1810 var import_i18n5 = __toESM(require_i18n(), 1);
1811 var import_data7 = __toESM(require_data(), 1);
1812 var import_core_data3 = __toESM(require_core_data(), 1);
1813 var import_editor = __toESM(require_editor(), 1);
1814 var shortcutName = "core/boot/save";
1815 function useSaveShortcut({
1816 openSavePanel
1817 }) {
1818 const { __experimentalGetDirtyEntityRecords, isSavingEntityRecord } = (0, import_data7.useSelect)(import_core_data3.store);
1819 const { hasNonPostEntityChanges, isPostSavingLocked } = (0, import_data7.useSelect)(import_editor.store);
1820 const { savePost } = (0, import_data7.useDispatch)(import_editor.store);
1821 const { registerShortcut, unregisterShortcut } = (0, import_data7.useDispatch)(
1822 import_keyboard_shortcuts.store
1823 );
1824 (0, import_element9.useEffect)(() => {
1825 registerShortcut({
1826 name: shortcutName,
1827 category: "global",
1828 description: (0, import_i18n5.__)("Save your changes."),
1829 keyCombination: {
1830 modifier: "primary",
1831 character: "s"
1832 }
1833 });
1834 return () => {
1835 unregisterShortcut(shortcutName);
1836 };
1837 }, [registerShortcut, unregisterShortcut]);
1838 (0, import_keyboard_shortcuts.useShortcut)(shortcutName, (event) => {
1839 event.preventDefault();
1840 const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
1841 const hasDirtyEntities = !!dirtyEntityRecords.length;
1842 const isSaving = dirtyEntityRecords.some(
1843 (record) => isSavingEntityRecord(record.kind, record.name, record.key)
1844 );
1845 if (!hasDirtyEntities || isSaving) {
1846 return;
1847 }
1848 if (hasNonPostEntityChanges()) {
1849 openSavePanel();
1850 } else if (!isPostSavingLocked()) {
1851 savePost();
1852 }
1853 });
1854 }
1855
1856 // packages/boot/build-module/components/save-button/index.mjs
1857 var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
1858 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='294e36b777']")) {
1859 const style = document.createElement("style");
1860 style.setAttribute("data-wp-hash", "294e36b777");
1861 style.appendChild(document.createTextNode(".boot-save-button{width:100%}"));
1862 document.head.appendChild(style);
1863 }
1864 function SaveButton() {
1865 const [isSaveViewOpen, setIsSaveViewOpened] = (0, import_element10.useState)(false);
1866 const { isSaving, dirtyEntityRecordsCount } = (0, import_data8.useSelect)((select) => {
1867 const { isSavingEntityRecord, __experimentalGetDirtyEntityRecords } = select(import_core_data4.store);
1868 const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
1869 return {
1870 isSaving: dirtyEntityRecords.some(
1871 (record) => isSavingEntityRecord(record.kind, record.name, record.key)
1872 ),
1873 dirtyEntityRecordsCount: dirtyEntityRecords.length
1874 };
1875 }, []);
1876 const [showSavedState, setShowSavedState] = (0, import_element10.useState)(false);
1877 (0, import_element10.useEffect)(() => {
1878 if (isSaving) {
1879 setShowSavedState(true);
1880 }
1881 }, [isSaving]);
1882 const hasChanges = dirtyEntityRecordsCount > 0;
1883 (0, import_element10.useEffect)(() => {
1884 if (!isSaving && hasChanges) {
1885 setShowSavedState(false);
1886 }
1887 }, [isSaving, hasChanges]);
1888 function hideSavedState() {
1889 if (showSavedState) {
1890 setShowSavedState(false);
1891 }
1892 }
1893 const shouldShowButton = hasChanges || showSavedState;
1894 useSaveShortcut({ openSavePanel: () => setIsSaveViewOpened(true) });
1895 if (!shouldShowButton) {
1896 return null;
1897 }
1898 const isInSavedState = showSavedState && !hasChanges;
1899 const disabled = isSaving || isInSavedState;
1900 const getLabel = () => {
1901 if (isInSavedState) {
1902 return (0, import_i18n6.__)("Saved");
1903 }
1904 return (0, import_i18n6.sprintf)(
1905 // translators: %d: number of unsaved changes (number).
1906 (0, import_i18n6._n)(
1907 "Review %d change\u2026",
1908 "Review %d changes\u2026",
1909 dirtyEntityRecordsCount
1910 ),
1911 dirtyEntityRecordsCount
1912 );
1913 };
1914 const label = getLabel();
1915 return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
1916 /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1917 import_components10.Tooltip,
1918 {
1919 text: hasChanges ? label : void 0,
1920 shortcut: import_keycodes2.displayShortcut.primary("s"),
1921 children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1922 import_components10.Button,
1923 {
1924 variant: "primary",
1925 size: "compact",
1926 onClick: () => setIsSaveViewOpened(true),
1927 onBlur: hideSavedState,
1928 disabled,
1929 accessibleWhenDisabled: true,
1930 isBusy: isSaving,
1931 "aria-keyshortcuts": import_keycodes2.rawShortcut.primary("s"),
1932 className: "boot-save-button",
1933 icon: isInSavedState ? check_default : void 0,
1934 children: label
1935 }
1936 )
1937 }
1938 ),
1939 isSaveViewOpen && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1940 import_components10.Modal,
1941 {
1942 title: (0, import_i18n6.__)("Review changes"),
1943 onRequestClose: () => setIsSaveViewOpened(false),
1944 size: "small",
1945 children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1946 import_editor2.EntitiesSavedStates,
1947 {
1948 close: () => setIsSaveViewOpened(false),
1949 variant: "inline"
1950 }
1951 )
1952 }
1953 )
1954 ] });
1955 }
1956
1957 // packages/boot/build-module/components/sidebar/index.mjs
1958 var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
1959 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='6064f6f183']")) {
1960 const style = document.createElement("style");
1961 style.setAttribute("data-wp-hash", "6064f6f183");
1962 style.appendChild(document.createTextNode(".boot-sidebar__scrollable{display:flex;flex-direction:column;height:100%;overflow:auto;position:relative}.boot-sidebar__content{contain:content;flex-grow:1;position:relative}.boot-sidebar__footer{padding:16px 8px 8px 16px}"));
1963 document.head.appendChild(style);
1964 }
1965 function Sidebar() {
1966 return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "boot-sidebar__scrollable", children: [
1967 /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(site_hub_default, {}),
1968 /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "boot-sidebar__content", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(navigation_default, {}) }),
1969 /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "boot-sidebar__footer", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SaveButton, {}) })
1970 ] });
1971 }
1972
1973 // packages/boot/build-module/components/save-panel/index.mjs
1974 var import_element11 = __toESM(require_element(), 1);
1975 var import_components11 = __toESM(require_components(), 1);
1976 var import_editor3 = __toESM(require_editor(), 1);
1977 var import_i18n7 = __toESM(require_i18n(), 1);
1978 var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
1979 function SavePanel() {
1980 const [isOpen, setIsOpen] = (0, import_element11.useState)(false);
1981 useSaveShortcut({
1982 openSavePanel: () => setIsOpen(true)
1983 });
1984 if (!isOpen) {
1985 return false;
1986 }
1987 return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1988 import_components11.Modal,
1989 {
1990 className: "edit-site-save-panel__modal",
1991 onRequestClose: () => setIsOpen(false),
1992 title: (0, import_i18n7.__)("Review changes"),
1993 size: "small",
1994 children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1995 import_editor3.EntitiesSavedStates,
1996 {
1997 close: () => setIsOpen(false),
1998 variant: "inline"
1999 }
2000 )
2001 }
2002 );
2003 }
2004
2005 // packages/boot/build-module/components/canvas-renderer/index.mjs
2006 var import_element13 = __toESM(require_element(), 1);
2007
2008 // packages/boot/build-module/components/canvas/index.mjs
2009 var import_element12 = __toESM(require_element(), 1);
2010 var import_components13 = __toESM(require_components(), 1);
2011 import { useNavigate } from "@wordpress/route";
2012
2013 // packages/boot/build-module/components/canvas/back-button.mjs
2014 var import_components12 = __toESM(require_components(), 1);
2015 var import_compose3 = __toESM(require_compose(), 1);
2016 var import_i18n8 = __toESM(require_i18n(), 1);
2017 var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
2018 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='c8750e18d1']")) {
2019 const style = document.createElement("style");
2020 style.setAttribute("data-wp-hash", "c8750e18d1");
2021 style.appendChild(document.createTextNode(".boot-canvas-back-button{height:64px;left:0;position:absolute;top:0;width:64px;z-index:100}.boot-canvas-back-button__container{height:100%;position:relative;width:100%}.boot-canvas-back-button__link.components-button{align-items:center;background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);border-radius:0;display:inline-flex;height:64px;justify-content:center;padding:0;text-decoration:none;width:64px}@media not (prefers-reduced-motion){.boot-canvas-back-button__link.components-button{transition:outline .1s ease-out}}.boot-canvas-back-button__link.components-button:focus:not(:active){outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-offset:calc(var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px))*-1)}.boot-canvas-back-button__icon{align-items:center;background-color:#ccc;display:flex;height:64px;justify-content:center;left:0;pointer-events:none;position:absolute;top:0;width:64px}.boot-canvas-back-button__icon svg{fill:currentColor}.boot-canvas-back-button__icon.has-site-icon{-webkit-backdrop-filter:saturate(180%) blur(15px);backdrop-filter:saturate(180%) blur(15px);background-color:#fff9}.interface-interface-skeleton__header{margin-top:0!important}"));
2022 document.head.appendChild(style);
2023 }
2024 var toggleHomeIconVariants = {
2025 edit: {
2026 opacity: 0,
2027 scale: 0.2
2028 },
2029 hover: {
2030 opacity: 1,
2031 scale: 1,
2032 clipPath: "inset( 22% round 2px )"
2033 }
2034 };
2035 function BootBackButton({ length }) {
2036 const disableMotion = (0, import_compose3.useReducedMotion)();
2037 const handleBack = () => {
2038 window.history.back();
2039 };
2040 if (length > 1) {
2041 return null;
2042 }
2043 const transition = {
2044 duration: disableMotion ? 0 : 0.3
2045 };
2046 return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2047 import_components12.__unstableMotion.div,
2048 {
2049 className: "boot-canvas-back-button",
2050 animate: "edit",
2051 initial: "edit",
2052 whileHover: "hover",
2053 whileTap: "tap",
2054 transition,
2055 children: [
2056 /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2057 import_components12.Button,
2058 {
2059 className: "boot-canvas-back-button__link",
2060 onClick: handleBack,
2061 "aria-label": (0, import_i18n8.__)("Go back"),
2062 __next40pxDefaultSize: true,
2063 children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(site_icon_default, {})
2064 }
2065 ),
2066 /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2067 import_components12.__unstableMotion.div,
2068 {
2069 className: "boot-canvas-back-button__icon",
2070 variants: toggleHomeIconVariants,
2071 children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_components12.Icon, { icon: arrow_up_left_default })
2072 }
2073 )
2074 ]
2075 }
2076 );
2077 }
2078
2079 // packages/boot/build-module/components/canvas/index.mjs
2080 var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
2081 function Canvas({ canvas }) {
2082 const [Editor, setEditor] = (0, import_element12.useState)(null);
2083 const navigate = useNavigate();
2084 (0, import_element12.useEffect)(() => {
2085 import("@wordpress/lazy-editor").then((module) => {
2086 setEditor(() => module.Editor);
2087 }).catch((error) => {
2088 console.error("Failed to load lazy editor:", error);
2089 });
2090 }, []);
2091 if (!Editor) {
2092 return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2093 "div",
2094 {
2095 style: {
2096 display: "flex",
2097 justifyContent: "center",
2098 alignItems: "center",
2099 height: "100%",
2100 padding: "2rem"
2101 },
2102 children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components13.Spinner, {})
2103 }
2104 );
2105 }
2106 const backButton = !canvas.isPreview ? ({ length }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(BootBackButton, { length }) : void 0;
2107 return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: { height: "100%", position: "relative" }, children: [
2108 /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2109 "div",
2110 {
2111 style: { height: "100%" },
2112 inert: canvas.isPreview ? "true" : void 0,
2113 children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2114 Editor,
2115 {
2116 postType: canvas.postType,
2117 postId: canvas.postId,
2118 settings: {
2119 isPreviewMode: canvas.isPreview,
2120 styles: canvas.isPreview ? [{ css: "body{min-height:100vh;}" }] : []
2121 },
2122 backButton
2123 }
2124 )
2125 }
2126 ),
2127 canvas.isPreview && canvas.editLink && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2128 "div",
2129 {
2130 onClick: () => navigate({ to: canvas.editLink }),
2131 onKeyDown: (e) => {
2132 if (e.key === "Enter" || e.key === " ") {
2133 e.preventDefault();
2134 navigate({ to: canvas.editLink });
2135 }
2136 },
2137 style: {
2138 position: "absolute",
2139 inset: 0,
2140 cursor: "pointer",
2141 zIndex: 1
2142 },
2143 role: "button",
2144 tabIndex: 0,
2145 "aria-label": "Click to edit"
2146 }
2147 )
2148 ] });
2149 }
2150
2151 // packages/boot/build-module/components/canvas-renderer/index.mjs
2152 var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
2153 function CanvasRenderer({
2154 canvas,
2155 routeContentModule
2156 }) {
2157 const [CustomCanvas, setCustomCanvas] = (0, import_element13.useState)(null);
2158 (0, import_element13.useEffect)(() => {
2159 if (canvas === null && routeContentModule) {
2160 import(routeContentModule).then((module) => {
2161 setCustomCanvas(() => module.canvas);
2162 }).catch((error) => {
2163 console.error("Failed to load custom canvas:", error);
2164 });
2165 } else {
2166 setCustomCanvas(null);
2167 }
2168 }, [canvas, routeContentModule]);
2169 if (canvas === void 0) {
2170 return null;
2171 }
2172 if (canvas === null) {
2173 if (!CustomCanvas) {
2174 return null;
2175 }
2176 return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CustomCanvas, {});
2177 }
2178 return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Canvas, { canvas });
2179 }
2180
2181 // packages/boot/build-module/components/app/use-route-title.mjs
2182 var import_element14 = __toESM(require_element(), 1);
2183 var import_data9 = __toESM(require_data(), 1);
2184 var import_core_data5 = __toESM(require_core_data(), 1);
2185 var import_i18n9 = __toESM(require_i18n(), 1);
2186 var import_html_entities2 = __toESM(require_html_entities(), 1);
2187 import { speak } from "@wordpress/a11y";
2188 import { privateApis as routePrivateApis4 } from "@wordpress/route";
2189 var { useLocation, useMatches: useMatches2 } = unlock(routePrivateApis4);
2190 function useRouteTitle() {
2191 const location = useLocation();
2192 const matches = useMatches2();
2193 const currentMatch = matches[matches.length - 1];
2194 const routeTitle = currentMatch?.loaderData?.title;
2195 const siteTitle = (0, import_data9.useSelect)(
2196 (select) => select(import_core_data5.store).getEntityRecord(
2197 "root",
2198 "__unstableBase"
2199 )?.name,
2200 []
2201 );
2202 const isInitialLocationRef = (0, import_element14.useRef)(true);
2203 (0, import_element14.useEffect)(() => {
2204 isInitialLocationRef.current = false;
2205 }, [location]);
2206 (0, import_element14.useEffect)(() => {
2207 if (isInitialLocationRef.current) {
2208 return;
2209 }
2210 if (routeTitle && typeof routeTitle === "string" && siteTitle && typeof siteTitle === "string") {
2211 const decodedRouteTitle = (0, import_html_entities2.decodeEntities)(routeTitle);
2212 const decodedSiteTitle = (0, import_html_entities2.decodeEntities)(siteTitle);
2213 const formattedTitle = (0, import_i18n9.sprintf)(
2214 /* translators: Admin document title. 1: Admin screen name, 2: Site name. */
2215 (0, import_i18n9.__)("%1$s \u2039 %2$s \u2014 WordPress"),
2216 decodedRouteTitle,
2217 decodedSiteTitle
2218 );
2219 document.title = formattedTitle;
2220 if (decodedRouteTitle) {
2221 speak(decodedRouteTitle, "assertive");
2222 }
2223 }
2224 }, [routeTitle, siteTitle, location]);
2225 }
2226
2227 // packages/boot/build-module/components/user-theme-provider/index.mjs
2228 var import_theme = __toESM(require_theme(), 1);
2229 var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
2230 var ThemeProvider = unlock(import_theme.privateApis).ThemeProvider;
2231 var THEME_PRIMARY_COLORS = /* @__PURE__ */ new Map([
2232 ["light", "#0085ba"],
2233 ["modern", "#3858e9"],
2234 ["blue", "#096484"],
2235 ["coffee", "#46403c"],
2236 ["ectoplasm", "#523f6d"],
2237 ["midnight", "#e14d43"],
2238 ["ocean", "#627c83"],
2239 ["sunrise", "#dd823b"]
2240 ]);
2241 function getAdminThemePrimaryColor() {
2242 const theme = document.body.className.match(/admin-color-([a-z]+)/)?.[1];
2243 return theme && THEME_PRIMARY_COLORS.get(theme);
2244 }
2245 function UserThemeProvider({
2246 color,
2247 ...restProps
2248 }) {
2249 const primary = getAdminThemePrimaryColor();
2250 return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ThemeProvider, { ...restProps, color: { primary, ...color } });
2251 }
2252
2253 // packages/boot/build-module/components/root/index.mjs
2254 var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
2255 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='be0c278a6c']")) {
2256 const style = document.createElement("style");
2257 style.setAttribute("data-wp-hash", "be0c278a6c");
2258 style.appendChild(document.createTextNode(".boot-layout{background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}.boot-layout__sidebar-backdrop{background-color:#00000080;bottom:0;cursor:var(--wpds-cursor-control,pointer);left:0;position:fixed;right:0;top:0;z-index:100002}.boot-layout__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}.boot-layout__sidebar.is-mobile{background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);bottom:0;box-shadow:2px 0 8px #0003;inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}.boot-layout__mobile-sidebar-drawer{left:0;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout__mobile-sidebar-drawer{top:46px}.boot-layout__mobile-sidebar-drawer{align-items:center;background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border-bottom:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);display:flex;justify-content:flex-start;padding:16px;z-index:3}.boot-layout__canvas.has-mobile-drawer{padding-top:65px;position:relative}.boot-layout__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.boot-layout__surfaces{margin:8px}.boot-layout--single-page .boot-layout__surfaces{margin-top:0;margin-inline-start:0}}.boot-layout__inspector,.boot-layout__stage{background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border-radius:0;bottom:0;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__inspector,.boot-layout__stage{border-radius:8px;height:auto;margin:0;position:static;width:auto}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:auto}}.boot-layout__stage{z-index:2}@media (min-width:782px){.boot-layout__stage{z-index:auto}}.boot-layout__inspector{z-index:3}@media (min-width:782px){.boot-layout__inspector{z-index:auto}}.boot-layout__canvas{background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:0;bottom:0;box-shadow:0 1px 3px #0000001a;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw;z-index:1}.boot-layout--single-page .boot-layout__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__canvas{border-radius:8px;height:auto;position:static;width:auto;z-index:auto}.boot-layout--single-page .boot-layout__canvas{height:auto}.boot-layout.has-canvas .boot-layout__stage,.boot-layout__inspector{max-width:400px}}.boot-layout__canvas .interface-interface-skeleton{height:100%;left:0!important;position:relative;top:0!important}.boot-layout.has-full-canvas .boot-layout__surfaces{gap:0;margin:0}.boot-layout.has-full-canvas .boot-layout__inspector,.boot-layout.has-full-canvas .boot-layout__stage{display:none}.boot-layout.has-full-canvas .boot-layout__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;left:0;margin:0;max-width:none;overflow:hidden;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:46px}@media (min-width:782px){.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:32px}}"));
2259 document.head.appendChild(style);
2260 }
2261 var { useLocation: useLocation2, useMatches: useMatches3, Outlet } = unlock(routePrivateApis5);
2262 function Root() {
2263 const matches = useMatches3();
2264 const location = useLocation2();
2265 const currentMatch = matches[matches.length - 1];
2266 const canvas = currentMatch?.loaderData?.canvas;
2267 const routeContentModule = currentMatch?.loaderData?.routeContentModule;
2268 const isFullScreen = canvas && !canvas.isPreview;
2269 useRouteTitle();
2270 const isMobileViewport = (0, import_compose4.useViewportMatch)("medium", "<");
2271 const [isMobileSidebarOpen, setIsMobileSidebarOpen] = (0, import_element15.useState)(false);
2272 const disableMotion = (0, import_compose4.useReducedMotion)();
2273 (0, import_element15.useEffect)(() => {
2274 setIsMobileSidebarOpen(false);
2275 }, [location.pathname, isMobileViewport]);
2276 return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components14.SlotFillProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(UserThemeProvider, { isRoot: true, color: { bg: "#f8f8f8" }, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(UserThemeProvider, { color: { bg: "#1d2327" }, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2277 "div",
2278 {
2279 className: clsx_default("boot-layout", {
2280 "has-canvas": !!canvas || canvas === null,
2281 "has-full-canvas": isFullScreen
2282 }),
2283 children: [
2284 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SavePanel, {}),
2285 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_notices.SnackbarNotices, { className: "boot-notices__snackbar" }),
2286 isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(page_default.SidebarToggleFill, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2287 import_components14.Button,
2288 {
2289 icon: menu_default,
2290 onClick: () => setIsMobileSidebarOpen(true),
2291 label: (0, import_i18n10.__)("Open navigation panel"),
2292 size: "compact"
2293 }
2294 ) }),
2295 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components14.__unstableAnimatePresence, { children: isMobileViewport && isMobileSidebarOpen && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2296 import_components14.__unstableMotion.div,
2297 {
2298 initial: { opacity: 0 },
2299 animate: { opacity: 1 },
2300 exit: { opacity: 0 },
2301 transition: {
2302 type: "tween",
2303 duration: disableMotion ? 0 : 0.2,
2304 ease: "easeOut"
2305 },
2306 className: "boot-layout__sidebar-backdrop",
2307 onClick: () => setIsMobileSidebarOpen(false),
2308 onKeyDown: (event) => {
2309 if (event.key === "Escape") {
2310 setIsMobileSidebarOpen(false);
2311 }
2312 },
2313 role: "button",
2314 tabIndex: -1,
2315 "aria-label": (0, import_i18n10.__)(
2316 "Close navigation panel"
2317 )
2318 }
2319 ) }),
2320 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components14.__unstableAnimatePresence, { children: isMobileViewport && isMobileSidebarOpen && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2321 import_components14.__unstableMotion.div,
2322 {
2323 initial: { x: "-100%" },
2324 animate: { x: 0 },
2325 exit: { x: "-100%" },
2326 transition: {
2327 type: "tween",
2328 duration: disableMotion ? 0 : 0.2,
2329 ease: "easeOut"
2330 },
2331 className: "boot-layout__sidebar is-mobile",
2332 children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Sidebar, {})
2333 }
2334 ) }),
2335 !isMobileViewport && !isFullScreen && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "boot-layout__sidebar", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Sidebar, {}) }),
2336 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "boot-layout__surfaces", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(UserThemeProvider, { color: { bg: "#ffffff" }, children: [
2337 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Outlet, {}),
2338 (canvas || canvas === null) && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2339 "div",
2340 {
2341 className: clsx_default(
2342 "boot-layout__canvas",
2343 {
2344 "has-mobile-drawer": canvas?.isPreview && isMobileViewport
2345 }
2346 ),
2347 children: [
2348 canvas?.isPreview && isMobileViewport && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "boot-layout__mobile-sidebar-drawer", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2349 import_components14.Button,
2350 {
2351 icon: menu_default,
2352 onClick: () => setIsMobileSidebarOpen(
2353 true
2354 ),
2355 label: (0, import_i18n10.__)(
2356 "Open navigation panel"
2357 ),
2358 size: "compact"
2359 }
2360 ) }),
2361 /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2362 CanvasRenderer,
2363 {
2364 canvas,
2365 routeContentModule
2366 }
2367 )
2368 ]
2369 }
2370 )
2371 ] }) })
2372 ]
2373 }
2374 ) }) }) });
2375 }
2376
2377 // packages/boot/build-module/components/app/router.mjs
2378 var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
2379 var {
2380 createLazyRoute,
2381 createRouter,
2382 createRootRoute,
2383 createRoute,
2384 RouterProvider,
2385 createBrowserHistory,
2386 parseHref,
2387 useLoaderData
2388 } = unlock(routePrivateApis6);
2389 function NotFoundComponent() {
2390 return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "boot-layout__stage", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(page_default, { title: (0, import_i18n11.__)("Route not found"), hasPadding: true, children: (0, import_i18n11.__)("The page you're looking for does not exist") }) });
2391 }
2392 function createRouteFromDefinition(route, parentRoute) {
2393 let tanstackRoute = createRoute({
2394 getParentRoute: () => parentRoute,
2395 path: route.path,
2396 beforeLoad: async (opts) => {
2397 if (route.route_module) {
2398 const module = await import(route.route_module);
2399 const routeConfig = module.route || {};
2400 if (routeConfig.beforeLoad) {
2401 return routeConfig.beforeLoad({
2402 params: opts.params || {},
2403 search: opts.search || {}
2404 });
2405 }
2406 }
2407 },
2408 loader: async (opts) => {
2409 let routeConfig = {};
2410 if (route.route_module) {
2411 const module = await import(route.route_module);
2412 routeConfig = module.route || {};
2413 }
2414 const context = {
2415 params: opts.params || {},
2416 search: opts.deps || {}
2417 };
2418 const [, loaderData, canvasData, titleData] = await Promise.all([
2419 (0, import_data10.resolveSelect)(import_core_data6.store).getEntityRecord(
2420 "root",
2421 "__unstableBase"
2422 ),
2423 routeConfig.loader ? routeConfig.loader(context) : Promise.resolve(void 0),
2424 routeConfig.canvas ? routeConfig.canvas(context) : Promise.resolve(void 0),
2425 routeConfig.title ? routeConfig.title(context) : Promise.resolve(void 0)
2426 ]);
2427 let inspector = true;
2428 if (routeConfig.inspector) {
2429 inspector = await routeConfig.inspector(context);
2430 }
2431 return {
2432 ...loaderData,
2433 canvas: canvasData,
2434 inspector,
2435 title: titleData,
2436 routeContentModule: route.content_module
2437 };
2438 },
2439 loaderDeps: (opts) => opts.search
2440 });
2441 tanstackRoute = tanstackRoute.lazy(async () => {
2442 const module = route.content_module ? await import(route.content_module) : {};
2443 const Stage = module.stage;
2444 const Inspector = module.inspector;
2445 return createLazyRoute(route.path)({
2446 component: function RouteComponent() {
2447 const { inspector: showInspector } = useLoaderData({ from: route.path }) ?? {};
2448 return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
2449 Stage && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "boot-layout__stage", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Stage, {}) }),
2450 Inspector && showInspector && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "boot-layout__inspector", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Inspector, {}) })
2451 ] });
2452 }
2453 });
2454 });
2455 return tanstackRoute;
2456 }
2457 function createRouteTree(routes, rootComponent = Root) {
2458 const rootRoute = createRootRoute({
2459 component: rootComponent,
2460 context: () => ({})
2461 });
2462 const dynamicRoutes = routes.map(
2463 (route) => createRouteFromDefinition(route, rootRoute)
2464 );
2465 return rootRoute.addChildren(dynamicRoutes);
2466 }
2467 function createPathHistory() {
2468 return createBrowserHistory({
2469 parseLocation: () => {
2470 const url = new URL(window.location.href);
2471 const path = url.searchParams.get("p") || "/";
2472 const pathHref = `${path}${url.hash}`;
2473 return parseHref(pathHref, window.history.state);
2474 },
2475 createHref: (href) => {
2476 const searchParams = new URLSearchParams(window.location.search);
2477 searchParams.set("p", href);
2478 return `${window.location.pathname}?${searchParams}`;
2479 }
2480 });
2481 }
2482 function Router({
2483 routes,
2484 rootComponent = Root
2485 }) {
2486 const router = (0, import_element16.useMemo)(() => {
2487 const history = createPathHistory();
2488 const routeTree = createRouteTree(routes, rootComponent);
2489 return createRouter({
2490 history,
2491 routeTree,
2492 defaultPreload: "intent",
2493 defaultNotFoundComponent: NotFoundComponent,
2494 defaultViewTransition: {
2495 types: ({
2496 fromLocation
2497 }) => {
2498 if (!fromLocation) {
2499 return false;
2500 }
2501 return ["navigate"];
2502 }
2503 }
2504 });
2505 }, [routes, rootComponent]);
2506 return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RouterProvider, { router });
2507 }
2508
2509 // packages/boot/build-module/components/root/single-page.mjs
2510 var import_notices2 = __toESM(require_notices(), 1);
2511 var import_components15 = __toESM(require_components(), 1);
2512 import { privateApis as routePrivateApis7 } from "@wordpress/route";
2513 var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
2514 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='be0c278a6c']")) {
2515 const style = document.createElement("style");
2516 style.setAttribute("data-wp-hash", "be0c278a6c");
2517 style.appendChild(document.createTextNode(".boot-layout{background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);color:var(--wpds-color-fg-content-neutral,#1e1e1e);display:flex;flex-direction:row;height:100%;isolation:isolate;width:100%}.boot-layout__sidebar-backdrop{background-color:#00000080;bottom:0;cursor:var(--wpds-cursor-control,pointer);left:0;position:fixed;right:0;top:0;z-index:100002}.boot-layout__sidebar{flex-shrink:0;height:100%;overflow:hidden;position:relative;width:240px}.boot-layout__sidebar.is-mobile{background:var(--wpds-color-bg-surface-neutral-weak,#f4f4f4);bottom:0;box-shadow:2px 0 8px #0003;inset-inline-start:0;max-width:85vw;position:fixed;top:0;width:300px;z-index:100003}.boot-layout__mobile-sidebar-drawer{left:0;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout__mobile-sidebar-drawer{top:46px}.boot-layout__mobile-sidebar-drawer{align-items:center;background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border-bottom:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);display:flex;justify-content:flex-start;padding:16px;z-index:3}.boot-layout__canvas.has-mobile-drawer{padding-top:65px;position:relative}.boot-layout__surfaces{display:flex;flex-grow:1;gap:8px;margin:0}@media (min-width:782px){.boot-layout__surfaces{margin:8px}.boot-layout--single-page .boot-layout__surfaces{margin-top:0;margin-inline-start:0}}.boot-layout__inspector,.boot-layout__stage{background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border-radius:0;bottom:0;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__inspector,.boot-layout__stage{border-radius:8px;height:auto;margin:0;position:static;width:auto}.boot-layout--single-page .boot-layout__inspector,.boot-layout--single-page .boot-layout__stage{height:auto}}.boot-layout__stage{z-index:2}@media (min-width:782px){.boot-layout__stage{z-index:auto}}.boot-layout__inspector{z-index:3}@media (min-width:782px){.boot-layout__inspector{z-index:auto}}.boot-layout__canvas{background:var(--wpds-color-bg-surface-neutral,#fcfcfc);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:0;bottom:0;box-shadow:0 1px 3px #0000001a;color:var(--wpds-color-fg-content-neutral,#1e1e1e);flex:1;height:100vh;left:0;margin:0;overflow-y:auto;position:relative;position:fixed;right:0;top:0;width:100vw;z-index:1}.boot-layout--single-page .boot-layout__canvas{height:calc(100vh - 46px);top:46px}@media (min-width:782px){.boot-layout__canvas{border-radius:8px;height:auto;position:static;width:auto;z-index:auto}.boot-layout--single-page .boot-layout__canvas{height:auto}.boot-layout.has-canvas .boot-layout__stage,.boot-layout__inspector{max-width:400px}}.boot-layout__canvas .interface-interface-skeleton{height:100%;left:0!important;position:relative;top:0!important}.boot-layout.has-full-canvas .boot-layout__surfaces{gap:0;margin:0}.boot-layout.has-full-canvas .boot-layout__inspector,.boot-layout.has-full-canvas .boot-layout__stage{display:none}.boot-layout.has-full-canvas .boot-layout__canvas{border:none;border-radius:0;bottom:0;box-shadow:none;left:0;margin:0;max-width:none;overflow:hidden;position:fixed;right:0;top:0}.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:46px}@media (min-width:782px){.boot-layout--single-page .boot-layout.has-full-canvas .boot-layout__canvas{top:32px}}"));
2518 document.head.appendChild(style);
2519 }
2520 var { useMatches: useMatches4, Outlet: Outlet2 } = unlock(routePrivateApis7);
2521 function RootSinglePage() {
2522 const matches = useMatches4();
2523 const currentMatch = matches[matches.length - 1];
2524 const canvas = currentMatch?.loaderData?.canvas;
2525 const routeContentModule = currentMatch?.loaderData?.routeContentModule;
2526 const isFullScreen = canvas && !canvas.isPreview;
2527 useRouteTitle();
2528 return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components15.SlotFillProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(UserThemeProvider, { isRoot: true, color: { bg: "#f8f8f8" }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(UserThemeProvider, { color: { bg: "#1d2327" }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
2529 "div",
2530 {
2531 className: clsx_default(
2532 "boot-layout boot-layout--single-page",
2533 {
2534 "has-canvas": !!canvas || canvas === null,
2535 "has-full-canvas": isFullScreen
2536 }
2537 ),
2538 children: [
2539 /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SavePanel, {}),
2540 /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_notices2.SnackbarNotices, { className: "boot-notices__snackbar" }),
2541 /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "boot-layout__surfaces", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(UserThemeProvider, { color: { bg: "#ffffff" }, children: [
2542 /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Outlet2, {}),
2543 (canvas || canvas === null) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "boot-layout__canvas", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2544 CanvasRenderer,
2545 {
2546 canvas,
2547 routeContentModule
2548 }
2549 ) })
2550 ] }) })
2551 ]
2552 }
2553 ) }) }) });
2554 }
2555
2556 // packages/boot/build-module/components/app/index.mjs
2557 var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
2558 function App({ rootComponent }) {
2559 const routes = (0, import_data11.useSelect)((select) => select(store).getRoutes(), []);
2560 return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Router, { routes, rootComponent });
2561 }
2562 async function init({
2563 mountId,
2564 menuItems,
2565 routes,
2566 initModules,
2567 dashboardLink
2568 }) {
2569 (menuItems ?? []).forEach((menuItem) => {
2570 (0, import_data11.dispatch)(store).registerMenuItem(menuItem.id, menuItem);
2571 });
2572 (routes ?? []).forEach((route) => {
2573 (0, import_data11.dispatch)(store).registerRoute(route);
2574 });
2575 if (dashboardLink) {
2576 (0, import_data11.dispatch)(store).setDashboardLink(dashboardLink);
2577 }
2578 for (const moduleId of initModules ?? []) {
2579 const module = await import(moduleId);
2580 await module.init();
2581 }
2582 const rootElement = document.getElementById(mountId);
2583 if (rootElement) {
2584 const root = (0, import_element17.createRoot)(rootElement);
2585 root.render(
2586 /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_element17.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(App, {}) })
2587 );
2588 }
2589 }
2590 async function initSinglePage({
2591 mountId,
2592 routes
2593 }) {
2594 (routes ?? []).forEach((route) => {
2595 (0, import_data11.dispatch)(store).registerRoute(route);
2596 });
2597 const rootElement = document.getElementById(mountId);
2598 if (rootElement) {
2599 const root = (0, import_element17.createRoot)(rootElement);
2600 root.render(
2601 /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_element17.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(App, { rootComponent: RootSinglePage }) })
2602 );
2603 }
2604 }
2605
2606 // packages/boot/build-module/index.mjs
2607 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='c310114eb0']")) {
2608 const style = document.createElement("style");
2609 style.setAttribute("data-wp-hash", "c310114eb0");
2610 style.appendChild(document.createTextNode(':root{--wpds-border-radius-xs:1px;--wpds-border-radius-sm:2px;--wpds-border-radius-md:4px;--wpds-border-radius-lg:8px;--wpds-border-width-xs:1px;--wpds-border-width-sm:2px;--wpds-border-width-md:4px;--wpds-border-width-lg:8px;--wpds-border-width-focus:2px;--wpds-color-bg-surface-neutral:#fcfcfc;--wpds-color-bg-surface-neutral-strong:#fff;--wpds-color-bg-surface-neutral-weak:#f4f4f4;--wpds-color-bg-surface-brand:#ecf0fa;--wpds-color-bg-surface-success:#c6f7cd;--wpds-color-bg-surface-success-weak:#ebffed;--wpds-color-bg-surface-info:#deebfa;--wpds-color-bg-surface-info-weak:#f3f9ff;--wpds-color-bg-surface-warning:#fde6be;--wpds-color-bg-surface-warning-weak:#fff7e1;--wpds-color-bg-surface-caution:#fee995;--wpds-color-bg-surface-caution-weak:#fff9ca;--wpds-color-bg-surface-error:#f6e6e3;--wpds-color-bg-surface-error-weak:#fff6f5;--wpds-color-bg-interactive-neutral-strong:#2d2d2d;--wpds-color-bg-interactive-neutral-strong-active:#1e1e1e;--wpds-color-bg-interactive-neutral-strong-disabled:#e6e6e6;--wpds-color-bg-interactive-neutral-weak:#0000;--wpds-color-bg-interactive-neutral-weak-active:#ededed;--wpds-color-bg-interactive-neutral-weak-disabled:#0000;--wpds-color-bg-interactive-brand-strong:#3858e9;--wpds-color-bg-interactive-brand-strong-active:#2e49d9;--wpds-color-bg-interactive-brand-weak:#0000;--wpds-color-bg-interactive-brand-weak-active:#e6eaf4;--wpds-color-bg-interactive-error:#0000;--wpds-color-bg-interactive-error-active:#fff6f5;--wpds-color-bg-interactive-error-strong:#cc1818;--wpds-color-bg-interactive-error-strong-active:#b90000;--wpds-color-bg-interactive-error-weak:#0000;--wpds-color-bg-interactive-error-weak-active:#f6e6e3;--wpds-color-bg-track-neutral-weak:#e4e4e4;--wpds-color-bg-track-neutral:#dbdbdb;--wpds-color-bg-thumb-neutral-weak:#8d8d8d;--wpds-color-bg-thumb-neutral-weak-active:#6e6e6e;--wpds-color-bg-thumb-brand:#3858e9;--wpds-color-bg-thumb-brand-active:#3858e9;--wpds-color-bg-thumb-neutral-disabled:#dbdbdb;--wpds-color-fg-content-neutral:#1e1e1e;--wpds-color-fg-content-neutral-weak:#707070;--wpds-color-fg-content-success:#002900;--wpds-color-fg-content-success-weak:#008030;--wpds-color-fg-content-info:#001b4f;--wpds-color-fg-content-info-weak:#006bd7;--wpds-color-fg-content-warning:#2e1900;--wpds-color-fg-content-warning-weak:#926300;--wpds-color-fg-content-caution:#281d00;--wpds-color-fg-content-caution-weak:#826a00;--wpds-color-fg-content-error:#470000;--wpds-color-fg-content-error-weak:#cc1818;--wpds-color-fg-interactive-neutral:#1e1e1e;--wpds-color-fg-interactive-neutral-active:#1e1e1e;--wpds-color-fg-interactive-neutral-disabled:#8d8d8d;--wpds-color-fg-interactive-neutral-strong:#f0f0f0;--wpds-color-fg-interactive-neutral-strong-active:#f0f0f0;--wpds-color-fg-interactive-neutral-strong-disabled:#8d8d8d;--wpds-color-fg-interactive-neutral-weak:#707070;--wpds-color-fg-interactive-neutral-weak-disabled:#8d8d8d;--wpds-color-fg-interactive-brand:#3858e9;--wpds-color-fg-interactive-brand-active:#3858e9;--wpds-color-fg-interactive-brand-strong:#eff0f2;--wpds-color-fg-interactive-brand-strong-active:#eff0f2;--wpds-color-fg-interactive-error:#cc1818;--wpds-color-fg-interactive-error-active:#cc1818;--wpds-color-fg-interactive-error-strong:#f2efef;--wpds-color-fg-interactive-error-strong-active:#f2efef;--wpds-color-stroke-surface-neutral:#dbdbdb;--wpds-color-stroke-surface-neutral-weak:#e4e4e4;--wpds-color-stroke-surface-neutral-strong:#8d8d8d;--wpds-color-stroke-surface-brand:#a3b1d4;--wpds-color-stroke-surface-brand-strong:#3858e9;--wpds-color-stroke-surface-success:#8ac894;--wpds-color-stroke-surface-success-strong:#008030;--wpds-color-stroke-surface-info:#9fbcdc;--wpds-color-stroke-surface-info-strong:#006bd7;--wpds-color-stroke-surface-warning:#d0b481;--wpds-color-stroke-surface-warning-strong:#926300;--wpds-color-stroke-surface-error:#daa39b;--wpds-color-stroke-surface-error-strong:#cc1818;--wpds-color-stroke-interactive-neutral:#8d8d8d;--wpds-color-stroke-interactive-neutral-active:#6e6e6e;--wpds-color-stroke-interactive-neutral-disabled:#dbdbdb;--wpds-color-stroke-interactive-neutral-strong:#6e6e6e;--wpds-color-stroke-interactive-brand:#3858e9;--wpds-color-stroke-interactive-brand-active:#2337c8;--wpds-color-stroke-interactive-error:#cc1818;--wpds-color-stroke-interactive-error-active:#9d0000;--wpds-color-stroke-interactive-error-strong:#cc1818;--wpds-color-stroke-focus-brand:#3858e9;--wpds-cursor-control:pointer;--wpds-dimension-base:4px;--wpds-dimension-padding-xs:4px;--wpds-dimension-padding-sm:8px;--wpds-dimension-padding-md:12px;--wpds-dimension-padding-lg:16px;--wpds-dimension-padding-xl:20px;--wpds-dimension-padding-2xl:24px;--wpds-dimension-padding-3xl:32px;--wpds-dimension-gap-xs:4px;--wpds-dimension-gap-sm:8px;--wpds-dimension-gap-md:12px;--wpds-dimension-gap-lg:16px;--wpds-dimension-gap-xl:24px;--wpds-dimension-gap-2xl:32px;--wpds-dimension-gap-3xl:40px;--wpds-dimension-surface-width-xs:240px;--wpds-dimension-surface-width-sm:320px;--wpds-dimension-surface-width-md:400px;--wpds-dimension-surface-width-lg:560px;--wpds-dimension-surface-width-xl:720px;--wpds-dimension-surface-width-2xl:960px;--wpds-elevation-xs:0 1px 1px 0 #00000008,0 1px 2px 0 #00000005,0 3px 3px 0 #00000005,0 4px 4px 0 #00000003;--wpds-elevation-sm:0 1px 2px 0 #0000000d,0 2px 3px 0 #0000000a,0 6px 6px 0 #00000008,0 8px 8px 0 #00000005;--wpds-elevation-md:0 2px 3px 0 #0000000d,0 4px 5px 0 #0000000a,0 12px 12px 0 #00000008,0 16px 16px 0 #00000005;--wpds-elevation-lg:0 5px 15px 0 #00000014,0 15px 27px 0 #00000012,0 30px 36px 0 #0000000a,0 50px 43px 0 #00000005;--wpds-typography-font-family-heading:-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif;--wpds-typography-font-family-body:-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif;--wpds-typography-font-family-mono:"Menlo","Consolas",monaco,monospace;--wpds-typography-font-size-xs:11px;--wpds-typography-font-size-sm:12px;--wpds-typography-font-size-md:13px;--wpds-typography-font-size-lg:15px;--wpds-typography-font-size-xl:20px;--wpds-typography-font-size-2xl:32px;--wpds-typography-line-height-xs:16px;--wpds-typography-line-height-sm:20px;--wpds-typography-line-height-md:24px;--wpds-typography-line-height-lg:28px;--wpds-typography-line-height-xl:32px;--wpds-typography-line-height-2xl:40px;--wpds-typography-font-weight-regular:400;--wpds-typography-font-weight-medium:499}[data-wpds-theme-provider-id][data-wpds-density=compact]{--wpds-dimension-padding-xs:4px;--wpds-dimension-padding-sm:4px;--wpds-dimension-padding-md:8px;--wpds-dimension-padding-lg:12px;--wpds-dimension-padding-xl:16px;--wpds-dimension-padding-2xl:20px;--wpds-dimension-padding-3xl:24px;--wpds-dimension-gap-xs:4px;--wpds-dimension-gap-sm:4px;--wpds-dimension-gap-md:8px;--wpds-dimension-gap-lg:12px;--wpds-dimension-gap-xl:20px;--wpds-dimension-gap-2xl:24px;--wpds-dimension-gap-3xl:32px}[data-wpds-theme-provider-id][data-wpds-density=comfortable]{--wpds-dimension-padding-xs:8px;--wpds-dimension-padding-sm:12px;--wpds-dimension-padding-md:16px;--wpds-dimension-padding-lg:20px;--wpds-dimension-padding-xl:24px;--wpds-dimension-padding-2xl:32px;--wpds-dimension-padding-3xl:40px;--wpds-dimension-gap-xs:8px;--wpds-dimension-gap-sm:12px;--wpds-dimension-gap-md:16px;--wpds-dimension-gap-lg:20px;--wpds-dimension-gap-xl:32px;--wpds-dimension-gap-2xl:40px;--wpds-dimension-gap-3xl:48px}[data-wpds-theme-provider-id][data-wpds-density=default]{--wpds-dimension-base:4px;--wpds-dimension-padding-xs:4px;--wpds-dimension-padding-sm:8px;--wpds-dimension-padding-md:12px;--wpds-dimension-padding-lg:16px;--wpds-dimension-padding-xl:20px;--wpds-dimension-padding-2xl:24px;--wpds-dimension-padding-3xl:32px;--wpds-dimension-gap-xs:4px;--wpds-dimension-gap-sm:8px;--wpds-dimension-gap-md:12px;--wpds-dimension-gap-lg:16px;--wpds-dimension-gap-xl:24px;--wpds-dimension-gap-2xl:32px;--wpds-dimension-gap-3xl:40px;--wpds-dimension-surface-width-xs:240px;--wpds-dimension-surface-width-sm:320px;--wpds-dimension-surface-width-md:400px;--wpds-dimension-surface-width-lg:560px;--wpds-dimension-surface-width-xl:720px;--wpds-dimension-surface-width-2xl:960px}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){:root{--wpds-border-width-focus:1.5px}}@media (min-width:600px){.boot-layout-container .boot-layout{bottom:0;left:0;min-height:calc(100vh - 46px);position:absolute;right:0;top:0}}@media (min-width:782px){.boot-layout-container .boot-layout{min-height:calc(100vh - 32px)}body:has(.boot-layout.has-full-canvas) .boot-layout-container .boot-layout{min-height:100vh}}.boot-layout-container .boot-layout img{height:auto;max-width:100%}.boot-layout .boot-notices__snackbar{bottom:24px;box-sizing:border-box;display:flex;flex-direction:column;left:0;padding-inline:16px;pointer-events:none;position:fixed;right:0}.boot-layout .boot-notices__snackbar .components-snackbar{margin-inline:auto}'));
2611 document.head.appendChild(style);
2612 }
2613 if (typeof document !== "undefined" && true && !document.head.querySelector("style[data-wp-hash='cc217bc358']")) {
2614 const style = document.createElement("style");
2615 style.setAttribute("data-wp-hash", "cc217bc358");
2616 style.appendChild(document.createTextNode("@media (max-width:782px){*{view-transition-name:none!important}}::view-transition-new(root),::view-transition-old(root){animation-duration:.25s}@media not (prefers-reduced-motion:reduce){.boot-layout__canvas .interface-interface-skeleton__header{view-transition-name:boot--canvas-header}.boot-layout__canvas .interface-interface-skeleton__sidebar{view-transition-name:boot--canvas-sidebar}.boot-layout.has-full-canvas .boot-layout__canvas .boot-site-icon-link,.boot-layout:not(.has-full-canvas) .boot-site-hub .boot-site-icon-link{view-transition-name:boot--site-icon-link}.boot-layout__stage{view-transition-name:boot--stage}.boot-layout__inspector{view-transition-name:boot--inspector}.boot-layout__canvas.is-full-canvas .interface-interface-skeleton__content,.boot-layout__canvas:not(.is-full-canvas){view-transition-name:boot--canvas}@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.boot-layout__stage{view-transition-name:boot-safari--stage}.boot-layout__inspector{view-transition-name:boot-safari--inspector}.boot-layout__canvas.is-full-canvas .interface-interface-skeleton__content,.boot-layout__canvas:not(.is-full-canvas){view-transition-name:boot-safari--canvas}}.components-popover:first-of-type{view-transition-name:boot--components-popover}}::view-transition-group(boot--canvas),::view-transition-group(boot--canvas-header),::view-transition-group(boot--canvas-sidebar),::view-transition-group(boot-safari--canvas){z-index:1}::view-transition-group(boot--site-icon-link){z-index:2}::view-transition-new(boot--site-icon-link),::view-transition-old(boot--site-icon-link){animation:none}::view-transition-new(boot-safari--canvas),::view-transition-new(boot-safari--inspector),::view-transition-new(boot-safari--stage),::view-transition-old(boot-safari--canvas),::view-transition-old(boot-safari--inspector),::view-transition-old(boot-safari--stage){width:auto}::view-transition-new(boot--canvas),::view-transition-new(boot--inspector),::view-transition-new(boot--stage),::view-transition-old(boot--canvas),::view-transition-old(boot--inspector),::view-transition-old(boot--stage){background:#fff;border-radius:8px;height:100%;object-fit:none;object-position:left top;overflow:hidden;width:100%}::view-transition-new(boot--canvas),::view-transition-old(boot--canvas){object-position:center top}::view-transition-old(boot--inspector):only-child,::view-transition-old(boot--stage):only-child,::view-transition-old(boot-safari--inspector):only-child,::view-transition-old(boot-safari--stage):only-child{animation-name:zoomOut;will-change:transform,opacity}::view-transition-new(boot--inspector):only-child,::view-transition-new(boot--stage):only-child,::view-transition-new(boot-safari--inspector):only-child,::view-transition-new(boot-safari--stage):only-child{animation-name:zoomIn;will-change:transform,opacity}@keyframes zoomOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}@keyframes zoomIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}::view-transition-new(boot--canvas):only-child,::view-transition-new(boot-safari--canvas):only-child{animation-name:slideFromRight;will-change:transform}::view-transition-old(boot--canvas):only-child,::view-transition-old(boot-safari--canvas):only-child{animation-name:slideToRight;will-change:transform}@keyframes slideFromRight{0%{transform:translateX(100vw)}to{transform:translateX(0)}}@keyframes slideToRight{0%{transform:translateX(0)}to{transform:translateX(100vw)}}::view-transition-new(boot--canvas-header):only-child{animation-name:slideHeaderFromTop;will-change:transform}::view-transition-old(boot--canvas-header):only-child{animation-name:slideHeaderToTop;will-change:transform}@keyframes slideHeaderFromTop{0%{transform:translateY(-100%)}}@keyframes slideHeaderToTop{to{transform:translateY(-100%)}}::view-transition-new(boot--canvas-sidebar):only-child{animation-name:slideSidebarFromRight;will-change:transform}::view-transition-old(boot--canvas-sidebar):only-child{animation-name:slideSidebarToRight;will-change:transform}@keyframes slideSidebarFromRight{0%{transform:translateX(100%)}}@keyframes slideSidebarToRight{to{transform:translateX(100%)}}"));
2617 document.head.appendChild(style);
2618 }
2619 export {
2620 init,
2621 initSinglePage,
2622 store
2623 };
2624 //# sourceMappingURL=index.js.map
2625