PluginProbe
Gutenberg / trunk
Gutenberg vtrunk
24.1.0 24.0.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 All 404 releases
← All changes | build/scripts/format-library/index.js +4359 -1144 23.7.0 → trunk View file →
@@ -1,4 +1,6 @@
1 +(function() {
2 +"use strict";
1 3 var wp;
2 4 (wp ||= {}).formatLibrary = (() => {
3 5 var __create = Object.create;
4 6 var __defProp = Object.defineProperty;
@@ -107,9 +109,9 @@
107 109 function is(x, y) {
108 110 return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
109 111 }
110 112 function useSyncExternalStore$2(subscribe2, getSnapshot2) {
111 - didWarnOld18Alpha || void 0 === React31.startTransition || (didWarnOld18Alpha = true, console.error(
113 + didWarnOld18Alpha || void 0 === React51.startTransition || (didWarnOld18Alpha = true, console.error(
112 114 "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
113 115 ));
114 116 var value = getSnapshot2();
115 117 if (!didWarnUncachedGetSnapshot) {
@@ -117,9 +119,9 @@
117 119 objectIs(value, cachedValue) || (console.error(
118 120 "The result of getSnapshot should be cached to avoid an infinite loop"
119 121 ), didWarnUncachedGetSnapshot = true);
120 122 }
121 - cachedValue = useState17({
123 + cachedValue = useState21({
122 124 inst: { value, getSnapshot: getSnapshot2 }
123 125 });
124 126 var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
125 127 useLayoutEffect3(
@@ -129,9 +131,9 @@
129 131 checkIfSnapshotChanged(inst) && forceUpdate({ inst });
130 132 },
131 133 [subscribe2, value, getSnapshot2]
132 134 );
133 - useEffect12(
135 + useEffect14(
134 136 function() {
135 137 checkIfSnapshotChanged(inst) && forceUpdate({ inst });
136 138 return subscribe2(function() {
137 139 checkIfSnapshotChanged(inst) && forceUpdate({ inst });
@@ -155,10 +157,10 @@
155 157 function useSyncExternalStore$1(subscribe2, getSnapshot2) {
156 158 return getSnapshot2();
157 159 }
158 160 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
159 - var React31 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState17 = React31.useState, useEffect12 = React31.useEffect, useLayoutEffect3 = React31.useLayoutEffect, useDebugValue = React31.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
160 - exports.useSyncExternalStore = void 0 !== React31.useSyncExternalStore ? React31.useSyncExternalStore : shim;
161 + var React51 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState21 = React51.useState, useEffect14 = React51.useEffect, useLayoutEffect3 = React51.useLayoutEffect, useDebugValue = React51.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
162 + exports.useSyncExternalStore = void 0 !== React51.useSyncExternalStore ? React51.useSyncExternalStore : shim;
161 163 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
162 164 })();
163 165 }
164 166 });
@@ -174,15 +176,8 @@
174 176 }
175 177 }
176 178 });
177 179
178 - // package-external:@wordpress/a11y
179 - var require_a11y = __commonJS({
180 - "package-external:@wordpress/a11y"(exports, module) {
181 - module.exports = window.wp.a11y;
182 - }
183 - });
184 -
185 180 // package-external:@wordpress/compose
186 181 var require_compose = __commonJS({
187 182 "package-external:@wordpress/compose"(exports, module) {
188 183 module.exports = window.wp.compose;
@@ -188,12 +183,12 @@
188 183 module.exports = window.wp.compose;
189 184 }
190 185 });
191 186
192 - // package-external:@wordpress/private-apis
193 - var require_private_apis = __commonJS({
194 - "package-external:@wordpress/private-apis"(exports, module) {
195 - module.exports = window.wp.privateApis;
187 + // package-external:@wordpress/a11y
188 + var require_a11y = __commonJS({
189 + "package-external:@wordpress/a11y"(exports, module) {
190 + module.exports = window.wp.a11y;
196 191 }
197 192 });
198 193
199 194 // package-external:@wordpress/url
@@ -227,13 +222,19 @@
227 222
228 223 // packages/icons/build-module/icon/index.mjs
229 224 var import_element = __toESM(require_element(), 1);
230 225 var icon_default = (0, import_element.forwardRef)(
231 - ({ icon, size = 24, ...props }, ref) => {
226 + ({ icon, size = 24, style, ...props }, ref) => {
227 + const intrinsicStyle = icon.props.style;
228 + const mergedStyle = intrinsicStyle || style ? { ...intrinsicStyle, ...style } : void 0;
232 229 return (0, import_element.cloneElement)(icon, {
233 230 width: size,
234 231 height: size,
235 232 ...props,
233 + // Merge styles so the icon's intrinsic style (e.g. `fill: none` on
234 + // stroke-based icons) is preserved unless the consumer overrides
235 + // the same property explicitly.
236 + ...mergedStyle ? { style: mergedStyle } : {},
236 237 ref
237 238 });
238 239 }
239 240 );
@@ -240,77 +241,107 @@
240 241
241 242 // packages/icons/build-module/library/button.mjs
242 243 var import_primitives = __toESM(require_primitives(), 1);
243 244 var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
244 - var button_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z" }) });
245 + var button_default = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_primitives.Path, { d: "M8 11.75H16M5 16.25H19C19.6904 16.25 20.25 15.6904 20.25 15V8.5C20.25 7.80964 19.6904 7.25 19 7.25H5C4.30964 7.25 3.75 7.80964 3.75 8.5V15C3.75 15.6904 4.30964 16.25 5 16.25Z", vectorEffect: "non-scaling-stroke" }) });
245 246
246 247 // packages/icons/build-module/library/chevron-right.mjs
247 248 var import_primitives2 = __toESM(require_primitives(), 1);
248 249 var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
249 - var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" }) });
250 + var chevron_right_default = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_primitives2.Path, { d: "M10 6.5L15 12L10 17.5", vectorEffect: "non-scaling-stroke" }) });
250 251
251 252 // packages/icons/build-module/library/code.mjs
252 253 var import_primitives3 = __toESM(require_primitives(), 1);
253 254 var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
254 - var code_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { d: "M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z" }) });
255 + var code_default = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_primitives3.Path, { d: "M7.99997 7L3.70708 11.2929C3.31655 11.6834 3.31655 12.3166 3.70708 12.7071L7.99997 17M16 17L20.2929 12.7071C20.6834 12.3166 20.6834 11.6834 20.2929 11.2929L16 7", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) });
255 256
256 257 // packages/icons/build-module/library/color.mjs
257 258 var import_primitives4 = __toESM(require_primitives(), 1);
258 259 var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
259 - var color_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { d: "M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z" }) });
260 + var color_default = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_primitives4.Path, { d: "M17.25 14C17.25 16.8995 14.8995 19.25 12 19.25C9.10051 19.25 6.75 16.8995 6.75 14C6.75 11.1005 10 7.37 12 5.12C14 7.37 17.25 11.1005 17.25 14Z", vectorEffect: "non-scaling-stroke" }) });
260 261
261 - // packages/icons/build-module/library/format-bold.mjs
262 + // packages/icons/build-module/library/error.mjs
262 263 var import_primitives5 = __toESM(require_primitives(), 1);
263 264 var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
264 - var format_bold_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { d: "M14.7 11.3c1-.6 1.5-1.6 1.5-3 0-2.3-1.3-3.4-4-3.4H7v14h5.8c1.4 0 2.5-.3 3.3-1 .8-.7 1.2-1.7 1.2-2.9.1-1.9-.8-3.1-2.6-3.7zm-5.1-4h2.3c.6 0 1.1.1 1.4.4.3.3.5.7.5 1.2s-.2 1-.5 1.2c-.3.3-.8.4-1.4.4H9.6V7.3zm4.6 9c-.4.3-1 .4-1.7.4H9.6v-3.9h2.9c.7 0 1.3.2 1.7.5.4.3.6.8.6 1.5s-.2 1.2-.6 1.5z" }) });
265 + var error_default = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_primitives5.Path, { d: "M12 9L12 14M12 15.5V17M11.1284 5.04947L3.83827 18.0097C3.46331 18.6763 3.94502 19.5 4.70985 19.5H19.2902C20.055 19.5 20.5367 18.6763 20.1617 18.0097L12.8716 5.04947C12.4893 4.36982 11.5107 4.36982 11.1284 5.04947Z", vectorEffect: "non-scaling-stroke" }) });
265 266
266 - // packages/icons/build-module/library/format-italic.mjs
267 + // packages/icons/build-module/library/format-bold.mjs
267 268 var import_primitives6 = __toESM(require_primitives(), 1);
268 269 var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
269 - var format_italic_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.Path, { d: "M12.5 5L10 19h1.9l2.5-14z" }) });
270 + var format_bold_default = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_primitives6.Path, { d: "M13 11.5H7.75M13 11.5L13.7412 11.6059C15.3242 11.832 16.5 13.1877 16.5 14.7868C16.5 16.5614 15.0614 18 13.2868 18H7.75C7.75 18 7.75 14.9338 7.75 11.5M13 11.5L13.2913 11.4417C14.5756 11.1849 15.5 10.0573 15.5 8.74755C15.5 7.23012 14.2699 6 12.7525 6H7.75C7.75 7.65199 7.75 9.63049 7.75 11.5", vectorEffect: "non-scaling-stroke" }) });
270 271
271 - // packages/icons/build-module/library/format-strikethrough.mjs
272 + // packages/icons/build-module/library/format-italic.mjs
272 273 var import_primitives7 = __toESM(require_primitives(), 1);
273 274 var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
274 - var format_strikethrough_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.Path, { d: "M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z" }) });
275 + var format_italic_default = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_primitives7.Path, { d: "M11 19L13.5 5", vectorEffect: "non-scaling-stroke" }) });
275 276
276 - // packages/icons/build-module/library/help.mjs
277 + // packages/icons/build-module/library/format-strikethrough.mjs
277 278 var import_primitives8 = __toESM(require_primitives(), 1);
278 279 var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
279 - var help_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.Path, { d: "M12 4a8 8 0 1 1 .001 16.001A8 8 0 0 1 12 4Zm0 1.5a6.5 6.5 0 1 0-.001 13.001A6.5 6.5 0 0 0 12 5.5Zm.75 11h-1.5V15h1.5v1.5Zm-.445-9.234a3 3 0 0 1 .445 5.89V14h-1.5v-1.25c0-.57.452-.958.917-1.01A1.5 1.5 0 0 0 12 8.75a1.5 1.5 0 0 0-1.5 1.5H9a3 3 0 0 1 3.305-2.984Z" }) });
280 + var format_strikethrough_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives8.Path, { d: "M9 16.1554C12 18.02 15 16.5283 15 14.2908C15 13.6314 14.6839 12.999 14.1213 12.5328C14.108 12.5217 14.0945 12.5108 14.081 12.5M9 9.31845C9 7.49773 11.4313 6.3247 13.9199 7.4278M5.5 12.5H14.081M18.5 12.5H14.081", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" }) });
280 281
281 - // packages/icons/build-module/library/language.mjs
282 + // packages/icons/build-module/library/help.mjs
282 283 var import_primitives9 = __toESM(require_primitives(), 1);
283 284 var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
284 - var language_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.Path, { d: "M17.5 10h-1.7l-3.7 10.5h1.7l.9-2.6h3.9l.9 2.6h1.7L17.5 10zm-2.2 6.3 1.4-4 1.4 4h-2.8zm-4.8-3.8c1.6-1.8 2.9-3.6 3.7-5.7H16V5.2h-5.8V3H8.8v2.2H3v1.5h9.6c-.7 1.6-1.8 3.1-3.1 4.6C8.6 10.2 7.8 9 7.2 8H5.6c.6 1.4 1.7 2.9 2.9 4.4l-2.4 2.4c-.3.4-.7.8-1.1 1.2l1 1 1.2-1.2c.8-.8 1.6-1.5 2.3-2.3.8.9 1.7 1.7 2.5 2.5l.6-1.5c-.7-.6-1.4-1.3-2.1-2z" }) });
285 + var help_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_primitives9.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
286 + /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.Path, { d: "M9.75 10.25C9.75 9.00736 10.7574 8 12 8C13.2426 8 14.25 9.00736 14.25 10.25C14.25 11.4083 13.3748 12.3621 12.2496 12.4863C12.1124 12.5015 12 12.6119 12 12.75V14M12 15V16.5", vectorEffect: "non-scaling-stroke" }),
287 + /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives9.Path, { d: "M19.25 12C19.25 16.0041 16.0041 19.25 12 19.25C7.99594 19.25 4.75 16.0041 4.75 12C4.75 7.99594 7.99594 4.75 12 4.75C16.0041 4.75 19.25 7.99594 19.25 12Z", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" })
288 + ] });
285 289
286 - // packages/icons/build-module/library/link.mjs
290 + // packages/icons/build-module/library/inline-image.mjs
287 291 var import_primitives10 = __toESM(require_primitives(), 1);
288 292 var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
289 - var link_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.Path, { d: "M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z" }) });
293 + var inline_image_default = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_primitives10.Path, { d: "M13.25 11.3197L11.4155 9.48453C11.3765 9.44547 11.3132 9.44546 11.2741 9.48452L9.05837 11.7003C9.02448 11.7341 8.97132 11.7392 8.93163 11.7124L7.0648 10.4495C7.03003 10.426 6.98426 10.4267 6.95022 10.4513L4.75 12.0405M13.25 11.3197V7C13.25 6.30964 12.6904 5.75 12 5.75H6C5.30964 5.75 4.75 6.30965 4.75 7V12.0405M13.25 11.3197V13C13.25 13.6904 12.6904 14.25 12 14.25H6C5.30964 14.25 4.75 13.6904 4.75 13V12.0405M16 14H20M4 18H20", vectorEffect: "non-scaling-stroke" }) });
290 294
291 - // packages/icons/build-module/library/math.mjs
295 + // packages/icons/build-module/library/language.mjs
292 296 var import_primitives11 = __toESM(require_primitives(), 1);
293 297 var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
294 - var math_default = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.Path, { d: "M11.2 6.8c-.7 0-1.4.5-1.6 1.1l-2.8 7.5-1.2-1.8c-.1-.2-.4-.3-.6-.3H3v1.5h1.6l1.2 1.8c.6.9 1.9.7 2.2-.3l2.9-7.9s.1-.2.2-.2h7.8V6.7h-7.8Zm5.3 3.4-1.9 1.9-1.9-1.9-1.1 1.1 1.9 1.9-1.9 1.9 1.1 1.1 1.9-1.9 1.9 1.9 1.1-1.1-1.9-1.9 1.9-1.9-1.1-1.1Z" }) });
298 + var language_default = /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_primitives11.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
299 + /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.Path, { d: "M3 6H9.5M16 6H13.5M9.5 6V3M9.5 6H13.5M13.5 6C13.0477 7.24386 11.7361 9.79194 9.44037 12.5512M5.5 16.5C7.04336 15.2139 8.35238 13.8588 9.44037 12.5512M6.5 8C6.9232 8.9522 7.93743 10.7507 9.44037 12.5512M12.5 15.5C11.3314 14.6235 10.305 13.587 9.44037 12.5512", vectorEffect: "non-scaling-stroke" }),
300 + /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_primitives11.Path, { d: "M13.75 20V19.75L14.6667 17M14.6667 17L16.75 10.75H17.25L19.3333 17L20.25 19.75V20M19.3333 17H14.6667", vectorEffect: "non-scaling-stroke" })
301 + ] });
295 302
296 - // packages/icons/build-module/library/subscript.mjs
303 + // packages/icons/build-module/library/link.mjs
297 304 var import_primitives12 = __toESM(require_primitives(), 1);
298 305 var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
299 - var subscript_default = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.Path, { d: "M16.9 18.3l.8-1.2c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.1-.3-.4-.5-.6-.7-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.2 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3L15 19.4h4.3v-1.2h-2.4zM14.1 7.2h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z" }) });
306 + var link_default = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_primitives12.Path, { d: "M9.5 12L14.5 12M10 7.75H8.25C5.90279 7.75 4 9.65279 4 12C4 14.3472 5.90279 16.25 8.25 16.25H10M14 16.25H15.75C18.0972 16.25 20 14.3472 20 12C20 9.65279 18.0972 7.75 15.75 7.75L14 7.75", vectorEffect: "non-scaling-stroke" }) });
300 307
301 - // packages/icons/build-module/library/superscript.mjs
308 + // packages/icons/build-module/library/math.mjs
302 309 var import_primitives13 = __toESM(require_primitives(), 1);
303 310 var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
304 - var superscript_default = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.Path, { d: "M16.9 10.3l.8-1.3c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.2-.2-.4-.4-.7-.6-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.1 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3l-1.8 2.8h4.3v-1.2h-2.2zm-2.8-3.1h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z" }) });
311 + var math_default = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_primitives13.Path, { d: "M3 14H5L6.8916 16.3645C6.93974 16.4247 7.03496 16.4101 7.06289 16.3383L10.2521 8.13755C10.4015 7.75318 10.7717 7.5 11.1841 7.5H19M17 11L14.5 13.5M12 16L14.5 13.5M14.5 13.5L17 16M14.5 13.5L12 11", vectorEffect: "non-scaling-stroke" }) });
305 312
306 - // packages/icons/build-module/library/text-color.mjs
313 + // packages/icons/build-module/library/published.mjs
307 314 var import_primitives14 = __toESM(require_primitives(), 1);
308 315 var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
309 - var text_color_default = /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives14.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives14.Path, { d: "M12.9 6h-2l-4 11h1.9l1.1-3h4.2l1.1 3h1.9L12.9 6zm-2.5 6.5l1.5-4.9 1.7 4.9h-3.2z" }) });
316 + var published_default = /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_primitives14.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
317 + /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives14.Path, { d: "M12 19.25C16.0041 19.25 19.25 16.0041 19.25 12C19.25 7.99594 16.0041 4.75 12 4.75C7.99594 4.75 4.75 7.99594 4.75 12C4.75 16.0041 7.99594 19.25 12 19.25Z", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }),
318 + /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_primitives14.Path, { d: "M9 12L11 14L15 10", vectorEffect: "non-scaling-stroke" })
319 + ] });
310 320
321 + // packages/icons/build-module/library/subscript.mjs
322 + var import_primitives15 = __toESM(require_primitives(), 1);
323 + var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
324 + var subscript_default = /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_primitives15.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
325 + /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives15.Path, { d: "M17.75 18.5988H15.75C15.75 16.5322 17.75 17.0489 17.75 15.4989C17.75 14.7239 16.75 14.0738 15.75 14.8488", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" }),
326 + /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_primitives15.Path, { d: "M10 12L13 7.4V7M10 12L7 7.4L7.00004 7M10 12L7 16.6V17M10 12L13 16.6V17", vectorEffect: "non-scaling-stroke" })
327 + ] });
328 +
329 + // packages/icons/build-module/library/superscript.mjs
330 + var import_primitives16 = __toESM(require_primitives(), 1);
331 + var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
332 + var superscript_default = /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_primitives16.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [
333 + /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives16.Path, { d: "M17.75 8.59884H15.75C15.75 6.53219 17.75 7.04885 17.75 5.49887C17.75 4.72388 16.75 4.07384 15.75 4.84884", strokeLinecap: "square", vectorEffect: "non-scaling-stroke" }),
334 + /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives16.Path, { d: "M10 12L13 7.4V7M10 12L7 7.4L7.00004 7M10 12L7 16.6V17M10 12L13 16.6V17", vectorEffect: "non-scaling-stroke" })
335 + ] });
336 +
337 + // packages/icons/build-module/library/text-color.mjs
338 + var import_primitives17 = __toESM(require_primitives(), 1);
339 + var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
340 + var text_color_default = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives17.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives17.Path, { d: "M8 17.5V17.223L9.01577 14.1757M9.01577 14.1757L11.3243 7.25H11.8784L14.1869 14.1757L15.2027 17.223V17.5M14.1869 14.1757H9.01577", vectorEffect: "non-scaling-stroke" }) });
341 +
311 342 // packages/format-library/build-module/bold/index.mjs
312 - var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
343 + var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
313 344 var name = "core/bold";
314 345 var title = (0, import_i18n.__)("Bold");
315 346 var bold = {
316 347 name,
@@ -316,18 +347,24 @@
316 347 name,
317 348 title,
318 349 tagName: "strong",
319 350 className: null,
320 - edit({ isActive, value, onChange, onFocus, isVisible = true }) {
351 + edit({
352 + isActive,
353 + value,
354 + onChange,
355 + onFocus,
356 + isVisible = true
357 + }) {
321 358 function onToggle() {
322 359 onChange((0, import_rich_text.toggleFormat)(value, { type: name, title }));
323 360 }
324 361 function onClick() {
325 - onChange((0, import_rich_text.toggleFormat)(value, { type: name }));
362 + onChange((0, import_rich_text.toggleFormat)(value, { type: name, title }));
326 363 onFocus();
327 364 }
328 - return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
329 - /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
365 + return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
366 + /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
330 367 import_block_editor.RichTextShortcut,
331 368 {
332 369 type: "primary",
333 370 character: "b",
@@ -333,9 +370,9 @@
333 370 character: "b",
334 371 onUse: onToggle
335 372 }
336 373 ),
337 - isVisible && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
374 + isVisible && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
338 375 import_block_editor.RichTextToolbarButton,
339 376 {
340 377 name: "bold",
341 378 icon: format_bold_default,
@@ -345,9 +382,9 @@
345 382 shortcutType: "primary",
346 383 shortcutCharacter: "b"
347 384 }
348 385 ),
349 - /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
386 + /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
350 387 import_block_editor.__unstableRichTextInputEvent,
351 388 {
352 389 inputType: "formatBold",
353 390 onInput: onToggle
@@ -360,9 +397,9 @@
360 397 // packages/format-library/build-module/code/index.mjs
361 398 var import_i18n2 = __toESM(require_i18n(), 1);
362 399 var import_rich_text2 = __toESM(require_rich_text(), 1);
363 400 var import_block_editor2 = __toESM(require_block_editor(), 1);
364 - var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
401 + var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
365 402 var name2 = "core/code";
366 403 var title2 = (0, import_i18n2.__)("Inline code");
367 404 var code = {
368 405 name: name2,
@@ -392,15 +429,20 @@
392 429 value = (0, import_rich_text2.remove)(value, endIndex, endIndex + 1);
393 430 value = (0, import_rich_text2.applyFormat)(value, { type: name2 }, startIndex, endIndex);
394 431 return value;
395 432 },
396 - edit({ value, onChange, onFocus, isActive }) {
433 + edit({
434 + value,
435 + onChange,
436 + onFocus,
437 + isActive
438 + }) {
397 439 function onClick() {
398 440 onChange((0, import_rich_text2.toggleFormat)(value, { type: name2, title: title2 }));
399 441 onFocus();
400 442 }
401 - return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
402 - /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
443 + return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
444 + /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
403 445 import_block_editor2.RichTextShortcut,
404 446 {
405 447 type: "access",
406 448 character: "x",
@@ -406,9 +448,9 @@
406 448 character: "x",
407 449 onUse: onClick
408 450 }
409 451 ),
410 - /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
452 + /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
411 453 import_block_editor2.RichTextToolbarButton,
412 454 {
413 455 icon: code_default,
414 456 title: title2,
@@ -442,23 +484,34 @@
442 484
443 485 // node_modules/@base-ui/utils/useControlled.mjs
444 486 var React = __toESM(require_react(), 1);
445 487
446 - // node_modules/@base-ui/utils/error.mjs
447 - var set;
488 + // node_modules/@base-ui/utils/createLogOnce.mjs
489 + var loggedMessages;
448 490 if (true) {
449 - set = /* @__PURE__ */ new Set();
491 + loggedMessages = /* @__PURE__ */ new Set();
450 492 }
451 - function error(...messages) {
452 - if (true) {
453 - const messageKey = messages.join(" ");
454 - if (!set.has(messageKey)) {
455 - set.add(messageKey);
456 - console.error(`Base UI: ${messageKey}`);
493 + function createLogOnce(severity, prefix) {
494 + return function logOnce(...messages) {
495 + if (true) {
496 + const message = messages.join(" ");
497 + const output = prefix ? `${prefix}: ${message}` : message;
498 + const key = `${severity}:${output}`;
499 + if (!loggedMessages.has(key)) {
500 + loggedMessages.add(key);
501 + if (severity === "warn") {
502 + console.warn(output);
503 + } else {
504 + console.error(output);
505 + }
506 + }
457 507 }
458 - }
508 + };
459 509 }
460 510
511 + // node_modules/@base-ui/utils/error.mjs
512 + var error = createLogOnce("error", "Base UI");
513 +
461 514 // node_modules/@base-ui/utils/useControlled.mjs
462 515 function useControlled({
463 516 controlled,
464 517 default: defaultProp,
@@ -468,9 +521,9 @@
468 521 const {
469 522 current: isControlled
470 523 } = React.useRef(controlled !== void 0);
471 524 const [valueState, setValue] = React.useState(defaultProp);
472 - const value = isControlled ? controlled : valueState;
525 + const value = isControlled && controlled !== void 0 ? controlled : valueState;
473 526 if (true) {
474 527 React.useEffect(() => {
475 528 if (isControlled !== (controlled !== void 0)) {
476 529 error([`A component is changing the ${isControlled ? "" : "un"}controlled ${state} state of ${name16} to be ${isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${name16} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join("\n"));
@@ -568,8 +621,20 @@
568 621 );
569 622 }
570 623 }
571 624
625 + // node_modules/@base-ui/utils/warn.mjs
626 + var warn = createLogOnce("warn", "Base UI");
627 +
628 + // node_modules/@base-ui/utils/empty.mjs
629 + function NOOP() {
630 + }
631 + var EMPTY_ARRAY = Object.freeze([]);
632 + var EMPTY_OBJECT = Object.freeze({});
633 +
634 + // node_modules/@base-ui/react/internals/composite/list/CompositeList.mjs
635 + var React6 = __toESM(require_react(), 1);
636 +
572 637 // node_modules/@base-ui/utils/useIsoLayoutEffect.mjs
573 638 var React4 = __toESM(require_react(), 1);
574 639 var noop = () => {
575 640 };
@@ -574,26 +639,8 @@
574 639 var noop = () => {
575 640 };
576 641 var useIsoLayoutEffect = typeof document !== "undefined" ? React4.useLayoutEffect : noop;
577 642
578 - // node_modules/@base-ui/utils/warn.mjs
579 - var set2;
580 - if (true) {
581 - set2 = /* @__PURE__ */ new Set();
582 - }
583 - function warn(...messages) {
584 - if (true) {
585 - const messageKey = messages.join(" ");
586 - if (!set2.has(messageKey)) {
587 - set2.add(messageKey);
588 - console.warn(`Base UI: ${messageKey}`);
589 - }
590 - }
591 - }
592 -
593 - // node_modules/@base-ui/react/internals/composite/list/CompositeList.mjs
594 - var React6 = __toESM(require_react(), 1);
595 -
596 643 // node_modules/@base-ui/react/internals/composite/list/CompositeListContext.mjs
597 644 var React5 = __toESM(require_react(), 1);
598 645 var CompositeListContext = /* @__PURE__ */ React5.createContext({
599 646 register: () => {
@@ -599,15 +646,10 @@
599 646 register: () => {
600 647 },
601 648 unregister: () => {
602 649 },
603 - subscribeMapChange: () => {
604 - return () => {
605 - };
650 + subscribeMapChange: () => () => {
606 651 },
607 - elementsRef: {
608 - current: []
609 - },
610 652 nextIndexRef: {
611 653 current: 0
612 654 }
613 655 });
@@ -616,9 +658,9 @@
616 658 return React5.useContext(CompositeListContext);
617 659 }
618 660
619 661 // node_modules/@base-ui/react/internals/composite/list/CompositeList.mjs
620 - var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
662 + var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
621 663 function CompositeList(props) {
622 664 const {
623 665 children,
624 666 elementsRef,
@@ -625,88 +667,123 @@
625 667 labelsRef,
626 668 onMapChange: onMapChangeProp
627 669 } = props;
628 670 const onMapChange = useStableCallback(onMapChangeProp);
629 - const nextIndexRef = React6.useRef(0);
671 + const [, setMapTick] = React6.useState(false);
630 672 const listeners = useRefWithInit(createListeners).current;
631 673 const map = useRefWithInit(createMap).current;
632 - const [mapTick, setMapTick] = React6.useState(0);
633 - const lastTickRef = React6.useRef(mapTick);
634 - const register = useStableCallback((node, metadata) => {
635 - map.set(node, metadata ?? null);
636 - lastTickRef.current += 1;
637 - setMapTick(lastTickRef.current);
674 + const nextIndexRef = React6.useRef(0);
675 + const isDirtyRef = React6.useRef(true);
676 + const itemsRef = React6.useRef(null);
677 + const mutationObserverRef = React6.useRef(null);
678 + const scheduleMapUpdate = useStableCallback(() => {
679 + if (isDirtyRef.current) {
680 + return;
681 + }
682 + isDirtyRef.current = true;
683 + setMapTick((tick) => !tick);
638 684 });
685 + const register = useStableCallback((node, registration) => {
686 + map.set(node, registration);
687 + scheduleMapUpdate();
688 + });
639 689 const unregister = useStableCallback((node) => {
640 690 map.delete(node);
641 - lastTickRef.current += 1;
642 - setMapTick(lastTickRef.current);
691 + scheduleMapUpdate();
643 692 });
644 - const sortedMap = React6.useMemo(() => {
645 - disableEslintWarning(mapTick);
646 - const newMap = /* @__PURE__ */ new Map();
647 - const sortedNodes = Array.from(map.keys()).filter((node) => node.isConnected).sort(sortByDocumentPosition);
648 - sortedNodes.forEach((node, index) => {
649 - const metadata = map.get(node) ?? {};
650 - newMap.set(node, {
651 - ...metadata,
652 - index
693 + const syncRefs = useStableCallback((items) => {
694 + const nextMap = /* @__PURE__ */ new Map();
695 + elementsRef.current.length = 0;
696 + if (labelsRef) {
697 + labelsRef.current.length = 0;
698 + }
699 + items.forEach((item) => {
700 + nextMap.set(item.element, {
701 + ...item.registration.metadata ?? {},
702 + index: item.index
653 703 });
704 + elementsRef.current[item.index] = item.element;
705 + if (labelsRef) {
706 + labelsRef.current[item.index] = item.registration.label !== void 0 ? item.registration.label : item.registration.textRef?.current?.textContent ?? item.element.textContent;
707 + }
654 708 });
655 - return newMap;
656 - }, [map, mapTick]);
657 - useIsoLayoutEffect(() => {
658 - if (typeof MutationObserver !== "function" || sortedMap.size === 0) {
659 - return void 0;
709 + nextIndexRef.current = elementsRef.current.length;
710 + return nextMap;
711 + });
712 + function observe(sortedNodes) {
713 + mutationObserverRef.current?.disconnect();
714 + mutationObserverRef.current = null;
715 + if (typeof MutationObserver !== "function" || sortedNodes.length < 2) {
716 + return;
660 717 }
661 718 const mutationObserver = new MutationObserver((entries) => {
662 - const diff = /* @__PURE__ */ new Set();
663 - const updateDiff = (node) => diff.has(node) ? diff.delete(node) : diff.add(node);
664 - entries.forEach((entry) => {
665 - entry.removedNodes.forEach(updateDiff);
666 - entry.addedNodes.forEach(updateDiff);
667 - });
668 - if (diff.size === 0) {
669 - lastTickRef.current += 1;
670 - setMapTick(lastTickRef.current);
719 + if (!hasMovedNode(entries)) {
720 + return;
671 721 }
722 + let previousConnectedNode = null;
723 + for (const node of sortedNodes) {
724 + if (!node.isConnected) {
725 + continue;
726 + }
727 + if (previousConnectedNode && sortByDocumentPosition(previousConnectedNode, node) > 0) {
728 + mutationObserver.disconnect();
729 + scheduleMapUpdate();
730 + return;
731 + }
732 + previousConnectedNode = node;
733 + }
672 734 });
673 - sortedMap.forEach((_, node) => {
674 - if (node.parentElement) {
675 - mutationObserver.observe(node.parentElement, {
676 - childList: true
677 - });
735 + mutationObserverRef.current = mutationObserver;
736 + const roots = /* @__PURE__ */ new Set();
737 + for (let i = 1; i < sortedNodes.length; i += 1) {
738 + const root = getCommonAncestor(sortedNodes[i - 1], sortedNodes[i]);
739 + if (root) {
740 + roots.add(root);
678 741 }
742 + }
743 + roots.forEach((root) => mutationObserver.observe(root, {
744 + childList: true
745 + }));
746 + }
747 + const flush = useStableCallback(() => {
748 + const [items, automaticNodes] = getCompositeListSnapshot(map);
749 + const nextMap = syncRefs(items);
750 + const previousItems = itemsRef.current;
751 + const changed = !previousItems || previousItems.length !== items.length || items.some((item, index2) => {
752 + const previousItem = previousItems[index2];
753 + return item.index !== previousItem.index || item.element !== previousItem.element || item.registration.index !== previousItem.registration.index || item.registration.metadata !== previousItem.registration.metadata;
679 754 });
680 - return () => {
681 - mutationObserver.disconnect();
682 - };
683 - }, [sortedMap]);
755 + observe(automaticNodes);
756 + itemsRef.current = items;
757 + isDirtyRef.current = false;
758 + if (!changed) {
759 + return;
760 + }
761 + listeners.forEach((listener) => listener(nextMap));
762 + onMapChange(nextMap);
763 + });
684 764 useIsoLayoutEffect(() => {
685 - const shouldUpdateLengths = lastTickRef.current === mapTick;
686 - if (shouldUpdateLengths) {
687 - if (elementsRef.current.length !== sortedMap.size) {
688 - elementsRef.current.length = sortedMap.size;
689 - }
690 - if (labelsRef && labelsRef.current.length !== sortedMap.size) {
691 - labelsRef.current.length = sortedMap.size;
692 - }
693 - nextIndexRef.current = sortedMap.size;
765 + if (!isDirtyRef.current && itemsRef.current) {
766 + syncRefs(itemsRef.current);
694 767 }
695 - onMapChange(sortedMap);
696 - }, [onMapChange, sortedMap, elementsRef, labelsRef, mapTick]);
697 - useIsoLayoutEffect(() => {
698 768 return () => {
699 769 elementsRef.current = [];
770 + if (labelsRef) {
771 + labelsRef.current = [];
772 + }
700 773 };
701 - }, [elementsRef]);
774 + }, [elementsRef, labelsRef, syncRefs]);
702 775 useIsoLayoutEffect(() => {
776 + if (isDirtyRef.current) {
777 + flush();
778 + }
779 + });
780 + useIsoLayoutEffect(() => {
703 781 return () => {
704 - if (labelsRef) {
705 - labelsRef.current = [];
706 - }
782 + mutationObserverRef.current?.disconnect();
783 + isDirtyRef.current = true;
707 784 };
708 - }, [labelsRef]);
785 + }, []);
709 786 const subscribeMapChange = useStableCallback((fn) => {
710 787 listeners.add(fn);
711 788 return () => {
712 789 listeners.delete(fn);
@@ -711,20 +788,15 @@
711 788 return () => {
712 789 listeners.delete(fn);
713 790 };
714 791 });
715 - useIsoLayoutEffect(() => {
716 - listeners.forEach((l) => l(sortedMap));
717 - }, [listeners, sortedMap]);
718 792 const contextValue = React6.useMemo(() => ({
719 793 register,
720 794 unregister,
721 795 subscribeMapChange,
722 - elementsRef,
723 - labelsRef,
724 796 nextIndexRef
725 - }), [register, unregister, subscribeMapChange, elementsRef, labelsRef, nextIndexRef]);
726 - return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CompositeListContext.Provider, {
797 + }), [register, unregister, subscribeMapChange, nextIndexRef]);
798 + return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CompositeListContext.Provider, {
727 799 value: contextValue,
728 800 children
729 801 });
730 802 }
@@ -733,32 +805,67 @@
733 805 }
734 806 function createListeners() {
735 807 return /* @__PURE__ */ new Set();
736 808 }
737 - function sortByDocumentPosition(a, b) {
738 - const position = a.compareDocumentPosition(b);
739 - if (position & Node.DOCUMENT_POSITION_FOLLOWING || position & Node.DOCUMENT_POSITION_CONTAINED_BY) {
740 - return -1;
809 + function getCompositeListSnapshot(map) {
810 + const reservedIndices = /* @__PURE__ */ new Set();
811 + const items = [];
812 + const automaticItems = [];
813 + map.forEach((registration, node) => {
814 + if (!node.isConnected) {
815 + return;
816 + }
817 + const index2 = registration.index;
818 + const item = {
819 + index: index2 ?? -1,
820 + element: node,
821 + registration
822 + };
823 + if (index2 === null) {
824 + automaticItems.push(item);
825 + } else if (index2 >= 0) {
826 + reservedIndices.add(index2);
827 + items.push(item);
828 + }
829 + });
830 + let nextAutomaticIndex = 0;
831 + automaticItems.sort((a, b) => sortByDocumentPosition(a.element, b.element));
832 + automaticItems.forEach((item) => {
833 + while (reservedIndices.has(nextAutomaticIndex)) {
834 + nextAutomaticIndex += 1;
835 + }
836 + item.index = nextAutomaticIndex;
837 + items.push(item);
838 + nextAutomaticIndex += 1;
839 + });
840 + if (reservedIndices.size > 0) {
841 + items.sort((a, b) => a.index - b.index);
741 842 }
742 - if (position & Node.DOCUMENT_POSITION_PRECEDING || position & Node.DOCUMENT_POSITION_CONTAINS) {
743 - return 1;
843 + return [items, automaticItems.map((item) => item.element)];
844 + }
845 + function getCommonAncestor(firstNode, lastNode) {
846 + let ancestor = firstNode.parentElement;
847 + while (ancestor && !ancestor.contains(lastNode)) {
848 + ancestor = ancestor.parentElement;
744 849 }
745 - return 0;
850 + return ancestor;
746 851 }
747 - function disableEslintWarning(_) {
852 + function hasMovedNode(entries) {
853 + for (const entry of entries) {
854 + for (let i = 0; i < entry.removedNodes.length; i += 1) {
855 + if (entry.removedNodes[i].isConnected) {
856 + return true;
857 + }
858 + }
859 + }
860 + return false;
748 861 }
749 -
750 - // node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs
751 - var React7 = __toESM(require_react(), 1);
752 - var DirectionContext = /* @__PURE__ */ React7.createContext(void 0);
753 - if (true) DirectionContext.displayName = "DirectionContext";
754 - function useDirection() {
755 - const context = React7.useContext(DirectionContext);
756 - return context?.direction ?? "ltr";
862 + function sortByDocumentPosition(a, b) {
863 + return a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
757 864 }
758 865
759 866 // node_modules/@base-ui/react/internals/useRenderElement.mjs
760 - var React10 = __toESM(require_react(), 1);
867 + var React9 = __toESM(require_react(), 1);
761 868
762 869 // node_modules/@base-ui/utils/useMergedRefs.mjs
763 870 function useMergedRefs(a, b, c, d) {
764 871 const forkRef = useRefWithInit(createForkRef).current;
@@ -784,9 +891,9 @@
784 891 function didChange(forkRef, a, b, c, d) {
785 892 return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d;
786 893 }
787 894 function didChangeN(forkRef, newRefs) {
788 - return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index) => ref !== newRefs[index]);
895 + return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index2) => ref !== newRefs[index2]);
789 896 }
790 897 function update(forkRef, refs) {
791 898 forkRef.refs = refs;
792 899 if (refs.every((ref) => ref == null)) {
@@ -831,9 +938,9 @@
831 938 const cleanupCallback = cleanupCallbacks[i];
832 939 if (typeof cleanupCallback === "function") {
833 940 cleanupCallback();
834 941 } else {
835 - ref(null);
942 + void ref(null);
836 943 }
837 944 break;
838 945 }
839 946 case "object": {
@@ -848,13 +955,13 @@
848 955 };
849 956 }
850 957
851 958 // node_modules/@base-ui/utils/getReactElementRef.mjs
852 - var React9 = __toESM(require_react(), 1);
959 + var React8 = __toESM(require_react(), 1);
853 960
854 961 // node_modules/@base-ui/utils/reactVersion.mjs
855 - var React8 = __toESM(require_react(), 1);
856 - var majorVersion = parseInt(React8.version, 10);
962 + var React7 = __toESM(require_react(), 1);
963 + var majorVersion = parseInt(React7.version, 10);
857 964 function isReactVersionAtLeast(reactVersionToCheck) {
858 965 return majorVersion >= reactVersionToCheck;
859 966 }
860 967
@@ -859,9 +966,9 @@
859 966 }
860 967
861 968 // node_modules/@base-ui/utils/getReactElementRef.mjs
862 969 function getReactElementRef(element) {
863 - if (!/* @__PURE__ */ React9.isValidElement(element)) {
970 + if (!/* @__PURE__ */ React8.isValidElement(element)) {
864 971 return null;
865 972 }
866 973 const reactElement = element;
867 974 const propsWithRef = reactElement.props;
@@ -884,14 +991,8 @@
884 991 }
885 992 return void 0;
886 993 }
887 994
888 - // node_modules/@base-ui/utils/empty.mjs
889 - function NOOP() {
890 - }
891 - var EMPTY_ARRAY = Object.freeze([]);
892 - var EMPTY_OBJECT = Object.freeze({});
893 -
894 995 // node_modules/@base-ui/react/internals/getStateAttributesProps.mjs
895 996 function getStateAttributesProps(state, customMapping) {
896 997 const props = {};
897 998 for (const key in state) {
@@ -1079,10 +1180,13 @@
1079 1180
1080 1181 // node_modules/@base-ui/react/internals/useRenderElement.mjs
1081 1182 var import_react = __toESM(require_react(), 1);
1082 1183 function useRenderElement(element, componentProps, params = {}) {
1083 - const renderProp = componentProps.render;
1084 - const outProps = useRenderElementProps(componentProps, params);
1184 + let renderProp = componentProps.render;
1185 + if (params.enabled !== false) {
1186 + renderProp = unwrapLazyRenderProp(renderProp);
1187 + }
1188 + const outProps = useRenderElementProps(componentProps, params, renderProp);
1085 1189 if (params.enabled === false) {
1086 1190 return null;
1087 1191 }
1088 1192 const state = params.state ?? EMPTY_OBJECT;
@@ -1087,29 +1191,28 @@
1087 1191 }
1088 1192 const state = params.state ?? EMPTY_OBJECT;
1089 1193 return evaluateRenderProp(element, renderProp, outProps, state);
1090 1194 }
1091 - function useRenderElementProps(componentProps, params = {}) {
1195 + function useRenderElementProps(componentProps, params, renderProp) {
1092 1196 const {
1093 1197 className: classNameProp,
1094 - style: styleProp,
1095 - render: renderProp
1198 + style: styleProp
1096 1199 } = componentProps;
1097 1200 const {
1098 1201 state = EMPTY_OBJECT,
1099 1202 ref,
1100 1203 props,
1101 - stateAttributesMapping: stateAttributesMapping3,
1204 + stateAttributesMapping: stateAttributesMapping4,
1102 1205 enabled = true
1103 1206 } = params;
1104 1207 const className = enabled ? resolveClassName(classNameProp, state) : void 0;
1105 1208 const style = enabled ? resolveStyle(styleProp, state) : void 0;
1106 - const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping3) : EMPTY_OBJECT;
1209 + const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping4) : EMPTY_OBJECT;
1107 1210 const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0;
1108 1211 const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT;
1109 1212 if (typeof document !== "undefined") {
1110 1213 if (!enabled) {
1111 - useMergedRefs(null, null);
1214 + void useMergedRefs(null, null);
1112 1215 } else if (Array.isArray(ref)) {
1113 1216 outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
1114 1217 } else {
1115 1218 outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref);
@@ -1134,8 +1237,15 @@
1134 1237 }
1135 1238 var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
1136 1239 var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
1137 1240 var LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
1241 + function unwrapLazyRenderProp(render) {
1242 + if (render?.$$typeof !== REACT_LAZY_TYPE) {
1243 + return render;
1244 + }
1245 + const unwrapped = React9.Children.toArray(render)[0];
1246 + return /* @__PURE__ */ React9.isValidElement(unwrapped) ? unwrapped : render;
1247 + }
1138 1248 function evaluateRenderProp(element, render, props, state) {
1139 1249 if (render) {
1140 1250 if (typeof render === "function") {
1141 1251 if (true) {
@@ -1144,19 +1254,14 @@
1144 1254 return render(props, state);
1145 1255 }
1146 1256 const mergedProps = mergeProps(props, render.props);
1147 1257 mergedProps.ref = props.ref;
1148 - let newElement = render;
1149 - if (newElement?.$$typeof === REACT_LAZY_TYPE) {
1150 - const children = React10.Children.toArray(render);
1151 - newElement = children[0];
1152 - }
1153 1258 if (true) {
1154 - if (!/* @__PURE__ */ React10.isValidElement(newElement)) {
1259 + if (!/* @__PURE__ */ React9.isValidElement(render)) {
1155 1260 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"));
1156 1261 }
1157 1262 }
1158 - return /* @__PURE__ */ React10.cloneElement(newElement, mergedProps);
1263 + return /* @__PURE__ */ React9.cloneElement(render, mergedProps);
1159 1264 }
1160 1265 if (element) {
1161 1266 if (typeof element === "string") {
1162 1267 return renderTag(element, props);
@@ -1191,18 +1296,18 @@
1191 1296 ...props,
1192 1297 key: props.key
1193 1298 });
1194 1299 }
1195 - return /* @__PURE__ */ React10.createElement(Tag, props);
1300 + return /* @__PURE__ */ React9.createElement(Tag, props);
1196 1301 }
1197 1302
1198 1303 // node_modules/@base-ui/utils/useId.mjs
1199 - var React11 = __toESM(require_react(), 1);
1304 + var React10 = __toESM(require_react(), 1);
1200 1305 var globalId = 0;
1201 1306 function useGlobalId(idOverride, prefix = "mui") {
1202 - const [defaultId, setDefaultId] = React11.useState(idOverride);
1307 + const [defaultId, setDefaultId] = React10.useState(idOverride);
1203 1308 const id = idOverride || defaultId;
1204 - React11.useEffect(() => {
1309 + React10.useEffect(() => {
1205 1310 if (defaultId == null) {
1206 1311 globalId += 1;
1207 1312 setDefaultId(`${prefix}-${globalId}`);
1208 1313 }
@@ -1324,19 +1429,18 @@
1324 1429 return details;
1325 1430 }
1326 1431
1327 1432 // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
1328 - var React13 = __toESM(require_react(), 1);
1433 + var React12 = __toESM(require_react(), 1);
1329 1434
1330 1435 // node_modules/@base-ui/utils/useOnMount.mjs
1331 - var React12 = __toESM(require_react(), 1);
1332 - var EMPTY = [];
1436 + var React11 = __toESM(require_react(), 1);
1333 1437 function useOnMount(fn) {
1334 - React12.useEffect(fn, EMPTY);
1438 + React11.useEffect(fn, EMPTY_ARRAY);
1335 1439 }
1336 1440
1337 1441 // node_modules/@base-ui/utils/useAnimationFrame.mjs
1338 - var EMPTY2 = null;
1442 + var EMPTY = null;
1339 1443 var LAST_RAF = globalThis.requestAnimationFrame;
1340 1444 var Scheduler = class {
1341 1445 /* This implementation uses an array as a backing data-structure for frame callbacks.
1342 1446 * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it
@@ -1375,13 +1479,16 @@
1375 1479 }
1376 1480 return id;
1377 1481 }
1378 1482 cancel(id) {
1379 - const index = id - this.startId;
1380 - if (index < 0 || index >= this.callbacks.length) {
1483 + const index2 = id - this.startId;
1484 + if (index2 < 0 || index2 >= this.callbacks.length) {
1381 1485 return;
1382 1486 }
1383 - this.callbacks[index] = null;
1487 + if (this.callbacks[index2] === null) {
1488 + return;
1489 + }
1490 + this.callbacks[index2] = null;
1384 1491 this.callbacksCount -= 1;
1385 1492 }
1386 1493 };
1387 1494 var scheduler = new Scheduler();
@@ -1394,9 +1501,9 @@
1394 1501 }
1395 1502 static cancel(id) {
1396 1503 return scheduler.cancel(id);
1397 1504 }
1398 - currentId = EMPTY2;
1505 + currentId = EMPTY;
1399 1506 /**
1400 1507 * Executes `fn` after `delay`, clearing any previously scheduled call.
1401 1508 */
1402 1509 request(fn) {
@@ -1401,16 +1508,16 @@
1401 1508 */
1402 1509 request(fn) {
1403 1510 this.cancel();
1404 1511 this.currentId = scheduler.request(() => {
1405 - this.currentId = EMPTY2;
1512 + this.currentId = EMPTY;
1406 1513 fn();
1407 1514 });
1408 1515 }
1409 1516 cancel = () => {
1410 - if (this.currentId !== EMPTY2) {
1517 + if (this.currentId !== EMPTY) {
1411 1518 scheduler.cancel(this.currentId);
1412 - this.currentId = EMPTY2;
1519 + this.currentId = EMPTY;
1413 1520 }
1414 1521 };
1415 1522 disposeEffect = () => {
1416 1523 return this.cancel;
@@ -1422,11 +1529,11 @@
1422 1529 return timeout;
1423 1530 }
1424 1531
1425 1532 // node_modules/@base-ui/react/internals/useTransitionStatus.mjs
1426 - function useTransitionStatus(open, enableIdleState = false, deferEndingState = false) {
1427 - const [transitionStatus, setTransitionStatus] = React13.useState(open && enableIdleState ? "idle" : void 0);
1428 - const [mounted, setMounted] = React13.useState(open);
1533 + function useTransitionStatus(open, enableIdleState = false, deferEndingState = false, animateInitialOpen = false) {
1534 + const [transitionStatus, setTransitionStatus] = React12.useState(open && enableIdleState ? "idle" : void 0);
1535 + const [mounted, setMounted] = React12.useState(open && !animateInitialOpen);
1429 1536 if (open && !mounted) {
1430 1537 setMounted(true);
1431 1538 setTransitionStatus("starting");
1432 1539 }
@@ -1479,20 +1586,15 @@
1479 1586 };
1480 1587 }
1481 1588
1482 1589 // node_modules/@base-ui/react/internals/composite/list/useCompositeListItem.mjs
1483 - var React14 = __toESM(require_react(), 1);
1484 - var IndexGuessBehavior = /* @__PURE__ */ (function(IndexGuessBehavior2) {
1485 - IndexGuessBehavior2[IndexGuessBehavior2["None"] = 0] = "None";
1486 - IndexGuessBehavior2[IndexGuessBehavior2["GuessFromOrder"] = 1] = "GuessFromOrder";
1487 - return IndexGuessBehavior2;
1488 - })({});
1590 + var React13 = __toESM(require_react(), 1);
1489 1591 function useCompositeListItem(params = {}) {
1490 1592 const {
1593 + guess,
1491 1594 label,
1492 1595 metadata,
1493 1596 textRef,
1494 - indexGuessBehavior,
1495 1597 index: externalIndex
1496 1598 } = params;
1497 1599 const {
1498 1600 register,
@@ -1497,14 +1599,12 @@
1497 1599 const {
1498 1600 register,
1499 1601 unregister,
1500 1602 subscribeMapChange,
1501 - elementsRef,
1502 - labelsRef,
1503 1603 nextIndexRef
1504 1604 } = useCompositeListContext();
1505 - const indexRef = React14.useRef(-1);
1506 - const [index, setIndex] = React14.useState(externalIndex ?? (indexGuessBehavior === IndexGuessBehavior.GuessFromOrder ? () => {
1605 + const indexRef = React13.useRef(-1);
1606 + const [internalIndex, setInternalIndex] = React13.useState(externalIndex == null && guess ? () => {
1507 1607 if (indexRef.current === -1) {
1508 1608 const newIndex = nextIndexRef.current;
1509 1609 nextIndexRef.current += 1;
1510 1610 indexRef.current = newIndex;
@@ -1509,33 +1609,26 @@
1509 1609 nextIndexRef.current += 1;
1510 1610 indexRef.current = newIndex;
1511 1611 }
1512 1612 return indexRef.current;
1513 - } : -1));
1514 - const componentRef = React14.useRef(null);
1515 - const ref = React14.useCallback((node) => {
1613 + } : -1);
1614 + const index2 = externalIndex ?? internalIndex;
1615 + const componentRef = React13.useRef(null);
1616 + const ref = React13.useCallback((node) => {
1617 + const previousNode = componentRef.current;
1618 + if (previousNode) {
1619 + unregister(previousNode);
1620 + }
1516 1621 componentRef.current = node;
1517 - if (index !== -1 && node !== null) {
1518 - elementsRef.current[index] = node;
1519 - if (labelsRef) {
1520 - const isLabelDefined = label !== void 0;
1521 - labelsRef.current[index] = isLabelDefined ? label : textRef?.current?.textContent ?? node.textContent;
1522 - }
1523 - }
1524 - }, [index, elementsRef, labelsRef, label, textRef]);
1525 - useIsoLayoutEffect(() => {
1526 - if (externalIndex != null) {
1527 - return void 0;
1528 - }
1529 - const node = componentRef.current;
1530 1622 if (node) {
1531 - register(node, metadata);
1532 - return () => {
1533 - unregister(node);
1534 - };
1623 + register(node, {
1624 + metadata: metadata ?? null,
1625 + index: externalIndex ?? null,
1626 + label,
1627 + textRef
1628 + });
1535 1629 }
1536 - return void 0;
1537 - }, [externalIndex, register, unregister, metadata]);
1630 + }, [externalIndex, register, unregister, metadata, label, textRef]);
1538 1631 useIsoLayoutEffect(() => {
1539 1632 if (externalIndex != null) {
1540 1633 return void 0;
1541 1634 }
@@ -1541,29 +1634,33 @@
1541 1634 }
1542 1635 return subscribeMapChange((map) => {
1543 1636 const i = componentRef.current ? map.get(componentRef.current)?.index : null;
1544 1637 if (i != null) {
1545 - setIndex(i);
1638 + setInternalIndex(i);
1546 1639 }
1547 1640 });
1548 - }, [externalIndex, subscribeMapChange, setIndex]);
1641 + }, [externalIndex, subscribeMapChange]);
1549 1642 return {
1550 1643 ref,
1551 - index
1644 + index: index2
1552 1645 };
1553 1646 }
1554 1647
1648 + // node_modules/@base-ui/react/internals/TransitionStatusDataAttributes.mjs
1649 + var TransitionStatusDataAttributes_exports = {};
1650 + __export(TransitionStatusDataAttributes_exports, {
1651 + endingStyle: () => endingStyle,
1652 + startingStyle: () => startingStyle
1653 + });
1654 + var startingStyle = "data-starting-style";
1655 + var endingStyle = "data-ending-style";
1656 +
1555 1657 // node_modules/@base-ui/react/internals/stateAttributesMapping.mjs
1556 - var TransitionStatusDataAttributes = /* @__PURE__ */ (function(TransitionStatusDataAttributes2) {
1557 - TransitionStatusDataAttributes2["startingStyle"] = "data-starting-style";
1558 - TransitionStatusDataAttributes2["endingStyle"] = "data-ending-style";
1559 - return TransitionStatusDataAttributes2;
1560 - })({});
1561 1658 var STARTING_HOOK = {
1562 - [TransitionStatusDataAttributes.startingStyle]: ""
1659 + [startingStyle]: ""
1563 1660 };
1564 1661 var ENDING_HOOK = {
1565 - [TransitionStatusDataAttributes.endingStyle]: ""
1662 + [endingStyle]: ""
1566 1663 };
1567 1664 var transitionStatusMapping = {
1568 1665 transitionStatus(value) {
1569 1666 if (value === "starting") {
@@ -1576,18 +1673,34 @@
1576 1673 }
1577 1674 };
1578 1675
1579 1676 // node_modules/@base-ui/react/internals/use-button/useButton.mjs
1580 - var React17 = __toESM(require_react(), 1);
1677 + var React16 = __toESM(require_react(), 1);
1581 1678
1582 1679 // node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
1583 1680 function hasWindow() {
1584 1681 return typeof window !== "undefined";
1585 1682 }
1683 + function getNodeName(node) {
1684 + if (isNode(node)) {
1685 + return (node.nodeName || "").toLowerCase();
1686 + }
1687 + return "#document";
1688 + }
1586 1689 function getWindow(node) {
1587 1690 var _node$ownerDocument;
1588 1691 return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
1589 1692 }
1693 + function getDocumentElement(node) {
1694 + var _ref;
1695 + return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
1696 + }
1697 + function isNode(value) {
1698 + if (!hasWindow()) {
1699 + return false;
1700 + }
1701 + return value instanceof Node || value instanceof getWindow(value).Node;
1702 + }
1590 1703 function isHTMLElement(value) {
1591 1704 if (!hasWindow()) {
1592 1705 return false;
1593 1706 }
@@ -1598,18 +1711,34 @@
1598 1711 return false;
1599 1712 }
1600 1713 return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1601 1714 }
1715 + function isLastTraversableNode(node) {
1716 + return /^(html|body|#document)$/.test(getNodeName(node));
1717 + }
1602 1718 function getComputedStyle2(element) {
1603 1719 return getWindow(element).getComputedStyle(element);
1604 1720 }
1721 + function getParentNode(node) {
1722 + if (getNodeName(node) === "html") {
1723 + return node;
1724 + }
1725 + const result = (
1726 + // Step into the shadow DOM of the parent of a slotted node.
1727 + node.assignedSlot || // DOM Element detected.
1728 + node.parentNode || // ShadowRoot detected.
1729 + isShadowRoot(node) && node.host || // Fallback.
1730 + getDocumentElement(node)
1731 + );
1732 + return isShadowRoot(result) ? result.host : result;
1733 + }
1605 1734
1606 1735 // node_modules/@base-ui/react/internals/composite/root/CompositeRootContext.mjs
1607 - var React15 = __toESM(require_react(), 1);
1608 - var CompositeRootContext = /* @__PURE__ */ React15.createContext(void 0);
1736 + var React14 = __toESM(require_react(), 1);
1737 + var CompositeRootContext = /* @__PURE__ */ React14.createContext(void 0);
1609 1738 if (true) CompositeRootContext.displayName = "CompositeRootContext";
1610 1739 function useCompositeRootContext(optional = false) {
1611 - const context = React15.useContext(CompositeRootContext);
1740 + const context = React14.useContext(CompositeRootContext);
1612 1741 if (context === void 0 && !optional) {
1613 1742 throw new Error(true ? "Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>." : formatErrorMessage_default(16));
1614 1743 }
1615 1744 return context;
@@ -1615,9 +1744,9 @@
1615 1744 return context;
1616 1745 }
1617 1746
1618 1747 // node_modules/@base-ui/react/utils/useFocusableWhenDisabled.mjs
1619 - var React16 = __toESM(require_react(), 1);
1748 + var React15 = __toESM(require_react(), 1);
1620 1749 function useFocusableWhenDisabled(parameters) {
1621 1750 const {
1622 1751 focusableWhenDisabled,
1623 1752 disabled: disabled2,
@@ -1626,9 +1755,9 @@
1626 1755 isNativeButton
1627 1756 } = parameters;
1628 1757 const isFocusableComposite = composite && focusableWhenDisabled !== false;
1629 1758 const isNonFocusableComposite = composite && focusableWhenDisabled === false;
1630 - const props = React16.useMemo(() => {
1759 + const props = React15.useMemo(() => {
1631 1760 const additionalProps = {
1632 1761 // allow Tabbing away from focusableWhenDisabled elements
1633 1762 onKeyDown(event) {
1634 1763 if (disabled2 && focusableWhenDisabled && event.key !== "Tab") {
@@ -1654,8 +1783,29 @@
1654 1783 props
1655 1784 };
1656 1785 }
1657 1786
1787 + // node_modules/@base-ui/utils/owner.mjs
1788 + function ownerDocument(node) {
1789 + return node?.ownerDocument || document;
1790 + }
1791 +
1792 + // node_modules/@base-ui/react/utils/dispatchClickWithModifiers.mjs
1793 + function dispatchClickWithModifiers(target, sourceEvent, {
1794 + detail = 0
1795 + } = {}) {
1796 + target.dispatchEvent(new (getWindow(target)).PointerEvent("click", {
1797 + bubbles: true,
1798 + cancelable: true,
1799 + composed: true,
1800 + detail,
1801 + shiftKey: sourceEvent.shiftKey,
1802 + ctrlKey: sourceEvent.ctrlKey,
1803 + altKey: sourceEvent.altKey,
1804 + metaKey: sourceEvent.metaKey
1805 + }));
1806 + }
1807 +
1658 1808 // node_modules/@base-ui/react/internals/use-button/useButton.mjs
1659 1809 function useButton(parameters = {}) {
1660 1810 const {
1661 1811 disabled: disabled2 = false,
@@ -1663,9 +1813,9 @@
1663 1813 tabIndex = 0,
1664 1814 native: isNativeButton = true,
1665 1815 composite: compositeProp
1666 1816 } = parameters;
1667 - const elementRef = React17.useRef(null);
1817 + const elementRef = React16.useRef(null);
1668 1818 const compositeRootContext = useCompositeRootContext(true);
1669 1819 const isCompositeItem = compositeProp ?? compositeRootContext !== void 0;
1670 1820 const {
1671 1821 props: focusableWhenDisabledProps
@@ -1676,9 +1826,9 @@
1676 1826 tabIndex,
1677 1827 isNativeButton
1678 1828 });
1679 1829 if (true) {
1680 - React17.useEffect(() => {
1830 + React16.useEffect(() => {
1681 1831 if (!elementRef.current) {
1682 1832 return;
1683 1833 }
1684 1834 const isButtonTag = isButtonElement(elementRef.current);
@@ -1694,9 +1844,9 @@
1694 1844 error(`${message}${ownerStackMessage}`);
1695 1845 }
1696 1846 }, [isNativeButton]);
1697 1847 }
1698 - const updateDisabled = React17.useCallback(() => {
1848 + const updateDisabled = React16.useCallback(() => {
1699 1849 const element = elementRef.current;
1700 1850 if (!isButtonElement(element)) {
1701 1851 return;
1702 1852 }
@@ -1704,9 +1854,9 @@
1704 1854 element.disabled = false;
1705 1855 }
1706 1856 }, [disabled2, focusableWhenDisabledProps.disabled, isCompositeItem]);
1707 1857 useIsoLayoutEffect(updateDisabled, [updateDisabled]);
1708 - const getButtonProps = React17.useCallback((externalProps = {}) => {
1858 + const getButtonProps = React16.useCallback((externalProps = {}) => {
1709 1859 const {
1710 1860 onClick: externalOnClick,
1711 1861 onMouseDown: externalOnMouseDown,
1712 1862 onKeyUp: externalOnKeyUp,
@@ -1749,25 +1899,28 @@
1749 1899 if (event.defaultPrevented && isTextNavigationRole) {
1750 1900 return;
1751 1901 }
1752 1902 event.preventDefault();
1753 - if (isLink || isNativeButton && isButton) {
1754 - currentTarget.click();
1903 + if (!isNativeButton || isButton) {
1755 1904 event.preventBaseUIHandler();
1756 - } else if (shouldClick) {
1757 - externalOnClick?.(event);
1758 - event.preventBaseUIHandler();
1905 + dispatchClickWithModifiers(currentTarget, event);
1759 1906 }
1760 1907 return;
1761 1908 }
1762 - if (shouldClick) {
1763 - if (!isNativeButton && (isSpaceKey || isEnterKey)) {
1909 + if (!shouldClick || isNativeButton || !isSpaceKey && !isEnterKey) {
1910 + if (isCurrentTarget && isLink && isSpaceKey) {
1764 1911 event.preventDefault();
1765 1912 }
1766 - if (!isNativeButton && isEnterKey) {
1767 - externalOnClick?.(event);
1768 - }
1913 + return;
1769 1914 }
1915 + if (event.defaultPrevented) {
1916 + return;
1917 + }
1918 + event.preventDefault();
1919 + if (isEnterKey) {
1920 + event.preventBaseUIHandler();
1921 + dispatchClickWithModifiers(currentTarget, event);
1922 + }
1770 1923 },
1771 1924 onKeyUp(event) {
1772 1925 if (disabled2) {
1773 1926 return;
@@ -1780,10 +1933,11 @@
1780 1933 }
1781 1934 if (event.baseUIHandlerPrevented) {
1782 1935 return;
1783 1936 }
1784 - if (event.target === event.currentTarget && !isNativeButton && !isCompositeItem && event.key === " ") {
1785 - externalOnClick?.(event);
1937 + if (event.target === event.currentTarget && !isNativeButton && !isCompositeItem && !event.defaultPrevented && event.key === " ") {
1938 + event.preventBaseUIHandler();
1939 + dispatchClickWithModifiers(event.currentTarget, event);
1786 1940 }
1787 1941 },
1788 1942 onPointerDown(event) {
1789 1943 if (disabled2) {
@@ -1810,18 +1964,13 @@
1810 1964 function isButtonElement(elem) {
1811 1965 return isHTMLElement(elem) && elem.tagName === "BUTTON";
1812 1966 }
1813 1967 function isValidLinkElement(elem) {
1814 - return Boolean(elem?.tagName === "A" && elem?.href);
1968 + return isHTMLElement(elem) && elem.tagName === "A" && Boolean(elem.href);
1815 1969 }
1816 1970
1817 - // node_modules/@base-ui/utils/owner.mjs
1818 - function ownerDocument(node) {
1819 - return node?.ownerDocument || document;
1820 - }
1821 -
1822 1971 // node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs
1823 - var React18 = __toESM(require_react(), 1);
1972 + var React17 = __toESM(require_react(), 1);
1824 1973
1825 1974 // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
1826 1975 var ReactDOM = __toESM(require_react_dom(), 1);
1827 1976
@@ -1833,9 +1982,25 @@
1833 1982 return "current" in maybeRef ? maybeRef.current : maybeRef;
1834 1983 }
1835 1984
1836 1985 // node_modules/@base-ui/react/internals/useAnimationsFinished.mjs
1837 - function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, treatAbortedAsFinished = true) {
1986 + var pendingCallbacks = null;
1987 + function flushBeforePaint(fn) {
1988 + if (!pendingCallbacks) {
1989 + const callbacks = [];
1990 + pendingCallbacks = callbacks;
1991 + queueMicrotask(() => {
1992 + pendingCallbacks = null;
1993 + ReactDOM.flushSync(() => {
1994 + for (const callback of callbacks) {
1995 + callback();
1996 + }
1997 + });
1998 + });
1999 + }
2000 + pendingCallbacks.push(fn);
2001 + }
2002 + function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, batch = false) {
1838 2003 const frame = useAnimationFrame();
1839 2004 return useStableCallback((fnToExecute, signal = null) => {
1840 2005 frame.cancel();
1841 2006 const element = resolveRef(elementOrRef);
@@ -1843,9 +2008,17 @@
1843 2008 return;
1844 2009 }
1845 2010 const resolvedElement = element;
1846 2011 const done = () => {
1847 - ReactDOM.flushSync(fnToExecute);
2012 + if (!batch) {
2013 + ReactDOM.flushSync(fnToExecute);
2014 + return;
2015 + }
2016 + flushBeforePaint(() => {
2017 + if (!signal?.aborted) {
2018 + fnToExecute();
2019 + }
2020 + });
1848 2021 };
1849 2022 if (typeof resolvedElement.getAnimations !== "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
1850 2023 fnToExecute();
1851 2024 return;
@@ -1854,23 +2027,22 @@
1854 2027 Promise.all(resolvedElement.getAnimations().map((animation) => animation.finished)).then(() => {
1855 2028 if (!signal?.aborted) {
1856 2029 done();
1857 2030 }
1858 - }).catch(() => {
1859 - if (treatAbortedAsFinished) {
1860 - if (!signal?.aborted) {
1861 - done();
1862 - }
2031 + }, () => {
2032 + if (signal?.aborted) {
1863 2033 return;
1864 2034 }
1865 2035 const currentAnimations = resolvedElement.getAnimations();
1866 - if (!signal?.aborted && currentAnimations.length > 0 && currentAnimations.some((animation) => animation.pending || animation.playState !== "finished")) {
2036 + if (currentAnimations.some((animation) => animation.pending || animation.playState !== "finished")) {
1867 2037 exec();
2038 + return;
1868 2039 }
2040 + done();
1869 2041 });
1870 2042 }
1871 2043 if (waitForStartingStyleRemoved) {
1872 - const startingStyleAttribute = TransitionStatusDataAttributes.startingStyle;
2044 + const startingStyleAttribute = startingStyle;
1873 2045 if (!resolvedElement.hasAttribute(startingStyleAttribute)) {
1874 2046 frame.request(exec);
1875 2047 return;
1876 2048 }
@@ -1898,13 +2070,14 @@
1898 2070 const {
1899 2071 enabled = true,
1900 2072 open,
1901 2073 ref,
2074 + batch = false,
1902 2075 onComplete: onCompleteParam
1903 2076 } = parameters;
1904 2077 const onComplete = useStableCallback(onCompleteParam);
1905 - const runOnceAnimationsFinish = useAnimationsFinished(ref, open, false);
1906 - React18.useEffect(() => {
2078 + const runOnceAnimationsFinish = useAnimationsFinished(ref, open, batch);
2079 + React17.useEffect(() => {
1907 2080 if (!enabled) {
1908 2081 return void 0;
1909 2082 }
1910 2083 const abortController = new AbortController();
@@ -1914,9 +2087,45 @@
1914 2087 };
1915 2088 }, [enabled, open, onComplete, runOnceAnimationsFinish]);
1916 2089 }
1917 2090
1918 - // node_modules/@base-ui/react/internals/shadowDom.mjs
2091 + // node_modules/@base-ui/utils/useTimeout.mjs
2092 + var EMPTY2 = 0;
2093 + var Timeout = class _Timeout {
2094 + static create() {
2095 + return new _Timeout();
2096 + }
2097 + currentId = EMPTY2;
2098 + /**
2099 + * Executes `fn` after `delay`, clearing any previously scheduled call.
2100 + */
2101 + start(delay, fn) {
2102 + this.clear();
2103 + this.currentId = setTimeout(() => {
2104 + this.currentId = EMPTY2;
2105 + fn();
2106 + }, delay);
2107 + }
2108 + isStarted() {
2109 + return this.currentId !== EMPTY2;
2110 + }
2111 + clear = () => {
2112 + if (this.currentId !== EMPTY2) {
2113 + clearTimeout(this.currentId);
2114 + this.currentId = EMPTY2;
2115 + }
2116 + };
2117 + disposeEffect = () => {
2118 + return this.clear;
2119 + };
2120 + };
2121 + function useTimeout() {
2122 + const timeout = useRefWithInit(Timeout.create).current;
2123 + useOnMount(timeout.disposeEffect);
2124 + return timeout;
2125 + }
2126 +
2127 + // node_modules/@base-ui/utils/shadowDom.mjs
1919 2128 function activeElement(doc) {
1920 2129 let element = doc.activeElement;
1921 2130 while (element?.shadowRoot?.activeElement != null) {
1922 2131 element = element.shadowRoot.activeElement;
@@ -1943,9 +2152,9 @@
1943 2152 return false;
1944 2153 }
1945 2154 function getTarget(event) {
1946 2155 if ("composedPath" in event) {
1947 - return event.composedPath()[0];
2156 + return event.composedPath()[0] ?? event.target;
1948 2157 }
1949 2158 return event.target;
1950 2159 }
1951 2160
@@ -1952,10 +2161,10 @@
1952 2161 // node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
1953 2162 var round = Math.round;
1954 2163
1955 2164 // node_modules/@base-ui/react/floating-ui-react/utils/composite.mjs
1956 - function isIndexOutOfListBounds(list, index) {
1957 - return index < 0 || index >= list.length;
2165 + function isIndexOutOfListBounds(list, index2) {
2166 + return index2 < 0 || index2 >= list.length;
1958 2167 }
1959 2168 function getMinListIndex(listRef, disabledIndices) {
1960 2169 return findNonDisabledListIndex(listRef.current, {
1961 2170 disabledIndices
@@ -1973,20 +2182,20 @@
1973 2182 decrement = false,
1974 2183 disabledIndices,
1975 2184 amount = 1
1976 2185 } = {}) {
1977 - let index = startingIndex;
2186 + let index2 = startingIndex;
1978 2187 do {
1979 - index += decrement ? -amount : amount;
1980 - } while (index >= 0 && index <= list.length - 1 && isListIndexDisabled(list, index, disabledIndices));
1981 - return index;
2188 + index2 += decrement ? -amount : amount;
2189 + } while (index2 >= 0 && index2 <= list.length - 1 && isListIndexDisabled(list, index2, disabledIndices));
2190 + return index2;
1982 2191 }
1983 - function isListIndexDisabled(list, index, disabledIndices) {
1984 - const isExplicitlyDisabled = typeof disabledIndices === "function" ? disabledIndices(index) : disabledIndices?.includes(index) ?? false;
2192 + function isListIndexDisabled(list, index2, disabledIndices) {
2193 + const isExplicitlyDisabled = typeof disabledIndices === "function" ? disabledIndices(index2) : disabledIndices?.includes(index2) ?? false;
1985 2194 if (isExplicitlyDisabled) {
1986 2195 return true;
1987 2196 }
1988 - const element = list[index];
2197 + const element = list[index2];
1989 2198 if (!element) {
1990 2199 return false;
1991 2200 }
1992 2201 if (!isElementVisible(element)) {
@@ -1991,8 +2200,11 @@
1991 2200 }
1992 2201 if (!isElementVisible(element)) {
1993 2202 return true;
1994 2203 }
2204 + if (element.matches(":disabled")) {
2205 + return true;
2206 + }
1995 2207 return !disabledIndices && (element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true");
1996 2208 }
1997 2209 function isHiddenByStyles(styles) {
1998 2210 return styles.visibility === "hidden" || styles.visibility === "collapse";
@@ -2007,12 +2219,12 @@
2007 2219 return styles.display !== "none" && styles.display !== "contents";
2008 2220 }
2009 2221
2010 2222 // node_modules/@base-ui/utils/useForcedRerendering.mjs
2011 - var React19 = __toESM(require_react(), 1);
2223 + var React18 = __toESM(require_react(), 1);
2012 2224 function useForcedRerendering() {
2013 - const [, setState] = React19.useState({});
2014 - return React19.useCallback(() => {
2225 + const [, setState] = React18.useState({});
2226 + return React18.useCallback(() => {
2015 2227 setState({});
2016 2228 }, []);
2017 2229 }
2018 2230
@@ -2022,19 +2234,11 @@
2022 2234 var ARROW_LEFT = "ArrowLeft";
2023 2235 var ARROW_RIGHT = "ArrowRight";
2024 2236 var HOME = "Home";
2025 2237 var END = "End";
2026 - var HORIZONTAL_KEYS = /* @__PURE__ */ new Set([ARROW_LEFT, ARROW_RIGHT]);
2027 - var HORIZONTAL_KEYS_WITH_EXTRA_KEYS = /* @__PURE__ */ new Set([ARROW_LEFT, ARROW_RIGHT, HOME, END]);
2028 - var VERTICAL_KEYS = /* @__PURE__ */ new Set([ARROW_UP, ARROW_DOWN]);
2029 - var VERTICAL_KEYS_WITH_EXTRA_KEYS = /* @__PURE__ */ new Set([ARROW_UP, ARROW_DOWN, HOME, END]);
2030 - var ARROW_KEYS = /* @__PURE__ */ new Set([...HORIZONTAL_KEYS, ...VERTICAL_KEYS]);
2031 - var COMPOSITE_KEYS = /* @__PURE__ */ new Set([...ARROW_KEYS, HOME, END]);
2238 + var COMPOSITE_KEYS = /* @__PURE__ */ new Set([ARROW_UP, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, HOME, END]);
2032 2239 var SHIFT = "Shift";
2033 - var CONTROL = "Control";
2034 - var ALT = "Alt";
2035 - var META = "Meta";
2036 - var MODIFIER_KEYS = /* @__PURE__ */ new Set([SHIFT, CONTROL, ALT, META]);
2240 + var MODIFIER_KEYS = [SHIFT, "Control", "Alt", "Meta"];
2037 2241 function isInputElement(element) {
2038 2242 return isHTMLElement(element) && element.tagName === "INPUT";
2039 2243 }
2040 2244 function isNativeInput(element) {
@@ -2065,9 +2269,9 @@
2065 2269 targetX = elementOffsetLeft - elementStyles.scrollMarginLeft - containerStyles.scrollPaddingLeft;
2066 2270 }
2067 2271 }
2068 2272 if (direction === "rtl") {
2069 - if (elementOffsetLeft - elementStyles.scrollMarginRight < scrollContainer.scrollLeft + containerStyles.scrollPaddingLeft) {
2273 + if (elementOffsetLeft - elementStyles.scrollMarginLeft < scrollContainer.scrollLeft + containerStyles.scrollPaddingLeft) {
2070 2274 targetX = elementOffsetLeft - elementStyles.scrollMarginLeft - containerStyles.scrollPaddingLeft;
2071 2275 } else if (elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight > scrollContainer.scrollLeft + scrollContainer.clientWidth - containerStyles.scrollPaddingRight) {
2072 2276 targetX = elementOffsetLeft + element.offsetWidth + elementStyles.scrollMarginRight - scrollContainer.clientWidth + containerStyles.scrollPaddingRight;
2073 2277 }
@@ -2122,10 +2326,583 @@
2122 2326 }
2123 2327 return value ? "true" : void 0;
2124 2328 }
2125 2329
2330 + // node_modules/@base-ui/react/internals/useValueChanged.mjs
2331 + var React19 = __toESM(require_react(), 1);
2332 + function useValueChanged(value, onChange) {
2333 + const valueRef = React19.useRef(value);
2334 + const onChangeCallback = useStableCallback(onChange);
2335 + useIsoLayoutEffect(() => {
2336 + if (valueRef.current !== value) {
2337 + onChangeCallback(valueRef.current);
2338 + }
2339 + valueRef.current = value;
2340 + }, [value, onChangeCallback]);
2341 + }
2342 +
2343 + // node_modules/@base-ui/react/internals/field-root-context/FieldRootContext.mjs
2344 + var React20 = __toESM(require_react(), 1);
2345 +
2346 + // node_modules/@base-ui/react/field/control/FieldControlDataAttributes.mjs
2347 + var valid = "data-valid";
2348 + var invalid = "data-invalid";
2349 +
2350 + // node_modules/@base-ui/react/internals/field-constants/constants.mjs
2351 + var DEFAULT_VALIDITY_STATE = {
2352 + badInput: false,
2353 + customError: false,
2354 + patternMismatch: false,
2355 + rangeOverflow: false,
2356 + rangeUnderflow: false,
2357 + stepMismatch: false,
2358 + tooLong: false,
2359 + tooShort: false,
2360 + typeMismatch: false,
2361 + valid: null,
2362 + valueMissing: false
2363 + };
2364 + var DEFAULT_FIELD_STATE_ATTRIBUTES = {
2365 + valid: null,
2366 + touched: false,
2367 + dirty: false,
2368 + filled: false,
2369 + focused: false
2370 + };
2371 + var DEFAULT_FIELD_ROOT_STATE = {
2372 + disabled: false,
2373 + ...DEFAULT_FIELD_STATE_ATTRIBUTES
2374 + };
2375 + var fieldValidityMapping = {
2376 + valid(value) {
2377 + if (value === null) {
2378 + return null;
2379 + }
2380 + if (value) {
2381 + return {
2382 + [valid]: ""
2383 + };
2384 + }
2385 + return {
2386 + [invalid]: ""
2387 + };
2388 + }
2389 + };
2390 +
2391 + // node_modules/@base-ui/react/internals/field-root-context/FieldRootContext.mjs
2392 + var DEFAULT_FIELD_ROOT_CONTEXT = {
2393 + invalid: void 0,
2394 + name: void 0,
2395 + validityData: {
2396 + state: DEFAULT_VALIDITY_STATE,
2397 + errors: [],
2398 + error: "",
2399 + value: "",
2400 + initialValue: null
2401 + },
2402 + setValidityData: NOOP,
2403 + disabled: void 0,
2404 + setTouched: NOOP,
2405 + setDirty: NOOP,
2406 + setFilled: NOOP,
2407 + setFocused: NOOP,
2408 + validationMode: "onSubmit",
2409 + shouldValidateOnChange: () => false,
2410 + state: DEFAULT_FIELD_ROOT_STATE,
2411 + registerFieldControl: NOOP,
2412 + validation: {
2413 + getValidationProps: (_disabled, props = EMPTY_OBJECT) => props,
2414 + inputRef: {
2415 + current: null
2416 + },
2417 + registeredInputs: /* @__PURE__ */ new Map(),
2418 + registerInput: NOOP,
2419 + getInputControl: () => null,
2420 + commit: async () => {
2421 + },
2422 + change: NOOP
2423 + }
2424 + };
2425 + var FieldRootContext = /* @__PURE__ */ React20.createContext(DEFAULT_FIELD_ROOT_CONTEXT);
2426 + if (true) FieldRootContext.displayName = "FieldRootContext";
2427 + function useFieldRootContext(optional = true) {
2428 + const context = React20.useContext(FieldRootContext);
2429 + if (context.setValidityData === NOOP && !optional) {
2430 + throw new Error(true ? "Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>." : formatErrorMessage_default(28));
2431 + }
2432 + return context;
2433 + }
2434 +
2435 + // node_modules/@base-ui/react/internals/field-register-control/useRegisterFieldControl.mjs
2436 + function useRegisterFieldControl(controlRef, id, value, getFormValueOverride, enabled = true, name16) {
2437 + const {
2438 + registerFieldControl
2439 + } = useFieldRootContext();
2440 + const sourceRef = useRefWithInit(() => /* @__PURE__ */ Symbol());
2441 + useIsoLayoutEffect(() => {
2442 + const source = sourceRef.current;
2443 + if (!enabled) {
2444 + registerFieldControl(source, void 0);
2445 + return;
2446 + }
2447 + const registration = {
2448 + controlRef,
2449 + getValue: getFormValueOverride,
2450 + id,
2451 + name: name16,
2452 + value
2453 + };
2454 + registerFieldControl(source, registration);
2455 + }, [controlRef, enabled, getFormValueOverride, id, name16, registerFieldControl, sourceRef, value]);
2456 + useIsoLayoutEffect(() => {
2457 + const source = sourceRef.current;
2458 + return () => {
2459 + registerFieldControl(source, void 0);
2460 + };
2461 + }, [registerFieldControl, sourceRef]);
2462 + }
2463 +
2464 + // node_modules/@base-ui/react/internals/form-context/FormContext.mjs
2465 + var React21 = __toESM(require_react(), 1);
2466 + var FormContext = /* @__PURE__ */ React21.createContext({
2467 + elementRef: {
2468 + current: null
2469 + },
2470 + formRef: {
2471 + current: {
2472 + fields: /* @__PURE__ */ new Map()
2473 + }
2474 + },
2475 + errors: {},
2476 + clearErrors: NOOP,
2477 + validationMode: "onSubmit",
2478 + submitCountRef: {
2479 + current: 0
2480 + }
2481 + });
2482 + if (true) FormContext.displayName = "FormContext";
2483 + function useFormContext() {
2484 + return React21.useContext(FormContext);
2485 + }
2486 +
2487 + // node_modules/@base-ui/react/internals/labelable-provider/useLabelableId.mjs
2488 + var React23 = __toESM(require_react(), 1);
2489 +
2490 + // node_modules/@base-ui/react/internals/labelable-provider/LabelableContext.mjs
2491 + var React22 = __toESM(require_react(), 1);
2492 + var LabelableContext = /* @__PURE__ */ React22.createContext({
2493 + controlId: void 0,
2494 + registerControlId: NOOP,
2495 + resetControlId: NOOP,
2496 + labelId: void 0,
2497 + setLabelId: NOOP,
2498 + messageIds: [],
2499 + setMessageIds: NOOP,
2500 + getDescriptionProps: (externalProps) => externalProps
2501 + });
2502 + if (true) LabelableContext.displayName = "LabelableContext";
2503 + function useLabelableContext() {
2504 + return React22.useContext(LabelableContext);
2505 + }
2506 +
2507 + // node_modules/@base-ui/react/internals/labelable-provider/useLabelableId.mjs
2508 + function useLabelableId(params = {}) {
2509 + const {
2510 + id,
2511 + enabled = true
2512 + } = params;
2513 + const {
2514 + controlId,
2515 + registerControlId,
2516 + resetControlId
2517 + } = useLabelableContext();
2518 + const defaultId = useBaseUiId();
2519 + const controlSourceRef = useRefWithInit(() => /* @__PURE__ */ Symbol());
2520 + const hasRegisteredRef = React23.useRef(false);
2521 + const hadExplicitIdRef = React23.useRef(false);
2522 + const unregisterControlId = useStableCallback(() => {
2523 + if (!hasRegisteredRef.current || registerControlId === NOOP) {
2524 + return;
2525 + }
2526 + hasRegisteredRef.current = false;
2527 + registerControlId(controlSourceRef.current, void 0);
2528 + });
2529 + useIsoLayoutEffect(() => {
2530 + if (!enabled || registerControlId === NOOP) {
2531 + unregisterControlId();
2532 + return void 0;
2533 + }
2534 + let nextId;
2535 + if (id !== void 0) {
2536 + hadExplicitIdRef.current = true;
2537 + nextId = id;
2538 + } else if (hadExplicitIdRef.current) {
2539 + nextId = defaultId;
2540 + } else {
2541 + resetControlId();
2542 + return void 0;
2543 + }
2544 + if (nextId === void 0) {
2545 + unregisterControlId();
2546 + return void 0;
2547 + }
2548 + hasRegisteredRef.current = true;
2549 + registerControlId(controlSourceRef.current, nextId);
2550 + return void 0;
2551 + }, [id, enabled, registerControlId, resetControlId, defaultId, controlSourceRef, unregisterControlId]);
2552 + useIsoLayoutEffect(() => {
2553 + return unregisterControlId;
2554 + }, [unregisterControlId]);
2555 + return (enabled ? controlId : void 0) ?? id ?? defaultId;
2556 + }
2557 +
2558 + // node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs
2559 + var React24 = __toESM(require_react(), 1);
2560 + var DirectionContext = /* @__PURE__ */ React24.createContext(void 0);
2561 + if (true) DirectionContext.displayName = "DirectionContext";
2562 + function useDirection() {
2563 + const context = React24.useContext(DirectionContext);
2564 + return context?.direction ?? "ltr";
2565 + }
2566 +
2567 + // node_modules/@base-ui/react/field/item/FieldItemContext.mjs
2568 + var React25 = __toESM(require_react(), 1);
2569 + var FieldItemContext = /* @__PURE__ */ React25.createContext({
2570 + disabled: false
2571 + });
2572 + if (true) FieldItemContext.displayName = "FieldItemContext";
2573 + function useFieldItemContext() {
2574 + const context = React25.useContext(FieldItemContext);
2575 + return context;
2576 + }
2577 +
2578 + // node_modules/@base-ui/react/field/root/useFieldValidation.mjs
2579 + var React26 = __toESM(require_react(), 1);
2580 +
2581 + // node_modules/@base-ui/react/field/utils/getCombinedFieldValidityData.mjs
2582 + function getCombinedFieldValidityData(validityData, invalid2) {
2583 + return {
2584 + ...validityData,
2585 + state: {
2586 + ...validityData.state,
2587 + valid: !invalid2 && validityData.state.valid
2588 + }
2589 + };
2590 + }
2591 +
2592 + // node_modules/@base-ui/react/field/root/useFieldValidation.mjs
2593 + var validityKeys = Object.keys(DEFAULT_VALIDITY_STATE);
2594 + function isEligibleInput(input, formElement) {
2595 + if (input.matches(":disabled")) {
2596 + return false;
2597 + }
2598 + if (!formElement || input.form === formElement) {
2599 + return true;
2600 + }
2601 + return input.form === null && !input.hasAttribute("form");
2602 + }
2603 + function findRepresentativeInput(inputs, formElement) {
2604 + let fallback = null;
2605 + for (const input of inputs.keys()) {
2606 + if (!isEligibleInput(input, formElement)) {
2607 + continue;
2608 + }
2609 + if (!input.validity.valid) {
2610 + return input;
2611 + }
2612 + fallback ??= input;
2613 + }
2614 + return fallback;
2615 + }
2616 + function makeState(customError) {
2617 + return {
2618 + ...DEFAULT_VALIDITY_STATE,
2619 + valid: !customError,
2620 + customError
2621 + };
2622 + }
2623 + function getNativeErrors(element) {
2624 + return element && element.validationMessage ? [element.validationMessage] : [];
2625 + }
2626 + function useFieldValidation(params) {
2627 + const {
2628 + elementRef,
2629 + formRef
2630 + } = useFormContext();
2631 + const {
2632 + setValidityData,
2633 + validate,
2634 + validityData,
2635 + validationDebounceTime,
2636 + invalid: invalid2,
2637 + markedDirtyRef,
2638 + state,
2639 + shouldValidateOnChange,
2640 + validationMode,
2641 + registeredFieldIdRef
2642 + } = params;
2643 + const {
2644 + controlId,
2645 + getDescriptionProps
2646 + } = useLabelableContext();
2647 + const timeout = useTimeout();
2648 + const inputRef = React26.useRef(null);
2649 + const registeredInputs = useRefWithInit(() => /* @__PURE__ */ new Map()).current;
2650 + const validationCommitIdRef = React26.useRef(0);
2651 + const customValidityRef = React26.useRef(null);
2652 + const registerInput = React26.useCallback((element, registration) => {
2653 + registeredInputs.set(element, registration);
2654 + return () => {
2655 + registeredInputs.delete(element);
2656 + };
2657 + }, [registeredInputs]);
2658 + const getInputControl = useStableCallback(() => {
2659 + const element = findRepresentativeInput(registeredInputs, elementRef.current);
2660 + return element && registeredInputs.get(element)?.controlRef.current || null;
2661 + });
2662 + const commit = useStableCallback(async (value, revalidate = false) => {
2663 + validationCommitIdRef.current += 1;
2664 + const validationCommitId = validationCommitIdRef.current;
2665 + function updateRegisteredFieldValidity(nextValidityData, externalInvalid = invalid2) {
2666 + const fieldId = registeredFieldIdRef.current ?? controlId;
2667 + if (fieldId == null) {
2668 + return;
2669 + }
2670 + const currentFieldData = formRef.current.fields.get(fieldId);
2671 + if (!currentFieldData) {
2672 + return;
2673 + }
2674 + const validityDataWithFormErrors = getCombinedFieldValidityData(nextValidityData, externalInvalid);
2675 + formRef.current.fields.set(fieldId, {
2676 + ...currentFieldData,
2677 + validityData: validityDataWithFormErrors
2678 + });
2679 + }
2680 + function makeValidityData(validityState, errorMessages) {
2681 + const errors = validityState.valid === false ? errorMessages : [];
2682 + return {
2683 + value,
2684 + state: validityState,
2685 + error: errors[0] ?? "",
2686 + errors,
2687 + initialValue: validityData.initialValue
2688 + };
2689 + }
2690 + function setCustomValidity(element2, message) {
2691 + const displaced = element2.validity.customError ? element2.validationMessage : "";
2692 + const ownedMessage = message.replace(/\r\n?/g, "\n");
2693 + element2.setCustomValidity(ownedMessage);
2694 + customValidityRef.current = [element2, ownedMessage, displaced];
2695 + }
2696 + function clearCustomValidity() {
2697 + const record = customValidityRef.current;
2698 + customValidityRef.current = null;
2699 + if (record && (!record[0].willValidate || record[0].validationMessage === record[1])) {
2700 + record[0].setCustomValidity(record[2]);
2701 + }
2702 + }
2703 + function publish(validityState, errorMessages, externalInvalid) {
2704 + const nextValidityData = makeValidityData(validityState, errorMessages);
2705 + updateRegisteredFieldValidity(nextValidityData, externalInvalid);
2706 + setValidityData(nextValidityData);
2707 + }
2708 + function getState(el) {
2709 + const computedState = validityKeys.reduce((acc, key) => {
2710 + acc[key] = el.validity[key];
2711 + return acc;
2712 + }, {});
2713 + let hasOnlyValueMissingError = false;
2714 + for (const key of validityKeys) {
2715 + if (key === "valid") {
2716 + continue;
2717 + }
2718 + if (key === "valueMissing" && computedState[key]) {
2719 + hasOnlyValueMissingError = true;
2720 + } else if (computedState[key]) {
2721 + return computedState;
2722 + }
2723 + }
2724 + if (hasOnlyValueMissingError && !markedDirtyRef.current) {
2725 + computedState.valid = true;
2726 + computedState.valueMissing = false;
2727 + }
2728 + return computedState;
2729 + }
2730 + function resolveRepresentativeInput() {
2731 + return registeredInputs.size > 0 ? findRepresentativeInput(registeredInputs, elementRef.current) : inputRef.current;
2732 + }
2733 + let element = resolveRepresentativeInput();
2734 + function refreshState() {
2735 + element = resolveRepresentativeInput();
2736 + return element?.willValidate ? getState(element) : makeState(false);
2737 + }
2738 + if (revalidate) {
2739 + if (state.valid !== false || !element) {
2740 + return;
2741 + }
2742 + if (!element.validity.valueMissing) {
2743 + clearCustomValidity();
2744 + const currentElement = resolveRepresentativeInput();
2745 + const foreign = currentElement?.validity.customError ? getNativeErrors(currentElement) : [];
2746 + publish(makeState(foreign.length > 0), foreign, false);
2747 + return;
2748 + }
2749 + for (const key of validityKeys) {
2750 + if (key !== "valid" && key !== "valueMissing" && key !== "customError" && element.validity[key]) {
2751 + return;
2752 + }
2753 + }
2754 + }
2755 + timeout.clear();
2756 + clearCustomValidity();
2757 + let nextState = refreshState();
2758 + let validationErrors = getNativeErrors(element);
2759 + const isValidatingOnChange = shouldValidateOnChange();
2760 + if (validationErrors.length === 0 || isValidatingOnChange) {
2761 + const formValues = Array.from(formRef.current.fields.values()).reduce((acc, field) => {
2762 + if (field.name) {
2763 + acc[field.name] = field.getValue();
2764 + }
2765 + return acc;
2766 + }, {});
2767 + const resultOrPromise = validate(value, formValues);
2768 + let result;
2769 + if (typeof resultOrPromise === "object" && resultOrPromise !== null && "then" in resultOrPromise) {
2770 + if (nextState.valid === false) {
2771 + publish(nextState, validationErrors);
2772 + } else if (validationMode === "onSubmit" || !validityData.state.customError) {
2773 + nextState.valid = null;
2774 + publish(nextState, validationErrors);
2775 + }
2776 + result = await resultOrPromise;
2777 + if (validationCommitId !== validationCommitIdRef.current) {
2778 + return;
2779 + }
2780 + nextState = refreshState();
2781 + } else {
2782 + result = resultOrPromise;
2783 + }
2784 + validationErrors = result ? [].concat(result).filter(Boolean) : [];
2785 + if (validationErrors.length > 0) {
2786 + nextState.valid = false;
2787 + nextState.customError = true;
2788 + if (element?.willValidate) {
2789 + setCustomValidity(element, validationErrors.join("\n"));
2790 + }
2791 + } else {
2792 + validationErrors = getNativeErrors(element);
2793 + }
2794 + }
2795 + publish(nextState, validationErrors);
2796 + });
2797 + const change = useStableCallback((value, cancelPending = false) => {
2798 + timeout.clear();
2799 + validationCommitIdRef.current += 1;
2800 + if (cancelPending) {
2801 + return;
2802 + }
2803 + const validateOnChange = shouldValidateOnChange();
2804 + if (validateOnChange && value !== "" && validationDebounceTime) {
2805 + timeout.start(validationDebounceTime, () => {
2806 + commit(value);
2807 + });
2808 + } else {
2809 + commit(value, !validateOnChange);
2810 + }
2811 + });
2812 + const getValidationProps = React26.useCallback((disabled2, externalProps = {}) => mergeProps(getDescriptionProps(externalProps), state.valid === false && !state.disabled && !disabled2 ? {
2813 + "aria-invalid": true
2814 + } : EMPTY_OBJECT), [getDescriptionProps, state.disabled, state.valid]);
2815 + return React26.useMemo(() => ({
2816 + getValidationProps,
2817 + inputRef,
2818 + registeredInputs,
2819 + registerInput,
2820 + getInputControl,
2821 + commit,
2822 + change
2823 + }), [getValidationProps, registeredInputs, registerInput, getInputControl, commit, change]);
2824 + }
2825 +
2826 + // node_modules/@base-ui/react/utils/useRegisteredLabelId.mjs
2827 + function useRegisteredLabelId(idProp, setLabelId) {
2828 + const id = useBaseUiId(idProp);
2829 + useIsoLayoutEffect(() => {
2830 + setLabelId(id);
2831 + return () => {
2832 + setLabelId((currentId) => currentId === id ? void 0 : currentId);
2833 + };
2834 + }, [id, setLabelId]);
2835 + return id;
2836 + }
2837 +
2838 + // node_modules/@base-ui/react/internals/labelable-provider/useLabel.mjs
2839 + function useLabel(params = {}) {
2840 + const {
2841 + id: idProp,
2842 + fallbackControlId,
2843 + native = false,
2844 + setLabelId: setLabelIdProp,
2845 + focusControl: focusControlProp
2846 + } = params;
2847 + const {
2848 + controlId: contextControlId,
2849 + setLabelId: setContextLabelId
2850 + } = useLabelableContext();
2851 + const syncLabelId = useStableCallback((nextLabelId) => {
2852 + setContextLabelId(nextLabelId);
2853 + setLabelIdProp?.(nextLabelId);
2854 + });
2855 + const id = useRegisteredLabelId(idProp, syncLabelId);
2856 + const resolvedControlId = contextControlId ?? fallbackControlId;
2857 + function focusControl(event) {
2858 + if (focusControlProp) {
2859 + focusControlProp(event, resolvedControlId);
2860 + return;
2861 + }
2862 + if (!resolvedControlId) {
2863 + return;
2864 + }
2865 + const controlElement = ownerDocument(event.currentTarget).getElementById(resolvedControlId);
2866 + if (isHTMLElement(controlElement)) {
2867 + focusElementWithVisible(controlElement);
2868 + }
2869 + }
2870 + function handleInteraction(event) {
2871 + const target = getTarget(event.nativeEvent);
2872 + if (target?.closest("button,input,select,textarea")) {
2873 + return;
2874 + }
2875 + if (!event.defaultPrevented && event.detail > 1) {
2876 + event.preventDefault();
2877 + }
2878 + if (native) {
2879 + return;
2880 + }
2881 + focusControl(event);
2882 + }
2883 + return native ? {
2884 + id,
2885 + htmlFor: resolvedControlId,
2886 + onMouseDown: handleInteraction
2887 + } : {
2888 + id,
2889 + onClick: handleInteraction,
2890 + onPointerDown(event) {
2891 + event.preventDefault();
2892 + }
2893 + };
2894 + }
2895 + function focusElementWithVisible(element) {
2896 + element.focus({
2897 + // Available from Chrome 144+ (January 2026).
2898 + // Safari and Firefox already support it.
2899 + focusVisible: true
2900 + });
2901 + }
2902 +
2126 2903 // node_modules/@base-ui/react/internals/composite/item/useCompositeItem.mjs
2127 - var React20 = __toESM(require_react(), 1);
2904 + var React27 = __toESM(require_react(), 1);
2128 2905 function useCompositeItem(params = {}) {
2129 2906 const {
2130 2907 highlightItemOnHover,
2131 2908 highlightedIndex,
@@ -2132,17 +2909,17 @@
2132 2909 onHighlightedIndexChange
2133 2910 } = useCompositeRootContext();
2134 2911 const {
2135 2912 ref,
2136 - index
2913 + index: index2
2137 2914 } = useCompositeListItem(params);
2138 - const isHighlighted = highlightedIndex === index;
2139 - const itemRef = React20.useRef(null);
2915 + const isHighlighted = highlightedIndex === index2;
2916 + const itemRef = React27.useRef(null);
2140 2917 const mergedRef = useMergedRefs(ref, itemRef);
2141 2918 const compositeProps = {
2142 2919 tabIndex: isHighlighted ? 0 : -1,
2143 2920 onFocus() {
2144 - onHighlightedIndexChange(index);
2921 + onHighlightedIndexChange(index2);
2145 2922 },
2146 2923 onMouseMove() {
2147 2924 const item = itemRef.current;
2148 2925 if (!highlightItemOnHover || !item) {
@@ -2156,9 +2933,9 @@
2156 2933 };
2157 2934 return {
2158 2935 compositeProps,
2159 2936 compositeRef: mergedRef,
2160 - index
2937 + index: index2
2161 2938 };
2162 2939 }
2163 2940
2164 2941 // node_modules/@base-ui/react/utils/getCssDimensions.mjs
@@ -2179,8 +2956,25 @@
2179 2956 height
2180 2957 };
2181 2958 }
2182 2959
2960 + // node_modules/@base-ui/react/direction-provider/DirectionProvider.mjs
2961 + var React28 = __toESM(require_react(), 1);
2962 + var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
2963 + var DirectionProvider = function DirectionProvider2(props) {
2964 + const {
2965 + direction = "ltr"
2966 + } = props;
2967 + const contextValue = React28.useMemo(() => ({
2968 + direction
2969 + }), [direction]);
2970 + return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DirectionContext.Provider, {
2971 + value: contextValue,
2972 + children: props.children
2973 + });
2974 + };
2975 + if (true) DirectionProvider.displayName = "DirectionProvider";
2976 +
2183 2977 // node_modules/@base-ui/utils/isElementDisabled.mjs
2184 2978 function isElementDisabled(element) {
2185 2979 return element == null || element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true";
2186 2980 }
@@ -2185,29 +2979,845 @@
2185 2979 return element == null || element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true";
2186 2980 }
2187 2981
2188 2982 // node_modules/@base-ui/react/internals/csp-context/CSPContext.mjs
2189 - var React21 = __toESM(require_react(), 1);
2190 - var CSPContext = /* @__PURE__ */ React21.createContext(void 0);
2983 + var React29 = __toESM(require_react(), 1);
2984 + var CSPContext = /* @__PURE__ */ React29.createContext(void 0);
2191 2985 if (true) CSPContext.displayName = "CSPContext";
2192 2986 var DEFAULT_CSP_CONTEXT_VALUE = {
2193 2987 disableStyleElements: false
2194 2988 };
2195 2989 function useCSPContext() {
2196 - return React21.useContext(CSPContext) ?? DEFAULT_CSP_CONTEXT_VALUE;
2990 + return React29.useContext(CSPContext) ?? DEFAULT_CSP_CONTEXT_VALUE;
2197 2991 }
2198 2992
2993 + // node_modules/@base-ui/react/utils/getElementTransform.mjs
2994 + function getElementTransform(element, computedStyle) {
2995 + const transform = (computedStyle ?? getWindow(element).getComputedStyle(element)).transform;
2996 + let translateX = 0;
2997 + let translateY = 0;
2998 + let scale = 1;
2999 + if (transform && transform !== "none") {
3000 + const matrix = transform.match(/matrix(?:3d)?\(([^)]+)\)/);
3001 + if (matrix) {
3002 + const values = matrix[1].split(", ").map(parseFloat);
3003 + if (values.length === 6) {
3004 + translateX = values[4];
3005 + translateY = values[5];
3006 + scale = Math.sqrt(values[0] * values[0] + values[1] * values[1]);
3007 + } else if (values.length === 16) {
3008 + translateX = values[12];
3009 + translateY = values[13];
3010 + scale = values[0];
3011 + }
3012 + }
3013 + }
3014 + return {
3015 + x: translateX,
3016 + y: translateY,
3017 + scale
3018 + };
3019 + }
3020 +
3021 + // node_modules/@base-ui/react/field/index.parts.mjs
3022 + var index_parts_exports = {};
3023 + __export(index_parts_exports, {
3024 + Control: () => FieldControl,
3025 + Description: () => FieldDescription,
3026 + Error: () => FieldError,
3027 + Item: () => FieldItem,
3028 + Label: () => FieldLabel,
3029 + Root: () => FieldRoot,
3030 + Validity: () => FieldValidity
3031 + });
3032 +
3033 + // node_modules/@base-ui/react/field/root/FieldRoot.mjs
3034 + var React33 = __toESM(require_react(), 1);
3035 +
3036 + // node_modules/@base-ui/react/fieldset/root/FieldsetRootContext.mjs
3037 + var React30 = __toESM(require_react(), 1);
3038 + var FieldsetRootContext = /* @__PURE__ */ React30.createContext(void 0);
3039 + if (true) FieldsetRootContext.displayName = "FieldsetRootContext";
3040 + function useFieldsetRootContext(optional = false) {
3041 + const context = React30.useContext(FieldsetRootContext);
3042 + if (!context && !optional) {
3043 + throw new Error(true ? "Base UI: FieldsetRootContext is missing. Fieldset parts must be placed within <Fieldset.Root>." : formatErrorMessage_default(86));
3044 + }
3045 + return context;
3046 + }
3047 +
3048 + // node_modules/@base-ui/react/internals/labelable-provider/LabelableProvider.mjs
3049 + var React31 = __toESM(require_react(), 1);
3050 + var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
3051 + var LabelableProvider = function LabelableProvider2(props) {
3052 + const defaultId = useBaseUiId();
3053 + const [controlIdState, setControlIdState] = React31.useState(defaultId);
3054 + const [labelId, setLabelId] = React31.useState();
3055 + const [messageIds, setMessageIds] = React31.useState([]);
3056 + const controlId = controlIdState === void 0 ? defaultId : controlIdState;
3057 + const registrationsRef = useRefWithInit(() => /* @__PURE__ */ new Map());
3058 + const {
3059 + messageIds: parentMessageIds
3060 + } = useLabelableContext();
3061 + const registerControlId = useStableCallback((source, nextId) => {
3062 + const registrations = registrationsRef.current;
3063 + if (nextId === void 0) {
3064 + registrations.delete(source);
3065 + } else {
3066 + registrations.set(source, nextId);
3067 + }
3068 + setControlIdState((prev) => {
3069 + if (registrations.size === 0) {
3070 + return prev;
3071 + }
3072 + let nextControlId;
3073 + for (const id of registrations.values()) {
3074 + if (id === prev) {
3075 + return prev;
3076 + }
3077 + if (nextControlId === void 0) {
3078 + nextControlId = id;
3079 + }
3080 + }
3081 + return nextControlId;
3082 + });
3083 + });
3084 + const resetControlId = useStableCallback(() => {
3085 + if (registrationsRef.current.size === 0) {
3086 + setControlIdState(defaultId);
3087 + }
3088 + });
3089 + const getDescriptionProps = React31.useCallback((externalProps) => {
3090 + const ids = externalProps["aria-describedby"] ? externalProps["aria-describedby"].split(" ") : [];
3091 + ids.push(...parentMessageIds, ...messageIds);
3092 + return {
3093 + ...externalProps,
3094 + "aria-describedby": Array.from(new Set(ids)).join(" ") || void 0
3095 + };
3096 + }, [parentMessageIds, messageIds]);
3097 + const contextValue = React31.useMemo(() => ({
3098 + controlId,
3099 + registerControlId,
3100 + resetControlId,
3101 + labelId,
3102 + setLabelId,
3103 + messageIds,
3104 + setMessageIds,
3105 + getDescriptionProps
3106 + }), [controlId, registerControlId, resetControlId, labelId, setLabelId, messageIds, setMessageIds, getDescriptionProps]);
3107 + return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(LabelableContext.Provider, {
3108 + value: contextValue,
3109 + children: props.children
3110 + });
3111 + };
3112 + if (true) LabelableProvider.displayName = "LabelableProvider";
3113 +
3114 + // node_modules/@base-ui/react/internals/field-register-control/useFieldControlRegistration.mjs
3115 + var React32 = __toESM(require_react(), 1);
3116 + function useFieldControlRegistration(params) {
3117 + const {
3118 + change,
3119 + commit,
3120 + invalid: invalid2,
3121 + markedDirtyRef,
3122 + name: name16,
3123 + setRegisteredFieldName,
3124 + registeredFieldIdRef,
3125 + setValidityData,
3126 + validityData
3127 + } = params;
3128 + const {
3129 + formRef
3130 + } = useFormContext();
3131 + const activeFieldControlSourceRef = React32.useRef(null);
3132 + const registrationRef = React32.useRef(null);
3133 + const initialValueCapturedRef = React32.useRef(false);
3134 + const getValueForForm = useStableCallback(() => {
3135 + const registration = registrationRef.current;
3136 + if (!registration) {
3137 + return void 0;
3138 + }
3139 + if (registration.getValue) {
3140 + return registration.getValue();
3141 + }
3142 + return registration.value;
3143 + });
3144 + function getRegistrationValue(registration) {
3145 + return registration.value === void 0 ? getValueForForm() : registration.value;
3146 + }
3147 + const validate = useStableCallback(() => {
3148 + const registration = registrationRef.current;
3149 + markedDirtyRef.current = true;
3150 + if (!registration) {
3151 + commit(validityData.value);
3152 + return;
3153 + }
3154 + commit(getRegistrationValue(registration));
3155 + });
3156 + function refreshRegistration() {
3157 + const registration = registrationRef.current;
3158 + if (!registration || !registration.id) {
3159 + return;
3160 + }
3161 + formRef.current.fields.set(registration.id, {
3162 + getValue: getValueForForm,
3163 + name: name16 ?? registration.name,
3164 + controlRef: registration.controlRef,
3165 + validityData: getCombinedFieldValidityData(validityData, invalid2),
3166 + validate
3167 + });
3168 + }
3169 + function deleteRegistration(id = registrationRef.current?.id) {
3170 + if (id) {
3171 + formRef.current.fields.delete(id);
3172 + }
3173 + }
3174 + function captureInitialValue(registration) {
3175 + if (initialValueCapturedRef.current) {
3176 + return;
3177 + }
3178 + initialValueCapturedRef.current = true;
3179 + const initialValue = getRegistrationValue(registration);
3180 + setValidityData((prev) => prev.initialValue === initialValue ? prev : {
3181 + ...prev,
3182 + initialValue
3183 + });
3184 + }
3185 + useIsoLayoutEffect(() => {
3186 + const registration = registrationRef.current;
3187 + if (!registration || !registration.id) {
3188 + return;
3189 + }
3190 + setRegisteredFieldName(name16 ? void 0 : registration.name);
3191 + formRef.current.fields.set(registration.id, {
3192 + getValue: getValueForForm,
3193 + name: name16 ?? registration.name,
3194 + controlRef: registration.controlRef,
3195 + validityData: getCombinedFieldValidityData(validityData, invalid2),
3196 + validate
3197 + });
3198 + }, [formRef, getValueForForm, invalid2, name16, setRegisteredFieldName, validate, validityData]);
3199 + useIsoLayoutEffect(() => {
3200 + const fields = formRef.current.fields;
3201 + return () => {
3202 + const id = registrationRef.current?.id;
3203 + if (id) {
3204 + fields.delete(id);
3205 + }
3206 + };
3207 + }, [formRef]);
3208 + const register = useStableCallback((source, registration) => {
3209 + if (!registration) {
3210 + if (activeFieldControlSourceRef.current === source) {
3211 + activeFieldControlSourceRef.current = null;
3212 + change(void 0, true);
3213 + deleteRegistration();
3214 + registrationRef.current = null;
3215 + setRegisteredFieldName(void 0);
3216 + registeredFieldIdRef.current = void 0;
3217 + }
3218 + return;
3219 + }
3220 + const previousId = registrationRef.current?.id;
3221 + const previousSource = activeFieldControlSourceRef.current;
3222 + if (previousSource && previousSource !== source) {
3223 + change(void 0, true);
3224 + }
3225 + activeFieldControlSourceRef.current = source;
3226 + registrationRef.current = registration;
3227 + if (!name16) {
3228 + setRegisteredFieldName(registration.name);
3229 + }
3230 + registeredFieldIdRef.current = registration.id;
3231 + if (previousId && previousId !== registration.id) {
3232 + deleteRegistration(previousId);
3233 + }
3234 + captureInitialValue(registration);
3235 + refreshRegistration();
3236 + });
3237 + return [validate, register];
3238 + }
3239 +
3240 + // node_modules/@base-ui/react/field/root/FieldRoot.mjs
3241 + var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
3242 + var FieldRootInner = /* @__PURE__ */ React33.forwardRef(function FieldRootInner2(componentProps, forwardedRef) {
3243 + const {
3244 + errors,
3245 + validationMode: formValidationMode,
3246 + submitCountRef
3247 + } = useFormContext();
3248 + const {
3249 + render,
3250 + className,
3251 + validate: validateProp,
3252 + validationDebounceTime = 0,
3253 + validationMode = formValidationMode,
3254 + name: name16,
3255 + disabled: disabledProp = false,
3256 + invalid: invalidProp,
3257 + dirty: dirtyProp,
3258 + touched: touchedProp,
3259 + actionsRef,
3260 + style,
3261 + ...elementProps
3262 + } = componentProps;
3263 + const disabledFieldset = useFieldsetRootContext(true)?.disabled;
3264 + const validate = useStableCallback(validateProp || (() => null));
3265 + const disabled2 = disabledFieldset || disabledProp;
3266 + const [touchedState, setTouchedUnwrapped] = React33.useState(false);
3267 + const [dirtyState, setDirtyUnwrapped] = React33.useState(false);
3268 + const [filled, setFilled] = React33.useState(false);
3269 + const [focused, setFocused] = React33.useState(false);
3270 + const dirty = dirtyProp ?? dirtyState;
3271 + const touched = touchedProp ?? touchedState;
3272 + const markedDirtyRef = React33.useRef(dirty);
3273 + const registeredFieldIdRef = React33.useRef(void 0);
3274 + const [registeredFieldName, setRegisteredFieldName] = React33.useState();
3275 + const effectiveName = name16 ?? registeredFieldName;
3276 + useIsoLayoutEffect(() => {
3277 + if (dirtyProp !== void 0) {
3278 + markedDirtyRef.current = dirtyProp;
3279 + }
3280 + }, [dirtyProp]);
3281 + const setDirty = useStableCallback((value) => {
3282 + if (dirtyProp !== void 0) {
3283 + return;
3284 + }
3285 + if (value) {
3286 + markedDirtyRef.current = true;
3287 + }
3288 + setDirtyUnwrapped(value);
3289 + });
3290 + const setTouched = useStableCallback((value) => {
3291 + if (touchedProp !== void 0) {
3292 + return;
3293 + }
3294 + setTouchedUnwrapped(value);
3295 + });
3296 + const shouldValidateOnChange = useStableCallback(() => validationMode === "onChange" || validationMode === "onSubmit" && submitCountRef.current > 0);
3297 + const formError = effectiveName && Object.hasOwn(errors, effectiveName) ? errors[effectiveName] : null;
3298 + const hasFormError = !!(Array.isArray(formError) ? formError.length : formError);
3299 + const invalid2 = invalidProp === true || hasFormError;
3300 + const [validityData, setValidityData] = React33.useState({
3301 + state: DEFAULT_VALIDITY_STATE,
3302 + error: "",
3303 + errors: [],
3304 + value: null,
3305 + initialValue: null
3306 + });
3307 + const valid2 = !invalid2 && (disabled2 ? null : validityData.state.valid);
3308 + const state = React33.useMemo(() => ({
3309 + disabled: disabled2,
3310 + touched,
3311 + dirty,
3312 + valid: valid2,
3313 + filled,
3314 + focused
3315 + }), [disabled2, touched, dirty, valid2, filled, focused]);
3316 + const validation = useFieldValidation({
3317 + setValidityData,
3318 + validate,
3319 + validityData,
3320 + validationDebounceTime,
3321 + invalid: invalid2,
3322 + markedDirtyRef,
3323 + state,
3324 + shouldValidateOnChange,
3325 + validationMode,
3326 + registeredFieldIdRef
3327 + });
3328 + const [validateFieldControl, registerFieldControl] = useFieldControlRegistration({
3329 + change: validation.change,
3330 + commit: validation.commit,
3331 + invalid: invalid2,
3332 + markedDirtyRef,
3333 + name: name16,
3334 + setRegisteredFieldName,
3335 + registeredFieldIdRef,
3336 + setValidityData,
3337 + validityData
3338 + });
3339 + React33.useImperativeHandle(actionsRef, () => ({
3340 + validate: validateFieldControl
3341 + }), [validateFieldControl]);
3342 + const contextValue = React33.useMemo(() => ({
3343 + invalid: invalid2,
3344 + name: effectiveName,
3345 + validityData,
3346 + setValidityData,
3347 + disabled: disabled2,
3348 + setTouched,
3349 + setDirty,
3350 + setFilled,
3351 + setFocused,
3352 + validationMode,
3353 + shouldValidateOnChange,
3354 + state,
3355 + registerFieldControl,
3356 + validation
3357 + }), [invalid2, effectiveName, validityData, disabled2, setTouched, setDirty, setFilled, setFocused, validationMode, shouldValidateOnChange, state, registerFieldControl, validation]);
3358 + const element = useRenderElement("div", componentProps, {
3359 + ref: forwardedRef,
3360 + state,
3361 + props: elementProps,
3362 + stateAttributesMapping: fieldValidityMapping
3363 + });
3364 + return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FieldRootContext.Provider, {
3365 + value: contextValue,
3366 + children: element
3367 + });
3368 + });
3369 + if (true) FieldRootInner.displayName = "FieldRootInner";
3370 + var FieldRoot = /* @__PURE__ */ React33.forwardRef(function FieldRoot2(componentProps, forwardedRef) {
3371 + return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(LabelableProvider, {
3372 + children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FieldRootInner, {
3373 + ...componentProps,
3374 + ref: forwardedRef
3375 + })
3376 + });
3377 + });
3378 + if (true) FieldRoot.displayName = "FieldRoot";
3379 +
3380 + // node_modules/@base-ui/react/field/label/FieldLabel.mjs
3381 + var React34 = __toESM(require_react(), 1);
3382 + var FieldLabel = /* @__PURE__ */ React34.forwardRef(function FieldLabel2(componentProps, forwardedRef) {
3383 + const {
3384 + render,
3385 + className,
3386 + style,
3387 + id: idProp,
3388 + nativeLabel = true,
3389 + ...elementProps
3390 + } = componentProps;
3391 + const fieldRootContext = useFieldRootContext(false);
3392 + const fieldItemContext = useFieldItemContext();
3393 + const {
3394 + labelId
3395 + } = useLabelableContext();
3396 + const state = {
3397 + ...fieldRootContext.state,
3398 + disabled: fieldRootContext.disabled || fieldItemContext.disabled
3399 + };
3400 + const labelRef = React34.useRef(null);
3401 + const labelProps = useLabel({
3402 + id: labelId ?? idProp,
3403 + native: nativeLabel
3404 + });
3405 + if (true) {
3406 + React34.useEffect(() => {
3407 + if (!labelRef.current) {
3408 + return;
3409 + }
3410 + const isLabelTag = labelRef.current.tagName === "LABEL";
3411 + if (nativeLabel) {
3412 + if (!isLabelTag) {
3413 + const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
3414 + const message = "<Field.Label> expected a <label> element because the `nativeLabel` prop is true. Rendering a non-<label> disables native label association, so `htmlFor` will not work. Use a real <label> in the `render` prop, or set `nativeLabel` to `false`.";
3415 + error(`${message}${ownerStackMessage}`);
3416 + }
3417 + } else if (isLabelTag) {
3418 + const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
3419 + const message = "<Field.Label> expected a non-<label> element because the `nativeLabel` prop is false. Rendering a <label> assumes native label behavior while Base UI treats it as non-native, which can cause unexpected pointer behavior. Use a non-<label> in the `render` prop, or set `nativeLabel` to `true`.";
3420 + error(`${message}${ownerStackMessage}`);
3421 + }
3422 + }, [nativeLabel]);
3423 + }
3424 + const element = useRenderElement("label", componentProps, {
3425 + ref: [forwardedRef, labelRef],
3426 + state,
3427 + props: [labelProps, elementProps],
3428 + stateAttributesMapping: fieldValidityMapping
3429 + });
3430 + return element;
3431 + });
3432 + if (true) FieldLabel.displayName = "FieldLabel";
3433 +
3434 + // node_modules/@base-ui/react/field/error/FieldError.mjs
3435 + var React35 = __toESM(require_react(), 1);
3436 + var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
3437 + var stateAttributesMapping = {
3438 + ...fieldValidityMapping,
3439 + ...transitionStatusMapping
3440 + };
3441 + var FieldError = /* @__PURE__ */ React35.forwardRef(function FieldError2(componentProps, forwardedRef) {
3442 + const {
3443 + render,
3444 + id: idProp,
3445 + className,
3446 + match,
3447 + style,
3448 + ...elementProps
3449 + } = componentProps;
3450 + const id = useBaseUiId(idProp);
3451 + const {
3452 + validityData,
3453 + state: fieldState,
3454 + name: name16
3455 + } = useFieldRootContext(false);
3456 + const {
3457 + setMessageIds
3458 + } = useLabelableContext();
3459 + const {
3460 + errors
3461 + } = useFormContext();
3462 + const formError = name16 && Object.hasOwn(errors, name16) ? errors[name16] : null;
3463 + const hasFormError = !!(Array.isArray(formError) ? formError.length : formError);
3464 + const hasSpecificMatch = typeof match === "string";
3465 + let rendered = false;
3466 + if (match === true) {
3467 + rendered = true;
3468 + } else if (fieldState.disabled) {
3469 + rendered = false;
3470 + } else if (hasSpecificMatch) {
3471 + rendered = Boolean(validityData.state[match]);
3472 + } else {
3473 + rendered = hasFormError || validityData.state.valid === false;
3474 + }
3475 + const {
3476 + mounted,
3477 + transitionStatus,
3478 + setMounted
3479 + } = useTransitionStatus(rendered);
3480 + useIsoLayoutEffect(() => {
3481 + if (!rendered || !id) {
3482 + return void 0;
3483 + }
3484 + setMessageIds((v) => v.concat(id));
3485 + return () => {
3486 + setMessageIds((v) => v.filter((item) => item !== id));
3487 + };
3488 + }, [rendered, id, setMessageIds]);
3489 + const errorRef = React35.useRef(null);
3490 + const [lastRenderedMessage, setLastRenderedMessage] = React35.useState(null);
3491 + const [lastRenderedMessageKey, setLastRenderedMessageKey] = React35.useState(null);
3492 + let error2 = validityData.error;
3493 + if (!hasSpecificMatch && hasFormError) {
3494 + error2 = formError;
3495 + } else if (validityData.errors.length > 1) {
3496 + error2 = validityData.errors;
3497 + }
3498 + let errorMessage = error2;
3499 + if (Array.isArray(error2)) {
3500 + errorMessage = error2.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("ul", {
3501 + children: error2.map((message) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("li", {
3502 + children: message
3503 + }, message))
3504 + }) : error2[0];
3505 + }
3506 + const errorKey = Array.isArray(error2) ? JSON.stringify(error2) : error2;
3507 + if (rendered && errorKey !== lastRenderedMessageKey) {
3508 + setLastRenderedMessageKey(errorKey);
3509 + setLastRenderedMessage(errorMessage);
3510 + }
3511 + useOpenChangeComplete({
3512 + open: rendered,
3513 + ref: errorRef,
3514 + onComplete() {
3515 + if (!rendered) {
3516 + setMounted(false);
3517 + }
3518 + }
3519 + });
3520 + const state = {
3521 + ...fieldState,
3522 + transitionStatus
3523 + };
3524 + const element = useRenderElement("div", componentProps, {
3525 + ref: [forwardedRef, errorRef],
3526 + state,
3527 + props: [{
3528 + id,
3529 + children: rendered ? errorMessage : lastRenderedMessage
3530 + }, elementProps],
3531 + stateAttributesMapping,
3532 + enabled: mounted
3533 + });
3534 + if (!mounted) {
3535 + return null;
3536 + }
3537 + return element;
3538 + });
3539 + if (true) FieldError.displayName = "FieldError";
3540 +
3541 + // node_modules/@base-ui/react/field/description/FieldDescription.mjs
3542 + var React36 = __toESM(require_react(), 1);
3543 + var FieldDescription = /* @__PURE__ */ React36.forwardRef(function FieldDescription2(componentProps, forwardedRef) {
3544 + const {
3545 + render,
3546 + id: idProp,
3547 + className,
3548 + style,
3549 + ...elementProps
3550 + } = componentProps;
3551 + const id = useBaseUiId(idProp);
3552 + const fieldRootContext = useFieldRootContext(false);
3553 + const fieldItemContext = useFieldItemContext();
3554 + const {
3555 + setMessageIds
3556 + } = useLabelableContext();
3557 + const state = {
3558 + ...fieldRootContext.state,
3559 + disabled: fieldRootContext.disabled || fieldItemContext.disabled
3560 + };
3561 + useIsoLayoutEffect(() => {
3562 + if (!id) {
3563 + return void 0;
3564 + }
3565 + setMessageIds((v) => v.concat(id));
3566 + return () => {
3567 + setMessageIds((v) => v.filter((item) => item !== id));
3568 + };
3569 + }, [id, setMessageIds]);
3570 + const element = useRenderElement("p", componentProps, {
3571 + ref: forwardedRef,
3572 + state,
3573 + props: [{
3574 + id
3575 + }, elementProps],
3576 + stateAttributesMapping: fieldValidityMapping
3577 + });
3578 + return element;
3579 + });
3580 + if (true) FieldDescription.displayName = "FieldDescription";
3581 +
3582 + // node_modules/@base-ui/react/field/control/FieldControl.mjs
3583 + var React37 = __toESM(require_react(), 1);
3584 + var FieldControl = /* @__PURE__ */ React37.forwardRef(function FieldControl2(componentProps, forwardedRef) {
3585 + const {
3586 + render,
3587 + className,
3588 + id: idProp,
3589 + name: nameProp,
3590 + value: valueProp,
3591 + disabled: disabledProp = false,
3592 + onValueChange,
3593 + defaultValue,
3594 + autoFocus = false,
3595 + style,
3596 + ...elementProps
3597 + } = componentProps;
3598 + const {
3599 + state: fieldState,
3600 + name: fieldName,
3601 + disabled: fieldDisabled,
3602 + setTouched,
3603 + setDirty,
3604 + validityData,
3605 + setFocused,
3606 + setFilled,
3607 + validationMode,
3608 + validation
3609 + } = useFieldRootContext();
3610 + const {
3611 + clearErrors,
3612 + elementRef: formElementRef,
3613 + submitCountRef
3614 + } = useFormContext();
3615 + const disabled2 = fieldDisabled || disabledProp;
3616 + const name16 = fieldName ?? nameProp;
3617 + const state = {
3618 + ...fieldState,
3619 + disabled: disabled2
3620 + };
3621 + const {
3622 + labelId
3623 + } = useLabelableContext();
3624 + const id = useLabelableId({
3625 + id: idProp
3626 + });
3627 + const [valueUnwrapped] = useControlled({
3628 + controlled: valueProp,
3629 + default: defaultValue,
3630 + name: "FieldControl",
3631 + state: "value"
3632 + });
3633 + const isControlled = valueProp !== void 0;
3634 + const value = isControlled ? valueUnwrapped : void 0;
3635 + const serializedValue = value == null ? void 0 : String(value);
3636 + const getValueFromInput = useStableCallback(() => validation.inputRef.current?.value);
3637 + useRegisterFieldControl(validation.inputRef, id, serializedValue, getValueFromInput, !disabled2, nameProp);
3638 + useIsoLayoutEffect(() => {
3639 + const currentValue = serializedValue ?? validation.inputRef.current?.value;
3640 + if (currentValue !== void 0) {
3641 + setFilled(currentValue !== "");
3642 + }
3643 + }, [serializedValue, validation.inputRef, setFilled]);
3644 + useValueChanged(serializedValue, () => {
3645 + if (serializedValue === void 0) {
3646 + return;
3647 + }
3648 + clearErrors(name16);
3649 + setDirty(serializedValue !== (validityData.initialValue ?? ""));
3650 + validation.change(serializedValue);
3651 + });
3652 + const inputRef = React37.useRef(null);
3653 + const enterValidationTimeout = useTimeout();
3654 + useIsoLayoutEffect(() => {
3655 + if (autoFocus && inputRef.current === activeElement(ownerDocument(inputRef.current))) {
3656 + setFocused(true);
3657 + }
3658 + }, [autoFocus, setFocused]);
3659 + const element = useRenderElement("input", componentProps, {
3660 + ref: [forwardedRef, inputRef],
3661 + state,
3662 + props: [{
3663 + id,
3664 + disabled: disabled2,
3665 + name: name16,
3666 + ref: validation.inputRef,
3667 + "aria-labelledby": labelId,
3668 + autoFocus,
3669 + ...isControlled ? {
3670 + value
3671 + } : {
3672 + defaultValue
3673 + },
3674 + onChange(event) {
3675 + const inputValue = event.currentTarget.value;
3676 + const details = createChangeEventDetails(reason_parts_exports.none, event.nativeEvent);
3677 + onValueChange?.(inputValue, details);
3678 + if (isControlled) {
3679 + return;
3680 + }
3681 + setDirty(inputValue !== (validityData.initialValue ?? ""));
3682 + setFilled(inputValue !== "");
3683 + if (!event.nativeEvent.defaultPrevented && !details.isCanceled) {
3684 + clearErrors(name16);
3685 + validation.change(inputValue);
3686 + }
3687 + },
3688 + onFocus() {
3689 + setFocused(true);
3690 + },
3691 + onBlur(event) {
3692 + setTouched(true);
3693 + setFocused(false);
3694 + if (validationMode === "onBlur") {
3695 + const inputValue = event.currentTarget.value;
3696 + validation.commit(inputValue);
3697 + if (isControlled) {
3698 + queueMicrotask(() => {
3699 + const nextValue = validation.inputRef.current?.value;
3700 + if (nextValue !== void 0 && nextValue !== inputValue && nextValue !== (validityData.initialValue ?? "")) {
3701 + validation.commit(nextValue);
3702 + }
3703 + });
3704 + }
3705 + }
3706 + },
3707 + onKeyDown(event) {
3708 + if (event.currentTarget.tagName === "INPUT" && event.key === "Enter") {
3709 + setTouched(true);
3710 + const value2 = event.currentTarget.value;
3711 + const form = event.currentTarget.form;
3712 + if (form && form === formElementRef.current && !event.defaultPrevented) {
3713 + const input = event.currentTarget;
3714 + const submitCount = submitCountRef.current;
3715 + enterValidationTimeout.start(0, () => {
3716 + if (submitCountRef.current === submitCount) {
3717 + validation.commit(input.value);
3718 + }
3719 + });
3720 + } else {
3721 + validation.commit(value2);
3722 + }
3723 + }
3724 + }
3725 + }, elementProps, (props) => validation.getValidationProps(disabled2, props)],
3726 + stateAttributesMapping: fieldValidityMapping
3727 + });
3728 + return element;
3729 + });
3730 + if (true) FieldControl.displayName = "FieldControl";
3731 +
3732 + // node_modules/@base-ui/react/field/validity/FieldValidity.mjs
3733 + var React38 = __toESM(require_react(), 1);
3734 + var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
3735 + var FieldValidity = function FieldValidity2(props) {
3736 + const {
3737 + children
3738 + } = props;
3739 + const {
3740 + validityData,
3741 + invalid: invalid2
3742 + } = useFieldRootContext(false);
3743 + const combinedFieldValidityData = React38.useMemo(() => getCombinedFieldValidityData(validityData, invalid2), [validityData, invalid2]);
3744 + const isInvalid = combinedFieldValidityData.state.valid === false;
3745 + const {
3746 + transitionStatus
3747 + } = useTransitionStatus(isInvalid);
3748 + const fieldValidityState = React38.useMemo(() => {
3749 + return {
3750 + ...combinedFieldValidityData,
3751 + validity: combinedFieldValidityData.state,
3752 + transitionStatus
3753 + };
3754 + }, [combinedFieldValidityData, transitionStatus]);
3755 + return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(React38.Fragment, {
3756 + children: children(fieldValidityState)
3757 + });
3758 + };
3759 + if (true) FieldValidity.displayName = "FieldValidity";
3760 +
3761 + // node_modules/@base-ui/react/field/item/FieldItem.mjs
3762 + var React39 = __toESM(require_react(), 1);
3763 + var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
3764 + var FieldItem = /* @__PURE__ */ React39.forwardRef(function FieldItem2(componentProps, forwardedRef) {
3765 + const {
3766 + render,
3767 + className,
3768 + style,
3769 + disabled: disabledProp = false,
3770 + ...elementProps
3771 + } = componentProps;
3772 + const {
3773 + state: fieldState,
3774 + disabled: rootDisabled
3775 + } = useFieldRootContext(false);
3776 + const disabled2 = rootDisabled || disabledProp;
3777 + const state = {
3778 + ...fieldState,
3779 + disabled: disabled2
3780 + };
3781 + const fieldItemContext = React39.useMemo(() => ({
3782 + disabled: disabled2
3783 + }), [disabled2]);
3784 + const element = useRenderElement("div", componentProps, {
3785 + ref: forwardedRef,
3786 + state,
3787 + props: elementProps,
3788 + stateAttributesMapping: fieldValidityMapping
3789 + });
3790 + return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(LabelableProvider, {
3791 + children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FieldItemContext.Provider, {
3792 + value: fieldItemContext,
3793 + children: element
3794 + })
3795 + });
3796 + });
3797 + if (true) FieldItem.displayName = "FieldItem";
3798 +
3799 + // node_modules/@base-ui/react/input/Input.mjs
3800 + var React40 = __toESM(require_react(), 1);
3801 + var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
3802 + var Input = /* @__PURE__ */ React40.forwardRef(function Input2(props, forwardedRef) {
3803 + return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(index_parts_exports.Control, {
3804 + ref: forwardedRef,
3805 + ...props
3806 + });
3807 + });
3808 + if (true) Input.displayName = "Input";
3809 +
2199 3810 // node_modules/@base-ui/react/internals/composite/root/CompositeRoot.mjs
2200 - var React23 = __toESM(require_react(), 1);
3811 + var React42 = __toESM(require_react(), 1);
2201 3812
2202 3813 // node_modules/@base-ui/react/internals/composite/root/useCompositeRoot.mjs
2203 - var React22 = __toESM(require_react(), 1);
3814 + var React41 = __toESM(require_react(), 1);
2204 3815
2205 3816 // node_modules/@base-ui/react/internals/composite/constants.mjs
2206 3817 var ACTIVE_COMPOSITE_ITEM = "data-composite-item-active";
2207 3818
2208 3819 // node_modules/@base-ui/react/internals/composite/root/useCompositeRoot.mjs
2209 - var EMPTY_ARRAY2 = [];
2210 3820 function useCompositeRoot(params) {
2211 3821 const {
2212 3822 loopFocus = true,
2213 3823 orientation = "both",
@@ -2217,34 +3827,51 @@
2217 3827 highlightedIndex: externalHighlightedIndex,
2218 3828 onHighlightedIndexChange: externalSetHighlightedIndex,
2219 3829 rootRef: externalRef,
2220 3830 enableHomeAndEndKeys = false,
2221 - stopEventPropagation = false,
3831 + stopEventPropagation,
2222 3832 disabledIndices,
2223 - modifierKeys = EMPTY_ARRAY2
3833 + modifierKeys = EMPTY_ARRAY
2224 3834 } = params;
2225 - const [internalHighlightedIndex, internalSetHighlightedIndex] = React22.useState(0);
3835 + const [internalHighlightedIndex, internalSetHighlightedIndex] = React41.useState(0);
2226 3836 const isGrid = grid != null;
2227 - const rootRef = React22.useRef(null);
3837 + const rootRef = React41.useRef(null);
2228 3838 const mergedRef = useMergedRefs(rootRef, externalRef);
2229 - const elementsRef = React22.useRef([]);
2230 - const hasSetDefaultIndexRef = React22.useRef(false);
3839 + const elementsRef = React41.useRef([]);
3840 + const hasSetDefaultIndexRef = React41.useRef(false);
3841 + const highlightedElementRef = React41.useRef(null);
2231 3842 const highlightedIndex = externalHighlightedIndex ?? internalHighlightedIndex;
2232 - const onHighlightedIndexChange = useStableCallback((index, shouldScrollIntoView = false) => {
2233 - (externalSetHighlightedIndex ?? internalSetHighlightedIndex)(index);
3843 + const onHighlightedIndexChange = useStableCallback((index2, shouldScrollIntoView = false) => {
3844 + highlightedElementRef.current = elementsRef.current[index2] ?? null;
3845 + (externalSetHighlightedIndex ?? internalSetHighlightedIndex)(index2);
2234 3846 if (shouldScrollIntoView) {
2235 - const newActiveItem = elementsRef.current[index];
3847 + const newActiveItem = elementsRef.current[index2];
2236 3848 scrollIntoViewIfNeeded(rootRef.current, newActiveItem, direction, orientation);
2237 3849 }
2238 3850 });
2239 3851 const onMapChange = useStableCallback((map) => {
2240 - if (map.size === 0 || hasSetDefaultIndexRef.current) {
3852 + if (map.size === 0) {
2241 3853 return;
2242 3854 }
3855 + if (hasSetDefaultIndexRef.current) {
3856 + const elements = elementsRef.current;
3857 + const nextIndex = elements.indexOf(highlightedElementRef.current);
3858 + if (nextIndex === -1) {
3859 + const replacement = elements[highlightedIndex];
3860 + if (!replacement || isListIndexDisabled(elements, highlightedIndex, disabledIndices)) {
3861 + onHighlightedIndexChange(getFallbackIndex(elements, disabledIndices));
3862 + } else {
3863 + highlightedElementRef.current = replacement;
3864 + }
3865 + } else if (nextIndex !== highlightedIndex) {
3866 + onHighlightedIndexChange(nextIndex);
3867 + }
3868 + return;
3869 + }
2243 3870 hasSetDefaultIndexRef.current = true;
2244 3871 const sortedElements = Array.from(map.keys());
2245 3872 const activeItem = sortedElements.find((compositeElement) => compositeElement?.hasAttribute(ACTIVE_COMPOSITE_ITEM)) ?? null;
2246 - const activeIndex = activeItem ? sortedElements.indexOf(activeItem) : -1;
3873 + const activeIndex = activeItem ? map.get(activeItem)?.index ?? -1 : -1;
2247 3874 if (activeIndex !== -1) {
2248 3875 onHighlightedIndexChange(activeIndex);
2249 3876 } else if (isListIndexDisabled(sortedElements, highlightedIndex, disabledIndices)) {
2250 3877 const firstEnabledIndex = findNonDisabledListIndex(sortedElements, {
@@ -2276,10 +3903,10 @@
2276 3903 }
2277 3904 return onLoop(event, prevIndex, nextIndex, elementsRef);
2278 3905 });
2279 3906 const onKeyDown = useStableCallback((event) => {
2280 - const RELEVANT_KEYS = enableHomeAndEndKeys ? COMPOSITE_KEYS : ARROW_KEYS;
2281 - if (!RELEVANT_KEYS.has(event.key)) {
3907 + const isHomeOrEnd = event.key === HOME || event.key === END;
3908 + if (!COMPOSITE_KEYS.has(event.key) || !enableHomeAndEndKeys && isHomeOrEnd) {
2282 3909 return;
2283 3910 }
2284 3911 if (isModifierKeySet(event, modifierKeys)) {
2285 3912 return;
@@ -2289,24 +3916,16 @@
2289 3916 return;
2290 3917 }
2291 3918 const isRtl = direction === "rtl";
2292 3919 const horizontalForwardKey = isRtl ? ARROW_LEFT : ARROW_RIGHT;
2293 - const forwardKey = {
2294 - horizontal: horizontalForwardKey,
2295 - vertical: ARROW_DOWN,
2296 - both: horizontalForwardKey
2297 - }[orientation];
2298 3920 const horizontalBackwardKey = isRtl ? ARROW_RIGHT : ARROW_LEFT;
2299 - const backwardKey = {
2300 - horizontal: horizontalBackwardKey,
2301 - vertical: ARROW_UP,
2302 - both: horizontalBackwardKey
2303 - }[orientation];
3921 + const forwardKey = orientation === "vertical" ? ARROW_DOWN : horizontalForwardKey;
3922 + const backwardKey = orientation === "vertical" ? ARROW_UP : horizontalBackwardKey;
2304 3923 const target = getTarget(event.nativeEvent);
2305 3924 if (target != null && isNativeInput(target) && !isElementDisabled(target)) {
2306 3925 const selectionStart = target.selectionStart;
2307 3926 const selectionEnd = target.selectionEnd;
2308 - const textContent = target.value ?? "";
3927 + const textContent = target.value;
2309 3928 if (selectionStart == null || event.shiftKey || selectionStart !== selectionEnd) {
2310 3929 return;
2311 3930 }
2312 3931 if (event.key !== backwardKey && selectionStart < textContent.length) {
@@ -2332,23 +3951,10 @@
2332 3951 orientation,
2333 3952 rtl: isRtl
2334 3953 });
2335 3954 }
2336 - const forwardKeys = {
2337 - horizontal: [horizontalForwardKey],
2338 - vertical: [ARROW_DOWN],
2339 - both: [horizontalForwardKey, ARROW_DOWN]
2340 - }[orientation];
2341 - const backwardKeys = {
2342 - horizontal: [horizontalBackwardKey],
2343 - vertical: [ARROW_UP],
2344 - both: [horizontalBackwardKey, ARROW_UP]
2345 - }[orientation];
2346 - const preventedKeys = isGrid ? RELEVANT_KEYS : {
2347 - horizontal: enableHomeAndEndKeys ? HORIZONTAL_KEYS_WITH_EXTRA_KEYS : HORIZONTAL_KEYS,
2348 - vertical: enableHomeAndEndKeys ? VERTICAL_KEYS_WITH_EXTRA_KEYS : VERTICAL_KEYS,
2349 - both: RELEVANT_KEYS
2350 - }[orientation];
3955 + const isForwardKey = orientation !== "vertical" && event.key === horizontalForwardKey || orientation !== "horizontal" && event.key === ARROW_DOWN;
3956 + const isBackwardKey = orientation !== "vertical" && event.key === horizontalBackwardKey || orientation !== "horizontal" && event.key === ARROW_UP;
2351 3957 if (enableHomeAndEndKeys) {
2352 3958 if (event.key === HOME) {
2353 3959 nextIndex = minIndex;
2354 3960 } else if (event.key === END) {
@@ -2354,15 +3960,15 @@
2354 3960 } else if (event.key === END) {
2355 3961 nextIndex = maxIndex;
2356 3962 }
2357 3963 }
2358 - if (nextIndex === highlightedIndex && (forwardKeys.includes(event.key) || backwardKeys.includes(event.key))) {
2359 - if (loopFocus && nextIndex === maxIndex && forwardKeys.includes(event.key)) {
3964 + if (nextIndex === highlightedIndex && (isForwardKey || isBackwardKey)) {
3965 + if (loopFocus && nextIndex === maxIndex && isForwardKey) {
2360 3966 nextIndex = minIndex;
2361 3967 if (onLoop) {
2362 3968 nextIndex = onLoop(event, highlightedIndex, nextIndex, elementsRef);
2363 3969 }
2364 - } else if (loopFocus && nextIndex === minIndex && backwardKeys.includes(event.key)) {
3970 + } else if (loopFocus && nextIndex === minIndex && isBackwardKey) {
2365 3971 nextIndex = maxIndex;
2366 3972 if (onLoop) {
2367 3973 nextIndex = onLoop(event, highlightedIndex, nextIndex, elementsRef);
2368 3974 }
@@ -2368,9 +3974,9 @@
2368 3974 }
2369 3975 } else {
2370 3976 nextIndex = findNonDisabledListIndex(elementsRef.current, {
2371 3977 startingIndex: nextIndex,
2372 - decrement: backwardKeys.includes(event.key),
3978 + decrement: isBackwardKey,
2373 3979 disabledIndices
2374 3980 });
2375 3981 }
2376 3982 }
@@ -2377,9 +3983,9 @@
2377 3983 if (nextIndex !== highlightedIndex && !isIndexOutOfListBounds(elementsRef.current, nextIndex)) {
2378 3984 if (stopEventPropagation) {
2379 3985 event.stopPropagation();
2380 3986 }
2381 - if (preventedKeys.has(event.key)) {
3987 + if (isGrid || isHomeOrEnd || isForwardKey || isBackwardKey) {
2382 3988 event.preventDefault();
2383 3989 }
2384 3990 onHighlightedIndexChange(nextIndex, true);
2385 3991 queueMicrotask(() => {
@@ -2394,9 +4000,9 @@
2394 4000 const target = getTarget(event.nativeEvent);
2395 4001 if (!element || target == null || !isNativeInput(target)) {
2396 4002 return;
2397 4003 }
2398 - target.setSelectionRange(0, target.value.length ?? 0);
4004 + target.setSelectionRange(0, target.value.length);
2399 4005 },
2400 4006 onKeyDown
2401 4007 };
2402 4008 return {
@@ -2403,15 +4009,30 @@
2403 4009 props,
2404 4010 highlightedIndex,
2405 4011 onHighlightedIndexChange,
2406 4012 elementsRef,
2407 - disabledIndices,
2408 4013 onMapChange,
2409 4014 relayKeyboardEvent: onKeyDown
2410 4015 };
2411 4016 }
4017 + function getFallbackIndex(elements, disabledIndices) {
4018 + let fallbackIndex = -1;
4019 + for (let index2 = 0; index2 < elements.length; index2 += 1) {
4020 + const element = elements[index2];
4021 + if (!element || isListIndexDisabled(elements, index2, disabledIndices)) {
4022 + continue;
4023 + }
4024 + if (element.hasAttribute(ACTIVE_COMPOSITE_ITEM)) {
4025 + return index2;
4026 + }
4027 + if (fallbackIndex === -1) {
4028 + fallbackIndex = index2;
4029 + }
4030 + }
4031 + return Math.max(fallbackIndex, 0);
4032 + }
2412 4033 function isModifierKeySet(event, ignoredModifierKeys) {
2413 - for (const key of MODIFIER_KEYS.values()) {
4034 + for (const key of MODIFIER_KEYS) {
2414 4035 if (ignoredModifierKeys.includes(key)) {
2415 4036 continue;
2416 4037 }
2417 4038 if (event.getModifierState(key)) {
@@ -2421,9 +4042,9 @@
2421 4042 return false;
2422 4043 }
2423 4044
2424 4045 // node_modules/@base-ui/react/internals/composite/root/CompositeRoot.mjs
2425 - var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
4046 + var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
2426 4047 function CompositeRoot(componentProps) {
2427 4048 const {
2428 4049 render,
2429 4050 className,
@@ -2430,9 +4051,9 @@
2430 4051 style,
2431 4052 refs = EMPTY_ARRAY,
2432 4053 props = EMPTY_ARRAY,
2433 4054 state = EMPTY_OBJECT,
2434 - stateAttributesMapping: stateAttributesMapping3,
4055 + stateAttributesMapping: stateAttributesMapping4,
2435 4056 highlightedIndex: highlightedIndexProp,
2436 4057 onHighlightedIndexChange: onHighlightedIndexChangeProp,
2437 4058 orientation,
2438 4059 grid,
@@ -2473,19 +4094,19 @@
2473 4094 const element = useRenderElement(tag, componentProps, {
2474 4095 state,
2475 4096 ref: refs,
2476 4097 props: [defaultProps, ...props, elementProps],
2477 - stateAttributesMapping: stateAttributesMapping3
4098 + stateAttributesMapping: stateAttributesMapping4
2478 4099 });
2479 - const contextValue = React23.useMemo(() => ({
4100 + const contextValue = React42.useMemo(() => ({
2480 4101 highlightedIndex,
2481 4102 onHighlightedIndexChange,
2482 4103 highlightItemOnHover,
2483 4104 relayKeyboardEvent
2484 4105 }), [highlightedIndex, onHighlightedIndexChange, highlightItemOnHover, relayKeyboardEvent]);
2485 - return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CompositeRootContext.Provider, {
4106 + return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CompositeRootContext.Provider, {
2486 4107 value: contextValue,
2487 - children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CompositeList, {
4108 + children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CompositeList, {
2488 4109 elementsRef,
2489 4110 onMapChange: (newMap) => {
2490 4111 onMapChangeProp?.(newMap);
2491 4112 onMapChangeUnwrapped(newMap);
@@ -2494,8 +4115,11 @@
2494 4115 })
2495 4116 });
2496 4117 }
2497 4118
4119 + // node_modules/@base-ui/react/internals/prehydrationScript.stub.mjs
4120 + var script = "";
4121 +
2498 4122 // node_modules/@base-ui/react/utils/useIsHydrating.mjs
2499 4123 var import_shim = __toESM(require_shim(), 1);
2500 4124 function subscribe() {
2501 4125 return NOOP;
@@ -2509,11 +4133,34 @@
2509 4133 function useIsHydrating() {
2510 4134 return (0, import_shim.useSyncExternalStore)(subscribe, getSnapshot, getServerSnapshot);
2511 4135 }
2512 4136
4137 + // node_modules/@base-ui/react/internals/PrehydrationScript.mjs
4138 + var React43 = __toESM(require_react(), 1);
4139 + var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
4140 + function PrehydrationScript(props) {
4141 + const {
4142 + script: script2
4143 + } = props;
4144 + const {
4145 + nonce
4146 + } = useCSPContext();
4147 + const isHydrating = useIsHydrating();
4148 + if (!isHydrating) {
4149 + return null;
4150 + }
4151 + return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("script", {
4152 + nonce,
4153 + dangerouslySetInnerHTML: {
4154 + __html: script2
4155 + },
4156 + suppressHydrationWarning: true
4157 + });
4158 + }
4159 +
2513 4160 // node_modules/@base-ui/react/tabs/index.parts.mjs
2514 - var index_parts_exports = {};
2515 - __export(index_parts_exports, {
4161 + var index_parts_exports2 = {};
4162 + __export(index_parts_exports2, {
2516 4163 Indicator: () => TabsIndicator,
2517 4164 List: () => TabsList,
2518 4165 Panel: () => TabsPanel,
2519 4166 Root: () => TabsRoot,
@@ -2520,16 +4167,16 @@
2520 4167 Tab: () => TabsTab
2521 4168 });
2522 4169
2523 4170 // node_modules/@base-ui/react/tabs/root/TabsRoot.mjs
2524 - var React25 = __toESM(require_react(), 1);
4171 + var React45 = __toESM(require_react(), 1);
2525 4172
2526 4173 // node_modules/@base-ui/react/tabs/root/TabsRootContext.mjs
2527 - var React24 = __toESM(require_react(), 1);
2528 - var TabsRootContext = /* @__PURE__ */ React24.createContext(void 0);
4174 + var React44 = __toESM(require_react(), 1);
4175 + var TabsRootContext = /* @__PURE__ */ React44.createContext(void 0);
2529 4176 if (true) TabsRootContext.displayName = "TabsRootContext";
2530 4177 function useTabsRootContext() {
2531 - const context = React24.useContext(TabsRootContext);
4178 + const context = React44.useContext(TabsRootContext);
2532 4179 if (context === void 0) {
2533 4180 throw new Error(true ? "Base UI: TabsRootContext is missing. Tabs parts must be placed within <Tabs.Root>." : formatErrorMessage_default(64));
2534 4181 }
2535 4182 return context;
@@ -2535,24 +4182,20 @@
2535 4182 return context;
2536 4183 }
2537 4184
2538 4185 // node_modules/@base-ui/react/tabs/root/TabsRootDataAttributes.mjs
2539 - var TabsRootDataAttributes = /* @__PURE__ */ (function(TabsRootDataAttributes2) {
2540 - TabsRootDataAttributes2["activationDirection"] = "data-activation-direction";
2541 - TabsRootDataAttributes2["orientation"] = "data-orientation";
2542 - return TabsRootDataAttributes2;
2543 - })({});
4186 + var activationDirection = "data-activation-direction";
2544 4187
2545 4188 // node_modules/@base-ui/react/tabs/root/stateAttributesMapping.mjs
2546 4189 var tabsStateAttributesMapping = {
2547 4190 tabActivationDirection: (dir) => ({
2548 - [TabsRootDataAttributes.activationDirection]: dir
4191 + [activationDirection]: dir
2549 4192 })
2550 4193 };
2551 4194
2552 4195 // node_modules/@base-ui/react/tabs/root/TabsRoot.mjs
2553 - var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1);
2554 - var TabsRoot = /* @__PURE__ */ React25.forwardRef(function TabsRoot2(componentProps, forwardedRef) {
4196 + var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
4197 + var TabsRoot = /* @__PURE__ */ React45.forwardRef(function TabsRoot2(componentProps, forwardedRef) {
2555 4198 const {
2556 4199 className,
2557 4200 defaultValue: defaultValueProp = 0,
2558 4201 onValueChange: onValueChangeProp,
@@ -2562,10 +4205,10 @@
2562 4205 style,
2563 4206 ...elementProps
2564 4207 } = componentProps;
2565 4208 const hasExplicitDefaultValueProp = componentProps.defaultValue !== void 0;
2566 - const tabPanelRefs = React25.useRef([]);
2567 - const [mountedTabPanels, setMountedTabPanels] = React25.useState(() => /* @__PURE__ */ new Map());
4209 + const tabPanelRefs = React45.useRef([]);
4210 + const [mountedTabPanels, setMountedTabPanels] = React45.useState(() => /* @__PURE__ */ new Map());
2568 4211 const [value, setValue] = useControlled({
2569 4212 controlled: valueProp,
2570 4213 default: defaultValueProp,
2571 4214 name: "Tabs",
@@ -2571,22 +4214,12 @@
2571 4214 name: "Tabs",
2572 4215 state: "value"
2573 4216 });
2574 4217 const isControlled = valueProp !== void 0;
2575 - const [tabMap, setTabMap] = React25.useState(() => /* @__PURE__ */ new Map());
2576 - const lastKnownTabElementRef = React25.useRef(void 0);
2577 - const getTabElementBySelectedValue = React25.useCallback((selectedValue) => {
2578 - if (selectedValue === void 0) {
2579 - return null;
2580 - }
2581 - for (const [tabElement, tabMetadata] of tabMap.entries()) {
2582 - if (tabMetadata != null && selectedValue === (tabMetadata.value ?? tabMetadata.index)) {
2583 - return tabElement;
2584 - }
2585 - }
2586 - return null;
2587 - }, [tabMap]);
2588 - const [activationDirectionState, setActivationDirectionState] = React25.useState(() => ({
4218 + const [tabMap, setTabMap] = React45.useState(() => /* @__PURE__ */ new Map());
4219 + const lastKnownTabElementRef = React45.useRef(void 0);
4220 + const getTabElementBySelectedValue = React45.useCallback((selectedValue) => findTabElement(tabMap, selectedValue), [tabMap]);
4221 + const [activationDirectionState, setActivationDirectionState] = React45.useState(() => ({
2589 4222 previousValue: value,
2590 4223 tabActivationDirection: "none"
2591 4224 }));
2592 4225 const {
@@ -2610,10 +4243,10 @@
2610 4243 tabActivationDirection
2611 4244 });
2612 4245 }, [nextPreviousValue, shouldSyncActivationDirectionState, tabActivationDirection]);
2613 4246 const onValueChange = useStableCallback((newValue, eventDetails) => {
2614 - const activationDirection = computeActivationDirection(value, newValue, orientation, tabMap);
2615 - eventDetails.activationDirection = activationDirection;
4247 + const activationDirection2 = computeActivationDirection(value, newValue, orientation, tabMap);
4248 + eventDetails.activationDirection = activationDirection2;
2616 4249 onValueChangeProp?.(newValue, eventDetails);
2617 4250 if (eventDetails.isCanceled) {
2618 4251 return;
2619 4252 }
@@ -2625,38 +4258,35 @@
2625 4258 }));
2626 4259 });
2627 4260 const registerMountedTabPanel = useStableCallback((panelValue, panelId) => {
2628 4261 setMountedTabPanels((prev) => {
2629 - if (prev.get(panelValue) === panelId) {
2630 - return prev;
2631 - }
2632 4262 const next = new Map(prev);
2633 4263 next.set(panelValue, panelId);
2634 4264 return next;
2635 4265 });
4266 + return () => {
4267 + setMountedTabPanels((prev) => {
4268 + if (prev.get(panelValue) !== panelId) {
4269 + return prev;
4270 + }
4271 + const next = new Map(prev);
4272 + next.delete(panelValue);
4273 + return next;
4274 + });
4275 + };
2636 4276 });
2637 - const unregisterMountedTabPanel = useStableCallback((panelValue, panelId) => {
2638 - setMountedTabPanels((prev) => {
2639 - if (!prev.has(panelValue) || prev.get(panelValue) !== panelId) {
2640 - return prev;
2641 - }
2642 - const next = new Map(prev);
2643 - next.delete(panelValue);
2644 - return next;
2645 - });
2646 - });
2647 - const getTabPanelIdByValue = React25.useCallback((tabValue) => {
4277 + const getTabPanelIdByValue = React45.useCallback((tabValue) => {
2648 4278 return mountedTabPanels.get(tabValue);
2649 4279 }, [mountedTabPanels]);
2650 - const getTabIdByPanelValue = React25.useCallback((tabPanelValue) => {
4280 + const getTabIdByPanelValue = React45.useCallback((tabPanelValue) => {
2651 4281 for (const tabMetadata of tabMap.values()) {
2652 - if (tabPanelValue === tabMetadata?.value) {
2653 - return tabMetadata?.id;
4282 + if (tabPanelValue === tabMetadata.value) {
4283 + return tabMetadata.id;
2654 4284 }
2655 4285 }
2656 4286 return void 0;
2657 4287 }, [tabMap]);
2658 - const tabsContextValue = React25.useMemo(() => ({
4288 + const tabsContextValue = React45.useMemo(() => ({
2659 4289 getTabElementBySelectedValue,
2660 4290 getTabIdByPanelValue,
2661 4291 getTabPanelIdByValue,
2662 4292 onValueChange,
@@ -2662,32 +4292,31 @@
2662 4292 onValueChange,
2663 4293 orientation,
2664 4294 registerMountedTabPanel,
2665 4295 setTabMap,
2666 - unregisterMountedTabPanel,
2667 4296 tabActivationDirection,
2668 4297 value
2669 - }), [getTabElementBySelectedValue, getTabIdByPanelValue, getTabPanelIdByValue, onValueChange, orientation, registerMountedTabPanel, setTabMap, unregisterMountedTabPanel, tabActivationDirection, value]);
2670 - const selectedTabMetadata = React25.useMemo(() => {
4298 + }), [getTabElementBySelectedValue, getTabIdByPanelValue, getTabPanelIdByValue, onValueChange, orientation, registerMountedTabPanel, setTabMap, tabActivationDirection, value]);
4299 + const selectedTabMetadata = React45.useMemo(() => {
2671 4300 for (const tabMetadata of tabMap.values()) {
2672 - if (tabMetadata != null && tabMetadata.value === value) {
4301 + if (tabMetadata.value === value) {
2673 4302 return tabMetadata;
2674 4303 }
2675 4304 }
2676 4305 return void 0;
2677 4306 }, [tabMap, value]);
2678 - const firstEnabledTabValue = React25.useMemo(() => {
4307 + const firstEnabledTabValue = React45.useMemo(() => {
2679 4308 for (const tabMetadata of tabMap.values()) {
2680 - if (tabMetadata != null && !tabMetadata.disabled) {
4309 + if (!tabMetadata.disabled) {
2681 4310 return tabMetadata.value;
2682 4311 }
2683 4312 }
2684 4313 return void 0;
2685 4314 }, [tabMap]);
2686 - const shouldNotifyInitialValueChangeRef = React25.useRef(!hasExplicitDefaultValueProp);
2687 - const initialDefaultValueRef = React25.useRef(defaultValueProp);
2688 - const shouldHonorDisabledDefaultValueRef = React25.useRef(hasExplicitDefaultValueProp);
2689 - const didRegisterTabsRef = React25.useRef(false);
4315 + const shouldNotifyInitialValueChangeRef = React45.useRef(!hasExplicitDefaultValueProp);
4316 + const initialDefaultValueRef = React45.useRef(defaultValueProp);
4317 + const shouldHonorDisabledDefaultValueRef = React45.useRef(hasExplicitDefaultValueProp);
4318 + const didRegisterTabsRef = React45.useRef(false);
2690 4319 useIsoLayoutEffect(() => {
2691 4320 if (isControlled) {
2692 4321 return;
2693 4322 }
@@ -2692,16 +4321,11 @@
2692 4321 return;
2693 4322 }
2694 4323 function commitAutomaticValueChange(fallbackValue, fallbackReason) {
2695 4324 setValue(fallbackValue);
2696 - setActivationDirectionState((prev) => {
2697 - if (prev.previousValue === fallbackValue && prev.tabActivationDirection === "none") {
2698 - return prev;
2699 - }
2700 - return {
2701 - previousValue: fallbackValue,
2702 - tabActivationDirection: "none"
2703 - };
4325 + setActivationDirectionState({
4326 + previousValue: fallbackValue,
4327 + tabActivationDirection: "none"
2704 4328 });
2705 4329 notifyAutomaticValueChange(fallbackValue, fallbackReason);
2706 4330 shouldNotifyInitialValueChangeRef.current = false;
2707 4331 }
@@ -2751,11 +4375,11 @@
2751 4375 ref: forwardedRef,
2752 4376 props: elementProps,
2753 4377 stateAttributesMapping: tabsStateAttributesMapping
2754 4378 });
2755 - return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TabsRootContext.Provider, {
4379 + return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TabsRootContext.Provider, {
2756 4380 value: tabsContextValue,
2757 - children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CompositeList, {
4381 + children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CompositeList, {
2758 4382 elementsRef: tabPanelRefs,
2759 4383 children: element
2760 4384 })
2761 4385 });
@@ -2760,67 +4384,49 @@
2760 4384 })
2761 4385 });
2762 4386 });
2763 4387 if (true) TabsRoot.displayName = "TabsRoot";
4388 + function findTabElement(tabMap, value) {
4389 + for (const [tabElement, tabMetadata] of tabMap.entries()) {
4390 + if (value === tabMetadata.value) {
4391 + return tabElement;
4392 + }
4393 + }
4394 + return null;
4395 + }
2764 4396 function computeActivationDirection(oldValue, newValue, orientation, tabMap) {
2765 4397 if (oldValue == null || newValue == null) {
2766 4398 return "none";
2767 4399 }
2768 - let oldTab = null;
2769 - let newTab = null;
2770 - for (const [tabElement, tabMetadata] of tabMap.entries()) {
2771 - if (tabMetadata == null) {
2772 - continue;
2773 - }
2774 - const tabValue = tabMetadata.value ?? tabMetadata.index;
2775 - if (oldValue === tabValue) {
2776 - oldTab = tabElement;
2777 - }
2778 - if (newValue === tabValue) {
2779 - newTab = tabElement;
2780 - }
2781 - if (oldTab != null && newTab != null) {
2782 - break;
2783 - }
2784 - }
4400 + const [positionProp, backward, forward] = orientation === "horizontal" ? ["left", "left", "right"] : ["top", "up", "down"];
4401 + const oldTab = findTabElement(tabMap, oldValue);
4402 + const newTab = findTabElement(tabMap, newValue);
2785 4403 if (oldTab == null || newTab == null) {
2786 4404 if (oldTab !== newTab && (typeof oldValue === "number" || typeof oldValue === "string") && typeof oldValue === typeof newValue) {
2787 - if (orientation === "horizontal") {
2788 - return newValue > oldValue ? "right" : "left";
2789 - }
2790 - return newValue > oldValue ? "down" : "up";
4405 + return newValue > oldValue ? forward : backward;
2791 4406 }
2792 4407 return "none";
2793 4408 }
2794 - const oldRect = oldTab.getBoundingClientRect();
2795 - const newRect = newTab.getBoundingClientRect();
2796 - if (orientation === "horizontal") {
2797 - if (newRect.left < oldRect.left) {
2798 - return "left";
2799 - }
2800 - if (newRect.left > oldRect.left) {
2801 - return "right";
2802 - }
2803 - } else {
2804 - if (newRect.top < oldRect.top) {
2805 - return "up";
2806 - }
2807 - if (newRect.top > oldRect.top) {
2808 - return "down";
2809 - }
4409 + const oldPosition = oldTab.getBoundingClientRect()[positionProp];
4410 + const newPosition = newTab.getBoundingClientRect()[positionProp];
4411 + if (newPosition < oldPosition) {
4412 + return backward;
2810 4413 }
4414 + if (newPosition > oldPosition) {
4415 + return forward;
4416 + }
2811 4417 return "none";
2812 4418 }
2813 4419
2814 4420 // node_modules/@base-ui/react/tabs/tab/TabsTab.mjs
2815 - var React27 = __toESM(require_react(), 1);
4421 + var React47 = __toESM(require_react(), 1);
2816 4422
2817 4423 // node_modules/@base-ui/react/tabs/list/TabsListContext.mjs
2818 - var React26 = __toESM(require_react(), 1);
2819 - var TabsListContext = /* @__PURE__ */ React26.createContext(void 0);
4424 + var React46 = __toESM(require_react(), 1);
4425 + var TabsListContext = /* @__PURE__ */ React46.createContext(void 0);
2820 4426 if (true) TabsListContext.displayName = "TabsListContext";
2821 4427 function useTabsListContext() {
2822 - const context = React26.useContext(TabsListContext);
4428 + const context = React46.useContext(TabsListContext);
2823 4429 if (context === void 0) {
2824 4430 throw new Error(true ? "Base UI: TabsListContext is missing. TabsList parts must be placed within <Tabs.List>." : formatErrorMessage_default(65));
2825 4431 }
2826 4432 return context;
@@ -2826,9 +4432,9 @@
2826 4432 return context;
2827 4433 }
2828 4434
2829 4435 // node_modules/@base-ui/react/tabs/tab/TabsTab.mjs
2830 - var TabsTab = /* @__PURE__ */ React27.forwardRef(function TabsTab2(componentProps, forwardedRef) {
4436 + var TabsTab = /* @__PURE__ */ React47.forwardRef(function TabsTab2(componentProps, forwardedRef) {
2831 4437 const {
2832 4438 className,
2833 4439 disabled: disabled2 = false,
2834 4440 render,
@@ -2840,21 +4446,23 @@
2840 4446 } = componentProps;
2841 4447 const {
2842 4448 value: activeTabValue,
2843 4449 getTabPanelIdByValue,
4450 + onValueChange,
2844 4451 orientation,
2845 4452 tabActivationDirection
2846 4453 } = useTabsRootContext();
2847 4454 const {
2848 4455 activateOnFocus,
2849 - highlightedTabIndex,
2850 - onTabActivation,
2851 4456 registerTabResizeObserverElement,
2852 - setHighlightedTabIndex,
2853 4457 tabsListElement
2854 4458 } = useTabsListContext();
4459 + const {
4460 + highlightedIndex,
4461 + onHighlightedIndexChange
4462 + } = useCompositeRootContext();
2855 4463 const id = useBaseUiId(idProp);
2856 - const tabMetadata = React27.useMemo(() => ({
4464 + const tabMetadata = React47.useMemo(() => ({
2857 4465 disabled: disabled2,
2858 4466 id,
2859 4467 value
2860 4468 }), [disabled2, id, value]);
@@ -2860,9 +4468,9 @@
2860 4468 }), [disabled2, id, value]);
2861 4469 const {
2862 4470 compositeProps,
2863 4471 compositeRef,
2864 - index
4472 + index: index2
2865 4473 // hook is used instead of the CompositeItem component
2866 4474 // because the index is needed for Tab internals
2867 4475 } = useCompositeItem({
2868 4476 metadata: tabMetadata
@@ -2867,23 +4475,20 @@
2867 4475 } = useCompositeItem({
2868 4476 metadata: tabMetadata
2869 4477 });
2870 4478 const active = value === activeTabValue;
2871 - const isNavigatingRef = React27.useRef(false);
2872 - const tabElementRef = React27.useRef(null);
4479 + const isNavigatingRef = React47.useRef(false);
4480 + const unobserveTabElementRef = React47.useRef(null);
4481 + const observeTabElement = useStableCallback((element2) => {
4482 + unobserveTabElementRef.current?.();
4483 + unobserveTabElementRef.current = element2 ? registerTabResizeObserverElement(element2) : null;
4484 + });
2873 4485 useIsoLayoutEffect(() => {
2874 - const tabElement = tabElementRef.current;
2875 - if (!tabElement) {
2876 - return void 0;
2877 - }
2878 - return registerTabResizeObserverElement(tabElement);
2879 - }, [registerTabResizeObserverElement]);
2880 - useIsoLayoutEffect(() => {
2881 4486 if (isNavigatingRef.current) {
2882 4487 isNavigatingRef.current = false;
2883 4488 return;
2884 4489 }
2885 - if (!(active && index > -1 && highlightedTabIndex !== index)) {
4490 + if (!(active && index2 > -1 && highlightedIndex !== index2)) {
2886 4491 return;
2887 4492 }
2888 4493 const listElement = tabsListElement;
2889 4494 if (listElement != null) {
@@ -2892,11 +4497,11 @@
2892 4497 return;
2893 4498 }
2894 4499 }
2895 4500 if (!disabled2) {
2896 - setHighlightedTabIndex(index);
4501 + onHighlightedIndexChange(index2);
2897 4502 }
2898 - }, [active, index, highlightedTabIndex, setHighlightedTabIndex, disabled2, tabsListElement]);
4503 + }, [active, index2, highlightedIndex, onHighlightedIndexChange, disabled2, tabsListElement]);
2899 4504 const {
2900 4505 getButtonProps,
2901 4506 buttonRef
2902 4507 } = useButton({
@@ -2904,33 +4509,28 @@
2904 4509 native: nativeButton,
2905 4510 focusableWhenDisabled: true
2906 4511 });
2907 4512 const tabPanelId = getTabPanelIdByValue(value);
2908 - const isPressingRef = React27.useRef(false);
2909 - const isMainButtonRef = React27.useRef(false);
4513 + const isPressingRef = React47.useRef(false);
4514 + const isMainButtonRef = React47.useRef(false);
4515 + function activate(event) {
4516 + onValueChange(value, createChangeEventDetails(reason_parts_exports.none, event.nativeEvent, void 0, {
4517 + activationDirection: "none"
4518 + }));
4519 + }
2910 4520 function onClick(event) {
2911 4521 if (active || disabled2) {
2912 4522 return;
2913 4523 }
2914 - onTabActivation(value, createChangeEventDetails(reason_parts_exports.none, event.nativeEvent, void 0, {
2915 - activationDirection: "none"
2916 - }));
4524 + activate(event);
2917 4525 }
2918 4526 function onFocus(event) {
2919 - if (active) {
4527 + if (active || disabled2) {
2920 4528 return;
2921 4529 }
2922 - if (index > -1 && !disabled2) {
2923 - setHighlightedTabIndex(index);
2924 - }
2925 - if (disabled2) {
2926 - return;
2927 - }
2928 4530 if (activateOnFocus && (!isPressingRef.current || // keyboard or touch focus
2929 - isPressingRef.current && isMainButtonRef.current)) {
2930 - onTabActivation(value, createChangeEventDetails(reason_parts_exports.none, event.nativeEvent, void 0, {
2931 - activationDirection: "none"
2932 - }));
4531 + isMainButtonRef.current)) {
4532 + activate(event);
2933 4533 }
2934 4534 }
2935 4535 function onPointerDown(event) {
2936 4536 if (active || disabled2) {
@@ -2936,19 +4536,18 @@
2936 4536 if (active || disabled2) {
2937 4537 return;
2938 4538 }
2939 4539 isPressingRef.current = true;
2940 - function handlePointerUp() {
4540 + isMainButtonRef.current = event.button === 0;
4541 + const doc = ownerDocument(event.currentTarget);
4542 + function handlePointerEnd() {
2941 4543 isPressingRef.current = false;
2942 4544 isMainButtonRef.current = false;
4545 + doc.removeEventListener("pointerup", handlePointerEnd);
4546 + doc.removeEventListener("pointercancel", handlePointerEnd);
2943 4547 }
2944 - if (!event.button || event.button === 0) {
2945 - isMainButtonRef.current = true;
2946 - const doc = ownerDocument(event.currentTarget);
2947 - doc.addEventListener("pointerup", handlePointerUp, {
2948 - once: true
2949 - });
2950 - }
4548 + doc.addEventListener("pointerup", handlePointerEnd);
4549 + doc.addEventListener("pointercancel", handlePointerEnd);
2951 4550 }
2952 4551 const state = {
2953 4552 disabled: disabled2,
2954 4553 active,
@@ -2956,9 +4555,9 @@
2956 4555 tabActivationDirection
2957 4556 };
2958 4557 const element = useRenderElement("button", componentProps, {
2959 4558 state,
2960 - ref: [forwardedRef, buttonRef, compositeRef, tabElementRef],
4559 + ref: [forwardedRef, buttonRef, compositeRef, observeTabElement],
2961 4560 props: [compositeProps, {
2962 4561 role: "tab",
2963 4562 "aria-controls": tabPanelId,
2964 4563 "aria-selected": active,
@@ -2977,32 +4576,28 @@
2977 4576 });
2978 4577 if (true) TabsTab.displayName = "TabsTab";
2979 4578
2980 4579 // node_modules/@base-ui/react/tabs/indicator/TabsIndicator.mjs
2981 - var React28 = __toESM(require_react(), 1);
4580 + var React48 = __toESM(require_react(), 1);
2982 4581
2983 - // node_modules/@base-ui/react/tabs/indicator/prehydrationScript.min.mjs
2984 - var script = '!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();';
2985 -
2986 4582 // node_modules/@base-ui/react/tabs/indicator/TabsIndicatorCssVars.mjs
2987 - var TabsIndicatorCssVars = /* @__PURE__ */ (function(TabsIndicatorCssVars2) {
2988 - TabsIndicatorCssVars2["activeTabLeft"] = "--active-tab-left";
2989 - TabsIndicatorCssVars2["activeTabRight"] = "--active-tab-right";
2990 - TabsIndicatorCssVars2["activeTabTop"] = "--active-tab-top";
2991 - TabsIndicatorCssVars2["activeTabBottom"] = "--active-tab-bottom";
2992 - TabsIndicatorCssVars2["activeTabWidth"] = "--active-tab-width";
2993 - TabsIndicatorCssVars2["activeTabHeight"] = "--active-tab-height";
2994 - return TabsIndicatorCssVars2;
2995 - })({});
4583 + var activeTabLeft = "--active-tab-left";
4584 + var activeTabRight = "--active-tab-right";
4585 + var activeTabTop = "--active-tab-top";
4586 + var activeTabBottom = "--active-tab-bottom";
4587 + var activeTabWidth = "--active-tab-width";
4588 + var activeTabHeight = "--active-tab-height";
2996 4589
2997 4590 // node_modules/@base-ui/react/tabs/indicator/TabsIndicator.mjs
2998 - var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1);
2999 - var stateAttributesMapping = {
4591 + var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
4592 + var _PrehydrationScript;
4593 + var stateAttributesMapping2 = {
3000 4594 ...tabsStateAttributesMapping,
3001 4595 activeTabPosition: () => null,
3002 4596 activeTabSize: () => null
3003 4597 };
3004 - var TabsIndicator = /* @__PURE__ */ React28.forwardRef(function TabsIndicator2(componentProps, forwardedRef) {
4598 + var MAX_LAYOUT_ROUNDING_ERROR = 2;
4599 + var TabsIndicator = /* @__PURE__ */ React48.forwardRef(function TabsIndicator2(componentProps, forwardedRef) {
3005 4600 const {
3006 4601 className,
3007 4602 render,
3008 4603 renderBeforeHydration = false,
@@ -3009,11 +4604,8 @@
3009 4604 style: styleProp,
3010 4605 ...elementProps
3011 4606 } = componentProps;
3012 4607 const {
3013 - nonce
3014 - } = useCSPContext();
3015 - const {
3016 4608 getTabElementBySelectedValue,
3017 4609 orientation,
3018 4610 tabActivationDirection,
3019 4611 value
@@ -3021,11 +4613,10 @@
3021 4613 const {
3022 4614 tabsListElement,
3023 4615 registerIndicatorUpdateListener
3024 4616 } = useTabsListContext();
3025 - const isHydrating = useIsHydrating();
3026 4617 const rerender = useForcedRerendering();
3027 - React28.useEffect(() => {
4618 + React48.useEffect(() => {
3028 4619 return registerIndicatorUpdateListener(rerender);
3029 4620 }, [registerIndicatorUpdateListener, rerender]);
3030 4621 let left = 0;
3031 4622 let right = 0;
@@ -3049,17 +4640,17 @@
3049 4640 const tabRect = activeTab.getBoundingClientRect();
3050 4641 const tabsListRect = tabsListElement.getBoundingClientRect();
3051 4642 const scaleX = tabListWidth > 0 ? tabsListRect.width / tabListWidth : 1;
3052 4643 const scaleY = tabListHeight > 0 ? tabsListRect.height / tabListHeight : 1;
3053 - const hasNonZeroScale = Math.abs(scaleX) > Number.EPSILON && Math.abs(scaleY) > Number.EPSILON;
3054 - if (hasNonZeroScale) {
3055 - const tabLeftDelta = tabRect.left - tabsListRect.left;
3056 - const tabTopDelta = tabRect.top - tabsListRect.top;
3057 - left = tabLeftDelta / scaleX + tabsListElement.scrollLeft - tabsListElement.clientLeft;
3058 - top = tabTopDelta / scaleY + tabsListElement.scrollTop - tabsListElement.clientTop;
3059 - } else {
3060 - left = activeTab.offsetLeft;
3061 - top = activeTab.offsetTop;
4644 + const layoutOffset = getLayoutOffset(activeTab, tabsListElement);
4645 + left = layoutOffset.left;
4646 + top = layoutOffset.top;
4647 + const rectLeft = (tabRect.left - tabsListRect.left) / scaleX + tabsListElement.scrollLeft - tabsListElement.clientLeft;
4648 + const rectTop = (tabRect.top - tabsListRect.top) / scaleY + tabsListElement.scrollTop - tabsListElement.clientTop;
4649 + const tabTranslation = getActiveTabTranslation(activeTab);
4650 + if (Math.abs(rectLeft - tabTranslation.x - left) <= MAX_LAYOUT_ROUNDING_ERROR && Math.abs(rectTop - tabTranslation.y - top) <= MAX_LAYOUT_ROUNDING_ERROR) {
4651 + left = rectLeft;
4652 + top = rectTop;
3062 4653 }
3063 4654 width = computedWidth;
3064 4655 height = computedHeight;
3065 4656 right = tabsListElement.scrollWidth - left - width;
@@ -3076,14 +4667,14 @@
3076 4667 width,
3077 4668 height
3078 4669 } : null;
3079 4670 const style = isTabSelected ? {
3080 - [TabsIndicatorCssVars.activeTabLeft]: `${left}px`,
3081 - [TabsIndicatorCssVars.activeTabRight]: `${right}px`,
3082 - [TabsIndicatorCssVars.activeTabTop]: `${top}px`,
3083 - [TabsIndicatorCssVars.activeTabBottom]: `${bottom}px`,
3084 - [TabsIndicatorCssVars.activeTabWidth]: `${width}px`,
3085 - [TabsIndicatorCssVars.activeTabHeight]: `${height}px`
4671 + [activeTabLeft]: `${left}px`,
4672 + [activeTabRight]: `${right}px`,
4673 + [activeTabTop]: `${top}px`,
4674 + [activeTabBottom]: `${bottom}px`,
4675 + [activeTabWidth]: `${width}px`,
4676 + [activeTabHeight]: `${height}px`
3086 4677 } : void 0;
3087 4678 const displayIndicator = isTabSelected && width > 0 && height > 0;
3088 4679 const state = {
3089 4680 orientation,
@@ -3101,45 +4692,101 @@
3101 4692 // do not display the indicator before the layout is settled
3102 4693 }, elementProps, {
3103 4694 suppressHydrationWarning: true
3104 4695 }],
3105 - stateAttributesMapping
4696 + stateAttributesMapping: stateAttributesMapping2
3106 4697 });
3107 4698 if (value == null) {
3108 4699 return null;
3109 4700 }
3110 - return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(React28.Fragment, {
3111 - children: [element, isHydrating && renderBeforeHydration && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("script", {
3112 - nonce,
3113 - dangerouslySetInnerHTML: {
3114 - __html: script
3115 - },
3116 - suppressHydrationWarning: true
3117 - })]
4701 + return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(React48.Fragment, {
4702 + children: [element, renderBeforeHydration && (_PrehydrationScript || (_PrehydrationScript = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PrehydrationScript, {
4703 + script
4704 + })))]
3118 4705 });
3119 4706 });
3120 4707 if (true) TabsIndicator.displayName = "TabsIndicator";
4708 + function getLayoutOffset(element, ancestor) {
4709 + const elementOffset = getCumulativeOffset(element);
4710 + const ancestorOffset = getCumulativeOffset(ancestor);
4711 + let left = elementOffset.left - ancestorOffset.left - ancestor.clientLeft;
4712 + let top = elementOffset.top - ancestorOffset.top - ancestor.clientTop;
4713 + let node = getParentNode(element);
4714 + while (isHTMLElement(node) && node !== ancestor && !isLastTraversableNode(node)) {
4715 + left -= node.scrollLeft;
4716 + top -= node.scrollTop;
4717 + node = getParentNode(node);
4718 + }
4719 + return {
4720 + left,
4721 + top
4722 + };
4723 + }
4724 + function getCumulativeOffset(element) {
4725 + let left = 0;
4726 + let top = 0;
4727 + let currentElement = element;
4728 + while (currentElement != null) {
4729 + left += currentElement.offsetLeft;
4730 + top += currentElement.offsetTop;
4731 + const offsetParent = currentElement.offsetParent;
4732 + if (offsetParent != null) {
4733 + left += offsetParent.clientLeft;
4734 + top += offsetParent.clientTop;
4735 + }
4736 + currentElement = offsetParent;
4737 + }
4738 + return {
4739 + left,
4740 + top
4741 + };
4742 + }
4743 + function getActiveTabTranslation(element) {
4744 + const computedStyle = getWindow(element).getComputedStyle(element);
4745 + const {
4746 + x,
4747 + y
4748 + } = getElementTransform(element, computedStyle);
4749 + let translateX = x;
4750 + let translateY = y;
4751 + const {
4752 + translate
4753 + } = computedStyle;
4754 + if (translate && translate !== "none") {
4755 + const parts = translate.split(" ");
4756 + translateX += resolveTranslateLength(parts[0], element.offsetWidth);
4757 + translateY += resolveTranslateLength(parts[1], element.offsetHeight);
4758 + }
4759 + return {
4760 + x: translateX,
4761 + y: translateY
4762 + };
4763 + }
4764 + function resolveTranslateLength(value, referenceSize) {
4765 + if (!value) {
4766 + return 0;
4767 + }
4768 + const numeric = parseFloat(value);
4769 + if (!Number.isFinite(numeric)) {
4770 + return 0;
4771 + }
4772 + return value.endsWith("%") ? numeric / 100 * referenceSize : numeric;
4773 + }
3121 4774
3122 4775 // node_modules/@base-ui/react/tabs/panel/TabsPanel.mjs
3123 - var React29 = __toESM(require_react(), 1);
4776 + var React49 = __toESM(require_react(), 1);
3124 4777
3125 4778 // node_modules/@base-ui/react/tabs/panel/TabsPanelDataAttributes.mjs
3126 - var TabsPanelDataAttributes = (function(TabsPanelDataAttributes2) {
3127 - TabsPanelDataAttributes2["index"] = "data-index";
3128 - TabsPanelDataAttributes2["activationDirection"] = "data-activation-direction";
3129 - TabsPanelDataAttributes2["orientation"] = "data-orientation";
3130 - TabsPanelDataAttributes2["hidden"] = "data-hidden";
3131 - TabsPanelDataAttributes2[TabsPanelDataAttributes2["startingStyle"] = TransitionStatusDataAttributes.startingStyle] = "startingStyle";
3132 - TabsPanelDataAttributes2[TabsPanelDataAttributes2["endingStyle"] = TransitionStatusDataAttributes.endingStyle] = "endingStyle";
3133 - return TabsPanelDataAttributes2;
3134 - })({});
4779 + var index = "data-index";
4780 + var startingStyle2 = TransitionStatusDataAttributes_exports.startingStyle;
4781 + var endingStyle2 = TransitionStatusDataAttributes_exports.endingStyle;
3135 4782
3136 4783 // node_modules/@base-ui/react/tabs/panel/TabsPanel.mjs
3137 - var stateAttributesMapping2 = {
4784 + var stateAttributesMapping3 = {
3138 4785 ...tabsStateAttributesMapping,
3139 4786 ...transitionStatusMapping
3140 4787 };
3141 - var TabsPanel = /* @__PURE__ */ React29.forwardRef(function TabsPanel2(componentProps, forwardedRef) {
4788 + var TabsPanel = /* @__PURE__ */ React49.forwardRef(function TabsPanel2(componentProps, forwardedRef) {
3142 4789 const {
3143 4790 className,
3144 4791 value,
3145 4792 render,
@@ -3151,22 +4798,15 @@
3151 4798 value: selectedValue,
3152 4799 getTabIdByPanelValue,
3153 4800 orientation,
3154 4801 tabActivationDirection,
3155 - registerMountedTabPanel,
3156 - unregisterMountedTabPanel
4802 + registerMountedTabPanel
3157 4803 } = useTabsRootContext();
3158 4804 const id = useBaseUiId();
3159 - const metadata = React29.useMemo(() => ({
3160 - id,
3161 - value
3162 - }), [id, value]);
3163 4805 const {
3164 4806 ref: listItemRef,
3165 - index
3166 - } = useCompositeListItem({
3167 - metadata
3168 - });
4807 + index: index2
4808 + } = useCompositeListItem();
3169 4809 const open = value === selectedValue;
3170 4810 const {
3171 4811 mounted,
3172 4812 transitionStatus,
@@ -3179,9 +4819,9 @@
3179 4819 orientation,
3180 4820 tabActivationDirection,
3181 4821 transitionStatus
3182 4822 };
3183 - const panelRef = React29.useRef(null);
4823 + const panelRef = React49.useRef(null);
3184 4824 const element = useRenderElement("div", componentProps, {
3185 4825 state,
3186 4826 ref: [forwardedRef, listItemRef, panelRef],
3187 4827 props: [{
@@ -3190,11 +4830,12 @@
3190 4830 id,
3191 4831 role: "tabpanel",
3192 4832 tabIndex: open ? 0 : -1,
3193 4833 inert: inertValue(!open),
3194 - [TabsPanelDataAttributes.index]: index
4834 + // Computed key: a plain literal key fails the DOM-props excess property check.
4835 + [index]: index2
3195 4836 }, elementProps],
3196 - stateAttributesMapping: stateAttributesMapping2
4837 + stateAttributesMapping: stateAttributesMapping3
3197 4838 });
3198 4839 useOpenChangeComplete({
3199 4840 open,
3200 4841 ref: panelRef,
@@ -3204,19 +4845,13 @@
3204 4845 }
3205 4846 }
3206 4847 });
3207 4848 useIsoLayoutEffect(() => {
3208 - if (hidden && !keepMounted) {
4849 + if (id == null || hidden && !keepMounted) {
3209 4850 return void 0;
3210 4851 }
3211 - if (id == null) {
3212 - return void 0;
3213 - }
3214 - registerMountedTabPanel(value, id);
3215 - return () => {
3216 - unregisterMountedTabPanel(value, id);
3217 - };
3218 - }, [hidden, keepMounted, value, id, registerMountedTabPanel, unregisterMountedTabPanel]);
4852 + return registerMountedTabPanel(value, id);
4853 + }, [hidden, keepMounted, value, id, registerMountedTabPanel]);
3219 4854 const shouldRender = keepMounted || mounted;
3220 4855 if (!shouldRender) {
3221 4856 return null;
3222 4857 }
@@ -3224,11 +4859,11 @@
3224 4859 });
3225 4860 if (true) TabsPanel.displayName = "TabsPanel";
3226 4861
3227 4862 // node_modules/@base-ui/react/tabs/list/TabsList.mjs
3228 - var React30 = __toESM(require_react(), 1);
3229 - var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1);
3230 - var TabsList = /* @__PURE__ */ React30.forwardRef(function TabsList2(componentProps, forwardedRef) {
4863 + var React50 = __toESM(require_react(), 1);
4864 + var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
4865 + var TabsList = /* @__PURE__ */ React50.forwardRef(function TabsList2(componentProps, forwardedRef) {
3231 4866 const {
3232 4867 activateOnFocus = false,
3233 4868 className,
3234 4869 loopFocus = true,
@@ -3236,19 +4871,17 @@
3236 4871 style,
3237 4872 ...elementProps
3238 4873 } = componentProps;
3239 4874 const {
3240 - onValueChange,
3241 4875 orientation,
3242 - value,
3243 4876 setTabMap,
3244 4877 tabActivationDirection
3245 4878 } = useTabsRootContext();
3246 - const [highlightedTabIndex, setHighlightedTabIndex] = React30.useState(0);
3247 - const [tabsListElement, setTabsListElement] = React30.useState(null);
3248 - const indicatorUpdateListenersRef = React30.useRef(/* @__PURE__ */ new Set());
3249 - const tabResizeObserverElementsRef = React30.useRef(/* @__PURE__ */ new Set());
3250 - const resizeObserverRef = React30.useRef(null);
4879 + const [highlightedTabIndex, setHighlightedTabIndex] = React50.useState(0);
4880 + const [tabsListElement, setTabsListElement] = React50.useState(null);
4881 + const indicatorUpdateListenersRef = React50.useRef(/* @__PURE__ */ new Set());
4882 + const tabResizeObserverElementsRef = React50.useRef(/* @__PURE__ */ new Set());
4883 + const resizeObserverRef = React50.useRef(null);
3251 4884 useIsoLayoutEffect(() => {
3252 4885 if (typeof ResizeObserver === "undefined") {
3253 4886 return void 0;
3254 4887 }
@@ -3282,13 +4915,8 @@
3282 4915 tabResizeObserverElementsRef.current.delete(element);
3283 4916 resizeObserverRef.current?.unobserve(element);
3284 4917 };
3285 4918 });
3286 - const onTabActivation = useStableCallback((newValue, eventDetails) => {
3287 - if (newValue !== value) {
3288 - onValueChange(newValue, eventDetails);
3289 - }
3290 - });
3291 4919 const state = {
3292 4920 orientation,
3293 4921 tabActivationDirection
3294 4922 };
@@ -3295,20 +4923,17 @@
3295 4923 const defaultProps = {
3296 4924 "aria-orientation": orientation === "vertical" ? "vertical" : void 0,
3297 4925 role: "tablist"
3298 4926 };
3299 - const tabsListContextValue = React30.useMemo(() => ({
4927 + const tabsListContextValue = React50.useMemo(() => ({
3300 4928 activateOnFocus,
3301 - highlightedTabIndex,
3302 4929 registerIndicatorUpdateListener,
3303 4930 registerTabResizeObserverElement,
3304 - onTabActivation,
3305 - setHighlightedTabIndex,
3306 4931 tabsListElement
3307 - }), [activateOnFocus, highlightedTabIndex, registerIndicatorUpdateListener, registerTabResizeObserverElement, onTabActivation, setHighlightedTabIndex, tabsListElement]);
3308 - return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TabsListContext.Provider, {
4932 + }), [activateOnFocus, registerIndicatorUpdateListener, registerTabResizeObserverElement, tabsListElement]);
4933 + return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TabsListContext.Provider, {
3309 4934 value: tabsListContextValue,
3310 - children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CompositeRoot, {
4935 + children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(CompositeRoot, {
3311 4936 render,
3312 4937 className,
3313 4938 style,
3314 4939 state,
@@ -3331,27 +4956,19 @@
3331 4956 function useRender(params) {
3332 4957 return useRenderElement(params.defaultTagName ?? "div", params, params);
3333 4958 }
3334 4959
3335 - // packages/ui/build-module/icon/icon.mjs
4960 + // packages/ui/build-module/utils/direction-provider.mjs
4961 + var import_i18n3 = __toESM(require_i18n(), 1);
4962 + var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
4963 + function DirectionProvider3({ children }) {
4964 + return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DirectionProvider, { direction: (0, import_i18n3.isRTL)() ? "rtl" : "ltr", children });
4965 + }
4966 +
4967 + // packages/ui/build-module/link/link.mjs
3336 4968 var import_element2 = __toESM(require_element(), 1);
3337 - var import_primitives15 = __toESM(require_primitives(), 1);
3338 - var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1);
3339 - var Icon = (0, import_element2.forwardRef)(function Icon2({ icon, size = 24, ...restProps }, ref) {
3340 - return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3341 - import_primitives15.SVG,
3342 - {
3343 - ref,
3344 - ...icon.props,
3345 - ...restProps,
3346 - width: size,
3347 - height: size
3348 - }
3349 - );
3350 - });
3351 -
3352 - // packages/ui/build-module/stack/stack.mjs
3353 - var import_element3 = __toESM(require_element(), 1);
4969 + var import_i18n4 = __toESM(require_i18n(), 1);
4970 + var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
3354 4971 var STYLE_HASH_ATTRIBUTE = "data-wp-hash";
3355 4972 function getRuntime() {
3356 4973 const globalScope = globalThis;
3357 4974 if (globalScope.__wpStyleRuntime) {
@@ -3431,69 +5048,89 @@
3431 5048 injectStyle(targetDocument, hash, css);
3432 5049 }
3433 5050 }
3434 5051 if (typeof process === "undefined" || true) {
3435 - registerStyle("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
5052 + registerStyle("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
3436 5053 }
3437 - var style_default = { "stack": "_19ce0419607e1896__stack" };
3438 - var gapTokens = {
3439 - xs: "var(--wpds-dimension-gap-xs, 4px)",
3440 - sm: "var(--wpds-dimension-gap-sm, 8px)",
3441 - md: "var(--wpds-dimension-gap-md, 12px)",
3442 - lg: "var(--wpds-dimension-gap-lg, 16px)",
3443 - xl: "var(--wpds-dimension-gap-xl, 24px)",
3444 - "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
3445 - "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
3446 - };
3447 - var Stack = (0, import_element3.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
3448 - const style = {
3449 - gap: gap && gapTokens[gap],
3450 - alignItems: align,
3451 - justifyContent: justify,
3452 - flexDirection: direction,
3453 - flexWrap: wrap
3454 - };
5054 + var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
5055 + if (typeof process === "undefined" || true) {
5056 + registerStyle("08122b3d53", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
5057 + }
5058 + var focus_module_default = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
5059 + if (typeof process === "undefined" || true) {
5060 + registerStyle("e8e6a9be37", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.d4250949359b05ce__link{text-decoration-thickness:from-font;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-padding-xs,4px);text-decoration:none}._0cb411afac4c86c7__link-icon:after{content:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}}');
5061 + }
5062 + var style_default = { "link": "d4250949359b05ce__link", "is-brand": "c6055659b8e2cd2c__is-brand", "is-neutral": "_92e0dfcaeee15b88__is-neutral", "is-unstyled": "cf122a9bf1035d42__is-unstyled", "link-icon": "_0cb411afac4c86c7__link-icon" };
5063 + if (typeof process === "undefined" || true) {
5064 + registerStyle("e8e31009f5", "._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);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&: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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
5065 + }
5066 + 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", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
5067 + var Link = (0, import_element2.forwardRef)(function Link2({
5068 + children,
5069 + variant = "default",
5070 + tone = "brand",
5071 + openInNewTab = false,
5072 + target,
5073 + render,
5074 + className,
5075 + ...props
5076 + }, ref) {
5077 + const shouldShowNewTabIndicator = openInNewTab || /^_blank$/i.test(target ?? "");
3455 5078 const element = useRender({
3456 5079 render,
5080 + defaultTagName: "a",
3457 5081 ref,
3458 - props: mergeProps(props, { style, className: style_default.stack })
5082 + props: mergeProps(props, {
5083 + className: clsx_default(
5084 + global_css_defense_default.a,
5085 + resets_default["box-sizing"],
5086 + focus_module_default["outset-ring--focus-except-active"],
5087 + variant !== "unstyled" && style_default.link,
5088 + variant !== "unstyled" && style_default[`is-${tone}`],
5089 + variant === "unstyled" && style_default["is-unstyled"],
5090 + className
5091 + ),
5092 + target: target ?? (openInNewTab ? "_blank" : void 0),
5093 + children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
5094 + children,
5095 + shouldShowNewTabIndicator && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5096 + "span",
5097 + {
5098 + className: style_default["link-icon"],
5099 + role: "img",
5100 + "aria-label": (
5101 + /* translators: accessibility text appended to link text */
5102 + (0, import_i18n4.__)("(opens in a new tab)")
5103 + )
5104 + }
5105 + )
5106 + ] })
5107 + })
3459 5108 });
3460 5109 return element;
3461 5110 });
3462 5111
3463 - // packages/ui/build-module/utils/use-schedule-validation.mjs
3464 - var import_element4 = __toESM(require_element(), 1);
3465 - function useScheduleValidation(validate) {
3466 - const validateRef = (0, import_element4.useRef)(validate);
3467 - validateRef.current = validate;
3468 - const timerRef = (0, import_element4.useRef)(null);
3469 - const unmountedRef = (0, import_element4.useRef)(false);
3470 - const scheduleValidation = (0, import_element4.useCallback)(() => {
3471 - if (unmountedRef.current) {
3472 - return;
5112 + // packages/ui/build-module/icon/icon.mjs
5113 + var import_element3 = __toESM(require_element(), 1);
5114 + var import_primitives18 = __toESM(require_primitives(), 1);
5115 + var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
5116 + var Icon = (0, import_element3.forwardRef)(function Icon2({ icon, size = 24, style, ...restProps }, ref) {
5117 + const mergedStyle = icon.props.style || style ? { ...icon.props.style, ...style } : void 0;
5118 + return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5119 + import_primitives18.SVG,
5120 + {
5121 + ref,
5122 + ...icon.props,
5123 + ...restProps,
5124 + ...mergedStyle ? { style: mergedStyle } : {},
5125 + width: size,
5126 + height: size
3473 5127 }
3474 - if (timerRef.current) {
3475 - clearTimeout(timerRef.current);
3476 - }
3477 - timerRef.current = setTimeout(() => {
3478 - validateRef.current();
3479 - timerRef.current = null;
3480 - }, 0);
3481 - }, []);
3482 - (0, import_element4.useEffect)(() => {
3483 - unmountedRef.current = false;
3484 - return () => {
3485 - unmountedRef.current = true;
3486 - if (timerRef.current) {
3487 - clearTimeout(timerRef.current);
3488 - }
3489 - };
3490 - }, []);
3491 - return scheduleValidation;
3492 - }
5128 + );
5129 + });
3493 5130
3494 5131 // packages/ui/build-module/visually-hidden/visually-hidden.mjs
3495 - var import_element5 = __toESM(require_element(), 1);
5132 + var import_element4 = __toESM(require_element(), 1);
3496 5133 var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash";
3497 5134 function getRuntime2() {
3498 5135 const globalScope = globalThis;
3499 5136 if (globalScope.__wpStyleRuntime) {
@@ -3573,12 +5210,12 @@
3573 5210 injectStyle2(targetDocument, hash, css);
3574 5211 }
3575 5212 }
3576 5213 if (typeof process === "undefined" || true) {
3577 - registerStyle2("fa606a57ae", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.f37b9e2e191ebd66__visually-hidden{word-wrap:normal;border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-break:normal}}}");
5214 + registerStyle2("f4df7461e9", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.f37b9e2e191ebd66__visually-hidden{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal;padding:0;position:absolute;width:1px;word-break:normal}}}");
3578 5215 }
3579 5216 var style_default2 = { "visually-hidden": "f37b9e2e191ebd66__visually-hidden" };
3580 - var VisuallyHidden = (0, import_element5.forwardRef)(
5217 + var VisuallyHidden = (0, import_element4.forwardRef)(
3581 5218 function VisuallyHidden2({ render, ...restProps }, ref) {
3582 5219 const element = useRender({
3583 5220 render,
3584 5221 ref,
@@ -3594,12 +5231,10 @@
3594 5231 return element;
3595 5232 }
3596 5233 );
3597 5234
3598 - // packages/ui/build-module/link/link.mjs
3599 - var import_element6 = __toESM(require_element(), 1);
3600 - var import_i18n3 = __toESM(require_i18n(), 1);
3601 - var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1);
5235 + // packages/ui/build-module/stack/stack.mjs
5236 + var import_element5 = __toESM(require_element(), 1);
3602 5237 var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash";
3603 5238 function getRuntime3() {
3604 5239 const globalScope = globalThis;
3605 5240 if (globalScope.__wpStyleRuntime) {
@@ -3679,81 +5314,1594 @@
3679 5314 injectStyle3(targetDocument, hash, css);
3680 5315 }
3681 5316 }
3682 5317 if (typeof process === "undefined" || true) {
3683 - registerStyle3("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
5318 + registerStyle3("32aba35fe1", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");
3684 5319 }
3685 - var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
5320 + var style_default3 = { "stack": "_19ce0419607e1896__stack" };
5321 + var gapTokens = {
5322 + xs: "var(--wpds-dimension-gap-xs, 4px)",
5323 + sm: "var(--wpds-dimension-gap-sm, 8px)",
5324 + md: "var(--wpds-dimension-gap-md, 12px)",
5325 + lg: "var(--wpds-dimension-gap-lg, 16px)",
5326 + xl: "var(--wpds-dimension-gap-xl, 24px)",
5327 + "2xl": "var(--wpds-dimension-gap-2xl, 32px)",
5328 + "3xl": "var(--wpds-dimension-gap-3xl, 40px)"
5329 + };
5330 + var Stack = (0, import_element5.forwardRef)(function Stack2({ direction, gap, align, justify, wrap, render, ...props }, ref) {
5331 + const style = {
5332 + gap: gap && gapTokens[gap],
5333 + alignItems: align,
5334 + justifyContent: justify,
5335 + flexDirection: direction,
5336 + flexWrap: wrap
5337 + };
5338 + const element = useRender({
5339 + render,
5340 + ref,
5341 + props: mergeProps(props, { style, className: style_default3.stack })
5342 + });
5343 + return element;
5344 + });
5345 +
5346 + // packages/ui/build-module/utils/use-schedule-validation.mjs
5347 + var import_compose = __toESM(require_compose(), 1);
5348 + var import_element6 = __toESM(require_element(), 1);
5349 + function useScheduleValidation(validate) {
5350 + const validateEvent = (0, import_compose.useEvent)(validate);
5351 + const timerRef = (0, import_element6.useRef)(null);
5352 + const unmountedRef = (0, import_element6.useRef)(false);
5353 + const scheduleValidation = (0, import_element6.useCallback)(() => {
5354 + if (unmountedRef.current) {
5355 + return;
5356 + }
5357 + if (timerRef.current) {
5358 + clearTimeout(timerRef.current);
5359 + }
5360 + timerRef.current = setTimeout(() => {
5361 + validateEvent();
5362 + timerRef.current = null;
5363 + }, 0);
5364 + }, [validateEvent]);
5365 + (0, import_element6.useEffect)(() => {
5366 + unmountedRef.current = false;
5367 + return () => {
5368 + unmountedRef.current = true;
5369 + if (timerRef.current) {
5370 + clearTimeout(timerRef.current);
5371 + }
5372 + };
5373 + }, []);
5374 + return scheduleValidation;
5375 + }
5376 +
5377 + // packages/ui/build-module/form/primitives/input/input.mjs
5378 + var import_element9 = __toESM(require_element(), 1);
5379 +
5380 + // packages/ui/build-module/form/primitives/input-layout/input-layout.mjs
5381 + var import_element7 = __toESM(require_element(), 1);
5382 + var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
5383 + var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
5384 + function getRuntime4() {
5385 + const globalScope = globalThis;
5386 + if (globalScope.__wpStyleRuntime) {
5387 + return globalScope.__wpStyleRuntime;
5388 + }
5389 + globalScope.__wpStyleRuntime = {
5390 + documents: /* @__PURE__ */ new Map(),
5391 + styles: /* @__PURE__ */ new Map(),
5392 + injectedStyles: /* @__PURE__ */ new WeakMap()
5393 + };
5394 + if (typeof document !== "undefined") {
5395 + registerDocument4(document);
5396 + }
5397 + return globalScope.__wpStyleRuntime;
5398 + }
5399 + function documentContainsStyleHash4(targetDocument, hash) {
5400 + if (!targetDocument.head) {
5401 + return false;
5402 + }
5403 + for (const style of targetDocument.head.querySelectorAll(
5404 + `style[${STYLE_HASH_ATTRIBUTE4}]`
5405 + )) {
5406 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
5407 + return true;
5408 + }
5409 + }
5410 + return false;
5411 + }
5412 + function injectStyle4(targetDocument, hash, css) {
5413 + if (!targetDocument.head) {
5414 + return;
5415 + }
5416 + const runtime = getRuntime4();
5417 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
5418 + if (!injectedStyles) {
5419 + injectedStyles = /* @__PURE__ */ new Set();
5420 + runtime.injectedStyles.set(targetDocument, injectedStyles);
5421 + }
5422 + if (injectedStyles.has(hash)) {
5423 + return;
5424 + }
5425 + if (documentContainsStyleHash4(targetDocument, hash)) {
5426 + injectedStyles.add(hash);
5427 + return;
5428 + }
5429 + const style = targetDocument.createElement("style");
5430 + style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
5431 + style.appendChild(targetDocument.createTextNode(css));
5432 + targetDocument.head.appendChild(style);
5433 + injectedStyles.add(hash);
5434 + }
5435 + function registerDocument4(targetDocument) {
5436 + const runtime = getRuntime4();
5437 + runtime.documents.set(
5438 + targetDocument,
5439 + (runtime.documents.get(targetDocument) ?? 0) + 1
5440 + );
5441 + for (const [hash, css] of runtime.styles) {
5442 + injectStyle4(targetDocument, hash, css);
5443 + }
5444 + return () => {
5445 + const count = runtime.documents.get(targetDocument);
5446 + if (count === void 0) {
5447 + return;
5448 + }
5449 + if (count <= 1) {
5450 + runtime.documents.delete(targetDocument);
5451 + return;
5452 + }
5453 + runtime.documents.set(targetDocument, count - 1);
5454 + };
5455 + }
5456 + function registerStyle4(hash, css) {
5457 + const runtime = getRuntime4();
5458 + runtime.styles.set(hash, css);
5459 + for (const targetDocument of runtime.documents.keys()) {
5460 + injectStyle4(targetDocument, hash, css);
5461 + }
5462 + }
3686 5463 if (typeof process === "undefined" || true) {
3687 - registerStyle3("5f8e7aa0bc", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
5464 + registerStyle4("e8e31009f5", "._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);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&: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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
3688 5465 }
3689 - var focus_default = { "outset-ring--focus": "_08e8a2e44959f892__outset-ring--focus", "outset-ring--focus-except-active": "e25b2bdd7aa21721__outset-ring--focus-except-active", "outset-ring--focus-visible": "d0541bc9dd9dc7b6__outset-ring--focus-visible", "outset-ring--focus-within": "cd83dfc2126a0846__outset-ring--focus-within", "outset-ring--focus-within-except-active": "_970d04df7376df67__outset-ring--focus-within-except-active", "outset-ring--focus-within-visible": "c5cb3ee4bddaa8e4__outset-ring--focus-within-visible", "outset-ring--focus-parent-visible": "ecadb9e080e2dfa5__outset-ring--focus-parent-visible" };
5466 + var global_css_defense_default2 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
3690 5467 if (typeof process === "undefined" || true) {
3691 - registerStyle3("e8e6a9be37", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.d4250949359b05ce__link{text-decoration-thickness:from-font;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-padding-xs,4px);text-decoration:none}._0cb411afac4c86c7__link-icon:after{content:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}}');
5468 + registerStyle4("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
3692 5469 }
3693 - var style_default3 = { "link": "d4250949359b05ce__link", "is-brand": "c6055659b8e2cd2c__is-brand", "is-neutral": "_92e0dfcaeee15b88__is-neutral", "is-unstyled": "cf122a9bf1035d42__is-unstyled", "link-icon": "_0cb411afac4c86c7__link-icon" };
5470 + var resets_default2 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
3694 5471 if (typeof process === "undefined" || true) {
3695 - registerStyle3("af6d9984a6", "._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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}");
5472 + registerStyle4("e4f4f9600b", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.cb2baafdc08746bb__input-layout{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-md,12px);background-color:var(--wpds-color-background-interactive-neutral,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:var(--wpds-border-width-xs,1px);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:max(var(--wpds-typography-font-size-md,13px),16px);height:var(--wpds-dimension-size-lg,40px);line-height:1;@media (min-width:600px){font-size:var(--wpds-typography-font-size-md,13px)}&._0c807a84cbb94e0c__is-size-compact{height:var(--wpds-dimension-size-md,32px)}&._0c807a84cbb94e0c__is-size-compact,&.ed67cda122dc1e7b__is-size-small{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-sm,8px)}&.ed67cda122dc1e7b__is-size-small{height:var(--wpds-dimension-size-sm,24px)}&._6fb7104732387680__is-disabled,&:has([data-can-disable-input-layout][data-disabled]){color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);@media (forced-colors:active){color:GrayText}&:not(._8097270636ca6100__is-borderless){background-color:var(--wpds-color-background-interactive-neutral-disabled,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText}}}&._8097270636ca6100__is-borderless{background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);border-color:transparent}&:has(._0d7afad74a057888__input-layout-slot:focus-within){--_gcd-div-outline:none;outline:none}&:hover:not(._6fb7104732387680__is-disabled,:has([data-can-disable-input-layout][data-disabled]),._8097270636ca6100__is-borderless){background-color:var(--wpds-color-background-interactive-neutral-active,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e)}&:has(:invalid[data-validity-visible]){--focus-color:var(--wpds-color-stroke-interactive-error,#cc1818);border-color:var(--wpds-color-stroke-interactive-error,#cc1818);&:hover{border-color:var(--wpds-color-stroke-interactive-error-active,#9d0000)}}}.c192b41a12b4387b__slot-wrapper{display:contents}._0d7afad74a057888__input-layout-slot{align-items:center;display:flex;&._0c952682762ca288__is-padding-minimal{--wp-ui-input-layout-prefix-padding-start:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px));--wp-ui-input-layout-suffix-padding-end:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}[data-slot-type=prefix] &{padding-inline-start:var(--wp-ui-input-layout-prefix-padding-start,var(--wp-ui-input-layout-padding-inline))}[data-slot-type=suffix] &{padding-inline-end:var(--wp-ui-input-layout-suffix-padding-end,var(--wp-ui-input-layout-padding-inline))}}}}');
3696 5473 }
3697 - 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" };
3698 - var Link = (0, import_element6.forwardRef)(function Link2({
3699 - children,
3700 - variant = "default",
3701 - tone = "brand",
3702 - openInNewTab = false,
3703 - render,
3704 - className,
3705 - ...props
3706 - }, ref) {
3707 - const element = useRender({
3708 - render,
3709 - defaultTagName: "a",
3710 - ref,
3711 - props: mergeProps(props, {
5474 + var style_default4 = { "input-layout": "cb2baafdc08746bb__input-layout", "is-size-compact": "_0c807a84cbb94e0c__is-size-compact", "is-size-small": "ed67cda122dc1e7b__is-size-small", "is-disabled": "_6fb7104732387680__is-disabled", "is-borderless": "_8097270636ca6100__is-borderless", "input-layout-slot": "_0d7afad74a057888__input-layout-slot", "slot-wrapper": "c192b41a12b4387b__slot-wrapper", "is-padding-minimal": "_0c952682762ca288__is-padding-minimal" };
5475 + var InputLayout = (0, import_element7.forwardRef)(
5476 + function InputLayout2({
5477 + className,
5478 + children,
5479 + visuallyDisabled,
5480 + size = "default",
5481 + isBorderless,
5482 + prefix,
5483 + suffix,
5484 + ...restProps
5485 + }, ref) {
5486 + return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
5487 + "div",
5488 + {
5489 + ref,
5490 + className: clsx_default(
5491 + global_css_defense_default2.div,
5492 + resets_default2["box-sizing"],
5493 + style_default4["input-layout"],
5494 + style_default4[`is-size-${size}`],
5495 + visuallyDisabled && style_default4["is-disabled"],
5496 + isBorderless && style_default4["is-borderless"],
5497 + className
5498 + ),
5499 + ...restProps,
5500 + children: [
5501 + import_element7.Children.count(prefix) > 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5502 + "div",
5503 + {
5504 + className: style_default4["slot-wrapper"],
5505 + "data-slot-type": "prefix",
5506 + children: prefix
5507 + }
5508 + ),
5509 + children,
5510 + import_element7.Children.count(suffix) > 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5511 + "div",
5512 + {
5513 + className: style_default4["slot-wrapper"],
5514 + "data-slot-type": "suffix",
5515 + children: suffix
5516 + }
5517 + )
5518 + ]
5519 + }
5520 + );
5521 + }
5522 + );
5523 +
5524 + // packages/ui/build-module/form/primitives/input-layout/slot.mjs
5525 + var import_element8 = __toESM(require_element(), 1);
5526 + var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
5527 + var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash";
5528 + function getRuntime5() {
5529 + const globalScope = globalThis;
5530 + if (globalScope.__wpStyleRuntime) {
5531 + return globalScope.__wpStyleRuntime;
5532 + }
5533 + globalScope.__wpStyleRuntime = {
5534 + documents: /* @__PURE__ */ new Map(),
5535 + styles: /* @__PURE__ */ new Map(),
5536 + injectedStyles: /* @__PURE__ */ new WeakMap()
5537 + };
5538 + if (typeof document !== "undefined") {
5539 + registerDocument5(document);
5540 + }
5541 + return globalScope.__wpStyleRuntime;
5542 + }
5543 + function documentContainsStyleHash5(targetDocument, hash) {
5544 + if (!targetDocument.head) {
5545 + return false;
5546 + }
5547 + for (const style of targetDocument.head.querySelectorAll(
5548 + `style[${STYLE_HASH_ATTRIBUTE5}]`
5549 + )) {
5550 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) {
5551 + return true;
5552 + }
5553 + }
5554 + return false;
5555 + }
5556 + function injectStyle5(targetDocument, hash, css) {
5557 + if (!targetDocument.head) {
5558 + return;
5559 + }
5560 + const runtime = getRuntime5();
5561 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
5562 + if (!injectedStyles) {
5563 + injectedStyles = /* @__PURE__ */ new Set();
5564 + runtime.injectedStyles.set(targetDocument, injectedStyles);
5565 + }
5566 + if (injectedStyles.has(hash)) {
5567 + return;
5568 + }
5569 + if (documentContainsStyleHash5(targetDocument, hash)) {
5570 + injectedStyles.add(hash);
5571 + return;
5572 + }
5573 + const style = targetDocument.createElement("style");
5574 + style.setAttribute(STYLE_HASH_ATTRIBUTE5, hash);
5575 + style.appendChild(targetDocument.createTextNode(css));
5576 + targetDocument.head.appendChild(style);
5577 + injectedStyles.add(hash);
5578 + }
5579 + function registerDocument5(targetDocument) {
5580 + const runtime = getRuntime5();
5581 + runtime.documents.set(
5582 + targetDocument,
5583 + (runtime.documents.get(targetDocument) ?? 0) + 1
5584 + );
5585 + for (const [hash, css] of runtime.styles) {
5586 + injectStyle5(targetDocument, hash, css);
5587 + }
5588 + return () => {
5589 + const count = runtime.documents.get(targetDocument);
5590 + if (count === void 0) {
5591 + return;
5592 + }
5593 + if (count <= 1) {
5594 + runtime.documents.delete(targetDocument);
5595 + return;
5596 + }
5597 + runtime.documents.set(targetDocument, count - 1);
5598 + };
5599 + }
5600 + function registerStyle5(hash, css) {
5601 + const runtime = getRuntime5();
5602 + runtime.styles.set(hash, css);
5603 + for (const targetDocument of runtime.documents.keys()) {
5604 + injectStyle5(targetDocument, hash, css);
5605 + }
5606 + }
5607 + if (typeof process === "undefined" || true) {
5608 + registerStyle5("e4f4f9600b", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.cb2baafdc08746bb__input-layout{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-md,12px);background-color:var(--wpds-color-background-interactive-neutral,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:var(--wpds-border-width-xs,1px);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:max(var(--wpds-typography-font-size-md,13px),16px);height:var(--wpds-dimension-size-lg,40px);line-height:1;@media (min-width:600px){font-size:var(--wpds-typography-font-size-md,13px)}&._0c807a84cbb94e0c__is-size-compact{height:var(--wpds-dimension-size-md,32px)}&._0c807a84cbb94e0c__is-size-compact,&.ed67cda122dc1e7b__is-size-small{--wp-ui-input-layout-padding-inline:var(--wpds-dimension-padding-sm,8px)}&.ed67cda122dc1e7b__is-size-small{height:var(--wpds-dimension-size-sm,24px)}&._6fb7104732387680__is-disabled,&:has([data-can-disable-input-layout][data-disabled]){color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);@media (forced-colors:active){color:GrayText}&:not(._8097270636ca6100__is-borderless){background-color:var(--wpds-color-background-interactive-neutral-disabled,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText}}}&._8097270636ca6100__is-borderless{background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);border-color:transparent}&:has(._0d7afad74a057888__input-layout-slot:focus-within){--_gcd-div-outline:none;outline:none}&:hover:not(._6fb7104732387680__is-disabled,:has([data-can-disable-input-layout][data-disabled]),._8097270636ca6100__is-borderless){background-color:var(--wpds-color-background-interactive-neutral-active,var(--wpds-color-background-surface-neutral-strong,#fff));border-color:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e)}&:has(:invalid[data-validity-visible]){--focus-color:var(--wpds-color-stroke-interactive-error,#cc1818);border-color:var(--wpds-color-stroke-interactive-error,#cc1818);&:hover{border-color:var(--wpds-color-stroke-interactive-error-active,#9d0000)}}}.c192b41a12b4387b__slot-wrapper{display:contents}._0d7afad74a057888__input-layout-slot{align-items:center;display:flex;&._0c952682762ca288__is-padding-minimal{--wp-ui-input-layout-prefix-padding-start:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px));--wp-ui-input-layout-suffix-padding-end:calc(var(--wp-ui-input-layout-padding-inline) - var(--wpds-dimension-padding-xs, 4px))}[data-slot-type=prefix] &{padding-inline-start:var(--wp-ui-input-layout-prefix-padding-start,var(--wp-ui-input-layout-padding-inline))}[data-slot-type=suffix] &{padding-inline-end:var(--wp-ui-input-layout-suffix-padding-end,var(--wp-ui-input-layout-padding-inline))}}}}');
5609 + }
5610 + var style_default5 = { "input-layout": "cb2baafdc08746bb__input-layout", "is-size-compact": "_0c807a84cbb94e0c__is-size-compact", "is-size-small": "ed67cda122dc1e7b__is-size-small", "is-disabled": "_6fb7104732387680__is-disabled", "is-borderless": "_8097270636ca6100__is-borderless", "input-layout-slot": "_0d7afad74a057888__input-layout-slot", "slot-wrapper": "c192b41a12b4387b__slot-wrapper", "is-padding-minimal": "_0c952682762ca288__is-padding-minimal" };
5611 + var InputLayoutSlot = (0, import_element8.forwardRef)(function InputLayoutSlot2({ padding = "default", className, ...restProps }, ref) {
5612 + return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5613 + "div",
5614 + {
5615 + ref,
3712 5616 className: clsx_default(
3713 - global_css_defense_default.a,
3714 - resets_default["box-sizing"],
3715 - focus_default["outset-ring--focus-except-active"],
3716 - variant !== "unstyled" && style_default3.link,
3717 - variant !== "unstyled" && style_default3[`is-${tone}`],
3718 - variant === "unstyled" && style_default3["is-unstyled"],
5617 + style_default5["input-layout-slot"],
5618 + style_default5[`is-padding-${padding}`],
3719 5619 className
3720 5620 ),
3721 - target: openInNewTab ? "_blank" : void 0,
3722 - children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
3723 - children,
3724 - openInNewTab && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3725 - "span",
5621 + ...restProps
5622 + }
5623 + );
5624 + });
5625 + InputLayoutSlot.displayName = "InputLayout.Slot";
5626 +
5627 + // packages/ui/build-module/form/primitives/input-layout/index.mjs
5628 + var InputLayout3 = Object.assign(InputLayout, {
5629 + Slot: InputLayoutSlot
5630 + });
5631 +
5632 + // packages/ui/build-module/form/primitives/input/input.mjs
5633 + var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
5634 + var STYLE_HASH_ATTRIBUTE6 = "data-wp-hash";
5635 + function getRuntime6() {
5636 + const globalScope = globalThis;
5637 + if (globalScope.__wpStyleRuntime) {
5638 + return globalScope.__wpStyleRuntime;
5639 + }
5640 + globalScope.__wpStyleRuntime = {
5641 + documents: /* @__PURE__ */ new Map(),
5642 + styles: /* @__PURE__ */ new Map(),
5643 + injectedStyles: /* @__PURE__ */ new WeakMap()
5644 + };
5645 + if (typeof document !== "undefined") {
5646 + registerDocument6(document);
5647 + }
5648 + return globalScope.__wpStyleRuntime;
5649 + }
5650 + function documentContainsStyleHash6(targetDocument, hash) {
5651 + if (!targetDocument.head) {
5652 + return false;
5653 + }
5654 + for (const style of targetDocument.head.querySelectorAll(
5655 + `style[${STYLE_HASH_ATTRIBUTE6}]`
5656 + )) {
5657 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE6) === hash) {
5658 + return true;
5659 + }
5660 + }
5661 + return false;
5662 + }
5663 + function injectStyle6(targetDocument, hash, css) {
5664 + if (!targetDocument.head) {
5665 + return;
5666 + }
5667 + const runtime = getRuntime6();
5668 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
5669 + if (!injectedStyles) {
5670 + injectedStyles = /* @__PURE__ */ new Set();
5671 + runtime.injectedStyles.set(targetDocument, injectedStyles);
5672 + }
5673 + if (injectedStyles.has(hash)) {
5674 + return;
5675 + }
5676 + if (documentContainsStyleHash6(targetDocument, hash)) {
5677 + injectedStyles.add(hash);
5678 + return;
5679 + }
5680 + const style = targetDocument.createElement("style");
5681 + style.setAttribute(STYLE_HASH_ATTRIBUTE6, hash);
5682 + style.appendChild(targetDocument.createTextNode(css));
5683 + targetDocument.head.appendChild(style);
5684 + injectedStyles.add(hash);
5685 + }
5686 + function registerDocument6(targetDocument) {
5687 + const runtime = getRuntime6();
5688 + runtime.documents.set(
5689 + targetDocument,
5690 + (runtime.documents.get(targetDocument) ?? 0) + 1
5691 + );
5692 + for (const [hash, css] of runtime.styles) {
5693 + injectStyle6(targetDocument, hash, css);
5694 + }
5695 + return () => {
5696 + const count = runtime.documents.get(targetDocument);
5697 + if (count === void 0) {
5698 + return;
5699 + }
5700 + if (count <= 1) {
5701 + runtime.documents.delete(targetDocument);
5702 + return;
5703 + }
5704 + runtime.documents.set(targetDocument, count - 1);
5705 + };
5706 + }
5707 + function registerStyle6(hash, css) {
5708 + const runtime = getRuntime6();
5709 + runtime.styles.set(hash, css);
5710 + for (const targetDocument of runtime.documents.keys()) {
5711 + injectStyle6(targetDocument, hash, css);
5712 + }
5713 + }
5714 + if (typeof process === "undefined" || true) {
5715 + registerStyle6("e8e31009f5", "._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);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&: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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
5716 + }
5717 + var global_css_defense_default3 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
5718 + if (typeof process === "undefined" || true) {
5719 + registerStyle6("08122b3d53", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
5720 + }
5721 + var focus_module_default2 = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
5722 + if (typeof process === "undefined" || true) {
5723 + registerStyle6("1a25f6a232", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._2ae7be2fc1bb17a3__input{--_gcd-input-padding:var(--wp-ui-input-padding-block,0px) var(--wp-ui-input-layout-padding-inline,0px);background:transparent;border:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);font-family:inherit;font-size:inherit;line-height:inherit;outline:none;padding-block:var(--wp-ui-input-padding-block,0);padding-inline:var(--wp-ui-input-layout-padding-inline,0);width:100%;&::placeholder{color:var(--wpds-color-foreground-interactive-neutral-weak,#707070)}&:disabled,&[aria-disabled=true]{--_gcd-input-placeholder-color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);&::placeholder{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}@media (forced-colors:active){color:GrayText}}&[type=email],&[type=url]{direction:ltr}&[type=number]{appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{appearance:none;margin:0}}}}}");
5724 + }
5725 + var style_default6 = { "input": "_2ae7be2fc1bb17a3__input" };
5726 + var Input3 = (0, import_element9.forwardRef)(function Input22({ className, size = "default", prefix, suffix, style, ...restProps }, ref) {
5727 + return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5728 + InputLayout3,
5729 + {
5730 + className: clsx_default(
5731 + focus_module_default2["outset-ring--focus-within"],
5732 + className
5733 + ),
5734 + style,
5735 + size,
5736 + visuallyDisabled: restProps.disabled,
5737 + prefix,
5738 + suffix,
5739 + children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5740 + Input,
5741 + {
5742 + ref,
5743 + className: clsx_default(global_css_defense_default3.input, style_default6.input),
5744 + ...restProps
5745 + }
5746 + )
5747 + }
5748 + );
5749 + });
5750 +
5751 + // packages/ui/build-module/form/primitives/control-with-error/control-with-error.mjs
5752 + var import_i18n5 = __toESM(require_i18n(), 1);
5753 + var import_element11 = __toESM(require_element(), 1);
5754 +
5755 + // packages/ui/build-module/spinner/spinner.mjs
5756 + var import_element10 = __toESM(require_element(), 1);
5757 + var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
5758 + var STYLE_HASH_ATTRIBUTE7 = "data-wp-hash";
5759 + function getRuntime7() {
5760 + const globalScope = globalThis;
5761 + if (globalScope.__wpStyleRuntime) {
5762 + return globalScope.__wpStyleRuntime;
5763 + }
5764 + globalScope.__wpStyleRuntime = {
5765 + documents: /* @__PURE__ */ new Map(),
5766 + styles: /* @__PURE__ */ new Map(),
5767 + injectedStyles: /* @__PURE__ */ new WeakMap()
5768 + };
5769 + if (typeof document !== "undefined") {
5770 + registerDocument7(document);
5771 + }
5772 + return globalScope.__wpStyleRuntime;
5773 + }
5774 + function documentContainsStyleHash7(targetDocument, hash) {
5775 + if (!targetDocument.head) {
5776 + return false;
5777 + }
5778 + for (const style of targetDocument.head.querySelectorAll(
5779 + `style[${STYLE_HASH_ATTRIBUTE7}]`
5780 + )) {
5781 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE7) === hash) {
5782 + return true;
5783 + }
5784 + }
5785 + return false;
5786 + }
5787 + function injectStyle7(targetDocument, hash, css) {
5788 + if (!targetDocument.head) {
5789 + return;
5790 + }
5791 + const runtime = getRuntime7();
5792 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
5793 + if (!injectedStyles) {
5794 + injectedStyles = /* @__PURE__ */ new Set();
5795 + runtime.injectedStyles.set(targetDocument, injectedStyles);
5796 + }
5797 + if (injectedStyles.has(hash)) {
5798 + return;
5799 + }
5800 + if (documentContainsStyleHash7(targetDocument, hash)) {
5801 + injectedStyles.add(hash);
5802 + return;
5803 + }
5804 + const style = targetDocument.createElement("style");
5805 + style.setAttribute(STYLE_HASH_ATTRIBUTE7, hash);
5806 + style.appendChild(targetDocument.createTextNode(css));
5807 + targetDocument.head.appendChild(style);
5808 + injectedStyles.add(hash);
5809 + }
5810 + function registerDocument7(targetDocument) {
5811 + const runtime = getRuntime7();
5812 + runtime.documents.set(
5813 + targetDocument,
5814 + (runtime.documents.get(targetDocument) ?? 0) + 1
5815 + );
5816 + for (const [hash, css] of runtime.styles) {
5817 + injectStyle7(targetDocument, hash, css);
5818 + }
5819 + return () => {
5820 + const count = runtime.documents.get(targetDocument);
5821 + if (count === void 0) {
5822 + return;
5823 + }
5824 + if (count <= 1) {
5825 + runtime.documents.delete(targetDocument);
5826 + return;
5827 + }
5828 + runtime.documents.set(targetDocument, count - 1);
5829 + };
5830 + }
5831 + function registerStyle7(hash, css) {
5832 + const runtime = getRuntime7();
5833 + runtime.styles.set(hash, css);
5834 + for (const targetDocument of runtime.documents.keys()) {
5835 + injectStyle7(targetDocument, hash, css);
5836 + }
5837 + }
5838 + if (typeof process === "undefined" || true) {
5839 + registerStyle7("bbbecfe373", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.ab4d64c07c0ba587__spinner{background-color:transparent;display:inline-block;height:var(--wpds-dimension-size-2xs,16px);opacity:1;overflow:visible;position:relative;width:var(--wpds-dimension-size-2xs,16px)}.a7654e10245bb7d2__indicator,.dc51f80c84b35fe2__track{fill:transparent;stroke-width:1.5px}.dc51f80c84b35fe2__track{stroke:var(--wpds-color-background-track-neutral,#dbdbdb)}.a7654e10245bb7d2__indicator{stroke:var(--wpds-color-background-thumb-brand,var(--wp-admin-theme-color,#3858e9));stroke-linecap:round;animation:_02322d973909703c__spinner-spin 1.4s linear infinite both;transform-origin:50% 50%}@keyframes _02322d973909703c__spinner-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}}}");
5840 + }
5841 + var style_default7 = { "spinner": "ab4d64c07c0ba587__spinner", "track": "dc51f80c84b35fe2__track", "indicator": "a7654e10245bb7d2__indicator", "spinner-spin": "_02322d973909703c__spinner-spin" };
5842 + var Spinner = (0, import_element10.forwardRef)(
5843 + function Spinner2({ className, ...props }, ref) {
5844 + return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
5845 + "svg",
5846 + {
5847 + className: clsx_default(style_default7.spinner, className),
5848 + viewBox: "0 0 100 100",
5849 + xmlns: "http://www.w3.org/2000/svg",
5850 + role: "presentation",
5851 + focusable: "false",
5852 + ...props,
5853 + ref,
5854 + children: [
5855 + /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
5856 + "circle",
5857 + {
5858 + className: style_default7.track,
5859 + cx: "50",
5860 + cy: "50",
5861 + r: "50",
5862 + vectorEffect: "non-scaling-stroke"
5863 + }
5864 + ),
5865 + /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
5866 + "path",
5867 + {
5868 + className: style_default7.indicator,
5869 + d: "m 50 0 a 50 50 0 0 1 50 50",
5870 + vectorEffect: "non-scaling-stroke"
5871 + }
5872 + )
5873 + ]
5874 + }
5875 + );
5876 + }
5877 + );
5878 +
5879 + // packages/ui/build-module/form/primitives/validity-indicator/validity-indicator.mjs
5880 + var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
5881 + var STYLE_HASH_ATTRIBUTE8 = "data-wp-hash";
5882 + function getRuntime8() {
5883 + const globalScope = globalThis;
5884 + if (globalScope.__wpStyleRuntime) {
5885 + return globalScope.__wpStyleRuntime;
5886 + }
5887 + globalScope.__wpStyleRuntime = {
5888 + documents: /* @__PURE__ */ new Map(),
5889 + styles: /* @__PURE__ */ new Map(),
5890 + injectedStyles: /* @__PURE__ */ new WeakMap()
5891 + };
5892 + if (typeof document !== "undefined") {
5893 + registerDocument8(document);
5894 + }
5895 + return globalScope.__wpStyleRuntime;
5896 + }
5897 + function documentContainsStyleHash8(targetDocument, hash) {
5898 + if (!targetDocument.head) {
5899 + return false;
5900 + }
5901 + for (const style of targetDocument.head.querySelectorAll(
5902 + `style[${STYLE_HASH_ATTRIBUTE8}]`
5903 + )) {
5904 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE8) === hash) {
5905 + return true;
5906 + }
5907 + }
5908 + return false;
5909 + }
5910 + function injectStyle8(targetDocument, hash, css) {
5911 + if (!targetDocument.head) {
5912 + return;
5913 + }
5914 + const runtime = getRuntime8();
5915 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
5916 + if (!injectedStyles) {
5917 + injectedStyles = /* @__PURE__ */ new Set();
5918 + runtime.injectedStyles.set(targetDocument, injectedStyles);
5919 + }
5920 + if (injectedStyles.has(hash)) {
5921 + return;
5922 + }
5923 + if (documentContainsStyleHash8(targetDocument, hash)) {
5924 + injectedStyles.add(hash);
5925 + return;
5926 + }
5927 + const style = targetDocument.createElement("style");
5928 + style.setAttribute(STYLE_HASH_ATTRIBUTE8, hash);
5929 + style.appendChild(targetDocument.createTextNode(css));
5930 + targetDocument.head.appendChild(style);
5931 + injectedStyles.add(hash);
5932 + }
5933 + function registerDocument8(targetDocument) {
5934 + const runtime = getRuntime8();
5935 + runtime.documents.set(
5936 + targetDocument,
5937 + (runtime.documents.get(targetDocument) ?? 0) + 1
5938 + );
5939 + for (const [hash, css] of runtime.styles) {
5940 + injectStyle8(targetDocument, hash, css);
5941 + }
5942 + return () => {
5943 + const count = runtime.documents.get(targetDocument);
5944 + if (count === void 0) {
5945 + return;
5946 + }
5947 + if (count <= 1) {
5948 + runtime.documents.delete(targetDocument);
5949 + return;
5950 + }
5951 + runtime.documents.set(targetDocument, count - 1);
5952 + };
5953 + }
5954 + function registerStyle8(hash, css) {
5955 + const runtime = getRuntime8();
5956 + runtime.styles.set(hash, css);
5957 + for (const targetDocument of runtime.documents.keys()) {
5958 + injectStyle8(targetDocument, hash, css);
5959 + }
5960 + }
5961 + if (typeof process === "undefined" || true) {
5962 + registerStyle8("e8e31009f5", "._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);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&: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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
5963 + }
5964 + var global_css_defense_default4 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
5965 + if (typeof process === "undefined" || true) {
5966 + registerStyle8("d11816833c", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7a7ac88e306348e7__indicator{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);align-items:flex-start;color:var(--wpds-color-foreground-content-neutral-weak,#707070);display:flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);gap:var(--wpds-dimension-gap-xs,4px);line-height:var(--wpds-typography-line-height-xs,16px);@media not (prefers-reduced-motion){animation:_48722cc5dd090ce4__indicator-jump var(--wpds-motion-duration-md,.2s) cubic-bezier(.68,-.55,.27,1.55)}}._57a3bbbfbe38a5c6__is-invalid{color:var(--wpds-color-foreground-content-error-weak,#cc1818)}._9e944dc198aac10b__is-valid{color:var(--wpds-color-foreground-content-success-weak,#008030)}.e482806667437c6a__indicator-icon{flex-shrink:0}._6e46434cc23019d2__indicator-spinner{height:var(--wpds-dimension-size-3xs,12px);margin:2px;width:var(--wpds-dimension-size-3xs,12px)}@keyframes _48722cc5dd090ce4__indicator-jump{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}}}');
5967 + }
5968 + var style_default8 = { "indicator": "_7a7ac88e306348e7__indicator", "indicator-jump": "_48722cc5dd090ce4__indicator-jump", "is-invalid": "_57a3bbbfbe38a5c6__is-invalid", "is-valid": "_9e944dc198aac10b__is-valid", "indicator-icon": "e482806667437c6a__indicator-icon", "indicator-spinner": "_6e46434cc23019d2__indicator-spinner" };
5969 + var ICON = {
5970 + valid: published_default,
5971 + invalid: error_default
5972 + };
5973 + function ValidityIndicator({
5974 + id,
5975 + type,
5976 + message
5977 + }) {
5978 + return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
5979 + "p",
5980 + {
5981 + id,
5982 + className: clsx_default(
5983 + global_css_defense_default4.p,
5984 + style_default8.indicator,
5985 + style_default8[`is-${type}`]
5986 + ),
5987 + children: [
5988 + type === "validating" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Spinner, { className: style_default8["indicator-spinner"] }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5989 + Icon,
3726 5990 {
3727 - className: style_default3["link-icon"],
3728 - role: "img",
3729 - "aria-label": (
3730 - /* translators: accessibility text appended to link text */
3731 - (0, import_i18n3.__)("(opens in a new tab)")
3732 - )
5991 + className: style_default8["indicator-icon"],
5992 + icon: ICON[type],
5993 + size: 16,
5994 + fill: "currentColor"
3733 5995 }
3734 - )
5996 + ),
5997 + message
5998 + ]
5999 + }
6000 + );
6001 + }
6002 +
6003 + // packages/ui/build-module/form/primitives/control-with-error/control-with-error.mjs
6004 + var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
6005 + var DEFAULT_RENDER = (props) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Stack, { ...props, direction: "column", gap: "sm" });
6006 + function appendRequiredIndicator(label, required, markWhenOptional) {
6007 + let suffix;
6008 + if (required && !markWhenOptional) {
6009 + suffix = `(${(0, import_i18n5.__)("Required")})`;
6010 + } else if (!required && markWhenOptional) {
6011 + suffix = `(${(0, import_i18n5.__)("Optional")})`;
6012 + }
6013 + if (!suffix) {
6014 + return label;
6015 + }
6016 + if (typeof label === "string") {
6017 + return `${label} ${suffix}`;
6018 + }
6019 + return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
6020 + label,
6021 + " ",
6022 + suffix
6023 + ] });
6024 + }
6025 + var VALIDITY_VISIBLE_ATTRIBUTE = "data-validity-visible";
6026 + var ControlWithError = (0, import_element11.forwardRef)(function ControlWithError2({
6027 + required,
6028 + markWhenOptional,
6029 + customValidity,
6030 + getValidityTarget,
6031 + children,
6032 + render = DEFAULT_RENDER,
6033 + ...restProps
6034 + }, forwardedRef) {
6035 + const [errorMessage, setErrorMessage] = (0, import_element11.useState)();
6036 + const [statusMessage, setStatusMessage] = (0, import_element11.useState)();
6037 + const [showMessage, setShowMessage] = (0, import_element11.useState)(false);
6038 + const [isTouched, setIsTouched] = (0, import_element11.useState)(false);
6039 + const wrapperRef = (0, import_element11.useRef)(null);
6040 + (0, import_element11.useEffect)(() => {
6041 + const validityTarget = getValidityTarget();
6042 + const handler = () => {
6043 + if (customValidity?.type !== "validating") {
6044 + setErrorMessage(validityTarget?.validationMessage);
6045 + }
6046 + setShowMessage(true);
6047 + validityTarget?.setAttribute(VALIDITY_VISIBLE_ATTRIBUTE, "");
6048 + };
6049 + validityTarget?.addEventListener("invalid", handler);
6050 + return () => validityTarget?.removeEventListener("invalid", handler);
6051 + }, [customValidity?.type, getValidityTarget]);
6052 + (0, import_element11.useEffect)(() => {
6053 + const validityTarget = getValidityTarget();
6054 + const suppressNativePopover = (event) => {
6055 + event.preventDefault();
6056 + if (!event.isTrusted) {
6057 + return;
6058 + }
6059 + const target = event.target;
6060 + const firstErrorInForm = Array.from(
6061 + target.form?.elements ?? []
6062 + ).find((el) => !el.validity.valid);
6063 + if (!target.form || firstErrorInForm === target) {
6064 + target.focus();
6065 + }
6066 + };
6067 + const radioSiblings = validityTarget?.type === "radio" && validityTarget?.name ? Array.from(
6068 + wrapperRef.current?.querySelectorAll(
6069 + `input[type="radio"][name="${validityTarget?.name}"]`
6070 + ) ?? []
6071 + ).filter((sibling) => sibling !== validityTarget) : [];
6072 + validityTarget?.addEventListener("invalid", suppressNativePopover);
6073 + radioSiblings.forEach(
6074 + (sibling) => sibling.addEventListener("invalid", suppressNativePopover)
6075 + );
6076 + return () => {
6077 + validityTarget?.removeEventListener(
6078 + "invalid",
6079 + suppressNativePopover
6080 + );
6081 + radioSiblings.forEach(
6082 + (sibling) => sibling.removeEventListener("invalid", suppressNativePopover)
6083 + );
6084 + };
6085 + }, [getValidityTarget]);
6086 + (0, import_element11.useEffect)(() => {
6087 + const validityTarget = getValidityTarget();
6088 + if (!customValidity?.type) {
6089 + validityTarget?.setCustomValidity("");
6090 + setErrorMessage(validityTarget?.validationMessage);
6091 + setStatusMessage(void 0);
6092 + return;
6093 + }
6094 + switch (customValidity.type) {
6095 + case "validating": {
6096 + validityTarget?.setCustomValidity("");
6097 + setErrorMessage(void 0);
6098 + setStatusMessage({
6099 + type: "validating",
6100 + message: customValidity.message
6101 + });
6102 + break;
6103 + }
6104 + case "valid": {
6105 + validityTarget?.setCustomValidity("");
6106 + setErrorMessage(validityTarget?.validationMessage);
6107 + setStatusMessage({
6108 + type: "valid",
6109 + message: customValidity.message
6110 + });
6111 + break;
6112 + }
6113 + case "invalid": {
6114 + validityTarget?.setCustomValidity(
6115 + customValidity.message ?? ""
6116 + );
6117 + setErrorMessage(validityTarget?.validationMessage);
6118 + setStatusMessage(void 0);
6119 + break;
6120 + }
6121 + }
6122 + }, [customValidity, getValidityTarget]);
6123 + (0, import_element11.useEffect)(() => {
6124 + if (!isTouched || showMessage) {
6125 + return;
6126 + }
6127 + if (customValidity?.type === "validating") {
6128 + const timer = setTimeout(() => {
6129 + setShowMessage(true);
6130 + }, 1e3);
6131 + return () => clearTimeout(timer);
6132 + }
6133 + setShowMessage(true);
6134 + }, [isTouched, customValidity?.type, showMessage]);
6135 + const onBlur = (event) => {
6136 + if (event.relatedTarget && event.currentTarget.contains(event.relatedTarget)) {
6137 + return;
6138 + }
6139 + if (!isTouched) {
6140 + setIsTouched(true);
6141 + getValidityTarget()?.setAttribute(VALIDITY_VISIBLE_ATTRIBUTE, "");
6142 + }
6143 + const validityTarget = getValidityTarget();
6144 + const isValidating = customValidity?.type === "validating";
6145 + window.queueMicrotask(() => {
6146 + if (!isValidating) {
6147 + setErrorMessage(validityTarget?.validationMessage);
6148 + }
6149 + });
6150 + };
6151 + const messageId = (0, import_element11.useId)();
6152 + const message = (() => {
6153 + if (errorMessage) {
6154 + return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6155 + ValidityIndicator,
6156 + {
6157 + id: messageId,
6158 + type: "invalid",
6159 + message: errorMessage
6160 + }
6161 + );
6162 + }
6163 + if (statusMessage?.type) {
6164 + return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6165 + ValidityIndicator,
6166 + {
6167 + id: messageId,
6168 + type: statusMessage.type,
6169 + message: statusMessage.message
6170 + }
6171 + );
6172 + }
6173 + return null;
6174 + })();
6175 + const visibleMessage = showMessage ? message : null;
6176 + (0, import_element11.useEffect)(() => {
6177 + const target = getValidityTarget();
6178 + if (!target) {
6179 + return;
6180 + }
6181 + function setDescribedBy(el, shouldAdd) {
6182 + const ids = (el.getAttribute("aria-describedby") ?? "").split(" ").filter((id) => id && id !== messageId);
6183 + if (shouldAdd) {
6184 + ids.push(messageId);
6185 + }
6186 + if (ids.length) {
6187 + el.setAttribute("aria-describedby", ids.join(" "));
6188 + } else {
6189 + el.removeAttribute("aria-describedby");
6190 + }
6191 + }
6192 + setDescribedBy(target, !!visibleMessage);
6193 + return () => setDescribedBy(target, false);
6194 + }, [visibleMessage, messageId, getValidityTarget]);
6195 + return useRender({
6196 + render,
6197 + ref: [forwardedRef, wrapperRef],
6198 + props: mergeProps(restProps, {
6199 + onBlur,
6200 + children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
6201 + (0, import_element11.cloneElement)(children, {
6202 + label: appendRequiredIndicator(
6203 + children.props.label,
6204 + required,
6205 + markWhenOptional
6206 + ),
6207 + required
6208 + }),
6209 + visibleMessage
3735 6210 ] })
3736 6211 })
3737 6212 });
3738 - return element;
3739 6213 });
3740 6214
6215 + // packages/ui/build-module/form/primitives/field/index.mjs
6216 + var field_exports = {};
6217 + __export(field_exports, {
6218 + Control: () => Control,
6219 + Description: () => Description,
6220 + Details: () => Details,
6221 + Item: () => Item,
6222 + Label: () => Label,
6223 + Root: () => Root,
6224 + VisualLabel: () => VisualLabel
6225 + });
6226 +
6227 + // packages/ui/build-module/form/primitives/field/root.mjs
6228 + var import_element12 = __toESM(require_element(), 1);
6229 + var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
6230 + var STYLE_HASH_ATTRIBUTE9 = "data-wp-hash";
6231 + function getRuntime9() {
6232 + const globalScope = globalThis;
6233 + if (globalScope.__wpStyleRuntime) {
6234 + return globalScope.__wpStyleRuntime;
6235 + }
6236 + globalScope.__wpStyleRuntime = {
6237 + documents: /* @__PURE__ */ new Map(),
6238 + styles: /* @__PURE__ */ new Map(),
6239 + injectedStyles: /* @__PURE__ */ new WeakMap()
6240 + };
6241 + if (typeof document !== "undefined") {
6242 + registerDocument9(document);
6243 + }
6244 + return globalScope.__wpStyleRuntime;
6245 + }
6246 + function documentContainsStyleHash9(targetDocument, hash) {
6247 + if (!targetDocument.head) {
6248 + return false;
6249 + }
6250 + for (const style of targetDocument.head.querySelectorAll(
6251 + `style[${STYLE_HASH_ATTRIBUTE9}]`
6252 + )) {
6253 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE9) === hash) {
6254 + return true;
6255 + }
6256 + }
6257 + return false;
6258 + }
6259 + function injectStyle9(targetDocument, hash, css) {
6260 + if (!targetDocument.head) {
6261 + return;
6262 + }
6263 + const runtime = getRuntime9();
6264 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
6265 + if (!injectedStyles) {
6266 + injectedStyles = /* @__PURE__ */ new Set();
6267 + runtime.injectedStyles.set(targetDocument, injectedStyles);
6268 + }
6269 + if (injectedStyles.has(hash)) {
6270 + return;
6271 + }
6272 + if (documentContainsStyleHash9(targetDocument, hash)) {
6273 + injectedStyles.add(hash);
6274 + return;
6275 + }
6276 + const style = targetDocument.createElement("style");
6277 + style.setAttribute(STYLE_HASH_ATTRIBUTE9, hash);
6278 + style.appendChild(targetDocument.createTextNode(css));
6279 + targetDocument.head.appendChild(style);
6280 + injectedStyles.add(hash);
6281 + }
6282 + function registerDocument9(targetDocument) {
6283 + const runtime = getRuntime9();
6284 + runtime.documents.set(
6285 + targetDocument,
6286 + (runtime.documents.get(targetDocument) ?? 0) + 1
6287 + );
6288 + for (const [hash, css] of runtime.styles) {
6289 + injectStyle9(targetDocument, hash, css);
6290 + }
6291 + return () => {
6292 + const count = runtime.documents.get(targetDocument);
6293 + if (count === void 0) {
6294 + return;
6295 + }
6296 + if (count <= 1) {
6297 + runtime.documents.delete(targetDocument);
6298 + return;
6299 + }
6300 + runtime.documents.set(targetDocument, count - 1);
6301 + };
6302 + }
6303 + function registerStyle9(hash, css) {
6304 + const runtime = getRuntime9();
6305 + runtime.styles.set(hash, css);
6306 + for (const targetDocument of runtime.documents.keys()) {
6307 + injectStyle9(targetDocument, hash, css);
6308 + }
6309 + }
6310 + if (typeof process === "undefined" || true) {
6311 + registerStyle9("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");
6312 + }
6313 + var resets_default3 = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
6314 + var DEFAULT_RENDER2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Stack, { ...props, direction: "column", gap: "sm" });
6315 + var Root = (0, import_element12.forwardRef)(function Root2({ className, render = DEFAULT_RENDER2, ...restProps }, ref) {
6316 + return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6317 + index_parts_exports.Root,
6318 + {
6319 + ref,
6320 + className: clsx_default(resets_default3["box-sizing"], className),
6321 + render,
6322 + ...restProps
6323 + }
6324 + );
6325 + });
6326 +
6327 + // packages/ui/build-module/form/primitives/field/item.mjs
6328 + var import_element13 = __toESM(require_element(), 1);
6329 + var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
6330 + var Item = (0, import_element13.forwardRef)(function Item2(props, ref) {
6331 + return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(index_parts_exports.Item, { ref, ...props });
6332 + });
6333 +
6334 + // packages/ui/build-module/form/primitives/field/label.mjs
6335 + var import_element14 = __toESM(require_element(), 1);
6336 + var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
6337 + var STYLE_HASH_ATTRIBUTE10 = "data-wp-hash";
6338 + function getRuntime10() {
6339 + const globalScope = globalThis;
6340 + if (globalScope.__wpStyleRuntime) {
6341 + return globalScope.__wpStyleRuntime;
6342 + }
6343 + globalScope.__wpStyleRuntime = {
6344 + documents: /* @__PURE__ */ new Map(),
6345 + styles: /* @__PURE__ */ new Map(),
6346 + injectedStyles: /* @__PURE__ */ new WeakMap()
6347 + };
6348 + if (typeof document !== "undefined") {
6349 + registerDocument10(document);
6350 + }
6351 + return globalScope.__wpStyleRuntime;
6352 + }
6353 + function documentContainsStyleHash10(targetDocument, hash) {
6354 + if (!targetDocument.head) {
6355 + return false;
6356 + }
6357 + for (const style of targetDocument.head.querySelectorAll(
6358 + `style[${STYLE_HASH_ATTRIBUTE10}]`
6359 + )) {
6360 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE10) === hash) {
6361 + return true;
6362 + }
6363 + }
6364 + return false;
6365 + }
6366 + function injectStyle10(targetDocument, hash, css) {
6367 + if (!targetDocument.head) {
6368 + return;
6369 + }
6370 + const runtime = getRuntime10();
6371 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
6372 + if (!injectedStyles) {
6373 + injectedStyles = /* @__PURE__ */ new Set();
6374 + runtime.injectedStyles.set(targetDocument, injectedStyles);
6375 + }
6376 + if (injectedStyles.has(hash)) {
6377 + return;
6378 + }
6379 + if (documentContainsStyleHash10(targetDocument, hash)) {
6380 + injectedStyles.add(hash);
6381 + return;
6382 + }
6383 + const style = targetDocument.createElement("style");
6384 + style.setAttribute(STYLE_HASH_ATTRIBUTE10, hash);
6385 + style.appendChild(targetDocument.createTextNode(css));
6386 + targetDocument.head.appendChild(style);
6387 + injectedStyles.add(hash);
6388 + }
6389 + function registerDocument10(targetDocument) {
6390 + const runtime = getRuntime10();
6391 + runtime.documents.set(
6392 + targetDocument,
6393 + (runtime.documents.get(targetDocument) ?? 0) + 1
6394 + );
6395 + for (const [hash, css] of runtime.styles) {
6396 + injectStyle10(targetDocument, hash, css);
6397 + }
6398 + return () => {
6399 + const count = runtime.documents.get(targetDocument);
6400 + if (count === void 0) {
6401 + return;
6402 + }
6403 + if (count <= 1) {
6404 + runtime.documents.delete(targetDocument);
6405 + return;
6406 + }
6407 + runtime.documents.set(targetDocument, count - 1);
6408 + };
6409 + }
6410 + function registerStyle10(hash, css) {
6411 + const runtime = getRuntime10();
6412 + runtime.styles.set(hash, css);
6413 + for (const targetDocument of runtime.documents.keys()) {
6414 + injectStyle10(targetDocument, hash, css);
6415 + }
6416 + }
6417 + if (typeof process === "undefined" || true) {
6418 + registerStyle10("df33c48b2d", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-typography-line-height-xs,16px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-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-emphasis,600);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-typography-font-size-md,13px);font-weight:var(--wpds-typography-font-weight-default,400);text-transform:none}}._08a3750500e0233f__description{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);--_gcd-p-margin:0;text-wrap:pretty;color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
6419 + }
6420 + var field_default = { "label": "_2d5ad850b2f90964__label", "is-plain": "_17c4214649230bea__is-plain", "description": "_08a3750500e0233f__description" };
6421 + var Label = (0, import_element14.forwardRef)(
6422 + function Label2({ className, hideFromVision, variant, ...restProps }, ref) {
6423 + const label = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6424 + index_parts_exports.Label,
6425 + {
6426 + ref,
6427 + className: clsx_default(
6428 + field_default.label,
6429 + variant && field_default[`is-${variant}`],
6430 + className
6431 + ),
6432 + ...restProps
6433 + }
6434 + );
6435 + if (hideFromVision) {
6436 + return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(VisuallyHidden, { render: label });
6437 + }
6438 + return label;
6439 + }
6440 + );
6441 +
6442 + // packages/ui/build-module/form/primitives/field/description.mjs
6443 + var import_element15 = __toESM(require_element(), 1);
6444 + var import_jsx_runtime45 = __toESM(require_jsx_runtime(), 1);
6445 + var STYLE_HASH_ATTRIBUTE11 = "data-wp-hash";
6446 + function getRuntime11() {
6447 + const globalScope = globalThis;
6448 + if (globalScope.__wpStyleRuntime) {
6449 + return globalScope.__wpStyleRuntime;
6450 + }
6451 + globalScope.__wpStyleRuntime = {
6452 + documents: /* @__PURE__ */ new Map(),
6453 + styles: /* @__PURE__ */ new Map(),
6454 + injectedStyles: /* @__PURE__ */ new WeakMap()
6455 + };
6456 + if (typeof document !== "undefined") {
6457 + registerDocument11(document);
6458 + }
6459 + return globalScope.__wpStyleRuntime;
6460 + }
6461 + function documentContainsStyleHash11(targetDocument, hash) {
6462 + if (!targetDocument.head) {
6463 + return false;
6464 + }
6465 + for (const style of targetDocument.head.querySelectorAll(
6466 + `style[${STYLE_HASH_ATTRIBUTE11}]`
6467 + )) {
6468 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE11) === hash) {
6469 + return true;
6470 + }
6471 + }
6472 + return false;
6473 + }
6474 + function injectStyle11(targetDocument, hash, css) {
6475 + if (!targetDocument.head) {
6476 + return;
6477 + }
6478 + const runtime = getRuntime11();
6479 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
6480 + if (!injectedStyles) {
6481 + injectedStyles = /* @__PURE__ */ new Set();
6482 + runtime.injectedStyles.set(targetDocument, injectedStyles);
6483 + }
6484 + if (injectedStyles.has(hash)) {
6485 + return;
6486 + }
6487 + if (documentContainsStyleHash11(targetDocument, hash)) {
6488 + injectedStyles.add(hash);
6489 + return;
6490 + }
6491 + const style = targetDocument.createElement("style");
6492 + style.setAttribute(STYLE_HASH_ATTRIBUTE11, hash);
6493 + style.appendChild(targetDocument.createTextNode(css));
6494 + targetDocument.head.appendChild(style);
6495 + injectedStyles.add(hash);
6496 + }
6497 + function registerDocument11(targetDocument) {
6498 + const runtime = getRuntime11();
6499 + runtime.documents.set(
6500 + targetDocument,
6501 + (runtime.documents.get(targetDocument) ?? 0) + 1
6502 + );
6503 + for (const [hash, css] of runtime.styles) {
6504 + injectStyle11(targetDocument, hash, css);
6505 + }
6506 + return () => {
6507 + const count = runtime.documents.get(targetDocument);
6508 + if (count === void 0) {
6509 + return;
6510 + }
6511 + if (count <= 1) {
6512 + runtime.documents.delete(targetDocument);
6513 + return;
6514 + }
6515 + runtime.documents.set(targetDocument, count - 1);
6516 + };
6517 + }
6518 + function registerStyle11(hash, css) {
6519 + const runtime = getRuntime11();
6520 + runtime.styles.set(hash, css);
6521 + for (const targetDocument of runtime.documents.keys()) {
6522 + injectStyle11(targetDocument, hash, css);
6523 + }
6524 + }
6525 + if (typeof process === "undefined" || true) {
6526 + registerStyle11("e8e31009f5", "._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);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&: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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
6527 + }
6528 + var global_css_defense_default5 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
6529 + if (typeof process === "undefined" || true) {
6530 + registerStyle11("df33c48b2d", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-typography-line-height-xs,16px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-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-emphasis,600);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-typography-font-size-md,13px);font-weight:var(--wpds-typography-font-weight-default,400);text-transform:none}}._08a3750500e0233f__description{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);--_gcd-p-margin:0;text-wrap:pretty;color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
6531 + }
6532 + var field_default2 = { "label": "_2d5ad850b2f90964__label", "is-plain": "_17c4214649230bea__is-plain", "description": "_08a3750500e0233f__description" };
6533 + var Description = (0, import_element15.forwardRef)(function Description2({ className, ...restProps }, ref) {
6534 + return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6535 + index_parts_exports.Description,
6536 + {
6537 + ref,
6538 + className: clsx_default(
6539 + global_css_defense_default5.p,
6540 + field_default2.description,
6541 + className
6542 + ),
6543 + ...restProps
6544 + }
6545 + );
6546 + });
6547 +
6548 + // packages/ui/build-module/form/primitives/field/details.mjs
6549 + var import_element16 = __toESM(require_element(), 1);
6550 + var import_i18n6 = __toESM(require_i18n(), 1);
6551 + var import_jsx_runtime46 = __toESM(require_jsx_runtime(), 1);
6552 + var STYLE_HASH_ATTRIBUTE12 = "data-wp-hash";
6553 + function getRuntime12() {
6554 + const globalScope = globalThis;
6555 + if (globalScope.__wpStyleRuntime) {
6556 + return globalScope.__wpStyleRuntime;
6557 + }
6558 + globalScope.__wpStyleRuntime = {
6559 + documents: /* @__PURE__ */ new Map(),
6560 + styles: /* @__PURE__ */ new Map(),
6561 + injectedStyles: /* @__PURE__ */ new WeakMap()
6562 + };
6563 + if (typeof document !== "undefined") {
6564 + registerDocument12(document);
6565 + }
6566 + return globalScope.__wpStyleRuntime;
6567 + }
6568 + function documentContainsStyleHash12(targetDocument, hash) {
6569 + if (!targetDocument.head) {
6570 + return false;
6571 + }
6572 + for (const style of targetDocument.head.querySelectorAll(
6573 + `style[${STYLE_HASH_ATTRIBUTE12}]`
6574 + )) {
6575 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE12) === hash) {
6576 + return true;
6577 + }
6578 + }
6579 + return false;
6580 + }
6581 + function injectStyle12(targetDocument, hash, css) {
6582 + if (!targetDocument.head) {
6583 + return;
6584 + }
6585 + const runtime = getRuntime12();
6586 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
6587 + if (!injectedStyles) {
6588 + injectedStyles = /* @__PURE__ */ new Set();
6589 + runtime.injectedStyles.set(targetDocument, injectedStyles);
6590 + }
6591 + if (injectedStyles.has(hash)) {
6592 + return;
6593 + }
6594 + if (documentContainsStyleHash12(targetDocument, hash)) {
6595 + injectedStyles.add(hash);
6596 + return;
6597 + }
6598 + const style = targetDocument.createElement("style");
6599 + style.setAttribute(STYLE_HASH_ATTRIBUTE12, hash);
6600 + style.appendChild(targetDocument.createTextNode(css));
6601 + targetDocument.head.appendChild(style);
6602 + injectedStyles.add(hash);
6603 + }
6604 + function registerDocument12(targetDocument) {
6605 + const runtime = getRuntime12();
6606 + runtime.documents.set(
6607 + targetDocument,
6608 + (runtime.documents.get(targetDocument) ?? 0) + 1
6609 + );
6610 + for (const [hash, css] of runtime.styles) {
6611 + injectStyle12(targetDocument, hash, css);
6612 + }
6613 + return () => {
6614 + const count = runtime.documents.get(targetDocument);
6615 + if (count === void 0) {
6616 + return;
6617 + }
6618 + if (count <= 1) {
6619 + runtime.documents.delete(targetDocument);
6620 + return;
6621 + }
6622 + runtime.documents.set(targetDocument, count - 1);
6623 + };
6624 + }
6625 + function registerStyle12(hash, css) {
6626 + const runtime = getRuntime12();
6627 + runtime.styles.set(hash, css);
6628 + for (const targetDocument of runtime.documents.keys()) {
6629 + injectStyle12(targetDocument, hash, css);
6630 + }
6631 + }
6632 + if (typeof process === "undefined" || true) {
6633 + registerStyle12("df33c48b2d", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-typography-line-height-xs,16px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-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-emphasis,600);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-typography-font-size-md,13px);font-weight:var(--wpds-typography-font-weight-default,400);text-transform:none}}._08a3750500e0233f__description{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);--_gcd-p-margin:0;text-wrap:pretty;color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
6634 + }
6635 + var field_default3 = { "label": "_2d5ad850b2f90964__label", "is-plain": "_17c4214649230bea__is-plain", "description": "_08a3750500e0233f__description" };
6636 + var Details = (0, import_element16.forwardRef)(
6637 + function Details2({ className, ...restProps }, ref) {
6638 + return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
6639 + /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(VisuallyHidden, { render: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(index_parts_exports.Description, {}), children: (0, import_i18n6.__)("More details follow the field.") }),
6640 + /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6641 + "div",
6642 + {
6643 + ref,
6644 + className: clsx_default(field_default3.description, className),
6645 + ...restProps
6646 + }
6647 + )
6648 + ] });
6649 + }
6650 + );
6651 +
6652 + // packages/ui/build-module/form/primitives/field/control.mjs
6653 + var import_element17 = __toESM(require_element(), 1);
6654 + var import_jsx_runtime47 = __toESM(require_jsx_runtime(), 1);
6655 + var Control = (0, import_element17.forwardRef)(
6656 + function Control2(props, ref) {
6657 + return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(index_parts_exports.Control, { ref, ...props });
6658 + }
6659 + );
6660 +
6661 + // packages/ui/build-module/form/primitives/field/visual-label.mjs
6662 + var import_element18 = __toESM(require_element(), 1);
6663 + var STYLE_HASH_ATTRIBUTE13 = "data-wp-hash";
6664 + function getRuntime13() {
6665 + const globalScope = globalThis;
6666 + if (globalScope.__wpStyleRuntime) {
6667 + return globalScope.__wpStyleRuntime;
6668 + }
6669 + globalScope.__wpStyleRuntime = {
6670 + documents: /* @__PURE__ */ new Map(),
6671 + styles: /* @__PURE__ */ new Map(),
6672 + injectedStyles: /* @__PURE__ */ new WeakMap()
6673 + };
6674 + if (typeof document !== "undefined") {
6675 + registerDocument13(document);
6676 + }
6677 + return globalScope.__wpStyleRuntime;
6678 + }
6679 + function documentContainsStyleHash13(targetDocument, hash) {
6680 + if (!targetDocument.head) {
6681 + return false;
6682 + }
6683 + for (const style of targetDocument.head.querySelectorAll(
6684 + `style[${STYLE_HASH_ATTRIBUTE13}]`
6685 + )) {
6686 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE13) === hash) {
6687 + return true;
6688 + }
6689 + }
6690 + return false;
6691 + }
6692 + function injectStyle13(targetDocument, hash, css) {
6693 + if (!targetDocument.head) {
6694 + return;
6695 + }
6696 + const runtime = getRuntime13();
6697 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
6698 + if (!injectedStyles) {
6699 + injectedStyles = /* @__PURE__ */ new Set();
6700 + runtime.injectedStyles.set(targetDocument, injectedStyles);
6701 + }
6702 + if (injectedStyles.has(hash)) {
6703 + return;
6704 + }
6705 + if (documentContainsStyleHash13(targetDocument, hash)) {
6706 + injectedStyles.add(hash);
6707 + return;
6708 + }
6709 + const style = targetDocument.createElement("style");
6710 + style.setAttribute(STYLE_HASH_ATTRIBUTE13, hash);
6711 + style.appendChild(targetDocument.createTextNode(css));
6712 + targetDocument.head.appendChild(style);
6713 + injectedStyles.add(hash);
6714 + }
6715 + function registerDocument13(targetDocument) {
6716 + const runtime = getRuntime13();
6717 + runtime.documents.set(
6718 + targetDocument,
6719 + (runtime.documents.get(targetDocument) ?? 0) + 1
6720 + );
6721 + for (const [hash, css] of runtime.styles) {
6722 + injectStyle13(targetDocument, hash, css);
6723 + }
6724 + return () => {
6725 + const count = runtime.documents.get(targetDocument);
6726 + if (count === void 0) {
6727 + return;
6728 + }
6729 + if (count <= 1) {
6730 + runtime.documents.delete(targetDocument);
6731 + return;
6732 + }
6733 + runtime.documents.set(targetDocument, count - 1);
6734 + };
6735 + }
6736 + function registerStyle13(hash, css) {
6737 + const runtime = getRuntime13();
6738 + runtime.styles.set(hash, css);
6739 + for (const targetDocument of runtime.documents.keys()) {
6740 + injectStyle13(targetDocument, hash, css);
6741 + }
6742 + }
6743 + if (typeof process === "undefined" || true) {
6744 + registerStyle13("df33c48b2d", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._2d5ad850b2f90964__label{--wp-ui-field-label-line-height:var(--wpds-typography-line-height-xs,16px);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-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-emphasis,600);line-height:var(--wp-ui-field-label-line-height);text-transform:uppercase;&._17c4214649230bea__is-plain{font-size:var(--wpds-typography-font-size-md,13px);font-weight:var(--wpds-typography-font-weight-default,400);text-transform:none}}._08a3750500e0233f__description{--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);--_gcd-p-margin:0;text-wrap:pretty;color:var(--wpds-color-foreground-content-neutral-weak,#707070);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}');
6745 + }
6746 + var field_default4 = { "label": "_2d5ad850b2f90964__label", "is-plain": "_17c4214649230bea__is-plain", "description": "_08a3750500e0233f__description" };
6747 + var VisualLabel = (0, import_element18.forwardRef)(
6748 + function VisualLabel2({ className, render, variant, ...restProps }, ref) {
6749 + return useRender({
6750 + defaultTagName: "span",
6751 + render,
6752 + ref,
6753 + props: mergeProps(restProps, {
6754 + className: clsx_default(
6755 + field_default4.label,
6756 + variant && field_default4[`is-${variant}`],
6757 + className
6758 + )
6759 + })
6760 + });
6761 + }
6762 + );
6763 + VisualLabel.displayName = "Field.VisualLabel";
6764 +
6765 + // packages/ui/build-module/form/input-control/input-control.mjs
6766 + var import_element19 = __toESM(require_element(), 1);
6767 + var import_jsx_runtime48 = __toESM(require_jsx_runtime(), 1);
6768 + var STYLE_HASH_ATTRIBUTE14 = "data-wp-hash";
6769 + function getRuntime14() {
6770 + const globalScope = globalThis;
6771 + if (globalScope.__wpStyleRuntime) {
6772 + return globalScope.__wpStyleRuntime;
6773 + }
6774 + globalScope.__wpStyleRuntime = {
6775 + documents: /* @__PURE__ */ new Map(),
6776 + styles: /* @__PURE__ */ new Map(),
6777 + injectedStyles: /* @__PURE__ */ new WeakMap()
6778 + };
6779 + if (typeof document !== "undefined") {
6780 + registerDocument14(document);
6781 + }
6782 + return globalScope.__wpStyleRuntime;
6783 + }
6784 + function documentContainsStyleHash14(targetDocument, hash) {
6785 + if (!targetDocument.head) {
6786 + return false;
6787 + }
6788 + for (const style of targetDocument.head.querySelectorAll(
6789 + `style[${STYLE_HASH_ATTRIBUTE14}]`
6790 + )) {
6791 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE14) === hash) {
6792 + return true;
6793 + }
6794 + }
6795 + return false;
6796 + }
6797 + function injectStyle14(targetDocument, hash, css) {
6798 + if (!targetDocument.head) {
6799 + return;
6800 + }
6801 + const runtime = getRuntime14();
6802 + let injectedStyles = runtime.injectedStyles.get(targetDocument);
6803 + if (!injectedStyles) {
6804 + injectedStyles = /* @__PURE__ */ new Set();
6805 + runtime.injectedStyles.set(targetDocument, injectedStyles);
6806 + }
6807 + if (injectedStyles.has(hash)) {
6808 + return;
6809 + }
6810 + if (documentContainsStyleHash14(targetDocument, hash)) {
6811 + injectedStyles.add(hash);
6812 + return;
6813 + }
6814 + const style = targetDocument.createElement("style");
6815 + style.setAttribute(STYLE_HASH_ATTRIBUTE14, hash);
6816 + style.appendChild(targetDocument.createTextNode(css));
6817 + targetDocument.head.appendChild(style);
6818 + injectedStyles.add(hash);
6819 + }
6820 + function registerDocument14(targetDocument) {
6821 + const runtime = getRuntime14();
6822 + runtime.documents.set(
6823 + targetDocument,
6824 + (runtime.documents.get(targetDocument) ?? 0) + 1
6825 + );
6826 + for (const [hash, css] of runtime.styles) {
6827 + injectStyle14(targetDocument, hash, css);
6828 + }
6829 + return () => {
6830 + const count = runtime.documents.get(targetDocument);
6831 + if (count === void 0) {
6832 + return;
6833 + }
6834 + if (count <= 1) {
6835 + runtime.documents.delete(targetDocument);
6836 + return;
6837 + }
6838 + runtime.documents.set(targetDocument, count - 1);
6839 + };
6840 + }
6841 + function registerStyle14(hash, css) {
6842 + const runtime = getRuntime14();
6843 + runtime.styles.set(hash, css);
6844 + for (const targetDocument of runtime.documents.keys()) {
6845 + injectStyle14(targetDocument, hash, css);
6846 + }
6847 + }
6848 + if (typeof process === "undefined" || true) {
6849 + registerStyle14("0c752c3d08", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer compositions{@supports (-webkit-hyphens:none) and (not (-moz-appearance:none)){.a9211a7e6af24bed__root input[type=date]:not([data-filled]):not(:focus),.a9211a7e6af24bed__root input[type=datetime-local]:not([data-filled]):not(:focus),.a9211a7e6af24bed__root input[type=time]:not([data-filled]):not(:focus){--_gcd-input-color:transparent;--_gcd-input-color-disabled:transparent;color:transparent;&:disabled::-webkit-datetime-edit-text{color:transparent}}}}}");
6850 + }
6851 + var style_default9 = { "root": "a9211a7e6af24bed__root" };
6852 + var InputControl = (0, import_element19.forwardRef)(
6853 + function InputControl2({
6854 + className,
6855 + label,
6856 + description,
6857 + details,
6858 + hideLabelFromVision,
6859 + ...restProps
6860 + }, ref) {
6861 + return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(field_exports.Root, { className: clsx_default(style_default9.root, className), children: [
6862 + /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(field_exports.Label, { hideFromVision: hideLabelFromVision, children: label }),
6863 + /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Input3, { ref, ...restProps }),
6864 + description && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(field_exports.Description, { children: description }),
6865 + details && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(field_exports.Details, { children: details })
6866 + ] });
6867 + }
6868 + );
6869 +
6870 + // packages/ui/build-module/form/with-validation/validated-input-control/validated-input-control.mjs
6871 + var import_element20 = __toESM(require_element(), 1);
6872 + var import_compose2 = __toESM(require_compose(), 1);
6873 + var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
6874 + var ValidatedInputControl = (0, import_element20.forwardRef)(function ValidatedInputControl2({ required, markWhenOptional, customValidity, ...restProps }, forwardedRef) {
6875 + const validityTargetRef = (0, import_element20.useRef)(null);
6876 + const mergedRefs = (0, import_compose2.useMergeRefs)([forwardedRef, validityTargetRef]);
6877 + return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6878 + ControlWithError,
6879 + {
6880 + required,
6881 + markWhenOptional,
6882 + customValidity,
6883 + getValidityTarget: () => validityTargetRef.current,
6884 + children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(InputControl, { ref: mergedRefs, ...restProps })
6885 + }
6886 + );
6887 + });
6888 +
3741 6889 // packages/ui/build-module/tabs/index.mjs
3742 6890 var tabs_exports = {};
3743 6891 __export(tabs_exports, {
3744 6892 List: () => List,
3745 6893 Panel: () => Panel,
3746 - Root: () => Root,
6894 + Root: () => Root3,
3747 6895 Tab: () => Tab
3748 6896 });
3749 6897
3750 6898 // packages/ui/build-module/tabs/list.mjs
3751 - var import_element7 = __toESM(require_element(), 1);
3752 - var import_compose = __toESM(require_compose(), 1);
3753 - var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
3754 - var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash";
3755 - function getRuntime4() {
6899 + var import_element21 = __toESM(require_element(), 1);
6900 + var import_compose3 = __toESM(require_compose(), 1);
6901 + var import_jsx_runtime50 = __toESM(require_jsx_runtime(), 1);
6902 + var STYLE_HASH_ATTRIBUTE15 = "data-wp-hash";
6903 + function getRuntime15() {
3756 6904 const globalScope = globalThis;
3757 6905 if (globalScope.__wpStyleRuntime) {
3758 6906 return globalScope.__wpStyleRuntime;
3759 6907 }
@@ -3762,30 +6910,30 @@
3762 6910 styles: /* @__PURE__ */ new Map(),
3763 6911 injectedStyles: /* @__PURE__ */ new WeakMap()
3764 6912 };
3765 6913 if (typeof document !== "undefined") {
3766 - registerDocument4(document);
6914 + registerDocument15(document);
3767 6915 }
3768 6916 return globalScope.__wpStyleRuntime;
3769 6917 }
3770 - function documentContainsStyleHash4(targetDocument, hash) {
6918 + function documentContainsStyleHash15(targetDocument, hash) {
3771 6919 if (!targetDocument.head) {
3772 6920 return false;
3773 6921 }
3774 6922 for (const style of targetDocument.head.querySelectorAll(
3775 - `style[${STYLE_HASH_ATTRIBUTE4}]`
6923 + `style[${STYLE_HASH_ATTRIBUTE15}]`
3776 6924 )) {
3777 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) {
6925 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE15) === hash) {
3778 6926 return true;
3779 6927 }
3780 6928 }
3781 6929 return false;
3782 6930 }
3783 - function injectStyle4(targetDocument, hash, css) {
6931 + function injectStyle15(targetDocument, hash, css) {
3784 6932 if (!targetDocument.head) {
3785 6933 return;
3786 6934 }
3787 - const runtime = getRuntime4();
6935 + const runtime = getRuntime15();
3788 6936 let injectedStyles = runtime.injectedStyles.get(targetDocument);
3789 6937 if (!injectedStyles) {
3790 6938 injectedStyles = /* @__PURE__ */ new Set();
3791 6939 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -3792,26 +6940,26 @@
3792 6940 }
3793 6941 if (injectedStyles.has(hash)) {
3794 6942 return;
3795 6943 }
3796 - if (documentContainsStyleHash4(targetDocument, hash)) {
6944 + if (documentContainsStyleHash15(targetDocument, hash)) {
3797 6945 injectedStyles.add(hash);
3798 6946 return;
3799 6947 }
3800 6948 const style = targetDocument.createElement("style");
3801 - style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash);
6949 + style.setAttribute(STYLE_HASH_ATTRIBUTE15, hash);
3802 6950 style.appendChild(targetDocument.createTextNode(css));
3803 6951 targetDocument.head.appendChild(style);
3804 6952 injectedStyles.add(hash);
3805 6953 }
3806 - function registerDocument4(targetDocument) {
3807 - const runtime = getRuntime4();
6954 + function registerDocument15(targetDocument) {
6955 + const runtime = getRuntime15();
3808 6956 runtime.documents.set(
3809 6957 targetDocument,
3810 6958 (runtime.documents.get(targetDocument) ?? 0) + 1
3811 6959 );
3812 6960 for (const [hash, css] of runtime.styles) {
3813 - injectStyle4(targetDocument, hash, css);
6961 + injectStyle15(targetDocument, hash, css);
3814 6962 }
3815 6963 return () => {
3816 6964 const count = runtime.documents.get(targetDocument);
3817 6965 if (count === void 0) {
@@ -3823,21 +6971,21 @@
3823 6971 }
3824 6972 runtime.documents.set(targetDocument, count - 1);
3825 6973 };
3826 6974 }
3827 - function registerStyle4(hash, css) {
3828 - const runtime = getRuntime4();
6975 + function registerStyle15(hash, css) {
6976 + const runtime = getRuntime15();
3829 6977 runtime.styles.set(hash, css);
3830 6978 for (const targetDocument of runtime.documents.keys()) {
3831 - injectStyle4(targetDocument, hash, css);
6979 + injectStyle15(targetDocument, hash, css);
3832 6980 }
3833 6981 }
3834 6982 if (typeof process === "undefined" || true) {
3835 - registerStyle4("54ae3f4680", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7313adbc8a112e90__tablist{--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:transparent 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,transparent 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid transparent;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6e6e6e);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\n &[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:transparent;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:var(--wpds-dimension-size-lg,40px);padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\n [role=tab]:is([aria-selected=true])\n &{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}');
6983 + registerStyle15("54ae3f4680", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7313adbc8a112e90__tablist{--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:transparent 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,transparent 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid transparent;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6e6e6e);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\n &[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:transparent;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:var(--wpds-dimension-size-lg,40px);padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\n [role=tab]:is([aria-selected=true])\n &{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}');
3836 6984 }
3837 - var style_default4 = { "tablist": "_7313adbc8a112e90__tablist", "is-overflowing-first": "_9f2ac729c68a735a__is-overflowing-first", "is-overflowing-last": "_81c799c1f3cdd261__is-overflowing-last", "is-minimal-variant": "_59228b5227f38a99__is-minimal-variant", "indicator": "_1c37dcfaa1ad8cda__indicator", "tab": "a5fd8814f195aa5e__tab", "tab-children": "_5dfc77e6edd345d4__tab-children", "tab-chevron": "_4a20e969d15e5ac1__tab-chevron" };
6985 + var style_default10 = { "tablist": "_7313adbc8a112e90__tablist", "is-overflowing-first": "_9f2ac729c68a735a__is-overflowing-first", "is-overflowing-last": "_81c799c1f3cdd261__is-overflowing-last", "is-minimal-variant": "_59228b5227f38a99__is-minimal-variant", "indicator": "_1c37dcfaa1ad8cda__indicator", "tab": "a5fd8814f195aa5e__tab", "tab-children": "_5dfc77e6edd345d4__tab-children", "tab-chevron": "_4a20e969d15e5ac1__tab-chevron" };
3838 6986 var SCROLL_EPSILON = 1;
3839 - var List = (0, import_element7.forwardRef)(
6987 + var List = (0, import_element21.forwardRef)(
3840 6988 function TabList({
3841 6989 children,
3842 6990 variant = "default",
3843 6991 className,
@@ -3843,15 +6991,15 @@
3843 6991 className,
3844 6992 activateOnFocus,
3845 6993 ...otherProps
3846 6994 }, forwardedRef) {
3847 - const [listEl, setListEl] = (0, import_element7.useState)(null);
3848 - const [overflow, setOverflow] = (0, import_element7.useState)({
6995 + const [listEl, setListEl] = (0, import_element21.useState)(null);
6996 + const [overflow, setOverflow] = (0, import_element21.useState)({
3849 6997 first: false,
3850 6998 last: false,
3851 6999 isScrolling: false
3852 7000 });
3853 - (0, import_element7.useEffect)(() => {
7001 + (0, import_element21.useEffect)(() => {
3854 7002 if (!listEl) {
3855 7003 return;
3856 7004 }
3857 7005 const measureOverflow = () => {
@@ -3909,23 +7057,23 @@
3909 7057 resizeObserver.disconnect();
3910 7058 mutationObserver.disconnect();
3911 7059 };
3912 7060 }, [listEl]);
3913 - const mergedListRef = (0, import_compose.useMergeRefs)([
7061 + const mergedListRef = (0, import_compose3.useMergeRefs)([
3914 7062 forwardedRef,
3915 7063 (el) => setListEl(el)
3916 7064 ]);
3917 - return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
3918 - index_parts_exports.List,
7065 + return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
7066 + index_parts_exports2.List,
3919 7067 {
3920 7068 ref: mergedListRef,
3921 7069 activateOnFocus,
3922 7070 "data-select-on-move": activateOnFocus ? "true" : "false",
3923 7071 className: clsx_default(
3924 - style_default4.tablist,
3925 - overflow.first && style_default4["is-overflowing-first"],
3926 - overflow.last && style_default4["is-overflowing-last"],
3927 - style_default4[`is-${variant}-variant`],
7072 + style_default10.tablist,
7073 + overflow.first && style_default10["is-overflowing-first"],
7074 + overflow.last && style_default10["is-overflowing-last"],
7075 + style_default10[`is-${variant}-variant`],
3928 7076 className
3929 7077 ),
3930 7078 ...otherProps,
3931 7079 tabIndex: otherProps.tabIndex ?? (overflow.isScrolling ? -1 : void 0),
@@ -3930,9 +7078,9 @@
3930 7078 ...otherProps,
3931 7079 tabIndex: otherProps.tabIndex ?? (overflow.isScrolling ? -1 : void 0),
3932 7080 children: [
3933 7081 children,
3934 - /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(index_parts_exports.Indicator, { className: style_default4.indicator })
7082 + /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(index_parts_exports2.Indicator, { className: style_default10.indicator })
3935 7083 ]
3936 7084 }
3937 7085 );
3938 7086 }
@@ -3938,18 +7086,18 @@
3938 7086 }
3939 7087 );
3940 7088
3941 7089 // packages/ui/build-module/tabs/panel.mjs
3942 - var import_element9 = __toESM(require_element(), 1);
7090 + var import_element23 = __toESM(require_element(), 1);
3943 7091
3944 7092 // packages/ui/build-module/tabs/context.mjs
3945 - var import_element8 = __toESM(require_element(), 1);
3946 - var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1);
7093 + var import_element22 = __toESM(require_element(), 1);
7094 + var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
3947 7095 var VALIDATION_ENABLED = true;
3948 - var TabsValidationContext = VALIDATION_ENABLED ? (0, import_element8.createContext)(null) : null;
7096 + var TabsValidationContext = VALIDATION_ENABLED ? (0, import_element22.createContext)(null) : null;
3949 7097 function useRegisterTabDev() {
3950 - const context = (0, import_element8.useContext)(TabsValidationContext);
3951 - (0, import_element8.useEffect)(() => {
7098 + const context = (0, import_element22.useContext)(TabsValidationContext);
7099 + (0, import_element22.useEffect)(() => {
3952 7100 if (context) {
3953 7101 return context.registerTab();
3954 7102 }
3955 7103 return void 0;
@@ -3958,10 +7106,10 @@
3958 7106 function useRegisterTabProd() {
3959 7107 }
3960 7108 var useRegisterTab = VALIDATION_ENABLED ? useRegisterTabDev : useRegisterTabProd;
3961 7109 function useRegisterPanelDev() {
3962 - const context = (0, import_element8.useContext)(TabsValidationContext);
3963 - (0, import_element8.useEffect)(() => {
7110 + const context = (0, import_element22.useContext)(TabsValidationContext);
7111 + (0, import_element22.useEffect)(() => {
3964 7112 if (context) {
3965 7113 return context.registerPanel();
3966 7114 }
3967 7115 return void 0;
@@ -3972,10 +7120,10 @@
3972 7120 var useRegisterPanel = VALIDATION_ENABLED ? useRegisterPanelDev : useRegisterPanelProd;
3973 7121 function TabsValidationProviderDev({
3974 7122 children
3975 7123 }) {
3976 - const tabCountRef = (0, import_element8.useRef)(0);
3977 - const panelCountRef = (0, import_element8.useRef)(0);
7124 + const tabCountRef = (0, import_element22.useRef)(0);
7125 + const panelCountRef = (0, import_element22.useRef)(0);
3978 7126 const scheduleValidation = useScheduleValidation(() => {
3979 7127 const tabCount = tabCountRef.current;
3980 7128 const panelCount = panelCountRef.current;
3981 7129 if (tabCount !== panelCount) {
@@ -3983,9 +7131,9 @@
3983 7131 `Tabs: Tab/Panel count mismatch (${tabCount} Tabs, ${panelCount} Panels). Each Tab must be associated with exactly one Panel. Mismatched or missing associations can break screen reader navigation and violate WAI-ARIA Tabs pattern requirements.`
3984 7132 );
3985 7133 }
3986 7134 });
3987 - const registerTab = (0, import_element8.useCallback)(() => {
7135 + const registerTab = (0, import_element22.useCallback)(() => {
3988 7136 tabCountRef.current += 1;
3989 7137 scheduleValidation();
3990 7138 return () => {
3991 7139 tabCountRef.current -= 1;
@@ -3991,9 +7139,9 @@
3991 7139 tabCountRef.current -= 1;
3992 7140 scheduleValidation();
3993 7141 };
3994 7142 }, [scheduleValidation]);
3995 - const registerPanel = (0, import_element8.useCallback)(() => {
7143 + const registerPanel = (0, import_element22.useCallback)(() => {
3996 7144 panelCountRef.current += 1;
3997 7145 scheduleValidation();
3998 7146 return () => {
3999 7147 panelCountRef.current -= 1;
@@ -3999,9 +7147,9 @@
3999 7147 panelCountRef.current -= 1;
4000 7148 scheduleValidation();
4001 7149 };
4002 7150 }, [scheduleValidation]);
4003 - const contextValue = (0, import_element8.useMemo)(
7151 + const contextValue = (0, import_element22.useMemo)(
4004 7152 () => ({
4005 7153 registerTab,
4006 7154 registerPanel
4007 7155 }),
@@ -4006,21 +7154,21 @@
4006 7154 registerPanel
4007 7155 }),
4008 7156 [registerTab, registerPanel]
4009 7157 );
4010 - return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TabsValidationContext.Provider, { value: contextValue, children });
7158 + return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TabsValidationContext.Provider, { value: contextValue, children });
4011 7159 }
4012 7160 function TabsValidationProviderProd({
4013 7161 children
4014 7162 }) {
4015 - return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children });
7163 + return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx_runtime51.Fragment, { children });
4016 7164 }
4017 7165 var TabsValidationProvider = VALIDATION_ENABLED ? TabsValidationProviderDev : TabsValidationProviderProd;
4018 7166
4019 7167 // packages/ui/build-module/tabs/panel.mjs
4020 - var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1);
4021 - var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash";
4022 - function getRuntime5() {
7168 + var import_jsx_runtime52 = __toESM(require_jsx_runtime(), 1);
7169 + var STYLE_HASH_ATTRIBUTE16 = "data-wp-hash";
7170 + function getRuntime16() {
4023 7171 const globalScope = globalThis;
4024 7172 if (globalScope.__wpStyleRuntime) {
4025 7173 return globalScope.__wpStyleRuntime;
4026 7174 }
@@ -4029,30 +7177,30 @@
4029 7177 styles: /* @__PURE__ */ new Map(),
4030 7178 injectedStyles: /* @__PURE__ */ new WeakMap()
4031 7179 };
4032 7180 if (typeof document !== "undefined") {
4033 - registerDocument5(document);
7181 + registerDocument16(document);
4034 7182 }
4035 7183 return globalScope.__wpStyleRuntime;
4036 7184 }
4037 - function documentContainsStyleHash5(targetDocument, hash) {
7185 + function documentContainsStyleHash16(targetDocument, hash) {
4038 7186 if (!targetDocument.head) {
4039 7187 return false;
4040 7188 }
4041 7189 for (const style of targetDocument.head.querySelectorAll(
4042 - `style[${STYLE_HASH_ATTRIBUTE5}]`
7190 + `style[${STYLE_HASH_ATTRIBUTE16}]`
4043 7191 )) {
4044 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) {
7192 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE16) === hash) {
4045 7193 return true;
4046 7194 }
4047 7195 }
4048 7196 return false;
4049 7197 }
4050 - function injectStyle5(targetDocument, hash, css) {
7198 + function injectStyle16(targetDocument, hash, css) {
4051 7199 if (!targetDocument.head) {
4052 7200 return;
4053 7201 }
4054 - const runtime = getRuntime5();
7202 + const runtime = getRuntime16();
4055 7203 let injectedStyles = runtime.injectedStyles.get(targetDocument);
4056 7204 if (!injectedStyles) {
4057 7205 injectedStyles = /* @__PURE__ */ new Set();
4058 7206 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -4059,26 +7207,26 @@
4059 7207 }
4060 7208 if (injectedStyles.has(hash)) {
4061 7209 return;
4062 7210 }
4063 - if (documentContainsStyleHash5(targetDocument, hash)) {
7211 + if (documentContainsStyleHash16(targetDocument, hash)) {
4064 7212 injectedStyles.add(hash);
4065 7213 return;
4066 7214 }
4067 7215 const style = targetDocument.createElement("style");
4068 - style.setAttribute(STYLE_HASH_ATTRIBUTE5, hash);
7216 + style.setAttribute(STYLE_HASH_ATTRIBUTE16, hash);
4069 7217 style.appendChild(targetDocument.createTextNode(css));
4070 7218 targetDocument.head.appendChild(style);
4071 7219 injectedStyles.add(hash);
4072 7220 }
4073 - function registerDocument5(targetDocument) {
4074 - const runtime = getRuntime5();
7221 + function registerDocument16(targetDocument) {
7222 + const runtime = getRuntime16();
4075 7223 runtime.documents.set(
4076 7224 targetDocument,
4077 7225 (runtime.documents.get(targetDocument) ?? 0) + 1
4078 7226 );
4079 7227 for (const [hash, css] of runtime.styles) {
4080 - injectStyle5(targetDocument, hash, css);
7228 + injectStyle16(targetDocument, hash, css);
4081 7229 }
4082 7230 return () => {
4083 7231 const count = runtime.documents.get(targetDocument);
4084 7232 if (count === void 0) {
@@ -4090,33 +7238,33 @@
4090 7238 }
4091 7239 runtime.documents.set(targetDocument, count - 1);
4092 7240 };
4093 7241 }
4094 - function registerStyle5(hash, css) {
4095 - const runtime = getRuntime5();
7242 + function registerStyle16(hash, css) {
7243 + const runtime = getRuntime16();
4096 7244 runtime.styles.set(hash, css);
4097 7245 for (const targetDocument of runtime.documents.keys()) {
4098 - injectStyle5(targetDocument, hash, css);
7246 + injectStyle16(targetDocument, hash, css);
4099 7247 }
4100 7248 }
4101 7249 if (typeof process === "undefined" || true) {
4102 - registerStyle5("af6d9984a6", "._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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}");
7250 + registerStyle16("e8e31009f5", "._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);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&: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,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-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,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-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 transparent)}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-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));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 transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");
4103 7251 }
4104 - var global_css_defense_default2 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a" };
7252 + var global_css_defense_default6 = { "button": "_6defc79820e382c6__button", "input": "d2cff2e5dea83bd1__input", "textarea": "_547d86373d02e108__textarea", "div": "_8c15fd0ed9f28ba4__div", "p": "_43cec3e1eec1066d__p", "heading": "e97669c6d9a38497__heading", "a": "_2c0831b0499dbd6e__a", "ol": "c59a0ebebd71fa4a__ol", "li": "_46b5cb0c8e24e8c9__li" };
4105 7253 if (typeof process === "undefined" || true) {
4106 - registerStyle5("5f8e7aa0bc", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
7254 + registerStyle16("08122b3d53", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");
4107 7255 }
4108 - var focus_default2 = { "outset-ring--focus": "_08e8a2e44959f892__outset-ring--focus", "outset-ring--focus-except-active": "e25b2bdd7aa21721__outset-ring--focus-except-active", "outset-ring--focus-visible": "d0541bc9dd9dc7b6__outset-ring--focus-visible", "outset-ring--focus-within": "cd83dfc2126a0846__outset-ring--focus-within", "outset-ring--focus-within-except-active": "_970d04df7376df67__outset-ring--focus-within-except-active", "outset-ring--focus-within-visible": "c5cb3ee4bddaa8e4__outset-ring--focus-within-visible", "outset-ring--focus-parent-visible": "ecadb9e080e2dfa5__outset-ring--focus-parent-visible" };
4109 - var Panel = (0, import_element9.forwardRef)(
7256 + var focus_module_default3 = { "outset-ring--focus": "af79fb116edb0dd7__outset-ring--focus", "outset-ring--focus-visible": "dfcfdc28396e5d98__outset-ring--focus-visible", "outset-ring--focus-within": "e5cd9ee879f6403a__outset-ring--focus-within", "outset-ring--focus-parent-visible": "_81935a08e952f267__outset-ring--focus-parent-visible", "outset-ring--focus-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" };
7257 + var Panel = (0, import_element23.forwardRef)(
4110 7258 function TabPanel({ className, ...otherProps }, forwardedRef) {
4111 7259 useRegisterPanel();
4112 - return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
4113 - index_parts_exports.Panel,
7260 + return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7261 + index_parts_exports2.Panel,
4114 7262 {
4115 7263 ref: forwardedRef,
4116 7264 className: clsx_default(
4117 - global_css_defense_default2.div,
4118 - focus_default2["outset-ring--focus-visible"],
7265 + global_css_defense_default6.div,
7266 + focus_module_default3["outset-ring--focus-visible"],
4119 7267 className
4120 7268 ),
4121 7269 ...otherProps
4122 7270 }
@@ -4124,21 +7272,21 @@
4124 7272 }
4125 7273 );
4126 7274
4127 7275 // packages/ui/build-module/tabs/root.mjs
4128 - var import_element10 = __toESM(require_element(), 1);
4129 - var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1);
4130 - var Root = (0, import_element10.forwardRef)(
7276 + var import_element24 = __toESM(require_element(), 1);
7277 + var import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
7278 + var Root3 = (0, import_element24.forwardRef)(
4131 7279 function TabsRoot3({ ...otherProps }, forwardedRef) {
4132 - return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TabsValidationProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(index_parts_exports.Root, { ref: forwardedRef, ...otherProps }) });
7280 + return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DirectionProvider3, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TabsValidationProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(index_parts_exports2.Root, { ref: forwardedRef, ...otherProps }) }) });
4133 7281 }
4134 7282 );
4135 7283
4136 7284 // packages/ui/build-module/tabs/tab.mjs
4137 - var import_element11 = __toESM(require_element(), 1);
4138 - var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1);
4139 - var STYLE_HASH_ATTRIBUTE6 = "data-wp-hash";
4140 - function getRuntime6() {
7285 + var import_element25 = __toESM(require_element(), 1);
7286 + var import_jsx_runtime54 = __toESM(require_jsx_runtime(), 1);
7287 + var STYLE_HASH_ATTRIBUTE17 = "data-wp-hash";
7288 + function getRuntime17() {
4141 7289 const globalScope = globalThis;
4142 7290 if (globalScope.__wpStyleRuntime) {
4143 7291 return globalScope.__wpStyleRuntime;
4144 7292 }
@@ -4147,30 +7295,30 @@
4147 7295 styles: /* @__PURE__ */ new Map(),
4148 7296 injectedStyles: /* @__PURE__ */ new WeakMap()
4149 7297 };
4150 7298 if (typeof document !== "undefined") {
4151 - registerDocument6(document);
7299 + registerDocument17(document);
4152 7300 }
4153 7301 return globalScope.__wpStyleRuntime;
4154 7302 }
4155 - function documentContainsStyleHash6(targetDocument, hash) {
7303 + function documentContainsStyleHash17(targetDocument, hash) {
4156 7304 if (!targetDocument.head) {
4157 7305 return false;
4158 7306 }
4159 7307 for (const style of targetDocument.head.querySelectorAll(
4160 - `style[${STYLE_HASH_ATTRIBUTE6}]`
7308 + `style[${STYLE_HASH_ATTRIBUTE17}]`
4161 7309 )) {
4162 - if (style.getAttribute(STYLE_HASH_ATTRIBUTE6) === hash) {
7310 + if (style.getAttribute(STYLE_HASH_ATTRIBUTE17) === hash) {
4163 7311 return true;
4164 7312 }
4165 7313 }
4166 7314 return false;
4167 7315 }
4168 - function injectStyle6(targetDocument, hash, css) {
7316 + function injectStyle17(targetDocument, hash, css) {
4169 7317 if (!targetDocument.head) {
4170 7318 return;
4171 7319 }
4172 - const runtime = getRuntime6();
7320 + const runtime = getRuntime17();
4173 7321 let injectedStyles = runtime.injectedStyles.get(targetDocument);
4174 7322 if (!injectedStyles) {
4175 7323 injectedStyles = /* @__PURE__ */ new Set();
4176 7324 runtime.injectedStyles.set(targetDocument, injectedStyles);
@@ -4177,26 +7325,26 @@
4177 7325 }
4178 7326 if (injectedStyles.has(hash)) {
4179 7327 return;
4180 7328 }
4181 - if (documentContainsStyleHash6(targetDocument, hash)) {
7329 + if (documentContainsStyleHash17(targetDocument, hash)) {
4182 7330 injectedStyles.add(hash);
4183 7331 return;
4184 7332 }
4185 7333 const style = targetDocument.createElement("style");
4186 - style.setAttribute(STYLE_HASH_ATTRIBUTE6, hash);
7334 + style.setAttribute(STYLE_HASH_ATTRIBUTE17, hash);
4187 7335 style.appendChild(targetDocument.createTextNode(css));
4188 7336 targetDocument.head.appendChild(style);
4189 7337 injectedStyles.add(hash);
4190 7338 }
4191 - function registerDocument6(targetDocument) {
4192 - const runtime = getRuntime6();
7339 + function registerDocument17(targetDocument) {
7340 + const runtime = getRuntime17();
4193 7341 runtime.documents.set(
4194 7342 targetDocument,
4195 7343 (runtime.documents.get(targetDocument) ?? 0) + 1
4196 7344 );
4197 7345 for (const [hash, css] of runtime.styles) {
4198 - injectStyle6(targetDocument, hash, css);
7346 + injectStyle17(targetDocument, hash, css);
4199 7347 }
4200 7348 return () => {
4201 7349 const count = runtime.documents.get(targetDocument);
4202 7350 if (count === void 0) {
@@ -4208,30 +7356,30 @@
4208 7356 }
4209 7357 runtime.documents.set(targetDocument, count - 1);
4210 7358 };
4211 7359 }
4212 - function registerStyle6(hash, css) {
4213 - const runtime = getRuntime6();
7360 + function registerStyle17(hash, css) {
7361 + const runtime = getRuntime17();
4214 7362 runtime.styles.set(hash, css);
4215 7363 for (const targetDocument of runtime.documents.keys()) {
4216 - injectStyle6(targetDocument, hash, css);
7364 + injectStyle17(targetDocument, hash, css);
4217 7365 }
4218 7366 }
4219 7367 if (typeof process === "undefined" || true) {
4220 - registerStyle6("54ae3f4680", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7313adbc8a112e90__tablist{--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:transparent 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,transparent 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid transparent;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6e6e6e);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\n &[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:transparent;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:var(--wpds-dimension-size-lg,40px);padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\n [role=tab]:is([aria-selected=true])\n &{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}');
7368 + registerStyle17("54ae3f4680", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._7313adbc8a112e90__tablist{--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:transparent 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,transparent 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid transparent;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6e6e6e);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\n &[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:transparent;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:var(--wpds-dimension-size-lg,40px);padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\n [role=tab]:is([aria-selected=true])\n &{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}}');
4221 7369 }
4222 - var style_default5 = { "tablist": "_7313adbc8a112e90__tablist", "is-overflowing-first": "_9f2ac729c68a735a__is-overflowing-first", "is-overflowing-last": "_81c799c1f3cdd261__is-overflowing-last", "is-minimal-variant": "_59228b5227f38a99__is-minimal-variant", "indicator": "_1c37dcfaa1ad8cda__indicator", "tab": "a5fd8814f195aa5e__tab", "tab-children": "_5dfc77e6edd345d4__tab-children", "tab-chevron": "_4a20e969d15e5ac1__tab-chevron" };
4223 - var Tab = (0, import_element11.forwardRef)(function Tab2({ className, children, ...otherProps }, forwardedRef) {
7370 + var style_default11 = { "tablist": "_7313adbc8a112e90__tablist", "is-overflowing-first": "_9f2ac729c68a735a__is-overflowing-first", "is-overflowing-last": "_81c799c1f3cdd261__is-overflowing-last", "is-minimal-variant": "_59228b5227f38a99__is-minimal-variant", "indicator": "_1c37dcfaa1ad8cda__indicator", "tab": "a5fd8814f195aa5e__tab", "tab-children": "_5dfc77e6edd345d4__tab-children", "tab-chevron": "_4a20e969d15e5ac1__tab-chevron" };
7371 + var Tab = (0, import_element25.forwardRef)(function Tab2({ className, children, ...otherProps }, forwardedRef) {
4224 7372 useRegisterTab();
4225 - return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4226 - index_parts_exports.Tab,
7373 + return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
7374 + index_parts_exports2.Tab,
4227 7375 {
4228 7376 ref: forwardedRef,
4229 - className: clsx_default(style_default5.tab, className),
7377 + className: clsx_default(style_default11.tab, className),
4230 7378 ...otherProps,
4231 7379 children: [
4232 - /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: style_default5["tab-children"], children }),
4233 - /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { icon: chevron_right_default, className: style_default5["tab-chevron"] })
7380 + /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: style_default11["tab-children"], children }),
7381 + /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Icon, { icon: chevron_right_default, className: style_default11["tab-chevron"] })
4234 7382 ]
4235 7383 }
4236 7384 );
4237 7385 });
@@ -4236,16 +7384,16 @@
4236 7384 );
4237 7385 });
4238 7386
4239 7387 // packages/format-library/build-module/image/index.mjs
4240 - var import_i18n4 = __toESM(require_i18n(), 1);
4241 - var import_element12 = __toESM(require_element(), 1);
7388 + var import_i18n7 = __toESM(require_i18n(), 1);
7389 + var import_element26 = __toESM(require_element(), 1);
4242 7390 var import_rich_text3 = __toESM(require_rich_text(), 1);
4243 7391 var import_block_editor3 = __toESM(require_block_editor(), 1);
4244 - var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1);
7392 + var import_jsx_runtime55 = __toESM(require_jsx_runtime(), 1);
4245 7393 var ALLOWED_MEDIA_TYPES = ["image"];
4246 7394 var name3 = "core/image";
4247 - var title3 = (0, import_i18n4.__)("Inline image");
7395 + var title3 = (0, import_i18n7.__)("Inline image");
4248 7396 function getCurrentImageId(activeObjectAttributes) {
4249 7397 if (!activeObjectAttributes?.className) {
4250 7398 return void 0;
4251 7399 }
@@ -4254,9 +7402,9 @@
4254 7402 }
4255 7403 var image = {
4256 7404 name: name3,
4257 7405 title: title3,
4258 - keywords: [(0, import_i18n4.__)("photo"), (0, import_i18n4.__)("media")],
7406 + keywords: [(0, import_i18n7.__)("photo"), (0, import_i18n7.__)("media")],
4259 7407 object: true,
4260 7408 tagName: "img",
4261 7409 className: null,
4262 7410 attributes: {
@@ -4266,25 +7414,32 @@
4266 7414 alt: "alt"
4267 7415 },
4268 7416 edit: Edit
4269 7417 };
4270 - function InlineUI({ value, onChange, activeObjectAttributes, contentRef }) {
4271 - const { style, alt } = activeObjectAttributes;
7418 + function InlineUI({
7419 + value,
7420 + onChange,
7421 + activeObjectAttributes,
7422 + contentRef
7423 + }) {
7424 + const style = activeObjectAttributes?.style;
7425 + const alt = activeObjectAttributes?.alt;
4272 7426 const width = style?.replace(/\D/g, "");
4273 - const [editedWidth, setEditedWidth] = (0, import_element12.useState)(width);
4274 - const [editedAlt, setEditedAlt] = (0, import_element12.useState)(alt);
7427 + const [editedWidth, setEditedWidth] = (0, import_element26.useState)(width);
7428 + const [editedAlt, setEditedAlt] = (0, import_element26.useState)(alt);
4275 7429 const hasChanged = editedWidth !== width || editedAlt !== alt;
4276 7430 const popoverAnchor = (0, import_rich_text3.useAnchor)({
7431 + // eslint-disable-next-line react-hooks/refs
4277 7432 editableContentElement: contentRef.current,
4278 7433 settings: image
4279 7434 });
4280 - return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
7435 + return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4281 7436 import_components.Popover,
4282 7437 {
4283 7438 focusOnMount: false,
4284 7439 anchor: popoverAnchor,
4285 7440 className: "block-editor-format-toolbar__image-popover",
4286 - children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
7441 + children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4287 7442 "form",
4288 7443 {
4289 7444 className: "block-editor-format-toolbar__image-container-content",
4290 7445 onSubmit: (event) => {
@@ -4293,9 +7448,9 @@
4293 7448 type: name3,
4294 7449 attributes: {
4295 7450 ...activeObjectAttributes,
4296 7451 style: editedWidth ? `width: ${editedWidth}px;` : "",
4297 - alt: editedAlt
7452 + alt: editedAlt ?? ""
4298 7453 }
4299 7454 };
4300 7455 onChange({
4301 7456 ...value,
@@ -4302,13 +7457,13 @@
4302 7457 replacements: newReplacements
4303 7458 });
4304 7459 event.preventDefault();
4305 7460 },
4306 - children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Stack, { direction: "column", gap: "lg", children: [
4307 - /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
7461 + children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Stack, { direction: "column", gap: "lg", children: [
7462 + /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4308 7463 import_components.__experimentalNumberControl,
4309 7464 {
4310 - label: (0, import_i18n4.__)("Width"),
7465 + label: (0, import_i18n7.__)("Width"),
4311 7466 value: editedWidth,
4312 7467 min: 1,
4313 7468 onChange: (newWidth) => {
4314 7469 setEditedWidth(newWidth);
@@ -4314,38 +7469,38 @@
4314 7469 setEditedWidth(newWidth);
4315 7470 }
4316 7471 }
4317 7472 ),
4318 - /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
7473 + /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4319 7474 import_components.TextareaControl,
4320 7475 {
4321 - label: (0, import_i18n4.__)("Alternative text"),
4322 - value: editedAlt,
7476 + label: (0, import_i18n7.__)("Alternative text"),
7477 + value: editedAlt ?? "",
4323 7478 onChange: (newAlt) => {
4324 7479 setEditedAlt(newAlt);
4325 7480 },
4326 - help: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
4327 - /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
7481 + help: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
7482 + /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4328 7483 Link,
4329 7484 {
4330 7485 openInNewTab: true,
4331 7486 href: (
4332 7487 // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
4333 - (0, import_i18n4.__)(
7488 + (0, import_i18n7.__)(
4334 7489 "https://www.w3.org/WAI/tutorials/images/decision-tree/"
4335 7490 )
4336 7491 ),
4337 - children: (0, import_i18n4.__)(
7492 + children: (0, import_i18n7.__)(
4338 7493 "Describe the purpose of the image."
4339 7494 )
4340 7495 }
4341 7496 ),
4342 - /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("br", {}),
4343 - (0, import_i18n4.__)("Leave empty if decorative.")
7497 + /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("br", {}),
7498 + (0, import_i18n7.__)("Leave empty if decorative.")
4344 7499 ] })
4345 7500 }
4346 7501 ),
4347 - /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Stack, { justify: "right", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
7502 + /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Stack, { justify: "right", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4348 7503 import_components.Button,
4349 7504 {
4350 7505 disabled: !hasChanged,
4351 7506 accessibleWhenDisabled: true,
@@ -4351,9 +7506,9 @@
4351 7506 accessibleWhenDisabled: true,
4352 7507 variant: "primary",
4353 7508 type: "submit",
4354 7509 size: "compact",
4355 - children: (0, import_i18n4.__)("Apply")
7510 + children: (0, import_i18n7.__)("Apply")
4356 7511 }
4357 7512 ) })
4358 7513 ] })
4359 7514 }
@@ -4368,15 +7523,20 @@
4368 7523 isObjectActive,
4369 7524 activeObjectAttributes,
4370 7525 contentRef
4371 7526 }) {
4372 - return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_block_editor3.MediaUploadCheck, { children: [
4373 - /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
7527 + return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_block_editor3.MediaUploadCheck, { children: [
7528 + /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4374 7529 import_block_editor3.MediaUpload,
4375 7530 {
4376 7531 allowedTypes: ALLOWED_MEDIA_TYPES,
4377 7532 value: getCurrentImageId(activeObjectAttributes),
4378 - onSelect: ({ id, url, alt, width: imgWidth }) => {
7533 + onSelect: ({
7534 + id,
7535 + url,
7536 + alt,
7537 + width: imgWidth
7538 + }) => {
4379 7539 onChange(
4380 7540 (0, import_rich_text3.insertObject)(value, {
4381 7541 type: name3,
4382 7542 attributes: {
@@ -4391,20 +7551,13 @@
4391 7551 })
4392 7552 );
4393 7553 onFocus();
4394 7554 },
4395 - render: ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
7555 + render: ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4396 7556 import_block_editor3.RichTextToolbarButton,
4397 7557 {
4398 - icon: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4399 - import_components.SVG,
4400 - {
4401 - xmlns: "http://www.w3.org/2000/svg",
4402 - viewBox: "0 0 24 24",
4403 - children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components.Path, { d: "M4 18.5h16V17H4v1.5zM16 13v1.5h4V13h-4zM5.1 15h7.8c.6 0 1.1-.5 1.1-1.1V6.1c0-.6-.5-1.1-1.1-1.1H5.1C4.5 5 4 5.5 4 6.1v7.8c0 .6.5 1.1 1.1 1.1zm.4-8.5h7V10l-1-1c-.3-.3-.8-.3-1 0l-1.6 1.5-1.2-.7c-.3-.2-.6-.2-.9 0l-1.3 1V6.5zm0 6.1l1.8-1.3 1.3.8c.3.2.7.2.9-.1l1.5-1.4 1.5 1.4v1.5h-7v-.9z" })
4404 - }
4405 - ),
4406 - title: isObjectActive ? (0, import_i18n4.__)("Replace image") : title3,
7558 + icon: inline_image_default,
7559 + title: isObjectActive ? (0, import_i18n7.__)("Replace image") : title3,
4407 7560 onClick: open,
4408 7561 isActive: isObjectActive
4409 7562 }
4410 7563 )
@@ -4409,9 +7562,9 @@
4409 7562 }
4410 7563 )
4411 7564 }
4412 7565 ),
4413 - isObjectActive && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
7566 + isObjectActive && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4414 7567 InlineUI,
4415 7568 {
4416 7569 value,
4417 7570 onChange,
@@ -4422,29 +7575,35 @@
4422 7575 ] });
4423 7576 }
4424 7577
4425 7578 // packages/format-library/build-module/italic/index.mjs
4426 - var import_i18n5 = __toESM(require_i18n(), 1);
7579 + var import_i18n8 = __toESM(require_i18n(), 1);
4427 7580 var import_rich_text4 = __toESM(require_rich_text(), 1);
4428 7581 var import_block_editor4 = __toESM(require_block_editor(), 1);
4429 - var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1);
7582 + var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
4430 7583 var name4 = "core/italic";
4431 - var title4 = (0, import_i18n5.__)("Italic");
7584 + var title4 = (0, import_i18n8.__)("Italic");
4432 7585 var italic = {
4433 7586 name: name4,
4434 7587 title: title4,
4435 7588 tagName: "em",
4436 7589 className: null,
4437 - edit({ isActive, value, onChange, onFocus, isVisible = true }) {
7590 + edit({
7591 + isActive,
7592 + value,
7593 + onChange,
7594 + onFocus,
7595 + isVisible = true
7596 + }) {
4438 7597 function onToggle() {
4439 7598 onChange((0, import_rich_text4.toggleFormat)(value, { type: name4, title: title4 }));
4440 7599 }
4441 7600 function onClick() {
4442 - onChange((0, import_rich_text4.toggleFormat)(value, { type: name4 }));
7601 + onChange((0, import_rich_text4.toggleFormat)(value, { type: name4, title: title4 }));
4443 7602 onFocus();
4444 7603 }
4445 - return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
4446 - /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
7604 + return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
7605 + /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4447 7606 import_block_editor4.RichTextShortcut,
4448 7607 {
4449 7608 type: "primary",
4450 7609 character: "i",
@@ -4450,9 +7609,9 @@
4450 7609 character: "i",
4451 7610 onUse: onToggle
4452 7611 }
4453 7612 ),
4454 - isVisible && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
7613 + isVisible && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4455 7614 import_block_editor4.RichTextToolbarButton,
4456 7615 {
4457 7616 name: "italic",
4458 7617 icon: format_italic_default,
@@ -4462,9 +7621,9 @@
4462 7621 shortcutType: "primary",
4463 7622 shortcutCharacter: "i"
4464 7623 }
4465 7624 ),
4466 - /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
7625 + /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4467 7626 import_block_editor4.__unstableRichTextInputEvent,
4468 7627 {
4469 7628 inputType: "formatItalic",
4470 7629 onInput: onToggle
@@ -4474,10 +7633,10 @@
4474 7633 }
4475 7634 };
4476 7635
4477 7636 // packages/format-library/build-module/link/index.mjs
4478 - var import_i18n8 = __toESM(require_i18n(), 1);
4479 - var import_element15 = __toESM(require_element(), 1);
7637 + var import_i18n11 = __toESM(require_i18n(), 1);
7638 + var import_element29 = __toESM(require_element(), 1);
4480 7639 var import_rich_text6 = __toESM(require_rich_text(), 1);
4481 7640 var import_url3 = __toESM(require_url(), 1);
4482 7641 var import_block_editor6 = __toESM(require_block_editor(), 1);
4483 7642 var import_html_entities = __toESM(require_html_entities(), 1);
@@ -4483,10 +7642,10 @@
4483 7642 var import_html_entities = __toESM(require_html_entities(), 1);
4484 7643 var import_a11y2 = __toESM(require_a11y(), 1);
4485 7644
4486 7645 // packages/format-library/build-module/link/inline.mjs
4487 - var import_element14 = __toESM(require_element(), 1);
4488 - var import_i18n7 = __toESM(require_i18n(), 1);
7646 + var import_element28 = __toESM(require_element(), 1);
7647 + var import_i18n10 = __toESM(require_i18n(), 1);
4489 7648 var import_a11y = __toESM(require_a11y(), 1);
4490 7649 var import_components3 = __toESM(require_components(), 1);
4491 7650 var import_url2 = __toESM(require_url(), 1);
4492 7651 var import_rich_text5 = __toESM(require_rich_text(), 1);
@@ -4504,9 +7663,9 @@
4504 7663 return false;
4505 7664 }
4506 7665 if (/^\S+:/.test(trimmedHref)) {
4507 7666 const protocol = (0, import_url.getProtocol)(trimmedHref);
4508 - if (!(0, import_url.isValidProtocol)(protocol)) {
7667 + if (!protocol || !(0, import_url.isValidProtocol)(protocol)) {
4509 7668 return false;
4510 7669 }
4511 7670 if (protocol.startsWith("http") && !/^https?:\/\/[^\/\s]/i.test(trimmedHref)) {
4512 7671 return false;
@@ -4511,9 +7670,9 @@
4511 7670 if (protocol.startsWith("http") && !/^https?:\/\/[^\/\s]/i.test(trimmedHref)) {
4512 7671 return false;
4513 7672 }
4514 7673 const authority = (0, import_url.getAuthority)(trimmedHref);
4515 - if (!(0, import_url.isValidAuthority)(authority)) {
7674 + if (!authority || !(0, import_url.isValidAuthority)(authority)) {
4516 7675 return false;
4517 7676 }
4518 7677 const path = (0, import_url.getPath)(trimmedHref);
4519 7678 if (path && !(0, import_url.isValidPath)(path)) {
@@ -4598,12 +7757,11 @@
4598 7757 initialIndex = endIndex - 1;
4599 7758 } else {
4600 7759 return EMPTY_BOUNDARIES;
4601 7760 }
4602 - const index = newFormats[initialIndex].indexOf(targetFormat);
4603 - const walkingArgs = [newFormats, initialIndex, targetFormat, index];
4604 - startIndex = walkToStart(...walkingArgs);
4605 - endIndex = walkToEnd(...walkingArgs);
7761 + const index2 = newFormats[initialIndex].indexOf(targetFormat);
7762 + startIndex = walkToStart(newFormats, initialIndex, targetFormat, index2);
7763 + endIndex = walkToEnd(newFormats, initialIndex, targetFormat, index2);
4606 7764 startIndex = startIndex < 0 ? 0 : startIndex;
4607 7765 return {
4608 7766 start: startIndex,
4609 7767 end: endIndex + 1
@@ -4609,9 +7767,9 @@
4609 7767 end: endIndex + 1
4610 7768 };
4611 7769 }
4612 7770 function walkToBoundary(formats, initialIndex, targetFormatRef, formatIndex, direction) {
4613 - let index = initialIndex;
7771 + let index2 = initialIndex;
4614 7772 const directions = {
4615 7773 forwards: 1,
4616 7774 backwards: -1
4617 7775 };
@@ -4616,28 +7774,31 @@
4616 7774 backwards: -1
4617 7775 };
4618 7776 const directionIncrement = directions[direction] || 1;
4619 7777 const inverseDirectionIncrement = directionIncrement * -1;
4620 - while (formats[index] && formats[index][formatIndex] === targetFormatRef) {
4621 - index = index + directionIncrement;
7778 + while (formats[index2] && formats[index2][formatIndex] === targetFormatRef) {
7779 + index2 = index2 + directionIncrement;
4622 7780 }
4623 - index = index + inverseDirectionIncrement;
4624 - return index;
7781 + index2 = index2 + inverseDirectionIncrement;
7782 + return index2;
4625 7783 }
4626 - var partialRight = (fn, ...partialArgs) => (...args) => fn(...args, ...partialArgs);
4627 - var walkToStart = partialRight(walkToBoundary, "backwards");
4628 - var walkToEnd = partialRight(walkToBoundary, "forwards");
7784 + var walkToStart = (...args) => walkToBoundary(...args, "backwards");
7785 + var walkToEnd = (...args) => walkToBoundary(...args, "forwards");
4629 7786
4630 7787 // packages/format-library/build-module/link/css-classes-setting.mjs
4631 - var import_element13 = __toESM(require_element(), 1);
4632 - var import_compose2 = __toESM(require_compose(), 1);
4633 - var import_i18n6 = __toESM(require_i18n(), 1);
7788 + var import_element27 = __toESM(require_element(), 1);
7789 + var import_compose4 = __toESM(require_compose(), 1);
7790 + var import_i18n9 = __toESM(require_i18n(), 1);
4634 7791 var import_components2 = __toESM(require_components(), 1);
4635 - var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1);
4636 - var CSSClassesSettingComponent = ({ setting, value, onChange }) => {
4637 - const hasValue = value ? value?.cssClasses?.length > 0 : false;
4638 - const [isSettingActive, setIsSettingActive] = (0, import_element13.useState)(hasValue);
4639 - const instanceId = (0, import_compose2.useInstanceId)(CSSClassesSettingComponent);
7792 + var import_jsx_runtime57 = __toESM(require_jsx_runtime(), 1);
7793 + var CSSClassesSettingComponent = ({
7794 + setting,
7795 + value,
7796 + onChange
7797 + }) => {
7798 + const hasValue = !!value?.cssClasses?.length;
7799 + const [isSettingActive, setIsSettingActive] = (0, import_element27.useState)(hasValue);
7800 + const instanceId = (0, import_compose4.useInstanceId)(CSSClassesSettingComponent);
4640 7801 const controlledRegionId = `css-classes-setting-${instanceId}`;
4641 7802 const handleSettingChange = (newValue) => {
4642 7803 const sanitizedValue = typeof newValue === "string" ? newValue.replace(/,/g, " ").replace(/\s+/g, " ").trim() : newValue;
4643 7804 onChange({
@@ -4654,12 +7815,12 @@
4654 7815 } else {
4655 7816 setIsSettingActive(true);
4656 7817 }
4657 7818 };
4658 - return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("fieldset", { children: [
4659 - /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(VisuallyHidden, { render: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("legend", {}), children: setting.title }),
4660 - /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Stack, { direction: "column", gap: "md", children: [
4661 - /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
7819 + return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("fieldset", { children: [
7820 + /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(VisuallyHidden, { render: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("legend", {}), children: setting.title }),
7821 + /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Stack, { direction: "column", gap: "md", children: [
7822 + /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4662 7823 import_components2.CheckboxControl,
4663 7824 {
4664 7825 label: setting.title,
4665 7826 onChange: handleCheckboxChange,
@@ -4667,15 +7828,15 @@
4667 7828 "aria-expanded": isSettingActive,
4668 7829 "aria-controls": isSettingActive ? controlledRegionId : void 0
4669 7830 }
4670 7831 ),
4671 - isSettingActive && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { id: controlledRegionId, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
7832 + isSettingActive && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { id: controlledRegionId, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4672 7833 import_components2.__experimentalInputControl,
4673 7834 {
4674 - label: (0, import_i18n6.__)("CSS classes"),
7835 + label: (0, import_i18n9.__)("CSS classes"),
4675 7836 value: value?.cssClasses,
4676 7837 onChange: handleSettingChange,
4677 - help: (0, import_i18n6.__)(
7838 + help: (0, import_i18n9.__)(
4678 7839 "Separate multiple classes with spaces."
4679 7840 ),
4680 7841 __unstableInputWidth: "100%"
4681 7842 }
@@ -4685,28 +7846,26 @@
4685 7846 };
4686 7847 var css_classes_setting_default = CSSClassesSettingComponent;
4687 7848
4688 7849 // packages/format-library/build-module/link/inline.mjs
4689 - var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1);
7850 + var import_jsx_runtime58 = __toESM(require_jsx_runtime(), 1);
4690 7851 var LINK_SETTINGS = [
4691 7852 ...import_block_editor5.LinkControl.DEFAULT_LINK_SETTINGS,
4692 7853 {
4693 7854 id: "nofollow",
4694 - title: (0, import_i18n7.__)("Mark as nofollow")
7855 + title: (0, import_i18n10.__)("Mark as nofollow")
4695 7856 },
4696 7857 {
4697 7858 id: "cssClasses",
4698 - title: (0, import_i18n7.__)("Additional CSS class(es)"),
4699 - render: (setting, value, onChange) => {
4700 - return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4701 - css_classes_setting_default,
4702 - {
4703 - setting,
4704 - value,
4705 - onChange
4706 - }
4707 - );
4708 - }
7859 + title: (0, import_i18n10.__)("Additional CSS class(es)"),
7860 + render: (setting, value, onChange) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
7861 + css_classes_setting_default,
7862 + {
7863 + setting,
7864 + value,
7865 + onChange
7866 + }
7867 + )
4709 7868 }
4710 7869 ];
4711 7870 function InlineLinkUI({
4712 7871 isActive,
@@ -4732,9 +7891,9 @@
4732 7891 };
4733 7892 },
4734 7893 []
4735 7894 );
4736 - const linkValue = (0, import_element14.useMemo)(
7895 + const linkValue = (0, import_element28.useMemo)(
4737 7896 () => ({
4738 7897 url: activeAttributes.url,
4739 7898 type: activeAttributes.type,
4740 7899 id: activeAttributes.id,
@@ -4756,9 +7915,9 @@
4756 7915 function removeLink() {
4757 7916 const newValue = (0, import_rich_text5.removeFormat)(value, "core/link");
4758 7917 onChange(newValue);
4759 7918 stopAddingLink();
4760 - (0, import_a11y.speak)((0, import_i18n7.__)("Link removed."), "assertive");
7919 + (0, import_a11y.speak)((0, import_i18n10.__)("Link removed."), "assertive");
4761 7920 }
4762 7921 function onChangeLink(nextValue) {
4763 7922 const hasLink = linkValue?.url;
4764 7923 const isNewLink = !hasLink;
@@ -4765,9 +7924,9 @@
4765 7924 nextValue = {
4766 7925 ...linkValue,
4767 7926 ...nextValue
4768 7927 };
4769 - const newUrl = (0, import_url2.prependHTTPS)(nextValue.url);
7928 + const newUrl = (0, import_url2.prependHTTPS)(nextValue?.url ?? "");
4770 7929 const linkFormat = createLinkFormat({
4771 7930 url: newUrl,
4772 7931 type: nextValue.type,
4773 7932 id: nextValue.id !== void 0 && nextValue.id !== null ? String(nextValue.id) : void 0,
@@ -4808,13 +7967,13 @@
4808 7967 newValue = (0, import_rich_text5.applyFormat)(newValue, linkFormat, 0, newText.length);
4809 7968 const boundary = getFormatBoundary(value, {
4810 7969 type: "core/link"
4811 7970 });
4812 - const [valBefore, valAfter] = (0, import_rich_text5.split)(
4813 - value,
4814 - boundary.start,
4815 - boundary.start
4816 - );
7971 + const splitValue = (0, import_rich_text5.split)(value, boundary.start, boundary.start);
7972 + if (!splitValue) {
7973 + return;
7974 + }
7975 + const [valBefore, valAfter] = splitValue;
4817 7976 const newValAfter = (0, import_rich_text5.replace)(valAfter, richTextText, newValue);
4818 7977 newValue = (0, import_rich_text5.concat)(valBefore, newValAfter);
4819 7978 }
4820 7979 onChange(newValue);
@@ -4822,25 +7981,24 @@
4822 7981 stopAddingLink();
4823 7982 }
4824 7983 if (!isValidHref(newUrl)) {
4825 7984 (0, import_a11y.speak)(
4826 - (0, import_i18n7.__)(
7985 + (0, import_i18n10.__)(
4827 7986 "Warning: the link has been inserted but may have errors. Please test it."
4828 7987 ),
4829 7988 "assertive"
4830 7989 );
4831 7990 } else if (isActive) {
4832 - (0, import_a11y.speak)((0, import_i18n7.__)("Link edited."), "assertive");
7991 + (0, import_a11y.speak)((0, import_i18n10.__)("Link edited."), "assertive");
4833 7992 } else {
4834 - (0, import_a11y.speak)((0, import_i18n7.__)("Link inserted."), "assertive");
7993 + (0, import_a11y.speak)((0, import_i18n10.__)("Link inserted."), "assertive");
4835 7994 }
4836 7995 }
7996 + const anchorSettings = { ...link, isActive };
4837 7997 const popoverAnchor = (0, import_rich_text5.useAnchor)({
7998 + // eslint-disable-next-line react-hooks/refs
4838 7999 editableContentElement: contentRef.current,
4839 - settings: {
4840 - ...link,
4841 - isActive
4842 - }
8000 + settings: anchorSettings
4843 8001 });
4844 8002 async function handleCreate(pageTitle) {
4845 8003 const page = await createPageEntity({
4846 8004 title: pageTitle,
@@ -4854,18 +8012,18 @@
4854 8012 kind: "post-type"
4855 8013 };
4856 8014 }
4857 8015 function createButtonText(searchTerm) {
4858 - return (0, import_element14.createInterpolateElement)(
4859 - (0, import_i18n7.sprintf)(
8016 + return (0, import_element28.createInterpolateElement)(
8017 + (0, import_i18n10.sprintf)(
4860 8018 /* translators: %s: search term. */
4861 - (0, import_i18n7.__)("Create page: <mark>%s</mark>"),
8019 + (0, import_i18n10.__)("Create page: <mark>%s</mark>"),
4862 8020 searchTerm
4863 8021 ),
4864 - { mark: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("mark", {}) }
8022 + { mark: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("mark", {}) }
4865 8023 );
4866 8024 }
4867 - return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
8025 + return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4868 8026 import_components3.Popover,
4869 8027 {
4870 8028 anchor: popoverAnchor,
4871 8029 animate: false,
@@ -4875,9 +8033,9 @@
4875 8033 offset: 8,
4876 8034 shift: true,
4877 8035 focusOnMount,
4878 8036 constrainTabbing: true,
4879 - children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
8037 + children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4880 8038 import_block_editor5.LinkControl,
4881 8039 {
4882 8040 value: linkValue,
4883 8041 onChange: onChangeLink,
@@ -4908,10 +8066,10 @@
4908 8066 if (isActive) {
4909 8067 const boundary = getFormatBoundary(value, {
4910 8068 type: "core/link"
4911 8069 });
4912 - textStart = boundary.start;
4913 - textEnd = boundary.end;
8070 + textStart = boundary.start ?? value.start;
8071 + textEnd = boundary.end ?? value.end;
4914 8072 }
4915 8073 return (0, import_rich_text5.slice)(value, textStart, textEnd);
4916 8074 }
4917 8075 var inline_default = InlineLinkUI;
@@ -4916,11 +8074,11 @@
4916 8074 }
4917 8075 var inline_default = InlineLinkUI;
4918 8076
4919 8077 // packages/format-library/build-module/link/index.mjs
4920 - var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1);
8078 + var import_jsx_runtime59 = __toESM(require_jsx_runtime(), 1);
4921 8079 var name5 = "core/link";
4922 - var title5 = (0, import_i18n8.__)("Link");
8080 + var title5 = (0, import_i18n11.__)("Link");
4923 8081 function Edit2({
4924 8082 isActive,
4925 8083 activeAttributes,
4926 8084 value,
@@ -4928,22 +8086,24 @@
4928 8086 onFocus,
4929 8087 contentRef,
4930 8088 isVisible = true
4931 8089 }) {
4932 - const [addingLink, setAddingLink] = (0, import_element15.useState)(false);
4933 - const [openedBy, setOpenedBy] = (0, import_element15.useState)(null);
4934 - (0, import_element15.useEffect)(() => {
8090 + const [addingLink, setAddingLink] = (0, import_element29.useState)(false);
8091 + const [openedBy, setOpenedBy] = (0, import_element29.useState)(null);
8092 + (0, import_element29.useEffect)(() => {
4935 8093 if (!isActive) {
4936 8094 setAddingLink(false);
4937 8095 }
4938 8096 }, [isActive]);
4939 - (0, import_element15.useLayoutEffect)(() => {
8097 + (0, import_element29.useLayoutEffect)(() => {
4940 8098 const editableContentElement = contentRef.current;
4941 8099 if (!editableContentElement) {
4942 8100 return;
4943 8101 }
4944 8102 function handleClick(event) {
4945 - const link2 = event.target.closest("[contenteditable] a");
8103 + const link2 = event.target.closest(
8104 + "[contenteditable] a"
8105 + );
4946 8106 if (!link2 || // other formats (e.g. bold) may be nested within the link.
4947 8107 !isActive) {
4948 8108 return;
4949 8109 }
@@ -5006,14 +8166,14 @@
5006 8166 setOpenedBy(null);
5007 8167 }
5008 8168 function onRemoveFormat() {
5009 8169 onChange((0, import_rich_text6.removeFormat)(value, name5));
5010 - (0, import_a11y2.speak)((0, import_i18n8.__)("Link removed."), "assertive");
8170 + (0, import_a11y2.speak)((0, import_i18n11.__)("Link removed."), "assertive");
5011 8171 }
5012 8172 const shouldAutoFocus = !(openedBy?.el?.tagName === "A" && openedBy?.action === "click");
5013 8173 const hasSelection = !(0, import_rich_text6.isCollapsed)(value);
5014 - return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
5015 - hasSelection && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
8174 + return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
8175 + hasSelection && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5016 8176 import_block_editor6.RichTextShortcut,
5017 8177 {
5018 8178 type: "primary",
5019 8179 character: "k",
@@ -5019,9 +8179,9 @@
5019 8179 character: "k",
5020 8180 onUse: addLink
5021 8181 }
5022 8182 ),
5023 - /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
8183 + /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5024 8184 import_block_editor6.RichTextShortcut,
5025 8185 {
5026 8186 type: "primaryShift",
5027 8187 character: "k",
@@ -5027,14 +8187,14 @@
5027 8187 character: "k",
5028 8188 onUse: onRemoveFormat
5029 8189 }
5030 8190 ),
5031 - isVisible && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
8191 + isVisible && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5032 8192 import_block_editor6.RichTextToolbarButton,
5033 8193 {
5034 8194 name: "link",
5035 8195 icon: link_default,
5036 - title: isActive ? (0, import_i18n8.__)("Link") : title5,
8196 + title: isActive ? (0, import_i18n11.__)("Link") : title5,
5037 8197 onClick: (event) => {
5038 8198 addLink(event.currentTarget);
5039 8199 },
5040 8200 isActive: isActive || addingLink,
@@ -5043,9 +8203,9 @@
5043 8203 "aria-haspopup": "true",
5044 8204 "aria-expanded": addingLink
5045 8205 }
5046 8206 ),
5047 - isVisible && addingLink && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
8207 + isVisible && addingLink && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5048 8208 inline_default,
5049 8209 {
5050 8210 stopAddingLink,
5051 8211 onFocusOutside,
@@ -5101,14 +8261,14 @@
5101 8261 edit: Edit2
5102 8262 };
5103 8263
5104 8264 // packages/format-library/build-module/strikethrough/index.mjs
5105 - var import_i18n9 = __toESM(require_i18n(), 1);
8265 + var import_i18n12 = __toESM(require_i18n(), 1);
5106 8266 var import_rich_text7 = __toESM(require_rich_text(), 1);
5107 8267 var import_block_editor7 = __toESM(require_block_editor(), 1);
5108 - var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1);
8268 + var import_jsx_runtime60 = __toESM(require_jsx_runtime(), 1);
5109 8269 var name6 = "core/strikethrough";
5110 - var title6 = (0, import_i18n9.__)("Strikethrough");
8270 + var title6 = (0, import_i18n12.__)("Strikethrough");
5111 8271 var strikethrough = {
5112 8272 name: name6,
5113 8273 title: title6,
5114 8274 tagName: "s",
@@ -5117,10 +8277,10 @@
5117 8277 function onClick() {
5118 8278 onChange((0, import_rich_text7.toggleFormat)(value, { type: name6, title: title6 }));
5119 8279 onFocus();
5120 8280 }
5121 - return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
5122 - /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
8281 + return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
8282 + /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
5123 8283 import_block_editor7.RichTextShortcut,
5124 8284 {
5125 8285 type: "access",
5126 8286 character: "d",
@@ -5126,9 +8286,9 @@
5126 8286 character: "d",
5127 8287 onUse: onClick
5128 8288 }
5129 8289 ),
5130 - /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
8290 + /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
5131 8291 import_block_editor7.RichTextToolbarButton,
5132 8292 {
5133 8293 icon: format_strikethrough_default,
5134 8294 title: title6,
@@ -5141,14 +8301,14 @@
5141 8301 }
5142 8302 };
5143 8303
5144 8304 // packages/format-library/build-module/underline/index.mjs
5145 - var import_i18n10 = __toESM(require_i18n(), 1);
8305 + var import_i18n13 = __toESM(require_i18n(), 1);
5146 8306 var import_rich_text8 = __toESM(require_rich_text(), 1);
5147 8307 var import_block_editor8 = __toESM(require_block_editor(), 1);
5148 - var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1);
8308 + var import_jsx_runtime61 = __toESM(require_jsx_runtime(), 1);
5149 8309 var name7 = "core/underline";
5150 - var title7 = (0, import_i18n10.__)("Underline");
8310 + var title7 = (0, import_i18n13.__)("Underline");
5151 8311 var underline = {
5152 8312 name: name7,
5153 8313 title: title7,
5154 8314 tagName: "span",
@@ -5167,10 +8327,10 @@
5167 8327 title: title7
5168 8328 })
5169 8329 );
5170 8330 };
5171 - return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
5172 - /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
8331 + return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
8332 + /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5173 8333 import_block_editor8.RichTextShortcut,
5174 8334 {
5175 8335 type: "primary",
5176 8336 character: "u",
@@ -5176,9 +8336,9 @@
5176 8336 character: "u",
5177 8337 onUse: onToggle
5178 8338 }
5179 8339 ),
5180 - /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
8340 + /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5181 8341 import_block_editor8.__unstableRichTextInputEvent,
5182 8342 {
5183 8343 inputType: "formatUnderline",
5184 8344 onInput: onToggle
@@ -5188,38 +8348,41 @@
5188 8348 }
5189 8349 };
5190 8350
5191 8351 // packages/format-library/build-module/text-color/index.mjs
5192 - var import_i18n12 = __toESM(require_i18n(), 1);
5193 - var import_element17 = __toESM(require_element(), 1);
8352 + var import_i18n15 = __toESM(require_i18n(), 1);
8353 + var import_element31 = __toESM(require_element(), 1);
5194 8354 var import_block_editor10 = __toESM(require_block_editor(), 1);
5195 8355 var import_rich_text10 = __toESM(require_rich_text(), 1);
5196 8356
5197 8357 // packages/format-library/build-module/text-color/inline.mjs
5198 - var import_element16 = __toESM(require_element(), 1);
8358 + var import_element30 = __toESM(require_element(), 1);
5199 8359 var import_data2 = __toESM(require_data(), 1);
5200 8360 var import_rich_text9 = __toESM(require_rich_text(), 1);
5201 8361 var import_block_editor9 = __toESM(require_block_editor(), 1);
5202 8362 var import_components4 = __toESM(require_components(), 1);
5203 - var import_i18n11 = __toESM(require_i18n(), 1);
5204 - var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1);
8363 + var import_i18n14 = __toESM(require_i18n(), 1);
8364 + var import_jsx_runtime62 = __toESM(require_jsx_runtime(), 1);
5205 8365 var TABS = [
5206 - { name: "color", title: (0, import_i18n11.__)("Text") },
5207 - { name: "backgroundColor", title: (0, import_i18n11.__)("Background") }
8366 + { name: "color", title: (0, import_i18n14.__)("Text") },
8367 + { name: "backgroundColor", title: (0, import_i18n14.__)("Background") }
5208 8368 ];
5209 8369 function parseCSS(css = "") {
5210 - return css.split(";").reduce((accumulator, rule) => {
5211 - if (rule) {
5212 - const [property, value] = rule.split(":");
5213 - if (property === "color") {
5214 - accumulator.color = value;
8370 + return css.split(";").reduce(
8371 + (accumulator, rule) => {
8372 + if (rule) {
8373 + const [property, value] = rule.split(":");
8374 + if (property === "color") {
8375 + accumulator.color = value;
8376 + }
8377 + if (property === "background-color" && value !== transparentValue) {
8378 + accumulator.backgroundColor = value;
8379 + }
5215 8380 }
5216 - if (property === "background-color" && value !== transparentValue) {
5217 - accumulator.backgroundColor = value;
5218 - }
5219 - }
5220 - return accumulator;
5221 - }, {});
8381 + return accumulator;
8382 + },
8383 + {}
8384 + );
5222 8385 }
5223 8386 function parseClassName(className = "", colorSettings) {
5224 8387 return className.split(" ").reduce((accumulator, name16) => {
5225 8388 if (name16.startsWith("has-") && name16.endsWith("-color")) {
@@ -5238,10 +8401,10 @@
5238 8401 if (!activeColorFormat) {
5239 8402 return {};
5240 8403 }
5241 8404 return {
5242 - ...parseCSS(activeColorFormat.attributes.style),
5243 - ...parseClassName(activeColorFormat.attributes.class, colorSettings)
8405 + ...parseCSS(activeColorFormat.attributes?.style),
8406 + ...parseClassName(activeColorFormat.attributes?.class, colorSettings)
5244 8407 };
5245 8408 }
5246 8409 function setColors(value, name16, colorSettings, colors) {
5247 8410 const { color, backgroundColor } = {
@@ -5260,10 +8423,16 @@
5260 8423 styles.push(["background-color", transparentValue].join(":"));
5261 8424 }
5262 8425 if (color) {
5263 8426 const colorObject = (0, import_block_editor9.getColorObjectByColorValue)(colorSettings, color);
5264 - if (colorObject) {
5265 - classNames.push((0, import_block_editor9.getColorClassName)("color", colorObject.slug));
8427 + if (colorObject && colorObject.slug) {
8428 + const colorClassName = (0, import_block_editor9.getColorClassName)(
8429 + "color",
8430 + colorObject.slug
8431 + );
8432 + if (colorClassName) {
8433 + classNames.push(colorClassName);
8434 + }
5266 8435 } else {
5267 8436 styles.push(["color", color].join(":"));
5268 8437 }
5269 8438 }
@@ -5279,13 +8448,13 @@
5279 8448 const colors = (0, import_data2.useSelect)((select) => {
5280 8449 const { getSettings } = select(import_block_editor9.store);
5281 8450 return getSettings().colors ?? [];
5282 8451 }, []);
5283 - const activeColors = (0, import_element16.useMemo)(
8452 + const activeColors = (0, import_element30.useMemo)(
5284 8453 () => getActiveColors(value, name16, colors),
5285 8454 [name16, value, colors]
5286 8455 );
5287 - return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
8456 + return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5288 8457 import_block_editor9.ColorPalette,
5289 8458 {
5290 8459 value: activeColors[property],
5291 8460 onChange: (color) => {
@@ -5305,26 +8474,28 @@
5305 8474 onClose,
5306 8475 contentRef,
5307 8476 isActive
5308 8477 }) {
8478 + const anchorSettings = { ...textColor, isActive };
5309 8479 const popoverAnchor = (0, import_rich_text9.useAnchor)({
8480 + // eslint-disable-next-line react-hooks/refs
5310 8481 editableContentElement: contentRef.current,
5311 - settings: { ...textColor, isActive }
8482 + settings: anchorSettings
5312 8483 });
5313 - return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
8484 + return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5314 8485 import_components4.Popover,
5315 8486 {
5316 8487 onClose,
5317 8488 className: "format-library__inline-color-popover",
5318 8489 anchor: popoverAnchor,
5319 - children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(tabs_exports.Root, { defaultValue: TABS[0].name, children: [
5320 - /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(tabs_exports.List, { children: TABS.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(tabs_exports.Tab, { value: tab.name, children: tab.title }, tab.name)) }),
5321 - TABS.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
8490 + children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(tabs_exports.Root, { defaultValue: TABS[0].name, children: [
8491 + /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(tabs_exports.List, { children: TABS.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(tabs_exports.Tab, { value: tab.name, children: tab.title }, tab.name)) }),
8492 + TABS.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5322 8493 tabs_exports.Panel,
5323 8494 {
5324 8495 value: tab.name,
5325 8496 tabIndex: -1,
5326 - children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
8497 + children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5327 8498 ColorPicker,
5328 8499 {
5329 8500 name: name16,
5330 8501 property: tab.name,
@@ -5340,18 +8511,18 @@
5340 8511 );
5341 8512 }
5342 8513
5343 8514 // packages/format-library/build-module/text-color/index.mjs
5344 - var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1);
8515 + var import_jsx_runtime63 = __toESM(require_jsx_runtime(), 1);
5345 8516 var transparentValue = "rgba(0, 0, 0, 0)";
5346 8517 var name8 = "core/text-color";
5347 - var title8 = (0, import_i18n12.__)("Highlight");
5348 - var EMPTY_ARRAY3 = [];
8518 + var title8 = (0, import_i18n15.__)("Highlight");
8519 + var EMPTY_ARRAY2 = [];
5349 8520 function getComputedStyleProperty(element, property) {
5350 8521 const { ownerDocument: ownerDocument2 } = element;
5351 8522 const { defaultView } = ownerDocument2;
5352 - const style = defaultView.getComputedStyle(element);
5353 - const value = style.getPropertyValue(property);
8523 + const style = defaultView?.getComputedStyle(element);
8524 + const value = style?.getPropertyValue(property);
5354 8525 if (property === "background-color" && value === transparentValue && element.parentElement) {
5355 8526 return getComputedStyleProperty(element.parentElement, property);
5356 8527 }
5357 8528 return value;
@@ -5356,9 +8527,9 @@
5356 8527 }
5357 8528 return value;
5358 8529 }
5359 8530 function fillComputedColors(element, { color, backgroundColor }) {
5360 - if (!color && !backgroundColor) {
8531 + if (!element || !color && !backgroundColor) {
5361 8532 return;
5362 8533 }
5363 8534 return {
5364 8535 color: color || getComputedStyleProperty(element, "color"),
@@ -5371,14 +8542,14 @@
5371 8542 isActive,
5372 8543 activeAttributes,
5373 8544 contentRef
5374 8545 }) {
5375 - const [allowCustomControl, colors = EMPTY_ARRAY3] = (0, import_block_editor10.useSettings)(
8546 + const [allowCustomControl, colors = EMPTY_ARRAY2] = (0, import_block_editor10.useSettings)(
5376 8547 "color.custom",
5377 8548 "color.palette"
5378 8549 );
5379 - const [isAddingColor, setIsAddingColor] = (0, import_element17.useState)(false);
5380 - const colorIndicatorStyle = (0, import_element17.useMemo)(
8550 + const [isAddingColor, setIsAddingColor] = (0, import_element31.useState)(false);
8551 + const colorIndicatorStyle = (0, import_element31.useMemo)(
5381 8552 () => fillComputedColors(
5382 8553 contentRef.current,
5383 8554 getActiveColors(value, name8, colors)
5384 8555 ),
@@ -5387,15 +8558,15 @@
5387 8558 const hasColorsToChoose = !!colors.length || allowCustomControl;
5388 8559 if (!hasColorsToChoose && !isActive) {
5389 8560 return null;
5390 8561 }
5391 - return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
5392 - /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
8562 + return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
8563 + /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5393 8564 import_block_editor10.RichTextToolbarButton,
5394 8565 {
5395 8566 className: "format-library-text-color-button",
5396 8567 isActive,
5397 - icon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
8568 + icon: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5398 8569 icon_default,
5399 8570 {
5400 8571 icon: Object.keys(activeAttributes).length ? text_color_default : color_default,
5401 8572 style: colorIndicatorStyle
@@ -5405,14 +8576,13 @@
5405 8576 onClick: hasColorsToChoose ? () => setIsAddingColor(true) : () => onChange((0, import_rich_text10.removeFormat)(value, name8)),
5406 8577 role: "menuitemcheckbox"
5407 8578 }
5408 8579 ),
5409 - isAddingColor && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
8580 + isAddingColor && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5410 8581 InlineColorUI,
5411 8582 {
5412 8583 name: name8,
5413 8584 onClose: () => setIsAddingColor(false),
5414 - activeAttributes,
5415 8585 value,
5416 8586 onChange,
5417 8587 contentRef,
5418 8588 isActive
@@ -5432,14 +8602,14 @@
5432 8602 edit: TextColorEdit
5433 8603 };
5434 8604
5435 8605 // packages/format-library/build-module/subscript/index.mjs
5436 - var import_i18n13 = __toESM(require_i18n(), 1);
8606 + var import_i18n16 = __toESM(require_i18n(), 1);
5437 8607 var import_rich_text11 = __toESM(require_rich_text(), 1);
5438 8608 var import_block_editor11 = __toESM(require_block_editor(), 1);
5439 - var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1);
8609 + var import_jsx_runtime64 = __toESM(require_jsx_runtime(), 1);
5440 8610 var name9 = "core/subscript";
5441 - var title9 = (0, import_i18n13.__)("Subscript");
8611 + var title9 = (0, import_i18n16.__)("Subscript");
5442 8612 var subscript = {
5443 8613 name: name9,
5444 8614 title: title9,
5445 8615 tagName: "sub",
@@ -5451,9 +8621,9 @@
5451 8621 function onClick() {
5452 8622 onToggle();
5453 8623 onFocus();
5454 8624 }
5455 - return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
8625 + return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5456 8626 import_block_editor11.RichTextToolbarButton,
5457 8627 {
5458 8628 icon: subscript_default,
5459 8629 title: title9,
@@ -5465,14 +8635,14 @@
5465 8635 }
5466 8636 };
5467 8637
5468 8638 // packages/format-library/build-module/superscript/index.mjs
5469 - var import_i18n14 = __toESM(require_i18n(), 1);
8639 + var import_i18n17 = __toESM(require_i18n(), 1);
5470 8640 var import_rich_text12 = __toESM(require_rich_text(), 1);
5471 8641 var import_block_editor12 = __toESM(require_block_editor(), 1);
5472 - var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1);
8642 + var import_jsx_runtime65 = __toESM(require_jsx_runtime(), 1);
5473 8643 var name10 = "core/superscript";
5474 - var title10 = (0, import_i18n14.__)("Superscript");
8644 + var title10 = (0, import_i18n17.__)("Superscript");
5475 8645 var superscript = {
5476 8646 name: name10,
5477 8647 title: title10,
5478 8648 tagName: "sup",
@@ -5484,9 +8654,9 @@
5484 8654 function onClick() {
5485 8655 onToggle();
5486 8656 onFocus();
5487 8657 }
5488 - return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8658 + return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5489 8659 import_block_editor12.RichTextToolbarButton,
5490 8660 {
5491 8661 icon: superscript_default,
5492 8662 title: title10,
@@ -5498,14 +8668,14 @@
5498 8668 }
5499 8669 };
5500 8670
5501 8671 // packages/format-library/build-module/keyboard/index.mjs
5502 - var import_i18n15 = __toESM(require_i18n(), 1);
8672 + var import_i18n18 = __toESM(require_i18n(), 1);
5503 8673 var import_rich_text13 = __toESM(require_rich_text(), 1);
5504 8674 var import_block_editor13 = __toESM(require_block_editor(), 1);
5505 - var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1);
8675 + var import_jsx_runtime66 = __toESM(require_jsx_runtime(), 1);
5506 8676 var name11 = "core/keyboard";
5507 - var title11 = (0, import_i18n15.__)("Keyboard input");
8677 + var title11 = (0, import_i18n18.__)("Keyboard input");
5508 8678 var keyboard2 = {
5509 8679 name: name11,
5510 8680 title: title11,
5511 8681 tagName: "kbd",
@@ -5517,9 +8687,9 @@
5517 8687 function onClick() {
5518 8688 onToggle();
5519 8689 onFocus();
5520 8690 }
5521 - return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
8691 + return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5522 8692 import_block_editor13.RichTextToolbarButton,
5523 8693 {
5524 8694 icon: button_default,
5525 8695 title: title11,
@@ -5531,14 +8701,14 @@
5531 8701 }
5532 8702 };
5533 8703
5534 8704 // packages/format-library/build-module/unknown/index.mjs
5535 - var import_i18n16 = __toESM(require_i18n(), 1);
8705 + var import_i18n19 = __toESM(require_i18n(), 1);
5536 8706 var import_rich_text14 = __toESM(require_rich_text(), 1);
5537 8707 var import_block_editor14 = __toESM(require_block_editor(), 1);
5538 - var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1);
8708 + var import_jsx_runtime67 = __toESM(require_jsx_runtime(), 1);
5539 8709 var name12 = "core/unknown";
5540 - var title12 = (0, import_i18n16.__)("Clear Unknown Formatting");
8710 + var title12 = (0, import_i18n19.__)("Clear Unknown Formatting");
5541 8711 function selectionContainsUnknownFormats(value) {
5542 8712 if ((0, import_rich_text14.isCollapsed)(value)) {
5543 8713 return false;
5544 8714 }
@@ -5559,9 +8729,9 @@
5559 8729 function onClick() {
5560 8730 onChange((0, import_rich_text14.removeFormat)(value, name12));
5561 8731 onFocus();
5562 8732 }
5563 - return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
8733 + return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5564 8734 import_block_editor14.RichTextToolbarButton,
5565 8735 {
5566 8736 name: "unknown",
5567 8737 icon: help_default,
@@ -5573,16 +8743,16 @@
5573 8743 }
5574 8744 };
5575 8745
5576 8746 // packages/format-library/build-module/language/index.mjs
5577 - var import_i18n17 = __toESM(require_i18n(), 1);
8747 + var import_i18n20 = __toESM(require_i18n(), 1);
5578 8748 var import_block_editor15 = __toESM(require_block_editor(), 1);
5579 8749 var import_components5 = __toESM(require_components(), 1);
5580 - var import_element18 = __toESM(require_element(), 1);
8750 + var import_element32 = __toESM(require_element(), 1);
5581 8751 var import_rich_text15 = __toESM(require_rich_text(), 1);
5582 - var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1);
8752 + var import_jsx_runtime68 = __toESM(require_jsx_runtime(), 1);
5583 8753 var name13 = "core/language";
5584 - var title13 = (0, import_i18n17.__)("Language");
8754 + var title13 = (0, import_i18n20.__)("Language");
5585 8755 var language = {
5586 8756 name: name13,
5587 8757 title: title13,
5588 8758 tagName: "bdo",
@@ -5593,14 +8763,14 @@
5593 8763 },
5594 8764 edit: Edit3
5595 8765 };
5596 8766 function Edit3({ isActive, value, onChange, contentRef }) {
5597 - const [isPopoverVisible, setIsPopoverVisible] = (0, import_element18.useState)(false);
8767 + const [isPopoverVisible, setIsPopoverVisible] = (0, import_element32.useState)(false);
5598 8768 const togglePopover = () => {
5599 8769 setIsPopoverVisible((state) => !state);
5600 8770 };
5601 - return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
5602 - /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
8771 + return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
8772 + /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5603 8773 import_block_editor15.RichTextToolbarButton,
5604 8774 {
5605 8775 icon: language_default,
5606 8776 label: title13,
@@ -5615,9 +8785,9 @@
5615 8785 isActive,
5616 8786 role: "menuitemcheckbox"
5617 8787 }
5618 8788 ),
5619 - isPopoverVisible && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
8789 + isPopoverVisible && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5620 8790 InlineLanguageUI,
5621 8791 {
5622 8792 value,
5623 8793 onChange,
@@ -5626,25 +8796,31 @@
5626 8796 }
5627 8797 )
5628 8798 ] });
5629 8799 }
5630 - function InlineLanguageUI({ value, contentRef, onChange, onClose }) {
8800 + function InlineLanguageUI({
8801 + value,
8802 + contentRef,
8803 + onChange,
8804 + onClose
8805 + }) {
5631 8806 const popoverAnchor = (0, import_rich_text15.useAnchor)({
8807 + // eslint-disable-next-line react-hooks/refs
5632 8808 editableContentElement: contentRef.current,
5633 8809 settings: language
5634 8810 });
5635 - const [lang, setLang] = (0, import_element18.useState)("");
5636 - const [dir, setDir] = (0, import_element18.useState)("ltr");
5637 - return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
8811 + const [lang, setLang] = (0, import_element32.useState)("");
8812 + const [dir, setDir] = (0, import_element32.useState)("ltr");
8813 + return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5638 8814 import_components5.Popover,
5639 8815 {
5640 8816 className: "block-editor-format-toolbar__language-popover",
5641 8817 anchor: popoverAnchor,
5642 8818 onClose,
5643 - children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
8819 + children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
5644 8820 Stack,
5645 8821 {
5646 - render: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("form", {}),
8822 + render: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("form", {}),
5647 8823 direction: "column",
5648 8824 gap: "lg",
5649 8825 className: "block-editor-format-toolbar__language-container-content",
5650 8826 onSubmit: (event) => {
@@ -5660,31 +8836,31 @@
5660 8836 );
5661 8837 onClose();
5662 8838 },
5663 8839 children: [
5664 - /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
8840 + /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5665 8841 import_components5.TextControl,
5666 8842 {
5667 8843 label: title13,
5668 8844 value: lang,
5669 8845 onChange: (val) => setLang(val),
5670 - help: (0, import_i18n17.__)(
8846 + help: (0, import_i18n20.__)(
5671 8847 'A valid language attribute, like "en" or "fr".'
5672 8848 )
5673 8849 }
5674 8850 ),
5675 - /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
8851 + /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5676 8852 import_components5.SelectControl,
5677 8853 {
5678 - label: (0, import_i18n17.__)("Text direction"),
8854 + label: (0, import_i18n20.__)("Text direction"),
5679 8855 value: dir,
5680 8856 options: [
5681 8857 {
5682 - label: (0, import_i18n17.__)("Left to right"),
8858 + label: (0, import_i18n20.__)("Left to right"),
5683 8859 value: "ltr"
5684 8860 },
5685 8861 {
5686 - label: (0, import_i18n17.__)("Right to left"),
8862 + label: (0, import_i18n20.__)("Right to left"),
5687 8863 value: "rtl"
5688 8864 }
5689 8865 ],
5690 8866 onChange: (val) => setDir(val)
@@ -5689,15 +8865,15 @@
5689 8865 ],
5690 8866 onChange: (val) => setDir(val)
5691 8867 }
5692 8868 ),
5693 - /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Stack, { justify: "right", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
8869 + /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Stack, { justify: "right", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5694 8870 import_components5.Button,
5695 8871 {
5696 8872 __next40pxDefaultSize: true,
5697 8873 variant: "primary",
5698 8874 type: "submit",
5699 - text: (0, import_i18n17.__)("Apply")
8875 + text: (0, import_i18n20.__)("Apply")
5700 8876 }
5701 8877 ) })
5702 8878 ]
5703 8879 }
@@ -5706,26 +8882,16 @@
5706 8882 );
5707 8883 }
5708 8884
5709 8885 // packages/format-library/build-module/math/index.mjs
5710 - var import_i18n18 = __toESM(require_i18n(), 1);
5711 - var import_element19 = __toESM(require_element(), 1);
8886 + var import_i18n21 = __toESM(require_i18n(), 1);
8887 + var import_element33 = __toESM(require_element(), 1);
5712 8888 var import_rich_text16 = __toESM(require_rich_text(), 1);
5713 8889 var import_block_editor16 = __toESM(require_block_editor(), 1);
5714 8890 var import_components6 = __toESM(require_components(), 1);
5715 -
5716 - // packages/format-library/build-module/lock-unlock.mjs
5717 - var import_private_apis = __toESM(require_private_apis(), 1);
5718 - var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
5719 - "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
5720 - "@wordpress/format-library"
5721 - );
5722 -
5723 - // packages/format-library/build-module/math/index.mjs
5724 - var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1);
5725 - var { ValidatedTextControl } = unlock(import_components6.privateApis);
8891 + var import_jsx_runtime69 = __toESM(require_jsx_runtime(), 1);
5726 8892 var name14 = "core/math";
5727 - var title14 = (0, import_i18n18.__)("Math");
8893 + var title14 = (0, import_i18n21.__)("Math");
5728 8894 function InlineUI2({
5729 8895 value,
5730 8896 onChange,
5731 8897 activeAttributes,
@@ -5731,14 +8897,15 @@
5731 8897 activeAttributes,
5732 8898 contentRef,
5733 8899 latexToMathML
5734 8900 }) {
5735 - const [latex, setLatex] = (0, import_element19.useState)(
8901 + const [latex, setLatex] = (0, import_element33.useState)(
5736 8902 activeAttributes?.["data-latex"] || ""
5737 8903 );
5738 - const [error2, setError] = (0, import_element19.useState)(null);
5739 - const formRef = (0, import_element19.useRef)();
8904 + const [error2, setError] = (0, import_element33.useState)(null);
8905 + const formRef = (0, import_element33.useRef)(null);
5740 8906 const popoverAnchor = (0, import_rich_text16.useAnchor)({
8907 + // eslint-disable-next-line react-hooks/refs
5741 8908 editableContentElement: contentRef.current,
5742 8909 settings: math
5743 8910 });
5744 8911 const handleLatexChange = (newLatex) => {
@@ -5748,9 +8915,11 @@
5748 8915 try {
5749 8916 mathML = latexToMathML(newLatex, { displayMode: false });
5750 8917 setError(null);
5751 8918 } catch (err) {
5752 - setError(err.message);
8919 + setError(
8920 + err instanceof Error ? err.message : (0, import_i18n21.__)("Could not parse the LaTeX math syntax.")
8921 + );
5753 8922 }
5754 8923 } else {
5755 8924 setError(null);
5756 8925 }
@@ -5766,9 +8935,9 @@
5766 8935 ...value,
5767 8936 replacements: newReplacements
5768 8937 });
5769 8938 };
5770 - return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8939 + return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
5771 8940 import_components6.Popover,
5772 8941 {
5773 8942 placement: "bottom-start",
5774 8943 offset: 8,
@@ -5775,27 +8944,39 @@
5775 8944 focusOnMount: false,
5776 8945 anchor: popoverAnchor,
5777 8946 onFocusOutside: () => formRef.current?.reportValidity(),
5778 8947 className: "block-editor-format-toolbar__math-popover",
5779 - children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
8948 + children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
5780 8949 "form",
5781 8950 {
5782 8951 ref: formRef,
5783 - style: { minWidth: "300px", padding: "4px" },
8952 + style: { minWidth: "300px", padding: "16px" },
5784 8953 onSubmit: (event) => event.preventDefault(),
5785 - children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5786 - ValidatedTextControl,
5787 - {
5788 - hideLabelFromVision: true,
5789 - label: (0, import_i18n18.__)("LaTeX math syntax"),
5790 - value: latex,
5791 - customValidity: error2 ? { type: "invalid", message: error2 } : void 0,
5792 - onChange: handleLatexChange,
5793 - placeholder: (0, import_i18n18.__)("e.g., x^2, \\frac{a}{b}"),
5794 - autoComplete: "off",
5795 - className: "block-editor-format-toolbar__math-input"
5796 - }
5797 - )
8954 + children: [
8955 + /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
8956 + ValidatedInputControl,
8957 + {
8958 + label: (0, import_i18n21.__)("LaTeX math syntax"),
8959 + value: latex,
8960 + customValidity: error2 ? { type: "invalid", message: error2 } : void 0,
8961 + onValueChange: handleLatexChange,
8962 + placeholder: (0, import_i18n21.__)("e.g., x^2, \\frac{a}{b}, \\sqrt{x}"),
8963 + autoComplete: "off",
8964 + className: "block-editor-format-toolbar__math-input"
8965 + }
8966 + ),
8967 + /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
8968 + Link,
8969 + {
8970 + openInNewTab: true,
8971 + className: "block-editor-format-toolbar__math-learn-more",
8972 + href: (0, import_i18n21.__)(
8973 + "https://wordpress.org/documentation/article/math-block/"
8974 + ),
8975 + children: (0, import_i18n21.__)("Learn more about LaTeX syntax")
8976 + }
8977 + )
8978 + ]
5798 8979 }
5799 8980 )
5800 8981 }
5801 8982 );
@@ -5807,10 +8988,10 @@
5807 8988 isObjectActive,
5808 8989 activeObjectAttributes,
5809 8990 contentRef
5810 8991 }) {
5811 - const [latexToMathML, setLatexToMathML] = (0, import_element19.useState)();
5812 - (0, import_element19.useEffect)(() => {
8992 + const [latexToMathML, setLatexToMathML] = (0, import_element33.useState)();
8993 + (0, import_element33.useEffect)(() => {
5813 8994 import("@wordpress/latex-to-mathml").then((module) => {
5814 8995 setLatexToMathML(() => module.default);
5815 8996 });
5816 8997 }, []);
@@ -5840,10 +9021,10 @@
5840 9021 }
5841 9022 onChange(newValue);
5842 9023 onFocus();
5843 9024 }
5844 - return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
5845 - /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
9025 + return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
9026 + /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
5846 9027 import_block_editor16.RichTextToolbarButton,
5847 9028 {
5848 9029 icon: math_default,
5849 9030 title: title14,
@@ -5850,9 +9031,9 @@
5850 9031 onClick,
5851 9032 isActive: isObjectActive
5852 9033 }
5853 9034 ),
5854 - isObjectActive && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
9035 + isObjectActive && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
5855 9036 InlineUI2,
5856 9037 {
5857 9038 value,
5858 9039 onChange,
@@ -5875,31 +9056,63 @@
5875 9056 edit: Edit4
5876 9057 };
5877 9058
5878 9059 // packages/format-library/build-module/non-breaking-space/index.mjs
5879 - var import_i18n19 = __toESM(require_i18n(), 1);
9060 + var import_i18n22 = __toESM(require_i18n(), 1);
5880 9061 var import_rich_text17 = __toESM(require_rich_text(), 1);
5881 9062 var import_block_editor17 = __toESM(require_block_editor(), 1);
5882 - var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1);
9063 + var import_components7 = __toESM(require_components(), 1);
9064 + var import_jsx_runtime70 = __toESM(require_jsx_runtime(), 1);
5883 9065 var name15 = "core/non-breaking-space";
5884 - var title15 = (0, import_i18n19.__)("Non breaking space");
9066 + var title15 = (0, import_i18n22.__)("Non breaking space");
9067 + function PopoverAnchor({ contentRef }) {
9068 + const popoverAnchor = (0, import_rich_text17.useAnchor)({
9069 + // eslint-disable-next-line react-hooks/refs
9070 + editableContentElement: contentRef.current,
9071 + settings: nonBreakingSpace
9072 + });
9073 + return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components7.Popover, { anchor: popoverAnchor, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { style: { whiteSpace: "nowrap", padding: "4px" }, children: (0, import_i18n22.__)("Non-breaking space") }) });
9074 + }
5885 9075 var nonBreakingSpace = {
5886 9076 name: name15,
5887 9077 title: title15,
5888 - tagName: "nbsp",
5889 - className: null,
5890 - edit({ value, onChange }) {
9078 + tagName: "span",
9079 + className: "non-breaking-space",
9080 + edit({ value, onChange, contentRef }) {
5891 9081 function addNonBreakingSpace() {
5892 9082 onChange((0, import_rich_text17.insert)(value, "\xA0"));
5893 9083 }
5894 - return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
5895 - import_block_editor17.RichTextShortcut,
5896 - {
5897 - type: "primaryShift",
5898 - character: " ",
5899 - onUse: addNonBreakingSpace
5900 - }
5901 - );
9084 + const selectedValue = value.start && value.end ? value.text.slice(value.start, value.end) : null;
9085 + return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
9086 + /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
9087 + import_block_editor17.RichTextShortcut,
9088 + {
9089 + type: "primaryShift",
9090 + character: " ",
9091 + onUse: addNonBreakingSpace
9092 + }
9093 + ),
9094 + selectedValue === "\xA0" && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(PopoverAnchor, { contentRef })
9095 + ] });
9096 + },
9097 + __experimentalCreatePrepareEditableTree() {
9098 + return (formats, text) => {
9099 + const NBSP = "\xA0";
9100 + let record = { formats, text };
9101 + let index2 = -1;
9102 + do {
9103 + index2 = text.indexOf(NBSP, index2 + 1);
9104 + if (index2 !== -1) {
9105 + record = (0, import_rich_text17.applyFormat)(
9106 + record,
9107 + { type: name15 },
9108 + index2,
9109 + index2 + 1
9110 + );
9111 + }
9112 + } while (index2 !== -1);
9113 + return record.formats;
9114 + };
5902 9115 }
5903 9116 };
5904 9117
5905 9118 // packages/format-library/build-module/default-formats.mjs
@@ -5938,5 +9151,7 @@
5938 9151 * This source code is licensed under the MIT license found in the
5939 9152 * LICENSE file in the root directory of this source tree.
5940 9153 *)
5941 9154 */
9155 +(window.wp ||= {}).formatLibrary = wp.formatLibrary;
9156 +})();
5942 9157 //# sourceMappingURL=index.js.map