| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 (function() { 2 "use strict"; 3 var wp; 4 (wp ||= {}).notices = (() => { 5 var __create = Object.create; 6 var __defProp = Object.defineProperty; 7 var __getOwnPropDesc = Object.getOwnPropertyDescriptor; 8 var __getOwnPropNames = Object.getOwnPropertyNames; 9 var __getProtoOf = Object.getPrototypeOf; 10 var __hasOwnProp = Object.prototype.hasOwnProperty; 11 var __commonJS = (cb, mod) => function __require() { 12 return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; 13 }; 14 var __export = (target, all) => { 15 for (var name in all) 16 __defProp(target, name, { get: all[name], enumerable: true }); 17 }; 18 var __copyProps = (to, from, except, desc) => { 19 if (from && typeof from === "object" || typeof from === "function") { 20 for (let key of __getOwnPropNames(from)) 21 if (!__hasOwnProp.call(to, key) && key !== except) 22 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); 23 } 24 return to; 25 }; 26 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( 27 // If the importer is in node compatibility mode or this is not an ESM 28 // file that has been converted to a CommonJS file using a Babel- 29 // compatible transform (i.e. "__esModule" has not been set), then set 30 // "default" to the CommonJS "module.exports" for node compatibility. 31 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, 32 mod 33 )); 34 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); 35 36 // package-external:@wordpress/data 37 var require_data = __commonJS({ 38 "package-external:@wordpress/data"(exports, module) { 39 module.exports = window.wp.data; 40 } 41 }); 42 43 // package-external:@wordpress/deprecated 44 var require_deprecated = __commonJS({ 45 "package-external:@wordpress/deprecated"(exports, module) { 46 module.exports = window.wp.deprecated; 47 } 48 }); 49 50 // package-external:@wordpress/element 51 var require_element = __commonJS({ 52 "package-external:@wordpress/element"(exports, module) { 53 module.exports = window.wp.element; 54 } 55 }); 56 57 // package-external:@wordpress/a11y 58 var require_a11y = __commonJS({ 59 "package-external:@wordpress/a11y"(exports, module) { 60 module.exports = window.wp.a11y; 61 } 62 }); 63 64 // package-external:@wordpress/components 65 var require_components = __commonJS({ 66 "package-external:@wordpress/components"(exports, module) { 67 module.exports = window.wp.components; 68 } 69 }); 70 71 // package-external:@wordpress/i18n 72 var require_i18n = __commonJS({ 73 "package-external:@wordpress/i18n"(exports, module) { 74 module.exports = window.wp.i18n; 75 } 76 }); 77 78 // vendor-external:react 79 var require_react = __commonJS({ 80 "vendor-external:react"(exports, module) { 81 module.exports = window.React; 82 } 83 }); 84 85 // vendor-external:react/jsx-runtime 86 var require_jsx_runtime = __commonJS({ 87 "vendor-external:react/jsx-runtime"(exports, module) { 88 module.exports = window.ReactJSXRuntime; 89 } 90 }); 91 92 // vendor-external:react-dom 93 var require_react_dom = __commonJS({ 94 "vendor-external:react-dom"(exports, module) { 95 module.exports = window.ReactDOM; 96 } 97 }); 98 99 // package-external:@wordpress/primitives 100 var require_primitives = __commonJS({ 101 "package-external:@wordpress/primitives"(exports, module) { 102 module.exports = window.wp.primitives; 103 } 104 }); 105 106 // node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js 107 var require_use_sync_external_store_shim_development = __commonJS({ 108 "node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) { 109 "use strict"; 110 (function() { 111 function is(x, y) { 112 return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y; 113 } 114 function useSyncExternalStore$2(subscribe, getSnapshot) { 115 didWarnOld18Alpha || void 0 === React60.startTransition || (didWarnOld18Alpha = true, console.error( 116 "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." 117 )); 118 var value = getSnapshot(); 119 if (!didWarnUncachedGetSnapshot) { 120 var cachedValue = getSnapshot(); 121 objectIs(value, cachedValue) || (console.error( 122 "The result of getSnapshot should be cached to avoid an infinite loop" 123 ), didWarnUncachedGetSnapshot = true); 124 } 125 cachedValue = useState17({ 126 inst: { value, getSnapshot } 127 }); 128 var inst = cachedValue[0].inst, forceUpdate = cachedValue[1]; 129 useLayoutEffect3( 130 function() { 131 inst.value = value; 132 inst.getSnapshot = getSnapshot; 133 checkIfSnapshotChanged(inst) && forceUpdate({ inst }); 134 }, 135 [subscribe, value, getSnapshot] 136 ); 137 useEffect18( 138 function() { 139 checkIfSnapshotChanged(inst) && forceUpdate({ inst }); 140 return subscribe(function() { 141 checkIfSnapshotChanged(inst) && forceUpdate({ inst }); 142 }); 143 }, 144 [subscribe] 145 ); 146 useDebugValue2(value); 147 return value; 148 } 149 function checkIfSnapshotChanged(inst) { 150 var latestGetSnapshot = inst.getSnapshot; 151 inst = inst.value; 152 try { 153 var nextValue = latestGetSnapshot(); 154 return !objectIs(inst, nextValue); 155 } catch (error2) { 156 return true; 157 } 158 } 159 function useSyncExternalStore$1(subscribe, getSnapshot) { 160 return getSnapshot(); 161 } 162 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); 163 var React60 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState17 = React60.useState, useEffect18 = React60.useEffect, useLayoutEffect3 = React60.useLayoutEffect, useDebugValue2 = React60.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2; 164 exports.useSyncExternalStore = void 0 !== React60.useSyncExternalStore ? React60.useSyncExternalStore : shim; 165 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error()); 166 })(); 167 } 168 }); 169 170 // node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/shim/index.js 171 var require_shim = __commonJS({ 172 "node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/shim/index.js"(exports, module) { 173 "use strict"; 174 if (false) { 175 module.exports = null; 176 } else { 177 module.exports = require_use_sync_external_store_shim_development(); 178 } 179 } 180 }); 181 182 // node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js 183 var require_with_selector_development = __commonJS({ 184 "node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) { 185 "use strict"; 186 (function() { 187 function is(x, y) { 188 return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y; 189 } 190 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); 191 var React60 = require_react(), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore3 = shim.useSyncExternalStore, useRef22 = React60.useRef, useEffect18 = React60.useEffect, useMemo19 = React60.useMemo, useDebugValue2 = React60.useDebugValue; 192 exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) { 193 var instRef = useRef22(null); 194 if (null === instRef.current) { 195 var inst = { hasValue: false, value: null }; 196 instRef.current = inst; 197 } else inst = instRef.current; 198 instRef = useMemo19( 199 function() { 200 function memoizedSelector(nextSnapshot) { 201 if (!hasMemo) { 202 hasMemo = true; 203 memoizedSnapshot = nextSnapshot; 204 nextSnapshot = selector(nextSnapshot); 205 if (void 0 !== isEqual && inst.hasValue) { 206 var currentSelection = inst.value; 207 if (isEqual(currentSelection, nextSnapshot)) 208 return memoizedSelection = currentSelection; 209 } 210 return memoizedSelection = nextSnapshot; 211 } 212 currentSelection = memoizedSelection; 213 if (objectIs(memoizedSnapshot, nextSnapshot)) 214 return currentSelection; 215 var nextSelection = selector(nextSnapshot); 216 if (void 0 !== isEqual && isEqual(currentSelection, nextSelection)) 217 return memoizedSnapshot = nextSnapshot, currentSelection; 218 memoizedSnapshot = nextSnapshot; 219 return memoizedSelection = nextSelection; 220 } 221 var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot; 222 return [ 223 function() { 224 return memoizedSelector(getSnapshot()); 225 }, 226 null === maybeGetServerSnapshot ? void 0 : function() { 227 return memoizedSelector(maybeGetServerSnapshot()); 228 } 229 ]; 230 }, 231 [getSnapshot, getServerSnapshot, selector, isEqual] 232 ); 233 var value = useSyncExternalStore3(subscribe, instRef[0], instRef[1]); 234 useEffect18( 235 function() { 236 inst.hasValue = true; 237 inst.value = value; 238 }, 239 [value] 240 ); 241 useDebugValue2(value); 242 return value; 243 }; 244 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error()); 245 })(); 246 } 247 }); 248 249 // node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/shim/with-selector.js 250 var require_with_selector = __commonJS({ 251 "node_modules/.store/use-sync-external-store@1.7.0-jHNF5n8408rkWhZ5NHKclA/node_modules/use-sync-external-store/shim/with-selector.js"(exports, module) { 252 "use strict"; 253 if (false) { 254 module.exports = null; 255 } else { 256 module.exports = require_with_selector_development(); 257 } 258 } 259 }); 260 261 // package-external:@wordpress/compose 262 var require_compose = __commonJS({ 263 "package-external:@wordpress/compose"(exports, module) { 264 module.exports = window.wp.compose; 265 } 266 }); 267 268 // package-external:@wordpress/theme 269 var require_theme = __commonJS({ 270 "package-external:@wordpress/theme"(exports, module) { 271 module.exports = window.wp.theme; 272 } 273 }); 274 275 // package-external:@wordpress/private-apis 276 var require_private_apis = __commonJS({ 277 "package-external:@wordpress/private-apis"(exports, module) { 278 module.exports = window.wp.privateApis; 279 } 280 }); 281 282 // packages/notices/build-module/index.mjs 283 var index_exports = {}; 284 __export(index_exports, { 285 InlineNotices: () => InlineNotices, 286 SnackbarNotices: () => SnackbarNotices, 287 privateApis: () => privateApis, 288 store: () => store 289 }); 290 291 // packages/notices/build-module/store/index.mjs 292 var import_data2 = __toESM(require_data(), 1); 293 294 // packages/notices/build-module/store/reducer.mjs 295 var import_data = __toESM(require_data(), 1); 296 var notices = (0, import_data.keyedReducer)("context")((state = [], action) => { 297 switch (action.type) { 298 case "CREATE_NOTICE": 299 return [ 300 ...state.filter(({ id }) => id !== action.notice.id), 301 action.notice 302 ]; 303 case "REMOVE_NOTICE": 304 return state.filter(({ id }) => id !== action.id); 305 case "REMOVE_NOTICES": 306 return state.filter(({ id }) => !action.ids.includes(id)); 307 case "REMOVE_ALL_NOTICES": 308 return state.filter(({ type }) => type !== action.noticeType); 309 default: 310 return state; 311 } 312 }); 313 var reducer_default = notices; 314 315 // packages/notices/build-module/store/actions.mjs 316 var actions_exports = {}; 317 __export(actions_exports, { 318 createErrorNotice: () => createErrorNotice, 319 createInfoNotice: () => createInfoNotice, 320 createNotice: () => createNotice, 321 createSuccessNotice: () => createSuccessNotice, 322 createWarningNotice: () => createWarningNotice, 323 removeAllNotices: () => removeAllNotices, 324 removeNotice: () => removeNotice, 325 removeNotices: () => removeNotices 326 }); 327 var import_deprecated = __toESM(require_deprecated(), 1); 328 329 // packages/notices/build-module/store/constants.mjs 330 var DEFAULT_CONTEXT = "global"; 331 var DEFAULT_STATUS = "info"; 332 var NOTICE_SLOT = /* @__PURE__ */ Symbol("NOTICE_SLOT"); 333 334 // packages/notices/build-module/store/actions.mjs 335 var uniqueId = 0; 336 function createNotice(status = DEFAULT_STATUS, content, options = {}) { 337 const { 338 speak: speak3 = true, 339 isDismissible = true, 340 context = DEFAULT_CONTEXT, 341 id = `$context}${++uniqueId}`, 342 actions = [], 343 type = "default", 344 details, 345 __unstableHTML, 346 icon = null, 347 explicitDismiss = false, 348 onDismiss 349 } = options; 350 content = String(content); 351 if (__unstableHTML) { 352 (0, import_deprecated.default)("The `__unstableHTML` option of `createNotice`", { 353 since: "7.2", 354 hint: "Pass the message as plain text, and any longer account of what happened as `details`." 355 }); 356 } 357 const slot = options[NOTICE_SLOT]; 358 return { 359 type: "CREATE_NOTICE", 360 context, 361 notice: { 362 id, 363 status, 364 content, 365 spokenMessage: speak3 ? content : null, 366 // Details with nothing to read would open an empty panel. 367 details: details && String(details).trim() ? String(details) : void 0, 368 __unstableHTML, 369 isDismissible, 370 actions, 371 type, 372 icon, 373 explicitDismiss, 374 onDismiss, 375 ...slot && { [NOTICE_SLOT]: slot } 376 } 377 }; 378 } 379 function createSuccessNotice(content, options) { 380 return createNotice("success", content, options); 381 } 382 function createInfoNotice(content, options) { 383 return createNotice("info", content, options); 384 } 385 function createErrorNotice(content, options) { 386 return createNotice("error", content, options); 387 } 388 function createWarningNotice(content, options) { 389 return createNotice("warning", content, options); 390 } 391 function removeNotice(id, context = DEFAULT_CONTEXT) { 392 return { 393 type: "REMOVE_NOTICE", 394 id, 395 context 396 }; 397 } 398 function removeAllNotices(noticeType = "default", context = DEFAULT_CONTEXT) { 399 return { 400 type: "REMOVE_ALL_NOTICES", 401 noticeType, 402 context 403 }; 404 } 405 function removeNotices(ids, context = DEFAULT_CONTEXT) { 406 return { 407 type: "REMOVE_NOTICES", 408 ids, 409 context 410 }; 411 } 412 413 // packages/notices/build-module/store/selectors.mjs 414 var selectors_exports = {}; 415 __export(selectors_exports, { 416 getNotices: () => getNotices 417 }); 418 var DEFAULT_NOTICES = []; 419 function getNotices(state, context = DEFAULT_CONTEXT) { 420 return state[context] || DEFAULT_NOTICES; 421 } 422 423 // packages/notices/build-module/store/index.mjs 424 var store = (0, import_data2.createReduxStore)("core/notices", { 425 reducer: reducer_default, 426 actions: actions_exports, 427 selectors: selectors_exports 428 }); 429 (0, import_data2.register)(store); 430 431 // node_modules/.store/clsx@2.1.1-XOLP1vUL9vEGfpiXm37fAw/node_modules/clsx/dist/clsx.mjs 432 function r(e) { 433 var t, f, n = ""; 434 if ("string" == typeof e || "number" == typeof e) n += e; 435 else if ("object" == typeof e) if (Array.isArray(e)) { 436 var o = e.length; 437 for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f); 438 } else for (f in e) e[f] && (n && (n += " "), n += f); 439 return n; 440 } 441 function clsx() { 442 for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t); 443 return n; 444 } 445 var clsx_default = clsx; 446 447 // packages/notices/build-module/components/inline-notices/index.mjs 448 var import_data3 = __toESM(require_data(), 1); 449 var import_element36 = __toESM(require_element(), 1); 450 451 // packages/notices/build-module/components/inline-notices/inline-notice.mjs 452 var import_a11y2 = __toESM(require_a11y(), 1); 453 var import_components = __toESM(require_components(), 1); 454 var import_element35 = __toESM(require_element(), 1); 455 var import_i18n7 = __toESM(require_i18n(), 1); 456 457 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useRenderElement.mjs 458 var React4 = __toESM(require_react(), 1); 459 460 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useRefWithInit.mjs 461 var React = __toESM(require_react(), 1); 462 var UNINITIALIZED = {}; 463 function useRefWithInit(init, initArg) { 464 const ref = React.useRef(UNINITIALIZED); 465 if (ref.current === UNINITIALIZED) { 466 ref.current = init(initArg); 467 } 468 return ref; 469 } 470 471 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useMergedRefs.mjs 472 function useMergedRefs(a, b, c, d) { 473 const forkRef = useRefWithInit(createForkRef).current; 474 if (didChange(forkRef, a, b, c, d)) { 475 update(forkRef, [a, b, c, d]); 476 } 477 return forkRef.callback; 478 } 479 function useMergedRefsN(refs) { 480 const forkRef = useRefWithInit(createForkRef).current; 481 if (didChangeN(forkRef, refs)) { 482 update(forkRef, refs); 483 } 484 return forkRef.callback; 485 } 486 function createForkRef() { 487 return { 488 callback: null, 489 cleanup: null, 490 refs: [] 491 }; 492 } 493 function didChange(forkRef, a, b, c, d) { 494 return forkRef.refs[0] !== a || forkRef.refs[1] !== b || forkRef.refs[2] !== c || forkRef.refs[3] !== d; 495 } 496 function didChangeN(forkRef, newRefs) { 497 return forkRef.refs.length !== newRefs.length || forkRef.refs.some((ref, index2) => ref !== newRefs[index2]); 498 } 499 function update(forkRef, refs) { 500 forkRef.refs = refs; 501 if (refs.every((ref) => ref == null)) { 502 forkRef.callback = null; 503 return; 504 } 505 forkRef.callback = (instance) => { 506 if (forkRef.cleanup) { 507 forkRef.cleanup(); 508 forkRef.cleanup = null; 509 } 510 if (instance != null) { 511 const cleanupCallbacks = Array(refs.length).fill(null); 512 for (let i = 0; i < refs.length; i += 1) { 513 const ref = refs[i]; 514 if (ref == null) { 515 continue; 516 } 517 switch (typeof ref) { 518 case "function": { 519 const refCleanup = ref(instance); 520 if (typeof refCleanup === "function") { 521 cleanupCallbacks[i] = refCleanup; 522 } 523 break; 524 } 525 case "object": { 526 ref.current = instance; 527 break; 528 } 529 default: 530 } 531 } 532 forkRef.cleanup = () => { 533 for (let i = 0; i < refs.length; i += 1) { 534 const ref = refs[i]; 535 if (ref == null) { 536 continue; 537 } 538 switch (typeof ref) { 539 case "function": { 540 const cleanupCallback = cleanupCallbacks[i]; 541 if (typeof cleanupCallback === "function") { 542 cleanupCallback(); 543 } else { 544 void ref(null); 545 } 546 break; 547 } 548 case "object": { 549 ref.current = null; 550 break; 551 } 552 default: 553 } 554 } 555 }; 556 } 557 }; 558 } 559 560 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/getReactElementRef.mjs 561 var React3 = __toESM(require_react(), 1); 562 563 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/reactVersion.mjs 564 var React2 = __toESM(require_react(), 1); 565 var majorVersion = parseInt(React2.version, 10); 566 function isReactVersionAtLeast(reactVersionToCheck) { 567 return majorVersion >= reactVersionToCheck; 568 } 569 570 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/getReactElementRef.mjs 571 function getReactElementRef(element) { 572 if (!/* @__PURE__ */ React3.isValidElement(element)) { 573 return null; 574 } 575 const reactElement = element; 576 const propsWithRef = reactElement.props; 577 return (isReactVersionAtLeast(19) ? propsWithRef?.ref : reactElement.ref) ?? null; 578 } 579 580 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/mergeObjects.mjs 581 function mergeObjects(a, b) { 582 if (a && !b) { 583 return a; 584 } 585 if (!a && b) { 586 return b; 587 } 588 if (a || b) { 589 return { 590 ...a, 591 ...b 592 }; 593 } 594 return void 0; 595 } 596 597 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/createLogOnce.mjs 598 var loggedMessages; 599 if (true) { 600 loggedMessages = /* @__PURE__ */ new Set(); 601 } 602 function createLogOnce(severity, prefix) { 603 return function logOnce(...messages) { 604 if (true) { 605 const message = messages.join(" "); 606 const output = prefix ? `$prefix}: $message}` : message; 607 const key = `$severity}:$output}`; 608 if (!loggedMessages.has(key)) { 609 loggedMessages.add(key); 610 if (severity === "warn") { 611 console.warn(output); 612 } else { 613 console.error(output); 614 } 615 } 616 } 617 }; 618 } 619 620 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/warn.mjs 621 var warn = createLogOnce("warn", "Base UI"); 622 623 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/empty.mjs 624 function NOOP() { 625 } 626 var EMPTY_ARRAY = Object.freeze([]); 627 var EMPTY_OBJECT = Object.freeze({}); 628 629 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/getStateAttributesProps.mjs 630 function getStateAttributesProps(state, customMapping) { 631 const props = {}; 632 for (const key in state) { 633 const value = state[key]; 634 if (customMapping?.hasOwnProperty(key)) { 635 const customProps = customMapping[key](value); 636 if (customProps != null) { 637 Object.assign(props, customProps); 638 } 639 continue; 640 } 641 if (value === true) { 642 props[`data-$key.toLowerCase()}`] = ""; 643 } else if (value) { 644 props[`data-$key.toLowerCase()}`] = value.toString(); 645 } 646 } 647 return props; 648 } 649 650 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/resolveClassName.mjs 651 function resolveClassName(className, state) { 652 return typeof className === "function" ? className(state) : className; 653 } 654 655 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/resolveStyle.mjs 656 function resolveStyle(style, state) { 657 return typeof style === "function" ? style(state) : style; 658 } 659 660 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/merge-props/mergeProps.mjs 661 var EMPTY_PROPS = {}; 662 function mergeProps(a, b, c, d, e) { 663 if (!c && !d && !e && !a) { 664 return createInitialMergedProps(b); 665 } 666 let merged = createInitialMergedProps(a); 667 if (b) { 668 merged = mergeInto(merged, b); 669 } 670 if (c) { 671 merged = mergeInto(merged, c); 672 } 673 if (d) { 674 merged = mergeInto(merged, d); 675 } 676 if (e) { 677 merged = mergeInto(merged, e); 678 } 679 return merged; 680 } 681 function mergePropsN(props) { 682 if (props.length === 0) { 683 return EMPTY_PROPS; 684 } 685 if (props.length === 1) { 686 return createInitialMergedProps(props[0]); 687 } 688 let merged = createInitialMergedProps(props[0]); 689 for (let i = 1; i < props.length; i += 1) { 690 merged = mergeInto(merged, props[i]); 691 } 692 return merged; 693 } 694 function createInitialMergedProps(inputProps) { 695 if (isPropsGetter(inputProps)) { 696 return { 697 ...inputProps(EMPTY_PROPS) 698 }; 699 } 700 return copyInitialProps(inputProps); 701 } 702 function mergeInto(merged, inputProps) { 703 if (isPropsGetter(inputProps)) { 704 return inputProps(merged); 705 } 706 return mutablyMergeInto(merged, inputProps); 707 } 708 function copyInitialProps(inputProps) { 709 const copiedProps = { 710 ...inputProps 711 }; 712 for (const propName in copiedProps) { 713 const propValue = copiedProps[propName]; 714 if (isEventHandler(propName, propValue)) { 715 copiedProps[propName] = wrapEventHandler(propValue); 716 } 717 } 718 return copiedProps; 719 } 720 function mutablyMergeInto(mergedProps, externalProps) { 721 if (!externalProps) { 722 return mergedProps; 723 } 724 for (const propName in externalProps) { 725 const externalPropValue = externalProps[propName]; 726 switch (propName) { 727 case "style": { 728 mergedProps[propName] = mergeObjects(mergedProps.style, externalPropValue); 729 break; 730 } 731 case "className": { 732 mergedProps[propName] = mergeClassNames(mergedProps.className, externalPropValue); 733 break; 734 } 735 default: { 736 if (isEventHandler(propName, externalPropValue)) { 737 mergedProps[propName] = mergeEventHandlers(mergedProps[propName], externalPropValue); 738 } else { 739 mergedProps[propName] = externalPropValue; 740 } 741 } 742 } 743 } 744 return mergedProps; 745 } 746 function isEventHandler(key, value) { 747 const code0 = key.charCodeAt(0); 748 const code1 = key.charCodeAt(1); 749 const code2 = key.charCodeAt(2); 750 return code0 === 111 && code1 === 110 && code2 >= 65 && code2 <= 90 && (typeof value === "function" || typeof value === "undefined"); 751 } 752 function isPropsGetter(inputProps) { 753 return typeof inputProps === "function"; 754 } 755 function mergeEventHandlers(ourHandler, theirHandler) { 756 if (!theirHandler) { 757 return ourHandler; 758 } 759 if (!ourHandler) { 760 return wrapEventHandler(theirHandler); 761 } 762 return (...args) => { 763 const event = args[0]; 764 if (isSyntheticEvent(event)) { 765 const baseUIEvent = event; 766 makeEventPreventable(baseUIEvent); 767 const result2 = theirHandler(...args); 768 if (!baseUIEvent.baseUIHandlerPrevented) { 769 ourHandler?.(...args); 770 } 771 return result2; 772 } 773 const result = theirHandler(...args); 774 ourHandler?.(...args); 775 return result; 776 }; 777 } 778 function wrapEventHandler(handler) { 779 if (!handler) { 780 return handler; 781 } 782 return (...args) => { 783 const event = args[0]; 784 if (isSyntheticEvent(event)) { 785 makeEventPreventable(event); 786 } 787 return handler(...args); 788 }; 789 } 790 function makeEventPreventable(event) { 791 event.preventBaseUIHandler = () => { 792 event.baseUIHandlerPrevented = true; 793 }; 794 return event; 795 } 796 function mergeClassNames(ourClassName, theirClassName) { 797 if (theirClassName) { 798 if (ourClassName) { 799 return theirClassName + " " + ourClassName; 800 } 801 return theirClassName; 802 } 803 return ourClassName; 804 } 805 function isSyntheticEvent(event) { 806 return event != null && typeof event === "object" && "nativeEvent" in event; 807 } 808 809 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useRenderElement.mjs 810 var import_react = __toESM(require_react(), 1); 811 function useRenderElement(element, componentProps, params = {}) { 812 let renderProp = componentProps.render; 813 if (params.enabled !== false) { 814 renderProp = unwrapLazyRenderProp(renderProp); 815 } 816 const outProps = useRenderElementProps(componentProps, params, renderProp); 817 if (params.enabled === false) { 818 return null; 819 } 820 const state = params.state ?? EMPTY_OBJECT; 821 return evaluateRenderProp(element, renderProp, outProps, state); 822 } 823 function useRenderElementProps(componentProps, params, renderProp) { 824 const { 825 className: classNameProp, 826 style: styleProp 827 } = componentProps; 828 const { 829 state = EMPTY_OBJECT, 830 ref, 831 props, 832 stateAttributesMapping: stateAttributesMapping2, 833 enabled = true 834 } = params; 835 const className = enabled ? resolveClassName(classNameProp, state) : void 0; 836 const style = enabled ? resolveStyle(styleProp, state) : void 0; 837 const stateProps = enabled ? getStateAttributesProps(state, stateAttributesMapping2) : EMPTY_OBJECT; 838 const resolvedProps = enabled && props ? resolveRenderFunctionProps(props) : void 0; 839 const outProps = enabled ? mergeObjects(stateProps, resolvedProps) ?? {} : EMPTY_OBJECT; 840 if (typeof document !== "undefined") { 841 if (!enabled) { 842 void useMergedRefs(null, null); 843 } else if (Array.isArray(ref)) { 844 outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]); 845 } else { 846 outProps.ref = useMergedRefs(outProps.ref, getReactElementRef(renderProp), ref); 847 } 848 } 849 if (!enabled) { 850 return EMPTY_OBJECT; 851 } 852 if (className !== void 0) { 853 outProps.className = mergeClassNames(outProps.className, className); 854 } 855 if (style !== void 0) { 856 outProps.style = mergeObjects(outProps.style, style); 857 } 858 return outProps; 859 } 860 function resolveRenderFunctionProps(props) { 861 if (Array.isArray(props)) { 862 return mergePropsN(props); 863 } 864 return mergeProps(void 0, props); 865 } 866 var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"); 867 var COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/; 868 var LOWERCASE_CHARACTER_PATTERN = /[a-z]/; 869 function unwrapLazyRenderProp(render) { 870 if (render?.$$typeof !== REACT_LAZY_TYPE) { 871 return render; 872 } 873 const unwrapped = React4.Children.toArray(render)[0]; 874 return /* @__PURE__ */ React4.isValidElement(unwrapped) ? unwrapped : render; 875 } 876 function evaluateRenderProp(element, render, props, state) { 877 if (render) { 878 if (typeof render === "function") { 879 if (true) { 880 warnIfRenderPropLooksLikeComponent(render); 881 } 882 return render(props, state); 883 } 884 const mergedProps = mergeProps(props, render.props); 885 mergedProps.ref = props.ref; 886 if (true) { 887 if (!/* @__PURE__ */ React4.isValidElement(render)) { 888 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")); 889 } 890 } 891 return /* @__PURE__ */ React4.cloneElement(render, mergedProps); 892 } 893 return renderTag(element, props); 894 } 895 function warnIfRenderPropLooksLikeComponent(renderFn) { 896 const functionName = renderFn.name; 897 if (functionName.length === 0) { 898 return; 899 } 900 if (!COMPONENT_IDENTIFIER_PATTERN.test(functionName)) { 901 return; 902 } 903 if (!LOWERCASE_CHARACTER_PATTERN.test(functionName)) { 904 return; 905 } 906 warn(`The \`render\` prop received a function named \`$functionName}\` that starts with an uppercase letter.`, "This usually means a React component was passed directly as `render={Component}`.", "Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.", "If this is an intentional render callback, rename it to start with a lowercase letter.", "Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.", "https://base-ui.com/r/invalid-render-prop"); 907 } 908 function renderTag(Tag, props) { 909 if (Tag === "button") { 910 return /* @__PURE__ */ (0, import_react.createElement)("button", { 911 type: "button", 912 ...props, 913 key: props.key 914 }); 915 } 916 if (Tag === "img") { 917 return /* @__PURE__ */ (0, import_react.createElement)("img", { 918 alt: "", 919 ...props, 920 key: props.key 921 }); 922 } 923 return /* @__PURE__ */ React4.createElement(Tag, props); 924 } 925 926 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/safeReact.mjs 927 var React5 = __toESM(require_react(), 1); 928 var SafeReact = { 929 ...React5 930 }; 931 932 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useStableCallback.mjs 933 var useInsertionEffect = SafeReact.useInsertionEffect; 934 var useSafeInsertionEffect = ( 935 // React 17 doesn't have useInsertionEffect. 936 useInsertionEffect && // Preact replaces useInsertionEffect with useLayoutEffect and fires too late. 937 useInsertionEffect !== SafeReact.useLayoutEffect ? useInsertionEffect : (fn) => fn() 938 ); 939 function useStableCallback(callback) { 940 const stable = useRefWithInit(createStableCallback).current; 941 stable.next = callback; 942 useSafeInsertionEffect(stable.effect); 943 return stable.trampoline; 944 } 945 function createStableCallback() { 946 const stable = { 947 next: void 0, 948 callback: assertNotCalled, 949 trampoline: (...args) => stable.callback?.(...args), 950 effect: () => { 951 stable.callback = stable.next; 952 } 953 }; 954 return stable; 955 } 956 function assertNotCalled() { 957 if (true) { 958 throw ( 959 /* minify-error-disabled */ 960 new Error("Base UI: Cannot call an event handler while rendering.") 961 ); 962 } 963 } 964 965 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useIsoLayoutEffect.mjs 966 var React6 = __toESM(require_react(), 1); 967 var noop = () => { 968 }; 969 var useIsoLayoutEffect = typeof document !== "undefined" ? React6.useLayoutEffect : noop; 970 971 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs 972 var React8 = __toESM(require_react(), 1); 973 974 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useAnimationsFinished.mjs 975 var ReactDOM = __toESM(require_react_dom(), 1); 976 977 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useOnMount.mjs 978 var React7 = __toESM(require_react(), 1); 979 function useOnMount(fn) { 980 React7.useEffect(fn, EMPTY_ARRAY); 981 } 982 983 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useAnimationFrame.mjs 984 var EMPTY = null; 985 var LAST_RAF = globalThis.requestAnimationFrame; 986 var Scheduler = class { 987 /* This implementation uses an array as a backing data-structure for frame callbacks. 988 * It allows `O(1)` callback cancelling by inserting a `null` in the array, though it 989 * never calls the native `cancelAnimationFrame` if there are no frames left. This can 990 * be much more efficient if there is a call pattern that alterns as 991 * "request-cancel-request-cancel-…". 992 * But in the case of "request-request-…-cancel-cancel-…", it leaves the final animation 993 * frame to run anyway. We turn that frame into a `O(1)` no-op via `callbacksCount`. */ 994 callbacks = []; 995 callbacksCount = 0; 996 nextId = 1; 997 startId = 1; 998 isScheduled = false; 999 tick = (timestamp) => { 1000 this.isScheduled = false; 1001 const currentCallbacks = this.callbacks; 1002 const currentCallbacksCount = this.callbacksCount; 1003 this.callbacks = []; 1004 this.callbacksCount = 0; 1005 this.startId = this.nextId; 1006 if (currentCallbacksCount > 0) { 1007 for (let i = 0; i < currentCallbacks.length; i += 1) { 1008 currentCallbacks[i]?.(timestamp); 1009 } 1010 } 1011 }; 1012 request(fn) { 1013 const id = this.nextId; 1014 this.nextId += 1; 1015 this.callbacks.push(fn); 1016 this.callbacksCount += 1; 1017 const didRAFChange = LAST_RAF !== requestAnimationFrame && (LAST_RAF = requestAnimationFrame, true); 1018 if (!this.isScheduled || didRAFChange) { 1019 requestAnimationFrame(this.tick); 1020 this.isScheduled = true; 1021 } 1022 return id; 1023 } 1024 cancel(id) { 1025 const index2 = id - this.startId; 1026 if (index2 < 0 || index2 >= this.callbacks.length) { 1027 return; 1028 } 1029 if (this.callbacks[index2] === null) { 1030 return; 1031 } 1032 this.callbacks[index2] = null; 1033 this.callbacksCount -= 1; 1034 } 1035 }; 1036 var scheduler = new Scheduler(); 1037 var AnimationFrame = class _AnimationFrame { 1038 static create() { 1039 return new _AnimationFrame(); 1040 } 1041 static request(fn) { 1042 return scheduler.request(fn); 1043 } 1044 static cancel(id) { 1045 return scheduler.cancel(id); 1046 } 1047 currentId = EMPTY; 1048 /** 1049 * Executes `fn` after `delay`, clearing any previously scheduled call. 1050 */ 1051 request(fn) { 1052 this.cancel(); 1053 this.currentId = scheduler.request(() => { 1054 this.currentId = EMPTY; 1055 fn(); 1056 }); 1057 } 1058 cancel = () => { 1059 if (this.currentId !== EMPTY) { 1060 scheduler.cancel(this.currentId); 1061 this.currentId = EMPTY; 1062 } 1063 }; 1064 disposeEffect = () => { 1065 return this.cancel; 1066 }; 1067 }; 1068 function useAnimationFrame() { 1069 const timeout = useRefWithInit(AnimationFrame.create).current; 1070 useOnMount(timeout.disposeEffect); 1071 return timeout; 1072 } 1073 1074 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/resolveRef.mjs 1075 function resolveRef(maybeRef) { 1076 if (maybeRef == null) { 1077 return maybeRef; 1078 } 1079 return "current" in maybeRef ? maybeRef.current : maybeRef; 1080 } 1081 1082 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/getFiniteAnimations.mjs 1083 function getFiniteAnimations(element, options) { 1084 return element.getAnimations(options).filter((animation) => { 1085 const timing = animation.effect?.getTiming(); 1086 return timing?.duration !== Infinity && timing?.iterations !== Infinity; 1087 }); 1088 } 1089 1090 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/TransitionStatusDataAttributes.mjs 1091 var TransitionStatusDataAttributes_exports = {}; 1092 __export(TransitionStatusDataAttributes_exports, { 1093 endingStyle: () => endingStyle, 1094 startingStyle: () => startingStyle 1095 }); 1096 var startingStyle = "data-starting-style"; 1097 var endingStyle = "data-ending-style"; 1098 1099 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useAnimationsFinished.mjs 1100 var pendingCallbacks = null; 1101 function flushBeforePaint(fn) { 1102 if (!pendingCallbacks) { 1103 const callbacks = []; 1104 pendingCallbacks = callbacks; 1105 queueMicrotask(() => { 1106 pendingCallbacks = null; 1107 ReactDOM.flushSync(() => { 1108 for (const callback of callbacks) { 1109 callback(); 1110 } 1111 }); 1112 }); 1113 } 1114 pendingCallbacks.push(fn); 1115 } 1116 function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, batch = false) { 1117 const frame = useAnimationFrame(); 1118 return useStableCallback((fnToExecute, signal = null) => { 1119 frame.cancel(); 1120 const element = resolveRef(elementOrRef); 1121 if (element == null) { 1122 return; 1123 } 1124 const resolvedElement = element; 1125 const done = () => { 1126 if (!batch) { 1127 ReactDOM.flushSync(fnToExecute); 1128 return; 1129 } 1130 flushBeforePaint(() => { 1131 if (!signal?.aborted) { 1132 fnToExecute(); 1133 } 1134 }); 1135 }; 1136 if (typeof resolvedElement.getAnimations !== "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) { 1137 fnToExecute(); 1138 return; 1139 } 1140 function exec() { 1141 Promise.all(getFiniteAnimations(resolvedElement).map((animation) => animation.finished.then(NOOP))).then(() => { 1142 if (!signal?.aborted) { 1143 done(); 1144 } 1145 }, () => { 1146 if (signal?.aborted) { 1147 return; 1148 } 1149 const currentAnimations = getFiniteAnimations(resolvedElement); 1150 if (currentAnimations.some((animation) => animation.pending || animation.playState !== "finished")) { 1151 exec(); 1152 return; 1153 } 1154 done(); 1155 }); 1156 } 1157 if (waitForStartingStyleRemoved) { 1158 const startingStyleAttribute = startingStyle; 1159 if (!resolvedElement.hasAttribute(startingStyleAttribute)) { 1160 frame.request(exec); 1161 return; 1162 } 1163 const attributeObserver = new MutationObserver(() => { 1164 if (!resolvedElement.hasAttribute(startingStyleAttribute)) { 1165 attributeObserver.disconnect(); 1166 exec(); 1167 } 1168 }); 1169 attributeObserver.observe(resolvedElement, { 1170 attributes: true, 1171 attributeFilter: [startingStyleAttribute] 1172 }); 1173 signal?.addEventListener("abort", () => attributeObserver.disconnect(), { 1174 once: true 1175 }); 1176 return; 1177 } 1178 frame.request(exec); 1179 }); 1180 } 1181 1182 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useOpenChangeComplete.mjs 1183 function useOpenChangeComplete(parameters) { 1184 const { 1185 enabled = true, 1186 open: open3, 1187 ref, 1188 batch = false, 1189 onComplete: onCompleteParam 1190 } = parameters; 1191 const onComplete = useStableCallback(onCompleteParam); 1192 const runOnceAnimationsFinish = useAnimationsFinished(ref, open3, batch); 1193 React8.useEffect(() => { 1194 if (!enabled) { 1195 return void 0; 1196 } 1197 const abortController = new AbortController(); 1198 runOnceAnimationsFinish(onComplete, abortController.signal); 1199 return () => { 1200 abortController.abort(); 1201 }; 1202 }, [enabled, open3, onComplete, runOnceAnimationsFinish]); 1203 } 1204 1205 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/stateAttributesMapping.mjs 1206 var STARTING_HOOK = { 1207 [startingStyle]: "" 1208 }; 1209 var ENDING_HOOK = { 1210 [endingStyle]: "" 1211 }; 1212 var transitionStatusMapping = { 1213 transitionStatus(value) { 1214 if (value === "starting") { 1215 return STARTING_HOOK; 1216 } 1217 if (value === "ending") { 1218 return ENDING_HOOK; 1219 } 1220 return null; 1221 } 1222 }; 1223 1224 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useTransitionStatus.mjs 1225 var React9 = __toESM(require_react(), 1); 1226 function useTransitionStatus(open3, enableIdleState = false, deferEndingState = false, animateInitialOpen = false) { 1227 const [transitionStatus, setTransitionStatus] = React9.useState(open3 && enableIdleState ? "idle" : void 0); 1228 const [mounted, setMounted] = React9.useState(open3 && !animateInitialOpen); 1229 if (open3 && !mounted) { 1230 setMounted(true); 1231 setTransitionStatus("starting"); 1232 } 1233 if (!open3 && mounted && transitionStatus !== "ending" && !deferEndingState) { 1234 setTransitionStatus("ending"); 1235 } 1236 if (!open3 && !mounted && transitionStatus === "ending") { 1237 setTransitionStatus(void 0); 1238 } 1239 useIsoLayoutEffect(() => { 1240 if (!open3 && mounted && transitionStatus !== "ending" && deferEndingState) { 1241 const frame = AnimationFrame.request(() => { 1242 setTransitionStatus("ending"); 1243 }); 1244 return () => { 1245 AnimationFrame.cancel(frame); 1246 }; 1247 } 1248 return void 0; 1249 }, [open3, mounted, transitionStatus, deferEndingState]); 1250 useIsoLayoutEffect(() => { 1251 if (!open3 || enableIdleState || transitionStatus === void 0) { 1252 return void 0; 1253 } 1254 const frame = AnimationFrame.request(() => { 1255 setTransitionStatus(void 0); 1256 }); 1257 return () => { 1258 AnimationFrame.cancel(frame); 1259 }; 1260 }, [enableIdleState, open3, transitionStatus]); 1261 useIsoLayoutEffect(() => { 1262 if (!open3 || !enableIdleState) { 1263 return void 0; 1264 } 1265 if (open3 && mounted && transitionStatus !== "idle") { 1266 setTransitionStatus("starting"); 1267 } 1268 const frame = AnimationFrame.request(() => { 1269 setTransitionStatus("idle"); 1270 }); 1271 return () => { 1272 AnimationFrame.cancel(frame); 1273 }; 1274 }, [enableIdleState, open3, mounted, transitionStatus]); 1275 return { 1276 mounted, 1277 setMounted, 1278 transitionStatus 1279 }; 1280 } 1281 1282 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useTimeout.mjs 1283 var EMPTY2 = 0; 1284 var Timeout = class _Timeout { 1285 static create() { 1286 return new _Timeout(); 1287 } 1288 currentId = EMPTY2; 1289 /** 1290 * Executes `fn` after `delay`, clearing any previously scheduled call. 1291 */ 1292 start(delay, fn) { 1293 this.clear(); 1294 this.currentId = setTimeout(() => { 1295 this.currentId = EMPTY2; 1296 fn(); 1297 }, delay); 1298 } 1299 isStarted() { 1300 return this.currentId !== EMPTY2; 1301 } 1302 clear = () => { 1303 if (this.currentId !== EMPTY2) { 1304 clearTimeout(this.currentId); 1305 this.currentId = EMPTY2; 1306 } 1307 }; 1308 disposeEffect = () => { 1309 return this.clear; 1310 }; 1311 }; 1312 function useTimeout() { 1313 const timeout = useRefWithInit(Timeout.create).current; 1314 useOnMount(timeout.disposeEffect); 1315 return timeout; 1316 } 1317 1318 // packages/ui/build-module/icon/icon.mjs 1319 var import_element = __toESM(require_element(), 1); 1320 var import_primitives = __toESM(require_primitives(), 1); 1321 var import_jsx_runtime = __toESM(require_jsx_runtime(), 1); 1322 var Icon = (0, import_element.forwardRef)( 1323 function UnforwardedIcon({ icon, size: size4 = 24, style, ...restProps }, ref) { 1324 const mergedStyle = icon.props.style || style ? { ...icon.props.style, ...style } : void 0; 1325 return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( 1326 import_primitives.SVG, 1327 { 1328 ref, 1329 ...icon.props, 1330 ...restProps, 1331 ...mergedStyle ? { style: mergedStyle } : {}, 1332 width: size4, 1333 height: size4 1334 } 1335 ); 1336 } 1337 ); 1338 1339 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useControlled.mjs 1340 var React10 = __toESM(require_react(), 1); 1341 1342 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/error.mjs 1343 var error = createLogOnce("error", "Base UI"); 1344 1345 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useControlled.mjs 1346 function useControlled({ 1347 controlled, 1348 default: defaultProp, 1349 name, 1350 state = "value" 1351 }) { 1352 const { 1353 current: isControlled 1354 } = React10.useRef(controlled !== void 0); 1355 const [valueState, setValue] = React10.useState(() => defaultProp); 1356 const value = isControlled && controlled !== void 0 ? controlled : valueState; 1357 if (true) { 1358 React10.useEffect(() => { 1359 if (isControlled !== (controlled !== void 0)) { 1360 error([`A component is changing the $isControlled ? "" : "un"}controlled $state} state of $name} to be $isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled $name} 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")); 1361 } 1362 }, [state, name, controlled]); 1363 const { 1364 current: defaultValue 1365 } = React10.useRef(defaultProp); 1366 React10.useEffect(() => { 1367 if (!isControlled && serializeToDevModeString(defaultValue) !== serializeToDevModeString(defaultProp)) { 1368 error([`A component is changing the default $state} state of an uncontrolled $name} after being initialized. To suppress this warning opt to use a controlled $name}.`].join("\n")); 1369 } 1370 }, [defaultProp]); 1371 } 1372 const setValueIfUncontrolled = React10.useCallback((newValue) => { 1373 if (!isControlled) { 1374 setValue(newValue); 1375 } 1376 }, []); 1377 return [value, setValueIfUncontrolled]; 1378 } 1379 function serializeToDevModeString(input) { 1380 let nextId = 0; 1381 const seen = /* @__PURE__ */ new WeakMap(); 1382 try { 1383 const result = JSON.stringify(input, function replacer(key, value) { 1384 if (key === "_owner" && this != null && typeof this === "object" && "$$typeof" in this) { 1385 return void 0; 1386 } 1387 if (typeof value === "bigint") { 1388 return `__bigint__:$value}`; 1389 } 1390 if (value !== null && typeof value === "object") { 1391 const id = seen.get(value); 1392 if (id !== void 0) { 1393 return `__object__:$id}`; 1394 } 1395 seen.set(value, nextId); 1396 nextId += 1; 1397 } 1398 return value; 1399 }); 1400 return result ?? `__top__:$typeof input}`; 1401 } catch { 1402 return "__unserializable__"; 1403 } 1404 } 1405 1406 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useId.mjs 1407 var React12 = __toESM(require_react(), 1); 1408 1409 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useForcedRerendering.mjs 1410 var React11 = __toESM(require_react(), 1); 1411 function useForcedRerendering() { 1412 const [, setState] = React11.useState({}); 1413 return React11.useCallback(() => { 1414 setState({}); 1415 }, []); 1416 } 1417 1418 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useId.mjs 1419 var globalId = 0; 1420 function useGlobalId(idOverride, prefix = "mui") { 1421 const defaultId = React12.useRef(void 0); 1422 const forceRerender = useForcedRerendering(); 1423 const id = idOverride ?? defaultId.current; 1424 React12.useEffect(() => { 1425 if (defaultId.current == null) { 1426 globalId += 1; 1427 defaultId.current = `$prefix}-$globalId}`; 1428 if (idOverride == null) { 1429 forceRerender(); 1430 } 1431 } 1432 }, [idOverride, prefix, forceRerender]); 1433 return id; 1434 } 1435 var maybeReactUseId = SafeReact.useId; 1436 function useId(idOverride, prefix) { 1437 if (maybeReactUseId !== void 0) { 1438 const reactId = maybeReactUseId(); 1439 return idOverride ?? (prefix ? `$prefix}-$reactId}` : reactId); 1440 } 1441 return useGlobalId(idOverride, prefix); 1442 } 1443 1444 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useBaseUiId.mjs 1445 function useBaseUiId(idOverride) { 1446 return useId(idOverride, "base-ui"); 1447 } 1448 1449 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/collapsible/root/useCollapsibleRoot.mjs 1450 var React13 = __toESM(require_react(), 1); 1451 1452 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/createBaseUIEventDetails.mjs 1453 function createChangeEventDetails(reason, event, trigger, customProperties) { 1454 let canceled = false; 1455 let allowPropagation = false; 1456 const custom = customProperties ?? EMPTY_OBJECT; 1457 const details = { 1458 reason, 1459 event: event ?? new Event("base-ui"), 1460 cancel() { 1461 canceled = true; 1462 }, 1463 allowPropagation() { 1464 allowPropagation = true; 1465 }, 1466 get isCanceled() { 1467 return canceled; 1468 }, 1469 get isPropagationAllowed() { 1470 return allowPropagation; 1471 }, 1472 trigger, 1473 ...custom 1474 }; 1475 return details; 1476 } 1477 1478 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/reason-parts.mjs 1479 var reason_parts_exports = {}; 1480 __export(reason_parts_exports, { 1481 cancelOpen: () => cancelOpen, 1482 chipRemovePress: () => chipRemovePress, 1483 clearPress: () => clearPress, 1484 closePress: () => closePress, 1485 closeWatcher: () => closeWatcher, 1486 decrementPress: () => decrementPress, 1487 disabled: () => disabled, 1488 drag: () => drag, 1489 escapeKey: () => escapeKey, 1490 focusOut: () => focusOut, 1491 imperativeAction: () => imperativeAction, 1492 incrementPress: () => incrementPress, 1493 initial: () => initial, 1494 inputBlur: () => inputBlur, 1495 inputChange: () => inputChange, 1496 inputClear: () => inputClear, 1497 inputPaste: () => inputPaste, 1498 inputPress: () => inputPress, 1499 itemPress: () => itemPress, 1500 keyboard: () => keyboard, 1501 linkPress: () => linkPress, 1502 listNavigation: () => listNavigation, 1503 missing: () => missing, 1504 none: () => none, 1505 outsidePress: () => outsidePress, 1506 pointer: () => pointer, 1507 popupClose: () => popupClose, 1508 scrub: () => scrub, 1509 siblingOpen: () => siblingOpen, 1510 swipe: () => swipe, 1511 trackPress: () => trackPress, 1512 triggerFocus: () => triggerFocus, 1513 triggerHover: () => triggerHover, 1514 triggerPress: () => triggerPress, 1515 wheel: () => wheel, 1516 windowResize: () => windowResize 1517 }); 1518 var none = "none"; 1519 var triggerPress = "trigger-press"; 1520 var triggerHover = "trigger-hover"; 1521 var triggerFocus = "trigger-focus"; 1522 var outsidePress = "outside-press"; 1523 var itemPress = "item-press"; 1524 var closePress = "close-press"; 1525 var linkPress = "link-press"; 1526 var clearPress = "clear-press"; 1527 var chipRemovePress = "chip-remove-press"; 1528 var trackPress = "track-press"; 1529 var incrementPress = "increment-press"; 1530 var decrementPress = "decrement-press"; 1531 var inputChange = "input-change"; 1532 var inputClear = "input-clear"; 1533 var inputBlur = "input-blur"; 1534 var inputPaste = "input-paste"; 1535 var inputPress = "input-press"; 1536 var focusOut = "focus-out"; 1537 var escapeKey = "escape-key"; 1538 var closeWatcher = "close-watcher"; 1539 var listNavigation = "list-navigation"; 1540 var keyboard = "keyboard"; 1541 var pointer = "pointer"; 1542 var drag = "drag"; 1543 var wheel = "wheel"; 1544 var scrub = "scrub"; 1545 var popupClose = "popup-close"; 1546 var cancelOpen = "cancel-open"; 1547 var siblingOpen = "sibling-open"; 1548 var disabled = "disabled"; 1549 var missing = "missing"; 1550 var initial = "initial"; 1551 var imperativeAction = "imperative-action"; 1552 var swipe = "swipe"; 1553 var windowResize = "window-resize"; 1554 1555 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/collapsible/root/useCollapsibleRoot.mjs 1556 function useCollapsibleRoot(parameters) { 1557 const { 1558 open: openParam, 1559 defaultOpen = false, 1560 onOpenChange, 1561 disabled: disabled2 1562 } = parameters; 1563 const [open3, setOpen] = useControlled({ 1564 controlled: openParam, 1565 default: defaultOpen, 1566 name: "Collapsible", 1567 state: "open" 1568 }); 1569 const { 1570 mounted, 1571 setMounted, 1572 transitionStatus 1573 } = useTransitionStatus(open3, true, true); 1574 const defaultPanelId = useBaseUiId(); 1575 const [registeredPanelId, setPanelIdState] = React13.useState(); 1576 const panelId = registeredPanelId === null ? void 0 : registeredPanelId ?? defaultPanelId; 1577 const handleTrigger = useStableCallback((event) => { 1578 const nextOpen = !open3; 1579 const eventDetails = createChangeEventDetails(reason_parts_exports.triggerPress, event.nativeEvent); 1580 onOpenChange(nextOpen, eventDetails); 1581 if (eventDetails.isCanceled) { 1582 return; 1583 } 1584 setOpen(nextOpen); 1585 }); 1586 return React13.useMemo(() => ({ 1587 defaultPanelId, 1588 disabled: disabled2, 1589 handleTrigger, 1590 mounted, 1591 open: open3, 1592 panelId, 1593 setMounted, 1594 setOpen, 1595 setPanelIdState, 1596 transitionStatus 1597 }), [defaultPanelId, disabled2, handleTrigger, mounted, open3, panelId, setMounted, setOpen, setPanelIdState, transitionStatus]); 1598 } 1599 1600 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/collapsible/root/CollapsibleRootContext.mjs 1601 var React14 = __toESM(require_react(), 1); 1602 var CollapsibleRootContext = /* @__PURE__ */ React14.createContext(void 0); 1603 if (true) CollapsibleRootContext.displayName = "CollapsibleRootContext"; 1604 function useCollapsibleRootContext() { 1605 const context = React14.useContext(CollapsibleRootContext); 1606 if (context === void 0) { 1607 throw new Error(true ? "Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>." : formatErrorMessage_default(15)); 1608 } 1609 return context; 1610 } 1611 1612 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/collapsible/panel/CollapsiblePanelDataAttributes.mjs 1613 var open = "data-open"; 1614 var closed = "data-closed"; 1615 var startingStyle2 = TransitionStatusDataAttributes_exports.startingStyle; 1616 var endingStyle2 = TransitionStatusDataAttributes_exports.endingStyle; 1617 1618 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/collapsible/trigger/CollapsibleTriggerDataAttributes.mjs 1619 var panelOpen = "data-panel-open"; 1620 1621 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/collapsibleOpenStateMapping.mjs 1622 var PANEL_OPEN_HOOK = { 1623 [open]: "" 1624 }; 1625 var PANEL_CLOSED_HOOK = { 1626 [closed]: "" 1627 }; 1628 var triggerOpenStateMapping = { 1629 open(value) { 1630 if (value) { 1631 return { 1632 [panelOpen]: "" 1633 }; 1634 } 1635 return null; 1636 } 1637 }; 1638 var collapsibleOpenStateMapping = { 1639 open(value) { 1640 if (value) { 1641 return PANEL_OPEN_HOOK; 1642 } 1643 return PANEL_CLOSED_HOOK; 1644 } 1645 }; 1646 1647 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/use-button/useButton.mjs 1648 var React17 = __toESM(require_react(), 1); 1649 1650 // node_modules/.store/@floating-ui/utils@0.2.12-gOxTzMf36nCrbeHpEew-rw/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs 1651 function hasWindow() { 1652 return typeof window !== "undefined"; 1653 } 1654 function getNodeName(node) { 1655 if (isNode(node)) { 1656 return (node.nodeName || "").toLowerCase(); 1657 } 1658 return "#document"; 1659 } 1660 function getWindow(node) { 1661 var _node$ownerDocument; 1662 return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window; 1663 } 1664 function getDocumentElement(node) { 1665 var _ref; 1666 return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement; 1667 } 1668 function isNode(value) { 1669 if (!hasWindow()) { 1670 return false; 1671 } 1672 return value instanceof Node || value instanceof getWindow(value).Node; 1673 } 1674 function isElement(value) { 1675 if (!hasWindow()) { 1676 return false; 1677 } 1678 return value instanceof Element || value instanceof getWindow(value).Element; 1679 } 1680 function isHTMLElement(value) { 1681 if (!hasWindow()) { 1682 return false; 1683 } 1684 return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement; 1685 } 1686 function isShadowRoot(value) { 1687 if (!hasWindow() || typeof ShadowRoot === "undefined") { 1688 return false; 1689 } 1690 return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot; 1691 } 1692 function isOverflowElement(element) { 1693 const { 1694 overflow, 1695 overflowX, 1696 overflowY, 1697 display 1698 } = getComputedStyle2(element); 1699 return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents"; 1700 } 1701 function isTableElement(element) { 1702 return /^(table|td|th)$/.test(getNodeName(element)); 1703 } 1704 function isTopLayer(element) { 1705 try { 1706 if (element.matches(":popover-open")) { 1707 return true; 1708 } 1709 } catch (_e) { 1710 } 1711 try { 1712 return element.matches(":modal"); 1713 } catch (_e) { 1714 return false; 1715 } 1716 } 1717 var willChangeRe = /transform|translate|scale|rotate|perspective|filter/; 1718 var containRe = /paint|layout|strict|content/; 1719 var isNotNone = (value) => !!value && value !== "none"; 1720 var isWebKitValue; 1721 function isContainingBlock(elementOrCss) { 1722 const css = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss; 1723 return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || ""); 1724 } 1725 function getContainingBlock(element) { 1726 let currentNode = getParentNode(element); 1727 while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) { 1728 if (isContainingBlock(currentNode)) { 1729 return currentNode; 1730 } else if (isTopLayer(currentNode)) { 1731 return null; 1732 } 1733 currentNode = getParentNode(currentNode); 1734 } 1735 return null; 1736 } 1737 function isWebKit() { 1738 if (isWebKitValue == null) { 1739 isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"); 1740 } 1741 return isWebKitValue; 1742 } 1743 function isLastTraversableNode(node) { 1744 return /^(html|body|#document)$/.test(getNodeName(node)); 1745 } 1746 function getComputedStyle2(element) { 1747 return getWindow(element).getComputedStyle(element); 1748 } 1749 function getNodeScroll(element) { 1750 if (isElement(element)) { 1751 return { 1752 scrollLeft: element.scrollLeft, 1753 scrollTop: element.scrollTop 1754 }; 1755 } 1756 return { 1757 scrollLeft: element.scrollX, 1758 scrollTop: element.scrollY 1759 }; 1760 } 1761 function getParentNode(node) { 1762 if (getNodeName(node) === "html") { 1763 return node; 1764 } 1765 const result = ( 1766 // Step into the shadow DOM of the parent of a slotted node. 1767 node.assignedSlot || // DOM Element detected. 1768 node.parentNode || // ShadowRoot detected. 1769 isShadowRoot(node) && node.host || // Fallback. 1770 getDocumentElement(node) 1771 ); 1772 return isShadowRoot(result) ? result.host : result; 1773 } 1774 function getNearestOverflowAncestor(node) { 1775 const parentNode = getParentNode(node); 1776 if (isLastTraversableNode(parentNode)) { 1777 return (node.ownerDocument || node).body; 1778 } 1779 if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) { 1780 return parentNode; 1781 } 1782 return getNearestOverflowAncestor(parentNode); 1783 } 1784 function getOverflowAncestors(node, list, traverseIframes) { 1785 var _node$ownerDocument2; 1786 if (list === void 0) { 1787 list = []; 1788 } 1789 if (traverseIframes === void 0) { 1790 traverseIframes = true; 1791 } 1792 const scrollableAncestor = getNearestOverflowAncestor(node); 1793 const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body); 1794 const win = getWindow(scrollableAncestor); 1795 if (isBody) { 1796 const frameElement = getFrameElement(win); 1797 return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []); 1798 } else { 1799 return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes)); 1800 } 1801 } 1802 function getFrameElement(win) { 1803 return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null; 1804 } 1805 1806 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/composite/root/CompositeRootContext.mjs 1807 var React15 = __toESM(require_react(), 1); 1808 var CompositeRootContext = /* @__PURE__ */ React15.createContext(void 0); 1809 if (true) CompositeRootContext.displayName = "CompositeRootContext"; 1810 function useCompositeRootContext(optional = false) { 1811 const context = React15.useContext(CompositeRootContext); 1812 if (context === void 0 && !optional) { 1813 throw new Error(true ? "Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>." : formatErrorMessage_default(16)); 1814 } 1815 return context; 1816 } 1817 1818 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/useFocusableWhenDisabled.mjs 1819 var React16 = __toESM(require_react(), 1); 1820 function useFocusableWhenDisabled(parameters) { 1821 const { 1822 focusableWhenDisabled, 1823 disabled: disabled2, 1824 composite = false, 1825 tabIndex: tabIndexProp = 0, 1826 isNativeButton 1827 } = parameters; 1828 const isFocusableComposite = composite && focusableWhenDisabled !== false; 1829 const isNonFocusableComposite = composite && focusableWhenDisabled === false; 1830 const props = React16.useMemo(() => { 1831 const additionalProps = { 1832 // allow Tabbing away from focusableWhenDisabled elements 1833 onKeyDown(event) { 1834 if (disabled2 && focusableWhenDisabled && event.key !== "Tab") { 1835 event.preventDefault(); 1836 } 1837 } 1838 }; 1839 if (!composite) { 1840 additionalProps.tabIndex = tabIndexProp; 1841 if (!isNativeButton && disabled2) { 1842 additionalProps.tabIndex = focusableWhenDisabled ? tabIndexProp : -1; 1843 } 1844 } 1845 if (isNativeButton && (focusableWhenDisabled || isFocusableComposite) || !isNativeButton && disabled2) { 1846 additionalProps["aria-disabled"] = disabled2; 1847 } 1848 if (isNativeButton && (!focusableWhenDisabled || isNonFocusableComposite)) { 1849 additionalProps.disabled = disabled2; 1850 } 1851 return additionalProps; 1852 }, [composite, disabled2, focusableWhenDisabled, isFocusableComposite, isNonFocusableComposite, isNativeButton, tabIndexProp]); 1853 return { 1854 props 1855 }; 1856 } 1857 1858 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/owner.mjs 1859 function ownerDocument(node) { 1860 return node?.ownerDocument || document; 1861 } 1862 1863 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/dispatchClickWithModifiers.mjs 1864 function dispatchClickWithModifiers(target, sourceEvent, { 1865 detail = 0, 1866 pointerType = "" 1867 } = {}) { 1868 target.dispatchEvent(new (getWindow(target)).PointerEvent("click", { 1869 bubbles: true, 1870 cancelable: true, 1871 composed: true, 1872 detail, 1873 pointerType, 1874 shiftKey: sourceEvent.shiftKey, 1875 ctrlKey: sourceEvent.ctrlKey, 1876 altKey: sourceEvent.altKey, 1877 metaKey: sourceEvent.metaKey 1878 })); 1879 } 1880 1881 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/use-button/useButton.mjs 1882 function useButton(parameters = {}) { 1883 const { 1884 disabled: disabled2 = false, 1885 focusableWhenDisabled, 1886 tabIndex = 0, 1887 native: isNativeButton = true, 1888 composite: compositeProp 1889 } = parameters; 1890 const elementRef = React17.useRef(null); 1891 const compositeRootContext = useCompositeRootContext(true); 1892 const isCompositeItem = compositeProp ?? compositeRootContext !== void 0; 1893 const { 1894 props: focusableWhenDisabledProps 1895 } = useFocusableWhenDisabled({ 1896 focusableWhenDisabled, 1897 disabled: disabled2, 1898 composite: isCompositeItem, 1899 tabIndex, 1900 isNativeButton 1901 }); 1902 if (true) { 1903 React17.useEffect(() => { 1904 if (!elementRef.current) { 1905 return; 1906 } 1907 const isButtonTag = isButtonElement(elementRef.current); 1908 if (isNativeButton) { 1909 if (!isButtonTag) { 1910 const ownerStackMessage = SafeReact.captureOwnerStack?.() || ""; 1911 const message = "A component that acts as a button expected a native <button> because the `nativeButton` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the `render` prop, or set `nativeButton` to `false`."; 1912 error(`$message}$ownerStackMessage}`); 1913 } 1914 } else if (isButtonTag) { 1915 const ownerStackMessage = SafeReact.captureOwnerStack?.() || ""; 1916 const message = "A component that acts as a button expected a non-<button> because the `nativeButton` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as `role` or `aria-disabled`). Use a non-<button> in the `render` prop, or set `nativeButton` to `true`."; 1917 error(`$message}$ownerStackMessage}`); 1918 } 1919 }, [isNativeButton]); 1920 } 1921 const updateDisabled = React17.useCallback(() => { 1922 const element = elementRef.current; 1923 if (!isButtonElement(element)) { 1924 return; 1925 } 1926 if (isCompositeItem && disabled2 && focusableWhenDisabledProps.disabled === void 0 && element.disabled) { 1927 element.disabled = false; 1928 } 1929 }, [disabled2, focusableWhenDisabledProps.disabled, isCompositeItem]); 1930 useIsoLayoutEffect(updateDisabled, [updateDisabled]); 1931 const getButtonProps = React17.useCallback((externalProps = {}) => { 1932 const { 1933 onClick: externalOnClick, 1934 onMouseDown: externalOnMouseDown, 1935 onKeyUp: externalOnKeyUp, 1936 onKeyDown: externalOnKeyDown, 1937 onPointerDown: externalOnPointerDown, 1938 ...otherExternalProps 1939 } = externalProps; 1940 return mergeProps({ 1941 onClick(event) { 1942 if (disabled2) { 1943 event.preventDefault(); 1944 return; 1945 } 1946 externalOnClick?.(event); 1947 }, 1948 onMouseDown(event) { 1949 if (!disabled2) { 1950 externalOnMouseDown?.(event); 1951 } 1952 }, 1953 onKeyDown(event) { 1954 if (disabled2) { 1955 return; 1956 } 1957 makeEventPreventable(event); 1958 externalOnKeyDown?.(event); 1959 if (event.baseUIHandlerPrevented) { 1960 return; 1961 } 1962 const isCurrentTarget = event.target === event.currentTarget; 1963 const currentTarget = event.currentTarget; 1964 const isButton = isButtonElement(currentTarget); 1965 const isLink = !isNativeButton && isValidLinkElement(currentTarget); 1966 const shouldClick = isCurrentTarget && (isNativeButton ? isButton : !isLink); 1967 const isEnterKey = event.key === "Enter"; 1968 const isSpaceKey = event.key === " "; 1969 const role = currentTarget.getAttribute("role"); 1970 const isTextNavigationRole = role?.startsWith("menuitem") || role === "option" || role === "gridcell"; 1971 if (isCurrentTarget && isCompositeItem && isSpaceKey) { 1972 if (event.defaultPrevented && isTextNavigationRole) { 1973 return; 1974 } 1975 event.preventDefault(); 1976 if (!isNativeButton || isButton) { 1977 event.preventBaseUIHandler(); 1978 dispatchClickWithModifiers(currentTarget, event); 1979 } 1980 return; 1981 } 1982 if (!shouldClick || isNativeButton || !isSpaceKey && !isEnterKey) { 1983 if (isCurrentTarget && isLink && isSpaceKey) { 1984 event.preventDefault(); 1985 } 1986 return; 1987 } 1988 if (event.defaultPrevented) { 1989 return; 1990 } 1991 event.preventDefault(); 1992 if (isEnterKey) { 1993 event.preventBaseUIHandler(); 1994 dispatchClickWithModifiers(currentTarget, event); 1995 } 1996 }, 1997 onKeyUp(event) { 1998 if (disabled2) { 1999 return; 2000 } 2001 makeEventPreventable(event); 2002 externalOnKeyUp?.(event); 2003 if (event.target === event.currentTarget && isNativeButton && isCompositeItem && isButtonElement(event.currentTarget) && event.key === " ") { 2004 event.preventDefault(); 2005 return; 2006 } 2007 if (event.baseUIHandlerPrevented) { 2008 return; 2009 } 2010 if (event.target === event.currentTarget && !isNativeButton && !isCompositeItem && !event.defaultPrevented && event.key === " ") { 2011 event.preventBaseUIHandler(); 2012 dispatchClickWithModifiers(event.currentTarget, event); 2013 } 2014 }, 2015 onPointerDown(event) { 2016 if (disabled2) { 2017 event.preventDefault(); 2018 return; 2019 } 2020 externalOnPointerDown?.(event); 2021 } 2022 }, isNativeButton ? { 2023 type: "button" 2024 } : { 2025 role: "button" 2026 }, focusableWhenDisabledProps, otherExternalProps); 2027 }, [disabled2, focusableWhenDisabledProps, isCompositeItem, isNativeButton]); 2028 const buttonRef = useStableCallback((element) => { 2029 elementRef.current = element; 2030 updateDisabled(); 2031 }); 2032 return { 2033 getButtonProps, 2034 buttonRef 2035 }; 2036 } 2037 function isButtonElement(elem) { 2038 return isHTMLElement(elem) && elem.tagName === "BUTTON"; 2039 } 2040 function isValidLinkElement(elem) { 2041 return isHTMLElement(elem) && elem.tagName === "A" && Boolean(elem.href); 2042 } 2043 2044 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/collapsible/panel/useCollapsiblePanel.mjs 2045 var React18 = __toESM(require_react(), 1); 2046 2047 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/addEventListener.mjs 2048 function addEventListener(target, type, listener, options) { 2049 target.addEventListener(type, listener, options); 2050 return () => { 2051 target.removeEventListener(type, listener, options); 2052 }; 2053 } 2054 2055 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/useValueAsRef.mjs 2056 function useValueAsRef(value) { 2057 const latest = useRefWithInit(createLatestRef, value).current; 2058 latest.next = value; 2059 useIsoLayoutEffect(latest.effect); 2060 return latest; 2061 } 2062 function createLatestRef(value) { 2063 const latest = { 2064 current: value, 2065 next: value, 2066 effect: () => { 2067 latest.current = latest.next; 2068 } 2069 }; 2070 return latest; 2071 } 2072 2073 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/collapsible/panel/useCollapsiblePanel.mjs 2074 var EMPTY_DIMENSIONS = { 2075 height: void 0, 2076 width: void 0 2077 }; 2078 function useCollapsiblePanel(parameters) { 2079 const { 2080 externalRef, 2081 hiddenUntilFound, 2082 id: idParam, 2083 keepMounted, 2084 mounted, 2085 onOpenChange, 2086 open: open3, 2087 setMounted, 2088 setOpen, 2089 transitionStatus 2090 } = parameters; 2091 const panelRef = React18.useRef(null); 2092 const animationTypeRef = React18.useRef(null); 2093 const [dimensions, setDimensionsUnwrapped] = React18.useState(EMPTY_DIMENSIONS); 2094 const lastMeasuredDimensionsRef = React18.useRef(EMPTY_DIMENSIONS); 2095 const shouldSkipNextOpenRef = React18.useRef(false); 2096 const shouldPreventMountAnimationRef = React18.useRef(open3); 2097 const shouldPreventActivityResumeAnimationRef = React18.useRef(false); 2098 const [forcePanelIdle, setForcePanelIdle] = React18.useState(false); 2099 const pendingTemporaryStyleRestoreRef = React18.useRef(null); 2100 const mergedPanelRef = useMergedRefs(externalRef, panelRef); 2101 const latestOpenRef = useValueAsRef(open3); 2102 const runOnceCloseAnimationsFinish = useAnimationsFinished(panelRef); 2103 const hidden = !open3 && !mounted; 2104 const panelTransitionStatus = forcePanelIdle ? "idle" : transitionStatus; 2105 const shouldPreventOpenAnimation = open3 && // These 2 refs are safe to read in render, they are only written from committed 2106 // layout/effect paths and gate one-shot motion suppression for the next open 2107 // lifecycle. They intentionally expose the last committed motion snapshot. 2108 (shouldPreventMountAnimationRef.current || shouldPreventActivityResumeAnimationRef.current); 2109 const renderedDimensions = !open3 && mounted && // These 2 refs are also safe to read in render, both hold the last committed 2110 // animation mode and measurement. This fallback only restores a previously 2111 // measured pixel size after the live dimensions state has been reset back to `auto`. 2112 animationTypeRef.current === "css-animation" && dimensions.height === void 0 && dimensions.width === void 0 ? lastMeasuredDimensionsRef.current : dimensions; 2113 const shouldPersistHiddenTransitionStyles = hiddenUntilFound && hidden && animationTypeRef.current !== "css-animation"; 2114 const setDimensions = useStableCallback((nextDimensions, shouldCacheMeasurement = true) => { 2115 if (shouldCacheMeasurement) { 2116 lastMeasuredDimensionsRef.current = nextDimensions; 2117 } 2118 setDimensionsUnwrapped(nextDimensions); 2119 }); 2120 const restorePendingTemporaryStyle = useStableCallback(() => { 2121 pendingTemporaryStyleRestoreRef.current?.(); 2122 pendingTemporaryStyleRestoreRef.current = null; 2123 }); 2124 const setPendingTemporaryStyleRestore = useStableCallback((restore) => { 2125 restorePendingTemporaryStyle(); 2126 pendingTemporaryStyleRestoreRef.current = () => { 2127 pendingTemporaryStyleRestoreRef.current = null; 2128 restore(); 2129 }; 2130 }); 2131 const markActivityResumeAnimationSuppressed = useStableCallback(() => { 2132 if (open3 && mounted && animationTypeRef.current === "css-animation") { 2133 shouldPreventActivityResumeAnimationRef.current = true; 2134 } 2135 }); 2136 useIsoLayoutEffect(() => { 2137 if (!forcePanelIdle || transitionStatus === "starting") { 2138 return; 2139 } 2140 setForcePanelIdle(false); 2141 }, [forcePanelIdle, transitionStatus]); 2142 React18.useEffect(() => { 2143 return () => { 2144 markActivityResumeAnimationSuppressed(); 2145 restorePendingTemporaryStyle(); 2146 }; 2147 }, [markActivityResumeAnimationSuppressed, restorePendingTemporaryStyle]); 2148 useIsoLayoutEffect(() => { 2149 if (!open3) { 2150 shouldPreventMountAnimationRef.current = false; 2151 shouldPreventActivityResumeAnimationRef.current = false; 2152 } 2153 const panel = panelRef.current; 2154 if (!panel) { 2155 return void 0; 2156 } 2157 if (!open3 && pendingTemporaryStyleRestoreRef.current) { 2158 restorePendingTemporaryStyle(); 2159 } 2160 const animationType = getAnimationType(panel, shouldPreventOpenAnimation); 2161 animationTypeRef.current = animationType; 2162 if (open3 && transitionStatus === "idle" && shouldPreventMountAnimationRef.current && animationType === "css-animation") { 2163 lastMeasuredDimensionsRef.current = getDimensions(panel); 2164 return void 0; 2165 } 2166 if (open3 && transitionStatus === "starting") { 2167 const skipNextOpen = shouldSkipNextOpenRef.current; 2168 shouldSkipNextOpenRef.current = false; 2169 if (animationType === "none") { 2170 setDimensions(getDimensions(panel)); 2171 setForcePanelIdle(true); 2172 return void 0; 2173 } 2174 if (animationType === "css-transition") { 2175 const restoreLayoutStyles = resetLayoutStyles(panel); 2176 setDimensions(getDimensions(panel)); 2177 if (!skipNextOpen) { 2178 return restoreLayoutStyles; 2179 } 2180 const restoreTransitionDuration = setTemporaryStyle(panel, "transition-duration", "0s"); 2181 setPendingTemporaryStyleRestore(restoreTransitionDuration); 2182 setForcePanelIdle(true); 2183 return restoreLayoutStyles; 2184 } 2185 setDimensions(getDimensions(panel)); 2186 const restoreAnimationName = setTemporaryStyle(panel, "animation-name", "none"); 2187 if (!skipNextOpen) { 2188 restoreAnimationName(); 2189 return void 0; 2190 } 2191 const restoreAnimationDuration = setTemporaryStyle(panel, "animation-duration", "0s"); 2192 restoreAnimationName(); 2193 setPendingTemporaryStyleRestore(restoreAnimationDuration); 2194 setForcePanelIdle(true); 2195 return void 0; 2196 } 2197 if (!open3 && mounted && (transitionStatus === "idle" || transitionStatus === "starting")) { 2198 if (animationType === "none") { 2199 setDimensions(EMPTY_DIMENSIONS, false); 2200 setMounted(false); 2201 return void 0; 2202 } 2203 setDimensions(getDimensions(panel)); 2204 return void 0; 2205 } 2206 if (transitionStatus !== "ending") { 2207 return void 0; 2208 } 2209 if (animationType === "none") { 2210 setMounted(false); 2211 return void 0; 2212 } 2213 const nextDimensions = getDimensions(panel); 2214 const hasMeasuredSize = nextDimensions.height > 0 || nextDimensions.width > 0; 2215 if (!hasMeasuredSize) { 2216 setMounted(false); 2217 return void 0; 2218 } 2219 setDimensions(nextDimensions); 2220 if (animationType === "css-animation") { 2221 const restoreAnimationName = setTemporaryStyle(panel, "animation-name", "none"); 2222 restoreAnimationName(); 2223 } 2224 return void 0; 2225 }, [mounted, open3, restorePendingTemporaryStyle, setDimensions, setMounted, setPendingTemporaryStyleRestore, shouldPreventOpenAnimation, transitionStatus]); 2226 useOpenChangeComplete({ 2227 enabled: open3 && mounted && panelTransitionStatus === "idle", 2228 open: true, 2229 ref: panelRef, 2230 onComplete() { 2231 if (!open3) { 2232 return; 2233 } 2234 setDimensions(EMPTY_DIMENSIONS, false); 2235 } 2236 }); 2237 React18.useEffect(() => { 2238 if (open3 || !mounted || panelTransitionStatus !== "ending") { 2239 return void 0; 2240 } 2241 const panel = panelRef.current; 2242 if (!panel) { 2243 setMounted(false); 2244 setDimensions(EMPTY_DIMENSIONS, false); 2245 return void 0; 2246 } 2247 const abortController = new AbortController(); 2248 let endingStyleFrame = -1; 2249 function handleComplete() { 2250 if (latestOpenRef.current) { 2251 return; 2252 } 2253 setMounted(false); 2254 setDimensions(EMPTY_DIMENSIONS, false); 2255 } 2256 endingStyleFrame = AnimationFrame.request(() => { 2257 runOnceCloseAnimationsFinish(handleComplete, abortController.signal); 2258 }); 2259 return () => { 2260 AnimationFrame.cancel(endingStyleFrame); 2261 abortController.abort(); 2262 }; 2263 }, [latestOpenRef, mounted, open3, panelTransitionStatus, runOnceCloseAnimationsFinish, setDimensions, setMounted]); 2264 useIsoLayoutEffect(() => { 2265 const panel = panelRef.current; 2266 if (!panel || !hiddenUntilFound || !hidden) { 2267 return; 2268 } 2269 panel.setAttribute("hidden", "until-found"); 2270 }, [hidden, hiddenUntilFound]); 2271 React18.useEffect(function registerBeforeMatchListener() { 2272 const panel = panelRef.current; 2273 if (!panel) { 2274 return void 0; 2275 } 2276 const revealDecisionTimeout = Timeout.create(); 2277 let revertRevealFrame = -1; 2278 const scheduleRevealRevert = (revertSkippedMotion, restoreStartingStyle) => { 2279 revealDecisionTimeout.start(0, () => { 2280 if (latestOpenRef.current) { 2281 return; 2282 } 2283 revertRevealFrame = AnimationFrame.request(() => { 2284 if (latestOpenRef.current) { 2285 return; 2286 } 2287 if (revertSkippedMotion) { 2288 shouldSkipNextOpenRef.current = false; 2289 } 2290 if (restoreStartingStyle) { 2291 panel.setAttribute(startingStyle2, ""); 2292 } 2293 panel.setAttribute("hidden", "until-found"); 2294 }); 2295 }); 2296 }; 2297 const handleBeforeMatch = (event) => { 2298 const eventDetails = createChangeEventDetails(reason_parts_exports.none, event); 2299 onOpenChange(true, eventDetails); 2300 if (eventDetails.isCanceled) { 2301 scheduleRevealRevert(false, false); 2302 return; 2303 } 2304 shouldSkipNextOpenRef.current = true; 2305 const hadStartingStyle = panel.hasAttribute(startingStyle2); 2306 panel.removeAttribute(startingStyle2); 2307 setOpen(true); 2308 scheduleRevealRevert(true, hadStartingStyle); 2309 }; 2310 const cleanupBeforeMatchListener = addEventListener(panel, "beforematch", handleBeforeMatch); 2311 return () => { 2312 revealDecisionTimeout.clear(); 2313 AnimationFrame.cancel(revertRevealFrame); 2314 cleanupBeforeMatchListener(); 2315 }; 2316 }, [latestOpenRef, onOpenChange, setOpen]); 2317 const shouldRender = keepMounted || hiddenUntilFound || mounted || open3; 2318 return { 2319 height: renderedDimensions.height, 2320 props: { 2321 ...shouldPersistHiddenTransitionStyles ? { 2322 [startingStyle2]: "" 2323 } : void 0, 2324 hidden, 2325 id: idParam 2326 }, 2327 ref: mergedPanelRef, 2328 shouldPreventOpenAnimation, 2329 shouldRender, 2330 transitionStatus: panelTransitionStatus, 2331 width: renderedDimensions.width 2332 }; 2333 } 2334 function getDimensions(element) { 2335 return { 2336 height: element.scrollHeight, 2337 width: element.scrollWidth 2338 }; 2339 } 2340 function getAnimationType(element, hasSuppressedMountAnimation) { 2341 const panelStyles = getWindow(element).getComputedStyle(element); 2342 const hasAnimation = (panelStyles.animationName.split(",").map((name) => name.trim()).some((name) => name !== "" && name !== "none") || hasSuppressedMountAnimation) && hasNonZeroDuration(panelStyles.animationDuration); 2343 const hasTransition = hasNonZeroDuration(panelStyles.transitionDuration); 2344 if (hasAnimation && hasTransition) { 2345 if (true) { 2346 warn("CSS transitions and CSS animations both detected on Collapsible or Accordion panel.", "Only one of either animation type should be used."); 2347 } 2348 return "css-transition"; 2349 } 2350 if (hasTransition) { 2351 return "css-transition"; 2352 } 2353 if (hasAnimation) { 2354 return "css-animation"; 2355 } 2356 return "none"; 2357 } 2358 function hasNonZeroDuration(value) { 2359 return value.split(",").map((part) => part.trim()).some((part) => part !== "" && Number.parseFloat(part) > 0); 2360 } 2361 function setTemporaryStyle(element, property, value) { 2362 const previousValue = element.style.getPropertyValue(property); 2363 const previousPriority = element.style.getPropertyPriority(property); 2364 element.style.setProperty(property, value); 2365 return () => { 2366 if (previousValue === "") { 2367 element.style.removeProperty(property); 2368 return; 2369 } 2370 element.style.setProperty(property, previousValue, previousPriority); 2371 }; 2372 } 2373 function resetLayoutStyles(element) { 2374 const originalLayoutStyles = { 2375 "justify-content": element.style.justifyContent, 2376 "align-items": element.style.alignItems, 2377 "align-content": element.style.alignContent, 2378 "justify-items": element.style.justifyItems 2379 }; 2380 Object.keys(originalLayoutStyles).forEach((key) => { 2381 element.style.setProperty(key, "initial", "important"); 2382 }); 2383 function restoreLayoutStyles() { 2384 Object.entries(originalLayoutStyles).forEach(([key, value]) => { 2385 if (value === "") { 2386 element.style.removeProperty(key); 2387 return; 2388 } 2389 element.style.setProperty(key, value); 2390 }); 2391 } 2392 const frame = AnimationFrame.request(restoreLayoutStyles); 2393 return () => { 2394 AnimationFrame.cancel(frame); 2395 restoreLayoutStyles(); 2396 }; 2397 } 2398 2399 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/parts.mjs 2400 var parts_exports = {}; 2401 __export(parts_exports, { 2402 engine: () => engine_exports, 2403 env: () => env_exports, 2404 mediaQuery: () => media_query_exports, 2405 os: () => os_exports, 2406 screenReader: () => screen_reader_exports 2407 }); 2408 2409 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/os.mjs 2410 var os_exports = {}; 2411 __export(os_exports, { 2412 android: () => android, 2413 apple: () => apple, 2414 ios: () => ios, 2415 linux: () => linux, 2416 mac: () => mac, 2417 windows: () => windows 2418 }); 2419 2420 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/shared.mjs 2421 function readRawData() { 2422 if (typeof navigator === "undefined") { 2423 return { 2424 userAgent: "", 2425 platform: "", 2426 maxTouchPoints: 0 2427 }; 2428 } 2429 if (true) { 2430 const uaData = navigator.userAgentData; 2431 if (uaData && Array.isArray(uaData.brands)) { 2432 return { 2433 userAgent: uaData.brands.map(({ 2434 brand, 2435 version: version2 2436 }) => `$brand}/$version2}`).join(" "), 2437 platform: uaData.platform ?? navigator.platform ?? "", 2438 maxTouchPoints: navigator.maxTouchPoints ?? 0 2439 }; 2440 } 2441 } 2442 return { 2443 userAgent: navigator.userAgent, 2444 platform: navigator.platform ?? "", 2445 maxTouchPoints: navigator.maxTouchPoints ?? 0 2446 }; 2447 } 2448 var { 2449 userAgent, 2450 platform, 2451 maxTouchPoints 2452 } = readRawData(); 2453 var lowerUserAgent = userAgent.toLowerCase(); 2454 var lowerPlatform = platform.toLowerCase(); 2455 2456 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/os.mjs 2457 var ios = /^i(os$|p)/.test(lowerPlatform) || lowerPlatform === "macintel" && maxTouchPoints > 1; 2458 var ANDROID_STRING = "android"; 2459 var android = lowerPlatform === ANDROID_STRING || lowerUserAgent.includes(ANDROID_STRING); 2460 var mac = !ios && lowerPlatform.startsWith("mac"); 2461 var windows = lowerPlatform.startsWith("win"); 2462 var linux = !android && /^(linux|chrome os)/.test(lowerPlatform); 2463 var apple = mac || ios; 2464 2465 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/engine.mjs 2466 var engine_exports = {}; 2467 __export(engine_exports, { 2468 blink: () => blink, 2469 gecko: () => gecko, 2470 webkit: () => webkit 2471 }); 2472 var webkit = typeof CSS !== "undefined" && !!CSS.supports?.("-webkit-backdrop-filter:none"); 2473 var gecko = !webkit && lowerUserAgent.includes("firefox"); 2474 var blink = !webkit && lowerUserAgent.includes("chrom"); 2475 2476 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/screen-reader.mjs 2477 var screen_reader_exports = {}; 2478 __export(screen_reader_exports, { 2479 voiceOver: () => voiceOver 2480 }); 2481 var voiceOver = apple; 2482 2483 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/env.mjs 2484 var env_exports = {}; 2485 __export(env_exports, { 2486 jsdom: () => jsdom 2487 }); 2488 var jsdom = /jsdom|happydom/.test(lowerUserAgent); 2489 2490 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/platform/media-query.mjs 2491 var media_query_exports = {}; 2492 __export(media_query_exports, { 2493 iOS: () => iOS 2494 }); 2495 var iOS = "@supports (-webkit-touch-callout: none)"; 2496 2497 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs 2498 var React19 = __toESM(require_react(), 1); 2499 2500 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/event.mjs 2501 function isReactEvent(event) { 2502 return "nativeEvent" in event; 2503 } 2504 function isVirtualClick(event) { 2505 if (event.pointerType === "" && event.isTrusted) { 2506 return true; 2507 } 2508 if (parts_exports.os.android && event.pointerType) { 2509 return event.type === "click" && event.buttons === 1; 2510 } 2511 return event.detail === 0 && !event.pointerType; 2512 } 2513 function isMouseLikePointerType(pointerType, strict) { 2514 const values = ["mouse", "pen"]; 2515 if (!strict) { 2516 values.push("", void 0); 2517 } 2518 return values.includes(pointerType); 2519 } 2520 function isClickLikeEvent(event) { 2521 const type = event.type; 2522 return type === "click" || type === "mousedown" || type === "keydown" || type === "keyup"; 2523 } 2524 2525 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/shadowDom.mjs 2526 function activeElement(doc) { 2527 let element = doc.activeElement; 2528 while (element?.shadowRoot?.activeElement != null) { 2529 element = element.shadowRoot.activeElement; 2530 } 2531 return element; 2532 } 2533 function contains(parent, child) { 2534 if (!parent || !child) { 2535 return false; 2536 } 2537 const rootNode = child.getRootNode?.(); 2538 if (parent.contains(child)) { 2539 return true; 2540 } 2541 if (rootNode && isShadowRoot(rootNode)) { 2542 let next = child; 2543 while (next) { 2544 if (parent === next) { 2545 return true; 2546 } 2547 next = next.parentNode || next.host; 2548 } 2549 } 2550 return false; 2551 } 2552 function closest(node, selector) { 2553 let current = node; 2554 while (current) { 2555 if (isElement(current) && current.matches(selector)) { 2556 return current; 2557 } 2558 current = current.assignedSlot ?? current.parentNode ?? (isShadowRoot(current) ? current.host : null); 2559 } 2560 return null; 2561 } 2562 function getTarget(event) { 2563 if ("composedPath" in event) { 2564 return event.composedPath()[0] ?? event.target; 2565 } 2566 return event.target; 2567 } 2568 2569 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/constants.mjs 2570 var FOCUSABLE_ATTRIBUTE = "data-base-ui-focusable"; 2571 var TYPEABLE_SELECTOR = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])"; 2572 2573 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/CommonPopupDataAttributes.mjs 2574 var open2 = "data-open"; 2575 var closed2 = "data-closed"; 2576 var anchorHidden = "data-anchor-hidden"; 2577 2578 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/CommonTriggerDataAttributes.mjs 2579 var CommonTriggerDataAttributes_exports = {}; 2580 __export(CommonTriggerDataAttributes_exports, { 2581 popupOpen: () => popupOpen, 2582 pressed: () => pressed 2583 }); 2584 var popupOpen = "data-popup-open"; 2585 var pressed = "data-pressed"; 2586 2587 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popupStateMapping.mjs 2588 var TRIGGER_HOOK = { 2589 [popupOpen]: "" 2590 }; 2591 var PRESSABLE_TRIGGER_HOOK = { 2592 [popupOpen]: "", 2593 [pressed]: "" 2594 }; 2595 var POPUP_OPEN_HOOK = { 2596 [open2]: "" 2597 }; 2598 var POPUP_CLOSED_HOOK = { 2599 [closed2]: "" 2600 }; 2601 var ANCHOR_HIDDEN_HOOK = { 2602 [anchorHidden]: "" 2603 }; 2604 var triggerOpenStateMapping2 = { 2605 open(value) { 2606 if (value) { 2607 return TRIGGER_HOOK; 2608 } 2609 return null; 2610 } 2611 }; 2612 var popupStateMapping = { 2613 open(value) { 2614 if (value) { 2615 return POPUP_OPEN_HOOK; 2616 } 2617 return POPUP_CLOSED_HOOK; 2618 }, 2619 anchorHidden(value) { 2620 if (value) { 2621 return ANCHOR_HIDDEN_HOOK; 2622 } 2623 return null; 2624 } 2625 }; 2626 var popupTransitionStateMapping = { 2627 ...popupStateMapping, 2628 ...transitionStatusMapping 2629 }; 2630 2631 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/trigger/TooltipTriggerDataAttributes.mjs 2632 var popupOpen2 = CommonTriggerDataAttributes_exports.popupOpen; 2633 var triggerDisabled = "data-trigger-disabled"; 2634 2635 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/element.mjs 2636 function isTargetInsideEnabledTrigger(target, triggerElements) { 2637 if (!isElement(target)) { 2638 return false; 2639 } 2640 const targetElement = target; 2641 if (triggerElements.hasElement(targetElement)) { 2642 return !targetElement.hasAttribute(triggerDisabled); 2643 } 2644 for (const [, trigger] of triggerElements.entries()) { 2645 if (contains(trigger, targetElement)) { 2646 return !trigger.hasAttribute(triggerDisabled); 2647 } 2648 } 2649 return false; 2650 } 2651 function isEventTargetWithin(event, node) { 2652 if (node == null) { 2653 return false; 2654 } 2655 if ("composedPath" in event) { 2656 return event.composedPath().includes(node); 2657 } 2658 const eventAgain = event; 2659 return eventAgain.target != null && node.contains(eventAgain.target); 2660 } 2661 function isRootElement(element) { 2662 return element.matches("html,body"); 2663 } 2664 function isTypeableElement(element) { 2665 return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR); 2666 } 2667 function isInteractiveElement(element) { 2668 return closest(element, `button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),$TYPEABLE_SELECTOR}`) != null; 2669 } 2670 function matchesFocusVisible(element) { 2671 if (!element || parts_exports.env.jsdom) { 2672 return true; 2673 } 2674 try { 2675 return element.matches(":focus-visible"); 2676 } catch (_e) { 2677 return true; 2678 } 2679 } 2680 2681 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useHoverShared.mjs 2682 function resolveValue(value, pointerType) { 2683 if (pointerType != null && !isMouseLikePointerType(pointerType)) { 2684 return 0; 2685 } 2686 if (typeof value === "function") { 2687 return value(); 2688 } 2689 return value; 2690 } 2691 function getDelay(value, prop, pointerType) { 2692 const result = resolveValue(value, pointerType); 2693 if (typeof result === "number") { 2694 return result; 2695 } 2696 return result?.[prop]; 2697 } 2698 function getRestMs(value) { 2699 if (typeof value === "function") { 2700 return value(); 2701 } 2702 return value; 2703 } 2704 function isClickLikeOpenEvent(openEventType, interactedInside) { 2705 return interactedInside || openEventType === "click" || openEventType === "mousedown"; 2706 } 2707 function isHoverOpenEvent(openEventType) { 2708 return openEventType?.includes("mouse") && openEventType !== "mousedown"; 2709 } 2710 2711 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingDelayGroup.mjs 2712 var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1); 2713 var FloatingDelayGroupContext = /* @__PURE__ */ React19.createContext({ 2714 hasProvider: false, 2715 timeoutMs: 0, 2716 delayRef: { 2717 current: 0 2718 }, 2719 initialDelayRef: { 2720 current: 0 2721 }, 2722 timeout: new Timeout(), 2723 currentIdRef: { 2724 current: null 2725 }, 2726 currentContextRef: { 2727 current: null 2728 } 2729 }); 2730 if (true) FloatingDelayGroupContext.displayName = "FloatingDelayGroupContext"; 2731 function resetDelayRef(delayRef, initialDelayRef) { 2732 delayRef.current = initialDelayRef.current; 2733 } 2734 function FloatingDelayGroup(props) { 2735 const { 2736 children, 2737 delay, 2738 timeoutMs = 0 2739 } = props; 2740 const delayRef = React19.useRef(delay); 2741 const initialDelayRef = React19.useRef(delay); 2742 const currentIdRef = React19.useRef(null); 2743 const currentContextRef = React19.useRef(null); 2744 const timeout = useTimeout(); 2745 useIsoLayoutEffect(() => { 2746 initialDelayRef.current = delay; 2747 if (!currentIdRef.current) { 2748 delayRef.current = delay; 2749 return; 2750 } 2751 delayRef.current = { 2752 open: getDelay(delayRef.current, "open"), 2753 close: getDelay(delay, "close") 2754 }; 2755 }, [delay, currentIdRef, delayRef, initialDelayRef]); 2756 return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(FloatingDelayGroupContext.Provider, { 2757 value: React19.useMemo(() => ({ 2758 hasProvider: true, 2759 delayRef, 2760 initialDelayRef, 2761 currentIdRef, 2762 timeoutMs, 2763 currentContextRef, 2764 timeout 2765 }), [timeoutMs, timeout]), 2766 children 2767 }); 2768 } 2769 function useDelayGroup(store2, options = { 2770 open: false 2771 }) { 2772 const { 2773 open: open3 2774 } = options; 2775 const floatingId = store2.useState("floatingId"); 2776 const groupContext = React19.useContext(FloatingDelayGroupContext); 2777 const { 2778 currentIdRef, 2779 delayRef, 2780 timeoutMs, 2781 initialDelayRef, 2782 currentContextRef, 2783 hasProvider, 2784 timeout 2785 } = groupContext; 2786 const [isInstantPhase, setIsInstantPhase] = React19.useState(false); 2787 const openRef = React19.useRef(open3); 2788 useIsoLayoutEffect(() => { 2789 openRef.current = open3; 2790 }, [open3]); 2791 useIsoLayoutEffect(() => { 2792 function unset() { 2793 currentContextRef.current?.setIsInstantPhase(false); 2794 currentIdRef.current = null; 2795 currentContextRef.current = null; 2796 delayRef.current = initialDelayRef.current; 2797 timeout.clear(); 2798 } 2799 if (!currentIdRef.current) { 2800 return void 0; 2801 } 2802 if (!open3 && currentIdRef.current === floatingId) { 2803 setIsInstantPhase(false); 2804 if (timeoutMs) { 2805 const closingId = floatingId; 2806 timeout.start(timeoutMs, () => { 2807 if (store2.select("open") || currentIdRef.current && currentIdRef.current !== closingId) { 2808 return; 2809 } 2810 unset(); 2811 }); 2812 return () => { 2813 if (openRef.current || currentIdRef.current !== closingId) { 2814 timeout.clear(); 2815 } 2816 }; 2817 } 2818 unset(); 2819 } 2820 return void 0; 2821 }, [open3, floatingId, currentIdRef, delayRef, timeoutMs, initialDelayRef, currentContextRef, timeout, store2]); 2822 useIsoLayoutEffect(() => { 2823 if (!open3) { 2824 return; 2825 } 2826 const prevContext = currentContextRef.current; 2827 const prevId = currentIdRef.current; 2828 timeout.clear(); 2829 currentContextRef.current = { 2830 onOpenChange: store2.setOpen, 2831 setIsInstantPhase 2832 }; 2833 currentIdRef.current = floatingId; 2834 delayRef.current = { 2835 open: 0, 2836 close: getDelay(initialDelayRef.current, "close") 2837 }; 2838 if (prevId !== null && prevId !== floatingId) { 2839 setIsInstantPhase(true); 2840 prevContext?.setIsInstantPhase(true); 2841 prevContext?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.none)); 2842 } else { 2843 setIsInstantPhase(false); 2844 prevContext?.setIsInstantPhase(false); 2845 } 2846 }, [open3, floatingId, store2, currentIdRef, delayRef, initialDelayRef, currentContextRef, timeout]); 2847 useIsoLayoutEffect(() => { 2848 return () => { 2849 if (currentIdRef.current === floatingId) { 2850 currentContextRef.current = null; 2851 if (!openRef.current) { 2852 return; 2853 } 2854 currentIdRef.current = null; 2855 resetDelayRef(delayRef, initialDelayRef); 2856 timeout.clear(); 2857 } 2858 }; 2859 }, [currentContextRef, currentIdRef, delayRef, floatingId, initialDelayRef, timeout]); 2860 return React19.useMemo(() => ({ 2861 activeIdRef: currentIdRef, 2862 hasProvider, 2863 delayRef, 2864 isInstantPhase 2865 }), [currentIdRef, hasProvider, delayRef, isInstantPhase]); 2866 } 2867 2868 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/mergeCleanups.mjs 2869 function mergeCleanups(...cleanups) { 2870 return () => { 2871 for (let i = 0; i < cleanups.length; i += 1) { 2872 const cleanup = cleanups[i]; 2873 if (cleanup) { 2874 cleanup(); 2875 } 2876 } 2877 }; 2878 } 2879 2880 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/FocusGuard.mjs 2881 var React20 = __toESM(require_react(), 1); 2882 2883 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/visuallyHidden.mjs 2884 var visuallyHiddenBase = { 2885 clipPath: "inset(50%)", 2886 overflow: "hidden", 2887 whiteSpace: "nowrap", 2888 border: 0, 2889 padding: 0, 2890 width: 1, 2891 height: 1, 2892 margin: -1 2893 }; 2894 var visuallyHidden = { 2895 ...visuallyHiddenBase, 2896 position: "fixed", 2897 margin: 0, 2898 top: 0, 2899 left: 0 2900 }; 2901 var visuallyHiddenInput = { 2902 ...visuallyHiddenBase, 2903 position: "absolute" 2904 }; 2905 2906 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/FocusGuard.mjs 2907 var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1); 2908 var FocusGuard = /* @__PURE__ */ React20.forwardRef(function FocusGuard2(props, ref) { 2909 const [role, setRole] = React20.useState(); 2910 useIsoLayoutEffect(() => { 2911 if (parts_exports.screenReader.voiceOver && parts_exports.engine.webkit) { 2912 setRole("button"); 2913 } 2914 }, []); 2915 const restProps = { 2916 tabIndex: 0, 2917 // Role is only for VoiceOver 2918 role 2919 }; 2920 return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { 2921 ...props, 2922 ref, 2923 style: visuallyHidden, 2924 "aria-hidden": role ? void 0 : true, 2925 ...restProps, 2926 "data-base-ui-focus-guard": "" 2927 }); 2928 }); 2929 if (true) FocusGuard.displayName = "FocusGuard"; 2930 2931 // node_modules/.store/@floating-ui/utils@0.2.12-gOxTzMf36nCrbeHpEew-rw/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs 2932 var min = Math.min; 2933 var max = Math.max; 2934 var round = Math.round; 2935 var floor = Math.floor; 2936 var createCoords = (v) => ({ 2937 x: v, 2938 y: v 2939 }); 2940 var oppositeSideMap = { 2941 left: "right", 2942 right: "left", 2943 bottom: "top", 2944 top: "bottom" 2945 }; 2946 function clamp(start, value, end) { 2947 return max(start, min(value, end)); 2948 } 2949 function evaluate(value, param) { 2950 return typeof value === "function" ? value(param) : value; 2951 } 2952 function getSide(placement) { 2953 return placement.split("-")[0]; 2954 } 2955 function getAlignment(placement) { 2956 return placement.split("-")[1]; 2957 } 2958 function getOppositeAxis(axis) { 2959 return axis === "x" ? "y" : "x"; 2960 } 2961 function getAxisLength(axis) { 2962 return axis === "y" ? "height" : "width"; 2963 } 2964 function getSideAxis(placement) { 2965 const firstChar = placement[0]; 2966 return firstChar === "t" || firstChar === "b" ? "y" : "x"; 2967 } 2968 function getAlignmentAxis(placement) { 2969 return getOppositeAxis(getSideAxis(placement)); 2970 } 2971 function getAlignmentSides(placement, rects, rtl) { 2972 if (rtl === void 0) { 2973 rtl = false; 2974 } 2975 const alignment = getAlignment(placement); 2976 const alignmentAxis = getAlignmentAxis(placement); 2977 const length = getAxisLength(alignmentAxis); 2978 let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top"; 2979 if (rects.reference[length] > rects.floating[length]) { 2980 mainAlignmentSide = getOppositePlacement(mainAlignmentSide); 2981 } 2982 return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)]; 2983 } 2984 function getExpandedPlacements(placement) { 2985 const oppositePlacement = getOppositePlacement(placement); 2986 return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)]; 2987 } 2988 function getOppositeAlignmentPlacement(placement) { 2989 return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start"); 2990 } 2991 var lrPlacement = ["left", "right"]; 2992 var rlPlacement = ["right", "left"]; 2993 var tbPlacement = ["top", "bottom"]; 2994 var btPlacement = ["bottom", "top"]; 2995 function getSideList(side, isStart, rtl) { 2996 switch (side) { 2997 case "top": 2998 case "bottom": 2999 if (rtl) return isStart ? rlPlacement : lrPlacement; 3000 return isStart ? lrPlacement : rlPlacement; 3001 case "left": 3002 case "right": 3003 return isStart ? tbPlacement : btPlacement; 3004 default: 3005 return []; 3006 } 3007 } 3008 function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) { 3009 const alignment = getAlignment(placement); 3010 let list = getSideList(getSide(placement), direction === "start", rtl); 3011 if (alignment) { 3012 list = list.map((side) => side + "-" + alignment); 3013 if (flipAlignment) { 3014 list = list.concat(list.map(getOppositeAlignmentPlacement)); 3015 } 3016 } 3017 return list; 3018 } 3019 function getOppositePlacement(placement) { 3020 const side = getSide(placement); 3021 return oppositeSideMap[side] + placement.slice(side.length); 3022 } 3023 function expandPaddingObject(padding) { 3024 var _padding$top, _padding$right, _padding$bottom, _padding$left; 3025 return { 3026 top: (_padding$top = padding.top) != null ? _padding$top : 0, 3027 right: (_padding$right = padding.right) != null ? _padding$right : 0, 3028 bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0, 3029 left: (_padding$left = padding.left) != null ? _padding$left : 0 3030 }; 3031 } 3032 function getPaddingObject(padding) { 3033 return typeof padding !== "number" ? expandPaddingObject(padding) : { 3034 top: padding, 3035 right: padding, 3036 bottom: padding, 3037 left: padding 3038 }; 3039 } 3040 function rectToClientRect(rect) { 3041 const { 3042 x, 3043 y, 3044 width, 3045 height 3046 } = rect; 3047 return { 3048 width, 3049 height, 3050 top: y, 3051 left: x, 3052 right: x + width, 3053 bottom: y + height, 3054 x, 3055 y 3056 }; 3057 } 3058 3059 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/composite.mjs 3060 function isHiddenByStyles(styles) { 3061 return styles.visibility === "hidden" || styles.visibility === "collapse"; 3062 } 3063 function isElementVisible(element, styles = element ? getComputedStyle2(element) : null) { 3064 if (!element || !element.isConnected || !styles || isHiddenByStyles(styles)) { 3065 return false; 3066 } 3067 if (typeof element.checkVisibility === "function") { 3068 return element.checkVisibility(); 3069 } 3070 return styles.display !== "none" && styles.display !== "contents"; 3071 } 3072 3073 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/tabbable.mjs 3074 var CANDIDATE_SELECTOR = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]'; 3075 function getParentElement(element) { 3076 const assignedSlot = element.assignedSlot; 3077 if (assignedSlot) { 3078 return assignedSlot; 3079 } 3080 if (element.parentElement) { 3081 return element.parentElement; 3082 } 3083 const rootNode = element.getRootNode(); 3084 return isShadowRoot(rootNode) ? rootNode.host : null; 3085 } 3086 function getDetailsSummary(details) { 3087 for (const child of Array.from(details.children)) { 3088 if (getNodeName(child) === "summary") { 3089 return child; 3090 } 3091 } 3092 return null; 3093 } 3094 function isWithinOpenDetailsSummary(element, details) { 3095 const summary = getDetailsSummary(details); 3096 return !!summary && (element === summary || contains(summary, element)); 3097 } 3098 function isFocusableCandidate(element) { 3099 const nodeName = element ? getNodeName(element) : ""; 3100 return element != null && element.matches(CANDIDATE_SELECTOR) && (nodeName !== "summary" || element.parentElement != null && getNodeName(element.parentElement) === "details" && getDetailsSummary(element.parentElement) === element) && (nodeName !== "details" || getDetailsSummary(element) == null) && (nodeName !== "input" || element.type !== "hidden"); 3101 } 3102 function isFocusableElement(element) { 3103 if (!isFocusableCandidate(element) || !element.isConnected || element.matches(":disabled")) { 3104 return false; 3105 } 3106 for (let current = element; current; current = getParentElement(current)) { 3107 const isAncestor = current !== element; 3108 const isSlot = getNodeName(current) === "slot"; 3109 if (current.hasAttribute("inert")) { 3110 return false; 3111 } 3112 if (isAncestor && getNodeName(current) === "details" && !current.open && !isWithinOpenDetailsSummary(element, current) || current.hasAttribute("hidden") || !isSlot && !isVisibleInTabbableTree(current, isAncestor)) { 3113 return false; 3114 } 3115 } 3116 return true; 3117 } 3118 function isVisibleInTabbableTree(element, isAncestor) { 3119 const styles = getComputedStyle2(element); 3120 if (!isAncestor) { 3121 return isElementVisible(element, styles); 3122 } 3123 return styles.display !== "none"; 3124 } 3125 function getTabIndex(element) { 3126 const tabIndex = element.tabIndex; 3127 if (tabIndex < 0) { 3128 const nodeName = getNodeName(element); 3129 if (nodeName === "details" || nodeName === "audio" || nodeName === "video" || isHTMLElement(element) && element.isContentEditable) { 3130 return 0; 3131 } 3132 } 3133 return tabIndex; 3134 } 3135 function getNamedRadioInput(element) { 3136 if (getNodeName(element) !== "input") { 3137 return null; 3138 } 3139 const input = element; 3140 return input.type === "radio" && input.name !== "" ? input : null; 3141 } 3142 function isTabbableRadio(element, candidates) { 3143 const input = getNamedRadioInput(element); 3144 if (!input) { 3145 return true; 3146 } 3147 const checkedRadio = candidates.find((candidate) => { 3148 const radio = getNamedRadioInput(candidate); 3149 return radio?.name === input.name && radio.form === input.form && radio.checked; 3150 }); 3151 if (checkedRadio) { 3152 return checkedRadio === input; 3153 } 3154 return candidates.find((candidate) => { 3155 const radio = getNamedRadioInput(candidate); 3156 return radio?.name === input.name && radio.form === input.form; 3157 }) === input; 3158 } 3159 function getComposedChildren(container) { 3160 if (isHTMLElement(container) && getNodeName(container) === "slot") { 3161 const assignedElements = container.assignedElements({ 3162 flatten: true 3163 }); 3164 if (assignedElements.length > 0) { 3165 return assignedElements; 3166 } 3167 } 3168 if (isHTMLElement(container) && container.shadowRoot) { 3169 return Array.from(container.shadowRoot.children); 3170 } 3171 return Array.from(container.children); 3172 } 3173 function appendCandidates(container, list) { 3174 getComposedChildren(container).forEach((child) => { 3175 if (isFocusableCandidate(child)) { 3176 list.push(child); 3177 } 3178 appendCandidates(child, list); 3179 }); 3180 } 3181 function appendMatchingElements(container, selector, list) { 3182 getComposedChildren(container).forEach((child) => { 3183 if (isHTMLElement(child) && child.matches(selector)) { 3184 list.push(child); 3185 } 3186 appendMatchingElements(child, selector, list); 3187 }); 3188 } 3189 function focusable(container) { 3190 const candidates = []; 3191 appendCandidates(container, candidates); 3192 return candidates.filter(isFocusableElement); 3193 } 3194 function tabbable(container) { 3195 const candidates = focusable(container); 3196 return candidates.filter((element) => getTabIndex(element) >= 0 && isTabbableRadio(element, candidates)); 3197 } 3198 function getTabbableIn(container, dir) { 3199 const list = tabbable(container); 3200 const len = list.length; 3201 if (len === 0) { 3202 return void 0; 3203 } 3204 const active = activeElement(ownerDocument(container)); 3205 const index2 = list.indexOf(active); 3206 const nextIndex = index2 === -1 ? dir === 1 ? 0 : len - 1 : index2 + dir; 3207 return list[nextIndex]; 3208 } 3209 function getNextTabbable(referenceElement) { 3210 return getTabbableIn(ownerDocument(referenceElement).body, 1) || referenceElement; 3211 } 3212 function getPreviousTabbable(referenceElement) { 3213 return getTabbableIn(ownerDocument(referenceElement).body, -1) || referenceElement; 3214 } 3215 function isOutsideEvent(event, container) { 3216 const containerElement = container || event.currentTarget; 3217 const relatedTarget = event.relatedTarget; 3218 return !relatedTarget || !contains(containerElement, relatedTarget); 3219 } 3220 function disableFocusInside(container) { 3221 const tabbableElements = tabbable(container); 3222 tabbableElements.forEach((element) => { 3223 element.dataset.tabindex = element.getAttribute("tabindex") || ""; 3224 element.setAttribute("tabindex", "-1"); 3225 }); 3226 } 3227 function enableFocusInside(container) { 3228 const elements = []; 3229 appendMatchingElements(container, "[data-tabindex]", elements); 3230 elements.forEach((element) => { 3231 const tabindex = element.dataset.tabindex; 3232 delete element.dataset.tabindex; 3233 if (tabindex) { 3234 element.setAttribute("tabindex", tabindex); 3235 } else { 3236 element.removeAttribute("tabindex"); 3237 } 3238 }); 3239 } 3240 3241 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/nodes.mjs 3242 function getNodeChildren(nodes, id, onlyOpenChildren = true) { 3243 const directChildren = nodes.filter((node) => node.parentId === id); 3244 return directChildren.flatMap((child) => [...!onlyOpenChildren || child.context?.open ? [child] : [], ...getNodeChildren(nodes, child.id, onlyOpenChildren)]); 3245 } 3246 3247 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/createAttribute.mjs 3248 function createAttribute(name) { 3249 return `data-base-ui-$name}`; 3250 } 3251 3252 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs 3253 var React21 = __toESM(require_react(), 1); 3254 var ReactDOM2 = __toESM(require_react_dom(), 1); 3255 3256 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/constants.mjs 3257 var DISABLED_TRANSITIONS_STYLE = { 3258 style: { 3259 transition: "none" 3260 } 3261 }; 3262 var BASE_UI_SWIPE_IGNORE_ATTRIBUTE = "data-base-ui-swipe-ignore"; 3263 var LEGACY_SWIPE_IGNORE_ATTRIBUTE = "data-swipe-ignore"; 3264 var BASE_UI_SWIPE_IGNORE_SELECTOR = `[$BASE_UI_SWIPE_IGNORE_ATTRIBUTE}]`; 3265 var LEGACY_SWIPE_IGNORE_SELECTOR = `[$LEGACY_SWIPE_IGNORE_ATTRIBUTE}]`; 3266 var POPUP_COLLISION_AVOIDANCE = { 3267 fallbackAxisSide: "end" 3268 }; 3269 var ownerVisuallyHidden = { 3270 clipPath: "inset(50%)", 3271 position: "fixed", 3272 top: 0, 3273 left: 0 3274 }; 3275 3276 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingPortal.mjs 3277 var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1); 3278 var PortalContext = /* @__PURE__ */ React21.createContext(null); 3279 if (true) PortalContext.displayName = "PortalContext"; 3280 var usePortalContext = () => React21.useContext(PortalContext); 3281 var attr = createAttribute("portal"); 3282 function useFloatingPortalNode(props = {}) { 3283 const { 3284 ref, 3285 container: containerProp, 3286 componentProps = EMPTY_OBJECT, 3287 elementProps 3288 } = props; 3289 const uniqueId2 = useId(); 3290 const portalContext = usePortalContext(); 3291 const parentPortalNode = portalContext?.portalNode; 3292 const [containerElement, setContainerElement] = React21.useState(null); 3293 const [portalNode, setPortalNode] = React21.useState(null); 3294 const setPortalNodeRef = useStableCallback((node) => { 3295 if (node !== null) { 3296 setPortalNode(node); 3297 } 3298 }); 3299 const containerRef = React21.useRef(null); 3300 useIsoLayoutEffect(() => { 3301 if (containerProp === null) { 3302 if (containerRef.current) { 3303 containerRef.current = null; 3304 setPortalNode(null); 3305 setContainerElement(null); 3306 } 3307 return; 3308 } 3309 const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body; 3310 if (resolvedContainer == null) { 3311 if (containerRef.current) { 3312 containerRef.current = null; 3313 setPortalNode(null); 3314 setContainerElement(null); 3315 } 3316 return; 3317 } 3318 if (containerRef.current !== resolvedContainer) { 3319 containerRef.current = resolvedContainer; 3320 setPortalNode(null); 3321 setContainerElement(resolvedContainer); 3322 } 3323 }, [containerProp, parentPortalNode]); 3324 const portalElement = useRenderElement("div", componentProps, { 3325 ref: [ref, setPortalNodeRef], 3326 props: [{ 3327 id: uniqueId2, 3328 [attr]: "" 3329 }, elementProps] 3330 }); 3331 const portalSubtree = containerElement && portalElement ? /* @__PURE__ */ ReactDOM2.createPortal(portalElement, containerElement) : null; 3332 return { 3333 node: portalNode, 3334 // `id` and `render` props can override or remove the generated ID. Use the exact 3335 // rendered value so `aria-owns` never points at an ID absent from the DOM. 3336 nodeId: /* @__PURE__ */ React21.isValidElement(portalElement) ? portalElement.props.id : void 0, 3337 subtree: portalSubtree 3338 }; 3339 } 3340 var FloatingPortal = /* @__PURE__ */ React21.forwardRef(function FloatingPortal2(componentProps, forwardedRef) { 3341 const { 3342 render, 3343 className, 3344 style, 3345 children, 3346 container, 3347 portalOwnerRole, 3348 ...elementProps 3349 } = componentProps; 3350 const { 3351 node: portalNode, 3352 nodeId: portalNodeId, 3353 subtree: portalSubtree 3354 } = useFloatingPortalNode({ 3355 container, 3356 ref: forwardedRef, 3357 componentProps, 3358 elementProps 3359 }); 3360 const beforeOutsideRef = React21.useRef(null); 3361 const afterOutsideRef = React21.useRef(null); 3362 const beforeInsideRef = React21.useRef(null); 3363 const afterInsideRef = React21.useRef(null); 3364 const [focusManagerState, setFocusManagerState] = React21.useState(null); 3365 const focusInsideDisabledRef = React21.useRef(false); 3366 const modal = focusManagerState?.modal; 3367 const open3 = focusManagerState?.open; 3368 const shouldRenderGuards = !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode; 3369 React21.useEffect(() => { 3370 if (!portalNode || modal) { 3371 return void 0; 3372 } 3373 function onFocus(event) { 3374 if (portalNode && event.relatedTarget && isOutsideEvent(event)) { 3375 if (event.type === "focusin") { 3376 if (focusInsideDisabledRef.current) { 3377 enableFocusInside(portalNode); 3378 focusInsideDisabledRef.current = false; 3379 } 3380 } else { 3381 disableFocusInside(portalNode); 3382 focusInsideDisabledRef.current = true; 3383 } 3384 } 3385 } 3386 return mergeCleanups(addEventListener(portalNode, "focusin", onFocus, true), addEventListener(portalNode, "focusout", onFocus, true)); 3387 }, [portalNode, modal]); 3388 useIsoLayoutEffect(() => { 3389 if (!portalNode || open3 !== true || !focusInsideDisabledRef.current) { 3390 return; 3391 } 3392 enableFocusInside(portalNode); 3393 focusInsideDisabledRef.current = false; 3394 }, [open3, portalNode]); 3395 const portalContextValue = React21.useMemo(() => ({ 3396 beforeOutsideRef, 3397 afterOutsideRef, 3398 beforeInsideRef, 3399 afterInsideRef, 3400 portalNode, 3401 setFocusManagerState 3402 }), [portalNode]); 3403 return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(React21.Fragment, { 3404 children: [portalSubtree, /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(PortalContext.Provider, { 3405 value: portalContextValue, 3406 children: [shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(FocusGuard, { 3407 "data-type": "outside", 3408 ref: beforeOutsideRef, 3409 onFocus: (event) => { 3410 if (isOutsideEvent(event, portalNode)) { 3411 beforeInsideRef.current?.focus(); 3412 } else { 3413 const domReference = focusManagerState ? focusManagerState.domReference : null; 3414 const prevTabbable = getPreviousTabbable(domReference); 3415 prevTabbable?.focus(); 3416 } 3417 } 3418 }), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { 3419 role: portalOwnerRole, 3420 "aria-owns": portalNodeId, 3421 style: ownerVisuallyHidden 3422 }), portalNode && /* @__PURE__ */ ReactDOM2.createPortal(children, portalNode), shouldRenderGuards && portalNode && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(FocusGuard, { 3423 "data-type": "outside", 3424 ref: afterOutsideRef, 3425 onFocus: (event) => { 3426 if (isOutsideEvent(event, portalNode)) { 3427 afterInsideRef.current?.focus(); 3428 } else { 3429 const domReference = focusManagerState ? focusManagerState.domReference : null; 3430 const nextTabbable = getNextTabbable(domReference); 3431 nextTabbable?.focus(); 3432 if (focusManagerState?.closeOnFocusOut) { 3433 focusManagerState?.onOpenChange(false, createChangeEventDetails(reason_parts_exports.focusOut, event.nativeEvent)); 3434 } 3435 } 3436 } 3437 })] 3438 })] 3439 }); 3440 }); 3441 if (true) FloatingPortal.displayName = "FloatingPortal"; 3442 3443 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs 3444 var React22 = __toESM(require_react(), 1); 3445 3446 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/utils/createEventEmitter.mjs 3447 function createEventEmitter() { 3448 const map = /* @__PURE__ */ new Map(); 3449 return { 3450 emit(event, data) { 3451 map.get(event)?.forEach((listener) => listener(data)); 3452 }, 3453 on(event, listener) { 3454 if (!map.has(event)) { 3455 map.set(event, /* @__PURE__ */ new Set()); 3456 } 3457 map.get(event).add(listener); 3458 }, 3459 off(event, listener) { 3460 map.get(event)?.delete(listener); 3461 } 3462 }; 3463 } 3464 3465 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingTree.mjs 3466 var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1); 3467 var FloatingNodeContext = /* @__PURE__ */ React22.createContext(null); 3468 if (true) FloatingNodeContext.displayName = "FloatingNodeContext"; 3469 var FloatingTreeContext = /* @__PURE__ */ React22.createContext(null); 3470 if (true) FloatingTreeContext.displayName = "FloatingTreeContext"; 3471 var useFloatingParentNodeId = () => React22.useContext(FloatingNodeContext)?.id || null; 3472 var useFloatingTree = (externalTree) => { 3473 const contextTree = React22.useContext(FloatingTreeContext); 3474 return externalTree ?? contextTree; 3475 }; 3476 3477 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useClientPoint.mjs 3478 var React23 = __toESM(require_react(), 1); 3479 function createVirtualElement(domElement, data) { 3480 let offsetX = null; 3481 let offsetY = null; 3482 let isAutoUpdateEvent = false; 3483 return { 3484 contextElement: domElement || void 0, 3485 getBoundingClientRect() { 3486 const domRect = domElement?.getBoundingClientRect() || { 3487 width: 0, 3488 height: 0, 3489 x: 0, 3490 y: 0 3491 }; 3492 const isXAxis = data.axis === "x" || data.axis === "both"; 3493 const isYAxis = data.axis === "y" || data.axis === "both"; 3494 const canTrackCursorOnAutoUpdate = ["mouseenter", "mousemove"].includes(data.dataRef.current.openEvent?.type || "") && data.pointerType !== "touch"; 3495 const width = data.axis === "y" ? domRect.width : 0; 3496 const height = data.axis === "x" ? domRect.height : 0; 3497 let x = domRect.x; 3498 let y = domRect.y; 3499 if (offsetX == null && data.x && isXAxis) { 3500 offsetX = domRect.x - data.x; 3501 } 3502 if (offsetY == null && data.y && isYAxis) { 3503 offsetY = domRect.y - data.y; 3504 } 3505 x -= offsetX || 0; 3506 y -= offsetY || 0; 3507 if (!isAutoUpdateEvent || canTrackCursorOnAutoUpdate) { 3508 x = isXAxis && data.x != null ? data.x : x; 3509 y = isYAxis && data.y != null ? data.y : y; 3510 } 3511 isAutoUpdateEvent = true; 3512 return { 3513 width, 3514 height, 3515 x, 3516 y, 3517 top: y, 3518 right: x + width, 3519 bottom: y + height, 3520 left: x 3521 }; 3522 } 3523 }; 3524 } 3525 function isMouseBasedEvent(event) { 3526 return event != null && event.clientX != null; 3527 } 3528 function useClientPoint(store2, props = {}) { 3529 const { 3530 enabled = true, 3531 axis = "both" 3532 } = props; 3533 const open3 = store2.useState("open"); 3534 const floating = store2.useState("floatingElement"); 3535 const domReference = store2.useState("domReferenceElement"); 3536 const dataRef = store2.context.dataRef; 3537 const initialRef = React23.useRef(false); 3538 const cleanupListenerRef = React23.useRef(null); 3539 const [pointerType, setPointerType] = React23.useState(); 3540 const [reactive, setReactive] = React23.useState([]); 3541 const resetReference = useStableCallback((reference2) => { 3542 store2.set("positionReference", reference2); 3543 }); 3544 const setReference = useStableCallback((newX, newY, referenceElement) => { 3545 if (initialRef.current) { 3546 return; 3547 } 3548 if (dataRef.current.openEvent && !isMouseBasedEvent(dataRef.current.openEvent)) { 3549 return; 3550 } 3551 store2.set("positionReference", createVirtualElement(referenceElement ?? domReference, { 3552 x: newX, 3553 y: newY, 3554 axis, 3555 dataRef, 3556 pointerType 3557 })); 3558 }); 3559 const handleReferenceEnterOrMove = useStableCallback((event) => { 3560 if (!open3) { 3561 setReference(event.clientX, event.clientY, event.currentTarget); 3562 } else if (!cleanupListenerRef.current) { 3563 setReference(event.clientX, event.clientY, event.currentTarget); 3564 setReactive([]); 3565 } 3566 }); 3567 const openCheck = isMouseLikePointerType(pointerType) ? floating : open3; 3568 React23.useEffect(() => { 3569 if (!enabled) { 3570 resetReference(domReference); 3571 return void 0; 3572 } 3573 if (!openCheck) { 3574 return void 0; 3575 } 3576 function cleanupListener() { 3577 cleanupListenerRef.current?.(); 3578 cleanupListenerRef.current = null; 3579 } 3580 const win = getWindow(floating); 3581 function handleMouseMove(event) { 3582 const target = getTarget(event); 3583 if (!contains(floating, target)) { 3584 setReference(event.clientX, event.clientY); 3585 } else { 3586 cleanupListener(); 3587 } 3588 } 3589 if (!dataRef.current.openEvent || isMouseBasedEvent(dataRef.current.openEvent)) { 3590 cleanupListenerRef.current = addEventListener(win, "mousemove", handleMouseMove); 3591 } else { 3592 resetReference(domReference); 3593 } 3594 return cleanupListener; 3595 }, [openCheck, enabled, floating, dataRef, domReference, store2, setReference, resetReference, reactive]); 3596 React23.useEffect(() => () => { 3597 store2.set("positionReference", null); 3598 }, [store2]); 3599 React23.useEffect(() => { 3600 if (enabled && !floating) { 3601 initialRef.current = false; 3602 } 3603 }, [enabled, floating]); 3604 React23.useEffect(() => { 3605 if (!enabled && open3) { 3606 initialRef.current = true; 3607 } 3608 }, [enabled, open3]); 3609 const reference = React23.useMemo(() => { 3610 function setPointerTypeRef(event) { 3611 setPointerType(event.pointerType); 3612 } 3613 return { 3614 onPointerDown: setPointerTypeRef, 3615 onPointerEnter: setPointerTypeRef, 3616 onMouseMove: handleReferenceEnterOrMove, 3617 onMouseEnter: handleReferenceEnterOrMove 3618 }; 3619 }, [handleReferenceEnterOrMove]); 3620 return React23.useMemo(() => enabled ? { 3621 reference, 3622 trigger: reference 3623 } : {}, [enabled, reference]); 3624 } 3625 3626 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useDismiss.mjs 3627 var React24 = __toESM(require_react(), 1); 3628 function alwaysFalse() { 3629 return false; 3630 } 3631 function normalizeProp(normalizable) { 3632 return { 3633 escapeKey: typeof normalizable === "boolean" ? normalizable : normalizable?.escapeKey ?? false, 3634 outsidePress: typeof normalizable === "boolean" ? normalizable : normalizable?.outsidePress ?? true 3635 }; 3636 } 3637 function useDismiss(store2, props = {}) { 3638 const { 3639 enabled = true, 3640 escapeKey: escapeKey2 = true, 3641 outsidePress: outsidePressProp = true, 3642 outsidePressEvent = "sloppy", 3643 referencePress = alwaysFalse, 3644 bubbles, 3645 externalTree 3646 } = props; 3647 const open3 = store2.useState("open"); 3648 const floatingElement = store2.useState("floatingElement"); 3649 const { 3650 dataRef, 3651 events 3652 } = store2.context; 3653 const tree = useFloatingTree(externalTree); 3654 const outsidePressFn = useStableCallback(typeof outsidePressProp === "function" ? outsidePressProp : () => false); 3655 const outsidePress2 = typeof outsidePressProp === "function" ? outsidePressFn : outsidePressProp; 3656 const outsidePressEnabled = outsidePress2 !== false; 3657 const getOutsidePressEventProp = useStableCallback(() => outsidePressEvent); 3658 const { 3659 escapeKey: escapeKeyBubbles, 3660 outsidePress: outsidePressBubbles 3661 } = normalizeProp(bubbles); 3662 const pressStartedInsideRef = React24.useRef(false); 3663 const pressStartPreventedRef = React24.useRef(false); 3664 const suppressNextOutsideClickRef = React24.useRef(false); 3665 const sawPressWhileOpenRef = React24.useRef(false); 3666 const isComposingRef = React24.useRef(false); 3667 const currentPointerTypeRef = React24.useRef(""); 3668 const touchStateRef = React24.useRef(null); 3669 const cancelDismissOnEndTimeout = useTimeout(); 3670 const clearInsideReactTreeTimeout = useTimeout(); 3671 const compositionTimeout = useTimeout(); 3672 const clearInsideReactTree = useStableCallback(() => { 3673 clearInsideReactTreeTimeout.clear(); 3674 dataRef.current.insideReactTree = false; 3675 }); 3676 const hasBlockingChild = useStableCallback((bubbleKey) => { 3677 const nodeId = dataRef.current.floatingContext?.nodeId; 3678 const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : []; 3679 return children.some((child) => child.context?.open && !child.context.dataRef.current[bubbleKey]); 3680 }); 3681 const isEventWithinOwnElements = useStableCallback((event) => { 3682 return isEventTargetWithin(event, store2.select("floatingElement")) || isEventTargetWithin(event, store2.select("domReferenceElement")); 3683 }); 3684 const closeOnReferencePress = useStableCallback((event) => { 3685 if (!referencePress()) { 3686 return; 3687 } 3688 store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerPress, event.nativeEvent)); 3689 }); 3690 const closeOnEscapeKeyDown = useStableCallback((event) => { 3691 if (!open3 || !enabled || !escapeKey2 || event.key !== "Escape") { 3692 return; 3693 } 3694 const native = isReactEvent(event) ? event.nativeEvent : event; 3695 if (isComposingRef.current || native.isComposing) { 3696 return; 3697 } 3698 if (!escapeKeyBubbles && hasBlockingChild("__escapeKeyBubbles")) { 3699 return; 3700 } 3701 const eventDetails = createChangeEventDetails(reason_parts_exports.escapeKey, native); 3702 store2.setOpen(false, eventDetails); 3703 if (!eventDetails.isCanceled) { 3704 event.preventDefault(); 3705 } 3706 if (!escapeKeyBubbles && !eventDetails.isPropagationAllowed) { 3707 event.stopPropagation(); 3708 } 3709 }); 3710 const markInsideReactTree = useStableCallback(() => { 3711 dataRef.current.insideReactTree = true; 3712 clearInsideReactTreeTimeout.start(0, clearInsideReactTree); 3713 }); 3714 const markPressStartedInsideReactTree = useStableCallback((event) => { 3715 if (!open3 || !enabled || event.button !== 0) { 3716 return; 3717 } 3718 const target = getTarget(event.nativeEvent); 3719 if (!contains(store2.select("floatingElement"), target)) { 3720 return; 3721 } 3722 if (!pressStartedInsideRef.current) { 3723 pressStartedInsideRef.current = true; 3724 pressStartPreventedRef.current = false; 3725 } 3726 }); 3727 const markInsidePressStartPrevented = useStableCallback((event) => { 3728 if (!open3 || !enabled) { 3729 return; 3730 } 3731 if (!(event.defaultPrevented || event.nativeEvent.defaultPrevented)) { 3732 return; 3733 } 3734 if (pressStartedInsideRef.current) { 3735 pressStartPreventedRef.current = true; 3736 } 3737 }); 3738 React24.useEffect(() => { 3739 function handleOpenChange(details) { 3740 if (!details.open) { 3741 sawPressWhileOpenRef.current = false; 3742 } 3743 } 3744 events.on("openchange", handleOpenChange); 3745 return () => { 3746 events.off("openchange", handleOpenChange); 3747 }; 3748 }, [events]); 3749 React24.useEffect(() => clearInsideReactTree, [clearInsideReactTree]); 3750 React24.useEffect(() => { 3751 if (!open3 || !enabled) { 3752 if (!open3) { 3753 sawPressWhileOpenRef.current = false; 3754 isComposingRef.current = false; 3755 currentPointerTypeRef.current = ""; 3756 touchStateRef.current = null; 3757 } 3758 return clearInsideReactTree; 3759 } 3760 dataRef.current.__escapeKeyBubbles = escapeKeyBubbles; 3761 dataRef.current.__outsidePressBubbles = outsidePressBubbles; 3762 const preventedPressSuppressionTimeout = new Timeout(); 3763 const doc = ownerDocument(floatingElement); 3764 function handleCompositionStart() { 3765 compositionTimeout.clear(); 3766 isComposingRef.current = true; 3767 } 3768 function handleCompositionEnd() { 3769 isComposingRef.current = true; 3770 compositionTimeout.start( 3771 // 0ms or 1ms don't work in Safari. 5ms appears to consistently work. 3772 // Only apply to WebKit for the test to remain 0ms. 3773 parts_exports.engine.webkit ? 5 : 0, 3774 () => { 3775 isComposingRef.current = false; 3776 } 3777 ); 3778 } 3779 function suppressImmediateOutsideClickAfterPreventedStart() { 3780 suppressNextOutsideClickRef.current = true; 3781 preventedPressSuppressionTimeout.start(0, () => { 3782 suppressNextOutsideClickRef.current = false; 3783 }); 3784 } 3785 function resetPressStartState() { 3786 pressStartedInsideRef.current = false; 3787 pressStartPreventedRef.current = false; 3788 } 3789 function getOutsidePressEvent() { 3790 const type = currentPointerTypeRef.current; 3791 const computedType = type === "pen" || !type ? "mouse" : type; 3792 const outsidePressEventValue = getOutsidePressEventProp(); 3793 const resolved = typeof outsidePressEventValue === "function" ? outsidePressEventValue() : outsidePressEventValue; 3794 if (typeof resolved === "string") { 3795 return resolved; 3796 } 3797 return resolved[computedType]; 3798 } 3799 function shouldIgnoreEvent(event) { 3800 const computedOutsidePressEvent = getOutsidePressEvent(); 3801 return computedOutsidePressEvent === "intentional" && event.type !== "click" || computedOutsidePressEvent === "sloppy" && event.type === "click"; 3802 } 3803 function isEventWithinFloatingTree(event) { 3804 const nodeId = dataRef.current.floatingContext?.nodeId; 3805 const targetIsInsideChildren = tree && getNodeChildren(tree.nodesRef.current, nodeId).some((node) => isEventTargetWithin(event, node.context?.elements.floating)); 3806 return isEventWithinOwnElements(event) || targetIsInsideChildren; 3807 } 3808 function closeOnPressOutside(event) { 3809 if (shouldIgnoreEvent(event)) { 3810 if (event.type !== "click" && !isEventWithinOwnElements(event)) { 3811 preventedPressSuppressionTimeout.clear(); 3812 suppressNextOutsideClickRef.current = false; 3813 } 3814 clearInsideReactTree(); 3815 return; 3816 } 3817 if (dataRef.current.insideReactTree) { 3818 clearInsideReactTree(); 3819 return; 3820 } 3821 const target = getTarget(event); 3822 const inertSelector = `[$createAttribute("inert")}]`; 3823 const targetRoot = isElement(target) ? target.getRootNode() : null; 3824 const markers = Array.from((isShadowRoot(targetRoot) ? targetRoot : ownerDocument(store2.select("floatingElement"))).querySelectorAll(inertSelector)); 3825 const triggers = store2.context.triggerElements; 3826 if (target && (triggers.hasElement(target) || triggers.hasMatchingElement((trigger) => contains(trigger, target)))) { 3827 return; 3828 } 3829 let targetRootAncestor = isElement(target) ? target : null; 3830 while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) { 3831 const nextParent = getParentNode(targetRootAncestor); 3832 if (isLastTraversableNode(nextParent) || !isElement(nextParent)) { 3833 break; 3834 } 3835 targetRootAncestor = nextParent; 3836 } 3837 if (markers.length && isElement(target) && !isRootElement(target) && // Clicked on a direct ancestor (e.g. FloatingOverlay). 3838 !contains(target, store2.select("floatingElement")) && // If the target root element contains none of the markers, then the 3839 // element was injected after the floating element rendered. 3840 markers.every((marker) => !contains(targetRootAncestor, marker))) { 3841 return; 3842 } 3843 if (isHTMLElement(target) && !("touches" in event)) { 3844 const lastTraversableNode = isLastTraversableNode(target); 3845 const style = getComputedStyle2(target); 3846 const scrollRe = /auto|scroll/; 3847 const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX); 3848 const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY); 3849 const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth; 3850 const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight; 3851 const isRTL3 = style.direction === "rtl"; 3852 const pressedVerticalScrollbar = canScrollY && (isRTL3 ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth); 3853 const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight; 3854 if (pressedVerticalScrollbar || pressedHorizontalScrollbar) { 3855 return; 3856 } 3857 } 3858 if (isEventWithinFloatingTree(event)) { 3859 return; 3860 } 3861 if (getOutsidePressEvent() === "intentional") { 3862 if (event.detail !== 0 && !isVirtualClick(event) && !sawPressWhileOpenRef.current) { 3863 return; 3864 } 3865 if (suppressNextOutsideClickRef.current) { 3866 preventedPressSuppressionTimeout.clear(); 3867 suppressNextOutsideClickRef.current = false; 3868 return; 3869 } 3870 } 3871 if (typeof outsidePress2 === "function" && !outsidePress2(event)) { 3872 return; 3873 } 3874 if (hasBlockingChild("__outsidePressBubbles")) { 3875 return; 3876 } 3877 store2.setOpen(false, createChangeEventDetails(reason_parts_exports.outsidePress, event)); 3878 clearInsideReactTree(); 3879 } 3880 function handlePointerDown(event) { 3881 if (getOutsidePressEvent() !== "sloppy" || event.pointerType === "touch" || !store2.select("open") || !enabled || isEventWithinOwnElements(event)) { 3882 return; 3883 } 3884 closeOnPressOutside(event); 3885 } 3886 function handleTouchStart(event) { 3887 if (getOutsidePressEvent() !== "sloppy" || !store2.select("open") || !enabled || isEventWithinOwnElements(event)) { 3888 return; 3889 } 3890 const touch = event.touches[0]; 3891 if (touch) { 3892 touchStateRef.current = { 3893 startTime: Date.now(), 3894 startX: touch.clientX, 3895 startY: touch.clientY, 3896 dismissOnTouchEnd: false, 3897 dismissOnMouseDown: true 3898 }; 3899 cancelDismissOnEndTimeout.start(1e3, () => { 3900 if (touchStateRef.current) { 3901 touchStateRef.current.dismissOnTouchEnd = false; 3902 touchStateRef.current.dismissOnMouseDown = false; 3903 } 3904 }); 3905 } 3906 } 3907 function addTargetEventListenerOnce(event, listener) { 3908 const target = getTarget(event); 3909 if (!target) { 3910 return; 3911 } 3912 const unsubscribe2 = addEventListener(target, event.type, () => { 3913 listener(event); 3914 unsubscribe2(); 3915 }); 3916 } 3917 function handleTouchStartCapture(event) { 3918 currentPointerTypeRef.current = "touch"; 3919 addTargetEventListenerOnce(event, handleTouchStart); 3920 } 3921 function closeOnPressOutsideCapture(event) { 3922 cancelDismissOnEndTimeout.clear(); 3923 if (event.type === "pointerdown") { 3924 if (event.button === 0) { 3925 sawPressWhileOpenRef.current = true; 3926 } 3927 currentPointerTypeRef.current = event.pointerType; 3928 } 3929 if (event.type === "mousedown" && touchStateRef.current && !touchStateRef.current.dismissOnMouseDown) { 3930 return; 3931 } 3932 addTargetEventListenerOnce(event, (targetEvent) => { 3933 if (targetEvent.type === "pointerdown") { 3934 handlePointerDown(targetEvent); 3935 } else { 3936 closeOnPressOutside(targetEvent); 3937 } 3938 }); 3939 } 3940 function handlePressEndCapture(event) { 3941 if (event.type === "pointercancel") { 3942 sawPressWhileOpenRef.current = false; 3943 } 3944 if (!pressStartedInsideRef.current) { 3945 return; 3946 } 3947 const pressStartedInsideDefaultPrevented = pressStartPreventedRef.current; 3948 resetPressStartState(); 3949 if (getOutsidePressEvent() !== "intentional") { 3950 return; 3951 } 3952 if (event.type === "pointercancel") { 3953 if (pressStartedInsideDefaultPrevented) { 3954 suppressImmediateOutsideClickAfterPreventedStart(); 3955 } 3956 return; 3957 } 3958 if (isEventWithinFloatingTree(event)) { 3959 return; 3960 } 3961 if (pressStartedInsideDefaultPrevented) { 3962 suppressImmediateOutsideClickAfterPreventedStart(); 3963 return; 3964 } 3965 if (typeof outsidePress2 === "function" && !outsidePress2(event)) { 3966 return; 3967 } 3968 preventedPressSuppressionTimeout.clear(); 3969 suppressNextOutsideClickRef.current = true; 3970 clearInsideReactTree(); 3971 } 3972 function handleTouchMove(event) { 3973 if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) { 3974 return; 3975 } 3976 const touch = event.touches[0]; 3977 if (!touch) { 3978 return; 3979 } 3980 const deltaX = Math.abs(touch.clientX - touchStateRef.current.startX); 3981 const deltaY = Math.abs(touch.clientY - touchStateRef.current.startY); 3982 const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY); 3983 if (distance > 5) { 3984 touchStateRef.current.dismissOnTouchEnd = true; 3985 } 3986 if (distance > 10) { 3987 closeOnPressOutside(event); 3988 cancelDismissOnEndTimeout.clear(); 3989 touchStateRef.current = null; 3990 } 3991 } 3992 function handleTouchMoveCapture(event) { 3993 addTargetEventListenerOnce(event, handleTouchMove); 3994 } 3995 function handleTouchEnd(event) { 3996 if (getOutsidePressEvent() !== "sloppy" || !touchStateRef.current || isEventWithinOwnElements(event)) { 3997 return; 3998 } 3999 if (touchStateRef.current.dismissOnTouchEnd) { 4000 closeOnPressOutside(event); 4001 } 4002 cancelDismissOnEndTimeout.clear(); 4003 touchStateRef.current = null; 4004 } 4005 function handleTouchEndCapture(event) { 4006 addTargetEventListenerOnce(event, handleTouchEnd); 4007 } 4008 const unsubscribe = mergeCleanups(escapeKey2 && mergeCleanups(addEventListener(doc, "keydown", closeOnEscapeKeyDown), addEventListener(doc, "compositionstart", handleCompositionStart), addEventListener(doc, "compositionend", handleCompositionEnd)), outsidePressEnabled && mergeCleanups(addEventListener(doc, "click", closeOnPressOutsideCapture, true), addEventListener(doc, "pointerdown", closeOnPressOutsideCapture, true), addEventListener(doc, "pointerup", handlePressEndCapture, true), addEventListener(doc, "pointercancel", handlePressEndCapture, true), addEventListener(doc, "mousedown", closeOnPressOutsideCapture, true), addEventListener(doc, "mouseup", handlePressEndCapture, true), addEventListener(doc, "touchstart", handleTouchStartCapture, { 4009 capture: true, 4010 passive: true 4011 }), addEventListener(doc, "touchmove", handleTouchMoveCapture, { 4012 capture: true, 4013 passive: true 4014 }), addEventListener(doc, "touchend", handleTouchEndCapture, { 4015 capture: true, 4016 passive: true 4017 }))); 4018 return () => { 4019 unsubscribe(); 4020 preventedPressSuppressionTimeout.clear(); 4021 resetPressStartState(); 4022 suppressNextOutsideClickRef.current = false; 4023 }; 4024 }, [dataRef, floatingElement, escapeKey2, outsidePressEnabled, outsidePress2, open3, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, clearInsideReactTree, getOutsidePressEventProp, hasBlockingChild, isEventWithinOwnElements, tree, store2, cancelDismissOnEndTimeout, compositionTimeout]); 4025 const reference = React24.useMemo(() => ({ 4026 onKeyDown: closeOnEscapeKeyDown, 4027 onPointerDown: closeOnReferencePress, 4028 onClick: closeOnReferencePress 4029 }), [closeOnEscapeKeyDown, closeOnReferencePress]); 4030 const floating = React24.useMemo(() => ({ 4031 onKeyDown: closeOnEscapeKeyDown, 4032 // `onMouseDown` may be blocked if `event.preventDefault()` is called in 4033 // `onPointerDown`, such as with <NumberField.ScrubArea>. 4034 // See https://github.com/mui/base-ui/pull/3379 4035 onPointerDown: markInsidePressStartPrevented, 4036 onMouseDown: markInsidePressStartPrevented, 4037 onClickCapture: markInsideReactTree, 4038 onMouseDownCapture(event) { 4039 markInsideReactTree(); 4040 markPressStartedInsideReactTree(event); 4041 }, 4042 onPointerDownCapture(event) { 4043 markInsideReactTree(); 4044 markPressStartedInsideReactTree(event); 4045 }, 4046 onMouseUpCapture: markInsideReactTree, 4047 onTouchEndCapture: markInsideReactTree, 4048 onTouchMoveCapture: markInsideReactTree 4049 }), [closeOnEscapeKeyDown, markInsideReactTree, markPressStartedInsideReactTree, markInsidePressStartPrevented]); 4050 return React24.useMemo(() => enabled ? { 4051 reference, 4052 floating, 4053 trigger: reference 4054 } : {}, [enabled, reference, floating]); 4055 } 4056 4057 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popups/popupHandle.mjs 4058 var BasePopupHandle = class { 4059 /** 4060 * Stores of every root currently using this handle, in attach order. A handle is meant to be used 4061 * by a single mounted root, but roots can transiently overlap (e.g. during an animated route 4062 * transition), so this stack lets `attachStore`'s cleanup restore the previous root instead of 4063 * leaving a still-mounted root uncontrollable when a newer overlapping root detaches first. 4064 */ 4065 attachedStores = []; 4066 /** 4067 * Store of the root that currently controls the handle: the most recently attached one still 4068 * mounted, or `null` when no root is attached. Imperative methods are no-ops while this is `null`. 4069 */ 4070 attachedStoreValue = null; 4071 /** 4072 * Listeners notified when `attachedStore` changes, so detached triggers can follow the store pointer. 4073 */ 4074 storeListeners = /* @__PURE__ */ new Set(); 4075 /** 4076 * Creates a handle backed by the store used while no root is attached. 4077 * 4078 * @param fallbackStore Inert, closed store handed to detached triggers while no root is attached, 4079 * so they can render and register without a mounted root. Triggers register into whichever store 4080 * `store` currently resolves to, so while detached they live in this store's trigger map and 4081 * migrate themselves to the root's store (and back) as it attaches/detaches. 4082 * @param componentName Component name used to prefix dev warnings, e.g. `'Menu'` produces 4083 * `MenuHandle.open()` in warning text. 4084 * @param throwOnMissingTrigger Whether `open(triggerId)` throws when no trigger with that id is 4085 * registered. Anchored popups (Menu, Popover, Tooltip, PreviewCard) need a trigger to anchor to, 4086 * so they throw; Dialog is not anchored and instead opens unassociated with a dev warning. 4087 */ 4088 constructor(fallbackStore, componentName, throwOnMissingTrigger = true) { 4089 this.fallbackStore = fallbackStore; 4090 this.componentName = componentName; 4091 this.throwOnMissingTrigger = throwOnMissingTrigger; 4092 } 4093 get attachedStore() { 4094 return this.attachedStoreValue; 4095 } 4096 /** 4097 * Store that detached triggers read from: the attached root's store, or an inert fallback store 4098 * used while no root is attached. 4099 * @internal 4100 */ 4101 get store() { 4102 return this.attachedStoreValue ?? this.fallbackStore; 4103 } 4104 /** 4105 * Stable fallback store used for server rendering and hydration. Root stores cannot be recorded on 4106 * the handle during render because a handle can be shared by concurrent server-rendered requests. 4107 * @internal 4108 */ 4109 get serverStore() { 4110 return this.fallbackStore; 4111 } 4112 /** 4113 * Subscribes to changes of the attached store pointer so detached triggers re-render and re-bind 4114 * when a root attaches or detaches. Returns a function that removes the listener. 4115 * @internal 4116 */ 4117 subscribeStore(listener) { 4118 this.storeListeners.add(listener); 4119 return () => { 4120 this.storeListeners.delete(listener); 4121 }; 4122 } 4123 /** 4124 * Points the handle at a root's store and notifies subscribers so detached triggers re-render and 4125 * re-register into it (their registration effect migrates them when the store pointer changes). 4126 * Returns a cleanup function that detaches the store again. 4127 * @internal 4128 */ 4129 attachStore(newStore) { 4130 this.attachedStores.push(newStore); 4131 this.setActiveStore(newStore); 4132 if (true) { 4133 if (this.attachedStores.length > 1) { 4134 const dev = this; 4135 (dev.overlapWarningFrame ??= AnimationFrame.create()).request(() => { 4136 if (this.attachedStores.length > 1) { 4137 console.warn("Base UI: A handle is attached to more than one mounted root at the same time. The most recently mounted root takes over and the previous one stops being controlled by the handle. A handle should be used by a single root that stays mounted for the lifetime of the handle."); 4138 } 4139 }); 4140 } 4141 } 4142 return () => { 4143 const index2 = this.attachedStores.lastIndexOf(newStore); 4144 if (index2 !== -1) { 4145 this.attachedStores.splice(index2, 1); 4146 } 4147 this.setActiveStore(this.attachedStores[this.attachedStores.length - 1] ?? null); 4148 }; 4149 } 4150 /** 4151 * Sets the store that currently controls the handle and notifies subscribers when it changes, so 4152 * detached triggers re-render and migrate their registration to the new store. 4153 */ 4154 setActiveStore(store2) { 4155 if (this.attachedStoreValue !== store2) { 4156 this.attachedStoreValue = store2; 4157 this.storeListeners.forEach((listener) => { 4158 listener(); 4159 }); 4160 } 4161 } 4162 /** 4163 * Opens the attached root's store and associates it with the trigger with the given id, or a 4164 * no-op (with a dev warning) while no root is attached. Shared by every concrete handle's public 4165 * `open()` method, which only narrows the parameter type. 4166 * 4167 * When a trigger id is given but no matching trigger is registered, anchored popups throw (see 4168 * `throwOnMissingTrigger`); Dialog opens unassociated with a dev warning instead. 4169 * 4170 * This method should only be called in an event handler or an effect (not during rendering). 4171 * 4172 * @param triggerId ID of the trigger to associate with the popup, or `null`/`undefined` to open 4173 * without associating any trigger. 4174 */ 4175 openByTrigger(triggerId) { 4176 const attachedStore = this.attachedStore; 4177 if (attachedStore === null) { 4178 if (true) { 4179 console.warn(`Base UI: $this.componentName}Handle.open() was called while no root using this handle is mounted. The call was ignored; mount a root with this handle before opening it imperatively.`); 4180 } 4181 return; 4182 } 4183 let triggerElement; 4184 if (triggerId) { 4185 for (let i = this.attachedStores.length - 1; i >= 0 && !triggerElement; i -= 1) { 4186 triggerElement = this.attachedStores[i].context.triggerElements.getById(triggerId); 4187 } 4188 triggerElement ??= this.fallbackStore.context.triggerElements.getById(triggerId); 4189 } 4190 if (triggerId && !triggerElement) { 4191 if (this.throwOnMissingTrigger) { 4192 throw new Error(true ? `Base UI: $this.componentName}Handle.open() was called with the trigger id "$triggerId}", but no matching trigger is registered with this handle. An anchored popup cannot open without a trigger to anchor to. Pass the id of a mounted $this.componentName}.Trigger that has this handle set on its "handle" prop.` : formatErrorMessage_default(99, this.componentName, triggerId, this.componentName)); 4193 } 4194 if (true) { 4195 console.warn(`Base UI: $this.componentName}Handle.open: No trigger found with id "$triggerId}". The popup will open, but the trigger will not be associated with it.`); 4196 } 4197 } 4198 attachedStore.setOpen(true, createChangeEventDetails(reason_parts_exports.imperativeAction, void 0, triggerElement)); 4199 } 4200 /** 4201 * Closes the popup by setting the attached root's store to closed, or a no-op (with a dev warning) 4202 * while no root is attached. Shared by every concrete handle's public `close()` method. 4203 * 4204 * This method should only be called in an event handler or an effect (not during rendering). 4205 */ 4206 closePopup() { 4207 const attachedStore = this.attachedStore; 4208 if (attachedStore === null) { 4209 if (true) { 4210 console.warn(`Base UI: $this.componentName}Handle.close() was called while no root using this handle is mounted. The call was ignored.`); 4211 } 4212 return; 4213 } 4214 attachedStore.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction)); 4215 } 4216 }; 4217 4218 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs 4219 var React26 = __toESM(require_react(), 1); 4220 var ReactDOM3 = __toESM(require_react_dom(), 1); 4221 4222 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useSyncedFloatingRootContext.mjs 4223 function useSyncedFloatingRootContext(options) { 4224 const { 4225 popupStore, 4226 treatPopupAsFloatingElement = false, 4227 floatingRootContext: store2, 4228 floatingId, 4229 nested, 4230 onOpenChange 4231 } = options; 4232 const open3 = popupStore.useState("open"); 4233 const referenceElement = popupStore.useState("activeTriggerElement"); 4234 const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? "popupElement" : "positionerElement"); 4235 const handleOpenChange = onOpenChange; 4236 popupStore.useSyncedValue("floatingId", floatingId); 4237 useIsoLayoutEffect(() => { 4238 const valuesToSync = { 4239 open: open3, 4240 floatingId, 4241 referenceElement, 4242 floatingElement 4243 }; 4244 if (isElement(referenceElement)) { 4245 valuesToSync.domReferenceElement = referenceElement; 4246 } 4247 if (store2.state.positionReference === store2.state.referenceElement) { 4248 valuesToSync.positionReference = referenceElement; 4249 } 4250 store2.update(valuesToSync); 4251 }, [open3, floatingId, referenceElement, floatingElement, store2]); 4252 store2.context.onOpenChange = handleOpenChange; 4253 store2.context.nested = nested; 4254 return store2; 4255 } 4256 4257 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useUnmountAfterClose.mjs 4258 var React25 = __toESM(require_react(), 1); 4259 function useUnmountAfterClose(parameters) { 4260 const { 4261 open: open3, 4262 ref, 4263 preventUnmountOnClose, 4264 setPreventUnmountOnClose: setPreventUnmountOnCloseParam, 4265 onUnmount, 4266 animateInitialOpen 4267 } = parameters; 4268 const setPreventUnmountOnClose = useStableCallback(setPreventUnmountOnCloseParam); 4269 const { 4270 mounted, 4271 setMounted, 4272 transitionStatus 4273 } = useTransitionStatus(open3, false, false, animateInitialOpen); 4274 const preventUnmountingOnClose = open3 ? false : preventUnmountOnClose; 4275 useIsoLayoutEffect(() => { 4276 if (open3) { 4277 setPreventUnmountOnClose(false); 4278 } 4279 }, [open3, setPreventUnmountOnClose]); 4280 const mountedRef = React25.useRef(mounted); 4281 const pendingUnmountRef = React25.useRef(false); 4282 const rerender = useForcedRerendering(); 4283 const unmount = () => { 4284 mountedRef.current = false; 4285 setMounted(false); 4286 onUnmount(); 4287 }; 4288 useIsoLayoutEffect(() => { 4289 mountedRef.current = mounted; 4290 if (pendingUnmountRef.current) { 4291 pendingUnmountRef.current = false; 4292 if (!open3 && mounted) { 4293 unmount(); 4294 } 4295 } 4296 }); 4297 const forceUnmount = useStableCallback(() => { 4298 if (!mountedRef.current) { 4299 return; 4300 } 4301 if (open3) { 4302 pendingUnmountRef.current = true; 4303 rerender(); 4304 return; 4305 } 4306 unmount(); 4307 }); 4308 useOpenChangeComplete({ 4309 enabled: mounted && !open3 && !preventUnmountingOnClose, 4310 open: open3, 4311 ref, 4312 onComplete() { 4313 if (!open3) { 4314 forceUnmount(); 4315 } 4316 } 4317 }); 4318 return { 4319 mounted, 4320 transitionStatus, 4321 preventUnmountingOnClose, 4322 forceUnmount 4323 }; 4324 } 4325 4326 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popups/popupStoreUtils.mjs 4327 var FOCUSABLE_POPUP_PROPS = { 4328 tabIndex: -1, 4329 [FOCUSABLE_ATTRIBUTE]: "" 4330 }; 4331 function usePopupRootStore(createStore, treatPopupAsFloatingElement = false) { 4332 const floatingId = useId(); 4333 const nested = useFloatingParentNodeId() != null; 4334 const store2 = useRefWithInit(() => createStore(floatingId, nested)).current; 4335 useSyncedFloatingRootContext({ 4336 popupStore: store2, 4337 treatPopupAsFloatingElement, 4338 floatingRootContext: store2.state.floatingRootContext, 4339 floatingId, 4340 nested, 4341 onOpenChange: store2.setOpen 4342 }); 4343 return store2; 4344 } 4345 function PopupHandleAttachment({ 4346 handle, 4347 store: store2 4348 }) { 4349 useIsoLayoutEffect(() => { 4350 return handle.attachStore(store2); 4351 }, [handle, store2]); 4352 return null; 4353 } 4354 function syncTriggerCount(store2) { 4355 const triggerCount = store2.context.triggerElements.size; 4356 if (store2.select("open") && store2.state.triggerCount !== triggerCount) { 4357 store2.set("triggerCount", triggerCount); 4358 } 4359 } 4360 function useTriggerRegistration(id, store2) { 4361 const registrationRef = React26.useRef(null); 4362 return useStableCallback((element) => { 4363 const registration = registrationRef.current; 4364 if (registration !== null) { 4365 if (registration.element === element && registration.store === store2 && registration.id === id) { 4366 return; 4367 } 4368 registrationRef.current = null; 4369 const registeredStore = registration.store; 4370 if (registeredStore.context.triggerElements.getById(registration.id) === registration.element) { 4371 registeredStore.context.triggerElements.delete(registration.id); 4372 syncTriggerCount(registeredStore); 4373 } 4374 } 4375 if (element !== null && id !== void 0) { 4376 registrationRef.current = { 4377 store: store2, 4378 id, 4379 element 4380 }; 4381 store2.context.triggerElements.add(id, element); 4382 syncTriggerCount(store2); 4383 } 4384 }); 4385 } 4386 function createPopupOpenState(state, open3, trigger, preventUnmountOnClose = false) { 4387 let preventUnmountingOnClose = state.preventUnmountingOnClose; 4388 if (open3) { 4389 preventUnmountingOnClose = false; 4390 } else if (preventUnmountOnClose) { 4391 preventUnmountingOnClose = true; 4392 } 4393 const triggerId = trigger?.id ?? null; 4394 let activeTriggerId = state.activeTriggerId; 4395 let activeTriggerElement = state.activeTriggerElement; 4396 if (triggerId || open3) { 4397 activeTriggerId = triggerId; 4398 activeTriggerElement = trigger ?? null; 4399 } 4400 return { 4401 open: open3, 4402 preventUnmountingOnClose, 4403 activeTriggerId, 4404 activeTriggerElement, 4405 // An open request without a trigger (a handle's `open(null)` or `openWithPayload()`) must not 4406 // be reassociated with a lone registered trigger later on. Controlled and default opens never 4407 // pass through here, so they keep claiming a lone trigger. A close request keeps the flag: a 4408 // controlled root may decline it and stay open, so the Root clears the flag only once the 4409 // popup is effectively closed. 4410 openedWithoutTrigger: open3 ? trigger == null : state.openedWithoutTrigger 4411 }; 4412 } 4413 function attachPreventUnmountOnClose(eventDetails) { 4414 let preventUnmountOnClose = false; 4415 eventDetails.preventUnmountOnClose = () => { 4416 preventUnmountOnClose = true; 4417 }; 4418 return () => preventUnmountOnClose; 4419 } 4420 function applyPopupOpenChange(store2, nextOpen, eventDetails, options = {}) { 4421 const reason = eventDetails.reason; 4422 const isHover = reason === reason_parts_exports.triggerHover; 4423 const isFocusOpen = nextOpen && reason === reason_parts_exports.triggerFocus; 4424 const isDismissClose = !nextOpen && (reason === reason_parts_exports.triggerPress || reason === reason_parts_exports.escapeKey); 4425 const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails); 4426 store2.context.onOpenChange?.(nextOpen, eventDetails); 4427 if (eventDetails.isCanceled) { 4428 return; 4429 } 4430 options.onBeforeDispatch?.(); 4431 store2.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails); 4432 const changeState = () => { 4433 const popupOpenState = createPopupOpenState(store2.state, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose()); 4434 const updatedState = { 4435 ...options.extraState, 4436 ...popupOpenState 4437 }; 4438 if (isFocusOpen) { 4439 updatedState.instantType = "focus"; 4440 } else if (isDismissClose) { 4441 updatedState.instantType = "dismiss"; 4442 } else if (isHover) { 4443 updatedState.instantType = void 0; 4444 } 4445 store2.update(updatedState); 4446 }; 4447 if (isHover) { 4448 ReactDOM3.flushSync(changeState); 4449 } else { 4450 changeState(); 4451 } 4452 } 4453 function useTriggerDataForwarding(triggerId, triggerElementRef, store2, stateUpdates) { 4454 const isMountedByThisTrigger = store2.useState("isMountedByTrigger", triggerId); 4455 const baseRegisterTrigger = useTriggerRegistration(triggerId, store2); 4456 const applyTriggerData = useStableCallback((element) => { 4457 const open3 = store2.select("open"); 4458 const activeTriggerId = store2.select("activeTriggerId"); 4459 if (activeTriggerId === triggerId) { 4460 const changes = { 4461 activeTriggerElement: element, 4462 ...open3 ? stateUpdates : null 4463 }; 4464 store2.update(changes); 4465 return; 4466 } 4467 if (activeTriggerId == null && open3 && !store2.state.openedWithoutTrigger) { 4468 const changes = { 4469 activeTriggerId: triggerId ?? null, 4470 activeTriggerElement: element, 4471 ...stateUpdates 4472 }; 4473 store2.update(changes); 4474 } 4475 }); 4476 const registerTrigger = useStableCallback((element) => { 4477 baseRegisterTrigger(element); 4478 if (element) { 4479 applyTriggerData(element); 4480 } 4481 }); 4482 useIsoLayoutEffect(() => { 4483 registerTrigger(triggerElementRef.current); 4484 return () => registerTrigger(null); 4485 }, [registerTrigger, triggerElementRef, store2, triggerId]); 4486 useIsoLayoutEffect(() => { 4487 if (isMountedByThisTrigger) { 4488 const changes = { 4489 activeTriggerElement: triggerElementRef.current, 4490 ...stateUpdates 4491 }; 4492 store2.update(changes); 4493 } 4494 }, [isMountedByThisTrigger, store2, triggerElementRef, ...Object.values(stateUpdates)]); 4495 return { 4496 registerTrigger, 4497 isMountedByThisTrigger 4498 }; 4499 } 4500 function useImplicitActiveTrigger(store2, options = {}) { 4501 const { 4502 closeOnActiveTriggerUnmount = false 4503 } = options; 4504 const resolvedActiveTriggerIdRef = React26.useRef(null); 4505 const open3 = store2.useState("open"); 4506 const reactiveTriggerCount = store2.useState("triggerCount"); 4507 const activeTriggerId = store2.useState("activeTriggerId"); 4508 const reactiveActiveTriggerElement = store2.useState("activeTriggerElement"); 4509 useIsoLayoutEffect(() => { 4510 if (!open3) { 4511 resolvedActiveTriggerIdRef.current = null; 4512 if (store2.state.triggerCount !== 0) { 4513 store2.set("triggerCount", 0); 4514 } 4515 if (store2.state.openedWithoutTrigger) { 4516 store2.set("openedWithoutTrigger", false); 4517 } 4518 return; 4519 } 4520 const triggerCount = store2.context.triggerElements.size; 4521 const stateUpdates = {}; 4522 if (store2.state.triggerCount !== triggerCount) { 4523 stateUpdates.triggerCount = triggerCount; 4524 } 4525 const currentActiveTriggerId = store2.select("activeTriggerId"); 4526 let lostActiveTriggerId = null; 4527 if (currentActiveTriggerId) { 4528 const activeTriggerElement = store2.context.triggerElements.getById(currentActiveTriggerId); 4529 if (!activeTriggerElement) { 4530 for (const [triggerId, triggerElement] of store2.context.triggerElements.entries()) { 4531 if (triggerElement === store2.state.activeTriggerElement) { 4532 stateUpdates.activeTriggerId = triggerId; 4533 stateUpdates.activeTriggerElement = triggerElement; 4534 resolvedActiveTriggerIdRef.current = triggerId; 4535 break; 4536 } 4537 } 4538 if (stateUpdates.activeTriggerId === void 0) { 4539 if (resolvedActiveTriggerIdRef.current === currentActiveTriggerId) { 4540 lostActiveTriggerId = currentActiveTriggerId; 4541 } else { 4542 resolvedActiveTriggerIdRef.current = null; 4543 } 4544 } 4545 } else { 4546 resolvedActiveTriggerIdRef.current = currentActiveTriggerId; 4547 if (activeTriggerElement !== store2.state.activeTriggerElement) { 4548 stateUpdates.activeTriggerElement = activeTriggerElement; 4549 } 4550 } 4551 } else { 4552 resolvedActiveTriggerIdRef.current = null; 4553 } 4554 if (!lostActiveTriggerId && !currentActiveTriggerId && !store2.state.openedWithoutTrigger && triggerCount === 1) { 4555 const iteratorResult = store2.context.triggerElements.entries().next(); 4556 if (!iteratorResult.done) { 4557 const [implicitTriggerId, implicitTriggerElement] = iteratorResult.value; 4558 stateUpdates.activeTriggerId = implicitTriggerId; 4559 stateUpdates.activeTriggerElement = implicitTriggerElement; 4560 resolvedActiveTriggerIdRef.current = implicitTriggerId; 4561 } 4562 } 4563 if (stateUpdates.triggerCount !== void 0 || stateUpdates.activeTriggerId !== void 0 || stateUpdates.activeTriggerElement !== void 0) { 4564 store2.update(stateUpdates); 4565 } 4566 if (lostActiveTriggerId) { 4567 if (closeOnActiveTriggerUnmount) { 4568 queueMicrotask(() => { 4569 if (store2.select("open") && store2.select("activeTriggerId") === lostActiveTriggerId && !store2.context.triggerElements.getById(lostActiveTriggerId)) { 4570 const eventDetails = createChangeEventDetails(reason_parts_exports.none); 4571 store2.setOpen(false, eventDetails); 4572 if (!eventDetails.isCanceled) { 4573 store2.update({ 4574 activeTriggerId: null, 4575 activeTriggerElement: null 4576 }); 4577 } 4578 } 4579 }); 4580 } 4581 } 4582 }, [open3, store2, reactiveTriggerCount, activeTriggerId, reactiveActiveTriggerElement, closeOnActiveTriggerUnmount]); 4583 } 4584 function useOpenStateTransitions(open3, store2, onUnmount, animateInitialOpen) { 4585 const { 4586 mounted, 4587 transitionStatus, 4588 forceUnmount 4589 } = useUnmountAfterClose({ 4590 open: open3, 4591 ref: store2.context.popupRef, 4592 preventUnmountOnClose: store2.useState("preventUnmountingOnClose"), 4593 setPreventUnmountOnClose: (preventUnmountOnClose) => store2.set("preventUnmountingOnClose", preventUnmountOnClose), 4594 animateInitialOpen, 4595 onUnmount() { 4596 store2.update({ 4597 activeTriggerId: null, 4598 activeTriggerElement: null, 4599 mounted: false, 4600 preventUnmountingOnClose: false 4601 }); 4602 onUnmount?.(); 4603 store2.context.onOpenChangeComplete?.(false); 4604 } 4605 }); 4606 useRefWithInit(() => { 4607 store2.set("mounted", mounted); 4608 return null; 4609 }); 4610 store2.useSyncedValues({ 4611 mounted, 4612 transitionStatus 4613 }); 4614 return { 4615 forceUnmount, 4616 transitionStatus 4617 }; 4618 } 4619 function usePopupInteractionProps(store2, statePart) { 4620 store2.useSyncedValues(statePart); 4621 useIsoLayoutEffect(() => () => { 4622 store2.update({ 4623 activeTriggerProps: EMPTY_OBJECT, 4624 inactiveTriggerProps: EMPTY_OBJECT, 4625 popupProps: EMPTY_OBJECT 4626 }); 4627 }, [store2]); 4628 } 4629 4630 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popups/popupTriggerMap.mjs 4631 var devElementIdsByMap; 4632 function getDevElementIds(map) { 4633 devElementIdsByMap ??= /* @__PURE__ */ new WeakMap(); 4634 let elementIds = devElementIdsByMap.get(map); 4635 if (!elementIds) { 4636 elementIds = /* @__PURE__ */ new WeakMap(); 4637 devElementIdsByMap.set(map, elementIds); 4638 } 4639 return elementIds; 4640 } 4641 var PopupTriggerMap = class { 4642 idMap = /* @__PURE__ */ new Map(); 4643 /** 4644 * Adds a trigger element with the given ID. 4645 * 4646 * Note: The provided element is assumed to not be registered under multiple IDs. 4647 */ 4648 add(id, element) { 4649 if (true) { 4650 const elementIds = getDevElementIds(this); 4651 const existingId = elementIds.get(element); 4652 if (existingId !== void 0 && existingId !== id) { 4653 throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap."); 4654 } 4655 const previousElement = this.idMap.get(id); 4656 if (previousElement !== void 0 && previousElement !== element) { 4657 elementIds.delete(previousElement); 4658 } 4659 elementIds.set(element, id); 4660 } 4661 this.idMap.set(id, element); 4662 } 4663 /** 4664 * Removes the trigger element with the given ID. 4665 */ 4666 delete(id) { 4667 if (true) { 4668 const element = this.idMap.get(id); 4669 if (element !== void 0) { 4670 devElementIdsByMap?.get(this)?.delete(element); 4671 } 4672 } 4673 this.idMap.delete(id); 4674 } 4675 /** 4676 * Whether the given element is registered as a trigger. 4677 */ 4678 hasElement(element) { 4679 for (const registered of this.idMap.values()) { 4680 if (registered === element) { 4681 return true; 4682 } 4683 } 4684 return false; 4685 } 4686 /** 4687 * Whether there is a registered trigger element matching the given predicate. 4688 */ 4689 hasMatchingElement(predicate) { 4690 for (const element of this.idMap.values()) { 4691 if (predicate(element)) { 4692 return true; 4693 } 4694 } 4695 return false; 4696 } 4697 /** 4698 * Returns the trigger element associated with the given ID, or undefined if no such element exists. 4699 */ 4700 getById(id) { 4701 return this.idMap.get(id); 4702 } 4703 /** 4704 * Returns an iterable of all registered trigger entries, where each entry is a tuple of [id, element]. 4705 */ 4706 entries() { 4707 return this.idMap.entries(); 4708 } 4709 /** 4710 * Returns an iterable of all registered trigger elements. 4711 */ 4712 elements() { 4713 return this.idMap.values(); 4714 } 4715 /** 4716 * Returns the number of registered trigger elements. 4717 */ 4718 get size() { 4719 return this.idMap.size; 4720 } 4721 }; 4722 4723 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/store/useStore.mjs 4724 var React28 = __toESM(require_react(), 1); 4725 var import_shim = __toESM(require_shim(), 1); 4726 var import_with_selector = __toESM(require_with_selector(), 1); 4727 4728 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/fastHooks.mjs 4729 var React27 = __toESM(require_react(), 1); 4730 var hooks = []; 4731 var currentInstance = void 0; 4732 function getInstance() { 4733 return currentInstance; 4734 } 4735 function register2(hook) { 4736 hooks.push(hook); 4737 } 4738 function fastComponent(fn) { 4739 const FastComponent = (props, forwardedRef) => { 4740 const instance = useRefWithInit(createInstance).current; 4741 let result; 4742 try { 4743 currentInstance = instance; 4744 for (const hook of hooks) { 4745 hook.before(instance); 4746 } 4747 result = fn(props, forwardedRef); 4748 for (const hook of hooks) { 4749 hook.after(instance); 4750 } 4751 instance.didInitialize = true; 4752 } finally { 4753 currentInstance = void 0; 4754 } 4755 return result; 4756 }; 4757 FastComponent.displayName = fn.displayName || fn.name; 4758 return FastComponent; 4759 } 4760 function fastComponentRef(fn) { 4761 return /* @__PURE__ */ React27.forwardRef(fastComponent(fn)); 4762 } 4763 function createInstance() { 4764 return { 4765 didInitialize: false 4766 }; 4767 } 4768 4769 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/store/useStore.mjs 4770 var canUseRawUseSyncExternalStore = isReactVersionAtLeast(19); 4771 var useStoreImplementation = canUseRawUseSyncExternalStore ? useStoreFast : useStoreLegacy; 4772 function useStore(store2, selector, a1, a2, a3) { 4773 return useStoreImplementation(store2, selector, a1, a2, a3); 4774 } 4775 function useStoreR19(store2, selector, a1, a2, a3) { 4776 const getSelection = React28.useCallback(() => selector(store2.getSnapshot(), a1, a2, a3), [store2, selector, a1, a2, a3]); 4777 return (0, import_shim.useSyncExternalStore)(store2.subscribe, getSelection, getSelection); 4778 } 4779 register2({ 4780 before(instance) { 4781 instance.syncIndex = 0; 4782 if (!instance.didInitialize) { 4783 instance.syncTick = 1; 4784 instance.syncHooks = []; 4785 instance.didChangeStore = true; 4786 instance.getSnapshot = () => { 4787 let didChange2 = false; 4788 for (let i = 0; i < instance.syncHooks.length; i += 1) { 4789 const hook = instance.syncHooks[i]; 4790 const value = hook.selector(hook.store.state, hook.a1, hook.a2, hook.a3); 4791 if (!Object.is(hook.value, value)) { 4792 didChange2 = true; 4793 hook.value = value; 4794 } 4795 } 4796 if (didChange2) { 4797 instance.syncTick += 1; 4798 } 4799 return instance.syncTick; 4800 }; 4801 } 4802 }, 4803 after(instance) { 4804 if (instance.syncHooks.length > 0) { 4805 if (instance.didChangeStore) { 4806 instance.didChangeStore = false; 4807 instance.subscribe = (onStoreChange) => { 4808 const stores = /* @__PURE__ */ new Set(); 4809 for (const hook of instance.syncHooks) { 4810 stores.add(hook.store); 4811 } 4812 const unsubscribes = []; 4813 for (const store2 of stores) { 4814 unsubscribes.push(store2.subscribe(onStoreChange)); 4815 } 4816 return () => { 4817 for (const unsubscribe of unsubscribes) { 4818 unsubscribe(); 4819 } 4820 }; 4821 }; 4822 } 4823 (0, import_shim.useSyncExternalStore)(instance.subscribe, instance.getSnapshot, instance.getSnapshot); 4824 } 4825 } 4826 }); 4827 function useStoreFast(store2, selector, a1, a2, a3) { 4828 const instance = getInstance(); 4829 if (!instance) { 4830 return useStoreR19(store2, selector, a1, a2, a3); 4831 } 4832 const index2 = instance.syncIndex; 4833 instance.syncIndex += 1; 4834 let hook; 4835 if (!instance.didInitialize) { 4836 hook = { 4837 store: store2, 4838 selector, 4839 a1, 4840 a2, 4841 a3, 4842 value: selector(store2.getSnapshot(), a1, a2, a3) 4843 }; 4844 instance.syncHooks.push(hook); 4845 } else { 4846 hook = instance.syncHooks[index2]; 4847 if (hook.store !== store2 || hook.selector !== selector || !Object.is(hook.a1, a1) || !Object.is(hook.a2, a2) || !Object.is(hook.a3, a3)) { 4848 if (hook.store !== store2) { 4849 instance.didChangeStore = true; 4850 } 4851 hook.store = store2; 4852 hook.selector = selector; 4853 hook.a1 = a1; 4854 hook.a2 = a2; 4855 hook.a3 = a3; 4856 hook.value = selector(store2.getSnapshot(), a1, a2, a3); 4857 } 4858 } 4859 return hook.value; 4860 } 4861 function useStoreLegacy(store2, selector, a1, a2, a3) { 4862 return (0, import_with_selector.useSyncExternalStoreWithSelector)(store2.subscribe, store2.getSnapshot, store2.getSnapshot, (state) => selector(state, a1, a2, a3)); 4863 } 4864 4865 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/store/Store.mjs 4866 var Store = class { 4867 /** 4868 * Creates a store with the given initial state, constructing the class it is called on. 4869 * Calling it on a generic base class (e.g. `ReactStore.create(...)`) constructs that 4870 * class but degrades the inferred instance type to `Store`; use `new` there instead. 4871 */ 4872 static create(state) { 4873 return new this(state); 4874 } 4875 /** 4876 * The current state of the store. 4877 * This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}. 4878 * To subscribe to state changes, use the {@link useState} method. The value returned by {@link useState} is updated after the component renders (similarly to React's useState). 4879 * The values can be used directly (to avoid subscribing to the store) in effects or event handlers. 4880 * 4881 * Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification. 4882 */ 4883 // Internal state to handle recursive `setState()` calls 4884 constructor(state) { 4885 this.state = state; 4886 this.listeners = /* @__PURE__ */ new Set(); 4887 this.updateTick = 0; 4888 } 4889 /** 4890 * Registers a listener that will be called whenever the store's state changes. 4891 * 4892 * @param fn The listener function to be called on state changes. 4893 * @returns A function to unsubscribe the listener. 4894 */ 4895 subscribe = (fn) => { 4896 this.listeners.add(fn); 4897 return () => { 4898 this.listeners.delete(fn); 4899 }; 4900 }; 4901 /** 4902 * Returns the current state of the store. 4903 */ 4904 getSnapshot = () => { 4905 return this.state; 4906 }; 4907 /** 4908 * Updates the entire store's state and notifies all registered listeners. 4909 * 4910 * @param newState The new state to set for the store. 4911 */ 4912 setState(newState) { 4913 if (this.state === newState) { 4914 return; 4915 } 4916 this.state = newState; 4917 this.updateTick += 1; 4918 const currentTick = this.updateTick; 4919 for (const listener of this.listeners) { 4920 if (currentTick !== this.updateTick) { 4921 return; 4922 } 4923 listener(newState); 4924 } 4925 } 4926 /** 4927 * Merges the provided changes into the current state and notifies listeners if there are changes. 4928 * Each value must match its state key. Pass an exact known subset rather than a broad 4929 * `Partial<State>`, which may contain `undefined` for required state fields. 4930 * 4931 * @param changes An object containing the changes to apply to the current state. 4932 */ 4933 update(changes) { 4934 for (const key in changes) { 4935 if (!Object.is(this.state[key], changes[key])) { 4936 this.setState({ 4937 ...this.state, 4938 ...changes 4939 }); 4940 return; 4941 } 4942 } 4943 } 4944 /** 4945 * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed. 4946 * 4947 * @param key The key in the store's state to update. 4948 * @param value The new value to set for the specified key. 4949 */ 4950 set(key, value) { 4951 if (!Object.is(this.state[key], value)) { 4952 this.setState({ 4953 ...this.state, 4954 [key]: value 4955 }); 4956 } 4957 } 4958 /** 4959 * Gives the state a new reference and updates all registered listeners. 4960 */ 4961 notifyAll() { 4962 const newState = { 4963 ...this.state 4964 }; 4965 this.setState(newState); 4966 } 4967 use(selector, a1, a2, a3) { 4968 return useStore(this, selector, a1, a2, a3); 4969 } 4970 }; 4971 4972 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/store/ReactStore.mjs 4973 var React29 = __toESM(require_react(), 1); 4974 var ReactStore = class extends Store { 4975 /** 4976 * Creates a new ReactStore instance. 4977 * 4978 * @param state Initial state of the store. 4979 * @param context Non-reactive context values. 4980 * @param selectors Optional selectors for use with `useState`. 4981 */ 4982 constructor(state, context = {}, selectors3) { 4983 super(state); 4984 this.context = context; 4985 this.selectors = selectors3; 4986 } 4987 /** 4988 * Non-reactive values such as refs, callbacks, etc. 4989 */ 4990 /** 4991 * Synchronizes a single external value into the store. 4992 * 4993 * Note that the while the value in `state` is updated immediately, the value returned 4994 * by `useState` is updated before the next render (similarly to React's `useState`). 4995 */ 4996 useSyncedValue(key, value) { 4997 React29.useDebugValue(key); 4998 const store2 = this; 4999 useIsoLayoutEffect(() => { 5000 if (store2.state[key] !== value) { 5001 store2.set(key, value); 5002 } 5003 }, [store2, key, value]); 5004 } 5005 /** 5006 * Synchronizes a single external value into the store and 5007 * cleans it up (sets to `undefined`) on unmount. 5008 * 5009 * Note that the while the value in `state` is updated immediately, the value returned 5010 * by `useState` is updated before the next render (similarly to React's `useState`). 5011 */ 5012 useSyncedValueWithCleanup(key, value) { 5013 const store2 = this; 5014 useIsoLayoutEffect(() => { 5015 if (store2.state[key] !== value) { 5016 store2.set(key, value); 5017 } 5018 return () => { 5019 store2.set(key, void 0); 5020 }; 5021 }, [store2, key, value]); 5022 } 5023 /** 5024 * Synchronizes multiple external values into the store. 5025 * Each value must match its state key. Pass an exact known subset rather than a broad 5026 * `Partial<State>`, which may contain `undefined` for required state fields. 5027 * 5028 * Note that the while the values in `state` are updated immediately, the values returned 5029 * by `useState` are updated before the next render (similarly to React's `useState`). 5030 * 5031 * @param statePart An exact subset of state fields to synchronize. Unknown keys are not accepted. 5032 */ 5033 useSyncedValues(statePart) { 5034 const store2 = this; 5035 if (true) { 5036 React29.useDebugValue(statePart, (p) => Object.keys(p)); 5037 const keys = React29.useRef(Object.keys(statePart)).current; 5038 const nextKeys = Object.keys(statePart); 5039 if (keys.length !== nextKeys.length || keys.some((key, index2) => key !== nextKeys[index2])) { 5040 console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable."); 5041 } 5042 } 5043 const dependencies = Object.values(statePart); 5044 useIsoLayoutEffect(() => { 5045 store2.update(statePart); 5046 }, [store2, ...dependencies]); 5047 } 5048 /** 5049 * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled` 5050 * is non-undefined, the store's state at `key` is updated to match `controlled`. 5051 */ 5052 useControlledProp(key, controlled) { 5053 React29.useDebugValue(key); 5054 const store2 = this; 5055 const isControlled = controlled !== void 0; 5056 useIsoLayoutEffect(() => { 5057 if (isControlled && !Object.is(store2.state[key], controlled)) { 5058 store2.setState({ 5059 ...store2.state, 5060 [key]: controlled 5061 }); 5062 } 5063 }, [store2, key, controlled, isControlled]); 5064 if (true) { 5065 const cache = this.controlledValues ??= /* @__PURE__ */ new Map(); 5066 if (!cache.has(key)) { 5067 cache.set(key, isControlled); 5068 } 5069 const previouslyControlled = cache.get(key); 5070 if (previouslyControlled !== void 0 && previouslyControlled !== isControlled) { 5071 console.error(`A component is changing the $previouslyControlled ? "" : "un"}controlled state of $key.toString()} to be $previouslyControlled ? "un" : ""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`); 5072 } 5073 } 5074 } 5075 /** Gets the current value from the store using a selector with the provided key. 5076 * 5077 * @param key Key of the selector to use. 5078 */ 5079 select(key, a1, a2, a3) { 5080 const selector = this.selectors[key]; 5081 return selector(this.state, a1, a2, a3); 5082 } 5083 /** 5084 * Returns a value from the store's state using a selector function. 5085 * Used to subscribe to specific parts of the state. 5086 * This methods causes a rerender whenever the selected state changes. 5087 * 5088 * @param key Key of the selector to use. 5089 */ 5090 useState(key, a1, a2, a3) { 5091 React29.useDebugValue(key); 5092 return useStore(this, this.selectors[key], a1, a2, a3); 5093 } 5094 /** 5095 * Wraps a function with `useStableCallback` to ensure it has a stable reference 5096 * and assigns it to the context. 5097 * 5098 * @param key Key of the event callback. Must be a function in the context. 5099 * @param fn Function to assign. 5100 */ 5101 useContextCallback(key, fn) { 5102 React29.useDebugValue(key); 5103 const stableFunction = useStableCallback(fn ?? NOOP); 5104 this.context[key] = stableFunction; 5105 } 5106 /** 5107 * Returns a stable setter function for a specific key in the store's state. 5108 * It's commonly used to pass as a ref callback to React elements. 5109 * 5110 * @param key Key of the state to set. 5111 */ 5112 useStateSetter(key) { 5113 const ref = React29.useRef(void 0); 5114 if (ref.current === void 0) { 5115 ref.current = (value) => { 5116 this.set(key, value); 5117 }; 5118 } 5119 return ref.current; 5120 } 5121 /** 5122 * Observes changes derived from the store's selectors and calls the listener when the selected value changes. 5123 * 5124 * @param key Key of the selector to observe. 5125 * @param listener Listener function called when the selector result changes. 5126 */ 5127 observe(selector, listener) { 5128 let selectFn; 5129 if (typeof selector === "function") { 5130 selectFn = selector; 5131 } else { 5132 selectFn = this.selectors[selector]; 5133 } 5134 let prevValue = selectFn(this.state); 5135 listener(prevValue, prevValue, this); 5136 return this.subscribe((nextState) => { 5137 const nextValue = selectFn(nextState); 5138 if (!Object.is(prevValue, nextValue)) { 5139 const oldValue = prevValue; 5140 prevValue = nextValue; 5141 listener(nextValue, oldValue, this); 5142 } 5143 }); 5144 } 5145 }; 5146 5147 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/components/FloatingRootStore.mjs 5148 var selectors = { 5149 open: (state) => state.open, 5150 transitionStatus: (state) => state.transitionStatus, 5151 domReferenceElement: (state) => state.domReferenceElement, 5152 referenceElement: (state) => state.positionReference ?? state.referenceElement, 5153 floatingElement: (state) => state.floatingElement, 5154 floatingId: (state) => state.floatingId 5155 }; 5156 var FloatingRootStore = class extends ReactStore { 5157 constructor(options) { 5158 const { 5159 syncOnly, 5160 nested, 5161 onOpenChange, 5162 triggerElements, 5163 ...initialState 5164 } = options; 5165 super({ 5166 ...initialState, 5167 positionReference: initialState.referenceElement, 5168 domReferenceElement: initialState.referenceElement 5169 }, { 5170 onOpenChange, 5171 dataRef: { 5172 current: {} 5173 }, 5174 events: createEventEmitter(), 5175 nested, 5176 triggerElements 5177 }, selectors); 5178 this.syncOnly = syncOnly; 5179 } 5180 /** 5181 * Syncs the event used by hover logic to distinguish hover-open from click-like interaction. 5182 */ 5183 syncOpenEvent = (newOpen, event) => { 5184 if (!newOpen || !this.state.open || // Prevent a pending hover-open from overwriting a click-open event, while allowing 5185 // click events to upgrade a hover-open. 5186 event != null && isClickLikeEvent(event)) { 5187 this.context.dataRef.current.openEvent = newOpen ? event : void 0; 5188 } 5189 }; 5190 /** 5191 * Runs the root-owned side effects for an open state change. 5192 */ 5193 dispatchOpenChange = (newOpen, eventDetails) => { 5194 this.syncOpenEvent(newOpen, eventDetails.event); 5195 const details = { 5196 open: newOpen, 5197 reason: eventDetails.reason, 5198 nativeEvent: eventDetails.event, 5199 nested: this.context.nested, 5200 triggerElement: eventDetails.trigger 5201 }; 5202 this.context.events.emit("openchange", details); 5203 }; 5204 /** 5205 * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments. 5206 * 5207 * @param newOpen The new open state. 5208 * @param eventDetails Details about the event that triggered the open state change. 5209 */ 5210 setOpen = (newOpen, eventDetails) => { 5211 if (this.syncOnly) { 5212 this.context.onOpenChange?.(newOpen, eventDetails); 5213 return; 5214 } 5215 this.dispatchOpenChange(newOpen, eventDetails); 5216 this.context.onOpenChange?.(newOpen, eventDetails); 5217 }; 5218 }; 5219 5220 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popups/store.mjs 5221 function createInitialPopupStoreState(triggerElements, floatingId, nested = false) { 5222 return { 5223 open: false, 5224 openProp: void 0, 5225 mounted: false, 5226 transitionStatus: void 0, 5227 floatingRootContext: new FloatingRootStore({ 5228 open: false, 5229 transitionStatus: void 0, 5230 floatingElement: null, 5231 referenceElement: null, 5232 triggerElements, 5233 floatingId, 5234 syncOnly: true, 5235 nested, 5236 onOpenChange: void 0 5237 }), 5238 floatingId, 5239 triggerCount: 0, 5240 preventUnmountingOnClose: false, 5241 payload: void 0, 5242 activeTriggerId: null, 5243 activeTriggerElement: null, 5244 openedWithoutTrigger: false, 5245 triggerIdProp: void 0, 5246 popupElement: null, 5247 positionerElement: null, 5248 activeTriggerProps: EMPTY_OBJECT, 5249 inactiveTriggerProps: EMPTY_OBJECT, 5250 popupProps: EMPTY_OBJECT 5251 }; 5252 } 5253 var activeTriggerIdSelector = (state) => state.triggerIdProp ?? state.activeTriggerId; 5254 var openSelector = (state) => state.openProp ?? state.open; 5255 var popupIdSelector = (state) => { 5256 const popupId = state.popupElement?.id ?? state.floatingId; 5257 return popupId || void 0; 5258 }; 5259 function triggerOwnsOpenPopup(state, triggerId) { 5260 return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) === triggerId; 5261 } 5262 function triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) { 5263 if (triggerOwnsOpenPopup(state, triggerId)) { 5264 return true; 5265 } 5266 return triggerId !== void 0 && openSelector(state) && activeTriggerIdSelector(state) == null && !state.openedWithoutTrigger && state.triggerCount === 1; 5267 } 5268 var popupStoreSelectors = { 5269 open: openSelector, 5270 mounted: (state) => state.mounted, 5271 // `open` is written synchronously on an open change; `mounted`/`transitionStatus` sync in a 5272 // layout effect. Match useTransitionStatus so a retained popup does not miss its starting phase. 5273 transitionStatus: (state) => openSelector(state) && !state.mounted ? "starting" : state.transitionStatus, 5274 floatingRootContext: (state) => state.floatingRootContext, 5275 triggerCount: (state) => state.triggerCount, 5276 preventUnmountingOnClose: (state) => state.preventUnmountingOnClose, 5277 payload: (state) => state.payload, 5278 activeTriggerId: activeTriggerIdSelector, 5279 activeTriggerElement: (state) => state.mounted ? state.activeTriggerElement : null, 5280 popupId: popupIdSelector, 5281 /** 5282 * Whether the trigger with the given ID was used to open the popup. 5283 */ 5284 isTriggerActive: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId, 5285 /** 5286 * Whether the popup is open and was activated by a trigger with the given ID. 5287 */ 5288 isOpenedByTrigger: (state, triggerId) => triggerOwnsOpenPopup(state, triggerId), 5289 /** 5290 * Whether the popup is mounted and was activated by a trigger with the given ID. 5291 */ 5292 isMountedByTrigger: (state, triggerId) => triggerId !== void 0 && activeTriggerIdSelector(state) === triggerId && state.mounted, 5293 triggerProps: (state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps, 5294 /** 5295 * Popup id for the trigger that currently owns the open popup. 5296 */ 5297 triggerPopupId: (state, triggerId) => triggerOwnsOpenPopupOrIsOnlyTrigger(state, triggerId) ? popupIdSelector(state) : void 0, 5298 popupProps: (state) => state.popupProps, 5299 popupElement: (state) => state.popupElement, 5300 positionerElement: (state) => state.positionerElement 5301 }; 5302 5303 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/popups/usePopupHandleStore.mjs 5304 var React30 = __toESM(require_react(), 1); 5305 var import_shim2 = __toESM(require_shim(), 1); 5306 function usePopupHandleStore(handle) { 5307 const subscribe = React30.useCallback((listener) => { 5308 if (handle === void 0) { 5309 return NOOP; 5310 } 5311 return handle.subscribeStore(listener); 5312 }, [handle]); 5313 const getSnapshot = React30.useCallback(() => { 5314 return handle === void 0 ? void 0 : handle.store; 5315 }, [handle]); 5316 return (0, import_shim2.useSyncExternalStore)(subscribe, getSnapshot, () => handle?.serverStore); 5317 } 5318 5319 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useFocus.mjs 5320 var React31 = __toESM(require_react(), 1); 5321 var isMacSafari = parts_exports.os.mac && parts_exports.engine.webkit; 5322 function useFocus(store2, props = {}) { 5323 const { 5324 enabled = true, 5325 delay 5326 } = props; 5327 const { 5328 events, 5329 dataRef 5330 } = store2.context; 5331 const blockFocusRef = React31.useRef(false); 5332 const blockedReferenceRef = React31.useRef(null); 5333 const keyboardModalityRef = React31.useRef(true); 5334 const timeout = useTimeout(); 5335 React31.useEffect(() => { 5336 const domReference = store2.select("domReferenceElement"); 5337 if (!enabled) { 5338 return void 0; 5339 } 5340 const win = getWindow(domReference); 5341 function onBlur() { 5342 const currentDomReference = store2.select("domReferenceElement"); 5343 if (!store2.select("open") && isHTMLElement(currentDomReference) && currentDomReference === activeElement(ownerDocument(currentDomReference))) { 5344 blockFocusRef.current = true; 5345 blockedReferenceRef.current = currentDomReference; 5346 } 5347 } 5348 function onKeyDown() { 5349 keyboardModalityRef.current = true; 5350 } 5351 function onPointerDown() { 5352 keyboardModalityRef.current = false; 5353 } 5354 return mergeCleanups(addEventListener(win, "blur", onBlur), isMacSafari && addEventListener(win, "keydown", onKeyDown, true), isMacSafari && addEventListener(win, "pointerdown", onPointerDown, true)); 5355 }, [store2, enabled]); 5356 React31.useEffect(() => { 5357 if (!enabled) { 5358 return void 0; 5359 } 5360 function onOpenChangeLocal(details) { 5361 if (details.reason === reason_parts_exports.triggerPress || details.reason === reason_parts_exports.escapeKey) { 5362 const referenceElement = store2.select("domReferenceElement"); 5363 if (isElement(referenceElement)) { 5364 blockedReferenceRef.current = referenceElement; 5365 blockFocusRef.current = true; 5366 } 5367 } 5368 } 5369 events.on("openchange", onOpenChangeLocal); 5370 return () => { 5371 events.off("openchange", onOpenChangeLocal); 5372 }; 5373 }, [events, enabled, store2]); 5374 const reference = React31.useMemo(() => { 5375 function resetBlockedFocus() { 5376 blockFocusRef.current = false; 5377 blockedReferenceRef.current = null; 5378 } 5379 return { 5380 onMouseLeave() { 5381 resetBlockedFocus(); 5382 }, 5383 onFocus(event) { 5384 const focusTarget = event.currentTarget; 5385 if (blockFocusRef.current) { 5386 if (blockedReferenceRef.current === focusTarget) { 5387 return; 5388 } 5389 resetBlockedFocus(); 5390 } 5391 const target = getTarget(event.nativeEvent); 5392 if (isElement(target)) { 5393 if (isMacSafari && !event.relatedTarget) { 5394 if (!keyboardModalityRef.current && !isTypeableElement(target)) { 5395 return; 5396 } 5397 } else if (!matchesFocusVisible(target)) { 5398 return; 5399 } 5400 } 5401 const movedFromOtherEnabledTrigger = isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements); 5402 const { 5403 nativeEvent, 5404 currentTarget 5405 } = event; 5406 if (store2.select("open") && movedFromOtherEnabledTrigger || !delay) { 5407 store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget)); 5408 return; 5409 } 5410 timeout.start(delay, () => { 5411 if (blockFocusRef.current) { 5412 return; 5413 } 5414 store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent, currentTarget)); 5415 }); 5416 }, 5417 onBlur(event) { 5418 resetBlockedFocus(); 5419 const relatedTarget = event.relatedTarget; 5420 const nativeEvent = event.nativeEvent; 5421 const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute("focus-guard")) && relatedTarget.getAttribute("data-type") === "outside"; 5422 timeout.start(0, () => { 5423 const domReference = store2.select("domReferenceElement"); 5424 const activeEl = activeElement(ownerDocument(domReference)); 5425 if (!relatedTarget && activeEl === domReference) { 5426 return; 5427 } 5428 if (contains(dataRef.current.floatingContext?.refs.floating.current, activeEl) || contains(domReference, activeEl) || movedToFocusGuard) { 5429 return; 5430 } 5431 const nextFocusedElement = relatedTarget ?? activeEl; 5432 if (isTargetInsideEnabledTrigger(nextFocusedElement, store2.context.triggerElements)) { 5433 return; 5434 } 5435 store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerFocus, nativeEvent)); 5436 }); 5437 } 5438 }; 5439 }, [dataRef, delay, store2, timeout]); 5440 return React31.useMemo(() => enabled ? { 5441 reference, 5442 trigger: reference 5443 } : {}, [enabled, reference]); 5444 } 5445 5446 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs 5447 var React32 = __toESM(require_react(), 1); 5448 5449 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useHoverInteractionSharedState.mjs 5450 var HoverInteraction = class _HoverInteraction { 5451 pointerType = void 0; 5452 interactedInside = false; 5453 handler = void 0; 5454 blockMouseMove = true; 5455 performedPointerEventsMutation = false; 5456 pointerEventsScopeElement = null; 5457 pointerEventsReferenceElement = null; 5458 pointerEventsFloatingElement = null; 5459 restTimeoutPending = false; 5460 openChangeTimeout = new Timeout(); 5461 restTimeout = new Timeout(); 5462 handleCloseOptions = void 0; 5463 static create() { 5464 return new _HoverInteraction(); 5465 } 5466 dispose = () => { 5467 this.openChangeTimeout.clear(); 5468 this.restTimeout.clear(); 5469 }; 5470 disposeEffect = () => { 5471 return this.dispose; 5472 }; 5473 }; 5474 var pointerEventsMutationOwnerByScopeElement = /* @__PURE__ */ new WeakMap(); 5475 function clearSafePolygonPointerEventsMutation(instance) { 5476 if (!instance.performedPointerEventsMutation) { 5477 return; 5478 } 5479 const scopeElement = instance.pointerEventsScopeElement; 5480 if (scopeElement && pointerEventsMutationOwnerByScopeElement.get(scopeElement) === instance) { 5481 instance.pointerEventsScopeElement?.style.removeProperty("pointer-events"); 5482 instance.pointerEventsReferenceElement?.style.removeProperty("pointer-events"); 5483 instance.pointerEventsFloatingElement?.style.removeProperty("pointer-events"); 5484 pointerEventsMutationOwnerByScopeElement.delete(scopeElement); 5485 } 5486 instance.performedPointerEventsMutation = false; 5487 instance.pointerEventsScopeElement = null; 5488 instance.pointerEventsReferenceElement = null; 5489 instance.pointerEventsFloatingElement = null; 5490 } 5491 function applySafePolygonPointerEventsMutation(instance, options) { 5492 const { 5493 scopeElement, 5494 referenceElement, 5495 floatingElement 5496 } = options; 5497 const existingOwner = pointerEventsMutationOwnerByScopeElement.get(scopeElement); 5498 if (existingOwner && existingOwner !== instance) { 5499 clearSafePolygonPointerEventsMutation(existingOwner); 5500 } 5501 clearSafePolygonPointerEventsMutation(instance); 5502 instance.performedPointerEventsMutation = true; 5503 instance.pointerEventsScopeElement = scopeElement; 5504 instance.pointerEventsReferenceElement = referenceElement; 5505 instance.pointerEventsFloatingElement = floatingElement; 5506 pointerEventsMutationOwnerByScopeElement.set(scopeElement, instance); 5507 scopeElement.style.pointerEvents = "none"; 5508 referenceElement.style.pointerEvents = "auto"; 5509 floatingElement.style.pointerEvents = "auto"; 5510 } 5511 function useHoverInteractionSharedState(store2) { 5512 const data = store2.context.dataRef.current; 5513 const instance = useRefWithInit(() => data.hoverInteractionState ?? HoverInteraction.create()).current; 5514 if (!data.hoverInteractionState) { 5515 data.hoverInteractionState = instance; 5516 } 5517 useOnMount(data.hoverInteractionState.disposeEffect); 5518 return data.hoverInteractionState; 5519 } 5520 5521 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useHoverFloatingInteraction.mjs 5522 function useHoverFloatingInteraction(store2, parameters = {}) { 5523 const { 5524 enabled = true, 5525 closeDelay: closeDelayProp = 0, 5526 nodeId: nodeIdProp 5527 } = parameters; 5528 const open3 = store2.useState("open"); 5529 const floatingElement = store2.useState("floatingElement"); 5530 const domReferenceElement = store2.useState("domReferenceElement"); 5531 const { 5532 dataRef 5533 } = store2.context; 5534 const tree = useFloatingTree(); 5535 const parentId = useFloatingParentNodeId(); 5536 const instance = useHoverInteractionSharedState(store2); 5537 const childClosedTimeout = useTimeout(); 5538 const isClickLikeOpenEvent2 = useStableCallback(() => { 5539 return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside); 5540 }); 5541 const isHoverOpen = useStableCallback(() => { 5542 return isHoverOpenEvent(dataRef.current.openEvent?.type); 5543 }); 5544 const clearPointerEvents = useStableCallback(() => { 5545 clearSafePolygonPointerEventsMutation(instance); 5546 }); 5547 useIsoLayoutEffect(() => { 5548 if (!open3) { 5549 instance.pointerType = void 0; 5550 instance.restTimeoutPending = false; 5551 instance.interactedInside = false; 5552 clearPointerEvents(); 5553 } 5554 }, [open3, instance, clearPointerEvents]); 5555 React32.useEffect(() => { 5556 return clearPointerEvents; 5557 }, [clearPointerEvents]); 5558 useIsoLayoutEffect(() => { 5559 if (!enabled) { 5560 return void 0; 5561 } 5562 if (open3 && instance.handleCloseOptions?.blockPointerEvents && isHoverOpen() && isElement(domReferenceElement) && floatingElement) { 5563 const ref = domReferenceElement; 5564 const floatingEl = floatingElement; 5565 const doc = ownerDocument(floatingElement); 5566 const parentFloating = tree?.nodesRef.current.find((node) => node.id === parentId)?.context?.elements.floating; 5567 if (parentFloating) { 5568 parentFloating.style.pointerEvents = ""; 5569 } 5570 const cachedScopeElement = instance.pointerEventsScopeElement !== floatingEl ? instance.pointerEventsScopeElement : null; 5571 const parentScopeElement = parentFloating !== floatingEl ? parentFloating : null; 5572 const scopeElement = instance.handleCloseOptions?.getScope?.() ?? cachedScopeElement ?? parentScopeElement ?? closest(ref, "[data-rootownerid]") ?? doc.body; 5573 applySafePolygonPointerEventsMutation(instance, { 5574 scopeElement, 5575 referenceElement: ref, 5576 floatingElement: floatingEl 5577 }); 5578 return () => { 5579 clearPointerEvents(); 5580 }; 5581 } 5582 return void 0; 5583 }, [enabled, open3, domReferenceElement, floatingElement, instance, isHoverOpen, tree, parentId, clearPointerEvents]); 5584 React32.useEffect(() => { 5585 if (!enabled) { 5586 return void 0; 5587 } 5588 function hasParentChildren() { 5589 return !!(tree && parentId && getNodeChildren(tree.nodesRef.current, parentId).length > 0); 5590 } 5591 function closeWithDelay(event) { 5592 const closeDelay = getDelay(closeDelayProp, "close", instance.pointerType); 5593 const close = () => { 5594 store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event)); 5595 tree?.events.emit("floating.closed", event); 5596 }; 5597 if (closeDelay) { 5598 instance.openChangeTimeout.start(closeDelay, close); 5599 } else { 5600 instance.openChangeTimeout.clear(); 5601 close(); 5602 } 5603 } 5604 function handleInteractInside(event) { 5605 const target = getTarget(event); 5606 if (!isInteractiveElement(target)) { 5607 instance.interactedInside = false; 5608 return; 5609 } 5610 instance.interactedInside = closest(target, "[aria-haspopup]") != null; 5611 } 5612 function onFloatingMouseEnter() { 5613 instance.openChangeTimeout.clear(); 5614 childClosedTimeout.clear(); 5615 tree?.events.off("floating.closed", onNodeClosed); 5616 clearPointerEvents(); 5617 } 5618 function onFloatingMouseLeave(event) { 5619 if (hasParentChildren() && tree) { 5620 tree.events.on("floating.closed", onNodeClosed); 5621 return; 5622 } 5623 if (isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements)) { 5624 return; 5625 } 5626 const currentNodeId = dataRef.current.floatingContext?.nodeId ?? nodeIdProp; 5627 const relatedTarget = event.relatedTarget; 5628 const isMovingIntoDescendantFloating = tree && currentNodeId && isElement(relatedTarget) && getNodeChildren(tree.nodesRef.current, currentNodeId, false).some((node) => contains(node.context?.elements.floating, relatedTarget)); 5629 if (isMovingIntoDescendantFloating) { 5630 return; 5631 } 5632 if (instance.handler) { 5633 instance.handler(event); 5634 return; 5635 } 5636 clearPointerEvents(); 5637 if (isHoverOpen() && !isClickLikeOpenEvent2()) { 5638 closeWithDelay(event); 5639 } 5640 } 5641 function onNodeClosed(event) { 5642 if (!tree || !parentId || hasParentChildren()) { 5643 return; 5644 } 5645 childClosedTimeout.start(0, () => { 5646 tree.events.off("floating.closed", onNodeClosed); 5647 store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event)); 5648 tree.events.emit("floating.closed", event); 5649 }); 5650 } 5651 const floating = floatingElement; 5652 return mergeCleanups(floating && addEventListener(floating, "mouseenter", onFloatingMouseEnter), floating && addEventListener(floating, "mouseleave", onFloatingMouseLeave), floating && addEventListener(floating, "pointerdown", handleInteractInside, true), () => { 5653 tree?.events.off("floating.closed", onNodeClosed); 5654 }); 5655 }, [enabled, floatingElement, store2, dataRef, closeDelayProp, nodeIdProp, isHoverOpen, isClickLikeOpenEvent2, clearPointerEvents, instance, tree, parentId, childClosedTimeout]); 5656 } 5657 5658 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useHoverReferenceInteraction.mjs 5659 var React33 = __toESM(require_react(), 1); 5660 var ReactDOM4 = __toESM(require_react_dom(), 1); 5661 var EMPTY_REF = { 5662 current: null 5663 }; 5664 function useHoverReferenceInteraction(store2, props = {}) { 5665 const { 5666 enabled = true, 5667 delay = 0, 5668 handleClose = null, 5669 mouseOnly = false, 5670 restMs = 0, 5671 move = true, 5672 triggerElementRef = EMPTY_REF, 5673 externalTree, 5674 isActiveTrigger = true, 5675 getHandleCloseContext, 5676 isClosing, 5677 shouldOpen: shouldOpenProp, 5678 guardStaleOpen = false 5679 } = props; 5680 const { 5681 dataRef, 5682 events 5683 } = store2.context; 5684 const tree = useFloatingTree(externalTree); 5685 const instance = useHoverInteractionSharedState(store2); 5686 const isHoverCloseActiveRef = React33.useRef(false); 5687 const handleCloseRef = useValueAsRef(handleClose); 5688 const delayRef = useValueAsRef(delay); 5689 const restMsRef = useValueAsRef(restMs); 5690 const enabledRef = useValueAsRef(enabled); 5691 const shouldOpenRef = useValueAsRef(shouldOpenProp); 5692 const isClosingRef = useValueAsRef(isClosing); 5693 const isClickLikeOpenEvent2 = useStableCallback(() => { 5694 return isClickLikeOpenEvent(dataRef.current.openEvent?.type, instance.interactedInside); 5695 }); 5696 const checkShouldOpen = useStableCallback(() => { 5697 return shouldOpenRef.current?.() !== false; 5698 }); 5699 const isOverInactiveTrigger = useStableCallback((currentDomReference, currentTarget, target) => { 5700 const allTriggers = store2.context.triggerElements; 5701 if (allTriggers.hasElement(currentTarget)) { 5702 return !currentDomReference || !contains(currentDomReference, currentTarget); 5703 } 5704 if (!isElement(target)) { 5705 return false; 5706 } 5707 const targetElement = target; 5708 return allTriggers.hasMatchingElement((trigger) => contains(trigger, targetElement)) && (!currentDomReference || !contains(currentDomReference, targetElement)); 5709 }); 5710 const cleanupMouseMoveHandler = useStableCallback(() => { 5711 if (!instance.handler) { 5712 return; 5713 } 5714 const doc = ownerDocument(store2.select("domReferenceElement")); 5715 doc.removeEventListener("mousemove", instance.handler); 5716 instance.handler = void 0; 5717 }); 5718 const clearPointerEvents = useStableCallback(() => { 5719 clearSafePolygonPointerEventsMutation(instance); 5720 }); 5721 if (isActiveTrigger) { 5722 instance.handleCloseOptions = handleClose?.__options; 5723 } 5724 React33.useEffect(() => cleanupMouseMoveHandler, [cleanupMouseMoveHandler]); 5725 React33.useEffect(() => { 5726 if (!enabled) { 5727 return void 0; 5728 } 5729 function onOpenChangeLocal(details) { 5730 if (!details.open) { 5731 isHoverCloseActiveRef.current = details.reason === reason_parts_exports.triggerHover; 5732 cleanupMouseMoveHandler(); 5733 instance.openChangeTimeout.clear(); 5734 instance.restTimeout.clear(); 5735 instance.blockMouseMove = true; 5736 instance.restTimeoutPending = false; 5737 } else { 5738 isHoverCloseActiveRef.current = false; 5739 } 5740 } 5741 events.on("openchange", onOpenChangeLocal); 5742 return () => { 5743 events.off("openchange", onOpenChangeLocal); 5744 }; 5745 }, [enabled, events, instance, cleanupMouseMoveHandler]); 5746 React33.useEffect(() => { 5747 if (!enabled) { 5748 return void 0; 5749 } 5750 function closeWithDelay(event, runElseBranch = true) { 5751 const closeDelay = getDelay(delayRef.current, "close", instance.pointerType); 5752 if (closeDelay) { 5753 instance.openChangeTimeout.start(closeDelay, () => { 5754 store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event)); 5755 tree?.events.emit("floating.closed", event); 5756 }); 5757 } else if (runElseBranch) { 5758 instance.openChangeTimeout.clear(); 5759 store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event)); 5760 tree?.events.emit("floating.closed", event); 5761 } 5762 } 5763 const trigger = triggerElementRef.current ?? (isActiveTrigger ? store2.select("domReferenceElement") : null); 5764 if (!isElement(trigger)) { 5765 return void 0; 5766 } 5767 function onMouseEnter(event) { 5768 instance.openChangeTimeout.clear(); 5769 instance.blockMouseMove = false; 5770 if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) { 5771 return; 5772 } 5773 const restMsValue = getRestMs(restMsRef.current); 5774 const openDelay = getDelay(delayRef.current, "open", instance.pointerType); 5775 const eventTarget = getTarget(event); 5776 const currentTarget = event.currentTarget ?? null; 5777 const currentDomReference = store2.select("domReferenceElement"); 5778 let triggerNode = currentTarget; 5779 if (isElement(eventTarget) && !store2.context.triggerElements.hasElement(eventTarget)) { 5780 for (const triggerElement of store2.context.triggerElements.elements()) { 5781 if (contains(triggerElement, eventTarget)) { 5782 triggerNode = triggerElement; 5783 break; 5784 } 5785 } 5786 } 5787 if (isElement(currentTarget) && isElement(currentDomReference) && !store2.context.triggerElements.hasElement(currentTarget) && contains(currentTarget, currentDomReference)) { 5788 triggerNode = currentDomReference; 5789 } 5790 const isOverInactive = triggerNode == null ? false : isOverInactiveTrigger(currentDomReference, triggerNode, eventTarget); 5791 const isOpen = store2.select("open"); 5792 const isInClosingTransition = isClosingRef.current?.() ?? store2.select("transitionStatus") === "ending"; 5793 const isHoverCloseTransition = !isOpen && isInClosingTransition && isHoverCloseActiveRef.current; 5794 const isReenteringSameTriggerDuringCloseTransition = !isOverInactive && isElement(triggerNode) && isElement(currentDomReference) && contains(currentDomReference, triggerNode) && isHoverCloseTransition; 5795 const isRestOnlyDelay = restMsValue > 0 && !openDelay; 5796 const shouldOpenImmediately = isOverInactive && (isOpen || isHoverCloseTransition) || isReenteringSameTriggerDuringCloseTransition; 5797 const shouldOpen = !isOpen || isOverInactive; 5798 if (shouldOpenImmediately) { 5799 if (checkShouldOpen()) { 5800 store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode)); 5801 } 5802 return; 5803 } 5804 if (isRestOnlyDelay) { 5805 return; 5806 } 5807 if (openDelay) { 5808 instance.openChangeTimeout.start(openDelay, () => { 5809 if (shouldOpen && checkShouldOpen()) { 5810 store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode)); 5811 } 5812 }); 5813 } else if (shouldOpen) { 5814 if (checkShouldOpen()) { 5815 store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerNode)); 5816 } 5817 } 5818 } 5819 function onMouseLeave(event) { 5820 if (isClickLikeOpenEvent2()) { 5821 clearPointerEvents(); 5822 return; 5823 } 5824 cleanupMouseMoveHandler(); 5825 const domReferenceElement = store2.select("domReferenceElement"); 5826 const doc = ownerDocument(domReferenceElement); 5827 instance.restTimeout.clear(); 5828 instance.restTimeoutPending = false; 5829 const handleCloseContextBase = dataRef.current.floatingContext ?? getHandleCloseContext?.(); 5830 if (isTargetInsideEnabledTrigger(event.relatedTarget, store2.context.triggerElements)) { 5831 return; 5832 } 5833 if (handleCloseRef.current && handleCloseContextBase) { 5834 if (!store2.select("open")) { 5835 instance.openChangeTimeout.clear(); 5836 } 5837 const currentTrigger = triggerElementRef.current; 5838 instance.handler = handleCloseRef.current({ 5839 ...handleCloseContextBase, 5840 tree, 5841 x: event.clientX, 5842 y: event.clientY, 5843 onClose() { 5844 clearPointerEvents(); 5845 cleanupMouseMoveHandler(); 5846 if (enabledRef.current && !isClickLikeOpenEvent2() && currentTrigger === store2.select("domReferenceElement")) { 5847 closeWithDelay(event, true); 5848 } 5849 } 5850 }); 5851 doc.addEventListener("mousemove", instance.handler); 5852 instance.handler(event); 5853 return; 5854 } 5855 const shouldClose = instance.pointerType === "touch" ? !contains(store2.select("floatingElement"), event.relatedTarget) : true; 5856 if (shouldClose) { 5857 closeWithDelay(event); 5858 } 5859 } 5860 function onMouseOut(event) { 5861 if (contains(trigger, event.relatedTarget)) { 5862 return; 5863 } 5864 instance.openChangeTimeout.clear(); 5865 instance.restTimeout.clear(); 5866 instance.restTimeoutPending = false; 5867 } 5868 const staleOpenGuard = guardStaleOpen ? addEventListener(trigger, "mouseout", onMouseOut) : void 0; 5869 if (move) { 5870 return mergeCleanups(addEventListener(trigger, "mousemove", onMouseEnter, { 5871 once: true 5872 }), addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard); 5873 } 5874 return mergeCleanups(addEventListener(trigger, "mouseenter", onMouseEnter), addEventListener(trigger, "mouseleave", onMouseLeave), staleOpenGuard); 5875 }, [cleanupMouseMoveHandler, clearPointerEvents, dataRef, delayRef, store2, enabled, handleCloseRef, instance, isActiveTrigger, isOverInactiveTrigger, isClickLikeOpenEvent2, mouseOnly, move, restMsRef, triggerElementRef, tree, enabledRef, getHandleCloseContext, isClosingRef, checkShouldOpen, guardStaleOpen]); 5876 return React33.useMemo(() => { 5877 if (!enabled) { 5878 return void 0; 5879 } 5880 function setPointerRef(event) { 5881 instance.pointerType = event.pointerType; 5882 } 5883 return { 5884 onPointerDown: setPointerRef, 5885 onPointerEnter: setPointerRef, 5886 onMouseMove(event) { 5887 const { 5888 nativeEvent 5889 } = event; 5890 const trigger = event.currentTarget; 5891 const currentDomReference = store2.select("domReferenceElement"); 5892 const currentOpen = store2.select("open"); 5893 const isOverInactive = isOverInactiveTrigger(currentDomReference, trigger, event.target); 5894 if (mouseOnly && !isMouseLikePointerType(instance.pointerType)) { 5895 return; 5896 } 5897 if (currentOpen && isOverInactive && instance.handleCloseOptions?.blockPointerEvents) { 5898 const floatingElement = store2.select("floatingElement"); 5899 if (floatingElement) { 5900 const scopeElement = instance.handleCloseOptions?.getScope?.() ?? trigger.ownerDocument.body; 5901 applySafePolygonPointerEventsMutation(instance, { 5902 scopeElement, 5903 referenceElement: trigger, 5904 floatingElement 5905 }); 5906 } 5907 } 5908 const restMsValue = getRestMs(restMsRef.current); 5909 if (currentOpen && !isOverInactive || restMsValue === 0) { 5910 return; 5911 } 5912 if (!isOverInactive && instance.restTimeoutPending && event.movementX ** 2 + event.movementY ** 2 < 2) { 5913 return; 5914 } 5915 instance.restTimeout.clear(); 5916 function handleMouseMove() { 5917 instance.restTimeoutPending = false; 5918 if (isClickLikeOpenEvent2()) { 5919 return; 5920 } 5921 const latestOpen = store2.select("open"); 5922 if (!instance.blockMouseMove && (!latestOpen || isOverInactive) && checkShouldOpen()) { 5923 store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, nativeEvent, trigger)); 5924 } 5925 } 5926 if (instance.pointerType === "touch") { 5927 ReactDOM4.flushSync(() => { 5928 handleMouseMove(); 5929 }); 5930 } else if (isOverInactive && currentOpen) { 5931 handleMouseMove(); 5932 } else { 5933 instance.restTimeoutPending = true; 5934 instance.restTimeout.start(restMsValue, handleMouseMove); 5935 } 5936 } 5937 }; 5938 }, [enabled, instance, isClickLikeOpenEvent2, isOverInactiveTrigger, mouseOnly, store2, restMsRef, checkShouldOpen]); 5939 } 5940 5941 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/safePolygon.mjs 5942 var CURSOR_SPEED_THRESHOLD = 0.1; 5943 var CURSOR_SPEED_THRESHOLD_SQUARED = CURSOR_SPEED_THRESHOLD * CURSOR_SPEED_THRESHOLD; 5944 var POLYGON_BUFFER = 0.5; 5945 function hasIntersectingEdge(pointX, pointY, xi, yi, xj, yj) { 5946 return yi >= pointY !== yj >= pointY && pointX <= (xj - xi) * (pointY - yi) / (yj - yi) + xi; 5947 } 5948 function isPointInQuadrilateral(pointX, pointY, x1, y1, x2, y2, x3, y3, x4, y4) { 5949 let isInsideValue = false; 5950 if (hasIntersectingEdge(pointX, pointY, x1, y1, x2, y2)) { 5951 isInsideValue = !isInsideValue; 5952 } 5953 if (hasIntersectingEdge(pointX, pointY, x2, y2, x3, y3)) { 5954 isInsideValue = !isInsideValue; 5955 } 5956 if (hasIntersectingEdge(pointX, pointY, x3, y3, x4, y4)) { 5957 isInsideValue = !isInsideValue; 5958 } 5959 if (hasIntersectingEdge(pointX, pointY, x4, y4, x1, y1)) { 5960 isInsideValue = !isInsideValue; 5961 } 5962 return isInsideValue; 5963 } 5964 function isInsideRect(pointX, pointY, rect) { 5965 return pointX >= rect.x && pointX <= rect.x + rect.width && pointY >= rect.y && pointY <= rect.y + rect.height; 5966 } 5967 function isInsideAxisAlignedRect(pointX, pointY, x1, y1, x2, y2) { 5968 const minX = Math.min(x1, x2); 5969 const maxX = Math.max(x1, x2); 5970 const minY = Math.min(y1, y2); 5971 const maxY = Math.max(y1, y2); 5972 return pointX >= minX && pointX <= maxX && pointY >= minY && pointY <= maxY; 5973 } 5974 function safePolygon(options = {}) { 5975 const { 5976 blockPointerEvents = false 5977 } = options; 5978 const timeout = new Timeout(); 5979 const fn = ({ 5980 x, 5981 y, 5982 placement, 5983 elements, 5984 onClose, 5985 nodeId, 5986 tree 5987 }) => { 5988 const side = placement?.split("-")[0]; 5989 let hasLanded = false; 5990 let lastX = null; 5991 let lastY = null; 5992 let lastCursorTime = typeof performance !== "undefined" ? performance.now() : 0; 5993 function isCursorMovingSlowly(nextX, nextY) { 5994 const currentTime = performance.now(); 5995 const elapsedTime = currentTime - lastCursorTime; 5996 if (lastX === null || lastY === null || elapsedTime === 0) { 5997 lastX = nextX; 5998 lastY = nextY; 5999 lastCursorTime = currentTime; 6000 return false; 6001 } 6002 const deltaX = nextX - lastX; 6003 const deltaY = nextY - lastY; 6004 const distanceSquared = deltaX * deltaX + deltaY * deltaY; 6005 const thresholdSquared = elapsedTime * elapsedTime * CURSOR_SPEED_THRESHOLD_SQUARED; 6006 lastX = nextX; 6007 lastY = nextY; 6008 lastCursorTime = currentTime; 6009 return distanceSquared < thresholdSquared; 6010 } 6011 function close() { 6012 timeout.clear(); 6013 onClose(); 6014 } 6015 return function onMouseMove(event) { 6016 timeout.clear(); 6017 const domReference = elements.domReference; 6018 const floating = elements.floating; 6019 if (!domReference || !floating || side == null || x == null || y == null) { 6020 return void 0; 6021 } 6022 const { 6023 clientX, 6024 clientY 6025 } = event; 6026 const target = getTarget(event); 6027 const isLeave = event.type === "mouseleave"; 6028 const isOverFloatingEl = contains(floating, target); 6029 const isOverReferenceEl = contains(domReference, target); 6030 if (isOverFloatingEl) { 6031 hasLanded = true; 6032 if (!isLeave) { 6033 return void 0; 6034 } 6035 } 6036 if (isOverReferenceEl) { 6037 hasLanded = false; 6038 if (!isLeave) { 6039 hasLanded = true; 6040 return void 0; 6041 } 6042 } 6043 if (isLeave && isElement(event.relatedTarget) && contains(floating, event.relatedTarget)) { 6044 return void 0; 6045 } 6046 function hasOpenChildNode() { 6047 return Boolean(tree && getNodeChildren(tree.nodesRef.current, nodeId).length > 0); 6048 } 6049 function closeIfNoOpenChild() { 6050 if (!hasOpenChildNode()) { 6051 close(); 6052 } 6053 } 6054 if (hasOpenChildNode()) { 6055 return void 0; 6056 } 6057 const refRect = domReference.getBoundingClientRect(); 6058 const rect = floating.getBoundingClientRect(); 6059 const cursorLeaveFromRight = x > rect.right - rect.width / 2; 6060 const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2; 6061 const isFloatingWider = rect.width > refRect.width; 6062 const isFloatingTaller = rect.height > refRect.height; 6063 const left = (isFloatingWider ? refRect : rect).left; 6064 const right = (isFloatingWider ? refRect : rect).right; 6065 const top = (isFloatingTaller ? refRect : rect).top; 6066 const bottom = (isFloatingTaller ? refRect : rect).bottom; 6067 if (side === "top" && y >= refRect.bottom - 1 || side === "bottom" && y <= refRect.top + 1 || side === "left" && x >= refRect.right - 1 || side === "right" && x <= refRect.left + 1) { 6068 closeIfNoOpenChild(); 6069 return void 0; 6070 } 6071 let isInsideTroughRect = false; 6072 switch (side) { 6073 case "top": 6074 isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, refRect.top + 1, right, rect.bottom - 1); 6075 break; 6076 case "bottom": 6077 isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, left, rect.top + 1, right, refRect.bottom - 1); 6078 break; 6079 case "left": 6080 isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, rect.right - 1, bottom, refRect.left + 1, top); 6081 break; 6082 case "right": 6083 isInsideTroughRect = isInsideAxisAlignedRect(clientX, clientY, refRect.right - 1, bottom, rect.left + 1, top); 6084 break; 6085 default: 6086 } 6087 if (isInsideTroughRect) { 6088 return void 0; 6089 } 6090 if (hasLanded && !isInsideRect(clientX, clientY, refRect)) { 6091 closeIfNoOpenChild(); 6092 return void 0; 6093 } 6094 if (!isLeave && isCursorMovingSlowly(clientX, clientY)) { 6095 closeIfNoOpenChild(); 6096 return void 0; 6097 } 6098 let isInsidePolygon = false; 6099 switch (side) { 6100 case "top": { 6101 const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4; 6102 const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset; 6103 const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset; 6104 const cursorPointY = y + POLYGON_BUFFER + 1; 6105 const commonYLeft = cursorLeaveFromRight ? rect.bottom - POLYGON_BUFFER : isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top; 6106 const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.bottom - POLYGON_BUFFER : rect.top : rect.bottom - POLYGON_BUFFER; 6107 isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight); 6108 break; 6109 } 6110 case "bottom": { 6111 const cursorXOffset = isFloatingWider ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4; 6112 const cursorPointOneX = isFloatingWider ? x + cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset; 6113 const cursorPointTwoX = isFloatingWider ? x - cursorXOffset : cursorLeaveFromRight ? x + cursorXOffset : x - cursorXOffset; 6114 const cursorPointY = y - POLYGON_BUFFER; 6115 const commonYLeft = cursorLeaveFromRight ? rect.top + POLYGON_BUFFER : isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom; 6116 const commonYRight = cursorLeaveFromRight ? isFloatingWider ? rect.top + POLYGON_BUFFER : rect.bottom : rect.top + POLYGON_BUFFER; 6117 isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointOneX, cursorPointY, cursorPointTwoX, cursorPointY, rect.left, commonYLeft, rect.right, commonYRight); 6118 break; 6119 } 6120 case "left": { 6121 const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4; 6122 const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset; 6123 const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset; 6124 const cursorPointX = x + POLYGON_BUFFER + 1; 6125 const commonXTop = cursorLeaveFromBottom ? rect.right - POLYGON_BUFFER : isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left; 6126 const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.right - POLYGON_BUFFER : rect.left : rect.right - POLYGON_BUFFER; 6127 isInsidePolygon = isPointInQuadrilateral(clientX, clientY, commonXTop, rect.top, commonXBottom, rect.bottom, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY); 6128 break; 6129 } 6130 case "right": { 6131 const cursorYOffset = isFloatingTaller ? POLYGON_BUFFER / 2 : POLYGON_BUFFER * 4; 6132 const cursorPointOneY = isFloatingTaller ? y + cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset; 6133 const cursorPointTwoY = isFloatingTaller ? y - cursorYOffset : cursorLeaveFromBottom ? y + cursorYOffset : y - cursorYOffset; 6134 const cursorPointX = x - POLYGON_BUFFER; 6135 const commonXTop = cursorLeaveFromBottom ? rect.left + POLYGON_BUFFER : isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right; 6136 const commonXBottom = cursorLeaveFromBottom ? isFloatingTaller ? rect.left + POLYGON_BUFFER : rect.right : rect.left + POLYGON_BUFFER; 6137 isInsidePolygon = isPointInQuadrilateral(clientX, clientY, cursorPointX, cursorPointOneY, cursorPointX, cursorPointTwoY, commonXTop, rect.top, commonXBottom, rect.bottom); 6138 break; 6139 } 6140 default: 6141 } 6142 if (!isInsidePolygon) { 6143 closeIfNoOpenChild(); 6144 } else if (!hasLanded) { 6145 timeout.start(40, closeIfNoOpenChild); 6146 } 6147 return void 0; 6148 }; 6149 }; 6150 fn.__options = { 6151 ...options, 6152 blockPointerEvents 6153 }; 6154 return fn; 6155 } 6156 6157 // node_modules/.store/@floating-ui/core@1.8.0-3V8aS7jJHHGcsCINjP9-5A/node_modules/@floating-ui/core/dist/floating-ui.core.mjs 6158 function computeCoordsFromPlacement(_ref, placement, rtl) { 6159 let { 6160 reference, 6161 floating 6162 } = _ref; 6163 const sideAxis = getSideAxis(placement); 6164 const alignmentAxis = getAlignmentAxis(placement); 6165 const alignLength = getAxisLength(alignmentAxis); 6166 const side = getSide(placement); 6167 const isVertical = sideAxis === "y"; 6168 const commonX = reference.x + reference.width / 2 - floating.width / 2; 6169 const commonY = reference.y + reference.height / 2 - floating.height / 2; 6170 const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2; 6171 let coords; 6172 switch (side) { 6173 case "top": 6174 coords = { 6175 x: commonX, 6176 y: reference.y - floating.height 6177 }; 6178 break; 6179 case "bottom": 6180 coords = { 6181 x: commonX, 6182 y: reference.y + reference.height 6183 }; 6184 break; 6185 case "right": 6186 coords = { 6187 x: reference.x + reference.width, 6188 y: commonY 6189 }; 6190 break; 6191 case "left": 6192 coords = { 6193 x: reference.x - floating.width, 6194 y: commonY 6195 }; 6196 break; 6197 default: 6198 coords = { 6199 x: reference.x, 6200 y: reference.y 6201 }; 6202 } 6203 const alignment = getAlignment(placement); 6204 if (alignment) { 6205 coords[alignmentAxis] += commonAlign * (alignment === "end" ? 1 : -1) * (rtl && isVertical ? -1 : 1); 6206 } 6207 return coords; 6208 } 6209 async function detectOverflow(state, options) { 6210 var _await$platform$isEle; 6211 if (options === void 0) { 6212 options = {}; 6213 } 6214 const { 6215 x, 6216 y, 6217 platform: platform3, 6218 rects, 6219 elements, 6220 strategy 6221 } = state; 6222 const { 6223 boundary = "clippingAncestors", 6224 rootBoundary = "viewport", 6225 elementContext = "floating", 6226 altBoundary = false, 6227 padding = 0 6228 } = evaluate(options, state); 6229 const paddingObject = getPaddingObject(padding); 6230 const altContext = elementContext === "floating" ? "reference" : "floating"; 6231 const element = elements[altBoundary ? altContext : elementContext]; 6232 const clippingClientRect = rectToClientRect(await platform3.getClippingRect({ 6233 element: ((_await$platform$isEle = await (platform3.isElement == null ? void 0 : platform3.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform3.getDocumentElement == null ? void 0 : platform3.getDocumentElement(elements.floating)), 6234 boundary, 6235 rootBoundary, 6236 strategy 6237 })); 6238 const rect = elementContext === "floating" ? { 6239 x, 6240 y, 6241 width: rects.floating.width, 6242 height: rects.floating.height 6243 } : rects.reference; 6244 const offsetParent = await (platform3.getOffsetParent == null ? void 0 : platform3.getOffsetParent(elements.floating)); 6245 const offsetScale = await (platform3.isElement == null ? void 0 : platform3.isElement(offsetParent)) && await (platform3.getScale == null ? void 0 : platform3.getScale(offsetParent)) || { 6246 x: 1, 6247 y: 1 6248 }; 6249 const elementClientRect = rectToClientRect(platform3.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform3.convertOffsetParentRelativeRectToViewportRelativeRect({ 6250 elements, 6251 rect, 6252 offsetParent, 6253 strategy 6254 }) : rect); 6255 return { 6256 top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y, 6257 bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y, 6258 left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x, 6259 right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x 6260 }; 6261 } 6262 var MAX_RESET_COUNT = 50; 6263 var computePosition = async (reference, floating, config) => { 6264 const { 6265 placement = "bottom", 6266 strategy = "absolute", 6267 middleware = [], 6268 platform: platform3 6269 } = config; 6270 const platformWithDetectOverflow = platform3.detectOverflow ? platform3 : { 6271 ...platform3, 6272 detectOverflow 6273 }; 6274 const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(floating)); 6275 let rects = await platform3.getElementRects({ 6276 reference, 6277 floating, 6278 strategy 6279 }); 6280 let { 6281 x, 6282 y 6283 } = computeCoordsFromPlacement(rects, placement, rtl); 6284 let statefulPlacement = placement; 6285 let resetCount = 0; 6286 const middlewareData = {}; 6287 for (let i = 0; i < middleware.length; i++) { 6288 const currentMiddleware = middleware[i]; 6289 if (!currentMiddleware) { 6290 continue; 6291 } 6292 const { 6293 name, 6294 fn 6295 } = currentMiddleware; 6296 const { 6297 x: nextX, 6298 y: nextY, 6299 data, 6300 reset 6301 } = await fn({ 6302 x, 6303 y, 6304 initialPlacement: placement, 6305 placement: statefulPlacement, 6306 strategy, 6307 middlewareData, 6308 rects, 6309 platform: platformWithDetectOverflow, 6310 elements: { 6311 reference, 6312 floating 6313 } 6314 }); 6315 x = nextX != null ? nextX : x; 6316 y = nextY != null ? nextY : y; 6317 middlewareData[name] = { 6318 ...middlewareData[name], 6319 ...data 6320 }; 6321 if (reset && resetCount < MAX_RESET_COUNT) { 6322 resetCount++; 6323 if (typeof reset === "object") { 6324 if (reset.placement) { 6325 statefulPlacement = reset.placement; 6326 } 6327 if (reset.rects) { 6328 rects = reset.rects === true ? await platform3.getElementRects({ 6329 reference, 6330 floating, 6331 strategy 6332 }) : reset.rects; 6333 } 6334 ({ 6335 x, 6336 y 6337 } = computeCoordsFromPlacement(rects, statefulPlacement, rtl)); 6338 } 6339 i = -1; 6340 } 6341 } 6342 return { 6343 x, 6344 y, 6345 placement: statefulPlacement, 6346 strategy, 6347 middlewareData 6348 }; 6349 }; 6350 var flip = function(options) { 6351 if (options === void 0) { 6352 options = {}; 6353 } 6354 return { 6355 name: "flip", 6356 options, 6357 async fn(state) { 6358 var _middlewareData$arrow, _middlewareData$flip; 6359 const { 6360 placement, 6361 middlewareData, 6362 rects, 6363 initialPlacement, 6364 platform: platform3, 6365 elements 6366 } = state; 6367 const { 6368 mainAxis: checkMainAxis = true, 6369 crossAxis: checkCrossAxis = true, 6370 fallbackPlacements: specifiedFallbackPlacements, 6371 fallbackStrategy = "bestFit", 6372 fallbackAxisSideDirection = "none", 6373 flipAlignment = true, 6374 ...detectOverflowOptions 6375 } = evaluate(options, state); 6376 if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { 6377 return {}; 6378 } 6379 const side = getSide(placement); 6380 const initialSideAxis = getSideAxis(initialPlacement); 6381 const isBasePlacement = getSide(initialPlacement) === initialPlacement; 6382 const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating)); 6383 const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement)); 6384 const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none"; 6385 if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) { 6386 fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl)); 6387 } 6388 const placements2 = [initialPlacement, ...fallbackPlacements]; 6389 const overflow = await platform3.detectOverflow(state, detectOverflowOptions); 6390 const overflows = []; 6391 let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || []; 6392 if (checkMainAxis) { 6393 overflows.push(overflow[side]); 6394 } 6395 if (checkCrossAxis) { 6396 const sides2 = getAlignmentSides(placement, rects, rtl); 6397 overflows.push(overflow[sides2[0]], overflow[sides2[1]]); 6398 } 6399 overflowsData = [...overflowsData, { 6400 placement, 6401 overflows 6402 }]; 6403 if (!overflows.every((side2) => side2 <= 0)) { 6404 var _middlewareData$flip2, _overflowsData$filter; 6405 const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1; 6406 const nextPlacement = placements2[nextIndex]; 6407 if (nextPlacement) { 6408 const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false; 6409 if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis 6410 // overflows the main axis. 6411 overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) { 6412 return { 6413 data: { 6414 index: nextIndex, 6415 overflows: overflowsData 6416 }, 6417 reset: { 6418 placement: nextPlacement 6419 } 6420 }; 6421 } 6422 } 6423 let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement; 6424 if (!resetPlacement) { 6425 switch (fallbackStrategy) { 6426 case "bestFit": { 6427 var _overflowsData$filter2; 6428 const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => { 6429 if (hasFallbackAxisSideDirection) { 6430 const currentSideAxis = getSideAxis(d.placement); 6431 return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal 6432 // reading directions favoring greater width. 6433 currentSideAxis === "y"; 6434 } 6435 return true; 6436 }).map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0]; 6437 if (placement2) { 6438 resetPlacement = placement2; 6439 } 6440 break; 6441 } 6442 case "initialPlacement": 6443 resetPlacement = initialPlacement; 6444 break; 6445 } 6446 } 6447 if (placement !== resetPlacement) { 6448 return { 6449 reset: { 6450 placement: resetPlacement 6451 } 6452 }; 6453 } 6454 } 6455 return {}; 6456 } 6457 }; 6458 }; 6459 var originSides = /* @__PURE__ */ new Set(["left", "top"]); 6460 async function convertValueToCoords(state, options) { 6461 const { 6462 placement, 6463 platform: platform3, 6464 elements 6465 } = state; 6466 const rtl = await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating)); 6467 const side = getSide(placement); 6468 const alignment = getAlignment(placement); 6469 const isVertical = getSideAxis(placement) === "y"; 6470 const mainAxisMulti = originSides.has(side) ? -1 : 1; 6471 const crossAxisMulti = rtl && isVertical ? -1 : 1; 6472 const rawValue = evaluate(options, state); 6473 let { 6474 mainAxis, 6475 crossAxis, 6476 alignmentAxis 6477 } = typeof rawValue === "number" ? { 6478 mainAxis: rawValue, 6479 crossAxis: 0, 6480 alignmentAxis: null 6481 } : { 6482 mainAxis: rawValue.mainAxis || 0, 6483 crossAxis: rawValue.crossAxis || 0, 6484 alignmentAxis: rawValue.alignmentAxis 6485 }; 6486 if (alignment && typeof alignmentAxis === "number") { 6487 crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis; 6488 } 6489 return isVertical ? { 6490 x: crossAxis * crossAxisMulti, 6491 y: mainAxis * mainAxisMulti 6492 } : { 6493 x: mainAxis * mainAxisMulti, 6494 y: crossAxis * crossAxisMulti 6495 }; 6496 } 6497 var offset = function(options) { 6498 if (options === void 0) { 6499 options = 0; 6500 } 6501 return { 6502 name: "offset", 6503 options, 6504 async fn(state) { 6505 var _middlewareData$offse, _middlewareData$arrow; 6506 const { 6507 x, 6508 y, 6509 placement, 6510 middlewareData 6511 } = state; 6512 const diffCoords = await convertValueToCoords(state, options); 6513 if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { 6514 return {}; 6515 } 6516 return { 6517 x: x + diffCoords.x, 6518 y: y + diffCoords.y, 6519 data: { 6520 ...diffCoords, 6521 placement 6522 } 6523 }; 6524 } 6525 }; 6526 }; 6527 var shift = function(options) { 6528 if (options === void 0) { 6529 options = {}; 6530 } 6531 return { 6532 name: "shift", 6533 options, 6534 async fn(state) { 6535 const { 6536 x, 6537 y, 6538 placement, 6539 platform: platform3 6540 } = state; 6541 const { 6542 mainAxis: checkMainAxis = true, 6543 crossAxis: checkCrossAxis = false, 6544 limiter = { 6545 fn: (_ref) => { 6546 let { 6547 x: x2, 6548 y: y2 6549 } = _ref; 6550 return { 6551 x: x2, 6552 y: y2 6553 }; 6554 } 6555 }, 6556 ...detectOverflowOptions 6557 } = evaluate(options, state); 6558 const coords = { 6559 x, 6560 y 6561 }; 6562 const overflow = await platform3.detectOverflow(state, detectOverflowOptions); 6563 const crossAxis = getSideAxis(placement); 6564 const mainAxis = getOppositeAxis(crossAxis); 6565 let mainAxisCoord = coords[mainAxis]; 6566 let crossAxisCoord = coords[crossAxis]; 6567 const clampCoord = (axis, coord) => clamp(coord + overflow[axis === "y" ? "top" : "left"], coord, coord - overflow[axis === "y" ? "bottom" : "right"]); 6568 if (checkMainAxis) { 6569 mainAxisCoord = clampCoord(mainAxis, mainAxisCoord); 6570 } 6571 if (checkCrossAxis) { 6572 crossAxisCoord = clampCoord(crossAxis, crossAxisCoord); 6573 } 6574 const limitedCoords = limiter.fn({ 6575 ...state, 6576 [mainAxis]: mainAxisCoord, 6577 [crossAxis]: crossAxisCoord 6578 }); 6579 return { 6580 ...limitedCoords, 6581 data: { 6582 x: limitedCoords.x - x, 6583 y: limitedCoords.y - y, 6584 enabled: { 6585 [mainAxis]: checkMainAxis, 6586 [crossAxis]: checkCrossAxis 6587 } 6588 } 6589 }; 6590 } 6591 }; 6592 }; 6593 var limitShift = function(options) { 6594 if (options === void 0) { 6595 options = {}; 6596 } 6597 return { 6598 options, 6599 fn(state) { 6600 var _rawOffset$mainAxis, _rawOffset$crossAxis; 6601 const { 6602 x, 6603 y, 6604 placement, 6605 rects, 6606 middlewareData 6607 } = state; 6608 const { 6609 offset: offset4 = 0, 6610 mainAxis: checkMainAxis = true, 6611 crossAxis: checkCrossAxis = true 6612 } = evaluate(options, state); 6613 const coords = { 6614 x, 6615 y 6616 }; 6617 const crossAxis = getSideAxis(placement); 6618 const mainAxis = getOppositeAxis(crossAxis); 6619 let mainAxisCoord = coords[mainAxis]; 6620 let crossAxisCoord = coords[crossAxis]; 6621 const rawOffset = evaluate(offset4, state); 6622 const computedOffset = typeof rawOffset === "number" ? { 6623 mainAxis: rawOffset, 6624 crossAxis: 0 6625 } : { 6626 mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0, 6627 crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0 6628 }; 6629 if (checkMainAxis) { 6630 const len = mainAxis === "y" ? "height" : "width"; 6631 const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis; 6632 const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis; 6633 if (mainAxisCoord < limitMin) { 6634 mainAxisCoord = limitMin; 6635 } else if (mainAxisCoord > limitMax) { 6636 mainAxisCoord = limitMax; 6637 } 6638 } 6639 if (checkCrossAxis) { 6640 var _middlewareData$offse, _middlewareData$offse2; 6641 const len = mainAxis === "y" ? "width" : "height"; 6642 const isOriginSide = originSides.has(getSide(placement)); 6643 const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis); 6644 const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0); 6645 if (crossAxisCoord < limitMin) { 6646 crossAxisCoord = limitMin; 6647 } else if (crossAxisCoord > limitMax) { 6648 crossAxisCoord = limitMax; 6649 } 6650 } 6651 return { 6652 [mainAxis]: mainAxisCoord, 6653 [crossAxis]: crossAxisCoord 6654 }; 6655 } 6656 }; 6657 }; 6658 var size = function(options) { 6659 if (options === void 0) { 6660 options = {}; 6661 } 6662 return { 6663 name: "size", 6664 options, 6665 async fn(state) { 6666 const { 6667 placement, 6668 rects, 6669 platform: platform3, 6670 elements 6671 } = state; 6672 const { 6673 apply = () => { 6674 }, 6675 ...detectOverflowOptions 6676 } = evaluate(options, state); 6677 const overflow = await platform3.detectOverflow(state, detectOverflowOptions); 6678 const side = getSide(placement); 6679 const alignment = getAlignment(placement); 6680 const isYAxis = getSideAxis(placement) === "y"; 6681 const { 6682 width, 6683 height 6684 } = rects.floating; 6685 let heightSide; 6686 let widthSide; 6687 if (side === "top" || side === "bottom") { 6688 heightSide = side; 6689 widthSide = alignment === (await (platform3.isRTL == null ? void 0 : platform3.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right"; 6690 } else { 6691 widthSide = side; 6692 heightSide = alignment === "end" ? "top" : "bottom"; 6693 } 6694 const maximumClippingHeight = height - overflow.top - overflow.bottom; 6695 const maximumClippingWidth = width - overflow.left - overflow.right; 6696 const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight); 6697 const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth); 6698 const shiftData = state.middlewareData.shift; 6699 const noShift = !shiftData; 6700 let availableHeight2 = overflowAvailableHeight; 6701 let availableWidth2 = overflowAvailableWidth; 6702 if (shiftData != null && shiftData.enabled.x) { 6703 availableWidth2 = maximumClippingWidth; 6704 } 6705 if (shiftData != null && shiftData.enabled.y) { 6706 availableHeight2 = maximumClippingHeight; 6707 } 6708 if (noShift && !alignment) { 6709 if (isYAxis) { 6710 availableWidth2 = width - 2 * max(overflow.left, overflow.right); 6711 } else { 6712 availableHeight2 = height - 2 * max(overflow.top, overflow.bottom); 6713 } 6714 } 6715 await apply({ 6716 ...state, 6717 availableWidth: availableWidth2, 6718 availableHeight: availableHeight2 6719 }); 6720 const nextDimensions = await platform3.getDimensions(elements.floating); 6721 if (width !== nextDimensions.width || height !== nextDimensions.height) { 6722 return { 6723 reset: { 6724 rects: true 6725 } 6726 }; 6727 } 6728 return {}; 6729 } 6730 }; 6731 }; 6732 6733 // node_modules/.store/@floating-ui/dom@1.8.0-vHXcr4FgWneV0cgwFw-d7A/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs 6734 function getCssDimensions(element) { 6735 const css = getComputedStyle2(element); 6736 let width = parseFloat(css.width) || 0; 6737 let height = parseFloat(css.height) || 0; 6738 const hasOffset = isHTMLElement(element); 6739 const offsetWidth = hasOffset ? element.offsetWidth : width; 6740 const offsetHeight = hasOffset ? element.offsetHeight : height; 6741 const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight; 6742 if (shouldFallback) { 6743 width = offsetWidth; 6744 height = offsetHeight; 6745 } 6746 return { 6747 width, 6748 height, 6749 $: shouldFallback 6750 }; 6751 } 6752 function unwrapElement(element) { 6753 return !isElement(element) ? element.contextElement : element; 6754 } 6755 function getScale(element) { 6756 const domElement = unwrapElement(element); 6757 if (!isHTMLElement(domElement)) { 6758 return createCoords(1); 6759 } 6760 const rect = domElement.getBoundingClientRect(); 6761 const { 6762 width, 6763 height, 6764 $ 6765 } = getCssDimensions(domElement); 6766 let x = ($ ? round(rect.width) : rect.width) / width; 6767 let y = ($ ? round(rect.height) : rect.height) / height; 6768 if (!x || !Number.isFinite(x)) { 6769 x = 1; 6770 } 6771 if (!y || !Number.isFinite(y)) { 6772 y = 1; 6773 } 6774 return { 6775 x, 6776 y 6777 }; 6778 } 6779 var noOffsets = /* @__PURE__ */ createCoords(0); 6780 function getVisualOffsets(element) { 6781 const win = getWindow(element); 6782 if (!isWebKit() || !win.visualViewport) { 6783 return noOffsets; 6784 } 6785 return { 6786 x: win.visualViewport.offsetLeft, 6787 y: win.visualViewport.offsetTop 6788 }; 6789 } 6790 function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) { 6791 if (isFixed === void 0) { 6792 isFixed = false; 6793 } 6794 return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element); 6795 } 6796 function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) { 6797 if (includeScale === void 0) { 6798 includeScale = false; 6799 } 6800 if (isFixedStrategy === void 0) { 6801 isFixedStrategy = false; 6802 } 6803 const clientRect = element.getBoundingClientRect(); 6804 const domElement = unwrapElement(element); 6805 let scale = createCoords(1); 6806 if (includeScale) { 6807 if (offsetParent) { 6808 if (isElement(offsetParent)) { 6809 scale = getScale(offsetParent); 6810 } 6811 } else { 6812 scale = getScale(element); 6813 } 6814 } 6815 const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0); 6816 let x = (clientRect.left + visualOffsets.x) / scale.x; 6817 let y = (clientRect.top + visualOffsets.y) / scale.y; 6818 let width = clientRect.width / scale.x; 6819 let height = clientRect.height / scale.y; 6820 if (domElement && offsetParent) { 6821 const win = getWindow(domElement); 6822 const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent; 6823 let currentWin = win; 6824 let currentIFrame = getFrameElement(currentWin); 6825 while (currentIFrame && offsetWin !== currentWin) { 6826 const iframeScale = getScale(currentIFrame); 6827 const iframeRect = currentIFrame.getBoundingClientRect(); 6828 const css = getComputedStyle2(currentIFrame); 6829 const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x; 6830 const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y; 6831 x *= iframeScale.x; 6832 y *= iframeScale.y; 6833 width *= iframeScale.x; 6834 height *= iframeScale.y; 6835 x += left; 6836 y += top; 6837 currentWin = getWindow(currentIFrame); 6838 currentIFrame = getFrameElement(currentWin); 6839 } 6840 } 6841 return rectToClientRect({ 6842 width, 6843 height, 6844 x, 6845 y 6846 }); 6847 } 6848 function getWindowScrollBarX(element, rect) { 6849 const leftScroll = getNodeScroll(element).scrollLeft; 6850 if (!rect) { 6851 return getBoundingClientRect(getDocumentElement(element)).left + leftScroll; 6852 } 6853 return rect.left + leftScroll; 6854 } 6855 function getHTMLOffset(documentElement, scroll) { 6856 const htmlRect = documentElement.getBoundingClientRect(); 6857 const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect); 6858 const y = htmlRect.top + scroll.scrollTop; 6859 return { 6860 x, 6861 y 6862 }; 6863 } 6864 function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) { 6865 let { 6866 elements, 6867 rect, 6868 offsetParent, 6869 strategy 6870 } = _ref; 6871 const isFixed = strategy === "fixed"; 6872 const documentElement = getDocumentElement(offsetParent); 6873 const topLayer = elements ? isTopLayer(elements.floating) : false; 6874 if (offsetParent === documentElement || topLayer && isFixed) { 6875 return rect; 6876 } 6877 let scroll = { 6878 scrollLeft: 0, 6879 scrollTop: 0 6880 }; 6881 let scale = createCoords(1); 6882 const offsets = createCoords(0); 6883 const isOffsetParentAnElement = isHTMLElement(offsetParent); 6884 if (isOffsetParentAnElement || !isFixed) { 6885 if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) { 6886 scroll = getNodeScroll(offsetParent); 6887 } 6888 if (isOffsetParentAnElement) { 6889 const offsetRect = getBoundingClientRect(offsetParent); 6890 scale = getScale(offsetParent); 6891 offsets.x = offsetRect.x + offsetParent.clientLeft; 6892 offsets.y = offsetRect.y + offsetParent.clientTop; 6893 } 6894 } 6895 const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0); 6896 return { 6897 width: rect.width * scale.x, 6898 height: rect.height * scale.y, 6899 x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x, 6900 y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y 6901 }; 6902 } 6903 function getClientRects(element) { 6904 return element.getClientRects ? Array.from(element.getClientRects()) : []; 6905 } 6906 function getDocumentRect(html) { 6907 const scroll = getNodeScroll(html); 6908 const body = html.ownerDocument.body; 6909 const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth); 6910 const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight); 6911 let x = -scroll.scrollLeft + getWindowScrollBarX(html); 6912 const y = -scroll.scrollTop; 6913 if (getComputedStyle2(body).direction === "rtl") { 6914 x += max(html.clientWidth, body.clientWidth) - width; 6915 } 6916 return { 6917 width, 6918 height, 6919 x, 6920 y 6921 }; 6922 } 6923 var SCROLLBAR_MAX = 25; 6924 function getViewportRect(element, strategy, rootBoundary) { 6925 if (rootBoundary === void 0) { 6926 rootBoundary = "viewport"; 6927 } 6928 const isLayoutViewport = rootBoundary === "layoutViewport"; 6929 const win = getWindow(element); 6930 const html = getDocumentElement(element); 6931 const visualViewport = win.visualViewport; 6932 let width = html.clientWidth; 6933 let height = html.clientHeight; 6934 let x = 0; 6935 let y = 0; 6936 if (visualViewport) { 6937 const layoutRelativeClientCoords = !isWebKit() || strategy === "fixed"; 6938 if (isLayoutViewport) { 6939 if (!layoutRelativeClientCoords) { 6940 x = -visualViewport.offsetLeft; 6941 y = -visualViewport.offsetTop; 6942 } 6943 } else { 6944 width = visualViewport.width; 6945 height = visualViewport.height; 6946 if (layoutRelativeClientCoords) { 6947 x = visualViewport.offsetLeft; 6948 y = visualViewport.offsetTop; 6949 } 6950 } 6951 } 6952 const windowScrollbarX = getWindowScrollBarX(html); 6953 if (windowScrollbarX <= 0) { 6954 const doc = html.ownerDocument; 6955 const body = doc.body; 6956 const bodyStyles = getComputedStyle(body); 6957 const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0; 6958 const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline); 6959 const gutter = getComputedStyle(html).scrollbarGutter === "stable both-edges" ? reservedWidth / 2 : reservedWidth; 6960 if (gutter <= SCROLLBAR_MAX) { 6961 width -= gutter; 6962 } 6963 } 6964 return { 6965 width, 6966 height, 6967 x, 6968 y 6969 }; 6970 } 6971 function getInnerBoundingClientRect(element, strategy) { 6972 const clientRect = getBoundingClientRect(element, true, strategy === "fixed"); 6973 const top = clientRect.top + element.clientTop; 6974 const left = clientRect.left + element.clientLeft; 6975 const scale = getScale(element); 6976 const width = element.clientWidth * scale.x; 6977 const height = element.clientHeight * scale.y; 6978 const x = left * scale.x; 6979 const y = top * scale.y; 6980 return { 6981 width, 6982 height, 6983 x, 6984 y 6985 }; 6986 } 6987 function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) { 6988 let rect; 6989 if (clippingAncestor === "viewport" || clippingAncestor === "layoutViewport") { 6990 rect = getViewportRect(element, strategy, clippingAncestor); 6991 } else if (clippingAncestor === "document") { 6992 rect = getDocumentRect(getDocumentElement(element)); 6993 } else if (isElement(clippingAncestor)) { 6994 rect = getInnerBoundingClientRect(clippingAncestor, strategy); 6995 } else { 6996 const visualOffsets = getVisualOffsets(element); 6997 rect = { 6998 x: clippingAncestor.x - visualOffsets.x, 6999 y: clippingAncestor.y - visualOffsets.y, 7000 width: clippingAncestor.width, 7001 height: clippingAncestor.height 7002 }; 7003 } 7004 return rectToClientRect(rect); 7005 } 7006 function getClippingElementAncestors(element, cache) { 7007 const cachedResult = cache.get(element); 7008 if (cachedResult) { 7009 return cachedResult; 7010 } 7011 let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body"); 7012 let lastKeptComputedStyle = null; 7013 const elementIsFixed = getComputedStyle2(element).position === "fixed"; 7014 let currentNode = elementIsFixed ? getParentNode(element) : element; 7015 while (isElement(currentNode) && !isLastTraversableNode(currentNode)) { 7016 const computedStyle = getComputedStyle2(currentNode); 7017 const currentNodeIsContaining = isContainingBlock(currentNode); 7018 const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? "fixed" : ""; 7019 const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === "fixed" || lastPosition === "absolute" && computedStyle.position === "static"); 7020 if (shouldDropCurrentNode) { 7021 result = result.filter((ancestor) => ancestor !== currentNode); 7022 } else { 7023 lastKeptComputedStyle = computedStyle; 7024 } 7025 currentNode = getParentNode(currentNode); 7026 } 7027 cache.set(element, result); 7028 return result; 7029 } 7030 function getClippingRect(_ref) { 7031 let { 7032 element, 7033 boundary, 7034 rootBoundary, 7035 strategy 7036 } = _ref; 7037 const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary); 7038 const clippingAncestors = [...elementClippingAncestors, rootBoundary]; 7039 const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy); 7040 let top = firstRect.top; 7041 let right = firstRect.right; 7042 let bottom = firstRect.bottom; 7043 let left = firstRect.left; 7044 for (let i = 1; i < clippingAncestors.length; i++) { 7045 const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy); 7046 top = max(rect.top, top); 7047 right = min(rect.right, right); 7048 bottom = min(rect.bottom, bottom); 7049 left = max(rect.left, left); 7050 } 7051 return { 7052 width: right - left, 7053 height: bottom - top, 7054 x: left, 7055 y: top 7056 }; 7057 } 7058 function getDimensions2(element) { 7059 const { 7060 width, 7061 height 7062 } = getCssDimensions(element); 7063 return { 7064 width, 7065 height 7066 }; 7067 } 7068 function getRectRelativeToOffsetParent(element, offsetParent, strategy) { 7069 const isOffsetParentAnElement = isHTMLElement(offsetParent); 7070 const documentElement = getDocumentElement(offsetParent); 7071 const isFixed = strategy === "fixed"; 7072 const rect = getBoundingClientRect(element, true, isFixed, offsetParent); 7073 let scroll = { 7074 scrollLeft: 0, 7075 scrollTop: 0 7076 }; 7077 const offsets = createCoords(0); 7078 if (isOffsetParentAnElement || !isFixed) { 7079 if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) { 7080 scroll = getNodeScroll(offsetParent); 7081 } 7082 if (isOffsetParentAnElement) { 7083 const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent); 7084 offsets.x = offsetRect.x + offsetParent.clientLeft; 7085 offsets.y = offsetRect.y + offsetParent.clientTop; 7086 } 7087 } 7088 if (!isOffsetParentAnElement && documentElement) { 7089 offsets.x = getWindowScrollBarX(documentElement); 7090 } 7091 const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0); 7092 const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x; 7093 const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y; 7094 return { 7095 x, 7096 y, 7097 width: rect.width, 7098 height: rect.height 7099 }; 7100 } 7101 function isStaticPositioned(element) { 7102 return getComputedStyle2(element).position === "static"; 7103 } 7104 function getTrueOffsetParent(element, polyfill) { 7105 if (!isHTMLElement(element) || getComputedStyle2(element).position === "fixed") { 7106 return null; 7107 } 7108 if (polyfill) { 7109 return polyfill(element); 7110 } 7111 let rawOffsetParent = element.offsetParent; 7112 if (getDocumentElement(element) === rawOffsetParent) { 7113 rawOffsetParent = rawOffsetParent.ownerDocument.body; 7114 } 7115 return rawOffsetParent; 7116 } 7117 function getOffsetParent(element, polyfill) { 7118 const win = getWindow(element); 7119 if (isTopLayer(element)) { 7120 return win; 7121 } 7122 if (!isHTMLElement(element)) { 7123 let svgOffsetParent = getParentNode(element); 7124 while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) { 7125 if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) { 7126 return svgOffsetParent; 7127 } 7128 svgOffsetParent = getParentNode(svgOffsetParent); 7129 } 7130 return win; 7131 } 7132 let offsetParent = getTrueOffsetParent(element, polyfill); 7133 while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) { 7134 offsetParent = getTrueOffsetParent(offsetParent, polyfill); 7135 } 7136 if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) { 7137 return win; 7138 } 7139 return offsetParent || getContainingBlock(element) || win; 7140 } 7141 var getElementRects = async function(data) { 7142 const getOffsetParentFn = this.getOffsetParent || getOffsetParent; 7143 const getDimensionsFn = this.getDimensions; 7144 const floatingDimensions = await getDimensionsFn(data.floating); 7145 return { 7146 reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy), 7147 floating: { 7148 x: 0, 7149 y: 0, 7150 width: floatingDimensions.width, 7151 height: floatingDimensions.height 7152 } 7153 }; 7154 }; 7155 function isRTL(element) { 7156 return getComputedStyle2(element).direction === "rtl"; 7157 } 7158 var platform2 = { 7159 convertOffsetParentRelativeRectToViewportRelativeRect, 7160 getDocumentElement, 7161 getClippingRect, 7162 getOffsetParent, 7163 getElementRects, 7164 getClientRects, 7165 getDimensions: getDimensions2, 7166 getScale, 7167 isElement, 7168 isRTL 7169 }; 7170 function rectsAreEqual(a, b) { 7171 return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height; 7172 } 7173 function observeMove(element, onMove, ancestorResize) { 7174 let io = null; 7175 let timeoutId; 7176 const root = getDocumentElement(element); 7177 function cleanup() { 7178 var _io; 7179 clearTimeout(timeoutId); 7180 (_io = io) == null || _io.disconnect(); 7181 io = null; 7182 } 7183 function refresh(skip, threshold) { 7184 if (skip === void 0) { 7185 skip = false; 7186 } 7187 if (threshold === void 0) { 7188 threshold = 1; 7189 } 7190 cleanup(); 7191 const elementRectForRootMargin = element.getBoundingClientRect(); 7192 const { 7193 left, 7194 top, 7195 width, 7196 height 7197 } = elementRectForRootMargin; 7198 if (!skip) { 7199 onMove(); 7200 } 7201 if (!width || !height) { 7202 return; 7203 } 7204 const insetTop = floor(top); 7205 const insetRight = floor(root.clientWidth - (left + width)); 7206 const insetBottom = floor(root.clientHeight - (top + height)); 7207 const insetLeft = floor(left); 7208 const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px"; 7209 const options = { 7210 rootMargin, 7211 threshold: max(0, min(1, threshold)) || 1 7212 }; 7213 let isFirstUpdate = true; 7214 function handleObserve(entries) { 7215 const ratio = entries[0].intersectionRatio; 7216 if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) { 7217 return refresh(); 7218 } 7219 if (ratio !== threshold) { 7220 if (!isFirstUpdate) { 7221 return refresh(); 7222 } 7223 if (!ratio) { 7224 timeoutId = setTimeout(() => { 7225 refresh(false, 1e-7); 7226 }, 1e3); 7227 } else { 7228 refresh(false, ratio); 7229 } 7230 } 7231 isFirstUpdate = false; 7232 } 7233 try { 7234 io = new IntersectionObserver(handleObserve, { 7235 ...options, 7236 // Handle <iframe>s 7237 root: root.ownerDocument 7238 }); 7239 } catch (_e) { 7240 io = new IntersectionObserver(handleObserve, options); 7241 } 7242 io.observe(element); 7243 } 7244 const win = getWindow(element); 7245 const handleResize = () => refresh(ancestorResize); 7246 win.addEventListener("resize", handleResize); 7247 refresh(true); 7248 return () => { 7249 win.removeEventListener("resize", handleResize); 7250 cleanup(); 7251 }; 7252 } 7253 function autoUpdate(reference, floating, update2, options) { 7254 if (options === void 0) { 7255 options = {}; 7256 } 7257 const { 7258 ancestorScroll = true, 7259 ancestorResize = true, 7260 elementResize = typeof ResizeObserver === "function", 7261 layoutShift = typeof IntersectionObserver === "function", 7262 animationFrame = false 7263 } = options; 7264 const referenceEl = unwrapElement(reference); 7265 const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : []; 7266 ancestors.forEach((ancestor) => { 7267 ancestorScroll && ancestor.addEventListener("scroll", update2); 7268 ancestorResize && ancestor.addEventListener("resize", update2); 7269 }); 7270 const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update2, ancestorResize) : null; 7271 let reobserveFrame = -1; 7272 let resizeObserver = null; 7273 if (elementResize) { 7274 resizeObserver = new ResizeObserver((_ref) => { 7275 let [firstEntry] = _ref; 7276 if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) { 7277 resizeObserver.unobserve(floating); 7278 cancelAnimationFrame(reobserveFrame); 7279 reobserveFrame = requestAnimationFrame(() => { 7280 var _resizeObserver; 7281 (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating); 7282 }); 7283 } 7284 update2(); 7285 }); 7286 if (referenceEl && !animationFrame) { 7287 resizeObserver.observe(referenceEl); 7288 } 7289 if (floating) { 7290 resizeObserver.observe(floating); 7291 } 7292 } 7293 let frameId; 7294 let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null; 7295 if (animationFrame) { 7296 frameLoop(); 7297 } 7298 function frameLoop() { 7299 const nextRefRect = getBoundingClientRect(reference); 7300 if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) { 7301 update2(); 7302 } 7303 prevRefRect = nextRefRect; 7304 frameId = requestAnimationFrame(frameLoop); 7305 } 7306 update2(); 7307 return () => { 7308 var _resizeObserver2; 7309 ancestors.forEach((ancestor) => { 7310 ancestorScroll && ancestor.removeEventListener("scroll", update2); 7311 ancestorResize && ancestor.removeEventListener("resize", update2); 7312 }); 7313 cleanupIo == null || cleanupIo(); 7314 (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect(); 7315 resizeObserver = null; 7316 if (animationFrame) { 7317 cancelAnimationFrame(frameId); 7318 } 7319 }; 7320 } 7321 var offset2 = offset; 7322 var shift2 = shift; 7323 var flip2 = flip; 7324 var size2 = size; 7325 var limitShift2 = limitShift; 7326 var computePosition2 = (reference, floating, options) => { 7327 const cache = /* @__PURE__ */ new Map(); 7328 const mergedOptions = options != null ? options : {}; 7329 const platformWithCache = { 7330 ...platform2, 7331 ...mergedOptions.platform, 7332 _c: cache 7333 }; 7334 return computePosition(reference, floating, { 7335 ...mergedOptions, 7336 platform: platformWithCache 7337 }); 7338 }; 7339 7340 // node_modules/.store/@floating-ui/react-dom@2.1.9-AxWcAwqlMfOrAFOinFKSVg/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs 7341 var React34 = __toESM(require_react(), 1); 7342 var import_react2 = __toESM(require_react(), 1); 7343 var ReactDOM5 = __toESM(require_react_dom(), 1); 7344 var isClient = typeof document !== "undefined"; 7345 var noop2 = function noop3() { 7346 }; 7347 var index = isClient ? import_react2.useLayoutEffect : noop2; 7348 function deepEqual(a, b) { 7349 if (a === b) { 7350 return true; 7351 } 7352 if (typeof a !== typeof b) { 7353 return false; 7354 } 7355 if (typeof a === "function" && a.toString() === b.toString()) { 7356 return true; 7357 } 7358 let length; 7359 let i; 7360 let keys; 7361 if (a && b && typeof a === "object") { 7362 if (Array.isArray(a)) { 7363 length = a.length; 7364 if (length !== b.length) return false; 7365 for (i = length; i-- !== 0; ) { 7366 if (!deepEqual(a[i], b[i])) { 7367 return false; 7368 } 7369 } 7370 return true; 7371 } 7372 keys = Object.keys(a); 7373 length = keys.length; 7374 if (length !== Object.keys(b).length) { 7375 return false; 7376 } 7377 for (i = length; i-- !== 0; ) { 7378 if (!{}.hasOwnProperty.call(b, keys[i])) { 7379 return false; 7380 } 7381 } 7382 for (i = length; i-- !== 0; ) { 7383 const key = keys[i]; 7384 if (key === "_owner" && a.$$typeof) { 7385 continue; 7386 } 7387 if (!deepEqual(a[key], b[key])) { 7388 return false; 7389 } 7390 } 7391 return true; 7392 } 7393 return a !== a && b !== b; 7394 } 7395 function getDPR(element) { 7396 if (typeof window === "undefined") { 7397 return 1; 7398 } 7399 const win = element.ownerDocument.defaultView || window; 7400 return win.devicePixelRatio || 1; 7401 } 7402 function roundByDPR(element, value) { 7403 const dpr = getDPR(element); 7404 return Math.round(value * dpr) / dpr; 7405 } 7406 function useLatestRef(value) { 7407 const ref = React34.useRef(value); 7408 index(() => { 7409 ref.current = value; 7410 }); 7411 return ref; 7412 } 7413 function useFloating(options) { 7414 if (options === void 0) { 7415 options = {}; 7416 } 7417 const { 7418 placement = "bottom", 7419 strategy = "absolute", 7420 middleware = [], 7421 platform: platform3, 7422 elements: { 7423 reference: externalReference, 7424 floating: externalFloating 7425 } = {}, 7426 transform = true, 7427 whileElementsMounted, 7428 open: open3 7429 } = options; 7430 const [data, setData] = React34.useState({ 7431 x: 0, 7432 y: 0, 7433 strategy, 7434 placement, 7435 middlewareData: {}, 7436 isPositioned: false 7437 }); 7438 const [latestMiddleware, setLatestMiddleware] = React34.useState(middleware); 7439 if (!deepEqual(latestMiddleware, middleware)) { 7440 setLatestMiddleware(middleware); 7441 } 7442 const [_reference, _setReference] = React34.useState(null); 7443 const [_floating, _setFloating] = React34.useState(null); 7444 const setReference = React34.useCallback((node) => { 7445 if (node !== referenceRef.current) { 7446 referenceRef.current = node; 7447 _setReference(node); 7448 } 7449 }, []); 7450 const setFloating = React34.useCallback((node) => { 7451 if (node !== floatingRef.current) { 7452 floatingRef.current = node; 7453 _setFloating(node); 7454 } 7455 }, []); 7456 const referenceEl = externalReference || _reference; 7457 const floatingEl = externalFloating || _floating; 7458 const referenceRef = React34.useRef(null); 7459 const floatingRef = React34.useRef(null); 7460 const dataRef = React34.useRef(data); 7461 const hasWhileElementsMounted = whileElementsMounted != null; 7462 const whileElementsMountedRef = useLatestRef(whileElementsMounted); 7463 const platformRef = useLatestRef(platform3); 7464 const openRef = useLatestRef(open3); 7465 const update2 = React34.useCallback(() => { 7466 if (!referenceRef.current || !floatingRef.current) { 7467 return; 7468 } 7469 const config = { 7470 placement, 7471 strategy, 7472 middleware: latestMiddleware 7473 }; 7474 if (platformRef.current) { 7475 config.platform = platformRef.current; 7476 } 7477 computePosition2(referenceRef.current, floatingRef.current, config).then((data2) => { 7478 const fullData = { 7479 ...data2, 7480 // The floating element's position may be recomputed while it's closed 7481 // but still mounted (such as when transitioning out). To ensure 7482 // `isPositioned` will be `false` initially on the next open, avoid 7483 // setting it to `true` when `open === false` (must be specified). 7484 isPositioned: openRef.current !== false 7485 }; 7486 if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) { 7487 dataRef.current = fullData; 7488 ReactDOM5.flushSync(() => { 7489 setData(fullData); 7490 }); 7491 } 7492 }); 7493 }, [latestMiddleware, placement, strategy, platformRef, openRef]); 7494 index(() => { 7495 if (open3 === false && dataRef.current.isPositioned) { 7496 dataRef.current.isPositioned = false; 7497 setData((data2) => ({ 7498 ...data2, 7499 isPositioned: false 7500 })); 7501 } 7502 }, [open3]); 7503 const isMountedRef = React34.useRef(false); 7504 index(() => { 7505 isMountedRef.current = true; 7506 return () => { 7507 isMountedRef.current = false; 7508 }; 7509 }, []); 7510 index(() => { 7511 if (referenceEl) referenceRef.current = referenceEl; 7512 if (floatingEl) floatingRef.current = floatingEl; 7513 if (referenceEl && floatingEl) { 7514 if (whileElementsMountedRef.current) { 7515 return whileElementsMountedRef.current(referenceEl, floatingEl, update2); 7516 } 7517 update2(); 7518 } 7519 }, [referenceEl, floatingEl, update2, whileElementsMountedRef, hasWhileElementsMounted]); 7520 const refs = React34.useMemo(() => ({ 7521 reference: referenceRef, 7522 floating: floatingRef, 7523 setReference, 7524 setFloating 7525 }), [setReference, setFloating]); 7526 const elements = React34.useMemo(() => ({ 7527 reference: referenceEl, 7528 floating: floatingEl 7529 }), [referenceEl, floatingEl]); 7530 const floatingStyles = React34.useMemo(() => { 7531 const initialStyles = { 7532 position: strategy, 7533 left: 0, 7534 top: 0 7535 }; 7536 if (!elements.floating) { 7537 return initialStyles; 7538 } 7539 const x = roundByDPR(elements.floating, data.x); 7540 const y = roundByDPR(elements.floating, data.y); 7541 if (transform) { 7542 return { 7543 ...initialStyles, 7544 transform: "translate(" + x + "px, " + y + "px)", 7545 ...getDPR(elements.floating) >= 1.5 && { 7546 willChange: "transform" 7547 } 7548 }; 7549 } 7550 return { 7551 position: strategy, 7552 left: x, 7553 top: y 7554 }; 7555 }, [strategy, transform, elements.floating, data.x, data.y]); 7556 return React34.useMemo(() => ({ 7557 ...data, 7558 update: update2, 7559 refs, 7560 elements, 7561 floatingStyles 7562 }), [data, update2, refs, elements, floatingStyles]); 7563 } 7564 var offset3 = (options, deps) => { 7565 const result = offset2(options); 7566 return { 7567 name: result.name, 7568 fn: result.fn, 7569 options: [options, deps] 7570 }; 7571 }; 7572 var shift3 = (options, deps) => { 7573 const result = shift2(options); 7574 return { 7575 name: result.name, 7576 fn: result.fn, 7577 options: [options, deps] 7578 }; 7579 }; 7580 var limitShift3 = (options, deps) => { 7581 const result = limitShift2(options); 7582 return { 7583 fn: result.fn, 7584 options: [options, deps] 7585 }; 7586 }; 7587 var flip3 = (options, deps) => { 7588 const result = flip2(options); 7589 return { 7590 name: result.name, 7591 fn: result.fn, 7592 options: [options, deps] 7593 }; 7594 }; 7595 var size3 = (options, deps) => { 7596 const result = size2(options); 7597 return { 7598 name: result.name, 7599 fn: result.fn, 7600 options: [options, deps] 7601 }; 7602 }; 7603 7604 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/NullStore.mjs 7605 var NullStore = class extends ReactStore { 7606 // `update`/`set`/`notifyAll` funnel through `setState` in the base `Store`, so overriding 7607 // `setState` alone would neutralize them today. They are overridden explicitly so the store stays 7608 // inert even if a future base-class change stops routing a mutator through `setState`. 7609 setState(_newState) { 7610 } 7611 update(_changes) { 7612 } 7613 set(_key, _value) { 7614 } 7615 notifyAll() { 7616 } 7617 }; 7618 7619 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/inertValue.mjs 7620 function inertValue(value) { 7621 if (isReactVersionAtLeast(19)) { 7622 return value; 7623 } 7624 return value ? "true" : void 0; 7625 } 7626 7627 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/direction-context/DirectionContext.mjs 7628 var React35 = __toESM(require_react(), 1); 7629 var DirectionContext = /* @__PURE__ */ React35.createContext(void 0); 7630 if (true) DirectionContext.displayName = "DirectionContext"; 7631 function useDirection() { 7632 const context = React35.useContext(DirectionContext); 7633 return context?.direction ?? "ltr"; 7634 } 7635 7636 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useAnchorPositioning.mjs 7637 var React37 = __toESM(require_react(), 1); 7638 7639 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/hooks/useFloating.mjs 7640 var React36 = __toESM(require_react(), 1); 7641 function useBaseUIFloating(options) { 7642 const { 7643 nodeId, 7644 externalTree, 7645 rootContext: store2 7646 } = options; 7647 const referenceElement = store2.useState("referenceElement"); 7648 const floatingElement = store2.useState("floatingElement"); 7649 const domReferenceElement = store2.useState("domReferenceElement"); 7650 const open3 = store2.useState("open"); 7651 const floatingId = store2.useState("floatingId"); 7652 const [positionReference, setPositionReferenceRaw] = React36.useState(null); 7653 const domReferenceRef = React36.useRef(null); 7654 const tree = useFloatingTree(externalTree); 7655 const storeElements = React36.useMemo(() => ({ 7656 reference: referenceElement, 7657 floating: floatingElement, 7658 domReference: domReferenceElement 7659 }), [referenceElement, floatingElement, domReferenceElement]); 7660 const position = useFloating({ 7661 ...options, 7662 elements: { 7663 ...storeElements, 7664 ...positionReference && { 7665 reference: positionReference 7666 } 7667 } 7668 }); 7669 const setPositionReference = React36.useCallback((node) => { 7670 const computedPositionReference = isElement(node) ? { 7671 getBoundingClientRect: () => node.getBoundingClientRect(), 7672 getClientRects: () => node.getClientRects(), 7673 contextElement: node 7674 } : node; 7675 setPositionReferenceRaw(computedPositionReference); 7676 position.refs.setReference(computedPositionReference); 7677 }, [position.refs]); 7678 const refs = React36.useMemo(() => ({ 7679 ...position.refs, 7680 setPositionReference, 7681 domReference: domReferenceRef 7682 }), [position.refs, setPositionReference]); 7683 const elements = React36.useMemo(() => ({ 7684 ...position.elements, 7685 domReference: domReferenceElement 7686 }), [position.elements, domReferenceElement]); 7687 const context = React36.useMemo(() => ({ 7688 ...position, 7689 dataRef: store2.context.dataRef, 7690 open: open3, 7691 onOpenChange: store2.setOpen, 7692 events: store2.context.events, 7693 floatingId, 7694 refs, 7695 elements, 7696 nodeId, 7697 rootStore: store2 7698 }), [position, refs, elements, nodeId, store2, open3, floatingId]); 7699 useIsoLayoutEffect(() => { 7700 if (domReferenceElement) { 7701 domReferenceRef.current = domReferenceElement; 7702 } 7703 }, [domReferenceElement]); 7704 useIsoLayoutEffect(() => { 7705 store2.context.dataRef.current.floatingContext = context; 7706 const node = tree?.nodesRef.current.find((n) => n.id === nodeId); 7707 if (node) { 7708 node.context = context; 7709 } 7710 }); 7711 return React36.useMemo(() => ({ 7712 ...position, 7713 context, 7714 refs, 7715 elements, 7716 rootStore: store2 7717 }), [position, refs, elements, context, store2]); 7718 } 7719 7720 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/floating-ui-react/middleware/arrow.mjs 7721 var baseArrow = (options) => ({ 7722 name: "arrow", 7723 options, 7724 async fn(state) { 7725 const { 7726 x, 7727 y, 7728 placement, 7729 rects, 7730 platform: platform3, 7731 elements, 7732 middlewareData 7733 } = state; 7734 const { 7735 element, 7736 padding = 0 7737 } = evaluate(options, state) || {}; 7738 if (element == null) { 7739 return {}; 7740 } 7741 const paddingObject = getPaddingObject(padding); 7742 const coords = { 7743 x, 7744 y 7745 }; 7746 const axis = getAlignmentAxis(placement); 7747 const length = getAxisLength(axis); 7748 const arrowDimensions = await platform3.getDimensions(element); 7749 const isYAxis = axis === "y"; 7750 const minProp = isYAxis ? "top" : "left"; 7751 const maxProp = isYAxis ? "bottom" : "right"; 7752 const clientProp = isYAxis ? "clientHeight" : "clientWidth"; 7753 const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length]; 7754 const startDiff = coords[axis] - rects.reference[axis]; 7755 const clientSize = elements.floating[clientProp] || rects.floating[length]; 7756 const centerToReference = endDiff / 2 - startDiff / 2; 7757 const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1; 7758 const minPadding = Math.min(paddingObject[minProp], largestPossiblePadding); 7759 const maxPadding = Math.min(paddingObject[maxProp], largestPossiblePadding); 7760 const min2 = minPadding; 7761 const max2 = clientSize - arrowDimensions[length] - maxPadding; 7762 const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference; 7763 const offset4 = clamp(min2, center, max2); 7764 const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset4 && rects.reference[length] / 2 - (center < min2 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0; 7765 const alignmentOffset = shouldAddOffset ? center < min2 ? center - min2 : center - max2 : 0; 7766 return { 7767 [axis]: coords[axis] + alignmentOffset, 7768 data: { 7769 [axis]: offset4, 7770 centerOffset: center - offset4 - alignmentOffset, 7771 ...shouldAddOffset && { 7772 alignmentOffset 7773 } 7774 }, 7775 reset: shouldAddOffset 7776 }; 7777 } 7778 }); 7779 var arrow4 = (options, deps) => { 7780 const { 7781 name, 7782 fn 7783 } = baseArrow(options); 7784 return { 7785 name, 7786 fn, 7787 options: [options, deps] 7788 }; 7789 }; 7790 7791 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/hideMiddleware.mjs 7792 var hide4 = { 7793 name: "hide", 7794 async fn(state) { 7795 const { 7796 width, 7797 height, 7798 x, 7799 y 7800 } = state.rects.reference; 7801 const anchorHidden2 = width === 0 && height === 0 && x === 0 && y === 0; 7802 const overflow = await state.platform.detectOverflow(state, { 7803 elementContext: "reference" 7804 }); 7805 const referenceHidden = overflow.top - height >= 0 || overflow.right - width >= 0 || overflow.bottom - height >= 0 || overflow.left - width >= 0; 7806 return { 7807 data: { 7808 referenceHidden: referenceHidden || anchorHidden2 7809 } 7810 }; 7811 } 7812 }; 7813 7814 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/adaptiveOriginConstants.mjs 7815 var DEFAULT_SIDES = { 7816 sideX: "left", 7817 sideY: "top" 7818 }; 7819 7820 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/CommonPositionerCssVars.mjs 7821 var availableWidth = "--available-width"; 7822 var availableHeight = "--available-height"; 7823 var anchorWidth = "--anchor-width"; 7824 var anchorHeight = "--anchor-height"; 7825 var transformOrigin = "--transform-origin"; 7826 var positionerWidth = "--positioner-width"; 7827 var positionerHeight = "--positioner-height"; 7828 7829 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/useAnchorPositioning.mjs 7830 var AVAILABLE_WIDTH_VAR = availableWidth; 7831 var AVAILABLE_HEIGHT_VAR = availableHeight; 7832 function getLogicalSide(sideParam, renderedSide, isRtl) { 7833 const isLogicalSideParam = sideParam === "inline-start" || sideParam === "inline-end"; 7834 const logicalRight = isRtl ? "inline-start" : "inline-end"; 7835 const logicalLeft = isRtl ? "inline-end" : "inline-start"; 7836 return { 7837 top: "top", 7838 right: isLogicalSideParam ? logicalRight : "right", 7839 bottom: "bottom", 7840 left: isLogicalSideParam ? logicalLeft : "left" 7841 }[renderedSide]; 7842 } 7843 function getOffsetData(state, sideParam, isRtl) { 7844 const { 7845 rects, 7846 placement 7847 } = state; 7848 const data = { 7849 side: getLogicalSide(sideParam, getSide(placement), isRtl), 7850 align: getAlignment(placement) || "center", 7851 anchor: { 7852 width: rects.reference.width, 7853 height: rects.reference.height 7854 }, 7855 positioner: { 7856 width: rects.floating.width, 7857 height: rects.floating.height 7858 } 7859 }; 7860 return data; 7861 } 7862 function useAnchorPositioning(params) { 7863 return useAnchorPositioningWithHook(params, useBaseUIFloating); 7864 } 7865 function useAnchorPositioningWithHook(params, useFloatingHook) { 7866 const { 7867 // Public parameters 7868 anchor, 7869 positionMethod = "absolute", 7870 side: sideParam = "bottom", 7871 sideOffset = 0, 7872 align = "center", 7873 alignOffset = 0, 7874 collisionBoundary, 7875 collisionPadding: collisionPaddingParam = 5, 7876 sticky = false, 7877 arrowPadding = 5, 7878 disableAnchorTracking = false, 7879 inline: inlineMiddleware, 7880 // Private parameters 7881 keepMounted = false, 7882 floatingRootContext, 7883 mounted, 7884 collisionAvoidance, 7885 shift: shift4, 7886 nodeId, 7887 adaptiveOrigin: adaptiveOrigin2, 7888 lazyFlip = false, 7889 externalTree 7890 } = params; 7891 const collisionAvoidanceSide = collisionAvoidance.side || "flip"; 7892 const collisionAvoidanceAlign = collisionAvoidance.align || "flip"; 7893 const collisionAvoidanceFallbackAxisSide = collisionAvoidance.fallbackAxisSide || "end"; 7894 const shiftCrossAxis = shift4?.crossAxis ?? false; 7895 const shiftRootBoundary = shift4?.rootBoundary; 7896 const anchorFn = typeof anchor === "function" ? anchor : void 0; 7897 const anchorFnCallback = useStableCallback(anchorFn); 7898 const anchorDep = anchorFn ? anchorFnCallback : anchor; 7899 const anchorValueRef = useValueAsRef(anchor); 7900 const mountedRef = useValueAsRef(mounted); 7901 const direction = useDirection(); 7902 const isRtl = direction === "rtl"; 7903 const [mountPlacement, setMountPlacement] = React37.useState(null); 7904 if (!mounted && mountPlacement !== null) { 7905 setMountPlacement(null); 7906 } 7907 const lockAlign = lazyFlip === "placement"; 7908 const mountSide = mountPlacement ? getSide(mountPlacement) : null; 7909 const mountAlign = mountPlacement && lockAlign ? getAlignment(mountPlacement) || "center" : null; 7910 const side = mountSide || { 7911 top: "top", 7912 right: "right", 7913 bottom: "bottom", 7914 left: "left", 7915 "inline-end": isRtl ? "left" : "right", 7916 "inline-start": isRtl ? "right" : "left" 7917 }[sideParam]; 7918 const placementAlign = mountAlign || align; 7919 const placement = placementAlign === "center" ? side : `$side}-$placementAlign}`; 7920 let collisionPadding = collisionPaddingParam; 7921 if (typeof collisionPadding === "number") { 7922 collisionPadding = { 7923 top: collisionPadding, 7924 right: collisionPadding, 7925 bottom: collisionPadding, 7926 left: collisionPadding 7927 }; 7928 } else if (collisionPadding) { 7929 collisionPadding = { 7930 top: collisionPadding.top || 0, 7931 right: collisionPadding.right || 0, 7932 bottom: collisionPadding.bottom || 0, 7933 left: collisionPadding.left || 0 7934 }; 7935 } 7936 const bias = 1; 7937 const biasTop = sideParam === "bottom" ? bias : 0; 7938 const biasBottom = sideParam === "top" ? bias : 0; 7939 const biasLeft = sideParam === "right" ? bias : 0; 7940 const biasRight = sideParam === "left" ? bias : 0; 7941 const commonCollisionProps = { 7942 boundary: collisionBoundary === "clipping-ancestors" ? "clippingAncestors" : collisionBoundary, 7943 padding: collisionPadding 7944 }; 7945 const arrowRef = React37.useRef(null); 7946 const sideOffsetRef = useValueAsRef(sideOffset); 7947 const alignOffsetRef = useValueAsRef(alignOffset); 7948 const sideOffsetDep = typeof sideOffset !== "function" ? sideOffset : 0; 7949 const alignOffsetDep = typeof alignOffset !== "function" ? alignOffset : 0; 7950 const middleware = []; 7951 if (inlineMiddleware) { 7952 middleware.push(inlineMiddleware); 7953 } 7954 middleware.push(offset3((state) => { 7955 const data = getOffsetData(state, sideParam, isRtl); 7956 const sideAxis = typeof sideOffsetRef.current === "function" ? sideOffsetRef.current(data) : sideOffsetRef.current; 7957 const alignAxis = typeof alignOffsetRef.current === "function" ? alignOffsetRef.current(data) : alignOffsetRef.current; 7958 return { 7959 mainAxis: sideAxis, 7960 crossAxis: alignAxis, 7961 alignmentAxis: alignAxis 7962 }; 7963 }, [sideOffsetDep, alignOffsetDep, isRtl, sideParam])); 7964 const shiftDisabled = collisionAvoidanceAlign === "none" && collisionAvoidanceSide !== "shift"; 7965 const crossAxisShiftEnabled = !shiftDisabled && (sticky || shiftCrossAxis || collisionAvoidanceSide === "shift"); 7966 const flipMiddleware = collisionAvoidanceSide === "none" ? null : flip3({ 7967 ...commonCollisionProps, 7968 // Ensure the popup flips if it's been limited by its --available-height and it resizes. 7969 // Since the size() padding is smaller than the flip() padding, flip() will take precedence. 7970 padding: { 7971 top: collisionPadding.top + bias + biasTop, 7972 right: collisionPadding.right + bias + biasRight, 7973 bottom: collisionPadding.bottom + bias + biasBottom, 7974 left: collisionPadding.left + bias + biasLeft 7975 }, 7976 mainAxis: !shiftCrossAxis && collisionAvoidanceSide === "flip", 7977 crossAxis: collisionAvoidanceAlign === "flip" ? "alignment" : false, 7978 fallbackAxisSideDirection: collisionAvoidanceFallbackAxisSide 7979 }); 7980 const shiftMiddleware = shiftDisabled ? null : shift3({ 7981 ...commonCollisionProps, 7982 // Use the Layout Viewport to avoid shifting around when pinch-zooming. 7983 rootBoundary: shiftRootBoundary, 7984 mainAxis: collisionAvoidanceAlign !== "none", 7985 crossAxis: crossAxisShiftEnabled, 7986 limiter: sticky || shiftCrossAxis ? void 0 : limitShift3((limitData) => { 7987 if (!arrowRef.current) { 7988 return {}; 7989 } 7990 const { 7991 width, 7992 height 7993 } = arrowRef.current.getBoundingClientRect(); 7994 const sideAxis = getSideAxis(getSide(limitData.placement)); 7995 const arrowSize = sideAxis === "y" ? width : height; 7996 const offsetAmount = sideAxis === "y" ? collisionPadding.left + collisionPadding.right : collisionPadding.top + collisionPadding.bottom; 7997 return { 7998 offset: arrowSize / 2 + offsetAmount / 2 7999 }; 8000 }) 8001 }, [commonCollisionProps, sticky, shiftCrossAxis, shiftRootBoundary, collisionPadding, collisionAvoidanceAlign]); 8002 if (collisionAvoidanceSide === "shift" || collisionAvoidanceAlign === "shift" || placementAlign === "center") { 8003 middleware.push(shiftMiddleware, flipMiddleware); 8004 } else { 8005 middleware.push(flipMiddleware, shiftMiddleware); 8006 } 8007 middleware.push(size3({ 8008 ...commonCollisionProps, 8009 apply({ 8010 elements: { 8011 floating 8012 }, 8013 availableWidth: availableWidth2, 8014 availableHeight: availableHeight2, 8015 rects 8016 }) { 8017 if (!mountedRef.current) { 8018 return; 8019 } 8020 const floatingStyle = floating.style; 8021 floatingStyle.setProperty(AVAILABLE_WIDTH_VAR, `$availableWidth2}px`); 8022 floatingStyle.setProperty(AVAILABLE_HEIGHT_VAR, `$availableHeight2}px`); 8023 const dpr = getWindow(floating).devicePixelRatio || 1; 8024 const { 8025 x: x2, 8026 y: y2, 8027 width, 8028 height 8029 } = rects.reference; 8030 const anchorWidth2 = (Math.round((x2 + width) * dpr) - Math.round(x2 * dpr)) / dpr; 8031 const anchorHeight2 = (Math.round((y2 + height) * dpr) - Math.round(y2 * dpr)) / dpr; 8032 floatingStyle.setProperty(anchorWidth, `$anchorWidth2}px`); 8033 floatingStyle.setProperty(anchorHeight, `$anchorHeight2}px`); 8034 } 8035 }), arrow4((state) => ({ 8036 // `transform-origin` calculations rely on an element existing. If the arrow hasn't been set, 8037 // we'll create a fake element. 8038 element: arrowRef.current || ownerDocument(state.elements.floating).createElement("div"), 8039 // No padding for the fake arrow: it would displace aligned popups on narrow anchors. 8040 padding: arrowRef.current ? arrowPadding : 0 8041 }), [arrowPadding]), { 8042 name: "transformOrigin", 8043 fn(state) { 8044 const { 8045 elements: { 8046 floating 8047 }, 8048 middlewareData: middlewareData2, 8049 placement: renderedPlacement2, 8050 platform: platform3, 8051 rects, 8052 y: y2 8053 } = state; 8054 const renderedSide2 = getSide(renderedPlacement2); 8055 const renderedAlign2 = getAlignment(renderedPlacement2); 8056 const isVertical = getSideAxis(renderedSide2) === "y"; 8057 const arrowEl = arrowRef.current; 8058 const sideOffsetValue = typeof sideOffset === "function" ? sideOffset(getOffsetData(state, sideParam, isRtl)) : sideOffset; 8059 let crossOrigin; 8060 if (!arrowEl && renderedAlign2 && Math.abs(isVertical ? middlewareData2.shift?.x || 0 : middlewareData2.shift?.y || 0) <= 1) { 8061 crossOrigin = renderedAlign2 === "start" === (isVertical && platform3.isRTL?.(floating) === true) ? "100%" : "0%"; 8062 } else { 8063 const arrowOffset = isVertical ? middlewareData2.arrow?.x || 0 : middlewareData2.arrow?.y || 0; 8064 const arrowSize = isVertical ? arrowEl?.clientWidth || 0 : arrowEl?.clientHeight || 0; 8065 crossOrigin = `$arrowOffset + arrowSize / 2}px`; 8066 } 8067 let sideOrigin = renderedSide2 === "top" || renderedSide2 === "left" ? `calc(100% + $sideOffsetValue}px)` : `${-sideOffsetValue}px`; 8068 if (crossAxisShiftEnabled && isVertical && Math.abs(middlewareData2.shift?.y || 0) > sideOffsetValue) { 8069 sideOrigin = `$rects.reference.y + rects.reference.height / 2 - y2}px`; 8070 } 8071 floating.style.setProperty(transformOrigin, isVertical ? `$crossOrigin} $sideOrigin}` : `$sideOrigin} $crossOrigin}`); 8072 return {}; 8073 } 8074 }, hide4, adaptiveOrigin2); 8075 useIsoLayoutEffect(() => { 8076 if (!mounted && floatingRootContext) { 8077 floatingRootContext.update({ 8078 referenceElement: null, 8079 floatingElement: null, 8080 domReferenceElement: null, 8081 positionReference: null 8082 }); 8083 } 8084 }, [mounted, floatingRootContext]); 8085 const autoUpdateOptions = React37.useMemo(() => ({ 8086 ancestorScroll: !disableAnchorTracking, 8087 elementResize: !disableAnchorTracking && typeof ResizeObserver !== "undefined", 8088 layoutShift: !disableAnchorTracking && typeof IntersectionObserver !== "undefined" 8089 }), [disableAnchorTracking]); 8090 const { 8091 refs, 8092 elements, 8093 x, 8094 y, 8095 middlewareData, 8096 update: update2, 8097 placement: renderedPlacement, 8098 context, 8099 isPositioned, 8100 floatingStyles: originalFloatingStyles 8101 } = useFloatingHook({ 8102 rootContext: floatingRootContext, 8103 open: keepMounted ? mounted : void 0, 8104 placement, 8105 middleware, 8106 strategy: positionMethod, 8107 whileElementsMounted: keepMounted ? void 0 : (...args) => autoUpdate(...args, autoUpdateOptions), 8108 nodeId, 8109 externalTree 8110 }); 8111 const { 8112 sideX, 8113 sideY 8114 } = middlewareData.adaptiveOrigin || DEFAULT_SIDES; 8115 const resolvedPosition = isPositioned ? positionMethod : "fixed"; 8116 const floatingStyles = React37.useMemo(() => { 8117 let base; 8118 if (!isPositioned) { 8119 base = { 8120 position: resolvedPosition, 8121 top: 0, 8122 left: 0 8123 }; 8124 } else if (adaptiveOrigin2) { 8125 base = { 8126 position: resolvedPosition, 8127 [sideX]: x, 8128 [sideY]: y 8129 }; 8130 } else { 8131 base = { 8132 ...originalFloatingStyles, 8133 position: resolvedPosition 8134 }; 8135 } 8136 base[AVAILABLE_WIDTH_VAR] = "100vw"; 8137 base[AVAILABLE_HEIGHT_VAR] = "100vh"; 8138 if (!isPositioned) { 8139 base.opacity = 0; 8140 } 8141 return base; 8142 }, [adaptiveOrigin2, resolvedPosition, sideX, x, sideY, y, originalFloatingStyles, isPositioned]); 8143 const registeredPositionReferenceRef = React37.useRef(null); 8144 useIsoLayoutEffect(() => { 8145 if (!mounted) { 8146 return; 8147 } 8148 const anchorValue = anchorValueRef.current; 8149 const resolvedAnchor = typeof anchorValue === "function" ? anchorValue() : anchorValue; 8150 const unwrappedElement = (isRef(resolvedAnchor) ? resolvedAnchor.current : resolvedAnchor) || null; 8151 const finalAnchor = unwrappedElement || null; 8152 if (finalAnchor !== registeredPositionReferenceRef.current) { 8153 refs.setPositionReference(finalAnchor); 8154 registeredPositionReferenceRef.current = finalAnchor; 8155 } 8156 }, [mounted, refs, anchorDep, anchorValueRef]); 8157 React37.useEffect(() => { 8158 if (!mounted) { 8159 return; 8160 } 8161 const anchorValue = anchorValueRef.current; 8162 if (typeof anchorValue === "function") { 8163 return; 8164 } 8165 if (isRef(anchorValue) && anchorValue.current !== registeredPositionReferenceRef.current) { 8166 refs.setPositionReference(anchorValue.current); 8167 registeredPositionReferenceRef.current = anchorValue.current; 8168 } 8169 }, [mounted, refs, anchorDep, anchorValueRef]); 8170 React37.useEffect(() => { 8171 if (keepMounted && mounted && elements.reference && elements.floating) { 8172 return autoUpdate(elements.reference, elements.floating, update2, autoUpdateOptions); 8173 } 8174 return void 0; 8175 }, [keepMounted, mounted, elements, update2, autoUpdateOptions]); 8176 const renderedSide = getSide(renderedPlacement); 8177 const logicalRenderedSide = getLogicalSide(sideParam, renderedSide, isRtl); 8178 const renderedAlign = getAlignment(renderedPlacement) || "center"; 8179 const anchorHidden2 = Boolean(middlewareData.hide?.referenceHidden); 8180 useIsoLayoutEffect(() => { 8181 if (lazyFlip && mounted && isPositioned && (renderedSide !== side || lockAlign && renderedAlign !== placementAlign)) { 8182 setMountPlacement(renderedPlacement); 8183 } 8184 }, [lazyFlip, lockAlign, mounted, isPositioned, renderedPlacement, renderedSide, renderedAlign, side, placementAlign]); 8185 const arrowStyles = React37.useMemo(() => ({ 8186 position: "absolute", 8187 top: middlewareData.arrow?.y, 8188 left: middlewareData.arrow?.x 8189 }), [middlewareData.arrow]); 8190 const arrowUncentered = middlewareData.arrow?.centerOffset !== 0; 8191 return React37.useMemo(() => ({ 8192 positionerStyles: floatingStyles, 8193 arrowStyles, 8194 arrowRef, 8195 arrowUncentered, 8196 side: logicalRenderedSide, 8197 align: renderedAlign, 8198 physicalSide: renderedSide, 8199 anchorHidden: anchorHidden2, 8200 refs, 8201 context, 8202 isPositioned, 8203 update: update2 8204 }), [floatingStyles, arrowStyles, arrowRef, arrowUncentered, logicalRenderedSide, renderedAlign, renderedSide, anchorHidden2, refs, context, isPositioned, update2]); 8205 } 8206 function isRef(param) { 8207 return param != null && "current" in param; 8208 } 8209 8210 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/internals/getDisabledMountTransitionStyles.mjs 8211 function getDisabledMountTransitionStyles(transitionStatus) { 8212 return transitionStatus === "starting" ? DISABLED_TRANSITIONS_STYLE : EMPTY_OBJECT; 8213 } 8214 8215 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/usePositioner.mjs 8216 function usePositioner(componentProps, state, { 8217 styles, 8218 transitionStatus, 8219 props, 8220 refs, 8221 hidden, 8222 inert = false 8223 }) { 8224 const style = { 8225 ...styles 8226 }; 8227 if (inert) { 8228 style.pointerEvents = "none"; 8229 } 8230 return useRenderElement("div", componentProps, { 8231 state, 8232 ref: refs, 8233 props: [{ 8234 role: "presentation", 8235 hidden, 8236 style 8237 }, getDisabledMountTransitionStyles(transitionStatus), props], 8238 stateAttributesMapping: popupStateMapping 8239 }); 8240 } 8241 8242 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/button/Button.mjs 8243 var React38 = __toESM(require_react(), 1); 8244 var Button = /* @__PURE__ */ React38.forwardRef(function Button2(componentProps, forwardedRef) { 8245 const { 8246 render, 8247 className, 8248 disabled: disabled2 = false, 8249 focusableWhenDisabled = false, 8250 nativeButton = true, 8251 style, 8252 ...elementProps 8253 } = componentProps; 8254 const { 8255 getButtonProps, 8256 buttonRef 8257 } = useButton({ 8258 disabled: disabled2, 8259 focusableWhenDisabled, 8260 native: nativeButton 8261 }); 8262 const state = { 8263 disabled: disabled2 8264 }; 8265 return useRenderElement("button", componentProps, { 8266 state, 8267 ref: [forwardedRef, buttonRef], 8268 props: [elementProps, getButtonProps] 8269 }); 8270 }); 8271 if (true) Button.displayName = "Button"; 8272 8273 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/collapsible/index.parts.mjs 8274 var index_parts_exports = {}; 8275 __export(index_parts_exports, { 8276 Panel: () => CollapsiblePanel, 8277 Root: () => CollapsibleRoot, 8278 Trigger: () => CollapsibleTrigger 8279 }); 8280 8281 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/collapsible/root/CollapsibleRoot.mjs 8282 var React39 = __toESM(require_react(), 1); 8283 8284 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/collapsible/root/stateAttributesMapping.mjs 8285 var collapsibleStateAttributesMapping = { 8286 ...collapsibleOpenStateMapping, 8287 ...transitionStatusMapping 8288 }; 8289 8290 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/collapsible/root/CollapsibleRoot.mjs 8291 var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1); 8292 var CollapsibleRoot = /* @__PURE__ */ React39.forwardRef(function CollapsibleRoot2(componentProps, forwardedRef) { 8293 const { 8294 render, 8295 className, 8296 defaultOpen = false, 8297 disabled: disabled2 = false, 8298 onOpenChange: onOpenChangeProp, 8299 open: open3, 8300 style, 8301 ...elementProps 8302 } = componentProps; 8303 const onOpenChange = useStableCallback(onOpenChangeProp); 8304 const collapsible = useCollapsibleRoot({ 8305 open: open3, 8306 defaultOpen, 8307 onOpenChange, 8308 disabled: disabled2 8309 }); 8310 const state = React39.useMemo(() => ({ 8311 open: collapsible.open, 8312 disabled: collapsible.disabled, 8313 transitionStatus: collapsible.transitionStatus 8314 }), [collapsible.open, collapsible.disabled, collapsible.transitionStatus]); 8315 const contextValue = React39.useMemo(() => ({ 8316 ...collapsible, 8317 onOpenChange, 8318 state 8319 }), [collapsible, onOpenChange, state]); 8320 const element = useRenderElement("div", componentProps, { 8321 state, 8322 ref: forwardedRef, 8323 props: elementProps, 8324 stateAttributesMapping: collapsibleStateAttributesMapping 8325 }); 8326 return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CollapsibleRootContext.Provider, { 8327 value: contextValue, 8328 children: element 8329 }); 8330 }); 8331 if (true) CollapsibleRoot.displayName = "CollapsibleRoot"; 8332 8333 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/collapsible/trigger/CollapsibleTrigger.mjs 8334 var React40 = __toESM(require_react(), 1); 8335 var stateAttributesMapping = { 8336 ...triggerOpenStateMapping, 8337 ...transitionStatusMapping 8338 }; 8339 var CollapsibleTrigger = /* @__PURE__ */ React40.forwardRef(function CollapsibleTrigger2(componentProps, forwardedRef) { 8340 const { 8341 panelId, 8342 open: open3, 8343 handleTrigger, 8344 state, 8345 disabled: contextDisabled 8346 } = useCollapsibleRootContext(); 8347 const { 8348 className, 8349 disabled: disabled2 = contextDisabled, 8350 render, 8351 nativeButton = true, 8352 style, 8353 ...elementProps 8354 } = componentProps; 8355 const { 8356 getButtonProps, 8357 buttonRef 8358 } = useButton({ 8359 disabled: disabled2, 8360 native: nativeButton 8361 }); 8362 const element = useRenderElement("button", componentProps, { 8363 state, 8364 ref: [forwardedRef, buttonRef], 8365 props: [{ 8366 "aria-controls": open3 ? panelId : void 0, 8367 "aria-expanded": open3, 8368 onClick: handleTrigger 8369 }, elementProps, getButtonProps], 8370 stateAttributesMapping 8371 }); 8372 return element; 8373 }); 8374 if (true) CollapsibleTrigger.displayName = "CollapsibleTrigger"; 8375 8376 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/collapsible/panel/CollapsiblePanel.mjs 8377 var React41 = __toESM(require_react(), 1); 8378 8379 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/collapsible/panel/CollapsiblePanelCssVars.mjs 8380 var collapsiblePanelHeight = "--collapsible-panel-height"; 8381 var collapsiblePanelWidth = "--collapsible-panel-width"; 8382 8383 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/collapsible/panel/CollapsiblePanel.mjs 8384 var CollapsiblePanel = /* @__PURE__ */ React41.forwardRef(function CollapsiblePanel2(componentProps, forwardedRef) { 8385 const { 8386 className, 8387 hiddenUntilFound: hiddenUntilFoundProp, 8388 keepMounted: keepMountedProp, 8389 render, 8390 id: idProp, 8391 style, 8392 ...elementProps 8393 } = componentProps; 8394 if (true) { 8395 React41.useEffect(() => { 8396 if (hiddenUntilFoundProp && keepMountedProp === false) { 8397 warn("The `keepMounted={false}` prop on `Collapsible.Panel` is ignored when `hiddenUntilFound` is enabled, since the panel must remain mounted while closed."); 8398 } 8399 }, [hiddenUntilFoundProp, keepMountedProp]); 8400 } 8401 const { 8402 defaultPanelId, 8403 mounted, 8404 onOpenChange, 8405 open: open3, 8406 setMounted, 8407 setPanelIdState, 8408 setOpen, 8409 state, 8410 transitionStatus 8411 } = useCollapsibleRootContext(); 8412 const hiddenUntilFound = hiddenUntilFoundProp ?? false; 8413 const keepMounted = keepMountedProp ?? false; 8414 const registeredId = idProp || void 0; 8415 const id = registeredId ?? defaultPanelId; 8416 useIsoLayoutEffect(() => { 8417 setPanelIdState((currentId) => registeredId ?? (currentId === null ? void 0 : currentId)); 8418 return () => { 8419 setPanelIdState((currentId) => currentId === registeredId ? null : currentId); 8420 }; 8421 }, [registeredId, setPanelIdState]); 8422 const { 8423 height, 8424 props, 8425 ref, 8426 shouldPreventOpenAnimation, 8427 shouldRender, 8428 transitionStatus: panelTransitionStatus, 8429 width 8430 } = useCollapsiblePanel({ 8431 externalRef: forwardedRef, 8432 hiddenUntilFound, 8433 id, 8434 keepMounted, 8435 mounted, 8436 onOpenChange, 8437 open: open3, 8438 setMounted, 8439 setOpen, 8440 transitionStatus 8441 }); 8442 const panelState = { 8443 ...state, 8444 transitionStatus: panelTransitionStatus 8445 }; 8446 const resolvedStyle = resolveStyle(style, panelState); 8447 const element = useRenderElement("div", { 8448 ...componentProps, 8449 style: void 0 8450 }, { 8451 state: panelState, 8452 ref, 8453 props: [ 8454 props, 8455 { 8456 style: { 8457 [collapsiblePanelHeight]: height === void 0 ? "auto" : `$height}px`, 8458 [collapsiblePanelWidth]: width === void 0 ? "auto" : `$width}px` 8459 } 8460 }, 8461 elementProps, 8462 resolvedStyle ? { 8463 style: resolvedStyle 8464 } : void 0, 8465 // Resolve the public `style` prop so temporary `animationName: 'none'` 8466 // can still win after user's inline styles have been merged. 8467 shouldPreventOpenAnimation ? { 8468 style: { 8469 animationName: "none" 8470 } 8471 } : void 0 8472 ], 8473 stateAttributesMapping: collapsibleStateAttributesMapping 8474 }); 8475 if (!shouldRender) { 8476 return null; 8477 } 8478 return element; 8479 }); 8480 if (true) CollapsiblePanel.displayName = "CollapsiblePanel"; 8481 8482 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/usePopupViewport.mjs 8483 var React45 = __toESM(require_react(), 1); 8484 var ReactDOM6 = __toESM(require_react_dom(), 1); 8485 8486 // node_modules/.store/@base-ui/utils@0.5.0--7My7Lubseca8je9LSEweA/node_modules/@base-ui/utils/usePreviousValue.mjs 8487 var React42 = __toESM(require_react(), 1); 8488 function usePreviousValue(value) { 8489 const [state, setState] = React42.useState({ 8490 current: value, 8491 previous: null 8492 }); 8493 if (!Object.is(value, state.current)) { 8494 setState({ 8495 current: value, 8496 previous: state.current 8497 }); 8498 } 8499 return state.previous; 8500 } 8501 8502 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/usePopupAutoResize.mjs 8503 var React43 = __toESM(require_react(), 1); 8504 8505 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/getCssDimensions.mjs 8506 function getCssDimensions2(element) { 8507 const css = getComputedStyle2(element); 8508 let width = parseFloat(css.width) || 0; 8509 let height = parseFloat(css.height) || 0; 8510 const hasOffset = isHTMLElement(element); 8511 const offsetWidth = hasOffset ? element.offsetWidth : width; 8512 const offsetHeight = hasOffset ? element.offsetHeight : height; 8513 const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight; 8514 if (shouldFallback) { 8515 width = offsetWidth; 8516 height = offsetHeight; 8517 } 8518 return { 8519 width, 8520 height 8521 }; 8522 } 8523 8524 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/CommonPopupCssVars.mjs 8525 var popupWidth = "--popup-width"; 8526 var popupHeight = "--popup-height"; 8527 8528 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/usePopupAutoResize.mjs 8529 function usePopupAutoResize(parameters) { 8530 const { 8531 popupElement, 8532 positionerElement, 8533 content, 8534 mounted, 8535 onMeasureLayout: onMeasureLayoutParam, 8536 onMeasureLayoutComplete: onMeasureLayoutCompleteParam, 8537 side, 8538 direction 8539 } = parameters; 8540 const runOnceAnimationsFinish = useAnimationsFinished(popupElement, true); 8541 const animationFrame = useAnimationFrame(); 8542 const committedDimensionsRef = React43.useRef(null); 8543 const onMeasureLayout = useStableCallback(onMeasureLayoutParam); 8544 const onMeasureLayoutComplete = useStableCallback(onMeasureLayoutCompleteParam); 8545 const anchoringStyles = React43.useMemo(() => getPopupAnchoringStyles(side, direction), [side, direction]); 8546 useIsoLayoutEffect(() => { 8547 if (!mounted) { 8548 committedDimensionsRef.current = null; 8549 return void 0; 8550 } 8551 if (!popupElement || !positionerElement) { 8552 return void 0; 8553 } 8554 const restoreAnchoringStyles = applyElementStyles(popupElement, anchoringStyles); 8555 setPopupCssSize(popupElement, "auto"); 8556 const restorePopupPosition = overrideElementStyle(popupElement, "position", "static"); 8557 const restorePopupTransform = overrideElementStyle(popupElement, "transform", "none"); 8558 const restorePopupScale = overrideElementStyle(popupElement, "scale", "1"); 8559 const restorePositionerAvailableSize = applyElementStyles(positionerElement, { 8560 [availableWidth]: "max-content", 8561 [availableHeight]: "max-content" 8562 }); 8563 function restoreMeasurementOverrides() { 8564 restorePopupPosition(); 8565 restorePopupTransform(); 8566 restorePositionerAvailableSize(); 8567 restorePopupScale(); 8568 } 8569 onMeasureLayout?.(); 8570 if (committedDimensionsRef.current === null) { 8571 setPositionerCssSize(positionerElement, "max-content"); 8572 const dimensions = getCssDimensions2(popupElement); 8573 committedDimensionsRef.current = dimensions; 8574 setPositionerCssSize(positionerElement, dimensions); 8575 restoreMeasurementOverrides(); 8576 onMeasureLayoutComplete?.(null, dimensions); 8577 return restoreAnchoringStyles; 8578 } 8579 setPositionerCssSize(positionerElement, "max-content"); 8580 const previousDimensions = committedDimensionsRef.current; 8581 const newDimensions = getCssDimensions2(popupElement); 8582 committedDimensionsRef.current = newDimensions; 8583 setPopupCssSize(popupElement, previousDimensions); 8584 restoreMeasurementOverrides(); 8585 onMeasureLayoutComplete?.(previousDimensions, newDimensions); 8586 setPositionerCssSize(positionerElement, newDimensions); 8587 const abortController = new AbortController(); 8588 animationFrame.request(() => { 8589 setPopupCssSize(popupElement, newDimensions); 8590 runOnceAnimationsFinish(() => { 8591 popupElement.style.setProperty(popupWidth, "auto"); 8592 popupElement.style.setProperty(popupHeight, "auto"); 8593 }, abortController.signal); 8594 }); 8595 return () => { 8596 abortController.abort(); 8597 animationFrame.cancel(); 8598 restoreAnchoringStyles(); 8599 }; 8600 }, [content, popupElement, positionerElement, runOnceAnimationsFinish, animationFrame, mounted, onMeasureLayout, onMeasureLayoutComplete, anchoringStyles]); 8601 } 8602 function getPopupAnchoringStyles(side, direction) { 8603 const isPhysicalTop = side === "top"; 8604 const isPhysicalLeft = side === "left" || side === (direction === "rtl" ? "inline-end" : "inline-start"); 8605 if (!isPhysicalTop && !isPhysicalLeft) { 8606 return EMPTY_OBJECT; 8607 } 8608 return { 8609 position: "absolute", 8610 [isPhysicalTop ? "bottom" : "top"]: "0", 8611 [isPhysicalLeft ? "right" : "left"]: "0" 8612 }; 8613 } 8614 function overrideElementStyle(element, property, value) { 8615 const originalValue = element.style.getPropertyValue(property); 8616 element.style.setProperty(property, value); 8617 return () => { 8618 element.style.setProperty(property, originalValue); 8619 }; 8620 } 8621 function applyElementStyles(element, styles) { 8622 const restorers = []; 8623 for (const [key, value] of Object.entries(styles)) { 8624 restorers.push(overrideElementStyle(element, key, value)); 8625 } 8626 return restorers.length ? () => { 8627 restorers.forEach((restore) => restore()); 8628 } : NOOP; 8629 } 8630 function setPopupCssSize(popupElement, size4) { 8631 const width = size4 === "auto" ? "auto" : `$size4.width}px`; 8632 const height = size4 === "auto" ? "auto" : `$size4.height}px`; 8633 popupElement.style.setProperty(popupWidth, width); 8634 popupElement.style.setProperty(popupHeight, height); 8635 } 8636 function setPositionerCssSize(positionerElement, size4) { 8637 const width = size4 === "max-content" ? "max-content" : `$size4.width}px`; 8638 const height = size4 === "max-content" ? "max-content" : `$size4.height}px`; 8639 positionerElement.style.setProperty(positionerWidth, width); 8640 positionerElement.style.setProperty(positionerHeight, height); 8641 } 8642 8643 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/direction-provider/DirectionProvider.mjs 8644 var React44 = __toESM(require_react(), 1); 8645 var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1); 8646 var DirectionProvider = function DirectionProvider2(props) { 8647 const { 8648 direction = "ltr" 8649 } = props; 8650 const contextValue = React44.useMemo(() => ({ 8651 direction 8652 }), [direction]); 8653 return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DirectionContext.Provider, { 8654 value: contextValue, 8655 children: props.children 8656 }); 8657 }; 8658 if (true) DirectionProvider.displayName = "DirectionProvider"; 8659 8660 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/adaptiveOriginMiddleware.mjs 8661 var adaptiveOrigin = { 8662 name: "adaptiveOrigin", 8663 async fn(state) { 8664 const { 8665 x: rawX, 8666 y: rawY, 8667 rects: { 8668 floating: floatRect 8669 }, 8670 elements: { 8671 floating 8672 }, 8673 platform: platform3, 8674 strategy, 8675 placement 8676 } = state; 8677 const win = getWindow(floating); 8678 const styles = win.getComputedStyle(floating); 8679 const hasTransition = styles.transitionDuration !== "0s" && styles.transitionDuration !== ""; 8680 if (!hasTransition) { 8681 return { 8682 x: rawX, 8683 y: rawY, 8684 data: DEFAULT_SIDES 8685 }; 8686 } 8687 const offsetParent = await platform3.getOffsetParent?.(floating); 8688 let offsetDimensions = { 8689 width: 0, 8690 height: 0 8691 }; 8692 if (strategy === "fixed" && win?.visualViewport) { 8693 offsetDimensions = { 8694 width: win.visualViewport.width, 8695 height: win.visualViewport.height 8696 }; 8697 } else if (offsetParent === win) { 8698 const doc = ownerDocument(floating); 8699 offsetDimensions = { 8700 width: doc.documentElement.clientWidth, 8701 height: doc.documentElement.clientHeight 8702 }; 8703 } else if (await platform3.isElement?.(offsetParent)) { 8704 offsetDimensions = await platform3.getDimensions(offsetParent); 8705 } 8706 const currentSide = getSide(placement); 8707 let x = rawX; 8708 let y = rawY; 8709 if (currentSide === "left") { 8710 x = offsetDimensions.width - (rawX + floatRect.width); 8711 } 8712 if (currentSide === "top") { 8713 y = offsetDimensions.height - (rawY + floatRect.height); 8714 } 8715 const sideX = currentSide === "left" ? "right" : DEFAULT_SIDES.sideX; 8716 const sideY = currentSide === "top" ? "bottom" : DEFAULT_SIDES.sideY; 8717 return { 8718 x, 8719 y, 8720 data: { 8721 sideX, 8722 sideY 8723 } 8724 }; 8725 } 8726 }; 8727 8728 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/CommonViewportDataAttributes.mjs 8729 var activationDirection = "data-activation-direction"; 8730 8731 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/usePopupViewport.mjs 8732 var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1); 8733 var popupViewportStateMapping = { 8734 activationDirection: (value) => value ? { 8735 [activationDirection]: value 8736 } : null 8737 }; 8738 function usePopupViewport(parameters) { 8739 const { 8740 store: store2, 8741 side, 8742 children 8743 } = parameters; 8744 const direction = useDirection(); 8745 const activeTrigger = store2.useState("activeTriggerElement"); 8746 const activeTriggerId = store2.useState("activeTriggerId"); 8747 const open3 = store2.useState("open"); 8748 const payload = store2.useState("payload"); 8749 const mounted = store2.useState("mounted"); 8750 const popupElement = store2.useState("popupElement"); 8751 const positionerElement = store2.useState("positionerElement"); 8752 const previousActiveTrigger = usePreviousValue(open3 ? activeTrigger : null); 8753 const currentContentKey = usePopupContentKey(activeTriggerId, payload); 8754 const capturedNodeRef = React45.useRef(null); 8755 const [previousContentNode, setPreviousContentNode] = React45.useState(null); 8756 const [newTriggerOffset, setNewTriggerOffset] = React45.useState(null); 8757 const currentContainerRef = React45.useRef(null); 8758 const previousContainerRef = React45.useRef(null); 8759 const onAnimationsFinished = useAnimationsFinished(currentContainerRef, true); 8760 const cleanupFrame = useAnimationFrame(); 8761 const cleanupControllerRef = React45.useRef(null); 8762 const [previousContentDimensions, setPreviousContentDimensions] = React45.useState(null); 8763 const [showStartingStyleAttribute, setShowStartingStyleAttribute] = React45.useState(false); 8764 useIsoLayoutEffect(() => { 8765 store2.set("adaptiveOrigin", adaptiveOrigin); 8766 return () => { 8767 store2.set("adaptiveOrigin", void 0); 8768 }; 8769 }, [store2]); 8770 const handleMeasureLayout = useStableCallback(() => { 8771 currentContainerRef.current?.style.setProperty("animation", "none"); 8772 currentContainerRef.current?.style.setProperty("transition", "none"); 8773 previousContainerRef.current?.style.setProperty("display", "none"); 8774 }); 8775 const handleMeasureLayoutComplete = useStableCallback((previousDimensions) => { 8776 currentContainerRef.current?.style.removeProperty("animation"); 8777 currentContainerRef.current?.style.removeProperty("transition"); 8778 previousContainerRef.current?.style.removeProperty("display"); 8779 if (previousDimensions) { 8780 setPreviousContentDimensions(previousDimensions); 8781 } 8782 }); 8783 const armViewportCleanup = useStableCallback(() => { 8784 cleanupControllerRef.current?.abort(); 8785 const controller = new AbortController(); 8786 cleanupControllerRef.current = controller; 8787 onAnimationsFinished(() => { 8788 setPreviousContentNode(null); 8789 setPreviousContentDimensions(null); 8790 capturedNodeRef.current = null; 8791 }, controller.signal); 8792 }); 8793 const lastHandledTriggerRef = React45.useRef(null); 8794 useIsoLayoutEffect(() => { 8795 if (!open3 || !mounted) { 8796 lastHandledTriggerRef.current = null; 8797 } 8798 }, [open3, mounted]); 8799 useIsoLayoutEffect(() => { 8800 if (open3 && activeTrigger && previousActiveTrigger && activeTrigger !== previousActiveTrigger && lastHandledTriggerRef.current !== activeTrigger && capturedNodeRef.current) { 8801 setPreviousContentNode(capturedNodeRef.current); 8802 setShowStartingStyleAttribute(true); 8803 const offset4 = calculateRelativePosition(previousActiveTrigger, activeTrigger); 8804 setNewTriggerOffset(offset4); 8805 lastHandledTriggerRef.current = activeTrigger; 8806 } 8807 }, [open3, activeTrigger, previousActiveTrigger]); 8808 useIsoLayoutEffect(() => { 8809 if (previousContentNode == null) { 8810 return; 8811 } 8812 cleanupControllerRef.current?.abort(); 8813 setShowStartingStyleAttribute(true); 8814 cleanupFrame.request(() => { 8815 ReactDOM6.flushSync(() => { 8816 setShowStartingStyleAttribute(false); 8817 }); 8818 armViewportCleanup(); 8819 }); 8820 }, [currentContentKey, previousContentNode, armViewportCleanup, cleanupFrame]); 8821 useIsoLayoutEffect(() => { 8822 const source = currentContainerRef.current; 8823 if (!source) { 8824 return; 8825 } 8826 const wrapper = ownerDocument(source).createElement("div"); 8827 for (const child of Array.from(source.childNodes)) { 8828 wrapper.appendChild(child.cloneNode(true)); 8829 } 8830 capturedNodeRef.current = wrapper; 8831 }); 8832 const isTransitioning = previousContentNode != null; 8833 let childrenToRender; 8834 if (!isTransitioning) { 8835 childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { 8836 "data-current": true, 8837 ref: currentContainerRef, 8838 children 8839 }, currentContentKey); 8840 } else { 8841 childrenToRender = /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(React45.Fragment, { 8842 children: [/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { 8843 "data-previous": true, 8844 inert: inertValue(true), 8845 ref: previousContainerRef, 8846 style: { 8847 ...previousContentDimensions ? { 8848 [popupWidth]: `$previousContentDimensions.width}px`, 8849 [popupHeight]: `$previousContentDimensions.height}px` 8850 } : null, 8851 position: "absolute" 8852 }, 8853 "data-ending-style": showStartingStyleAttribute ? void 0 : "" 8854 }, "previous"), /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { 8855 "data-current": true, 8856 ref: currentContainerRef, 8857 "data-starting-style": showStartingStyleAttribute ? "" : void 0, 8858 children 8859 }, currentContentKey)] 8860 }); 8861 } 8862 useIsoLayoutEffect(() => { 8863 const container = previousContainerRef.current; 8864 if (!container || !previousContentNode) { 8865 return; 8866 } 8867 container.replaceChildren(...Array.from(previousContentNode.childNodes)); 8868 }, [previousContentNode]); 8869 usePopupAutoResize({ 8870 popupElement, 8871 positionerElement, 8872 mounted, 8873 content: payload, 8874 onMeasureLayout: handleMeasureLayout, 8875 onMeasureLayoutComplete: handleMeasureLayoutComplete, 8876 side, 8877 direction 8878 }); 8879 const state = { 8880 activationDirection: getActivationDirection(newTriggerOffset), 8881 transitioning: isTransitioning 8882 }; 8883 return { 8884 children: childrenToRender, 8885 state 8886 }; 8887 } 8888 function getActivationDirection(offset4) { 8889 if (!offset4) { 8890 return void 0; 8891 } 8892 return `$getValueWithTolerance(offset4.horizontal, 5, "right", "left")} $getValueWithTolerance(offset4.vertical, 5, "down", "up")}`; 8893 } 8894 function getValueWithTolerance(value, tolerance, positiveLabel, negativeLabel) { 8895 if (value > tolerance) { 8896 return positiveLabel; 8897 } 8898 if (value < -tolerance) { 8899 return negativeLabel; 8900 } 8901 return ""; 8902 } 8903 function calculateRelativePosition(from, to) { 8904 const fromRect = from.getBoundingClientRect(); 8905 const toRect = to.getBoundingClientRect(); 8906 const fromCenter = { 8907 x: fromRect.left + fromRect.width / 2, 8908 y: fromRect.top + fromRect.height / 2 8909 }; 8910 const toCenter = { 8911 x: toRect.left + toRect.width / 2, 8912 y: toRect.top + toRect.height / 2 8913 }; 8914 return { 8915 horizontal: toCenter.x - fromCenter.x, 8916 vertical: toCenter.y - fromCenter.y 8917 }; 8918 } 8919 function usePopupContentKey(activeTriggerId, payload) { 8920 const [contentKey, setContentKey] = React45.useState(0); 8921 const previousActiveTriggerIdRef = React45.useRef(activeTriggerId); 8922 const previousPayloadRef = React45.useRef(payload); 8923 const pendingPayloadUpdateRef = React45.useRef(false); 8924 useIsoLayoutEffect(() => { 8925 const previousActiveTriggerId = previousActiveTriggerIdRef.current; 8926 const previousPayload = previousPayloadRef.current; 8927 const triggerIdChanged = activeTriggerId !== previousActiveTriggerId; 8928 const payloadChanged = payload !== previousPayload; 8929 if (triggerIdChanged) { 8930 setContentKey((value) => value + 1); 8931 pendingPayloadUpdateRef.current = !payloadChanged; 8932 } else if (pendingPayloadUpdateRef.current && payloadChanged) { 8933 setContentKey((value) => value + 1); 8934 pendingPayloadUpdateRef.current = false; 8935 } 8936 previousActiveTriggerIdRef.current = activeTriggerId; 8937 previousPayloadRef.current = payload; 8938 }, [activeTriggerId, payload]); 8939 return `$activeTriggerId ?? "current"}-$contentKey}`; 8940 } 8941 8942 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/utils/FloatingPortalLite.mjs 8943 var React46 = __toESM(require_react(), 1); 8944 var ReactDOM7 = __toESM(require_react_dom(), 1); 8945 var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1); 8946 var FloatingPortalLite = /* @__PURE__ */ React46.forwardRef(function FloatingPortalLite2(componentProps, forwardedRef) { 8947 const { 8948 children, 8949 container, 8950 className, 8951 render, 8952 style, 8953 ...elementProps 8954 } = componentProps; 8955 const { 8956 node: portalNode, 8957 subtree: portalSubtree 8958 } = useFloatingPortalNode({ 8959 container, 8960 ref: forwardedRef, 8961 componentProps, 8962 elementProps 8963 }); 8964 if (!portalSubtree && !portalNode) { 8965 return null; 8966 } 8967 return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(React46.Fragment, { 8968 children: [portalSubtree, portalNode && /* @__PURE__ */ ReactDOM7.createPortal(children, portalNode)] 8969 }); 8970 }); 8971 if (true) FloatingPortalLite.displayName = "FloatingPortalLite"; 8972 8973 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/index.parts.mjs 8974 var index_parts_exports2 = {}; 8975 __export(index_parts_exports2, { 8976 Arrow: () => TooltipArrow, 8977 Handle: () => TooltipHandle, 8978 Popup: () => TooltipPopup, 8979 Portal: () => TooltipPortal, 8980 Positioner: () => TooltipPositioner, 8981 Provider: () => TooltipProvider, 8982 Root: () => TooltipRoot, 8983 Trigger: () => TooltipTrigger, 8984 Viewport: () => TooltipViewport, 8985 createHandle: () => createTooltipHandle 8986 }); 8987 8988 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs 8989 var React49 = __toESM(require_react(), 1); 8990 8991 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/root/TooltipRootContext.mjs 8992 var React47 = __toESM(require_react(), 1); 8993 var TooltipRootContext = /* @__PURE__ */ React47.createContext(void 0); 8994 if (true) TooltipRootContext.displayName = "TooltipRootContext"; 8995 function useTooltipRootContext(optional) { 8996 const context = React47.useContext(TooltipRootContext); 8997 if (context === void 0 && !optional) { 8998 throw new Error(true ? "Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>." : formatErrorMessage_default(72)); 8999 } 9000 return context; 9001 } 9002 9003 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/store/TooltipStore.mjs 9004 var React48 = __toESM(require_react(), 1); 9005 var selectors2 = { 9006 ...popupStoreSelectors, 9007 disabled: (state) => state.disabled, 9008 instantType: (state) => state.instantType, 9009 isInstantPhase: (state) => state.isInstantPhase, 9010 trackCursorAxis: (state) => state.trackCursorAxis, 9011 disableHoverablePopup: (state) => state.disableHoverablePopup, 9012 lastOpenChangeReason: (state) => state.openChangeReason, 9013 closeOnClick: (state) => state.closeOnClick, 9014 // Active and inactive trigger props are the same object, so a constant for triggers that discard 9015 // them keeps those triggers from re-rendering when the props change. 9016 appliedTriggerProps: (state, apply) => apply ? state.activeTriggerProps : void 0, 9017 closeDelay: (state) => state.closeDelay, 9018 adaptiveOrigin: (state) => state.adaptiveOrigin 9019 }; 9020 var TooltipStore = class extends ReactStore { 9021 constructor(initialState, floatingId, nested) { 9022 const triggerElements = new PopupTriggerMap(); 9023 super(createInitialState(initialState, triggerElements, floatingId, nested), createInitialContext(triggerElements), selectors2); 9024 } 9025 setOpen = (nextOpen, eventDetails) => { 9026 applyPopupOpenChange(this, nextOpen, eventDetails, { 9027 extraState: { 9028 openChangeReason: eventDetails.reason 9029 } 9030 }); 9031 }; 9032 // Used by trigger clicks to clear a delayed hover open without reporting a public open-state change. 9033 cancelPendingOpen(event) { 9034 this.state.floatingRootContext.dispatchOpenChange(false, createChangeEventDetails(reason_parts_exports.triggerPress, event)); 9035 } 9036 }; 9037 function createNullTooltipStore() { 9038 const triggerElements = new PopupTriggerMap(); 9039 const store2 = new NullStore(Object.freeze(createInitialState(void 0, triggerElements)), Object.freeze(createInitialContext(triggerElements)), selectors2); 9040 return Object.assign(store2, { 9041 setOpen: NOOP, 9042 cancelPendingOpen: NOOP 9043 }); 9044 } 9045 function createInitialState(initialState, triggerElements, floatingId, nested = false) { 9046 const state = { 9047 ...createInitialPopupStoreState(triggerElements, floatingId, nested), 9048 disabled: false, 9049 instantType: void 0, 9050 isInstantPhase: false, 9051 trackCursorAxis: "none", 9052 disableHoverablePopup: false, 9053 openChangeReason: null, 9054 closeOnClick: true, 9055 closeDelay: 0, 9056 adaptiveOrigin: void 0, 9057 ...initialState 9058 }; 9059 return state; 9060 } 9061 function createInitialContext(triggerElements) { 9062 return { 9063 popupRef: /* @__PURE__ */ React48.createRef(), 9064 onOpenChange: void 0, 9065 onOpenChangeComplete: void 0, 9066 triggerElements 9067 }; 9068 } 9069 9070 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/root/TooltipRoot.mjs 9071 var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1); 9072 var TooltipRoot = fastComponent(function TooltipRoot2(props) { 9073 const { 9074 disabled: disabled2 = false, 9075 defaultOpen = false, 9076 open: openProp, 9077 disableHoverablePopup = false, 9078 trackCursorAxis = "none", 9079 actionsRef, 9080 onOpenChange, 9081 onOpenChangeComplete, 9082 handle, 9083 triggerId: triggerIdProp, 9084 defaultTriggerId: defaultTriggerIdProp = null, 9085 children 9086 } = props; 9087 const store2 = usePopupRootStore((floatingId, nested) => new TooltipStore({ 9088 open: defaultOpen, 9089 openProp, 9090 activeTriggerId: defaultTriggerIdProp, 9091 triggerIdProp 9092 }, floatingId, nested)); 9093 store2.useControlledProp("openProp", openProp); 9094 store2.useControlledProp("triggerIdProp", triggerIdProp); 9095 store2.useContextCallback("onOpenChange", onOpenChange); 9096 store2.useContextCallback("onOpenChangeComplete", onOpenChangeComplete); 9097 const openState = store2.useState("open"); 9098 const open3 = !disabled2 && openState; 9099 const activeTriggerId = store2.useState("activeTriggerId"); 9100 const mounted = store2.useState("mounted"); 9101 const payload = store2.useState("payload"); 9102 store2.useSyncedValues({ 9103 trackCursorAxis, 9104 disableHoverablePopup, 9105 disabled: disabled2 9106 }); 9107 useImplicitActiveTrigger(store2, { 9108 closeOnActiveTriggerUnmount: true 9109 }); 9110 const { 9111 forceUnmount, 9112 transitionStatus 9113 } = useOpenStateTransitions(open3, store2); 9114 const isInstantPhase = store2.useState("isInstantPhase"); 9115 const instantType = store2.useState("instantType"); 9116 const lastOpenChangeReason = store2.useState("lastOpenChangeReason"); 9117 const previousInstantTypeRef = React49.useRef(null); 9118 useIsoLayoutEffect(() => { 9119 if (openState && disabled2) { 9120 store2.setOpen(false, createChangeEventDetails(reason_parts_exports.disabled)); 9121 } 9122 }, [openState, disabled2, store2]); 9123 useIsoLayoutEffect(() => { 9124 if (transitionStatus === "ending" && lastOpenChangeReason === reason_parts_exports.none || transitionStatus !== "ending" && isInstantPhase) { 9125 if (instantType !== "delay") { 9126 previousInstantTypeRef.current = instantType; 9127 } 9128 store2.set("instantType", "delay"); 9129 } else if (previousInstantTypeRef.current !== null) { 9130 store2.set("instantType", previousInstantTypeRef.current); 9131 previousInstantTypeRef.current = null; 9132 } 9133 }, [transitionStatus, isInstantPhase, lastOpenChangeReason, instantType, store2]); 9134 useIsoLayoutEffect(() => { 9135 if (open3) { 9136 if (activeTriggerId == null) { 9137 store2.set("payload", void 0); 9138 } 9139 } 9140 }, [store2, activeTriggerId, open3]); 9141 React49.useImperativeHandle(actionsRef, () => ({ 9142 unmount: forceUnmount, 9143 close: () => store2.setOpen(false, createChangeEventDetails(reason_parts_exports.imperativeAction)) 9144 }), [forceUnmount, store2]); 9145 const shouldRenderInteractions = open3 || mounted || !disabled2 && trackCursorAxis !== "none"; 9146 return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(TooltipRootContext.Provider, { 9147 value: store2, 9148 children: [handle && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PopupHandleAttachment, { 9149 handle, 9150 store: store2 9151 }), shouldRenderInteractions && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TooltipInteractions, { 9152 store: store2, 9153 disabled: disabled2, 9154 trackCursorAxis 9155 }), typeof children === "function" ? children({ 9156 payload 9157 }) : children] 9158 }); 9159 }); 9160 if (true) TooltipRoot.displayName = "TooltipRoot"; 9161 function TooltipInteractions({ 9162 store: store2, 9163 disabled: disabled2, 9164 trackCursorAxis 9165 }) { 9166 const floatingRootContext = store2.useState("floatingRootContext"); 9167 const dismiss = useDismiss(floatingRootContext, { 9168 enabled: !disabled2, 9169 referencePress: () => store2.select("closeOnClick") 9170 }); 9171 const clientPoint = useClientPoint(floatingRootContext, { 9172 enabled: !disabled2 && trackCursorAxis !== "none", 9173 axis: trackCursorAxis === "none" ? void 0 : trackCursorAxis 9174 }); 9175 const triggerProps = React49.useMemo(() => mergeProps(clientPoint.reference, dismiss.reference), [clientPoint.reference, dismiss.reference]); 9176 usePopupInteractionProps(store2, { 9177 activeTriggerProps: triggerProps, 9178 inactiveTriggerProps: triggerProps, 9179 popupProps: dismiss.floating ?? EMPTY_OBJECT 9180 }); 9181 return null; 9182 } 9183 9184 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs 9185 var React51 = __toESM(require_react(), 1); 9186 9187 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/provider/TooltipProviderContext.mjs 9188 var React50 = __toESM(require_react(), 1); 9189 var TooltipProviderContext = /* @__PURE__ */ React50.createContext(void 0); 9190 if (true) TooltipProviderContext.displayName = "TooltipProviderContext"; 9191 function useTooltipProviderContext() { 9192 return React50.useContext(TooltipProviderContext); 9193 } 9194 9195 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/utils/constants.mjs 9196 var OPEN_DELAY = 600; 9197 9198 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/trigger/TooltipTrigger.mjs 9199 var TOOLTIP_TRIGGER_IDENTIFIER = "data-base-ui-tooltip-trigger"; 9200 function getTargetElement(event) { 9201 const target = getTarget(event); 9202 return isElement(target) ? target : null; 9203 } 9204 var TooltipTrigger = fastComponentRef(function TooltipTrigger2(componentProps, forwardedRef) { 9205 const { 9206 render, 9207 className, 9208 style, 9209 handle, 9210 payload, 9211 disabled: disabledProp, 9212 delay, 9213 closeOnClick = true, 9214 closeDelay, 9215 id: idProp, 9216 ...elementProps 9217 } = componentProps; 9218 const rootContext = useTooltipRootContext(true); 9219 const handleStore = usePopupHandleStore(handle); 9220 const store2 = handleStore ?? rootContext; 9221 if (!store2) { 9222 throw new Error(true ? "Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle." : formatErrorMessage_default(82)); 9223 } 9224 const thisTriggerId = useBaseUiId(idProp); 9225 const isTriggerActive = store2.useState("isTriggerActive", thisTriggerId); 9226 const isOpenedByThisTrigger = store2.useState("isOpenedByTrigger", thisTriggerId); 9227 const floatingRootContext = store2.useState("floatingRootContext"); 9228 const triggerElementRef = React51.useRef(null); 9229 const closeDelayWithDefault = closeDelay ?? 0; 9230 const { 9231 registerTrigger, 9232 isMountedByThisTrigger 9233 } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store2, { 9234 payload, 9235 closeOnClick, 9236 closeDelay: closeDelayWithDefault 9237 }); 9238 const providerDelay = useTooltipProviderContext(); 9239 const { 9240 activeIdRef, 9241 delayRef, 9242 isInstantPhase, 9243 hasProvider 9244 } = useDelayGroup(floatingRootContext, { 9245 open: isOpenedByThisTrigger 9246 }); 9247 const hoverInteraction = useHoverInteractionSharedState(floatingRootContext); 9248 store2.useSyncedValue("isInstantPhase", isInstantPhase); 9249 const rootDisabled = store2.useState("disabled"); 9250 const disabled2 = disabledProp ?? rootDisabled; 9251 const disabledRef = useValueAsRef(disabled2); 9252 const trackCursorAxis = store2.useState("trackCursorAxis"); 9253 const disableHoverablePopup = store2.useState("disableHoverablePopup"); 9254 const isNestedTriggerHoveredRef = React51.useRef(false); 9255 const nestedTriggerOpenTimeout = useTimeout(); 9256 const pointerTypeRef = React51.useRef(void 0); 9257 function getOpenDelay() { 9258 if (hasProvider && activeIdRef.current != null) { 9259 return 0; 9260 } 9261 return delay ?? providerDelay ?? OPEN_DELAY; 9262 } 9263 function isEnabledNestedTriggerTarget(target) { 9264 const triggerEl = triggerElementRef.current; 9265 if (!triggerEl || !target) { 9266 return false; 9267 } 9268 const nearestTrigger = closest(target, `[$TOOLTIP_TRIGGER_IDENTIFIER}]`); 9269 return nearestTrigger !== null && nearestTrigger !== triggerEl && contains(triggerEl, nearestTrigger); 9270 } 9271 function detectNestedTriggerHover(target) { 9272 const nestedTriggerHovered = isEnabledNestedTriggerTarget(target); 9273 isNestedTriggerHoveredRef.current = nestedTriggerHovered; 9274 if (nestedTriggerHovered) { 9275 hoverInteraction.openChangeTimeout.clear(); 9276 hoverInteraction.restTimeout.clear(); 9277 hoverInteraction.restTimeoutPending = false; 9278 nestedTriggerOpenTimeout.clear(); 9279 } 9280 return nestedTriggerHovered; 9281 } 9282 const hoverProps = useHoverReferenceInteraction(floatingRootContext, { 9283 enabled: !disabled2, 9284 mouseOnly: true, 9285 move: false, 9286 handleClose: !disableHoverablePopup && trackCursorAxis !== "both" ? safePolygon() : null, 9287 restMs: getOpenDelay, 9288 delay() { 9289 if (closeDelay == null && hasProvider) { 9290 return { 9291 close: getDelay(delayRef.current, "close") 9292 }; 9293 } 9294 return { 9295 close: closeDelayWithDefault 9296 }; 9297 }, 9298 triggerElementRef, 9299 isActiveTrigger: isTriggerActive, 9300 isClosing: () => store2.select("transitionStatus") === "ending", 9301 shouldOpen() { 9302 return !isNestedTriggerHoveredRef.current; 9303 } 9304 }); 9305 const focusProps = useFocus(floatingRootContext, { 9306 enabled: !disabled2 9307 }).reference; 9308 const handleNestedTriggerHover = (event) => { 9309 const wasNestedTriggerHovered = isNestedTriggerHoveredRef.current; 9310 const target = getTargetElement(event); 9311 const nestedTriggerHovered = detectNestedTriggerHover(target); 9312 const triggerEl = triggerElementRef.current; 9313 const targetInsideTrigger = triggerEl && target && contains(triggerEl, target); 9314 if (nestedTriggerHovered && store2.select("open") && store2.select("lastOpenChangeReason") === reason_parts_exports.triggerHover) { 9315 store2.setOpen(false, createChangeEventDetails(reason_parts_exports.triggerHover, event)); 9316 return; 9317 } 9318 if (wasNestedTriggerHovered && !nestedTriggerHovered && targetInsideTrigger && !disabledRef.current && !store2.select("open") && triggerEl && // Match the hover hook's non-strict mouse fallback for mouse-only event sequences. 9319 isMouseLikePointerType(pointerTypeRef.current)) { 9320 const open3 = () => { 9321 if (!isNestedTriggerHoveredRef.current && !disabledRef.current && !store2.select("open")) { 9322 store2.setOpen(true, createChangeEventDetails(reason_parts_exports.triggerHover, event, triggerEl)); 9323 } 9324 }; 9325 const openDelay = getOpenDelay(); 9326 if (openDelay === 0) { 9327 nestedTriggerOpenTimeout.clear(); 9328 open3(); 9329 } else { 9330 nestedTriggerOpenTimeout.start(openDelay, open3); 9331 } 9332 } 9333 }; 9334 const rootTriggerProps = store2.useState("appliedTriggerProps", isMountedByThisTrigger || trackCursorAxis !== "none"); 9335 const state = { 9336 open: isOpenedByThisTrigger 9337 }; 9338 const element = useRenderElement("button", componentProps, { 9339 state, 9340 ref: [forwardedRef, registerTrigger, triggerElementRef], 9341 props: [hoverProps, focusProps, rootTriggerProps, { 9342 onMouseOver(event) { 9343 handleNestedTriggerHover(event.nativeEvent); 9344 }, 9345 onFocus(event) { 9346 if (isEnabledNestedTriggerTarget(getTargetElement(event.nativeEvent))) { 9347 event.preventBaseUIHandler(); 9348 } 9349 }, 9350 onMouseLeave() { 9351 isNestedTriggerHoveredRef.current = false; 9352 nestedTriggerOpenTimeout.clear(); 9353 pointerTypeRef.current = void 0; 9354 }, 9355 onPointerEnter(event) { 9356 pointerTypeRef.current = event.pointerType; 9357 }, 9358 onPointerDown(event) { 9359 pointerTypeRef.current = event.pointerType; 9360 store2.set("closeOnClick", closeOnClick); 9361 if (closeOnClick && !store2.select("open")) { 9362 store2.cancelPendingOpen(event.nativeEvent); 9363 } 9364 }, 9365 onClick(event) { 9366 if (closeOnClick && !store2.select("open")) { 9367 store2.cancelPendingOpen(event.nativeEvent); 9368 } 9369 }, 9370 id: thisTriggerId, 9371 [triggerDisabled]: disabled2 ? "" : void 0, 9372 [TOOLTIP_TRIGGER_IDENTIFIER]: disabled2 ? void 0 : "" 9373 }, elementProps], 9374 stateAttributesMapping: triggerOpenStateMapping2 9375 }); 9376 return element; 9377 }); 9378 if (true) TooltipTrigger.displayName = "TooltipTrigger"; 9379 9380 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs 9381 var React53 = __toESM(require_react(), 1); 9382 9383 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/portal/TooltipPortalContext.mjs 9384 var React52 = __toESM(require_react(), 1); 9385 var TooltipPortalContext = /* @__PURE__ */ React52.createContext(void 0); 9386 if (true) TooltipPortalContext.displayName = "TooltipPortalContext"; 9387 function useTooltipPortalContext() { 9388 const value = React52.useContext(TooltipPortalContext); 9389 if (value === void 0) { 9390 throw new Error(true ? "Base UI: <Tooltip.Portal> is missing." : formatErrorMessage_default(70)); 9391 } 9392 return value; 9393 } 9394 9395 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/portal/TooltipPortal.mjs 9396 var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1); 9397 var TooltipPortal = /* @__PURE__ */ React53.forwardRef(function TooltipPortal2(props, forwardedRef) { 9398 const { 9399 keepMounted = false, 9400 ...portalProps 9401 } = props; 9402 const store2 = useTooltipRootContext(); 9403 const mounted = store2.useState("mounted"); 9404 const shouldRender = mounted || keepMounted; 9405 if (!shouldRender) { 9406 return null; 9407 } 9408 return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TooltipPortalContext.Provider, { 9409 value: keepMounted, 9410 children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(FloatingPortalLite, { 9411 ref: forwardedRef, 9412 ...portalProps 9413 }) 9414 }); 9415 }); 9416 if (true) TooltipPortal.displayName = "TooltipPortal"; 9417 9418 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs 9419 var React55 = __toESM(require_react(), 1); 9420 9421 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/positioner/TooltipPositionerContext.mjs 9422 var React54 = __toESM(require_react(), 1); 9423 var TooltipPositionerContext = /* @__PURE__ */ React54.createContext(void 0); 9424 if (true) TooltipPositionerContext.displayName = "TooltipPositionerContext"; 9425 function useTooltipPositionerContext() { 9426 const context = React54.useContext(TooltipPositionerContext); 9427 if (context === void 0) { 9428 throw new Error(true ? "Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>." : formatErrorMessage_default(71)); 9429 } 9430 return context; 9431 } 9432 9433 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/positioner/TooltipPositioner.mjs 9434 var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1); 9435 var TooltipPositioner = /* @__PURE__ */ React55.forwardRef(function TooltipPositioner2(componentProps, forwardedRef) { 9436 const { 9437 render, 9438 className, 9439 anchor, 9440 positionMethod = "absolute", 9441 side = "top", 9442 align = "center", 9443 sideOffset = 0, 9444 alignOffset = 0, 9445 collisionBoundary = "clipping-ancestors", 9446 collisionPadding = 5, 9447 arrowPadding = 5, 9448 sticky = false, 9449 disableAnchorTracking = false, 9450 collisionAvoidance = POPUP_COLLISION_AVOIDANCE, 9451 style, 9452 ...elementProps 9453 } = componentProps; 9454 const store2 = useTooltipRootContext(); 9455 const keepMounted = useTooltipPortalContext(); 9456 const open3 = store2.useState("open"); 9457 const mounted = store2.useState("mounted"); 9458 const trackCursorAxis = store2.useState("trackCursorAxis"); 9459 const disableHoverablePopup = store2.useState("disableHoverablePopup"); 9460 const floatingRootContext = store2.useState("floatingRootContext"); 9461 const instantType = store2.useState("instantType"); 9462 const transitionStatus = store2.useState("transitionStatus"); 9463 const adaptiveOrigin2 = store2.useState("adaptiveOrigin"); 9464 const positioning = useAnchorPositioning({ 9465 anchor, 9466 positionMethod, 9467 floatingRootContext, 9468 mounted, 9469 side, 9470 sideOffset, 9471 align, 9472 alignOffset, 9473 collisionBoundary, 9474 collisionPadding, 9475 sticky, 9476 arrowPadding, 9477 disableAnchorTracking, 9478 keepMounted, 9479 collisionAvoidance, 9480 adaptiveOrigin: adaptiveOrigin2 9481 }); 9482 const state = React55.useMemo(() => ({ 9483 open: open3, 9484 side: positioning.side, 9485 align: positioning.align, 9486 anchorHidden: positioning.anchorHidden, 9487 instant: trackCursorAxis !== "none" ? "tracking-cursor" : instantType 9488 }), [open3, positioning.side, positioning.align, positioning.anchorHidden, trackCursorAxis, instantType]); 9489 const element = usePositioner(componentProps, state, { 9490 styles: positioning.positionerStyles, 9491 transitionStatus, 9492 props: elementProps, 9493 refs: [forwardedRef, store2.useStateSetter("positionerElement")], 9494 hidden: !mounted, 9495 inert: !open3 || trackCursorAxis === "both" || disableHoverablePopup 9496 }); 9497 return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TooltipPositionerContext.Provider, { 9498 value: positioning, 9499 children: element 9500 }); 9501 }); 9502 if (true) TooltipPositioner.displayName = "TooltipPositioner"; 9503 9504 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/popup/TooltipPopup.mjs 9505 var React56 = __toESM(require_react(), 1); 9506 var TooltipPopup = /* @__PURE__ */ React56.forwardRef(function TooltipPopup2(componentProps, forwardedRef) { 9507 const { 9508 render, 9509 className, 9510 style, 9511 ...elementProps 9512 } = componentProps; 9513 const store2 = useTooltipRootContext(); 9514 const { 9515 side, 9516 align 9517 } = useTooltipPositionerContext(); 9518 const open3 = store2.useState("open"); 9519 const instantType = store2.useState("instantType"); 9520 const transitionStatus = store2.useState("transitionStatus"); 9521 const popupProps = store2.useState("popupProps"); 9522 const floatingContext = store2.useState("floatingRootContext"); 9523 const disabled2 = store2.useState("disabled"); 9524 const closeDelay = store2.useState("closeDelay"); 9525 useOpenChangeComplete({ 9526 open: open3, 9527 ref: store2.context.popupRef, 9528 onComplete() { 9529 if (open3) { 9530 store2.context.onOpenChangeComplete?.(true); 9531 } 9532 } 9533 }); 9534 useHoverFloatingInteraction(floatingContext, { 9535 enabled: !disabled2, 9536 closeDelay 9537 }); 9538 const setPopupElement = store2.useStateSetter("popupElement"); 9539 const state = { 9540 open: open3, 9541 side, 9542 align, 9543 instant: instantType, 9544 transitionStatus 9545 }; 9546 const element = useRenderElement("div", componentProps, { 9547 state, 9548 ref: [forwardedRef, store2.context.popupRef, setPopupElement], 9549 props: [FOCUSABLE_POPUP_PROPS, popupProps, getDisabledMountTransitionStyles(transitionStatus), elementProps], 9550 stateAttributesMapping: popupTransitionStateMapping 9551 }); 9552 return element; 9553 }); 9554 if (true) TooltipPopup.displayName = "TooltipPopup"; 9555 9556 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/arrow/TooltipArrow.mjs 9557 var React57 = __toESM(require_react(), 1); 9558 var TooltipArrow = /* @__PURE__ */ React57.forwardRef(function TooltipArrow2(componentProps, forwardedRef) { 9559 const { 9560 render, 9561 className, 9562 style, 9563 ...elementProps 9564 } = componentProps; 9565 const store2 = useTooltipRootContext(); 9566 const { 9567 arrowRef, 9568 side, 9569 align, 9570 arrowUncentered, 9571 arrowStyles 9572 } = useTooltipPositionerContext(); 9573 const open3 = store2.useState("open"); 9574 const instantType = store2.useState("instantType"); 9575 const state = { 9576 open: open3, 9577 side, 9578 align, 9579 uncentered: arrowUncentered, 9580 instant: instantType 9581 }; 9582 const element = useRenderElement("div", componentProps, { 9583 state, 9584 ref: [forwardedRef, arrowRef], 9585 props: [{ 9586 style: arrowStyles, 9587 "aria-hidden": true 9588 }, elementProps], 9589 stateAttributesMapping: popupStateMapping 9590 }); 9591 return element; 9592 }); 9593 if (true) TooltipArrow.displayName = "TooltipArrow"; 9594 9595 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/provider/TooltipProvider.mjs 9596 var React58 = __toESM(require_react(), 1); 9597 var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1); 9598 var TooltipProvider = function TooltipProvider2(props) { 9599 const { 9600 delay, 9601 closeDelay, 9602 timeout = 400 9603 } = props; 9604 const delayValue = React58.useMemo(() => ({ 9605 open: delay, 9606 close: closeDelay 9607 }), [delay, closeDelay]); 9608 return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TooltipProviderContext.Provider, { 9609 value: delay, 9610 children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(FloatingDelayGroup, { 9611 delay: delayValue, 9612 timeoutMs: timeout, 9613 children: props.children 9614 }) 9615 }); 9616 }; 9617 if (true) TooltipProvider.displayName = "TooltipProvider"; 9618 9619 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/viewport/TooltipViewport.mjs 9620 var React59 = __toESM(require_react(), 1); 9621 var TooltipViewport = /* @__PURE__ */ React59.forwardRef(function TooltipViewport2(componentProps, forwardedRef) { 9622 const { 9623 render, 9624 className, 9625 style, 9626 children, 9627 ...elementProps 9628 } = componentProps; 9629 const store2 = useTooltipRootContext(); 9630 const positioner = useTooltipPositionerContext(); 9631 const instantType = store2.useState("instantType"); 9632 const { 9633 children: childrenToRender, 9634 state: viewportState 9635 } = usePopupViewport({ 9636 store: store2, 9637 side: positioner.side, 9638 children 9639 }); 9640 const state = { 9641 activationDirection: viewportState.activationDirection, 9642 transitioning: viewportState.transitioning, 9643 instant: instantType 9644 }; 9645 return useRenderElement("div", componentProps, { 9646 state, 9647 ref: forwardedRef, 9648 props: [elementProps, { 9649 children: childrenToRender 9650 }], 9651 stateAttributesMapping: popupViewportStateMapping 9652 }); 9653 }); 9654 if (true) TooltipViewport.displayName = "TooltipViewport"; 9655 9656 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/tooltip/store/TooltipHandle.mjs 9657 var TooltipHandle = class extends BasePopupHandle { 9658 constructor() { 9659 super(createNullTooltipStore(), "Tooltip"); 9660 } 9661 /** 9662 * Opens the tooltip and associates it with the trigger with the given id. 9663 * 9664 * This method should only be called in an event handler or an effect (not during rendering). 9665 * 9666 * @param triggerId ID of the trigger to associate with the tooltip. The trigger must be a matching 9667 * `Tooltip.Trigger` with this handle passed as a prop. 9668 */ 9669 open(triggerId) { 9670 this.openByTrigger(triggerId); 9671 } 9672 /** 9673 * Closes the tooltip. 9674 * 9675 * This method should only be called in an event handler or an effect (not during rendering). 9676 */ 9677 close() { 9678 this.closePopup(); 9679 } 9680 /** 9681 * Whether the tooltip is currently open. Returns `false` while no root is attached to the handle. 9682 */ 9683 get isOpen() { 9684 return this.attachedStore?.select("open") ?? false; 9685 } 9686 }; 9687 function createTooltipHandle() { 9688 return new TooltipHandle(); 9689 } 9690 9691 // node_modules/.store/@base-ui/react@1.9.0-uHNeM94OdjIeOtpyYGvL0A/node_modules/@base-ui/react/use-render/useRender.mjs 9692 function useRender(params) { 9693 return useRenderElement(params.defaultTagName ?? "div", params, params); 9694 } 9695 9696 // packages/ui/build-module/text/text.mjs 9697 var import_element11 = __toESM(require_element(), 1); 9698 var STYLE_HASH_ATTRIBUTE = "data-wp-hash"; 9699 function getRuntime() { 9700 const globalScope = globalThis; 9701 if (globalScope.__wpStyleRuntime) { 9702 return globalScope.__wpStyleRuntime; 9703 } 9704 globalScope.__wpStyleRuntime = { 9705 documents: /* @__PURE__ */ new Map(), 9706 styles: /* @__PURE__ */ new Map(), 9707 injectedStyles: /* @__PURE__ */ new WeakMap() 9708 }; 9709 if (typeof document !== "undefined") { 9710 registerDocument(document); 9711 } 9712 return globalScope.__wpStyleRuntime; 9713 } 9714 function documentContainsStyleHash(targetDocument, hash) { 9715 if (!targetDocument.head) { 9716 return false; 9717 } 9718 for (const style of targetDocument.head.querySelectorAll( 9719 `style[$STYLE_HASH_ATTRIBUTE}]` 9720 )) { 9721 if (style.getAttribute(STYLE_HASH_ATTRIBUTE) === hash) { 9722 return true; 9723 } 9724 } 9725 return false; 9726 } 9727 function injectStyle(targetDocument, hash, css) { 9728 if (!targetDocument.head) { 9729 return; 9730 } 9731 const runtime = getRuntime(); 9732 let injectedStyles = runtime.injectedStyles.get(targetDocument); 9733 if (!injectedStyles) { 9734 injectedStyles = /* @__PURE__ */ new Set(); 9735 runtime.injectedStyles.set(targetDocument, injectedStyles); 9736 } 9737 if (injectedStyles.has(hash)) { 9738 return; 9739 } 9740 if (documentContainsStyleHash(targetDocument, hash)) { 9741 injectedStyles.add(hash); 9742 return; 9743 } 9744 const style = targetDocument.createElement("style"); 9745 style.setAttribute(STYLE_HASH_ATTRIBUTE, hash); 9746 style.appendChild(targetDocument.createTextNode(css)); 9747 targetDocument.head.appendChild(style); 9748 injectedStyles.add(hash); 9749 } 9750 function registerDocument(targetDocument) { 9751 const runtime = getRuntime(); 9752 runtime.documents.set( 9753 targetDocument, 9754 (runtime.documents.get(targetDocument) ?? 0) + 1 9755 ); 9756 for (const [hash, css] of runtime.styles) { 9757 injectStyle(targetDocument, hash, css); 9758 } 9759 return () => { 9760 const count = runtime.documents.get(targetDocument); 9761 if (count === void 0) { 9762 return; 9763 } 9764 if (count <= 1) { 9765 runtime.documents.delete(targetDocument); 9766 return; 9767 } 9768 runtime.documents.set(targetDocument, count - 1); 9769 }; 9770 } 9771 function registerStyle(hash, css) { 9772 const runtime = getRuntime(); 9773 runtime.styles.set(hash, css); 9774 for (const targetDocument of runtime.documents.keys()) { 9775 injectStyle(targetDocument, hash, css); 9776 } 9777 } 9778 if (typeof process === "undefined" || true) { 9779 registerStyle("3167e7d116", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._83ed8a8da5dd50ea__text{text-wrap:pretty;margin:0}._14437cfb77831647__heading-2xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-2xl,32px);--_gcd-p-line-height:var(--wpds-typography-line-height-2xl,40px);font-size:var(--wpds-typography-font-size-2xl,32px);line-height:var(--wpds-typography-line-height-2xl,40px)}._14437cfb77831647__heading-2xl,._3c78b7fa9b4072dd__heading-xl{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600)}._3c78b7fa9b4072dd__heading-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-md,24px)}.aa58f227716bcde2__heading-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-lg,15px)}.aa58f227716bcde2__heading-lg,.fc4da56d8dfe52c4__heading-md{font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-sm,20px)}.fc4da56d8dfe52c4__heading-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px)}.a9b78c7c82e8dff7__heading-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-emphasis,600);--_gcd-p-font-size:var(--wpds-typography-font-size-xs,11px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-family:var(--wpds-typography-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-xs,11px);font-weight:var(--wpds-typography-font-weight-emphasis,600);line-height:var(--wpds-typography-line-height-xs,16px);text-transform:uppercase}._305ff559e52180d5__body-xl{--_gcd-heading-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-xl,20px);--_gcd-p-line-height:var(--wpds-typography-line-height-xl,32px);font-size:var(--wpds-typography-font-size-xl,20px);line-height:var(--wpds-typography-line-height-xl,32px)}._305ff559e52180d5__body-xl,.ca1aa3fc2029e958__body-lg{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}.ca1aa3fc2029e958__body-lg{--_gcd-heading-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-lg,15px);--_gcd-p-line-height:var(--wpds-typography-line-height-md,24px);font-size:var(--wpds-typography-font-size-lg,15px);line-height:var(--wpds-typography-line-height-md,24px)}._131101940be12424__body-md{--_gcd-heading-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-md,13px);--_gcd-p-line-height:var(--wpds-typography-line-height-sm,20px);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-sm,20px)}._0e8d87a42c1f75fa__body-sm,._131101940be12424__body-md{font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-weight:var(--wpds-typography-font-weight-default,400)}._0e8d87a42c1f75fa__body-sm{--_gcd-heading-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-heading-font-weight:var(--wpds-typography-font-weight-default,400);--_gcd-p-font-size:var(--wpds-typography-font-size-sm,12px);--_gcd-p-line-height:var(--wpds-typography-line-height-xs,16px);font-size:var(--wpds-typography-font-size-sm,12px);line-height:var(--wpds-typography-line-height-xs,16px)}}}'); 9780 } 9781 var style_default = { "text": "_83ed8a8da5dd50ea__text", "heading-2xl": "_14437cfb77831647__heading-2xl", "heading-xl": "_3c78b7fa9b4072dd__heading-xl", "heading-lg": "aa58f227716bcde2__heading-lg", "heading-md": "fc4da56d8dfe52c4__heading-md", "heading-sm": "a9b78c7c82e8dff7__heading-sm", "body-xl": "_305ff559e52180d5__body-xl", "body-lg": "ca1aa3fc2029e958__body-lg", "body-md": "_131101940be12424__body-md", "body-sm": "_0e8d87a42c1f75fa__body-sm" }; 9782 if (typeof process === "undefined" || true) { 9783 registerStyle("abb19c3171", "._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)}[role=treeitem] span._400bf7ee0c6061a9__span[aria-hidden]{display:var(--_gcd-span-display,inline);font-family:var(--_gcd-span-font-family,inherit);font-size:var(--_gcd-span-font-size,inherit);line-height:var(--_gcd-span-line-height,1);pointer-events:var(--_gcd-span-pointer-events,auto);position:var(--_gcd-span-position,static)}"); 9784 } 9785 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", "span": "_400bf7ee0c6061a9__span" }; 9786 var Text = (0, import_element11.forwardRef)( 9787 function UnforwardedText({ variant = "body-md", render, className, ...props }, ref) { 9788 const element = useRender({ 9789 render, 9790 defaultTagName: "span", 9791 ref, 9792 props: mergeProps(props, { 9793 className: clsx_default( 9794 style_default.text, 9795 global_css_defense_default.heading, 9796 global_css_defense_default.p, 9797 style_default[variant], 9798 className 9799 ) 9800 }) 9801 }); 9802 return element; 9803 } 9804 ); 9805 9806 // packages/ui/build-module/button/button.mjs 9807 var import_a11y = __toESM(require_a11y(), 1); 9808 var import_element13 = __toESM(require_element(), 1); 9809 var import_i18n = __toESM(require_i18n(), 1); 9810 9811 // packages/ui/build-module/spinner/spinner.mjs 9812 var import_element12 = __toESM(require_element(), 1); 9813 var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1); 9814 var STYLE_HASH_ATTRIBUTE2 = "data-wp-hash"; 9815 function getRuntime2() { 9816 const globalScope = globalThis; 9817 if (globalScope.__wpStyleRuntime) { 9818 return globalScope.__wpStyleRuntime; 9819 } 9820 globalScope.__wpStyleRuntime = { 9821 documents: /* @__PURE__ */ new Map(), 9822 styles: /* @__PURE__ */ new Map(), 9823 injectedStyles: /* @__PURE__ */ new WeakMap() 9824 }; 9825 if (typeof document !== "undefined") { 9826 registerDocument2(document); 9827 } 9828 return globalScope.__wpStyleRuntime; 9829 } 9830 function documentContainsStyleHash2(targetDocument, hash) { 9831 if (!targetDocument.head) { 9832 return false; 9833 } 9834 for (const style of targetDocument.head.querySelectorAll( 9835 `style[$STYLE_HASH_ATTRIBUTE2}]` 9836 )) { 9837 if (style.getAttribute(STYLE_HASH_ATTRIBUTE2) === hash) { 9838 return true; 9839 } 9840 } 9841 return false; 9842 } 9843 function injectStyle2(targetDocument, hash, css) { 9844 if (!targetDocument.head) { 9845 return; 9846 } 9847 const runtime = getRuntime2(); 9848 let injectedStyles = runtime.injectedStyles.get(targetDocument); 9849 if (!injectedStyles) { 9850 injectedStyles = /* @__PURE__ */ new Set(); 9851 runtime.injectedStyles.set(targetDocument, injectedStyles); 9852 } 9853 if (injectedStyles.has(hash)) { 9854 return; 9855 } 9856 if (documentContainsStyleHash2(targetDocument, hash)) { 9857 injectedStyles.add(hash); 9858 return; 9859 } 9860 const style = targetDocument.createElement("style"); 9861 style.setAttribute(STYLE_HASH_ATTRIBUTE2, hash); 9862 style.appendChild(targetDocument.createTextNode(css)); 9863 targetDocument.head.appendChild(style); 9864 injectedStyles.add(hash); 9865 } 9866 function registerDocument2(targetDocument) { 9867 const runtime = getRuntime2(); 9868 runtime.documents.set( 9869 targetDocument, 9870 (runtime.documents.get(targetDocument) ?? 0) + 1 9871 ); 9872 for (const [hash, css] of runtime.styles) { 9873 injectStyle2(targetDocument, hash, css); 9874 } 9875 return () => { 9876 const count = runtime.documents.get(targetDocument); 9877 if (count === void 0) { 9878 return; 9879 } 9880 if (count <= 1) { 9881 runtime.documents.delete(targetDocument); 9882 return; 9883 } 9884 runtime.documents.set(targetDocument, count - 1); 9885 }; 9886 } 9887 function registerStyle2(hash, css) { 9888 const runtime = getRuntime2(); 9889 runtime.styles.set(hash, css); 9890 for (const targetDocument of runtime.documents.keys()) { 9891 injectStyle2(targetDocument, hash, css); 9892 } 9893 } 9894 if (typeof process === "undefined" || true) { 9895 registerStyle2("dbe7fd6094", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.ab4d64c07c0ba587__spinner{background-color:transparent;color:var(--wpds-color-foreground-content-neutral-weak,#707070);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{fill:transparent;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;transform-origin:50% 50%;@media (forced-colors:active){stroke:CanvasText}animation:_02322d973909703c__spinner-spin 1.4s linear infinite both}@keyframes _02322d973909703c__spinner-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}}}"); 9896 } 9897 var style_default2 = { "spinner": "ab4d64c07c0ba587__spinner", "indicator": "a7654e10245bb7d2__indicator", "spinner-spin": "_02322d973909703c__spinner-spin" }; 9898 var Spinner = (0, import_element12.forwardRef)( 9899 function UnforwardedSpinner({ className, color, style, ...props }, ref) { 9900 return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)( 9901 "svg", 9902 { 9903 className: clsx_default(style_default2.spinner, className), 9904 style: color === void 0 ? style : { ...style, color }, 9905 viewBox: "0 0 24 24", 9906 xmlns: "http://www.w3.org/2000/svg", 9907 role: "presentation", 9908 focusable: "false", 9909 ...props, 9910 ref, 9911 children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)( 9912 "path", 9913 { 9914 className: style_default2.indicator, 9915 d: "m 12 0 a 12 12 0 0 1 0 24" 9916 } 9917 ) 9918 } 9919 ); 9920 } 9921 ); 9922 9923 // packages/ui/build-module/button/button.mjs 9924 var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1); 9925 var STYLE_HASH_ATTRIBUTE3 = "data-wp-hash"; 9926 function getRuntime3() { 9927 const globalScope = globalThis; 9928 if (globalScope.__wpStyleRuntime) { 9929 return globalScope.__wpStyleRuntime; 9930 } 9931 globalScope.__wpStyleRuntime = { 9932 documents: /* @__PURE__ */ new Map(), 9933 styles: /* @__PURE__ */ new Map(), 9934 injectedStyles: /* @__PURE__ */ new WeakMap() 9935 }; 9936 if (typeof document !== "undefined") { 9937 registerDocument3(document); 9938 } 9939 return globalScope.__wpStyleRuntime; 9940 } 9941 function documentContainsStyleHash3(targetDocument, hash) { 9942 if (!targetDocument.head) { 9943 return false; 9944 } 9945 for (const style of targetDocument.head.querySelectorAll( 9946 `style[$STYLE_HASH_ATTRIBUTE3}]` 9947 )) { 9948 if (style.getAttribute(STYLE_HASH_ATTRIBUTE3) === hash) { 9949 return true; 9950 } 9951 } 9952 return false; 9953 } 9954 function injectStyle3(targetDocument, hash, css) { 9955 if (!targetDocument.head) { 9956 return; 9957 } 9958 const runtime = getRuntime3(); 9959 let injectedStyles = runtime.injectedStyles.get(targetDocument); 9960 if (!injectedStyles) { 9961 injectedStyles = /* @__PURE__ */ new Set(); 9962 runtime.injectedStyles.set(targetDocument, injectedStyles); 9963 } 9964 if (injectedStyles.has(hash)) { 9965 return; 9966 } 9967 if (documentContainsStyleHash3(targetDocument, hash)) { 9968 injectedStyles.add(hash); 9969 return; 9970 } 9971 const style = targetDocument.createElement("style"); 9972 style.setAttribute(STYLE_HASH_ATTRIBUTE3, hash); 9973 style.appendChild(targetDocument.createTextNode(css)); 9974 targetDocument.head.appendChild(style); 9975 injectedStyles.add(hash); 9976 } 9977 function registerDocument3(targetDocument) { 9978 const runtime = getRuntime3(); 9979 runtime.documents.set( 9980 targetDocument, 9981 (runtime.documents.get(targetDocument) ?? 0) + 1 9982 ); 9983 for (const [hash, css] of runtime.styles) { 9984 injectStyle3(targetDocument, hash, css); 9985 } 9986 return () => { 9987 const count = runtime.documents.get(targetDocument); 9988 if (count === void 0) { 9989 return; 9990 } 9991 if (count <= 1) { 9992 runtime.documents.delete(targetDocument); 9993 return; 9994 } 9995 runtime.documents.set(targetDocument, count - 1); 9996 }; 9997 } 9998 function registerStyle3(hash, css) { 9999 const runtime = getRuntime3(); 10000 runtime.styles.set(hash, css); 10001 for (const targetDocument of runtime.documents.keys()) { 10002 injectStyle3(targetDocument, hash, css); 10003 } 10004 } 10005 if (typeof process === "undefined" || true) { 10006 registerStyle3("1052986a11", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-emphasis,600);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:border-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-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(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0px;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}>:not(._1322fe375ff021a3__spinner){opacity:0}}}@layer compositions{._1322fe375ff021a3__spinner{color:var(--wp-ui-button-foreground-color);height:var(--wp-ui-button-font-size);inset:0;margin:auto;pointer-events:none;position:absolute;width:var(--wp-ui-button-font-size);>*{stroke-width:2.75}@media (prefers-reduced-motion){>*{animation:none}}@media (forced-colors:active){>*{stroke:ButtonText}}}}}'); 10007 } 10008 var style_default3 = { "button": "_97b0fc33c028be1a__button", "is-unstyled": "abbb272e2ce49bd6__is-unstyled", "is-loading": "_914b42f315c0e580__is-loading", "is-small": "_908205475f9f2a92__is-small", "icon": "_9f6fc6553aeb36fe__icon", "is-brand": "dd460c965226cc77__is-brand", "is-outline": "_62d5a778b7b258ee__is-outline", "is-minimal": "ad0619a3217c6a5b__is-minimal", "is-neutral": "e722a8f96726aa99__is-neutral", "is-solid": "b50b3358c5fb4d0b__is-solid", "is-compact": "cf59cf1b69629838__is-compact", "spinner": "_1322fe375ff021a3__spinner" }; 10009 if (typeof process === "undefined" || true) { 10010 registerStyle3("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); 10011 } 10012 var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" }; 10013 if (typeof process === "undefined" || true) { 10014 registerStyle3("7c3267f794", "@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{--_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))}}}"); 10015 } 10016 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-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" }; 10017 if (typeof process === "undefined" || true) { 10018 registerStyle3("abb19c3171", "._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)}[role=treeitem] span._400bf7ee0c6061a9__span[aria-hidden]{display:var(--_gcd-span-display,inline);font-family:var(--_gcd-span-font-family,inherit);font-size:var(--_gcd-span-font-size,inherit);line-height:var(--_gcd-span-line-height,1);pointer-events:var(--_gcd-span-pointer-events,auto);position:var(--_gcd-span-position,static)}"); 10019 } 10020 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", "span": "_400bf7ee0c6061a9__span" }; 10021 var Button3 = (0, import_element13.forwardRef)( 10022 function UnforwardedButton({ 10023 tone = "brand", 10024 variant = "solid", 10025 size: size4 = "default", 10026 className, 10027 focusableWhenDisabled = true, 10028 disabled: disabled2, 10029 loading, 10030 loadingAnnouncement = (0, import_i18n.__)("Loading"), 10031 children, 10032 ...props 10033 }, ref) { 10034 const mergedClassName = clsx_default( 10035 global_css_defense_default2.button, 10036 resets_default["box-sizing"], 10037 focus_module_default["outset-ring--focus-except-active"], 10038 variant !== "unstyled" && style_default3.button, 10039 style_default3[`is-$tone}`], 10040 style_default3[`is-$variant}`], 10041 style_default3[`is-$size4}`], 10042 loading && style_default3["is-loading"], 10043 className 10044 ); 10045 (0, import_element13.useEffect)(() => { 10046 if (loading && loadingAnnouncement) { 10047 (0, import_a11y.speak)(loadingAnnouncement); 10048 } 10049 }, [loading, loadingAnnouncement]); 10050 return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)( 10051 Button, 10052 { 10053 ref, 10054 className: mergedClassName, 10055 focusableWhenDisabled, 10056 disabled: disabled2 ?? loading, 10057 ...props, 10058 children: [ 10059 children, 10060 loading && variant !== "unstyled" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Spinner, { className: style_default3.spinner }) 10061 ] 10062 } 10063 ); 10064 } 10065 ); 10066 10067 // packages/ui/build-module/button/icon.mjs 10068 var import_element14 = __toESM(require_element(), 1); 10069 var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1); 10070 var STYLE_HASH_ATTRIBUTE4 = "data-wp-hash"; 10071 function getRuntime4() { 10072 const globalScope = globalThis; 10073 if (globalScope.__wpStyleRuntime) { 10074 return globalScope.__wpStyleRuntime; 10075 } 10076 globalScope.__wpStyleRuntime = { 10077 documents: /* @__PURE__ */ new Map(), 10078 styles: /* @__PURE__ */ new Map(), 10079 injectedStyles: /* @__PURE__ */ new WeakMap() 10080 }; 10081 if (typeof document !== "undefined") { 10082 registerDocument4(document); 10083 } 10084 return globalScope.__wpStyleRuntime; 10085 } 10086 function documentContainsStyleHash4(targetDocument, hash) { 10087 if (!targetDocument.head) { 10088 return false; 10089 } 10090 for (const style of targetDocument.head.querySelectorAll( 10091 `style[$STYLE_HASH_ATTRIBUTE4}]` 10092 )) { 10093 if (style.getAttribute(STYLE_HASH_ATTRIBUTE4) === hash) { 10094 return true; 10095 } 10096 } 10097 return false; 10098 } 10099 function injectStyle4(targetDocument, hash, css) { 10100 if (!targetDocument.head) { 10101 return; 10102 } 10103 const runtime = getRuntime4(); 10104 let injectedStyles = runtime.injectedStyles.get(targetDocument); 10105 if (!injectedStyles) { 10106 injectedStyles = /* @__PURE__ */ new Set(); 10107 runtime.injectedStyles.set(targetDocument, injectedStyles); 10108 } 10109 if (injectedStyles.has(hash)) { 10110 return; 10111 } 10112 if (documentContainsStyleHash4(targetDocument, hash)) { 10113 injectedStyles.add(hash); 10114 return; 10115 } 10116 const style = targetDocument.createElement("style"); 10117 style.setAttribute(STYLE_HASH_ATTRIBUTE4, hash); 10118 style.appendChild(targetDocument.createTextNode(css)); 10119 targetDocument.head.appendChild(style); 10120 injectedStyles.add(hash); 10121 } 10122 function registerDocument4(targetDocument) { 10123 const runtime = getRuntime4(); 10124 runtime.documents.set( 10125 targetDocument, 10126 (runtime.documents.get(targetDocument) ?? 0) + 1 10127 ); 10128 for (const [hash, css] of runtime.styles) { 10129 injectStyle4(targetDocument, hash, css); 10130 } 10131 return () => { 10132 const count = runtime.documents.get(targetDocument); 10133 if (count === void 0) { 10134 return; 10135 } 10136 if (count <= 1) { 10137 runtime.documents.delete(targetDocument); 10138 return; 10139 } 10140 runtime.documents.set(targetDocument, count - 1); 10141 }; 10142 } 10143 function registerStyle4(hash, css) { 10144 const runtime = getRuntime4(); 10145 runtime.styles.set(hash, css); 10146 for (const targetDocument of runtime.documents.keys()) { 10147 injectStyle4(targetDocument, hash, css); 10148 } 10149 } 10150 if (typeof process === "undefined" || true) { 10151 registerStyle4("1052986a11", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-emphasis,600);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:border-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-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(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0px;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}>:not(._1322fe375ff021a3__spinner){opacity:0}}}@layer compositions{._1322fe375ff021a3__spinner{color:var(--wp-ui-button-foreground-color);height:var(--wp-ui-button-font-size);inset:0;margin:auto;pointer-events:none;position:absolute;width:var(--wp-ui-button-font-size);>*{stroke-width:2.75}@media (prefers-reduced-motion){>*{animation:none}}@media (forced-colors:active){>*{stroke:ButtonText}}}}}'); 10152 } 10153 var style_default4 = { "button": "_97b0fc33c028be1a__button", "is-unstyled": "abbb272e2ce49bd6__is-unstyled", "is-loading": "_914b42f315c0e580__is-loading", "is-small": "_908205475f9f2a92__is-small", "icon": "_9f6fc6553aeb36fe__icon", "is-brand": "dd460c965226cc77__is-brand", "is-outline": "_62d5a778b7b258ee__is-outline", "is-minimal": "ad0619a3217c6a5b__is-minimal", "is-neutral": "e722a8f96726aa99__is-neutral", "is-solid": "b50b3358c5fb4d0b__is-solid", "is-compact": "cf59cf1b69629838__is-compact", "spinner": "_1322fe375ff021a3__spinner" }; 10154 var ButtonIcon = (0, import_element14.forwardRef)( 10155 function UnforwardedButtonIcon({ className, icon, ...props }, ref) { 10156 return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)( 10157 Icon, 10158 { 10159 ref, 10160 icon, 10161 className: clsx_default(style_default4.icon, className), 10162 size: 24, 10163 ...props 10164 } 10165 ); 10166 } 10167 ); 10168 10169 // packages/ui/build-module/button/index.mjs 10170 ButtonIcon.displayName = "Button.Icon"; 10171 var Button4 = Object.assign(Button3, { 10172 /** 10173 * An icon component specifically designed to work well when rendered inside 10174 * a `Button` component. 10175 */ 10176 Icon: ButtonIcon 10177 }); 10178 10179 // packages/icons/build-module/library/caution.mjs 10180 var import_primitives2 = __toESM(require_primitives(), 1); 10181 var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1); 10182 var caution_default = /* @__PURE__ */ (0, import_jsx_runtime17.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_runtime17.jsx)(import_primitives2.Path, { d: "M12 8L12 13M12 14.5L12 16M4.75 12C4.75 7.99593 7.99594 4.75 12 4.75C16.0041 4.75 19.25 7.99594 19.25 12C19.25 16.0041 16.0041 19.25 12 19.25C7.99594 19.25 4.75 16.0041 4.75 12Z", strokeLinejoin: "round" }) }); 10183 10184 // packages/icons/build-module/library/close-small.mjs 10185 var import_primitives3 = __toESM(require_primitives(), 1); 10186 var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1); 10187 var close_small_default = /* @__PURE__ */ (0, import_jsx_runtime18.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_runtime18.jsx)(import_primitives3.Path, { d: "M7.75 16.25L16.25 7.75M16.25 16.25L7.75 7.75" }) }); 10188 10189 // packages/icons/build-module/library/error.mjs 10190 var import_primitives4 = __toESM(require_primitives(), 1); 10191 var import_jsx_runtime19 = __toESM(require_jsx_runtime(), 1); 10192 var error_default = /* @__PURE__ */ (0, import_jsx_runtime19.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_runtime19.jsx)(import_primitives4.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" }) }); 10193 10194 // packages/icons/build-module/library/info.mjs 10195 var import_primitives5 = __toESM(require_primitives(), 1); 10196 var import_jsx_runtime20 = __toESM(require_jsx_runtime(), 1); 10197 var info_default = /* @__PURE__ */ (0, import_jsx_runtime20.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_runtime20.jsx)(import_primitives5.Path, { d: "M12 16V11M12 9.5V8M19.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" }) }); 10198 10199 // packages/icons/build-module/library/published.mjs 10200 var import_primitives6 = __toESM(require_primitives(), 1); 10201 var import_jsx_runtime21 = __toESM(require_jsx_runtime(), 1); 10202 var published_default = /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_primitives6.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: [ 10203 /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives6.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" }), 10204 /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_primitives6.Path, { d: "M9 12L11 14L15 10" }) 10205 ] }); 10206 10207 // packages/ui/build-module/utils/keyboard-shortcut.mjs 10208 var import_element16 = __toESM(require_element(), 1); 10209 var import_i18n2 = __toESM(require_i18n(), 1); 10210 10211 // packages/ui/build-module/visually-hidden/visually-hidden.mjs 10212 var import_element15 = __toESM(require_element(), 1); 10213 var STYLE_HASH_ATTRIBUTE5 = "data-wp-hash"; 10214 function getRuntime5() { 10215 const globalScope = globalThis; 10216 if (globalScope.__wpStyleRuntime) { 10217 return globalScope.__wpStyleRuntime; 10218 } 10219 globalScope.__wpStyleRuntime = { 10220 documents: /* @__PURE__ */ new Map(), 10221 styles: /* @__PURE__ */ new Map(), 10222 injectedStyles: /* @__PURE__ */ new WeakMap() 10223 }; 10224 if (typeof document !== "undefined") { 10225 registerDocument5(document); 10226 } 10227 return globalScope.__wpStyleRuntime; 10228 } 10229 function documentContainsStyleHash5(targetDocument, hash) { 10230 if (!targetDocument.head) { 10231 return false; 10232 } 10233 for (const style of targetDocument.head.querySelectorAll( 10234 `style[$STYLE_HASH_ATTRIBUTE5}]` 10235 )) { 10236 if (style.getAttribute(STYLE_HASH_ATTRIBUTE5) === hash) { 10237 return true; 10238 } 10239 } 10240 return false; 10241 } 10242 function injectStyle5(targetDocument, hash, css) { 10243 if (!targetDocument.head) { 10244 return; 10245 } 10246 const runtime = getRuntime5(); 10247 let injectedStyles = runtime.injectedStyles.get(targetDocument); 10248 if (!injectedStyles) { 10249 injectedStyles = /* @__PURE__ */ new Set(); 10250 runtime.injectedStyles.set(targetDocument, injectedStyles); 10251 } 10252 if (injectedStyles.has(hash)) { 10253 return; 10254 } 10255 if (documentContainsStyleHash5(targetDocument, hash)) { 10256 injectedStyles.add(hash); 10257 return; 10258 } 10259 const style = targetDocument.createElement("style"); 10260 style.setAttribute(STYLE_HASH_ATTRIBUTE5, hash); 10261 style.appendChild(targetDocument.createTextNode(css)); 10262 targetDocument.head.appendChild(style); 10263 injectedStyles.add(hash); 10264 } 10265 function registerDocument5(targetDocument) { 10266 const runtime = getRuntime5(); 10267 runtime.documents.set( 10268 targetDocument, 10269 (runtime.documents.get(targetDocument) ?? 0) + 1 10270 ); 10271 for (const [hash, css] of runtime.styles) { 10272 injectStyle5(targetDocument, hash, css); 10273 } 10274 return () => { 10275 const count = runtime.documents.get(targetDocument); 10276 if (count === void 0) { 10277 return; 10278 } 10279 if (count <= 1) { 10280 runtime.documents.delete(targetDocument); 10281 return; 10282 } 10283 runtime.documents.set(targetDocument, count - 1); 10284 }; 10285 } 10286 function registerStyle5(hash, css) { 10287 const runtime = getRuntime5(); 10288 runtime.styles.set(hash, css); 10289 for (const targetDocument of runtime.documents.keys()) { 10290 injectStyle5(targetDocument, hash, css); 10291 } 10292 } 10293 if (typeof process === "undefined" || true) { 10294 registerStyle5("15abcab4d0", ".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}"); 10295 } 10296 var style_default5 = { "visually-hidden": "f37b9e2e191ebd66__visually-hidden" }; 10297 var VisuallyHidden = (0, import_element15.forwardRef)( 10298 function UnforwardedVisuallyHidden({ render, ...restProps }, ref) { 10299 const element = useRender({ 10300 render, 10301 ref, 10302 props: mergeProps( 10303 { className: style_default5["visually-hidden"] }, 10304 restProps, 10305 { 10306 // @ts-expect-error Arbitrary data-* attributes aren't indexable on the typed div props. Kept hardcoded so consumers can't change or remove it. 10307 "data-visually-hidden": "" 10308 } 10309 ) 10310 }); 10311 return element; 10312 } 10313 ); 10314 10315 // packages/ui/build-module/utils/keyboard-shortcut.mjs 10316 var import_jsx_runtime22 = __toESM(require_jsx_runtime(), 1); 10317 function useKeyboardShortcutProps({ 10318 "aria-describedby": ariaDescribedBy, 10319 "aria-keyshortcuts": ariaKeyShortcuts, 10320 shortcut 10321 }) { 10322 const generatedDescriptionId = (0, import_element16.useId)(); 10323 const descriptionId = shortcut ? generatedDescriptionId : void 0; 10324 const describedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" "); 10325 return { 10326 descriptionId, 10327 targetProps: { 10328 "aria-describedby": describedBy || void 0, 10329 "aria-keyshortcuts": shortcut?.ariaKeyShortcut ?? ariaKeyShortcuts 10330 } 10331 }; 10332 } 10333 var KeyboardShortcutDescription = (0, import_element16.forwardRef)(function UnforwardedKeyboardShortcutDescription({ descriptionId, shortcut }, ref) { 10334 return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)( 10335 VisuallyHidden, 10336 { 10337 id: descriptionId, 10338 "aria-hidden": "true", 10339 render: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { ref }), 10340 children: (0, import_i18n2.sprintf)( 10341 /* translators: %s: keyboard shortcut. */ 10342 (0, import_i18n2.__)("Keyboard shortcut: %s"), 10343 shortcut.label ?? shortcut.ariaKeyShortcut 10344 ) 10345 } 10346 ); 10347 }); 10348 var KeyboardShortcutDisplay = (0, import_element16.forwardRef)(function UnforwardedKeyboardShortcutDisplay({ className, shortcut }, ref) { 10349 return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { ref, "aria-hidden": "true", className, dir: "ltr", children: shortcut.displayShortcut }); 10350 }); 10351 10352 // packages/ui/build-module/utils/render-slot-with-children.mjs 10353 var import_element17 = __toESM(require_element(), 1); 10354 function renderSlotWithChildren(slot, defaultSlot, children) { 10355 return (0, import_element17.cloneElement)( 10356 slot ?? defaultSlot, 10357 { children } 10358 ); 10359 } 10360 10361 // packages/ui/build-module/utils/wp-compat-overlay-slot.mjs 10362 var STYLE_HASH_ATTRIBUTE6 = "data-wp-hash"; 10363 function getRuntime6() { 10364 const globalScope = globalThis; 10365 if (globalScope.__wpStyleRuntime) { 10366 return globalScope.__wpStyleRuntime; 10367 } 10368 globalScope.__wpStyleRuntime = { 10369 documents: /* @__PURE__ */ new Map(), 10370 styles: /* @__PURE__ */ new Map(), 10371 injectedStyles: /* @__PURE__ */ new WeakMap() 10372 }; 10373 if (typeof document !== "undefined") { 10374 registerDocument6(document); 10375 } 10376 return globalScope.__wpStyleRuntime; 10377 } 10378 function documentContainsStyleHash6(targetDocument, hash) { 10379 if (!targetDocument.head) { 10380 return false; 10381 } 10382 for (const style of targetDocument.head.querySelectorAll( 10383 `style[$STYLE_HASH_ATTRIBUTE6}]` 10384 )) { 10385 if (style.getAttribute(STYLE_HASH_ATTRIBUTE6) === hash) { 10386 return true; 10387 } 10388 } 10389 return false; 10390 } 10391 function injectStyle6(targetDocument, hash, css) { 10392 if (!targetDocument.head) { 10393 return; 10394 } 10395 const runtime = getRuntime6(); 10396 let injectedStyles = runtime.injectedStyles.get(targetDocument); 10397 if (!injectedStyles) { 10398 injectedStyles = /* @__PURE__ */ new Set(); 10399 runtime.injectedStyles.set(targetDocument, injectedStyles); 10400 } 10401 if (injectedStyles.has(hash)) { 10402 return; 10403 } 10404 if (documentContainsStyleHash6(targetDocument, hash)) { 10405 injectedStyles.add(hash); 10406 return; 10407 } 10408 const style = targetDocument.createElement("style"); 10409 style.setAttribute(STYLE_HASH_ATTRIBUTE6, hash); 10410 style.appendChild(targetDocument.createTextNode(css)); 10411 targetDocument.head.appendChild(style); 10412 injectedStyles.add(hash); 10413 } 10414 function registerDocument6(targetDocument) { 10415 const runtime = getRuntime6(); 10416 runtime.documents.set( 10417 targetDocument, 10418 (runtime.documents.get(targetDocument) ?? 0) + 1 10419 ); 10420 for (const [hash, css] of runtime.styles) { 10421 injectStyle6(targetDocument, hash, css); 10422 } 10423 return () => { 10424 const count = runtime.documents.get(targetDocument); 10425 if (count === void 0) { 10426 return; 10427 } 10428 if (count <= 1) { 10429 runtime.documents.delete(targetDocument); 10430 return; 10431 } 10432 runtime.documents.set(targetDocument, count - 1); 10433 }; 10434 } 10435 function registerStyle6(hash, css) { 10436 const runtime = getRuntime6(); 10437 runtime.styles.set(hash, css); 10438 for (const targetDocument of runtime.documents.keys()) { 10439 injectStyle6(targetDocument, hash, css); 10440 } 10441 } 10442 if (typeof process === "undefined" || true) { 10443 registerStyle6("be37f31c1e", "._11fc52b637ff8a7e__slot{inset:0;isolation:isolate;pointer-events:none;position:fixed;z-index:1000000003}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._11fc52b637ff8a7e__slot>*{pointer-events:auto}}}"); 10444 } 10445 var wp_compat_overlay_slot_default = { "slot": "_11fc52b637ff8a7e__slot" }; 10446 var WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE = "data-wp-compat-overlay-slot"; 10447 function resolveOwnerDocument() { 10448 return typeof document === "undefined" ? null : document; 10449 } 10450 function isInWordPressEnvironment() { 10451 let topWp; 10452 try { 10453 topWp = window.top?.wp; 10454 } catch { 10455 } 10456 const wp = topWp ?? window.wp; 10457 return typeof wp?.components === "object" && wp.components !== null; 10458 } 10459 var cachedSlot = null; 10460 function ensureSlotIsAccessible(element) { 10461 element.setAttribute("aria-hidden", "false"); 10462 return element; 10463 } 10464 function createSlot(ownerDocument2) { 10465 const element = ownerDocument2.createElement("div"); 10466 element.setAttribute(WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE, ""); 10467 if (wp_compat_overlay_slot_default.slot) { 10468 element.classList.add(wp_compat_overlay_slot_default.slot); 10469 } 10470 ownerDocument2.body.appendChild(element); 10471 return element; 10472 } 10473 function getWpCompatOverlaySlot() { 10474 if (typeof window === "undefined") { 10475 return void 0; 10476 } 10477 if (!isInWordPressEnvironment() && window.__wpUiCompatOverlaySlotEnabled !== true) { 10478 return void 0; 10479 } 10480 const ownerDocument2 = resolveOwnerDocument(); 10481 if (!ownerDocument2 || !ownerDocument2.body) { 10482 return void 0; 10483 } 10484 if (cachedSlot && cachedSlot.ownerDocument === ownerDocument2 && cachedSlot.isConnected) { 10485 return ensureSlotIsAccessible(cachedSlot); 10486 } 10487 const existing = ownerDocument2.querySelector( 10488 `[$WP_COMPAT_OVERLAY_SLOT_ATTRIBUTE}]` 10489 ); 10490 if (existing instanceof HTMLDivElement) { 10491 cachedSlot = ensureSlotIsAccessible(existing); 10492 return cachedSlot; 10493 } 10494 if (cachedSlot?.isConnected) { 10495 cachedSlot.remove(); 10496 } 10497 cachedSlot = ensureSlotIsAccessible(createSlot(ownerDocument2)); 10498 return cachedSlot; 10499 } 10500 10501 // packages/ui/build-module/utils/direction-provider.mjs 10502 var import_i18n3 = __toESM(require_i18n(), 1); 10503 var import_jsx_runtime23 = __toESM(require_jsx_runtime(), 1); 10504 function DirectionProvider3({ children }) { 10505 return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DirectionProvider, { direction: (0, import_i18n3.isRTL)() ? "rtl" : "ltr", children }); 10506 } 10507 10508 // packages/ui/build-module/tooltip/popup.mjs 10509 var import_element20 = __toESM(require_element(), 1); 10510 10511 // packages/ui/build-module/tooltip/portal.mjs 10512 var import_element18 = __toESM(require_element(), 1); 10513 var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1); 10514 var Portal = (0, import_element18.forwardRef)( 10515 function TooltipPortal3({ container, ...restProps }, ref) { 10516 return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)( 10517 index_parts_exports2.Portal, 10518 { 10519 container: container === void 0 ? getWpCompatOverlaySlot() : container, 10520 ...restProps, 10521 ref 10522 } 10523 ); 10524 } 10525 ); 10526 10527 // packages/ui/build-module/tooltip/positioner.mjs 10528 var import_element19 = __toESM(require_element(), 1); 10529 var import_jsx_runtime25 = __toESM(require_jsx_runtime(), 1); 10530 var STYLE_HASH_ATTRIBUTE7 = "data-wp-hash"; 10531 function getRuntime7() { 10532 const globalScope = globalThis; 10533 if (globalScope.__wpStyleRuntime) { 10534 return globalScope.__wpStyleRuntime; 10535 } 10536 globalScope.__wpStyleRuntime = { 10537 documents: /* @__PURE__ */ new Map(), 10538 styles: /* @__PURE__ */ new Map(), 10539 injectedStyles: /* @__PURE__ */ new WeakMap() 10540 }; 10541 if (typeof document !== "undefined") { 10542 registerDocument7(document); 10543 } 10544 return globalScope.__wpStyleRuntime; 10545 } 10546 function documentContainsStyleHash7(targetDocument, hash) { 10547 if (!targetDocument.head) { 10548 return false; 10549 } 10550 for (const style of targetDocument.head.querySelectorAll( 10551 `style[$STYLE_HASH_ATTRIBUTE7}]` 10552 )) { 10553 if (style.getAttribute(STYLE_HASH_ATTRIBUTE7) === hash) { 10554 return true; 10555 } 10556 } 10557 return false; 10558 } 10559 function injectStyle7(targetDocument, hash, css) { 10560 if (!targetDocument.head) { 10561 return; 10562 } 10563 const runtime = getRuntime7(); 10564 let injectedStyles = runtime.injectedStyles.get(targetDocument); 10565 if (!injectedStyles) { 10566 injectedStyles = /* @__PURE__ */ new Set(); 10567 runtime.injectedStyles.set(targetDocument, injectedStyles); 10568 } 10569 if (injectedStyles.has(hash)) { 10570 return; 10571 } 10572 if (documentContainsStyleHash7(targetDocument, hash)) { 10573 injectedStyles.add(hash); 10574 return; 10575 } 10576 const style = targetDocument.createElement("style"); 10577 style.setAttribute(STYLE_HASH_ATTRIBUTE7, hash); 10578 style.appendChild(targetDocument.createTextNode(css)); 10579 targetDocument.head.appendChild(style); 10580 injectedStyles.add(hash); 10581 } 10582 function registerDocument7(targetDocument) { 10583 const runtime = getRuntime7(); 10584 runtime.documents.set( 10585 targetDocument, 10586 (runtime.documents.get(targetDocument) ?? 0) + 1 10587 ); 10588 for (const [hash, css] of runtime.styles) { 10589 injectStyle7(targetDocument, hash, css); 10590 } 10591 return () => { 10592 const count = runtime.documents.get(targetDocument); 10593 if (count === void 0) { 10594 return; 10595 } 10596 if (count <= 1) { 10597 runtime.documents.delete(targetDocument); 10598 return; 10599 } 10600 runtime.documents.set(targetDocument, count - 1); 10601 }; 10602 } 10603 function registerStyle7(hash, css) { 10604 const runtime = getRuntime7(); 10605 runtime.styles.set(hash, css); 10606 for (const targetDocument of runtime.documents.keys()) { 10607 injectStyle7(targetDocument, hash, css); 10608 } 10609 } 10610 if (typeof process === "undefined" || true) { 10611 registerStyle7("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); 10612 } 10613 var resets_default2 = { "box-sizing": "_336cd3e4e743482f__box-sizing" }; 10614 if (typeof process === "undefined" || true) { 10615 registerStyle7("19fcc06039", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);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-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}'); 10616 } 10617 var style_default6 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" }; 10618 var Positioner = (0, import_element19.forwardRef)( 10619 function TooltipPositioner3({ align = "center", className, side = "top", sideOffset = 4, ...props }, ref) { 10620 return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)( 10621 index_parts_exports2.Positioner, 10622 { 10623 ref, 10624 align, 10625 side, 10626 sideOffset, 10627 ...props, 10628 className: clsx_default( 10629 resets_default2["box-sizing"], 10630 style_default6.positioner, 10631 className 10632 ) 10633 } 10634 ); 10635 } 10636 ); 10637 10638 // packages/ui/build-module/utils/theme-provider.mjs 10639 var theme = __toESM(require_theme(), 1); 10640 10641 // packages/ui/build-module/lock-unlock.mjs 10642 var import_private_apis = __toESM(require_private_apis(), 1); 10643 var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)( 10644 "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.", 10645 "@wordpress/ui" 10646 ); 10647 10648 // packages/ui/build-module/utils/theme-provider.mjs 10649 function getThemeProvider() { 10650 const themePackage = theme; 10651 if (themePackage.ThemeProvider) { 10652 return themePackage.ThemeProvider; 10653 } 10654 if (!themePackage.privateApis) { 10655 throw new Error( 10656 "@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`." 10657 ); 10658 } 10659 return unlock( 10660 themePackage.privateApis 10661 ).ThemeProvider; 10662 } 10663 var ThemeProvider = getThemeProvider(); 10664 10665 // packages/ui/build-module/tooltip/popup.mjs 10666 var import_jsx_runtime26 = __toESM(require_jsx_runtime(), 1); 10667 var STYLE_HASH_ATTRIBUTE8 = "data-wp-hash"; 10668 function getRuntime8() { 10669 const globalScope = globalThis; 10670 if (globalScope.__wpStyleRuntime) { 10671 return globalScope.__wpStyleRuntime; 10672 } 10673 globalScope.__wpStyleRuntime = { 10674 documents: /* @__PURE__ */ new Map(), 10675 styles: /* @__PURE__ */ new Map(), 10676 injectedStyles: /* @__PURE__ */ new WeakMap() 10677 }; 10678 if (typeof document !== "undefined") { 10679 registerDocument8(document); 10680 } 10681 return globalScope.__wpStyleRuntime; 10682 } 10683 function documentContainsStyleHash8(targetDocument, hash) { 10684 if (!targetDocument.head) { 10685 return false; 10686 } 10687 for (const style of targetDocument.head.querySelectorAll( 10688 `style[$STYLE_HASH_ATTRIBUTE8}]` 10689 )) { 10690 if (style.getAttribute(STYLE_HASH_ATTRIBUTE8) === hash) { 10691 return true; 10692 } 10693 } 10694 return false; 10695 } 10696 function injectStyle8(targetDocument, hash, css) { 10697 if (!targetDocument.head) { 10698 return; 10699 } 10700 const runtime = getRuntime8(); 10701 let injectedStyles = runtime.injectedStyles.get(targetDocument); 10702 if (!injectedStyles) { 10703 injectedStyles = /* @__PURE__ */ new Set(); 10704 runtime.injectedStyles.set(targetDocument, injectedStyles); 10705 } 10706 if (injectedStyles.has(hash)) { 10707 return; 10708 } 10709 if (documentContainsStyleHash8(targetDocument, hash)) { 10710 injectedStyles.add(hash); 10711 return; 10712 } 10713 const style = targetDocument.createElement("style"); 10714 style.setAttribute(STYLE_HASH_ATTRIBUTE8, hash); 10715 style.appendChild(targetDocument.createTextNode(css)); 10716 targetDocument.head.appendChild(style); 10717 injectedStyles.add(hash); 10718 } 10719 function registerDocument8(targetDocument) { 10720 const runtime = getRuntime8(); 10721 runtime.documents.set( 10722 targetDocument, 10723 (runtime.documents.get(targetDocument) ?? 0) + 1 10724 ); 10725 for (const [hash, css] of runtime.styles) { 10726 injectStyle8(targetDocument, hash, css); 10727 } 10728 return () => { 10729 const count = runtime.documents.get(targetDocument); 10730 if (count === void 0) { 10731 return; 10732 } 10733 if (count <= 1) { 10734 runtime.documents.delete(targetDocument); 10735 return; 10736 } 10737 runtime.documents.set(targetDocument, count - 1); 10738 }; 10739 } 10740 function registerStyle8(hash, css) { 10741 const runtime = getRuntime8(); 10742 runtime.styles.set(hash, css); 10743 for (const targetDocument of runtime.documents.keys()) { 10744 injectStyle8(targetDocument, hash, css); 10745 } 10746 } 10747 if (typeof process === "undefined" || true) { 10748 registerStyle8("19fcc06039", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);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-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}'); 10749 } 10750 var style_default7 = { "positioner": "_480b748dd3510e64__positioner", "popup": "_50096b232db7709d__popup" }; 10751 var POPUP_COLOR = { background: "#1e1e1e" }; 10752 var Popup = (0, import_element20.forwardRef)(function TooltipPopup3({ portal, positioner, children, className, ...props }, ref) { 10753 const popupContent = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ThemeProvider, { color: POPUP_COLOR, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)( 10754 index_parts_exports2.Popup, 10755 { 10756 ref, 10757 className: clsx_default(style_default7.popup, className), 10758 ...props, 10759 children 10760 } 10761 ) }); 10762 const positionedPopup = renderSlotWithChildren( 10763 positioner, 10764 /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Positioner, {}), 10765 popupContent 10766 ); 10767 return renderSlotWithChildren(portal, /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Portal, {}), positionedPopup); 10768 }); 10769 10770 // packages/ui/build-module/tooltip/trigger.mjs 10771 var import_element21 = __toESM(require_element(), 1); 10772 var import_jsx_runtime27 = __toESM(require_jsx_runtime(), 1); 10773 var Trigger = (0, import_element21.forwardRef)( 10774 function TooltipTrigger3(props, ref) { 10775 return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(index_parts_exports2.Trigger, { ref, ...props }); 10776 } 10777 ); 10778 10779 // packages/ui/build-module/tooltip/root.mjs 10780 var import_jsx_runtime28 = __toESM(require_jsx_runtime(), 1); 10781 function Root(props) { 10782 return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DirectionProvider3, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(index_parts_exports2.Root, { ...props }) }); 10783 } 10784 10785 // packages/ui/build-module/link/link.mjs 10786 var import_element22 = __toESM(require_element(), 1); 10787 var import_i18n4 = __toESM(require_i18n(), 1); 10788 var import_jsx_runtime29 = __toESM(require_jsx_runtime(), 1); 10789 var STYLE_HASH_ATTRIBUTE9 = "data-wp-hash"; 10790 function getRuntime9() { 10791 const globalScope = globalThis; 10792 if (globalScope.__wpStyleRuntime) { 10793 return globalScope.__wpStyleRuntime; 10794 } 10795 globalScope.__wpStyleRuntime = { 10796 documents: /* @__PURE__ */ new Map(), 10797 styles: /* @__PURE__ */ new Map(), 10798 injectedStyles: /* @__PURE__ */ new WeakMap() 10799 }; 10800 if (typeof document !== "undefined") { 10801 registerDocument9(document); 10802 } 10803 return globalScope.__wpStyleRuntime; 10804 } 10805 function documentContainsStyleHash9(targetDocument, hash) { 10806 if (!targetDocument.head) { 10807 return false; 10808 } 10809 for (const style of targetDocument.head.querySelectorAll( 10810 `style[$STYLE_HASH_ATTRIBUTE9}]` 10811 )) { 10812 if (style.getAttribute(STYLE_HASH_ATTRIBUTE9) === hash) { 10813 return true; 10814 } 10815 } 10816 return false; 10817 } 10818 function injectStyle9(targetDocument, hash, css) { 10819 if (!targetDocument.head) { 10820 return; 10821 } 10822 const runtime = getRuntime9(); 10823 let injectedStyles = runtime.injectedStyles.get(targetDocument); 10824 if (!injectedStyles) { 10825 injectedStyles = /* @__PURE__ */ new Set(); 10826 runtime.injectedStyles.set(targetDocument, injectedStyles); 10827 } 10828 if (injectedStyles.has(hash)) { 10829 return; 10830 } 10831 if (documentContainsStyleHash9(targetDocument, hash)) { 10832 injectedStyles.add(hash); 10833 return; 10834 } 10835 const style = targetDocument.createElement("style"); 10836 style.setAttribute(STYLE_HASH_ATTRIBUTE9, hash); 10837 style.appendChild(targetDocument.createTextNode(css)); 10838 targetDocument.head.appendChild(style); 10839 injectedStyles.add(hash); 10840 } 10841 function registerDocument9(targetDocument) { 10842 const runtime = getRuntime9(); 10843 runtime.documents.set( 10844 targetDocument, 10845 (runtime.documents.get(targetDocument) ?? 0) + 1 10846 ); 10847 for (const [hash, css] of runtime.styles) { 10848 injectStyle9(targetDocument, hash, css); 10849 } 10850 return () => { 10851 const count = runtime.documents.get(targetDocument); 10852 if (count === void 0) { 10853 return; 10854 } 10855 if (count <= 1) { 10856 runtime.documents.delete(targetDocument); 10857 return; 10858 } 10859 runtime.documents.set(targetDocument, count - 1); 10860 }; 10861 } 10862 function registerStyle9(hash, css) { 10863 const runtime = getRuntime9(); 10864 runtime.styles.set(hash, css); 10865 for (const targetDocument of runtime.documents.keys()) { 10866 injectStyle9(targetDocument, hash, css); 10867 } 10868 } 10869 if (typeof process === "undefined" || true) { 10870 registerStyle9("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); 10871 } 10872 var resets_default3 = { "box-sizing": "_336cd3e4e743482f__box-sizing" }; 10873 if (typeof process === "undefined" || true) { 10874 registerStyle9("7c3267f794", "@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{--_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))}}}"); 10875 } 10876 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-except-active": "abc777e9713fa711__outset-ring--focus-except-active", "outset-ring--focus-within-except-active": "_3c9f5ee9fc9c136d__outset-ring--focus-within-except-active" }; 10877 if (typeof process === "undefined" || true) { 10878 registerStyle9("888e86d20a", '@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.d4250949359b05ce__link{--_gcd-a-border-radius:var(--wpds-border-radius-sm,2px);border-radius:var(--wpds-border-radius-sm,2px);text-decoration-thickness:from-font;text-underline-offset:.2em}.f037c632480d4e11__link-with-icon{text-decoration-line:none}._8dc7567f9ff415bf__link-contents{text-decoration:inherit;text-decoration-line:underline}.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-border-radius:0;--_gcd-a-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{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:"\\2060\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2060\\2196"}}}'); 10879 } 10880 var style_default8 = { "link": "d4250949359b05ce__link", "link-with-icon": "f037c632480d4e11__link-with-icon", "link-contents": "_8dc7567f9ff415bf__link-contents", "is-brand": "c6055659b8e2cd2c__is-brand", "is-neutral": "_92e0dfcaeee15b88__is-neutral", "is-unstyled": "cf122a9bf1035d42__is-unstyled", "link-icon": "_0cb411afac4c86c7__link-icon" }; 10881 if (typeof process === "undefined" || true) { 10882 registerStyle9("abb19c3171", "._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)}[role=treeitem] span._400bf7ee0c6061a9__span[aria-hidden]{display:var(--_gcd-span-display,inline);font-family:var(--_gcd-span-font-family,inherit);font-size:var(--_gcd-span-font-size,inherit);line-height:var(--_gcd-span-line-height,1);pointer-events:var(--_gcd-span-pointer-events,auto);position:var(--_gcd-span-position,static)}"); 10883 } 10884 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", "span": "_400bf7ee0c6061a9__span" }; 10885 var Link = (0, import_element22.forwardRef)( 10886 function UnforwardedLink({ 10887 children, 10888 variant = "default", 10889 tone = "brand", 10890 openInNewTab = false, 10891 target, 10892 render, 10893 className, 10894 ...props 10895 }, ref) { 10896 const shouldShowNewTabIndicator = openInNewTab || /^_blank$/i.test(target ?? ""); 10897 const element = useRender({ 10898 render, 10899 defaultTagName: "a", 10900 ref, 10901 props: mergeProps(props, { 10902 className: clsx_default( 10903 global_css_defense_default3.a, 10904 resets_default3["box-sizing"], 10905 focus_module_default2["outset-ring--focus-except-active"], 10906 variant !== "unstyled" && style_default8.link, 10907 variant !== "unstyled" && shouldShowNewTabIndicator && style_default8["link-with-icon"], 10908 variant !== "unstyled" && style_default8[`is-$tone}`], 10909 variant === "unstyled" && style_default8["is-unstyled"], 10910 className 10911 ), 10912 target: target ?? (openInNewTab ? "_blank" : void 0), 10913 children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [ 10914 shouldShowNewTabIndicator && variant !== "unstyled" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: style_default8["link-contents"], children }) : children, 10915 shouldShowNewTabIndicator && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)( 10916 "span", 10917 { 10918 className: style_default8["link-icon"], 10919 role: "img", 10920 "aria-label": ( 10921 /* translators: accessibility text appended to link text */ 10922 (0, import_i18n4.__)("(opens in a new tab)") 10923 ) 10924 } 10925 ) 10926 ] }) 10927 }) 10928 }); 10929 return element; 10930 } 10931 ); 10932 10933 // packages/ui/build-module/icon-button/icon-button.mjs 10934 var import_element23 = __toESM(require_element(), 1); 10935 var import_jsx_runtime30 = __toESM(require_jsx_runtime(), 1); 10936 var STYLE_HASH_ATTRIBUTE10 = "data-wp-hash"; 10937 function getRuntime10() { 10938 const globalScope = globalThis; 10939 if (globalScope.__wpStyleRuntime) { 10940 return globalScope.__wpStyleRuntime; 10941 } 10942 globalScope.__wpStyleRuntime = { 10943 documents: /* @__PURE__ */ new Map(), 10944 styles: /* @__PURE__ */ new Map(), 10945 injectedStyles: /* @__PURE__ */ new WeakMap() 10946 }; 10947 if (typeof document !== "undefined") { 10948 registerDocument10(document); 10949 } 10950 return globalScope.__wpStyleRuntime; 10951 } 10952 function documentContainsStyleHash10(targetDocument, hash) { 10953 if (!targetDocument.head) { 10954 return false; 10955 } 10956 for (const style of targetDocument.head.querySelectorAll( 10957 `style[$STYLE_HASH_ATTRIBUTE10}]` 10958 )) { 10959 if (style.getAttribute(STYLE_HASH_ATTRIBUTE10) === hash) { 10960 return true; 10961 } 10962 } 10963 return false; 10964 } 10965 function injectStyle10(targetDocument, hash, css) { 10966 if (!targetDocument.head) { 10967 return; 10968 } 10969 const runtime = getRuntime10(); 10970 let injectedStyles = runtime.injectedStyles.get(targetDocument); 10971 if (!injectedStyles) { 10972 injectedStyles = /* @__PURE__ */ new Set(); 10973 runtime.injectedStyles.set(targetDocument, injectedStyles); 10974 } 10975 if (injectedStyles.has(hash)) { 10976 return; 10977 } 10978 if (documentContainsStyleHash10(targetDocument, hash)) { 10979 injectedStyles.add(hash); 10980 return; 10981 } 10982 const style = targetDocument.createElement("style"); 10983 style.setAttribute(STYLE_HASH_ATTRIBUTE10, hash); 10984 style.appendChild(targetDocument.createTextNode(css)); 10985 targetDocument.head.appendChild(style); 10986 injectedStyles.add(hash); 10987 } 10988 function registerDocument10(targetDocument) { 10989 const runtime = getRuntime10(); 10990 runtime.documents.set( 10991 targetDocument, 10992 (runtime.documents.get(targetDocument) ?? 0) + 1 10993 ); 10994 for (const [hash, css] of runtime.styles) { 10995 injectStyle10(targetDocument, hash, css); 10996 } 10997 return () => { 10998 const count = runtime.documents.get(targetDocument); 10999 if (count === void 0) { 11000 return; 11001 } 11002 if (count <= 1) { 11003 runtime.documents.delete(targetDocument); 11004 return; 11005 } 11006 runtime.documents.set(targetDocument, count - 1); 11007 }; 11008 } 11009 function registerStyle10(hash, css) { 11010 const runtime = getRuntime10(); 11011 runtime.styles.set(hash, css); 11012 for (const targetDocument of runtime.documents.keys()) { 11013 injectStyle10(targetDocument, hash, css); 11014 } 11015 } 11016 if (typeof process === "undefined" || true) { 11017 registerStyle10("c5cdafb1bc", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer compositions{._28cfdc260e755391__icon-button{--wp-ui-button-aspect-ratio:1;--wp-ui-button-padding-inline:0px;--wp-ui-button-min-width:unset}.f1c70d719989a85a__icon{margin:-1px}}}"); 11018 } 11019 var style_default9 = { "icon-button": "_28cfdc260e755391__icon-button", "icon": "f1c70d719989a85a__icon" }; 11020 var IconButton = (0, import_element23.forwardRef)( 11021 function UnforwardedIconButton({ 11022 label, 11023 className, 11024 // Prevent accidental forwarding of `children` 11025 children: _children, 11026 disabled: disabled2, 11027 focusableWhenDisabled = true, 11028 icon, 11029 size: size4, 11030 shortcut, 11031 positioner, 11032 "aria-describedby": ariaDescribedBy, 11033 "aria-keyshortcuts": ariaKeyShortcuts, 11034 ...restProps 11035 }, ref) { 11036 const classes = clsx_default(style_default9["icon-button"], className); 11037 const { descriptionId, targetProps } = useKeyboardShortcutProps({ 11038 "aria-describedby": ariaDescribedBy, 11039 "aria-keyshortcuts": ariaKeyShortcuts, 11040 shortcut 11041 }); 11042 return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Root, { children: [ 11043 /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)( 11044 Trigger, 11045 { 11046 ref, 11047 ...targetProps, 11048 disabled: disabled2 && !focusableWhenDisabled, 11049 render: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)( 11050 Button4, 11051 { 11052 ...restProps, 11053 size: size4, 11054 "aria-label": label, 11055 disabled: disabled2, 11056 focusableWhenDisabled 11057 } 11058 ), 11059 className: classes, 11060 children: [ 11061 /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { icon, size: 24, className: style_default9.icon }), 11062 shortcut && descriptionId && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)( 11063 KeyboardShortcutDescription, 11064 { 11065 descriptionId, 11066 shortcut 11067 } 11068 ) 11069 ] 11070 } 11071 ), 11072 /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Popup, { positioner, children: [ 11073 label, 11074 shortcut && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [ 11075 " ", 11076 /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(KeyboardShortcutDisplay, { shortcut }) 11077 ] }) 11078 ] }) 11079 ] }); 11080 } 11081 ); 11082 11083 // packages/ui/build-module/collapsible/index.mjs 11084 var collapsible_exports = {}; 11085 __export(collapsible_exports, { 11086 Panel: () => Panel, 11087 Root: () => Root2, 11088 Trigger: () => Trigger2 11089 }); 11090 11091 // packages/ui/build-module/collapsible/panel.mjs 11092 var import_element24 = __toESM(require_element(), 1); 11093 var import_jsx_runtime31 = __toESM(require_jsx_runtime(), 1); 11094 var Panel = (0, import_element24.forwardRef)( 11095 function CollapsiblePanel3(props, forwardedRef) { 11096 return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(index_parts_exports.Panel, { ref: forwardedRef, ...props }); 11097 } 11098 ); 11099 11100 // packages/ui/build-module/collapsible/root.mjs 11101 var import_element25 = __toESM(require_element(), 1); 11102 var import_jsx_runtime32 = __toESM(require_jsx_runtime(), 1); 11103 var Root2 = (0, import_element25.forwardRef)( 11104 function CollapsibleRoot3(props, forwardedRef) { 11105 return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(index_parts_exports.Root, { ref: forwardedRef, ...props }); 11106 } 11107 ); 11108 11109 // packages/ui/build-module/collapsible/trigger.mjs 11110 var import_element26 = __toESM(require_element(), 1); 11111 var import_jsx_runtime33 = __toESM(require_jsx_runtime(), 1); 11112 var Trigger2 = (0, import_element26.forwardRef)( 11113 function CollapsibleTrigger3(props, forwardedRef) { 11114 return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(index_parts_exports.Trigger, { ref: forwardedRef, ...props }); 11115 } 11116 ); 11117 11118 // packages/ui/build-module/notice/index.mjs 11119 var notice_exports = {}; 11120 __export(notice_exports, { 11121 ActionButton: () => ActionButton, 11122 ActionLink: () => ActionLink, 11123 Actions: () => Actions, 11124 CloseIconButton: () => CloseIconButton, 11125 Description: () => Description, 11126 Root: () => Root3, 11127 Title: () => Title 11128 }); 11129 11130 // packages/ui/build-module/notice/root.mjs 11131 var import_element27 = __toESM(require_element(), 1); 11132 var import_jsx_runtime34 = __toESM(require_jsx_runtime(), 1); 11133 var STYLE_HASH_ATTRIBUTE11 = "data-wp-hash"; 11134 function getRuntime11() { 11135 const globalScope = globalThis; 11136 if (globalScope.__wpStyleRuntime) { 11137 return globalScope.__wpStyleRuntime; 11138 } 11139 globalScope.__wpStyleRuntime = { 11140 documents: /* @__PURE__ */ new Map(), 11141 styles: /* @__PURE__ */ new Map(), 11142 injectedStyles: /* @__PURE__ */ new WeakMap() 11143 }; 11144 if (typeof document !== "undefined") { 11145 registerDocument11(document); 11146 } 11147 return globalScope.__wpStyleRuntime; 11148 } 11149 function documentContainsStyleHash11(targetDocument, hash) { 11150 if (!targetDocument.head) { 11151 return false; 11152 } 11153 for (const style of targetDocument.head.querySelectorAll( 11154 `style[$STYLE_HASH_ATTRIBUTE11}]` 11155 )) { 11156 if (style.getAttribute(STYLE_HASH_ATTRIBUTE11) === hash) { 11157 return true; 11158 } 11159 } 11160 return false; 11161 } 11162 function injectStyle11(targetDocument, hash, css) { 11163 if (!targetDocument.head) { 11164 return; 11165 } 11166 const runtime = getRuntime11(); 11167 let injectedStyles = runtime.injectedStyles.get(targetDocument); 11168 if (!injectedStyles) { 11169 injectedStyles = /* @__PURE__ */ new Set(); 11170 runtime.injectedStyles.set(targetDocument, injectedStyles); 11171 } 11172 if (injectedStyles.has(hash)) { 11173 return; 11174 } 11175 if (documentContainsStyleHash11(targetDocument, hash)) { 11176 injectedStyles.add(hash); 11177 return; 11178 } 11179 const style = targetDocument.createElement("style"); 11180 style.setAttribute(STYLE_HASH_ATTRIBUTE11, hash); 11181 style.appendChild(targetDocument.createTextNode(css)); 11182 targetDocument.head.appendChild(style); 11183 injectedStyles.add(hash); 11184 } 11185 function registerDocument11(targetDocument) { 11186 const runtime = getRuntime11(); 11187 runtime.documents.set( 11188 targetDocument, 11189 (runtime.documents.get(targetDocument) ?? 0) + 1 11190 ); 11191 for (const [hash, css] of runtime.styles) { 11192 injectStyle11(targetDocument, hash, css); 11193 } 11194 return () => { 11195 const count = runtime.documents.get(targetDocument); 11196 if (count === void 0) { 11197 return; 11198 } 11199 if (count <= 1) { 11200 runtime.documents.delete(targetDocument); 11201 return; 11202 } 11203 runtime.documents.set(targetDocument, count - 1); 11204 }; 11205 } 11206 function registerStyle11(hash, css) { 11207 const runtime = getRuntime11(); 11208 runtime.styles.set(hash, css); 11209 for (const targetDocument of runtime.documents.keys()) { 11210 injectStyle11(targetDocument, hash, css); 11211 } 11212 } 11213 if (typeof process === "undefined" || true) { 11214 registerStyle11("10f3806643", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}"); 11215 } 11216 var resets_default4 = { "box-sizing": "_336cd3e4e743482f__box-sizing" }; 11217 if (typeof process === "undefined" || true) { 11218 registerStyle11("30e8b36272", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;isolation:isolate;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.b5397fb9d05389e3__title{--_gcd-heading-color:var(--wp-ui-notice-text-color);color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button,.d329e7416d368d31__action-link{mix-blend-mode:luminosity;@media (forced-colors:active){mix-blend-mode:normal}}}}"); 11219 } 11220 var style_default10 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "title": "b5397fb9d05389e3__title", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error" }; 11221 var icons = { 11222 neutral: null, 11223 info: info_default, 11224 warning: caution_default, 11225 success: published_default, 11226 error: error_default 11227 }; 11228 var Root3 = (0, import_element27.forwardRef)(function Notice({ intent = "neutral", children, icon, render, ...restProps }, ref) { 11229 const iconElement = icon === null ? null : icon ?? icons[intent]; 11230 const mergedClassName = clsx_default( 11231 style_default10.notice, 11232 style_default10[`is-$intent}`], 11233 resets_default4["box-sizing"] 11234 ); 11235 const element = useRender({ 11236 defaultTagName: "div", 11237 render, 11238 ref, 11239 props: mergeProps( 11240 { 11241 className: mergedClassName, 11242 children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [ 11243 children, 11244 iconElement && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)( 11245 Icon, 11246 { 11247 className: style_default10.icon, 11248 icon: iconElement 11249 } 11250 ) 11251 ] }) 11252 }, 11253 restProps 11254 ) 11255 }); 11256 return element; 11257 }); 11258 11259 // packages/ui/build-module/notice/title.mjs 11260 var import_element28 = __toESM(require_element(), 1); 11261 var import_jsx_runtime35 = __toESM(require_jsx_runtime(), 1); 11262 var STYLE_HASH_ATTRIBUTE12 = "data-wp-hash"; 11263 function getRuntime12() { 11264 const globalScope = globalThis; 11265 if (globalScope.__wpStyleRuntime) { 11266 return globalScope.__wpStyleRuntime; 11267 } 11268 globalScope.__wpStyleRuntime = { 11269 documents: /* @__PURE__ */ new Map(), 11270 styles: /* @__PURE__ */ new Map(), 11271 injectedStyles: /* @__PURE__ */ new WeakMap() 11272 }; 11273 if (typeof document !== "undefined") { 11274 registerDocument12(document); 11275 } 11276 return globalScope.__wpStyleRuntime; 11277 } 11278 function documentContainsStyleHash12(targetDocument, hash) { 11279 if (!targetDocument.head) { 11280 return false; 11281 } 11282 for (const style of targetDocument.head.querySelectorAll( 11283 `style[$STYLE_HASH_ATTRIBUTE12}]` 11284 )) { 11285 if (style.getAttribute(STYLE_HASH_ATTRIBUTE12) === hash) { 11286 return true; 11287 } 11288 } 11289 return false; 11290 } 11291 function injectStyle12(targetDocument, hash, css) { 11292 if (!targetDocument.head) { 11293 return; 11294 } 11295 const runtime = getRuntime12(); 11296 let injectedStyles = runtime.injectedStyles.get(targetDocument); 11297 if (!injectedStyles) { 11298 injectedStyles = /* @__PURE__ */ new Set(); 11299 runtime.injectedStyles.set(targetDocument, injectedStyles); 11300 } 11301 if (injectedStyles.has(hash)) { 11302 return; 11303 } 11304 if (documentContainsStyleHash12(targetDocument, hash)) { 11305 injectedStyles.add(hash); 11306 return; 11307 } 11308 const style = targetDocument.createElement("style"); 11309 style.setAttribute(STYLE_HASH_ATTRIBUTE12, hash); 11310 style.appendChild(targetDocument.createTextNode(css)); 11311 targetDocument.head.appendChild(style); 11312 injectedStyles.add(hash); 11313 } 11314 function registerDocument12(targetDocument) { 11315 const runtime = getRuntime12(); 11316 runtime.documents.set( 11317 targetDocument, 11318 (runtime.documents.get(targetDocument) ?? 0) + 1 11319 ); 11320 for (const [hash, css] of runtime.styles) { 11321 injectStyle12(targetDocument, hash, css); 11322 } 11323 return () => { 11324 const count = runtime.documents.get(targetDocument); 11325 if (count === void 0) { 11326 return; 11327 } 11328 if (count <= 1) { 11329 runtime.documents.delete(targetDocument); 11330 return; 11331 } 11332 runtime.documents.set(targetDocument, count - 1); 11333 }; 11334 } 11335 function registerStyle12(hash, css) { 11336 const runtime = getRuntime12(); 11337 runtime.styles.set(hash, css); 11338 for (const targetDocument of runtime.documents.keys()) { 11339 injectStyle12(targetDocument, hash, css); 11340 } 11341 } 11342 if (typeof process === "undefined" || true) { 11343 registerStyle12("30e8b36272", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;isolation:isolate;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.b5397fb9d05389e3__title{--_gcd-heading-color:var(--wp-ui-notice-text-color);color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button,.d329e7416d368d31__action-link{mix-blend-mode:luminosity;@media (forced-colors:active){mix-blend-mode:normal}}}}"); 11344 } 11345 var style_default11 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "title": "b5397fb9d05389e3__title", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error" }; 11346 var Title = (0, import_element28.forwardRef)( 11347 function NoticeTitle({ className, ...props }, ref) { 11348 return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)( 11349 Text, 11350 { 11351 ref, 11352 variant: "heading-md", 11353 className: clsx_default(style_default11.title, className), 11354 ...props 11355 } 11356 ); 11357 } 11358 ); 11359 11360 // packages/ui/build-module/notice/description.mjs 11361 var import_element29 = __toESM(require_element(), 1); 11362 var import_jsx_runtime36 = __toESM(require_jsx_runtime(), 1); 11363 var STYLE_HASH_ATTRIBUTE13 = "data-wp-hash"; 11364 function getRuntime13() { 11365 const globalScope = globalThis; 11366 if (globalScope.__wpStyleRuntime) { 11367 return globalScope.__wpStyleRuntime; 11368 } 11369 globalScope.__wpStyleRuntime = { 11370 documents: /* @__PURE__ */ new Map(), 11371 styles: /* @__PURE__ */ new Map(), 11372 injectedStyles: /* @__PURE__ */ new WeakMap() 11373 }; 11374 if (typeof document !== "undefined") { 11375 registerDocument13(document); 11376 } 11377 return globalScope.__wpStyleRuntime; 11378 } 11379 function documentContainsStyleHash13(targetDocument, hash) { 11380 if (!targetDocument.head) { 11381 return false; 11382 } 11383 for (const style of targetDocument.head.querySelectorAll( 11384 `style[$STYLE_HASH_ATTRIBUTE13}]` 11385 )) { 11386 if (style.getAttribute(STYLE_HASH_ATTRIBUTE13) === hash) { 11387 return true; 11388 } 11389 } 11390 return false; 11391 } 11392 function injectStyle13(targetDocument, hash, css) { 11393 if (!targetDocument.head) { 11394 return; 11395 } 11396 const runtime = getRuntime13(); 11397 let injectedStyles = runtime.injectedStyles.get(targetDocument); 11398 if (!injectedStyles) { 11399 injectedStyles = /* @__PURE__ */ new Set(); 11400 runtime.injectedStyles.set(targetDocument, injectedStyles); 11401 } 11402 if (injectedStyles.has(hash)) { 11403 return; 11404 } 11405 if (documentContainsStyleHash13(targetDocument, hash)) { 11406 injectedStyles.add(hash); 11407 return; 11408 } 11409 const style = targetDocument.createElement("style"); 11410 style.setAttribute(STYLE_HASH_ATTRIBUTE13, hash); 11411 style.appendChild(targetDocument.createTextNode(css)); 11412 targetDocument.head.appendChild(style); 11413 injectedStyles.add(hash); 11414 } 11415 function registerDocument13(targetDocument) { 11416 const runtime = getRuntime13(); 11417 runtime.documents.set( 11418 targetDocument, 11419 (runtime.documents.get(targetDocument) ?? 0) + 1 11420 ); 11421 for (const [hash, css] of runtime.styles) { 11422 injectStyle13(targetDocument, hash, css); 11423 } 11424 return () => { 11425 const count = runtime.documents.get(targetDocument); 11426 if (count === void 0) { 11427 return; 11428 } 11429 if (count <= 1) { 11430 runtime.documents.delete(targetDocument); 11431 return; 11432 } 11433 runtime.documents.set(targetDocument, count - 1); 11434 }; 11435 } 11436 function registerStyle13(hash, css) { 11437 const runtime = getRuntime13(); 11438 runtime.styles.set(hash, css); 11439 for (const targetDocument of runtime.documents.keys()) { 11440 injectStyle13(targetDocument, hash, css); 11441 } 11442 } 11443 if (typeof process === "undefined" || true) { 11444 registerStyle13("30e8b36272", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;isolation:isolate;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.b5397fb9d05389e3__title{--_gcd-heading-color:var(--wp-ui-notice-text-color);color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button,.d329e7416d368d31__action-link{mix-blend-mode:luminosity;@media (forced-colors:active){mix-blend-mode:normal}}}}"); 11445 } 11446 var style_default12 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "title": "b5397fb9d05389e3__title", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error" }; 11447 var Description = (0, import_element29.forwardRef)( 11448 function NoticeDescription({ className, ...props }, ref) { 11449 return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)( 11450 Text, 11451 { 11452 ref, 11453 variant: "body-md", 11454 className: clsx_default(style_default12.description, className), 11455 ...props 11456 } 11457 ); 11458 } 11459 ); 11460 11461 // packages/ui/build-module/notice/actions.mjs 11462 var import_element30 = __toESM(require_element(), 1); 11463 var STYLE_HASH_ATTRIBUTE14 = "data-wp-hash"; 11464 function getRuntime14() { 11465 const globalScope = globalThis; 11466 if (globalScope.__wpStyleRuntime) { 11467 return globalScope.__wpStyleRuntime; 11468 } 11469 globalScope.__wpStyleRuntime = { 11470 documents: /* @__PURE__ */ new Map(), 11471 styles: /* @__PURE__ */ new Map(), 11472 injectedStyles: /* @__PURE__ */ new WeakMap() 11473 }; 11474 if (typeof document !== "undefined") { 11475 registerDocument14(document); 11476 } 11477 return globalScope.__wpStyleRuntime; 11478 } 11479 function documentContainsStyleHash14(targetDocument, hash) { 11480 if (!targetDocument.head) { 11481 return false; 11482 } 11483 for (const style of targetDocument.head.querySelectorAll( 11484 `style[$STYLE_HASH_ATTRIBUTE14}]` 11485 )) { 11486 if (style.getAttribute(STYLE_HASH_ATTRIBUTE14) === hash) { 11487 return true; 11488 } 11489 } 11490 return false; 11491 } 11492 function injectStyle14(targetDocument, hash, css) { 11493 if (!targetDocument.head) { 11494 return; 11495 } 11496 const runtime = getRuntime14(); 11497 let injectedStyles = runtime.injectedStyles.get(targetDocument); 11498 if (!injectedStyles) { 11499 injectedStyles = /* @__PURE__ */ new Set(); 11500 runtime.injectedStyles.set(targetDocument, injectedStyles); 11501 } 11502 if (injectedStyles.has(hash)) { 11503 return; 11504 } 11505 if (documentContainsStyleHash14(targetDocument, hash)) { 11506 injectedStyles.add(hash); 11507 return; 11508 } 11509 const style = targetDocument.createElement("style"); 11510 style.setAttribute(STYLE_HASH_ATTRIBUTE14, hash); 11511 style.appendChild(targetDocument.createTextNode(css)); 11512 targetDocument.head.appendChild(style); 11513 injectedStyles.add(hash); 11514 } 11515 function registerDocument14(targetDocument) { 11516 const runtime = getRuntime14(); 11517 runtime.documents.set( 11518 targetDocument, 11519 (runtime.documents.get(targetDocument) ?? 0) + 1 11520 ); 11521 for (const [hash, css] of runtime.styles) { 11522 injectStyle14(targetDocument, hash, css); 11523 } 11524 return () => { 11525 const count = runtime.documents.get(targetDocument); 11526 if (count === void 0) { 11527 return; 11528 } 11529 if (count <= 1) { 11530 runtime.documents.delete(targetDocument); 11531 return; 11532 } 11533 runtime.documents.set(targetDocument, count - 1); 11534 }; 11535 } 11536 function registerStyle14(hash, css) { 11537 const runtime = getRuntime14(); 11538 runtime.styles.set(hash, css); 11539 for (const targetDocument of runtime.documents.keys()) { 11540 injectStyle14(targetDocument, hash, css); 11541 } 11542 } 11543 if (typeof process === "undefined" || true) { 11544 registerStyle14("30e8b36272", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;isolation:isolate;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.b5397fb9d05389e3__title{--_gcd-heading-color:var(--wp-ui-notice-text-color);color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button,.d329e7416d368d31__action-link{mix-blend-mode:luminosity;@media (forced-colors:active){mix-blend-mode:normal}}}}"); 11545 } 11546 var style_default13 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "title": "b5397fb9d05389e3__title", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error" }; 11547 var Actions = (0, import_element30.forwardRef)( 11548 function NoticeActions({ render, ...props }, ref) { 11549 const element = useRender({ 11550 defaultTagName: "div", 11551 render, 11552 ref, 11553 props: mergeProps( 11554 { 11555 className: style_default13.actions 11556 }, 11557 props 11558 ) 11559 }); 11560 return element; 11561 } 11562 ); 11563 11564 // packages/ui/build-module/notice/close-icon-button.mjs 11565 var import_element31 = __toESM(require_element(), 1); 11566 var import_i18n5 = __toESM(require_i18n(), 1); 11567 var import_jsx_runtime37 = __toESM(require_jsx_runtime(), 1); 11568 var STYLE_HASH_ATTRIBUTE15 = "data-wp-hash"; 11569 function getRuntime15() { 11570 const globalScope = globalThis; 11571 if (globalScope.__wpStyleRuntime) { 11572 return globalScope.__wpStyleRuntime; 11573 } 11574 globalScope.__wpStyleRuntime = { 11575 documents: /* @__PURE__ */ new Map(), 11576 styles: /* @__PURE__ */ new Map(), 11577 injectedStyles: /* @__PURE__ */ new WeakMap() 11578 }; 11579 if (typeof document !== "undefined") { 11580 registerDocument15(document); 11581 } 11582 return globalScope.__wpStyleRuntime; 11583 } 11584 function documentContainsStyleHash15(targetDocument, hash) { 11585 if (!targetDocument.head) { 11586 return false; 11587 } 11588 for (const style of targetDocument.head.querySelectorAll( 11589 `style[$STYLE_HASH_ATTRIBUTE15}]` 11590 )) { 11591 if (style.getAttribute(STYLE_HASH_ATTRIBUTE15) === hash) { 11592 return true; 11593 } 11594 } 11595 return false; 11596 } 11597 function injectStyle15(targetDocument, hash, css) { 11598 if (!targetDocument.head) { 11599 return; 11600 } 11601 const runtime = getRuntime15(); 11602 let injectedStyles = runtime.injectedStyles.get(targetDocument); 11603 if (!injectedStyles) { 11604 injectedStyles = /* @__PURE__ */ new Set(); 11605 runtime.injectedStyles.set(targetDocument, injectedStyles); 11606 } 11607 if (injectedStyles.has(hash)) { 11608 return; 11609 } 11610 if (documentContainsStyleHash15(targetDocument, hash)) { 11611 injectedStyles.add(hash); 11612 return; 11613 } 11614 const style = targetDocument.createElement("style"); 11615 style.setAttribute(STYLE_HASH_ATTRIBUTE15, hash); 11616 style.appendChild(targetDocument.createTextNode(css)); 11617 targetDocument.head.appendChild(style); 11618 injectedStyles.add(hash); 11619 } 11620 function registerDocument15(targetDocument) { 11621 const runtime = getRuntime15(); 11622 runtime.documents.set( 11623 targetDocument, 11624 (runtime.documents.get(targetDocument) ?? 0) + 1 11625 ); 11626 for (const [hash, css] of runtime.styles) { 11627 injectStyle15(targetDocument, hash, css); 11628 } 11629 return () => { 11630 const count = runtime.documents.get(targetDocument); 11631 if (count === void 0) { 11632 return; 11633 } 11634 if (count <= 1) { 11635 runtime.documents.delete(targetDocument); 11636 return; 11637 } 11638 runtime.documents.set(targetDocument, count - 1); 11639 }; 11640 } 11641 function registerStyle15(hash, css) { 11642 const runtime = getRuntime15(); 11643 runtime.styles.set(hash, css); 11644 for (const targetDocument of runtime.documents.keys()) { 11645 injectStyle15(targetDocument, hash, css); 11646 } 11647 } 11648 if (typeof process === "undefined" || true) { 11649 registerStyle15("30e8b36272", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;isolation:isolate;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.b5397fb9d05389e3__title{--_gcd-heading-color:var(--wp-ui-notice-text-color);color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button,.d329e7416d368d31__action-link{mix-blend-mode:luminosity;@media (forced-colors:active){mix-blend-mode:normal}}}}"); 11650 } 11651 var style_default14 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "title": "b5397fb9d05389e3__title", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error" }; 11652 var CloseIconButton = (0, import_element31.forwardRef)(function NoticeCloseIconButton({ className, icon = close_small_default, label = (0, import_i18n5.__)("Dismiss"), ...props }, ref) { 11653 return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)( 11654 IconButton, 11655 { 11656 ...props, 11657 ref, 11658 className: clsx_default(style_default14["close-icon"], className), 11659 variant: "minimal", 11660 size: "small", 11661 tone: "neutral", 11662 icon, 11663 label 11664 } 11665 ); 11666 }); 11667 11668 // packages/ui/build-module/notice/action-button.mjs 11669 var import_element32 = __toESM(require_element(), 1); 11670 var import_jsx_runtime38 = __toESM(require_jsx_runtime(), 1); 11671 var STYLE_HASH_ATTRIBUTE16 = "data-wp-hash"; 11672 function getRuntime16() { 11673 const globalScope = globalThis; 11674 if (globalScope.__wpStyleRuntime) { 11675 return globalScope.__wpStyleRuntime; 11676 } 11677 globalScope.__wpStyleRuntime = { 11678 documents: /* @__PURE__ */ new Map(), 11679 styles: /* @__PURE__ */ new Map(), 11680 injectedStyles: /* @__PURE__ */ new WeakMap() 11681 }; 11682 if (typeof document !== "undefined") { 11683 registerDocument16(document); 11684 } 11685 return globalScope.__wpStyleRuntime; 11686 } 11687 function documentContainsStyleHash16(targetDocument, hash) { 11688 if (!targetDocument.head) { 11689 return false; 11690 } 11691 for (const style of targetDocument.head.querySelectorAll( 11692 `style[$STYLE_HASH_ATTRIBUTE16}]` 11693 )) { 11694 if (style.getAttribute(STYLE_HASH_ATTRIBUTE16) === hash) { 11695 return true; 11696 } 11697 } 11698 return false; 11699 } 11700 function injectStyle16(targetDocument, hash, css) { 11701 if (!targetDocument.head) { 11702 return; 11703 } 11704 const runtime = getRuntime16(); 11705 let injectedStyles = runtime.injectedStyles.get(targetDocument); 11706 if (!injectedStyles) { 11707 injectedStyles = /* @__PURE__ */ new Set(); 11708 runtime.injectedStyles.set(targetDocument, injectedStyles); 11709 } 11710 if (injectedStyles.has(hash)) { 11711 return; 11712 } 11713 if (documentContainsStyleHash16(targetDocument, hash)) { 11714 injectedStyles.add(hash); 11715 return; 11716 } 11717 const style = targetDocument.createElement("style"); 11718 style.setAttribute(STYLE_HASH_ATTRIBUTE16, hash); 11719 style.appendChild(targetDocument.createTextNode(css)); 11720 targetDocument.head.appendChild(style); 11721 injectedStyles.add(hash); 11722 } 11723 function registerDocument16(targetDocument) { 11724 const runtime = getRuntime16(); 11725 runtime.documents.set( 11726 targetDocument, 11727 (runtime.documents.get(targetDocument) ?? 0) + 1 11728 ); 11729 for (const [hash, css] of runtime.styles) { 11730 injectStyle16(targetDocument, hash, css); 11731 } 11732 return () => { 11733 const count = runtime.documents.get(targetDocument); 11734 if (count === void 0) { 11735 return; 11736 } 11737 if (count <= 1) { 11738 runtime.documents.delete(targetDocument); 11739 return; 11740 } 11741 runtime.documents.set(targetDocument, count - 1); 11742 }; 11743 } 11744 function registerStyle16(hash, css) { 11745 const runtime = getRuntime16(); 11746 runtime.styles.set(hash, css); 11747 for (const targetDocument of runtime.documents.keys()) { 11748 injectStyle16(targetDocument, hash, css); 11749 } 11750 } 11751 if (typeof process === "undefined" || true) { 11752 registerStyle16("30e8b36272", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;isolation:isolate;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.b5397fb9d05389e3__title{--_gcd-heading-color:var(--wp-ui-notice-text-color);color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button,.d329e7416d368d31__action-link{mix-blend-mode:luminosity;@media (forced-colors:active){mix-blend-mode:normal}}}}"); 11753 } 11754 var style_default15 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "title": "b5397fb9d05389e3__title", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error" }; 11755 var ActionButton = (0, import_element32.forwardRef)( 11756 function NoticeActionButton({ className, loading, loadingAnnouncement, variant, ...props }, ref) { 11757 const loadingProps = loading !== void 0 ? { loading, loadingAnnouncement: loadingAnnouncement ?? "" } : {}; 11758 return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)( 11759 Button4, 11760 { 11761 ...props, 11762 ...loadingProps, 11763 ref, 11764 size: "compact", 11765 tone: "neutral", 11766 variant, 11767 className: clsx_default( 11768 style_default15["action-button"], 11769 style_default15[`is-action-button-$variant}`], 11770 className 11771 ) 11772 } 11773 ); 11774 } 11775 ); 11776 11777 // packages/ui/build-module/notice/action-link.mjs 11778 var import_element33 = __toESM(require_element(), 1); 11779 var import_jsx_runtime39 = __toESM(require_jsx_runtime(), 1); 11780 var STYLE_HASH_ATTRIBUTE17 = "data-wp-hash"; 11781 function getRuntime17() { 11782 const globalScope = globalThis; 11783 if (globalScope.__wpStyleRuntime) { 11784 return globalScope.__wpStyleRuntime; 11785 } 11786 globalScope.__wpStyleRuntime = { 11787 documents: /* @__PURE__ */ new Map(), 11788 styles: /* @__PURE__ */ new Map(), 11789 injectedStyles: /* @__PURE__ */ new WeakMap() 11790 }; 11791 if (typeof document !== "undefined") { 11792 registerDocument17(document); 11793 } 11794 return globalScope.__wpStyleRuntime; 11795 } 11796 function documentContainsStyleHash17(targetDocument, hash) { 11797 if (!targetDocument.head) { 11798 return false; 11799 } 11800 for (const style of targetDocument.head.querySelectorAll( 11801 `style[$STYLE_HASH_ATTRIBUTE17}]` 11802 )) { 11803 if (style.getAttribute(STYLE_HASH_ATTRIBUTE17) === hash) { 11804 return true; 11805 } 11806 } 11807 return false; 11808 } 11809 function injectStyle17(targetDocument, hash, css) { 11810 if (!targetDocument.head) { 11811 return; 11812 } 11813 const runtime = getRuntime17(); 11814 let injectedStyles = runtime.injectedStyles.get(targetDocument); 11815 if (!injectedStyles) { 11816 injectedStyles = /* @__PURE__ */ new Set(); 11817 runtime.injectedStyles.set(targetDocument, injectedStyles); 11818 } 11819 if (injectedStyles.has(hash)) { 11820 return; 11821 } 11822 if (documentContainsStyleHash17(targetDocument, hash)) { 11823 injectedStyles.add(hash); 11824 return; 11825 } 11826 const style = targetDocument.createElement("style"); 11827 style.setAttribute(STYLE_HASH_ATTRIBUTE17, hash); 11828 style.appendChild(targetDocument.createTextNode(css)); 11829 targetDocument.head.appendChild(style); 11830 injectedStyles.add(hash); 11831 } 11832 function registerDocument17(targetDocument) { 11833 const runtime = getRuntime17(); 11834 runtime.documents.set( 11835 targetDocument, 11836 (runtime.documents.get(targetDocument) ?? 0) + 1 11837 ); 11838 for (const [hash, css] of runtime.styles) { 11839 injectStyle17(targetDocument, hash, css); 11840 } 11841 return () => { 11842 const count = runtime.documents.get(targetDocument); 11843 if (count === void 0) { 11844 return; 11845 } 11846 if (count <= 1) { 11847 runtime.documents.delete(targetDocument); 11848 return; 11849 } 11850 runtime.documents.set(targetDocument, count - 1); 11851 }; 11852 } 11853 function registerStyle17(hash, css) { 11854 const runtime = getRuntime17(); 11855 runtime.styles.set(hash, css); 11856 for (const targetDocument of runtime.documents.keys()) { 11857 injectStyle17(targetDocument, hash, css); 11858 } 11859 } 11860 if (typeof process === "undefined" || true) { 11861 registerStyle17("30e8b36272", "@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._4145abab73d17514__notice{--icon-height:var(--wpds-dimension-size-sm,24px);--text-vertical-padding:calc((var(--icon-height) - var(--wpds-typography-line-height-sm, 20px))/2);--wp-ui-notice-background-color:var(--wpds-color-background-surface-neutral-weak,#f4f4f4);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-neutral,#dbdbdb);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-neutral,#1e1e1e);align-items:start;background-color:var(--wp-ui-notice-background-color);border:1px solid var(--wp-ui-notice-border-color);border-radius:var(--wpds-border-radius-lg,8px);container-type:inline-size;display:grid;grid-template-columns:auto 1fr auto;isolation:isolate;padding:var(--wpds-dimension-padding-md,12px)}.d0a25570cb528528__icon{color:var(--wp-ui-notice-decorative-icon-color);grid-column:1;grid-row:1;margin-inline-end:var(--wpds-dimension-gap-xs,4px)}._1904b570a89bb815__description{color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}._0a1270dcdd79c031__actions{display:flex;flex-wrap:wrap;gap:var(--wpds-dimension-gap-md,12px);grid-column:2}._4145abab73d17514__notice:has(._1904b570a89bb815__description) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions{margin-block-start:var(--wpds-dimension-gap-sm,8px)}._983740ab855c4e09__action-button{flex-shrink:0}.d329e7416d368d31__action-link{flex-shrink:0;&:not(:first-child){margin-inline-start:var(--wpds-dimension-gap-xs,4px)}&:not(:last-child){margin-inline-end:var(--wpds-dimension-gap-xs,4px)}}._487e6a5c1375f7dc__close-icon{grid-column:3;grid-row:1;margin-inline-start:var(--wpds-dimension-gap-xs,4px)}._531c140826094795__is-info{--wp-ui-notice-background-color:var(--wpds-color-background-surface-info-weak,#f3f9ff);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-info,#adc6e2);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-info,#001b4f);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-info-weak,#006bd7)}.ae2e1004697cce95__is-warning{--wp-ui-notice-background-color:var(--wpds-color-background-surface-warning-weak,#fff7e1);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-warning,#e1bd7c);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-warning,#2e1900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-warning-weak,#936300)}._2e614a76af494837__is-success{--wp-ui-notice-background-color:var(--wpds-color-background-surface-success-weak,#ebffed);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-success,#92d39d);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-success,#002900);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-success-weak,#008030)}.af00331ae17a0065__is-error{--wp-ui-notice-background-color:var(--wpds-color-background-surface-error-weak,#fff6f5);--wp-ui-notice-border-color:var(--wpds-color-stroke-surface-error,#e0afa7);--wp-ui-notice-text-color:var(--wpds-color-foreground-content-error,#470000);--wp-ui-notice-decorative-icon-color:var(--wpds-color-foreground-content-error-weak,#cc1818)}@container (max-width: 320px){._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._0a1270dcdd79c031__actions,._4145abab73d17514__notice:has(.b5397fb9d05389e3__title) ._1904b570a89bb815__description{grid-column:1/3}}}@layer compositions{.b5397fb9d05389e3__title{--_gcd-heading-color:var(--wp-ui-notice-text-color);color:var(--wp-ui-notice-text-color);grid-column:2;padding-block:var(--text-vertical-padding)}.d329e7416d368d31__action-link{margin-block:auto}._487e6a5c1375f7dc__close-icon,._983740ab855c4e09__action-button,.d329e7416d368d31__action-link{mix-blend-mode:luminosity;@media (forced-colors:active){mix-blend-mode:normal}}}}"); 11862 } 11863 var style_default16 = { "notice": "_4145abab73d17514__notice", "icon": "d0a25570cb528528__icon", "description": "_1904b570a89bb815__description", "actions": "_0a1270dcdd79c031__actions", "title": "b5397fb9d05389e3__title", "action-button": "_983740ab855c4e09__action-button", "action-link": "d329e7416d368d31__action-link", "close-icon": "_487e6a5c1375f7dc__close-icon", "is-info": "_531c140826094795__is-info", "is-warning": "ae2e1004697cce95__is-warning", "is-success": "_2e614a76af494837__is-success", "is-error": "af00331ae17a0065__is-error" }; 11864 var ActionLink = (0, import_element33.forwardRef)( 11865 function NoticeActionLink({ className, render, ...props }, ref) { 11866 return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)( 11867 Text, 11868 { 11869 ref, 11870 className: clsx_default(style_default16["action-link"], className), 11871 ...props, 11872 variant: "body-md", 11873 render: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Link, { tone: "neutral", variant: "default", render }) 11874 } 11875 ); 11876 } 11877 ); 11878 11879 // packages/notices/build-module/components/inline-notices/copy-button.mjs 11880 var import_compose = __toESM(require_compose(), 1); 11881 var import_element34 = __toESM(require_element(), 1); 11882 var import_i18n6 = __toESM(require_i18n(), 1); 11883 var import_jsx_runtime40 = __toESM(require_jsx_runtime(), 1); 11884 var CONFIRMATION_TIMEOUT = 4e3; 11885 function CopyButton({ text, label }) { 11886 const [hasCopied, setHasCopied] = (0, import_element34.useState)(false); 11887 const ref = (0, import_compose.useCopyToClipboard)( 11888 text, 11889 () => setHasCopied(true) 11890 ); 11891 (0, import_element34.useEffect)(() => { 11892 setHasCopied(false); 11893 }, [text]); 11894 (0, import_element34.useEffect)(() => { 11895 if (!hasCopied) { 11896 return; 11897 } 11898 const timeoutId = setTimeout( 11899 () => setHasCopied(false), 11900 CONFIRMATION_TIMEOUT 11901 ); 11902 return () => clearTimeout(timeoutId); 11903 }, [hasCopied]); 11904 return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [ 11905 /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(notice_exports.ActionButton, { ref, variant: "outline", children: label }), 11906 /* @__PURE__ */ (0, import_jsx_runtime40.jsx)( 11907 notice_exports.Description, 11908 { 11909 role: "status", 11910 className: "notices-inline-notices__copy-status", 11911 children: hasCopied ? (0, import_i18n6.__)("Copied") : "" 11912 } 11913 ) 11914 ] }); 11915 } 11916 11917 // packages/notices/build-module/components/inline-notices/details-text.mjs 11918 var import_jsx_runtime41 = __toESM(require_jsx_runtime(), 1); 11919 var URL_PATTERN = /https?:\/\/[^\s<>"]+/g; 11920 function trimTrailingPunctuation(url) { 11921 let end = url.length; 11922 while (end > 0) { 11923 const character = url[end - 1]; 11924 if (`.,;:!?'"`.includes(character)) { 11925 end--; 11926 continue; 11927 } 11928 if (character === ")") { 11929 const candidate = url.slice(0, end); 11930 const opening = candidate.split("(").length - 1; 11931 const closing = candidate.split(")").length - 1; 11932 if (closing > opening) { 11933 end--; 11934 continue; 11935 } 11936 } 11937 break; 11938 } 11939 return url.slice(0, end); 11940 } 11941 function DetailsText({ children }) { 11942 const parts = []; 11943 let lastIndex = 0; 11944 for (const match of children.matchAll(URL_PATTERN)) { 11945 const url = trimTrailingPunctuation(match[0]); 11946 parts.push(children.slice(lastIndex, match.index)); 11947 parts.push( 11948 // The failure that a notice reports may have left unsaved changes, 11949 // so a link must not navigate away from them. 11950 /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Link, { href: url, tone: "neutral", openInNewTab: true, children: url }, match.index) 11951 ); 11952 lastIndex = match.index + url.length; 11953 } 11954 parts.push(children.slice(lastIndex)); 11955 return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: parts }); 11956 } 11957 11958 // packages/notices/build-module/components/inline-notices/inline-notice.mjs 11959 var import_jsx_runtime42 = __toESM(require_jsx_runtime(), 1); 11960 function getStatusLabel(status) { 11961 switch (status) { 11962 case "warning": 11963 return (0, import_i18n7.__)("Warning notice"); 11964 case "info": 11965 return (0, import_i18n7.__)("Information notice"); 11966 case "error": 11967 return (0, import_i18n7.__)("Error notice"); 11968 // The default will also catch the 'success' status. 11969 default: 11970 return (0, import_i18n7.__)("Notice"); 11971 } 11972 } 11973 function useAnnouncement(notice) { 11974 const { spokenMessage, status } = notice; 11975 (0, import_element35.useEffect)(() => { 11976 if (spokenMessage) { 11977 (0, import_a11y2.speak)(spokenMessage, status === "error" ? "assertive" : "polite"); 11978 } 11979 }, [notice, spokenMessage, status]); 11980 } 11981 function NoticeActionControl({ 11982 action: { label, url, onClick, className, variant, isPrimary, disabled: disabled2 } 11983 }) { 11984 if (url && !disabled2) { 11985 return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)( 11986 notice_exports.ActionLink, 11987 { 11988 href: url, 11989 onClick, 11990 className, 11991 children: label 11992 } 11993 ); 11994 } 11995 return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)( 11996 notice_exports.ActionButton, 11997 { 11998 variant: variant === "primary" || isPrimary ? "solid" : "outline", 11999 onClick, 12000 className, 12001 disabled: disabled2, 12002 children: label 12003 } 12004 ); 12005 } 12006 function InlineNotice({ 12007 notice, 12008 onRemove 12009 }) { 12010 const { 12011 status, 12012 content, 12013 details, 12014 __unstableHTML, 12015 isDismissible, 12016 onDismiss 12017 } = notice; 12018 const actions = notice.actions; 12019 const slot = notice[NOTICE_SLOT]; 12020 const [isOpen, setIsOpen] = (0, import_element35.useState)(false); 12021 useAnnouncement(notice); 12022 const canCopy = !!details && !__unstableHTML; 12023 const hasActions = actions.length > 0 || !!details; 12024 const children = /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [ 12025 /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(VisuallyHidden, { children: getStatusLabel(status) }), 12026 __unstableHTML ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(notice_exports.Description, { render: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", {}), children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_element35.RawHTML, { children: content }) }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(notice_exports.Description, { children: [ 12027 content, 12028 slot && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [ 12029 " ", 12030 /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components.Slot, { name: slot }) 12031 ] }) 12032 ] }), 12033 hasActions && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(notice_exports.Actions, { children: [ 12034 actions.map((action, index2) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(NoticeActionControl, { action }, index2)), 12035 !!details && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)( 12036 collapsible_exports.Trigger, 12037 { 12038 render: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(notice_exports.ActionButton, { variant: "outline" }), 12039 children: isOpen ? (0, import_i18n7.__)("Hide details") : (0, import_i18n7.__)("Show details") 12040 } 12041 ), 12042 canCopy && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)( 12043 CopyButton, 12044 { 12045 text: `$content} 12046 12047 $details}`, 12048 label: status === "error" ? (0, import_i18n7.__)("Copy error") : (0, import_i18n7.__)("Copy message") 12049 } 12050 ) 12051 ] }), 12052 !!details && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)( 12053 collapsible_exports.Panel, 12054 { 12055 hiddenUntilFound: true, 12056 className: "notices-inline-notices__details", 12057 render: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(notice_exports.Description, { render: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", {}) }), 12058 children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DetailsText, { children: details }) 12059 } 12060 ), 12061 isDismissible && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)( 12062 notice_exports.CloseIconButton, 12063 { 12064 label: (0, import_i18n7.__)("Close"), 12065 onClick: () => { 12066 onDismiss?.(); 12067 onRemove(); 12068 } 12069 } 12070 ) 12071 ] }); 12072 const rootProps = { 12073 intent: status, 12074 className: clsx_default("notices-inline-notices__notice", `is-$status}`) 12075 }; 12076 if (!details) { 12077 return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(notice_exports.Root, { ...rootProps, children }); 12078 } 12079 return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)( 12080 collapsible_exports.Root, 12081 { 12082 open: isOpen, 12083 onOpenChange: setIsOpen, 12084 render: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(notice_exports.Root, { ...rootProps }), 12085 children 12086 } 12087 ); 12088 } 12089 12090 // packages/notices/build-module/components/inline-notices/index.mjs 12091 var import_jsx_runtime43 = __toESM(require_jsx_runtime(), 1); 12092 function NoticeList({ 12093 notices: notices2, 12094 className, 12095 onRemove, 12096 children 12097 }) { 12098 return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: clsx_default("notices-inline-notices__list", className), children: [ 12099 children, 12100 [...notices2].reverse().map((notice) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)( 12101 InlineNotice, 12102 { 12103 notice, 12104 onRemove: () => onRemove?.(notice.id) 12105 }, 12106 notice.id 12107 )) 12108 ] }); 12109 } 12110 function hasRenderableChildren(children) { 12111 return import_element36.Children.toArray(children).some((child) => child !== ""); 12112 } 12113 function InlineNotices({ 12114 children, 12115 className, 12116 pinnedNoticesClassName, 12117 dismissibleNoticesClassName, 12118 context 12119 }) { 12120 const notices2 = (0, import_data3.useSelect)( 12121 (select) => select(store).getNotices(context), 12122 [context] 12123 ); 12124 const { removeNotice: removeNotice2 } = (0, import_data3.useDispatch)(store); 12125 const dismissibleNotices = notices2.filter( 12126 ({ isDismissible, type }) => isDismissible && type === "default" 12127 ); 12128 const nonDismissibleNotices = notices2.filter( 12129 ({ isDismissible, type }) => !isDismissible && type === "default" 12130 ); 12131 const hasPinnedNotices = nonDismissibleNotices.length > 0; 12132 const hasDismissibleNotices = dismissibleNotices.length > 0 || hasRenderableChildren(children); 12133 if (!hasPinnedNotices && !hasDismissibleNotices) { 12134 return null; 12135 } 12136 return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: clsx_default("notices-inline-notices-wrapper", className), children: [ 12137 hasPinnedNotices && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)( 12138 NoticeList, 12139 { 12140 notices: nonDismissibleNotices, 12141 className: clsx_default( 12142 "components-notices__pinned", 12143 pinnedNoticesClassName 12144 ) 12145 } 12146 ), 12147 hasDismissibleNotices && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)( 12148 NoticeList, 12149 { 12150 notices: dismissibleNotices, 12151 className: clsx_default( 12152 "components-notices__dismissible", 12153 dismissibleNoticesClassName 12154 ), 12155 onRemove: (id) => removeNotice2(id, context), 12156 children 12157 } 12158 ) 12159 ] }); 12160 } 12161 12162 // packages/notices/build-module/components/snackbar-notices/index.mjs 12163 var import_components2 = __toESM(require_components(), 1); 12164 var import_data4 = __toESM(require_data(), 1); 12165 var import_jsx_runtime44 = __toESM(require_jsx_runtime(), 1); 12166 var MAX_VISIBLE_NOTICES = -3; 12167 function SnackbarNotices({ 12168 className, 12169 context 12170 }) { 12171 const notices2 = (0, import_data4.useSelect)( 12172 (select) => select(store).getNotices(context), 12173 [context] 12174 ); 12175 const { removeNotice: removeNotice2 } = (0, import_data4.useDispatch)(store); 12176 const snackbarNotices = notices2.filter(({ type }) => type === "snackbar").slice(MAX_VISIBLE_NOTICES); 12177 return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)( 12178 import_components2.SnackbarList, 12179 { 12180 notices: snackbarNotices, 12181 className: clsx_default("components-notices__snackbar", className), 12182 onRemove: (id) => removeNotice2(id, context) 12183 } 12184 ); 12185 } 12186 12187 // packages/notices/build-module/lock-unlock.mjs 12188 var import_private_apis2 = __toESM(require_private_apis(), 1); 12189 var { lock: lock2, unlock: unlock2 } = (0, import_private_apis2.__dangerousOptInToUnstableAPIsOnlyForCoreModules)( 12190 "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.", 12191 "@wordpress/notices" 12192 ); 12193 12194 // packages/notices/build-module/private-apis.mjs 12195 var privateApis = {}; 12196 lock2(privateApis, { 12197 NOTICE_SLOT 12198 }); 12199 return __toCommonJS(index_exports); 12200 })(); 12201 /*! Bundled license information: 12202 12203 use-sync-external-store/cjs/use-sync-external-store-shim.development.js: 12204 (** 12205 * @license React 12206 * use-sync-external-store-shim.development.js 12207 * 12208 * Copyright (c) Meta Platforms, Inc. and affiliates. 12209 * 12210 * This source code is licensed under the MIT license found in the 12211 * LICENSE file in the root directory of this source tree. 12212 *) 12213 12214 use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js: 12215 (** 12216 * @license React 12217 * use-sync-external-store-shim/with-selector.development.js 12218 * 12219 * Copyright (c) Meta Platforms, Inc. and affiliates. 12220 * 12221 * This source code is licensed under the MIT license found in the 12222 * LICENSE file in the root directory of this source tree. 12223 *) 12224 */ 12225 (window.wp ||= {}).notices = wp.notices; 12226 })();
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated : Sat Oct 31 08:20:35 2026 | Cross-referenced by PHPXref |